]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/java/ChangeLog
5b1e588cd6123dc5904783cd33b8dc8b89fda09a
[thirdparty/gcc.git] / gcc / java / ChangeLog
1 2014-10-15 Evgeny Stupachenko <evstupac@gmail.com>
2
3 PR target/63536
4 * lang.c (java_print_error_function): Add check on NULL function
5 context.
6
7 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
8
9 * class.c, decl.c, except.c, expr.c, java-tree.h, lang.c: Use
10 hash_table instead of hashtab.
11
12 2014-10-07 Marek Polacek <polacek@redhat.com>
13
14 * jvgenmain.c (main): Provide declarations for JvRunMain{,Name}.
15
16 2014-07-08 Mark Wielaard <mjw@redhat.com>
17
18 * builtins.c (putVolatile_builtin): Use build_qualified_type
19 instead of build_type_variant.
20 (getVolatile_builtin): Likewise.
21 (build_classdollar_field): Likewise.
22
23 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
24
25 * jcf-io.c: Adjust.
26
27 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
28
29 * java/class.c (build_utf8_ref): Update handling for section names
30 that are no longer trees.
31 (emit_register_classes_in_jcr_section): Update.
32
33 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
34
35 * class.c (build_utf8_ref): Use set_decl_section_name.
36 (emit_register_classes_in_jcr_section): Likewise.
37 (emit_register_classes_in_jcr_section): Likewise.
38
39 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
40
41 * class.c (add_method_1): Adjust.
42 (java_treetreehash_new): Likewise.
43 * constants.c (set_constant_entry): Likewise.
44 (cpool_for_class): Likewise.
45 * decl.c (make_binding_level): Likewise.
46 (java_dup_lang_specific_decl): Likewise.
47 * expr.c (add_type_assertion): Likewise.
48 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
49 (lang_decl): don't use variable_size gty attribute.
50 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Adjust.
51 (lang_type): Don't use variable_size gty attribute.
52 * jcf-parse.c (java_parse_file): Adjust.
53 (process_zip_dir): Likewise.
54 * jcf.h: Remove usage of variable_size gty attribute.
55 * jcf-reader.c (jcf_parse_constant_pool): Adjust.
56 (jcf_parse_bootstrap_methods): Likewise.
57
58 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
59
60 * constants.c (set_constant_entry): Adjust.
61
62 2014-05-06 Richard Sandiford <r.sandiford@uk.ibm.com>
63
64 * boehm.c (mark_reference_fields): Don't update the mask when
65 setting pointer_after_end.
66
67 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
68 Mike Stump <mikestump@comcast.net>
69 Richard Sandiford <rdsandiford@googlemail.com>
70
71 * boehm.c: Include wide-int.h.
72 (mark_reference_fields): Use a wide_int mask.
73 (get_boehm_type_descriptor): Use wide-int interfaces.
74 * expr.c: Include wide-int.h.
75 (build_newarray): Remove bogus "== INTEGER_CST".
76 (expand_java_pushc): Use real_from_integer.
77 (build_field_ref): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
78 * jcf-parse.c: Include wide-int.h.
79 (get_constant): Use wide-int interfaces.
80
81 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
82
83 Update copyright years
84
85 2014-01-02 Tobias Burnus <burnus@net-b.de>
86
87 * jcf-dump.c (version): Update copyright notice dates.
88 * gcj.texi: Bump @copying's copyright year.
89
90 2013-12-19 Jakub Jelinek <jakub@redhat.com>
91
92 PR other/59545
93 * class.c (hashUtf8String): Compute hash in unsigned type.
94 * javaop.h (WORD_TO_INT): Avoid signed integer overflow.
95
96 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
97
98 * java-gimplify.c: Add required include files from gimple.h.
99
100 2013-11-22 David Malcolm <dmalcolm@redhat.com>
101
102 * class.c (maybe_layout_super_class): Update comment.
103 * decl.c (java_add_stmt): Remove use of input_filename macro.
104 * jcf-parse.c (set_source_filename): Remove use of
105 input_filename macro.
106 (parse_class_file): Remove use of input_line and input_filename
107 macros.
108 (java_parse_file): Remove use of input_filename macro.
109
110 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
111
112 * class.c, expr.c: Replace tree_low_cst (..., 0) with tree_to_shwi
113 throughout.
114
115 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
116
117 * class.c, expr.c: Replace host_integerp (..., 0) with
118 tree_fits_shwi_p throughout.
119
120 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
121
122 * java-gimplify.c: Include only gimplify.h and gimple.h as needed.
123
124 2013-11-14 Diego Novillo <dnovillo@google.com>
125
126 * builtins.c: Include stor-layout.h.
127 Include stringpool.h.
128 * class.c: Include stringpool.h.
129 Include stor-layout.h.
130 Include varasm.h.
131 * constants.c: Include stringpool.h.
132 Include stor-layout.h.
133 * decl.c: Include stor-layout.h.
134 Include stringpool.h.
135 Include varasm.h.
136 * except.c: Include stringpool.h.
137 Include stor-layout.h.
138 * expr.c: Include stringpool.h.
139 Include stor-layout.h.
140 * jcf-parse.c: Include stringpool.h.
141 * mangle.c: Include stringpool.h.
142 * resource.c: Include stringpool.h.
143 Include stor-layout.h.
144 * typeck.c: Include stor-layout.h.
145 Include stringpool.h.
146 * verify-glue.c: Include stringpool.h.
147
148 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
149
150 * java-gimplify.c: Include gimplify.h.
151
152 2013-11-07 Jeff Law <law@redhat.com>
153
154 * builtins.c (initialize_builtins): Provide __builtin_trap.
155
156 2013-10-29 David Malcolm <dmalcolm@redhat.com>
157
158 Patch autogenerated by refactor_symtab.py from
159 https://github.com/davidmalcolm/gcc-refactoring-scripts
160 revision 58bb219cc090b2f4516a9297d868c245495ee622
161
162 * decl.c (java_mark_decl_local): Update for conversion of symtab types
163 to a true class hierarchy.
164
165 2013-10-14 David Malcolm <dmalcolm@redhat.com>
166
167 * lang.c (java_handle_option): Update for introduction of
168 gcc::dump_manager.
169
170 2013-09-25 Tom Tromey <tromey@redhat.com>
171
172 * Make-lang.in (jvspec.o): Remove.
173 (CFLAGS-java/jvspec.o): New variable.
174 ($(XGCJ)$(exeext), java_OBJS): Use java/jvspec.o
175 (java/jvspec.o-warn): Rename from jvspec.o-warn.
176 (JAVA_TREE_H, java/jcf-dump.o, java/boehm.o, java/builtins.o)
177 (java/class.o, java/constants.o, java/decl.o, java/except.o)
178 (java/expr.o, java/jcf-depend.o, java/jcf-parse.o)
179 (java/jvgenmain.o, java/lang.o, java/mangle.o, java/mangle_name.o)
180 (java/resource.o java/typeck.o, java/win32-host.o)
181 (java/verify-glue.o, java/verify-impl.o, java/zextract.o)
182 (java/java-gimplify.o, java/jcf-io.o, java/jcf-path.o): Remove.
183
184 2013-09-25 Tom Tromey <tromey@redhat.com>
185
186 * Make-lang.in (jvspec.o): Don't use subshell.
187
188 2013-06-05 Jan Hubicka <jh@suse.cz>
189
190 * class.c (emit_register_classes_in_jcr_section): Use DECL_PRESERVE_P
191 instead of mark_decl_referenced.
192
193 2013-05-29 Jan Hubicka <jh@suse.cz>
194
195 * decl.c (java_mark_decl_local): Update for new symtab flags.
196
197 2013-05-22 Matthias Klose <doko@ubuntu.com>
198
199 * jvspec.c (jvgenmain_spec): Add %I to cc1 call.
200
201 2013-05-16 Jason Merrill <jason@redhat.com>
202
203 * Make-lang.in (jc1$(exeext)): Use link mutex.
204
205 2013-05-06 Jakub Jelinek <jakub@redhat.com>
206
207 PR libgcj/57074
208 * class.c (emit_symbol_table): Use array type of the
209 right size for the_syms_decl and its DECL_INITIAL, instead
210 of symbols_array_type. Set TREE_TYPE (the_syms_decl) to it.
211 (emit_assertion_table): Use array type of the right size
212 for table_decl and its DECL_INITIAL.
213
214 2013-04-15 Gerald Pfeifer <gerald@pfeifer.com>
215
216 * gcj.texi (Configure-time Options): Refer to GCC, not gcc.
217 (Resources): Adjust reference to Mauve.
218 Remove link to java.sun.com.
219 Refer to GCC, not gcc.
220
221 2013-04-09 Richard Biener <rguenther@suse.de>
222
223 * expr.c (build_java_binop): Pass a type to build_int_cst.
224
225 2013-03-22 Kai Tietz <ktietz@redhat.com>
226
227 * lang.c (put_decl_node): Don't iterate over end_params_node.
228
229 2013-01-03 Jakub Jelinek <jakub@redhat.com>
230
231 * jcf-dump.c (version): Update copyright notice dates.
232
233 2012-11-16 Diego Novillo <dnovillo@google.com>
234
235 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
236
237 * boehm.c: Use new vec API in vec.h.
238 * class.c: Likewise.
239 * constants.c: Likewise.
240 * decl.c: Likewise.
241 * expr.c: Likewise.
242 * java-tree.h: Likewise.
243 * jcf-parse.c: Likewise.
244 * resource.c: Likewise.
245 * verify-glue.c: Likewise.
246
247 2012-11-15 Jan Hubicka <jh@suse.cz>
248
249 * builtins.c (define_builtin): Accept ECF flags and
250 use set_call_expr_flags.
251 (initialize_builtins): Update.
252
253 2012-10-01 Lawrence Crowl <crowl@google.com>
254
255 * Make-lang.in (JAVA_OBJS): Add dependence on hash-table.o.
256 (JCFDUMP_OBJS): Add dependence on hash-table.o.
257 (jcf-io.o): Add dependence on hash-table.h.
258 * jcf-io.c (memoized_class_lookups): Change to use type-safe hash table.
259
260 2012-09-24 Lawrence Crowl <crowl@google.com>
261
262 * decl.c (java_init_decl_processing): Change to new double_int API.
263 * jcf-parse.c (get_constant): Likewise.
264 * boehm.c (mark_reference_fields): Likewise.
265 (get_boehm_type_descriptor): Likewise.
266
267 2012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com>
268
269 * jcf.h (CPool): Use the "atomic" GTY option for the tags field.
270 (bootstrap_method): Likewise for the bootstrap_arguments field.
271
272 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
273
274 * java-gimplify.c: Include dumpfile.h instead of tree-dump.h
275 * Make-lang.in: Fix dependencies.
276
277 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
278
279 * java-tree.h (force_evaluation_order): Remove prototype.
280 * expr.c (force_evaluation_order): Remove unused function.
281
282 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
283
284 * decl.c: Do not include libfuncs.h.
285 * class.c: Do not include defaults.h.
286 * jvgenmain.c: Likewise.
287 * magnle.c: Likewise.
288 * Make-lang.in (decl.o): Fix dependencies.
289
290 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
291
292 * verify.h: Do not include system.h and coretypes.h here.
293 * verify-impl.c: Include them here instead.
294
295 2012-07-05 Uros Bizjak <ubizjak@gmail.com>
296
297 * jcf-io.c (read_zip_member): Initialize d_stream.
298
299 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
300
301 * resource.c: Do not include output.h.
302
303 2012-05-21 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
304
305 PR java/52815
306 * class.c (emit_register_classes_in_jcr_section): Revise placement
307 of #ifdef JCR_SECTION_NAME.
308
309 2012-04-22 Jan Hubicka <jh@suse.cz>
310
311 * class.c (build_utf8_ref): Do not mark varpool node as needed.
312
313 2012-04-20 Jan Hubicka <jh@suse.cz>
314
315 * class.c (make_local_function_alias): Do not mark symbol referenced.
316
317 2012-04-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
318
319 * jcf-dump.c (print_constant): Cast JPOOL_USHORT2, JPOOL_USHORT1
320 results to long to match formats.
321
322 2012-04-11 Andrew Haley <aph@redhat.com>
323
324 * jcf-reader.c (jcf_parse_bootstrap_methods): Add
325 ATTRIBUTE_UNUSED.
326
327 2012-04-11 Andrew Haley <aph@redhat.com>
328
329 * jcf.h (bootstrap_method): New.
330 (BootstrapMethods): New.
331 (JCF): Add BootstrapMethods.
332 (enum cpool_tag): Add MethodHandle, MethodType, and InvokeDynamic.
333 * jcf-reader.c (jcf_parse_bootstrap_methods): New.
334 (jcf_parse_constant_pool): Handlers for MethodHandle, MethodType,
335 and InvokeDynamic.
336 (jcf_parse_bootstrap_methods): New.
337 * javaop.def (invokedynamic): New opcode.
338 * jcf-parse.c (get_constant): An unknown constant type should not
339 be an internal error, but a fatal one. Make it so.
340 * jcf-dump.c (HANDLE_BOOTSTRAP_METHODS_ATTRIBUTE): New.
341 (HANDLE_END_BOOTSTRAP_METHODS): New.
342 (print_constant): Handlers for MethodHandle, MethodType, and
343 InvokeDynamic.
344
345 2012-04-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
346
347 * class.c (emit_register_classes_in_jcr_section): Set DECL_USER_ALIGN.
348 Clear TREE_READONLY.
349
350 2012-03-29 Steven Bosscher <steven@gcc.gnu.org>
351
352 PR java/52730
353 * class.c (emit_register_classes_in_jcr_section): New function.
354 (emit_Jv_RegisterClass_calls): New function, split out from ...
355 (emit_register_classes): ... here. Reorganize. Do not call
356 output_constant.
357
358 2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
359
360 * lang.c (java_init_options_struct): Set
361 frontend_set_flag_trapping_math.
362
363 2012-01-01 Jakub Jelinek <jakub@redhat.com>
364
365 * jcf-dump.c (version): Update copyright notice dates.
366
367 2011-12-03 Matthias Klose <doko@ubuntu.com>
368
369 * expr.c (SPECIAL_WIDE): Fix typo in message.
370
371 2011-11-23 Jeffrey A Law (law@cygnus.com)
372
373 * lang.c (java_init_options_struct): Disable optimizations
374 which assume a NULL pointer dereference will cause a fault.
375
376 2011-11-07 Richard Henderson <rth@redhat.com>
377
378 * builtins.c (compareAndSwapInt_builtin): Use can_compare_and_swap_p.
379 (compareAndSwapLong_builtin): Likewise.
380 (compareAndSwapObject_builtin): Likewise.
381 (VMSupportsCS8_builtin): Likewise.
382
383 2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
384
385 * Make-lang.in (jvspec.o): Pass SHLIB instead of SHLIB_LINK.
386
387 2011-10-15 Tom Tromey <tromey@redhat.com>
388 Dodji Seketeli <dodji@redhat.com>
389
390 * jcf-parse.c (set_source_filename): Adjust to the new map API.
391
392 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
393
394 * class.c (build_static_field_ref): Delete old interface with two
395 parallel arrays to hold standard builtin declarations, and replace
396 it with a function based interface that can support creating
397 builtins on the fly in the future. Change all uses, and poison
398 the old names. Make sure 0 is not a legitimate builtin index.
399 * decl.c (java_init_decl_processing): Ditto.
400 * except.c (compareAndSwapLong_builtin): Ditto.
401 (compareAndSwapObject_builtin): Ditto.
402 (putVolatile_builtin): Ditto.
403 (define_builtin): Ditto.
404 (check_for_builtin): Ditto.
405 * expr.c (rewrite_arglist_getcaller): Ditto.
406 (expand_java_field_op): Ditto.
407
408 2011-08-24 Joseph Myers <joseph@codesourcery.com>
409
410 * Make-lang.in (CFLAGS-java/jcf-io.o, CFLAGS-java/jcf-path.o):
411 New.
412 (java/jcf-io.o, java/jcf-path.o): Remove explicit compilation
413 rules.
414
415 2011-08-18 Peter Collingbourne <peter@pcc.me.uk>
416
417 * expr.c (expand_invoke) Use the type of the method rewrite
418 target.
419
420 2011-08-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
421
422 * jcf-dump.c (print_constant): Cast first frexp arg.
423
424 2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
425
426 * Make-lang.in ($(XGCJ)$(exeext)): Add $(EXTRA_GCC_LIBS).
427
428 2011-07-19 Richard Guenther <rguenther@suse.de>
429
430 * builtins.c (static): Use fold_build_pointer_plus.
431 * class.c (make_class_data): Likewise.
432 (build_symbol_entry): Likewise.
433 * except.c (build_exception_object_ref): Likewise.
434 * expr.c (build_java_arrayaccess): Likewise.
435 (build_field_ref): Likewise.
436 (build_known_method_ref): Likewise.
437 (build_invokevirtual): Likewise.
438
439 2011-07-06 Richard Guenther <rguenther@suse.de>
440
441 * decl.c (java_init_decl_processing):
442 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
443
444 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
445
446 * builtins.c: Add sync_ or SYNC__ to builtin names.
447 * expr.c: Add sync_ or SYNC__ to builtin names.
448
449 2011-06-07 Richard Guenther <rguenther@suse.de>
450
451 * decl.c (java_init_decl_processing): Call build_common_nodes,
452 build_common_nodes_2 at the beginning. Remove then duplicate
453 initializations.
454
455 2011-06-07 Richard Guenther <rguenther@suse.de>
456
457 * decl.c (java_init_decl_processing): Properly initialize
458 size_type_node.
459
460 2011-05-30 Joern Rennecke <joern.rennecke@embecosm.com>
461
462 PR middle-end/46500
463 * expr.c: Include "tm.h" .
464
465 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
466
467 * decl.c (poplevel): Don't access TREE_TYPE of BLOCKs.
468 * expr.c (build_jni_stub): Likewise.
469
470 2011-05-24 Joseph Myers <joseph@codesourcery.com>
471
472 * Make-lang.in ($(XGCJ)$(exeext)): Use libcommon-target.a instead
473 of prefix.o.
474
475 2011-05-20 Joseph Myers <joseph@codesourcery.com>
476
477 * Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and
478 version.o.
479 (JCFDUMP_OBJS): Remove errors.o, version.o and intl.o.
480 (JVGENMAIN_OBJS): Remove errors.o and intl.o.
481 (java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H).
482 * jcf-dump.c: Include diagnostic.h.
483 (main): Initialize diagnostics.
484 * jvgenmain.c: Include diagnostic.h.
485 (main): Initialize diagnostics.
486
487 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
488
489 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
490
491 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
492
493 * java-tree.h (global_bindings_p): Adjust prototype.
494 * decl.c (global_bindings_p): Return bool.
495
496 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
497
498 * expr.c (expand_java_switch): Call build_case_label.
499 (expand_java_add_case): Likewise.
500
501 2011-04-29 Richard Guenther <rguenther@suse.de>
502
503 PR middle-end/48819
504 * constants.c (build_constants_constructor): Use ptr_type_node for
505 temp.
506
507 2011-04-20 Jim Meyering <meyering@redhat.com>
508
509 * jcf-parse.c (java_parse_file): Remove useless if-before-free.
510
511 2011-04-18 Jim Meyering <meyering@redhat.com>
512
513 * jcf-parse.c: Fix typo in comment.
514
515 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
516
517 * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon.
518
519 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
520
521 * java-tree.h (union lang_tree_node): Check for TS_COMMON before
522 calling TREE_CHAIN.
523
524 2011-04-11 Martin Jambor <mjambor@suse.cz>
525
526 * decl.c (java_mark_decl_local): Call cgraph_get_node instead of
527 cgraph_node and handle returned NULL.
528
529 2011-03-25 Kai Tietz <ktietz@redhat.com>
530
531 * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
532 instead of strcmp.
533 (set_source_filename): Likewise.
534 * win32-host.c (jcf_open_exact_case): Likewise.
535
536 2011-03-21 Kai Tietz <ktietz@redhat.com>
537
538 PR target/12171
539 * lang.c (java_attribute_table): Adjust table.
540
541 2011-02-13 Joseph Myers <joseph@codesourcery.com>
542
543 * jvspec.c (jvgenmain_spec): Remove %{a*}.
544
545 2011-01-21 Kai Tietz <kai.tietz@onevision.com>
546
547 PR bootstrap/47215
548 * decl.c (java_init_decl_processing): Remove
549 va_list_type_node related type initializations.
550
551 2011-01-11 Kai Tietz <kai.tietz@onevision.com>
552
553 PR bootstrap/47215
554 * decl.c (java_init_decl_processing): Initialize
555 long_integer_type_node.
556
557 2011-01-07 Kai Tietz <kai.tietz@onevision.com>
558
559 PR bootstrap/47215
560 * decl.c (java_init_decl_processing): Initialize unsigned_type_node.
561
562 2011-01-07 Kai Tietz <kai.tietz@onevision.com>
563
564 * decl.c (java_init_decl_processing): Setup va_list_type_node.
565
566 2011-01-03 Jakub Jelinek <jakub@redhat.com>
567
568 * jcf-dump.c (version): Update copyright notice dates.
569
570 2010-12-15 Dave Korn <dave.korn.cygwin@gmail.com>
571
572 * decl.c (java_init_decl_processing): Initialise integer_three_node.
573 * lang.c (put_decl_node): Handle nested function decls.
574
575 2010-12-07 Joseph Myers <joseph@codesourcery.com>
576
577 * jcf-parse.c: Don't include assert.h.
578 (java_parse_file): Use gcc_assert.
579
580 2010-12-03 Joseph Myers <joseph@codesourcery.com>
581
582 * lang.opt (static-libgcj): New option.
583
584 2010-12-01 Joseph Myers <joseph@codesourcery.com>
585
586 * jcf-parse.c: Don't include toplev.h.
587 * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
588
589 2010-11-30 Joseph Myers <joseph@codesourcery.com>
590
591 * boehm.c: Don't include toplev.h.
592 * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
593
594 2010-11-30 Joseph Myers <joseph@codesourcery.com>
595
596 * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
597 verify-glue.c: Don't include toplev.h.
598 * Make-lang.in: Dependencies for above files changed to remove
599 toplev.h.
600
601 2010-11-29 Joseph Myers <joseph@codesourcery.com>
602
603 * boehm.c: Include "config.h" instead of <config.h>.
604 * builtins.c: Don't include <stdarg.h>.
605 * class.c: Don't include "stdio.h".
606 (O_BINARY): Don't define here.
607 * jcf-depend.c: Don't include <assert.h>.
608 (jcf_dependency_set_dep_file, jcf_dependency_init,
609 jcf_dependency_write): Use gcc_assert.
610 * jcf-io.c (O_BINARY): Don't define here.
611 * jcf-path.c: Don't include "tm.h".
612 (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
613 * resource.c: Don't include "stdio.h".
614 (O_BINARY): Don't define here.
615 * verify-impl.c: Don't include <stdio.h>.
616
617 2010-11-17 Joseph Myers <joseph@codesourcery.com>
618
619 * jcf-parse.c (java_parse_file): Take no arguments.
620 * java-tree.h (java_parse_file): Update prototype.
621
622 2010-11-09 Joern Rennecke <amylaar@spamcop.net>
623 Andrew Haley <aph@redhat.com>
624
625 PR java/46386
626 * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
627
628 2010-11-12 Joseph Myers <joseph@codesourcery.com>
629
630 * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
631 * lang.c (java_handle_option): Take location_t parameter.
632
633 2010-11-10 Joseph Myers <joseph@codesourcery.com>
634
635 * expr.c (expand_java_field_op): Use %' in diagnostic.
636 * jcf-parse.c (java_parse_file): Use %' in diagnostics.
637 * jvspec.c (lang_specific_driver): Use %' in diagnostic.
638 * lang.c (java_post_options): Use %' in diagnostics.
639
640 2010-11-06 Joern Rennecke <amylaar@spamcop.net>
641
642 PR middle-end/46314
643 * class.c: Include target.h.
644 (make_local_function_alias):
645 Use targetm.asm_out.generate_internal_label.
646 * expr.c (lookup_label, generate_name): Likewise.
647
648 2010-11-03 Joern Rennecke <joern.rennecke@embecosm.com>
649
650 PR bootstrap/44335
651 * jfc-parse.c (target.h): Include.
652 (handle_constant): Use targetm.words_big_endian and
653 targetm.float_words_big_endian.
654 (get_constant): Use targetm.float_words_big_endian.
655
656 2010-10-13 Richard Henderson <rth@redhat.com>
657
658 * lang.c (java_eh_personality): Update call to
659 build_personality_function.
660
661 2010-10-12 Joseph Myers <joseph@codesourcery.com>
662
663 * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
664 options.h.
665
666 2010-10-11 Nathan Froyd <froydnj@codesourcery.com>
667
668 * decl.c (java_init_decl_processing): Use build_function_type_list
669 instead of build_function_type.
670 * jcf-parse.c (java_emit_static_constructor): Likewise.
671 * builtins.c (initialize_builtins): Likewise.
672
673 2010-10-08 Joseph Myers <joseph@codesourcery.com>
674
675 * lang.c (java_init_options_struct): New. Split out from
676 java_init_options.
677 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
678
679 2010-10-04 Andi Kleen <ak@linux.intel.com>
680
681 * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
682 Add + to build rule.
683
684 2010-09-29 Joseph Myers <joseph@codesourcery.com>
685
686 * lang.opt: Don't use VarExists.
687
688 2010-09-29 Joseph Myers <joseph@codesourcery.com>
689
690 * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
691 flag_force_classes_archive_check, flag_redundant, flag_newer,
692 flag_use_divide_subroutine, flag_use_atomic_builtins,
693 flag_use_boehm_gc, flag_hash_synchronization,
694 flag_check_references, flag_optimize_sci, flag_indirect_classes,
695 flag_indirect_dispatch, flag_store_check,
696 flag_reduced_reflection): Remove.
697 * jcf-dump.c (flag_newer): Remove.
698 * jcf.h (quiet_flag): Remove.
699 * parse.h (quiet_flag): Remove.
700
701 2010-09-28 Richard Henderson <rth@redhat.com>
702
703 * lang.c: Include "target.h".
704 (java_eh_personality): Use targetm.except_unwind_info.
705 * Make-lang.in (lang.o): Update deps.
706
707 2010-09-27 Andrew Haley <aph@redhat.com>
708
709 PR java/45773
710 * jvgenmain.c (main): Fix arg processing.
711
712 2010-09-22 Joseph Myers <joseph@codesourcery.com>
713
714 * jvspec.c (lang_specific_driver): Handle OPT__help instead of
715 OPT_fhelp.
716 * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
717 -dependencies, -encoding, -extdirs, -include-directory,
718 -include-directory=, -output-class-directory,
719 -output-class-directory=, -resource, -resource=,
720 -user-dependencies): New.
721
722 2010-09-16 Richard Guenther <rguenther@suse.de>
723
724 * jcf-parse.c (current_file_list): Remove.
725 (java_parse_file): Use build_translation_unit_decl. Adjust.
726
727 2010-09-03 Joseph Myers <joseph@codesourcery.com>
728
729 * lang.opt (d): New.
730
731 2010-09-03 H.J. Lu <hongjiu.lu@intel.com>
732
733 PR java/45504
734 * jvgenmain.c (main): Check "-D XXX=YYY".
735
736 2010-09-02 Joseph Myers <joseph@codesourcery.com>
737
738 * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
739
740 2010-09-02 Joseph Myers <joseph@codesourcery.com>
741
742 * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
743 fCLASSPATH=): Mark as Java options and as aliases.
744 * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
745 (lang_specific_driver): Don't handle options marked as aliases.
746 * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
747
748 2010-08-22 Joseph Myers <joseph@codesourcery.com>
749
750 * Make-lang.in (jvspec.o): Update dependencies.
751 * jvspec.c: Include opts.h.
752 (PARAM_ARG): Remove.
753 (find_spec_file): Do not add leading -specs=.
754 (lang_specific_driver): Use cl_decoded_option structures.
755 * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
756 extdirs, fmain=, s-bc-abi): New options.
757
758 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
759
760 * class.c: Use FOR_EACH_VEC_ELT.
761 * expr.c: Likewise.
762 * jcf-parse.c: Likewise.
763 * resource.c: Likewise.
764
765 2010-08-16 Joseph Myers <joseph@codesourcery.com>
766
767 * lang.opt (MD_, MMD_, version): Mark RejectDriver.
768
769 2010-08-05 David Daney <ddaney@caviumnetworks.com>
770
771 * class.c (build_utf8_ref): Fix code formatting from previous commit.
772
773 2010-08-05 David Daney <ddaney@caviumnetworks.com>
774
775 * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
776
777 2010-07-27 Joseph Myers <joseph@codesourcery.com>
778
779 * lang.c (java_handle_option): Update prototype and return value
780 type.
781
782 2010-07-27 Joseph Myers <joseph@codesourcery.com>
783
784 * lang.c (java_option_lang_mask): New.
785 (java_init_options): Update prototype.
786 (LANG_HOOKS_OPTION_LANG_MASK): Define.
787
788 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
789
790 * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
791 * boehm.c: Likewise.
792 * class.c: Likewise.
793 * decl.c: Likewise.
794 * expr.c: Likewise.
795 * jcf-parse.c: Likewise.
796 * typeck.c: Likewise.
797 * verify-glue.c: Likewise.
798
799 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
800
801 * boehm.c: Include diagnostic-core.h in every file that includes
802 toplev.h.
803 * class.c: Likewise.
804 * constants.c: Likewise.
805 * decl.c: Likewise.
806 * except.c: Likewise.
807 * expr.c: Likewise.
808 * jcf-parse.c: Likewise.
809 * mangle.c: Likewise.
810 * mangle_name.c: Likewise.
811 * resource.c: Likewise.
812 * typeck.c: Likewise.
813 * verify-glue.c: Likewise.
814
815 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
816
817 PR bootstrap/44825
818 * class.c (make_class_data): Cast result of VEC_length calls to int.
819
820 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
821
822 * constants.c (build_constants_constructor): Use build_constructor
823 instead of build_constructor_from_list.
824 * class.c (make_method_value): Likewise.
825 (get_dispatch_table): Likewise.
826 (make_class_data): Likewise.
827 (emit_indirect_register_classes): Likewise.
828 (emit_symbol_table): Likewise.
829 (add_assertion_table_entry): Likewise.
830 (emit_assertion_table): Likewise.
831 (make_field_value): Use build_constructor_single instead of
832 build_constructor_from_list.
833
834 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
835
836 * java-tree.h (struct lang_type) [catch_classes]: Change type to a
837 VEC.
838 * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
839 instead of tree_cons.
840 * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
841 (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
842
843 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
844
845 * lang.c: Do not include except.h
846 * except.c: Likewise.
847 (doing_eh): New, moved from except.c (in gcc/) but removed the
848 do_warning flag.
849 (maybe_start_try): Update doing_eh call.
850 * Make-lang.in: Update dependencies.
851
852 2010-06-23 Anatoly Sokolov <aesok@post.ru>
853
854 * decl.c (java_init_decl_processing): Use double_int_to_tree instead
855 of build_int_cst_wide.
856 * boehm.c (set_bit): Remove.
857 (mark_reference_fields): Use double_int type for 'mask' argument.
858 Use double_int_setbit instead of set_bit.
859 (get_boehm_type_descriptor): Use double_int_setbit instead of
860 set_bit. Use double_int_to_tree instead of build_int_cst_wide.
861
862 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
863
864 * gcj.texi: Move to GFDL version 1.3. Fix copyright years.
865
866 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
867
868 * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
869
870 * jcf-parse.c (java_parse_file): Likewise.
871 (process_zip_dir): Likewise.
872
873 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
874 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
875
876 * expr.c (add_type_assertion): Likewise.
877
878 * decl.c (make_binding_level): Likewise.
879 (java_dup_lang_specific_decl): Likewise.
880
881 * constants.c (set_constant_entry): Likewise.
882 (cpool_for_class): Likewise.
883
884 * class.c (add_method_1): Likewise.
885 (java_treetreehash_new): Likewise.
886
887 * java-tree.h (struct lang_type): Add variable_size GTY option.
888 (struct lang_decl): Likewise.
889
890 * jch.h (struct cpool_entry): Likewise.
891
892 * java-tree.h (java_treetreehash_create): Remove parameter ggc.
893
894 * except.c (prepare_eh_table_type): Update
895 java_treetreehash_create call.
896
897 * class.c (add_method_1): Update java_treetreehash_create call.
898 (java_treetreehash_create): Remove parameter gc. Use
899 htab_create_ggc.
900
901 2010-06-04 Joseph Myers <joseph@codesourcery.com>
902
903 * jvspec.c (lang_specific_driver): Use GCC-specific formats in
904 diagnostics.
905
906 2010-05-30 Steven Bosscher <steven@gcc.gnu.org>
907
908 * except.c: Include tm.h.
909
910 2010-05-28 Joseph Myers <joseph@codesourcery.com>
911
912 * jvspec.c (lang_specific_driver): Use fatal_error instead of
913 fatal. Use warning instead of error for warnings.
914
915 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
916
917 * expr.c (get_symbol_table_index): Add spaces in expression.
918
919 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
920
921 * java-tree.h (method_entry): Declare. Declare VECs containing it.
922 (struct lang_type): Change type of otable_methods, atable_methods, and
923 itable_methods to VECs. Fix comment for atable_methods.
924 (emit_symbol_table): Take a VEC instead of a tree.
925 (get_symbol_table_index): Take a VEC * instead of a tree *.
926 * class.c (add_table_and_syms): Take a VEC instead of a tree.
927 (emit_symbol_table): Update for changed parameter type.
928 * expr.c (get_symbol_table_index): Likewise.
929
930 2010-05-27 Steven Bosscher <steven@gcc.gnu.org>
931
932 * buildings.c: Pretend to be a backend file by undefining
933 IN_GCC_FRONTEND (still need rtl.h here).
934
935 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
936
937 * java-tree.h (struct lang_decl_func): Change type of throws_list
938 field to a VEC.
939 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
940 of DECL_FUNCTION_THROWS.
941 * class.c (make_method_value): Likewise.
942
943 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
944
945 * class.c (utf8_decl_list): Delete.
946 (build_utf8_ref): Remove references to it.
947 * java-tree.h (all_class_list): Delete.
948 (predef_filenames): Delete.
949 (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
950 Delete.
951 * jcf-parse.c (parse_roots): Decrease size to 2.
952 (current_file_list): Convert to a VEC.
953 (all_class_list): Declare.
954 (jcf_parse): Adjust for new type of all_class_list.
955 (java_layout_seen_class_methods): Likewise.
956 (predefined_filenames): Declare.
957 (add_predefined_file): Use it.
958 (predefined_filename_p): Likewise.
959 (java_parse_file): Adjust for new type of current_file_list.
960
961 2010-05-25 Jakub Jelinek <jakub@redhat.com>
962
963 * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
964 for interfaces.
965
966 PR debug/43260
967 * java-tree.h (pending_static_fields): New extern declaration.
968 (java_write_globals): New prototype.
969 * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
970 * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
971 of a static field push it into pending_static_fields vector.
972 * class.c (pending_static_fields): New variable.
973 (add_field): If static field is not DECL_EXTERNAL, push it into
974 pending_static_fields vector.
975 (java_write_globals): New function.
976
977 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
978
979 * expr.c (quick_stack): Change type to a VEC. Update comment.
980 (tree_list_free_list): Delete.
981 (flush_quick_stack): Update for quick_stack type change.
982 (push_value): Likewise.
983 (pop_value): Likewise.
984
985 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
986
987 * java-gimplify.c: Do not include tm.h, toplev.h.
988 * typeck.c: Do not include tm.h.
989 * mangle_name.c: Do not include tm.h.
990 * jcf-dump.c: Do not include tm.h, ggc.h.
991 * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
992 * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
993 and timevar.h.
994 * jcf-parse.c: Do not include tm.h and tm_p.h.
995 * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
996 target.h, and expr.h.
997 * except.c: Do not include tm.h, rtl.h, function.h.
998 * builtins.c: Do not include convert.h. Explain why RTL headers
999 have to be included here.
1000 * verify-glue.c: Do not include tm.h.
1001 * jcf-depend.c: Do not include tm.h.
1002 * jcf-reader.c: Include ggc.h.
1003 * jcf-io.c: Do not include tm.h, toplev.h.
1004 * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
1005 gimple.h.
1006 * lang.c: Do not include rtl.h, expr.h.
1007 * Make-lang.in: Update dependencies.
1008
1009 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
1010
1011 * jcf-parse.c: Include bitmap.h.
1012 * Make-lang.in: Update dependencies.
1013
1014 2010-05-20 Jakub Jelinek <jakub@redhat.com>
1015
1016 PR debug/43521
1017 * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
1018 PARM_DECL.
1019
1020 2010-05-19 Anatoly Sokolov <aesok@post.ru>
1021
1022 * jcf-parse.c (get_constant): Use double_int_to_tree instead of
1023 build_int_cst_wide_type.
1024
1025 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1026
1027 * expr.c (pop_arguments): Fix use of undeclared variable.
1028
1029 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1030
1031 * expr.c (expand_java_multianewarray): Use build_call_vec instead of
1032 build_call_list.
1033 (pop_arguments): Return a VEC instead of a tree. Take a method type
1034 rather than a list of argument types.
1035 (rewrite_rule): Change signature. of rewrite_arglist member.
1036 (rewrite_arglist_getcaller): Update signature.
1037 (rewrite_arglist_getclass): Likewise.
1038 (maybe_rewrite_invocation): Update for rewrite_arglist change.
1039 (build_known_method_ref): Take a VEC instead of a tree.
1040 (invoke_build_dtable): Likewise.
1041 (expand_invoke): Update calls to pop_arguments. Use build_call_vec
1042 instead of build_call_list.
1043 (build_jni_stub): Use build_call_vec instead of build_call_list.
1044 * java-tree.h (maybe_rewrite_invocation): Update declaration.
1045 (build_known_method_ref): Likewise.
1046 (invoke_build_dtable): Likewise.
1047
1048 2010-05-14 Nathan Froyd <froydnj@codesourcery.com>
1049
1050 PR 44103
1051 * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
1052 vector. Move call to build_constructor...
1053 (FINISH_RECORD_CONSTRUCTOR): ...here. Add necessary arguments. Clear
1054 TREE_CONSTANT on the constructor.
1055 (PUSH_SUPER_VALUE): Change first argument to a vector.
1056 (PUSH_FIELD_VALUE): Likewise.
1057 * resource.c (compile_resource_data): Update calls to above macros.
1058 * constants.c (build_constants_constructor): Likewise.
1059 * class.c (build_utf8_ref): Likewise.
1060 (make_field_value): Likewise.
1061 (make_method_value): Likewise.
1062 (add_table_and_syms): New function.
1063 (make_class_data): Call it. Update calls to above macros.
1064 (build_symbol_table_entry): New function.
1065 (build_symbol_entry): Call it. Update calls to above macros.
1066 (emit_symbol_table): Likewise.
1067 (make_catch_class_record): Update calls to above macros.
1068 (build_assertion_table_entry): New function.
1069 (add_assertion_table_entry): Call it.
1070 (emit_assertion_table): Likewise.
1071
1072 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
1073
1074 PR 40989
1075 * lang.c (java_handle_option): Add argument kind.
1076
1077 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1078
1079 * decl.c (java_init_decl_processing): Remove argument in call to
1080 initialize_sizetypes
1081
1082 2010-04-07 Jakub Jelinek <jakub@redhat.com>
1083
1084 * exception.cc (_Jv_Throw): Avoid set but not used warning.
1085 * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
1086 sizeof to avoid set but not used warnings.
1087
1088 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
1089
1090 * lang.c (java_post_options): Constify variable "dot".
1091
1092 * jcf-parse.c (set_source_filename): Constify variable "dot".
1093 (load_class): Constify variable "separator".
1094 Use get_identifier_with_length.
1095
1096 * jvspec.c (lang_specific_driver): Constify two variables named "p".
1097
1098 2010-01-09 Jakub Jelinek <jakub@redhat.com>
1099
1100 * jcf-dump.c (version): Update copyright notice dates.
1101
1102 2009-11-28 Jakub Jelinek <jakub@redhat.com>
1103
1104 * jvspec.c (lang_specific_driver): Remove unused
1105 saw_verbose_flag variable.
1106 * jcf-dump.c (main): Remove unused general_purpose_bits
1107 variable.
1108 * builtins.c (initialize_builtins): Remove unused float_ftype_float
1109 variable.
1110 * expr.c (java_stack_pop): Remove unused val variable.
1111 (build_jni_stub): Remove unused res_type variable.
1112 * verify-impl.c (check_field_constant): Remove unused len variable.
1113
1114 2009-10-20 Joel Dice <dicej@mailsnare.net>
1115
1116 PR java/28474
1117 * mangle_name.c (append_unicode_mangled_name): Fix mangling
1118 of names with multiple underscores and "U".
1119 (unicode_mangling_length): Likewise.
1120
1121 2009-10-03 Simon Baldwin <simonb@google.com>
1122
1123 * config-lang.in (lang_dirs): Remove zlib.
1124
1125 2009-09-28 Richard Henderson <rth@redhat.com>
1126
1127 * builtins.c (initialize_builtins): Update call to
1128 build_common_builtin_nodes.
1129 * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
1130
1131 2009-09-14 Richard Henderson <rth@redhat.com>
1132
1133 * builtins.c (initialize_builtins): Update call to
1134 build_common_builtin_nodes.
1135 * decl.c (java_init_decl_processing): Don't call
1136 default_init_unwind_resume_libfunc.
1137 * except.c: Include tree-iterator.h.
1138 (build_exception_object_var): New.
1139 (build_exception_object_ref): Use it.
1140 (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
1141 Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
1142 * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
1143
1144 2009-09-13 Richard Guenther <rguenther@suse.de>
1145 Rafael Avila de Espindola <espindola@google.com>
1146
1147 * decl.c (do_nothing): Remove.
1148 (java_init_decl_processing): Do not set lang_eh_runtime_type.
1149 * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
1150 * lang.c (java_eh_personality): New.
1151 (java_eh_personality_decl): Likewise.
1152 (LANG_HOOKS_EH_PERSONALITY): Define.
1153
1154 2009-09-03 Diego Novillo <dnovillo@google.com>
1155
1156 * lang.c (lang_hooks): Remove const qualifier.
1157
1158 2009-09-01 Jakub Jelinek <jakub@redhat.com>
1159
1160 * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
1161 type.
1162
1163 2009-09-01 Richard Guenther <rguenther@suse.de>
1164
1165 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
1166 * java-tree.h (java_mark_addressable): Likewise.
1167 * typeck.c (java_mark_addressable): Likewise.
1168
1169 2009-08-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1170
1171 * Make-lang.in (java.install-pdf): Install gcj.pdf in
1172 $(pdfdir)/gcc, alongside the other manuals.
1173
1174 2009-08-12 Andrew Haley <aph@redhat.com>
1175
1176 * builtins.c (compareAndSwapInt_builtin): Use
1177 flag_use_atomic_builtins.
1178 (compareAndSwapLong_builtin): Likewise.
1179 (compareAndSwapObject_builtin): Likewise.
1180 * jvspec.c: Add flag_use_atomic_builtins.
1181 * gcj.texi: Likewise.
1182 * java-tree.h: Likewise.
1183 * lang.opt: Likewise.
1184
1185 2009-08-11 Dodji Seketeli <dodji@redhat.com>
1186
1187 PR debug/40990
1188 * lang.c (put_decl_node): Outputs different level of information
1189 depending on the verbosity level.
1190
1191 2009-07-31 Andrew Haley <aph@redhat.com>
1192
1193 PR java/40867
1194 * decl.c (java_replace_references): Set EXPR_LOCATION on all
1195 generated expressions.
1196 (binding_level.loc): new field.
1197 (clear_binding_level): Initialize loc.
1198 (set_input_location): New function.
1199 (pushlevel): Set new binding_level.loc.
1200 (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
1201 (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
1202 (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
1203
1204 2009-07-17 Richard Guenther <rguenther@suse.de>
1205
1206 PR c/40401
1207 * java-gimplify.c (java_genericize): Do not gimplify here.
1208 But replace all local references.
1209 (java_gimplify_expr): Do not replace local references here.
1210 (java_gimplify_modify_expr): Likewise.
1211 * jcf-parse.c (java_parse_file): Do not finalize the CU or
1212 optimize the cgraph here.
1213 * decl.c (java_replace_reference): Make static.
1214 (java_replace_references): New function.
1215 (end_java_method): Clear base_decl_map.
1216 * java-tree.h (java_replace_references): Declare.
1217 (java_replace_reference): Remove.
1218
1219 2009-07-14 Taras Glek <tglek@mozilla.com>
1220 Rafael Espindola <espindola@google.com>
1221
1222 * Make-lang.in (java.install-plugin): New target for
1223 installing plugin headers.
1224
1225 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1226
1227 * class.c: Replace %J by an explicit location. Update all calls.
1228
1229 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1230
1231 * jcf-parse.c: Replace %H by an explicit location. Update all calls.
1232
1233 2009-06-29 Andrew Haley <aph@redhat.com>
1234
1235 PR java/40590
1236 * java-tree.h (cxx_keyword_p): New declaration.
1237 * mangle_name.c (utf8_cmp): Move here from mangle.c.
1238 (cxx_keywords): Likewise.
1239 (cxx_keyword_p): Likewise.
1240 (MANGLE_CXX_KEYWORDS): New macro.
1241 (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
1242 (append_gpp_mangled_name): Likewise.
1243 * mangle.c: Move code to mangle_name.c.
1244 (mangle_member_name): Don't call cxx_keyword_p.
1245
1246 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
1247
1248 * java-gimplify.c (java_gimplify_block): New argument to
1249 build_empty_stmt.
1250 * expr.c (force_evaluation_order): Same.
1251 * typeck.c: Add location to build_decl or PUSH_FIELD calls.
1252 * class.c: Same.
1253 * decl.c: Same.
1254 * jcf-parse.c: Same.
1255 * constants.c: Same.
1256 * resource.c: Same.
1257 * except.c: Same.
1258 * builtins.c: Same.
1259 * expr.c: Same.
1260 * java-tree.h (PUSH_FIELD): Add location field.
1261
1262 2009-06-09 Ian Lance Taylor <iant@google.com>
1263
1264 * verify.h: Remove extern "C".
1265
1266 2009-06-07 Ian Lance Taylor <iant@google.com>
1267
1268 * jcf-parse.c (handle_constant): Change local variable 'kind' to
1269 unsigned int.
1270
1271 2009-06-01 Ian Lance Taylor <iant@google.com>
1272
1273 * jcf-io.c (find_class): Use CONST_CAST.
1274
1275 2009-05-27 Ian Lance Taylor <iant@google.com>
1276
1277 * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
1278 $(LINKER).
1279 (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
1280
1281 2009-05-26 Ian Lance Taylor <iant@google.com>
1282
1283 * Make-lang.in (jvspec.o): Use $(COMPILER).
1284 ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
1285 (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
1286
1287 2009-05-12 Alexandre Oliva <aoliva@redhat.com>
1288
1289 * Make-lang.in (GCJ): Renamed to...
1290 (XGCJ): ... this.
1291
1292 2009-04-27 Ian Lance Taylor <iant@google.com>
1293
1294 * builtins.c (java_builtins): Add casts to enum type.
1295 * verify-impl.c (check_class_constant): Add cast to enum type.
1296 (check_constant, check_wide_constant): Likewise.
1297
1298 2009-04-27 Richard Guenther <rguenther@suse.de>
1299
1300 PR java/38374
1301 * constants.c (build_constants_constructor): Retain the old
1302 pointer type as valid TYPE_POINTER_TO after patching the
1303 type of the constant pool decl.
1304
1305 2009-04-24 Ian Lance Taylor <iant@google.com>
1306
1307 * jcf-parse.c (handle_constant): Add cast to enum type.
1308
1309 2009-04-21 Taras Glek <tglek@mozilla.com>
1310
1311 * builtins.c: Update GTY annotations to new syntax
1312 * decl.c: Likewise
1313 * java-tree.h: Likewise
1314 * jcf.h: Likewise
1315 * lang.c: Likewise
1316
1317 2009-04-21 Joseph Myers <joseph@codesourcery.com>
1318
1319 * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
1320 license notices.
1321
1322 2009-04-18 Ian Lance Taylor <iant@google.com>
1323
1324 * verify-impl.c (verify_instructions_0): Add cast to enum type.
1325
1326 2009-04-09 Paolo Bonzini <bonzini@gnu.org>
1327
1328 * builtins.c (compareAndSwapLong_builtin,
1329 compareAndSwapInt_builtin, compareAndSwapObject_builtin,
1330 VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
1331
1332 2009-03-31 Richard Guenther <rguenther@suse.de>
1333
1334 * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
1335 the first operand of binary and comaprison expressions.
1336
1337 2009-03-30 Joseph Myers <joseph@codesourcery.com>
1338
1339 PR rtl-optimization/323
1340 * lang.c (java_post_options): Set flag_excess_precision_cmdline.
1341 Give an error for -fexcess-precision=standard for processors where
1342 the option is significant.
1343
1344 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1345
1346 * lang.opt: Unify help text for -Wdeprecated.
1347
1348 2009-02-03 Jakub Jelinek <jakub@redhat.com>
1349
1350 * jcf-dump.c (version): Update copyright notice dates.
1351
1352 2009-01-16 Richard Guenther <rguenther@suse.de>
1353
1354 PR tree-optimization/38835
1355 PR middle-end/36227
1356 * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
1357
1358 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
1359
1360 PR bootstrap/38262
1361 * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
1362
1363 2008-11-04 Andrew Haley <aph@redhat.com>
1364
1365 PR java/37068
1366 * jcf-parse.c (java_emit_static_constructor): Don't call
1367 cgraph_build_static_cdtor. Rewrite.
1368
1369 2008-10-24 Jakub Jelinek <jakub@redhat.com>
1370
1371 * Make-lang.in (check-java-subtargets): New target.
1372
1373 2008-10-16 David Edelsohn <edelsohn@gnu.org>
1374
1375 PR target/35483
1376 * Make-lang.in (class.o): Depend on $(TM_P_H).
1377 (expr.o): Same.
1378 * class.c: Include tm_p.h.
1379 * expr.c: Include tm_p.h.
1380
1381 2008-10-14 Andrew Haley <aph@redhat.com>
1382
1383 * constants.c (build_constant_data_ref): Make sure we only build
1384 one copy of the decl for the constant pool.
1385
1386 2008-09-22 Andrew Haley <aph@redhat.com>
1387
1388 * expr.c (rules): Add new rule for
1389 gnu.java.lang.VMCPStringBuilder.toString.
1390 (rewrite_rule.new_classname): New field.
1391 (maybe_rewrite_invocation): Use new_classname field instead of
1392 DECL_CONTEXT (*method_p).
1393 Allow rewrite_arglist to be NULL.
1394
1395 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
1396
1397 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1398 (java_get_callee_fndecl): Kill.
1399
1400 2008-09-17 Jan Hubicka <jh@suse.cz>
1401
1402 PR c++/18071
1403 * class.c (add_method_1): Do not initialize DECL_INLINE.
1404 (make_local_function_alias): Likewise.
1405 * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
1406 * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
1407
1408 2008-09-09 Richard Guenther <rguenther@suse.de>
1409
1410 * decl.c (build_result_decl): Remove no longer applicable
1411 promotion.
1412
1413 2008-09-05 David Daney <ddaney@avtrex.com>
1414
1415 * gcj.texi (-freduced-reflection): Clarify option's restrictions.
1416
1417 2008-08-21 David Daney <ddaney@avtrex.com>
1418
1419 * class.c (make_class_data): Don't add field_index when
1420 flag_reduced_reflection set.
1421
1422 2008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
1423
1424 * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
1425
1426 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1427
1428 PR 28875
1429 * lang.c (java_handle_option): Replace set_Wunused with
1430 warn_unused.
1431
1432 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1433
1434 * gcj.texi: Update copyright years. Do not list GPL as
1435 Invariant Section.
1436
1437 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1438
1439 * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
1440 from ctype's sizes.
1441
1442 * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
1443 alignment.
1444
1445 2008-07-29 Jan Hubicka <jh@suse.cz>
1446
1447 * lang.c (java_post_options): Remove handling of flag_no_inline.
1448
1449 2008-07-28 Richard Guenther <rguenther@suse.de>
1450
1451 Merge from gimple-tuples-branch.
1452
1453 2008-07-18 Richard Guenther <rguenther@suse.de>
1454
1455 * expr.c: Include tree-iterator.h.
1456 * Make-lang.in (expr.o): Add tree-iterator.h dependency.
1457
1458 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1459
1460 * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
1461 * expr.c: Same.
1462
1463 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1464
1465 * java-gimplify.c (java_gimplify_expr): Same.
1466 (java_gimplify_modify_expr): Same.
1467 * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
1468
1469 2008-05-02 Diego Novillo <dnovillo@google.com>
1470
1471 * expr.c (build_java_throw_out_of_bounds_exception): Fix
1472 mixed declarations and code.
1473
1474 2008-05-02 Doug Kwan <dougkwan@google.com>
1475
1476 * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
1477 _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
1478
1479 2008-02-19 Diego Novillo <dnovillo@google.com>
1480
1481 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1482
1483 * java-gimplify.c (java_gimplify_self_mod_expr): Change
1484 gimple_seq arguments to gimple_seq *. Update all users.
1485
1486 2007-11-26 Aldy Hernandez <aldyh@redhat.com>
1487
1488 * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
1489 sequences.
1490 (java_gimplify_self_mod_expr): Same.
1491 * java-tree.h (java_gimplify_expr): Make pre_p and post_p
1492 sequences.
1493
1494 2008-07-24 Jan Hubicka <jh@suse.cz>
1495
1496 * java/decl.c: Include cgraph.h
1497 (end_java_method): Remove non-unit-at-a-time code.
1498 (java_mark_decl_local): Likewise; sanity check that we don't touch
1499 finalized nodes.
1500
1501 2008-07-15 Jan Hubicka <jh@suse.cz>
1502
1503 * lang.c (java_init_options): Enable unit-at-a-time by default.
1504
1505 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1506
1507 * Make-lang.in (jvspec.o): Fix dependencies.
1508
1509 2008-07-06 Tom Tromey <tromey@redhat.com>
1510
1511 * Make-lang.in (java/parse.o-warn): Remove.
1512 (java/jcf-io.o-warn): Remove.
1513
1514 2008-07-05 Tom Tromey <tromey@redhat.com>
1515
1516 * jcf-io.c: Don't include fnmatch.h. Don't use JCF_USE_SCANDIR.
1517 (compare_path): Remove.
1518 (java_or_class_file): Likewise.
1519 (memoized_dirlist_entry): Likewise.
1520 (memoized_dirlist_hash): Likewise.
1521 (memoized_dirlist_lookup_eq): Likewise.
1522 (memoized_dirlists): Likewise.
1523 (caching_stat): Likewise.
1524 (find_class): Use stat.
1525 * jcf.h (JCF_USE_SCANDIR): Remove.
1526
1527 2008-06-30 Joshua Sumali <jsumali@redhat.com>
1528
1529 * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
1530 doc/rebuild-gcj-db.1
1531 (java.uninstall): Likewise.
1532 (java.maintainer-clean): Likewise.
1533 (aot-compile.pod): New rule.
1534 (rebuild-gcj-db.pod): New rule.
1535 (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
1536 * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
1537
1538 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1539
1540 * Make-lang.in (java/jcf-io.o-warn): New.
1541
1542 2008-06-24 Tom Tromey <tromey@redhat.com>
1543
1544 * jcf-path.c (jcf_path_init): Don't name variable 'try'.
1545 * expr.c (add_type_assertion): Rename argument.
1546 (build_java_arrayaccess): Don't name variable 'throw'.
1547 (ARRAY_NEW_MULTI): Don't name variable 'class'.
1548 * jcf-io.c (find_class): Don't name variable 'class'.
1549 * mangle.c (compression_table_add): Don't name variable 'new'.
1550 * constants.c (cpool_for_class): Rename argument.
1551 (alloc_constant_fieldref): Likewise.
1552 * jcf-parse.c (handle_innerclass_attribute): Don't name variable
1553 'class'.
1554 (read_class): Likewise.
1555 (parse_zip_file_entries): Likewise.
1556 (process_zip_dir): Likewise.
1557 * decl.c (java_mark_class_local): Rename argument.
1558 * class.c (GEN_TABLE): Use type_name, not typename.
1559 (gen_indirect_dispatch_tables): Likewise.
1560 (add_field): Rename argument.
1561 (is_compiled_class): Likewise.
1562 (safe_layout_class): Likewise.
1563 (emit_assertion_table): Likewise.
1564 * typeck.c (has_method): Rename argument.
1565
1566 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1567
1568 * class.c (ident_subst, mangled_classname, unmangle_classname,
1569 gen_indirect_dispatch_tables, add_method_1,
1570 build_fieldref_cache_entry, make_local_function_alias,
1571 layout_class, java_treetreehash_find, java_treetreehash_new,
1572 split_qualified_name): Fix for -Wc++-compat.
1573 * constants.c (set_constant_entry, cpool_for_class): Likewise.
1574 * decl.c (make_binding_level, java_dup_lang_specific_decl,
1575 start_java_method): Likewise.
1576 * except.c (prepare_eh_table_type): Likewise.
1577 * expr.c (type_assertion_hash, note_instructions): Likewise.
1578 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1579 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1580 * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1581 Likewise.
1582 * jcf-parse.c (reverse, java_read_sourcefilenames,
1583 annotation_grow, rewrite_reflection_indexes, java_parse_file,
1584 process_zip_dir): Likewise.
1585 * jcf-path.c (add_entry, add_path, jcf_path_init,
1586 jcf_path_extdirs_arg): Likewise.
1587 * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1588 * jvgenmain.c (do_mangle_classname): Likewise.
1589 * lang.c (put_decl_string): Likewise.
1590 * verify-impl.c (make_state_copy, make_state, add_new_state):
1591 Likewise.
1592
1593 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1594
1595 * gcj.texi: Expand TABs, remove whitespace from blank lines.
1596
1597 2008-06-14 Tom Tromey <tromey@redhat.com>
1598
1599 PR java/36247:
1600 * class.c (build_class_ref): Initialize this_classdollar when
1601 needed.
1602
1603 2008-05-23 Andrew Haley <aph@redhat.com>
1604
1605 * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1606 pathname of source file.
1607
1608 2008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1609
1610 * jcf-dump.c (print_constant): Use
1611 HOST_LONG_LONG_FORMAT.
1612
1613 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1614
1615 * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1616 DECL_PURE_P.
1617
1618 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1619
1620 * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1621 (build_classdollar_field): Don't set TREE_INVARIANT.
1622 (get_dispatch_table): Don't set TREE_INVARIANT.
1623 (make_class_data): Don't set TREE_INVARIANT.
1624 (build_symbol_entry): Don't set TREE_INVARIANT.
1625 (emit_symbol_table): Don't set TREE_INVARIANT.
1626 * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1627 (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1628 * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1629 * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1630
1631 2008-04-03 Tom Tromey <tromey@redhat.com>
1632
1633 * Make-lang.in (java_OBJS): New variable.
1634
1635 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1636
1637 * java-tree.h (insert_block): Kill.
1638 * decl.c (insert_block): Kill.
1639
1640 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1641
1642 * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1643 * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1644 gpl.texi.
1645
1646 2008-03-27 Tom Tromey <tromey@redhat.com>
1647
1648 * Make-lang.in: Revert automatic dependency patch.
1649
1650 2008-03-25 Tom Tromey <tromey@redhat.com>
1651
1652 * Make-lang.in: Removed most explicit .o targets.
1653 (java/jvspec.o): Reduce to variable setting. Moved to java/.
1654 ($(GCJ)$(exeext)): Update.
1655 (JAVA_OBJS): New variable.
1656 (JCFDUMP_OBJS): Reformat.
1657 (java_OBJS): New variable.
1658 (java/jvspec.o-warn): Update.
1659 (java/parse.o-warn): Remove.
1660 (JAVA_TREE_H): Remove.
1661 (java/jcf-io.o): Reduce to variable setting.
1662 (ALL_CPPFLAGS): Likewise.
1663
1664 2008-03-12 Paolo Bonzini <bonzini@gnu.org>
1665
1666 * mangle.c (java_mangle_decl): Remove dead check.
1667
1668 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1669
1670 * jcf-parse.c (java_parse_file): Assert binding levels are
1671 left in order.
1672 * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1673 Delete.
1674
1675 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1676
1677 * jcf-dump.c (version): Update copyright notice dates.
1678
1679 2008-02-29 Tom Tromey <tromey@redhat.com>
1680
1681 * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1682 method.
1683 * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1684
1685 2008-02-26 Tom Tromey <tromey@redhat.com>
1686
1687 * lang.c (java_post_options): Remove conditional.
1688 * expr.c (expand_byte_code): Remove old location code.
1689 * jcf-parse.c (set_source_filename): Remove old location code.
1690 (give_name_to_class): Likewise.
1691 (jcf_parse): Likewise.
1692 (duplicate_class_warning): Likewise.
1693 (parse_class_file): Likewise.
1694 (java_parse_file): Likewise.
1695 * decl.c (finish_method): Remove old location code.
1696 * class.c (push_class): Remove old location code.
1697
1698 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1699
1700 PR other/35107
1701 * Make-lang.in (jc1): Add $(GMPLIBS).
1702
1703 2008-01-23 David Daney <ddaney@avtrex.com>
1704
1705 * class.c (hide) Rename to...
1706 (java_hide_decl) ... this throughout, and make public.
1707 * resource.c (Jr_count): Remove.
1708 (compile_resource_data): Call java_mangle_resource_name to generate
1709 decl name. Make resource decl public and hidden.
1710 * mangle.c (java_mangle_resource_name): New function.
1711 * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1712 functions.
1713
1714 2008-01-04 Andrew Haley <aph@redhat.com>
1715
1716 PR java/17779
1717 * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1718 C90.
1719
1720 2008-01-03 Andrew Haley <aph@redhat.com>
1721
1722 PR java/17779
1723 * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1724 we're about to re-layout the type.
1725
1726 2007-12-20 Alexandre Oliva <aoliva@redhat.com>
1727
1728 * lang.c (java_classify_record): Don't return
1729 RECORD_IS_INTERFACE for now.
1730
1731 2007-12-18 Andrew Haley <aph@redhat.com>
1732
1733 PR java/27643
1734 * jcf-parse.c (java_parse_file): Remove call to
1735 java_mark_class_local.
1736 (parse_class_file): Reinstate call to java_mark_class_local here.
1737 * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1738 already set, call java_mangle_decl() and make_decl_rtl() to
1739 rewrite its name as a hidden alias.
1740
1741 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1742
1743 PR debug/7081
1744 * lang.c (java_classify_record): New.
1745 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1746
1747 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1748
1749 PR 34081/C++
1750 * decl.c (finish_method): Pass 'false' for the new
1751 allocate_struct_function parameter.
1752
1753 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1754
1755 * expr.c (build_jni_stub): Use the computed jni func type for
1756 variable meth.
1757
1758 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1759
1760 * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1761
1762 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1763
1764 * expr.c (type_assertion_hash): Hash type uids rather than
1765 tree pointers.
1766
1767 2007-11-17 David Daney <ddaney@avtrex.com>
1768 Andrew Haley <aph@redhat.com>
1769
1770 * constants.c (build_constants_constructor): Use POINTER_SIZE
1771 insead of BITS_PER_WORD in big-endian work around.
1772
1773 2007-11-07 Tom Tromey <tromey@redhat.com>
1774
1775 PR java/34019:
1776 * gcj.texi (Input Options): Add missing noun.
1777
1778 2007-11-02 Tom Tromey <tromey@redhat.com>
1779
1780 PR java/33765:
1781 * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1782 * zipfile.h (ZIPEMPTYMAGIC): New define.
1783
1784 2007-11-01 Tom Tromey <tromey@redhat.com>
1785
1786 * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1787 (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1788 (java/jcf-io.o): Depend on zipfile.h.
1789
1790 2007-10-17 Richard Guenther <rguenther@suse.de>
1791
1792 * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1793 dependencies.
1794
1795 2007-10-03 Andrew Haley <aph@redhat.com>
1796
1797 PR java/33639
1798 * class.c (mangled_classname): Detect and replace illegal
1799 characters in assembly language symbols.
1800 (gen_indirect_dispatch_tables): Call mangled_classname() on
1801 the type.
1802
1803 2007-09-27 Jakub Jelinek <jakub@redhat.com>
1804
1805 * lang.c (java_print_error_function): Add third argument.
1806
1807 2007-09-15 Tom Tromey <tromey@redhat.com>
1808
1809 * java-tree.h (struct lang_decl_func) <function_decl_body>:
1810 Remove.
1811 <init_final>: Likewise.
1812 * lang.c (java_dump_tree): Update.
1813 * java-tree.h (DECL_FUNCTION_BODY): Remove.
1814
1815 2007-09-11 Jan Hubicka <jh@suse.cz>
1816
1817 * decl.c (java_expand_body): Kill.
1818 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1819
1820 2007-09-06 Tom Tromey <tromey@redhat.com>
1821
1822 * jcf-parse.c (parse_class_file): Re-enter the current file.
1823
1824 2007-09-07 Roman Zippel <zippel@linux-m68k.org>
1825
1826 * boehm.c (mark_reference_fields): Move misaligned pointer check
1827 after JREFERENCE_TYPE_P test
1828
1829 2007-09-06 Roman Zippel <zippel@linux-m68k.org>
1830
1831 * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1832 if pointer is misaligned.
1833
1834 2007-09-06 Tom Tromey <tromey@redhat.com>
1835
1836 * lang.c (java_post_options): Update.
1837 * jcf-parse.c (set_source_filename): Update.
1838 (give_name_to_class): Update.
1839 (jcf_parse): Update.
1840 (duplicate_class_warning): Update.
1841 (parse_class_file): Update.
1842 (java_parse_file): Update.
1843 * expr.c (expand_byte_code): Update.
1844
1845 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
1846
1847 * decl.c (finish_method): Use set_cfun.
1848
1849 2007-09-04 Andrew Haley <aph@redhat.com>
1850
1851 * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1852 when using the ARM EABI.
1853
1854 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1855
1856 * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1857
1858 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1859
1860 * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1861 CONST_CAST.
1862 * jcf.h (JCF_FINISH): Likewise.
1863
1864 2007-08-28 Tom Tromey <tromey@redhat.com>
1865
1866 * Make-lang.in (java.tags): Don't tag '*.y' files.
1867
1868 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1869
1870 * lang.c (java_decl_ok_for_sibcall): Likewise.
1871
1872 2007-08-21 Paul Brook <paul@codesourcery.com>
1873 Nathan Sidwell <nathan@codesourcery.com>
1874 Mark Mitchell <mark@codesourcery.com>
1875 Joseph Myers <joseph@codesourcery.com>
1876
1877 * jcf-dump.c (version): Use pkgversion_string. Update copyright
1878 date.
1879
1880 2007-08-20 Richard Guenther <rguenther@suse.de>
1881
1882 * lang.c (java_tree_inlining_walk_subtrees): Remove.
1883 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1884
1885 2007-08-17 Tom Tromey <tromey@redhat.com>
1886
1887 * typeck.c (find_method_in_interfaces): Update.
1888 * jcf-parse.c (load_class): Update.
1889 * java-gimplify.c (java_gimplify_component_ref): Removed.
1890 (java_gimplify_modify_expr): Update. Removed pre_p and post_p
1891 arguments.
1892 (java_gimplify_expr): Update.
1893 * decl.c (java_init_decl_processing): Update.
1894 * class.c (set_constant_value): Update.
1895 (make_class_data): Update.
1896 (finish_class): Update.
1897 (build_static_field_ref): Update.
1898 (is_compiled_class): Update.
1899 (maybe_layout_super_class): Update.
1900 (layout_class): Update.
1901 (layout_class_method): Update.
1902 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1903 (lang_decl_var) <am, final_iud, cif>: Removed fields.
1904 (lang_decl_func) <init_calls_this>: Removed field.
1905 (lang_type) <dot_class, verify_method>: Removed fields.
1906 (FIELD_NESTED_ACCESS): Removed.
1907 (FIELD_NESTED_ACCESS_P): Removed.
1908 (DECL_FIELD_FINAL_IUD): Removed.
1909 (DECL_LOCAL_FINAL_IUD): Removed
1910 (LOCAL_FINAL_P): Removed.
1911 (FINAL_VARIABLE_P): Removed.
1912 (CLASS_FINAL_VARIABLE_P): Removed.
1913 (DECL_BIT_INDEX): Removed.
1914 (DECL_INIT_CALLS_THIS): Removed.
1915 (FIELD_LOCAL_ALIAS): Removed.
1916 (FIELD_LOCAL_ALIAS_USED): Removed.
1917 (FIELD_THISN): Removed.
1918 (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1919 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1920 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1921 (TYPE_DOT_CLASS): Removed.
1922 (TYPE_VERIFY_METHOD): Removed.
1923 (ID_CLASSDOLLAR_P): Removed.
1924 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1925 Removed.
1926 (classdollar_identifier_node): Removed.
1927 (TYPE_UNKNOWN): Removed.
1928 (CLASS_FROM_SOURCE_P): Removed.
1929 * expr.c (build_jni_stub): Update.
1930 (force_evaluation_order): Update.
1931 (build_java_empty_stmt): Update.
1932 (build_class_init): Update.
1933 (java_stack_swap): Update.
1934 (build_jni_stub): Update.
1935
1936 2007-08-17 Tom Tromey <tromey@redhat.com>
1937
1938 * java-tree.h (LABEL_TYPE_STATE): Removed.
1939 (load_type_state): Removed.
1940 (LABEL_PC): Removed.
1941 (LABEL_VERIFIED): Removed.
1942 (type_states): Declare.
1943 * expr.c (type_states): New global.
1944 (load_type_state): Now static. Use type_states. Changed
1945 argument.
1946 (lookup_label): Don't set LABEL_PC.
1947 (expand_byte_code): Don't use LABEL_VERIFIED.
1948 (note_instructions): Initialize type_states.
1949 * verify-glue.c (vfy_note_stack_depth): Rewrote.
1950 (vfy_note_stack_type): Use type_states.
1951 (vfy_note_local_type): Likewise.
1952
1953 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1954
1955 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1956 * jcf.h (JCF_FINISH): Likewise.
1957
1958 2007-07-31 Nick Clifton <nickc@redhat.com>
1959
1960 * java-gimplify.c: Change copyright header to refer to version 3
1961 of the GNU General Public License and to point readers at the
1962 COPYING3 file and the FSF's license web page.
1963 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1964 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1965 resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1966 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1967 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1968 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1969 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1970
1971 2007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1972
1973 * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1974
1975 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1976
1977 * lang.c (java_get_callee_fndecl): Constify.
1978
1979 2007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1980
1981 * mangle.c (set_type_package_list): Constify.
1982 * verify-glue.c (vfy_make_string): Delete.
1983 * verify.h (vfy_make_string): Likewise.
1984
1985 2007-07-26 Tom Tromey <tromey@redhat.com>
1986
1987 * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1988 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
1989 EXIT_BLOCK_LABELED_BLOCK): Likewise.
1990 * lang.c (java_tree_inlining_walk_subtrees): Update.
1991 (java_dump_tree): Likewise.
1992 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
1993 Remove.
1994 * decl.c (push_labeled_block, pop_labeled_block): Remove.
1995 * java-gimplify.c (java_gimplify_labeled_block_expr,
1996 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
1997 (java_gimplify_expr): Update.
1998
1999 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2000
2001 * class.c (java_treetreehash_hash, java_treetreehash_compare):
2002 Constify.
2003 * expr.c (type_assertion_eq): Likewise.
2004 * jcf-io.c (compare_path): Likewise.
2005 * jcf-parse.c (cmpstringp): Likewise.
2006 * verify-impl.c (get_one_type, compute_argument_types,
2007 compute_return_type): Likewise.
2008
2009 2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2010
2011 PR target/32462
2012 PR libgcj/32465
2013 * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
2014
2015 2007-07-12 Richard Guenther <rguenther@suse.de>
2016
2017 * expr.c (expand_java_return): RETURN_EXPR has void type.
2018 (build_jni_stub): Likewise. Use a comparison against zero
2019 for null-pointer test in COND_EXPR.
2020 (build_field_ref): Build POINTER_PLUS_EXPR with correct
2021 type. Convert result instead.
2022 (build_invokevirtual): Likewise.
2023
2024 2007-07-09 Geoffrey Keating <geoffk@apple.com>
2025
2026 PR 32617
2027 * lang.c (java_init): Remove setting of force_align_functions_log.
2028 * class.c (add_method_1): Set DECL_ALIGN of non-static method
2029 to cope with ptrmemfunc_vbit_in_pfn.
2030
2031 2007-07-03 David Daney <ddaney@avtrex.com>
2032
2033 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
2034 include path.
2035 (doc/gcj.dvi): Same.
2036 (doc/gcj.pdf): Same.
2037 (java/index.html): Same.
2038
2039 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2040
2041 * class.c (make_class_data): Build the index in sizetype.
2042 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
2043 adding to a pointer type.
2044 (build_symbol_entry): Likewise.
2045 * expr.c (build_java_arrayaccess): Likewise.
2046 (build_field_ref): Likewise.
2047 (build_known_method_ref): Likewise.
2048 (build_invokevirtual): Likewise.
2049 * except.c (build_exception_object_ref): Do a
2050 NEGATIVE and then a POINTER_PLUS_EXPR instead
2051 of a MINUS_EXPR.
2052
2053 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
2054
2055 * typeck.c (java_signed_type): Remove.
2056 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
2057 * java-tree.h (java_signed_type): Remove.
2058
2059 2007-05-18 Geoffrey Keating <geoffk@apple.com>
2060
2061 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
2062 (print_constant): Likewise.
2063
2064 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
2065
2066 * expr.c (build_java_binop): Use unsigned_type_for instead of
2067 java_unsigned_type.
2068 * java-tree.h (java_unsigned_type): Remove.
2069 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2070 * typeck.c (java_unsigned_type): Remove.
2071
2072 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
2073
2074 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
2075 instead of checking GIMPLE_STMT_P in chain_next.
2076
2077 2007-04-06 Colin Walters <walters@redhat.com>
2078
2079 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
2080 * jcf-io.c (open_class): Copy 'filename'.
2081
2082 2007-04-03 Andrew Haley <aph@redhat.com>
2083
2084 * jvgenmain.c (main): Change main to use class$, not class$$.
2085 (do_mangle_classname): Likewise.
2086 * class.c (hide): New function.
2087 (add_field): Hide everything that shouldn't be visible outside a
2088 DSO.
2089 (build_static_class_ref): Likewise.
2090 (build_classdollar_field): Likewise.
2091 (make_class_data): Likewise.
2092 (layout_class_method): Likewise.
2093 * expr.c (special_method_p): New function.
2094
2095 * class.c (push_class): Don't bogusly guess the source filename.
2096 * jcf-parse.c (give_name_to_class): Don't set input_location from
2097 DECL_ARTIFICIAL decls.
2098
2099 2007-03-30 Rafael Ávila de Espíndola <espindola@google.com>
2100
2101 * typeck.c (java_signed_or_unsigned_type): Removed.
2102 (java_signed_type): use get_signed_or_unsigned_type instead of
2103 java_signed_or_unsigned_type.
2104 (java_unsigned_type): Ditto.
2105 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
2106 * java-tree.h (java_signed_or_unsigned_type): Removed.
2107
2108 2007-03-26 Tom Tromey <tromey@redhat.com>
2109
2110 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
2111 (java.maintainer-clean): Likewise.
2112 (java.install-man): Likewise.
2113 (.INTERMEDIATE): Removed grmiregistry.pod.
2114 (grmiregistry.pod): Removed.
2115 * gcj.texi (Invoking gcjh): Removed.
2116 (Invoking gjnih): Likewise.
2117 (Invoking grmiregistry): Likewise.
2118 (direntry): Updated.
2119 (Top): Likewise.
2120 (which-gcj): Removed.
2121
2122 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2123
2124 * Make-lang.in: Add install-pdf target as copied from
2125 automake v1.10 rules.
2126
2127 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
2128
2129 * gcj.texi: Standardize title page.
2130
2131 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
2132
2133 * class.c: Fix a comment typo.
2134
2135 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2136 Brooks Moses <brooks.moses@codesourcery.com>
2137 Lee Millward <lee.millward@codesourcery.com>
2138
2139 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
2140 of build3.
2141 (BUILD_MONITOR_EXIT): Likewise.
2142
2143 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
2144 (java_gimplify_modify_expr): Likewise.
2145
2146 * class.c (cache_this_class_ref): Use build_call_expr.
2147 (build_static_field_ref): Likewise.
2148 (emit_indirect_register_classes): Likewise.
2149 (emit_register_classes): Likewise.
2150
2151 * resource.c (write_resource_constructor): Use build_call_expr.
2152
2153 * builtins.c (builtin_creator_function): Change interpretation of
2154 the second parameter to be the whole CALL_EXPR instead of the arglist.
2155 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
2156 (min_builtin): Likewise.
2157 (abs_builtin): Likewise.
2158 (java_build_function_call_expr): Likewise.
2159 (convert_real): Likewise.
2160 (UNMARSHAL3): Likewise.
2161 (UNMARSHAL4): Likewise.
2162 (UNMARSHAL5): Likewise.
2163 (build_arglist_for_builtin): Delete. Fix callers to use
2164 build_call_expr instead.
2165 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
2166 accessors.
2167 (compareAndSwapInt_builtin): Likewise.
2168 (compareAndSwapLong_builtin): Likewise.
2169 (compareAndSwapObject_builtin): Likewise.
2170 (putVolatile_builtin): Likewise.
2171 (getVolatile_builtin): Likewise.
2172 (VMSupportsCS8_builtin): Likewise.
2173 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
2174 instead of arglist.
2175
2176 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
2177 (build_java_throw_out_of_bounds_exception): Likewise.
2178 (java_check_reference): Likewise.
2179 (build_java_arraystore_check): Likewise.
2180 (build_newarray): Likewise.
2181 (build_anewarray): Likewise.
2182 (expand_java_multinewarray): Use build_call_list instead of build3.
2183 (build_java_monitor): Use build_call_nary instead of build3.
2184 (java_create_object): Likewise.
2185 (expand_java_NEW): Likewise.
2186 (build_instanceof): Likewise.
2187 (expand_java_CHECKCAST): Likewise.
2188 (build_java_soft_divmod): Likewise.
2189 (build_java_binop): Likewise.
2190 (build_field_ref): Likewise.
2191 (build_class_init): Likewise.
2192 (rewrite_arglist_getcaller): Use build_call_expr.
2193 (build_invokeinterface): Use build_call_nary instead of build3.
2194 (expand_invoke): Use build_call_list instead of build3.
2195 (build_jni_stub): Use build_call_nary, build_call_list, or
2196 build_call_expr instead of build3.
2197 (expand_java_field_op): Use build_call_expr instead of build3.
2198 (force_evaluation_order): Use new CALL_EXPR accessors.
2199
2200 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
2201
2202 2007-02-15 David Daney <ddaney@avtrex.com>
2203
2204 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
2205 (java.maintainer-clean):Add gc-analyze.1.
2206 (.INTERMEDIATE): Add gc-analyze.pod.
2207 (gc-analyze.pod): New rule.
2208 (java.install-man): Install gc-analyze.1
2209 * gcj.texi: Add new section for the gc-analyze program.
2210
2211 2007-02-07 Andrew Haley <aph@redhat.com>
2212
2213 * class.c (uncache_this_class_ref): New.
2214 * expr.c (build_jni_stub): Initialize the class.
2215 (expand_byte_code): Call uncache_this_class_ref after generating
2216 code.
2217
2218 2007-02-06 Tom Tromey <tromey@redhat.com>
2219
2220 PR java/30714:
2221 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
2222
2223 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
2224
2225 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
2226
2227 2007-02-02 Andrew Haley <aph@redhat.com>
2228
2229 * expr.c (expand_byte_code): Call cache_this_class_ref() and
2230 cache_cpool_data_ref().
2231 Set TYPE_CPOOL_DATA_REF.
2232 (cache_cpool_data_ref): New function.
2233 * constants.c (build_ref_from_constant_pool): Remove special-case
2234 code for flag_indirect_classes.
2235 (build_constant_data_ref): Move special-case code for
2236 flag_indirect_classes here from build_ref_from_constant_pool.
2237 * decl.c (finish_method): Move class initialization from here to
2238 cache_this_class_ref.
2239 * class.c (cache_this_class_ref): New function.
2240 (build_class_ref): Use this_classdollar for the ouput class.
2241
2242 2007-02-02 David Daney <ddaney@avtrex.com>
2243
2244 * class.c (is_compiled_class): Move check to avoid reloading
2245 current class.
2246 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
2247 already set.
2248
2249 2007-02-01 Andrew Haley <aph@redhat.com>
2250
2251 PR java/30641
2252 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
2253
2254 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
2255
2256 * class.c, jcf-parse.c: Fix comment typos.
2257
2258 2007-01-30 Tom Tromey <tromey@redhat.com>
2259
2260 * gcj.texi (Strings): Fix documentation for JvNewString.
2261
2262 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2263
2264 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
2265 typos.
2266
2267 2007-01-30 Ben Elliston <bje@au.ibm.com>
2268
2269 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
2270
2271 2007-01-29 Tom Tromey <tromey@redhat.com>
2272
2273 PR java/30607:
2274 * jvspec.c (lang_specific_driver): Handle separate -I argument.
2275 * lang.opt (-I): Add 'Separate'.
2276
2277 2007-01-29 Andrew Haley <aph@redhat.com>
2278
2279 * class.c (add_method_1): Mark fndecl as external unless we are
2280 compiling it into this object file.
2281
2282 2007-01-24 Andrew Haley <aph@redhat.com>
2283
2284 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
2285 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
2286
2287 2007-01-22 Andrew Haley <aph@redhat.com>
2288
2289 * builtins.c (VMSupportsCS8_builtin): New function.
2290
2291 2007-01-23 Andrew Pinski <pinskia@gmail.com>
2292
2293 PR java/30454
2294 * jcf-io.c (opendir_in_zip): Close the file
2295 and free zipf before returning after an error.
2296
2297 2007-01-16 Tom Tromey <tromey@redhat.com>
2298
2299 * java-tree.def: Added copyright header.
2300
2301 2007-01-15 Tom Tromey <tromey@redhat.com>
2302
2303 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
2304 case.
2305 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
2306 Removed case.
2307 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
2308 (EXPR_WFL_NODE): Likewise.
2309 (EXPR_WFL_LINECOL): Likewise.
2310 (EXPR_WFL_FILENAME): Likewise.
2311 (EXPR_WFL_LINENO): Likewise.
2312 (build_expr_wfl, expr_add_location): Don't declare.
2313 (build_unknown_wfl): Removed.
2314 (EXPR_WFL_FILENAME_NODE): Removed.
2315 (EXPR_WFL_COLNO): Removed.
2316 (EXPR_WFL_SET_LINECOL): Removed.
2317 (DECL_FUNCTION_WFL): Removed.
2318 (DECL_FIELD_FINAL_WFL): Removed.
2319 (struct lang_decl_func) <wfl>: Removed field.
2320 <called_constructor>: Likewise.
2321 <inner_access>: Likewise.
2322 (struct lang_decl_var) <wfl>: Removed field.
2323 (DECL_CONSTRUCTOR_CALLS): Removed.
2324 (DECL_FUNCTION_ACCESS_DECL): Likewise.
2325 (DECL_FUNCTION_INNER_ACCESS): Likewise.
2326 (DECL_SPECIFIC_COUNT): Likewise.
2327 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
2328 * expr.c (build_expr_wfl): Removed.
2329 (expr_add_location): Likewise.
2330
2331 2007-01-12 Tom Tromey <tromey@redhat.com>
2332
2333 * jcf-dump.c (main): Updated call to find_class.
2334 * lang.c (java_init): Removed dead code.
2335 * jcf-parse.c (read_class): Don't use java_source field. Removed
2336 dead code.
2337 (parse_zip_file_entries): Don't use java_source field.
2338 (process_zip_dir): Likewise.
2339 (jcf_parse): Removed dead code.
2340 (java_parse_file): Likewise.
2341 (read_class): Updated call to find_class.
2342 * jcf-io.c (find_class): Don't use java_source field. Removed
2343 'source_ok' argument, .java logic.
2344 * jcf.h (JCF) <java_source>: Removed field.
2345 (JCF_ZERO): Updated. (find_class): Updated.
2346 * decl.c: Removed dead code.
2347 * class.c: Removed dead code.
2348
2349 2007-01-11 Tom Tromey <tromey@redhat.com>
2350
2351 * typeck.c (convert): Don't use flag_emit_class_files.
2352 * lang.c (java_post_options): Don't use flag_emit_class_files.
2353 (java_handle_option): Don't use flag_extraneous_semicolon or
2354 flag_redundant.
2355 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
2356 flag_emit_class_files.
2357 (load_class): Likewise.
2358 * java-tree.h (flag_emit_class_files): Don't declare.
2359 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
2360 (flag_extraneous_semicolon): Don't declare.
2361 (flag_not_overriding): Likewise.
2362 (flag_static_local_jdk1_1): Likewise.
2363 (flag_redundant): Likewise.
2364 * expr.c (build_newarray): Don't use flag_emit_class_files.
2365 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
2366 flag_emit_class_files.
2367 (build_class_ref): Likewise.
2368 * builtins.c (check_for_builtin): Don't use
2369 flag_emit_class_files.
2370
2371 2007-01-10 Tom Tromey <tromey@redhat.com>
2372
2373 * lang.c (java_can_use_bit_fields_p): Removed.
2374 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
2375
2376 2007-01-09 Andrew Haley <aph@redhat.com>
2377
2378 * expr.c (build_java_arrayaccess): Rewrite to generate array
2379 access in canonical form.
2380 (expand_java_arraystore): Use build_fold_addr_expr() on address of
2381 array access.
2382
2383 2007-01-03 Andrew Haley <aph@redhat.com>
2384
2385 PR java/28754
2386 * expr.c (expand_java_field_op): If we're initializing a field's
2387 declaring interface we should not also initialize the class
2388 context in which it was referenced.
2389
2390 2007-01-02 Tom Tromey <tromey@redhat.com>
2391
2392 * java-tree.h (compiling_from_source, current_encoding,
2393 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
2394 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
2395 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
2396 JTI_WFL_OPERATOR): Removed
2397 (finit_identifier_node, instinit_identifier_node,
2398 length_identifier_node, super_identifier_node,
2399 continue_identifier_node, access0_identifier_node, wfl_operator):
2400 Removed.
2401 (cyclic_inheritance_report,
2402 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
2403 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
2404 DECL_FIXED_CONSTRUCTOR_P): Removed.
2405 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
2406 Removed.
2407 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
2408 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
2409 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
2410 import_list, import_demand_list>: Removed.
2411 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
2412 cxx_keyword_p): Removed.
2413 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
2414 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
2415 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
2416 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
2417 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
2418 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
2419 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
2420 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
2421 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
2422 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
2423 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
2424 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
2425 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
2426 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
2427 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
2428 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
2429 java_parse_abort_on_error, extract_field_decl): Removed.
2430 (finput): Declare.
2431 * lang.c: (compiling_from_source, current_encoding): Removed.
2432 (java_handle_option): Ignore -fencoding.
2433 * parse.h: Don't include lex.h.
2434 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
2435 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
2436 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
2437 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
2438 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
2439 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
2440 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
2441 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
2442 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
2443 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
2444 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
2445 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
2446 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
2447 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
2448 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
2449 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
2450 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
2451 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
2452 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
2453 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
2454 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
2455 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
2456 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
2457 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
2458 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
2459 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
2460 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
2461 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
2462 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
2463 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
2464 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
2465 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
2466 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
2467 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
2468 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
2469 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
2470 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
2471 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
2472 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
2473 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
2474 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
2475 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
2476 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
2477 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
2478 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
2479 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
2480 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
2481 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
2482 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
2483 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
2484 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
2485 SET_CPC_STATIC_INITIALIZER_STMT,
2486 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
2487 java_complete_class, java_check_circular_reference,
2488 java_fix_constructors, java_layout_classes, java_reorder_fields,
2489 java_method_add_stmt, java_get_line_col, reset_report,
2490 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
2491 java_finish_classes, ctxp, ctxp_for_generation,
2492 ctxp_for_generation_last): Removed.
2493 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
2494 * mangle.c (utf8_cmp): New function.
2495 (cxx_keywords): New global.
2496 (cxx_keyword_p): New function.
2497 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
2498 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
2499 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
2500 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
2501 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
2502 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
2503 * Make-lang.in (java.srcextra): Do nothing.
2504 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
2505 (JAVA_OBJS): Don't mention deleted files.
2506 (java.mostlyclean): Likewise.
2507 (java.clean): Likewise.
2508 (JAVA_LEX_C): Removed.
2509 (buffer.o, check-init.o, parse.o): Remove unused targets.
2510 (typeck.o): Updated.
2511 * jcf-parse.c (read_class): Comment out unused code.
2512 (java_layout_seen_class_methods): New function.
2513 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
2514 Removed.
2515 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
2516 (init_jcf_parse): Removed.
2517 * config-lang.in (gtfiles): Remove deleted files.
2518 * decl.c (java_init_decl_processing): Don't initialize
2519 finit_identifier_node, instinit_identifier_node,
2520 length_identifier_node, super_identifier_node,
2521 continue_identifier_node, access0_identifier_node. Don't call
2522 init_jcf_parse.
2523 * class.c (cyclic_inheritance_report): New global.
2524 (add_method_1): Don't use
2525 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
2526 (maybe_layout_super_class): Comment out code.
2527 (safe_layout_class): New function.
2528 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
2529 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
2530 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
2531 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
2532 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
2533 (java_gimplify_case_expr): Removed.
2534 (java_gimplify_default_expr): Likewise.
2535 (java_gimplify_new_array_init): Likewise.
2536 * parse.y: Removed.
2537 * keyword.gperf, keyword.h: Removed.
2538 * chartables.h: Removed.
2539 * check-init.c: Removed.
2540 * buffer.c, buffer.h: Removed.
2541 * convert.h: Removed.
2542 * gen-table.pl: Removed.
2543 * lex.c, lex.h: Removed.
2544
2545 2007-01-02 Andrew Haley <aph@redhat.com>
2546
2547 * expr.c (expand_java_arraystore): Make sure we perform a bounds
2548 check at runtime before we perform a type check.
2549
2550 2006-12-19 Andrew Haley <aph@redhat.com>
2551
2552 * decl.c: Bump minor BC ABI version.
2553
2554 2006-12-13 Gary Benson <gbenson@redhat.com>
2555
2556 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
2557
2558 2006-12-12 Tom Tromey <tromey@redhat.com>
2559
2560 * lang-specs.h: Pass -M options to jc1.
2561 * jcf-depend.c (jcf_dependency_add_file): Don't emit
2562 dependencies.
2563
2564 2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
2565
2566 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
2567
2568 2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
2569
2570 * lang-specs.h: Pass '%U'-based options as separate arguments.
2571
2572 2006-12-05 Tom Tromey <tromey@redhat.com>
2573
2574 PR java/29495:
2575 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
2576 classes as well.
2577 * class.c (add_field): Handle ACC_SYNTHETIC.
2578 (add_method_1): Likewise. Handle bridge and varargs.
2579 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2580 annotation.
2581 (set_class_decl_access_flags): Handle synthetic and annotation.
2582 * java-tree.h (METHOD_BRIDGE): New macro.
2583 (METHOD_VARARGS): Likewise.
2584 (TYPE_SYNTHETIC): Likewise.
2585 (TYPE_ANNOTATION): Likewise.
2586 (lang_type): New fields 'synthetic' and 'annotation'.
2587 (lang_decl_func): New fields 'varargs' and 'bridge'.
2588
2589 2006-12-04 Andrew Haley <aph@redhat.com>
2590
2591 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2592 there's no map.
2593
2594 2006-11-29 Gary Benson <gbenson@redhat.com>
2595
2596 * expr.c (rewrite_arglist_getcaller): Reorder.
2597
2598 2006-11-29 Andrew Haley <aph@redhat.com>
2599
2600 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2601 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2602
2603 2006-11-23 Andrew Haley <aph@redhat.com>
2604
2605 * expr.c (rewrite_arglist_getcaller): New.
2606 (rewrite_arglist_getclass): Fix indentation.
2607 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
2608 gnu.classpath.VMStackWalker.getCallingClassLoader().
2609 * builtins.c (initialize_builtins): Remove duplicate def'n of
2610 __sync_synchronize.
2611 Add __builtin_return_address.
2612
2613 2006-11-22 Andrew Haley <aph@redhat.com>
2614
2615 * jcf-reader.c (get_attribute): Mark attr_type unused.
2616
2617 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2618
2619 2007-01-08 Richard Guenther <rguenther@suse.de>
2620
2621 * lex.c (do_java_lex): Use build_int_cst_wide_type.
2622 * jcf-parse.c (get_constant): Likewise.
2623
2624 2006-11-12 Jan Hubicka <jh@suse.cz>
2625
2626 * resource.c (compile_resource_data): Update for new varpool names.
2627 * java/class.c (build_utf8_ref): Likewise.
2628
2629 2006-11-12 David Daney <ddaney@avtrex.com>
2630
2631 PR java/29805
2632 * typeck.c (build_java_array_type): Increase buffer sizes.
2633
2634 2006-11-11 Richard Guenther <rguenther@suse.de>
2635
2636 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2637 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2638
2639 2006-11-06 Andrew Haley <aph@redhat.com>
2640
2641 * java-tree.h (CONSTANT_LazyFlag): New.
2642 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2643 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2644 reflection_data.
2645 (handle_constant): Return 0 for dummy cpool entries.
2646 Handle constants of kind Class.
2647 Handle constants of kind NameAndType.
2648 (handle_enclosingmethod_attribute): New.
2649 (handle_signature_attribute): New.
2650 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2651 (HANDLE_SIGNATURE_ATTRIBUTE): New.
2652 (handle_constant): Use unmangle_classname()rather than calling
2653 identifier_subst() directly.
2654
2655 2006-11-02 Andrew Haley <aph@redhat.com>
2656
2657 * java-tree.h (FIELD_ENUM): New.
2658 (lang_decl_var.field_enum): New.
2659 (lang_type.enum_class): New.
2660 (CLASS_ENUM): New.
2661 * class.c (set_class_decl_access_flags): Handle enum types.
2662 (add_field): Handle enum fields.
2663 (get_access_flags_from_decl): Likewise.
2664
2665 * class.c (make_class_data): Put reflection_data into rodata.
2666
2667 2006-11-01 Andrew Haley <aph@redhat.com>
2668
2669 * jcf-parse.c (field_offsets, bit_obstack): New variables.
2670 (jcf_parse): Write end marker to annotation_data.
2671 (java_parse_file): Create field_offsets bitmap. Destroy it.
2672 (annotation_grow, annotation_rewrite_byte)
2673 (annotation_rewrite_short, annotation_rewrite_int)
2674 (annotation_read_short, annotation_write_byte)
2675 (annotation_write_short, annotation_write_int)
2676 (handle_long_constant, handle_constant, handle_element_value)
2677 (handle_annotation, handle_annotations)
2678 (handle_annotation_attribute, rewrite_reflection_indexes)
2679 (handle_member_annotations, handle_parameter_annotations)
2680 (handle_default_annotation): New functions.
2681 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
2682 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
2683 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2684 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2685 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2686 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
2687 (TYPE_REFLECTION_DATA): New.
2688 (TYPE_REFLECTION_DATASIZE): New.
2689 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2690 an enum.
2691 * jcf-reader.c (get_attribute): Pass field/method index and
2692 attribute type to get_attribute().
2693 * constants.c (find_class_or_string_constant): Make nonstatic.
2694 (cpool_for_class): Likewise.
2695 (build_constants_constructor): Separate string and scalar types.
2696 * class.c (make_class_data): Generate field_indexes permutation.
2697 Pass it to rewrite_reflection_indexes().
2698 (make_class_data): Generate constructor for reflection_data field.
2699
2700 2006-10-20 Tom Tromey <tromey@redhat.com>
2701
2702 * gcj.texi (Top): Don't mention jv-scan.
2703 (Invoking gcj): Likewise.
2704 (Invoking gcjh): Likewise.
2705 (Invoking gjnih): Likewise.
2706 (Invoking gij): Likewise.
2707 (Invoking gcj-dbtool): Likewise.
2708 (Invoking jv-scan): Removed.
2709 * parse-scan.y: Removed.
2710 * jv-scan.c: Removed.
2711 * config-lang.in (stagestuff): Don't mention jv-scan.
2712 * Make-lang.in (java): Removed jv-scan.
2713 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2714 (JVSCAN_OBJS): Removed.
2715 (jv-scan$(exeext)): Likewise.
2716 (JAVA_MANFILES): Removed jv-scan.1.
2717 (java.uninstall): Don't mention jv-scan.
2718 (java.mostlyclean): Likewise.
2719 (java.maintainer-clean): Likewise.
2720 (.INTERMEDIATE): Likewise.
2721 (java/jv-scan.o): Removed.
2722 (jv-scan.pod): Likewise.
2723 (java.srcextra): Don't mention parse-scan.c.
2724 (java.mostlyclean): Likewise.
2725 (java/parse-scan.c): Removed.
2726 (java/parse-scan.o-warn): Removed.
2727 (java/parse-scan.o): Removed.
2728
2729 2006-10-20 Tom Tromey <tromey@redhat.com>
2730
2731 * lang.c (java_handle_option): Don't use
2732 jcf_write_base_directory.
2733 * jcf.h (jcf_write_base_directory): Removed.
2734 * parse.y (java_expand_classes): Don't call write_classfile.
2735 * config-lang.in (gtfiles): Removed jcf-write.c.
2736 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2737 (java/jcf-write.o): Removed.
2738 * jcf-parse.c (parse_class_file): Don't call write_classfile.
2739 * java-tree.h (write_classfile): Removed declaration.
2740 * jcf-write.c: Removed.
2741
2742 2006-10-20 Tom Tromey <tromey@redhat.com>
2743
2744 * Make-lang.in (java): Removed gjnih, gcjh.
2745 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2746 (GCJH_OBJS): Removed.
2747 (GJNIH_OBJS): Likewise.
2748 (gjnih$(exeext)): Likewise.
2749 (gcjh$(exeext)): Likewise.
2750 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2751 (java.install-common): Don't special case gcjh.
2752 (java.uninstall): Don't mention gcjh, gjnih.
2753 (java.mostlyclean): Likewise.
2754 (java.maintainer-clean): Likewise.
2755 (.INTERMEDIATE): Likewise.
2756 (gcjh.pod): Removed.
2757 (gjnih.pod): Likewise.
2758 (GCJH_TARGET_INSTALL_NAME): Removed.
2759 (java/gjavah-jni.o): Removed.
2760 (java/gjavah.o): Likewise.
2761 * config-lang.in (stagestuff): Removed gjnih, gcjh.
2762 * gjavah.c: Removed.
2763
2764 2006-10-17 Tom Tromey <tromey@redhat.com>
2765
2766 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2767 "string" case.
2768
2769 2006-10-17 Tom Tromey <tromey@redhat.com>
2770
2771 * jvgenmain.c (main): Handle -findirect-dispatch.
2772 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2773 jvgenmain.
2774
2775 2006-10-06 Andrew Haley <aph@redhat.com>
2776
2777 * builtins.c (compareAndSwapInt_builtin): Check that we really do
2778 have a compare_and_swap builtin.
2779 (compareAndSwapLong_builtin): Likewise.
2780 (compareAndSwapObject_builtin): Likewise.
2781
2782 2006-10-04 Andrew Haley <aph@redhat.com>
2783
2784 * builtins.c (java_builtins): Add compareAndSwapInt,
2785 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2786 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2787 putObjectVolatile, getObjectVolatile, getIntVolatile,
2788 getLongVolatile, getLong.
2789 (UNMARSHAL3): New macro.
2790 (UNMARSHAL4): Likewise.
2791 (UNMARSHAL5): Likewise.
2792 (build_arglist_for_builtin): New function.
2793 (build_addr_sum, build_check_this): New functions.
2794 (putObject_builtin. compareAndSwapInt_builtin,
2795 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2796 putVolatile_builtin, getVolatile_builtin): New builtins.
2797
2798 2006-06-08 Andrew Haley <aph@redhat.com>
2799
2800 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2801 get_symbol_table_index().
2802 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2803 private method.
2804 (build_known_method_ref): New arg: special. Pass it to
2805 get_symbol_table_index.
2806 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2807 the method list.
2808 (build_invokevirtual): New arg: special. Pass it to
2809 get_symbol_table_index.
2810 (expand_invoke): New variable: special.
2811 Pass it to maybe_rewrite_invocation().
2812 Pass it to build_known_method_ref().
2813 * class.c (build_symbol_entry): Add new arg: special. Use it to
2814 build the symbol table conbstructor.
2815 (emit_symbol_table): Extract SPECIAL from the method list and pass
2816 it to build_symbol_entry().
2817 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2818 special accordingly.
2819
2820 2006-09-08 Andrew Haley <aph@redhat.com>
2821
2822 * class.c (layout_class_method): Use build_java_signature, not
2823 build_java_argument_signature. Use lookup_java_method, not
2824 lookup_argument_method.
2825
2826 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2827 Bryce McKinlay <bryce@mckinlay.net.nz>
2828
2829 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2830
2831 2006-07-18 Tom Tromey <tromey@redhat.com>
2832
2833 * lang.opt: Added missing -W options.
2834
2835 2006-07-12 Tom Tromey <tromey@redhat.com>
2836
2837 PR java/28329:
2838 * lang-specs.h: Pass '%U'-based options as separate arguments.
2839 Use -faux-classpath.
2840 * lang.c (java_handle_option): Handle OPT_faux_classpath.
2841 * lang.opt (faux-classpath): New option.
2842
2843 2006-07-07 Tom Tromey <tromey@redhat.com>
2844
2845 * class.c (make_class_data): Set value for reflection_data field.
2846 * decl.c (java_init_decl_processing): Add reflection_data field.
2847
2848 2006-07-07 Tom Tromey <tromey@redhat.com>
2849
2850 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2851 earlier.
2852 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2853
2854 2006-07-07 Andrew Haley <aph@redhat.com>
2855
2856 * jcf-parse.c (set_source_filename): Don't check for
2857 CLASS_FROM_CURRENTLY_COMPILED_P.
2858 Remove // comments.
2859
2860 2006-07-07 Andrew Haley <aph@redhat.com>
2861
2862 * java-tree.h (java_read_sourcefilenames): Declare.
2863 * lang.c (java_handle_option): Call java_read_sourcefilenames().
2864 * lang.opt (fsource-filename): New opt.
2865 * lang-specs.h: Add -fsource-filename.
2866 * jcf-parse.c (num_files, filenames): New variables.
2867 (reverse, cmpstringp, java_read_sourcefilenames,
2868 find_sourcefile): New.
2869 (set_source_filename): Call find_sourcefile to find the real name
2870 of a source file.
2871
2872 2006-06-27 Tom Tromey <tromey@redhat.com>
2873
2874 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2875 Signature, LocalVariableTypeTable, annotation attributes.
2876 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2877 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2878 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2879 (HANDLE_METHOD): Likewise.
2880 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2881 (print_annotation): New function.
2882 (print_element_value): Likewise.
2883 (indent): Likewise.
2884 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2885 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2886 (print_parameter_annotations): New function.
2887 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2888 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2889 Likewise.
2890 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2891 (print_annotations): New function.
2892
2893 2006-06-23 Tom Tromey <tromey@redhat.com>
2894
2895 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
2896 emitting class files, always use 1.5.
2897 * gcj.texi (Input Options): Document -fsource.
2898 (Code Generation): Document -ftarget.
2899
2900 2006-06-21 Tom Tromey <tromey@redhat.com>
2901
2902 PR java/28089:
2903 * expr.c (expand_java_field_op): Initialize field's declaring
2904 class.
2905
2906 2006-06-20 Tom Tromey <tromey@redhat.com>
2907
2908 * expr.c (push_value): Always flush quick stack.
2909
2910 2006-06-19 Tom Tromey <tromey@redhat.com>
2911
2912 * expr.c (push_value): Also flush quick stack if value is a
2913 component_ref.
2914
2915 2006-06-19 Tom Tromey <tromey@redhat.com>
2916
2917 * expr.c (push_value): Flush quick stack if value has side
2918 effects.
2919
2920 2006-06-13 Tom Tromey <tromey@redhat.com>
2921
2922 * class.c (is_compiled_class): Explicitly check for current
2923 class.
2924
2925 2006-06-09 Tom Tromey <tromey@redhat.com>
2926
2927 * gjavah.c (decompile_method): Don't decompile a static field
2928 accessor method.
2929
2930 2006-06-06 Tom Tromey <tromey@redhat.com>
2931
2932 * lang-specs.h <jc1>: Add .jar file to command line if
2933 -fsaw-java-file. Also, remove -ffilelist-file in this case.
2934
2935 2006-06-05 Tom Tromey <tromey@redhat.com>
2936
2937 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2938 synthetic, enum, annotation.
2939 * jcf.h (ACC_BRIDGE): New macro.
2940 (ACC_VARARGS): Likewise.
2941 (ACC_SYNTHETIC): Likewise.
2942 (ACC_ENUM): Likewise.
2943 (ACC_ANNOTATION): Likewise.
2944
2945 2006-06-04 Tom Tromey <tromey@redhat.com>
2946
2947 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2948 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2949 and -ftarget.
2950 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
2951 when needed. Handle classpath-setting.
2952 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2953 * lang-specs.h: Rewrote.
2954
2955 2006-06-04 Tom Tromey <tromey@redhat.com>
2956
2957 * jcf-io.c (find_class): Set source_ok to 0.
2958 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2959 (parse_class_file): Don't call java_mark_class_local.
2960 (java_parse_file): Skip .java files. Call java_mark_class_local
2961 before lowering any code.
2962 (parse_zip_file_entries): Don't call duplicate_class_warning
2963 here.
2964 (process_zip_dir): ... call it here.
2965 * class.c (add_field): Don't mark field external if it is being
2966 compiled into this object.
2967 (make_class_data): Handle situation where class_dtable_decl is
2968 created before Class is compiled.
2969 (is_compiled_class): Don't assume files in zip are compiled into
2970 this object.
2971 (layout_class_method): Don't mark method external if it is being
2972 compiled into this object.
2973
2974 2006-06-04 Tom Tromey <tromey@redhat.com>
2975
2976 * jcf-path.c (jcf_path_compute): New function.
2977 * jcf.h (jcf_path_compute): Declare.
2978
2979 2006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2980
2981 * decl.c: Include langhooks.h.
2982 (builtin_function): Remove.
2983 (java_init_decl_processing): Replace calls to builtin_function
2984 with add_builtin_function.
2985 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2986 (java/decl.o): Depend on langhooks.h.
2987 * java-tree.h (builtin_function): Remove.
2988
2989 2006-10-10 Brooks Moses <bmoses@stanford.edu>
2990
2991 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
2992
2993 2006-09-12 Tom Tromey <tromey@redhat.com>
2994
2995 * expr.c (push_value): Always flush quick stack.
2996
2997 2006-09-12 Tom Tromey <tromey@redhat.com>
2998
2999 PR java/29013:
3000 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
3001 the push of the called method's return result.
3002
3003 2006-09-12 Tom Tromey <tromey@redhat.com>
3004
3005 * jvspec.c (lang_specific_driver): Read spec file even if
3006 -fsyntax-only.
3007
3008 2006-09-12 Tom Tromey <tromey@redhat.com>
3009
3010 PR java/28754:
3011 * expr.c (expand_java_field_op): Initialize field's declaring
3012 interface if necessary.
3013
3014 2006-09-12 Tom Tromey <tromey@redhat.com>
3015
3016 PR java/28892:
3017 * expr.c (expand_java_field_op): No error for assignments not in
3018 class initializer or constructor.
3019
3020 2006-08-22 Andrew Haley <aph@redhat.com>
3021
3022 * decl.c (java_add_stmt): Give the statement list a type.
3023
3024 2006-08-16 Jakub Jelinek <jakub@redhat.com>
3025 Bryce McKinlay <bryce@mckinlay.net.nz>
3026
3027 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
3028
3029 2006-08-10 Simon Martin <simartin@users.sourceforge.net>
3030
3031 PR java/8923
3032 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
3033 or '--' is used with a constant operand.
3034 (java_complete_lhs): When processing a '++' or '--' expression,
3035 don't call java_complete_tree but java_complete_lhs, so that a
3036 static final variable operand is never replaced by its value. This
3037 avoids an ICE later on.
3038 (patch_unaryop): Fixed typo in comment.
3039
3040 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3041
3042 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
3043
3044 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
3045
3046 * builtins.c (check_for_builtin): If a builtin could result in a
3047 direct call being generated, don't use it if flag_indirect_dispatch
3048 is set.
3049
3050 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
3051
3052 * gcj.texi (Invocation): Corrections for Invocation API example.
3053
3054 2006-07-04 Andrew Haley <aph@redhat.com>
3055
3056 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
3057 entry.
3058
3059 2006-06-21 Andrew Haley <aph@redhat.com>
3060
3061 * java-tree.h (update_aliases): Remove
3062 * expr.c (expand_iinc): Remove call to update_aliases().
3063 (STORE_INTERNAL): Likewise.
3064 * decl.c (update_aliases, initialize_local_variable)
3065 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
3066
3067 2006-06-19 Andrew Haley <aph@redhat.com>
3068
3069 PR java/1305
3070 PR java/27908
3071 * expr.c (java_modify_addr_for_volatile): New function.
3072 (expand_java_field_op): Handle volatile fields.
3073 * java-gimplify.c (java_gimplify_component_ref): Call
3074 java_modify_addr_for_volatile to give the field_ref the correct
3075 volatile type.
3076 (java_gimplify_modify_expr): Likewise.
3077 * java-tree.h (java_modify_addr_for_volatile): New decl.
3078
3079 2006-06-17 Karl Berry <karl@gnu.org>
3080
3081 * gcj.texi (@dircategory): Use "Software development" instead
3082 of "Programming", following the Free Software Directory.
3083
3084 2006-06-16 Andrew Haley <aph@redhat.com>
3085
3086 * class.c (make_class_data): When using flag_indirect_classes,
3087 don't initialize the vtable of Class instances.
3088
3089 2006-06-09 Andrew Haley <aph@redhat.com>
3090
3091 PR java/1305
3092 PR java/27908
3093 * builtins.c (initialize_builtins): Add __sync_synchronize().
3094 * class.c (add_field): Mark volatile fields.
3095 * java-gimplify.c (java_gimplify_expr): Call new functions to
3096 handle self-modifying exprs and COMPONENT_REFs.
3097 (java_gimplify_component_ref): New.
3098 (java_gimplify_modify_expr): Add handling for volatiles.
3099
3100 2006-06-08 Tom Tromey <tromey@redhat.com>
3101
3102 * gcj.texi (libgcj Runtime Properties): Document
3103 gnu.gcj.user.realname.
3104
3105 2006-06-08 Andrew Haley <aph@redhat.com>
3106
3107 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
3108 get_symbol_table_index().
3109 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
3110 private method.
3111 (build_known_method_ref): New arg: special. Pass it to
3112 get_symbol_table_index.
3113 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
3114 the method list.
3115 (build_invokevirtual): New arg: special. Pass it to
3116 get_symbol_table_index.
3117 (expand_invoke): New variable: special.
3118 Pass it to maybe_rewrite_invocation().
3119 Pass it to build_known_method_ref().
3120 * class.c (build_symbol_entry): Add new arg: special. Use it to
3121 build the symbol table conbstructor.
3122 (emit_symbol_table): Extract SPECIAL from the method list and pass
3123 it to build_symbol_entry().
3124 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
3125 special accordingly.
3126
3127 2006-06-06 David Daney <ddaney@avtrex.com>
3128
3129 * gcj.texi (libgcj Runtime Properties): Document
3130 gnu.gcj.runtime.NameFinder.show_raw and
3131 gnu.gcj.runtime.NameFinder.remove_unknown.
3132
3133 2006-06-06 Tom Tromey <tromey@redhat.com>
3134
3135 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
3136 synthetic, enum, annotation.
3137 * jcf.h (ACC_BRIDGE): New macro.
3138 (ACC_VARARGS): Likewise.
3139 (ACC_SYNTHETIC): Likewise.
3140 (ACC_ENUM): Likewise.
3141 (ACC_ANNOTATION): Likewise.
3142
3143 2006-06-06 Mike Stump <mrs@apple.com>
3144
3145 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
3146 installing during build.
3147
3148 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
3149
3150 * gcj.texi (Extensions): Document the new gcj-dbtool-based
3151 classname-to-library resolution mechanism.
3152 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
3153 mechanism deprecated.
3154 (libgcj Runtime Properties): Document
3155 gnu.gcj.runtime.VMClassLoader.library_control's new default.
3156
3157 2006-05-29 Jakub Jelinek <jakub@redhat.com>
3158
3159 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
3160 bit wide type.
3161 (jword): Define to uint64 on 64-bit arches.
3162 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
3163
3164 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
3165
3166 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
3167 typos.
3168
3169 2006-05-26 Tom Tromey <tromey@redhat.com>
3170
3171 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
3172 * verify-glue.c (vfy_class_type): New function.
3173 * verify-impl.c (check_constant): Allow 'ldc class'.
3174 * verify.h (vfy_class_type): Declare.
3175
3176 2006-05-25 Andrew Haley <aph@redhat.com>
3177
3178 PR java/27756
3179 * decl.c (maybe_pushlevels): When variable ranges are non-nested
3180 update all lifetimes, not just the first one.
3181
3182 2006-05-24 Tom Tromey <tromey@redhat.com>
3183
3184 * java-tree.h: Fixed flag documentation.
3185
3186 2006-05-24 Tom Tromey <tromey@redhat.com>
3187
3188 PR libgcj/27729:
3189 * jcf.h (ACC_INVISIBLE): Changed value.
3190
3191 2006-05-24 Andrew Haley <aph@redhat.com>
3192
3193 PR java/27754
3194 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
3195 COMPOUND_EXPR.
3196
3197 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3198
3199 * lang.opt (femit-class-file): Remove VarExists.
3200
3201 2006-05-16 Tom Tromey <tromey@redhat.com>
3202
3203 * verify-impl.c (verify_instructions_0) <op_return>: Special case
3204 for Object.<init>.
3205
3206 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3207
3208 PR driver/26885
3209 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
3210 $(GCC_OBJS).
3211
3212 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
3213
3214 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
3215 (java/expr.o): Replace target.h with $(TARGET_H).
3216 (java/parse.o): Likewise.
3217
3218 2006-05-10 Andrew Haley <aph@redhat.com>
3219
3220 * class.c (emit_indirect_register_classes): Fix comment.
3221
3222 2006-05-04 Tom Tromey <tromey@redhat.com>
3223
3224 * java-tree.h (uses_jv_markobj_p): Declare.
3225 * class.c (uses_jv_markobj_p): Removed.
3226 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
3227 (get_boehm_type_descriptor): Use it.
3228 (uses_jv_markobj_p): Moved from class.c. Return bool.
3229
3230 2006-05-04 Tom Tromey <tromey@redhat.com>
3231
3232 * java-tree.def (THIS_EXPR): Now a tcc_expression.
3233
3234 2006-05-04 Andrew Haley <aph@redhat.com>
3235
3236 * class.c (make_field_value): Always build_address_of fdecl if
3237 there is an initializer.
3238
3239 2006-05-03 Andrew Haley <aph@redhat.com>
3240
3241 PR libgcj/27352
3242 * expr.c (maybe_rewrite_invocation): New function.
3243 (rewrite_arglist_getclass): Likewise.
3244 (rules): New.
3245 (expand_invoke): Call maybe_rewrite_invocation.
3246 * parse.y (patch_invoke): Likewise.
3247 * java-tree.h: (maybe_rewrite_invocation): New function.
3248
3249 2006-04-21 Andrew Haley <aph@redhat.com>
3250
3251 * lang.c (java_init): Handle flag_indirect_classes.
3252 * jvgenmain.c: Use "class$$" instead of "class$".
3253 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
3254 DECLs.
3255 (mangle_class_field): Special case "class$$" as well as "class$".
3256 * constants.c (build_ref_from_constant_pool): If
3257 flag_indirect_classes, generate a ref into the heap.
3258 * decl.c (constants_field_decl_node,
3259 constants_data_field_decl_node): New.
3260 * class.c (build_static_class_ref): New.
3261 (build_classdollar_field): Factor out from build_class_ref().
3262 (make_field_value): Handle static fields in heap.
3263 (make_class_data): Make sure we get a static ref to class.
3264 Make class initializer const if flag_indirect_classes.
3265 (register_class): Build a class_ref for initialization if
3266 flag_indirect_classes.
3267 (emit_indirect_register_classes): New.
3268
3269 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
3270
3271 * expr.c, gjavah.c: Fix comment typos.
3272
3273 2006-04-03 Andrew Haley <aph@redhat.com>
3274
3275 PR java/26858
3276 * expr.c (build_field_ref): Don't check the field offset if
3277 flag_syntax_only.
3278
3279 2006-03-30 Andrew Haley <aph@redhat.com>
3280
3281 PR java/26858
3282 * lang.c (java_attribute_table): New.
3283 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
3284 * expr.c (build_field_ref): Add a null pointer check for all
3285 fields of offset > 4k. Don't do so for accesses via the this
3286 pointer, which we know can never be null.
3287 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
3288 methods nonnull.
3289
3290 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
3291
3292 * Make-lang.in: Rename docdir to gcc_docdir.
3293
3294 2006-03-30 Tom Tromey <tromey@redhat.com>
3295
3296 PR java/26042:
3297 * parse.y (java_reorder_fields): Reset superclass field's size as
3298 well.
3299
3300 2006-03-28 Tom Tromey <tromey@redhat.com>
3301
3302 PR java/26390:
3303 * parse.y (find_most_specific_methods_list): Added 'class'
3304 argument.
3305 (lookup_method_invoke): Updated.
3306
3307 2006-03-15 Tom Tromey <tromey@redhat.com>
3308
3309 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
3310 non-static method calls.
3311
3312 2006-03-15 David Daney <ddaney@avtrex.com>
3313
3314 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
3315 declaration.
3316
3317 2006-03-15 David Daney <ddaney@avtrex.com>
3318
3319 * lang.opt (-freduced-reflection): New option.
3320 * lang.c (java_post_options): Generate an error if
3321 -freduced-reflection used with -fjni or -findirect-dispatch.
3322 * java-tree.h (flag_reduced_reflection): Declare new variable.
3323 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
3324 if bitmap overflows and flag_reduced_reflection set.
3325 * class.c (uses_jv_markobj_p): New function.
3326 (make_class_data): Moved generation of vtable to before
3327 reflection data, generate less reflection data if
3328 flag_reduced_reflection set.
3329 * gcj.texi: Document -freduced-reflection.
3330
3331 2006-03-15 Tom Tromey <tromey@redhat.com>
3332
3333 PR java/26638:
3334 * class.c (get_interface_method_index): Don't put <clinit> into
3335 interface table.
3336
3337 2006-03-15 Tom Tromey <tromey@redhat.com>
3338
3339 * parse.y (analyze_clinit_body): Ignore empty statements.
3340
3341 2006-03-08 David Daney <ddaney@avtrex.com>
3342
3343 * gcj.texi: Document -static-libgcj option.
3344
3345 2006-02-20 Andrew Haley <aph@redhat.com>
3346
3347 * jcf-parse.c (parse_class_file): Set input_location from
3348 current_class.
3349
3350 2006-02-15 Andrew Haley <aph@redhat.com>
3351
3352 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
3353 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
3354 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
3355
3356 2006-02-09 Andrew Haley <aph@redhat.com>
3357
3358 PR java/26192
3359 * expr.c (expand_invoke): Allow methods in arrays to be resolved
3360 in their superclass.
3361
3362 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
3363 array types.
3364
3365 2006-02-08 Tom Tromey <tromey@redhat.com>
3366
3367 PR java/22578:
3368 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
3369 * builtins.c (convert_real): New function.
3370 (java_builtins): Handle Float.intBitsToFloat,
3371 Float.floatToRawIntBits, Double.longBitsToDouble,
3372 Double.doubleToRawLongBits.
3373
3374 2006-02-07 Andrew Haley <aph@redhat.com>
3375
3376 * expr.c (expand_invoke): (BC mode.) If we find a method in a
3377 class other than the one in which we expected to find it, ignore
3378 the result.
3379
3380 PR java/25535
3381 * constants.c (build_constants_constructor): move initializer into
3382 first halfword on a 64-bit big-endian machine.
3383
3384 2006-02-04 Tom Tromey <tromey@redhat.com>
3385
3386 PR java/25676:
3387 * builtins.c (max_builtin): Skip floating point 'max'.
3388 (min_builtin): Skip floating point 'min'.
3389 (check_for_builtin): Never return NULL_TREE.
3390
3391 2006-02-04 Tom Tromey <tromey@redhat.com>
3392
3393 PR java/26097:
3394 * expr.c (push_type): Avoid side effect in gcc_assert.
3395
3396 2006-02-04 Roger Sayle <roger@eyesopen.com>
3397
3398 * decl.c (java_init_decl_processing): Create char_type_node as a
3399 regular INTEGER_TYPE node.
3400 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
3401 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
3402 test for char_type_node and promoted_char_type_node as special
3403 instances of INTEGER_TYPE tree codes.
3404 (promote_type,build_java_signature): Likewise.
3405 * jcf-write.c (adjust_typed_op): Likewise.
3406 * mangle.c (mangle_type): Likewise.
3407 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
3408 * parse.h (JINTEGRAL_TYPE_P): Likewise.
3409
3410 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
3411
3412 * expr.c (java_stack_swap): Revert gcc_assert patch.
3413
3414 2006-02-03 Ben Elliston <bje@au.ibm.com>
3415
3416 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
3417 * typeck.c: Likewise.
3418 * verify-impl.c: Likewise.
3419 * class.c: Likewise.
3420 * decl.c: Likewise.
3421 * jcf-parse.c: Likewise.
3422 * constants.c: Likewise.
3423 * check-init.c: Likewise.
3424 * jcf-write.c: Likewise.
3425 * verify-glue.c: Likewise.
3426 * mangle.c: Likewise.
3427 * expr.c: Likewise.
3428 * lang.c: Likewise.
3429 * boehm.c: Likewise.
3430
3431 2006-02-01 Jan Hubicka <jh@suse.cz>
3432
3433 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
3434 * lang.c (java_init_options): Set no_unit_at_a_time_default.
3435
3436 2006-01-30 Andrew Haley <aph@redhat.com>
3437
3438 PR java/21428
3439 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
3440
3441 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
3442
3443 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
3444 Update copyright notice dates.
3445
3446 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3447
3448 * jvspec.c (lang_specific_spec_functions): Remove.
3449
3450 2006-01-06 Tom Tromey <tromey@redhat.com>
3451
3452 * gcj.texi (Arrays): Added more documentation for
3453 JvNewObjectArray.
3454 (Primitive types): Correct information about primitive classes.
3455 (Reference types): New node.
3456 (Index): New node.
3457
3458 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
3459
3460 * jcf-parse.c (set_source_filename): Set the decl source location
3461 even when returning early.
3462
3463 2005-12-15 Tom Tromey <tromey@redhat.com>
3464 Andrew Haley <aph@redhat.com>
3465
3466 PR java/25429
3467 * parse.y (resolve_expression_name): Don't generate accessor
3468 methods for constant fields.
3469
3470 2005-12-13 Andrew Haley <aph@redhat.com>
3471
3472 PR java/25366
3473 PR java/25368
3474 * class.c (maybe_layout_super_class): Update current_class before
3475 calling do_resolve_class.
3476
3477 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
3478
3479 PR java/25330
3480 * jcf-write.c (write_classfile): Use PID in temporary class
3481 file. Save/restore errno when reporting error.
3482
3483 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
3484
3485 PR java/9861
3486 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
3487 to bare_function_type and including the return type
3488 * builtins.c (initialize_builtins) : Change builtin mangled name
3489 constants to conform to new mangling scheme
3490
3491 2005-12-08 Andrew Haley <aph@redhat.com>
3492
3493 PR libgcj/25265
3494 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
3495 (soft_abstractmethod_node): New.
3496 * expr.c (build_field_ref): Add in-line check for missing field.
3497 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
3498
3499 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3500
3501 * Make-lang.in (java.all.build, java.install-normal): Remove.
3502
3503 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3504
3505 * Make-lang.in: Remove all dependencies on s-gtype, except for
3506 gt-java-parse.h.
3507
3508 2005-12-07 Richard Sandiford <richard@codesourcery.com>
3509
3510 * class.c (build_utf8_ref, emit_register_classes): Use
3511 switch_to_section and get_section.
3512
3513 2005-12-06 Tom Tromey <tromey@redhat.com>
3514
3515 PR java/25283:
3516 * parse.y (patch_new_array_init): Revert previous patch.
3517 (lookup_method_invoke): Use size-less array type when creating an
3518 anonymous constructor.
3519
3520 2005-12-05 Tom Tromey <tromey@redhat.com>
3521
3522 * parse.y (patch_new_array_init): Don't set length on array.
3523
3524 2005-12-02 Richard Guenther <rguenther@suse.de>
3525
3526 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
3527 buildN instead of build.
3528 * class.c (finish_class): Likewise.
3529 * expr.c (java_create_object): Likewise.
3530
3531 2005-11-28 Tom Tromey <tromey@redhat.com>
3532
3533 PR java/18278:
3534 * expr.c (build_jni_stub): Unwrap the return value.
3535 * java-tree.h (soft_unwrapjni_node): New define.
3536 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
3537 * decl.c (java_init_decl_processing): Initialize
3538 soft_unwrapjni_node.
3539
3540 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
3541
3542 * gcj.texi (gij options): Add -Xss documentation.
3543
3544 2005-11-08 Wil Mahan <wmahan@gmail.com>
3545
3546 PR java/23617
3547 * zextract.c (read_zip_archive): Fix out of memory error when
3548 reading jar files with zip-style comments.
3549
3550 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
3551
3552 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
3553 formats.
3554 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
3555
3556 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
3557 Wil Mahan <wmahan@gmail.com>
3558
3559 PR java/23620
3560 * class.c (make_class): Create empty binfo here.
3561 (set_super_info): Only create binfo if we have superclasses.
3562
3563 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
3564
3565 PR java/24127
3566 * parse.y (method_header): Make the result of the rule a NULL_TREE
3567 when a parsing error occurs.
3568
3569 2005-09-29 Tom Tromey <tromey@redhat.com>
3570
3571 PR java/24120:
3572 * jcf-io.c (memoized_dirlist_hash): New function.
3573 (caching_stat): Use it.
3574
3575 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
3576
3577 PR java/21418
3578 * class.c (inherits_from_p): Try to lay out super class
3579 if it is not already laid out.
3580 (maybe_layout_super_class): Handle the case where SUPER_CLASS
3581 is a NULL_TREE.
3582
3583 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
3584
3585 * builtins.c (max_builtin, min_builtin, abs_builtin,
3586 java_build_function_call_expr): Use fold_buildN.
3587 * class.c (layout_class_method): Likewise.
3588 * expr.c (java_truthvalue_conversion, build_java_jsr,
3589 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3590 build_java_binop, build_field_ref, expand_compare,
3591 build_known_method_ref, build_invokevirtual,
3592 process_jvm_instruction): Likewise.
3593 * parse.y (patch_binop, patch_exit_expr): Likewise.
3594 * typeck.c (convert_ieee_real_to_integer): Likewise.
3595 (convert): Don't call fold after convert_ieee_real_to_integer.
3596
3597 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
3598
3599 PR java/23891
3600 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3601 the newly created type. Set import lists here, not in create_class.
3602 (jdep_resolve_class): Set current_class.
3603 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
3604 the current package context, not ctxp->package.
3605 (cicp_cache): Removed.
3606 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3607 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3608 * java-tree.h (TYPE_PACKAGE): New macro.
3609 (struct lang_type): New member 'package'.
3610
3611 2005-09-09 Andrew Haley <aph@redhat.com>
3612
3613 PR libgcj/23182
3614 * expr.c (pop_type_0): If the expected type is object or ptr
3615 (i.e. void*), return the type of the object we just popped from
3616 the stack.
3617
3618 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
3619
3620 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3621 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3622
3623 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
3624
3625 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3626 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3627 typos. Follow spelling conventions.
3628
3629 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
3630
3631 PR java/23431
3632 * typeck.c (lookup_do): Look up interfaces for the original class,
3633 not the base class.
3634 * parse.y (java_check_regular_methods): Fix diagnostic message for
3635 more restrictive overriding of a method from an interface.
3636
3637 2005-08-16 Tom Tromey <tromey@redhat.com>
3638
3639 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3640 class' initial state.
3641
3642 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3643
3644 PR java/22113
3645 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3646 `literal_token' for large numeric input tokens.
3647
3648 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3649
3650 PR java/19870
3651 * parse.y (nested_field_access_p): Rename to nested_member_access_p
3652 and expand to handle method accesses across nested classes.
3653 (build_outer_method_access_method): Rename to
3654 build_nested_method_access_method. Minor adjustments to comments.
3655 (resolve_expression_name): Use the newly-renamed
3656 nested_member_access_p method.
3657 (resolve_qualified_expression_name): Likewise.
3658 (patch_method_invocation): Also consider static methods for access
3659 method generation. Minor adjustments to comments.
3660 (maybe_use_access_method): Use the more general
3661 nested_memeber_access_p to determine access across nested class
3662 boundaries. Allow THIS_ARG to be NULL (for static methods).
3663
3664 2005-08-15 Tom Tromey <tromey@redhat.com>
3665
3666 PR java/23300.
3667 * expr.c (build_field_ref): Don't generate otable reference when
3668 DECL_FIELD_OFFSET is 0.
3669 * class.c (maybe_layout_super_class): Pass outer class to
3670 do_resolve_class.
3671
3672 2005-08-15 Tom Tromey <tromey@redhat.com>
3673
3674 * java-tree.h (LABEL_IN_SUBR): Removed.
3675 (LABEL_IN_SUBR): Likewise.
3676 (LABEL_IS_SUBR_START): Likewise.
3677 (LABEL_SUBR_START): Likewise.
3678 (LABEL_SUBR_CONTEXT): Likewise.
3679 (LABEL_CHANGED): Likewise.
3680 (LABEL_RETURN_LABEL): Likewise.
3681 (LABEL_RETURN_TYPE_STATE): Likewise.
3682 (LABEL_RETURN_LABELS): Likewise.
3683 (RETURN_MAP_ADJUSTED): Likewise.
3684 (LABEL_PENDING_CHAIN): Likewise.
3685
3686 2005-08-15 Tom Tromey <tromey@redhat.com>
3687
3688 * Make-lang.in (JAVA_OBJS): Removed verify.o
3689 (java/verify.o): Removed.
3690 * verify.c: Removed.
3691 * lang.c (flag_new_verifier): Removed.
3692 (java_post_options): Updated.
3693 * java-tree.h (flag_new_verifier): Removed.
3694 (verify_jvm_instructions): Removed.
3695 * expr.c (pop_type_0): Assume flag_new_verifier is true.
3696 (build_java_check_indexed_type): Likewise.
3697 (expand_java_arraystore): Likewise.
3698 (expand_java_arrayload): Likewise.
3699 (pop_arguments): Likewise.
3700 (expand_byte_code): Likewise.
3701 (process_jvm_instruction): Likewise.
3702
3703 2005-08-10 Andrew Haley <aph@redhat.com>
3704
3705 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3706 type mismatches to make legal GIMPLE.
3707
3708 2005-08-10 Robin Green <greenrd@greenrd.org>
3709
3710 PR java/23230:
3711 * parse.y (maybe_use_access_method): Generalize check from
3712 java.lang.Object to any superclass of current_class
3713
3714 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
3715
3716 * class.c (build_class_ref): Wrap the primary class type in a
3717 NOP_EXPR.
3718 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3719 primary class type from the NOP_EXPR in which it was placed.
3720
3721 2005-07-28 Diego Novillo <dnovillo@redhat.com>
3722
3723 * expr.c (expand_load_internal): Fix missing parens in
3724 predicate.
3725
3726 2005-07-28 Andrew Haley <aph@redhat.com>
3727
3728 * expr.c (expand_load_internal): Convert to destination type.
3729
3730 2005-07-22 Manfred Hollstein <mh@suse.com>
3731
3732 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3733 (check_constant): Likewise.
3734 (check_wide_constant): Likewise.
3735
3736 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
3737
3738 Make CONSTRUCTOR use VEC to store initializers.
3739 * check-init.c (check_init): Update to cope with VEC in
3740 CONSTRUCTOR_ELTS.
3741 * class.c (make_field_value, make_method_value, get_dispatch_table,
3742 make_class_data, emit_symbol_table, emit_catch_table,
3743 emit_assertion_table): Use build_constructor_from_list instead of
3744 build_constructor.
3745 * constants.c (build_constants_constructor): Likewise.
3746 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3747 VEC in CONSTRUCTOR_ELTS.
3748 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3749 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3750 of a TREE_LIST.
3751 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3752 CONSTRUCTOR_ELTS.
3753 * parse.y (build_new_array_init): Use build_constructor_from_list
3754 instead of build_constructor.
3755 (patch_new_array_init): Update to cope with VEC in
3756 CONSTRUCTOR_ELTS.
3757 (array_constructor_check_entry): Likewise.
3758
3759 2005-07-12 Tom Tromey <tromey@redhat.com>
3760
3761 * jvspec.c (lang_specific_driver): Put filelist_filename first on
3762 command line.
3763
3764 2005-07-12 Tom Tromey <tromey@redhat.com>
3765
3766 PR java/19674:
3767 * parse-scan.y (interface_member_declaration): Added
3768 empty_statement.
3769
3770 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
3771
3772 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3773 (LABEL_PENDING_CHAIN): Ditto.
3774 (LABEL_PC): Ditto.
3775 (DECL_BIT_INDEX): Ditto.
3776
3777 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3778
3779 PR java/18119
3780 * parse.y (inner_class_accessible): New function. Logic moved from
3781 check_inner_class_access.
3782 (check_inner_class_access): Use inner_class_accessible.
3783 (resolve_inner_class): Simplify arguments. Create circularity hash
3784 here. Keep looking for classes if we found one that was inaccessible.
3785 Return the inaccessible class only if there is no other match.
3786 (do_resolve_class): Update for new resolve_inner_class arguments.
3787 Don't create circularity_hash here.
3788
3789 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3790
3791 PR java/21045
3792 * parse.y (add_exception_to_throws): New function.
3793 (purge_unchecked_exceptions): Removed.
3794 (get_constructor_super): Renamed from verify_constructor_super. Now
3795 returns the super constructor after verification.
3796 (java_complete_expand_method): Don't use purge_unchecked_exceptions
3797 or save/restore the exception list.
3798 (check_thrown_exceptions): Add uncaught exceptions in anonymous
3799 class initializers and constructors to the throws clause of the method.
3800
3801 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
3802
3803 PR java/19674
3804 * parse.y (interface_member_declaration): Allow empty statements in
3805 interface declarations.
3806
3807 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
3808
3809 * Makefile.in (parse.o): Adjust dependencies.
3810 * parse.y: Include tree-dump.h.
3811
3812 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
3813
3814 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
3815 flag for quoting.
3816
3817 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
3818
3819 * parse.y (issue_warning_error_from_context): Call
3820 pp_output_formatted_text to be able to get the buffer.
3821
3822 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
3823
3824 * parse.y (issue_warning_error_from_context): Update for the
3825 renaming of pp_format_text to pp_format.
3826
3827 2005-06-28 Paul Brook <paul@codesourcery.com>
3828
3829 * decl.c (java_init_decl_processing): Call
3830 default_init_unwind_resume_libfunc.
3831
3832 2005-06-27 Tom Tromey <tromey@redhat.com>
3833
3834 PR java/21540, PR java/13788:
3835 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3836 fold_constant_for_init.
3837 (patch_binop): Added 'folding' argument. Updated all callers.
3838 (patch_unaryop) <NOP_EXPR>: New case.
3839 (fold_constant_for_init) <NOP_EXPR>: Likewise.
3840 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3841
3842 2005-06-25 Jan Hubicka <jh@suse.cz>
3843
3844 * builtins.c (define_builtin): Accept new flags parameter.
3845 (initialize_builtins): Mark the builtins const and nothrow accordingly.
3846
3847 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
3848
3849 * all files: Update FSF address in copyright headers.
3850
3851 2005-06-24 Tom Tromey <tromey@redhat.com>
3852
3853 * verify-impl.c (verify_instructions_0): Correctly handle
3854 situation where PC falls off end.
3855
3856 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
3857
3858 PR java/20697
3859 * parse.y (find_most_specific_methods_list): Remove special case for
3860 inner classes.
3861
3862 2005-06-15 Tom Tromey <tromey@redhat.com>
3863
3864 PR libgcj/21906:
3865 * class.c (make_method_value): Use soft_abstractmethod_node for
3866 abstract method.
3867 * java-tree.h (soft_abstractmethod_node): New define.
3868 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3869 * decl.c (java_init_decl_processing): Initialize
3870 soft_abstractmethod_node.
3871
3872 2005-06-13 Geoffrey Keating <geoffk@apple.com>
3873
3874 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3875
3876 2005-06-13 Per Bothner <per@bothner.com>
3877
3878 * expr.c (int highest_label_pc_this_method,
3879 start_label_pc_this_method): New globals.
3880 (lookup_label): Add start_label_pc_this_method to pc for label, and
3881 update highest_label_pc_this_method. This prevents conflicts between
3882 labels from different methods.
3883 * java-tree.h: Declare new globals.
3884 * jcf-parse.c (parse_class_file): If needed bump
3885 start_label_pc_this_method and reset highest_label_pc_this_method.
3886
3887 2005-06-13 Tom Tromey <tromey@redhat.com>
3888
3889 PR java/21844:
3890 * parse.y (nested_field_access_p): Handle case where outer field
3891 is inherited by enclosing class.
3892
3893 2005-06-12 Per Bothner <per@bothner.com>
3894
3895 * class.c (inherits_from_p): Do load_class if needed.
3896
3897 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3898
3899 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3900 * java-tree.h (parse_error_context): Move...
3901 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3902 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3903 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3904
3905 2005-06-08 Roger Sayle <roger@eyesopen.com>
3906
3907 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3908
3909 2005-06-06 Jakub Jelinek <jakub@redhat.com>
3910
3911 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3912 msgid for argument name.
3913 * gjavah.c (error): Likewise.
3914 * java-tree.h (parse_error_context): Likewise.
3915 * parse.y (parse_error_context, parse_warning_context,
3916 issue_warning_error_from_context): Likewise.
3917
3918 2005-06-01 Tom Tromey <tromey@redhat.com>
3919
3920 PR java/21722:
3921 * class.c (build_static_field_ref): Don't fold constant fields if
3922 current class is from a .class file and we're using indirect
3923 dispatch.
3924
3925 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3926
3927 * java/verify-glue.c: Don't include errors.h and include toplev.h.
3928 * java/Make-lang.in: Updates dependencies.
3929
3930 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
3931
3932 PR java/19870.
3933 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3934 NESTED_FIELD_ACCESS_IDENTIFIER_P.
3935 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3936 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3937 * jcf-write.c (generate_classfile): Use
3938 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3939 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3940 * parse.y (build_outer_field_access): Rename to
3941 build_nested_field_access. Support static fields and outer-to-inner
3942 class accesses.
3943 (outer_field_access_p): Rename to nested_field_access_p. Support
3944 static fields and generalise to outer-to-inner class and sibling
3945 inner class accesses.
3946 (outer_field_expanded_access_p): Rename to
3947 nested_field_expanded_access_p and support static fields.
3948 (outer_field_access_fix): Rename to nested_field_access_fix and
3949 support static fields.
3950 (build_outer_field_access_expr): Rename to
3951 build_nested_field_access_expr and support static fields.
3952 (build_outer_field_access_methods): Rename to
3953 build_nested_field_access_methods and support static fields. For
3954 static fields, generate accessors without class instance parameters.
3955 (build_outer_field_access_method): Rename to
3956 build_nested_field_access_method and support static fields.
3957 (build_outer_method_access_method): Use
3958 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3959 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3960 (resolve_expression_name): Consider static field accesses across
3961 nested classes.
3962 (resolve_qualified_expression_name): Likewise.
3963 (java_complete_lhs): Use nested_field_access_fix instead of
3964 outer_field_access_fix.
3965 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3966 Use nested_field_expanded_access_p instead of
3967 outer_field_expanded_access_p. Use nested_field_access_fix instead
3968 of outer_field_access_fix.
3969 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3970 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3971
3972 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
3973
3974 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
3975 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3976 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3977 MINOR_BINARYCOMPAT_ABI_VERSION): New.
3978 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3979 (parse_version): Calculate version ID using new method. Use bit-flags
3980 for flag_indirect_dispatch and flag_bootstrap_classes.
3981
3982 2005-05-25 Richard Henderson <rth@redhat.com>
3983
3984 PR libgcj/21692
3985 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3986 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3987 DECL_CONTEXT; avoid pushdecl_top_level.
3988 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
3989 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
3990 (layout_class_method): Likewise.
3991 * decl.c (java_mark_cni_decl_local): New.
3992 (java_mark_class_local): Use it.
3993 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
3994 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
3995 (struct lang_decl_func): Add local_cni;
3996 (struct lang_decl_var): Add class_field, vtable.
3997 (java_mangle_decl): Declare.
3998 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
3999 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
4000 (mangle_obstack_1): New.
4001 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
4002 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
4003 lhd_set_decl_assembler_name for things that don't need mangling.
4004 (mangle_class_field): Rename from java_mangle_class_field, make
4005 static, don't call init_mangling or finish_mangling.
4006 (mangle_vtable): Similarly.
4007 (mangle_local_cni_method_decl): New.
4008 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
4009 gcc_assert, and MANGLE_RAW_STRING.
4010 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
4011
4012 2005-05-25 DJ Delorie <dj@redhat.com>
4013
4014 * class.c (set_constant_value): Move warning control from if() to
4015 warning(OPT_*).
4016
4017 2005-05-24 Richard Henderson <rth@redhat.com>
4018
4019 * builtins.c (define_builtin): Don't call make_decl_rtl.
4020 * constants.c (build_constant_data_ref): Likewise.
4021 * class.c (build_utf8_ref): Likewise.
4022 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
4023 (get_dispatch_table, layout_class_method): Likewise.
4024 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
4025 by hand.
4026 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
4027 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
4028 to determine if we need a non-zero address.
4029 * decl.c (builtin_function): Don't call make_decl_rtl.
4030 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
4031 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
4032 * resource.c (compile_resource_data): Likewise.
4033 * parse.y (resolve_field_access): Re-word comment to avoid
4034 building DECL_RTL.
4035
4036 2005-05-24 Richard Henderson <rth@redhat.com>
4037
4038 * class.c (registered_class): Take it out of class_roots; turn into
4039 a vec of trees.
4040 (register_class): Make static. Don't duplicate decl node. Use
4041 VEC_safe_push.
4042 (emit_register_classes): Use VEC_iterate. Use output_constant
4043 instead of assemble_integer. Don't call mark_decl_referenced
4044 directly.
4045 * java-tree.h (register_class): Remove decl.
4046
4047 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
4048
4049 PR java/17845
4050
4051 * parse.y (register_package, package_list): Remove.
4052 (package_declaration): Do not call register_package.
4053 (do_resolve_class): Do not use package_list.
4054
4055 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
4056
4057 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
4058 unused variable.
4059
4060 2005-05-15 Tom Tromey <tromey@redhat.com>
4061
4062 PR java/21519:
4063 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
4064 NOTE_PUSH.
4065
4066 2005-05-12 Aaron Luchko <aluchko@redhat.com>
4067
4068 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
4069
4070 2005-05-11 Tom Tromey <tromey@redhat.com>
4071
4072 * gcj.texi (Code Generation): Document -fbootstrap-classes.
4073 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
4074 (parse_version): Use it.
4075 * lang.opt (-fbootstrap-classes): New option.
4076
4077 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
4078
4079 PR java/21436
4080 * class.c (maybe_layout_super_class): Look for imports in this_class.
4081 * parse.h (ctxp_for_generation_last): New.
4082 (do_resolve_class): Add a parameter.
4083 * parse.y (ctxp_for_generation_last): New.
4084 (java_pop_parser_context): Add at end of list.
4085 (find_in_imports, find_in_imports_on_demand): Look in ctxp
4086 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
4087 the given type are NULL.
4088 (do_resolve_class): Look into the imports of the new second parameter.
4089 Adjust recursive calls.
4090 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
4091 calls to do_resolve_class.
4092 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
4093 (java_complete_class): Do not do that here.
4094
4095 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
4096
4097 PR java/20309
4098 * Make-lang.in (java): Add gjnih.
4099 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
4100 (GJNIH_OBJS): New variable.
4101 (gjnih$(exeext)): New target.
4102 (JAVA_MANFILES): Add gjnih.1.
4103 (java.uninstall): Add gjnih.1.
4104 (java.mostlyclean): Add gjnih.
4105 (java.maintainer-clean): Add gjnih.1.
4106 (java/gjavah-jni.o): New target.
4107 (.INTERMEDIATE): Add gjnih.pod.
4108 (gjnih.pod): New target.
4109 * config-lang.in (stagestuff): Add gjnih.
4110 * gcj.texi (Top): Add gjnih node.
4111 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
4112 -bootclasspath options.
4113 (Invoking gjnih): New node.
4114 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
4115 (TOOLNAME): New macro.
4116 (error): Replace hard-coded gcjh with TOOLNAME.
4117 (process_file): Likewise.
4118 (usage): Likewise.
4119 (version): Likewise.
4120 (help): Likewise. Add help output for -force, -old, -trace and -J
4121 options.
4122 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
4123 (options): Add force, old, trace and J fields.
4124 (main): Handle -force, -old, -trace and -J options.
4125
4126 2005-05-03 Tom Tromey <tromey@redhat.com>
4127
4128 PR java/21245:
4129 * gjavah.c (main): Unlink output file on error.
4130
4131 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
4132
4133 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
4134 copyright.
4135
4136 2005-04-29 Tom Tromey <tromey@redhat.com>
4137
4138 * expr.c (build_jni_stub): Updated for change to build_block.
4139
4140 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
4141
4142 * expr.c (force_evaluation_order): Declare 'saved' earlier.
4143
4144 2005-04-28 Andrew Haley <aph@redhat.com>
4145
4146 PR java/19285
4147 * java-tree.h (soft_resolvepoolentry_node): New.
4148 (alloc_constant_fieldref): Declare.
4149 * expr.c (expand_java_field_op): Don't call class_init for
4150 accesses to static fields with indirect dispatch.
4151 * builtins.c (initialize_builtins): Add "__builtin_expect".
4152 * decl.c (soft_resolvepoolentry_node): New variable.
4153 (java_init_decl_processing): Create a decl for
4154 "_Jv_ResolvePoolEntry".
4155 * class.c (build_fieldref_cache_entry): New function.
4156 (build_static_field_ref): Rewrite for indirect dispatch.
4157 * constants.c (find_name_and_type_constant_tree): New function.
4158 (alloc_constant_fieldref): Likewise.
4159 (build_constants_constructor): Handle CONSTANT_Fieldref and
4160 CONSTANT_NameAndType.
4161
4162 PR java/21115
4163 * expr.c (force_evaluation_order): Convert outgoing args smaller
4164 than integer.
4165
4166 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
4167
4168 * gcj.texi (libgcj Runtime Properties): Remove obsolete
4169 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
4170 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
4171
4172 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4173
4174 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
4175 to `unlock_stream' with `unlock_std_streams'.
4176
4177 2005-04-25 Jakub Jelinek <jakub@redhat.com>
4178
4179 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
4180 instead of just expr.h.
4181
4182 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4183
4184 * gjavah.c (main): Unlock the stdio streams.
4185 * jcf-dump.c (main): Likewise.
4186 * jv-scan.c (main): Likewise.
4187 * jvgenmain.c (main): Likewise.
4188
4189 2005-04-23 DJ Delorie <dj@redhat.com>
4190
4191 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
4192 parse.y: Adjust warning() callers.
4193
4194 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
4195
4196 * gcj.texi (Object fields): Change "Integer" to "Int" in example
4197 contructor.
4198
4199 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
4200
4201 * gcj.texi: Fix typos and bogus example.
4202
4203 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
4204
4205 * except.c: Fix a comment typo.
4206
4207 2005-04-19 Julian Brown <julian@codesourcery.com>
4208
4209 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
4210 indirect dispatch with PIC.
4211
4212 2005-04-18 Andrew Haley <aph@redhat.com>
4213
4214 * java-except.h (struct eh_range.handler): Remove unused field.
4215 (handle_nested_ranges): Remove function declaration.
4216 (sanity_check_exception_range): Add function declaration.
4217 * verify.c (verify_jvm_instructions): Remove call to
4218 handle_nested_ranges.
4219 * verify-glue.c (verify_jvm_instructions_new): Call
4220 sanity_check_exception_range.
4221 * except.c (link_handler, eh_range_freelist, link_handler,
4222 handle_nested_ranges): Remove.
4223 (add_handler): Rewrite.
4224 (sanity_check_exception_range): New function.
4225 (print_ranges): New function.
4226
4227 2005-04-13 Julian Brown <julian@codesourcery.com>
4228
4229 * decl.c (finish_method): Give methods once-only linkage.
4230
4231 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
4232
4233 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
4234
4235 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4236
4237 * java-tree.h: Don't use PARAMS().
4238
4239 2005-04-07 Per Bothner <per@bothner.com>
4240
4241 * class.c (push_class): By default, suppress debug output.
4242 (finish_class): Enable debug output for classes we're emitting.
4243
4244 2005-04-07 Andrew Haley <aph@redhat.com>
4245
4246 * gcj.texi: Correct gcj-dbtool instructions.
4247
4248 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
4249
4250 * gcj.texi: Fix a typo.
4251 * lang.c: Fix a comment typo.
4252
4253 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
4254
4255 * gcj.texi (Invoking gij): Add descriptions of new -X options.
4256 Mention recognized-and-ignored compatibility options.
4257 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
4258 JvFree.
4259 (About CNI): Add Memory allocation section.
4260
4261 2005-04-01 Tom Tromey <tromey@redhat.com>
4262
4263 * decl.c (java_init_decl_processing): Fix types of
4264 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
4265 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
4266 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
4267
4268 2005-03-31 Jan Hubicka <jh@suse.cz>
4269
4270 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
4271 * class.c: Include cgraph.h
4272 (make_local_functoin_alias): Mark aslias as needed.
4273 * resource.c: Include cgraph.h
4274 (compile_resource_data): Go via cgraph interface.
4275
4276 2005-03-30 Ian Lance Taylor <ian@airs.com>
4277
4278 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
4279
4280 2005-03-30 Tom Tromey <tromey@redhat.com>
4281
4282 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
4283 inner_class_info_index==0 or outer_class_info_index==0.
4284
4285 2005-03-29 Tom Tromey <tromey@redhat.com>
4286
4287 * gcj.texi (libgcj Runtime Properties): Document
4288 gnu.gcj.runtime.endorsed.dirs.
4289
4290 2005-03-24 Anthony Green <green@redhat.com>
4291
4292 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
4293 'gcj-dbtool -p'.
4294
4295 2005-03-23 Tom Tromey <tromey@redhat.com>
4296
4297 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
4298 (parse_version): Use it.
4299
4300 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
4301
4302 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
4303
4304 2005-03-18 Andrew Haley <aph@redhat.com>
4305
4306 PR java/20522
4307 * decl.c (update_aliases): Don't update variables that are about
4308 to die.
4309 (maybe_poplevels): Add comment.
4310
4311 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
4312
4313 PR java/20502
4314 * jcf-parse.c (duplicate_class_warning): New function.
4315 (java_parse_file): Call duplicate_class_warning if
4316 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
4317 (parse_zip_file_entries): Likewise. Also set
4318 CLASS_FROM_CURRENTLY_COMPILED_P.
4319
4320 2005-03-16 Andrew Haley <aph@redhat.com>
4321
4322 * expr.c (expand_java_arrayload): Don't generate a
4323 NullPointerException based on the type of the node.
4324 (build_java_array_length_access): Likewise.
4325
4326 2005-03-15 Zack Weinberg <zack@codesourcery.com>
4327
4328 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
4329
4330 2005-03-11 Tom Tromey <tromey@redhat.com>
4331
4332 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
4333 (libgcj Runtime Properties): Document the default .db.
4334
4335 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
4336
4337 PR java/20312
4338 * parse.y (checks_throws_clauses): Check exceptions list even when
4339 the base class does not come from a source file being compiled.
4340 (java_complete_lhs): Remove unused variable 'wfl'.
4341
4342 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
4343
4344 PR java/20338
4345 * decl.c (finish_method): Emit _Jv_InitClass for private static
4346 methods inside inner classes as well.
4347
4348 2005-03-08 Julian Brown <julian@codesourcery.com>
4349 * Revert patch from 2005-03-08 for causing bootstrap failure on
4350 ppc-darwin.
4351
4352 2005-03-08 Julian Brown <julian@codesourcery.com>
4353
4354 * decl.c (finish_method): Give methods once-only linkage.
4355
4356 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
4357
4358 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
4359
4360 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
4361
4362 * verify-glue.c (vfy_is_assignable_from): Perform static check using
4363 can_widen_reference_to if the C++ ABI is in use.
4364 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
4365 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
4366 type_isresolved, init_state, set_pc, state_get_pc,
4367 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
4368 (verify_fail): Report the current PC from the verifier context.
4369 (free_state): Remove #if 0 block to enable this function.
4370 (free_verifier_context): Call free_state on state_list iterator
4371 values before freeing them.
4372 * expr.c (pop_type_0): Pop correct type for error message when stack
4373 contains a multi-word type.
4374
4375 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
4376
4377 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
4378 for known NULL array length access.
4379
4380 2005-03-07 Tom Tromey <tromey@redhat.com>
4381
4382 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
4383
4384 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
4385
4386 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
4387 typeck.c: Update copyright.
4388
4389 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
4390
4391 Remove xref code.
4392 * xref.c, xref.h: Remove file.
4393 * Make-lang.in (java/xref.o): Remove.
4394 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
4395 * lang.c (flag_emit_xref): Remove definition.
4396 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
4397 * typeck.c (convert): Remove use of do_not_fold.
4398 * parse.y (do_not_fold): Remove definition.
4399 (parser grammar): Remove xref code.
4400 (maybe_create_class_interface_decl, create_class): Likewise.
4401 (register_fields, method_header, finish_method_declaration): Likewise.
4402 (declare_local_variables, source_end_java_method): Likewise.
4403 (java_complete_expand_classes): Do not set do_not_fold.
4404 (java_complete_expand_method): Remove xref code.
4405 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
4406 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
4407 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
4408 (patch_synchronized_statement, patch_throw_statement): Likewise.
4409 (maybe_build_class_init_for_field): Likewise.
4410
4411 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
4412
4413 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
4414 instead of IS_NON_TYPE_CODE_CLASS.
4415
4416 2005-03-04 Andrew Haley <aph@redhat.com>
4417
4418 PR java/18362
4419 * class.c (set_method_index): Don't set method_index if it is
4420 NULL_TREE.
4421 (layout_class_method): Don't complain about "non-static method foo
4422 overrides static method" in the case of indirect dispatch.
4423
4424 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4425
4426 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
4427 warning.
4428 * Make-lang.in: Don't elide warnings in jcf-io.c.
4429
4430 2005-03-01 Per Bothner <per@bothner.com>
4431
4432 PR java/8608
4433 * check-init.c (wfl): Remove static.
4434 (final_assign_error, check_init): Replace calls to parse_error_context
4435 by plain error.
4436 (check_init): Save, set, and restore input_location for each exp.
4437
4438 2005-03-01 Per Bothner <per@bothner.com>
4439
4440 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
4441 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
4442 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
4443
4444 2005-03-01 Per Bothner <per@bothner.com>
4445
4446 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
4447
4448 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
4449
4450 PR libgcj/16923
4451 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
4452 JvVMOption.
4453
4454 2005-02-22 Tom Tromey <tromey@redhat.com>
4455
4456 PR java/20056:
4457 * verify-impl.c (EITHER): New define.
4458 (types_compatible): Handle it.
4459 (check_field_constant): Use it.
4460
4461 2005-02-18 Tom Tromey <tromey@redhat.com>
4462
4463 PR java/20056:
4464 * verify-impl.c (types_equal): Fixed test.
4465
4466 PR java/20056:
4467 * verify-glue.c (vfy_class_has_field): New function.
4468 * verify.h (vfy_class_has_field): Declare.
4469 * verify-impl.c (check_field_constant): Added 'putfield'
4470 argument.
4471 (verify_instructions_0): Updated.
4472 (types_equal): New function.
4473
4474 2005-02-14 Tom Tromey <tromey@redhat.com>
4475
4476 PR java/19921:
4477 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
4478 stack effect of multianewarray.
4479
4480 2005-02-14 Andrew Haley <aph@redhat.com>
4481
4482 PR java/19907
4483 * expr.c (expand_byte_code): Call promote_arguments().
4484 (promote_arguments): New function.
4485 * decl.c (check_local_unnamed_variable): Remove special case for
4486 new verifier.
4487 (find_local_variable): Promote all boolean types to int
4488 when searching for local variable decls.
4489
4490 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
4491
4492 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
4493 parse-scan.y: Update copyright.
4494
4495 2005-02-11 Per Bothner <per@bothner.com>
4496
4497 PR java/15543
4498 * parse-scan.y (input_location): Remove variable.
4499 (main_input_filename): New - replaces input_filename, which isn't
4500 settable if USE_MAPPED_LOCATION.
4501 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
4502 so we don't reference input_location or wfl_operator in that case.
4503 * jv-scan.c (expand_location): Remove - no longer used.
4504 (main): Set main_input_filename rather than input_filename.
4505
4506 2005-02-09 Richard Henderson <rth@redhat.com>
4507
4508 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
4509 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
4510
4511 2005-02-08 Marcin Dalecki <martin@dalecki.de>
4512
4513 * expr.c (add_type_assertion): Use the proper enumeration type,
4514 since this is what htab_find_slot() is expecting.
4515
4516 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
4517
4518 * gcj.texi: Update copyright dates.
4519
4520 2005-02-02 Tom Tromey <tromey@redhat.com>
4521
4522 * gcj.texi (libgcj Runtime Properties): Default library_control
4523 to 'cache'.
4524
4525 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
4526
4527 PR java/15543
4528 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
4529 (modifiers) when square brackets are present in a declaration for
4530 a final paramter.
4531 * jv-scan.c (main): Set input_filename and input_line.
4532
4533 2005-02-01 Tom Tromey <tromey@redhat.com>
4534
4535 PR java/19742:
4536 * gjavah.c (get_field_name): Don't override name for JNI header.
4537
4538 2005-02-01 Roger Sayle <roger@eyesopen.com>
4539
4540 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
4541 of unsigned types using iushr and lushr JVM bytecodes.
4542
4543 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
4544
4545 PR java/19738
4546 * gjavah.c (jni_print_float): Do not emit floating-point
4547 initialiser for a static final field.
4548 (jni_print_double): Likewise.
4549
4550 2005-02-01 Mark Mitchell <mark@codesourcery.com>
4551
4552 Revert:
4553 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4554 * gjavah.c (print_field_info): Mark static data members of
4555 floating-point type with "__extension__".
4556
4557 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4558
4559 * gjavah.c (print_field_info): Mark static data members of
4560 floating-point type with "__extension__".
4561
4562 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
4563
4564 PR java/9157
4565 * parse.y (build_string_concatenation): Remove redundant if.
4566 (patch_conditional_expr): Attempt to patch_string() the condition
4567 of a ?: as well, in addition to its other operands.
4568
4569 2005-01-25 Tom Tromey <tromey@redhat.com>
4570
4571 * Make-lang.in (java/java-tree-inline.o): Removed.
4572
4573 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
4574
4575 PR java/19070
4576 * parse.y (patch_binop): Allow comparisons against NULL only
4577 if the other operand is of a reference type.
4578
4579 2005-01-24 Tom Tromey <tromey@redhat.com>
4580
4581 * java-tree.h (gcj_abi_version): Declare.
4582 * class.c (make_class_data): Push gcj_abi_version into "next"
4583 field. Renamed field.
4584 * decl.c (gcj_abi_version): New global.
4585 (parse_version): New function.
4586 (java_init_decl_processing): Call it. Renamed 'next' field.
4587 Include version.h.
4588 (GCJ_BINARYCOMPAT_ADDITION): New define.
4589
4590 2005-01-24 Roger Sayle <roger@eyesopen.com>
4591
4592 PR java/19295
4593 * jcf-write.c (generate_bytecode_insns): Conversions between
4594 integer types of the same precision shouldn't generate widening
4595 or narrowing conversion bytecodes.
4596
4597 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
4598
4599 * java-except.h, java-tree.h: Remove unused prototypes.
4600
4601 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
4602
4603 PR java/18091:
4604 * jcf-write.c (perform_relocations): Don't call memcpy if source
4605 and destination are the same.
4606
4607 2005-01-17 Tom Tromey <tromey@redhat.com>
4608
4609 * verify-impl.c (get_short): Sign extend.
4610 (get_int): Likewise.
4611
4612 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
4613
4614 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4615 with TYPE_SIZE.
4616
4617 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4618
4619 * verify.c: Revert to the version before the BC-ABI merge.
4620
4621 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4622
4623 PR java/19277
4624 * check-init.c (check_init): Take care of references that do not
4625 have an explicit final variable declaration (e.g. array length
4626 access) for pre/post in/de-crement operators.
4627
4628 2005-01-08 Mark Wielaard <mark@klomp.org>
4629
4630 * parse.y (process_imports): Allocate (and free) original_name only
4631 when not already defined.
4632 * jcf-parse.c (read_class): Free results of find_class() and
4633 lrealpath().
4634 (java_parse_file): Keep pointer to head of file_list and free when
4635 done. Free result of lrealpath().
4636
4637 2005-01-05 Tom Tromey <tromey@redhat.com>
4638
4639 * gcj.texi (Standard Properties): java.ext.dirs is now used.
4640
4641 2004-12-20 Andrew Haley <aph@redhat.com>
4642
4643 * typeck.c: Use fold_convert for ints and booleans.
4644
4645 2004-12-17 Andrew Haley <aph@redhat.com>
4646
4647 PR java/18931
4648 * typeck.c (convert): Use a CONVERT_EXPR when converting to
4649 BOOLEAN_TYPE or CHAR_TYPE.
4650 (convert_to_boolean, convert_to_char) : Remove.
4651 * convert.h (convert_to_boolean, convert_to_char) : Remove.
4652 * expr.c (expand_load_internal): Do type conversion if type is not
4653 as required.
4654
4655 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
4656
4657 PR target/18459
4658 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4659 Update comment.
4660
4661 2004-12-07 Andrew Haley <aph@redhat.com>
4662
4663 PR java/18811:
4664 * jcf-parse.c (load_class): Remove sanity test for missing inner
4665 class file.
4666
4667 2004-12-06 Tom Tromey <tromey@redhat.com>
4668
4669 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4670 (java.uninstall): Likewise.
4671 (java.maintainer-clean): Likewise.
4672 (.INTERMEDIATE): Likewise.
4673 (java.install-man): Likewise.
4674 (gcj-dbtool.pod): New target.
4675 * gcj.texi (Code Generation): Document -findirect-dispatch.
4676 (libgcj Runtime Properties): Document
4677 gnu.gcj.precompiled.db.path.
4678 (Top): Link to "Invoking gcj-dbtool".
4679
4680 2004-12-06 Tom Tromey <tromey@redhat.com>
4681
4682 PR java/14853:
4683 * java-tree.h (extract_field_decl): Declare.
4684 * parse.y (extract_field_decl): Renamed from
4685 strip_out_static_field_access_decl. No longer static.
4686 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4687
4688 2004-12-03 Tom Tromey <tromey@redhat.com>
4689
4690 * lang.c (flag_new_verifier): Define.
4691 (java_post_options): Set flag_new_verifier if indirect dispatch
4692 is being used.
4693 * lang.opt (fnew-verifier): Removed.
4694
4695 2004-12-03 Tom Tromey <tromey@redhat.com>
4696
4697 PR bootstrap/14614:
4698 * Make-lang.in (java.install-common): Only install transformed
4699 gcjh if gcj-cross exists.
4700
4701 2004-12-03 Andrew Haley <aph@redhat.com>
4702
4703 PR java/18812
4704 * except.c (link_handler): Patch 'outer' field of siblings of the
4705 range we're demoting.
4706
4707 2004-12-03 Andrew Haley <aph@redhat.com>
4708
4709 PR java/18697
4710 * class.c (layout_class_method): Don't fail to override a method
4711 simply because it has DECL_ARTIFICIAL set.
4712
4713 2004-12-02 Tom Tromey <tromey@redhat.com>
4714
4715 PR java/16675:
4716 * parse.y (craft_constructor): Special case null_pointer_node.
4717
4718 2004-12-02 Tom Tromey <tromey@redhat.com>
4719
4720 PR java/18741:
4721 * java-gimplify.c (java_gimplify_expr): Don't call
4722 SET_EXPR_LOCATION unless wrapped tree is an expression.
4723
4724 2004-11-27 Per Bothner <per@bothner.com>
4725
4726 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
4727 Fix fencepost error in 'i', which got executed one too many times.
4728 Also, fold memcpy into explicit loop, as originally intended.
4729 Also, free temporary 'buf' which otherwise leaks.
4730
4731 2004-11-27 Per Bothner <per@bothner.com>
4732
4733 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4734 local static variables if not USE_MAPPED_LOCATION.
4735
4736 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
4737
4738 * class.c, decl.c, expr.c: Fix comment typos.
4739
4740 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
4741
4742 PR java/18305
4743 * decl.c (end_java_method): Call
4744 attach_init_test_initialization_flags on all the init_decls.
4745 * parse.y (attach_init_test_initialization_flags): Move to ...
4746 * expr.c (attach_init_test_initialization_flags): here and
4747 support BIND_EXPR also.
4748 * java-tree.h (attach_init_test_initialization_flags): Prototype.
4749 * jcf-parse.c (parse_class_file): Don't disable class init
4750 optimization.
4751
4752 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
4753
4754 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4755 in diagnostics.
4756
4757 2004-11-24 Richard Henderson <rth@redhat.com>
4758
4759 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4760 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4761
4762 2004-11-24 Tom Tromey <tromey@redhat.com>
4763
4764 * verify.c (defer_merging): Don't use C++-style comment.
4765 * verify.h (java_opcode): Added java_opcode_end.
4766 * class.c (build_class_ref): Remove C++ comment and old FIXME.
4767
4768 * verify-impl.c (vfy_push_type): Removed bogus "return".
4769 (initialize_stack): Use vfy_alloc and vfy_free.
4770 (verify_instructions_0): Likewise.
4771
4772 * Merged gcj-abi-2-dev-branch to trunk.
4773
4774 2004-11-24 Andrew Haley <aph@redhat.com>
4775
4776 * jcf-parse.c (parse_class_file): Set file_start_location.
4777
4778 2004-11-10 Tom Tromey <tromey@redhat.com>
4779
4780 * class.c (make_field_value): Don't call build_static_field_ref.
4781 (build_static_field_ref): Don't emit direct references when using
4782 indirect dispatch.
4783
4784 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
4785 -verbose:class into man page synopsis.
4786
4787 2004-11-09 Tom Tromey <tromey@redhat.com>
4788
4789 * expr.c (build_java_arraystore_check): Still generate check if
4790 element type is itself an array.
4791
4792 2004-11-08 Tom Tromey <tromey@redhat.com>
4793
4794 * java-tree.h (soft_check_assignment_node): Removed.
4795 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4796 * decl.c (java_init_decl_processing): Don't initialize
4797 soft_check_assignment_node.
4798
4799 2004-11-05 Tom Tromey <tromey@redhat.com>
4800
4801 * class.c (layout_class_methods): Don't add Miranda methods when
4802 using indirect dispatch.
4803
4804 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
4805
4806 * class.c (make_class_data): Call emit_assertion_table to set the
4807 'assertion_table' field.
4808 (build_signature_for_libgcj): Move here from expr.c.
4809 (add_assertion_table_entry): New function. Callback for assertion
4810 hashtable traversal.
4811 (emit_assertion_table): New. Take class argument, and generate
4812 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4813 * decl.c (init_decl_processing): Define assertion_entry_type record.
4814 Push 'assertion_table' class field instead of 'verify'.
4815 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4816 (type_assertion_hash): Include 'assertion_code' in hash.
4817 (add_type_assertion): Rewritten. Take class and assertion_code
4818 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4819 (can_widen_reference_to): Use new add_type_assertion() arguments.
4820 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4821 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4822 (verify_identifier_node): Removed.
4823 (assertion_entry_type, assertion_table_type): New.
4824 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4825 assertion code definitions.
4826 (struct type_assertion): Add assertion_code. Rename 'source_type' and
4827 'target_type' to 'op1' and 'op2'.
4828 (add_type_assertion): Declare.
4829 (lang_printable_name_wls): Remove unused definition.
4830 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4831 to emit runtime assertion.
4832 (vfy_note_stack_type): Clean up non-C90 declarations.
4833 (vfy_note_local_type): Likewise.
4834 * verify.h (vfy_is_assignable_from): Declare.
4835 * verify-impl.c (is_assignable_from_slow): Remove unused function.
4836 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4837 instead of is_assignable_from_slow().
4838 (types_compatible): Reinstate ref_compatible() call.
4839
4840 2004-11-04 Tom Tromey <tromey@redhat.com>
4841
4842 * class.c (build_static_field_ref): Reverted previous patch.
4843
4844 * class.c (build_static_field_ref): Don't emit direct references
4845 when using indirect dispatch.
4846
4847 2004-11-03 Tom Tromey <tromey@redhat.com>
4848
4849 * expr.c (expand_java_arrayload): Set lhs_type_node.
4850 (expand_java_arraystore): Set rhs_type_node.
4851
4852 2004-11-02 Tom Tromey <tromey@redhat.com>
4853
4854 * jcf-parse.c (compute_class_name): Use filename length from zip
4855 directory, not strlen.
4856
4857 * expr.c (expand_invoke): Mark new interface methods as abstract.
4858
4859 2004-11-01 Tom Tromey <tromey@redhat.com>
4860
4861 * verify-impl.c (push_jump): Removed check for uninitialized
4862 objects.
4863 (push_exception_jump): Likewise.
4864 (handle_ret_insn): Likewise.
4865 (handle_jsr_insn): Likewise.
4866 (state_check_no_uninitialized_objects): Removed.
4867
4868 * decl.c (check_local_unnamed_variable): Recognize
4869 promoted-to-int parameters when using the new verifier.
4870 * expr.c (expand_java_arraystore): Explicitly request array type
4871 when using new verifier.
4872 (expand_java_arrayload): Likewise.
4873 (invoke_build_dtable): Don't pass object_type_node as
4874 expression argument to build_java_indirect_ref.
4875 (build_java_check_indexed_type): Do nothing.
4876 (build_java_arraystore_check): Handle case where array doesn't
4877 have array type.
4878 (build_java_array_length_access): Likewise.
4879 (expand_invoke): Handle case where interface overrides a method
4880 from Object.
4881 (pop_type_0): Always succeed for reference types.
4882 (process_jvm_instruction): Don't pop a value in a dead
4883 exception handler.
4884 (pop_arguments): Convert arguments to correct types.
4885
4886 2004-10-29 Andrew Haley <aph@redhat.com>
4887
4888 * jcf-parse.c (give_name_to_class): Remove line that was
4889 incorrectly merged.
4890
4891 2004-10-29 Andrew Haley <aph@redhat.com>
4892
4893 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4894
4895 2004-10-20 Andrew Haley <aph@redhat.com>
4896
4897 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4898
4899 2004-10-26 Tom Tromey <tromey@redhat.com>
4900
4901 * verify.h (vfy_notify_verified): Removed.
4902 * verify-glue.c (vfy_notify_verified): Removed.
4903
4904 2004-10-26 Tom Tromey <tromey@redhat.com>
4905
4906 * verify-impl.c (debug_print_state): Declare `i' before code.
4907 (merge_types): Modify `t' when it is null_type.
4908
4909 2004-10-26 Tom Tromey <tromey@redhat.com>
4910
4911 * verify-impl.c (type_print): Renamed from print. Now static and
4912 takes an argument.
4913 (debug_print_state): Use type_print.
4914
4915 2004-10-25 Tom Tromey <tromey@redhat.com>
4916
4917 * expr.c (build_invokeinterface): Compute correct offset for
4918 index into interface methods.
4919
4920 2004-10-20 Tom Tromey <tromey@redhat.com>
4921
4922 * java-tree.h (verify_jvm_instructions_new): Declare.
4923
4924 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4925 command line.
4926
4927 * verify-impl.c (verify_instructions): Correctly handle wide
4928 types on the stack.
4929 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4930 (vfy_get_component_type): Strip pointer types.
4931 (vfy_find_class): Use get_type_from_signature. Strip pointer
4932 types.
4933 Include java-except.h.
4934
4935 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
4936
4937 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
4938 vfy_push_type_t, set_variable, add_new_state, merge_into,
4939 handle_jsr_insn, branch_prepass, check_class_constant,
4940 check_wide_constant, get_one_type, compute_static_types,
4941 verify_instructions_0): Clean up C99 declarations after statements.
4942
4943 2004-10-20 Tom Tromey <tromey@redhat.com>
4944
4945 * verify-impl.c (merge_refs): Compare reference against iterator,
4946 not ref2.
4947
4948 * verify-glue.c (vfy_tag): Mask off resolved flag.
4949
4950 2004-10-19 Tom Tromey <tromey@redhat.com>
4951
4952 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4953 (init_state_with_stack): Initialize `this_type' in state.
4954 (verify_method): Use debug_print.
4955 * verify-glue.c (vfy_is_primitive): Removed debugging print.
4956 (vfy_note_stack_depth): Reverted last patch.
4957 (vfy_note_stack_type): Note pointer to Object, not Object.
4958 (vfy_note_local_type): Likewise.
4959
4960 * verify.h (vfy_note_instruction_seen): Declare.
4961 * verify-glue.c (verify_jvm_instructions_new): Set
4962 BCODE_EXCEPTION_TARGET on target instruction.
4963 (vfy_note_instruction_seen): New function.
4964 * verify-impl.c (FLAG_INSN_SEEN): New define.
4965 (verify_instructions_0): Set flag on instruction. Save state for
4966 PC=0 later.
4967 (verify_instructions): Call vfy_note_instruction_seen.
4968
4969 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4970 (verify_jvm_instructions_new): Call method_init_exceptions,
4971 add_handler, and handle_nested_ranges.
4972 * verify-impl.c (verify_method): Return 1 on success.
4973 (verify_instructions_0): Save the state at PC=0.
4974
4975 * verify-impl.c (init_type_from_class): Set is_resolved and
4976 ref_next on new ref_intersection.
4977 (init_type_from_string): Likewise.
4978
4979 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
4980
4981 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4982 if flag_new_verifier is set.
4983 * java-tree.h (flag_new_verifier): Declare.
4984 * lang.opt (fnew-verifier): New option.
4985 * verify-impl.c: Work around namespace pollution by undef'ing
4986 'current_class'.
4987 (struct verifier_context): Make 'bytecode' const.
4988 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
4989 (types_compatible): For the BC-ABI, always consider reference types
4990 compatible.
4991 (check_class_constant): Use vfr->current_class.
4992 (check_constant): Likewise.
4993 (check_wide_constant): Likewise.
4994 (check_field_constant): Check for 'L' at start of type name.
4995 (get_one_type): Return pointer instead of type. Set type result in
4996 caller via passed type pointer.
4997 (compute_argument_types): Update to use new get_one_type arguments.
4998 (compute_return_type): Likewise.
4999 (make_verifier_context): New. Allocate and initialize 'vfr'.
5000 (free_verifier_context): New. Free 'vfr' and its contents.
5001 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
5002 and free_verifier_context.
5003
5004 2004-10-15 Tom Tromey <tromey@redhat.com>
5005
5006 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
5007 * verify.h (vfy_fail): Fixed formatting.
5008
5009 * verify-impl.c (vfr): Fixed comment formatting.
5010 (collapse_type): New function.
5011 (verify_instructions): Notify compiler about type map.
5012 * verify.h (vfy_note_stack_depth): Updated.
5013 (vfy_note_stack_type): Likewise.
5014 (vfy_note_local_type): Likewise.
5015 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
5016 Declare.
5017 * verify-glue.c (vfy_note_stack_depth): Correctly size type
5018 state. Added `method' argument.
5019 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
5020 argument.
5021 (vfy_note_local_type): New function.
5022 (vfy_unsuitable_type): Likewise.
5023 (vfy_return_address_type): Likewise.
5024 (vfy_null_type): Likewise.
5025
5026 * verify.h (VFY_IN_GCC): Removed.
5027 (VFY_WANT_TYPEMAP): Removed.
5028 * verify-impl.c (verify_instructions_0): Removed useless "\".
5029 (struct state) <next>: Uncomment.
5030
5031 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
5032
5033 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
5034 C-style.
5035
5036 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
5037
5038 * Make-lang.in (verify.o): Re-enabled this target.
5039 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
5040 (vfy_get_interface): Likewise.
5041 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
5042 * verify.h (verify_jvm_instructions_new): Declare.
5043 * verify-impl.c (free_state): Temporarily comment out unused
5044 function.
5045
5046 2004-10-06 Tom Tromey <tromey@redhat.com>
5047
5048 * java-tree.h (JV_STATE_READ): New enum value.
5049
5050 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
5051
5052 * verify.h: New file.
5053
5054 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
5055
5056 * verify-impl.c, verify-glue.c, verify.h: New files.
5057 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
5058
5059 2004-09-24 Andrew Haley <aph@redhat.com>
5060
5061 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
5062 for a slot if it's of pointer type.
5063
5064 2004-09-14 Tom Tromey <tromey@redhat.com>
5065
5066 * class.c (make_class_data): Correctly initialize "state" field.
5067 Initialize "engine" field.
5068 * decl.c (java_init_decl_processing): Add "engine" field.
5069
5070 2004-09-10 Andrew Haley <aph@redhat.com>
5071
5072 PR java/12760
5073 * expr.c (build_invokeinterface): Use fast method for interface
5074 dispatch.
5075 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
5076 JTI_ITABLE_PTR_TYPE.
5077 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
5078 (emit_symbol_table): Add new arg, element_size.
5079 * decl.c (java_init_decl_processing): Initialize Class.itable.
5080 * class.c (GEN_TABLE): New macro.
5081 (gen_indirect_dispatch_tables): Use it. Add itable.
5082 (make_class_data): Add new arg for emit_symbol_table().
5083 Emit itable.
5084 (add_miranda_methods): Make sure search_class has been parsed.
5085 (emit_symbol_table): Add new arg, element_size.
5086
5087 2004-09-06 Andrew Haley <aph@redhat.com>
5088
5089 * verify.c (merge_types): Return Object for all merges of
5090 interfaces.
5091 * expr.c (add_type_assertion): Don't generate assertions when
5092 source type is array of Object.
5093
5094 2004-09-03 Andrew Haley <aph@redhat.com>
5095
5096 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
5097
5098 * lang.c (java_post_options): Force flag_verify_invocations if
5099 we're not using indirect dispatch.
5100
5101 * expr.c (pop_type_0): Move test for interfaces before call to
5102 can_widen_reference_to().
5103 (build_signature_for_libgcj): Remove generation of canonical array
5104 type.
5105 (add_type_assertion): Canonicalize both arrays.
5106 Don't assert that type X can be assigned to Object.
5107 Don't assert that type X an be assigned to type X.
5108 Don't assert that Object can be assigned to type X.
5109 (can_widen_reference_to): Warn whenever we generate an assertion.
5110 (process_jvm_instruction): Use throwable_type_node for the type of
5111 an exception class.
5112
5113 2004-09-01 Andrew Haley <aph@redhat.com>
5114
5115 * decl.c (java_init_decl_processing): Change
5116 verify_identifier_node to "__verify".
5117 * expr.c (add_type_assertion): Use verify_identifier_node for name.
5118 * java-tree.h (verify_identifier_node): Change to "__verify".
5119
5120 * expr.c (build_signature_for_libgcj): New function.
5121 (add_type_assertion): Use it to construct signatures for
5122 source_type and target_type.
5123
5124 2004-08-27 Andrew Haley <aph@redhat.com>
5125
5126 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
5127 (verify_identifier_node): New.
5128 (TYPE_VERIFY_METHOD): New.
5129 (struct type_assertion): New type.
5130 * expr.c (type_assertion_eq): New function.
5131 (type_assertion_hash): New function.
5132 (add_type_assertion): New function.
5133 (can_widen_reference_to): Call add_type_assertion().
5134 * decl.c (java_init_decl_processing): Add verify_identifier_node.
5135 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
5136 (finish_class): Output TYPE_VERIFY_METHOD (type).
5137
5138 * decl.c (end_java_method): Nullify unused fields.
5139
5140 2004-08-17 Andrew Haley <aph@redhat.com>
5141
5142 * verify.c (defer_merging): Quieten.
5143 * jcf-parse.c (load_class): Only try to open a class file if it's
5144 java.lang.Object or if it's part of the current compilation.
5145 Check that the class we just tried to load is the class we just
5146 loaded. Quieten.
5147 (java_parse_file): Set flag_verify_invocations off if we're
5148 compiling from .class.
5149 (parse_zip_file_entries): Abort if we try to read a dummy class.
5150 * expr.c (can_widen_reference_to): Quieten.
5151 (build_invokevirtual): Abort if we try to invokevirtual an
5152 interface.
5153 (expand_invoke): Don't build a non-interface call to an interface.
5154 (build_instanceof): Don't do premature optimization if
5155 flag_verify_invocations is not set.
5156 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
5157 from superclass.
5158 (build_static_field_ref): Add correct type conversion for
5159 field_address.
5160 (add_miranda_methods): Disable generation of Miranda methods for
5161 dummy classes.
5162 (layout_class_method): Don't complain about non-static method
5163 overrides static method with dummy classes.
5164
5165 2004-08-13 Tom Tromey <tromey@redhat.com>
5166
5167 * class.c (build_static_field_ref): Re-enable atable lookups for
5168 static fields.
5169
5170 * parse.y (strip_out_static_field_access_decl): Indentation fix.
5171
5172 2004-08-11 Tom Tromey <tromey@redhat.com>
5173
5174 * gcj.texi (libgcj Runtime Properties): Document new properties.
5175
5176 2004-08-06 Andrew Haley <aph@redhat.com>
5177
5178 * jcf-parse.c (load_class): Check that we really have loaded the
5179 class we're looking for.
5180
5181 2004-07-19 Andrew Haley <aph@redhat.com>
5182
5183 * verify.c (verify_jvm_instructions): Comment change only.
5184
5185 * typeck.c (build_java_array_type): Add size field to array name.
5186
5187 * java-tree.h (LOCAL_SLOT_P): New.
5188 (update_aliases): Add PC argument.
5189 (pushdecl_function_level): New function.
5190
5191 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5192 MODIFY_EXPR, and SAVE_EXPR.
5193 (java_gimplify_modify_expr): New function.
5194
5195 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5196 (expand_iinc): Pass PC to update_aliases().
5197 (STORE_INTERNAL): Likewise.
5198 (process_jvm_instruction): Likewise.
5199
5200 * decl.c (base_decl_map): New variable.
5201 (uniq): New variable.
5202 (update_aliases): Rewrite with more thorough checking.
5203 (debug_variable_p): New function.
5204 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
5205 (check_local_named_variable): Delete whole function.
5206 (initialize_local_variable): New function.
5207 (check_local_unnamed_variable): Add checks and comments.
5208 (find_local_variable): Rewrite.
5209 (java_replace_reference): New function.
5210 (function_binding_level): New variable.
5211 (pushdecl_function_level): New function.
5212 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5213 (maybe_pushlevels): Call pushdecl() on each of the new decls.
5214 (start_java_method): Reset uniq. Create base_decl_map. Set
5215 function_binding_level.
5216 (end_java_method): Null unused fields to save memory.
5217
5218 2004-06-29 Andrew Haley <aph@redhat.com>
5219
5220 * except.c (expand_start_java_handler): Push a new binding level.
5221 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
5222 register_exception_range() to register where we'll do it.
5223 (expand_end_java_handler): Remove old bogus code. Replace with
5224 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5225 the top of the expression we're curently building.
5226 (maybe_end_try): Delete.
5227 * decl.c (binding_level.exception_range): New field.
5228 (clear_binding_level): Add field exception_range. Reformat.
5229 (poplevel): Call expand_end_java_handler().
5230 (poplevel): Call java_add_stmt only if functionbody is false.
5231 (maybe_poplevels): Don't call maybe_end_try() from here.
5232 (end_java_method): Clear no longer used trees in function decl.
5233 (register_exception_range): New function.
5234 * java-tree.h (register_exception_range, struct eh_range): Declare.
5235
5236 2004-06-22 Andrew Haley <aph@redhat.com>
5237
5238 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
5239 the otable.
5240 * check-init.c (get_variable_decl): Teach check-init about
5241 FIELD_DECLs addressed via the otable.
5242 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
5243 CLASS_PARSED_P.
5244
5245 2004-05-28 Andrew Haley <aph@redhat.com>
5246
5247 * jcf-parse.c (load_class): Don't try to read a class that we've
5248 already read.
5249
5250 * expr.c (build_invokeinterface): Use the old-fashioned way of
5251 doing indirect dispatch: look up interfaces by name.
5252 * java-tree.h (enum java_tree_index): Add
5253 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
5254 * decl.c (java_init_decl_processing): Add
5255 soft_lookupinterfacemethodbyname_node.
5256
5257 * gjavah.c (print_method_info): Final methods have vtable entries,
5258 so gjavah needs to output them.
5259 * class.c (layout_class_method): Generate vtable entries for final
5260 methods.
5261 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
5262 dispatch, even if a method is final.
5263
5264 2004-05-25 Andrew Haley <aph@redhat.com>
5265
5266 * class.c (build_symbol_entry): Convert the names of constructors
5267 to init_identifier_node when generating an entry for the indirect
5268 dispatch table.
5269
5270 * expr.c (build_known_method_ref): Generate indirect calls for
5271 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
5272
5273 2004-05-24 Andrew Haley <aph@redhat.com>
5274
5275 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
5276 atable element is of the right type.
5277
5278 * class.c (build_static_field_ref): Cast pointer to correct type
5279 for field.
5280
5281 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
5282
5283 * Merged with HEAD as of 20040514. Diff against
5284 gcj-abi-2-merge-20040514.
5285
5286 2004-04-16 Andrew Haley <aph@redhat.com>
5287
5288 * verify.c (check_pending_block): Disable subroutine checks.
5289 (defer_merging): New function.
5290 (merge_types): If types are dummy, use defer_merging to combine them.
5291 (verify_jvm_instructions): If invocation is invokeinterface and
5292 target is dummy, assume target really is an interface.
5293
5294 * parse.y (patch_invoke): Break out call to java_create_object.
5295
5296 * lang.c (flag_verify_invocations): New.
5297
5298 * jcf-parse.c (load_class): If we've already failed to load a
5299 class, don't try again.
5300 (load_class): If we can't find a .class file, don't fail, but emit
5301 a warning.
5302 (parse_class_file): Don't act on dummy methods.
5303
5304 * java-tree.h (flag_verify_invocations): New.
5305 (TYPE_DUMMY): New.
5306 (lang_type.dummy_class): New field.
5307 (java_create_object): New function.
5308 (METHOD_DUMMY): New.
5309
5310 * expr.c (build_field_ref): Widen field offset.
5311 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
5312 that each of its elements is compatible with the one we're
5313 popping.
5314 (pop_type_0): Issue a warning to say that we need to generate a
5315 runtime check.
5316 (java_create_object): New function.
5317 (build_field_ref): Only generate hard refs if we're not using
5318 indirect dispatch.
5319 (expand_java_field_op): If we're using !verify_invocations and we
5320 see a missing field, generate a decl for it.
5321
5322 (expand_invoke): If a class doesn't have the method we seek and
5323 we're using !flag_verify_invocations, generate a decl for the
5324 method now.
5325
5326 (build_known_method_ref): Always use indirect dispatch via the
5327 atable for static methods.
5328
5329 (expand_java_NEW): Break out object creation into new function,
5330 java_create_object.
5331
5332 (can_widen_reference_to): Issue a warning to say that we need to
5333 generate a runtime check.
5334
5335 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
5336 (make_method_value): Also use index for interfaces.
5337 (make_class_data): Skip dummy field for inherited data.
5338 Don't build method array for dummy methods.
5339 Set size_in_byte to -1 when using inirect dispatch
5340 Don't build a hard class ref if we don't have a hard ref to our
5341 superclass, or if we're using inirect dispatch.
5342 Null out dispatch tables.
5343
5344 (layout_class_method): Don't complain about non-static method
5345 overrides static method is method is artificial.
5346
5347 (build_static_field_ref): Disable atable references to static
5348 fields for the time being.
5349
5350 (layout_class_methods): Check for CLASS_INTERFACE as
5351 well as CLASS_ABSTRACT.
5352
5353 2004-11-24 Steven Bosscher <stevenb@suse.de>
5354
5355 * class.c (make_class_data): Don't check flag_inline_functions.
5356 * lang.c (flag_really_inline): Remove unused flag.
5357 (java_handle_option): Don't set it here. Remove special handling
5358 of flag_inline_functions for Java.
5359 (java_init): Don't set flag_inline_trees here. Already done...
5360 (java_post_options): ...here. Don't clear flag_inline_functions.
5361
5362 2004-11-24 Steven Bosscher <stevenb@suse.de>
5363
5364 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
5365 (java_gimplify_exit_block_expr): New function.
5366 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
5367 LABELED_BLOCK_EXPR.
5368 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
5369 (EXIT_BLOCK_EXPR): Likewise.
5370 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
5371 (LABELED_BLOCK_BODY): Likewise.
5372 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
5373 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
5374 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
5375 TREE_OPERAND.
5376 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
5377 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
5378 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
5379 second operand of EXIT_BLOCK_EXPR.
5380 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
5381 TREE_OPERAND.
5382 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
5383
5384 2004-11-23 Ben Elliston <bje@au.ibm.com>
5385
5386 * xref.h (xref_flag_value): Remove.
5387 (xref_set_data, xref_get_data): Likewise.
5388 (xref_set_current_fp): Likewise.
5389 (XREF_NONE): Likewise.
5390 (XREF_GET_DATA): Likewise.
5391 * xref.c (xref_flag_value): Remove.
5392 (xref_set_data, xref_get_data): Likewise.
5393 (xref_set_current_fp): Likewise.
5394
5395 2004-11-23 Ben Elliston <bje@au.ibm.com>
5396
5397 * gjavah.c (output_directory): Make static.
5398 (temp_directory): Likewise.
5399
5400 2004-11-15 Tom Tromey <tromey@redhat.com>
5401
5402 * decl.c (instn_ptr_type_node): Removed.
5403 (lineNumbers_ptr_type_node): Removed.
5404 (jint_type): Removed.
5405 (jint_ptr_type): Removed.
5406
5407 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
5408
5409 PR java/15576
5410 * check-init.c (check_init): Ignore DECL_EXPR.
5411 * expr.c (always_initialize_class_p): Reenable.
5412 (build_class_init): Use a variable to store the decl. Also use
5413 boolean_false_node instead of integer_zero_node.
5414 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
5415 to the block.
5416
5417 2004-11-08 Tom Tromey <tromey@redhat.com>
5418
5419 PR java/16843:
5420 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
5421 generating a JNI header.
5422 (print_field_info): Handle JNI headers.
5423 (jni_print_float): Likewise.
5424 (jni_print_double): Likewise.
5425
5426 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
5427
5428 * decl.c (end_java_method): Remove duplicated code.
5429
5430 2004-11-06 Zack Weinberg <zack@codesourcery.com>
5431 Gerald Pfeifer <gerald@pfeifer.com>
5432
5433 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
5434 as well.
5435
5436 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
5437
5438 PR java/17265
5439 * class.c: Reinstate 2004-08-18 patch.
5440 (make_local_function_alias): Don't create an alias for extern (native)
5441 functions.
5442
5443 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
5444
5445 PR java/17265
5446 * class.c (make_local_function_alias): Revert 2004-08-18 change.
5447 (make_method_value): Likewise.
5448
5449 2004-10-21 Andrew Haley <aph@redhat.com>
5450
5451 PR java/18091:
5452 * jcf-parse.c (set_source_filename): Add code to build new sfname.
5453
5454 2004-10-20 Andrew Haley <aph@redhat.com>
5455
5456 * decl.c (end_java_method): Don't expand if flag_syntax_only.
5457 Remove duplicated code block.
5458
5459 2004-10-18 Steven Bosscher <stevenb@suse.de>
5460
5461 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
5462 New rules to work around old Bison warnings.
5463
5464 2004-10-17 Steven Bosscher <stevenb@suse.de>
5465
5466 * class.c (ident_subst): Always alloca buffer.
5467 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
5468 opcode after including javaop.def.
5469 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
5470 conditional expression that exits, to avoid warnings.
5471 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
5472 a user of an extension.
5473 * win32-host.c: Move check down to have non-empty file when
5474 WIN32 is not defined.
5475
5476 * Make-lang.in (java-warn): Add STRICT_WARN.
5477 (java/jcf-io.o-warn): Don't have Werror for this file.
5478 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
5479
5480 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
5481
5482 * expr.c (expr_add_location): Move declaration to before all
5483 statements.
5484 * parse.y (java_expand_classes): Ditto.
5485 * lex.c (java_peek_unicode): Ditto.
5486
5487 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
5488
5489 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
5490 if possible, else convert `foo' to 'foo'.
5491 * class.c: Likewise.
5492 * decl.c: Likewise.
5493 * expr.c: Likewise.
5494 * jcf-io.c: Likewise.
5495 * jcf-parse.c: Likewise.
5496 * lang.c: Likewise.
5497 * lex.c: Likewise.
5498 * parse.h: Likewise.
5499
5500 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
5501
5502 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
5503 rename parameter 'msg' to 'msgid' in function declaration.
5504 (issue_warning_error_from_context): Likewise.
5505 (yyerror): Rename parameter 'msg' to 'msgid'.
5506 (all over): Use new quoting style for diagnostics.
5507
5508 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
5509
5510 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
5511 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
5512 Update copyright.
5513
5514 2004-10-14 Matt Austern <austern@apple.com>
5515
5516 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
5517 pointer_set_t* now.
5518
5519 2004-10-13 Tom Tromey <tromey@redhat.com>
5520
5521 PR java/15578:
5522 * lang.opt (--extdirs): Document.
5523 * jvspec.c (lang_specific_driver): Recognize -encoding and
5524 -extdirs.
5525
5526 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
5527
5528 * parse.y (issue_warning_error_from_context): Use va_list *
5529 instead of va_list parameter.
5530 (parse_error_context): Update call.
5531 (parse_warning_context): Likewise.
5532
5533 2004-10-05 Zack Weinberg <zack@codesourcery.com>
5534
5535 * parse.y, parse-scan.y: Add list of diagnostic messages to
5536 insulate translation template from version of yacc/bison used
5537 to compile the grammar.
5538
5539 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
5540
5541 Prepare for %q, %< and %> in diagnostic message strings.
5542 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
5543 Name second parameter 'msgid'.
5544 * parse.y: Additionally include pretty-print.h and diagnostic.h.
5545 (issue_warning_error_from_context): Use pretty-printer functions
5546 instead of vsprintf for constructing formatted messages. Rename
5547 parameter 'msg' to 'msgid'.
5548 (parse_error_context): Rename parameter 'msg' to 'msgid'.
5549 (parse_warning_context): Likewise.
5550
5551 2004-10-05 Andrew Haley <aph@redhat.com>
5552
5553 PR java/17779
5554 * jcf-parse.c (parse_zip_file_entries): If a class has a
5555 superclass and a TYPE_SIZE of zero, lay it out.
5556
5557 2004-09-30 Andrew Haley <aph@redhat.com>
5558
5559 PR java/17733
5560 * jcf-parse.c (compute_class_name): Rewrite.
5561
5562 2004-10-01 Jan Hubicka <jh@suse.cz>
5563
5564 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
5565
5566 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
5567
5568 * lex.c: Fix a comment typo.
5569
5570 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
5571
5572 * java-tree.h: Fix a comment typo.
5573
5574 2004-09-30 Per Bothner <per@bothner.com>
5575
5576 Simplify lexer. Implement --enable-mapped-location support.
5577 * jcf-parse.c (parse_class_file): Use linemap_line_start.
5578 (parse_source_file_1): Pass filename as extra parameter, so we can call
5579 linemap_add and set input_location here, rather than in both callers.
5580 (read_class): Pass copied filename to parse_source_file_1.
5581 Don't initialize wfl_operator - only needed for source compilation.
5582 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
5583 * lex.h: Remove a bunch of debugging macros.
5584 * lex.h (struct_java_line, struct java_error): Remove types.
5585 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
5586 (struct java_lc_s): Remove prev_col field.
5587 (struct java_lexer): New fields next_unicode, next_columns, and
5588 avail_unicode. New position field, and maybe token_start field.
5589 Don't need hit_eof field - use next_unicode == -1 instead.
5590 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
5591 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
5592 * parse.h: Various changes for USE_MAPPED_LOCATION.
5593 (EXPR_WFL_EMIT_LINE_NOTE): XXX
5594 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5595 (struct parser_ctxt): New file_start_location field.
5596 Remove p_line, c_line fields since we no longer save lines.
5597 Remove elc, lineno, and current_jcf fields - no longer used.
5598 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
5599 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5600 source_location and is probably not needed anymore anyway.
5601 Use new expr_add_Location function.
5602 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
5603 (java_pop_parser_context): Minor cleanup.
5604 (java_parser_context_save_global, java_parser_context_restore_global,
5605 java_pop_parser_context): Save/restore input_location as a unit.
5606 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
5607 a source_location instead of a wfl context node.
5608 (check_class_interface_creation): input_filename is not addressable.
5609 (create_artificial_method): Calling java_parser_context_save_global
5610 and java_parser_context_restore_global is overkill. Instead,
5611 temporarily set input_location from class decl.
5612 (java_layout_seen_class_methods): Set input_location from method decl.
5613 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5614 (finish_loop_body): Likewise.
5615 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
5616 (java_sprint_unicode): Take a character, not index in line.
5617 (java_sneak_uncode): Replaced by java_peek_unicode.
5618 (java_unget_unicode): No longer used.
5619 (java_allocate_new_line. java_store_unicode): Removed, since we
5620 no longer remember "lines".
5621 (java_new_lexer): Update for new data structures.
5622 (java_read_char): Move unget_value checking to java_read_unicode.
5623 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5624 efficient functions that are used directly when lexing.
5625 (java_read_unicode_collapsing_terminators): No longer needed.
5626 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5627 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5628 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
5629 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
5630 combine switch branches, and test for common token kinds earlier.
5631 (java_lex_error): Rewrite.
5632 * jv-scan.c (expand_location): New function, copied from tree.c.
5633 (main): Set ctxp->filename instead of setting input_filename directly.
5634
5635 2004-09-30 Per Bothner <per@bothner.com>
5636
5637 More cleanup for --enable-mapped-location.
5638 * class.c (push_class): If USE_MAPPED_LOCATION don't set
5639 input_location here. Instead do it in give_name_to_class.
5640 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5641 * expr.c (expand_byte_code): Call linemap_line_start.
5642 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
5643 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
5644 (expr_add_location): New function, if USE_MAPPED_LOCATION.
5645 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
5646 to USE_MAPPED_LOCATION case.
5647
5648 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
5649 * jcf-parse.c (java_parse_file): Don't set input_filename.
5650 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5651 Create a list of TRANSLATION_UNIT_DECL.
5652 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
5653 reason is so we can set a DECL_SOURCE_LOCATION for each file.
5654 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5655 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5656 (file_start_location): New static.
5657 (set_source_filename): Avoid extra access to input_filename macro.
5658 Concatenate new name with class's package prefix.
5659 (set_source_filename, give_name_to_class): Update.
5660 (give_name_to_class): Set class's "line 0" input_location here.
5661 (parse_class_file): Set input_location as a unit.
5662
5663 * jcf-parse.c (load_class): Sanity test if missing inner class file.
5664
5665 2004-09-29 Per Bothner <per@bothner.com>
5666
5667 * java-tree.h: Redefine some macros and add some declaration
5668 to handle the USE_MAPPED_LOCATION case.
5669 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
5670 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
5671 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5672 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5673
5674 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5675 * decl.c (finish_method, java_add_stmt): Likewise.
5676 * java-gimplify.c (java-gimplify.c): Likewise.
5677 * jcf-write.c (generate_bytecode_insns): Likewise.
5678 * lang.c (java_post_options): Likewise - call linemap_add.
5679
5680 2004-09-29 Andrew Haley <aph@redhat.com>
5681
5682 PR java/17007
5683 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5684 result of TRUNC_MOD_EXPR.
5685 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5686 * decl.c (java_init_decl_processing): Mark
5687 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5688
5689 2004-09-28 Tom Tromey <tromey@redhat.com>
5690
5691 PR java/15710:
5692 * class.c (add_miranda_methods): Load superinterface if not
5693 already loaded.
5694
5695 2004-09-28 Andrew Haley <aph@redhat.com>
5696
5697 PR java/17586
5698 * jcf-parse.c (load_class): Don't try to read a class that we've
5699 already read.
5700
5701 2004-09-28 Andrew Haley <aph@redhat.com>
5702
5703 * jcf-parse.c (load_class): Back out previous broken patch.
5704
5705 2004-09-28 Andrew Haley <aph@redhat.com>
5706
5707 PR java/17586
5708 * jcf-parse.c (load_class): Don't try to read a class that we've
5709 already read.
5710 Check that we really did read the right class.
5711
5712 2004-09-25 Tom Tromey <tromey@redhat.com>
5713
5714 PR java/17500:
5715 * parse.y (create_artificial_method): Use add_method_1.
5716
5717 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
5718
5719 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5720 comment typos.
5721 * gcj.texi: Fix typos.
5722
5723 2004-09-24 Tom Tromey <tromey@redhat.com>
5724
5725 PR java/15656:
5726 * parse.y (class_instance_creation_expression): Set `$$' to NULL
5727 in error parts of rule.
5728 (unary_expression): Don't call error_if_numeric_overflow when $1
5729 is NULL.
5730
5731 2004-09-24 Tom Tromey <tromey@redhat.com>
5732
5733 PR java/16789:
5734 * parse.y (resolve_qualified_expression_name): Set
5735 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5736 * expr.c (force_evaluation_order): Check for empty argument list
5737 after stripping COMPOUND_EXPR.
5738
5739 2004-09-23 Andrew Haley <aph@redhat.com>
5740
5741 PR java/16927:
5742 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5743 COND_EXPRs.
5744
5745 2004-09-23 Tom Tromey <tromey@redhat.com>
5746
5747 PR java/17329:
5748 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5749 where operand is null.
5750
5751 2004-09-23 Tom Tromey <tromey@redhat.com>
5752
5753 PR java/17380:
5754 * parse.y (not_accessible_p): Allow access to protected members
5755 even when class is not static.
5756
5757 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
5758
5759 * Make-lang.in: Revert the gcc-none.o change.
5760
5761 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
5762
5763 * parse.y (patch_anonymous_class): VEC_space returns true if there
5764 is space.
5765
5766 2004-09-21 Matt Austern <austern@apple.com>
5767
5768 Fix bootstrap.
5769 * gjavah.c (free_method_name_list): Fix function definition so
5770 it's a proper C prototype.
5771
5772 2004-09-21 Tom Tromey <tromey@redhat.com>
5773
5774 PR java/17575:
5775 * gjavah.c (free_method_name_list): New method.
5776 (main): Call it.
5777
5778 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
5779 Zack Weinberg <zack@codesourcery.com>
5780
5781 * java-tree.def: Use tree_code_class enumeration constants
5782 instead of code letters.
5783 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5784 new tree-class enumeration constants.
5785
5786 2004-09-13 Tom Tromey <tromey@redhat.com>
5787
5788 PR java/17216:
5789 * class.c (layout_class_method): Put synthetic methods into the
5790 vtable.
5791
5792 2004-09-11 Andrew Pinski <apinski@apple.com>
5793
5794 * Make-lang.in (java/ggc-none.c): Change dependency
5795 for ggc.h into $(GGC_H).
5796
5797 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5798
5799 * Make-lang.in (java/win32-host.o): Add dependency on
5800 coretypes.h.
5801 * win32-host.c: Add includes for coretypes.h, jcf.h
5802
5803 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5804
5805 * Make-lang.in (GCJH_OBJS): Change dependency from
5806 ggc-none.o to java/ggc-none.o
5807 (JCFDUMP_OBJS): Likewise.
5808 (java/ggc-none.o): New target.
5809
5810 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
5811
5812 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
5813 * class.c (build_utf8_ref, build_static_field_ref,
5814 make_field_value, make_method_value, get_dispatch_table,
5815 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5816 * constants.c (get_tag_node, build_ref_from_constant_pool,
5817 build_constants_constructor): Likewise.
5818 * decl.c (java_init_decl_processing): Likewise.
5819 * expr.c (build_java_array_length_access, build_newarray,
5820 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5821 build_java_binop, build_field_ref, expand_java_add_case,
5822 expand_java_call, build_known_method_ref, build_invokevirtual,
5823 build_invokeinterface, build_jni_stub): Likewise.
5824 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5825 * jcf-parse.c (get_constant): Likewise.
5826 * lex.c (do_java_lex): Likewise.
5827 * parse.y (patch_binop, patch_unaryop, patch_cast,
5828 build_newarray_node, patch_newarray): Likewise.
5829 * resource.c (compile_resource_data): Likewise.
5830 * typeck.c (build_prim_array_type): Likewise.
5831
5832 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
5833
5834 * decl.c (java_init_decl_processing): Adjust
5835 initialize_sizetypes call.
5836
5837 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
5838
5839 * jv-scan.c (fancy_abort): Add.
5840
5841 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
5842
5843 * expr.c (build_java_arrayaccess): Use convert to change
5844 len's type.
5845
5846 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
5847
5848 * class.c (make_local_function_alias): Allocate extra space for 'L'
5849 in name buffer. Reported by Thomas Neumann.
5850
5851 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
5852
5853 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5854 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
5855 * lex.c (do_java_lex): Adjust.
5856 (error_if_numeric_overflow): Likewise.
5857
5858 2004-08-18 Andrew Pinski <apinski@apple.com>
5859
5860 * class.c (make_local_function_alias): Only make a new decl if we
5861 support alias attribute on all decls.
5862
5863 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
5864
5865 * class.c (make_local_function_alias): New function. Create local
5866 alias for public method DECL.
5867 (make_method_value): Use make_local_function_alias.
5868 * parse.y (craft_constructor): Don't special-case anonymous classes.
5869 Always set ctor_name to init_identifier_node.
5870 (lookup_method_invoke): Call layout_class_method when creating
5871 anonymous class constructor.
5872
5873 2004-08-18 Richard Henderson <rth@redhat.com>
5874
5875 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5876 default case. Treat '<' similarly. Update for
5877 is_gimple_formal_tmp_var name change.
5878
5879 2004-08-17 Andrew Haley <aph@redhat.com>
5880
5881 * lang.c (lang_printable_name): Obey verbose flag.
5882 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5883 lang_printable_name().
5884 (verify_constructor_circularity, get_printable_method_name,
5885 check_abstract_method_definitions, java_check_regular_methods,
5886 java_check_abstract_methods, check_inner_class_access,
5887 fix_constructors, patch_method_invocation, patch_return):
5888 Likewise.
5889 * expr.c (pop_type_0): Likewise.
5890
5891 * java-tree.h (lang_printable_name_wls): Delete.
5892
5893 2004-08-16 Tom Tromey <tromey@redhat.com>
5894
5895 PR java/8473:
5896 * parse.y (primary): Changed for initialized and uninitialized
5897 array creations.
5898 (array_access): Handle array_creation_initialized.
5899 (array_creation_expression): Split into
5900 array_creation_initialized and array_creation_uninitialized.
5901
5902 2004-08-16 Andrew Haley <aph@redhat.com>
5903
5904 * jcf-write.c (find_constant_index): Canonicalize NaNs when
5905 generating bytecode.
5906
5907 2004-08-16 Elliot Lee <sopwith@redhat.com>
5908
5909 PR java/9677
5910 * jcf-parse.c (java_parse_file): Handle filenames with embedded
5911 spaces, and quoted filelists.
5912
5913 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
5914
5915 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5916 * class.c (build_utf8_ref, build_static_field_ref,
5917 make_field_value, make_method_value, get_dispatch_table,
5918 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5919 * constants.c (get_tag_node, build_ref_from_constant_pool,
5920 build_constants_constructor): Likewise.
5921 * decl.c (java_init_decl_processing): Likewise.
5922 * expr.c (build_java_array_length_access, build_newarray,
5923 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5924 build_java_binop, build_field_ref, expand_java_add_case,
5925 expand_java_call, build_known_method_ref, build_invokevirtual,
5926 build_invokeinterface, build_jni_stub): Likewise.
5927 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5928 * jcf-parse.c (get_constant): Likewise.
5929 * lex.c (do_java_lex): Likewise.
5930 * parse.y (patch_binop, patch_unaryop, patch_cast,
5931 build_null_of_type, patch_newarray): Likewise.
5932 * resource.c (compile_resource_data): Likewise.
5933 * typeck.c (build_prim_array_type): Likewise.
5934
5935 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
5936
5937 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5938 Don't create BLOCK here or call java_gimplify_block.
5939
5940 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
5941
5942 * java-tree.h (flag_deprecated): Removed.
5943 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5944 * parse.y (check_deprecation): Check warn_deprecated instead of
5945 flag_deprecated.
5946
5947 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
5948
5949 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5950 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5951 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5952 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5953 flag_force_classes_archive_check, flag_optimize_sci,
5954 flag_indirect_dispatch): Remove explicit declarations.
5955 * lang.opt: Add implicit declare/define/assign. Remove obsolete
5956 final comment.
5957
5958 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
5959
5960 PR bootstrap/14893
5961 * Make-lang.in (java.install-man): Install from either build
5962 tree or source tree, whichever has the file first.
5963
5964 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
5965
5966 * jcf-parse.c (get_constant): Adjust force_fit_type call.
5967 * lex.h (SET_LVAL_NODE_TYPE): Remove.
5968 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5969 (do_java_lex): Likewise. Adjust force_fit_type call.
5970
5971 2004-08-04 Roger Sayle <roger@eyesopen.com>
5972 Andrew Haley <aph@redhat.com>
5973
5974 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5975 checking trees as they're being built.
5976 (convert): Call convert_ieee_real_to_integer if we're
5977 converting a constant, even if we're writing a class file.
5978
5979 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
5980
5981 PR java/16701
5982 * parse.y (fold_constant_for_init): Call resolve_field_access with
5983 correct current_class context.
5984
5985 2004-08-01 Roger Sayle <roger@eyesopen.com>
5986
5987 * decl.c (update_aliases, initialize_local_variable): Replace calls
5988 to build with calls to buildN.
5989 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
5990 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
5991 * parse.h (BUILD_THROW): Likewise.
5992 * parse.y (switch_expression, synchronized_statement,
5993 catch_clause_parameter, array_creation_expression,
5994 conditional_expression, make_qualified_name,
5995 resolve_qualified_expression_name, patch_method_invocation,
5996 patch_invoke, build_method_invocation, build_new_invocation,
5997 build_assignment, patch_assignment, build_binop, patch_binop,
5998 build_string_concatenation, build_incdec, patch_unaryop,
5999 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
6000 patch_return, build_if_else_statement, build_labeled_block,
6001 build_new_loop, build_loop_body, build_bc_statement,
6002 build_assertion, encapsulate_with_try_catch, build_try_statement,
6003 build_try_finally_statement, patch_synchronized_statement,
6004 emit_test_initialization): Likewise, replace build with buildN.
6005
6006 2004-07-28 Eric Christopher <echristo@redhat.com>
6007
6008 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
6009 (java_unsafe_for_reeval): Ditto.
6010
6011 2004-07-26 <hp@bitrange.com>
6012
6013 * parse.y (build_super_invocation): Adjust declaration order to
6014 avoid declaration after statement.
6015
6016 2004-07-25 Bernardo Innocenti <bernie@develer.com>
6017
6018 * decl.c: Rename all identifiers named `class' to `cl'.
6019
6020 2004-07-25 Richard Henderson <rth@redhat.com>
6021
6022 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
6023
6024 2004-07-23 Mike Stump <mrs@apple.com>
6025
6026 * boehm.c (set_bit): Improve type safety wrt unsignedness.
6027 * gjavah.c (throwable_p, decode_signature_piece,
6028 print_full_cxx_name, print_include, add_namelet, add_class_decl,
6029 process_file): Likewise.
6030 * jcf-dump.c (main): Likewise.
6031 * jcf-io.c (read_zip_member): Likewise.
6032 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
6033 give_name_to_class, get_class_constant): Likewise.
6034 * jcf-write.c (find_constant_wide, push_long_const,
6035 generate_classfile): Likewise.
6036 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
6037 * parse.y (read_import_dir): Likewise.
6038 * typeck.c (parse_signature_type): Likewise.
6039 * verify.c (verify_jvm_instructions): Likewise.
6040 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
6041
6042 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
6043
6044 * Make-lang.in: Replace rmic and rmiregistry references with
6045 grmic and grmiregistry.
6046 * gcj.texi: Likewise.
6047
6048 2004-07-20 Andrew Haley <aph@redhat.com>
6049
6050 PR java/16431.
6051 * verify.c (verify_jvm_instructions): Comment change only.
6052
6053 * typeck.c (build_java_array_type): Add size field to array name.
6054
6055 * java-tree.h (LOCAL_SLOT_P): New.
6056 (update_aliases): Add PC argument.
6057 (pushdecl_function_level): New function.
6058
6059 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
6060 MODIFY_EXPR, and SAVE_EXPR.
6061 (java_gimplify_modify_expr): New function.
6062
6063 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
6064 (expand_iinc): Pass PC to update_aliases().
6065 (STORE_INTERNAL): Likewise.
6066 (process_jvm_instruction): Likewise.
6067
6068 * decl.c (base_decl_map): New variable.
6069 (uniq): New variable.
6070 (update_aliases): Rewrite with more thorough checking.
6071 (debug_variable_p): New function.
6072 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
6073 (check_local_named_variable): Delete whole function.
6074 (initialize_local_variable): New function.
6075 (check_local_unnamed_variable): Add checks and comments.
6076 (find_local_variable): Rewrite.
6077 (java_replace_reference): New function.
6078 (function_binding_level): New variable.
6079 (pushdecl_function_level): New function.
6080 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
6081 (maybe_pushlevels): Call pushdecl() on each of the new decls.
6082 (start_java_method): Reset uniq. Create base_decl_map. Set
6083 function_binding_level.
6084 (end_java_method): Null unused fields to save memory.
6085
6086 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
6087
6088 * class.c (add_interface_do): Remove.
6089 (set_super_info, interface_of_p, maybe_add_interface,
6090 add_interface, make_class_data, layout_class,
6091 add_miranda_methods): Adjust BINFO accessors and addition.
6092 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
6093 accessors.
6094 * jcf-write.c (generate_classfile): Likewise.
6095 * parse.y (patch_anonymous_class, check_inner_circular_reference,
6096 check_circular_reference, java_complete_class,
6097 check_abstract_method_definitions,
6098 java_check_abstract_method_definitions,
6099 check_interface_throws_clauses, java_check_abstract_methods,
6100 lookup_java_interface_method2,
6101 find_applicable_accessible_methods_list): Adjust BINFO accessors
6102 and addition.
6103 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
6104
6105 2004-07-18 Roger Sayle <roger@eyesopen.com>
6106
6107 * builtins.c (max_builtin, min_builtin,
6108 java_build_function_call_expr): Replace calls to build with buildN.
6109 * class.c (build_class_ref, build_static_field_ref,
6110 get_dispatch_table, make_class_data, layout_class_method): Likewise.
6111 * constants.c (build_ref_from_constant_pool): Likewise.
6112 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
6113 add_stmt_to_compound): Likewise.
6114 * except.c (build_exception_object_ref, expand_end_java_handler):
6115 Likewise.
6116 * java-gimplify.c (java_gimplify_case_expr,
6117 java_gimplify_default_expr, java_gimplify_block,
6118 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
6119 * jcf-write.c (generate_bytecode_insns): Likewise.
6120 * typeck.c (convert_ieee_real_to_integer): Likewise.
6121
6122 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
6123
6124 * java-tree.h (builtin_function): Declare.
6125
6126 2004-07-16 Steven Bosscher <stevenb@suse.de>
6127
6128 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
6129 abuse restore_line_number_status.
6130
6131 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
6132
6133 g++/15861
6134 * jcf-parse.c (java_emit_static_constructor): Specify default
6135 priority.
6136
6137 2004-07-13 Per Bothner <per@bothner.com>
6138
6139 * java-tree.h (all_class_filename): Remove useless macro.
6140 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
6141 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
6142 * parse.y (java_parser_context_restore_global): Replace
6143 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
6144 * jcf-parse.c (read_class, java_parse_file): Likewise.
6145
6146 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
6147
6148 PR java/16474
6149 gjavah.c (print_field_info): Emit constant only if field is static.
6150
6151 2004-07-11 Roger Sayle <roger@eyesopen.com>
6152
6153 * expr.c (java_truthvalue_conversion, flush_quick_stack,
6154 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
6155 build_java_ret, build_java_throw_out_of_bounds_exception,
6156 build_java_array_length_access, java_check_reference,
6157 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
6158 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
6159 expand_java_arrayload, build_java_monitor, expand_java_return,
6160 expand_load_internal, expand_java_NEW, build_get_class,
6161 build_instanceof, expand_java_CHECKCAST, expand_iinc,
6162 build_java_soft_divmod, build_java_binop, build_field_ref,
6163 expand_compare, expand_java_goto, expand_java_switch,
6164 expand_java_add_case, build_class_init, build_known_method_ref,
6165 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
6166 expand_invoke, build_jni_stub, expand_java_field_op,
6167 java_expand_expr, expand_byte_code, STORE_INTERNAL,
6168 force_evaluation_order, emit_init_test_initialization): Convert
6169 calls to "build" into calls to the prefered "buildN" functions.
6170
6171 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
6172
6173 * java-tree.h (set_block): Remove.
6174 * lang.c (java_clear_binding_stack): New.
6175 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
6176 * decl.c (struct binding_level): Remove this_block.
6177 (clear_binding_level): Likewise.
6178 (poplevel): Don't handle this_block.
6179 (set_block): Remove.
6180
6181 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
6182
6183 * class.c (common_enclosing_context_p): Remove statement with no
6184 side-effects.
6185
6186 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
6187
6188 PR java/8618
6189 * parse.y (create_anonymous_class): Remove 'location' argument. Use
6190 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
6191 (craft_constructor): Inherit access flags for implicit constructor
6192 from the enclosing class.
6193 (create_class): Fix comment typo.
6194 (resolve_qualified_expression_name): Pass type of qualifier to
6195 not_accessible_p, not the type in which target field was found.
6196 (not_accessible_p): Handle inner classes. Expand protected
6197 qualifier-subtype check to enclosing instances, but don't apply this
6198 check to static members. Allow protected access to inner classes
6199 of a subtype. Allow private access within common enclosing context.
6200 (build_super_invocation): Get WFL line number info from current
6201 class decl.
6202 (build_incomplete_class_ref): Update for new create_anonymous_class
6203 signature.
6204 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
6205 common_enclosing_instance_p.
6206 * class.c (common_enclosing_context_p): New. Determine if types
6207 share a common enclosing context, even across static contexts.
6208 (common_enclosing_instance_p): Renamed from
6209 common_enclosing_context_p. Determines if types share a common
6210 non-static enclosing instance.
6211 * java-tree.h (common_enclosing_instance_p): Declare.
6212 * jcf-write.c (get_method_access_flags): New. Surpress private flag
6213 for inner class constructors.
6214 (generate_classfile): Use get_method_access_flags.
6215
6216 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
6217
6218 * class.c (interface_of_p): Check for null TYPE_BINFO.
6219
6220 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
6221
6222 * class.c (make_class): Do not create binfo here.
6223 (set_super_info): Create it here.
6224 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
6225
6226 2004-07-08 Richard Henderson <rth@redhat.com>
6227
6228 * expr.c (case_identity, get_primitive_array_vtable,
6229 java_expand_expr, emit_init_test_initialization): Remove.
6230 * java-tree.h (java_expand_expr): Remove.
6231 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
6232
6233 2004-07-07 Per Bothner <per@bothner.com>
6234
6235 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
6236 get internal error due to mismatched types.
6237
6238 * gcj.texi (Invoking gij): Document new -verbose:class flag.
6239
6240 * gcj.texi (Linking): New node. Document -lgij usage.
6241
6242 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
6243
6244 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
6245 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
6246 * java/class.c (set_super_info, class_depth, interface_of_p,
6247 maybe_add_interface, add_interface, make_class_data,
6248 layout_class, add_miranda_methods): Adjust BINFO macros.
6249 * expr.c (can_widen_reference_to, lookup_field): Likewise.
6250 * jcf-write.c (generate_classfile): Likewise.
6251 * parse.y (patch_anonymous_class,
6252 check_inner_circular_reference, check_circular_reference,
6253 java_complete_class, check_abstract_method_definitions,
6254 java_check_abstract_method_definitions,
6255 check_interface_throws_clauses, java_check_abstract_methods,
6256 lookup_java_interface_method2,
6257 find_applicable_accessible_methods_list): Likewise.
6258 * typeck.c (find_method_in_interface): Likewise.
6259 * verify.c (merge_types): Likewise.
6260
6261 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
6262
6263 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
6264 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
6265
6266 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
6267
6268 * class.c (make_class): Use make_tree_binfo.
6269 (set_super_info, add_interface_do): Likewise.
6270 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
6271
6272 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
6273
6274 * verify.c: Correct array element access formatting thinko.
6275
6276 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
6277
6278 * verify.c: Insert a short blurb at the start referring to the JVMS.
6279 (merge_type_state): Remove redundant nested if statement.
6280 (verify_jvm_instructions): Ensure current_subr is initialised to
6281 NULL_TREE.
6282 Minor formatting fixes all over the place.
6283
6284 2004-07-02 Richard Henderson <rth@redhat.com>
6285
6286 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
6287
6288 2004-07-01 Richard Henderson <rth@redhat.com>
6289
6290 * class.c (registerClass_libfunc): Remove.
6291 (init_class_processing): Don't set it.
6292 (emit_register_classes): Take list_p parameter. Fill it in
6293 with _Jv_RegisterClass calls.
6294 * decl.c (java_init_decl_processing): Don't call
6295 init_resource_processing.
6296 * jcf-parse.c (java_emit_static_constructor): New.
6297 (java_parse_file): Call it.
6298 * resource.c (registerResource_libfunc): Remove.
6299 (init_resource_processing): Remove.
6300 (write_resource_constructor): Take list_p parameter. Fill it in
6301 with _Jv_RegisterResource calls.
6302 * java-tree.h: Update prototypes.
6303
6304 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
6305
6306 PR java/1262
6307 * class.c (layout_class_method): Do not override package-private
6308 method if its in a different package.
6309 (split_qualified_name): Move here from parse.y. Rename from
6310 breakdown_qualified. Add comment.
6311 (in_same_package): Move here from parse.y. Add comment.
6312 * java-tree.h (break_down_qualified, in_same_package): Declare.
6313 (in_same_package): Likewise.
6314 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
6315 Callers updated.
6316
6317 2004-06-29 Andrew Haley <aph@redhat.com>
6318
6319 * except.c (expand_start_java_handler): Push a new binding level.
6320 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
6321 register_exception_range() to register where we'll do it.
6322 (expand_end_java_handler): Remove old bogus code. Replace with
6323 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
6324 the top of the expression we're curently building.
6325 (maybe_end_try): Delete.
6326 * decl.c (binding_level.exception_range): New field.
6327 (clear_binding_level): Add field exception_range. Reformat.
6328 (poplevel): Call expand_end_java_handler().
6329 (poplevel): Call java_add_stmt only if functionbody is false.
6330 (maybe_poplevels): Don't call maybe_end_try() from here.
6331 (end_java_method): Clear no longer used trees in function decl.
6332 (register_exception_range): New function.
6333 * java-tree.h (register_exception_range, struct eh_range): Declare.
6334
6335 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
6336
6337 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
6338
6339 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
6340
6341 Formatting fixes.
6342 * expr.c (class_has_finalize_method): Fix method name indentation.
6343 (expand_java_call): Remove K&R style parameter declaration.
6344 (expand_invoke): Fix statement indentation.
6345 (expand_java_field_op): Likewise.
6346 * parse-scan.y: Fix typo.
6347 (reset_report): Fix method name indentation.
6348 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
6349 line. Fix typos.
6350 * verify.c (verify_jvm_instructions): Document parameters, insert
6351 page break.
6352 * lang.c (lang_init_source): Fix method name indentation.
6353 * class.c (common_enclosing_context_p): Likewise.
6354 (emit_symbol_table): Fix parameter list indentation.
6355 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
6356 parameter declaration.
6357 * constants.c: Fix copyright notice indentation.
6358 * typeck.c (find_method_in_superclasses): Fix parameter list
6359 indentation.
6360 (find_method_in_interfaces): Likewise.
6361 * zextract.c (makelong): Fix method name indentation.
6362
6363 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6364
6365 PR java/15715.
6366 * parse.y (create_interface): Set correct access modifiers for
6367 interfaces.
6368 * jcf-write.c (get_classfile_modifiers): New function.
6369 (generate_classfile): Use get_classfile_modifiers, not
6370 get_access_flags.
6371
6372 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6373
6374 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
6375 dependency to current parser context, not NULL_TREE, for top-level
6376 classes.
6377 (jdep_resolve_class): Enable member access check for all inner
6378 class dependencies.
6379
6380 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6381
6382 * parse.y (qualify_and_find): Pass type decl, not identifier, to
6383 load_class.
6384
6385 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6386
6387 PR java/15734
6388 * expr.c (expand_java_field_op): Ensure that target class for static
6389 field access has been loaded.
6390
6391 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6392 Ranjit Mathew <rmathew@hotmail.com>
6393
6394 PR java/1207, java/16178
6395 * jcf-parse.c (load_class): Return immediately if passed a type decl
6396 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
6397 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
6398 before calling load_class.
6399 (qualify_and_find): Likewise.
6400 (find_in_imports_on_demand): Likewise.
6401 (find_applicable_accessible_methods_list): Likewise.
6402
6403 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
6404
6405 * parse.y (java_layout_seen_class_methods): Don't call load_class
6406 on class defined by source parser.
6407
6408 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
6409
6410 * parse.y (set_nested_class_simple_name_value): Removed.
6411 (java_complete_expand_class): Remove calls to
6412 set_nested_class_simple_name_value.
6413
6414 2004-06-22 Andrew Haley <aph@redhat.com>
6415 Ranjit Mathew <rmathew@hotmail.com>
6416
6417 Fixes PR java/16113.
6418 * decl.c (force_poplevels): Remove call to expand_end_bindings.
6419
6420 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
6421
6422 * parse.y (create_class): Correct diagnostic message about
6423 java.lang.Object extending anything else.
6424
6425 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6426
6427 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
6428 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
6429 * constants.c (build_ref_from_constant_pool): Likewise.
6430 * expr.c (build_java_array_length_access): Likewise.
6431 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
6432 (invoke_build_dtable, build_invokevirtual): Likewise.
6433 (build_invokeinterface, java_expand_expr): Likewise.
6434 (emit_init_test_initialization): Likewise.
6435 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6436 * parse.y (make_qualifed_name, build_array_ref): Likewise.
6437
6438 2004-06-21 Andrew Haley <aph@redhat.com>
6439
6440 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
6441 block.
6442
6443 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
6444
6445 * jcf.h (struct JCF): Change java_source, right_zip and finished
6446 to unsigned int.
6447 * lex.h (struct java_lexer): Change hit_eof, read_anything,
6448 byte_swap and use_fallback to unsigned int.
6449 * parse.h (struct _jdep): Change flag0 to unsigned int.
6450
6451 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
6452
6453 Fixes PR java/13948
6454 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
6455 before trying to lay out its methods.
6456 * jcf-parse.c (read_class): Track parsed files using canonical paths
6457 obtained via lrealpath from libiberty.
6458 (java_parse_file): Likewise.
6459 (parse_source_file_1): Rename formal parameter to reflect its
6460 modified purpose. Minor formatting fix.
6461
6462 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
6463
6464 * class.c (emit_register_classes): Make the function uninlinable,
6465 do not set current_function_cannot_inline.
6466 * resource.c (write_resource_constructor): Do not reset
6467 flag_inline_functions around rest_of_compilation.
6468
6469 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
6470
6471 PR java/15769
6472 * expr.c (java_truthvalue_conversion): Handle
6473 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
6474 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
6475 i.e. return the expression.
6476
6477 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
6478
6479 * gjavah.c: Include version.h
6480
6481 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
6482
6483 * jcf-write.c (generate_bytecode_conditional): Correct handling
6484 of unordered conditionals. Add comment.
6485
6486 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
6487 Per Bothner <per@bothner.com>
6488
6489 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
6490 local variable was initialised upon declaration.
6491 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
6492 variable was final and initialised upon declaration.
6493 * check-init.c (check_final_reassigned): Give error only if a blank
6494 final is not definitely unassigned or if an initialised final is
6495 reassigned.
6496 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
6497 assignment expressions. Remove case MODIFY_EXPR, label do_default.
6498 (check_init): Perform initialised-variable-removing-optimisation
6499 only on non-final local variables.
6500
6501 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6502
6503 * jcf-write.c (generate_bytecode_conditional): Handle binops
6504 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
6505 and LTGT_EXPR.
6506 (generate_bytecode_insns): Likewise.
6507
6508 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6509
6510 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
6511 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
6512
6513 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6514
6515 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
6516 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
6517
6518 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
6519
6520 * decl.c (struct binding_level): Add GTY marker. Compile
6521 binding_depth unconditionally.
6522 (current_binding_level, free_binding_level, global_binding_level):
6523 Likewise.
6524 (clear_binding_level): Unconditionally set binding_depth.
6525 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
6526
6527 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
6528
6529 * lex.c (java_new_lexer): Set 'encoding'.
6530 (java_read_char): Improve error message for unrecognized characters.
6531 * lex.h (struct java_lexer): New field 'encoding'.
6532
6533 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
6534
6535 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
6536
6537 2004-05-21 Mark Wielaard <mark@klomp.org>
6538
6539 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
6540 extern.
6541
6542 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
6543
6544 * typeck.c: Remove non-printable character 160.
6545
6546 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
6547
6548 * check-init.c: Correct minor typos.
6549
6550 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6551
6552 * Make-lang.in, expr.c, java-gimplify.c: Rename
6553 tree-simple.[ch] to tree-gimple.[ch].
6554
6555 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
6556
6557 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
6558
6559 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6560
6561 Merge from tree-ssa-20020619-branch. See
6562 ChangeLog.tree-ssa for details.
6563
6564 * Make-lang.in, builtins.c, check-init.c, class.c,
6565 constants.c, decl.c, except.c, expr.c, java-except.h,
6566 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
6567 lang.c, lang.opt, parse.y, resource.c: Merged.
6568 * java-gimplify.c: New file.
6569
6570 2004-05-10 Andrew Haley <aph@redhat.com>
6571
6572 * parse.y (create_class): Set TYPE_VFIELD.
6573 * decl.c (java_init_decl_processing): Likewise.
6574
6575 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
6576 * class.c (make_method_value): Replace DECL_VINDEX with call to
6577 get_method_index().
6578 (get_dispatch_vector): Likewise.
6579 (layout_class_method): Likewise.
6580 Replace set of DECL_VINDEX with call to set_method_index().
6581 (set_method_index): New function.
6582 (get_method_index): New function.
6583 * java-tree.h (set_method_index): New function decl.
6584 (get_method_index): New function decl.
6585
6586 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
6587
6588 * parse.y (check_pkg_class_access): Add new argument
6589 and use it when cl is NULL to call lookup_cl on it.
6590 (parser_check_super_interface): Do not call lookup_cl.
6591 Pass this_decl to check_pkg_class_access and NULL
6592 instead of lookup_cl.
6593 (parser_check_super): Update for change in
6594 check_pkg_class_access.
6595 (do_resolve_class): Likewise.
6596 (process_imports): Likewise.
6597 (find_in_imports_on_demand): Likewise.
6598 (resolve_qualified_expression_name): Likewise.
6599
6600 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
6601
6602 Fixes PR java/9685, PR java/15073
6603 * parse.y (accessibility_string): New method.
6604 (not_accessible_field_error): Use accessibility_string()
6605 instead of java_accstring_lookup().
6606 (resolve_qualified_expression_name): Check with
6607 check_pkg_class_access() before allowing access using
6608 qualified names.
6609 Fix comment typo.
6610 Use check_pkg_class_access() instead of not_accessible_p()
6611 for unqualified types.
6612 (not_accessible_p): Use DECL_CONTEXT (member) instead of
6613 REFERENCE for package-private access checking.
6614 (patch_method_invocation): Use accessibility_string() instead
6615 of java_accstring_lookup().
6616
6617 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
6618
6619 Fixes PR java/15133
6620 * gjavah.c (struct method_name): Add member is_native.
6621 (overloaded_jni_method_exists_p): Match candidate method only if
6622 it is native.
6623 (print_method_info): Initialise is_native flag from the method's
6624 access flags.
6625
6626 2004-04-30 Roger Sayle <roger@eyesopen.com>
6627
6628 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6629 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6630
6631 2004-04-22 Roger Sayle <roger@eyesopen.com>
6632
6633 * resource.c (write_resource_constructor): Guard call to possibly
6634 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6635
6636 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
6637
6638 * class.c (make_class_data): Add new field aux_info.
6639 * decl.c (java_init_decl_processing): Push type and decl for
6640 `aux_info'.
6641
6642 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6643
6644 * expr.c (expand_java_NEW): Don't use size argument for
6645 _Jv_AllocObject calls.
6646 * parse.y (patch_invoke): Likewise.
6647
6648 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6649
6650 * expr.c (build_invokeinterface): Remove unused variables to
6651 fix warnings.
6652
6653 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6654
6655 * class.c (get_interface_method_index): New function. Return dispatch
6656 index for interface method.
6657 (make_method_value): For interface methods, set index field to
6658 iface dispatch index, not DECL_VINDEX.
6659 * expr.c (build_invokeinterface): Use get_interface_method_index.
6660
6661 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6662
6663 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6664
6665 2004-03-31 Andrew Haley <aph@redhat.com>
6666
6667 PR java/14104
6668 * jcf-io.c (opendir_in_zip): Tidy up error handling.
6669
6670 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6671
6672 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6673 form of GTY markers.
6674
6675 2004-03-25 Marcus Meissner <meissner@suse.de>
6676
6677 PR java/14689:
6678 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6679
6680 2004-03-23 Tom Tromey <tromey@redhat.com>
6681
6682 PR java/14315:
6683 * jcf-write.c (make_class_file_name): Don't report if mkdir
6684 failed with EEXIST.
6685
6686 2004-03-23 Tom Tromey <tromey@redhat.com>
6687
6688 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6689
6690 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
6691
6692 * class.c, gjavah.c, lang.c: Fix comment typos.
6693 * gcj.texi: Fix typos.
6694
6695 2004-03-19 Per Bothner <per@bothner.com>
6696
6697 * gcj.texi (Code Generation): Document new flags and assert defaults.
6698
6699 * class.c (assume_compiled_node_struct): Rename type to
6700 class_flag_node_struct, as it is now also used for enable_assertions.
6701 Rename assume_compiled_node typedef. Rename excludep field to value.
6702 (find_assume_compiled_node): Rename function to find_class_flag_node.
6703 Minor optimization - avoid needless strlen.
6704 (add_assume_compiled): Some tweaking and optimization.
6705 Rename and generalize to add_class_flag takem an extra parameter.
6706 (add_assume_compled): New just calls add_class_flag.
6707 (add_enable_assert, enable_assertions): New functions.
6708 (enable_assert_tree): New static.
6709 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6710 * lang.opt (fenable-assertions, fenable-assertions=,
6711 fdisable-assertions, fdisable-assertions=): New options.
6712 * lang.c (java_handle_option): Handle new options.
6713 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
6714 class in an interface - create helper class nested in outer interface.
6715 (build_assertion): Short-circuit if enable_assertions is false.
6716
6717 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6718
6719 * java-tree.h: Changes throughout to add checking to macros
6720 and numerous whitespace changes.
6721 (VAR_OR_FIELD_CHECK): New macro.
6722 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6723 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6724
6725 2004-03-16 Per Bothner <per@bothner.com>
6726
6727 * jcf-jump.c (options): New --print-constants option.
6728 * gcj.texi (Invoking jcf-dump): Document --print-constants.
6729
6730 * jcf-dump.c (flag_print_constant_pool): Default to off.
6731 (print_constant_terse_with_index): New helper function.
6732 (various places): Check flag_print_constant_pool where missing.
6733 (main): If verbose set flag_print_constant_pool.
6734 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
6735
6736 2004-03-15 Andrew Haley <aph@redhat.com>
6737
6738 PR java/14581
6739 * parse.y (java_complete_lhs): Check that final variable has an
6740 initializer.
6741
6742 2004-03-12 Andrew Haley <aph@redhat.com>
6743
6744 PR java/14551
6745 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6746 conversion.
6747
6748 2004-02-29 Roger Sayle <roger@eyesopen.com>
6749
6750 * jcf-parse.c (java_parse_file): Handle the case that input_filename
6751 is NULL.
6752
6753 2004-02-27 Per Bothner <per@bothner.com>
6754
6755 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
6756 suggestion: Use build_incomplete_class_ref.
6757 This fixes PR java/13508, java/11714.
6758
6759 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
6760
6761 * java/parse.h: Update copyright.
6762
6763 2004-02-26 Andrew Haley <aph@redhat.com>
6764
6765 PR java/14231:
6766 * parse.y (check_interface_throws_clauses): Check for
6767 !METHOD_INVISIBLE (iface_method).
6768 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6769 well as CLASS_ABSTRACT.
6770
6771 2004-02-25 Per Bothner <per@bothner.com>
6772
6773 * parse.y (build_assertion): If we're in an inner class, create the
6774 class$ helper routine in the outer class.
6775
6776 2004-02-19 Richard Henderson <rth@redhat.com>
6777
6778 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6779
6780 2004-02-16 Geoffrey Keating <geoffk@apple.com>
6781
6782 * Make-lang.in (java.install-man): Add extra dependencies.
6783
6784 2004-02-13 Geoffrey Keating <geoffk@apple.com>
6785
6786 * Make-lang.in: Install man pages under the same names
6787 (possibly transformed) as the program they document.
6788
6789 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
6790
6791 * gjavah.c: Include "intl.h".
6792 (error): New function.
6793 (main): Call gcc_init_libintl.
6794 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6795 print_stub_or_jni, process_file, main): Use error rather than
6796 fprintf.
6797 (print_method_info, usage, help, version, main): Mark strings for
6798 translation with _. Avoid splitting up sentences. Send
6799 information messages to stdout.
6800 * jcf-dump.c: Include "intl.h".
6801 (main): Call gcc_init_libintl.
6802 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6803 Mark error, usage and version messages for translation with _.
6804 Avoid splitting up sentences.
6805 * jv-scan.c: Include "intl.h".
6806 (fatal_error, warning): Change parameter s to msgid. Translate
6807 messages.
6808 (main): Call gcc_init_libintl.
6809 (usage, help, version): Mark error, usage and version messages for
6810 translation with _. Avoid splitting up sentences.
6811 * jvgenmain.c: Include "intl.h".
6812 (main): Call gcc_init_libintl.
6813 (usage, main): Mark error messages for translation with _.
6814 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6815 JVGENMAIN_OBJS): Add intl.o.
6816 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6817 java/jvgenmain.o): Update dependencies.
6818
6819 2004-02-08 Per Bothner <per@bothner.com>
6820
6821 * parse.y (resolve_qualified_expression_name): In case of inaccessible
6822 class don't use not_accessible_field_error, which can get confused.
6823
6824 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
6825
6826 Make-lang.in (po-generated): Delete.
6827
6828 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
6829
6830 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6831 Depend on target.h.
6832 * decl.c: Include target.h.
6833 (start_java_method): Replace PROMOTE_PROTOTYPES with
6834 targetm.calls.promote_prototypes.
6835 * expr.c: Include target.h.
6836 (pop_arguments): Replace PROMOTE_PROTOTYPES with
6837 targetm.calls.promote_prototypes.
6838 * parse.y: Include target.h.
6839 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6840 with targetm.calls.promote_prototypes.
6841
6842 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6843
6844 * typeck.c: Update copyright.
6845
6846 2004-02-02 Tom Tromey <tromey@redhat.com>
6847
6848 * decl.c (java_init_decl_processing): Remove duplicate
6849 gnu/gcj/RawData.
6850
6851 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
6852
6853 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6854
6855 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
6856
6857 * expr.c (build_field_ref): Move variable
6858 definition up.
6859
6860 2004-01-28 Andrew Haley <aph@redhat.com>
6861
6862 * expr.c (build_field_ref): Widen field offset.
6863
6864 2004-01-27 Andrew Haley <aph@redhat.com>
6865
6866 java/13273
6867 * parse.y (check_interface_throws_clauses): Make sure class_decl
6868 has been loaded.
6869
6870 2004-01-22 Jeff Sturm <jsturm@one-point.com>
6871
6872 PR java/13733
6873 * parse.y (patch_assignment): Don't modify lhs_type for
6874 reference assignments.
6875
6876 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6877
6878 * Make-lang.in: Replace $(docdir) with doc.
6879 (java.info, java.srcinfo, java.man, java.srcman): New rules.
6880 (java.install-man): Revamp rule.
6881
6882 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6883
6884 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6885 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6886 instead of deferred backquote.
6887
6888 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
6889
6890 * typeck.c (find_method_in_interfaces): Move variable
6891 definition up.
6892
6893 2004-01-16 Andrew Haley <aph@redhat.com>
6894
6895 PR java/13273:
6896 * typeck.c (shallow_find_method): New.
6897 (find_method_in_superclasses): New.
6898 (find_method_in_interfaces): New.
6899 (lookup_do): Rewrite.
6900 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6901
6902 * jcf-parse.c (read_class): Save and restore output_class.
6903 * decl.c (java_expand_body): Set output_class from fndecl.
6904
6905 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
6906
6907 * class.c (gen_indirect_dispatch_tables): Fix string length
6908 calculations.
6909
6910 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6911
6912 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6913 (java.srcextra): Copy above back to source directory if requested.
6914 (po-generated): Delete reference to $(parsedir).
6915 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6916 Use implicit rule.
6917
6918 2004-01-14 Jan Hubicka <jh@suse.cz>
6919
6920 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6921 estimation.
6922
6923 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6924
6925 * java-tree.h (java_expand_expr): Change prototype.
6926 * expr.c (java_expand_expr): Add alt_rtl parameter.
6927
6928 2004-01-09 Andrew Haley <aph@redhat.com>
6929
6930 PR java/12755:
6931 * parse.y (java_fix_constructors): Set output_class.
6932 (java_reorder_fields): Likewise.
6933 (java_layout_classes): Likewise.
6934 (java_expand_classes): Generate indirect dispatch tables.
6935 (java_expand_classes): Set output_class.
6936 (java_finish_classes): Likewise.
6937 * lang.c (java_init): Turn on always_initialize_class_p if we're
6938 using indirect dis[atch.
6939 (java_decl_ok_for_sibcall): Use output_class, not current_class.
6940 (java_get_callee_fndecl): Use class local atable.
6941 * jcf-parse.c
6942 (always_initialize_class_p): Decl moved to java-tree.h.
6943 (HANDLE_CLASS_INFO): Set output_class.
6944 (read_class): Likewise.
6945 (parse_class_file): Call gen_indirect_dispatch_tables.
6946 (parse_zip_file_entries): Set output_class.
6947 (java_parse_file): Set output_class. Don't emit symbol tables.
6948 * java-tree.h (output_class): New.
6949 Remove global declarations for otable, atable, and ctable.
6950 (always_initialize_class_p): moved here from decl.c.
6951 (DECL_OWNER): New.
6952 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6953 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6954 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6955 (struct lang_type): Add otable_methods, otable_decl,
6956 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6957 ctable_decl, catch_classes, type_to_runtime_map.
6958 * expr.c (build_field_ref): Make otable, atable, and ctable class
6959 local rather than global.
6960 (build_known_method_ref): Likewise.
6961 (build_invokeinterface): Likewise.
6962 (java_expand_expr): Pass runtime type (rather than actual type) to
6963 expand_start_catch.
6964 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6965 this class. Look up each class in that map to delete duplicates.
6966 (expand_end_java_handler): Pass runtime type (rather than actual
6967 type) to expand_start_catch.
6968 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6969 (do_nothing): New.
6970 (java_init_decl_processing): Rearrange things. Remove global
6971 declarations of otable, atable, and ctable.
6972 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6973 (java_expand_body): Set output_class.
6974 * constants.c (build_constant_data_ref): Use output_class, not
6975 current_class.
6976 (alloc_name_constant): Likewise.
6977 * class.c (gen_indirect_dispatch_tables): New.
6978 (build_class_ref): Generate hard reference to superclass, even if
6979 using indirect dispatch.
6980 (build_static_field_ref): Use class local atable.
6981 (make_class_data): Generate hard reference to superclass, even if
6982 using indirect dispatch.
6983 Generate symbolic references to interfaces when using indirect
6984 dispatch.
6985 (make_class_data): Emit otable, atable, and ctable.
6986 Make otable, atable, and ctable class local rather than global.
6987 (emit_catch_table): Make otable, atable, and ctable class local
6988 rather than global.
6989
6990 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
6991
6992 * parse.y (catch_clause_parameter): Fix typo.
6993
6994 PR java/13404
6995 * parse.y: (catch_clause_parameter): Return early if $3, aka
6996 formal_parameter, is null.
6997
6998 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
6999
7000 * class.c: Remove uses of "register" specifier in
7001 declarations of arguments and local variables.
7002 * decl.c: Likewise.
7003 * expr.c: Likewise.
7004 * gjavah.c: Likewise.
7005 * jcf-dump.c: Likewise.
7006 * jcf-io.c: Likewise.
7007 * jcf-parse.c: Likewise.
7008 * jcf-write.c: Likewise.
7009 * keyword.h: Likewise.
7010 * parse.y: Likewise.
7011 * typeck.c: Likewise.
7012 * verify.c: Likewise.
7013
7014 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
7015
7016 * Make-lang.in (GCJ_CROSS_NAME): Delete.
7017 (java.install_common, java.install-man): Adjust for above.
7018 (java.uninstall): Likewise.
7019
7020 2003-12-03 Michael Koch <konqueror@gmx.de>
7021
7022 * class.c (make_class_data):
7023 Push field value to 'hack_signers' instead of 'signers'.
7024 * decl.c (java_init_decl_processing):
7025 Push field 'hack_signers' instead of 'signers'.
7026
7027 2003-12-03 Zack Weinberg <zack@codesourcery.com>
7028
7029 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
7030 including iconv.h.
7031
7032 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
7033
7034 PR java/12374:
7035 * parse.y (qualify_ambiguous_name): Remove lots of broken
7036 field access processing - there's no need to do that here,
7037 because we have resolve_field_access. Remove
7038 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
7039 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
7040 used.
7041
7042 2003-12-01 Jeff Sturm <jsturm@one-point.com>
7043
7044 Fix PR java/13237
7045 * parse.y (java_complete_lhs): Save location prior to patching
7046 CALL_EXPR.
7047
7048 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
7049
7050 PR java/12548
7051 * resource.c (write_resource_constructor): Append
7052 "_resource" to constructor identifier name.
7053
7054 2003-11-25 Jeff Sturm <jsturm@one-point.com>
7055
7056 Fix PR java/13183.
7057 * constants.c (cpool_for_class): New function.
7058 (outgoing_cpool): Remove global variable.
7059 (alloc_name_constant): Use cpool_for_class.
7060 (build_constants_constructor): Likewise.
7061 * decl.c (java_expand_body): Set current_class.
7062 * java-tree.h (outgoing_cpool) Remove declaration.
7063 (init_outgoing_cpool): Likewise.
7064 * jcf-parse.c (init_outgoing_cpool): Remove function.
7065 (parse_class_file): Don't call init_outgoing_cpool.
7066 * parse.y (java_complete_expand_methods): Don't call
7067 init_outgoing_cpool. Don't save outgoing_cpool.
7068 (java_expand_classes): Don't restore outgoing_cpool.
7069 (java_finish_classes): Likewise.
7070
7071 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
7072
7073 * Make-lang.in: (java.install-common) Add
7074 symlink for $(target_noncanonical)-gcjh for
7075 native builds.
7076
7077 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
7078
7079 * Make-lang.in (java.extraclean): Delete.
7080
7081 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
7082
7083 * Make-lang.in (check-java): Add.
7084
7085 2003-11-19 Jeff Sturm <jsturm@one-point.com>
7086
7087 Fix PR java/13024.
7088 * except.c (prepare_eh_table_type): Allocate variable-sized
7089 buffer `buf' with alloca.
7090
7091 2003-11-17 Jeff Sturm <jsturm@one-point.com>
7092
7093 Fix PR java/12857.
7094
7095 decl.c (java_init_decl_processing): Don't initialize
7096 class_not_found_type_node, no_class_def_found_type_node.
7097
7098 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
7099 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
7100 (class_not_found_type_node, no_class_def_found_type_node):
7101 Don't define.
7102
7103 parse.y (build_dot_class_method_invocation): Add this_class
7104 argument. Qualify method invocations to a different class.
7105 (create_new_parser_context): Initialize saved_data_ctx to 0.
7106 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
7107 (build_dot_class_method): Don't load classes. Register
7108 incomplete types.
7109 (build_incomplete_class_ref): Special cases for interfaces
7110 and inner classes. Move build_dot_class_method call to here...
7111 (patch_incomplete_class_ref): ...from here. Pass current_class
7112 to build_dot_class_method_invocation.
7113 (build_assertion): Pass class_type to
7114 build_dot_class_method_invocation.
7115 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
7116
7117 2003-11-17 Jeff Sturm <jsturm@one-point.com>
7118
7119 Fix PR java/12739.
7120 * java-tree.h (BLOCK_EMPTY_P): Define.
7121 * parse.y (java_complete_lhs): Check for empty blocks
7122 in TRY_FINALLY_EXPR case.
7123
7124 2003-11-17 Andrew Haley <aph@redhat.com>
7125
7126 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
7127 (struct lang_decl_var:freed): New variable.
7128 * decl.c (poplevel): Mark local vars that have gone out of scope.
7129 (push_jvm_slot): Don't use the RTL of a var that has gone out of
7130 scope.
7131
7132 2003-11-16 Jason Merrill <jason@redhat.com>
7133
7134 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
7135 and TAGS files that include them for each front end.
7136
7137 2003-11-15 Tom Tromey <tromey@redhat.com>
7138
7139 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
7140
7141 2003-11-12 Jason Merrill <jason@redhat.com>
7142
7143 PR optimization/12547
7144 * lang.c (java_tree_inlining_walk_subtrees): Just walk
7145 BLOCK_EXPR_BODY directly.
7146
7147 2003-11-12 Andrew Haley <aph@redhat.com>
7148
7149 PR java/11045
7150 * parse.y (fold_constant_for_init): Check that we really do have a
7151 constant.
7152
7153 PR java/11533
7154 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
7155 init_test_decls being inlined.
7156
7157 PR java/12890:
7158 * parse.y (do_resolve_class): Check return value from
7159 breakdown_qualified().
7160
7161 2003-11-11 Tom Tromey <tromey@redhat.com>
7162
7163 PR java/12915:
7164 * parse.y (merge_string_cste): Handle case where we have a
7165 pointer that happens to be zero, not null_pointer_node.
7166
7167 2003-11-10 Tom Tromey <tromey@redhat.com>
7168
7169 * jcf-parse.c (classify_zip_file): Correctly compare
7170 filename_length against length of manifest file's name.
7171
7172 2003-11-08 Tom Tromey <tromey@redhat.com>
7173
7174 PR java/12894:
7175 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
7176
7177 2003-11-06 Andrew Haley <aph@redhat.com>
7178
7179 * expr.c (java_stack_swap): Make sure destination stack slots are
7180 of the correct type.
7181
7182 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
7183
7184 * Make-lang.in (dvi): Move targets to $(docobjdir).
7185 (gcj.dvi): Simplify rule and adjust target.
7186 (gcj.info): Simplify rule.
7187 (gcj.pod): New intermediate rule.
7188 (gcjh.pod): Likewise.
7189 (jv-scan.pod): Likewise.
7190 (jcf-dump.pod): Likewise.
7191 (gij.pod): Likewise.
7192 (jv-convert.pod): Likewise.
7193 (rmic.pod): Likewise.
7194 (rmiregistry.pod): Likewise.
7195 (gcj.1): Delete.
7196 (gcjh.1): Delete.
7197 (jv-scan.1): Delete.
7198 (jcf-dump.1): Delete.
7199 (gij.1): Delete.
7200 (jv-convert.1): Delete.
7201 (rmic.1): Delete.
7202 (rmiregistry.1): Delete.
7203
7204 2003-11-02 Jeff Sturm <jsturm@one-point.com>
7205
7206 Fixes PR java/12866.
7207 * parse.y (resolve_qualified_expression_name): Move test
7208 for outer field access methods from here...
7209 (check_thrown_exceptions) ...to here.
7210
7211 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
7212
7213 * .cvsignore: Delete.
7214
7215 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
7216
7217 * verify.c (verify_jvm_instructions): Don't warn about legal
7218 eh binding regions generated for example by jdk 1.4.1.
7219
7220 2003-10-24 David S. Miller <davem@redhat.com>
7221
7222 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
7223
7224 2003-10-22 Andrew Haley <aph@redhat.com>
7225
7226 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
7227 (java_get_callee_fndecl): New.
7228
7229 * jcf-parse.c (java_parse_file): Call emit_catch_table().
7230
7231 * java-tree.h (ctable_decl): New.
7232 (catch_classes): New.
7233 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
7234
7235 * decl.c (java_init_decl_processing): Add catch_class_type.
7236 Add ctable_decl.
7237 Add catch_classes field.
7238
7239 * class.c (build_indirect_class_ref): Break out from
7240 build_class_ref.
7241 (make_field_value): Check flag_indirect_dispatch.
7242 (make_class_data): Ditto.
7243 Tidy uses of PUSH_FIELD_VALUE.
7244 Add field catch_classes.
7245 (make_catch_class_record): New.
7246
7247 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
7248
7249 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
7250
7251 * jcf-write.c: Follow spelling conventions.
7252 * parse.y: Likewise.
7253
7254 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
7255
7256 * ChangeLog: Fix typos.
7257 * expr.c: Fix comment typos.
7258 * jcf-write.c: Likewise.
7259 * lang.c: Likewise.
7260 * lex.c: Likewise.
7261 * mangle.c: Likewise.
7262 * parse-scan.y: Likewise.
7263 * parse.y: Likewise.
7264
7265 2003-10-22 Tom Tromey <tromey@redhat.com>
7266
7267 * expr.c (expand_byte_code): Only warn about dead bytecode when
7268 extra_warnings is set.
7269
7270 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
7271
7272 Fix for PR java/12586.
7273 * mangle.c (find_compression_record_match): Don't iterate through
7274 package namespace elements unless they all match compression_table
7275 entries.
7276
7277 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
7278
7279 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
7280 (generate-manpages): Likewise.
7281 (java.maintainer-clean): Likewise.
7282 (gcj.info): Likewise.
7283 (gcj.1): Likewise.
7284 (gcjh.1): Likewise.
7285 (jv-scan.1): Likewise.
7286 (jcf-dump.1): Likewise.
7287 (gij.1): Likewise.
7288 (jv-convert.1): Likewise.
7289 (rmic.1): Likewise.
7290 (rmiregistry.1): Likewise.
7291 (java.install-man): Likewise.
7292 (parse-scan.o): Move and define complete compile line.
7293 (parse.o): Likewise.
7294 (jcf-tree-inline.o): Move.
7295
7296 2003-10-20 Mark Mitchell <mark@codesourcery.com>
7297
7298 * Make-lang.in (info): Update dependencies.
7299 (java.install-info): Remove.
7300 ($(srcdir)/java/gcj.info): Replace with ...
7301 ($(docobjdir)/gcj.info): ... this.
7302
7303 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
7304
7305 * Make-lang.in: Replace uses of $(target_alias) with
7306 $(target_noncanonical).
7307
7308 2003-10-09 Tom Tromey <tromey@redhat.com>
7309
7310 * decl.c (java_init_decl_processing): Declare signers field.
7311 * class.c (make_class_data): Set signers field.
7312
7313 2003-10-09 Jason Merrill <jason@redhat.com>
7314
7315 * parse.y (patch_assignment): Use make_node to create a BLOCK.
7316 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
7317 POINTER_TYPE.
7318
7319 2003-10-06 Mark Mitchell <mark@codesourcery.com>
7320
7321 * Make-lang.in (java.info): Replace with ...
7322 (info): ... this.
7323 (java.dvi): Replace with ...
7324 (dvi): ... this.
7325 (java.generated-manpages): Replace with ...
7326
7327 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
7328
7329 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
7330
7331 2003-10-01 Andrew Haley <aph@redhat.com>
7332
7333 * jcf-parse.c (java_parse_file): Write otable and atable.
7334 * java-tree.h (atable_methods): New.
7335 (atable_decl): New.
7336 (atable_syms_decl): New.
7337 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
7338 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
7339 (symbol_*type): Rename method_symbol* to symbol*type.
7340 (emit_offset_symbol_table): Delete.
7341 (emit_symbol_table): New.
7342 (get_symbol_table_index): New.
7343 (atable_type): New.
7344 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
7345 (build_known_method_ref): Likewise.
7346 (get_symbol_table_index): Rename from get_offset_table_index.
7347 Parameterize to allow re-use by differing types of symbol table.
7348 (build_invokevirtual): Pass table to get_offset_table_index.
7349 * decl.c (java_init_decl_processing): Push types and decls for
7350 atable and atable_syyms.
7351 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
7352 (make_class_data): Add new fields atable and atable_syms.
7353 (emit_symbol_table): Rename from emit_offset_symbol_table.
7354 Parameterize to allow re-use by different types of symbol table.
7355 (build_symbol_entry): Renamed from build_method_symbols_entry.
7356
7357 2003-09-30 Roger Sayle <roger@eyesopen.com>
7358
7359 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
7360 semantics for SAVE_EXPR, by caching the result in a temporary.
7361
7362 2003-09-28 Richard Henderson <rth@redhat.com>
7363
7364 * check-init.c (check_init): Save and restore input_location
7365 instead of file and line separately.
7366 * decl.c (java_expand_body): Likewise.
7367 * jcf-write.c (generate_bytecode_insns): Likewise.
7368 * parse.y (safe_layout_class): Likewise.
7369 * jcf-parse.c (read_class, parse_class_file): Likewise.
7370 (java_parse_file): Use %H for warning locator.
7371
7372 2003-09-28 Roger Sayle <roger@eyesopen.com>
7373
7374 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
7375 with void-type branches instead of using a COMPOUND_EXPR.
7376
7377 2003-09-28 Jeff Sturm <jsturm@one-point.com>
7378
7379 * decl.c (java_optimize_inline, dump_function): Remove.
7380 * java-tree.h (java_optimize_inline): Remove declaration.
7381 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
7382 * parse.y (source_end_java_method, java_expand_classes):
7383 Likewise. Remove dead code.
7384
7385 2003-09-27 Roger Sayle <roger@eyesopen.com>
7386
7387 * lang.c (java_init_options): Set flag_evaluation_order.
7388 * expr.c (force_evaluation_order): Don't attempt to force
7389 evaluation order of binary operations using save_expr.
7390 * parse.y (java_complete_lhs): No longer need to call
7391 force_evaluation_order when constructing binary operators.
7392
7393 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
7394 Bryce McKinlay <bryce@mckinlay.net.nz>
7395
7396 PR java/1333:
7397 * parse.y (not_accessible_field_error): New function.
7398 (resolve_expression_name): Check field access permissions.
7399 (resolve_qualified_expression_name): Use
7400 not_accessible_field_error.
7401 (resolve_qualified_expression_name): Likewise.
7402
7403 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7404
7405 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
7406
7407 2003-09-23 Roger Sayle <roger@eyesopen.com>
7408
7409 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
7410 with equal operands without side-effects.
7411
7412 2003-09-22 Jeff Sturm <jsturm@one-point.com>
7413
7414 * decl.c (java_init_decl_processing): Don't emit otable decls
7415 if flag_indirect_dispatch is not set.
7416
7417 2003-09-21 Richard Henderson <rth@redhat.com>
7418
7419 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7420 resource.c: Revert.
7421
7422 2003-09-21 Richard Henderson <rth@redhat.com>
7423
7424 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7425 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
7426
7427 2003-09-20 Richard Henderson <rth@redhat.com>
7428
7429 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
7430
7431 2003-09-18 Roger Sayle <roger@eyesopen.com>
7432
7433 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
7434 * check-init.c (check_init): Likewise.
7435
7436 2003-09-18 Roger Sayle <roger@eyesopen.com>
7437
7438 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
7439
7440 2003-09-16 Andrew Haley <aph@redhat.com>
7441
7442 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
7443
7444 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
7445
7446 Fixes PR java/9577
7447 * mangle.c (find_compression_record_match): Skip
7448 over a "6JArray" (the array template mangled string)
7449 IDENTIFIER_NODE.
7450 (mangle_array_type): Correct minor typo.
7451 (atms): Move definition to the beginning.
7452
7453 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
7454
7455 * class.c (add_miranda_methods): Ensure super-interfaces are laid
7456 out. Fix for PR java/12254.
7457
7458 2003-09-11 Richard Henderson <rth@redhat.com>
7459
7460 * parse.y (source_end_java_method): Update for new
7461 cgraph_finalize_function argument.
7462
7463 2003-09-09 Richard Henderson <rth@redhat.com>
7464
7465 * parse.y (source_end_java_method): Update call to
7466 cgraph_finalize_function.
7467
7468 2003-09-03 Jeff Sturm <jsturm@one-point.com>
7469
7470 * decl.c (java_expand_body): New function.
7471 * expr.c (build_class_init): Set DECL_IGNORED_P.
7472 * java-tree.h (start_complete_expand_method,
7473 java_expand_body): Declare.
7474 * jcf-parse.c (cgraph.h): Include.
7475 (java_parse_file): Handle flag_unit_at_a_time.
7476 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
7477 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
7478 (java_estimate_num_insns): Use walk_tree_without_duplicates.
7479 (java_start_inlining): New function.
7480 * parse.h (java_finish_classes): Declare.
7481 * parse.y: Include cgraph.h.
7482 (block): Don't special-case empty block production.
7483 (craft_constructor): Set DECL_INLINE.
7484 (source_end_java_method): Handle flag_unit_at_a_time.
7485 Replace inline code with call to java_expand_body.
7486 (start_complete_expand_method): Remove static modifier.
7487 (java_expand_method_bodies): Patch function tree for
7488 class initialization and/or synchronization as needed.
7489 Don't begin RTL expansion yet.
7490 (java_expand_classes): Check flag_unit_at_a_time before
7491 calling finish_class.
7492 (java_finish_classes): New function.
7493 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
7494 (patch_assignment): Set DECL_CONTEXT on temporary variable.
7495 (emit_test_initialization): Set DECL_IGNORED_P.
7496
7497 2003-09-03 Roger Sayle <roger@eyesopen.com>
7498
7499 * builtins.c (enum builtin_type): Delete unused enumeration.
7500 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
7501
7502 2003-08-28 Tom Tromey <tromey@redhat.com>
7503
7504 * gcj.texi (Extensions): Document gcjlib URLs.
7505
7506 2003-08-20 Tom Tromey <tromey@redhat.com>
7507
7508 * gcj.texi (Extensions): Added xref.
7509 (libgcj Runtime Properties): Document
7510 gnu.gcj.runtime.VMClassLoader.library_control.
7511
7512 2003-08-20 Andrew Haley <aph@redhat.com>
7513
7514 * except.c (prepare_eh_table_type): Use new encoding for exception
7515 handlers when using -fno-assume-compiled.
7516
7517 2003-08-13 Tom Tromey <tromey@redhat.com>
7518
7519 * gcj.texi (Invoking gij): Document -X and -?.
7520
7521 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
7522
7523 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
7524 GCJH_OBJS, JCFDUMP_OBJS
7525 * win32-host.c: Removed the unnecessary and broken dependency
7526 on jcf.h
7527
7528 2003-08-11 Tom Tromey <tromey@redhat.com>
7529
7530 * parse.y (java_check_regular_methods): Typo fixes. Call
7531 check_interface_throws_clauses. Use
7532 check_concrete_throws_clauses.
7533 (check_interface_throws_clauses): New function.
7534 (check_concrete_throws_clauses): New function.
7535 (hack_is_accessible_p): New function.
7536 (find_most_specific_methods_list): Added FIXME.
7537 * typeck.c (lookup_do): Use `flags' argument to decide what to
7538 do. Reimplemented.
7539 (lookup_argument_method_generic): New function.
7540 (lookup_argument_method2): Removed.
7541 * jcf.h (ACC_INVISIBLE): New define.
7542 * jcf-write.c (generate_classfile): Skip invisible methods.
7543 * class.c (add_miranda_methods): New function.
7544 (layout_class_methods): Use it.
7545 (get_access_flags_from_decl): Use ACC_INVISIBLE.
7546 * java-tree.h (METHOD_INVISIBLE): New define.
7547 (lang_decl_func) [invisible]: New field.
7548 (lookup_argument_method_generic): Declare.
7549 (SEARCH_INTERFACE): New define.
7550 (SEARCH_SUPER): Likewise.
7551 (SEARCH_ONLY_INTERFACE): Likewise.
7552 (SEARCH_VISIBLE): Likewise.
7553 (lookup_argument_method2): Removed declaration.
7554
7555 2003-08-05 Tom Tromey <tromey@redhat.com>
7556
7557 Fix for PR java/11600:
7558 * parse.y (java_complete_lhs): See whether we're calling a method
7559 on an array.
7560 (check_thrown_exceptions): Added `is_array_call' argument;
7561 fixed `clone' checking; updated all callers.
7562
7563 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
7564
7565 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
7566
7567 2003-08-03 Tom Tromey <tromey@redhat.com>
7568
7569 * java-tree.h (METHOD_TRANSIENT): Removed.
7570 * decl.c (pushdecl): Removed some dead code.
7571 * class.c (get_access_flags_from_decl): Can't have transient
7572 method.
7573 (add_method_1): Can't have a transient method.
7574
7575 2003-07-28 Andreas Jaeger <aj@suse.de>
7576
7577 * jvspec.c: Convert to ISO C90 prototypes.
7578
7579 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
7580
7581 * decl.c (force_poplevels): Fix warning call.
7582
7583 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7584
7585 * expr.c (expand_java_field_op): Don't use xxx_with_decl
7586 (expand_java_field_op): Likewise.
7587 * class.c (layout_class_method): Likewise
7588 (emit_register_classes): Likewise.
7589 * decl.c (pushdecl): Likewise.
7590 (poplevel): Likewise.
7591 (force_poplevels): Likewise.
7592 (give_name_to_locals): Likewise.
7593 * check-init.c (check_for_initialization): Likewise.
7594
7595 2003-07-24 Jason Merrill <jason@redhat.com>
7596
7597 * java-tree.h: Move boolean_type_node et al to the back end.
7598
7599 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7600
7601 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7602 casts.
7603
7604 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
7605
7606 * lang.opt: Don't show -MD_ and -MDD_.
7607
7608 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
7609
7610 * lang-options.h: Remove.
7611 * lang.opt: Add help text.
7612
7613 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
7614
7615 * expr.c: Remove the last argument to expand_assignment().
7616
7617 2003-07-09 Jan Hubicka <jh@suse.cz>
7618
7619 * java-tree.h (DECL_NUM_STMTS): Rename to...
7620 (DECL_ESTIMATED_INSNS): ... this.
7621 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7622 New static functions.
7623 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7624 * parser.y (add_stmt_to_compound): Do not account statements.
7625
7626 2003-07-08 Mark Wielaard <mark@klomp.org>
7627
7628 * gcj.texi: CNI now expands to Compiled Native Interface.
7629
7630 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7631
7632 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7633
7634 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
7635
7636 * expr.c (expand_byte_code): Adjist emit_line_note call.
7637
7638 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
7639
7640 * lang.c (java_handle_option): Don't handle filenames.
7641
7642 2003-07-02 Zack Weinberg <zack@codesourcery.com>
7643
7644 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7645 DIR_SEPARATOR.
7646 Use FILENAME_CMP.
7647 * jcf-write.c: Don't default-define DIR_SEPARATOR.
7648 * jcf.h: Delete COMPARE_FILENAMES definition.
7649
7650 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
7651
7652 * lang.c (java_init_options): Update prototype.
7653
7654 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
7655
7656 * decl.c (poplevel): Adjust define_label call.
7657
7658 2003-06-27 Zack Weinberg <zack@codesourcery.com>
7659
7660 * gjavah.c (flag_jni): Make non-static.
7661 * parse-scan.y (ctxp): Make non-static.
7662
7663 * class.c (build_method_symbols_entry)
7664 * expr.c (get_offset_table_index)
7665 * jcf-parse.c (jcf_parse):
7666 Mark the definition static, matching the forward declaration.
7667
7668 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
7669
7670 * lang.c (java_handle_option): Don't check for missing arguments.
7671
7672 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
7673
7674 * class.c (push_class): Use a location_t to save place.
7675 (emit_register_classes): Set input_location. Adjust
7676 expand_function_end call.
7677 * resource.c (write_resource_constructor): Likewise.
7678 * decl.c (end_java_method): Adjust expand_function_end call.
7679 * parse.y (source_end_java_method): Likewise.
7680
7681 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
7682
7683 * lang.c (java_handle_option): Likewise.
7684
7685 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
7686
7687 * lang.c (java_handle_option): Special-casing of optional
7688 joined arguments no longer needed.
7689 * lang.opt: Update switches that take optional argument.
7690
7691 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7692
7693 * lang.opt: Declare Java.
7694 * lang.c (java_init_options): Update.
7695
7696 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7697
7698 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7699
7700 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7701
7702 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7703 * lang.c (java_handle_option): -MD and -MMD have an underscore.
7704 * lang.opt: -MD and -MMD have an underscore.
7705
7706 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
7707
7708 * class.c (emit_register_classes): Adjust init_function_start
7709 call.
7710 * decl.c (complete_start_java_method): Likewise.
7711 * resource.c (write_resource_constructor): Likewise.
7712
7713 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7714
7715 * Make-lang.in: Update to use options.c and options.h.
7716 * lang.c: Include options.h not j-options.h.
7717 (java_handle_option): Abort on unrecognized option.
7718 (java_init_options): Request Java switches.
7719
7720 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
7721
7722 * Make-lang.in: Handle mostlyclean.
7723
7724 2003-06-11 Tom Tromey <tromey@redhat.com>
7725
7726 * lang.c (java_handle_option): Update dependency_tracking for
7727 OPT_MF case.
7728
7729 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7730 empty argument.
7731
7732 2003-06-10 Andrew Haley <aph@redhat.com>
7733
7734 * resource.c (write_resource_constructor): Use expand_expr to
7735 generate the address of the label attached to a resource.
7736 * Make-lang.in (java/resource.o): Add expr.h
7737
7738 2003-06-10 Andrew Haley <aph@redhat.com>
7739
7740 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7741 (java_decl_ok_for_sibcall): New.
7742
7743 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
7744
7745 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7746 (java/j-options.c, java/j-options.h): New.
7747 * java-tree.h (resource_name, compile_resource_file,
7748 compile_resource_data): Constify.
7749 * jcf-write.c (jcf_write_base_directory): Similarly.
7750 * jcf.h (jcf_write_base_directory): Similarly.
7751 * lang.c: Include j-options.h.
7752 (cl_options_count, cl_options, string_option, java_decode_option,
7753 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7754 process_option_with_no): Remove.
7755 (resource_name): Constify.
7756 (LANG_HOOKS_HANDLE_OPTION): Override.
7757 (java_handle_option): New.
7758 (java_init): Don't call jcf_path_init.
7759 (java_init_options): Call jcf_path_init.
7760 * lang.opt: New.
7761 * resource.c (compile_resource_data, compile_resource_file): Constify.
7762
7763 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
7764
7765 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7766 (struct lang_decl_func): Add last_line field.
7767 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7768 DECL_SOURCE_LINE_LAST): Remove.
7769 * parse.y (missing_return_error, finish_method_declaration,
7770 lookup_cl, start_artificial_method_body, source_end_java_method,
7771 start_complete_expand_method): Adjust.
7772
7773 2003-06-08 Tom Tromey <tromey@redhat.com>
7774
7775 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7776 fno-assume-compiled.
7777
7778 2003-06-08 Roger Sayle <roger@eyesopen.com>
7779
7780 * builtins.c (define_builtin_type, builtin_types): Delete.
7781 (define_builtin): Rewritten to take just the built-in code,
7782 the function's name, type and fallback library function name.
7783 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7784 (initialize_builtins): Overhaul to define the GCC builtins
7785 used by gcj manually, providing the Java run-time's
7786 implementations as the fallback library function.
7787
7788 2003-06-08 Anthony Green <green@redhat.com>
7789
7790 * parse.y (patch_cast): Fix conversions from floating-point to
7791 integral types.
7792
7793 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
7794
7795 * Make-lang.in: Update.
7796 * lang.c: Include opts.h. Define cl_options_count and cl_options.
7797
7798 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
7799
7800 * lang.c (java_init_options): Update.
7801
7802 2003-06-05 Jan Hubicka <jh@suse.cz>
7803
7804 * Make-lang.in: Add support for stageprofile and stagefeedback
7805
7806 2003-05-31 Roger Sayle <roger@eyesopen.com>
7807
7808 * lang.c (java_init_options): Prescribe wrap-around two's
7809 complement arithmetic overflow by setting flag_wrapv.
7810
7811 2003-05-29 Roger Sayle <roger@eyesopen.com>
7812
7813 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7814 (builtin_record): Add an additional builtin_code field to
7815 record which GCC built-in corresponds to the Java function.
7816 (java_builtins): Add new entries for atan, atan2, exp, log,
7817 pow and tan.
7818 (max_builtin, min_builtin, abs_builtin): Perform constant
7819 folding on the resulting tree.
7820 (java_build_function_call_expr): Likewise, perform constant
7821 folding on the resulting tree.
7822 (initialize_builtins): The NULL creators are now allowed in
7823 the java_builtins table, which is now terminated by an entry
7824 with builtin_code == END_BUILTINS.
7825 (check_for_builtin): Likewise. If the matching creator is
7826 NULL, construct the call using java_build_function_call_expr
7827 directly with the decl for the corresponding builtin_code.
7828
7829 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
7830
7831 * win32-host.c: Normalize copyright boilerplate.
7832
7833 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7834
7835 * parse.y (print_int_node): Use string concatentation on
7836 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7837 function calls into one.
7838
7839 2003-05-13 Zack Weinberg <zack@codesourcery.com>
7840
7841 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7842 fatal_io_error with calls to fatal_error; add ": %m" to the end of
7843 all the affected error messages.
7844
7845 2003-05-13 Richard Henderson <rth@redhat.com>
7846
7847 * class.c (layout_class_method): Set DECL_EXTERNAL.
7848 * decl.c (java_mark_decl_local, java_mark_class_local): New.
7849 * java-tree.h (java_mark_class_local): Declare.
7850 * jcf-parse.c (parse_class_file): Use it.
7851 * parse.y (java_expand_classes): Likewise.
7852
7853 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
7854
7855 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7856 * lex.h: #include input.h.
7857 * jv-scan.c (input_filename): Remove.
7858
7859 2003-05-02 Tom Tromey <tromey@redhat.com>
7860
7861 PR java/10491:
7862 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7863 (handle_inner_classes): New function.
7864
7865 2003-05-01 Tom Tromey <tromey@redhat.com>
7866
7867 PR java/10459:
7868 * parse.y (finish_for_loop): Do nothing if update expression is a
7869 EXPR_WFL_NODE wrapping nothing.
7870 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7871
7872 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
7873
7874 * lex.h (input_lineno): Remove declaration.
7875 * parse-scan.y: #include input.h.
7876 (input_filename): Remove declaration.
7877 (input_location): Add definition.
7878 (input_line): Remove definition.
7879
7880 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
7881
7882 * lex.h (lineno): Rename to ...
7883 (input_line): ... here
7884 * parse-scan.y (lineno): Rename to ...
7885 (input_line): ... here.
7886 (reset_report): Rename lineno to input_line.
7887 * check-init.c (check_init): Likewise.
7888 * class.c (push_class): Likewise.
7889 * decl.c (complete_start_java_method, end_java_method): Likewise.
7890 * expr.c (expand_byte_code): Likewise.
7891 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7892 * jcf-write.c (generate_bytecode_insns): Likewise.
7893 * lex.c (java_init_lex, java_allocate_new_line,
7894 do_java_lex): Likewise.
7895 * parse.h (YYNOT_TWICE): Likewise.
7896 * parse.y (empty_statement, expression_statement,
7897 java_pop_parser_context, java_parser_context_save_global,
7898 yyerror, register_fields, method_header, safe_layout_class,
7899 find_in_imports_on_demand, create_artificial_method,
7900 source_end_java_method, start_complete_expand_method,
7901 build_thisn_assign, java_complete_lhs,
7902 maybe_absorb_scoping_block): Likewise.
7903
7904 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
7905
7906 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7907 '/' when computing java source filename
7908
7909 2003-04-13 Tom Tromey <tromey@redhat.com>
7910
7911 * gjavah.c (print_c_decl): Indentation fix.
7912
7913 2003-04-12 Zack Weinberg <zack@codesourcery.com>
7914
7915 * class.c (make_field_value, make_method_value, get_dispatch_table)
7916 (make_class_data, emit_offset_symbol_table)
7917 * constants.c (build_constants_constructor)
7918 * java-tree.h (START_RECORD_CONSTRUCTOR)
7919 * parse.y (maybe_build_array_element_wfl):
7920 Use build_constructor.
7921
7922 2003-04-10 Eric Blake <ebb9@email.byu.edu>
7923
7924 PR java/10253:
7925 * parse.y (string_convert_int_cst): Always use at least one digit
7926 in string conversion. Remove ASCII dependence.
7927 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7928
7929 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
7930
7931 * Make-lang.in: added win32-host.c
7932 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7933 resolves to open() on non-Win32 platforms and
7934 Win32-specific jcf_open_exact_case() on Win32
7935 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7936 when trying .java and .class files
7937 * win32-host.c: added to repository. Defines
7938 Win32-specific jcf_open_exact_case()
7939
7940 2003-04-10 Andrew Haley <aph@redhat.com>
7941
7942 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7943 (maybe_free_localvar): Renamed from localvar_free.
7944 Add new arg, really.
7945 (generate_bytecode_insns): Set new variable, jsrs.
7946 Only free local vars if no jsr insns have been emittted.
7947 Call maybe_free_localvar, not localvar_free.
7948
7949 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
7950
7951 * gcj.texi: Remove @ at start of file.
7952
7953 2003-03-25 Tom Tromey <tromey@redhat.com>
7954
7955 * parse.y (create_interface): Call CHECK_DEPRECATED.
7956
7957 2003-03-23 Zack Weinberg <zack@codesourcery.com>
7958
7959 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7960
7961 2003-03-21 Zack Weinberg <zack@codesourcery.com>
7962
7963 * javaop.h (jfloat, jdouble): Make them structures mirroring
7964 the bit fields of IEEE float and double respectively.
7965 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7966 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7967 (union Word, union DWord): Delete.
7968 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7969
7970 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7971 D_NAN_MASK): Delete.
7972 (jni_print_float, jni_print_double): New. Generate
7973 hexadecimal floating constants.
7974 (print_field_info): Use jni_print_float/double.
7975
7976 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
7977 finite floating point numbers for output; special case
7978 non-finite floats.
7979
7980 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
7981
7982 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7983 Replace 0 and 1 with true and false in return statements.
7984
7985 2003-03-19 Tom Tromey <tromey@redhat.com>
7986
7987 * lex.c (do_java_lex): Renamed from java_lex.
7988 (java_lex): New function.
7989 Include timevar.h.
7990
7991 2003-03-13 Tom Tromey <tromey@redhat.com>
7992
7993 * parse.y (resolve_inner_class): Error if qualifier is a primitive
7994 type.
7995
7996 2003-03-04 Andrew Haley <aph@redhat.com>
7997
7998 * gjavah.c (is_first_data_member): New global variable.
7999 (print_c_decl): If it's the first data member, align it as the
8000 superclass.
8001 (process_file): Set is_first_data_member.
8002
8003 2003-03-11 Tom Tromey <tromey@redhat.com>
8004
8005 * parse.y (resolve_field_access): Initialize class if field is
8006 found in another static field.
8007 * expr.c (build_class_init): Don't optimize out initialization of
8008 implemented interface.
8009
8010 2003-03-11 Andrew Haley <aph@redhat.com>
8011
8012 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
8013 warning.
8014
8015 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
8016
8017 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
8018 and DIR_SEPARATOR_2 for a target.
8019 Correct minor typos.
8020
8021 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
8022 and DIR_SEPARATOR_2 for a target into account.
8023
8024 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
8025
8026 * lang.c (java_init): Update prototype, move code to java_post_options.
8027 (java_post_options): Similarly.
8028
8029 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
8030
8031 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
8032 compare file name components depending on the case-sensitivity
8033 or otherwise of the host file system.
8034
8035 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
8036 "strcmp" to compare file name components.
8037 Use IS_DIR_SEPARATOR instead of comparing directly against
8038 DIR_SEPARATOR.
8039 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
8040 comparing directly against DIR_SEPARATOR.
8041
8042 2003-03-04 Tom Tromey <tromey@redhat.com>
8043
8044 * Make-lang.in (java.tags): New target.
8045
8046 2003-03-01 Roger Sayle <roger@eyesopen.com>
8047
8048 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
8049 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
8050
8051 2003-03-01 Tom Tromey <tromey@redhat.com>
8052
8053 * parse.y (jdep_resolve_class): Only check deprecation if we found
8054 a decl.
8055
8056 2003-02-28 Tom Tromey <tromey@redhat.com>
8057
8058 PR java/9695:
8059 * class.c (maybe_layout_super_class): Always pass a WFL to
8060 do_resolve_class.
8061 * parse.y (do_resolve_class): Updated comment to explain
8062 parameters.
8063
8064 2003-02-26 Tom Tromey <tromey@redhat.com>
8065
8066 * jcf-write.c (generate_classfile): Check whether class is
8067 deprecated before writing attribute count.
8068
8069 2003-02-25 Roger Sayle <roger@eyesopen.com>
8070
8071 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
8072 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
8073
8074 2003-02-23 Tom Tromey <tromey@redhat.com>
8075
8076 * lang-options.h: Added -Wdeprecated.
8077 * gcj.texi (Warnings): Document -Wdeprecated.
8078 * java-tree.h (flag_deprecated): Declare.
8079 * lang.c (lang_W_options): Added deprecated.
8080 (flag_deprecated): New global.
8081 * chartables.h: Rebuilt.
8082 * gen-table.pl (process_one): Look at whitespace.
8083 (print_tables): Define LETTER_SPACE, LETTER_MASK.
8084 * parse.h (CLEAR_DEPRECATED): New macro.
8085 (CHECK_DEPRECATED_NO_RESET): New macro.
8086 * jcf-parse.c (handle_deprecated): New function.
8087 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
8088 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
8089 * parse.y (resolve_type_during_patch): Check deprecation.
8090 (jdep_resolve_class): Likewise.
8091 (process_imports): Likewise.
8092 (resolve_expression_name): Likewise.
8093 (check_deprecation): Strip arrays from decl. Check
8094 flag_deprecated.
8095 (patch_method_invocation): Also check the particular constructor
8096 for deprecation.
8097 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
8098 * jcf-write.c (append_deprecated_attribute): New function.
8099 (generate_classfile): Generate deprecated attribute when
8100 appropriate.
8101 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
8102 (java_lex) [case '*']: Simplify logic.
8103 (java_start_char_p): Use LETTER_MASK.
8104 (java_part_char_p): Likewise.
8105 (java_space_char_p): New function.
8106
8107 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
8108
8109 Change base class access representation.
8110 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
8111 (add_interface_do): Likewise.
8112
8113 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
8114
8115 * decl.c (java_init_decl_processing): Change
8116 soft_lookupjnimethod_node to reflect the change in
8117 signature of _Jv_LookupJNIMethod in libjava/jni.cc
8118 * expr.c (build_jni_stub): Calculate and pass the size
8119 on the stack of the arguments to a JNI function. Use
8120 new target macro MODIFY_JNI_METHOD_CALL to allow a
8121 target to modify the call to a JNI method.
8122
8123 2003-02-08 Roger Sayle <roger@eyesopen.com>
8124
8125 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
8126 instead of basename to avoid compiler warnings on Tru64.
8127
8128 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
8129
8130 * gcj.texi: Update to GFDL 1.2.
8131
8132 2003-01-31 Andrew Haley <aph@redhat.com>
8133
8134 * parse.y (java_expand_classes): Scan the whole class list looking
8135 for access methods that haven't yet been expanded.
8136
8137 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
8138
8139 Fix for java/4269:
8140
8141 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
8142 to fix bootstrap on sparc-unknown-netbsdelf1.5.
8143 * jcf-parse.c: Likewise.
8144
8145 2003-01-31 Mark Wielaard <mark@klomp.org>
8146
8147 * gjavah.c (throwable_p): Allocate 1 more byte for string.
8148
8149 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
8150
8151 * class.c (make_class): Use BINFO_ELTS.
8152 (set_super_info): Likewse.
8153 (add_interface_do): Likewise.
8154
8155 2003-01-30 Tom Tromey <tromey@redhat.com>
8156
8157 * jcf-parse.c (read_class): Update identifier's class value if it
8158 changed during parsing.
8159
8160 2003-01-30 Loren James Rittle <ljrittle@acm.org>
8161
8162 * Make-lang.in (po-generated): Find the targets in $(parsedir).
8163 Propagate change to all other rules as required.
8164 (java/parse-scan.o): Add explicit dependency on
8165 $(parsedir)/java/parse-scan.c .
8166
8167 2003-01-29 Tom Tromey <tromey@redhat.com>
8168
8169 * parse.y (patch_assignment): Only transform the rhs of an
8170 assignment when compiling to native.
8171
8172 2003-01-28 Tom Tromey <tromey@redhat.com>
8173
8174 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
8175
8176 2003-01-28 Tom Tromey <tromey@redhat.com>
8177
8178 * lex.c (java_lex): Don't include UEOF as part of token.
8179 (java_read_unicode): Error if \u sequence prematurely terminated.
8180
8181 2003-01-27 Tom Tromey <tromey@redhat.com>
8182
8183 * parse.y (java_check_regular_methods): Check for construct after
8184 checking types in throws clause.
8185
8186 2003-01-24 Tom Tromey <tromey@redhat.com>
8187
8188 * class.c (build_static_field_ref): Only a String or numeric field
8189 can fold to a constant.
8190
8191 2003-01-23 Tom Tromey <tromey@redhat.com>
8192
8193 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
8194 file name in resource buffer.
8195
8196 2003-01-23 Tom Tromey <tromey@redhat.com>
8197
8198 * expr.c (build_known_method_ref): Use method's context to find
8199 method table index.
8200
8201 2003-01-23 Tom Tromey <tromey@redhat.com>
8202
8203 * constants.c (set_constant_entry): Allocated cleared memory.
8204
8205 2003-01-22 Tom Tromey <tromey@redhat.com>
8206
8207 * java-tree.h: Don't use PARAMS.
8208 * resource.c: Add prototypes for all functions.
8209 (write_resource_constructor): Use `const char *' to avoid
8210 warning.
8211
8212 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
8213
8214 * jcf-parse.c (process_zip_dir): Remove unused variable.
8215
8216 2003-01-22 Tom Tromey <tromey@redhat.com>
8217
8218 * expr.c (build_invokeinterface): Abort if method's context is not
8219 an interface.
8220
8221 2003-01-22 Tom Tromey <tromey@redhat.com>
8222
8223 * gcj.texi (Input and output files): Mention non-class entries.
8224 * decl.c (java_init_decl_processing): Call
8225 init_resource_processing.
8226 * java-tree.h (compile_resource_data, write_resource_constructor,
8227 compile_resource_file, init_resource_processing): Declare.
8228 * config-lang.in (gtfiles): Added resource.c.
8229 * Make-lang.in (gt-java-resource.h): New target.
8230 (JAVA_OBJS): Added resource.o.
8231 (java/resource.o): New target.
8232 * resource.c: New file.
8233 * class.c (compile_resource_file): Moved to resource.c.
8234 (registerResource_libfunc): Likewise.
8235 (utf8_decl_list): Mark with GTY; now static.
8236 * jcf-parse.c (classify_zip_file): New function.
8237 (parse_zip_file_entries): Use it; compile .properties files.
8238 (process_zip_dir): Use classify_zip_file and compute_class_name.
8239 Don't write class name into zip directory.
8240 (java_parse_file): Call write_resource_constructor.
8241 (compute_class_name): New function.
8242 * jcf-io.c (read_zip_member): Reindented.
8243
8244 2003-01-21 Tom Tromey <tromey@redhat.com>
8245
8246 * class.c (supers_all_compiled): New function.
8247 (make_class_data): Use it.
8248
8249 2003-01-21 Tom Tromey <tromey@redhat.com>
8250
8251 * parse.y (method_header): Native method can't be strictfp.
8252 No method can be transient or volatile.
8253
8254 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8255
8256 Make-lang.in (jvspec.o-warn): Add -Wno-error.
8257
8258 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
8259
8260 * check-init.c: Fix comment typos.
8261 * class.c: Likewise.
8262 * constants.c: Likewise.
8263 * decl.c: Likewise.
8264 * except.c: Likewise.
8265 * expr.c: Likewise.
8266 * java-except.h: Likewise.
8267 * java-tree.h: Likewise.
8268 * javaop.h: Likewise.
8269 * jcf-dump.c: Likewise.
8270 * jcf-io.c: Likewise.
8271 * jcf-parse.c: Likewise.
8272 * jcf-write.c: Likewise.
8273 * lang.c: Likewise.
8274 * mangle.c: Likewise.
8275 * typeck.c: Likewise.
8276 * verify.c: Likewise.
8277
8278 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8279
8280 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
8281 * jcf-write.c: Include "tm_p.h".
8282
8283 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8284
8285 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
8286
8287 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8288
8289 * builtins.c (java_build_function_call_expr): Renamed from
8290 build_function_call_expr. All callers changed.
8291
8292 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
8293 * jcf-parse.c: Include tm_p.h.
8294
8295 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
8296 warning.
8297
8298 2003-01-14 Tom Tromey <tromey@redhat.com>
8299
8300 * class.c (make_class_data): Check that super is compiled before
8301 building class reference to it.
8302
8303 2003-01-14 Andrew Haley <aph@redhat.com>
8304
8305 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8306 varargs function -- correct.
8307
8308 2003-01-14 Andrew Haley <aph@redhat.com>
8309
8310 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
8311
8312 2003-01-14 Andrew Haley <aph@redhat.com>
8313
8314 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8315 varargs function -- correct.
8316
8317 * parse.y (patch_assignment): Copy the rhs of an assignment into a
8318 temporary if the RHS is a reference.
8319
8320 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8321
8322 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
8323 * keyword.h: Regenerated.
8324
8325 * All Files: Convert to ISO C style function definitions.
8326
8327 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
8328
8329 * parse.y (check_pkg_class_access): ANSIfy definition.
8330
8331 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8332
8333 * decl.c, parse-scan.y, parse.y: Don't cast return value of
8334 xmalloc et al.
8335
8336 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
8337
8338 2003-01-09 Geoffrey Keating <geoffk@apple.com>
8339
8340 Merge from pch-branch:
8341
8342 2002-12-02 Geoffrey Keating <geoffk@apple.com>
8343
8344 * Make-lang.in (java/gjavah.o): Update dependencies.
8345 * gjavah.c: Include ggc.h.
8346
8347 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
8348
8349 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
8350 (JCFDUMP_OBJS): Add ggc-none.o.
8351 (java/jcf-dump.o): Depend on GGC_H.
8352 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
8353 CPool substructures.
8354 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
8355 * jcf-dump.c: Include ggc.h.
8356
8357 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
8358
8359 * jcf.h (union cpool_entry): New.
8360 (struct CPool): Use gengtype to mark. Change field 'data' to be
8361 an array of unions.
8362 (struct JCF): Use gengtype to mark.
8363 (CPOOL_UINT): Update for new cpool_entry type.
8364 (CPOOL_USHORT1): Likewise.
8365 (CPOOL_USHORT2): Likewise.
8366 (CPOOL_FINISH): Use GC to free cpool subfields.
8367 * parse.h (struct parser_ctxt): Mark field current_jcf.
8368 * lex.c (java_init_lex): Use GC to allocate struct JCF.
8369 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
8370 (main_jcf): Use gengtype to mark.
8371 (ggc_mark_jcf): Delete.
8372 (get_constant): Update for new cpool_entry type.
8373 (give_name_to_class): Likewise.
8374 (get_class_constant): Likewise.
8375 (init_outgoing_cpool): Use GGC to allocate struct CPool.
8376 (java_parse_file): Use GGC to allocate struct JCF.
8377 (init_jcf_parse): Don't call ggc_add_root.
8378 * jcf-reader.c (jcf_parse_constant_pool): Update for new
8379 cpool_entry type.
8380 * java-tree.h (current_jcf): Use gengtype to mark.
8381 (CPOOL_UTF): Update for new cpool_entry type.
8382 (outgoing_cpool): Use gengtype to mark.
8383 (struct lang_type): GC struct JCF and struct CPool.
8384 * config-lang.in (gtfiles): Add jcf.h.
8385 * constants.c (find_tree_constant): New.
8386 (set_constant_entry): Allocate cpool subfields using GGC. Update
8387 for new cpool_entry type.
8388 (find_constant1): Update for new cpool_entry type.
8389 (find_constant2): Likewise.
8390 (find_utf8_constant): Use find_tree_constant.
8391 (find_class_or_string_constant): Remove unnecessary cast to jword.
8392 Update for new cpool_entry type.
8393 (count_constant_pool_bytes): Update for new cpool_entry type.
8394 (write_constant_pool): Likewise.
8395 (alloc_name_constant): Use find_tree_constant.
8396 (build_constants_constructor): Update for new cpool_entry type.
8397
8398 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
8399
8400 * parse.y (mark_parser_ctxt): Delete.
8401 (goal): Don't use ggc_add_root.
8402 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
8403 (java_pop_parser_context): Let GC free parser_ctxt.
8404 (java_parser_context_resume): Likewise.
8405 * parse.h (struct parser_ctxt): Use gengtype to mark.
8406 (ctxp): Likewise.
8407 (ctxp_for_generation): Likewise.
8408 * lex.h (struct java_lc_s): Mark for gengtype.
8409 (java_lexer): Rearrange for gengtype.
8410 * config-lang.in (gtfiles): Add lex.h, parse.h.
8411
8412 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8413
8414 * All Files: Remove PARAMS macro.
8415
8416 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
8417 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
8418 `__STDC__' macros.
8419
8420 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
8421 VA_CLOSE.
8422
8423 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
8424
8425 * Make-lang.in (java.install-common, java.uninstall,
8426 java.install-info, java.install-man): Prepend $(DESTDIR)
8427 to destination paths in all (un)installation commands.
8428 (java.install-common): Rewrite $(LN) command to support
8429 DESTDIR with "ln" as well as with "ln -s".
8430
8431 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
8432
8433 * java-tree.h: Protect against multiple inclusion.
8434
8435 2003-01-07 Tom Tromey <tromey@redhat.com>
8436
8437 * class.c (add_assume_compiled): Don't adjust parent if we're
8438 already at the root of tree.
8439
8440 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8441
8442 * lang.c (dump_compound_expr): Prototype.
8443
8444 2003-01-03 Tom Tromey <tromey@redhat.com>
8445
8446 Fix for PR java/8712:
8447 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
8448 when simply checking against `null'.
8449
8450 2003-01-03 Tom Tromey <tromey@redhat.com>
8451
8452 * gcj.texi (Standard Properties): Document http.proxyHost and
8453 http.proxyPort.
8454
8455 * gcj.texi (GNU Classpath Properties): Document new properties.
8456
8457 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8458
8459 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
8460 java/lang-options.h, java/mangle.c, java/mangle_name.c,
8461 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
8462
8463 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
8464
8465 * Make-lang.in, boehm.c, buffer.c,
8466 buffer.h, builtins.c, class.c,
8467 config-lang.in, constants.c,
8468 convert.h, decl.c, except.c,
8469 expr.c, java-except.h,
8470 java-tree.h, javaop.def,
8471 jcf-parse.c, jcf-write.c,
8472 jv-scan.c, jvgenmain.c,
8473 jvspec.c, keyword.gperf,
8474 keyword.h, lang-options.h,
8475 lang-specs.h, lang.c, lex.c,
8476 lex.h, mangle.c, mangle_name.c,
8477 parse-scan.y, parse.h, parse.y,
8478 typeck.c, verify.c, xref.c,
8479 xref.h: Replace "GNU CC" with
8480 "GCC" in the copyright header.
8481
8482 * check-init.c, gjavah.c, javaop.h,
8483 jcf-depend.c, jcf-dump.c, jcf-io.c,
8484 jcf-path.c, jcf-reader.c, jcf.h,
8485 zextract.c, zipfile.h: These files are
8486 "part of GCC". Also say "GCC" not "GNU CC".
8487
8488 2002-12-30 DJ Delorie <dj@redhat.com>
8489
8490 * Make-lang.in: Protect against texi2pod/pod2man failing.
8491
8492 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
8493
8494 * gcj.texi: Use @copying.
8495
8496 2002-12-27 Mark Mitchell <mark@codesourcery.com>
8497
8498 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
8499 print_cxx_classname.
8500 (print_cxx_classname): Add add_scope parameter.
8501 (print_class_decls): Do not emit a semicolon after the extern
8502 "Java" block.
8503 (process_file): Adjust calls to print_cxx_classname.
8504
8505 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
8506
8507 * gcj.texi: Include Cover Texts in man page.
8508
8509 2002-12-23 Jeff Sturm <jsturm@one-point.com>
8510
8511 * class.c (build_static_field_ref): Check FIELD_FINAL.
8512
8513 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
8514 instead of current_constant_pool_data_ref.
8515 * java-tree.h (current_constant_pool_data_ref): Undefine.
8516 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
8517 * jcf-parse.c (init_outgoing_cpool): Don't initialize
8518 current_constant_pool_data_ref.
8519
8520 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
8521 not build_internal_class_name.
8522
8523 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
8524 Use it when class ref isn't certain to be compiled.
8525
8526 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
8527
8528 * gcj.texi: Include gcc-common.texi.
8529 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
8530 $(srcdir)/doc/include/gcc-common.texi.
8531
8532 2002-12-22 Anthony Green <green@redhat.com>
8533
8534 * gcj.texi (Limitations): Add note about org.xml.sax and
8535 org.w3c.dom.
8536
8537 2002-12-20 Tom Tromey <tromey@redhat.com>
8538
8539 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
8540 where minimum case value is Integer.MIN_VALUE.
8541 Fixes PR java/8955.
8542
8543 2002-12-18 Andrew Haley <aph@redhat.com>
8544
8545 * parse.y (patch_invoke): Force evaluation order when `check' is
8546 set. For PR libgcj/8945.
8547
8548 2002-12-16 Mark Mitchell <mark@codesourcery.com>
8549
8550 * gcj.texi: Change version number to 3.4.
8551
8552 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
8553 Andrew Haley <aph@redhat.com>
8554
8555 * parse.y (source_end_java_method): Remove custom encoding of line
8556 numbers for a function decl before passing it to the back end.
8557
8558 2002-12-03 Andrew Haley <aph@redhat.com>
8559
8560 * class.c (make_class_data): New field, "chain".
8561 * decl.c (java_init_decl_processing): Likewise.
8562
8563 2002-12-02 Tom Tromey <tromey@redhat.com>
8564
8565 For PR java/8740:
8566 * parse.y (do_resolve_class): Handle qualified name via
8567 recursion.
8568
8569 2002-11-30 Zack Weinberg <zack@codesourcery.com>
8570
8571 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
8572 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
8573 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
8574 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
8575 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
8576 Include coretypes.h and tm.h.
8577 * Make-lang.in: Update dependencies.
8578
8579 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8580
8581 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8582
8583 2002-11-25 Diego Novillo <dnovillo@redhat.com>
8584
8585 * jcf-reader.c: Don't expand JCF_readu4 inside the
8586 expansion of JCF_SKIP.
8587
8588 2002-11-25 Diego Novillo <dnovillo@redhat.com>
8589
8590 * jcf-reader.c: Don't expand JCF_readu4 inside the
8591 expansion of JCF_SKIP.
8592
8593 2002-11-22 Tom Tromey <tromey@redhat.com>
8594
8595 * parse.y (patch_binop): Cast right hand side of shift expression
8596 to `int'. Fixes PR java/8676.
8597
8598 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
8599 Andrew Haley <aph@redhat.com>
8600
8601 * gcc/java/jcf-write.c (write_classfile): Remove target
8602 class file, if it exists, before renaming the temporary
8603 class file to it.
8604
8605 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
8606
8607 * jvspec.c (lang_specific_spec_functions): New.
8608
8609 2002-11-18 Tom Tromey <tromey@redhat.com>
8610
8611 Fix for PR java/7912:
8612 * expr.c (can_widen_reference_to): Allow cast of array to
8613 Cloneable or Serializable.
8614 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8615 (java_io_serializable_identifier_node): Likewise.
8616 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8617 (valid_ref_assignconv_cast_p): Use new identifier nodes.
8618 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8619 java_io_serializable.
8620 * decl.c (java_init_decl_processing): Initialize
8621 java_lang_cloneable_identifier_node and
8622 java_io_serializable_identifier_node.
8623 (java_lang_cloneable_identifier_node): New global.
8624 (java_io_serializable_identifier_node): Likewise.
8625
8626 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
8627
8628 * buffer.c: Remove unnecessary casts.
8629 * check-init.c: Likewise.
8630 * class.c: Likewise.
8631 * constants.c: Likewise.
8632 * decl.c: Likewise.
8633 * except.c: Likewise.
8634 * gjavah.c: Likewise.
8635 * jcf-io.c: Likewise.
8636 * jcf-parse.c: Likewise.
8637 * jcf-path.c: Likewise.
8638 * jvspec.c: Likewise.
8639 * lang.c: Likewise.
8640 * lex.c: Likewise.
8641 * verify.c: Likewise.
8642
8643 2002-11-06 Tom Tromey <tromey@redhat.com>
8644
8645 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8646 a JNI header.
8647
8648 2002-11-05 Tom Tromey <tromey@redhat.com>
8649
8650 Fix for PR java/6388.
8651 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8652 * java-tree.h (enum java_tree_index): New values
8653 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8654 (decimal_int_max, decimal_long_max): New defines.
8655 * lex.c (yylex): Rewrote range checking. Sign extend literals.
8656 (error_if_numeric_overflow): Rewrote range checking.
8657 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8658 decimal_long_max.
8659
8660 2002-11-02 Tom Tromey <tromey@redhat.com>
8661
8662 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8663
8664 * class.c (make_method_value): Put class name, not signature, into
8665 `throws' field. For PR java/8415.
8666
8667 2002-10-24 Tom Tromey <tromey@redhat.com>
8668
8669 * gcj.texi (Invoking gij): Document --showversion.
8670 (Standard Properties): java.library.path now set.
8671
8672 2002-10-23 Tom Tromey <tromey@redhat.com>
8673
8674 * gjavah.c (decode_signature_piece): In JNI mode, print
8675 `jobjectArray' when array depth is nonzero.
8676 Fixes PR java/8296.
8677
8678 2002-10-15 Andrew Haley <aph@redhat.com>
8679
8680 * parse.y (patch_invoke): Call force_evaluation_order on a static
8681 arg list.
8682 (resolve_qualified_expression_name): Call force_evaluation_order
8683 on a arg list that is part of a Qualified Expression Name.
8684
8685 * lang.c (dump_compound_expr): New.
8686 (java_dump_tree): New.
8687
8688 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
8689
8690 * gcj.texi: Added item describing the GCJ runtime property
8691 "gnu.gcj.progname".
8692
8693 2002-10-15 Richard Henderson <rth@redhat.com>
8694
8695 * jcf-parse.c (get_constant): Fix type warning.
8696
8697 2002-10-15 Andrew Haley <aph@redhat.com>
8698
8699 * java-tree.h (java_inlining_merge_static_initializers): Declare.
8700 (java_inlining_map_static_initializers): Declare.
8701
8702 2002-10-14 Andrew Haley <aph@redhat.com>
8703
8704 * tree-inline.c (remap_block): All local class initialization
8705 flags go in the outermost scope.
8706 (expand_call_inline): Call java_inlining_map_static_initializers.
8707 (expand_call_inline): Call java_inlining_merge_static_initializers.
8708 * java/lang.c (merge_init_test_initialization): New.
8709 (java_inlining_merge_static_initializers): New.
8710 (inline_init_test_initialization): New.
8711 (java_inlining_map_static_initializers): New.
8712
8713 2002-10-11 Mark Wielaard <mark@klomp.org>
8714
8715 * gcj.texi (Compatibility): Add Limitations and Extensions section.
8716
8717 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8718
8719 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8720
8721 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8722
8723 * parse.y (merge_string_cste): Add parentheses around & within |.
8724
8725 2002-10-08 Tom Tromey <tromey@redhat.com>
8726
8727 * parse.y (variable_declarator_id): Simplify error path for
8728 array declarator error. For PR java/8003.
8729
8730 2002-10-08 Zack Weinberg <zack@codesourcery.com>
8731
8732 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8733 bug_report_url.
8734
8735 2002-10-08 Andrew Haley <aph@redhat.com>
8736
8737 * parse.y (attach_init_test_initialization_flags): Check for
8738 error_mark_node.
8739
8740 2002-10-07 Anthony Green <green@redhat.com>
8741
8742 * parse.y (merge_string_cste): Fix bug in string concatenation.
8743
8744 2002-10-03 Michael Koch <konqueror@gmx.de>
8745
8746 * gcj.texi (Standard properties):
8747 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8748
8749 2002-10-02 Roger Sayle <roger@eyesopen.com>
8750
8751 PR optimization/6627
8752 * lang.c (java_init): If storing the vbit in function
8753 pointers, ensure that force_align_functions_log is atleast
8754 one to aid compatability with g++ vtables.
8755
8756 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
8757
8758 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8759 foul of type-based aliasing.
8760
8761 2002-09-30 Anthony Green <green@redhat.com>
8762
8763 * gcj.texi (Invoking jv-scan): Fix texinfo.
8764
8765 2002-09-28 Anthony Green <green@redhat.com>
8766
8767 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8768 (Code Generation): Add -fno-assert documentation.
8769 * jv-scan.c (flag_assert): New global.
8770 (options): Add assert option.
8771 (help): Add --no-assert documentation.
8772 * parse-scan.y (flag_assert): New global.
8773 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8774 (flag_assert): New global.
8775 * java-tree.h (flag_assert): New global.
8776 * lex.c (java_lex): Obey flag_assert.
8777 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8778 calling cc1.
8779
8780 2002-09-26 Andrew Haley <aph@redhat.com>
8781
8782 * expr.c (build_java_array_length_access): Check for null pointer.
8783 * expr.c (expand_java_arrayload): Likewise.
8784
8785 2002-09-21 Richard Henderson <rth@redhat.com>
8786
8787 * jcf-parse.c (get_constant): Decode from IEEE no matter
8788 what the target format.
8789
8790 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
8791
8792 * ChangeLog: Follow spelling conventions.
8793 * class.c: Likewise.
8794 * decl.c: Likewise.
8795 * expr.c: Likewise.
8796 * gjavah.c: Likewise.
8797 * java-tree.h: Likewise.
8798 * jcf-dump.c: Likewise.
8799 * jcf-parse.c: Likewise.
8800 * jvspec.c: Likewise.
8801 * lang.c: Likewise.
8802 * mangle.c: Likewise.
8803 * parse.y: Likewise.
8804
8805 2002-09-17 Tom Tromey <tromey@redhat.com>
8806
8807 * lex.c (java_read_unicode_collapsing_terminators): Handle case
8808 where \r appears at EOF. Fixes PR java/7950.
8809
8810 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
8811
8812 * jvspec.c (lang_specific_driver): Remove unused variable.
8813
8814 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8815
8816 * java-tree.h (union lang_tree_node): Add chain_next option.
8817
8818 2002-09-16 Richard Henderson <rth@redhat.com>
8819
8820 * jcf-parse.c (get_constant): Runtime check for IEEE format;
8821 use new real.h interface.
8822 * jcf-write.c (find_constant_index): Use new real.h interface.
8823 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8824
8825 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8826
8827 * lang.c: Follow spelling conventions.
8828
8829 2002-09-11 Per Bothner <per@bothner.com>
8830
8831 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
8832 constant to the type of the field.
8833 (java_complete_tree): Remove now-redundant code.
8834
8835 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
8836
8837 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
8838
8839 For PR java/5794:
8840 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8841 return label if a ret instruction for the jsr has been reached.
8842
8843 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
8844
8845 * parse.y (DIR_SEPARATOR): Don't define.
8846 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8847
8848 2002-08-28 Andrew Haley <aph@redhat.com>
8849
8850 * verify.c (verify_jvm_instructions): Allow exception handler
8851 inside code that is being protected, but generate a warning.
8852 * except.c (link_handler): Initialize `expanded' in new eh_range.
8853 (binding_depth, is_class_level, current_pc): Declare extern.
8854
8855 2002-09-01 Mark Wielaard <mark@klomp.org>
8856
8857 * gcj.texi: Add chapter about system properties.
8858 Fixed some typos.
8859
8860 2002-08-26 Tom Tromey <tromey@redhat.com>
8861
8862 * parse.y (try_builtin_assignconv): Allow narrowing primitive
8863 conversion if RHS_TYPE is byte, short, or char.
8864
8865 2002-08-22 Tom Tromey <tromey@redhat.com>
8866
8867 * gcj.texi (Invoking gij): Document -cp and -classpath.
8868
8869 2002-08-21 Tom Tromey <tromey@redhat.com>
8870
8871 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8872 $(prefix)/share. For PR libgcj/7633.
8873
8874 For PR java/6005 and PR java/7611:
8875 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8876 (java_can_use_bit_fields_p): New function.
8877
8878 2002-08-16 Tom Tromey <tromey@redhat.com>
8879
8880 * gcj.texi (Class Initialization): Mention class initialization of
8881 arrays.
8882
8883 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
8884
8885 * Make-lang.in (java-tree-inline.o): New.
8886 (JAVA_OBJS): Add java-tree-inline.o.
8887 * parse.y (source_end_java_method): Call java_optimize_inline.
8888 (java_expand_method_bodies): Save method's tree in
8889 DECL_SAVED_TREE.
8890 (add_stmt_to_compound): Keep track of the number of statments.
8891 * lang.c (java_init): Enable flag_inline_trees.
8892 (java_post_options): If flag_inline_functions is on, enable
8893 flag_inline_trees instread.
8894 (decl_constant_value): New.
8895 (java_tree_inlining_walk_subtrees): New.
8896 * java-tree.h (DECL_NUM_STMTS): New macro.
8897 (java_optimize_inline): Declare.
8898 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8899 Handle a LABEL_EXPR.
8900 * decl.c (build_result_decl): If we already have a DECL_RESULT
8901 don't make another.
8902 (dump_function): New.
8903 (java_optimize_inline): New.
8904 (dump_function): New.
8905
8906 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
8907
8908 For PR java/7483:
8909 * parse.y (build_assertion): Invert return from
8910 desiredAssertionStatus.
8911
8912 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8913
8914 * jcf-write.c (get_access_flags): Return correct access flags for
8915 private and protected inner classes.
8916
8917 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8918
8919 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8920
8921 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8922
8923 * mangle_name.c: Don't include obstack.h twice.
8924 * xref.c: Don't include obstack.h.
8925
8926 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8927
8928 * class.c: (permanent_obstack): Delete declaration.
8929 * constants.c: (permanent_obstack): Delete declaration.
8930 * except.c: (permanent_obstack): Delete declaration.
8931 * expr.c: (permanent_obstack): Delete declaration.
8932 * jcf-parse.c: (permanent_obstack): Delete declaration.
8933 (saveable_obstack): Delete declaration.
8934 * parse.h: (permanent_obstack): Delete declaration.
8935 * typeck.c: (permanent_obstack): Delete declaration.
8936
8937 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
8938
8939 * gcj.texi (version-gcc): Increase to 3.3.
8940
8941 2002-07-22 Tom Tromey <tromey@redhat.com>
8942
8943 * lex.c (java_lex): Check for `e' or `E' after 0.
8944
8945 2002-07-21 Richard Henderson <rth@redhat.com>
8946
8947 * lang.c (java_unsafe_for_reeval): New.
8948 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8949
8950 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
8951
8952 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8953 (jcf_path_init): Use GET_ENVIRONMENT.
8954
8955 2002-07-10 Roger Sayle <roger@eyesopen.com>
8956 Zack Weinberg <zack@codesourcery.com>
8957
8958 * builtins.c (initialize_builtins): Remove defines that
8959 handled C/C++ specific junk hereby removed from builtins.def.
8960
8961 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
8962
8963 * lang.c (java_post_options): Update prototype.
8964
8965 2002-07-05 Roger Sayle <roger@eyesopen.com>
8966
8967 * builtins.c (initialize_builtins): Ignore the additional
8968 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
8969 the builtins.def file.
8970
8971 2002-07-01 Tom Tromey <tromey@redhat.com>
8972
8973 For PR libgcj/7073:
8974 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8975 specially.
8976
8977 2002-07-01 Roger Sayle <roger@eyesopen.com>
8978
8979 * java/decl.c (builtin_function): Accept additional parameter.
8980 (java_init_decl_processing): Pass an additional NULL_TREE
8981 argument to builtin_function.
8982
8983 2002-06-29 T.J. Mather <tjmather@maxmind.com>
8984
8985 * gcj.texi: Fixed gcj invocation example so that it compiles.
8986
8987 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8988
8989 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
8990 * parse.y (mark_parser_ctxt): Likewise.
8991 (check_modifiers, declare_local_variables): Avoid incorrect
8992 hardcoded constant 10.
8993
8994 * lex.c (java_read_char): Avoid "comparison is always true"
8995 warning.
8996
8997 2002-06-25 Andreas Schwab <schwab@suse.de>
8998
8999 * expr.c (JSR): Avoid undefined operation on PC.
9000
9001 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9002
9003 * decl.c (clear_binding_level): Const-ify.
9004
9005 2002-06-13 Akim Demaille <akim@epita.fr>
9006
9007 * parse.y (class_declaration, interface_declaration): Make sure
9008 all their rules have an action, in order to avoid meaningless `$$
9009 = $1' and their type clashes.
9010
9011 2002-06-11 Tom Tromey <tromey@redhat.com>
9012
9013 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
9014 * parse-scan.y (statement_without_trailing_substatement): Added
9015 assert_statement.
9016 (assert_statement): New rule.
9017 * java-tree.h (struct lang_type) [assertions]: New field.
9018 (TYPE_USES_ASSERTIONS): New macro.
9019 (CLASS_USES_ASSERTIONS): Likewise.
9020 (FIELD_SYNTHETIC): New define.
9021 * lex.c (java_lval;): Added ASSERT_TK.
9022 * parse.y (ASSERT_TK): Added.
9023 (statement_without_trailing_substatement): Added assert_statement.
9024 (assert_statement): New rule.
9025 (build_assertion): New function.
9026 (maybe_generate_pre_expand_clinit): Create and initialize
9027 $assertionsDisabled.
9028 (lookup_package_type): Removed decl.
9029 * keyword.h: Rebuilt.
9030 * keyword.gperf (assert): New token.
9031
9032 2002-06-10 Akim Demaille <akim@epita.fr>
9033
9034 * parse.y (interface_type_list, class_member_declaration)
9035 (unary_expression_not_plus_minus): Remove duplicate %type.
9036 Whitespace changes.
9037
9038 2002-06-09 Tom Tromey <tromey@redhat.com>
9039
9040 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
9041
9042 * parse.y (method_header): Give error message in all cases.
9043 Fixes PR java/6865.
9044
9045 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9046
9047 Don't use RTL inlining. Fix for PR java/6820.
9048 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
9049 (flag_really_inline): New.
9050 (java_decode_option): Set flag_really_inline if -finline-functions
9051 is seen.
9052 (java_post_options): New function. Turn off inlining unless
9053 flag_really_inline is set.
9054
9055 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9056
9057 * gjavah.c (throwable_p): Accept argument as either a classname or
9058 signature fragment. Create null-terminated classname string for super
9059 when calling itself recursively.
9060 (decode_signature_piece): Skip first character from class name
9061 signature when calling throwable_p.
9062
9063 2002-06-08 H.J. Lu (hjl@gnu.org)
9064
9065 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
9066
9067 2002-06-04 Tom Tromey <tromey@redhat.com>
9068
9069 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
9070
9071 2002-06-04 Michael Koch <konqueror@gmx.de>
9072
9073 * gcj.texi (Input Options): Fixed typo.
9074
9075 2002-06-04 Zack Weinberg <zack@codesourcery.com>
9076
9077 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
9078 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
9079 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
9080 and all now-pointless local variables. Rename other local
9081 variables to reflect their not being handles.
9082
9083 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
9084 #if JCF_USE_STDIO blocks.
9085
9086 * parse.y: Add missing semicolon at end of rule.
9087
9088 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
9089
9090 * check-init.c (attach_initialized_static_class): Delete, unused.
9091 * parse.y: Use htab_t instead of struct hashtable, update
9092 all uses.
9093 * java-tree.h: Include hashtab.h instead of hash.h.
9094 (struct lang_decl_func): Use htab_t, set up for gengtype.
9095 (struct init_test_hash_entry): Delete.
9096 (struct treetreehash_entry): New.
9097 (java_treetreehash_find): New
9098 (java_treetreehash_new): New prototype.
9099 (java_treetreehash_create): New prototype.
9100 (java_mark_tree): Delete prototype.
9101 (java_hash_hash_tree_node): Delete prototype.
9102 (java_hash_compare_tree_node): Delete prototype.
9103 (attach_initialized_static_class): Delete prototype.
9104 * expr.c (build_class_init): Update to use java_treetreehash
9105 functions.
9106 (java_expand_expr): Update to use htab_t.
9107 (emit_init_test_initialization): Likewise.
9108 * decl.c (java_mark_tree): Delete.
9109 * class.c (init_test_hash_newfunc): Delete.
9110 (java_hash_hash_tree_node): Delete.
9111 (java_hash_compare_tree_node): Delete.
9112 (add_method_1): Update to use java_treetreehash functions.
9113 (JAVA_TREEHASHHASH_H): New macro.
9114 (java_treetreehash_hash): New function.
9115 (java_treetreehash_compare): New function.
9116 (java_treetreehash_find): New function.
9117 (java_treetreehash_new): New function.
9118 (java_treetreehash_create): New function.
9119 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
9120
9121 * Make-lang.in (java/parse.o): Depend on debug.h.
9122 * java-tree.h (struct lang_identifier): Use gengtype.
9123 (union lang_tree_node): New.
9124 (struct lang_decl_func): Use gengtype.
9125 (struct lang_decl_var): Likewise.
9126 (struct lang_decl): Likewise.
9127 * parse.y: Include debug.h.
9128 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
9129
9130 * lang.c (struct language_function): New dummy structure.
9131
9132 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
9133 descriminator for DECL_LANG_SPECIFIC.
9134 (struct lang_decl_func): Rename from struct lang_decl.
9135 (enum lang_decl_desc): New.
9136 (struct lang_decl): Make it a union. Update all the accessor macros.
9137 (struct lang_type): Use gengtype.
9138 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
9139 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
9140 are now the same size.
9141 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
9142 use discriminator to mark DECL_LANG_SPECIFIC.
9143
9144 * Make-lang.in (gt-java-builtins.h): New rule.
9145 (java/builtins.o): Add dependency on gt-<filename>.h.
9146 * builtins.c: Use gengtype for roots.
9147 (union string_or_tree): Use gengtype.
9148 (struct builtin_record): Use gengtype.
9149 * config-lang.in (gtfiles): Add builtins.c.
9150
9151 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
9152 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
9153 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
9154 gt-java-parse.h, gtype-java.h): Add rules to generate.
9155 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
9156 (class.o): Add dependency on gt-*.h.
9157 (constants.o): Likewise.
9158 (decl.o): Likewise.
9159 (expr.o): Likewise.
9160 (jcf-parse.o): Likewise.
9161 (jcf-write.o): Likewise.
9162 (lang.o): Likewise.
9163 * config-lang.in (gtfiles): New.
9164 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9165 * constants.c: Replace uses of ggc_add_* with GTY markers.
9166 Include gt-*.h.
9167 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9168 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9169 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
9170 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
9171 Include gt-*.h.
9172 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
9173 Include gt-*.h.
9174 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9175 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
9176 gt-*.h.
9177 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9178 Include gtype-java.h.
9179
9180 2002-06-02 Tom Tromey <tromey@redhat.com>
9181
9182 Fix for PR java/5913:
9183 * parse.y (patch_binop): Call patch_string on op1.
9184
9185 2002-06-02 Tom Tromey <tromey@redhat.com>
9186
9187 Fix for PR java/1343, PR java/6336:
9188 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
9189 formatting. Changed return type.
9190 (anonymous_class_counter): Moved to top of file.
9191 (maybe_make_nested_class_name): Append number to class name for
9192 function-local classes.
9193
9194 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9195
9196 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
9197 * Make-lang.in: Update dependency lists.
9198
9199 2002-05-18 Mark Mitchell <mark@codesourcery.com>
9200
9201 * gjavah.c (throwable_p): Do not free the name of the class after
9202 passing it to find_class.
9203 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
9204 * jcf-io.c (dirent.h): Include it.
9205 (fnmatch.h): Likewise.
9206 (compare_path): New function.
9207 (java_or_class_file): Likewise.
9208 (memoized_dirlist_entry): New type.
9209 (memoized_dirlist_lookup_eq): New function.
9210 (memoized_dirlists): New variable.
9211 (caching_stat): New function.
9212 (memoized_class_lookup_eq): New function.
9213 (memoized_class_lookups): Likewise.
9214 (find_class): Use memoized_class_lookups and caching_stat.
9215 * jcf.h (JCF_USE_SCANDIR): Define.
9216 * parse.y (java_expand_classes): Write the class files in reverse
9217 order.
9218
9219 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9220
9221 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
9222
9223 2002-05-13 Mark Mitchell <mark@codesourcery.com>
9224
9225 * jcf-write.c (write_classfile): Unlink the temporary file if it
9226 cannot be renamed. Use concat to build up the name of the
9227 temporary file.
9228
9229 2002-05-08 Mark Mitchell <mark@codesourcery.com>
9230
9231 * jcf-write.c (write_classfile): Write the file to a
9232 temporary file and then rename it.
9233
9234 2002-05-07 Tom Tromey <tromey@redhat.com>
9235
9236 * gjavah.c (throwable_p): Use xstrdup, not strdup.
9237
9238 Fix for PR java/1200:
9239 * gjavah.c (throwable_p): New function.
9240 (decode_signature_piece): Use it. A `WeakReference' isn't the
9241 same as a `jweak'.
9242 Include hashtab.h.
9243 (gcjh_streq): New function.
9244
9245 2002-05-07 Andreas Jaeger <aj@suse.de>
9246
9247 * parse.y (finish_for_loop): Fix if statement.
9248
9249 2002-05-06 Tom Tromey <tromey@redhat.com>
9250
9251 Fix for PR java/5941:
9252 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
9253 loop update expression.
9254 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
9255 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
9256
9257 2002-05-04 Mark Wielaard <mark@klomp.org>
9258
9259 For PR java/6519:
9260 * parse.y (build_string_concatenation): Return just op1 only when op2
9261 is null and op1 is a STRING_CST, otherwise always construct a
9262 StringBuffer.
9263
9264 2002-04-27 Tom Tromey <tromey@redhat.com>
9265
9266 For PR java/6382:
9267 * parse.y (string_convert_int_cst): New function.
9268 (merge_string_cste): Use it.
9269
9270 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9271
9272 * java-tree.h (java_parse_file): Update.
9273 (java_set_yydebug): Remove.
9274 * jcf-parse.c (yydebug): Remove.
9275 (java_set_yydebug): Die.
9276 (java_parse_file): Update.
9277 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9278
9279 2002-04-24 Tom Tromey <tromey@redhat.com>
9280
9281 For PR java/6425:
9282 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
9283 EXPR_WFL_QUALIFICATION of qual_wfl.
9284
9285 2002-04-23 Per Bothner <per@bothner.com>
9286
9287 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
9288 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
9289 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
9290
9291 2002-04-23 Tom Tromey <tromey@redhat.com>
9292
9293 For PR java/6314:
9294 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
9295 recognize `-fcompile-resource='.
9296 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
9297 a bit.
9298
9299 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
9300
9301 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
9302 paths. Fixes PR java/2791.
9303
9304 2002-04-19 Andrew Haley <aph@redhat.com>
9305
9306 * jcf-write.c (push_long_const): lo, hi: New variables.
9307 Use rshift_double to extract the high part of a 64-bit long.
9308 Use WORD_TO_INT to extract the low part.
9309
9310 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
9311 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
9312 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
9313
9314 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9315
9316 * typeck.c (incomplete_type_error): Remove.
9317
9318 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9319
9320 * class.c (make_class_data): Set DECL_ALIGN on static class data,
9321 for hash synchronization.
9322 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
9323 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
9324 class_type_node.
9325
9326 2002-04-16 Mark Wielaard <mark@klomp.org>
9327
9328 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
9329 negative zero.
9330
9331 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9332
9333 Fix for PR java/6294:
9334 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
9335 interfaces.
9336
9337 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9338
9339 Fix for PR java/6085:
9340 * parse.y (patch_method_invocation): Always use build_access_to_thisn
9341 to get enclosing "this" argument for inner-class constructor
9342 invocation. Pass correct arguments to build_access_to_thisn.
9343
9344 2002-04-10 Andreas Jaeger <aj@suse.de>
9345
9346 * gcj.texi (Input Options): Fix extdirs patch.
9347
9348 2002-04-10 Anthony Green <green@redhat.com>
9349
9350 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
9351
9352 2002-04-09 Anthony Green <green@redhat.com>
9353
9354 * gcj.texi (Input Options): Add --extdirs documentation.
9355 * jcf-dump.c (OPT_extdirs): New macro.
9356 (options): Add extdirs option.
9357 (help): Describe --extdirs.
9358 (main): Handle OPT_extdirs.
9359 * gjavah.c (OPT_extdirs): New macro.
9360 (options): Add extdirs option.
9361 (help): Describe --extdirs.
9362 (main): Handle OPT_extdirs.
9363 * jcf-path.c (jcf_path_init): Add extdirs support.
9364 (jcf_path_extdirs_arg): New function.
9365 (extensions): New variable to hold extensions path entries.
9366 * jvspec.c: Remove -fextdirs= when compiling main().
9367 * lang.c (java_decode_option): Handle -fextdirs=.
9368 * jcf.h (jcf_path_extdirs_arg): Declare new function.
9369 * Make-lang.in: Compile jcf-path with version info for use in
9370 identifying the appropriate libgcj.jar.
9371
9372 2002-04-08 Tom Tromey <tromey@redhat.com>
9373
9374 For PR libgcj/5303:
9375 * .cvsignore: Added rmic.1 and rmiregistry.1.
9376 * gcj.texi (Top): Link to new nodes.
9377 (Invoking rmic): New node.
9378 (Invoking rmiregistry): Likewise.
9379 * Make-lang.in (java.generated-manpages): Added rmic.1 and
9380 rmiregistry.1.
9381 (java.maintainer-clean): Likewise.
9382 ($(srcdir)/java/rmic.1): New target.
9383 ($(srcdir)/java/rmiregistry.1): Likewise.
9384 (java.install-man): Handle rmic.1 and rmiregistry.1.
9385
9386 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9387
9388 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
9389 Add note about handling uncaught exceptions. Add an exception handler
9390 to example.
9391
9392 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9393
9394 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
9395 after using it to patch CALL_EXPR.
9396
9397 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9398
9399 * gcj.texi (Invocation): Document CNI invocation API.
9400
9401 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9402
9403 * expr.c (truthvalue_conversion): Rename. Update.
9404 (expand_compare): Update.
9405 * java-tree.h (java_truthvalue_conversion): New.
9406 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9407
9408 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9409
9410 * java-tree.h (java_mark_addressable): New.
9411 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9412 * typeck.c (mark_addressable): Rename, update.
9413
9414 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9415
9416 * expr.c (build_java_binop): Update.
9417 * java-tree.h (java_signed_type, java_unsigned_type,
9418 java_signed_or_unsigned_type): Update.
9419 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9420 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9421 * parse.y (patch_binop): Update.
9422 * typeck.c (signed_or_unsigned_type, unsigned_type,
9423 signed_type): Update.
9424
9425 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9426
9427 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9428 (java_dummy_print): Remove.
9429 (lang_print_error): Rename. Exit early if inhibiting output.
9430 (inhibit_error_printing_function): New.
9431 (java_init): Don't set hook.
9432 (lang_init_source): Use new boolean.
9433
9434 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
9435
9436 * parse.y (do_resolve_class): Fix infinite recursion.
9437
9438 2002-03-29 Tom Tromey <tromey@redhat.com>
9439
9440 * parse.y (check_inner_circular_reference): Ignore incomplete
9441 types.
9442
9443 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9444
9445 * Make-lang.in (builtins.o): Update.
9446 * boehm.c (get_boehm_type_descriptor): Update.
9447 * builtins.c: Include langhooks.h.
9448 * decl.c (java_init_decl_processing): Update.
9449 * java-tree.h (java_type_for_mode, java_type_for_size): New.
9450 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
9451 Redefine.
9452 * typeck.c (type_for_mode, type_for_size): Update.
9453
9454 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
9455
9456 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
9457
9458 2002-03-28 Tom Tromey <tromey@redhat.com>
9459
9460 * except.c (expand_end_java_handler): If the handler type is NULL,
9461 use java.lang.Throwable. Fixes PR java/5986.
9462
9463 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9464
9465 Fix for PR java/4715:
9466 * jcf-parse.c (parse_source_file_3): New function.
9467 (read_class): Call it.
9468 (java_parse_file): Likewise.
9469
9470 2002-03-28 Jan Hubicka <jh@suse.cz>
9471
9472 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
9473
9474 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9475
9476 * parse.y (resolve_package): Initialize "decl".
9477 (lookup_package_type): Remove unused function.
9478
9479 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9480
9481 Fix for PR java/5993:
9482 * parse.y (resolve_package): Return the decl if resolution was
9483 successful. Don't special case "java.lang" and "java.lang.reflect"
9484 packages. Set type_name to the merged identifier.
9485 (resolved_qualified_expression_name): Print error using "name" if
9486 resolve_package returns NULL_TREE.
9487
9488 2002-03-27 Tom Tromey <tromey@redhat.com>
9489
9490 * expr.c (expand_invoke): Don't generate null pointer check if
9491 we're calling <init>.
9492
9493 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9494
9495 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
9496 fix prototype.
9497 * java-tree.h (java_lang_expand_expr): Similarly.
9498 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9499 (java_init): Don't set hook.
9500
9501 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9502
9503 Fix for PR java/5850:
9504 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
9505 context if field was not found in the current scope.
9506 * expr.c (lookup_field): Don't look in enclosing contexts.
9507
9508 2002-03-26 Tom Tromey <tromey@redhat.com>
9509
9510 Fix for PR java/5942:
9511 * parse.y (init_src_parse): Added sanity check.
9512 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
9513 elements, not 11.
9514
9515 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
9516
9517 * decl.c (lang_mark_tree): Rename java_mark_tree.
9518 * java-tree.h (java_mark_tree): New.
9519 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9520
9521 2002-03-25 Zack Weinberg <zack@codesourcery.com>
9522
9523 * lex.c: Change java_perform_atof to take normal parameters
9524 instead of a pointer to a parameter block. Call it directly
9525 from java_lex.
9526
9527 2002-03-22 Mark Wielaard <mark@klomp.org>
9528
9529 Fix for PR java/5368:
9530 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
9531 when printing error message.
9532
9533 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
9534
9535 * decl.c (maybe_build_cleanup): Remove.
9536
9537 2002-03-22 Tom Tromey <tromey@redhat.com>
9538
9539 Andrew Haley <aph@cambridge.redhat.com>
9540
9541 * expr.c (build_field_ref): Don't build a check if the field is a
9542 member of `this'.
9543
9544 2002-03-21 Eric Blake <ebb9@email.byu.edu>
9545
9546 Fix for PR java/6026:
9547 * lex.c (java_lex): Fix parsing of consecutive floats.
9548
9549 2002-03-21 Tom Tromey <tromey@redhat.com>
9550
9551 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
9552 class.
9553
9554 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
9555
9556 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9557 insert_block, getdecls, kept_level_p, global_bindings_p): New.
9558
9559 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9560
9561 * gcj.texi: @code{gcj} becomes @command{gcj}.
9562 @code{gcc} becomes @command{gcc}.
9563 GcjRaw changed to gnu.gcc.RawData.
9564
9565 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
9566
9567 * decl.c (start_java_method): Use new hook.
9568 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9569 (java_init): Remove old hook.
9570
9571 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
9572
9573 * builtins.c (define_builtin): Do nothing if `type' is null.
9574 Fixes PR java/5876.
9575
9576 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9577
9578 * parse.y (parser_check_super_interface): Fix error message
9579 grammar/order.
9580
9581 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9582
9583 * jcf-parse.c (get_constant): Delete unused variables.
9584
9585 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
9586
9587 * java-tree.h (java_parse_file): New.
9588 * jcf-parse.c (yyparse): Rename java_parse_file.
9589 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9590
9591 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9592
9593 * parse.y (craft_constructor): Return the constructor decl.
9594 (java_expand_classes): Update comments.
9595 (lookup_method_invoke): Call fix_constructors immediately for
9596 anonymous class. Fixes PR java/5935.
9597
9598 2002-03-15 Anthony Green <green@redhat.com>
9599
9600 * jcf-parse.c (yyparse): Don't emit class registration
9601 constructor when compiling resource files.
9602
9603 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9604
9605 * lang.c (java_tree_code_type, java_tree_code_length,
9606 tree_code_name): Delete.
9607 (tree_code_type, tree_code_length, tree_code_name): Define.
9608 (java_init): Don't try to copy into the various tree_code
9609 arrays.
9610
9611 2002-03-12 Tom Tromey <tromey@redhat.com>
9612
9613 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9614 UTF-8, not UCS-2. Fixes PR java/5923.
9615
9616 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9617 a call_expr wrapped in a convert. Fixes PR java/5848.
9618
9619 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9620
9621 * jcf-write.c (write_classfile): Improve error strings.
9622
9623 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9624
9625 * lex.c: Adjust comments to GNU standards.
9626
9627 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9628
9629 Fix for PR java/5902:
9630 * lex.c (java_lex): Fix parsing of literals.
9631
9632 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9633
9634 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9635 to prevent it getting evaluated twice in the store checking case.
9636 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9637 examining OBJECT.
9638
9639 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9640
9641 * decl.c (java_init_decl_processing): Make sure class_type_node
9642 alignment is not less than 64 bits if hash synchronization is enabled.
9643
9644 2002-03-08 Per Bothner <per@bothner.com>
9645
9646 * parse.y (java_complete_lhs): Check if patch_assignment
9647 returned an error-mark.
9648
9649 * parse.y (try_builtin_assignconv): Don't special-case zero.
9650
9651 2002-03-08 Per Bothner <per@bothner.com>
9652
9653 Fix for PR java/5812.
9654 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
9655 here instead of in JSR macro. Likewise with load_type_state call.
9656 Do the latter on if the return_pc has been verified (the jsr returns).
9657 (JSR): Now just call build_java_jsr.
9658
9659 2002-03-07 Jeff Sturm <jsturm@one-point.com>
9660
9661 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9662 (java.install-common): Link native driver to
9663 JAVA_TARGET_INSTALL_NAME.
9664
9665 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
9666
9667 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9668 * builtins.c(sin_builtin): Likewise
9669 * builtins.c(sqrt_builtin): Likewise
9670
9671 2002-03-03 Zack Weinberg <zack@codesourcery.com>
9672
9673 * java/expr.c, java/jcf-parse.c, java/lex.c:
9674 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9675 REAL_ARITHMETIC blocks unconditional. Delete some further
9676 #ifdef blocks predicated on REAL_ARITHMETIC.
9677
9678 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9679
9680 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9681 explicit sizeof/sizeof.
9682 * decl.c (java_init_decl_processing): Likewise.
9683 * jcf-parse.c (init_jcf_parse): Likewise.
9684 * parse.y (init_src_parse): Likewise.
9685
9686 2002-03-02 Per Bothner <per@bothner.com>
9687
9688 Make --CLASSPATH by a synonym for --classpath and -classpath.
9689 Implement --bootclasspath.
9690 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
9691 (classpath_l): Remove.
9692 (jcf_path_CLASSPATH_arg): Remove.
9693 (jcf_path_bootclasspath_arg): New function.
9694 (jcf_path_seal): Simplify accordingly.
9695
9696 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
9697 (jcf_path_CLASSPATH): Remove declaration.
9698 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
9699 (lang_specific_driver): Translate -bootclasspath.
9700 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
9701 * lang.c (decode_lang_options): Do jcf_path_init first.
9702 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
9703 * gjavah.c: Also handle --bootclasspath.
9704 Handle --CLASSPATH as a synonum for --classpath.
9705 * jcf-dump.c: Likewise.
9706
9707 "." is not part of system path, but is the default for --classpath.
9708 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
9709 (jcf_path_seal): Add "." if no CLASSPATH specified.
9710
9711 * gcj.texi: Document changes.
9712
9713 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9714
9715 * expr.c (build_java_arraystore_check): Fix formatting.
9716
9717 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9718
9719 Fix for PR java/5758, java/5632:
9720 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9721 inner-class separator too.
9722 * parse.y (do_resolve_class): New local `decl_result.'
9723 Progressively build a name for what can have been loaded.
9724
9725 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9726
9727 * expr.c (java_array_data_offset): Removed function.
9728 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9729 (build_java_array_length_access): Obtain "length" value using a
9730 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9731 (build_java_arrayaccess): Correct comment. Access "data" using a
9732 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9733 (build_java_arraystore_check): New function.
9734 (expand_java_arraystore): Use build_java_arraystore_check.
9735 * parse.y (patch_assignment): Simplify code to insert a store check
9736 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9737 * check-init.c (check_init): Update to reflect that an array length
9738 access is now a COMPONENT_REF.
9739 * gcj.texi (Code Generation): Improve documentation of
9740 -fno-bounds-check. Add documentation for -fno-store-check.
9741 * java-tree.h (flag_store_check): Declare.
9742 (build_java_arraystore_check): Declare.
9743 * lang.c (flag_store_check): Initialize to 1.
9744 (lang_f_options): Add store-check option.
9745 * jvspec.c: Don't pass store-check option to jvgenmain.
9746 * lang-options.h: Add help string for -fno-store-check.
9747
9748 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9749
9750 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9751 * java-tree.h (java_dup_lang_specific_decl): New.
9752 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9753
9754 2002-02-27 Zack Weinberg <zack@codesourcery.com>
9755
9756 * builtins.c, decl.c: Delete traditional-mode-related code
9757 copied from the C front end but not used, or used only to
9758 permit the compiler to link.
9759
9760 2002-02-22 Tom Tromey <tromey@redhat.com>
9761
9762 Fix for PR java/2369:
9763 * jvspec.c (verify_class_name): New function.
9764 (lang_specific_driver): Call it.
9765 (JAVA_START_CHAR_P): New macro.
9766 (JAVA_PART_CHAR_P): Likewise.
9767
9768 2002-02-22 Per Bothner <per@bothner.com>
9769
9770 * class.c: Change vtable to be more compatible with g++ v3 abi.
9771 (get_dispatch_table): Prepend offset-to-top (always 0) and
9772 type_info pointer (currently unimplemented hence NULL) to vtable.
9773 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9774 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
9775 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9776 (build_dtable_decl): Add declarations for new fields.
9777
9778 2002-02-20 Per Bothner <per@bothner.com>
9779
9780 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9781 to finit$ (otherwise generate_bytecode_insns drops it). However, we
9782 don't need to set it on the COMPOUND_EXPR - the caller does that.
9783
9784 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9785
9786 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9787 `--CLASSPATH' becomes `--classpath.'
9788 * gjavah.c: Likewise.
9789 * jcf-dump.c: Likewise.
9790 * lang-options.h: Likewise.
9791 * lang.c: Likewise.
9792 * jcf-path.c: Updated comment.
9793 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9794 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9795 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9796 (jcf_path_CLASSPATH_arg): Ditto.
9797 (classpath_u): Updated leading comment.
9798
9799 2002-02-20 Per Bothner <per@bothner.com>
9800
9801 * builtins.c (check_for_builtin): New function.
9802 (build_call_or_builtin): Remove.
9803 * java-tree.h: Update accordingly.
9804 * expr.c (expand_invoke): Use build + check_for_builtin instead
9805 of build_call_or_builtin.
9806 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
9807 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9808 flag (which had caused jcf-write to incorrectly emit invokevirtual).
9809
9810 2002-02-17 Tom Tromey <tromey@redhat.com>
9811
9812 * java-tree.h (TYPE_STRICTFP): New macro.
9813 (struct lang_type) [strictfp]: New field.
9814 (CLASS_STRICTFP): New macro.
9815 (METHOD_STRICTFP): New macro.
9816 (struct lang_decl) [strictfp]: New field.
9817 * parse.y (method_header): Disallow strictfp constructor or
9818 abstract method.
9819 (STRICT_TK): Move before MODIFIER_TK.
9820 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9821 (METHOD_MODIFIERS): Likewise.
9822 (INTERFACE_MODIFIERS): Likewise.
9823 * jcf-write.c (get_access_flags): Likewise.
9824 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9825 (add_method_1): Likewise.
9826 (get_access_flags_from_decl): Likewise.
9827 * jcf-dump.c (print_access_flags): Print in standard order. Also,
9828 recognize strictfp flag.
9829 * jcf.h (ACC_STRICT): New define.
9830
9831 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
9832
9833 * class.c(build_utf8_ref): Move declaration of decl_size
9834
9835 2002-02-07 Tom Tromey <tromey@redhat.com>
9836
9837 * gcj.texi (Input Options): --CLASSPATH does not suppress system
9838 path.
9839
9840 2002-02-04 Anthony Green <green@redhat.com>
9841
9842 * class.c (build_utf8_ref): Put UTF-8 constants into merged
9843 sections if available.
9844
9845 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9846
9847 * parse.y (java_expand_classes): Fix typo in static field loop.
9848
9849 2002-02-02 Richard Henderson <rth@redhat.com>
9850
9851 * class.c (add_field): Mark static fields external.
9852 (build_class_ref): Remove redundant set.
9853 * parse.y (java_expand_classes): Mark static fields of classes
9854 to be compiled as local.
9855 * jcf-parse.c (parse_class_file): Likewise.
9856
9857 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9858
9859 * gcj.texi (About CNI): New node.
9860
9861 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
9862
9863 PR java/5080
9864 * jcf-parse.c : Check for HAVE_LOCALE_H before using
9865 setlocale() with LC_CTYPE as a parameter.
9866 * jv-scan.c: Same.
9867
9868 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
9869
9870 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9871 Follow GNU Coding Standards for --version.
9872
9873 2002-01-28 Tom Tromey <tromey@redhat.com>
9874
9875 * expr.c (build_jni_stub): Ensure storage for `meth' is
9876 generated.
9877 * parse.y (java_complete_expand_methods): Set
9878 current_function_decl before building JNI stub.
9879
9880 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9881
9882 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9883 BUILT_IN_SQRTF.
9884
9885 2002-01-22 Tom Tromey <tromey@redhat.com>
9886
9887 * decl.c (java_init_decl_processing): Use add_predefined_file.
9888 Predefine RawData.java.
9889 (predef_filenames): Removed.
9890 (java_init_decl_processing): Don't register predef_filenames.
9891 * jcf-parse.c (add_predefined_file): New function.
9892 (predefined_filename_p): Rewrote.
9893 (predefined_filename_p): No longer static.
9894 * decl.c (java_init_decl_processing): Call initialize_builtins.
9895 * Make-lang.in (JAVA_OBJS): Added builtins.o.
9896 (java/builtins.o): New target.
9897 * builtins.c: New file.
9898 * parse.y (patch_invoke): Use build_call_or_builtin.
9899 * java-tree.h (build_call_or_builtin): Declare.
9900 (initialize_builtins): Declare.
9901 (java_set_exception_lang_code): Removed unused declaration.
9902 (PREDEF_FILENAMES_SIZE): Removed.
9903 (java_tree_index): Added JTI_PREDEF_FILENAMES.
9904 (predef_filenames): New define.
9905 (add_predefined_file): Declare.
9906 (predefined_filename_p): Declare.
9907 * expr.c (expand_invoke): Use build_call_or_builtin.
9908
9909 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9910
9911 * parse.y (patch_switch_statement): Fix format specifier.
9912
9913 2002-01-16 Tom Tromey <tromey@redhat.com>
9914
9915 More for PR java/5365:
9916 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9917 default.
9918 (process_file): Generate include for
9919 java.lang.UnsupportedOperationExceptions.
9920
9921 2002-01-15 Andreas Jaeger <aj@suse.de>
9922
9923 * .cvsignore: Add man pages.
9924
9925 2002-01-15 Tom Tromey <tromey@redhat.com>
9926
9927 Fix for PR java/5365:
9928 * gjavah.c (process_file): Turn class name into a file name.
9929
9930 2002-01-14 Matthias Klose <doko@debian.org>
9931
9932 * gcj.texi: Fix whitespace and formatting errors in the
9933 synopsis of the man pages. Update copyright.
9934
9935 2002-01-14 Tom Tromey <tromey@redhat.com>
9936
9937 For PR libgcj/5303:
9938 * Make-lang.in (java.install-man): Handle jv-convert man page.
9939 (java.generated-manpages): Added jv-convert.1.
9940 (java.uninstall): Remove jv-convert.1.
9941 (java.maintainer-clean): Likewise.
9942 ($(srcdir)/java/jv-convert.1): New target.
9943 * gcj.texi (Top): Link to jv-convert node.
9944 (Individual utilities): Likewise.
9945 (Invoking jv-convert): New node.
9946
9947 2001-01-10 Jeff Sturm <jsturm@one-point.com>
9948 Martin Kahlert <martin.kahlert@infineon.com>
9949
9950 * jcf-parse.c (get_constant): Don't swap lo/hi for big
9951 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9952
9953 2002-01-03 Graham Stott <grahams@redhat.com>
9954
9955 * class.c (compile_resource_file): Update copyright date.
9956 Constify filename parameter.
9957 (java-tree.h): Update copyright date.
9958 (compile_resource_file): Constify filename parameter.
9959
9960 2002-01-03 Graham Stott <grahams@redhat.com>
9961
9962 * gcc/jcf-parse.c: Update copyright date.
9963 (yyparse): Constify resource_filename.
9964
9965 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9966
9967 * parse.y (src_parse_roots): Don't needlessly zero init.
9968
9969 2001-12-31 Tom Tromey <tromey@redhat.com>
9970
9971 * parse.y (dump_java_tree): New function.
9972 (source_end_java_method): Call it.
9973 (end_class_declaration): Likewise.
9974 * lang.c (java_decode_option): Call dump_switch_p.
9975
9976 2001-12-28 Tom Tromey <tromey@redhat.com>
9977
9978 * gen-table.pl: Don't process characters after \uffff. Added
9979 comment pointing to input file.
9980
9981 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9982
9983 * gen-table.pl: Const-ify output. Document the location of a
9984 suitable unicode input file.
9985
9986 * chartables.h: Regenerate.
9987
9988 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9989
9990 * chartables.h: Const-ify.
9991 * gjavah.c (options): Likewise.
9992 * jcf-dump.c (options): Likewise.
9993 * jv-scan.c (options): Likewise.
9994 * lex.c (java_start_char_p, java_part_char_p): Likewise.
9995 * parse.y (binop_lookup): Likewise.
9996
9997 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9998
9999 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
10000 the static arrays that are output.
10001 * jvspec.c (jvgenmain_spec): Make static.
10002 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
10003 * keyword.h: Regenerate.
10004 * lang.c (string_option, process_option_with_no, lang_f_options,
10005 lang_W_options): Const-ify.
10006 * lex.c (java_lex): Likewise.
10007
10008 2001-12-21 Richard Henderson <rth@redhat.com>
10009
10010 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
10011 (get_boehm_type_descriptor): ... here. Arrange for the
10012 TREE_TYPE to get set properly.
10013
10014 2001-12-21 Richard Henderson <rth@redhat.com>
10015
10016 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
10017 only if the target requires collect2.
10018
10019 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
10020
10021 2001-12-20 Tom Tromey <tromey@redhat.com>
10022
10023 For PR java/4509:
10024 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
10025 CAN_COMPLETE_NORMALLY for the node.
10026 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
10027 generate code for second branch if first branch can't complete
10028 normally.
10029 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
10030 the loop head if the loop body can't complete normally.
10031
10032 2001-12-20 Tom Tromey <tromey@redhat.com>
10033
10034 For PR java/4766:
10035 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
10036 case where `finally' clause can't complete normally.
10037
10038 2001-12-20 Tom Tromey <tromey@redhat.com>
10039
10040 Fixes PR java/5057:
10041 * parse.y (analyze_clinit_body): Added this_class parameter.
10042 Check for more cases where we must keep <clinit>.
10043 (maybe_yank_clinit): Cleaned up flow control.
10044
10045 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10046
10047 * decl.c (java_init_decl_processing): Don't initialize
10048 finit_leg_identifier_node.
10049 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
10050 (finit_leg_identifier_node): Remove.
10051 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
10052
10053 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10054
10055 * mangle.c (mangle_member_name): Don't special-case for
10056 NO_DOLLAR_IN_LABEL.
10057 * mangle_name.c (unicode_mangling_length): Likewise.
10058 (append_unicode_mangled_name): Likewise.
10059 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
10060 code.
10061
10062 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10063
10064 * expr.c (build_java_array_length_access): Don't force null pointer
10065 check unless flag_check_references is set.
10066
10067 2001-12-20 Tom Tromey <tromey@redhat.com>
10068
10069 Fix for PR java/3417:
10070 * parse.y (patch_assignment): Added special processing for
10071 `return'.
10072 (patch_return): Don't convert booleans to integers, and don't
10073 special-case `null'.
10074
10075 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
10076
10077 * config-lang.in (diff_excludes): Remove.
10078
10079 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
10080
10081 * gcj.texi: Update link to GCC manual.
10082
10083 2001-12-17 Tom Tromey <tromey@redhat.com>
10084
10085 * parse.y (link_nested_class_to_enclosing): Removed useless
10086 statement.
10087
10088 2001-12-16 Tom Tromey <tromey@redhat.com>
10089
10090 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
10091 Fixes PR java/5088.
10092
10093 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
10094
10095 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
10096 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
10097 spelling errors.
10098
10099 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10100
10101 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
10102
10103 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10104
10105 * decl.c (java_init_decl_processing): Build otable_type correctly.
10106 otable_decl is an otable_type.
10107
10108 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10109
10110 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
10111 otable_type, otable_ptr_type, method_symbol_type,
10112 method_symbols_array_type, method_symbols_array_ptr_type): New
10113 field/global tree definitions.
10114 (flag_indirect_dispatch): New flag.
10115 * decl.c (java_init_decl_processing): Initialize new otable and
10116 otable_syms type nodes and decls. Add new field "index" to
10117 method_type_node.
10118 * class.c (build_method_symbols_entry): New function.
10119 (make_method_value): Set "index" to to method's vtable index for
10120 virtual methods when indirect-dispatch is not used.
10121 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
10122 and set vtable_method_count to -1. Set otable and otable_syms field
10123 if indirect-dispatch is used and there was something to put in them.
10124 (build_method_symbols_entry): New function.
10125 (emit_offset_symbol_table): New function.
10126 * expr.c (get_offset_table_index): New function.
10127 (build_invokevirtual): Build array reference to otable at the index
10128 returned by get_offset_table_index, and use the result as the vtable
10129 offset.
10130 (build_invokeinterface): Similar.
10131 * jcf-parse.c (yyparse): If indirect-dispatch, call
10132 emit_offset_symbol_table at the end of compilation, after all classes
10133 have been generated.
10134 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
10135 * lang.c (flag_indirect_dispatch): Define.
10136 (lang_f_options): Add indirect-dispatch flag.
10137
10138 2001-12-14 Matthias Klose <doko@debian.org>
10139
10140 * gcj.texi: Markup for man page generation. Document missing
10141 options printed by <tool> --help.
10142 Terminate description of gij's -ms option with a dot.
10143 * Make-lang.in ($(srcdir)/java/*.1): New targets.
10144 (java.generated-manpages java.install-man, java.uninstall,
10145 java-maintainer-clean) Updated.
10146
10147 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
10148
10149 * class.c (get_dispatch_table): Fix java vtable layout
10150 for TARGET_VTABLE_USES_DESCRIPTORS.
10151 * decl.c (java_init_decl_processing): Initialize
10152 alloc_no_finalizer_node, finalize_identifier_node.
10153 * expr.c (class_has_finalize_method): New function.
10154 (expand_java_NEW): Generate calls for finalizer-free allocation.
10155 (build_invokevirtual): Fix java vtable layout for
10156 TARGET_VTABLE_USES_DESCRIPTORS.
10157 * java-tree.h (enum java_tree_index): New entries:
10158 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
10159 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
10160 (class_has_finalize_method): declare.
10161 (HAS_FINALIZER_P): New macro.
10162 * parse.y (patch_invoke): Generate calls for finalizer-free
10163 allocation.
10164
10165 2001-12-12 Matthias Klose <doko@debian.org>
10166
10167 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
10168 whitespace at end of line.
10169
10170 2001-12-11 Tom Tromey <tromey@redhat.com>
10171
10172 * lex.c (java_init_lex): Define wfl_to_string as
10173 gnu.gcj.runtime.StringBuffer unless generating bytecode.
10174
10175 2001-12-11 Jeff Sturm <jsturm@one-point.com>
10176
10177 * class.c (make_method_value): Use null_pointer_node to
10178 represent empty exception table.
10179
10180 2001-12-10 Tom Tromey <tromey@redhat.com>
10181
10182 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
10183
10184 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
10185
10186 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
10187
10188 2001-12-09 Per Bothner <per@bothner.com>
10189
10190 * check-init.c (current_switch_has_default): New static field.
10191 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
10192 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
10193 DEFAULT_EXPR seen, simulate a default alternative that copies state.
10194
10195 2001-12-09 Tom Tromey <tromey@redhat.com>
10196
10197 * check-init.c (check_init): Don't allow pre- or post- increment
10198 or decrement of final variable.
10199 (final_assign_error): Minor error message rewording.
10200
10201 2001-12-08 Tom Tromey <tromey@redhat.com>
10202
10203 * java-tree.h: Fixed typo.
10204
10205 * gjavah.c (decompile_method): Don't decompile to `return this'
10206 for static methods.
10207
10208 * gjavah.c (cxx_keywords): Re-sorted.
10209 * lex.c (cxx_keywords): Re-sorted.
10210
10211 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
10212 else.
10213
10214 * gjavah.c (print_namelet): Clear subnamelets.
10215 (HANDLE_METHOD): Set `method_printed' earlier.
10216
10217 2001-12-07 Tom Tromey <tromey@redhat.com>
10218
10219 * lang.c (lang_f_options): Added
10220 optimize-static-class-initialization.
10221 (java_decode_option): Removed special case.
10222
10223 2001-12-07 Per Bothner <per@bothner.com>
10224
10225 * check-init.c (check_init): Fix typo freeing memory twice.
10226
10227 2001-12-05 Per Bothner <per@bothner.com>
10228
10229 Restore support for static class initialization optimization.
10230 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
10231 * check-init.c (check_int): At end of BLOCK handle initialization
10232 blocks, which used to be done in java_complete_expand_method but did
10233 not handle the case where check_for_initialization might allocate
10234 more than a word of bits.
10235 * decl.c (lang_make_tree): The smic field is now a tree.
10236 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
10237 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
10238
10239 * parse.y (emit_test_initialization): Combine hash_lookup calls.
10240
10241 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
10242 Change from a hash table to a list.
10243 (struct_lang_decl): Change field 'smic' to match.
10244 * class.c (add_method_1): Initialize
10245 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
10246 * parse.y (adjust_init_test_initialization): Removed - inlined into -
10247 (java_expand_method_bodies): -here, since 'smic' is now a list.
10248 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
10249
10250 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
10251
10252 * class.c (java_hash_compare_tree_node): Fix casts.
10253
10254 2001-12-04 Per Bothner <per@bothner.com>
10255
10256 * check-init.c: Handle definite unassignment to finals in addition
10257 to definite assignment.
10258 (loop_current_locals): New field.
10259 (num_current_locals, int start_current_locals, num_current_words):
10260 Make static.
10261 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
10262 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
10263 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
10264 (get_variable_decl, check_final_reassigned): New functions.
10265 (check_init, check_bool_init): Modify as needed for checking finals.
10266 (check_for_initialization): Take extra parameter and return void.
10267 Do extra start-up logic to check final fields for assignment.
10268 * parse.y (check_static_final_variable_assignment_flag,
10269 reset_static_final_variable_assignment_flag, check_final_assignment,
10270 check_final_variable_local_assignment_flag,
10271 reset_final_variable_indirect_assignment_flag,
10272 reset_final_variable_global_assignment_flag): Remove functions.
10273 (java_complete_expand_methods, outer_field_access_fix,
10274 patch_assignment): Remove no-longer used logic.
10275 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
10276 * parse.y (register_fields, java_complete_tree): Update accordingly.
10277
10278 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
10279 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
10280 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
10281
10282 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
10283
10284 * java-tree.h (DECL FINAL): New bit-field.
10285 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
10286 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
10287 (DECL_INIT_CALLS_THIS): New macro.
10288 (struct lang_decl): New bit-field init_calls_this.
10289 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
10290 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
10291 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
10292 use it for both local variables and final fields.
10293 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
10294 and local_final.
10295 (struct lang_type): Remove hfv bit-field.
10296 (check_for_initialization): Change to return void.
10297
10298 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
10299 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
10300 * check-init.c (final_assign_error): New helper function.
10301 (check_final_reassigned, check_init): Use it.
10302 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
10303
10304 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
10305 bit-fields to unsigned.
10306
10307 2001-12-03 Per Bothner <per@bothner.com>
10308
10309 * parse.y (patch_binop): Minor constant folding.
10310
10311 * parse.y (build_current_thisn): Shorter 'buffer'.
10312
10313 2001-12-03 Per Bothner <per@bothner.com>
10314
10315 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
10316 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
10317 * jcf-write.c (generate_bytecode_insns): Remove support for
10318 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
10319 * check-init.c (check_init): Likewise.
10320
10321 2001-12-03 Per Bothner <per@bothner.com>
10322
10323 * verify.c (subroutine_nesting): New function.
10324 (verify_jvm_instructions): Use it to fix logic for checking that
10325 we're done with the current subroutine.
10326
10327 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
10328 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
10329
10330 2001-12-03 Per Bothner <per@bothner.com>
10331
10332 * jcf.h: Fix obvious typo in comment.
10333 * typeck.c (build_null_signature): Add comment.
10334
10335 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
10336
10337 * expr.c: Remove leading capital from diagnostic messages, as
10338 per GNU coding standards.
10339 * jcf-io.c: Similarly.
10340 * jcf-parse.c: Similarly.
10341 * jv-scan.c: Similarly.
10342 * jvspec.c: Similarly.
10343 * mangle.c: Similarly.
10344
10345 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
10346 Alexandre Petit-Bianco <apbianco@redhat.com>
10347
10348 * expr.c (build_java_arrayaccess): Call save_expr on array for
10349 correct evaluation order, modified comment, fixed indentation.
10350 * parse.y: (patch_assignment): Correctly extract the array base
10351 from the tree generate by build_java_arrayaccess, added comments.
10352 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
10353 Fixes PR java/3096, PR java/3803, PR java/3965.
10354
10355 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
10356
10357 * expr.c (expand_byte_code): Remove trailing periods from messages.
10358 * jcf-parse.c (load_class, jcf_parse): Similarly.
10359 * jcf-write.c (generate_classfile): Similarly.
10360 * lex.c (java_lex): Similarly.
10361
10362 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10363
10364 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
10365
10366 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
10367
10368 * Make-lang.in (java.generated-manpages): New dummy target.
10369
10370 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10371
10372 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10373 ASM_FINAL_SPEC.
10374 (lang_specific_pre_link): Use set_input to set input_filename.
10375 Append `main' here.
10376 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10377 (main): Fix definition.
10378 Strip `main' from classname.
10379 Fixes PR java/227.
10380
10381 2001-11-18 Roger Sayle <roger@eyesopen.com>
10382
10383 * parse.h (java_expand_switch): Remove old prototype.
10384
10385 2001-11-18 Tom Tromey <tromey@redhat.com>
10386
10387 Fix for PR java/1401:
10388 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
10389 arg0 is null.
10390 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
10391 correctly.
10392
10393 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
10394
10395 * lang.c (finish_parse): Rename to java_finish.
10396 (LANG_HOOKS_FINISH, java_finish): New.
10397
10398 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
10399
10400 * decl.c (init_decl_processing): Rename java_init_decl_processing.
10401 * java-tree.h: New prototype.
10402 * lang.c (java_init): Update prototype. Combine with old init_parse.
10403
10404 2001-11-13 Tom Tromey <tromey@redhat.com>
10405
10406 * gjavah.c (method_signature): New global.
10407 (HANDLE_METHOD): Set it.
10408 (decompile_return_statement): New function.
10409 (decompile_method): Use it.
10410 (print_method_info): Removed `synth' argument.
10411
10412 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10413
10414 * java-tree.h (java_set_yydebug): New.
10415 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
10416 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
10417 (print_lang_decl, print_lang_type, print_lang_identifier,
10418 print_lang_statistics, lang_print_xnode): Remove.
10419
10420 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10421
10422 * jcf-parse.c (init_lex): Remove.
10423 * lang.c (language_string, lang_identify): Remove.
10424 (struct lang_hooks): Constify.
10425 (LANG_HOOKS_NAME): Override.
10426 (init_parse): Update.
10427
10428 2001-11-08 Andreas Franck <afranck@gmx.de>
10429
10430 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
10431 program_transform_name the way suggested by autoconf.
10432 (java.install-common): Also transform auxiliary program names with
10433 program_transform_name.
10434
10435 2001-11-08 Tom Tromey <tromey@cygnus.com>
10436
10437 * parse.y (trap_overflow_corner_case): New rule.
10438 (unary_expression): Use it.
10439 * lex.c (java_init_lex): Don't set minus_seen.
10440 (yylex): Don't use minus_seen. Communicate overflow to parser for
10441 it to handle.
10442 (error_if_numeric_overflow): New function.
10443 * parse.h (minus_seen): Removed field.
10444 (JAVA_RADIX10_FLAG): New define.
10445
10446 2001-11-07 Tom Tromey <tromey@redhat.com>
10447
10448 Patch for PR java/1414:
10449 * parse.y (case_label_list): New global.
10450 (goal): Register case_label_list with GC.
10451 (java_complete_lhs): Save new case on case_label_list.
10452 (patch_switch_statement): Check for duplicate case labels.
10453
10454 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10455
10456 * parse.y (patch_assignment): Removed unused third argument.
10457 (java_complete_lhs): Removed unused third argument to patch_assignment.
10458
10459 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10460
10461 * lang.c: Include langhooks-def.h.
10462 * Make-lang.in: Update.
10463
10464 2001-10-31 Zack Weinberg <zack@codesourcery.com>
10465
10466 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10467
10468 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10469
10470 * mangle.c (find_compression_record_match): Don't match compression
10471 records for package name elements unless they occur at the start of
10472 the name. Fix for PR java/4717.
10473
10474 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10475
10476 * expr.c (expand_java_field_op): Don't special-case references to
10477 java.lang.PRIMTYPE.TYPE.
10478 (build_primtype_type_ref): Removed.
10479 * java-tree.h (build_primtype_type_ref): Remove prototype.
10480 * parse.y (maybe_build_primttype_type_ref): Removed.
10481 (complete_function_arguments): Don't special-case references to
10482 java.lang.PRIMTYPE.TYPE.
10483 (patch_assignment): Likewise.
10484 (array_constructor_check_entry): Likewise.
10485
10486 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10487
10488 * mangle.c (static tree compression_table): Fixed leading comment.
10489 * parse.h (struct parser_ctxt): Fixed field comment.
10490 * parse.y (check_pkg_class_access): New prototype, fixed leading
10491 comment, new parameter used to emit error only if passed as true.
10492 (parse_check_super): Pass extra argument to check_pkg_class_access.
10493 (do_resolve_class): Likewise.
10494 (process_imports): Likewise.
10495 (read_import_dir): Fixed indentation.
10496 (find_in_imports_on_demand): New local class_type_name. Local
10497 node_to_use deleted. while loop changed into for loop. Report
10498 multiple definition only for accessible classes. Improved error
10499 message.
10500 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
10501 assigned to parameter list, fixed indentation. while loop changed
10502 into for loop, restore TREE_CHAIN on local `tem' before the next
10503 iteration.
10504
10505 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10506
10507 * lang.c (lang_get_alias_set): Deleted.
10508
10509 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10510
10511 * gjavah.c (jni_print_char): Fix thinko in last change.
10512
10513 * gjavah.c (jni_print_char, decode_signature_piece): Use
10514 safe-ctype macros and/or fold extra calls into fewer ones.
10515 * lex.c (java_read_unicode, java_lex): Likewise.
10516 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
10517 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
10518 * mangle_name.c (append_unicode_mangled_name,
10519 unicode_mangling_length): Likewise.
10520
10521 2001-10-17 Richard Henderson <rth@redhat.com>
10522
10523 * Make-lang.in (java/lang.o): Depend on langhooks.h.
10524
10525 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
10526
10527 * lang.c (langhooks.h): Included.
10528 (LANG_HOOKS_INIT): Redefined.
10529 (LANG_HOOKS_INIT_OPTIONS): Likewise.
10530 (LANG_HOOKS_DECODE_OPTION): Likewise.
10531 (struct lang_hooks lang_hooks): New initialization.
10532
10533 2001-10-11 Per Bothner <per@bothner.com>
10534
10535 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
10536 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
10537 The former is simpler, and jcf-write.c handles it better.
10538 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
10539 or WITH_CLEANUP_EXPR.
10540 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
10541 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
10542
10543 * parse.y (patch_if_else_statement): If the condition is constant,
10544 optimize away the test.
10545
10546 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10547
10548 * parse.y (patch_cast): Call patch_string on the first operand of
10549 the incoming node, update it if necessary. Fixes PR java/4510.
10550
10551 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10552
10553 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
10554 when name qualifier matches a package name.
10555
10556 2001-10-08 Tom Tromey <tromey@redhat.com>
10557
10558 Fix for PR java/4489:
10559 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
10560 force a new label when computing `body_block'.
10561
10562 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10563
10564 * jcf-io.c (format_uint): Const-ify.
10565 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
10566 * lex.c (java_get_line_col): Likewise.
10567 * parse.y (build_incdec): Likewise.
10568
10569 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10570
10571 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
10572 a NULL enclosing context if appropriate. Fixes PR java/4466.
10573
10574 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
10575
10576 * parse.y (patch_assignment): Use lvalue's original TYPE when
10577 building the final COMPOUND_EXPR.
10578 (try_reference_assignconv): Fixed leading comment.
10579
10580 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
10581
10582 * parse.y (check_final_variable_indirect_assignment): For
10583 COMPOUND_EXPR, return only if finals were found initialized
10584 properly, if not, keep on checking.
10585 (check_final_variable_global_assignment_flag): New local
10586 error_found, set when appropriate and used to decide whether to
10587 report uninitialized finals. Fixed typo in comment.
10588
10589 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10590
10591 * decl.c (init_decl_processing): Fixed typo in predef_filenames
10592 last three initializations. Fixes PR java/4360.
10593
10594 2001-09-21 Richard Henderson <rth@redhat.com>
10595
10596 * class.c (get_dispatch_table): Handle function descriptors.
10597 (build_dtable_decl): Likewise.
10598 * expr.c (build_invokevirtual): Likewise.
10599
10600 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10601
10602 * parse.y (patch_method_invocation): Build class initialization
10603 when static finals are used to qualify method invocation.
10604 Fixes PR java/4366.
10605
10606 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
10607
10608 * parse.h: (WFL_STRIP_BRACKET): Re-written using
10609 build_type_name_from_array_name.
10610 (STRING_STRIP_BRACKETS): New macro.
10611 * parse.y (build_type_name_from_array_name): New function.
10612 (array_creation_expression:): Accumulate []s instead of [s.
10613 (cast_expression:): Accumulate []s instead of [s after cast type
10614 name.
10615 (build_array_from_name): Local string deleted, use
10616 build_type_name_from_array_name.
10617 (build_unresolved_array_type): Accumulate []s instead of [s after
10618 type name.
10619 (register_fields): Fixed comment.
10620 (resolve_class): Local name, base deleted, new locals tname and
10621 array_dims. Use build_type_name_from_array_name. Use array_dims to
10622 build array type.
10623 (purify_type_name): Use STRING_STRIP_BRACKETS.
10624
10625 2001-09-18 Andreas Jaeger <aj@suse.de>
10626
10627 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10628 * jv-scan.c: Likewise.
10629
10630 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10631
10632 * parse.y (patch_method_invocation): Inner class creation context
10633 check not enforced within constructors. Fixes PR java/1873.
10634
10635 2001-09-16 Tom Tromey <tromey@redhat.com>
10636
10637 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10638 NOTE_PUSH for single-case push. Fixes PR java/4189.
10639
10640 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10641
10642 * java-tree.h (TYPE_IMPORT_LIST): New macro.
10643 (TYPE_IMPORT_DEMAND_LIST): Likewise.
10644 (struct lang_type): New fields import_list and import_demand_list.
10645 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10646 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10647 (do_resolve_class): New local saved_enclosing_type, initialized,
10648 passed as parameter to find_in_imports and find_in_imports_on_demand.
10649 (find_in_imports): Added paramater enclosing_type, use its
10650 TYPE_IMPORT_LIST when applicable.
10651 (find_in_imports_on_demand): Added parameter enclosing_type, use
10652 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10653 declaration and initialization.
10654 (fold_constant_for_init): Switch/restore current_class to the
10655 appropriate context.
10656
10657 2001-09-13 Mark Mitchell <mark@codesourcery.com>
10658
10659 * verify.c (verify_jvm_instructions): Fix typo.
10660
10661 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10662
10663 * expr.c (expand_invoke): Const-ification.
10664 * parse.y (patch_method_invocation): Likewise.
10665
10666 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10667
10668 * gjavah.c (cxx_keywords): Const-ification.
10669 * keyword.gperf (java_keyword): Likewise.
10670 * lang.c (java_tree_code_name): Likewise.
10671 * lex.c (cxx_keywords): Likewise.
10672 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10673
10674 2001-09-11 Richard Henderson <rth@redhat.com>
10675
10676 * parse.h (ctxp_for_generation): Mark extern.
10677
10678 2001-09-10 Richard Henderson <rth@redhat.com>
10679
10680 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10681
10682 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10683
10684 * typeck.c (java_array_type_length, build_prim_array_type):
10685 Represent empty arrays by NULL index.
10686
10687 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
10688
10689 * java-tree.h (compile_resource_file): Grouped with other prototypes.
10690 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10691
10692 2001-09-06 Anthony Green <green@redhat.com>
10693
10694 * class.c (O_BINARY): Define if necessary.
10695 (registerResource_libfunc): Declare.
10696 (init_class_processing): Initilize registerResource_libfunc.
10697 (compile_resource_file): New function.
10698 * java-tree.h (resource_name): Declare.
10699 (compile_resource_file): Declare.
10700 * jcf-parse.c (yyparse): Handle compiling java resource files.
10701 * lang.c (java_decode_option): Handle -fcompile-resource option.
10702 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10703 resource files.
10704 * gcj.texi (Code Generation): Add documentation for -R flag.
10705
10706 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10707
10708 * jcf-write.c (generate_classfile): Issue an error in case of
10709 field/initial value mismatch.
10710 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10711 being initialized and we're generating bytecode.
10712 (java_complete_lhs): In MODIFY_EXPR section: added comments,
10713 set DECL_INITIAL properly when appropriate.
10714 Fixes PR java/4230
10715 Fixes PR java/4204
10716
10717 2001-09-01 Per Bothner <per@bothner.com>
10718
10719 * parse.y (maybe_yank_clinit): A field without an initializer is not
10720 relevant. All initializers except static final and constant require
10721 <clinit>, regardless of flag_emit_class_files.
10722
10723 2001-08-31 Per Bothner <per@bothner.com>
10724
10725 * class.c (set_constant_value): When not emitting class files, then a
10726 String ConstantValue is a utf8const_ptr_type.
10727
10728 2001-08-30 Per Bothner <per@bothner.com>
10729
10730 * jcf-write.c (generate_classfile): Check that field is primitive
10731 or string before emitting ConstantValue attribute.
10732
10733 2001-08-30 Per Bothner <per@bothner.com>
10734
10735 * parse.y (resolve_qualified_expression_name): If creating a
10736 COMPOUND_EXPR, set it's type correctly.
10737
10738 2001-08-30 Per Bothner <per@bothner.com>
10739
10740 * jcf-io.c (open_class): Set filename field.
10741
10742 * jcf-parse,c (parse_class_file): Set current_function_decl
10743 for better error message when Code attribute is missing.
10744
10745 * lang.c (put_decl_node, lang_print_error): Re-arrange for
10746 better diagnostics, especially for constructors.
10747
10748 2001-08-30 Per Bothner <per@bothner.com>
10749
10750 * jcf-write.c (generate_classfile): Don't write ConstantValue
10751 attribute if field is not final, for compatibility with jdk.
10752
10753 * jcf-write.c (generate_classfile): Convert ConstantValue values
10754 to correct type. Work-around for front-end bug.
10755 * class.c (set_constant_value): Error if constant has wrong type.
10756
10757 2001-08-30 Per Bothner <per@bothner.com>
10758
10759 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
10760 "Double" are printed at verbosity 1.
10761
10762 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
10763
10764 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
10765
10766 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10767
10768 * parse.y (patch_assignment): Don't verify final re-assignment here.
10769 (java_complete_lhs): Verify assignments to finals calling
10770 patch_assignment. Verify re-assignments to finals before calling
10771 patch_assignment.
10772
10773 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
10774
10775 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10776 Fixes PR java/1413
10777
10778 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
10779
10780 * lex.c (java_lex): new local found_hex_digits. Set and then used
10781 in test to reject invalid hexadecimal numbers.
10782 * parse.y (java_complete_tree): Prevent unwanted cast with
10783 initialized floating point finals.
10784 (patch_binop): Emit a warning when detecting a division by zero,
10785 mark result not constant, don't simplify non integer division.
10786
10787 2001-08-28 Per Bothner <per@bothner.com>
10788
10789 * jcf-write.c (generate_bytecode_insns): For increments and
10790 decrements just recurse to push constant. Improvement on Mark's patch.
10791
10792 2001-08-28 Mark Mitchell <mark@codesourcery.com>
10793
10794 * jcf-write.c (generate_bytecode_insns): Generate an integer to
10795 real conversion for increments and decrements of reals.
10796
10797 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10798
10799 * parse.y (resolve_qualified_expression_name): Handle unresolved
10800 qualified expressions, prevent numerical qualifiers, fixed typo.
10801 Fixes PR java/4141
10802
10803 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10804
10805 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10806 don't report anything but deprecated class when marked so. Handle
10807 VAR_DECL.
10808 (patch_method_invocation): Check deprecation on methods and types.
10809 (patch_binop): code becomes an enum tree_code, added default: to
10810 switch to handle that. Detect division by zero, try to fold and
10811 return before using a subroutine.
10812
10813 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
10814
10815 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10816 file smaller than 4 bytes.
10817 * parse.y (check_inner_circular_reference): New function.
10818 (check_circular_reference): Likewise.
10819 (array_initializer:): Accept {,}.
10820 (java_check_circular_reference): Rewritten using
10821 check_circular_reference and check_inner_circular_reference.
10822 (java_complete_expand_method): Unconditionally save and restore
10823 the unpurged exception list.
10824 (build_dot_class_method_invocation): Unmangle signature parameter.
10825
10826 2001-08-21 Tom Tromey <tromey@redhat.com>
10827
10828 * decl.c (init_decl_processing): Add `throws' field to method
10829 descriptor.
10830 * class.c (make_method_value): Compute `throws' field for method.
10831
10832 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10833
10834 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10835 circularity is detected.
10836 (ctors_unchecked_throws_clause_p): Fixed leading comment.
10837
10838 2001-08-17 Richard Henderson <rth@redhat.com>
10839
10840 * class.c (emit_register_classes): Add align parameter to
10841 call to assemble_integer.
10842
10843 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
10844
10845 * jcf-parse.c (load_class): New locals saved and class_loaded. If
10846 loading a class_or_name fails, try considering an innerclass name
10847 and load the enclosing context.
10848 * parse.y (resolve_inner_class): New function.
10849 (find_as_inner_class): Added leading comment.
10850 (register_incomplete_type): Keep the current context as enclosing
10851 context for JDEP_FIELD dependencies.
10852 (do_resolve_class): Locals new_class_decl and super initialized to
10853 NULL. Call resolve_inner_class, explore the enclosing context
10854 superclass if necessary.
10855 Fixes PR java/4007
10856
10857 2001-08-16 Tom Tromey <tromey@redhat.com>
10858
10859 * jcf-dump.c (main): Updated for change to jcf_path_seal.
10860 * gjavah.c (main): Updated for change to jcf_path_seal.
10861 * lang.c (version_flag): New global.
10862 (java_decode_option): Recognize `-version'.
10863 (java_init): Update for change to jcf_path_seal.
10864 * jcf.h (jcf_path_seal): Added `print' argument.
10865 * jcf-path.c (jcf_path_seal): Added `print' argument.
10866
10867 2001-08-13 Zack Weinberg <zackw@panix.com>
10868
10869 * Make-lang.in (java/decl.o): Update dependencies.
10870 * decl.c: Include libfuncs.h, don't include toplev.h.
10871
10872 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10873
10874 * decl.c (init_decl_processing): exception_type_node,
10875 class_not_found_type_node, and no_class_def_found_type_node
10876 initialized. predef_filenames augmented accordingly.
10877 instinit_identifier_node initialized.
10878 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10879 * java-tree.h (enum java_tree_index): New entries
10880 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10881 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10882 (exception_type_node): New macro.
10883 (class_not_found_type_node): Likewise.
10884 (no_class_def_found_type_node): Likewise.
10885 (instinit_identifier_node): Likewise.
10886 (PREDEF_FILENAMES_SIZE): Adjusted.
10887 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10888 (struct lang_type): Fixed typo in bitfield name.
10889 (DECL_INSTINIT_P): New macro.
10890 (ID_INSTINIT_P): Likewise.
10891 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10892 attribute.
10893 * parse.y (encapsulate_with_try_catch): New function.
10894 (generate_instinit): Likewise.
10895 (build_instinit_invocation): Likewise.
10896 (ctors_unchecked_throws_clause_p): Likewise.
10897 (add_instance_initializer): Deleted.
10898 (build_instance_initializer): Likewise.
10899 (in_instance_initializer): Likewise.
10900 (check_method_redefinition): instinit$ not to be verified.
10901 (java_complete_expand_methods): Generate instinit$, simplified code.
10902 (build_dot_class_method): Eliminated unnecessary locals. Use
10903 encapsulate_with_try_catch, removed unnecessary code.
10904 (fix_constructors): New local iii. Use build_instinit_invocation.
10905 (patch_method_invocation): Added comment.
10906 (maybe_use_access_method): Don't consider instinit$.
10907 (find_applicable_accessible_methods_list): Shorten the search for
10908 instinit$ too.
10909 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10910 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10911 (patch_throw_statement): Likewise. Fixed typo.
10912
10913 2001-08-12 David Edelsohn <edelsohn@gnu.org>
10914
10915 Revert:
10916 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10917 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10918 ASM_FINAL_SPEC.
10919 (lang_specific_pre_link): Use set_input to set input_filename.
10920 Append `main' here.
10921 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10922 (main): Fix definition.
10923 Strip `main' from classname.
10924 Fixes PR java/227.
10925
10926 2001-08-11 Zack Weinberg <zackw@panix.com>
10927
10928 * lex.h: Don't include setjmp.h. Don't define
10929 SET_FLOAT_HANDLER or prototype set_float_handler.
10930
10931 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10932
10933 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10934 `poplevel' in the right order.
10935
10936 2001-08-09 Richard Henderson <rth@redhat.com>
10937
10938 * Make-lang.in (class.o): Depend on TARGET_H.
10939 * class.c (emit_register_classes): Use target hooks instead of
10940 assemble_constructor and assemble_destructor.
10941
10942 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
10943
10944 * check-init.c (flags.h): Include
10945 (check_init): Don't report uninitialized static class
10946 initialization flags, don't free bit index when doing static class
10947 initialization optimization.
10948 (check_for_initialization): Return type changed to `unsigned int.'
10949 (attach_initialized_static_class): New function.
10950 * class.c (add_method_1): Create the initialized static class
10951 table if necessary.
10952 (finish_class): Always emit deferred inline methods.
10953 * decl.c (emit_init_test_initialization): Moved to expr.c
10954 (complete_start_java_method): Don't traverse
10955 DECL_FUNCTION_INIT_TEST_TABLE.
10956 (lang_mark_tree): Mark hash tables in function decls.
10957 * expr.c (emit_init_test_initialization): Moved from decl.c.
10958 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10959 initialization flag, set DECL_CONTEXT and
10960 LOCAL_CLASS_INITIALIZATION_FLAG.
10961 (java_lang_expand_expr): Emit initialization code for static class
10962 initialized flags when entering block, if necessary.
10963 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10964 * java-tree.h (flag_optimize_sci): New global variable declaration.
10965 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10966 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10967 (LOCAL_FINAL_P): Fixed typo in comment.
10968 (FINAL_VARIABLE_P): Likewise.
10969 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10970 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10971 (struct lang_decl): New fields `ict', `smic' and `cif.'
10972 (check_for_initialization): New returned value for global.
10973 (attach_initialized_static_class): New global function.
10974 (STATIC_CLASS_INIT_OPT_P): New macro.
10975 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10976 * lang.c (java_decode_option): Handle
10977 `-fno-optimize-static-class-initialization'
10978 * parse.y (start_complete_expand_method): New function.
10979 (java_expand_method_bodies): Likewise.
10980 (attach_init_test_initialization_flags): Likewise.
10981 (adjust_init_test_initialization): Likewise.
10982 (emit_test_initialization): Likewise.
10983 (java_complete_expand_methods): Nullify abstract and native method
10984 bodies.
10985 (java_complete_expand_method): New locals `fbody', `block_body'
10986 and `exception_copy.' Reorganized: directly return on empty method
10987 bodies, call `start_complete_expand_method', remember definitely
10988 initialized static class in function, don't expand method bodies.
10989 (java_expand_classes): Call `java_expand_method_bodies' before
10990 `finish_class' when compiling to native.
10991 (resolve_expression_name): Use `orig' after building outer class
10992 field access.
10993 (patch_invoke): Remember static method invocations.
10994
10995 2001-08-06 Richard Henderson <rth@redhat.com>
10996
10997 * class.c (emit_register_classes): Pass a symbol_ref and priority
10998 to assemble_constructor.
10999
11000 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
11001
11002 * java-tree.h (all_class_filename): New macro.
11003 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
11004 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
11005 newly created IDENTIFIER_NODE to `all_class_filename.'
11006
11007 2001-08-01 Jeff Sturm <jsturm@one-point.com>
11008
11009 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
11010 Use ggc_add_tree_root to register roots.
11011
11012 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
11013
11014 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
11015 second operand calling check_init.
11016 * decl.c (complete_start_java_method): Swaped second and third
11017 arguments while creating WITH_CLEANUP_EXPR node.
11018 * jcf-write.c (generate_bytecode_insns): Use second operand
11019 instead of third when handling WITH_CLEANUP_EXPR.
11020 * parse.y (java_complete_lhs): Expand second operand of
11021 WITH_CLEANUP_EXPR nodes.
11022 (patch_synchronized_statement): Swaped second and third arguments
11023 while creating WITH_CLEANUP_EXPR node.
11024
11025 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
11026
11027 * parse.y (create_interface): Avoid cyclic inheritance report when
11028 syntax error encountered during class definition.
11029 Fixes PR java/2956
11030
11031 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
11032
11033 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
11034 ASM_FINAL_SPEC.
11035 (lang_specific_pre_link): Use set_input to set input_filename.
11036 Append `main' here.
11037 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
11038 (main): Fix definition.
11039 Strip `main' from classname.
11040 Fixes PR java/227.
11041
11042 2001-07-18 Tom Tromey <tromey@redhat.com>
11043
11044 For PR java/2812:
11045 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
11046 * lex.c (java_new_lexer): Use ICONV_CONST.
11047 (java_read_char): Likewise.
11048 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
11049 (jv-scan$(exeext)): Likewise.
11050
11051 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
11052
11053 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
11054 * parse.y (check_class_interface_creation): Allow `private' if the
11055 enclosing is not an interface.
11056 (create_interface): Interface tagged public if the enclosing
11057 context is an interface.
11058 (create_class): Class tagged public if the enclosing context
11059 is an interface.
11060 Fixes PR java/2959
11061
11062 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
11063
11064 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
11065 Fixes PR java/2665
11066
11067 2001-07-14 Tim Josling <tej@melbpc.org.au>
11068
11069 * check-init.c (check_init): Remove references to EXPON_EXPR.
11070
11071 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
11072
11073 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
11074 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
11075 Fixes PR java/3602
11076
11077 2001-07-13 Tom Tromey <tromey@redhat.com>
11078
11079 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
11080 invocation.
11081
11082 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
11083
11084 * parse.y (patch_method_invocation): Don't override primary if one
11085 is already provided, but let this$<n> be built. Fixed comment.
11086
11087 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
11088
11089 * parse.y (empty_statement:): Report empty statement error only
11090 when found at class declaration level.
11091 Fixes PR java/3635
11092
11093 2001-07-12 Tom Tromey <tromey@redhat.com>
11094
11095 * expr.c (expand_load_internal): New function.
11096 (LOAD_INTERNAL): Use it.
11097
11098 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
11099
11100 * parse.y (verify_constructor_super): Compare anonymous class ctor
11101 args with `valid_method_invocation_conversion_p.'
11102 Fixes PR java/3285
11103
11104 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11105
11106 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
11107 `-fsyntax-only.' Fixes PR java/3248
11108
11109 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11110
11111 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
11112
11113 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11114
11115 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
11116 current function is static. Fixes PR java/1970
11117
11118 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11119
11120 * parse.y (patch_method_invocation): Add enclosing context to ctor
11121 calls if necessary. Fixes PR java/2953
11122
11123 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11124
11125 * parse.y (resolve_package): Abort if qualified expression member
11126 isn't right.
11127 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
11128 Fixes PR java/1391
11129
11130 2001-07-07 Zack Weinberg <zackw@stanford.edu>
11131
11132 * verify.c: Don't use // comments.
11133
11134 2001-07-05 Tom Tromey <tromey@redhat.com>
11135
11136 * lang.c (flag_assume_compiled): Removed.
11137 * java-tree.h (flag_assume_compiled): Removed.
11138 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
11139 -fhash-synchronization, -fuse-divide-subroutine,
11140 -fcheck-references, -femit-class-file, -femit-class-files,
11141 -fassume-compiled. Updated --encoding information. Changed
11142 -foutput-class-dir to `-d'.
11143
11144 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
11145
11146 * jcf-parse.c (parse_class_file): Add lineno parameter to
11147 debug_start_source_file call.
11148
11149 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
11150
11151 * gcj.texi: Use gpl.texi.
11152 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
11153 dependencies and use doc/include in search path.
11154
11155 2001-07-03 Jeff Sturm <jsturm@one-point.com>
11156
11157 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
11158 `this'. If so, don't build instance initializers.
11159
11160 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
11161
11162 * parse.y (resolve_expression_name): Improved error message for
11163 inner class cases. Fixes PR java/1958
11164
11165 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
11166
11167 * lang.c: #include diagnostic.h
11168 (lang_print_error): Add a `diagnostic_context *' parameter.
11169 (java_dummy_print): Likewise.
11170 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
11171
11172 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11173
11174 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
11175 * jcf.h (typedef struct JCF): New bitfield `finished.'
11176 (JCF_FINISH): Set `finished.'
11177 (JCF_ZERO): Reset `finished.'
11178 Fixes PR java/2633
11179
11180 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11181
11182 * parse.y (class_body_declaration:): Don't install empty instance
11183 initializers.
11184 Fixes PR java/1314
11185
11186 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11187
11188 * class.c (set_super_info): Call `set_class_decl_access_flags.'
11189 (set_class_decl_access_flags): New function.
11190 * java-tree.h (set_class_decl_access_flags): New prototype.
11191 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
11192 (parse_class_file): New local `decl_max_locals.' Take wide types
11193 into account to compute DECL_MAX_LOCALS.
11194 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
11195 imports on demand.
11196
11197 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
11198
11199 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
11200
11201 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11202
11203 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
11204 * parse.y (do_resolve_class): Moved comments out to leading comment
11205 section. Removed local `start', New local `_ht' and
11206 `circularity_hash.' Record `enclosing' in hash table and search
11207 it to detect circularity. Use `enclosing' as an argument to
11208 `lookup_cl.' Free the hash table when done.
11209
11210 2001-06-19 Tom Tromey <tromey@redhat.com>
11211
11212 * lex.c (java_read_char): Disallow invalid and overlong
11213 sequences. Fixes PR java/2319.
11214
11215 2001-06-05 Jeff Sturm <jsturm@one-point.com>
11216
11217 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
11218
11219 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11220
11221 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
11222 arguments accordingly.
11223
11224 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
11225
11226 * gcj.texi: Move contents to just after title page.
11227
11228 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
11229
11230 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
11231 builtin type.
11232 (patch_incomplete_class_ref): Build the class ref, build the class
11233 init if necessary, complete the tree.
11234 Fixes PR java/2605
11235
11236 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
11237
11238 * parse.y (lookup_field_wrapper): Test `name' code.
11239 (resolve_qualified_expression_name): Test `qual_wfl' code.
11240 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
11241 handle `qual_wfl' by code.
11242 (maybe_build_primttype_type_ref): Test `wfl' code.
11243
11244 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11245
11246 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
11247 fdl.texi.
11248 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
11249 the dvi file in the java directory.
11250
11251 2001-05-25 Sam TH <sam@uchicago.edu>
11252
11253 * gen-table.pl javaop.h jcf.h lex.h,
11254 parse.h: Fix header include guards.
11255
11256 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
11257
11258 * jv-scan.c (version): Update copyright year.
11259
11260 2001-05-21 Per Bothner <per@bothner.com>
11261
11262 * jcf-parse.c (read_class): If class is from .class or .zip file
11263 and it's already been read, don't push/pop parser context.
11264
11265 2001-05-18 Per Bothner <per@bothner.com>
11266
11267 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
11268 command line so the jvgenmain-generated main program comes first.
11269
11270 2001-05-15 Tom Tromey <tromey@redhat.com>
11271
11272 * class.c (build_utf8_ref): Don't generate identifier based on
11273 utf8const contents.
11274
11275 2001-05-12 Richard Henderson <rth@redhat.com>
11276
11277 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
11278 * expr.c (java_lang_expand_expr): Expand it.
11279 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
11280 calling build_exception_object_ref.
11281 * parse.y (catch_clause_parameter): Likewise.
11282 (build_dot_class_method): Likewise.
11283 (try_reference_assignconv): Likewise.
11284 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
11285 * jcf-write.c (generate_bytecode_insns): Likewise.
11286
11287 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
11288
11289 * parse.y (build_unresolved_array_type): Set
11290 EXPR_WFL_QUALIFICATION on the newly created wfl.
11291 Fixes PR java/2538. Fixes PR java/2535.
11292
11293 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
11294
11295 * parse.y (fix_constructors): Removed unnecessary assignment to
11296 local. Moved assignment to `this$<n>', fixed comments and
11297 indentation.
11298 (build_wfl_wrap): Fixed indentation.
11299 Fixes PR java/2598, java/2579 and java/2658.
11300
11301 2001-05-03 Mo DeJong <mdejong@redhat.com>
11302
11303 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
11304 check for byte swap.
11305
11306 2000-05-02 Jeff Sturm <jsturm@one-point.com>
11307
11308 * expr.c (build_class_init): Move MODIFY_EXPR
11309 outside of COND_EXPR. Remove variable `call'.
11310
11311 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11312
11313 * decl.c: NULL_PTR -> NULL.
11314 * jcf-write.c: Likewise.
11315
11316 2001-05-01 Tom Tromey <tromey@redhat.com>
11317
11318 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
11319 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
11320 * gcj.texi: Updated copyright text. Include fdl.texi.
11321 (Top): Link to new node.
11322
11323 2001-05-01 Per Bothner <per@bothner.com>
11324
11325 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
11326
11327 2001-05-01 Per Bothner <per@bothner.com>
11328
11329 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
11330 import_list contains the name, not the TREE_PURPOSE.
11331
11332 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11333
11334 * jcf-io.c (read_zip_member): Cast to long in comparison with
11335 signed value.
11336
11337 * jvspec.c (lang_specific_driver): Initialize variables.
11338
11339 * mangle.c (find_compression_record_match): Likewise.
11340
11341 * typeck.c (build_null_signature): Provide static prototype. Mark
11342 parameter with ATTRIBUTE_UNUSED.
11343
11344 * verify.c (verify_jvm_instructions): Initialize variable.
11345
11346 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11347
11348 * parse.y (do_resolve_class): Check for cyclic inheritance during
11349 inner class resolution.
11350
11351 2001-04-27 Per Bothner <per@bothner.com>
11352
11353 * parse.y (java_expand_classes): Don't change ctxp_for_generation
11354 while iterating, since that could cause gc to lose stuff.
11355
11356 2001-04-26 Per Bothner <per@bothner.com>
11357
11358 Fix method search wrt scope of inner classes to match JLS2.
11359 * typeck.c (build_null_signature): New static function.
11360 (has_method): New function. Uses build_null_signature and lookup_do.
11361 * java-tree.h (has_method): New declaration.
11362 * parse.y (find_applicable_accessible_methods_list): Do not search
11363 context of inner classes here.
11364 (patch_method_invocation): Search scope, ie. current and outer clases,
11365 for method matching simple name, to find class.
11366
11367 2001-04-26 Per Bothner <per@bothner.com>
11368
11369 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
11370 Fix thinko: If a single case, use if_icmpeq, not ifeq.
11371
11372 * constants.c (find_methodref_with_class_index): New function.
11373 (find_methodref_index): Use find_methodref_with_class_index.
11374 * java-tree.h (find_methodref_with_class_index): New declaration.
11375 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
11376 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
11377 If context changed from interface to class, don't use invokeinterface.
11378
11379 2001-04-25 Per Bothner <per@bothner.com>
11380
11381 * verify.c (verify_jvm_instructions): For field instructions,
11382 check that field index is valid. For invoke instructions, check that
11383 method index is valid.
11384
11385 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
11386
11387 * config-lang.in (target_libs): Copy from $libgcj_saved.
11388
11389 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11390
11391 * decl.c (init_decl_processing): Add new class "protectionDomain"
11392 field.
11393 * class.c (make_class_data): Set initial value for "protectionDomain".
11394
11395 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11396
11397 * jvspec.c (lang_specific_driver): Fix memory allocation
11398 deficit, by using concat in lieu of xmalloc/sprintf.
11399
11400 2001-04-20 Per Bothner <per@bothner.com>
11401
11402 Fixes to compile multiple .class files at once.
11403 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
11404 * java-tree.h (CLASS_PARSED_P): New macro.
11405 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
11406 * jcf-parse.c (jcf_parse_source): Inline into read_class.
11407 (read_class): Avoid some code duplication.
11408 Don't call JCF_FINISH for a .class file - might be needed later.
11409 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
11410 rather than CLASS_LOADED_P, since latter implies class laid out.
11411 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
11412 * parse.y: Don't need to set CLASS_LOADED_P for array types.
11413
11414 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11415
11416 * Make-lang.in (java/boehm.o): Depend on toplev.h.
11417
11418 * boehm.c: Include toplev.h.
11419
11420 2001-04-06 Tom Tromey <tromey@redhat.com>
11421 Alexandre Petit-Bianco <apbianco@redhat.com>
11422
11423 Fix for PR gcj/1404 and PR gcj/2332:
11424 * parse.y (build_array_from_name): If we use the type_wfl then
11425 accumulate dimensions from the original type as well.
11426 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
11427
11428 2001-04-06 Tom Tromey <tromey@redhat.com>
11429
11430 * parse.y (analyze_clinit_body): Return true if the second operand
11431 of a METHOD_EXPR is nonzero.
11432
11433 2001-04-06 Tom Tromey <tromey@redhat.com>
11434
11435 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
11436 directory.
11437 ($(srcdir)/java/parse.c): Likewise.
11438
11439 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
11440
11441 * gcj.texi: Use `which-gcj' instead of `which-g77.'
11442 (version-gcc): Initialized.
11443 (which-gcj): Likewise.
11444
11445 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11446
11447 * java-tree.h (struct lang_decl): New macro
11448 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
11449 * parse.y (build_instance_initializer): New function.
11450 (add_instance_initializer): Use it.
11451 (java_fix_constructors): Set `current_class' before fix pass.
11452 (fix_constructors): Just return if already fixed. Move `super()'
11453 invocation ahead. Use `build_instance_initializer.'
11454 Fixes PR java/1315.
11455
11456 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11457
11458 * parse.y (resolve_qualified_expression_name): Pass field's
11459 DECL_CONTEXT to `not_accessible_p.'
11460 (not_accessible_p): Changed parameters order in `inherits_from_p'
11461 invocation.
11462
11463 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
11464
11465 * lang-options.h: Add flag_check_references.
11466
11467 2001-04-04 Per Bothner <per@bothner.com>
11468
11469 * java-tree.h (CONSTANT_VALUE_P): New macro.
11470 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
11471 * parse.y (maybe_build_class_init_for_field): New static function.
11472 (resolve_expression_name, resolve_field_access): Use
11473 maybe_build_class_init_for_field instead of build_class_init
11474 This does not do the init if the field is compile-time-constant.
11475 (resolve_field_access): Simplify.
11476
11477 * parse.y (fold_constant_for_init): Merge test into switch.
11478
11479 2001-04-03 Zack Weinberg <zackw@stanford.edu>
11480
11481 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
11482 on gansidecl.h.
11483 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
11484
11485 2001-04-02 Zack Weinberg <zackw@stanford.edu>
11486
11487 * expr.c (pop_type_0): Save the result of the first
11488 lang_printable_name call in a scratch buffer, so it
11489 won't be clobbered by the second call.
11490
11491 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
11492
11493 * parse-scan.y (array_type:): Rewritten.
11494 (type_declaration:): `empty_statement' replaces `SC_TK.'
11495 (class_member_declaration:): `empty statement' added.
11496 (method_body:): Simplified.
11497 (static_initializer:): Likewise.
11498 (primary_no_new_array:): Use `type_literals.'
11499 (type_literals:): New rule.
11500 (dims:): Set and update `bracket_count.'
11501 Fixes PR java/1074. Fixes PR java/2412.
11502
11503 2001-03-28 Hans Boehm <boehm@acm.org>
11504
11505 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
11506 (get_boehm_type_descriptor): Set type on returned value to be a
11507 pointer length integer.
11508
11509 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11510
11511 * expr.c (pop_type_0): Call `concat' rather than building the
11512 string manually.
11513 (pop_type): Add format specifier in call to `error'.
11514
11515 * parse.y (patch_method_invocation): Avoid casting away
11516 const-ness.
11517
11518 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
11519
11520 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
11521
11522 2001-03-28 Richard Henderson <rth@redhat.com>
11523
11524 IA-64 ABI Exception Handling:
11525 * Make-lang.in (except.o): Don't depend on eh-common.h.
11526 * check-init.c (check_init): Handle EXC_PTR_EXPR.
11527 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
11528 [soft_exceptioninfo_call_node]: Remove.
11529 [eh_personality_libfunc, lang_eh_runtime_type]: New.
11530 (end_java_method): No emit_handlers.
11531 * except.c (java_set_exception_lang_code): Remove.
11532 (method_init_exceptions): Don't call it.
11533 (prepare_eh_table_type): No CATCH_ALL_TYPE.
11534 (build_exception_object_ref): New.
11535 (expand_end_java_handler): Update for except.h name changes.
11536 (emit_handlers, expand_resume_after_catch): Remove.
11537 * expr.c (java_lang_expand_expr): Update for except.h name changes.
11538 (process_jvm_instruction): Use build_exception_object_ref.
11539 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
11540 (soft_exceptioninfo_call_node): Remove.
11541 (build_exception_object_ref): Declare.
11542 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
11543 soft_exceptioninfo_call_node. Move processing ...
11544 [EXC_PTR_EXPR]: ... here.
11545 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
11546 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
11547 (source_end_java_method): No java_set_exception_lang_code or
11548 emit_handlers.
11549 (build_dot_class_method): Use build_exception_object_ref.
11550 (try_reference_assignconv): Check EXC_PTR_EXPR not
11551 soft_exceptioninfo_call_node.
11552
11553 2001-03-28 Richard Henderson <rth@redhat.com>
11554
11555 * java-tree.h (throw_node): Define as a single member of
11556 java_global_trees instead of a separate array.
11557 (JTI_THROW_NODE): New.
11558 * decl.c (throw_node): Don't declare.
11559 (init_decl_processing): Init a scalar throw_node.
11560 Don't register it for gc.
11561 * check-init.c (check_init): Reference scalar throw_node.
11562 * expr.c (build_java_athrow): Likewise.
11563 * jcf-write.c (generate_bytecode_insns): Likewise.
11564 * parse.h (BUILD_THROW): Likewise.
11565
11566 2001-03-28 Richard Henderson <rth@redhat.com>
11567
11568 * decl.c (end_java_method): Do not save and restore
11569 flag_non_call_exceptions.
11570 * parse.y (source_end_java_method): Likewise.
11571 * lang.c (flag_exceptions): Don't declare.
11572 (java_init_options): Set flag_non_call_exceptions. Set
11573 flag_exceptions here ...
11574 (java_init): ... not here.
11575
11576 2001-03-27 Richard Henderson <rth@redhat.com>
11577
11578 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11579 exceptions_via_longjmp.
11580
11581 * lang.c (flag_new_exceptions): Don't declare it.
11582 (java_init_options): Or set it.
11583
11584 2001-03-27 Richard Henderson <rth@redhat.com>
11585
11586 * decl.c (end_java_method): Rename asynchronous_exceptions to
11587 flag_non_call_exceptions.
11588 * parse.y (source_end_java_method): Likewise.
11589
11590 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11591
11592 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11593
11594 2001-03-26 Mark Mitchell <mark@codesourcery.com>
11595
11596 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11597
11598 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
11599
11600 * parse.y (find_as_inner_class): Follow current package
11601 indications not to mistakingly load an unrelated class.
11602
11603 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11604
11605 * constants.c (PUTN): Use memcpy, not bcopy.
11606
11607 * lex.c (java_read_char): Use memmove, not bcopy.
11608
11609 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11610
11611 2001-03-23 Per Bothner <per@bothner.com>
11612
11613 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
11614 macro for better error pin-pointing.
11615 * java-tree.h: Fix typo in comment.
11616
11617 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
11618 Don't include jsr/goto in exception range.
11619 Check if start and end of exception range are the same (also TRY_EXPR).
11620 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11621 However, do emit the following goto even if try_block is empty.
11622 Defer freeing exception_decl until after the finalizer, to make
11623 sure the local isn't reused in the finalizer. Fixes PR java/1208.
11624
11625 * parse.y (java_complete_lhs): If the try-clause is empty, just
11626 return the finally-clause and vice versa.
11627
11628 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
11629
11630 * gcj.texi (Input Options): documented the check for attribute
11631 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11632 * java-tree.h (flag_force_classes_archive_check): Declared extern.
11633 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11634 (jcf_parse): Check for the right classes archive if necessary.
11635 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11636 (jcf_parse_fields): Fixed indentation.
11637 * jcf-write.c (append_gcj_attribute): New function.
11638 (generate_classfile): Compute the attribute count, invoke
11639 `append_gcj_attribute'.
11640 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11641 turned into bit-fields. New bit-field `right_zip.'
11642 (JCF_ZERO): Set `right_zip' to zero.
11643 * lang-options.h (-fforce-classes-archive-check): Added flag.
11644 * lang.c (flag_force_classes_archive_check): New flag.
11645 (lang_f_options): New entry `force-classes-archive-check.'
11646 Fixes PR java/1213.
11647
11648 2001-02-07 Andrew Haley <aph@redhat.com>
11649
11650 * gcj.texi (Configure-time Options): Add -fcheck-references.
11651 * expr.c (build_java_indirect_ref): New function.
11652 (java_check_reference): New function.
11653 (build_java_array_length_access): Use build_java_indirect_ref to
11654 check for null references.
11655 (build_java_arrayaccess): Likewise.
11656 (build_get_class): Likewise.
11657 (build_field_ref): Likewise.
11658 (invoke_build_dtable): Likewise.
11659 (build_invokeinterface): Likewise.
11660 * lang.c (lang_f_options): Add flag_check_references.
11661 * jvspec.c (jvgenmain_spec): Add flag_check_references.
11662 * java-tree.h (flag_check_references): New variable.
11663 * lang.c (flag_check_references): Likewise.
11664 * parse.y (patch_invoke): Use java_check_reference.
11665 (patch_assignment): Allow for extra nesting in
11666 _Jv_CheckArrayStore.
11667
11668 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
11669
11670 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11671 * lex.c (cxx_keywords): Likewise.
11672
11673 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11674
11675 * parse.y (qualify_ambiguous_name): Broaden `length'
11676 recognition. Help MODIFY_EXPR be resolved as expression names.
11677 Fixes PR java/2066. Fixes PR java/2400.
11678
11679 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
11680
11681 * gjavah.c (process_file): Mark interface definitions with
11682 "__attribute__ ((java_interface))".
11683
11684 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11685
11686 * class.c (layout_class): Fixed push_super_field's second
11687 argument. Fixes PR java/2333.
11688 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11689 too early to lay innerclasses out.
11690
11691 2001-03-20 Tom Tromey <tromey@redhat.com>
11692 Alexandre Petit-Bianco <apbianco@redhat.com>
11693
11694 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11695 inside an array reference. Insertion of the array store check
11696 rewritten. Fixes PR java/2299.
11697
11698 2001-03-20 Tom Tromey <tromey@redhat.com>
11699
11700 * lex.c (java_read_unicode): Only accept leading `u's.
11701
11702 2001-03-20 Tom Tromey <tromey@redhat.com>
11703
11704 * jcf-parse.c (read_class): Initialize `class'.
11705
11706 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11707
11708 * jcf_parse.c (jcf_parse): Eliminate unused variable.
11709
11710 2001-03-19 Mark Mitchell <mark@codesourcery.com>
11711
11712 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11713 (layout_class): Likewise.
11714 (layout_class_method): Likewise.
11715 (emit_register_classes): Likewise.
11716 * decl.c (builtin_function): Likewise.
11717 (give_name_to_locals): Likewise.
11718
11719 2001-03-19 Per Bothner <per@bothner.com>
11720
11721 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
11722 before trying to load an inner class.
11723
11724 Fixes to process to command-line .class files in two passes.
11725 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
11726 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
11727 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
11728 * class.c (is_compiled_class): Fix for renamed flag.
11729 * parse.y (maybe_create_class_interface_decl): Likewise.
11730 * jcf-parse.c (yyparse): Also set if compiling .class files.
11731 * jcf-parse.c (read_class); Read current_class.
11732 (jcf_parse): Make static.
11733 (load_inner_classes): New function, with code moved from jcf_parse,
11734 because we need to inner classes after the command-line files are read.
11735 (yyparse): Set finput to NULL when it doesn't need to be closed.
11736 Reduce use of main_jcf (basically only for archive) and
11737 use finput instead of main_jcf->read_state.
11738 Inline jcf_figure_file_type into yyparse.
11739 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11740 Defer load_inner_classes and parse_class_file to a second pass,
11741 after we've correctly mapped command-line .clas fiels to classes.
11742 (jcf_figure_file_type): Removed.
11743 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
11744 (JCF_ZERO): Also clear zipd field.
11745 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
11746
11747 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11748
11749 * jcf-parse.c (yyparse): Change ch from char * to char.
11750
11751 2001-03-19 Per Bothner <per@bothner.com>
11752
11753 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
11754 Add constructed filelist-file at end, following -xjava. Thus any .o
11755 and library files are not affected by the -xjava. Also wrap
11756 explicit @FILE with -xjava and -xnone.
11757
11758 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
11759
11760 * class.c (build_static_field_ref): Call make_decl_rtl() after
11761 setting the DECL_EXTERNAL flag.
11762
11763 2001-03-17 Per Bothner <per@bothner.com>
11764
11765 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
11766
11767 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
11768 when result is is needed (target is STACK_TARGET).
11769
11770 * parse.h (JDEP_SOLV): Removed.
11771 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
11772
11773 * parse.y (incomplete_class_list): Removed.
11774 (obtain_incomplete_type): Don't use or set incomplete_class_list.
11775 It doesn't work if resolve_class changes the name of an array type
11776 that is on the list and then someone else looks for the modified name.
11777 Also, seems liable to break when compiling multiple source files at
11778 once. So the simplest is to just remove incomplete_class_list -
11779 it is only a minor space win and it is not even clear it saves time.
11780
11781 * parse.y (resolve_class): Remove unneeded promote_type.
11782
11783 2001-03-15 Per Bothner <per@bothner.com>
11784
11785 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
11786 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
11787 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11788 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11789
11790 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
11791 * parse.y (java_expand_classes): Likewise.
11792
11793 * parse.y (expand_start_java_method): Was only called once and had a
11794 misleading name, so inline in caller java_complete_expand_method.
11795 (enter_a_block): Likewise inline in enter_block and remove.
11796
11797 Remove junk from when gcc/java was created (by copying from C/C++).
11798 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
11799 (struct binding_level): Remove fields keep, keep_if_subblocks,
11800 more_cleanups_ok, have_cleanups (which have never been used).
11801 (pushlevel, poplevel): Remove related useless code.
11802
11803 * class.c (make_class_data): The class_dtable_decl (i.e. the
11804 vtable for Class) should be external, except when compiling Class.
11805
11806 * jvspec.c (lang_specific_driver): Fix -C handling.
11807 Check -save-temps to see if temp @FILE should be deleted.
11808 Follow-up to/fix for February 16 patch.
11809
11810 * verify.c (verify_jvm_instructions): Better error msgs for dup.
11811 (type_stack_dup): Remove no-longer neded error check.
11812
11813 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
11814
11815 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11816 to 'for_pointer'. If this type is for a pointer (argument) mangling,
11817 don't surround the element with 'N..E' if the type name is
11818 unqualified.
11819
11820 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11821
11822 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11823 DECL_RTL_SET_P, etc.
11824 (make_method_value): Likewise.
11825 (get_dispatch_table): Likewise.
11826
11827 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11828
11829 2001-03-07 Tom Tromey <tromey@redhat.com>
11830
11831 * config-lang.in (lang_requires): Define.
11832
11833 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
11834
11835 * typeck.c (convert): Check flag_unsafe_math_optimizations,
11836 not flag_fast_math.
11837
11838 2001-03-05 Per Bothner <per@bothner.com>
11839
11840 Fix a problem where rest_of_decl_compilation applied to
11841 class_dtable_decl causes problems because it was done too early,
11842 before output file was opened.
11843 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
11844 * class.c (class_dtable_decl): Add macro - element of class_roots.
11845 (make_class_data): Define class_dtable_decl.
11846 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
11847
11848 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11849
11850 * java/class.c, java/decl.c, java/java-tree.h: Replace all
11851 uses of 'boolean' with 'bool'.
11852
11853 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11854
11855 * lang-specs.h: Add zero initializer for cpp_spec field to all
11856 array elements.
11857
11858 2001-02-16 Per Bothner <per@bothner.com>
11859
11860 Handle compiling multiple input files at once, and @FILE syntax.
11861 * gcj.texi: Updated documentation to match.
11862 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
11863 * jcf-parse.c (parse_source_file): Split into ...
11864 (parse_source_file_1): New function - and:
11865 (parse_source_file_2): New function.
11866 (yyparse): On -ffilelist-file, open and scan named file.
11867 On first pass over files, only do parse_source_file_1.
11868 A new second pass calls parse_source_file_2 for each file to compile.
11869 (init_jcf_parse): Call init_src_parse.
11870 * jvspec.c (INDIRECT_FILE_ARG): New flag.
11871 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
11872 as multiple input file combined in one compilation.
11873 * lang-options.h: Add -ffilelist-file
11874 * lang.c (flag_filelist_file): New flag variable.
11875 (lang_f_options): Handle -ffilelist-file.
11876 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11877 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
11878 gclass_list - use global fields of src_parse_roots instead.
11879 * parse.y (src_parse_roots): New array.
11880 (incomplete_class_list, gclass_list): New macros.
11881 (push_parser_context, java_pop_parser_context,
11882 java_parser_context_resume): Don't fiddle with deleted fields.
11883 (various): Use incomplete_class gclass_list and global macros
11884 instead of parse_ctxt fields - the lists are global.
11885 (init_src_parse): New function.
11886
11887 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11888
11889 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11890
11891 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11892
11893 * parse.y (check_inner_class_access): Moved declaration of local
11894 `enclosing_decl_type' to the right location.
11895
11896 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
11897
11898 * parse.y (parser_check_super_interface): Don't call
11899 check_pkg_class_access for an inner interface.
11900 (parser_check_super): Don't call check_pkg_class_access for inner
11901 class.
11902 (do_resolve_class): Simplify enclosing type loop. Don't call
11903 check_pkg_class_access if CL and DECL are not set.
11904 (find_in_imports_on_demand): Set DECL if class_type needed to be
11905 loaded. Don't call check_pkg_class_access for an inner class.
11906 (check_inner_class_access): Rewritten to implement member access
11907 rules as per spec 6.6.1.
11908 (check_pkg_class_access): Handle the empty package correctly.
11909 (in_same_package): New function. Determine if two classes are in the
11910 same package.
11911
11912 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
11913
11914 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11915 method into array types.
11916 * parse.y (patch_method_invocation): Bypass access check on clone call
11917 to array instance.
11918
11919 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
11920
11921 * expr.c (build_instanceof): Check for arrays when trying fold to
11922 false.
11923
11924 2001-02-15 Jim Meyering <meyering@lucent.com>
11925
11926 * Make-lang.in (java.install-common): Depend on `installdirs'.
11927 (java.install-info): Likewise.
11928
11929 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
11930
11931 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11932
11933 2001-02-14 Tom Tromey <tromey@redhat.com>
11934 Alexandre Petit-Bianco <apbianco@cygnus.com>
11935
11936 Fix for PR java/1261.
11937 * typeck.c (build_java_array_type): Add public `clone' method to
11938 arrays.
11939 * parse.y (resolve_qualified_expression_name): Use current_class
11940 when checking for inaccessibility.
11941 (patch_method_invocation): Fixed error message when accessibility
11942 denied. Added `from_super' argument.
11943
11944 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11945
11946 * parse.y (resolve_class): Don't build a fake decl. Use the one
11947 already built.
11948 * typeck.c (build_java_array_type): Build and assign decl to array
11949 type.
11950
11951 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11952
11953 * parse.y (not_accessible_p): Changed leading comment. Added extra
11954 `where' argument. Use it to enforce protected access rules.
11955 (resolve_qualified_expression_name): Added extra argument to
11956 not_accessible_p.
11957 (patch_method_invocation): Use argument `primary' to provide
11958 not_accessible_p with an extra argument.
11959 (lookup_method_invoke): Added extra argument to not_accessible_p.
11960 (search_applicable_method_list): Likewise.
11961
11962 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
11963
11964 * parse.y (resolve_qualified_expression_name): Try to resolve as
11965 an inner class access only if `decl' is a TYPE_DECL.
11966
11967 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11968
11969 * decl.c (classdollar_identifier_node): Initialize.
11970 * java-tree.h (enum java_tree_index): New entry
11971 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11972 (classdollar_identifier_node): New macro.
11973 (ID_CLASSDOLLAR_P): Likewise.
11974 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11975 (build_dot_class_method_invocation): Likewise.
11976 (find_applicable_accessible_methods_list): `class$' can't be
11977 inherited.
11978
11979 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
11980
11981 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11982
11983 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11984
11985 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11986 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11987 gone.
11988
11989 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11990
11991 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
11992 outside of the `__U' sequence too.
11993 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
11994 sequence too.
11995
11996 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11997
11998 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
11999
12000 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12001
12002 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
12003 (JVGENMAIN_OBJS): Likewise.
12004 * java-tree.h (append_gpp_mangled_name): New prototype.
12005 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
12006 Removed cast calling `gcc_add_root.'
12007 * jvgenmain.c (mangle_obstack): New global, initialized.
12008 (main): Use it.
12009 (do_mangle_class): Constify local `ptr.'
12010 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
12011 append_gpp_mangle_name and update `count' if necessary.
12012 Use `mangle_obstack.'
12013 * mangle.c (append_unicode_mangled_name): Removed.
12014 (append_gpp_mangled_name): Likewise.
12015 (unicode_mangling_length): Likewise.
12016 (mangle_member_name): Return type set to `void.'
12017 (mangle_field_decl): Don't append `U' in escaped names.
12018 (mangle_method_decl): Likewise.
12019 (mangle_member_name): Just use `append_gpp_mangled_name.'
12020 * mangle_name.c: New file.
12021
12022 2001-02-07 Per Bothner <per@bothner.com>
12023
12024 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
12025
12026 * check-init.c (check_init): Don't call done_alternative after
12027 processing loop code, as a LOOP_EXPR never terminates normally.
12028
12029 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
12030
12031 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
12032
12033 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12034
12035 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
12036 DECLs.
12037
12038 2001-02-06 Tom Tromey <tromey@redhat.com>
12039
12040 * lex.c (java_new_lexer): Longer error message.
12041
12042 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
12043 Alexandre Petit-Bianco <apbianco@cygnus.com>
12044
12045 * typeck.c (build_prim_array_type): Added leading comment.
12046 (build_java_array_type): Moved locals out of
12047 block. Always create the `data' field, fixed alignment to match
12048 C++.
12049
12050 2001-02-04 Tom Tromey <tromey@redhat.com>
12051
12052 * expr.c (java_lang_expand_expr): Don't bother recomputing
12053 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
12054 Fixes PR java/1866.
12055
12056 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12057
12058 * parse.y (process_imports): Save the original name of the import
12059 for better error report.
12060
12061 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
12062
12063 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
12064 of macros used when compiling jvspec.c.
12065 * jvspec.c (lang_specific_driver): Link with the shared
12066 libgcc by default.
12067
12068 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12069
12070 * check-init.c (check_init): Call internal_error instead of fatal.
12071 * expr.c (java_lang_expand_expr): Likewise.
12072 * jcf-parse.c (get_constant): Likewise.
12073 * mangle.c (java_mangle_decl): Likewise.
12074 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
12075 (operator_string): Likewise.
12076 * check-init.c (check_init): Call abort instead of fatal.
12077 * class.c (build_class_ref): Likewise.
12078 * constants.c (write_constant_pool): Likewise.
12079 * decl.c (start_java_method): Likewise.
12080 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
12081 (java_stack_dup, encode_newarray_type): Likewise.
12082 (build_java_array_length_access): Likewise.
12083 (build_java_check_indexed_type, expand_java_pushc): Likewise.
12084 (build_java_soft_divmod, build_invokeinterface): Likewise.
12085 * java-tree.h (INNER_CLASS_P): Likewise.
12086 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
12087 (give_name_to_class, get_class_constant): Likewise.
12088 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
12089 (find_constant_index, generate_bytecode_conditional): Likewise.
12090 (generate_bytecode_insns, perform_relocations): Likewise.
12091 * lex.c (java_unget_unicode, java_lex): Likewise.
12092 * mangle.c (mangle_type, mangle_record_type): Likewise.
12093 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
12094 (finish_mangling): Likewise.
12095 * parse.h (MARK_FINAL_PARMS): Likewise.
12096 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
12097 (obtain_incomplete_type, java_complete_class): Likewise.
12098 (java_check_regular_methods, java_complete_expand_method): Likewise.
12099 (cut_identifier_in_qualified, check_deprecation): Likewise.
12100 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
12101 (java_complete_lhs, lookup_name_in_blocks): Likewise.
12102 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
12103 * typeck.c (set_local_type, parse_signature_type): Likewise.
12104 (parse_signature_string, build_java_signature): Likewise;
12105 (set_java_signature): Likewise.
12106 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
12107 * class.c (add_method): Call fatal_error instead of fatal.
12108 (build_static_field_ref): Likewise.
12109 * expr.c (build_known_method_ref, expand_invoke): Likewise.
12110 * jcf-parse.c (get_constant, jcf_parse): Likewise.
12111 * lex.c (java_new_new_lexer): Likewise.
12112 * jv-scan.c (main): Likewise.
12113 (fatal_error): Renamed from fatal.
12114 * jcf-parse.c (yyparse): Call fatal_io_error instead of
12115 pfatal_with_name.
12116 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
12117 (yyparse): Likewise.
12118 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
12119 * lex.c (java_get_line_col): Likewise.
12120 * jcf-parse.c (load_class): Make errors non-fatal.
12121 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
12122
12123 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
12124
12125 * jvgenmain.c (class_mangling_suffix): Remove unused string.
12126 (error): Remove unused function.
12127 (main): Don't use "__attribute__ alias" on generated class symbol.
12128
12129 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12130
12131 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
12132 argument.
12133 * parse.y (finish_method_declaration): Code accounting for WFLed
12134 method DECL_NAMEs deleted.
12135 (check_abstract_method_definitions): Likewise.
12136 (resolve_type_during_patch): Layout resolved type.
12137 * typeck.c (lookup_do): Removed unused local.
12138
12139 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
12140
12141 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
12142 * decl.c (init_decl_processing): Use integer_minus_one_node, not
12143 integer_negative_one_node.
12144 * expr.c (build_java_binop): Likewise.
12145
12146 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
12147
12148 * zextract.c (read_zip_archive): Read file_offset before writing
12149 zipd and consequently clobbering the header contents.
12150
12151 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12152
12153 * Make-lang.in: Remove all dependencies on defaults.h.
12154 * decl.c: Don't include defaults.h.
12155 * expr.c: Likewise.
12156 * parse.y: Likewise.
12157
12158 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12159
12160 * ChangeLog (2001-01-21): Fixed typo.
12161 * class.c (layout_class_method): Code accounting for WFLed
12162 method DECL_NAMEs deleted.
12163 * constant.c (find_methodref_index): Likewise.
12164 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
12165 * java-tree.h (DECL_FUNCTION_WFL): New macro.
12166 (struct lang_decl): New field `wfl'.
12167 (java_get_real_method_name): Prototype deleted.
12168 * mangle.c (mangle_method_decl): Code accounting for WFLed
12169 method DECL_NAMEs deleted.
12170 * parse.h (GET_METHOD_NAME): Macro deleted.
12171 * parse.y (reset_method_name): Deleted.
12172 (method_header): Set DECL_FUNCTION_WFL.
12173 (check_abstract_method_header): Code accounting for WFLed method
12174 DECL_NAMEs deleted.
12175 (java_get_real_method_name): Deleted.
12176 (check_method_redefinition): Code accounting for WFLed method
12177 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
12178 (java_check_regular_methods): Likewise.
12179 (java_check_abstract_methods): Likewise.
12180 (java_expand_classes): Don't call `reset_method_name.'
12181 (search_applicable_method_list): Use DECL_NAMEs instead of
12182 GET_METHOD_NAME.
12183 * typeck.c (lookup_do): Code accounting for WFLed method
12184 DECL_NAMEs deleted.
12185
12186 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
12187
12188 * lex.c (java_read_char): Check for EOF from getc first.
12189
12190 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12191
12192 * class.c (layout_class): Don't lay the superclass out if it's
12193 already being laid out.
12194 * jcf-parse.c (handle_innerclass_attribute): New function.
12195 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
12196 handle_innerclasses_attribute.
12197 (jcf_parse): Don't load an innerclasses if it's already being
12198 laid out.
12199 * jcf-write.c (append_innerclass_attribute_entry): Static
12200 `anonymous_name' and its initialization deleted. `ocii' and `ini'
12201 to be zero for anonymous classes.
12202
12203 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12204
12205 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
12206 necessary.
12207 * jcf-parse.c (set_source_filename): Use
12208 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
12209
12210 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12211
12212 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
12213 gets a unique asm name.
12214
12215 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12216
12217 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
12218 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12219 if necessary.
12220 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
12221 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
12222 * parse.y (lookup_package_type_and_set_next): Deleted.
12223 (resolve_package): Removed unnecessary code.
12224 (find_applicable_accessible_methods_list): `finit$' can't be
12225 inherited.
12226 * verify.c (pop_argument_types): Added missing prototype.
12227
12228 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
12229
12230 * config-lang.in: Disable java by default.
12231
12232 2001-01-23 Tom Tromey <tromey@redhat.com>
12233
12234 * gcj.texi (Copying): New node.
12235 Added copyright information.
12236
12237 2001-01-21 Per Bothner <per@bothner.com>
12238
12239 Various fixes to allow compiling a compressed .jar/.zip archive.
12240 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
12241 (struct ZipFile): Add fields name and next (from ZipFileCache).
12242 (struct ZipDirectory): New field zipf points to owning ZipFile.
12243 * jcf.h (struct ZipDirectory): Add forward declaration.
12244 (struct JCF): Declare zipd field to have type struct ZipDirectory.
12245 Remove seen_in_zip and zip_offset fields.
12246 (JCF_SEEN_IN_ZIP): New macro.
12247 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
12248 * jcf-io.c: Change all ZipFileCache to ZipFile.
12249 (read_zip_member): New function.
12250 (open_in_zip): Call read_zip_member.
12251 * jcf-parse.c (find_in_current_zip): Remove function.
12252 (read_class): Merge in find_in_current_zip functionality.
12253 Call read_zip_member if needed.
12254 (parse_zip_file_entries): Use read_zip_member.
12255 (process_zip_dir): Update for removed and added JCF fields.
12256 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
12257
12258 2001-01-21 Per Bothner <per@bothner.com>
12259
12260 Minor optimization of static ggc roots.
12261 * jcf-parse.c (parse_roots): New static field.
12262 (current_field, current_method, current_file_list): Replace by macros
12263 naming fields of parse_roots.
12264 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
12265 * class.c (class_roots): New static field.
12266 (registered_class, fields_ident, info_ident, class_list):
12267 New macros naming fields of parse_roots.
12268 (build_static_field_ref): Don't register roots here.
12269 (layout_class): Static field list replaced by macro class_list.
12270 (init_class_processing): Call ggc_add_tree_root for 4 roots.
12271 Initialize fields_ident and info_ident here.
12272
12273 2001-01-21 Per Bothner <per@bothner.com>
12274
12275 * jcf-parse.c (ggc_mark_jcf): New function.
12276 (init_jcf_parse): Register current_jcf as ggc root.
12277
12278 2001-01-21 Per Bothner <per@bothner.com>
12279
12280 * lang.c (put_decl_node): Print method's name.
12281
12282 2001-01-21 Per Bothner <per@bothner.com>
12283
12284 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
12285 (verify_jvm_instructions): Use it, for better error messages on loads.
12286
12287 2001-01-21 Per Bothner <per@bothner.com>
12288
12289 * verify.c (merge_type_state): Still may have to merge even if
12290 LABEL_VERIFIED (label).
12291
12292 2001-01-21 Per Bothner <per@bothner.com>
12293
12294 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
12295 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
12296
12297 2001-01-19 Per Bothner <per@bothner.com>
12298
12299 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
12300 if expeting an interface type. Refines Tom's change of 2000-09-12.
12301
12302 2001-01-18 Per Bothner <per@bothner.com>
12303
12304 * gcj.texi (Input Options): Mention .java files.
12305
12306 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12307
12308 * lang-options.h (-Wunsupported-jdk11): Removed.
12309 * lang.c (flag_not_overriding): Deleted.
12310 (flag_static_local_jdk1_1): Likewise.
12311 (lang_W_options): Removed "unsupported-jdk11" entry.
12312 * parse.y (java_check_methods): Removed dead code.
12313
12314 2001-01-17 Tom Tromey <tromey@redhat.com>
12315
12316 Changes suggested by Per Bothner:
12317 * gcj.texi (Input Options): Don't mention input files.
12318 (Code Generation): Updated --main information.
12319 (Invoking jcf-dump): Mention that --javap is incomplete.
12320 From Alexandre Petit-Bianco:
12321 (Warnings): Don't mention -Wunsupported-jdk11.
12322 My stuff:
12323 (Compatibility): Mention JDK 1.2-ness of libraries.
12324 (Resources): Mention resources used when writing gcj.
12325
12326 2001-01-17 Tom Tromey <tromey@redhat.com>
12327
12328 * gcj.texi: New file.
12329 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
12330 (java.info): Depend on gcj.info.
12331 (java/gcj.dvi): New target.
12332 (java.dvi): Depend on gcj.dvi.
12333 (java.install-info): Wrote.
12334
12335 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
12336
12337 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
12338 having called make_decl_rtl.
12339
12340 2001-01-14 Per Bothner <per@bothner.com>
12341
12342 Various patches to emit better messages on verification errors.
12343 * expr.c (push_type_0): Return error indication on stack overflow,
12344 instead of callinfg fatal.
12345 (push_type): Now just call push_type_0 (nd fatal on overflow).
12346 (pop_type_0): Return detailed error message (in a char** argument).
12347 (pop_type): If pop_type_0 fails, print error message.
12348 (pop_argument_types): Moved to verify.c.
12349 * verify.c (pop_argument_types): Moved from expr.c.
12350 Return a (possible) error message, rather than void.
12351 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
12352 (verify_jvm_instruction): Use new macros, improving error messages.
12353 For case OPCODE_astore use object_ptr_type_node.
12354 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
12355 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
12356
12357 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
12358 constant, return body without wrapper. (Improves constant folding.)
12359 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
12360
12361 2001-01-13 Per Bothner <per@bothner.com>
12362
12363 * expr.c (expand_java_field_op): Assigning to a final field outside
12364 an initializer does not violate JVM spec, so should be warning, not
12365 error. (Sun's verifier does not complain - though MicroSoft's does.)
12366
12367 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
12368
12369 * gjavah.c (version), jcf-dump.c (version): Update copyright year
12370 to 2001.
12371
12372 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
12373
12374 * parse.y (resolve_expression_name): Permit instance variables from
12375 enclosing context in super constructor call.
12376 (resolve_qualified_expression_name): Permit enclosing class's qualified
12377 "this" in super constructor call.
12378
12379 2001-01-10 Mark Mitchell <mark@codesourcery.com>
12380
12381 * class.c (build_utf8_ref): Remove last argument in call to
12382 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12383 (build_class_ref): Likewise.
12384 (build_static_field_ref): Likewise.
12385 (get_dispatch_table): Likewise.
12386 (layout_class_method): Likewise.
12387 (emit_register_classes): Likewise.
12388 * constants.c (build_constant_data_ref): Likewise.
12389 * decl.c (builtin_function): Likewise.
12390 (create_primitive_vtable): Likewise.
12391 * expr.c (build_known_method_def): Likewise.
12392 (build_jni_stub): Likewise.
12393 (java_lang_expand_expr): Likewise.
12394
12395 2001-01-10 Tom Tromey <tromey@redhat.com>
12396
12397 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
12398
12399 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12400
12401 * java-tree.h (lang_printable_name_wls): New prototype.
12402 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
12403 rather than `current_class' to print type name. Don't prepend type
12404 names when printing constructor names.
12405 (lang_printable_name_wls): New function.
12406 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
12407 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
12408 * parse.y (patch_method_invocation): Message tuned for constructors.
12409 (not_accessible_p): Grant `private' access from within
12410 enclosing contexts.
12411
12412 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12413
12414 All files with updated copyright when applicable.
12415 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
12416 * class.c (mangle_class_field): Function removed.
12417 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
12418 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
12419 (build_class_ref): Call `java_mangle_class_field' instead of
12420 `mangle_class_field.'
12421 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
12422 (layout_class): Call `java_mangle_decl' instead of
12423 `mangle_static_field.'
12424 (cxx_keywords): Initialized static array moved to `lex.c.'
12425 (layout_class_method): Changed leading comment. Simplified to
12426 call `java_mangle_decl.' Local `ptr' moved in for loop body.
12427 * decl.c (lang_mark_tree): Mark field `package_list.'
12428 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
12429 (struct lang_type): New field `package_list.'
12430 (unicode_mangling_length): Prototype removed.
12431 (append_gpp_mangled_name, append_gpp_mangled_classtype,
12432 emit_unicode_mangled_name): Likewise.
12433 (cxx_keyword_p): New prototype.
12434 (java_mangle_decl, java_mangle_class_field,
12435 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
12436 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
12437 `build_expr_wfl.'
12438 * jvgenmain.c (main_method_prefix): Global variable removed.
12439 (main_method_suffix): Likewise.
12440 (do_mangle_classname): New function.
12441 (main): Call it. Format changed to accommodate new mangling scheme.
12442 * lex.c: (utf8_cmp): Conditionally prototyped.
12443 (cxx_keywords): Moved from class.c, conditionally defined.
12444 (utf8_cmp, cxx_keyword_p): Likewise.
12445 * mangle.c (obstack.h, ggc.h): Included.
12446 (mangle_field_decl): New function.
12447 (mangle_method_decl, mangle_type, mangle_pointer_type,
12448 mangle_array_type, mangle_record_type,
12449 find_compression_pointer_match, find_compression_array_match,
12450 find_compression_record_match,
12451 find_compression_array_template_match, set_type_package_list,
12452 entry_match_pointer_p, emit_compression_string, init_mangling,
12453 finish_mangling, compression_table_add, mangle_member_name): Likewise.
12454 (mangle_obstack): New global.
12455 (MANGLE_RAW_STRING): New macro.
12456 (unicode_mangling_length): Turned static.
12457 (append_unicode_mangled_name): Renamed from
12458 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
12459 replaces `obstack', removed from the parameter list.
12460 (append_gpp_mangled_name): Turned static. `mangle_obstack'
12461 replaces parameter `obstack', removed from the parameter list. Call
12462 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
12463 (append_gpp_mangled_classtype): Removed.
12464 (compression_table, compression_next): New static variables.
12465 * parse.y (temporary_obstack): Extern declaration removed.
12466
12467 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12468
12469 * parse.y (patch_binop): Compute missing type in error situations.
12470
12471 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
12472
12473 * class.c (make_class_data): Push initial value for "arrayclass".
12474 * decl.c (init_decl_processing): Add new class field "arrayclass".
12475
12476 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
12477
12478 From patha@softlab.ericsson.se:
12479 * parse.y (switch_label): Use build, not build1, to construct
12480 DEFAULT_EXPR.
12481
12482 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
12483
12484 * lang.c (lang_decode_option): Change -MA to -MP.
12485 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
12486 Update to new prototype; do quote targets.
12487 (jcf_dependency_write): Update.
12488
12489 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
12490
12491 Shorten primitive array allocation path:
12492 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
12493 to create new primitive arrays.
12494 * expr.c (build_newarray): If generating native code, call
12495 soft_newarray_node with a reference to the primitive TYPE identifier
12496 instead of type_value.
12497
12498 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
12499
12500 Fix for PRs gcj/312 and gcj/253:
12501 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
12502 dest if they arn't already.
12503 * class.c (layout_class): Call maybe_layout_super_class on
12504 superinterfaces also, but only if compiling from bytecode.
12505
12506 Fix for PR gcj/373:
12507 * parse.y (create_class): Set ACC_STATIC if class is declared in an
12508 interface.
12509
12510 2000-12-15 Tom Tromey <tromey@redhat.com>
12511
12512 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
12513 set.
12514
12515 2000-12-14 Andrew Haley <aph@redhat.com>
12516
12517 * boehm.c (mark_reference_fields): Change test to correctly detect
12518 bitmap overflow.
12519
12520 2000-12-15 Andreas Jaeger <aj@suse.de>
12521
12522 * config-lang.in (lang_dirs): Added.
12523
12524 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12525
12526 * parse.y (end_artificial_method_body): Fixed undefined behavior.
12527 Credits go to rth for finding it.
12528
12529 2000-12-13 Mike Stump <mrs@wrs.com>
12530
12531 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
12532
12533 2000-11-07 Tom Tromey <tromey@cygnus.com>
12534
12535 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
12536 * lex.c (java_ignorable_control_p): Removed.
12537 (java_letter_or_digit_p): Removed.
12538 (java_start_char_p): New function.
12539 (java_read_char): Return `int', not `unicode_t'. Changed
12540 callers.
12541 (java_read_unicode): Likewise.
12542 (java_read_unicode_collapsing_terminators): Likewise.
12543 (java_get_unicode): Likewise.
12544 (java_new_lexer): Initialize hit_eof.
12545 (java_parse_end_comment): Take `int' argument.
12546 (java_parse_doc_section): Likewise.
12547 (java_parse_escape_sequence): Don't allow backlash-newline.
12548 Return `int'.
12549 * lex.h (JAVA_DIGIT_P): Removed.
12550 (_JAVA_LETTER_OR_DIGIT_P): Removed.
12551 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
12552 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
12553 (JAVA_PART_CHAR_P): New macro.
12554 (UEOF): Now -1.
12555 (JAVA_CHAR_ERROR): Now -2.
12556 (java_lexer): New field `hit_eof'.
12557 * chartables.h: New file.
12558 * gen-table.pl: new file.
12559
12560 2000-11-20 Tom Tromey <tromey@cygnus.com>
12561 Alexandre Petit-Bianco <apbianco@cygnus.com>
12562
12563 * parse.y (java_complete_lhs): Only allow compound assignment of
12564 reference type if type is String.
12565
12566 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12567
12568 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
12569 jcf-path.c: Likewise.
12570
12571 2000-12-09 Anthony Green <green@redhat.com>
12572
12573 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
12574 filestart and filename_length as int values.
12575
12576 2000-12-07 Mo DeJong <mdejong@redhat.com>
12577
12578 * jcf-io.c (find_class): Correct the logic that tests to see if a
12579 .java file is newer than its .class file. The compiler was
12580 incorrectly printing a warning when file mod times were equal.
12581
12582 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
12583
12584 * jvgenmain.c: Use ISPRINT not isascii.
12585
12586 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12587
12588 * parse.y (end_artificial_method_body): Fixed typo.
12589
12590 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
12591
12592 * parse.y (patch_method_invocation): Pick the correct enclosing
12593 context when creating inner class instances.
12594 Fixes gcj/332.
12595
12596 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
12597
12598 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12599 Update copyright year to 2000.
12600
12601 2000-11-23 Anthony Green <green@redhat.com>
12602
12603 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12604 Move current_file_list out of yyparse and make it static.
12605
12606 * expr.c: Declare quick_stack and tree_list_free_list as static
12607 (init_expr_processing): Register quick_stack and
12608 tree_list_free_list roots.
12609
12610 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12611
12612 * parse.y (build_outer_field_access): New local `decl_ctx', use
12613 it. Check for field's context and current class immediate outer
12614 context inheritance.
12615 (outer_field_access_p): Consider fields inherited from the last
12616 enclosing context.
12617 (build_access_to_thisn): Stop at the last enclosing context if
12618 necessary.
12619 Fixes gcj/367.
12620
12621 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
12622
12623 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12624
12625 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
12626
12627 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12628 scratch buffer.
12629
12630 2000-11-20 Tom Tromey <tromey@cygnus.com>
12631
12632 * jv-scan.c (help): Document --complexity.
12633 (options): Added --complexity.
12634 (flag_complexity): New global.
12635 (main): Call `report'.
12636 * parse-scan.y (complexity): New global.
12637 (if_then_statement, if_then_else_statement,
12638 if_then_else_statement_nsi, switch_block_statement_group,
12639 while_expression, do_statement, for_begin, continue_statement,
12640 throw_statement, catch_clause, finally, method_invocation,
12641 conditional_and_expression, conditional_or_expression,
12642 conditional_expression): Update complexity.
12643 (reset_report): Reset complexity.
12644 (report): New function.
12645
12646 2000-11-20 Tom Tromey <tromey@cygnus.com>
12647
12648 * lex.c (yylex): Added STRICT_TK case.
12649 * parse.y (STRICT_TK): Added.
12650 * parse-scan.y (STRICT_TK): Added.
12651 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12652 `;'. Use 4, not 3, with -k option. Correctly rename resulting
12653 file.
12654 * keyword.h: Rebuilt.
12655 * keyword.gperf (strictfp): Added.
12656
12657 2000-11-20 Tom Tromey <tromey@cygnus.com>
12658
12659 * lex.c (yylex): Recognize floating point constants with leading
12660 0.
12661
12662 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12663
12664 * java-tree.h (cyclic_inheritance_report): Constify.
12665 * parse.y (cyclic_inheritance_report): Likewise.
12666
12667 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
12668
12669 * parse.y (goal): Remove call to ggc_add_string_root.
12670
12671 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
12672
12673 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12674 Create string in scratch buffer, then pass to build_string.
12675
12676 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
12677
12678 * parse.y (issue_warning_error_from_context): Add
12679 ATTRIBUTE_PRINTF.
12680
12681 2000-11-11 Anthony Green <green@redhat.com>
12682
12683 * jcf-parse.c (process_zip_dir): Add finput parameter.
12684 (jcf_figure_file_type): Call process_zip_dir with appropriate
12685 argument.
12686
12687 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12688
12689 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12690 * jcf-parse.c (jcf_figure_file_type): Likewise.
12691
12692 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
12693
12694 * parse.y (create_new_parser_context): Use memset () instead of
12695 bzero ().
12696
12697 2000-11-08 Tom Tromey <tromey@cygnus.com>
12698
12699 * gjavah.c (process_file): Only include gcj/cni.h when generating
12700 CNI stubs.
12701
12702 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
12703
12704 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12705 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12706 instead of bzero ().
12707
12708 2000-11-05 Tom Tromey <tromey@cygnus.com>
12709
12710 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12711 * lex.c (IS_ZERO): New define.
12712 (java_perform_atof): Error on floating point underflow.
12713
12714 2000-11-04 Tom Tromey <tromey@cygnus.com>
12715
12716 * lex.c (java_parse_escape_sequence): Only read two octal
12717 characters if the first one is greater than 3. Don't allow
12718 "octal" numbers to include the digits 8 or 9.
12719
12720 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
12721
12722 * Make-lang.in (java.distdir): Remove.
12723
12724 2000-11-03 Tom Tromey <tromey@cygnus.com>
12725
12726 * Make-lang.in (java.dvi): New target.
12727 Partial fix for PR other/567.
12728
12729 * lang-options.h: Mention -Wout-of-date.
12730 * jcf-dump.c (flag_newer): New global.
12731 * gjavah.c (flag_newer): New global.
12732 * jcf-io.c (find_class): Only warn when flag_newer set.
12733 * lang.c (flag_newer): New global.
12734 (struct string_option): New declaration.
12735 (lang_W_options): New global.
12736 (process_option_with_no): New function.
12737 (lang_decode_option): Use it.
12738
12739 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12740 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12741 `$'.
12742
12743 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12744 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12745 * lex.c (java_read_unicode): Removed `term_context' argument.
12746 Recognize any number of `u' in `\u'.
12747 (java_read_unicode_collapsing_terminators): New function.
12748 (java_get_unicode): Use it.
12749 (java_lineterminator): Removed.
12750 (yylex): Produce error if character literal is newline or single
12751 quote. Return if eof found in middle of `//' comment. EOF in
12752 `//' comment is only an error if pedantic.
12753 (java_ignorable_control_p): New function.
12754 (java_parse_end_comment): Return if eof found in middle of
12755 comment.
12756 Include flags.h.
12757 * jv-scan.c (pedantic): New global.
12758
12759 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12760
12761 * parse.y (outer_field_access_p): Inherited fields aren't
12762 consider outer fields.
12763 (maybe_build_thisn_access_method): Use
12764 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12765 (resolve_expression_name): Trigger an error if a static field
12766 is being accessed as an outer field.
12767
12768 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12769
12770 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12771 Fixes gcj/365.
12772
12773 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
12774
12775 * Make-lang.in: Move all build rules here from Makefile.in,
12776 adapt to new context. Wrap all rules that change the current
12777 directory in parentheses. Expunge all references to $(P).
12778 When one command depends on another and they're run all at
12779 once, use && to separate them, not ;. Add OUTPUT_OPTION to
12780 all object-file generation rules. Delete obsolete variables.
12781
12782 * Makefile.in: Delete.
12783 * config-lang.in: Delete outputs= line.
12784
12785 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12786
12787 * parse.y (patch_method_invocation): NULLify this_arg when already
12788 inserted.
12789 (maybe_use_access_method): Handle call to methods unrelated to the
12790 current class. Fixed comment.
12791 Fixes gcj/361.
12792
12793 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12794
12795 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12796 scope.
12797
12798 2000-10-24 Tom Tromey <tromey@cygnus.com>
12799
12800 * lex.c (java_new_lexer): Initialize new fields. Work around
12801 broken iconv() implementations.
12802 (java_read_char): Swap bytes if required. Use fallback decoder if
12803 required.
12804 (byteswap_init, need_byteswap): New globals.
12805 (java_destroy_lexer): Only close iconv handle if it is in use.
12806 * lex.h (java_lexer): New fields read_anything, byte_swap,
12807 use_fallback.
12808 Made out_buffer unsigned.
12809
12810 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12811
12812 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12813 where an enclosing context can be set on the jdep.
12814 (do_resolve_class): Fixed identation.
12815
12816 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12817
12818 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12819
12820 * jcf-reader.c (peek_attribute, skip_attribute): Only define
12821 when requested.
12822
12823 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12824
12825 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12826
12827 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12828
12829 * jcf-write.c (OP1): Update `last_bc'.
12830 (struct jcf_block): Fixed indentation and typo in comments. New
12831 field `last_bc'.
12832 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12833 follows `monitorenter'.
12834 * parse.y (patch_synchronized_statement): New local `tmp'. Call
12835 `patch_string'.
12836 Fixes gcj/232.
12837
12838 2000-10-16 Tom Tromey <tromey@cygnus.com>
12839
12840 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12841 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12842 * lang-options.h: Added -MA, -MT, -MF..
12843 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12844 (DEPEND_TARGET_SET): New macro.
12845 (DEPEND_FILE_ALREADY_SET): Likewise.
12846 (init_parse): Handle new flags.
12847 * jcf.h (jcf_dependency_print_dummies): Declare.
12848 * Make-lang.in (s-java): Added mkdeps.o.
12849 * Makefile.in (BACKEND): Added mkdeps.o.
12850 (../gcjh$(exeext)): Added mkdeps.o.
12851 (../jcf-dump$(exeext)): Added mkdeps.o.
12852 * jcf-depend.c: Include mkdeps.h.
12853 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12854 add_entry): Removed.
12855 (jcf_dependency_reset): Rewrote.
12856 (dependencies): New global.
12857 (jcf_dependency_set_target): Rewrote.
12858 (jcf_dependency_add_target): Likewise.
12859 (jcf_dependency_add_file): Likewise.
12860 (munge): Removed.
12861 (print_ents): Removed.
12862 (jcf_dependency_write): Rewrote.
12863 (print_dummies): New global.
12864 (jcf_dependency_print_dummies): New function
12865 (jcf_dependency_write): Call deps_dummy_targets if required.
12866
12867 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12868
12869 * gjavah.c (add_class_decl): Removed unused variables `tname',
12870 `tlen' and `name_index'.
12871 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12872 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12873 in `wfl_operator' with value.
12874 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12875 (jcf_figure_file_type): Fixed identation.
12876 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12877 * parse.y (analyze_clinit_body): New function.
12878 (static_initializer:): Reset `current_static_block'.
12879 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12880 `wfl_operator' with new value.
12881 (lookup_cl): Use EXPR_WFL_FILENAME.
12882 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12883 analyze_clinit_body.
12884 (build_outer_field_access): Access to this$<n> built from
12885 current_class, not its outer context.
12886 (build_access_to_thisn): Fixed leading comment. Tidied things up.
12887 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12888 (patch_method_invocation): Use `is_static_flag' when already
12889 initialized.
12890 (patch_newarray): Removed assignment in ternary operator.
12891
12892 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12893
12894 * except.c (free_eh_ranges): Don't free `whole_range'.
12895
12896 2000-10-15 Anthony Green <green@redhat.com>
12897
12898 * decl.c (init_decl_processing): Call init_class_processing before
12899 anything else.
12900
12901 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12902
12903 * check-init.c (check_init): Fixed leading comment. Use
12904 LOCAL_FINAL_P.
12905 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12906 (give_name_to_locals): Likewise.
12907 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12908 fields in lang_decl_var.
12909 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12910 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12911 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12912 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12913 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12914 (LOCAL_FINAL): Rewritten.
12915 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12916 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12917 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12918 `init_final' fields.
12919 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12920 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12921 (TYPE_HAS_FINAL_VARIABLE): New macro.
12922 (struct lang_type): Added `afv' field.
12923 * parse.y (check_static_final_variable_assignment_flag): New function.
12924 (reset_static_final_variable_assignment_flag): Likewise.
12925 (check_final_variable_local_assignment_flag): Likewise.
12926 (reset_final_variable_local_assignment_flag): Likewise.
12927 (check_final_variable_indirect_assignment): Likewise.
12928 (check_final_variable_global_assignment_flag): Likewise.
12929 (add_inner_class_fields): Use LOCAL_FINAL_P.
12930 (register_fields): Handle local finals and final variables.
12931 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12932 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12933 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12934 on local finals.
12935 (java_complete_expand_methods): Loop to set
12936 TYPE_HAS_FINAL_VARIABLE. Call
12937 `reset_final_variable_local_assignment_flag' and
12938 `check_final_variable_local_assignment_flag' accordingly before
12939 and after constructor expansion. Call
12940 `reset_static_final_variable_assignment_flag'
12941 before expanding <clinit> and after call
12942 `check_static_final_variable_assignment_flag' if the
12943 current_class isn't an interface. After all methods have been
12944 expanded, call `check_final_variable_global_assignment_flag' and
12945 `check_static_final_variable_assignment_flag' if the current class
12946 is an interface.
12947 (maybe_yank_clinit): Fixed typo in comment.
12948 (build_outer_field_access_methods): Removed old sanity check. Use
12949 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12950 Don't create access methods for finals.
12951 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12952 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
12953 existing DECL_INIT has been processed.
12954 (java_complete_lhs): Likewise.
12955 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12956 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12957 logic.
12958 (patch_assignment): Use LOCAL_FINAL_P.
12959 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12960 DECL_INITIAL is nullified.
12961 Fixes gcj/163.
12962
12963 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12964
12965 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
12966
12967 * Makefile.in (parse.c, parse-scan.c): Likewise.
12968
12969 2000-10-12 Mark Mitchell <mark@codesourcery.com>
12970
12971 * class.c (temporary_obstack): Remove.
12972 (make_class): Don't mess with obstascks.
12973 (push_class): Likewise.
12974 (set_super_info): Likewise.
12975 (add_method_1): Likewise.
12976 (add_method): Likewise.
12977 (add_field): Likewise.
12978 (build_utf8_ref): Likewise.
12979 (build_class_ref): Likewise.
12980 (build_static_field_ref): Likewise.
12981 (finish_class): Likewise.
12982 (push_super_field): Likewise.
12983 (layout_class): Likewise.
12984 (layout_class_methods): Likewise.
12985 (init_class_processing): Likewise.
12986 * constants.c (get_tag_node): Likewise.
12987 (build_constant_data_ref): Likewise.
12988 * decl.c (ggc_p): Remove.
12989 (copy_lang_decl): Use ggc_alloc.
12990 (complete_start_java_method): Don't mess with obstacks.
12991 (start_java_method): Likewise.
12992 (end_java_method): Likewise.
12993 * except.c (link_handler): Use xmalloc.
12994 (free_eh_ranges): New function.
12995 (method_init_exceptions): Use it.
12996 (add_handler): Use xmalloc.
12997 (expand_start_java_handler): Don't mess with obstacks.
12998 (prepare_eh_table_type): Likewise.
12999 (expand_end_java_handler): Likewise.
13000 * expr.c (push_value): Likewise.
13001 (create_label_decl): Likewise.
13002 (build_jni_stub): Likewise.
13003 (java_lang_expand_expr): Likewise.
13004 (note_instructions): Use xrealloc.
13005 (java_push_constant_from_pool): Don't mess with obstacks.
13006 (process_jvm_instruction): Likewise.
13007 * java-tree.h (cyclic_inheritance_report): Remove duplicate
13008 declaration.
13009 * jcf-parse.c (get_constant): Don't mess with obstacks.
13010 (read_class): Likewise.
13011 (jcf_parse): Likewise.
13012 * lex.c (expression_obstack): Remove.
13013 (java_lex): Don't use obstack_free.
13014 * parse.h (exit_java_complete_class): Don't mess with obstacks.
13015 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
13016 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
13017 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
13018 * parse.y (gaol): Add more GC roots.
13019 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
13020 (lookup_field_wrapper): Likewise.
13021 (obtain_incomplete_type): Don't mess with obstacks.
13022 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
13023 macros.
13024 (craft_constructor): Don't mess with obstacks.
13025 (safe_layout_class): Likewise.
13026 (java_complete_class): Likewise.
13027 (source_end_java_method): Likewise.
13028 (build_outer_field_access_methods): Likewise.
13029 (build_outer_method_access_method): Likewise.
13030 (maybe_build_thisn_access_method): Likewise.
13031 (build_dot_class_method_invocation): Likewise.
13032 (java_complete_tree): Likewise.
13033 (java_complete_lhs): Likewise.
13034 (do_merge_string_cste): Likewise.
13035 (patch_string_cst): Likewise.
13036 (array_constructor_check_entry): Likewise.
13037 * typeck.c (build_java_array_type): Likewise.
13038 (parse_signature_string): Likewise.
13039 (build_java_signature): Likewise.
13040
13041 2000-10-12 Tom Tromey <tromey@cygnus.com>
13042
13043 Fix for PR gcj/356:
13044 * gjavah.c (add_class_decl): Don't special-case inner classes.
13045 (add_namelet): Likewise.
13046
13047 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
13048
13049 * java-tree.h: Constify current_encoding.
13050 * lang.c: Constify current_encoding.
13051
13052 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
13053
13054 * jvgenmain.c (class_mangling_suffix): Omit `.'.
13055 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
13056
13057 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13058
13059 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
13060 patch. Fixes gcj/340.
13061
13062 2000-10-10 Tom Tromey <tromey@cygnus.com>
13063
13064 * lex.c (java_new_lexer): Initialize out_first and out_last
13065 fields.
13066 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
13067
13068 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13069
13070 * parse.y (pop_current_osb): New function.
13071 (array_type:): Use `dims:', changed actions
13072 accordingly. Suggested by Anthony Green.
13073 (array_creation_expression:): Used pop_current_osb.
13074 (cast_expression:): Likewise.
13075 (search_applicable_method_list): Fixed indentation.
13076
13077 2000-10-08 Anthony Green <green@redhat.com>
13078
13079 * parse.y (array_type_literal): Remove production.
13080 (type_literals): Refer to array_type, not array_type_literal.
13081
13082 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13083
13084 Patch contributed by Corey Minyard.
13085 * decl.c (check_local_named_variable): New function.
13086 (tree check_local_unnamed_variable): Likewise.
13087 (find_local_variable): Splitted. Call check_local_{un}named_variable.
13088
13089 2000-10-07 Anthony Green <green@redhat.com>
13090
13091 * class.c (layout_class): Handle case where superclass can't be
13092 layed out yet.
13093
13094 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
13095
13096 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
13097 gperf.
13098
13099 2000-10-05 Tom Tromey <tromey@cygnus.com>
13100
13101 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
13102 * jvgenmain.c (class_mangling_prefix): Removed.
13103 (class_mangling_suffix): New global.
13104 (main): Use it.
13105 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
13106 `$'.
13107 (print_method_info): Handle overrides for static and final
13108 methods.
13109 (process_file): Generate declaration for class object field.
13110 * class.c (cxx_keywords): New array.
13111 (utf8_cmp): New function.
13112 (cxx_keyword_p): New function.
13113 (layout_class_method): Mangle C++ keywords by appending `$'.
13114 (mangle_field): New function.
13115 (mangle_class_field): Use mangle_field. Mangle class name as
13116 `class$'.
13117 (mangle_static_field): Use mangle_field.
13118
13119 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
13120
13121 * decl.c (find_local_variable): Removed uncessary type check and
13122 fixed range check typo. From Corey Minyard.
13123
13124 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13125
13126 * decl.c (give_name_to_locals): New local `code_offset'. Call
13127 `maybe_adjust_start_pc'.
13128 * expr.c (note_instructions): New function.
13129 (expand_byte_code): Don't collect insn starts here.
13130 (peek_opcode_at_pc): New function.
13131 (maybe_adjust_start_pc): Likewise.
13132 * java-tree.h (maybe_adjust_start_pc): Declare.
13133 (note_instructions): Likewise.
13134 * jcf-parse.c (parse_class_file): Call `note_instructions'.
13135
13136 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13137
13138 * parse.y (field_access:): Fixed indentation.
13139 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
13140
13141 2000-09-07 Tom Tromey <tromey@cygnus.com>
13142
13143 Fix for PR gcj/307:
13144 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
13145 JPRIMITIVE_TYPE_P, for arithmetic operators.
13146 (patch_method_invocation): Indentation fix.
13147 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
13148 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
13149 (do_unary_numeric_promotion): Cleaned up code.
13150 (valid_cast_to_p): Handle boolean correctly.
13151
13152 2000-09-27 Tom Tromey <tromey@cygnus.com>
13153
13154 * lex.c (java_read_unicode): Reset bs_count when finished with
13155 `\u' sequence.
13156
13157 2000-10-01 Mark Mitchell <mark@codesourcery.com>
13158
13159 Convert to GC.
13160 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
13161 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
13162 (typeck.o): Depend on ggc.h.
13163 * class.c (add_method_1): Use GC functions for allocation.
13164 (init_class_processing): Register roots.
13165 * decl.c (ggc_p): Set to 1.
13166 (pending_local_decls): Make it static.
13167 (push_jvm_slot): Use GC functions for allocation.
13168 (init_decl_processing): Register roots.
13169 (give_name_to_locals): Use GC functions for allocation.
13170 (lang_mark_tree): New function.
13171 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
13172 functions for allocation.
13173 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
13174 * lex.c (java_lex): Use build_string, rather than replicating it
13175 inline.
13176 * parse.y (goal): Add more roots.
13177 (mark_parser_ctxt): New function.
13178 * typeck.c: Include ggc.h.
13179
13180 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13181
13182 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
13183 contains something else than MODIFY_EXPR.
13184
13185 2000-09-23 Mark Mitchell <mark@codesourcery.com>
13186
13187 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
13188 * Makefile.in (parse.o): Depend on ggc.h.
13189 (class.o): Likewise.
13190 (constants.o): Likewise.
13191 (decl.o): Likewise.
13192 (expr.o): Likewise.
13193 (jcf-parse.o): Likewise.
13194 (jcf-write.o): Likewise.
13195 (mangle.o): Likewise.
13196 * class.c: Include ggc.h.
13197 (build_static_field_ref): Register GC roots.
13198 (layout_class): Likewise.
13199 (init_class_processing): Likewise.
13200 * constants.c: Include ggc.h.
13201 (current_constant_pool_data_ref): Remove.
13202 (tag_nodes): Move it to ...
13203 (get_tag_node): ... here. Register GC roots.
13204 * decl.c: Include ggc.h. Remove many global tree definitions.
13205 (throw_node): Define.
13206 (java_global_trees): Likewise.
13207 (predef_filenames): Make the size a constant.
13208 (init_decl_processing): Adjust accordingly.
13209 (init_decl_processing): Call init_jcf_parse. Register GC roots.
13210 * expr.c: Include ggc.h.
13211 (init_expr_processing): Register GC roots.
13212 (build_invokeinterface): Likewise.
13213 * java-tree.h: Replace extern tree declarations with macros.
13214 (java_global_trees): New variable.
13215 (java_tree_index): New enumeration.
13216 (init_jcf_parse): Declare.
13217 * jcf-parse.c: Include ggc.h.
13218 (current_class): Remove declaration.
13219 (main_class): Likewise.
13220 (all_class_list): Likewise.
13221 (predefined_filename_p): Adjust for constant size of
13222 predef_filenames.
13223 (init_jcf_parse): New function.
13224 * jcf-write.c: Include ggc.h.
13225 (generate_classfile): Register GC roots.
13226 (append_synthetic_attribute): Likewise.
13227 (append_innerclass_attribute_entry): Likewise.
13228 * lang.c: Include ggc.h.
13229 (lang_print_error): Register GC roots.
13230 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
13231 with macros.
13232 * parse.y: Include ggc.h.
13233 (wfl_operator): Remove.
13234 (goal): Register GC roots.
13235 (java_pop_parser_context): Adjust for new field names.
13236 (java_parser_context_save_global): Likewse.
13237 (java_parser_context_restore_global): Likewise.
13238 (java_parser_context_suspend): Likewise.
13239 (java_parser_context_resume): Likewise.
13240 (verify_constructor_circularity): Register GC roots.
13241 (lookup_cl): Likewise.
13242 (java_reorder_fields): Likewise.
13243 (build_current_this): Likewise.
13244 (class_in_current_package): Likewise.
13245 (argument_types_convertible): Likewise.
13246 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
13247
13248 2000-09-14 Tom Tromey <tromey@cygnus.com>
13249
13250 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
13251
13252 2000-09-13 Tom Tromey <tromey@cygnus.com>
13253
13254 * jcf-parse.c: Include <locale.h>.
13255 * jv-scan.c: Include <locale.h>.
13256
13257 2000-09-12 Tom Tromey <tromey@cygnus.com>
13258
13259 * expr.c (pop_type_0): Return `Object' if trying to merge two
13260 interface types.
13261 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
13262 interface types; `Object' is always a valid supertype.
13263
13264 2000-09-12 Tom Tromey <tromey@cygnus.com>
13265
13266 Fix for PR gcj/33:
13267 * jv-scan.c (help): Document --encoding.
13268 (options): Added `encoding' entry.
13269 (OPT_ENCODING): New define.
13270 (main): Handle --encoding.
13271 Include <langinfo.h> if nl_langinfo exists.
13272 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
13273 --encoding.
13274 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
13275 (parse_source_file): Correctly call java_init_lex. Added `finput'
13276 argument. Use nl_langinfo to determine default encoding.
13277 * java-tree.h (current_encoding): Declare.
13278 * parse.y (java_parser_context_restore_global): Don't restore
13279 `finput'.
13280 (java_parser_context_save_global): Don't set `finput' field.
13281 (java_pop_parser_context): Don't restore `finput'. Free old lexer
13282 if required.
13283 * lang.c (current_encoding): New global.
13284 (lang_decode_option): Recognize `-fencoding='.
13285 (finish_parse): Don't close finput.
13286 * parse.h (struct parser_ctxt): Removed `finput' and
13287 `unget_utf8_value' fields. Added `lexer' field.
13288 (java_init_lex): Fixed declaration.
13289 * lex.c (java_new_lexer): New function.
13290 (java_destroy_lexer): Likewise.
13291 (java_read_char): Added `lex' argument. Handle iconv case.
13292 (java_read_unicode): Added `lex' argument. Count backslashes in
13293 lexer structure.
13294 (java_init_lex): Added `finput' and `encoding' arguments. Set
13295 `lexer' field in ctxp.
13296 (BAD_UTF8_VALUE): Removed.
13297 (java_lex): Handle seeing UEOF in the middle of a string literal.
13298 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
13299 (java_lexer): New structure.
13300 (UNGETC): Removed.
13301 (GETC): Removed.
13302 (DEFAULT_ENCODING): New define.
13303 (java_destroy_lexer): Declare.
13304
13305 2000-09-12 Tom Tromey <tromey@cygnus.com>
13306
13307 Fix for PR gcj/343:
13308 * lex.c (java_init_lex): Initialize java_io_serializable.
13309 * parse.y (java_io_serializable): New global.
13310 (valid_ref_assignconv_cast_p): An array can be cast to
13311 serializable.
13312
13313 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
13314
13315 * decl.c, expr.c: Include defaults.h if not already included.
13316 Don't define the *_TYPE_SIZE macros.
13317
13318 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
13319
13320 * typeck.c (build_java_array_type): Correct first parameter
13321 in ADJUST_FIELD_ALIGN invocation.
13322
13323 2000-09-06 Tom Tromey <tromey@cygnus.com>
13324
13325 * lang-specs.h: Also recognize `-femit-class-files'.
13326
13327 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13328
13329 * verify.c (merge_types): Load the types to merge if necessary.
13330
13331 2000-09-02 Anthony Green <green@redhat.com>
13332
13333 * jcf-io.c: Include zlib.h.
13334 (open_in_zip): Read compressed class file archives.
13335 * zipfile.h (ZipDirectory): Add uncompressed_size and
13336 compression_method fields.
13337 * zextract.c (read_zip_archive): Collect file compression info.
13338
13339 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
13340
13341 * parse.y (do_resolve_class): Also explore superclasses of
13342 intermediate enclosing contexts when searching for inner classes.
13343
13344 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13345
13346 * parse.y (variable_declarator_id:): Better error message.
13347 (expression_statement:): Use YYNOT_TWICE.
13348 (cast_expression:): Likewise.
13349 (assignment:): Likewise.
13350
13351 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13352
13353 * parse.y (do_merge_string_cste): New locals. Create new
13354 STRING_CSTs each time, use memcpy. Fixes gcj/311.
13355
13356 2000-08-07 Hans Boehm <boehm@acm.org>
13357
13358 * boehm.c (mark_reference_fields): Set marking bits for all words in
13359 a multiple-word record.
13360 (get_boehm_type_descriptor): Use the procedure marking descriptor for
13361 java.lang.Class.
13362
13363 2000-08-31 Mike Stump <mrs@wrs.com>
13364
13365 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
13366 jcf-dump$(exeext)): Make parallel safe.
13367
13368 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
13369
13370 * jcf-parse.c (set_source_filename): Constify a char *.
13371 * jcf-write.c (append_innerclasses_attribute,
13372 make_class_file_name): Constify a char *. Don't recycle a
13373 variable for an unrelated purpose.
13374 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
13375 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
13376
13377 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13378
13379 * expr.c (can_widen_reference_to): Fixed indentation.
13380 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
13381 * parse.y: `finit$' replaces `$finit$' in comments.
13382 (try_builtin_assignconv): Fixed leading comment.
13383
13384 2000-08-25 Greg McGary <greg@mcgary.org>
13385
13386 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
13387
13388 2000-08-24 Greg McGary <greg@mcgary.org>
13389
13390 * lang.c (lang_decode_option): Use ARRAY_SIZE.
13391 * parse.y (BINOP_LOOKUP): Likewise.
13392
13393 2000-08-22 Andrew Haley <aph@cygnus.com>
13394
13395 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
13396 sign extending. Fixes gcj/321.
13397 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
13398 combining to make a jlong. Fixes gcj/321.
13399
13400 2000-08-21 Nix <nix@esperi.demon.co.uk>
13401
13402 * lang-specs.h: Do not process -o or run the assembler if
13403 -fsyntax-only.
13404
13405 2000-08-16 Andrew Haley <aph@cygnus.com>
13406
13407 * typeck.c (build_java_array_type): Rewrite code to do array
13408 alignment. Take into account back-end macros when aligning array
13409 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
13410 user to set alignment. Fixes gcj/252 and 160.
13411
13412 2000-08-09 Tom Tromey <tromey@cygnus.com>
13413
13414 * parse.y (check_abstract_method_definitions): Now return `int'.
13415 Check implemented interfaces. Fixes PR gcj/305.
13416
13417 * parse.y (patch_switch_statement): Disallow `long' in switch
13418 expressions. Fixes PR gcj/310.
13419
13420 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13421
13422 * decl.c (finit_leg_identifier_node): New global.
13423 (init_decl_processing): Use `finit$' to initialize
13424 finit_identifier_node. Use `$finit$' to initialize
13425 finit_leg_identifier_node.
13426 * expr.c (expand_java_field_op): Use ID_FINIT_P.
13427 * java-tree.h (finit_identifier_node): Changed attached comment.
13428 (finit_leg_identifier_node): New declaration.
13429 (ID_FINIT_P): Take finit_identifier_node and
13430 finit_leg_identifier_node into account. This is a backward
13431 compatibility hack.
13432
13433 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13434
13435 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
13436 Jan 6 2000 patch.
13437 (generate_bytecode_insns): Check `nargs' before emitting it.
13438 * verify.c (merge_type_state): Fixed typo.
13439 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
13440 generate_bytecode_{conditional,insns}.
13441
13442 2000-08-13 Anthony Green <green@redhat.com>
13443
13444 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
13445 for -pg builds).
13446
13447 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13448
13449 * class.c (maybe_layout_super_class): Fixed indentation.
13450 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
13451 (java_check_methods): New function declaration.
13452 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
13453 instead of `str_ptr'.
13454 * jcf-write.c (generate_bytecode_insns): Emit number the of args
13455 of a `invokeinterface' at the right time.
13456 * parse.h (WFL_STRIP_BRACKET): New macro.
13457 (SET_TYPE_FOR_RESOLUTION): Use it.
13458 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
13459 (check_class_interface_creation): Don't check for cross package
13460 innerclass name clashes.
13461 (method_header): Behave properly if MDECL is `error_mark_node'.
13462 (method_declarator): Return `error_mark_node' if bogus current
13463 class.
13464 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
13465 (resolve_and_layout): New local `decl_type', set and used. Call
13466 java_check_methods.
13467 (java_check_methods): New method.
13468 (java_layout_classes): Use it.
13469 (resolve_qualified_expression_name): No EH check necessary in
13470 access$<n>.
13471 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
13472 `case' statement.
13473 (patch_assignment): Set DECL_INITIAL on integral final local.
13474
13475 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
13476
13477 * java-tree.h (flag_extraneous_semicolon): New extern.
13478 * lang-options.h: (-Wextraneous-semicolon): New option.
13479 * lang.c (flag_redundant): Fixed typo in leading comment.
13480 (flag_extraneous_semicolon): New global.
13481 (lang_decode_option): Set `flag_extraneous_semicolon' when
13482 -Wall. Decode `-Wextraneous-semicolon'.
13483 * parse.y (type_declaration:): Removed `SC_TK' hack, added
13484 `empty_statement' rule.
13485 (class_body_declaration): Likewise.
13486 (method_body:): Accept `;' as a method body.
13487 (static_initializer:): Removed `SC_TK' hack.
13488 (constructor_block_end:): Likewise.
13489 (empty_statement:): Report deprecated empty declaration. Fixes
13490 gcj/295
13491
13492 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13493
13494 * parse.y (build_dot_class_method_invocation): Changed parameter
13495 name to `type'. Build signature from `type' and convert it to a
13496 STRING_CST if it's an array.
13497 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
13498 to use `ref_type' directly.
13499
13500 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
13501
13502 * lang-options.h: Added a comma after the last element to avoid
13503 syntax errors when other languages define additional options.
13504
13505 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
13506
13507 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
13508 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
13509 (jc1): Link with $(BACKEND).
13510 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
13511
13512 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
13513
13514 * jvspec.c: Adjust type of second argument to
13515 lang_specific_driver, and update code as necessary.
13516
13517 * class.c (build_dtable_decl): Initialize dummy.
13518
13519 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13520
13521 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
13522 method bodies not to rule out discarding `<clinit>'; don't use
13523 <clinit> to initialize static fields with constant initializers.
13524
13525 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13526
13527 * gjavah.c (print_method_info): Added `synth' parameter. Skip
13528 synthetic methods.
13529 (method_synthetic): New global.
13530 (HANDLE_METHOD): Recognize synthetic method and tell
13531 `print_method_info' about it.
13532 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
13533 processing a synthetic method.
13534 * jcf-reader.c (skip_attribute): New function.
13535 ( skip_attribute): Likewise.
13536
13537 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13538
13539 * parse.y (build_outer_field_access): Fixed comments.
13540 (fix_constructors): Emit the initialization of this$<n> before
13541 calling $finit$.
13542 (resolve_qualified_expression_name): Build an access to `decl' if
13543 necessary.
13544
13545 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13546
13547 * parse-scan.y (curent_class): Non longer const.
13548 (inner_qualifier, inner_qualifier_length): Deleted.
13549 (current_class_length): New global.
13550 (bracket_count): Fixed typo in leading comment.
13551 (anonymous_count): New global.
13552 (class_instance_creation_expression:): Handle anonymous classes.
13553 (anonymous_class_creation:): New rule.
13554 (push_class_context): Rewritten.
13555 (pop_class_context): Likewise.
13556 (INNER_QUALIFIER): Macro deleted.
13557 (report_class_declaration): call `push_class_context' when
13558 entering the function. `fprintf' format modified not to use
13559 INNER_QUALIFIER.
13560 (report_class_declaration): Assign `package_name' and
13561 `current_class' to NULL separately.
13562
13563 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13564
13565 * expr.c (build_invokeinterface): Call layout_class_methods on
13566 target interface.
13567
13568 2000-07-27 Tom Tromey <tromey@cygnus.com>
13569 Anthony Green <green@cygnus.com>
13570 Alexandre Petit-Bianco <apbianco@cygnus.com>
13571
13572 * class.c (make_class_data): Create vtable for abstract classes.
13573 (get_dispatch_table): Changed to cope with abstract classes.
13574
13575 2000-07-27 Tom Tromey <tromey@cygnus.com>
13576
13577 * parse.y (patch_method_invocation): Don't reverse the argument
13578 list when dealing with anonymous class constructors. Fixed typo in
13579 comment.
13580
13581 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13582
13583 * parse.y (build_alias_initializer_parameter_list): Reverse
13584 crafted list when building aliases for anonymous class
13585 constructors.
13586
13587 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13588
13589 * parse.y (jdep_resolve_class): Don't bother checking potential
13590 innerclass access if `decl' is NULL.
13591 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13592 WFL.
13593
13594 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13595
13596 * parse.c: Remove (again.)
13597
13598 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13599
13600 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13601 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13602 outside the `if' statement, alias to innerclass removed, `decl'
13603 used to mark the class complete.
13604
13605 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13606
13607 * parse.y (simple_name:): Fixed typo in error message.
13608
13609 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13610
13611 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13612 or its first operand can be error marks.
13613
13614 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13615
13616 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13617 * parse.y (method_header): Likewise.
13618
13619 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13620
13621 * parse.y (process_imports): Consider that one might be trying to
13622 import an innerclass. Fixes gcj/254
13623
13624 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13625
13626 * parse.y (find_as_inner_class): Handle the case where the
13627 enclosing context of an innerclass has been loaded as bytecode.
13628
13629 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13630
13631 * parse.y (simple_name:): Reject `$' in type names.
13632 (resolve_type_during_patch): Use `type' as a second
13633 argument to resolve_no_layout. Fixes gcj/257.
13634
13635 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
13636
13637 * parse.y (find_most_specific_methods_list): Select the only
13638 non-abstract method even if max has been set.
13639 Fixes gcj/285, gcj/298.
13640
13641 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
13642
13643 * lang-specs.h: Added %(jc1) to java compiler options.
13644
13645 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
13646
13647 * .cvsignore: New file.
13648
13649 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13650
13651 * parse.y (not_accessible_p): Access granted to innerclasses
13652 (indirectly) extending the reference type. Fixes gcj/249.
13653
13654 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13655
13656 * parse.y (patch_method_invocation): Fixed comment.
13657 (maybe_use_access_method): Build this$<n>s to the context of the
13658 target method, or a type that extends it. Fixes gcj/242.
13659
13660 2000-07-13 Mark Mitchell <mark@codesourcery.com>
13661
13662 * parse.c: Remove.
13663
13664 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13665
13666 * parse.y (fold_constant_for_init): Avoid bullish conversion.
13667
13668 2000-07-13 Tom Tromey <tromey@cygnus.com>
13669
13670 * lang-specs.h: Added %{I*}.
13671
13672 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
13673
13674 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
13675
13676 2000-07-12 Mark Mitchell <mark@codesourcery.com>
13677
13678 * parse-scan.c: Remove.
13679
13680 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13681
13682 * class.c (set_super_info): Handled protected inner classes.
13683 (common_enclosing_context_p): Bail early if arguments aren't both
13684 inner classes.
13685 (get_access_flags_from_decl): Handle private and protected inner
13686 classes.
13687 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13688 (CLASS_PROTECTED): Likewise.
13689 (struct lang_type): New bitfield `poic'.
13690 * parse.y (jdep_resolve_class): Call check_inner_class_access on
13691 inner classes only.
13692 (check_inner_class_access): Renamed arguments, added
13693 comments. Handles protected inner classes (fixes gcj/225)
13694 (not_accessible_p): Fixed comments. Avoid handling inner classes.
13695
13696 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13697
13698 * parse.y (resolve_qualified_expression_name): Verify qualified
13699 access to `this'. Fixes gcj/239.
13700
13701 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13702
13703 * jcf-write.c (generate_classfile): Don't install ConstantValue
13704 for null pointers.
13705
13706 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13707
13708 * parse.y (resolve_qualified_expression_name): Handle inner class
13709 access. Fixes gcj/256.
13710
13711 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13712
13713 * jcf-write.c (generate_classfile): Properly install the
13714 ConstantValue attribute and the initial value constant pool index
13715 on string constants.
13716 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13717 class files.
13718
13719 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13720
13721 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13722 construct.
13723 * parse.y (find_as_inner_class): Fixed typo.
13724 (do_resolve_class): Explore enclosing contexts when searching for
13725 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13726 (check_inner_class_access): Check `decl' which can be null in case
13727 of previous errors.
13728
13729 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13730
13731 * java-tree.h (java_debug_context): Declared `extern'.
13732 (safe_layout_class): Likewise.
13733 * parse.y (resolve_field_access): Field must be `static' in order
13734 to be replaced by its initial value. Added comments.
13735 (find_applicable_accessible_methods_list): Fixed typo.
13736 (find_most_specific_methods_list): Methods found in innerclasses
13737 take over methods founds in the enclosing contexts.
13738 (java_complete_tree): Loosen restrictions on the type of DECLs
13739 that can be replaced by their initialization values.
13740 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13741
13742 2000-07-05 Tom Tromey <tromey@cygnus.com>
13743
13744 * Make-lang.in (PARSE_DIR): New macro.
13745 (PARSE_RELDIR): Likewise.
13746 (PARSE_C): Likewise.
13747 (PARSE_SCAN_C): Likewise.
13748 ($(PARSE_C)): New target.
13749 ($(PARSE_SCAN_C)): Likewise.
13750 (SET_BISON): New macro.
13751 (BISONFLAGS): Likewise.
13752 (JAVABISONFLAGS): Likewise.
13753
13754 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
13755
13756 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13757 argument on the first pass for CNI as well as JNI.
13758 (print_method_info): Set up method name on the first pass only.
13759
13760 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13761
13762 * parse.y (parser_qualified_classname): Removed parameter
13763 `is_static'.
13764 (create_interface): Removed first passed parameter to
13765 parser_qualified_classname.
13766 (create_class): Likewise. Don't install alias on static
13767 innerclasses. Fixes gcj/275.
13768
13769 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13770
13771 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13772 debugable statement with empty_stmt_node. Fixes gcj/272
13773
13774 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13775
13776 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13777 gcj/271.
13778
13779 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13780
13781 * jcf-write.c (push_long_const): Appropriately cast short negative
13782 constant to jword.
13783
13784 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13785
13786 * parse.y (verify_constructor_super): Use loop variable
13787 `m_arg_type' initialized with `mdecl_arg_type'.
13788
13789 2000-06-29 Tom Tromey <tromey@cygnus.com>
13790
13791 * parse.y (resolve_field_access): Handle case where `type_found'
13792 is NULL.
13793
13794 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13795
13796 * expr.c (lookup_field): The same field can be found through two
13797 different interface. Don't declare it ambiguous in that case.
13798
13799 2000-06-27 Tom Tromey <tromey@cygnus.com>
13800
13801 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
13802 follows \r, then unget it at a lower level.
13803
13804 2000-06-26 Tom Tromey <tromey@cygnus.com>
13805
13806 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13807 java_complete_tree.
13808
13809 2000-06-25 Tom Tromey <tromey@cygnus.com>
13810
13811 * parse.y (for_statement): Wrap expression in a WFL if it is a
13812 constant. For PR gcj/268.
13813
13814 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13815
13816 * parse.y (do_resolve_class): Minor optimiztion in the package
13817 list search. Removed unnecessary test and return statement.
13818 (valid_ref_assignconv_cast_p): Order of arguments to
13819 enclosing_context_p fixed.
13820
13821 2000-06-24 Tom Tromey <tromey@cygnus.com>
13822
13823 * expr.c (lookup_field): Print error and return error_mark_node if
13824 field reference is ambiguous.
13825
13826 * parse.y (check_abstract_method_definitions): Also check if
13827 `other_method' is abstract.
13828
13829 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13830
13831 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13832 classes.
13833 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13834 (struct lang_type): New field `pic'.
13835 (CLASS_PRIVATE): New macro.
13836 * parse.y (check_inner_class_access): New function.
13837 (jdep_resolve_class): Call it.
13838
13839 2000-06-23 Tom Tromey <tromey@cygnus.com>
13840
13841 * parse.y (patch_incomplete_class_ref): Initialize the returned
13842 class. For PR gcj/260.
13843
13844 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13845
13846 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13847
13848 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13849
13850 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13851 Java specific checks.
13852 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13853 screened by DECL_P.
13854 * java-tree.def (CASE_EXPR): Marked 'e'.
13855 (DEFAULT_EXPR): Likewise.
13856 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13857 screened by DECL_P.
13858 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13859 Java specific checks.
13860 (generate_bytecode_insns): Test try_block for BLOCK before using
13861 BLOCK_EXPR_BODY.
13862 * parse.y (build_wfl_wrap): Added `location' argument. Set
13863 EXPR_WFL_LINECOL accordingly.
13864 (dim_expr:): Wrap constants with WFLs.
13865 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13866 (resolve_package): Check for `stmt' not being a BLOCK before
13867 building a debuggable statement with it.
13868 (make_qualified_primary): Added extra parameter to build_wfl_wrap
13869 invocation.
13870 (resolve_field_access): Make sure `decl' is a DECL before treating
13871 it as such.
13872 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13873 IDENTIFIER_NODE before treating it as such.
13874 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13875 treating it as such.
13876 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13877 to be applied only on non array types.
13878
13879 2000-06-16 Per Bothner <per@bothner.com>
13880
13881 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
13882 define in terms of DECL_RESULT, as that fails when --enable-checking.
13883
13884 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13885
13886 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
13887 types the same in comparison.
13888 (CHECK_OP): Add static prototype.
13889
13890 2000-06-13 Jakub Jelinek <jakub@redhat.com>
13891
13892 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13893 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13894 * parse.c: Rebuilt.
13895
13896 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13897
13898 * decl.c (create_primitive_vtable): Prototype.
13899
13900 * jcf-write.c (generate_bytecode_insns): Initialize variable
13901 `saved_context'.
13902
13903 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13904
13905 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13906
13907 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13908 to track searched classes, and do not search the same class more than
13909 once. Call find_applicable_accessible_methods_list on immediate
13910 superclass, instead of search_applicable_method_list on all ancestors.
13911 Fix for PR gcj/238.
13912
13913 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13914
13915 * parse.y (register_fields): Permit static fields in inner classes
13916 if they are final. Fix for PR gcj/255.
13917
13918 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13919
13920 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13921 * parse.y (find_in_imports): Returned type changed to void,
13922 leading comment fixed.
13923 (register_package): New function.
13924 (qualify_and_find): Likewise.
13925 (package_declaration:): Use `register_package'.
13926 (single_type_import_declaration:): Removed local variable
13927 `node'. Added missing `;' for consistency.
13928 (type_import_on_demand_declaration:): Use `chainon' to link new
13929 entries.
13930 (lookup_field_wrapper): Lookup local variables defined in outer
13931 contexts first.
13932 (java_complete_class): Don't reverse the list of imported on demand.
13933 (do_resolve_class): Reorganized. Removed local variable
13934 `original_name'. Call `qualify_and_find' with the current package
13935 name, invoke `find_in_imports_on_demand' right after. Call
13936 `qualify_and_find' with the packages we've seen so far. Fixed
13937 operations numbering in comments.
13938 (java_expand_class): Don't reverse `package_list'.
13939 (find_most_specific_methods_list): New local variables `abstract'
13940 and `candidates'. Use them to pick the right method.
13941
13942 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
13943
13944 * parse.y (check_modifiers_consistency): Don't subtract out
13945 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13946
13947 2000-06-04 Philipp Thomas <pthomas@suse.de>
13948
13949 * Makefile.in (INTLLIBS): New.
13950 (LIBS): Add above.
13951 (DEPLIBS): Ditto.
13952
13953 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13954
13955 * class.c (get_dispatch_table): Build the vtable dummy entry list
13956 element with a null purpose. Fixed leading comment.
13957 (build_dtable_decl): Build an accurate dtable type when appropriate
13958 and use it.
13959
13960 2000-06-02 Richard Henderson <rth@cygnus.com>
13961
13962 * lang.c (lang_get_alias_set): New.
13963
13964 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13965
13966 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13967 before using it as the accessed field.
13968
13969 2000-05-31 Tom Tromey <tromey@cygnus.com>
13970
13971 * java-tree.h (boolean_array_vtable, byte_array_vtable,
13972 char_array_vtable, short_array_vtable, int_array_vtable,
13973 long_array_vtable, float_array_vtable, double_array_vtable):
13974 Declare.
13975 * expr.c (get_primitive_array_vtable): New function.
13976 (create_primitive_vtable): New function.
13977 (java_lang_expand_expr): Enable code to statically generate
13978 arrays.
13979 * decl.c (init_decl_processing): Create primitive vtables.
13980 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13981 short_array_vtable, int_array_vtable, long_array_vtable,
13982 float_array_vtable, double_array_vtable): Define.
13983
13984 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
13985
13986 * java/parse.y (find_applicable_accessible_methods_list):
13987 Don't add an uninitialized value to the list.
13988
13989 2000-05-25 Tom Tromey <tromey@cygnus.com>
13990
13991 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
13992 when trying to see if field's class should be initialized. Always
13993 initialize field's declaring class, not qualified class.
13994 For PR gcj/162.
13995
13996 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
13997 `wfl_operator', to maybe_build_primttype_type_ref.
13998 Fixes PR gcj/235.
13999
14000 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
14001
14002 * parse.y (patch_method_invocation): Don't try to lookup methods
14003 in primitive types.
14004
14005 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14006
14007 * parse.y (resolve_field_access): Call the appropriate <clinit>
14008 before accessing the length of a static array. Craft a decl for
14009 the field while its time. Fixes PR gcj/129.
14010
14011 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14012
14013 * parse.y (resolve_package): Correctly set `*next' (was off by
14014 one.)
14015 (resolve_qualified_expression_name): Fixed comment.
14016
14017 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14018
14019 * jcf-parse.c (jcf_parse_source): Reset current_class and
14020 current_function_decl to NULL before parsing a new file.
14021
14022 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14023
14024 * parse.y (block_end:): If the collected block doesn't feature a
14025 statement, insert an empty statement.
14026
14027 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14028
14029 * parse.y (maybe_yank_clinit): New function.
14030 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
14031 end of the list of methods belonging to a class.
14032 (java_complete_expand_method): Check whether <clinit> is really
14033 necessary and expand it accordingly.
14034
14035 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14036
14037 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
14038 processed by the method's switch statement.
14039
14040 2000-05-19 Tom Tromey <tromey@cygnus.com>
14041
14042 * java-tree.h: Added init state enum.
14043 * decl.c (emit_init_test_initialization): Initialize class
14044 initialization check variable by looking at class' state.
14045
14046 2000-05-19 Tom Tromey <tromey@cygnus.com>
14047
14048 * java-tree.h (build_instanceof): Declare.
14049 (build_get_class): Declare.
14050 * parse.y (patch_binop): Use build_instanceof.
14051 * expr.c (build_instanceof): New function. If class is final,
14052 don't make a function call.
14053 (expand_java_INSTANCEOF): Use it.
14054 (build_get_class): New function.
14055
14056 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
14057
14058 * jcf-write.c (generate_classfile): Scan the source_file for
14059 slashes with the right pointer variable.
14060
14061 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
14062
14063 * lang.c (lang_decode_option): Update -Wunused flags by calling
14064 set_Wunused.
14065 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
14066
14067 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
14068
14069 * check_init.c (check_init): Constify local char *.
14070 * class.c (push_class): Constify local char *.
14071 * java_tree.h: Update prototypes.
14072 * jcf-io.c (open_class): Constify filename parameter and
14073 return value.
14074 (find_class): Remove redundant string copy. Cast return from
14075 open_class.
14076 * jcf-parse.c (read_class, parse_class_file, yyparse):
14077 Constify local char *.
14078 * jcf-write.c (generate_bytecode_insns, generate_classfile):
14079 Constify local char *.
14080 * jcf.h (JCF): Constify filename and classname.
14081 (JCF_FINISH): Cast args to FREE to char * when appropriate.
14082 * lang.c (init_parse): Constify parameter and return value.
14083 * lex.c (java_get_line_col): Constify filename parameter.
14084 * parse.h: Constify parser_ctxt.filename. Update prototypes.
14085 * parse.y (java_parser_context_suspend,
14086 issue_warning_error_from_context, safe_layout_class): Constify
14087 local char *.
14088 * parse.c: Regenerate.
14089
14090 2000-05-08 Tom Tromey <tromey@cygnus.com>
14091
14092 * expr.c (build_jni_stub): Cache the result of
14093 _Jv_LookupJNIMethod.
14094
14095 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14096
14097 * decl.c (predef_filenames_size): Now 7.
14098 (predef_filenames): New seventh entry.
14099
14100 2000-05-04 Tom Tromey <tromey@cygnus.com>
14101
14102 * boehm.c (mark_reference_fields): Don't mark RawData fields.
14103 Keep track of when we've seen a reference field after a
14104 non-reference field.
14105 (get_boehm_type_descriptor): Handle case where we see
14106 non-reference fields but no trailing reference field.
14107 * decl.c (rawdata_ptr_type_node): Define.
14108 (init_decl_processing): Initialize rawdata_ptr_type_node.
14109 * java-tree.h (rawdata_ptr_type_node): Declare.
14110
14111 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14112
14113 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
14114 specifiers in calls to fprintf.
14115
14116 2000-05-03 Andrew Haley <aph@cygnus.com>
14117
14118 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
14119
14120 * javaop.h (WORD_TO_INT): New function.
14121 (IMMEDIATE_s4): Use WORD_TO_INT.
14122 * jcf.h (JPOOL_INT): Ditto.
14123
14124 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
14125 separator.
14126
14127 2000-04-19 Tom Tromey <tromey@cygnus.com>
14128
14129 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
14130 on native function.
14131 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
14132 JNI methods.
14133 * expr.c (build_jni_stub): New function.
14134 * lang-specs.h: -fjni and -femit-class-file are incompatible.
14135 * parse.c: Rebuilt.
14136 * parse.y (java_complete_expand_methods): Expand a native method
14137 and call build_jni_stub if -fjni given.
14138 * lang-options.h: Document -fjni.
14139 * lang.c (flag_jni): New global.
14140 (lang_f_options): Added `jni' entry.
14141 * java-tree.h (soft_lookupjnimethod_node,
14142 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
14143 Declare.
14144 (flag_jni): Declare.
14145 (build_jni_stub): Declare.
14146 (struct lang_decl): Added `native' flag.
14147 (METHOD_NATIVE): Redefined to use `native' field of lang specific
14148 structure.
14149 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
14150 soft_jnipopsystemframe_node): New globals.
14151 (init_decl_processing): Set them. _Jv_InitClass only takes one
14152 argument.
14153
14154 * java-tree.def: Put into `C' mode.
14155
14156 2000-04-27 Tom Tromey <tromey@cygnus.com>
14157
14158 Fix for PR gcj/2:
14159 * expr.c (expand_invoke): Generate check to see if object pointer
14160 is null in nonvirtual invocation case.
14161 * java-tree.h (soft_nullpointer_node): Declare.
14162 * decl.c (soft_nullpointer_node): New global.
14163 (init_decl_processing): Initialize soft_nullpointer_node.
14164 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14165 or `private' methods.
14166 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14167
14168 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
14169
14170 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
14171 from <clinit>
14172
14173 2000-04-26 Tom Tromey <tromey@cygnus.com>
14174
14175 * zextract.c (find_zip_file_start): New function.
14176 (read_zip_archive): Use it.
14177
14178 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14179
14180 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
14181
14182 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14183
14184 * class.c (common_enclosing_context_p): New function.
14185 * java-tree.h (common_enclosing_context_p): Added prototype.
14186 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
14187 classes sharing an outer context with the current instance.
14188 * parse.y (build_access_to_thisn): Fixed leading comment.
14189 (verify_constructor_super): New local `supper_inner'. Skip
14190 enclosing context argument in the case of inner class constructors.
14191 (patch_method_invocation): Insert proper context as second
14192 parameter to pure inner class constructor super invocations.
14193
14194 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14195
14196 * parse.y (end_class_declaration): Reset the interface number
14197 counter.
14198
14199 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14200
14201 * parse.y (source_start_java_method): Deleted unnecessary code.
14202 (patch_method_invocation): Fixed comment.
14203
14204 2000-04-24 Robert Lipe <robertlipe@usa.net>
14205
14206 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
14207
14208 2000-04-23 Tom Tromey <tromey@cygnus.com>
14209
14210 * boehm.c (mark_reference_fields): Use int_byte_position.
14211
14212 2000-04-22 Tom Tromey <tromey@cygnus.com>
14213
14214 * boehm.c (mark_reference_fields): Only call byte_position on
14215 non-static fields.
14216
14217 2000-04-22 Tom Tromey <tromey@cygnus.com>
14218
14219 * boehm.c (mark_reference_fields): Added `last_view_index'
14220 argument. Use DECL_FIELD_OFFSET to determine field's offset.
14221
14222 2000-04-20 Mo DeJong <mdejong@cygnus.com>
14223
14224 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
14225 * parse.y (check_class_interface_creation): Fixed comments. Select
14226 permitted modifiers for (inner) interfaces. Changed error message
14227 to report rejected modifiers used with local classes.
14228
14229 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14230
14231 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
14232 of directly inherited type considered in scope.
14233 * parse.y (do_resolve_class): Search inherited classes for inner
14234 classes.
14235
14236 2000-04-20 Tom Tromey <tromey@cygnus.com>
14237
14238 * parse.y (not_accessible_p): Use member's class, not current
14239 class, when doing inheritance check for protected reference.
14240 Fixes PR gcj/124.
14241
14242 2000-04-20 Jason Schroeder <shrode@subnature.com>
14243
14244 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
14245
14246 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14247
14248 * parse.y (lookup_field_wrapper): Search for final local aliases.
14249 (resolve_expression_name): Let lookup_field_wrapper search for
14250 final local aliases. Force the value of `name' if one is found.
14251 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
14252 an expression name. Fixed comments.
14253
14254 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14255
14256 * parse.y (yyerror): `msg' can be null, don't use it in that case.
14257
14258 2000-04-19 Tom Tromey <tromey@cygnus.com>
14259
14260 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
14261
14262 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14263
14264 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
14265
14266 2000-04-18 Tom Tromey <tromey@cygnus.com>
14267
14268 PR gcj/211:
14269 * gjavah.c (utf8_cmp): Changed return value.
14270 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
14271 result.
14272 (cxx_keywords): New global.
14273 (get_field_name): Handle new result of cxx_keyword_subst.
14274 (print_method_info): Likewise.
14275
14276 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
14277
14278 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
14279 with a newline, for CNI.
14280 (print_stub_or_jni): Print a space or newline before method name for
14281 CNI as well as JNI.
14282 (print_cxx_classname): Don't write leading "::" in CNI stub method.
14283 (process_file): Include gcj/cni.h if generating CNI stubs.
14284
14285 2000-04-16 Tom Tromey <tromey@cygnus.com>
14286
14287 * gjavah.c (decompile_method): Use print_field_name.
14288 Fixes PR gcj/205.
14289
14290 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14291
14292 * parse.y (java_expand_classes): Reverse the package list once.
14293 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
14294 reduction.
14295 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
14296 the `==' and `!=' operators.
14297
14298 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14299
14300 * jcf-write.c (generate_bytecode_insns): At invocation time,
14301 always relate an interface method to the type of its selector.
14302
14303 2000-04-05 Tom Tromey <tromey@cygnus.com>
14304
14305 Fix for PR gcj/2:
14306 * expr.c (expand_invoke): Generate check to see if object pointer
14307 is null in nonvirtual invocation case.
14308 * java-tree.h (soft_nullpointer_node): Declare.
14309 * decl.c (soft_nullpointer_node): New global.
14310 (init_decl_processing): Initialize soft_nullpointer_node.
14311 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14312 or `private' methods.
14313 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14314
14315 2000-04-05 Tom Tromey <tromey@cygnus.com>
14316
14317 Fix for PR gcj/140:
14318 * parse.y (check_final_assignment): Recognize assignments to the
14319 `length' field of an array when generating class files.
14320
14321 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14322
14323 * class.c (decl_hash): Prototype removed.
14324 (decl_compare): Likewise.
14325
14326 2000-04-05 Tom Tromey <tromey@cygnus.com>
14327
14328 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
14329 * parse.y (check_modifiers_consistency): Check for final/volatile
14330 clash. Fixes PR gcj/164.
14331
14332 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14333
14334 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
14335 made global.
14336 (java_hash_compare_tree_node): Renamed from `decl_compare, made
14337 global.
14338 (add_method_1): Use `java_hash_hash_tree_node' and
14339 `java_hash_compare_tree_node'.
14340 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
14341 (java_hash_compare_tree_node): Likewise.
14342 * parse.y (find_applicable_accessible_methods_list): Create,
14343 delete and use a hash table to remember already searched interfaces.
14344
14345 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
14346
14347 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
14348 with latest entry.
14349
14350 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14351
14352 * boehm.c (mark_reference_fields, set_bit): Prototype.
14353 (set_bit): Un-ANSI-fy definition.
14354
14355 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
14356 Prototype.
14357
14358 * decl.c (emit_init_test_initialization): Likewise.
14359
14360 * gjavah.c (jni_print_char): Likewise.
14361
14362 * parse.y (create_new_parser_context): Likewise.
14363
14364 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
14365
14366 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
14367 patch missing hunk. Fixed indentation.
14368
14369 2000-03-30 Tom Tromey <tromey@cygnus.com>
14370
14371 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
14372 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
14373
14374 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14375
14376 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14377 when negative *before* using it as an array index.
14378 * ChangeLog: Fixed typo.
14379
14380 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14381
14382 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14383 to 0 when it reaches -1.
14384
14385 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14386
14387 * jcf-parse.c (get_constant): Properly cast `num' during the
14388 invocation of `add_double'.
14389 * jcf-write.c (push_long_const): Properly cast `lo' before
14390 comparing it to short bounds.
14391 * parse-scan.y (interface_declaration:): Rule re-arrange so that
14392 `interface_body:' is reduced after the current interface is
14393 pushed.
14394
14395 2000-03-26 Tom Tromey <tromey@cygnus.com>
14396
14397 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
14398 Java-specific `-f' option.
14399
14400 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14401
14402 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
14403 Adjust order of making types.
14404 Make bitsize_*_node values.
14405
14406 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14407
14408 * class.c (make_field_value): Use byte_position.
14409 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
14410 (java_array_data_offset): Likewise.
14411 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
14412 bzero call.
14413
14414 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14415
14416 * parse.y (check_abstract_method_definitions): New local
14417 `end_type_reached'. Make sure we also consider `end_type'.
14418 (java_check_abstract_method_definitions): Make sure we eventually
14419 consider `java.lang.Object'.
14420 (maybe_use_access_method): Don't use access method if not in the
14421 context of a pure inner class or if the method's context is right.
14422 (find_applicable_accessible_methods_list): New static flag
14423 `object_done'. Don't search abstract classes as interfaces. Fixed
14424 indentation. Fixed the `java.lang.Object' only search. Search
14425 class interface(s) first, then fully search enclosing contexts.
14426 (find_most_specific_methods_list): Pick the closest candidate when
14427 they're all abstract.
14428
14429 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14430
14431 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14432 properly initialize `finished_label'. Don't emit gotos for empty
14433 try statements.
14434
14435 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14436
14437 * except.c (emit_handlers): Clear catch_clauses_last.
14438
14439 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14440
14441 * parse.y (check_method_types_complete): New function.
14442 (create_class): Reset anonymous class counter only when seeing an
14443 non inner classe.
14444 (java_complete_class): JDEP_METHOD: Don't recompute signature
14445 if incomplete.
14446
14447 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14448
14449 * class.c (build_static_ref): Fixed indentation in comment.
14450 * java-tree.def (TRY_EXPR): Fixed typo in name.
14451 (CLASS_LITERAL): Likewise.
14452 * java-tree.h: (TYPE_DOT_CLASS): New macro.
14453 (struct lang_type): New field `dot_class'.
14454 * jcf-write.c (generate_bytecode_insns): Fixed error message.
14455 (generate_classfile): Method `class$' is synthetic.
14456 * parse.y (build_do_class_method): New function.
14457 (build_dot_class_method_invocation): Likewise.
14458 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
14459 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
14460 (qualify_ambiguous_name): Likewise.
14461 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
14462 (build_try_statement): Fixed leading comment.
14463
14464 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14465
14466 * class.c (make_field_value): Properly handle sizes.
14467 (get_dispatch_vector): Use tree_low_cst and host_integerp.
14468 (layout_class_method): Count using trees.
14469 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
14470 * expr.c (java_array_data_offset): Use int_bit_position.
14471 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
14472 (build_invokevirtual): Use tree_low_cst and do computations with trees.
14473
14474 2000-03-16 Tom Tromey <tromey@cygnus.com>
14475
14476 * lang.c (flag_hash_synchronization): New global.
14477 (lang_f_options): Added `hash-synchronization'.
14478 * lang-options.h: Mention -fhash-synchronization.
14479 * java-tree.h (flag_hash_synchronization): Declare.
14480 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
14481 hash table synchronization is disabled.
14482 * decl.c (init_decl_processing): Only push `sync_info' value when
14483 hash table synchronization is disabled.
14484 * class.c (make_class_data): Only push `sync_info' field when hash
14485 table synchronization is disabled. Removed dead code.
14486
14487 2000-03-16 Tom Tromey <tromey@cygnus.com>
14488
14489 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
14490
14491 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14492
14493 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
14494 classes.
14495 * parse.y (patch_method_invocation): Handle anonymous classes
14496 creation in static context.
14497
14498 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14499
14500 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
14501 * parse.y (resolve_qualified_expression_name): Use it.
14502 (patch_method_invocation): Likewise.
14503
14504 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14505
14506 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
14507 depending on the type of dependency which dictates what the
14508 current class is.
14509 (unresolved_type_p): Resolved types limited to the current class.
14510
14511 2000-03-15 Tom Tromey <tromey@cygnus.com>
14512
14513 * decl.c (init_decl_processing): Set type of `sync_info' to be
14514 pointer to Object.
14515
14516 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
14517 Correctly compute bit number for current slot. Zero `high' and
14518 `low' in DS_LENGTH case. Don't skip inherited fields. Use
14519 mark_reference_fields.
14520 (mark_reference_fields): New function.
14521
14522 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14523
14524 * parse.y (register_incomplete_type): Fixed initialization of
14525 JDEP_ENCLOSING.
14526
14527 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14528
14529 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
14530 static globals.
14531 (push_class_context, pop_class_context): New function.
14532 (class_body:): Call pop_class_context.
14533 (interface_body:): Likewise.
14534 (INNER_QUALIFIER): New macro.
14535 (report_class_declaration): Changed output format and use
14536 INNER_QUALIFIER. Call push_class_context.
14537
14538 2000-02-14 Andrew Haley <aph@cygnus.com>
14539
14540 * check-init.c (check_init): Add new cases for unary and binary
14541 tree nodes.
14542
14543 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14544
14545 * parse.y (resolve_package): Set `next' once a type name has been
14546 progressively discovered.
14547 (resolve_qualified_expression_name): Propagate resolution only if
14548 there are remaining qualifiers. Take into account `q' might have
14549 been cleared after re-qualification.
14550 * parse.y (patch_method_invocation): New local `resolved'.
14551 Section dealing with qualified expression rewritten to use
14552 resolve_field_access.
14553
14554 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14555
14556 * parse.h (PUSH_CPC): Fixed indentation.
14557 (DEBUG_CPC): New macro.
14558 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
14559 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
14560 * parse.y (class_body_declaration:): Use
14561 SET_CPC_INSTANCE_INITIALIZER_STMT.
14562 (method_declaration:): Check for null current_function_decl.
14563 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
14564 (java_parser_context_pop_initialized_field): Better handling of
14565 empty lists.
14566 (maybe_make_nested_class_name): Mark nested class name as
14567 qualified when necessary.
14568 (end_class_declaration): Don't call java_parse_context_resume when
14569 one or more error occurred.
14570 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
14571 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
14572 SET_CPC_INITIALIZER_STMT.
14573 (method_header): Check for inner classes declaring static methods.
14574 (resolve_qualified_expression_name): Handle situation where `this'
14575 is implied.
14576
14577 2000-03-13 Hans Boehm <boehm@acm.org>
14578
14579 * typeck.c (build_prim_array_type): Correctly set the high word too.
14580
14581 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14582
14583 * parse.y (java_complete_expand_methods): Leave <clinit> out of
14584 ordinary methods.
14585 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14586 list of methods for interfaces.
14587
14588 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14589
14590 * parse.y (qualify_ambiguous_name): Properly handle expressions
14591 using `null'.
14592
14593 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14594
14595 * parse.y (check_final_assignment): Extended to process
14596 COMPOUND_EXPR.
14597 (patch_assignment): Have check_final_assignment called only once.
14598
14599 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14600
14601 * java-tree.h (IS_INIT_CHECKED): New flag.
14602 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14603 * parse.y (patch_string): Call force_evaluation_order on the
14604 completed string concatenation tree.
14605 * expr.c (force_evaluation_order): Call force_evaluation_order on
14606 function's arguments too.
14607
14608 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14609
14610 * decl.c (emit_init_test_initialization): Mark KEY as unused.
14611 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14612 (build_anewarray): Likewise.
14613 * parse.y (patch_newarray): Likewise.
14614 * parse.c: Regenerated.
14615
14616 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14617
14618 * decl.c (init_decl_processing): Added new class fields `depth',
14619 `ancestors', and `idt' to class_type_node. Use
14620 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14621 * class.c (make_class_data): Push initial values for new fields.
14622 * java-tree.h: Updated prototype for `build_invokeinterface'.
14623 * expr.c (build_invokeinterface): Changed parameters to accept
14624 `method' tree. Calculate index of `method' in its declaring
14625 interface. Build call to _Jv_LookupInterfaceMethodIdx.
14626 (expand_invoke): Call `build_invokeinterface' with new parameters.
14627 * parse.y (patch_invoke): Call `build_invokeinterface' with new
14628 parameters.
14629
14630 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14631
14632 * typeck.c (lookup_do): Search superinterfaces first
14633 when looking up an interface method. From Godmar Back
14634 <gback@cs.utah.edu>
14635
14636 2000-03-06 Tom Tromey <tromey@cygnus.com>
14637
14638 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14639
14640 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14641
14642 * java-tree.h (lookup_argument_method2): Declared.
14643 (safe_layout_class): Prototype moved from parse.h.
14644 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14645 * parse.y (java_check_regular_methods): Local `super_class' gone.
14646 Call lookup_argument_method2 instead of lookup_argument_method.
14647 Perform modifier match for methods found declared in implemented
14648 interfaces. Fixed indentation problem. Overriding/hiding error
14649 report to take place only for methods found in classes.
14650 * typeck.c (lookup_argument_method): Changed leading
14651 comment. Re-written by calling lookup_do.
14652 (lookup_argument_method2): New function.
14653 (lookup_java_method): Re-written by calling lookup_do.
14654 (lookup_do): New function.
14655
14656 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14657
14658 * check-init.c (check_init): Removed dead code. Handle (blank)
14659 final variables.
14660 * parse.y (declare_local_variables): New local `final_p', set it
14661 and use it to initialize LOCAL_FINAL.
14662 (check_final_assignment): Only check FIELD_DECLs.
14663
14664 2000-02-17 Tom Tromey <tromey@cygnus.com>
14665
14666 * Makefile.in (JAVA_OBJS): Added boehm.o.
14667 (boehm.o): New target.
14668 * Make-lang.in (JAVA_SRCS): Added boehm.c.
14669 * java-tree.h (flag_use_boehm_gc): Declare.
14670 (get_boehm_type_descriptor): Declare.
14671 * lang.c (lang_f_options): Added `use-boehm-gc'.
14672 (flag_use_boehm_gc): New global.
14673 * lang-options.h: Added -fuse-boehm-gc.
14674 * boehm.c: New file.
14675 * class.c (get_dispatch_table): If class uses a Boehm type
14676 descriptor, put it in the vtable.
14677 (make_class_data): Removed dead code.
14678
14679 2000-03-03 Per Bothner <per@bothner.com>
14680
14681 * decl.c (init_decl_processing): Initialize sizetype properly.
14682
14683 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14684
14685 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14686 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14687 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14688 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14689 (jcf_parse): New local `current'. Load innerclasses seen in outer
14690 context being processed.
14691 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14692 * jcf-write.c (append_innerclasses_attribute): New function.
14693 (append_innerclasses_attribute_entry): Likewise.
14694 (get_access_flags): Handle static classes. Set anonymous and local
14695 classes to be private.
14696 (generate_classfile): Attribute count adjusted. Call
14697 append_innerclasses_attribute.
14698 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14699 PURE_INNER_CLASS_TYPE_P.
14700 * parse.y (parser_qualified_classname): New parameter `is_static',
14701 produce non qualified name accordingly.
14702 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14703 (create_interface): Added argument to parser_qualified_classname.
14704 (create_class): Added argument to parser_qualified_classname. Setup
14705 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14706 (add_inner_class_fields): Fixed indentation.
14707 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14708 (method_declarator): Fixed typo in comment.
14709 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14710 (build_current_thisn): Likewise.
14711 (patch_method_invocation): Likewise.
14712
14713 2000-03-01 Martin von Löwis <loewis@informatik.hu-berlin.de>
14714
14715 * decl.c (current_function_decl): Move to toplev.c.
14716
14717 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14718
14719 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14720 (DECL_BIT_INDEX): Use underlying representation.
14721 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14722
14723 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14724
14725 * expr.c (build_java_ret): Pass proper type to size_binop.
14726
14727 2000-02-25 Anthony Green <green@cygnus.com>
14728
14729 * expr.c (build_class_init): Mark the decl to be ignored by
14730 check_init.
14731 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14732 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14733 * class.c (init_test_hash_newfunc): New function.
14734 (decl_hash): New function.
14735 (decl_compare): New function.
14736 * decl.c (emit_init_test_initialization): New function.
14737 (complete_start_java_method): Traverse the init test hashtable,
14738 calling emit_init_test_initialization.
14739 (always_initialize_class_p): Define.
14740 * expr.c (build_class_init): Use initialization tests when
14741 emitting class initialization code.
14742 (always_initialize_class_p): Declare.
14743 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14744 1.
14745 * java-tree.h: Include hash.h.
14746 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14747 (struct lang_decl): Add init_test_table field.
14748 (init_test_hash_entry): Define.
14749
14750 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14751
14752 * gjavah.c (main): Avoid using `argi' to report unimplemented
14753 options.
14754
14755 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14756
14757 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14758 initialize locals to avoid warnings. Local `exception_type' moved
14759 into if statement.
14760
14761 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14762
14763 * parse.y (resolve_expression_name): Use `orig' as a second
14764 argument to resolve_field_access.
14765 (resolve_field_access): Removed unnecessary code when dealing with
14766 static fields.
14767
14768 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
14769
14770 * class.c (push_super_field): Don't push the field twice.
14771 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14772 * parse.h (java_reorder_fields): Prototyped.
14773 * parse.y (java_reorder_fields): New function.
14774 (java_layout_class): Simplified not to worry about re-ordering.
14775
14776 2000-02-23 Tom Tromey <tromey@cygnus.com>
14777
14778 * gjavah.c (print_name): In JNI case, correctly quote string.
14779 (print_method_info): Don't handle overrides in JNI mode.
14780
14781 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14782
14783 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14784 value type set to `boolean_type_node'.
14785
14786 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14787
14788 * jcf-dump.c (main): Test for correct condition after
14789 output file creation.
14790
14791 2000-02-19 Anthony Green <green@cygnus.com>
14792
14793 * jcf-depend.c (add_entry): Fix test for first list entry.
14794
14795 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14796
14797 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14798 * constants.c (build_constants_constructor): Likewise.
14799
14800 2000-02-19 Anthony Green <green@cygnus.com>
14801
14802 * jcf-depend.c (add_entry): Add entries to the end of the list.
14803
14804 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
14805
14806 * decl.c (INT_TYPE_SIZE): Define if necessary.
14807 (expand_java_return): Handle the case of a native integer smaller
14808 than a JVM integer.
14809
14810 2000-02-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
14811
14812 * gjavah.c (help): Use GCCBUGURL.
14813 * jv-scan.c (help): Likewise.
14814 * jcf-dump.c (help): Likewise.
14815
14816 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14817
14818 * jcf-write.c (generate_bytecode_insns): Don't generate empty
14819 `finally' clauses.
14820
14821 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14822
14823 * jcf-parse.c (load_class): Call `fatal' if no file containing
14824 the target class are found.
14825
14826 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
14827
14828 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14829 lex.c, lex.h, and PARSE_H to...
14830 (parse.o, parse-scan.o): ...here, respectively.
14831
14832 * lex.c: Split out code that may trigger SIGFPE from yylex()
14833 to its own function.
14834 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14835
14836 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14837
14838 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14839
14840 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14841
14842 * parse.y (outer_field_access_p): Stop in time when outer contexts
14843 are exhausted.
14844 (resolve_qualified_expression_name): Properly qualify *everything*
14845 after a package.type to be resoled as expression names.
14846 (find_applicable_accessible_methods_list): Save/restore `class' to
14847 isolate it from a possible outer context search.
14848
14849 2000-02-15 Tom Tromey <tromey@cygnus.com>
14850
14851 * gjavah.c (jni_print_char): New function.
14852 (print_full_cxx_name): Use it.
14853 (decode_signature_piece): Likewise.
14854 (print_cxx_classname): Likewise.
14855
14856 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14857
14858 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14859 version.o.
14860 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14861
14862 * gjavah.c: Include version.h.
14863
14864 * jcf-dump.c: Likewise.
14865
14866 * jv-scan.c: Likewise.
14867
14868 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14869
14870 * parse.y (outer_field_access_fix): First parameter now a tree
14871 node. Check for assignment to final. First argument to
14872 build_outer_field_access_fix modified to accommodate prototype.
14873 (build_outer_field_access): Don't check for assignment to final
14874 here.
14875 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14876 possibly returned by outer_field_access_fix. Changed
14877 outer_field_access_fix's first argument.
14878 (check_final_assignment): $finit$'s context is OK.
14879 (patch_unaryop): Use node instead of its line/column value when
14880 calling outer_field_access_fix.
14881
14882 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14883
14884 * parse.y (interface_declaration:): No longer tagged
14885 <node>. Re-installed default action.
14886 (class_member_declaration:): Handle inner interfaces.
14887 (interface_member_declaration): Handle inner interfaces and
14888 classes.
14889 (create_interface): Push error if one seen. Suspend parsing
14890 context when processing an inner interface.
14891 (register_fields): Inner class static field limitations not to
14892 apply to inner interfaces.
14893
14894 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14895
14896 * jcf-parse.c (load_class): Update `java_error_count' when a
14897 class' file can't be found.
14898 (parse.y): Avoid (byte)code generation when errors seen.
14899
14900 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14901
14902 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
14903 decodes a valid node.
14904 (patch_binop): Handle TRUNC_DIV_EXPR.
14905
14906 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14907
14908 * parse.y (resolve_package): New local `acc'. Try to progressively
14909 build and guess a package and type name.
14910
14911 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14912
14913 * parse.y (find_applicable_accessible_methods_list): Load and
14914 layout the search class if necessary.
14915 (java_complete_tree): Keep to original type of the folded initial
14916 value.
14917
14918 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14919
14920 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14921 Generate error message if circularity is detected. New static
14922 local `list'.
14923 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
14924 * jcf-write.c (generate_bytecode_insns): Very simply handle
14925 SAVE_EXPR.
14926 * parse.y (java_check_circular_reference): Use
14927 `cyclic_inheritance_report' during report, if necessary.
14928 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14929 walking NEW_ARRAY_INIT twice.
14930
14931 2000-02-09 Tom Tromey <tromey@cygnus.com>
14932
14933 * parse.y (check_class_interface_creation): Allow inner classes to
14934 be `private' or `protected', check modifiers' consistency. Prevent
14935 block local classes from bearing any modifiers.
14936
14937 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14938
14939 * except.c (check_start_handlers): Re-add prototype lost in last
14940 patch.
14941 (maybe_start_try): Remove excess argument to `check_start_handlers'.
14942
14943 2000-02-09 Andrew Haley <aph@cygnus.com>
14944
14945 * decl.c (clear_binding_level): Remove excess initializer.
14946 (maybe_poplevels): Remove unused variable.
14947 (force_poplevels): Ditto.
14948 (struct binding_level): Add comment.
14949
14950 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14951
14952 * jcf-write.c (generate_classfile): Don't consider
14953 pre-initialization with reference value (use <clinit> instead.)
14954 * parse.y (java_fix_constructors): No generated constructor for
14955 interfaces.
14956 (build_outer_field_access): Removed debug message.
14957 (outer_field_expanded_access_p): Adapted to bytecode generation.
14958 (build_outer_field_access_method): Use fix_method_argument_names.
14959 (build_outer_method_access_method): Fixed indentation. Added
14960 comment. Handle access method generation for static and also void
14961 methods.
14962 (build_access_to_thisn): Inserted debug message.
14963 (maybe_build_thisn_access_method): Use fix_method_argument_names.
14964 (resolve_qualified_expression_name): Fixed comment.
14965 (not_accessible_p): Adapted to bytecode generation. Added comment.
14966 (patch_method_invocation): Added comment.
14967 (maybe_use_access_method): Fixed leading comment. Handle static
14968 methods.
14969 (java_complete_lhs): Don't shortcut handling of initialized upon
14970 declaration String type static fields when generating bytecode.
14971 (patch_unaryop): Handle outer field access when generating
14972 bytecode.
14973
14974 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14975
14976 * java-tree.h (FIELD_THISN): New macro.
14977 * jcf-write.c (append_synthetic_attribute): New function.
14978 (generate_classfile): Set "Synthetic" attribute on this$<n>,
14979 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
14980 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
14981 this$<n> fields.
14982 (build_outer_field_access): Turned on access functions usage and
14983 generation when compiling to bytecode.
14984 (maybe_use_access_method): Likewise.
14985
14986 2000-01-25 Andrew Haley <aph@cygnus.com>
14987
14988 * java-except.h (struct eh_range): Add `expanded' field.
14989 (maybe_start_try): Add end_pc arg.
14990 (maybe_end_try): Ditto.
14991 * java-tree.h (force_poplevels): new function.
14992 * expr.c (expand_byte_code): Don't call maybe_start_try or
14993 maybe_end_try.
14994 * except.c (add_handler): Reset expanded.
14995 (expand_start_java_handler): Set expanded.
14996 (check_start_handlers): Don't expand a start handler that's
14997 already been expanded.
14998 (maybe_start_try): Add end_pc arg. Only expand a handler which
14999 ends after end_pc.
15000 (expand_end_java_handler): call force_poplevels.
15001 (force_poplevels): new function.
15002 * decl.c (binding_level): Add start_pc of binding level.
15003 (maybe_pushlevels): Call maybe_start_try when pushing binding
15004 levels.
15005 (maybe_poplevels): Call maybe_end_try when popping binding levels.
15006 (LARGEST_PC): Define.
15007 (clear_binding_level): Use LARGEST_PC.
15008
15009 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
15010 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
15011 (binding_depth, is_class_level, current_pc): new variables.
15012 (struct binding_level): ditto.
15013 (indent): new function.
15014 (push_jvm_slot): add debugging info.
15015 (maybe_pushlevels): ditto.
15016 (maybe_poplevels): ditto.
15017 (pushlevel): ditto.
15018 (poplevel): ditto.
15019 (start_java_method): ditto.
15020 (give_name_to_locals): comment only.
15021 * except.c (binding_depth, is_class_level, current_pc):
15022 new variables.
15023 (expand_start_java_handler): add debugging info.
15024 (expand_end_java_handler): ditto.
15025
15026 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15027
15028 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
15029 (print_name_for_stub_or_jni, process_file): Constify a char*.
15030
15031 2000-02-03 Tom Tromey <tromey@cygnus.com>
15032
15033 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
15034
15035 2000-01-31 Scott Bambrough <scottb@netwinder.org>
15036
15037 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
15038 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
15039 defined to be 1.
15040
15041 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
15042
15043 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
15044 * java-tree.h (TYPE_II_STMT_LIST): New macro.
15045 (struct lang_type): New field `ii_block'.
15046 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
15047 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
15048 * parse.h (struct parser_ctxt): New field `instance_initializers'.
15049 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
15050 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
15051 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
15052 macros.
15053 * parse.y (add_instance_initializer): New function.
15054 (in_instance_initializer): New static global.
15055 (class_body_declaration:): Link instance initializer block.
15056 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
15057 (array_creation_expression:): Remove unused local.
15058 (java_parser_context_push_initialized_field): Fixed leading
15059 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
15060 CPC_INSTANCE_INITIALIZER_LIST.
15061 (java_parser_context_pop_initialized_field): Likewise.
15062 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
15063 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
15064 CPC_INITIALIZER_STMT.
15065 (fix_constructors): New local `class_type'. Use it. Call
15066 add_instance_initializer.
15067 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
15068 (patch_return): Forbid return in instance initializers.
15069 (patch_throw_statement): Enforce exception handling in the context
15070 of instance initializers.
15071
15072 2000-02-03 Tom Tromey <tromey@cygnus.com>
15073
15074 * Make-lang.in (java.mostlyclean): Remove executables in
15075 `mostlyclean'.
15076
15077 2000-01-31 Scott Bambrough <scottb@netwinder.org>
15078
15079 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
15080 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
15081 (java_float_finite): Convert to use union Word from javaop.h.
15082 (java_double_finite): Convert to use union DWord from javaop.h.
15083
15084 2000-02-02 Tom Tromey <tromey@cygnus.com>
15085
15086 * gjavah.c (options): Added `jni' entry.
15087 (help): Document -jni.
15088 (flag_jni): New global.
15089 (process_file): Handle JNI output. Don't print text from
15090 -prepend, -add, etc, when generating stubs. Only remove `.class'
15091 suffix if it actually exists.
15092 (main): Create a `.c' file when run with `--jni --stubs'. Create
15093 correct output file name with `--jni'.
15094 (print_include): Mangle header name differently in JNI case.
15095 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
15096 method list.
15097 (print_method_info): Handle JNI case. Put signature info into
15098 method name. Handle case when STREAM is NULL.
15099 (print_name_for_stub_or_jni): New function.
15100 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
15101 (print_cxx_classname): Handle JNI.
15102 (print_full_cxx_name): Likewise.
15103 (decode_signature_piece): Likewise.
15104 (overloaded_jni_method_exists_p): New function.
15105 (struct method_name): Added `signature' and `sig_length' fields.
15106 (HANDLE_END_FIELD): Do nothing in JNI mode.
15107
15108 2000-02-02 Tom Tromey <tromey@cygnus.com>
15109
15110 * jv-scan.c: Include version.c, <getopt.h>.
15111 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
15112 (options): New array.
15113 (usage): New function.
15114 (version): New function.
15115 (main): Use getopt_long to parse command line.
15116 * jcf-dump.c: Include version.c, <getopt.h>.
15117 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
15118 OPT_JAVAP): New macros.
15119 (options): New array.
15120 (usage): Return `void'. Changed message.
15121 (help): New function.
15122 (version): New function.
15123 (main): Use getopt_long_only to parse command line.
15124 * gjavah.c: Include <getopt.h>.
15125 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
15126 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
15127 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
15128 (options): New array.
15129 (java_no_argument): Removed.
15130 (help): Updated with missing options.
15131 (main): Use getopt_long_only to parse command line.
15132 (usage): Changed message.
15133
15134 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15135
15136 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
15137 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
15138 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
15139 * parse.y (array_creation_expression:): Handle anonymous arrays.
15140 (build_array_from_name): Don't set `ret_name' if null.
15141 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
15142 (qualify_ambiguous_name): Likewise.
15143 (java_complete_expand_class): Likewise.
15144
15145 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15146
15147 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
15148 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
15149 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
15150 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
15151 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
15152 AIPL_FUNCTION_COMPLETED_INVOCATION.
15153 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
15154 AIPL_FUNCTION_INVOCATION_READY.
15155 (AIPL_FUNCTION_DECLARATION): New enum entry.
15156 * parse.y (reorder_static_initialized): New function.
15157 (java_parser_context_pop_initialized_field): Use it.
15158 (add_inner_class_fields): Use
15159 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
15160 augmented. Install marker after last alias initializer, if any.
15161 (generate_finit): Fixed typo. Don't try to retain only the used
15162 fields.
15163 (method_header): Compute and set DECL_FUNCTION_NAP.
15164 (method_declarator): Fixed comment. Insert alias initializer in
15165 parameter list.
15166 (build_alias_initializer_parameter_list): Fixed leading
15167 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
15168 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
15169 (java_complete_expand_class): Code to retain only used aliases
15170 removed.
15171 (java_complete_expand_methods): New local `first_decl'. Generate
15172 $finit$ first, then expand the constructors, regular methods and
15173 <clinit>.
15174 (java_complete_expand_method): Don't report error on missing
15175 return statement if previously detected bogus.
15176 (fix_constructors): Don't patch constructor parameters list.
15177 (patch_method_invocation): Use new AIPL enum values. Reverse
15178 alias initializer list for anonymous classes.
15179
15180 2000-01-30 Anthony Green <green@redhat.com>
15181
15182 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
15183 determine how many stack slots to pop.
15184
15185 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15186
15187 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
15188 error handling/recovery.
15189 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
15190
15191 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
15192
15193 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
15194 FIELD_LOCAL_ALIAS_USED): New macros.
15195 (DECL_FUNCTION_NAP): New macro.
15196 (struct lang_decl): New field `nap'.
15197 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
15198 (struct lang_type): New fields `finit_stmt_list' and
15199 `clinit_stmt_list'.
15200 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
15201 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
15202 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
15203 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
15204 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
15205 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
15206 (BUILD_THROW): Macro line separator re-indented.
15207 * parse.y (end_class_declaration): New function.
15208 (maybe_generate_pre_expand_clinit): New name for
15209 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
15210 pre-expand static fields.
15211 (maybe_generate_clinit): Function deleted.
15212 (check_for_static_method_reference): Prototype's parameter list
15213 indented.
15214 (generate_finit): New name for maybe_generate_finit. Changed
15215 leading comment. Function rewritten to use
15216 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
15217 (build_alias_initializer_parameter_list): New function.
15218 (java_parser_context_pop_initialized_field): Likewise.
15219 (add_inner_class_fields): Likewise.
15220 (type_declaration:): Call end_class_declaration.
15221 (class_member_declaration:): Likewise.
15222 (formal_parameter_list:): Fixed typos.
15223 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
15224 element. Improved error handling.
15225 (block_statement:): Call end_class_declaration.
15226 (anonymous_class_creation:): Likewise.
15227 (create_anonymous_class): Fixed comments.
15228 (create_class): Call add_inner_class_fields.
15229 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
15230 (method_header): Use MARK_FINAL_PARMS.
15231 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
15232 (method_declarator): Propagate final argument flag.
15233 (craft_constructor): New local `artificial'. Call
15234 build_alias_initializer_parameter_list. Use
15235 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
15236 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
15237 necessary.
15238 (complete_expand_class): Get rid of unused outer context local
15239 alias fields.
15240 (java_complete_expand_methods): Fixed leading
15241 comment. Generate/pre-expand <clinit> first. Changed method
15242 expansion order to regular, $finit$, constructors, <clinit>.
15243 (java_complete_expand_method): Set current_function_decl.
15244 (fix_constructors): Fix constructor parameter list to account for
15245 outer context local alias initializers.
15246 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15247 (resolve_expression_name): Lookup outer context local aliases. New
15248 local `access', use it.
15249 (patch_method_invocation): Patch inner class ctor invocation with
15250 outer context local aliases initialization values. $finit$
15251 invocation patching now includes things generated with
15252 build_alias_initializer_parameter_list.
15253 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15254 (build_super_invocation): Likewise.
15255 (patch_assignment): Changed comment.
15256
15257 2000-01-27 Andrew Haley <aph@cygnus.com>
15258
15259 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
15260 (emit_if): Ditto.
15261 (emit_jsr): Ditto.
15262
15263 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15264
15265 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
15266 concatenation.
15267 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
15268
15269 * parse.y (register_fields): Don't pass a format specifier to
15270 OBSOLETE_MODIFIER_WARNING.
15271 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
15272 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
15273 specifier.
15274 (check_modifiers): Change function into a macro.
15275 (check_class_interface_creation): Pass a literal format string.
15276
15277 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15278
15279 * buffer.h: PROTO -> PARAMS.
15280 * check-init.c: Likewise.
15281 * class.c: Likewise.
15282 * constants.c: Likewise.
15283 * convert.h: Likewise.
15284 * decl.c: Likewise.
15285 * except.c: Likewise.
15286 * expr.c: Likewise.
15287 * gjavah.c: Likewise.
15288 * java-except.h: Likewise.
15289 * java-tree.h: Likewise.
15290 * jcf-depend.c: Likewise.
15291 * jcf-dump.c: Likewise.
15292 * jcf-parse.c: Likewise.
15293 * jcf-path.c: Likewise.
15294 * jcf-reader.c: Likewise.
15295 * jcf-write.c: Likewise.
15296 * jcf.h: Likewise.
15297 * jv-scan.c: Likewise.
15298 * jvgenmain.c: Likewise.
15299 * jvspec.c: Likewise.
15300 * lang.c: Likewise.
15301 * lex.c: Likewise.
15302 * lex.h: Likewise.
15303 * parse-scan.y: Likewise.
15304 * parse.h: Likewise.
15305 * parse.y: Likewise.
15306 * typeck.c: Likewise.
15307 * verify.c: Likewise.
15308 * xref.c: Likewise.
15309 * xref.h: Likewise.
15310 * zextract.c: Likewise.
15311 * zipfile.h: Likewise.
15312
15313 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15314
15315 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15316 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
15317 * constants.c (build_constant_data_ref): Check for cached
15318 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
15319 in TYPE_CPOOL_DATE_REF.
15320 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
15321 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
15322 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
15323 (LOCAL_FINAL): New macro.
15324 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
15325 constant pool -- don't try to reuse.
15326 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
15327 TYPE_LANG_SPECIFIC.
15328 (find_in_current_zip): Use TYPE_JCF.
15329 * parse.h (java_check_final): Prototype removed.
15330 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
15331 (maybe_create_class_interface_decl,
15332 check_class_interface_creation): Likewise.
15333 (java_expand_finals): Function removed.
15334 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
15335 (block_statement:): Fixed comment.
15336 (anonymous_class_creation:): Likewise.
15337 (check_class_interface_creation): Reversed Jan 12, 2000 extra
15338 argument patch.
15339 (check_class_interface_creation): Loosened error report on (inner)
15340 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
15341 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
15342 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
15343 argument patch.
15344 (create_interface): Likewise.
15345 (anonymous_class_counter): New static global.
15346 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
15347 patch. Fixed comments.
15348 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
15349 anonymous_class_counter when declaring a toplevel class.
15350 (craft_constructor): Fixed constructor name when handling
15351 anonymous classes. Anonymous class constructors to feature hidden
15352 this$<n> parameter.
15353 (java_fix_constructors): Added comment.
15354 (java_check_final): Function removed.
15355 (java_complete_expand_methods): Fixed comment. Don't generate
15356 class data, save its outgoing constant pool instead.
15357 (verify_constructor_super): Skip anonymous class constructor
15358 hidden this$<n> parameter.
15359 (java_expand_classes): New local `saved_ctxp'. Removed call to
15360 java_expand_finals and java_check_final. Expand anonymous class
15361 constructors. Generate class data.
15362 (build_super_invocation): Skip anonymous class hidden this$<n>
15363 parameter.
15364 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
15365 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15366 (set_java_signature): Likewise.
15367
15368 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
15369
15370 * gjavah.c: Delete ACC_VISIBILITY define.
15371 * jcf.h: Add ACC_VISIBILITY define.
15372 * parse.y: final: rule tagged <value>.
15373 (java_check_regular_methods): Use ACC_VISIBILITY define for
15374 default package access check.
15375 (local_variable_declaration_statement): Use final: rule.
15376
15377 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
15378
15379 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
15380 (final:): New rule.
15381
15382 2000-01-17 Tom Tromey <tromey@cygnus.com>
15383
15384 * gjavah.c (print_field_info): Allow non-static final fields.
15385
15386 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15387
15388 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
15389 * parse.y (patch_anonymous_class): New function.
15390 (create_anonymous_class): Register incomplete type when the
15391 class/interface to extends/implement isn't known yet.
15392 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
15393 (verify_constructor_super): Tuned error message.
15394
15395 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15396
15397 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
15398 (ANONYMOUS_CLASS_P): New macro.
15399 (TYPE_SIGNATURE, TYPE_JCF): New macros.
15400 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
15401 * parse.y (create_class): Added leading argument.
15402 (maybe_create_class_interface_decl,
15403 check_class_interface_creation): Likewise.
15404 (craft_constructor): New function.
15405 (verify_constructor_super): Added argument in prototype.
15406 (class_declaration:): Inserted leading argument.
15407 (for_begin:): Use FOR_LOOP_P.
15408 (anonymous_class_creation): Create WFL of the anonymous class to
15409 instantiate. Call build_new_invocation. Added comments.
15410 (check_class_interface_creation): Handle parameter `anonymous' in
15411 verbose mode class creation announce.
15412 (link_nested_class_to_enclosing): Exclude anonymous classes.
15413 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
15414 anonymous class, even though they appear to have an enclosing
15415 context.
15416 (create_interface): Pass extra argument to
15417 check_class_interface_creation.
15418 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
15419 (create_class): Call check_class_interface_creation and
15420 maybe_create_class_interface_decl with extra new argument. Don't
15421 add private this$<n> to anonymous classes.
15422 (method_declarator): Insert hidden this$<n> to anonymous class
15423 constructors.
15424 (java_fix_constructors): Deleted code creating default
15425 constructor. Call craft_constructor instead.
15426 (java_check_regular_methods): Set `saw_constructor' to 1 for
15427 anonymous classes.
15428 (fix_constructors): Pass extra argument to verify_constructor_super.
15429 (verify_constructor_super): New local `sdecl', use it. Search for
15430 matching constructor (possibly featuring arguments) in super
15431 class.
15432 (lookup_method_invoke): Craft constructor according to arguments
15433 list when dealing with anonymous class constructors.
15434 (build_super_invocation): Pass arguments to anonymous class super
15435 constructors.
15436 (search_loop): Use FOR_LOOP_P.
15437 (labeled_block_contains_loop_p): Likewise.
15438
15439 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15440
15441 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
15442 (enclosing_context_p): New function.
15443 (get_access_flags_from_decl): Handle CLASS_STATIC.
15444 (maybe_layout_super_class): Extra first argument passed to
15445 do_resolve_class.
15446 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
15447 ID_INIT_P.
15448 * decl.c (access0_identifier_node): New global.
15449 (init_decl_processing): access0_identifier_node initialized.
15450 (pushdecl): Set DECL_CONTEXT only on non type decls.
15451 * expr.c (lookup_field): Lookup inner class fields in enclosing
15452 contexts.
15453 (expand_invoke): Use ID_INIT_P.
15454 (expand_java_field_op): Use DECL_CLINIT_P.
15455 * java-tree.def (CLASS_LITERAL): New tree code.
15456 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
15457 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
15458 (struct lang_decl): New field `inner_access'.
15459 (enclosing_context_p): Prototyped.
15460 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
15461 ID_CLINIT_P): New macros.
15462 (CLASS_STATIC): New macro.
15463 (CLASS_ACCESS0_GENERATED_P): New macro.
15464 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
15465 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
15466 INNER_CLASS_P): New macros.
15467 (DECL_INNER_CLASS_LIST): New macro.
15468 * jcf-parse.c (yyparse): Avoid the use of ANSI string
15469 concatenation.
15470 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15471 the shift value to int. Fixed typo in comment.
15472 * lex.c (inst_id, wpv_id): Initialize.
15473 * mangle.c (unicode_mangling_length): Take `$' into account.
15474 * parse.h (DRECOVER, RECOVER): Terminate properly.
15475 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
15476 (typedef struct _jdep): New field `enclosing'.
15477 (JDEP_ENCLOSING): New macro.
15478 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
15479 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
15480 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
15481 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
15482 GET_ENCLOSING_CPC_CONTEXT): New macros.
15483 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
15484 (do_resolve_class): Added extra argument in prototype.
15485 * parse.y (resolve_class): Added extra argument in prototype.
15486 (maybe_create_class_interface_decl): Likewise.
15487 (maybe_use_access_method, build_wfl_wrap): New functions.
15488 (java_complete_expand_classes, java_complete_expand_class):
15489 Likewise.
15490 (java_parser_context_push_initialized_field,
15491 java_parser_context_suspend, java_parser_context_resume):
15492 Likewise.
15493 (maybe_make_nested_class_name, make_nested_class_name,
15494 set_nested_class_simple_name_value,
15495 link_nested_class_to_enclosing, find_as_inner_class,
15496 find_as_inner_class_do, check_inner_class_redefinition,
15497 build_thisn_assign, build_current_thisn, build_access_to_thisn,
15498 maybe_build_thisn_access_method, build_outer_field_access,
15499 build_outer_field_access_methods, build_outer_field_access_expr,
15500 build_outer_method_access_method, build_new_access_id,
15501 build_outer_field_access_method, outer_field_access_p,
15502 outer_field_expanded_access_p, outer_field_access_fix,
15503 build_incomplete_class_ref, patch_incomplete_class_ref,
15504 create_anonymous_class): Likewise.
15505 (inst_id, wpv_id): New static global variables.
15506 (synchronized:): New rule, tagged <node>.
15507 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
15508 rules.
15509 (anonymous_class_creation:): New rule, tagged <node>.
15510 (NEW_TK): Tagged <node>.
15511 (type_literals, array_type_literal): New rules, tagged <node>.
15512 (class_declaration:): Removed action when reducing by class_body:
15513 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
15514 using GET_CPC in sub-rules.
15515 (class_member_declaration): Handle inner classes.
15516 (method_declaration): When reducing method_header:, reset
15517 current_function_decl when appropriate.
15518 (method_declarator:): Set the number of formal parameter to 0 for
15519 method declared without arguments.
15520 (constructor_declarator:): Likewise.
15521 (static_initializer:): List of elements kept in a list.
15522 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
15523 use of the keyword `static' for type declarations.
15524 (block_statement:): Handle inner class declarations.
15525 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
15526 type qualified `this'.
15527 (class_instance_creation_expression): Use anonymous_class_creation:
15528 to handle inner class instances creation. Handle qualified `new'.
15529 (something_dot_new): Added appropriate actions.
15530 (create_new_parser_context): New function.
15531 (java_push_parser_context, java_parser_context_save_global,
15532 java_parser_context_suspend): Use create_new_parser_context.
15533 (check_modifiers): Changed leading comment.
15534 (check_class_interface_creation): Handle interclasses.
15535 (add_superinterfaces): Fixed comment.
15536 (create_interface): Build qualified name from the raw_name instead
15537 of its matching WFL. Push the initialized fields list. raw_name added
15538 as an extra argument to maybe_create_class_interface_decl.
15539 (create_class): Build qualified name from the raw_name instead of
15540 its matching WFL. Removed assignment to current_parsed_class_un.
15541 Call PUSH_ERROR before returning an error. Suspend the current
15542 parser context when processing an inner class. Push the
15543 initialized fields list. raw_name added as an extra argument to
15544 maybe_create_class_interface_decl. Add the private this$<n>
15545 field.
15546 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
15547 (register_fields): Get the class type from GET_CPC and handle
15548 previous errors. Added code to handle the creation of static
15549 fields in inner classes. Initialized fields initialization
15550 statements kept in a list of lists.
15551 (maybe_generate_finit): Initialized fields initialization
15552 statements kept in a list of lists. Use GET_CPC.
15553 (maybe_generate_clinit): Likewise.
15554 (method_header): Use GET_CPC and GET_CPC_UN.
15555 (parser_qualified_classname): Handle inner classes.
15556 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
15557 (java_fix_constructors): Hide pointer to enclosing context
15558 instance in constructor list when dealing with inner classes.
15559 (jdep_resolve_class): Call resolve_class with extra first argument
15560 JDEP_ENCLOSING.
15561 (resolve_class): Add enclosing context as a first extra argument
15562 to do_resolve_class.
15563 (do_resolve_class): Call find_as_inner_class. Handle WFLs
15564 properly.
15565 (resolve_no_layout): Extra argument added to resolve_class
15566 invocation.
15567 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
15568 (java_get_real_method_name): Use GET_CPC_UN.
15569 (check_abstract_method_definitions): Use DECL_CLINIT_P.
15570 (java_check_abstract_methods): Handle static method declared in
15571 inner classes by an error.
15572 (java_check_regular_methods): Use DECL_CLINIT_P.
15573 (source_start_java_method): Also set DECL_MAX_LOCALS.
15574 (create_artificial_method): Call java_parser_context_save_global
15575 and java_parser_context_restore_global instead of saving/restoring
15576 the context by hand.
15577 (expand_start_java_method): Improved verbose mode message.
15578 (java_complete_expand_methods): Fixed leading comment. Use
15579 DECL_CLINIT_P.
15580 (fix_constructors): Added assignment to this$<n> if necessary.
15581 (java_expand_classes): Call java_complete_expand_classes instead
15582 of java_complete_expand_methods.
15583 (make_qualified_primary): Simplified.
15584 (merge_qualified_name): Optimized for missing left or right parts.
15585 (resolve_expression_name): Handle access to outer class fields from
15586 interclasses.
15587 (resolve_qualified_expression_name): New macro
15588 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15589 classes. Report error on non appropriate qualification of
15590 `new'. Handle qualified `this'.
15591 (not_accessible_p): Allow access to outer class private fields from
15592 inner classes.
15593 (patch_method_invocation): Handle method invocations through
15594 access methods and inner class constructor invocations.
15595 (find_applicable_accessible_methods_list): Search enclosing
15596 contexts of an inner class.
15597 (search_applicable_methods_list): Fixed typo.
15598 (argument_types_convertible): Handle inner class constructors'
15599 hidden outer context reference argument.
15600 (qualify_ambiguous_name): Handle qualified `this'.
15601 (java_complete_lhs): Handle use of field accessed through
15602 artificial access methods in various cases of assignments. Handle
15603 CLASS_LITERAL node.
15604 (check_final_assignment): Use DECL_CLINIT_P.
15605 (valid_ref_assignconv_cast_p): Handle the destination being an
15606 enclosing context of the source.
15607 (patch_unaryop): Handle use of field accessed through artificial
15608 access methods.
15609 (patch_return): Use DECL_CLINIT_P.
15610 (patch_throw_statement): Use DECL_CLINIT_P.
15611 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15612 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15613 ID_INIT_P.
15614
15615 2000-01-16 Anthony Green <green@cygnus.com>
15616
15617 * parse.y (build_string_concatenation): Only use
15618 StringBuffer(String) shortcut if String arg is constant.
15619
15620 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15621
15622 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15623 the shift value to int. Fixed typo in comment.
15624
15625 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
15626
15627 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15628 * jcf-write.c: Likewise.
15629 * parse.y: Likewise.
15630 * parse.c: Regenerate.
15631
15632 2000-01-09 Anthony Green <green@cygnus.com>
15633
15634 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15635 bytecodes in the correct order.
15636
15637 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15638
15639 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15640
15641 2000-01-06 Anthony Green <green@cygnus.com>
15642
15643 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15644 before building constant array decl.
15645
15646 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
15647
15648 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15649 method invocation and typo in conditional expression.
15650 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15651 the appropriate NOTE_POP.
15652 * parse.y (patch_binop): Shift value mask to feature the right
15653 type.
15654
15655 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15656
15657 * class.c (assume_compiled, assume_compiled_node): Add static
15658 prototype.
15659 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15660
15661 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15662
15663 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15664
15665 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15666 to `__modifier' to avoid stringifying it.
15667
15668 * parse.y (verify_constructor_circularity): Don't call a variadic
15669 function with a non-literal format string.
15670 (java_check_abstract_methods): Move unreachable code inside
15671 `continue' statement.
15672 (lookup_method_invoke): Call xstrdup, not strdup.
15673
15674 * expr.c (expand_java_field_op): Avoid the use of ANSI string
15675 concatenation.
15676
15677 * jcf-parse.c (yyparse): Likewise.
15678
15679 * jv-scan.c (main): Likewise.
15680
15681 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15682
15683 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15684 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15685 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15686 concatenation.
15687
15688 * parse.y (synchronized, variable_redefinition_error,
15689 check_class_interface_creation, create_interface, create_class,
15690 method_header, finish_method_declaration,
15691 check_modifiers_consistency, method_declarator,
15692 complete_class_report_errors, check_abstract_method_definitions,
15693 java_check_regular_methods, check_throws_clauses,
15694 java_check_abstract_methods, read_import_dir,
15695 check_pkg_class_access, declare_local_variables, fix_constructors,
15696 cut_identifier_in_qualified, resolve_expression_name,
15697 resolve_qualified_expression_name, patch_method_invocation,
15698 java_complete_lhs, patch_assignment, try_builtin_assignconv,
15699 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15700 patch_exit_expr, patch_exit_expr, patch_switch_statement,
15701 patch_try_statement, patch_synchronized_statement,
15702 patch_throw_statement, check_thrown_exceptions,
15703 patch_conditional_expr): Likewise.
15704
15705 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15706
15707 * Makefile.in (LIBDEPS): Added gcc's errors.o
15708 (../jcf-dump$(exeext):): Link with gcc's errors.o
15709 (../gcjh$(exeext):): Likewise.
15710 * expr.c (expand_java_NEW): Layout the entire target type instead of
15711 laying out its methods only.
15712 (lookup_field): Layout the class after having loaded it.
15713 * java-tree.h (java_debug_context): Declared.
15714 * jcf-io.c (toplev.h): Included.
15715 (find_class): Removed assignment to jcf's outofsynch
15716 field. Force source file to be read if newer than its matching
15717 class file. Tweaked debug messages.
15718 * jcf-parse.c (jcf_out_of_synch): Deleted.
15719 (read_class): Call to jcf_out_of_synch removed.
15720 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15721 (jcf_out_of_synch): Prototype deleted.
15722 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15723 `deprecated' and `class_err': integer turned into bit-fields.
15724 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15725 * parse.y (package_list): New global.
15726 (package_declaration:): Record newly parsed package name.
15727 (extra_ctxp_pushed_p): Static global deleted.
15728 (java_parser_context_save_global): Create buffer context for the
15729 purpose of saving globals, if necessary.
15730 (java_parser_context_restore_global): Pop context pushed for the
15731 purpose of saving globals, if necessary.
15732 (java_debug_context_do): New prototype and function.
15733 (java_debug_context): Likewise.
15734 (do_resolve_class): Use already parsed package names to qualify
15735 and lookup class candidate.
15736 (java_pre_expand_clinit): Removed unnecessary local variable.
15737
15738 1999-12-17 Tom Tromey <tromey@cygnus.com>
15739
15740 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
15741 fixes PR gcj/119.
15742 (process_file): Use `\n\' at end of each line in string.
15743
15744 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15745
15746 * expr.c (expand_invoke): Layout the loaded class before
15747 attempting to use it.
15748 (expand_java_field_op): Allow final field assignments to take
15749 place in $finit$.
15750 * typeck.c (convert): Return error_mark_node if expr is null.
15751
15752 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15753
15754 * class.c (class_depth): Return -1 if the class doesn't load
15755 properly.
15756 * expr.c (can_widen_reference_to): Check for errors during depth
15757 computation and return 0 accordingly.
15758 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15759 create default constructors and add an other error check.
15760 * parse.h (java_fix_constructors): Prototyped.
15761 * parse.y (java_pre_expand_clinit): Likewise.
15762 (build_super_invocation): Re-prototyped to feature one argument.
15763 (java_check_circular_reference): Directly use `current'.
15764 (java_fix_constructors): New function.
15765 (java_check_regular_methods): Don't create default constructors
15766 here, but abort if none were found.
15767 (java_complete_expand_methods): Pre-process <clinit> calling
15768 java_pre_expand_clinit.
15769 (java_pre_expand_clinit): New function.
15770 (fix_constructors): build_super_invocation invoked with the
15771 current method declaration as an argument.
15772 (build_super_invocation): Use the context of the processed method
15773 decl argument instead of current_class.
15774 * typeck.c (lookup_java_method): Take WFLs in method names into
15775 account.
15776
15777 1999-12-14 Per Bothner <per@bothner.com>
15778
15779 * class.c (make_class_data): flag_keep_inline_functions to keep
15780 private methods in the method array.
15781
15782 1999-12-15 Anthony Green <green@cygnus.com>
15783
15784 * check-init.c (check_init): Take into account both types of
15785 `throw's when checking for uninitialized variables.
15786
15787 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15788
15789 * parse.y (java_complete_lhs): Force conversion of array
15790 dimensions to int_type_node, that's what runtime's ABI expects.
15791
15792 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15793
15794 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15795 operand of a WFL, until the Java front-end gets fixed with regard
15796 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15797
15798 1999-12-10 Andrew Haley <aph@cygnus.com>
15799
15800 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15801 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15802 expr.c (build_java_athrow): Add support for sjlj-exceptions.
15803 java-tree.h: Ditto.
15804 jcf-write.c: Ditto.
15805
15806 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
15807
15808 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15809 before calling expand_eh_region_start and expand_start_all_catch.
15810 * except.c (expand_start_java_handler): Switch to permanent
15811 obstack before calling expand_eh_region_start.
15812 (expand_end_java_handler): Switch to permanent obstack before
15813 calling expand_start_all_catch.
15814
15815 1999-12-5 Anthony Green <green@cygnus.com>
15816
15817 * decl.c (init_decl_processing): Mark throw_node as a noreturn
15818 function with side effects.
15819 (init_decl_processing): Mark all memory allocating DECLs with
15820 DECL_IS_MALLOC.
15821
15822 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15823
15824 * except.c (expand_end_java_handler): Call
15825 expand_resume_after_catch and end_catch_handler.
15826
15827 1999-11-30 Anthony Green <green@cygnus.com>
15828
15829 * verify.c (verify_jvm_instructions): Create new return label
15830 chain if non existent (don't rely on the verified state of the jsr
15831 target.)
15832
15833 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15834
15835 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15836 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15837
15838 * parse.y (patch_assignment): Removed bogus final class test on
15839 lhs when checking on whether to emit an ArrayStoreException runtime
15840 check.
15841 * expr.c (expand_java_arraystore): Likewise.
15842
15843 1999-11-28 Anthony Green <green@cygnus.com>
15844
15845 * decl.c (find_local_variable): Reuse single slot decls when
15846 appropriate.
15847
15848 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15849
15850 * jcf-parse.c (saw_java_source): Global variable removed.
15851 (read_class): Don't use `saw_java_source'. Added extra braces.
15852 (yyparse): Code setting `saw_java_source' removed.
15853
15854 1999-11-24 Mark Mitchell <mark@codesourcery.com>
15855
15856 * except.c (emit_handlers): Zero catch_clauses after emitting them.
15857
15858 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15859
15860 * verify.c (merge_type_state): Non verified subroutines being
15861 considered more than once to trigger passive type merge.
15862
15863 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15864
15865 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15866 in case of error. Error message tuned.
15867
15868 1999-11-21 Anthony Green <green@cygnus.com>
15869
15870 * constants.c (find_methodref_index): Unwrap method names before
15871 inserting them in the constant pool.
15872
15873 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15874
15875 * class.c (assume_compiled_node): New typedef.
15876 (assume_compiled_tree): New static data.
15877 (find_assume_compiled_node): New function.
15878 (add_assume_compiled): New function.
15879 (assume_compiled): New function.
15880 * class.c (make_class_data): Use assume_compiled.
15881 (is_compiled_class): Use assume_compiled.
15882
15883 * java-tree.h (add_assume_compiled): Declare.
15884
15885 * lang.c (lang_decode_option): Parse new options.
15886
15887 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15888
15889 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15890 int_type_node: that's what `_Jv_AllocObject' expects.
15891
15892 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15893
15894 * parse.y (lookup_method_invoke): Use lang_printable_name to
15895 reliably build the type name during error report. Fixes PR gcj/97.
15896
15897 1999-11-09 Tom Tromey <tromey@cygnus.com>
15898
15899 * jcf-path.c: Include <sys/stat.h>.
15900 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
15901 (DIR_UP): New macro.
15902
15903 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15904
15905 * parse.y (source_end_java_method): Resume permanent allocation,
15906 reversing Apr 27 1998 patch.
15907 (patch_string_cst): Pop obstacks after having pushed the permanent
15908 ones.
15909
15910 1999-11-05 Tom Tromey <tromey@cygnus.com>
15911
15912 * class.c (finish_class): Emit inlined methods if any native
15913 methods exist in the class. Fixes PR gcj/85.
15914
15915 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
15916
15917 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15918 (qualify_ambiguous_name): Likewise.
15919
15920 1999-11-03 Godmar Back <gback@cs.utah.edu>
15921
15922 * typeck.c: (lookup_java_method): search all inherited
15923 interfaces when looking up interface method.
15924
15925 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15926
15927 * parse.y (method_header:): Issue error message for rule `type
15928 error'.
15929 (synchronized:): Error report when not using synchronized.
15930
15931 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15932
15933 * parse.y (resolve_qualified_expression_name): Prevent `this' from
15934 being used before the superclass constructor has been called.
15935 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
15936 instead of `CALL_THIS_CONSTRUCTOR_P'.
15937
15938 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
15939
15940 * check-init.c: Fix typo in comment.
15941
15942 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15943
15944 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
15945 and final method.
15946
15947 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15948
15949 * parse.y (expression_statement:): Call function to report
15950 improper invocation of a constructor.
15951 (parse_ctor_invocation_error): New function.
15952
15953 1999-10-26 Mark Mitchell <mark@codesourcery.com>
15954
15955 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15956 remember_end_note.
15957
15958 1999-10-21 Tom Tromey <tromey@cygnus.com>
15959
15960 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15961 in generated `main'.
15962
15963 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
15964
15965 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15966 (qualify_ambiguous_name): Likewise.
15967
15968 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15969
15970 * parse.y (java_complete_tree): fold_constant_for_init to work on
15971 permanent_obstack.
15972 (java_complete_lhs): Likewise.
15973 (array_constructor_check_entry): Complete an initializer element
15974 on permanent_obstack.
15975
15976 1999-10-19 Tom Tromey <tromey@cygnus.com>
15977
15978 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15979 From Mike Moreton <mike@pillim.demon.co.uk>.
15980
15981 1999-10-15 Greg McGary <gkm@gnu.org>
15982
15983 * java-tree.h (flag_bounds_check): Remove extern decl.
15984 * lang.c (flag_bounds_check): Remove global variable.
15985 (lang_f_options): Remove "bounds-check" entry.
15986 (lang_init_options): Default flag_bounds_check to "on".
15987
15988 1999-10-14 Tom Tromey <tromey@cygnus.com>
15989
15990 * jvgenmain.c (usage): New function.
15991 (main): Use it. Also, handle `-D' options.
15992 * jvspec.c (lang_specific_driver): Recognize -D.
15993 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
15994
15995 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
15996
15997 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15998
15999 * jcf-dump.c (print_constant, disassemble_method): Don't call a
16000 variadic function with a non-literal format string.
16001
16002 * parse-scan.y (report_main_declaration): Likewise.
16003
16004 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
16005
16006 * parse.y (read_import_dir, patch_assignment, patch_binop,
16007 patch_array_ref): Likewise.
16008
16009 * typeck.c (build_java_array_type): Likewise.
16010
16011 * verify.c (verify_jvm_instructions): Likewise.
16012
16013 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16014
16015 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
16016
16017 1999-10-07 Anthony Green <green@cygnus.com>
16018
16019 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
16020 where CHECK_PUT may fail for valid reasons.
16021
16022 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
16023 UNSAFE_PUTN): New macros.
16024
16025 1999-10-04 Tom Tromey <tromey@cygnus.com>
16026
16027 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
16028 well. Fixes Java PR gcj/59.
16029 * parse-scan.y (yyerror): Report errors.
16030
16031 1999-09-24 Glenn Chambers <GChambers@provsol.com>
16032
16033 * decl.c (insert_block): Remove unconditional `abort'.
16034
16035 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
16036
16037 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
16038 FUNCTION_CODE now of type int. All callers changed.
16039 Set the builtin's DECL_BUILT_IN_CLASS.
16040
16041 1999-09-23 Tom Tromey <tromey@cygnus.com>
16042
16043 * jvspec.c (lang_specific_driver): Don't read spec file if
16044 -fsyntax-only given.
16045
16046 1999-09-22 Tom Tromey <tromey@cygnus.com>
16047
16048 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
16049
16050 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
16051 (WORDS_TO_LONG): Likewise.
16052 (WORDS_TO_DOUBLE): Likewise.
16053
16054 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16055
16056 * jcf-write.c (RELOCATION_VALUE_0): New macro.
16057 (RELOCATION_VALUE_1): Likewise.
16058 (emit_iinc, emit_reloc, push_constant1, push_constant2,
16059 push_in_const, push_long_const): Prototyped.
16060 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
16061 (push_constant2): Likewise.
16062 (push_int_const): Cast find_constant1's integer arguments to `jword'.
16063 (find_constant_wide): Cast find_constant2's integer arguments to
16064 `jword'.
16065 (find_constant_index): Cast find_constant2's and find_constant2's
16066 integer arguments to `jword'.
16067 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
16068 (emit_switch_reloc): Use RELOCATION_VALUE_0.
16069 (emit_if): Use RELOCATION_VALUE_1.
16070 (emit_goto): Likewise.
16071 (emit_jsr): Likewise.
16072 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
16073 argument to push_long_const to HOST_WIDE_INT.
16074
16075 1999-09-15 Andreas Schwab <schwab@suse.de>
16076
16077 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
16078
16079 1999-09-20 Nick Clifton <nickc@cygnus.com>
16080
16081 * lang.c (lang_decode_option): Extend comment.
16082
16083 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16084
16085 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
16086 instead of fndecl.
16087
16088 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16089
16090 * gjavah.c (get_field_name, print_method_info, print_include,
16091 add_namelet): Use xmalloc, not malloc.
16092
16093 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
16094 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
16095 NULL pointer.
16096
16097 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
16098
16099 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
16100
16101 * jcf-path.c (add_entry): Likewise.
16102
16103 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
16104
16105 * jv-scan.c (xmalloc): Remove definition.
16106
16107 * jvgenmain.c (xmalloc): Likewise.
16108
16109 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
16110
16111 * lex.c (java_store_unicode): Use xrealloc, not realloc.
16112
16113 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
16114 concat, not xmalloc/sprintf.
16115 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
16116 (xstrdup): Remove definition.
16117
16118 * parse.y (duplicate_declaration_error_p,
16119 constructor_circularity_msg, verify_constructor_circularity,
16120 check_abstract_method_definitions, java_check_regular_methods,
16121 java_check_abstract_methods, patch_method_invocation,
16122 check_for_static_method_reference, patch_assignment, patch_binop,
16123 patch_cast, array_constructor_check_entry, patch_return,
16124 patch_conditional_expr): Use xstrdup, not strdup.
16125
16126 * zextract.c (ALLOC): Use xmalloc, not malloc.
16127
16128 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16129
16130 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
16131
16132 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
16133 (do_spec, lang_specific_pre_link, lang_specific_driver,
16134 input_filename, input_filename_length): Don't declare.
16135 (main_class_name, jvgenmain_spec, lang_specific_driver):
16136 Constify a char*.
16137 (lang_specific_driver): All calls to the function pointer
16138 parameter now explicitly call `fatal'.
16139
16140 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16141
16142 * parse.y (find_applicable_accessible_methods_list): Search
16143 abstract classes as interfaces.
16144
16145 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
16146
16147 * class.c (finish_class): We're now outside a valid method
16148 declaration. Tell the rest of gcc so.
16149
16150 1999-09-08 Bruce Korb autogen@linuxbox.com
16151
16152 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
16153
16154 1999-09-07 Tom Tromey <tromey@cygnus.com>
16155
16156 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
16157 java-array.h.
16158 (decode_signature_piece): Don't emit "::" in JArray<>.
16159 (print_namelet): Only print trailing `;' when printing a class.
16160
16161 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
16162
16163 * java-tree.h: Delete declarations for all tree nodes now moved to
16164 global_trees.
16165 * decl.c: Delete their definitions.
16166
16167 1999-09-04 Mark Mitchell <mark@codesourcery.com>
16168
16169 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
16170 * Makefile.in (OBJS): Add ggc-callbacks.o.
16171 (OBJDEPS): Likewise.
16172
16173 1999-09-03 Tom Tromey <tromey@cygnus.com>
16174
16175 * parse.y (strip_out_static_field_access_decl): Return operand if
16176 it satisfies JDECL_P.
16177
16178 1999-09-02 Tom Tromey <tromey@cygnus.com>
16179
16180 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
16181 Handle nested arrays, like `[[I'.
16182
16183 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16184
16185 * class.c (finish_class): Remove unused parameter, all callers
16186 changed.
16187
16188 * expr.c (build_java_athrow): Change return type to void.
16189 (java_lang_expand_expr): Make sure each case in switch returns a
16190 value.
16191
16192 * java-tree.h (finish_class): Fix prototype to take void args.
16193
16194 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
16195 (main): Issue return from main, not exit.
16196
16197 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
16198
16199 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
16200
16201 * jv-scan.c (main): Issue return from main, not exit.
16202
16203 * parse.y (check_abstract_method_definitions,
16204 java_check_abstract_method_definitions): Add static prototypes.
16205 (java_complete_expand_methods): Fix call to `finish_class'.
16206
16207 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
16208 and `prevpc'.
16209
16210 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16211
16212 * lang.c (language_string): Constify.
16213
16214 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16215
16216 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
16217 Remove hacks for stuff which comes from libiberty.
16218
16219 * Make-lang.in: Likewise.
16220
16221 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
16222
16223 * Makefile.in (xref.o): Depend on xref.c explicitly.
16224
16225 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16226
16227 * java-tree.h (lang_printable_name): Constify a char*.
16228
16229 * lang.c (lang_printable_name): Likewise.
16230
16231 1999-08-27 Jeffrey A Law (law@cygnus.com)
16232
16233 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
16234 comments in C code.
16235
16236 1999-08-26 Tom Tromey <tromey@cygnus.com>
16237
16238 * gjavah.c (print_cxx_classname): Print "::" before qualified
16239 name.
16240
16241 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16242
16243 * parse.y (lookup_cl): Changed leading comment. Now does its best
16244 to set the column number.
16245 (qualify_ambiguous_name): Take WFL wrappers into account.
16246
16247 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
16248
16249 * verify.c (verify_jvm_instructions): Don't check instruction
16250 validity beyond end of method.
16251
16252 1999-08-25 Tom Tromey <tromey@cygnus.com>
16253
16254 * jvspec.c (lang_specific_driver): Correctly handle --help again.
16255
16256 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16257
16258 * gjavah.c (print_name, print_base_classname, utf8_cmp,
16259 cxx_keyword_subst, generate_access, name_is_method_p,
16260 get_field_name, print_field_name, super_class_name, print_include,
16261 decode_signature_piece, print_class_decls, usage, help,
16262 java_no_argument, version, add_namelet, print_namelet): Add static
16263 prototype.
16264 (print_base_classname, utf8_cmp, cxx_keyword_subst,
16265 name_is_method_p): Constify a char*.
16266 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
16267 Provide a final else clause in an if-else-if.
16268 (print_field_info): Add missing final arg in function call to
16269 `print_field_name'.
16270 (print_method_info, decompile_method, decode_signature_piece,
16271 print_c_decl, print_full_cxx_name, print_stub,
16272 print_mangled_classname, super_class_name, print_include,
16273 add_namelet, add_class_decl, print_class_decls, process_file,
16274 help): Constify a char*.
16275
16276 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
16277 push_int_const, find_constant_wide, find_constant_index,
16278 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
16279 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
16280 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
16281 emit_if, emit_goto, emit_jsr, call_cleanups,
16282 make_class_file_name): Add static prototypes.
16283 (generate_bytecode_return, generate_bytecode_insns): Pass a
16284 NULL_PTR, not a NULL_TREE.
16285
16286 * jv-scan.c: Include "jcf.h".
16287 (main): Declare using DEFUN macro.
16288
16289 * jvspec.c (find_spec_file, lang_specific_pre_link,
16290 lang_specific_driver): Add prototypes.
16291 (find_spec_file): Constify a char*.
16292
16293 * keyword.gperf (hash, java_keyword): Add prototypes.
16294
16295 * lang.c (lang_print_error): Add static prototype.
16296 (lang_init): Prefer memcpy over bcopy to avoid casts.
16297
16298 * lex.c (yylex): Add static prototype.
16299
16300 * parse-scan.y: Include "lex.c" earlier.
16301
16302 * parse.h: Remove redundant declaration for `yylex'.
16303
16304 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
16305 labeled_block_contains_loop_p): Add static prototypes.
16306 (not_accessible_p): Make static to match prototype.
16307
16308 * verify.c (start_pc_cmp): Don't needlessly cast away const.
16309
16310 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16311
16312 * parse.y (check_method_redefinition): Changed leading comment.
16313 (check_abstract_method_definitions): New function.
16314 (java_check_abstract_method_definitions): New function.
16315 (java_check_regular_methods): Call it.
16316 (verify_constructor_super): Fixed indentation.
16317 (lookup_method_invoke): Likewise.
16318
16319 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16320
16321 * parse.y (method_header): Return a null pointer if the current
16322 class node is null.
16323 (finish_method_declaration): Return if the current function decl
16324 is null.
16325 (source_start_java_method): Likewise.
16326 (java_method_add_stmt): Likewise.
16327
16328 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16329
16330 * class.c (emit_register_class): Removed unnecessary call to
16331 start_sequence.
16332 * parse.y (labeled_block_contains_loop_p): Removed unused local
16333 variable.
16334
16335 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16336
16337 * parse.y (java_refold): Added prototype.
16338
16339 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16340
16341 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
16342 (java_stabilize_reference): Removed unnecessary `else'.
16343 (java_complete_lhs): Set flag to remember boolean. Call
16344 java_refold. Added comments.
16345 (java_decl_equiv): New function.
16346 (binop_compound_p): Likewise.
16347 (java_refold): Likewise.
16348 (patch_unaryop): Striped static field access assigned to decl and
16349 op. Changed promotion scheme for ++/-- operators.
16350 (search_loop): New function.
16351 (labeled_block_contains_loop_p): Likewise.
16352 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
16353 comment.
16354 (patch_bc_statement): Call search_loop. Fixed comment.
16355
16356 1999-08-14 Anthony Green <green@cygnus.com>
16357
16358 * expr.c (java_lang_expand_expr): Mark static array data as
16359 referenced.
16360
16361 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
16362
16363 * jvgenmain.c (main): NUL-terminate name_obstack.
16364
16365 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16366
16367 * check-init.c (check_bool2_init, done_alternative): Add static
16368 prototypes.
16369
16370 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
16371 (add_method, build_utf8_ref, build_class_ref,
16372 append_gpp_mangled_type, layout_class_method): Constify a char*.
16373
16374 * decl.c (push_promoted_type, make_binding_level): Add static
16375 prototypes.
16376 (push_promoted_type, pushdecl): Constify a char*.
16377
16378 * except.c (find_handler_in_range, link_handler,
16379 check_start_handlers): Add static prototypes.
16380
16381 * expr.c (process_jvm_instruction): Constify a char*.
16382
16383 * gjavah.c (main): Constify a char*.
16384
16385 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
16386 Constify a char*.
16387
16388 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
16389 static prototypes.
16390 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
16391 munge, print_ents): Constify a char*.
16392
16393 * jcf-dump.c (disassemble_method): Constify a char*.
16394 (print_constant_pool, print_exception_table): Add static prototypes.
16395 (print_constant, print_exception_table, main, disassemble_method):
16396 Constify a char*.
16397
16398 * jcf-io.c (find_classfile, find_class): Likewise.
16399
16400 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
16401 (set_source_filename, predefined_filename_p): Add static prototypes.
16402 (set_source_filename, get_constant, get_class_constant,
16403 find_in_current_zip): Constify a char*.
16404
16405 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
16406 static prototypes.
16407 (add_entry, add_path, jcf_path_classpath_arg,
16408 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16409
16410 * jcf-reader.c (get_attribute, jcf_parse_preamble,
16411 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
16412 jcf_parse_one_method, jcf_parse_methods,
16413 jcf_parse_final_attributes): Add static prototypes.
16414 (get_attribute): Constify a char*.
16415
16416 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
16417 jcf_dependency_add_target, jcf_path_classpath_arg,
16418 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16419
16420 * jv-scan.c (main): Constify a char*.
16421 (gcc_obstack_init): Add prototype arguments.
16422
16423 * jvgenmain.c (gcc_obstack_init): Likewise.
16424 (main): Constify a char*.
16425
16426 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
16427 static prototypes.
16428 (put_decl_string, lang_print_error): Constify a char*.
16429 (lang_init): Remove redundant extern prototype.
16430
16431 * mangle.c (emit_unicode_mangled_name): Constify a char*.
16432
16433 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
16434 Add static prototypes.
16435 (get_type_from_signature): Constify a char*.
16436
16437 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
16438 Add static prototypes.
16439 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
16440 (verify_jvm_instructions): Constify a char*.
16441
16442 * xref.c (xref_flag_value): Likewise.
16443
16444 * xref.h (xref_flag_value): Likewise.
16445
16446 * zextract.c (makeword, makelong): Add static prototypes.
16447 (makeword, makelong): Constify a uch*.
16448
16449 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16450
16451 * lang.c (java_dummy_print): Constify a char*.
16452 (lang_print_error): Likewise.
16453 (lang_init): Remove redundant prototype for `print_error_function'.
16454 (lang_init_source): Likewise.
16455 (lang_identify): Constify a char*.
16456
16457 1999-08-09 Tom Tromey <tromey@cygnus.com>
16458
16459 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
16460 (WORDS_TO_LONG): Likewise.
16461 (WORDS_TO_DOUBLE): Likewise.
16462
16463 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16464
16465 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
16466
16467 * expr.c (java_stack_pop, java_array_data_offset,
16468 build_java_throw_out_of_bounds_exception, case_identity,
16469 build_java_check_indexed_type): Add static prototypes.
16470 (linenumber_table, expand_invoke, expand_java_field_op,
16471 build_primtype_type_ref, expand_byte_code): Constify a char*.
16472
16473 * java-tree.h (build_primtype_type_ref, linenumber_table):
16474 Constify a char*.
16475 (java_lang_expand_expr): Add prototype.
16476
16477 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
16478 `java_lang_expand_expr'.
16479
16480 * lex.c (java_lex_error): Constify a char*.
16481 (java_get_unicode, java_read_char, java_allocate_new_line,
16482 java_unget_unicode, java_sneak_unicode): Prototype.
16483
16484 * parse-scan.y (current_class, package_name, method_declarator,
16485 report_class_declaration, yyerror): Constify a char*.
16486
16487 * parse.h (java_report_errors): Prototype.
16488 (yyerror): Constify a char*.
16489
16490 * parse.y (classitf_redefinition_error, check_modifiers,
16491 parse_jdk1_1_error, lookup_package_type,
16492 lookup_package_type_and_set_next, get_printable_method_name,
16493 purify_type_name): Constify a char*.
16494 (build_super_invocation, maybe_generate_finit,
16495 verify_constructor_super, parser_add_interface,
16496 add_superinterfaces, jdep_resolve_class, note_possible_classname,
16497 java_complete_expand_methods, java_expand_finals,
16498 cut_identifier_in_qualified, java_stabilize_reference,
16499 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
16500 merge_string_cste): Prototype.
16501 (single_type_import_declaration, yyerror,
16502 variable_redefinition_error, build_array_from_name,
16503 build_unresolved_array_type, check_class_interface_creation,
16504 resolve_class, complete_class_report_errors,
16505 note_possible_classname, read_import_dir,
16506 find_in_imports_on_demand, resolve_package, fix_constructors,
16507 check_deprecation, lookup_method_invoke,
16508 maybe_build_primttype_type_ref, array_constructor_check_entry):
16509 Constify a char*.
16510 (java_complete_expand_methods, java_expand_finals): Make static.
16511 (convert_narrow): Remove static prototype.
16512
16513 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
16514
16515 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
16516
16517 1999-08-02 Richard Henderson <rth@cygnus.com>
16518
16519 * decl.c: Include defaults.h instead of expr.h.
16520 * parse.y: Likewise.
16521
16522 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
16523
16524 * java/decl.c (start_java_method): Change all uses of
16525 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
16526 Ensure expr.h is included.
16527 * java/expr.c (pop_arguments): Ditto.
16528 * java/parse.y (expand_start_java_method): Ditto.
16529
16530 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16531
16532 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
16533
16534 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
16535
16536 * decl.c: Include "function.h".
16537 * except.c: Likewise.
16538 * parse.y: Likewise.
16539 * Makefile.in: Update dependencies.
16540
16541 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16542
16543 * expr.c (build_java_soft_divmod): Provide a default case in switch.
16544 (java_lang_expand_expr): Mark parameters `target', `tmode' and
16545 `modifier' with ATTRIBUTE_UNUSED.
16546
16547 * gjavah.c (process_file): Add braces around ambiguous `else'.
16548
16549 * jcf-dump.c (print_access_flags, localvar_free): Change return
16550 type to void.
16551
16552 * parse.y (java_complete_expand_method): Initialize variable
16553 `exception_copy'.
16554 (resolve_qualified_expression_name): Likewise for `field_decl'.
16555 (patch_method_invocation): Likewise for `class_to_search'.
16556 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
16557 (patch_assignment): Likewise for `lhs_type'.
16558
16559 * verify.c (verify_jvm_instructions): Remove unused variable
16560 `caller'.
16561
16562 1999-07-25 Richard Henderson <rth@cygnus.com>
16563
16564 * decl.c (va_list_type_node): New.
16565
16566 1999-07-25 Anthony Green <green@cygnus.com>
16567
16568 * gjavah.c (print_stub): New function.
16569 (METHOD_IS_NATIVE): New macro.
16570 (print_mangled_classname): Make static.
16571 (HANDLE_END_FIELD): Don't emit fields during stub generation.
16572 (process_file): Perform stub generation.
16573 (HANDLE_METHOD): Don't emit class decls during stub
16574 generation.
16575 (HANDLE_END_METHOD): Take into account stub generation.
16576 (print_method_info): Handle stub generation.
16577 (print_stub): New function.
16578 (print_cxx_classname): Make signature consistant with others.
16579 (help): Describe -stubs option.
16580 (main): Create stub file.
16581 (version): Use version.c.
16582 (print_full_cxx_name): New function.
16583 (print_c_decl): Use print_full_cxx_name.
16584
16585 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16586
16587 * check-init.c (check_init): Handle MAX_EXPR.
16588
16589 1999-07-15 Andrew Haley <aph@cygnus.com>
16590
16591 * lang.c (flag_use_divide_subroutine): New variable.
16592 * typeck.c: (convert_ieee_real_to_integer): Bounds check
16593 fp-to-integer conversion.
16594 (convert): Call convert_ieee_real_to_integer when flag_fast_math
16595 is not set.
16596
16597 * expr.c (build_java_soft_divmod): New function.
16598 (build_java_binop): Call build_java_soft_divmod if
16599 flag_use_divide_subroutine is set.
16600 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16601 soft_lrem_node: new builtin functions.
16602 (init_decl_processing) Initialize the new builtins.
16603 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16604 soft_lrem_node: new builtin functions.
16605 (build_java_soft_divmod): New function.
16606 * parse.y: Call build_java_soft_divmod if
16607 flag_use_divide_subroutine is set.
16608 * parse.c: Rebuilt.
16609
16610 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16611 a --specs= arg) even if not linking.
16612 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16613 -fuse-divide-subroutine
16614
16615 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16616
16617 * parse.y (resolve_and_layout): Check methods only once.
16618 (resolve_qualified_expression_name): Verify thrown exceptions
16619 compatibility.
16620 (check_thrown_exceptions): Reject exceptions thrown in
16621 initializer. Error message tuned.
16622
16623 1999-07-14 Andrew Haley <aph@cygnus.com>
16624
16625 * expr.c (expand_expr): Do not return the last statement in a
16626 block as the block's value.
16627
16628 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
16629
16630 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16631 CALL_EXPR, to avoid order of evaluation changes.
16632
16633 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
16634
16635 * parse.y (qualify_ambiguous_name): Do not use
16636 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16637
16638 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16639
16640 * check-init.c (check_init): Handle MAX_EXPR.
16641 * expr.c (force_evaluation_order): Force method call arguments to
16642 be evaluated in left-to-right order.
16643 * parse.y (qualify_ambiguous_name): Loop again to qualify
16644 NEW_ARRAY_EXPR properly.
16645
16646 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16647
16648 * parse.y (patch_invoke): Resolve unresolved invoked method
16649 returned type.
16650 (qualify_ambiguous_name): STRING_CST to qualify expression for
16651 type name resolution.
16652
16653 1999-06-24 Andrew Haley <aph@cygnus.com>
16654
16655 * class.c (finish_class): Whenever a deferred method is
16656 output, rescan the list of methods to see if a new candidate for
16657 output can be found.
16658
16659 1999-06-28 Tom Tromey <tromey@cygnus.com>
16660
16661 * jvspec.c (lang_specific_driver): Recognize --help.
16662
16663 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16664
16665 * parse.y (resolve_package): Fixed bogus return statement.
16666 (patch_method_invocation): Resolve method invocation beginning with
16667 a package name qualifier.
16668
16669 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16670
16671 * Make-lang.in (java.stage1): Depend on stage1-start.
16672 (java.stage2): Likewise for stage2-start.
16673 (java.stage3): Likewise for stage3-start.
16674 (java.stage4): Likewise for stage4-start.
16675
16676 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16677
16678 * parse.y (java_complete_lhs): When doing cross referencing, don't
16679 try to keep file location on a WFL expanded as a CALL_EXPR.
16680
16681 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16682
16683 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16684 compiling to class file a void method with an empty method body.
16685 As a side effect, the bytecode backend will generate the
16686 appropriate `return' instruction.
16687
16688 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16689
16690 * parse.y (lookup_package_type_and_set_next): New function prototype.
16691 (resolve_package): Search current and imported packages.
16692 (lookup_package_type_and_set_next): New function.
16693
16694 1999-06-22 Andrew Haley <aph@cygnus.com>
16695
16696 * verify.c (verify_jvm_instructions): Check for pending blocks
16697 before invalid PC test and opcode switch, not after.
16698
16699 1999-06-21 Andrew Haley <aph@cygnus.com>
16700
16701 * except.c (find_handler_in_range): The upper limit for exception
16702 ranges is exclusive, not inclusive: (start <= pc < end).
16703 (link_handler): find child pointer which points to outer by
16704 searching sibling list: previous code incorrectly assumed that
16705 outer->outer->first_child must point to outer.
16706 * verify.c (verify_jvm_instructions): FIXME added to code for
16707 `athrow'.
16708 (verify_jvm_instructions): Do not assume that the last block
16709 processed in a subroutine is a block which ends with a `ret'
16710 instruction. With some control flows it is possible that the last
16711 block ends with an `athrow'.
16712
16713 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16714
16715 * parse.y (qualify_ambiguous_name): Reorganized the post
16716 evaluation of non WFL leading expression nodes.
16717
16718 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16719
16720 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16721 CONVERT_EXPR.
16722
16723 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16724
16725 * parse.y (qualify_ambiguous_name): Handle qualified expression
16726 beginning with a STRING_CST.
16727
16728 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16729
16730 * parse.y (register_fields): Set DECL_INITIAL on both
16731 pre-initialized static and public fields.
16732 (resolve_field_access): Static field access expressions to always
16733 use pointer types.
16734 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16735 qualification. CONVERT_EXPR to be resolved as an expression name.
16736 (java_complete_lhs): Identify and access qualified final
16737 initialized field in switch statement case expression.
16738 (fold_constant_for_init): Pre-initialized field decl constant to
16739 be folded.
16740
16741 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
16742
16743 * parse.y (note_possible_classname): Mark returned node with
16744 QUALIFIED_P only if the original class name contained a '/'.
16745
16746 1999-06-05 Anthony Green <green@cygnus.com>
16747
16748 * Make-lang.in (gcjh): More parallel build fixes.
16749
16750 1999-06-03 Mike Stump <mrs@wrs.com>
16751
16752 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16753
16754 1999-06-02 Anthony Green <green@cygnus.com>
16755
16756 * except.c (link_handler): Chain exception handlers in order.
16757
16758 1999-06-02 Anthony Green <green@cygnus.com>
16759
16760 * expr.c (expand_byte_code): Fill unreachable bytecode regions
16761 with nops and process as usual in order to always set correct EH
16762 ranges. Emit detailed warnings about unreachable bytecodes.
16763
16764 1999-06-02 Anthony Green <green@cygnus.com>
16765
16766 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16767 constant.
16768
16769 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16770
16771 * parse.y (lookup_field_wrapper): Unified returned value to NULL
16772 or the searched field decl.
16773
16774 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16775
16776 * parse.y (fold_constant_for_init): Convert numerical constant
16777 values to the type of the assigned field.
16778
16779 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16780
16781 * expr.c (lookup_field): Relaxed the test on class loading error
16782 detection.
16783 * parse.y (fold_constant_for_init): Enabeled old code.
16784
16785 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16786
16787 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16788 decide the validity of the cast of a java.lang.Cloneable reference
16789 to an array.
16790 (patch_conditional_expr): Fixed first argument passed to
16791 binary_numeric_promotion.
16792
16793 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16794
16795 * parse.y (qualify_ambiguous_name): Take into account that a
16796 CONVERT_EXPR might specify a type as a WFL.
16797
16798 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16799
16800 * parse.y (patch_assignment): Save the rhs before using it as an
16801 argument to _Jv_CheckArrayStore.
16802
16803 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16804
16805 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16806
16807 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16808
16809 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16810 floating point literal only when the exponent indicator has been
16811 parsed.
16812
16813 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16814
16815 * parse.y (formal_parameter:): Construct argument tree list
16816 element even if a yet unsupported final parameter was encountered.
16817
16818 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16819
16820 * parse.y (finish_method_declaration): Issue errors for native or
16821 abstract methods declared with a method body, as well as for non
16822 native or non abstract methods with no method body.
16823
16824 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16825
16826 * class.c (build_utf8_ref): Initialize variable `field'.
16827
16828 * decl.c (init_decl_processing): Initialize variable `field'.
16829
16830 * expr.c (build_known_method_ref): Mark parameters `method_type',
16831 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16832 (process_jvm_instruction): Likewise for parameter `length'.
16833
16834 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16835 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16836 ATTRIBUTE_UNUSED.
16837
16838 * parse.y (maybe_generate_clinit): Remove unused variable
16839 `has_non_primitive_fields'.
16840 (find_in_imports_on_demand): Initialize variables `node_to_use'
16841 and `cl'.
16842 (patch_binop): Likewise for variable `prom_type'.
16843 (patch_unaryop): Likewise for variable `prom_type'.
16844
16845 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16846
16847 * xref.c (xref_table): Add missing initializer.
16848
16849 1999-05-14 Tom Tromey <tromey@cygnus.com>
16850
16851 * java-except.h (struct eh_range): Removed unused `next' member.
16852 * verify.c (verify_jvm_instructions): Call check_nested_ranges
16853 after adding all exception handlers. Sort exception ranges in
16854 order of start PC.
16855 (struct pc_index): New structure.
16856 (start_pc_cmp): New function.
16857 * except.c (add_handler): Return `void'. Don't call link_handler;
16858 instead construct an ordinary linked list and do range
16859 coalescing.
16860 (check_nested_ranges): New function.
16861 (link_handler): Changed interface to allow merging of eh_ranges.
16862 Split overlapping ranges. Return `void'.
16863
16864 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16865
16866 * parse.y (constructor_block_end:): New rule, tagged <node>.
16867 (constructor_body:): Use `constructor_block_end' instead of
16868 `block_end'.
16869
16870 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16871
16872 * parse.y (statement_nsi:): Pop `for' statement block.
16873 (java_complete_lhs): Labeled blocks containing no statement are
16874 marked as completing normally.
16875
16876 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16877
16878 * xref.c (xref_set_current_fp): New function, defined.
16879 * xref.h (xref_set_current_fp): New function, prototyped.
16880
16881 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16882
16883 * check-init.c (check_init): Take into account that
16884 LABELED_BLOCK_STMT can be empty.
16885
16886 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16887
16888 * parse.y (java_check_regular_methods): Warning check on not
16889 overriding methods with default access in other packages does not
16890 apply to `<clinit>'.
16891 (java_complete_lhs): If block body is an empty_stmt_node, replace
16892 it by NULL_TREE. This prevents gcc from generating an irrelevant
16893 warning.
16894
16895 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16896
16897 * check-init.c (check_init): Removed code accepting to see things
16898 falling through default:, when doing xrefs.
16899 * java-tree.h (do_not_fold): New global variable, declared.
16900 * parse.y (do_not_fold): New global variable, defined.
16901 (java_complete_expand_method): Set `do_not_fold' to the value of
16902 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16903 and reinstall them after them have been purged; do not check for
16904 initializations; do not issue missing return errors.
16905 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
16906 when doing xrefs.
16907 (patch_binop): Skip the fold part when doing xrefs.
16908 (build_string_concatenation): Skip the concatenation part when
16909 doing xrefs.
16910 (patch_synchronized_statement): Do not generate a try-finally when
16911 doing xrefs.
16912 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
16913 and keep the location where the throw was seen.
16914 * typeck.c (convert): When `do_not_fold' is set, do not attempt
16915 any treatment on the converted node an simply return a NOP_EXPR of
16916 the targeted type.
16917 * xref.c (xref_get_data): New function, defined.
16918 * xref.h (xref_get_data): New function, declared.
16919 (XREF_GET_DATA): Use xref_get_data.
16920
16921 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16922
16923 * gjavah.c (print_include): Cast the result of `strlen' to int
16924 when comparing against a signed value.
16925 (add_namelet): Likewise.
16926
16927 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16928
16929 * expr.c (expand_invoke): Mark parameter `nargs' with
16930 ATTRIBUTE_UNUSED.
16931 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16932
16933 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16934 ATTRIBUTE_UNUSED.
16935
16936 * jcf-reader.c (get_attribute): Cast a value to long
16937 when comparing against a signed expression. Likewise.
16938
16939 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16940 HOST_BITS_PER_CHAR.
16941
16942 1999-05-11 Andrew Haley <aph@cygnus.com>
16943
16944 * parse.y (source_end_java_method): If the current method contains
16945 any exception handlers, force asynchronous_exceptions: this is
16946 necessary because signal handlers in libjava may throw exceptions.
16947 * decl.c (end_java_method): Ditto.
16948
16949 1999-05-11 Tom Tromey <tromey@cygnus.com>
16950
16951 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16952 flags.
16953 * jvspec.c (THREAD_NAME): Removed.
16954 (GC_NAME): Likewise.
16955 (MATHLIB): Likewise.
16956 (WITHLIBC): Likewise.
16957 (GCLIB): Likewise.
16958 (THREADLIB): Likewise.
16959 (MATH_LIBRARY): Likewise.
16960 (lang_specific_driver): Don't add `-l' options to command line.
16961 Instead, add a single --specs option. Recognize `-L' options and
16962 use them to search for spec file.
16963 (find_spec_file): New function.
16964 (SPEC_FILE): New define.
16965
16966 1999-05-11 Dave Brolley <brolley@cygnus.com>
16967
16968 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16969 cpplib-enabled build.
16970
16971 1999-05-05 Per Bothner <bothner@cygnus.com>
16972
16973 * class.c (make_field_value): DECL_INITIAL may be a string literal;
16974 temporarily zero it while calling rest_of_decl_compilation.
16975
16976 * java-tree.h (string_ptr_type_node): Add declaration.
16977 * decl.c: Define and initialize string_ptr_type_node.
16978 * parse.y (patch_string_cst): Use string_ptr_type_node.
16979
16980 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
16981 * parse.y (for_statement): Now unconditionally exit_block.
16982 (finish_labeled_statement): No longer exit_block if for-loop.
16983 (patch_loop_statement): Check harder if the loop is already labeled.
16984
16985 * parse.y (patch_initialized_static_field): Removed function.
16986 (maybe_generate_clinit): Removed special handling for interfaces.
16987 (java_complete_expand_methods): Do a preliminary java_complete_tree
16988 on <clinit> to determine if it can be removed.
16989 (java_complete_expand_method): Remove special handling for <clinit>.
16990 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
16991 optimize if we get back empty_stmt_node.
16992 For MODIFY_EXPR, re-do checking of static initializers.
16993 (fold_constant_for_init): Don't return immediate if VAR_DECL.
16994 For VAR_DECL, pass correct context.
16995
16996 * verify.c (verify_jvm_instructions): Better error messages.
16997
16998 1999-05-03 Tom Tromey <tromey@cygnus.com>
16999
17000 * parse-scan.y (interface_declaration): Call
17001 report_class_declaration for interfaces.
17002
17003 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
17004
17005 * Makefile.in: Remove -v from bison command lines.
17006
17007 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
17008
17009 * check-init.c (check_init): Exclude a case of error when doing
17010 xrefs.
17011 * class.c (layout_class_method): Don't generate the error message
17012 twice when compiling from source.
17013 * lang-options.h: Added `-Wredundant-modifers' and
17014 `-Wunusupported-jdk11' flags and help text.
17015 * lang.c (lang_decode_option): Added support for
17016 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
17017 flag_static_local_jdk11 and flag_redundant set accordingly.
17018 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
17019 * parse.h (EXPR_WFL_ADD_COL): New macro.
17020 (DECL_END_SOURCE_LINE): Likewise.
17021 (DECL_INHERITED_SOURCE_LINE): Likewise.
17022 * parse.y (static_ref_err): New function, prototyped.
17023 (CCB_TK): Now tagged <operator>.
17024 (class_body:): Remember the location of the closing '}' of a class
17025 definition when doing xrefs.
17026 (block:): Likewise.
17027 (block_end:): Likewise.
17028 (create_class): Remember the location of the inherited class
17029 identifier when doing xrefs.
17030 (register_fields): Added test on first operand of `init' before
17031 testing it TREE_CODE.
17032 (method_header): Store the location of the class identifier in the
17033 class decl when doing xrefs.
17034 (finish_method_declaration): Don't combine first/last method line
17035 when doing xref.
17036 (java_check_regular_methods): Warning check on not overriding
17037 methods with default access on other packages move before check on
17038 static methods. Initialization of `aflags' also moved up.
17039 (resolve_expression_name): Call static_ref_err to report the error.
17040 (static_ref_err): New function, implemented.
17041 (resolve_field_access): Returned simplified static field access
17042 when doing xrefs.
17043 (resolve_qualified_expression_name): Check for illegal use of
17044 static fields in a non static context. Call static_ref_err to
17045 report error in various places.
17046 (java_complete_tree): Do not fold initialized static fields when
17047 doing xrefs.
17048 (java_complete_lhs): Likewise.
17049
17050 1999-04-29 Anthony Green <green@cygnus.com>
17051
17052 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
17053 create internal labels.
17054 (lookup_label): Ditto.
17055
17056 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
17057
17058 * class.c (layout_class_method): Generate <clinit>'s rtl for
17059 interfaces.
17060 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
17061 for interfaces' <clinit>.
17062 * expr.c (lookup_field): Search for fields in interfaces.
17063 (expand_invoke): Fixed indentation.
17064 (expand_java_field_op): Likewise. Use IS_CLINIT.
17065 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
17066 (IS_CLINIT): New macro.
17067 * parse.y (type_declaration:): Call maybe_generate_clinit after an
17068 interface was parsed.
17069 (maybe_generate_clinit): Don't generate if the current class is an
17070 interface with only fields of primitive types.
17071 (reset_method_name): Use IS_CLINIT.
17072 (java_complete_expand_method): Expand <clinit> when it exists for
17073 interfaces. Use IS_CLINIT.
17074 (resolve_expression_name): Use DECL_CONTEXT instead of
17075 current_class to build static field references.
17076 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
17077 ARRAY_REF when doing xreferencing.
17078 (check_final_assignment): Fixed typo in leading comment. Use
17079 IS_CLINIT.
17080 (patch_array_ref): Don't fully expand array references when
17081 xreferencing.
17082 (patch_return): Use IS_CLINIT.
17083 (patch_throw_statement): Likewise.
17084
17085 1999-04-22 Tom Tromey <tromey@cygnus.com>
17086
17087 * Make-lang.in (JAVA_SRCS): Added check-init.c.
17088
17089 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
17090
17091 * decl.c (predef_filenames, predef_filenames_size): New globals
17092 (init_decl_processing): predef_filenames and predef_filenames_size
17093 initialized.
17094 * java-tree.h (predef_filenames, predef_filenames_size): Declared
17095 extern.
17096 * jcf-parse.c (predefined_filename_p): New function.
17097 (yyparse): Check that files on the command line are specified only
17098 once and issue a warning otherwise.
17099 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
17100 * parse.y (source_end_java_method): Nullify NOP method bodies, to
17101 avoid a gcc warning with -W -Wall turned on.
17102 (java_expand_classes): Abort if errors were encountered.
17103 (java_complete_lhs): If the cross reference flag is set, wrap
17104 field DECL node around a WFL when resolving expression name.
17105
17106 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17107
17108 * lang.c (lang_decode_option): Fixed returned value when parsing
17109 `-fxref=...' and `-Wall'.
17110 * parse.y (source_end_java_method): Do not generate code when
17111 flag_emit_xref is set.
17112 (resolve_expression_name): Do not build static field access when
17113 flag_emit_xref is set.
17114 (resolve_field_access): No special treatment on `length' when
17115 flag_emit_xref is set. Do not build qualified static field access
17116 when flag_emit_xref is set.
17117 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
17118 when flag_emit_xref is set.
17119 (patch_assignment): Do not generate array store runtime check when
17120 flag_emit_xref is set.
17121 * xref.c (xref_flag_value): Fixed function declaration
17122 indentation.
17123 (xset_set_data): New function.
17124 * xref.h (xref_set_data): Added prototype for new function.
17125 (typedef struct xref_flag_table): New field data.
17126 (XREF_GET_DATA): New macro.
17127
17128 1999-04-19 Tom Tromey <tromey@cygnus.com>
17129
17130 * xref.h (enum): Removed trailing comma.
17131
17132 * parse.y (resolve_qualified_expression_name): Added missing
17133 `break'.
17134
17135 1999-04-15 Anthony Green <green@cygnus.com>
17136
17137 * gjavah.c: New prototypes for java_float_finite and
17138 java_double_finite.
17139
17140 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17141
17142 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
17143 references.
17144
17145 1999-04-06 Jeffrey A Law (law@cygnus.com)
17146
17147 * Makefile.in (TREE_H): Add tree-check.h.
17148 (RTL_H): Add genrtl.h.
17149
17150 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
17151
17152 * parse.y (patch_assignment): Added ArrayStoreException runtime
17153 check.
17154
17155 1999-04-06 Per Bothner <bothner@cygnus.com>
17156
17157 * expr.c (pop_type_0): New function.
17158 (pop_type): Use pop_type_0.
17159 * java-tree.h (pop_type_0): New declaration.
17160 * verify.c (verify_jvm_instructions): Check return instructions.
17161
17162 * parse.y (patch_binop): Don't fold if non-constant and emiting
17163 class files.
17164
17165 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17166
17167 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
17168
17169 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
17170 (main_jcf): Don't define.
17171 (process_file): Don't set `main_jcf'.
17172
17173 * java-tree.h (main_jcf): Don't declare.
17174
17175 * jcf-parse.c (main_jcf): Add static definition.
17176
17177 * lang.c (main_jcf): Don't define.
17178
17179 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17180
17181 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
17182
17183 * decl.c (copy_lang_decl): Likewise for `bcopy'.
17184
17185 * jcf-depend.c: Include "config.h", not <config.h>.
17186
17187 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
17188 `bcopy' to PTR.
17189
17190 * jcf-path.c: Include "config.h", not <config.h>.
17191
17192 * lex.c: Don't include various system header files.
17193 (java_init_lex): Cast the argument of `bzero' to PTR
17194
17195 * parse-scan.y (java_push_parser_context): Likewise.
17196
17197 * parse.y (java_push_parser_context): Likewise.
17198 (patch_bc_statement): Match format specifier to variable argument.
17199
17200 * xref.c: Don't include <stdio.h>.
17201
17202 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
17203
17204 * parse.y (struct parser_ctxt *ctxp): Now global.
17205 (declare_local_variables): Use WFL compound value for the
17206 declaration source line value, when doing cross-referencing.
17207
17208 1999-03-31 Tom Tromey <tromey@cygnus.com>
17209
17210 * gjavah.c (print_field_info): Allow constants of other types.
17211 (print_include): Generate include when new name is proper prefix
17212 of already printed name.
17213 (add_namelet): Likewise.
17214 (cxx_keyword_subst): New function.
17215 (print_method_info): Use it.
17216 (print_field_name): New function.
17217 (get_field_name): New function.
17218 (print_field_info): Use get_field_name and print_field_name.
17219
17220 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17221
17222 * Makefile.in (keyword.h): Generate using gperf language 'C', not
17223 'KR-C', so gperf uses the `const' keyword on strings.
17224
17225 * keyword.gperf (java_keyword): Const-ify a char*.
17226
17227 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
17228
17229 * parse.y (patch_bc_statement): Fixed identation and a bogus
17230 `printf' format.
17231
17232 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
17233
17234 * parse.y (patch_assignment): Allow static variables in other
17235 classes to be assigned.
17236
17237 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17238
17239 * class.c (maybe_add_interface): Remove unused variable
17240 `interface_binfo'.
17241 (make_class_data): Use = for assignment, not ==. Likewise.
17242 (emit_register_classes): Remove unused variable `decl'.
17243
17244 * lex.c: Fix comment so as not to contain an embedded `/*'.
17245
17246 * verify.c (verify_jvm_instructions): Remove unused variable
17247 `self_type'.
17248
17249 1999-03-27 Per Bothner <bothner@cygnus.com>
17250
17251 * parse.y (complete_loop_body): Rename to finish_loop_body.
17252 (complete_labeled_statement): Rename to finish_labeled_statement.
17253 (complete_for_loop): Rename to finish_for_loop.
17254 (complete_method_declaration): Rename to finish_method_declaration.
17255
17256 * java-tree.h (continue_identifier_node): New global node.
17257 * decl.c: Define and initialize continue_identifier_node.
17258 * parse.y (generate_labeled_block): Remove - no longer needed.
17259 (build_loop_body): Use continue_identifier_node for continue block.
17260 (finish_labeled_statement): Also do pop_labeled_block actions.
17261 (java_complete_lhs): POP_LOOP even if error.
17262 (build_labeled_block): Special handling for continue_identifier_node.
17263 (patch_loop_statement): Re-organize.
17264 (patch_bc_statement): Re-write.
17265
17266 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17267
17268 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
17269 using a WFL compound value.
17270 * parse.y (xref.h): Include.
17271 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
17272 WFL compound value.
17273 (register_fields): Set WFL compound value to lineno if doing
17274 xrefs.
17275 (java_complete_expand_method): Call expand_xref if flag_emit_xref
17276 is set.
17277 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
17278 * xref.h (expand_xref): Prototype renamed from xref_generate.
17279
17280 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17281
17282 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
17283 (GET_CURRENT_BLOCK): New macro.
17284 * parse.y (current_static_block): New global variable.
17285 (method_body:): Define action.
17286 (complete_method_declaration): Set current_function_decl to NULL
17287 when work on the current method is done.
17288 (declare_local_variables): Use GET_CURRENT_BLOCK.
17289 (java_method_add_stmt): Likewise.
17290 (java_complete_expand_method): Disable the use of `this' when
17291 expanding <clinit>.
17292 (enter_a_block): If no current method exist, use
17293 current_static_block to link static initializer blocks.
17294 (exit_block): Rewritten to use current_static_block when no current
17295 method decl exists.
17296 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
17297 (patch_return): Forbid the use of `return' in static initializers.
17298 (patch_throw_statement): Fixed indentation. Issue specific error
17299 for uncaught thrown checked exception in static initializer
17300 blocks. Removed FIXME.
17301
17302 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
17303
17304 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
17305 Link gcj from gcc.o.
17306
17307 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
17308
17309 * parse.y (find_applicable_accessible_methods_list): When dealing
17310 with interface: ensure that a given interface or java.lang.Object
17311 are searched only once.
17312
17313 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17314
17315 * gjavah.c (print_c_decl): Remove unused argument `flags'.
17316
17317 * jcf-dump.c (print_access_flags): Add braces around if-else.
17318
17319 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
17320 COMBINE_INPUTS.
17321
17322 * lex.c (build_wfl_node): Add static prototype.
17323
17324 * lex.h (build_wfl_node): Remove static prototype.
17325
17326 * parse.y: Include lex.c early enough to declare everything needed.
17327 Ensure calls to `build_wfl_node' pass the proper arguments.
17328 (create_class): Remove unused variable `super_decl'.
17329 (get_printable_method_name): Initialize variable `name'.
17330
17331 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17332
17333 * Changelog: Fixed 1999-03-22 typos.
17334 * lang.c (lang_decode_option): Fixed typo in error string in the
17335 XARG section.
17336
17337 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17338
17339 * Makefile.in (JAVA_OBJS): Added entry xref.o.
17340 (xref.o): New rule.
17341 * java-tree.h (flag_emit_xref): Declared extern.
17342 * lang.c (xref.h): Included.
17343 (flag_emit_xref): New global variable.
17344 (lang_decode_option): Added support for -fxref.
17345 * xref.c: Created.
17346 * xref.h: Likewise.
17347
17348 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
17349
17350 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
17351 linked with.
17352
17353 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17354
17355 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
17356 $(srcdir)/../system.h and $(JAVA_TREE_H).
17357 (jcf-io.o): Depend on $(JAVA_TREE_H).
17358 (mangle.o): Likewise.
17359
17360 * check-init.c (check_cond_init): Add static prototype.
17361
17362 * class.c (build_java_method_type, hashUtf8String,
17363 make_field_value, get_dispatch_vector, get_dispatch_table,
17364 append_gpp_mangled_type, mangle_static_field): Likewise.
17365 (strLengthUtf8): Hide unused definition.
17366 (hashUtf8String): Const-ify.
17367 (make_field_value): Un-ANSI-fy.
17368
17369 * constants.c: Move inclusion of jcf.h above java-tree.h.
17370 (set_constant_entry, find_class_or_string_constant,
17371 find_name_and_type_constant, get_tag_node,
17372 build_constant_data_ref): Add static prototype.
17373
17374 * decl.c (push_jvm_slot, builtin_function,
17375 lookup_name_current_level): Likewise.
17376 (builtin_function): Const-ify.
17377
17378 * except.c (expand_start_java_handler, expand_end_java_handler):
17379 Add static prototype.
17380
17381 * expr.c (flush_quick_stack, push_value, pop_value,
17382 java_stack_swap, java_stack_dup, build_java_athrow,
17383 build_java_jsr, build_java_ret, expand_java_multianewarray,
17384 expand_java_arraystore, expand_java_arrayload,
17385 expand_java_array_length, build_java_monitor, expand_java_pushc,
17386 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
17387 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
17388 expand_compare, expand_test, expand_cond, expand_java_goto,
17389 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
17390 expand_java_field_op, java_push_constant_from_pool): Likewise.
17391
17392 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
17393 (build_java_arraynull_check): Mark parameters `node' and `type'
17394 with ATTRIBUTE_UNUSED.
17395 (note_label): Likewise for parameter `current_pc'.
17396 (expand_java_call, expand_java_ret): Hide unused definition.
17397
17398 * java-tree.h (make_class, build_constants_constructor,
17399 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
17400 init_outgoing_cpool, register_class, emit_register_classes,
17401 java_layout_seen_class_methods): Prototype.
17402 (unicode_mangling_length): Const-ify.
17403 (append_gpp_mangled_name, append_gpp_mangled_classtype,
17404 emit_unicode_mangled_name, format_int, format_uint,
17405 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
17406 jcf_print_utf8_replace, open_class): Prototype.
17407
17408 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
17409 <stdio.h>. Include tree.h/java-tree.h.
17410 (utf8_equal_string usage, process_class): Add static prototype.
17411 (open_class): Don't prototype this here.
17412 (utf8_equal_string): Match arguments to format specifiers.
17413 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
17414 TABLE_SWITCH, disassemble_method): Likewise.
17415
17416 * jcf-io.c: Include tree.h/java-tree.h.
17417 (open_class, find_classfile, jcf_print_utf8,
17418 jcf_print_utf8_replace): Const-ify.
17419
17420 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
17421 parse_class_file): Add static prototype.
17422 (find_in_current_zip): Match definition to existing static
17423 prototype.
17424
17425 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
17426 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
17427 finish_jcf_block, define_jcf_label, get_jcf_label_here,
17428 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
17429 write_chunks, adjust_typed_op, generate_bytecode_conditional,
17430 generate_bytecode_return, perform_relocations, init_jcf_state,
17431 init_jcf_method, release_jcf_state, generate_classfile):
17432 Add static prototype.
17433 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
17434 (make_class_file_name): Const-ify.
17435
17436 * jcf.h (find_classfile): Const-ify.
17437
17438 * jv-scan.c (reset_report): Remove prototype.
17439
17440 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
17441 (error): Rewrite to allow varargs.
17442
17443 * lang.c (lang_f_options): Const-ify.
17444
17445 * lex.c (java_parse_escape_sequence): Add static prototype.
17446 (java_allocate_new_line): Match definition to existing static
17447 prototype.
17448
17449 * mangle.c Include tree.h/java-tree.h.
17450 (unicode_mangling_length, emit_unicode_mangled_name,
17451 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
17452
17453 * parse.h (jdep_code): Remove trailing comma in enumeration.
17454 (java_get_line_col): Move prototype outside of !JC1_LITE test.
17455 (reset_report): Add prototype.
17456
17457 * verify.c (push_pending_label, merge_types): Add static
17458 prototypes.
17459
17460 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
17461
17462 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17463
17464 * parse.y (find_applicable_accessible_methods_list): Extend the
17465 search to superinterfaces when relevant.
17466 (search_applicable_methods_list): New function.
17467
17468 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
17469
17470 * class.c (unmangle_classname): Implemented stricter testing
17471 before setting the QUALIFIED_P flag on an identifier.
17472
17473 1999-03-16 Per Bothner <bothner@cygnus.com>
17474
17475 * parse.y (java_complete_lhs): Call force_evaluation_order
17476 after patch_newarray.
17477 (patch_binop): Don't call fold if there are side effects.
17478
17479 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
17480
17481 * parse.y (java_stabilize_reference): Use save_expr instead of
17482 building a SAVE_EXPR node.
17483 (java_complete_lhs): Patch the resulting string of the `+='
17484 operator (if necessary) and complete the RHS after having built
17485 the cast.
17486
17487 1999-03-15 Per Bothner <bothner@cygnus.com>
17488
17489 * class.c (make_class): Don't set CLASS_P here (because
17490 this function is also called by build_java_array_type).
17491 (push_class): Set CLASS_P here instead.
17492 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
17493
17494 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
17495 context. If the context is class, perfer "super" over "synchronized".
17496 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
17497
17498 * parse.y (create_class): Don't call parser_check_super here;
17499 it is not robust. Always wait until later.
17500
17501 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
17502 match what JDK 1.2 does), but don't set ACC_PUBLIC.
17503
17504 1999-03-13 Per Bothner <bothner@cygnus.com>
17505
17506 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
17507 * lex.h (UNGETC): Change misleading macro.
17508
17509 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17510
17511 * parse.y (java_stabilize_reference): Return NODE when patching a
17512 COMPOUND_EXPR.
17513 (java_complete_lhs): Put parenthesis around truth values.
17514
17515 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17516
17517 * class.c (layout_class_method): Don't make rtl for interface
17518 methods.
17519 * parse.h (GET_TYPE_NAME): New macro.
17520 * parse.y (if_then_statement:): Fixed indentation.
17521 (if_then_else_statement:): Likewise.
17522 (for_statement:): Fixed spacing.
17523 (try_statement:): Fixed indentation.
17524 (create_interface): Don't force interfaces to be abstract.
17525 (method_header): Abstract methods are OK in interfaces.
17526 (declare_local_variables): Fixed typo in comment.
17527 (java_complete_expand_method): Fixed indentation.
17528 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
17529 non accessible fields.
17530 (java_stabilize_reference): New function.
17531 (java_complete_lhs): Fixed indentation. Use
17532 java_stabilize_reference in compound assignment. Insert the
17533 cast. If not processing `+' fix string constants before processing
17534 binop.
17535
17536 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17537
17538 * constants.c (find_class_or_string_constant): Cast variable `j'
17539 to a `jword' when comparing against one.
17540
17541 * expr.c (java_lang_expand_expr): Remove unused variables
17542 `has_finally_p' and `op0'.
17543
17544 * gjavah.c (print_field_info): Cast a value to jint when comparing
17545 against one. Likewise for a jlong.
17546 (add_namelet): Likewise cast a `sizeof' to an int when comparing
17547 against a signed quantity.
17548
17549 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
17550 (print_signature): Don't needlessly dereference variable `str'
17551
17552 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
17553 `max_locals' with ATTRIBUTE_UNUSED.
17554 (jcf_parse_class): Likewise for variable `index'.
17555
17556 * parse.h (reverse_jdep_list): Remove static prototype.
17557
17558 * parse.y (build_jump_to_finally): Remove prototype and definition.
17559 (reverse_jdep_list): Add static prototype.
17560
17561 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
17562 `assignment' and `expr_decl'.
17563
17564 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
17565
17566 1999-03-12 Andrew Haley <aph@cygnus.com>
17567
17568 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
17569 we'll need a directory separator and a null character.
17570
17571 1999-03-10 Per Bothner <bothner@cygnus.com>
17572
17573 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
17574
17575 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
17576
17577 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17578 interfaces.
17579
17580 1999-03-05 Per Bothner <bothner@cygnus.com>
17581
17582 * lex.c (java_parse_end_comment): Take extra parameter (next char).
17583
17584 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
17585
17586 * class.c (layout_class_method): A static method in a base class
17587 is never overridden, so treat it like it doesn't exist.
17588 However, do complain about private non-static method overriding
17589 public static method.
17590
17591 * parse.y: Don't set unused INITIALIZED_P flag.
17592 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
17593
17594 * parse.y (find_expr_with_wfl): Optimize tail-calls.
17595 (build_array_from_name): Re-order &index[string] to &string[index].
17596
17597 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
17598 error_mark (it might catch more errors, but it is more likely to lose).
17599
17600 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17601
17602 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17603 (parse-scan.o): Depend on toplev.h.
17604
17605 * class.c (make_method_value): Add prototype. Make it static.
17606 Remove unused second argument, caller changed.
17607
17608 * expr.c (java_lang_expand_expr): Remove unused variable
17609 `return_label'.
17610
17611 * java-tree.h: Don't prototype find_in_current_zip.
17612 Add prototypes for verify_constant_pool, start_java_method,
17613 end_java_method, give_name_to_locals, expand_byte_code,
17614 open_in_zip, set_constant_value, find_constant1, find_constant2,
17615 find_utf8_constant, find_string_constant, find_class_constant,
17616 find_fieldref_index, find_methodref_index, write_constant_pool,
17617 count_constant_pool_bytes and encode_newarray_type.
17618
17619 * jcf-dump.c: Remove unused variable `LONG_temp'.
17620
17621 * jcf-parse.c: Include parse.h.
17622 (jcf_parse_source): Remove unused parameter, all callers changed.
17623 (jcf_figure_file_type): Add static prototype.
17624 (find_in_current_zip): Likewise. Also remove unused parameter,
17625 all callers changed.
17626 (read_class): Initialize variable `saved_pos'.
17627
17628 * jcf-reader.c (jcf_parse_preamble): Mark variables
17629 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17630
17631 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17632 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17633 (java_parse_doc_section): Initialize variable `seen_star'.
17634 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17635 (java_lex_error): Mark parameters `msg' and `forward' with
17636 ATTRIBUTE_UNUSED.
17637 (java_get_line_col): Mark parameters `filename' and `line' with
17638 ATTRIBUTE_UNUSED.
17639
17640 * parse-scan.y: Include toplev.h.
17641 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17642
17643 * parse.h: use `struct JCF', not plain `JCF'.
17644 (java_parser_context_save_global, java_expand_classes
17645 java_parser_context_restore_global, java_parse): Add prototypes.
17646
17647 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17648 `node'.
17649
17650 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
17651
17652 * check-init.c (check_init): COPYN takes word count, not bit count.
17653
17654 1999-02-26 Per Bothner <bothner@cygnus.com>
17655
17656 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
17657 explicit build_decl. (Avoids crash in reload when optimizing.)
17658
17659 1999-02-25 Per Bothner <bothner@cygnus.com>
17660
17661 * decl.c (complete_start_java_method): Handle synchronized method
17662 even when compiling from bytecode.
17663
17664 1999-02-26 Tom Tromey <tromey@cygnus.com>
17665
17666 * gjavah.c (add_class_decl): Only generate `#include' if outer
17667 class is not the name of the class we are processing. Correctly
17668 append `.h' in #include.
17669 (process_file): Clean up newlines around generated `#include's.
17670 (decode_signature_piece): Correctly handle inner classes.
17671 (struct include): New structure.
17672 (all_includes): New global.
17673 (print_include): New function.
17674 (add_class_decl): Use it.
17675 (process_file): Likewise.
17676 (add_class_decl): Generate include for java-array.h if array
17677 seen.
17678 (process_file): Don't generate java-array.h include.
17679
17680 * gjavah.c (add_namelet): Check for standard package names here.
17681 (add_class_decl): Don't check for standard package names here.
17682
17683 1999-02-25 Tom Tromey <tromey@cygnus.com>
17684
17685 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17686 When reading a zip file, only use strncmp if both strings are
17687 bigger than the buffer length. Initialize `k' when looping
17688 through zip file.
17689
17690 1999-02-24 Tom Tromey <tromey@cygnus.com>
17691
17692 * gjavah.c (struct namelet): New structure.
17693 (add_namelet): New function.
17694 (print_namelet): New function.
17695 (print_class_decls): Use add_namelet and print_namelet to generate
17696 namespaces and not classes.
17697 (method_printed): New global.
17698 (HANDLE_END_METHOD): Examine method_printed.
17699 (print_method_info): Set method_printed when required. Print
17700 error if function to be ignored is marked virtual. Handle $finit$
17701 method.
17702 (METHOD_IS_FINAL): New macro.
17703 (print_field_info): Use it.
17704 (HANDLE_METHOD): Clear method_printed.
17705 (method_pass): New global.
17706 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17707 (process_file): Do two passes over both fields and methods.
17708 (HANDLE_METHOD): Examine method_pass.
17709 (root): New global.
17710 (add_class_decl): New function.
17711 (print_class_decls): Don't scan over entire constant pool.
17712
17713 1999-02-23 Tom Tromey <tromey@cygnus.com>
17714
17715 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17716 disable linking in that case.
17717
17718 1999-02-20 Tom Tromey <tromey@cygnus.com>
17719
17720 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17721 not 0x1f.
17722
17723 1999-02-21 Per Bothner <bothner@cygnus.com>
17724
17725 * decl.c (build_result_decl), java-tree.h: New method.
17726 (complete_start_java_method): Handle synchronized methods.
17727 Don't build DECL_RESULT here. (Ordering dependency problem.)
17728 (start_java_method): Call build_result_decl here instead ...
17729 * parse.y (java_complete_expand_method): ... and here.
17730 (expand_start_java_method): Don't call complete_start_java_method here.
17731 (java_complete_expand_method): Call it here instead.
17732 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
17733 * java-tree.h: ... here.
17734
17735 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
17736 * parse.y (java_complete_lhs): Don't call force_evaluation_order
17737 for ARRAY_REF - it doesn't work when array bounds are checked.
17738 (patch_array_ref): Handle it here instead.
17739
17740 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
17741
17742 1999-02-19 Per Bothner <bothner@cygnus.com>
17743
17744 Force left-to-right evaluation of binary operations etc.
17745 * expr.c (force_evaluation_order), java-tree.h: New function.
17746 * parse.y (java_complete_lhs): Pass binary operations, procedure
17747 calls, and ARRAY_REFs to force_evaluation_order.
17748 (various): Set TREE_SIDE_EFFECTS more carefully.
17749
17750 Tolerate random (non-UTF8) encoding in comments without complaining.
17751 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
17752 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
17753
17754 * parse.y (resolve_qualified_expression_name): Handle error_mark.
17755 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
17756
17757 * parse.y (java_complete_lhs): Ignore an empty statement in a
17758 COMPOUND_EXPR. Don't complain about empty statement after return.
17759
17760 1999-02-19 Per Bothner <bothner@cygnus.com>
17761
17762 * parse.y (obtain_incomplete_type): Don't wrap unknown types
17763 in TREE_LIST - just chain the POINTER_TYPEs together.
17764 (resolve_class): If type already resolved, return decl.
17765 After resolving, update TREE_TYPE(class_type), and name (if array).
17766 * parse.h (do_resolve_class), parse.y: Make non-static.
17767 * class.c (maybe_layout_super_class): Take this_class argument.
17768 Do do_resolve_class if necessary.
17769 (layout_class, layout_class_methods): Adjust calls appropriately.
17770 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17771 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
17772 * typeck.c (build_java_array_type): Don't call layout_class.
17773
17774 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17775
17776 * parse.y (check_pkg_class_access): Allow private class access
17777 within the same package.
17778 (strip_out_static_field_access_decl): New function.
17779 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17780 operator argument before testing its nature.
17781
17782 1999-02-03 Per Bothner <bothner@cygnus.com>
17783
17784 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
17785 (TRY_EXPR): Simplify - it no longer has a finally clause.
17786 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
17787 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17788 * expr.c (java_lang_expand_expr): Likewise.
17789 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
17790 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
17791 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
17792 (build_try_statement): Remove finally parameter and handling.
17793 (build_try_finally_statement): New function.
17794 (patch_try_statement): No longer need to support finally clause.
17795 (try_statement): Update grammar action rules.
17796 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
17797 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17798
17799 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
17800
17801 * jcf-parse.c (get_constant): Add braces around computation of 'd'
17802 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
17803
17804 1999-02-17 Andrew Haley <aph@cygnus.com>
17805
17806 * class.c (build_utf8_ref): Back out broken patch which was
17807 intended to to output signatures using '.' as a separator.
17808
17809 * class.c (make_class_data): Output signatures using '.' as a
17810 separator, rather than '/'.
17811 (mangled_classname): Likewise.
17812 (make_field_value): Likewise.
17813 (make_method_value): Likewise.
17814 * constants.c (alloc_class_constant): Likewise.
17815 * expr.c (build_invokeinterface): Likewise.
17816
17817 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
17818
17819 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17820 of an ancient workaround.
17821
17822 1999-02-10 Jeffrey A Law (law@cygnus.com)
17823
17824 * jvspec.c (xmalloc): Kill the prototype. It does not belong
17825 here anymore.
17826
17827 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17828
17829 * lex.c (yylex): Encode \0 as UTF8.
17830
17831 1999-02-10 Tom Tromey <tromey@cygnus.com>
17832
17833 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17834 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17835 (libgcj_zip): Renamed.
17836 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17837 LIBJAVA_ZIP_FILE.
17838 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17839
17840 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17841 (GC_NAME): Renamed -lgc to -lgcjgc.
17842
17843 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17844
17845 * lex.c (java_lang_cloneable): Initialize.
17846 * parse.y (java_lang_cloneable): New static variable.
17847 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17848 doing one more qualification round.
17849 (valid_ref_assignconv_cast_p): Reject null source or
17850 destination. Allow an array to be cast into java.lang.Cloneable.
17851 (patch_cast): Swapped two first arguments to first call to
17852 valid_ref_assignconv_cast_p.
17853
17854 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
17855
17856 * parse.h: DECL_P renamed JDECL_P.
17857 * parse.y: DECL_P replaced by JDECL_P.
17858 (build_array_from_name): Always use pointer's type.
17859 (patch_bc_statement): Extra code to search continue target in a
17860 for loop. Fixed comments. Continue target is current loop when
17861 unlabeled.
17862
17863 1999-02-05 Andrew Haley <aph@cygnus.com>
17864
17865 * class.c (make_class_data): The superclass of an interface should
17866 be null, not class Object.
17867
17868 * lex.c (java_lex): Sign extend hex literals.
17869
17870 1999-02-04 Andrew Haley <aph@cygnus.com>
17871
17872 * class.c (build_utf8_ref): Output signatures using '.' as a
17873 separator, rather than '/'.
17874 (make_class_data): Likewise.
17875
17876 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
17877
17878 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17879 mkstemp.o. Get them from libiberty now.
17880
17881 1999-02-02 Jeffrey A Law (law@cygnus.com)
17882
17883 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17884
17885 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17886
17887 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17888 from libiberty.h
17889
17890 1999-02-02 Per Bothner <bothner@cygnus.com>
17891
17892 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17893 * jcf-write.c (generate_bytecode_return): New function.
17894 (generate_bytecode_insns): Use it, for RETURN_EXPR.
17895
17896 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
17897 generate special [fd]const_[01] instructions.
17898
17899 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
17900
17901 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
17902 handling OPCODE_lookupswitch or OPCODE_tableswitch.
17903
17904 1999-02-01 Per Bothner <bothner@cygnus.com>
17905
17906 * parse.y (patch_method_invocation): Handle calling static methods,
17907 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17908
17909 * parse.y (java_complete_lhs): Don't complain about unreachable
17910 exit condition in a do-while statement.
17911
17912 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
17913
17914 * lex.c (java_read_char): Fixed utf8 decoding.
17915 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
17916 range.
17917 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
17918 comments. Local variable `all_primitive' is gone. Broadened
17919 acceptance of `0' to floating point targets. `long' can now be
17920 widened to `double' or `float'.
17921 (valid_method_invocation_conversion_p): Added leading
17922 comment. Fixed tabulation.
17923 (build_string_concatenation): Optimize out left or right empty
17924 string constants.
17925
17926 1999-01-28 Per Bothner <bothner@cygnus.com>
17927
17928 * jcf-write.c (localvar_alloc): Only emit entry for
17929 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17930 (generate_bytecode_insns): Only call put_linenumber if
17931 debug_info_level > DINFO_LEVEL_NONE.
17932 * jvspec.c (lang_specific_driver): If no -O* or -g* option
17933 is specified, add -g1 (for compatibility wih javac).
17934
17935 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
17936
17937 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17938 gjavah.o, check-init.o, jv-scan.o
17939
17940 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17941
17942 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17943
17944 * gjavah.c: Include config.h and system.h.
17945
17946 * javaop.h (inline): Don't define, its handled by system.h.
17947 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17948 from `inline' to `static inline'.
17949
17950 * jcf.h (inline): Don't define, its handled by system.h.
17951
17952 * lex.c (inline): Likewise.
17953
17954 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
17955
17956 * lang-specs.h: Map -Qn to -fno-ident.
17957
17958 1999-01-29 Richard Henderson <rth@cygnus.com>
17959
17960 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17961
17962 1999-01-29 Tom Tromey <tromey@cygnus.com>
17963
17964 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17965 then cast it to Object before calling `append' method.
17966
17967 1999-01-28 Per Bothner <bothner@cygnus.com>
17968
17969 * check-init.c (check_bool2_init, check_bool_init, check_init):
17970 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17971 * jcf-write.c (generate_bytecode_insns): Likewise.
17972
17973 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
17974
17975 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17976 * parse.y (patch_cast): Allow a boolean to be cast into a
17977 boolean.
17978
17979 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17980
17981 * parse.y: (class_declaration:): Fixed indentation.
17982 (class_member_declaration:): Extra `;' after field declaration now
17983 accepted.
17984 (interface_declaration:): Removed debug messages in error reports.
17985 (patch_binop): Nodes created and returned inherit the orignal
17986 node's COMPOUND_ASSIGN_P flag value.
17987 (patch_cast): Fix cast from char to floating point.
17988
17989 1999-01-25 Andrew Haley <aph@cygnus.com>
17990
17991 * except.c, java-except.h (expand_resume_after_catch): new
17992 function.
17993 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
17994 to branch back to main flow of control after a catch block.
17995
17996 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17997
17998 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
17999 $(srcdir)/../system.h.
18000 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
18001 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
18002 (jcf-write.o): Likewise.
18003 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18004 (mangle.o): Depend on $(srcdir)/../toplev.h.
18005 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18006 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18007
18008 * class.c: Include output.h and parse.h.
18009 (mangled_classname): Add the `const' keyword to a char*.
18010 (find_named_method): Hide unused function definition.
18011 (build_utf8_ref): Change type of variable `c' to unsigned char.
18012 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
18013 (build_class_ref): Add the `const' keyword to a char*.
18014 (layout_class_method): Remove unused variable `buf'.
18015
18016 * decl.c (find_local_variable): Remove unused variable `rtl'.
18017 (pushdecl): Likewise for variables `different_binding_level' and
18018 `oldglobal'.
18019 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
18020 (maybe_build_cleanup): Likewise for parameter `decl'.
18021
18022 * except.c (expand_start_java_handler): Mark parameter `range'
18023 with ATTRIBUTE_UNUSED.
18024
18025 * expr.c: Include except.h.
18026 (pop_type): Remove unused variable `i'.
18027 (pop_value): Likewise for variables `n_words' and `i'.
18028 (expand_java_arrayload): Likewise for variable `convert'.
18029 (java_lang_expand_expr): Likewise for variables `op0', `type',
18030 `mode', `unsignedp', `node' and `elements'.
18031 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
18032 `eh_ranges'.
18033 (process_jvm_instruction): Add a `const' qualifier to a char*.
18034
18035 * gjavah.c (output_directory): Add the `const' keyword to a char*.
18036 (temp_directory): Likewise.
18037 (print_c_decl): Likewise.
18038 (print_method_info): Likewise.
18039 (decode_signature_piece): Likewise.
18040 (print_mangled_classname): Likewise.
18041
18042 * java-except.h: Provide prototypes for maybe_start_try,
18043 maybe_end_try and add_handler.
18044
18045 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
18046 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
18047 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
18048 init_expr_processing, push_super_field, init_class_processing,
18049 can_widen_reference_to, class_depth, verify_jvm_instructions,
18050 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
18051 set_local_type, merge_type_state, push_type, load_type_state,
18052 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
18053 emit_unicode_mangled_name): Add prototypes.
18054
18055 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
18056 (print_signature_type): Use ISDIGIT, not isdigit.
18057 (print_signature): Remove unused variable `j'.
18058
18059 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
18060 int when comparing against one.
18061
18062 * jcf-parse.c: Include toplev.h.
18063
18064 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
18065 (localvar_free): Remove unused variable `i'.
18066 (generate_bytecode_conditional): Likewise for variable `kind'.
18067
18068 * jv-scan.c: Include config.h and system.h. Remove redundant
18069 OS header and gansidecl.h includes.
18070 (warning): Add the `const' keyword to a char*. Also add
18071 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
18072 __STDC__, when determining whether to use ANSI-isms.
18073 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
18074 (xmalloc): Don't redundantly prototype here.
18075 (main): Remove unused parameter `envp'. Also fix the arguments
18076 passed to function `fatal' to match the format specifier.
18077
18078 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
18079
18080 * mangle.c: Include toplev.h.
18081 (emit_unicode_mangled_name): Declare parameter `len'.
18082
18083 * parse.y (parse_warning_context): Add the `const' keyword to a
18084 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
18085 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
18086 (issue_warning_error_from_context): Add the `const' keyword to
18087 a char*.
18088 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
18089 not `__STDC__' for whether to use ANSI-isms.
18090
18091 * typeck.c (incomplete_type_error): Mark parameters `value' and
18092 `type' with ATTRIBUTE_UNUSED.
18093 (parse_signature_type): Use ISDIGIT, not isdigit.
18094
18095 * verify.c (check_pending_block): Add the `const' keyword to a char*.
18096 (verify_jvm_instructions): Likewise. Remove unused variables
18097 `field_name' and `default_val'.
18098
18099 * zextract.c: Include config.h and system.h. Remove redundant
18100 OS header includes.
18101
18102 * zipfile.h: Prototype `read_zip_archive'.
18103
18104 1999-01-21 Andrew Haley <aph@cygnus.com>
18105
18106 * typeck.c (convert): Allow conversions to void type: some
18107 optimizations in gcc do this.
18108
18109 1999-01-21 Andrew Haley <aph@cygnus.com>
18110
18111 * typeck.c (convert_ieee_real_to_integer): New function.
18112 (convert): When not using fast-math and using hardware fp, convert
18113 an IEEE NaN to zero.
18114
18115 1999-01-18 Andrew Haley <aph@cygnus.com>
18116
18117 * parse.y (patch_binop): Do a type conversion from signed to
18118 unsigned and then back to signed when a ">>>" is found.
18119
18120 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
18121
18122 * java-tree.h: (check_for_initialization): Added prototype.
18123 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
18124 * parse.y (do_resolve_class): Removed unused locals.
18125 (read_import_dir): Likewise.
18126 (resolve_qualified_expression_name): Array creation
18127 expressions are valid primary expressions.
18128 (qualify_ambiguous_name): Likewise.
18129 (patch_synchronized_statement): Removed unused local.
18130
18131 1999-01-17 Jeffrey A Law (law@cygnus.com)
18132
18133 * Makefile.in (zextract.o): Add dependencies.
18134
18135 * Makefile.in: Do not put ^Ls at the start of a line.
18136
18137 1999-01-15 Per Bothner <bothner@cygnus.com>
18138
18139 * expr.c (process_jvm_instruction): Coerce to correct Throwable
18140 sub-type the result of the call that gets the exception value.
18141
18142 * parse.y (java_complete_expand_methods): If flags_syntax_only,
18143 don't call finish_class.
18144
18145 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
18146 clear found before continuing.
18147
18148 * verify.c (verify_jvm_instructions): On an array load, allow
18149 and handle top of stack to be TYPE_NULL.
18150
18151 * gjavah.c (generate_access): Translate Java package private or
18152 protected access to C++ public, but with a comment.
18153
18154 1999-01-13 Andrew Haley <aph@cygnus.com>
18155
18156 * expr.c (generate_name): Name prefix changed to avoid clashes
18157 with assembler temp labels.
18158
18159 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
18160 MODIFY_EXPR. Without this, code for the assignment may not be
18161 generated at all and the synchronized statement will read an
18162 uninitialized variable.
18163
18164 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
18165
18166 * class.c (maybe_layout_super_class): Fixed returned value.
18167 * lex.c: Added 1999 to the copyright.
18168 (java_init_lex): Initialize java_lang_imported.
18169 * lex.h: Added 1999 to the copyright.
18170 * parse.h: Added 1999 to the copyright.
18171 (REGISTER_IMPORT): Fixed typo in trailing macro.
18172 (CURRENT_OSB): New macro.
18173 (struct parser_ctxt): New fields osb_depth, osb_limit.
18174 * parse.y (java_lang_id): New global variable.
18175 (type_import_on_demand_declaration): Don't import java.lang.* twice.
18176 (array_creation_expression:): Use CURRENT_OSB.
18177 (dims:): Uses a stack to keep track of array dimensions.
18178 (cast_expression:): Use CURRENT_OSB.
18179 (find_expr_with_wfl): Return NULL if node found doesn't meet the
18180 conditions.
18181 (register_fields): Fixed typos in comment.
18182 (check_method_redefinition): Fixed comment indentation.
18183 (java_check_regular_methods): Set saved found wfl to NULL after
18184 having reinstalled it in the previously found DECL_NAME.
18185
18186 1999-01-10 Richard Henderson <rth@cygnus.com>
18187
18188 * gjavah.c (java_float_finite): Use a union to do type punning.
18189 (java_double_finite): Likewise.
18190
18191 1999-01-09 Per Bothner <bothner@cygnus.com>
18192
18193 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
18194 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
18195 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
18196 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
18197 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
18198 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
18199
18200 1999-01-08 Per Bothner <bothner@cygnus.com>
18201
18202 * check-init.c (check_init): If compiling to native, we don't
18203 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
18204
18205 1999-01-08 Tom Tromey <tromey@cygnus.com>
18206
18207 * parse-scan.y (variable_declarator_id): Set or increment
18208 bracket_count.
18209 (bracket_count): New global.
18210 (formal_parameter): Handle case where bracket pairs trail variable
18211 declarator id.
18212
18213 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
18214
18215 * jcf-parse.c (yyparse): variable len changed from a char to an
18216 int to prevent overflow.
18217
18218 1999-01-06 Per Bothner <bothner@cygnus.com>
18219
18220 * java-tree.h: Declare read_class.
18221 * jcf-parse.c (read_class): New function.
18222 (load_class): Now just call read_class.
18223
18224 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
18225 * jcf-parse.c (parse_source_file): Declare save_error_count,
18226 which is needed by java_parse_abort_on_error macro,
18227 * parse.y (java_layout_classes, java_expand_classes): Likewise.
18228
18229 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
18230 constructor, if initializing a static field.
18231 (patch_new_array_init): Set TREE_CONSTANT if it is.
18232 * expr.c (java_lang_expand_expr): For a static array constructor
18233 of primitive elements, allocate the array itself statically.
18234 Disabled until we can set the vtable field statically.
18235
18236 * check-init.c: New file. Checks for definite assignment.
18237 * Makefile.in (JAVA_OBJS): Add check-init.o.
18238 * parse.y (java_complete_expand_method): Call check_for_initialization.
18239 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
18240
18241 1999-01-06 Graham <grahams@rcp.co.uk>
18242
18243 * parse.y : include system.h instead of including
18244 standard headers directly with the exception of <dirent.h>.
18245
18246 1999-01-06 Per Bothner <bothner@cygnus.com>
18247
18248 * lex.h: Moved static function declarations to lex.c,
18249 to shut up some -Wall warnings.
18250 * lex.c: Static function declarations moved here.
18251 * jcf-dump.c: Small fixes to shut up -Wall warnings.
18252
18253 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18254
18255 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
18256
18257 1998-12-22 Per Bothner <bothner@cygnus.com>
18258
18259 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
18260 * verify.c (verify_jvm_instructions): Fix off-by-one error.
18261
18262 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
18263 (localvar_alloc): Change return type to void,
18264 (emit_unop): Remove unused variable size.
18265
18266 * jcf-write.c (struct jcf_block): Add new union.
18267 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
18268 (call_cleanups): New functions.
18269 (struct jcf_partial): New fields num_finalizers and return_value_decl.
18270 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
18271 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
18272 * lang.c (lang_init): Call using_eh_for_cleanups.
18273 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
18274 completing operands to patch_synchronized_statement.
18275 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
18276 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
18277 WITH_CLEANUP_EXPR instead of TRY_EXPR.
18278
18279 1998-12-20 John F. Carr <jfc@mit.edu>
18280
18281 * Make-lang.in: Comment out control-Ls; they upset some makes.
18282
18283 1998-12-18 Tom Tromey <tromey@cygnus.com>
18284
18285 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
18286 consistently.
18287
18288 1998-12-17 Tom Tromey <tromey@cygnus.com>
18289
18290 * parse.y (DIR_SEPARATOR): New define.
18291 (check_class_interface_creation): Use it.
18292
18293 * parse-scan.y (report_main_declaration): Recognize
18294 `java.lang.String' in argument to main.
18295
18296 1998-12-16 Per Bothner <bothner@cygnus.com>
18297
18298 * parse.y (create_interface): Remove bogus test.
18299
18300 1998-12-16 Per Bothner <bothner@cygnus.com>
18301
18302 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
18303 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
18304
18305 1998-12-16 Tom Tromey <tromey@cygnus.com>
18306
18307 * parse-scan.y (qualified_name): Use correct sprintf format.
18308
18309 1998-12-15 Tom Tromey <tromey@cygnus.com>
18310
18311 * gjavah.c (print_field_info): Changed how most negative number is
18312 printed.
18313
18314 1998-12-14 Per Bothner <bothner@cygnus.com>
18315
18316 * parse.y (fold_constant_for_init): New function.
18317 (resolve_expression_name): Don't replace static final
18318 constant-initialized fields by its value.
18319 (java_complete_lhs): New. Same as java_complete_tree, except does
18320 not replace static final constant-initialized fields by their values.
18321 (register_fields): If there is an initializer, set DECL_INITIAL and
18322 MODIFY_EXPR_FROM_INITIALIZATION_P.
18323 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
18324 Only call patch_initialized_static_field if
18325 MODIFY_EXPR_FROM_INITIALIZATION_P.
18326 (patch_initialized_static_field): If not valid constant, clear
18327 DECL_INITIAL.
18328
18329 * parse.y (lookup_field_wrapper): Fix thinko.
18330
18331 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
18332 set and restore global lineno.
18333
18334 1998-12-14 Tom Tromey <tromey@cygnus.com>
18335
18336 * gjavah.c (print_field_info): If value to print is the smallest
18337 value of its size, then print as hex to avoid later warnings from
18338 C++ compiler.
18339
18340 1998-12-14 Tom Tromey <tromey@cygnus.com>
18341
18342 * gjavah.c (decompile_method): Decompile `return null'.
18343 (process_file): Generate `#pragma interface'.
18344 (method_declared): New global.
18345 (print_method_info): Set it.
18346 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
18347 (print_method_info): Handle abstract methods.
18348
18349 1998-12-13 Per Bothner <bothner@cygnus.com>
18350
18351 * parse.y (patch_method_invocation): If class_decl is null
18352 (e.g. an array type), use original type.
18353
18354 * parse.y (check_thrown_exceptions): Temporary hack to suppress
18355 errors about uncaught exception from clone (of array, specifically).
18356
18357 1998-12-13 Tom Tromey <tromey@cygnus.com>
18358
18359 * gjavah.c (decompile_method): Handle all types of `return'
18360 opcode. Decompile `return this' and `return'.
18361 (method_access): New global.
18362 (print_method_info): Set it.
18363 (decompile_method): Don't decompile a synchronized method.
18364
18365 1998-12-13 Tom Tromey <tromey@cygnus.com>
18366
18367 * jcf-reader.c (jcf_parse_one_method): Recognize
18368 HANDLE_END_METHOD.
18369 * gjavah.c (HANDLE_END_METHOD): New macro.
18370 (HANDLE_CODE_ATTRIBUTE): New macro.
18371 (decompile_method): New function.
18372 (print_method_info): Don't print `;\n' at end of function decl.
18373 Include java-opcodes.h.
18374 (decompiled): New global.
18375
18376 1998-12-12 Per Bothner <bothner@cygnus.com>
18377
18378 * class.c (build_class_ref): Handle PRIMTYPE.class if
18379 flag_emit_class_files.
18380 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
18381 if flag_emit_class_files.
18382 * parse.y (java_complete_tree): Pre-liminary support for
18383 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
18384
18385 * parse.y (patch_synchronized_statement): Don't call monitorexit
18386 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
18387
18388 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
18389
18390 * zipfile.h (opendir_in_zip): New declaration.
18391 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
18392 (opendir_in_zip): New function, using code from open_in_zip.
18393 (open_in_zip): Call opendir_in_zip.
18394 (find_class): Remove no-longer-used do_class_file parameter,
18395 but add source_ok parameter. Change logic so if we find a .java file,
18396 we don't look for .class in later classpath emtries.
18397 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
18398 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
18399 * gjavah.c: Update call to find_class.
18400 * jcf-dump.c: Likewise.
18401
18402 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
18403 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
18404 nothing if body is empty_stmt_node.
18405 Various little fixes so SP gets correctly adjusted.
18406 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
18407 For CALL_EXPR, test if static first.
18408 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
18409 such as the ones we create for Object and Class.
18410 Set and restore current_function_decl.
18411 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
18412 (note_possible_classname): New function.
18413 (read_import_entry): Removed. Merged with read_import_dir.
18414 (read_import_dir): Don't call find_class - that only gives us
18415 the first classpath entry having the needed package.
18416 Use the struct buffer data structure from buffer.h.
18417 (read_import_dir, find_in_imports_on_demand): The remembered
18418 class names now use '.' (not '/') as package separator.
18419
18420 * parse.y (java_complete_expand_methods): Call write_classfile
18421 here, and not in java_expand_classes (which only gets first class).
18422
18423 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
18424
18425 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
18426 (register_fields): If a static fields has an initializer, just
18427 chain it on ctxp->static_initialized, and handle later.
18428 (java_complete_expand_methods): Force <clinit> first.
18429 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
18430 - it's already been completed.
18431 (patch_initialized_static_field): New function.
18432 (java_complete_field): Call it.
18433
18434 1998-12-12 Per Bothner <bothner@cygnus.com>
18435
18436 * expr.c (encode_newarray_type, build_new_array): New functions.
18437 * java-tree.h: Declare build_new_array.
18438 * jcf-write.c (patch_newarray): Use build_new_array.
18439
18440 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
18441 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
18442
18443 * parse.y (patch_new_array_init): Re-organize.
18444 Now is passed the actual array (pointer) type of the value.
18445 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
18446 (patch_array_constructor): Removed - merged into patch_new_array_init.
18447 (java_complete_tree): Update patch_new_array_init.
18448
18449 * jcf-write.c (find_constant_index): New function.
18450 (generate_bytecode_insns): Use find_constant_index.
18451 (generate_classfile): Use find_constant_index for ConstantValue.
18452
18453 1998-12-11 Tom Tromey <tromey@cygnus.com>
18454
18455 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
18456 * decl.c (init_decl_processing): Renamed dtable -> vtable.
18457 * class.c (make_class_data): Renamed dtable -> vtable, and
18458 dtable_method_count -> vtable_method_count.
18459
18460 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18461
18462 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
18463 global variables, initialized.
18464 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
18465 Declared new global variables.
18466 * lex.c (java_lex): Return long_zero_node, float_zero_node,
18467 double_zero_node, integer_zero_node upon direct matching.
18468 * parse.y (purify_type_name): Added function prototype.
18469 (duplicate_declaration_error_p): Consider new_type as potentially
18470 being a incomplete type. Use purify_type_name on type string.
18471 (method_header): saved_type: unused variable removed. Don't figure
18472 return type if method name is invalid.
18473 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
18474 processed by patch_unaryop.
18475 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
18476 increment/decrement node into its original type after binary
18477 numeric promotion on its operands.
18478
18479 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18480
18481 * parse.y (array_initializer:): Array init operand is NULL_TREE
18482 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
18483 now an error. Fixed indentation problems.
18484 (patch_string): Handle error_mark_node as an argument.
18485 (patch_new_array_init): Fixed indentation problems.
18486 (array_constructor_check_entry): Removed check on null wfl_value.
18487 Return an error if wfl_value's walk returns an error.
18488
18489 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
18490
18491 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
18492 * lex.c (java_lex): Remember column position before advancing one
18493 token. Retain location information on OCB_TK.
18494 * lex.h (typedef struct java_lc): Added new field.
18495 * parse.h (GET_SKIP_TYPE): New macro.
18496 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
18497 * parse.y (build_new_array_init, patch_new_array_init,
18498 patch_array_constructor, maybe_build_array_element_wfl,
18499 array_constructor_check_entry): New function prototypes.
18500 (switch_block:): Tagged <node>.
18501 (OCB_TK): Tagged <operator>.
18502 (array_initializer:): Installed actions.
18503 (variable_initializer): Build location information on element if
18504 necessary.
18505 (switch_statement:): Fixed indentation typo.
18506 (switch_block:): Redefined default action.
18507 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
18508 (patch_assignment): Removed duplicate code.
18509 (maybe_build_array_element_wfl, build_new_array_init,
18510 patch_new_array_init, patch_array_constructor,
18511 array_constructor_check_entry): New functions.
18512
18513 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
18514
18515 * parse.y (array_initializer): Tagged <node>.
18516 (variable_initializer:): Use default rule.
18517 (array_initializer:): Defined actions.
18518 (variable_initializers:): Likewise.
18519 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
18520 non-static field accesses.
18521 (patch_invoke): Fixed indentation typo.
18522 (java_complete_tree): Likewise.
18523 (build_labeled_block): Changed leading comment. Generate an error
18524 in case of duplicate loop labels.
18525 (patch_conditional_expr): Patch results of string concatenation
18526 operations.
18527
18528 1998-12-06 Per Bothner <bothner@cygnus.com>
18529
18530 * constants.c (find_methodref_index): When the class is an interface,
18531 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
18532
18533 * decl.c (finit_identifier_node): Use "$finit$", rather than
18534 "<finit>" (which Sun's verifier rejects).
18535 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
18536 (generate_field_initialization_code): Removed.
18537 (fix_constructors) Don't add call to $finit$ here (wrong order).
18538 (patch_method_invocation): Add $finit$ call here.
18539
18540 * java-tree.h (CALL_USING_SUPER): New macro.
18541 * parse.y (patch_invoke): Remove im local variable.
18542 (patch_method_invocation, patch_invoke): Don't pass super parameter.
18543 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
18544 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
18545
18546 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
18547
18548 * parse.y (java_complete_tree): Don't complain about unreachable
18549 statement if it is empty_stmt_node.
18550
18551 * jcf-write.c (find_constant_wide): New function.
18552 (push_long_const): Use find_constant_wide.
18553
18554 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
18555 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
18556 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
18557 Emit invokeinterface when calling an interface method.
18558 Emit invokespecial also when calling super or private methods.
18559
18560 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
18561
18562 1998-12-06 Per Bothner <bothner@cygnus.com>
18563
18564 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
18565
18566 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
18567
18568 * java-tree.h (java_layout_seen_class_methods): New function
18569 prototype.
18570 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
18571 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
18572 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
18573 * parse.y (method_declarator:): Defined action.
18574 (issue_warning_error_from_context): input_filename saved, set to
18575 the appropriate value and restored after java_error is called.
18576 (build_unresolved_array_type): Fixed comment.
18577 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
18578 (method_header): Deal with return type the same way type are
18579 handled for fields and method's parameters and local variables
18580 types are handled.
18581 (check_method_redefinition): Removed extra CR.
18582 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18583 (java_layout_seen_class_methods): New function.
18584 (java_layout_classes): Call java_layout_seen_class_methods.
18585
18586 1998-12-03 Per Bothner <bothner@cygnus.com>
18587
18588 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
18589
18590 1998-12-03 Per Bothner <bothner@cygnus.com>
18591
18592 * jcf-dump.c (main): Fix error message.
18593 * jcf-path.c (add_entry): Style fix.
18594
18595 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
18596
18597 * class.c (layout_class_method): Call build_java_argument_signature
18598 on constructors too.
18599 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18600 (patch_method_invocation): Define a primary when resolving an
18601 expression name. Augmented comment on code checking illegal `this'
18602 usage. Loosened it test by accepting NEW_CLASS_EXPR.
18603
18604 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
18605
18606 * class.c (layout_class_method): Don't report error on non-static
18607 overriding static if the method is private.
18608 * java-tree.h (finish_class): Prototype added.
18609 * lex.c (java_get_line_col): Handle col argument -2 value.
18610 * parse.h: All static method declarations moved to parse.y.
18611 * parse.y: Now contains all static method declarations previously
18612 found in parse.h.
18613 (find_expr_with_wfl, missing_return_error,
18614 unreachable_stmt_error): New functions.
18615 (java_get_real_method_name): Identify constructors bearing class
18616 names in source code compiled classes only.
18617 (java_complete_expand_methods): Call missing_return_error.
18618 (invocation_mode): Private methods invoked as static methods.
18619 (java_complete_tree): Call unreachable_stmt_error.
18620
18621 1998-12-01 Tom Tromey <tromey@cygnus.com>
18622
18623 * Makefile.in (+target): Removed.
18624 (+xmake_file): Likewise.
18625 (+tmake_file): Likewise.
18626 (.NOEXPORT): Removed duplicate.
18627
18628 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18629
18630 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18631
18632 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
18633
18634 * jvgenmain.c: Remove the xmalloc prototype, we get it from
18635 libiberty.h. Provide an xmalloc definition.
18636
18637 * jvspec.c: Remove the xmalloc prototype.
18638
18639 * parse-scan.y: Include config.h and system.h. Don't include
18640 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
18641 Provide an xstrdup definition.
18642
18643 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
18644
18645 * jcf-path.c (add_entry): Recognize ".jar" too.
18646 * lang-specs.h: Likewise.
18647
18648 1998-11-26 Per Bothner <bothner@cygnus.com>
18649
18650 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
18651 soft_monitorenter_node, soft_monitorexit_node, throw_node.
18652
18653 * jcf-write.c (generate_bytecode_insns):
18654 Handle pre/post-increment/decrement of long.
18655
18656 * jcf-write.c (generate_bytecode_insns):
18657 Handle missing exception handler (finally for synchronized).
18658
18659 1998-11-25 Per Bothner <bothner@cygnus.com>
18660
18661 * java-tree.h (end_params_node): Declare global.
18662 * decl.c (end_params_node): New global.
18663 (init_decl_processing, start_java_method): Use end_params_node for
18664 end of list of parameter types. Follows correct gcc conventions.
18665 * expr.c (pop_argument_types, pop_arguments): Likewise.
18666 * lang.c (put_decl_node): Likewise.
18667 * typeck.c (various places): Likewise.
18668 * class.y (various places): Likewise.
18669 * parse.y (various places): Likewise.
18670
18671 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
18672 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
18673
18674 * class.c: Add #include flags.h, remove no-longer needed declaration.
18675
18676 * class.c (layout_class_method): Remove commented-out code, re-format.
18677 Don't add vtable entry (or index) for private methods.
18678 * expr.c (expand_invoke): A private method is implicitly final.
18679 * class.c (make_class_data): If inlining or optimizing,
18680 skip private methods.
18681
18682 * class.c (finish_class): New function. Calls existing methods,
18683 but alls emits deferred inline functions.
18684 * jcf-parse.c (parse_class_file): Call finish_class.
18685 * parse.y (java_complete_expand_methods): Likewise.
18686
18687 * expr.c (build_java_binop): Explicit default, to silence -Wall.
18688
18689 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
18690
18691 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
18692
18693 * jcf-write.c (generate_bytecode_conditional): Fix typo.
18694
18695 1998-11-24 Per Bothner <bothner@cygnus.com>
18696
18697 * (generate_classfile): Always write class access flag with
18698 ACC_SUPER set.
18699
18700 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
18701
18702 * class.c (maybe_layout_super_class): New function.
18703 (layout_class): Reorganized. Loop on class methods dispatched into
18704 a new function. Call maybe_layout_super_class.
18705 (layout_class_methods, layout_class_method): New functions.
18706 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18707 class.
18708 (expand_invoke): Likewise.
18709 * java-tree.h (all_class_list): New global variable declared.
18710 (layout_class_methods, layout_class_method): New function
18711 prototypes.
18712 (LAYOUT_SEEN_CLASS_METHODS): New macro.
18713 * jcf-parse.c (all_class_list): New global variable.
18714 (load_class): Extended what class_or_name can be. Use parser
18715 context mechanism to save globals before calling jcf_parse.
18716 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18717 is set on the file name.
18718 (jcf_parse): Layout class methods when Object is loaded, otherwise
18719 record class in all_class_list for delayed method layout.
18720 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18721 * lang.c (put_decl_node): Decode <init> into the decl context
18722 class name.
18723 * lex.c (java_allocate_new_line): Use xmalloc.
18724 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18725 pointers, not TREE_LIST elements.
18726 (struct parser_ctxt): Fixed comment indentations, added comments
18727 and reordered some fields.
18728 (java_check_methods): Function prototype removed.
18729 * parse.y (java_push_parser_context): Use xmalloc.
18730 (java_parser_context_restore_global): Pop extra pushed ctxp only
18731 when there's nothing next.
18732 (maybe_create_class_interface_decl): Fixed comment, add new
18733 created class decl to all_class_list.
18734 (method_header): Use GET_REAL_TYPE on argument's types.
18735 (method_declarator): Use GET_REAL_TYPE, change type to the real
18736 type in TREE_LIST dependency node. Build argument list with the
18737 real type.
18738 (create_jdep_list): Use xmalloc. Removed allocation error message.
18739 (obtain_incomplete_type): Fixed leading comment. Broadened
18740 incoming argument meaning.
18741 (register_incomplete_type): Use xmalloc. Removed allocation error
18742 message.
18743 (safe_layout_class): Fixed leading comment.
18744 (jdep_resolve_class): Reversed if statement condition and switch
18745 if and else bodies.
18746 (resolve_and_layout): Fixed leading comment. Broadened incoming
18747 argument meaning.
18748 (complete_class_report_errors): New local variable name, for
18749 clarity. purify_type_name used for all error cases.
18750 (java_get_real_method_name): Stricter check on constructors.
18751 (java_check_regular_methods): Reverse methods list only if not
18752 already laid out. Layout artificial constructor.
18753 (java_check_methods): Deleted.
18754 (source_start_java_method): Obtain incomplete type for patchable
18755 method arguments.
18756 (java_layout_classes): Fixed leading comment. Use
18757 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18758 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18759 before returning. Fixed comments.
18760 (java_expand_classes): Check for errors up front.
18761 (patch_method_invocation): Class to search is resolved and laid
18762 out.
18763
18764 1998-11-24 Per Bothner <bothner@cygnus.com>
18765
18766 * expr.c (java_lang_expand_expr): Add missing emit_queue.
18767
18768 * javaop.h (int8): Removed - not used.
18769 (jbyte): Redefine portably with correct signedness.
18770
18771 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
18772
18773 * jcf-write.c (generate_bytecode_insns): Fix typo
18774 OPCODE_getstatic to OPCODE_getfield.
18775
18776 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
18777 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
18778 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18779
18780 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
18781
18782 * jcf-parse.c (jcf_parse_source): Function returned type is
18783 void. Added prototype.
18784 (jcf_parse): Function returned type is void.
18785 (yyparse): Remove call to fclose on the last parsed file.
18786
18787 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18788
18789 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
18790
18791 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18792 (layout_class): Cope with methods featuring WFL in decl names.
18793 * decl.c (unqualified_object_id_node): New global variable,
18794 initialized.
18795 (build_decl_no_layout): Removed.
18796 * expr.c (build_primtype_type_ref): Handle Double.
18797 (java_lang_expand_expr): Fixed indentations.
18798 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18799 (flag_wall, flag_redundant, flag_not_overriding,
18800 flag_static_local_jdk1_1, unqualified_object_id_node): Global
18801 variable declarations.
18802 (build_decl_no_layout): Removed prototype.
18803 (java_get_real_method_name): Added prototype.
18804 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18805 (java_parse_abort_on_error): Macro now just returns.
18806 * jcf-parse.c (jcf_parse_source): Check fclose returned
18807 value. Call emit_register_classes if java_report_errors returns
18808 zero.
18809 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18810 flag_static_local_jdk1_1): New integer flags.
18811 (lang_decode_option): New flags set here.
18812 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18813 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18814 the flag_redundant variable.
18815 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18816 when parsing java.lang.Object class.
18817 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18818 NULL_TREE to build.
18819 (resolve_qualified_expression_name): Fixed indentation.
18820 (patch_array_ref): Changed prototype.
18821 (not_initialized_as_it_should_p): Prototype removed.
18822 (java_report_errors): Added function prototype.
18823 * parse.y (formal_parameter:): Changed error message for not yet
18824 supported final parameters.
18825 (class_type_list:): Set both PURPOSE and VALUE of created
18826 TREE_LIST to be class_type.
18827 (primary_no_new_array:): Handle class literals on primitive types.
18828 (parse_warning_context): Reinstalled correct force_error and
18829 do_warning flags setups.
18830 (java_report_errors): Changed prototype. Return java_error_count
18831 value.
18832 (variable_redefinition_error): Consider treating variable type as
18833 a fake pointer.
18834 (create_interface): Warn about redundant abstract modifier if
18835 flag_redundant is set. Changed error message.
18836 (lookup_field_wrapper): Save/restore globals before/after looking
18837 up field.
18838 (duplicate_declaration_error_p): Consider treating declaration
18839 type as a fake pointer.
18840 (register_fields): Extract real type from dependency node. Check
18841 for duplicate field declaration after type adjustment. Use
18842 DECL_INITIAL to store static final initialized values.
18843 (method_header): Extract real function type from dependency node.
18844 (check_abstract_method_header): Use GET_METHOD_NAME.
18845 (obtain_incomplete_type): Layout fake pointer type.
18846 (safe_layout_class): Don't try to check for methods before layout.
18847 (java_complete_class): Don't check for correct throws clause
18848 elements inheritance here.
18849 (resolve_and_layout): Broadened name parameter meaning.
18850 (reset_method_name): Use GET_METHOD_NAME.
18851 (java_get_real_method_name): New function.
18852 (java_check_regular_methods): Don't check methods in
18853 java.lang.Object. Verify lineage of throws clause elements. Use
18854 flag_no_overriding in warning report.
18855 (check_throws_clauses): Don't check if class was from
18856 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18857 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18858 (declare_local_variables): Use flag_static_local_jdk1_1 to report
18859 warning on unsupported final local variables. Use build_decl
18860 instead of build_decl_no_layout. Get real local variable type from
18861 dependency node.
18862 (source_start_java_method): Get real parameter type from
18863 dependency node. Call build_decl instead of build_decl_no_layout.
18864 (java_layout_classes): Reverse tree and layout type and class as
18865 required. Mark class as loaded when done.
18866 (resolve_field_access): Fixed indentation. Restricted condition
18867 leading to static field access code generation. Set field_type
18868 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18869 (resolve_qualified_expression_name): Initialize type_found to
18870 null. Handle static field resolved during qualification. Fixed
18871 layout on non primitive field decl types.
18872 (not_accessible_p): Fixed typo in comment.
18873 (patch_method_invocation): Resolve and layout class to search from
18874 type.
18875 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18876 layout non primitive type, if necessary. Make method node only to
18877 report errors.
18878 (find_applicable_accessible_methods_list): Consider WFL'ed method
18879 decl names. Fixed indentation.
18880 (argument_types_convertible): Resolve and layout target type if
18881 necessary.
18882 (java_complete_tree): Fixed indentation problems. Rewrote
18883 CALL_EXPR thrown exceptions check. Re-installed further processing
18884 of the assignment in certain cases.
18885 (patch_assignment): Call maybe_build_primttype_type_ref to perform
18886 inlining on class literals.
18887 (valid_builtin_assignconv_identity_widening_p): Cope with constant
18888 0 literal.
18889 (valid_method_invocation_conversion_p): Likewise.
18890 (patch_string): Temporary disable forbidden use of `this' in
18891 explicit constructor invocations when doing string concatenation
18892 within their scope.
18893 (patch_unaryop): Added comment. Reinstalled code to disable
18894 further check on assignment operation with cast expression RHS.
18895 (patch_switch_statement): Fixed indentation.
18896 (build_try_statement): Call build_decl instead of
18897 build_decl_no_layout.
18898 (patch_synchronized_statement): Likewise.
18899 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
18900 IS_UNCHECKED_EXPRESSION_P.
18901 (check_thrown_exceptions_do): Changed leading comment. Resolve and
18902 layout argument exception type.
18903 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
18904 of IS_UNCHECKED_EXPRESSION_P.
18905
18906 1998-11-18 Anthony Green <green@cygnus.com>
18907
18908 * jcf-parse.c (yyparse): Open class file in binary mode.
18909
18910 1998-11-15 Per Bothner <bothner@cygnus.com>
18911
18912 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
18913
18914 * jcf-write.c (perform_relocations): Move check out one loop.
18915
18916 1998-11-15 Anthony Green <green@hoser.cygnus.com>
18917
18918 * Make-lang.in: Fix reference to srcdir.
18919 * jv-scan.c: Add missing xmalloc prototype.
18920 * jvgenmain.c: Ditto.
18921
18922 1998-11-15 Per Bothner <bothner@cygnus.com>
18923
18924 * decl.c (error_mark_node), java-tree.h: New global.
18925 * parse.y: Use empty_stmt_node instead of size_zero_node.
18926 (build_if_else_statement): If missing else, use empty_stmt_node.
18927
18928 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
18929 (java_complete_expand_method): Complain if return is missing.
18930 (java_check_regular_methods): Comment out incorrect error check.
18931 (not_accessible_p): Fix incorrect handling of protected methods.
18932 (patch_method_invocation): Pass correct context to not_accessible_p.
18933 (find_applicable_accessible_methods_list): Likewise.
18934 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
18935 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
18936 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
18937 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
18938
18939 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
18940 (push_int_const): Remove reundant NOTE_PUSH.
18941 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
18942 (- case SWITCH_EXPR): Fix code generation bug.
18943 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
18944 (generate_classfile): More robust for abstract methods.
18945
18946 1998-11-15 Anthony Green <green@cygnus.com>
18947
18948 * Makefile.in: jv-scan and jvgenmain all require libiberty.
18949 * Make-lang.in: Ditto.
18950
18951 * jv-scan.c: Remove xmalloc and xstrdup definitions.
18952 * jvgenmain: Ditto.
18953
18954 1998-11-15 Per Bothner <bothner@cygnus.com>
18955
18956 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
18957
18958 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
18959
18960 1998-11-14 Per Bothner <bothner@cygnus.com>
18961
18962 Allow uses of interface types to verify. This is not really
18963 type-safe, but it matches what Sun does, and is OK as long as
18964 there are appropriate run-time checks.
18965 * verify.c (merge_types): If merging two interface types,
18966 just set the result to java.lang.Object.
18967 * expr.c (pop_type): Any interface is matches by java.lang.Object.
18968
18969 1998-11-13 Tom Tromey <tromey@cygnus.com>
18970
18971 * gjavah.c (main): Handle --output-class-directory argument.
18972 * jvspec.c (lang_specific_driver): Translate `-d' into
18973 -foutput-class-dir.
18974 * jcf.h (jcf_write_base_directory): Declare.
18975 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18976 * lang-options.h: Mention -foutput-class-dir.
18977 * jcf-write.c (jcf_write_base_directory): New global.
18978 (make_class_file_name): Put generated .class file into `-d'
18979 directory, or into source directory if -d not given. Function now
18980 static.
18981 (write_classfile): Free class file name. Handle case where class
18982 file name is NULL.
18983 (DIR_SEPARATOR): New macro.
18984 Include <sys/stat.h>
18985
18986 * Makefile.in (prefix): New macro.
18987
18988 1998-11-12 Per Bothner <bothner@cygnus.com>
18989
18990 * parse.y (patch_invoke): Do less if flag_emit_class_files.
18991 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
18992 here (done in patch_invoke instead).
18993 (case_identity): Moved here from parse.y.
18994
18995 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
18996 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
18997 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
18998 so they can be efficiently scanned without recursion.
18999 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
19000 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
19001 in BLOCK iteratively, rather than recursively.
19002
19003 * parse.y (do_unary_numeric_promotion): New function.
19004 (patch_unaryop, patch_binop, patch_array_ref): Use it.
19005
19006 * parse.y (patch_newarray): Various fixes.
19007
19008 Re-do handling of switch statements (for proper block scoping).
19009 * parse.y: Add just a single block for the enture switch block,
19010 but don't create any "case blocks".
19011 (group_of_labels): Rmeoved unneeded non-terminal.
19012 CASE_EXPR and DEFAULT_EXPR are added to current block.
19013 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
19014 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
19015 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
19016 * parse.y (wfl_operator, print_int_node): Make non-static.
19017 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
19018 as part of recursive scan of block.
19019 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
19020 (patch_switch_statement): Most tests move dinto java_complete_tree.
19021
19022 * parse.y: Make various production be non-typed (void).
19023 * parse.y (parse_error): Merged into issue_warning_error_from_context.
19024 * parse.y (add_stmt_to_compound): Don't create/change extra node.
19025 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
19026
19027 * jcf-write.c (struct jcf_handler): New type.
19028 (struct jcf_switch_state): New type.
19029 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
19030 (alloc_handler, emit_unop, emit_reloc): New functions.
19031 (adjust_typed_op): Add extra parameter ("max type" offset).
19032 (emit_switch_reloc, emit_case-reloc): New function.
19033 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
19034 (generate_bytecode_insns): Support REAL_CST, switch statements,
19035 exception handling, method calls, object/array creation, and more.
19036
19037 * class.c: Remove some unused variables.
19038 * constants.c (find_string_constant): New function.
19039 (count_constant_pool_bytes): Fix to correctly handle wide constants.
19040 * decl.c (complete_start_java_method): Don't _Jv_InitClass
19041 if flag_emit_class_files.
19042
19043 1998-11-12 Tom Tromey <tromey@cygnus.com>
19044
19045 * jcf-io.c (find_class): Added explanatory comment.
19046
19047 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
19048 trailing slash to `.zip' entries.
19049
19050 * jvspec.c (lang_specific_driver): Correctly handle case where
19051 GC_NAME not defined.
19052
19053 1998-11-11 Tom Tromey <tromey@cygnus.com>
19054
19055 * jvspec.c (GC_NAME): New define.
19056 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
19057 if required.
19058 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
19059
19060 1998-11-11 Per Bothner <bothner@cygnus.com>
19061
19062 * jcf-dump.c (TABLE_SWITCH): Fix typos.
19063
19064 1998-11-11 Tom Tromey <tromey@cygnus.com>
19065
19066 * jcf-dump.c (main): Correctly recognize `--'-style long options.
19067
19068 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
19069
19070 * class.c (is_compiled_class): Call safe_layout_class for class
19071 compiled from source.
19072 * conver.h (convert_to_integer, convert_to_real,
19073 convert_to_pointer): Added prototypes.
19074 * decl.c (init_decl_processing): Non longer push the decls of
19075 `methodtable', `constants', `Class', `Field', `dispatchTable'
19076 `jexception' and `Method'.
19077 * expr.c (build_invokeinterface): New function.
19078 (expand_invoke): static variable CLASS_IDENT now in
19079 build_invokeinterface. Use build_invokeinterface.
19080 (expand_java_field_op): Moved code to inline
19081 java.lang.PRIMTYPE.TYPE into a function.
19082 (build_primtype_type_ref): New function.
19083 * java-tree.def (INSTANCEOF_EXPR): New tree code.
19084 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
19085 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
19086 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
19087 (DECL_LOCAL_STATIC_VALUE): New macro.
19088 (build_invokeinterface, build_primtype_type_ref): New function
19089 prototypes.
19090 (java_parse_abort_on_error): Macro rewritten.
19091 * jcf-parse.c (current_method): Add comment to declaration.
19092 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
19093 Function prototypes fixed.
19094 (jcf_parse_source): push/pop parser context. save/restore global.
19095 (parse_source_file): Fixed leading comment. Now take a
19096 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
19097 classes and pop the parser context anymore.
19098 (yyparse): Push parser context, save globals, parse the source
19099 file, restore globals and pop the parser context when processing a
19100 source file.
19101 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
19102 * lex.c (java_parse_doc_section): New function.
19103 (java_lex): Call java_parse_doc_section when appropriate. Build an
19104 operator around INSTANCEOF_TK.
19105 * lex.h (java_lineterminator, java_sprint_unicode,
19106 java_unicode_2_utf8, java_lex_error, java_store_unicode):
19107 Prototypes rewritten.
19108 (java_parse_escape_sequence, java_letter_or_digit_p,
19109 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
19110 java_read_unicode, java_store_unicode, java_read_char,
19111 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
19112 Added function prototypes.
19113 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
19114 define.
19115 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
19116 New macros
19117 (struct parser_ctxt): New fields: deprecated,
19118 current_parsed_class_un, gclass_list.
19119 (fix_method_argument_names, issue_warning_error_from_context,
19120 resolve_package, lookup_package_type): New function prototypes.
19121 (resolve_expression_name): Fixed function prototype.
19122 (find_applicable_accessible_methods_list): Fixed indentation, added
19123 extra argument in prototype.
19124 (check_final_assignment, build_null_of_type, check_deprecation,
19125 check_method_redefinition, reset_method_name,
19126 java_check_regular_methods, java_check_abstract_methods,
19127 maybe_build_primttype_type_ref): New function prototype.
19128 * parse.y (conver.h): Include.
19129 (INSTANCEOF_TK): Tagged <operator>.
19130 (single_type_import_declaration): Use REGISTER_IMPORT macro.
19131 (relational_expression:): Build binop for instanceof.
19132 (java_push_parser_context): Remember ctxp->gclass_list across
19133 contexts.
19134 (java_pop_parser_context): Simply return if no context
19135 exists. Remember gclass_list across contexts.
19136 (issue_warning_error_from_context): New function.
19137 (parse_error_context): Don't setup ctxp->elc here. Call
19138 issue_warning_error_from_context instead.
19139 (parse_warning_context): Likewise.
19140 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
19141 setup. Link new class/interface to ctxp->gclass_list.
19142 (add_superinterfaces): Register interface as incomplete if not
19143 loaded.
19144 (create_class): Remember class unqualified name in
19145 ctxp->current_parsed_class_un. Check class deprecation.
19146 (register_fields): Check field deprecation. Remember static final
19147 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
19148 processing INIT.
19149 (method_header): New local variable ORIG_ARG. Use unqualified
19150 current class name for check on constructor errors. Promote return
19151 type if of record type. Argument list fix moved in
19152 fix_method_argument_names, called here. Check method deprecation.
19153 (fix_method_argument_names): New function.
19154 (method_declarator): Promote record typed arguments.
19155 (safe_layout_class): Check class methods before layout.
19156 (java_complete_class): Compute field layout when patched.
19157 (do_resolve_class): Try to load class after having it renamed
19158 after the package name.
19159 (get_printable_method_name): Use DECL_CONTEXT.
19160 (reset_method_name): New function.
19161 (check_method_redefinition): Use reset_method_name.
19162 (java_check_regular_methods): New local variable
19163 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
19164 names for error report. Check for compile-time error when method
19165 found has default (package) access.
19166 (java_check_abstract_methods): Now takes an interface DECL node as
19167 an argument. Also reinstall real name on unchecked
19168 overriding/hiding methods for error report.
19169 (java_check_methods): Fixed leading comment. Get classes to verify
19170 from ctxp->gclass_list. Use CHECK_METHODS macro and set
19171 CLASS_METHOD_CHECKED_P on class verification.
19172 (lookup_java_method2): Get real method name if necessary.
19173 (find_in_imports): Don't check package class access here.
19174 (resolve_package, lookup_package_type): New functions.
19175 (java_layout_classes): Fixed leading comment. Take classes to be
19176 laid out from ctxp->gclass_list.
19177 (java_complete_expand_methods): Don't expand native and abstract
19178 methods.
19179 (java_expand_classes): New function.
19180 (resolve_expression_name): Use additional argument ORIG. Retrieve
19181 values of static final field of primitive types.
19182 (resolve_field_access): Handles static final field of promotive
19183 type.
19184 (resolve_qualified_expression_name): Handle STRING_CST as
19185 primaries and package name resolution. Check deprecation on found
19186 decls. Set where_found and type_found on non static field resolved
19187 during qualification. Layout non primitive field decl types.
19188 (check_deprecation): New function.
19189 (maybe_access_field): Simplified.
19190 (patch_method_invocation_stmt): Local variable CLASS_TYPE
19191 removed. Reverse method's argument when primary is a type. Don't
19192 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
19193 instead. Include abstract class in the list of class searchable
19194 for constructors. Use DECL_CONTEXT of found method for access
19195 checks. Check method deprecation.
19196 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
19197 converting arguments. Handle INVOKE_INTERFACE.
19198 (lookup_method_invoke): Search constructor using existing
19199 infrastructure (don't rely on lookup_java_constructor anymore).
19200 (find_applicable_accessible_methods_list): Extra argument flag
19201 LC. Now include constructor in the search.
19202 (qualify_ambiguous_name): Conditional expression are primaries.
19203 (not_initialized_as_it_should_p): static final are always
19204 initialized.
19205 (java_complete_tree): Pass extra NULL argument to
19206 resolve_expression_name. Stricter test to carry on patching
19207 assignments. New case for INSTANCEOF_EXPR.
19208 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
19209 (check_final_assignment, maybe_build_primttype_type_ref): New
19210 functions.
19211 (patch_assignment): Detect resolved static finals and carry normal
19212 assignment error check on them. Inline PRIMTYPE.TYPE read access.
19213 (try_builtin_assignconv): Access constant 0 on all primitive
19214 types.
19215 (valid_builtin_assignconv_identity_widening_p): Accept identical
19216 types. Accept all promoted type on int type.
19217 (valid_ref_assignconv_cast_p): Accept a null pointer to be
19218 assigned to a reference.
19219 (valid_method_invocation_conversion_p): Accept to check null
19220 pointers.
19221 (build_binop): Merge declaration and initialization of local
19222 variable BINOP.
19223 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
19224 numeric types. Improved validity test for qualify operators on
19225 references.
19226 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
19227 and PREINCREMENT_EXPR. Also detect resolved static finals of a
19228 primitive type and issue the appropriate error message.
19229 (resolve_type_during_patch): Mark class loaded when resolved.
19230 (patch_cast): Allow null to be cased to reference types.
19231 (build_null_of_type): New function.
19232 (patch_array_ref): Handle array on references correctly.
19233 (patch_return): Removed unused local variable MODIFY. Force
19234 boolean to be returned as integers. Allows null to be returned by
19235 a function returning a reference.
19236 * typeck.c (convert_to_integer, convert_to_real,
19237 convert_to_pointer): Prototypes moved to convert.h
19238 (lookup_argument_method): Use method real name, if necessary.
19239
19240 1998-10-30 Tom Tromey <tromey@cygnus.com>
19241
19242 * class.c (build_class_ref): Changed name of primitive classes to
19243 start with `_Jv_'.
19244
19245 * class.c (make_class_data): Renamed fields: nmethods to
19246 method_count, method_count to dtable_method_count. Always set
19247 `state' field to 0.
19248 * decl.c (init_decl_processing): Likewise.
19249
19250 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
19251
19252 * class.c (layout_class): Don't mangle <finit>, produce
19253 __finit<class> instead. Don't verify artificial methods.
19254 * decl.c (finit_identifier_node): New declared global.
19255 (init_decl_processing): finit_identifier_node initialized.
19256 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
19257 * java-tree.h (finit_identifier_node): Declared as extern.
19258 (struct lang_decl): New field called_constructor.
19259 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
19260 (CLASS_HAS_FINIT_P): New macro.
19261 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
19262 explicit constructor invocation.
19263 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
19264 CALL_SUPER_CONSTRUCTOR_P): New macros.
19265 (write_classfile): Added prototype.
19266 * jcf-parse.c (jcf_parse_source): Parse and remember for
19267 generation if the file was seen on the command line.
19268 (parse_source_file): Don't write the class file here.
19269 (yyparse): Loop on files rewritten. Set current_jcf.
19270 (parse_zip_file_entries): Parse class file only if it was found.
19271 * lang.c (init_parse): Don't open command line provided filename
19272 here.
19273 (lang_parse): Don't set main_jcf anymore.
19274 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
19275 (JCONSTRUCTOR_CHECK): New macro.
19276 (JBSC_TYPE_P): New macro.
19277 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
19278 (COMPLETE_CHECK_OP_2): New macro.
19279 (struct parse_ctxt): New field explicit_constructor_p.
19280 (check_class_interface_creation): Fixed prototype indentation.
19281 (patch_method_invocation_stmt): Prototype reflects added argument.
19282 (patch_invoke): Likewise.
19283 (complete_method_declaration, build_super_invocation,
19284 verify_constructor_circularity,
19285 build_this_super_qualified_invocation, get_printable_method_name,
19286 patch_conditional_expr, maybe_generate_finit, fix_constructors,
19287 verify_constructor_super, create_artificial_method,
19288 start_artificial_method_body, end_artificial_method_body,
19289 generate_field_initialization_code): New function prototypes.
19290 * parse.y: Fixed leading comment
19291 (constructor_header:, constructor_body:, block_end:): Rules tagged
19292 <node>.
19293 (type_declaration:): Call maybe_generate_finit.
19294 (method_declaration:): Action for method_body: placed in new
19295 function complete_method_declaration, called here.
19296 (constructor_declaration:): Defined actions. Removed leading
19297 FIXME.
19298 (constructor_header:): New rule with action.
19299 (constructor_body:): Rule rewritten using block_begin: and
19300 block_end:. Defined actions.
19301 (constructor_declarator:, explicit_constructor_invocation:):
19302 Defined actions.
19303 (block:): Use new rules block_begin: block_end:.
19304 (block_begin:, block_end:): New rules and actions.
19305 (block_statements:): Fixed error message for explicit
19306 constructors.
19307 (method_invocation:): Call build_this_super_qualified_invocation
19308 if primary is `this' or `super' was seen.
19309 (conditional_expression:): Action defined.
19310 (extra_ctxp_pushed_p): New static global flag.
19311 (java_parser_context_save_global): Create parser context if
19312 necessary. Use extra_ctxp_pushed_p to remember it.
19313 (java_parser_context_restore_global): Pop extra parser context if
19314 one exists.
19315 (build_array_from_name): Array on primitive types are marked
19316 loaded.
19317 (register_fields): Restore new name in field initializer
19318 expression if type was altered. Non static fields initialized upon
19319 declaration marked initialized.
19320 (maybe_generate_finit): New function.
19321 (maybe_generate_clinit): Use create_artificial_method,
19322 start_artificial_method_body, end_artificial_method_body. Generate
19323 debug info for enclosed initialization statements.
19324 (method_header): Fixed leading comment. Check constructor
19325 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
19326 accordingly.
19327 (complete_method_declaration, constructor_circularity_msg,
19328 verify_constructor_circularity): New functions.
19329 (get_printable_method_name): New function.
19330 (check_method_redefinition): Don't rename <finit> methods. Fix
19331 declared constructor names. Error message for
19332 constructors modified.
19333 (java_check_regular_methods): Local variable seen_constructor
19334 renamed saw_constructor. Skip verification on constructors. Create
19335 default constructor with create_artificial_method.
19336 (java_check_methods): Removed unnecessary empty line.
19337 (create_artificial_method, start_artificial_method_body,
19338 end_artificial_method_body): New functions.
19339 (java_layout_classes): Changed leading comment. Reverse fields
19340 list if necessary. Always layout java.lang.Object if being
19341 defined.
19342 (java_complete_expand_methods): Verify constructor circularity.
19343 (java_complete_expand_method): Call fix_constructor on
19344 constructors. Local variable no_ac_found removed. Restore
19345 bindings if method body expansion failed.
19346 (fix_constructors, verify_constructor_super,
19347 generate_field_initialization_code): New function.
19348 (java_expand_classes): Fixed leading comment. Write class file
19349 here.
19350 (resolve_expression_name): Check for illegal instance variable
19351 usage within the argument scope of an explicit constructor
19352 invocation.
19353 (resolve_qualified_expression_name): Pass extra from_super flag
19354 when invoking patch_method_invocation_stmt. New case for
19355 conditional expression when used as a primary. Check for error
19356 when acquiring super.
19357 (patch_method_invocation_stmt): Added extra argument super. New
19358 local variable is_static_flag. Set class_to_search according to
19359 the nature of the constructor invocation. Don't add `this'
19360 argument when expanding NEW_CLASS_EXPR. Check for illegal method
19361 invocation within the argument scope of explicit constructor
19362 invocation. Set is_static according to is_static_flag. Provide
19363 extra `super' argument to patch_invoke invocation.
19364 (patch_invoke): New argument from_super. Loop on arguments
19365 indentation fixed. Pass from_super to invocation_mode. New switch
19366 case INVOKE_SUPER. Fixed error message in switch default case.
19367 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
19368 value.
19369 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
19370 (lookup_method_invoke): Fixed prototypes in candidates list. Error
19371 message takes constructors into account.
19372 (find_applicable_accessible_methods_list): Fixed indentation.
19373 (qualify_ambiguous_name): Take explicit constructor invocation
19374 into account. Deal with a conditional expression as a primary to
19375 a method call.
19376 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
19377 case. Added extra argument to patch_method_invocation_stmt.
19378 Register calls made to explicit constructor `this'. Don't call
19379 save_expr in ARRAY_REF case when emitting class files. Check for
19380 illegal use of this when expanding explicit constructor invocation
19381 arguments.
19382 (complete_function_arguments): Set and reset parser context
19383 explicit_constructor_p field value when appropriate.
19384 (build_super_invocation, build_this_super_qualified_invocation):
19385 New functions.
19386 (patch_assignment): Fixed typo.
19387 (patch_unaryop): Check on final fields occurs only when a decl
19388 exits.
19389 (patch_return): Take constructors into account.
19390 (patch_conditional_expr): New function.
19391 * typeck.c (build_java_signature): Removed unnecessary empty line.
19392
19393 1998-10-28 Jeffrey A Law (law@cygnus.com)
19394
19395 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
19396
19397 1998-10-28 Tom Tromey <tromey@cygnus.com>
19398
19399 * decl.c (init_decl_processing): Renamed fields.
19400 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
19401 interface_len, msize fields.
19402
19403 * class.c (make_class_data): Removed subclass_head and
19404 subclass_next fields.
19405 * decl.c (init_decl_processing): Removed subclass_head and
19406 subclass_next fields.
19407
19408 1998-10-28 Jeffrey A Law (law@cygnus.com)
19409
19410 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
19411 * mangle.c (emit_unicode_mangled_name): Similarly.
19412
19413 1998-10-26 Nick Clifton <nickc@cygnus.com>
19414
19415 * jcf-parse.c (get_constant): Place braces around code to compute
19416 'd' when REAL_ARITHMETIC is not defined.
19417
19418 1998-10-25 H.J. Lu (hjl@gnu.org)
19419
19420 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
19421 dependency.
19422
19423 1998-10-23 Tom Tromey <tromey@cygnus.com>
19424
19425 * lang-specs.h: `.zip' files are input to jc1.
19426
19427 1998-10-22 Per Bothner <bothner@cygnus.com>
19428
19429 * jvspecs.c: Add (but don't enable) support for combining multiple
19430 .class and .java input filenames to a single jc1 invocation.
19431 Add support for -C flag (copile to .class files).
19432 Translate -classpath and -CLASSPATH arguments.
19433 * lang-specs.h: Don't set %2 spec.
19434
19435 1998-10-22 Tom Tromey <tromey@cygnus.com>
19436
19437 * jcf-path.c (add_entry): Don't add trailing separator if entry is
19438 a .zip file.
19439 (add_path): Don't add trailing separator to non-empty path
19440 elements.
19441
19442 * lang.c (lang_decode_option): Check for -fclasspath and
19443 -fCLASSPATH before examining other `-f' options.
19444
19445 * java-tree.h (finalize_identifier_node): Don't declare.
19446 * class.c (make_class_data): Don't push "final" field.
19447 * decl.c (init_decl_processing): Don't push "final" field.
19448 (finalize_identifier_node): Removed.
19449 (init_decl_processing): Don't set finalize_identifier_node.
19450
19451 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
19452
19453 1998-10-11 Anthony Green <green@cygnus.com>
19454
19455 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
19456 (JV_SCAN_SOURCES): New macro.
19457 (JCF_DUMP_SOURCES): Likewise.
19458 (jcf-dump$(exeext)): New target.
19459 (jv-scan$(exeext)): New target.
19460
19461 1998-10-22 Tom Tromey <tromey@cygnus.com>
19462
19463 * Makefile.in (LEX): Removed.
19464 (LEXFLAGS): Likewise.
19465 (SET_BISON): New macro.
19466 (BISON): Removed.
19467 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
19468 spurious diffs in parse.c.
19469 ($(PARSE_SCAN_C)): Likewise.
19470 (PARSE_DIR): New macro.
19471 (PARSE_C): Use it.
19472 (PARSE_SCAN_C): Likewise.
19473 (PARSE_RELDIR): New macro.
19474
19475 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
19476
19477 * jcf-io.c (find_class): Use saw_java_source to determine when to
19478 look for `.java' file.
19479 * jcf-parse.c (saw_java_source): New global.
19480 (yyparse): Set it if `.java' file seen.
19481
19482 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
19483 (GCJH_SOURCES): Likewise.
19484 * Makefile.in (datadir): New macro.
19485 (libjava_zip): Likewise.
19486 (JAVA_OBJS): Added jcf-path.o.
19487 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19488 (../gcjh$(exeext)): Likewise.
19489 (jcf-path.o): New target.
19490 * java-tree.h (fix_classpath): Removed decl.
19491 * jcf-parse.c (fix_classpath): Removed.
19492 (load_class): Don't call fix_classpath.
19493 * parse.y (read_import_dir): Don't call fix_classpath.
19494 * lex.h: Don't mention classpath.
19495 * lex.c (java_init_lex): Don't initialize classpath.
19496 * jcf-io.c (classpath): Removed global.
19497 (find_class): Use jcf_path iteration functions. Correctly search
19498 class path for .java file.
19499 (open_in_zip): New argument `is_system'.
19500 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
19501 classpath-related options.
19502 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
19503 and -I.
19504 (lang_init): Call jcf_path_init.
19505 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
19506 * lang-specs.h: Handle -I. Minor cleanup to -M options.
19507 Correctly put braces around second string in each entry.
19508 * gjavah.c (main): Call jcf_path_init. Recognize all the new
19509 classpath-related options.
19510 (help): Updated for new options.
19511 * jcf.h: Declare functions from jcf-path.c. Don't mention
19512 `classpath' global.
19513 * jcf-path.c: New file.
19514
19515 * jcf-depend.c: Include jcf.h.
19516
19517 * jcf-write.c (localvar_alloc): Returns `void'.
19518 (localvar_free): Removed unused variable.
19519
19520 * lang.c (OBJECT_SUFFIX): Define if not already defined.
19521 (init_parse): Use OBJECT_SUFFIX, not ".o".
19522
19523 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
19524
19525 * class.c (emit_register_classes): Renamed from
19526 emit_register_class.
19527 * java-tree.h (emit_register_classes): Prototype renamed from
19528 emit_register_class.
19529 * jcf-parse.c (yyparse): Call emit_register_classes once before
19530 returning.
19531 * parse.y (java_expand_classes): No longer register classes.
19532
19533 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
19534
19535 * class.c (is_compiled_class): New local variable
19536 seen_in_zip. Identify classes found in currently compiled source
19537 file(s).
19538 * decl.c (complete_start_java_method): Fixed typo.
19539 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
19540 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
19541 (CLASS_P): Moved around.
19542 (java_parse_abort_on_error): Macro moved from jcf-parse.c
19543 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
19544 java-tree.h
19545 (jcf_parse_source): Changed leading comment. Removed unnecessary
19546 fclose and CLASS_FROM_SOURCE_P marking.
19547 (parse_source_file): New local variables remember_for_generation
19548 and filename. Mark parsed file name identifier node. Removed block
19549 executed when parse_only was null. Set remember_for_generation.
19550 Use it as an argument to java_pop_parser_context.
19551 (yyparse): New local variables several_files, list, next node and
19552 current_file_list. Split ampersand separated file names into
19553 current_file_list. Iterate through the list and parse accordingly.
19554 * parse.h (java_pop_parser_context): New function prototype.
19555 * parse.y (ctxp_for_generation): New static global variable.
19556 (java_pop_parser_context): New argument generate. Link popped ctxp
19557 to ctxp_for_generation list accordingly.
19558 (java_complete_expand_methods): Fixed indentation.
19559 (java_expand_classes): New function.
19560
19561 1998-10-17 Per Bothner <bothner@cygnus.com>
19562
19563 * Makefile.in: Link with libiberty.a instead of memmove.o.
19564
19565 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
19566
19567 * lex.c (setjmp.h): No longer included.
19568 * lex.h (setjmp.h): Included.
19569 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
19570 (duplicate_declaration_error_p): Renamed from
19571 duplicate_declaration_error.
19572 (build_array_from_name): New function prototype.
19573 * parse.y (setjmp.h): No longer included.
19574 (variable_declarator_id): Define action.
19575 (build_array_from_name): New function.
19576 (duplicate_declaration_error_p): Renamed from
19577 duplicate_declaration_error. Fixed leading comment.
19578 (register_fields): Main `for' loop reorganized. Uses
19579 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
19580 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
19581 build_array_from_name.
19582 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
19583 types.
19584 (read_import_dir): Don't try to skip `.' and `..'.
19585 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
19586 build_array_from_name. Main `for' loop reorganized.
19587 (resolve_qualified_expression_name): When building access to a
19588 field, use the type where the field was found, not its own type.
19589 (maybe_access_field): Use field DECL_CONTEXT if the type where the
19590 field was found is null.
19591 (qualify_ambiguous_name): Sweep through all successive array
19592 dimensions.
19593
19594 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
19595
19596 * java-tree.h (pop_labeled_block, lang_printable_name,
19597 maybe_add_interface, set_super_info, get_access_flags_from_decl,
19598 interface_of_p, inherits_from_p, fix_classpath,
19599 complete_start_java_method, emit_handlers, init_outgoing_cpool,
19600 make_class_data, register_class, alloc_name_constant): New
19601 function prototypes.
19602 * lang.c (lang_decode_option): Set argc argument unused. Fixed
19603 indentation. Added cast to remove warning.
19604 (lang_printable_name): Set v argument unused.
19605 (lang_print_error): Added argument to lang_printable_name call.
19606 (java_dummy_print, print_lang_decl, print_lang_type,
19607 print_lang_identifier, lang_print_xnode): All argument marked
19608 unused.
19609 * lex.c (java_unget_unicode): Removed unnecessary argument.
19610 (java_allocate_new_line): Unused local variable is gone.
19611 (java_read_char): Added parenthesis in expressions to remove
19612 warnings. Added final return statement.
19613 (java_read_unicode): Added parenthesis in expression to remove
19614 warning.
19615 (java_parse_end_comment): Fixed java_unget_unicode invocation.
19616 (java_parse_escape_sequence): Likewise.
19617 (java_lex): Unused local variables are gone. Fixed
19618 java_unget_unicode invocation.
19619 * lex.h (set_float_handler): Prototype added when JC1_LITE not
19620 defined.
19621 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19622 lang_printable_name invocation in macro.
19623 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19624 Likewise.
19625 (duplicate_declaration_error): Suppressed unused argument in
19626 prototype.
19627 (identical_subpath_p): Function declaration is gone.
19628 (patch_invoke): Suppressed unused argument in prototype.
19629 (patch_cast, build_labeled_block, check_thrown_exceptions):
19630 Likewise.
19631 * parse.y (setjmp.h): Included
19632 (toplev.h): Likewise.
19633 (field_declaration:): Suppressed unused local
19634 (label_decl:): Fixed build_labeled_block invocation.
19635 (java_pop_parser_context): Put extra parenthesis around assignment
19636 in if.
19637 (yyerror): Suppressed unused local variables.
19638 (variable_redefinition_error): Fixed lang_printable_name
19639 invocation.
19640 (create_interface): Suppressed unused local variables.
19641 (create_class): Likewise.
19642 (duplicate_declaration_error): Suppressed unused argument. Fixed
19643 lang_printable_name invocation.
19644 (register_fields): Suppressed unused local variable. Fixed
19645 duplicate_declaration_error invocation.
19646 (method_header): Suppressed unused local variable.
19647 (method_declarator, parser_check_super): Likewise.
19648 (java_complete_class): Suppressed unused local variable. Fixed
19649 fatal error message.
19650 (complete_class_report_errors): Added default: in switch.
19651 (java_check_regular_methods): Fixed lang_printable_name
19652 invocations.
19653 (check_throws_clauses): Likewise.
19654 (java_check_abstract_methods): Suppressed unused local
19655 variable. Fixed lang_printable_name invocation.
19656 (read_import_entry): Added supplemental return statement.
19657 (read_import_dir): Suppressed unused local variables.
19658 (check_pkg_class_access, declare_local_variables): Likewise.
19659 (source_start_java_method): Suppressed unused extern variable
19660 declarations
19661 (expand_start_java_method): Suppressed unused extern and local
19662 variable declarations.
19663 (java_complete_expand_methods): Likewise.
19664 (java_complete_expand_method): Suppressed unused local variables.
19665 (make_qualified_name): Likewise.
19666 (resolve_qualified_expression_name): Added default: in
19667 switch. Fixed lang_printable_name invocation.
19668 (class_instance_creation_expression): Added parenthesis around
19669 expressions.
19670 (patch_method_invocation_stmt): Fixed lang_printable_name and
19671 patch_invoke invocations.
19672 (check_for_static_method_reference): Fixed lang_printable_name
19673 invocation.
19674 (patch_invoke): Suppressed unused arguments and local variables.
19675 (lookup_method_invoke): Suppressed unused local variables.
19676 (qualify_ambiguous_name): Added default: in switch.
19677 (identical_subpath_p): Function removed.
19678 (patch_assignment): Suppressed unused local variables. Suppressed
19679 unnecessary if statement. Fixed lang_printable_name invocations.
19680 (try_builtin_assignconv): Fixed lang_printable_name invocations.
19681 (valid_ref_assignconv_cast_p): Parenthesis around
19682 expression. Suppressed unused local variables.
19683 (build_binop): Suppressed unused local variables. fixed
19684 lang_printable_name invocations.
19685 (string_constant_concatenation): Suppressed unused local
19686 variables.
19687 (patch_unaryop): Fixed lang_printable_name invocation.
19688 (patch_cast): Suppressed unnecessary argument. Fixed
19689 lang_printable_name invocation.
19690 (patch_array_ref): Fixed lang_printable_name invocation.
19691 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19692 (build_labeled_block): Suppressed unused argument.
19693 (generate_labeled_block): Fixed build_labeled_block invocation.
19694 (build_loop_body): Suppressed unused local variables.
19695 (patch_loop_statement): Likewise.
19696 (patch_exit): Fixed lang_printable_name invocation.
19697 (patch_switch_statement): Likewise.
19698 (case_identity): First argument marked unused.
19699 (patch_try_statement): Fixed lang_printable_name invocations.
19700 (patch_synchronized_statement, patch_throw_statement): Likewise.
19701 (check_thrown_exceptions): Fixed check_thrown_exceptions and
19702 lang_printable_name invocations.
19703 (check_thrown_exceptions_do): Suppressed unused argument.
19704
19705 1998-10-14 Tom Tromey <tromey@cygnus.com>
19706
19707 * jcf-write.c (write_classfile): Add output class file as target.
19708 * lang-options.h: Added -MD, -MMD, -M, and -MM.
19709 * jcf.h: Added declarations for dependency-tracking functions.
19710 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19711 * lang.c (lang_decode_option): Recognize -MD and -MMD.
19712 (finish_parse): Call jcf_dependency_write.
19713 (dependency_tracking): New global.
19714 (DEPEND_SET_FILE): New define.
19715 (DEPEND_ENABLE): New define.
19716 (init_parse): Enable dependency tracking if required.
19717 Include "flags.h".
19718 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19719 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19720 (../gcjh$(exeext)): Likewise.
19721 (jcf-depend.o): New target.
19722 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19723 (GCJH_SOURCES): Likewise.
19724 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
19725 dep_name argument.
19726 (find_classfile): Added dep_name argument.
19727 (find_class): Compute name of dependency.
19728 (open_in_zip): Call jcf_dependency_add_file.
19729 * gjavah.c (output_file): No longer global.
19730 (usage): Don't mention "gjavah".
19731 (help): Likewise.
19732 (java_no_argument): Likewise.
19733 (version): Likewise.
19734 (main): Recognize and handle -M family of options.
19735 (print_mangled_classname): Return is void.
19736 (process_file): Handle case where output is suppressed.
19737 (HANDLE_END_FIELD): Likewise.
19738 (HANDLE_METHOD): Likewise.
19739 * jcf-depend.c: New file.
19740
19741 1998-10-13 Jeffrey A Law (law@cygnus.com)
19742
19743 * java-tree.def: Add missing newline at EOF.
19744
19745 1998-10-13 Tom Tromey <tromey@cygnus.com>
19746
19747 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19748 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
19749 function.
19750 Include <config.h> and "system.h".
19751 (disassemble_method): Undefine RET to avoid clash with
19752 config/i386/i386.h.
19753
19754 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
19755
19756 * decl.c (runtime_exception_type_node, error_exception_type_node):
19757 New global variables.
19758 (init_decl_processing): Initialized.
19759 * expr.c (java_lang_expand_expr): Set caught exception type to
19760 null if catch handler argument doesn't exit.
19761 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19762 tree codes.
19763 * java-tree.h (runtime_exception_type_node,
19764 error_exception_type_node): Global variables declared.
19765 (DECL_FUNCTION_THROWS): New macro.
19766 (DECL_FUNCTION_BODY): Modified comment.
19767 (DECL_SPECIFIC_COUNT): Likewise.
19768 (struct lang_decl): New field throws_list.
19769 (IS_UNCHECKED_EXPRESSION_P): New macro.
19770 * lex.c (java_lex): Generate location information for THROW_TK.
19771 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19772 EXCEPTIONS_P): New macros.
19773 (enum jdep_code): New value JDEP_EXCEPTION.
19774 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19775 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19776 PATCH_METHOD_RETURN_ERROR): New macros.
19777 (patch_method_invocation_stmt): Added new argument to prototype.
19778 (patch_synchronized_statement, patch_throw_statement,
19779 check_thrown_exceptions, check_thrown_exceptions_do,
19780 purge_unchecked_exceptions, check_throws_clauses): New function
19781 prototypes.
19782 * parse.y Fixed typo in keyword section.
19783 (throw:): Rule tagged <node>.
19784 (THROW_TK): Keyword tagged <operator>.
19785 (method_header:): Last argument to call to method_header passed
19786 from throws: rule.
19787 (throws:, class_type_list:, throw_statement:,
19788 synchronized_statement:, synchronized:): Defined actions.
19789 (method_header): New local variable current. Register exceptions
19790 from throws clause.
19791 (java_complete_tree): Complete and verify exceptions from throws
19792 clause.
19793 (complete_class_report_errors): Error message on exceptions not
19794 found
19795 (java_check_regular_methods): Fixed typo. Shortcut on private
19796 overriding methods. Changed error message on method
19797 redefinition. Check for throws clause compatibility.
19798 (check_throws_clauses): New function.
19799 (java_check_abstract_methods): Use DECL_NAME for wfl or current
19800 method. Changed error message on method redefinition.
19801 (currently_caught_type_list): New static variable.
19802 (java_complete_expand_methods): Purge unchecked exceptions from
19803 throws clause list. Call PUSH_EXCEPTIONS before walk and
19804 POP_EXCEPTIONS after.
19805 (resolve_qualified_expression_name): Pass new argument as NULL to
19806 patch_method_invocation_stmt.
19807 (patch_method_invocation_stmt): New argument ref_decl. Invoke
19808 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19809 argument list when appropriate. Use new argument if non null to
19810 store selected method decl.
19811 (patch_invoke): Convert if necessary args of builtin types before
19812 forming CALL_EXPR. Argument list no longer reversed here.
19813 (invocation_mode): Treat final methods as static methods.
19814 (java_complete_tree): New cases for THROW_EXPR: and
19815 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19816 function call.
19817 (complete_function_arguments): No more RECORD_TYPE
19818 conversion. Function parameter nodes no longer saved.
19819 (valid_ref_assignconv_cast_p): Avoid handling null type.
19820 (patch_binop): Fixed null constant reference handling.
19821 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19822 BUILD_THROW macros.
19823 (patch_try_statement): Fixed comments. Record caught types in
19824 list, push the list, expand try block and pop the list.
19825 (patch_synchronized_statement, patch_throw_statement,
19826 check_thrown_exceptions, check_thrown_exceptions_do,
19827 purge_unchecked_exceptions): New functions.
19828 * typeck.c (lookup_argument_method): Allow WFL in place of method
19829 DECL_NAME during method definition check
19830
19831 1998-10-09 Tom Tromey <tromey@cygnus.com>
19832
19833 * gjavah.c (decode_signature_piece): New function.
19834 (print_c_decl): Use it. Added `name_override' argument.
19835 (print_method_info): Use name_override argument to print_c_decl.
19836 (seen_fields): Removed.
19837 (print_field_info): Don't update seen_fields.
19838 (struct method_name): New structure.
19839 (method_name_list): New global.
19840 (print_method_info): Add new method to list of methods.
19841 (name_is_method_p): New function.
19842 (print_field_info): If field name has same name as method, then
19843 change field name.
19844 (process_file): Parse methods before fields.
19845 (field_pass): New global.
19846 (HANDLE_END_FIELD): Take field_pass into account.
19847
19848 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19849
19850 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19851 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19852
19853 1998-10-03 Anthony Green <green@cygnus.com>
19854
19855 * jvspec.c: Fix bug in jvgenmain_spec patch.
19856
19857 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19858
19859 * Makefile.in (lang.o:): Install dependency on java-tree.def.
19860 * decl.c (soft_exceptioninfo_call_node): New global variable.
19861 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19862 takes extra integer argument. soft_exceptioninfo_call_node
19863 initialized.
19864 * except.c (java_set_exception_lang_code): New function
19865 (method_init_exceptions): Called here.
19866 (prepare_eh_table_type): New function.
19867 (expand_end_java_handler): Called here.
19868 * expr.c (build_java_throw_out_of_bounds_exception): Now features
19869 one argument. Modified generation of call to
19870 soft_badarrayindex_node to use new argument.
19871 (build_java_arrayaccess): Pass faulty index value to
19872 build_java_throw_out_of_bounds_exception.
19873 (generate_name): New function.
19874 (java_lang_expand_expr): New local variables node, current,
19875 has_finally_p. Expand TRY_EXPR node.
19876 (process_jvm_instruction): Replace top of the stack with thrown
19877 object reference when entering exception handler.
19878 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19879 specific tree codes.
19880 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19881 global.
19882 (DECL_SPECIFIC_COUNT): New macro.
19883 (prepare_eh_table_type, java_set_exception_lang_code,
19884 generate_name): New function declarations.
19885 (match_java_method): Declaration deleted.
19886 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19887 macros.
19888 * lex.c (TRY_TK, CATCH_TK): Generate location information.
19889 * parse.h (redefinition_error, refine_accessible_methods_list,
19890 can_cast_to_p): Function declaration removed.
19891 (classitf_redefinition_error, variable_redefinition_error,
19892 parse_jdk1_1_error, find_applicable_accessible_methods_list,
19893 find_most_specific_methods_list, argument_types_convertible,
19894 enter_a_block, valid_builtin_assignconv_identity_widening_p,
19895 valid_cast_to_p, valid_method_invocation_conversion_p,
19896 try_reference_assignconv, add_stmt_to_compound,
19897 build_jump_to_finally, build_tree_list, patch_try_statement,
19898 java_get_catch_block): New function declarations.
19899 * parse.y (string_buffer_type): Global variable deleted.
19900 (group_of_labels, catches, catch_clause, catch_clause_parameter,
19901 finally): Rules tagged <node>.
19902 (TRY_TK, CATCH_TK): Token tagged <operator>.
19903 (class_body_declaration:, class_member_declaration:,
19904 formal_parameter:, explicit_constructor_invocation:,
19905 interface_member_declaration:, constant_declaration:,
19906 primary_no_new_array:, class_instance_creation_expression:,
19907 array_creation_expression:): Issue error on unsuported JDK1.1
19908 features.
19909 (try_statement:, catches:, finally:): Define actions.
19910 (catch_clause_parameter): New rule.
19911 (catch_clause:): Use new rule catch_clause_parameter.
19912 (parse_jdk1_1_error): New function.
19913 (redefinition_error): Renamed classitf_redefinition_error.
19914 (variable_redefinition_error): New function.
19915 (check_class_interface_creation): Call
19916 classitf_redefinition_error.
19917 (java_complete_tree): Added error message on JDEP_TYPE: case.
19918 (complete_class_report_errors): Fixed indentation.
19919 (declare_local_variables): Call variable_redefinition_error.
19920 (source_end_java_method): Call java_set_exception_lang_code and
19921 emit_handlers where appropriate.
19922 (java_method_add_stmt): Call add_stmt_to_block.
19923 (add_stmt_to_block): New function.
19924 (lookup_method_invoke): Fixed outside comment. new local variable
19925 candicates. Call find_applicable_accessible_methods_list and
19926 find_most_specific_methods_list when searching for a
19927 method. Modified error report to list possible candidates when
19928 applicable.
19929 (find_applicable_accessible_methods_list,
19930 find_most_specific_methods_list, argument_types_convertible): New
19931 function.
19932 (refine_accessible_methods_list): Function deleted.
19933 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
19934 expr (if applicable) before calling patch_array_ref.
19935 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19936 (enter_block): Fixed comment.
19937 (enter_a_block): New function.
19938 (patch_assignment): Reorganized. Call try_reference_assignconv for
19939 references. Call valid_cast_to_p instead of can_cast_to_p.
19940 (try_reference_assignconv,
19941 valid_builtin_assignconv_identity_widening_p): New functions.
19942 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19943 (valid_cast_to_p, valid_method_invocation_conversion_p): New
19944 functions.
19945 (build_string_concatenation): Don't resolve StringBuffer.
19946 (patch_cast): Fixed inverted arguments.
19947 (patch_array_ref): Code to save array expr deleted. Call
19948 valid_cast_to_p instead of can_cast_to_p.
19949 (generate_labeled_block): Call generate_name.
19950 (build_jump_to_finally, build_try_statement, java_get_catch_block,
19951 patch_try_statement): New functions.
19952 * typeck.c (match_java_method): Function deleted.
19953
19954 1998-10-02 Anthony Green <green@cygnus.com>
19955
19956 * jvspec.c: jvgenmain_spec uses different temporary file names.
19957
19958 1998-10-02 Anthony Green <green@cygnus.com>
19959
19960 * jvspec.c (lang_specific_driver): Fail if user specifies
19961 --main= when not linking.
19962
19963 1998-09-28 Tom Tromey <tromey@cygnus.com>
19964
19965 * class.c (make_class_data): Push value for `thread' field.
19966 * decl.c (init_decl_processing): Added `thread' field to class.
19967
19968 * class.c (add_field): Always make static fields externally
19969 visible.
19970
19971 1998-09-26 Anthony Green <green@cygnus.com>
19972
19973 * expr.c (build_java_athrow,
19974 build_java_throw_out_of_bounds_exception, expand_invoke,
19975 build_newarray, expand_java_multianewarray, build_java_monitor):
19976 Update comments to reflect _Jv_* function names.
19977
19978 1998-09-25 Per Bothner <bothner@cygnus.com>
19979
19980 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
19981 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
19982 * parse.y (expand_start_java_method): Likewise.
19983
19984 1998-09-24 Per Bothner <bothner@cygnus.com>
19985
19986 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
19987
19988 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
19989 (add_field): No longer need to convert from RECORD_TYPE to pointer,
19990 * expr.c: Remove no-longer-needed calls to promote_type.
19991 * decl.c (give_name_to_locals): Liekwise.
19992 * jcf-parse.c (get_class_constant): Compensate for new signatures.
19993 * parse.y: Add/remove promote_type calls as appropriate.
19994 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
19995 (parse_signature_string): Likewise.
19996 (build_java_array_type): Fix for now signature convenions.
19997
19998 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
19999
20000 1998-09-23 Tom Tromey <tromey@cygnus.com>
20001
20002 * class.c (init_class_processing): libjava function renamed to
20003 _Jv_RegisterClass.
20004
20005 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
20006
20007 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
20008 * java-tree.def: Fixed DEFTREECODE third argument.
20009 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
20010 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
20011 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
20012 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20013 JAVA_THIS_EXPR): Now replaced by tree code definitions.
20014 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
20015 * lang.c (java_tree_code_type, java_tree_code_length,
20016 java_tree_code_name): New arrays.
20017 (lang_init): Append Java tree node definitions to Gcc ones.
20018 * lex.c (expression_obstack): Declared as extern when JC1_LITE
20019 defined.
20020 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
20021 wfl_to_string.
20022 (java_lex): Allow declaration of empty string constants. Retain
20023 location information on CASE_TK and DEFAULT_TK.
20024 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
20025 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
20026 Modified to be more robust.
20027 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
20028 (build_new_invocation, try_builtin_assignconv,
20029 patch_switch_statement, string_constant_concatenation,
20030 build_string_concatenation, patch_string_cst, patch_string,
20031 java_expand_switch): New function declarations.
20032 * parse.y: Rules related to switch and EH tagged <node>.
20033 (label_id): Set to NULL_TREE
20034 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
20035 tree nodes.
20036 (this_or_super:): Fixed indentation.
20037 (statement:, statement_nsi:, statement_without_trailing_substatement:,
20038 statement_expression:): Removed call to RULE on all sub-rules.
20039 (switch_expression:, switch_labels:): New rules.
20040 (switch_statement:, switch_block:, switch_block_statement_groups:,
20041 switch_block_statement_group:, switch_labels:, switch_label:):
20042 Defined actions.
20043 (throw_statement:, synchronized_statement:, try_statement:):
20044 Defined temporary actions.
20045 (class_instance_creation_expression:): Call
20046 build_new_invocation. Fixed indentation.
20047 (field_access): Fixed indentation.
20048 (method_invocation): Likewise.
20049 (make_qualified_primary): Use THIS_EXPR.
20050 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
20051 resolving from SUPER, set *type_found.
20052 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
20053 (java_complete_tree): Removed unused local variable `location'. Case
20054 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
20055 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
20056 on MODIFY_EXPR: and all binary operator tree code cases. Removed
20057 STRING_CST: case. default: checks for patchable strings.
20058 (complete_function_arguments): Transform string constant or
20059 crafted StringBuffer if necessary.
20060 (build_method_invocation): Fixed comments.
20061 (build_new_invocation): New function.
20062 (patch_assignment): Call try_builtin_assignconv to figure a valid
20063 assignment conversion between builtin types.
20064 (try_builtin_assignconv): New function.
20065 (build_binop): Use URSHIFT_EXPR directly to call build.
20066 (operator_string): Use UNARY_PLUS_EXPR.
20067 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
20068 operator.
20069 (do_merge_string_cste, merge_string_cste,
20070 string_constant_concatenation, build_string_concatenation,
20071 patch_string, patch_string_cst): New function.
20072 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
20073 (patch_unaryop): Likewise. New test of valid ++/-- operands.
20074 (build_newarray_node): Use NEW_ARRAY_EXPR.
20075 (build_this): Use THIS_EXPR.
20076 (build_return): Enable debug information on return statement.
20077 (build_if_else_statement): Likewise.
20078 (complete_labeled_statement): Fixed related comment.
20079 (build_loop_body): Fixed comment.
20080 (build_bc_statement): Enable debug information on break/continue
20081 statements.
20082 (patch_bc_statement): Fixed typos. Handle SWITCH statement
20083 context.
20084 (patch_switch_statement, case_identity, java_expand_switch): New
20085 functions.
20086
20087 1998-09-21 Per Bothner <bothner@cygnus.com>
20088
20089 * buffer.h (BUFFER_INIT): New macro.
20090 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
20091 Pass (struct jcf_partial *state) to most functions.
20092 (jcf_block, jcf_relocation): New types.
20093 Support labels, branches, conditionals, loops.
20094
20095 1998-09-21 Tom Tromey <tromey@cygnus.com>
20096
20097 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
20098
20099 1998-09-21 Per Bothner <bothner@cygnus.com>
20100
20101 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
20102 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
20103 not integer_type_node (INT_TYPE_SIZ bits).
20104
20105 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
20106
20107 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
20108 * jcf-dump.c (print_exception_table): New function.
20109 (disassemble_method): Better handling of wide instructions.
20110 Make more robust for bad input.
20111
20112 1998-09-30 Jeffrey A Law (law@cygnus.com)
20113
20114 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
20115 FreeBSD.
20116
20117 1998-09-17 Jeffrey A Law (law@cygnus.com)
20118
20119 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
20120
20121 1998-09-17 Tom Tromey <tromey@cygnus.com>
20122
20123 * Makefile.in ($(PARSE_H)): Removed target.
20124
20125 1998-09-17 Jeffrey A Law (law@cygnus.com)
20126
20127 * Makefile.in (JAVA_OBJS): Add memmove.o
20128 (memmove.o): New target & rules.
20129
20130 1998-09-15 Tom Tromey <tromey@cygnus.com>
20131
20132 * expr.c (expand_invoke): Don't generate a call to the class init
20133 code.
20134
20135 1998-09-14 Jeffrey A Law (law@cygnus.com)
20136
20137 * Makefile.in: Add many missing dependencies.
20138 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
20139 as appropriate.
20140 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
20141 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
20142
20143 1998-09-11 Per Bothner <bothner@cygnus.com>
20144
20145 * decl.c (complete_start_java_method): If method is static (and
20146 not private) call _Jv_InitClass.
20147 * expr.c (expand_invoke): Don't call build_class_init.
20148
20149 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
20150
20151 1998-09-10 Jeffrey A Law (law@cygnus.com)
20152
20153 * Make-lang.in (GCJ): Define before using.
20154
20155 1998-09-09 Jeffrey A Law (law@cygnus.com)
20156
20157 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
20158 losing due to namespace pollution in GNU getopt.h
20159
20160 1998-09-09 Tom Tromey <tromey@cygnus.com>
20161
20162 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
20163 (java.all.cross): Likewise.
20164 (java.rest.encap): Likewise.
20165
20166 1998-09-08 Jeffrey A Law (law@cygnus.com)
20167
20168 * gjavah.c (print_class_decls): Fix thinko in arglist
20169 * jcv-io.c (find_classfile): Similarly.
20170
20171 1998-09-07 Jeffrey A Law (law@cygnus.com)
20172
20173 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
20174
20175 1998-09-05 Tom Tromey <tromey@cygnus.com>
20176
20177 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
20178 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
20179 * Makefile.in (PARSE_C): New macro.
20180 (PARSE_H): Likewise.
20181 (PARSE_SCAN_C): Likewise.
20182 ($(PARSE_C)): Target renamed from parse.c.
20183 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
20184 (clean): Remove parse-scan.c as well.
20185 (parse.o): Depend on $(PARSE_C).
20186
20187 1998-09-05 Anthony Green <green@cygnus.com>
20188
20189 * README, license.terms: Removed.
20190
20191 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
20192 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
20193 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
20194 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
20195 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
20196 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
20197 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
20198 and Java trademark attribution.
20199
20200 1998-09-04 Tom Tromey <tromey@cygnus.com>
20201
20202 * Makefile.in: Use gcjh, not gjavah.
20203 * config-lang.in (stagestuff): Use gcjh, not gjavah.
20204 * Make-lang.in: Changed gjavah to gcjh everywhere.
20205
20206 1998-09-03 Per Bothner <bothner@cygnus.com>
20207
20208 * gjavah.c: Support new -prepend -add -append flags.
20209 (print_method_info): Method is not virtual if class is final.
20210
20211 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
20212
20213 * jv-scan.c: Fixed copyright assignment.
20214 * keyword.gperf: Likewise.
20215 * keyword.h: Likewise.
20216 * lex.c: Fixed copyright assignment.
20217 (java_lex): Push unicode back when parsing '<'.
20218 * lex.h: Fixed copyright assignment.
20219 * parse-scan.y: Likewise.
20220 * parse.h: Fixed copyright assignment.
20221 (build_debugable_stmt, complete_for_loop): New function prototypes.
20222 * parse.y: Fixed copyright assignment.
20223 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
20224 size_zero_node when completing a loop with no exit condition.
20225 (for_statement_nsi:): Define action.
20226 (for_init:, for_update:): Return size_zero_node when empty.
20227 (declare_local_variables): Call build_debugable_stmt.
20228 (build_debugable_stmt): New function.
20229 (build_loop_body): Build debugable statement around loop
20230 condition part.
20231 (complete_loop_body): Take into account the debugable statement
20232 around the EXIT_EXPR.
20233 (complete_loop_body): New function.
20234 (patch_exit_expr): Fixed condition inversion.
20235
20236 1998-09-02 Tom Tromey <tromey@cygnus.com>
20237
20238 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
20239 name of thread define.
20240 * jvspec.c (THREAD_NAME): New macro.
20241 (GCLIB): Likewise.
20242 (THREADLIB): Likewise.
20243 (lang_specific_driver): Recognize attempt to link with thread
20244 library or gc library. Recognize -ljava on command line so it
20245 isn't linked against more than once.
20246
20247 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20248
20249 * parse-scan.y (report_main_declaration): Name of the class
20250 containing `main' can be a qualified name.
20251
20252 1998-08-31 Tom Tromey <tromey@cygnus.com>
20253
20254 * config-lang.in: Changed gjavac to gjc everywhere.
20255 * Make-lang.in: Changed gjavac to gjc everywhere.
20256
20257 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20258
20259 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
20260 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
20261 and install the files.
20262 * Makefile.in (JAVA_OBJS_LITE): New variable.
20263 (compiler:): Now include jv-scan as a dependency.
20264 (../jv-scan$(exeext), parse-scan.c): New targets.
20265 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
20266 * config-lang.in (compilers): Removed gcj, gjavah from the list.
20267 * jcf-parse.c (parse_source_file): Call java_layout_classes and
20268 check for errors even if parse_only.
20269 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
20270 defined.
20271 (yylex): New function. Uses java_lex body.
20272 (java_lex): Removed commented out statement. Remove local variable
20273 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
20274 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
20275 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
20276 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
20277 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
20278 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
20279 where appropriate.
20280 (java_lex_error): Empty if JC1_LITE is defined.
20281 (java_get_line_col): Return 0 if JC1_LITE is defined.
20282 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
20283 SET_MODIFIER_CTX): Moved into the section containing the macros
20284 conditionally defined by JC1_LITE.
20285 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
20286 argument if JC1_LITE is defined.
20287 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
20288 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
20289 is defined.
20290 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
20291 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
20292 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
20293 to different values according to JC1_LITE.
20294 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
20295 declared if JC1_LITE set.
20296 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
20297 defined if JC1_LITE not set.
20298 (struct parser_ctx): Reorganized and skip the jc1 front end part
20299 if JC1_LITE set.
20300 (java_layout_classes): New function definition.
20301 (java_push_parser_context, java_init_lex, yyparse, yylex,
20302 yyerror): Prototype always declared. All other static function
20303 prototypes declared only if JC1_LITE is not set.
20304 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
20305 declared in parse.h.
20306 (java_layout_classes): New function.
20307 (java_complete_expand_methods): No longer layout the class here.
20308 * parse-scan.y: New file.
20309 * jv-scan.c: New file.
20310
20311 1998-08-25 Tom Tromey <tromey@cygnus.com>
20312
20313 * gjavah.c (main): Handle -friend option.
20314 (friend_specs): New global.
20315 (generate_access): Handle friend_specs.
20316 (process_file): Likewise.
20317 (MAX_FRIENDS): New macro.
20318 (friend_count): New global.
20319 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
20320 Changed all callers.
20321
20322 1998-08-24 Per Bothner <bothner@cygnus.com>
20323
20324 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
20325 (main): Handle processing all the entries of a named .zip archive.
20326 * jcf-io.c (jcf_trim_old_input): New function.
20327 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
20328
20329 1998-08-24 Per Bothner <bothner@cygnus.com>
20330
20331 * lang.c (flag_assume_compiled): Make default be on.
20332
20333 1998-08-21 Per Bothner <bothner@cygnus.com>
20334
20335 * jcf-dump.c: Add bunches of flags to control output more.
20336 (process_class): New function; support printing more than one class.
20337 (main): Support new --print-main and --javap flags.
20338 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
20339 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
20340
20341 1998-08-20 Per Bothner <bothner@cygnus.com>
20342
20343 Change mangling of dispatch table to match C++ vtable (w/thunks).
20344 * class.c (build_dtable_decl), java-tree.h: New function.
20345 (make_class_data): Call it.
20346 * decl.c (init_decl_processing): Likewise.
20347
20348 1998-08-19 Warren Levy <warrenl@cygnus.com>
20349
20350 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
20351 soft_anewarray; adjust args passed.
20352 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
20353 match _Jv_NewObjectArray.
20354
20355 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
20356
20357 * decl.c (push_labeled_block, pop_labeled_block): New functions.
20358 * expr.c (loopup_label): Call create_label_decl.
20359 (create_label_decl): New function.
20360 (java_lang_expand_expr): Call expand_start_bindings with argument
20361 set to zero.
20362 * java-tree.h Added space after PROTO in function declarations
20363 when necessary.
20364 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
20365 (create_label_decl, push_labeled_block): New function
20366 declarations.
20367 * lex.c (label_id): Initialize.
20368 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
20369 switch.
20370 * parse.h Added space after PROTO in function declarations when
20371 necessary.
20372 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
20373 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
20374 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
20375 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
20376 macros.
20377 (struct parser_ctxt): New fields current_loop,
20378 current_labeled_block.
20379 (build_if_else_statement, patch_if_else_statement,
20380 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
20381 generate_labeled_block, complete_labeled_statement,
20382 build_bc_statement, patch_bc_statement, patch_loop_statement,
20383 build_new_loop, build_loop_body, complete_loop_body): New function
20384 declarations.
20385 * parse.y (java_warning_count): New global variable.
20386 (label_id): New static variable.
20387 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
20388 (block:): Return size_zero_node when block is empty.
20389 (empty_statement:): Return size_zero_node.
20390 (statement:): Implement supplemental action when for_statement: is
20391 reduced.
20392 (label_decl:): New rule.
20393 (labeled_statement:): Rewritten using label_decl. Actions
20394 implemented.
20395 (labeled_statement_nsi:): Likewise.
20396 (if_then_statement): Actions implemented.
20397 (while_expression): New rule.
20398 (while_statement:): Rewritten using while_expression. Actions
20399 implemented.
20400 (while_statement_nsi:): Likewise.
20401 (do_statement_begin:): New rule.
20402 (do_statement:): Rewritten using do_statement_begin. Actions
20403 implemented.
20404 (for_statement:): Rewritten using for_begin. Actions implemented.
20405 (for_statement_nsi:): Likewise.
20406 (for_header:, for_begin:): New rules.
20407 (for_init:): Actions implemented.
20408 (statement_expression_list:, break_statement:,
20409 continue_statement:): Likewise.
20410 (yyerror): Count number of issued warning(s).
20411 (java_report_errors): Report error(s) and/or warning(s).
20412 (java_complete_class): Use build_java_argument_signature to
20413 recompute completed method signature.
20414 (java_check_regular_methods): New locals method_wfl and aflags.
20415 Use method_wfl instead of lookup_cl during error reports. Fixed
20416 indentation and modified some error messages. Use
20417 lang_printable_name in method instead of the DECL_NAME. New code
20418 to issue warnings on methods not overriding corresponding methods
20419 private to a different package.
20420 (java_method_add_stmt): Call add_stmt_to_compound.
20421 (add_stmt_to_compound): New function.
20422 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
20423 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
20424 (build_if_else_statement, patch_if_else_statement,
20425 build_labeled_block, generate_labeled_block,
20426 complete_labeled_statement, build_new_loop, build_loop_body,
20427 complete_loop_body, patch_loop_statement, build_bc_statement,
20428 patch_bc_statement, patch_exit_expr): New functions.
20429 * typeck.c (build_java_signature): Build argument signature before
20430 enclosing it in between parenthesis.
20431
20432 1998-08-17 Warren Levy <warrenl@cygnus.com>
20433
20434 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
20435 (JAVA_OBJS): Added reminder comment
20436
20437 1998-08-13 Nick Clifton <nickc@cygnus.com>
20438
20439 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
20440 be interpreted as a long long.
20441
20442 1998-08-13 Warren Levy <warrenl@cygnus.com>
20443
20444 * decl.c (init_decl_processing): Use _Jv_InitClass, not
20445 soft_initialise_class. Use _Jv_NewMultiArray, not
20446 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
20447 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
20448 _Jv_CheckArrayStore, not soft_checkarraystore. Use
20449 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
20450
20451 1998-08-12 Per Bothner <bothner@cygnus.com>
20452
20453 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
20454 length_identifier_node): New global tree node constants.
20455 * parse.y (kw_super, kw_this, kw_length): Removed globals.
20456 Replace uses by super_identifier_node etc.
20457 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
20458
20459 * parse.y (resolve_field_access): Don't special-case ".length" if
20460 flag_emit_class_files.
20461 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
20462 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
20463 and ARRAY.length.
20464
20465 1998-08-11 Per Bothner <bothner@cygnus.com>
20466
20467 * decl.c (init_decl_processing): Remove unused method_type_node fields.
20468 * class.c (make_method_value): Remove init for removed fields.
20469
20470 * class.c (layout_class): Use build_java_argument_signature.
20471 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
20472
20473 * typeck.c (push_java_argument_signature): Removed. Merged into ...
20474 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
20475 (build_java_signature): Don't use push_java_argument_signature.
20476
20477 * typeck.c (lookup_argument_method): New function.
20478 * parse.y (java_check_regular_methods): Use lookup_argument_method
20479 instead of lookup_java_method2 followed by lookup_java_method.
20480
20481 * parse.y (check_method_redefinition): Minor optimization.
20482
20483 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
20484 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
20485
20486 1998-08-10 Tom Tromey <tromey@cygnus.com>
20487
20488 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
20489 c-pragma.o.
20490
20491 * gjavah.c (java_float_finite): Use K&R-style definition.
20492 (java_double_finite): Likewise.
20493 (generate_access): Now returns void. Changed all callers.
20494 (last_access_generated): Removed.
20495 (process_file): Only make a single pass over the .class file.
20496
20497 1998-07-29 Per Bothner <bothner@cygnus.com>
20498
20499 * class.c (get_dispatch_table): Add extra dummy vtable entry,
20500 for compatibility for G++ (with -fvtable-thunks).
20501 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
20502
20503 * gjavah.c (process_file): Use public inheritance for super-class.
20504
20505 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
20506
20507 * lex.c (java_init_lex): Initialize ctxp->package.
20508 * parse.h (struct parser_ctxt): package and package_len replaced
20509 by tree package, an identifier node. Field method_decl_list is
20510 gone. Fixed comments.
20511 (lookup_field_wrapper, merge_qualified_name, not_accessible,
20512 class_in_current_package): New function prototypes.
20513 * parse.y (array_type:): Set class loaded flag on primitive type
20514 arrays.
20515 (package_declaration:): Assign ctxp->package to the
20516 identifier node.
20517 (method_invocation:): Handle invocation of method qualified by
20518 `super'.
20519 (single_type_import_declaration:): Removed ambiguity check.
20520 (java_pop_parser_context): New local variable `next'. Reset and
20521 set IMPORT_CLASSFILE_NAME flags on current and previous import
20522 list.
20523 (java_accstring_lookup): Use new local macro COPY_RETURN.
20524 (lookup_field_wrapper): New function.
20525 (parser_qualified_classname): Use merge_qualified_name.
20526 (parser_check_super_interface): Broaden error message.
20527 (do_resolve_class): Check for qualified class name in the current
20528 compilation unit if appropriate.
20529 (process_imports): Check for already defined classes.
20530 (check_pkg_class_access): Got rid of call to
20531 get_access_flags_from_decl.
20532 (java_complete_expand_methods): Call safe_layout_class based on
20533 the current class size.
20534 (make_qualified_primary): Build a WFL qualification on primary if
20535 none exists.
20536 (merge_qualified_name): New function.
20537 (make_qualified_name): Use merge_qualified_name.
20538 (resolve_expression_name): Use safe_lookup_field.
20539 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
20540 (resolve_qualified_expression_name): Likewise. Check on resolved
20541 element accessibility.
20542 (not_accessible_p, class_in_current_package): New functions.
20543 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
20544 (patch_method_invocation_stmt): Merged common pieces. Check
20545 accessibility of invoked method.
20546 (check_for_static_method_reference): Add returned type in error
20547 message.
20548 (invocation_mode): Get rid of bogus check on PRIVATE methods.
20549 (refine_accessible_methods_list): Merged two conditions in test.
20550 (java_complete_class): Sanity check on stabilize_ref gone.
20551 * zextract.c (read_zip_archive): Cast lseek second argument to long.
20552
20553 1998-07-28 Per Bothner <bothner@cygnus.com>
20554
20555 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
20556
20557 1998-07-24 Tom Tromey <tromey@cygnus.com>
20558
20559 * gjavah.c (F_NAN): Removed.
20560 (F_NAN_MASK): New macro.
20561 (F_POSITIVE_INFINITY): Removed.
20562 (F_NEGATIVE_INFINITY): Likewise.
20563 (java_float_finite): Rewrote.
20564 (D_NAN_MASK): Renamed.
20565 (java_double_finite): Rewrote.
20566 (D_POSITIVE_INFINITY): Removed.
20567 (D_NEGATIVE_INFINITY): Likewise.
20568
20569 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
20570 If verbose, print underlying representation of value in hex.
20571
20572 1998-07-24 Per Bothner <bothner@cygnus.com>
20573
20574 * buffer.h, buffer.c: New files.
20575 * Makefile.in (JAVA_OBJS): Add buffer.o.
20576
20577 Support locals variables and writing their debug entries to .class.
20578 * jcf-write.c: Simplify some by user new buffer type.
20579 (vode_buffer_grow): Removed.
20580 (struct localvar_info): New type.
20581 (localsvars, localvartable): New buffers.
20582 (localvar_alloc, localvar_free): New functions.
20583 (generate_bytecode_insns): Handle local variables.
20584 (generate_classfile): Write LocalVariableTable attribute.
20585
20586 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
20587
20588 * jcf-io.c (open_in_zip): Check the zipfile magic number.
20589 * zipfile.h (ZIPMAGIC): New macro.
20590
20591 1998-07-24 Tom Tromey <tromey@cygnus.com>
20592
20593 * Makefile.in (gjavah.o): Updated dependencies.
20594 (jcf-dump.o): Likewise.
20595 (all.indirect): Use ../gjavah.
20596 (../gjavah$(exeext)): Likewise.
20597 (clean): Don't remove gjavah.
20598 (clean): Remove parse.c, not java/parse.c.
20599 * Make-lang.in (java): Added gjavah.
20600 (gjavah$(exeext)): New target.
20601 (GJAVAH_SOURCES): New macro.
20602 (java.all.build): Added gjavah.
20603 (java.all.cross): Likewise.
20604 (java.rest.encap): Likewise.
20605 * config-lang.in (compilers, stagestuff): Added gjavah.
20606
20607 1998-07-23 Tom Tromey <tromey@cygnus.com>
20608
20609 * gjavah.c (java_float_finite): New function.
20610 (java_double_finite): Likewise.
20611 (F_POSITIVE_INFINITY): New macro.
20612 (F_NEGATIVE_INFINITY): Likewise.
20613 (F_NAN): Likewise.
20614 (D_POSITIVE_INFINITY): Likewise.
20615 (D_NEGATIVE_INFINITY): Likewise.
20616 (D_NAN): Likewise.
20617 (print_field_info): Use java_float_finite and java_double_finite.
20618
20619 1998-07-23 Per Bothner <bothner@cygnus.com>
20620
20621 * parse.y (method_header): Name "this" implicit argument.
20622
20623 1998-07-22 Per Bothner <bothner@cygnus.com>
20624
20625 * jcf-write.c: Write out LineNumberTable attribute in .class file.
20626 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
20627 (put_linenumber): New function.
20628 (generate_bytecode_insns, generate_classfile): Write line numbers.
20629
20630 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
20631
20632 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20633 (lookup_name, build_known_method_ref, build_class_init,
20634 build_invokevirtual, invoke_build_dtable, match_java_method,
20635 build_field_ref, pushdecl_force_head, build_java_binop,
20636 binary_numeric_promotion, build_decl_no_layout,
20637 build_java_arrayaccess, build_newarray, build_anewarray,
20638 build_java_array_length_access, build_java_arraynull_check): New
20639 extern function prototypes.
20640 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20641 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20642 java-tree.h.
20643 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20644 to NULL
20645 * jcf.h (jcf_out_of_synch): New extern function prototype.
20646 * parse.h: Static/global function implemented in parse.y
20647 prototyped and declarations moved at the end of the file.
20648 (DECL_P): Check that the argument isn't null.
20649 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20650 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20651 (QUAL_DECL_TYPE): New macro.
20652 (PARAMS): Macro definition removed.
20653 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20654 (return_statement:): Call build_return.
20655 (field_access:): Call make_qualified_primary in sub rule.
20656 (method_invocation:): Build method invocation and call
20657 make_qualified_primary when processing primaries.
20658 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20659 get_type_from_signature.
20660 (java_check_regular_method): Extra integer 0 argument when calling
20661 lookup_java_method2.
20662 (lookup_java_interface_method2): Extra method DECL argument when
20663 calling lookup_java_interface_method2.
20664 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20665 COMPOUND_EXPR node.
20666 (java_complete_expand_method): Layout current class iff not
20667 already done. Don't process interface's methods.
20668 (java_complete_expand_method): Use super class only if it
20669 exists. Use current class otherwise.
20670 (make_qualified_primary): New function.
20671 (resolve_expression_name): Process qualified expression or
20672 expression from primary the same way.
20673 (resolve_expression_name): Two last arguments to
20674 resolve_field_access are now NULL_TREEs.
20675 (resolve_field_access): New variable is_static. Local field must
20676 be DECLs. is_static computed on field DECLs only. Append code in
20677 where_found to the field access if necessary. Use QUAL_DECL_TYPE
20678 to initialize field_type.
20679 (resolve_qualified_expression_name): New local variable,
20680 previous_call_static and is_static. Handle primaries with function
20681 calls, casts, array references and `this'. `super' now handled as
20682 `(super_class)this'. Use is_static to clarify boolean expressions.
20683 Added code to handle case where a proper handle is required to
20684 access a field. Use QUAL_DECL_TYPE where applicable.
20685 (maybe_access_field): New function.
20686 (patch_method_invocation_stmt): New arguments primary, where,
20687 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20688 deleted. Use `where' as a type to search from if specified. Check
20689 for static method reference where forbidden. Append primary or
20690 current_this to the argument list if not calling constructor nor
20691 static methods.
20692 (check_for_static_method_reference): New function.
20693 (patch_invoke): Layout the class on which new is done if
20694 necessary.
20695 (lookup_method_invoke): Changed format to report errors on
20696 methods.
20697 (qualify_ambiguous_name): New local variable this_found. Now
20698 handle things from primaries. Method call are considered
20699 expression names.
20700 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20701 changed into NULLs.
20702 (not_initialized_as_it_should_p): Comply with the new DECL_P.
20703 (java_complete_tree): New case fo RETURN_EXPR. Process function
20704 call arguments in separate function.
20705 (complete_function_arguments): New function.
20706 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20707 anymore.
20708 (patch_assignment): Take the return function slot into account as
20709 a RHS. Distinguish assignment from a return.
20710 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20711 when checking methods in interfaces.
20712 (resolve_type_during_patch): NULL argument to unresolve_type_p
20713 instead of NULL_TREE.
20714 (patch_newarray): Fixed typo in comment.
20715 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20716 (build_return, patch_return): New functions.
20717 * typeck.c (lookup_java_constructor): Fixed typo in comment.
20718
20719 1998-07-21 Per Bothner <bothner@cygnus.com>
20720
20721 * constants.c (find_name_and_type_constant, find_fieldref_index,
20722 find_methodref_index): New methods.
20723 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
20724 just return given method. Also, rename to build_known_method_ref.
20725 (expand_invoke): Rename call to build_invoke_non_interface.
20726 * java-tree.h, parse.h: Update prototype.
20727 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
20728 (such as expand_expr_stmt) if flag_emit_class_files.
20729 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20730 STACK_TARGET, IGNORE_TARGET): New macros.
20731 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
20732 (generate_bytecode_insn): New function to generate method's bytecode.
20733 (generate_classfile): Node generate Code attribute for a method.
20734 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20735 push_long_const, field_op, adjust_typed_op, maybe_wide):
20736 New functions used by generate_bytecode_insn.
20737
20738 * typeck.c (signature_include_return): Remove variable.
20739 (push_java_argument_signature, build_java_argument_signature): New.
20740 (build_java_signature): Use push_java_argument_signature.
20741 * parse.y: Use build_java_argument_signature instead of fiddling
20742 with signature_include_return.
20743
20744 1998-07-17 Tom Tromey <tromey@cygnus.com>
20745
20746 * gjavah.c (print_c_decl): Always generate JArray<>* for array
20747 types.
20748
20749 * Makefile.in (all.indirect): Added gjavah$(exeext).
20750 (gjavah$(exeext)): Added $(exeext).
20751 (clean): Likewise.
20752
20753 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
20754
20755 * class.c (layout_class): Call to java_layout_parsed_class replace
20756 by safe_layout_class.
20757 * expr.c (build_java_array_length_access): Removed static storage
20758 class in the function definition.
20759 (build_java_arraynull_check): Likewise.
20760 Also fixed typos in two comments.
20761 * lex.c (java_init_lex): Initialize static global kw_length.
20762 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20763 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20764 java_lex_error.
20765 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20766 * parse.h (resolve_no_layout): New static function declaration.
20767 (get_identifier_in_static): Declaration removed.
20768 (java_layout_parsed_class): Function name declaration changed to
20769 safe_layout_class.
20770 (build_newarray_node, patch_newarray, resolve_type_during_patch,
20771 not_initialized_as_it_should_p, build_this): New static function
20772 declarations.
20773 (pushdecl_force_head, build_java_binop, int_fits_type_p,
20774 binary_numeric_promotion, stabilize_reference,
20775 build_decl_no_layout, build_java_arrayaccess): Extern function
20776 declarations moved into their own section.
20777 (build_newarray, build_anewarray, build_java_array_length_access,
20778 build_java_arraynull_check): New extern function declarations.
20779 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20780 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20781 fake tree codes.
20782 (CALL_CONSTRUCTOR_P): New macro.
20783 * parse.y (kw_length): New static global tree node.
20784 (return_statement): Tagged <node>.
20785 (RETURN_TK): Tagged <operator>.
20786 (variable_declarator_id:): Build variable declaration with an
20787 empty initialization value if a syntax error was found in the
20788 initialization part of the variable declaration.
20789 (statement_without_trailing_substatement:): return_statement: now
20790 uses the default rule.
20791 (return_statement:): Temporarily fixed to return NULL_TREE.
20792 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20793 (class_instance_creation_expression:): Class creation rules now
20794 call build_method_invocation upon reduction.
20795 (array_creation_expression:): Rules call build_newarray_node upon
20796 reduction.
20797 (dim_exprs:): Build a list of dimension expressions.
20798 (dim_expr:): Store location of the OSB_TK in the dimension
20799 expression node.
20800 (method_invocation:): Added a new error rule.
20801 (build_unresolved_array_type): WFL argument may also be an array
20802 on a primitive type. Name of the argument changed to reflect this.
20803 (method_declarator): Insert argument type at the beginning of the
20804 argument type list and later reverse the list.
20805 (unresolved_type_p): Argument 'returned' may be optionally
20806 NULL_TREE.
20807 (java_layout_class_from_source): Function renamed
20808 safe_layout_class.
20809 (resolve_and_layout): Now call resolve_no_layout and
20810 safe_layout_class.
20811 (resolve_no_layout): New function.
20812 (purify_type_name): New function.
20813 (complete_class_report_errors): Call purify_type_name during error
20814 report on a type not found.
20815 (process_imports): error_found local variable doesn't need to be
20816 initialized to zero.
20817 (declare_local_variables): New local type_wfl. Fixed typo in error
20818 message. type_wfl assigned to unresolved type and used to register
20819 incomplete type. Build a WFL around the variable initialization
20820 statement so that debug info can be generated on it.
20821 (source_start_java_method): Reverse argument list after they've
20822 been processed.
20823 (current_this): New static global variable.
20824 (java_complete_expand_methods): Set current_this when appropriate.
20825 (resolve_expression_name): Build correct static and non static
20826 field access bearing a simple name.
20827 (resolve_field_access): Resolve the length field of arrays. Handle
20828 f.m() cases.
20829 (patch_method_invocation_stmt): Set the type of the method
20830 invocation to error_mark_node. This value is later overridden by a
20831 valid type, if any. Don't handle qualified constructor invocation
20832 as qualified method invocation. Call lookup_method_invoke with its
20833 new flag. It's no longer necessary to access the selected method
20834 as the value of a tree list. Handle constructor invocation.
20835 (patch_invoke): Reverse argument list when invoking non interface
20836 methods. Insert call to new as the first argument of the
20837 constructor.
20838 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20839 defined within a final class. Return INVOKE_STATIC if the invoked
20840 method is a constructor.
20841 (lookup_method_invoke): New lc argument is a flag to indicate a
20842 constructor lookup. Now handle constructor lookup. Choose the most
20843 specific method in case several were matching the invocation
20844 requirements. Return a method decl instead of a tree list featuring
20845 one single method decl element.
20846 (refine_accessible_methods_list): New lc flag argument to
20847 indicate that a constructor is being looked up.
20848 (not_initialized_as_it_should_p): New function.
20849 (java_complete_tree): Now process fake tree codes
20850 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20851 save_expr on resolved function call arguments. Case on
20852 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20853 (patch_assignment): LHS can be a field access expression. When
20854 dealing with reference, lhs_type is the promoted type of the
20855 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20856 applicable.
20857 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20858 (patch_binop): Use not_initialized_as_it_should_p where
20859 applicable.
20860 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20861 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20862 where applicable.
20863 (resolve_type_during_patch): New function.
20864 (patch_cast): Call resolve_type_during_patch to resolve type and
20865 report error accordingly.
20866 (patch_array_ref): Use not_initialized_as_it_should_p where
20867 applicable. Array base expression is saved before being
20868 used. Promote the type of an array elements if it contains non
20869 builtin types.
20870 (build_newarray_node, patch_newarray, build_this): New functions.
20871
20872 1998-07-16 Tom Tromey <tromey@cygnus.com>
20873
20874 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20875 increment it in `for' statement.
20876 (print_field_info): If number is inf or nan, don't print it.
20877 (print_method_info): If method name is `delete', just ignore it.
20878 (print_c_decl): Special-case jstringArray.
20879
20880 * gjavah.c (help): New function.
20881 (no_argument): New function.
20882 (usage): Changed text.
20883 (main): Rewrote argument handling. Now handles -v, --help,
20884 --version.
20885 (version): New function.
20886 (found_error): New global.
20887 (main): Return found_error.
20888 (generate_access): Set found_error.
20889 (print_c_decl): Likewise.
20890
20891 1998-07-15 Tom Tromey <tromey@cygnus.com>
20892
20893 * gjavah.c (print_c_decl): Don't print "," when examining field.
20894 Skip type name when looking at "[L" types.
20895 (process_file): Now static.
20896 (generate_access): Now returns int.
20897 (last_access_generated): New global.
20898 (process_file): Clear last_access_generated; make multiple passes
20899 over the class.
20900 (print_field_info): Just return if generate_access returns true.
20901 (print_method_info): Likewise. Also, allow <init> functions to
20902 pass through.
20903 (print_c_decl): Added is_init argument. Print constructors
20904 properly.
20905 (print_cxx_classname): Use UTF8_GET to extract characters from
20906 string.
20907 (print_base_classname): New function.
20908 (print_class_decls): New function.
20909 (process_file): Use it.
20910 (utf8_cmp): New function.
20911
20912 1998-07-13 Nick Clifton <nickc@cygnus.com>
20913
20914 * lang-options.h: Format changed to match changes in gcc/toplev.c
20915 to implement a --help option.
20916
20917 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
20918
20919 * decl.c (init_decl_processing): Revert change to dtable_type.
20920
20921 1998-07-09 Per Bothner <bothner@cygnus.com>
20922
20923 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20924
20925 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
20926
20927 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20928
20929 * lang.c (lang_init): Default flag_exceptions to 1, without
20930 checking to see if it's 2 first.
20931
20932 1998-07-08 Jeffrey A Law (law@cygnus.com)
20933
20934 * constants.c: Include "system.h".
20935 * decl.c: Likewise.
20936 * lang.c (flag_new_exceptions): Get via extern now.
20937 (lang_init_options): New functions. Turn on flag_new_exceptions.
20938
20939 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
20940
20941 * lex.c (java_lex): Return 0 when we see an invalid character in
20942 the input.
20943
20944 * lex.c (java_read_char): Specify extra argument when calling
20945 java_lex_error.
20946 (java_read_unicode, java_parse_end_comment,
20947 java_parse_escape_sequence): Likewise,
20948 (java_lex): Specify extra argument when calling
20949 java_lex_error. Test that IDs are beginning with a legal character
20950 for IDs. Handle invalid characters with an error message and a
20951 call to java_lex_error.
20952 (java_lex_error): Adjust column position by new argument
20953 `forward'. Issue an error even if in the middle of reporting an
20954 other error.
20955
20956 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
20957
20958 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20959 we don't explicitly put a null pointer when we're copying it.
20960
20961 1998-07-07 Tom Tromey <tromey@cygnus.com>
20962
20963 * gjavah.c (print_cxx_classname): New function.
20964 (super_class_name): Likewise.
20965 (print_super_fields): Removed.
20966 (in_super): Removed.
20967 (print_field_info): Never generate #defines.
20968 (print_c_decl): Changed generated types to match JNI. No longer
20969 print class name before method name.
20970 (print_method_info): Print "static" before static methods.
20971 Print "virtual" before non-final methods.
20972 (usage): Use exit(1), not exit(-1).
20973 (main): Likewise.
20974 (print_field_info): Use %.17g to print a double.
20975 (last_access): New globals.
20976 (process_file): Initialize last_access.
20977 (usage): Now static.
20978 (ACC_VISIBILITY): New define.
20979 (generate_access): New function.
20980 (print_field_info): Call it.
20981 (print_method_info): Likewise. Also, generate information for all
20982 methods, not just native methods. Return void.
20983 (print_c_decl): Return void.
20984 (print_field_info): Return void.
20985
20986 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20987
20988 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
20989 processing the jc1 grammar file. Prefix bison functions and
20990 variables with java_.
20991 (parse.c): Dependencies on parse.h and lex.h
20992 * expr.c (build_java_arrayaccess): Function now global.
20993 * java-tree.h: Comment reorganized to carry on previous
20994 classification effort.
20995 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
20996 RESOLVE_TYPE_NAME_P): New flags on WFLs.
20997 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
20998 java_parse (new prefix java_ generated by bison).
20999 (java_layout_parsed_class, java_register_parsed_class): Function
21000 call removed.
21001 (yyparse): Removed unnecessary call to init_outgoing_cpool.
21002 * lex.c (static tree wfl_op): Variable deleted.
21003 (java_init_lex): Initialize kw_super and kw_this. Initialize more
21004 ctxp fields to NULL_TREE.
21005 (java_lex): No longer create WFL for operators. Filename caching
21006 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
21007 created as STRING_CST and later expanded. Removed extra argument
21008 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
21009 and SUPER.
21010 (build_wfl_node): Removed code in comments.
21011 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
21012 store token and location data in the current bison token.
21013 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
21014 static/extern function declaration at the beginning of the file.
21015 (struct qualification): Data structure definition deleted.
21016 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
21017 (qualify_ambiguous_name): Function declaration modified. Function
21018 now returns nothing.
21019 (build_array_ref, patch_array_ref, make_qualified_name,
21020 resolve_qualified_expression_name, maybe_generate_clinit,
21021 resolve_field_access): New static function declarations.
21022 (build_java_arrayaccess): New extern function declaration.
21023 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
21024 (CALL_EXPR_PRIMARY): Macro deleted.
21025 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
21026 (struct parser_ctxt): Field initialized_final
21027 removed. non_static_initialized, static_initialized: New fields.
21028 * parse.y (static tree kw_super, static tree kw_this): New global
21029 static.
21030 (%union): tree wfl field of operator member replaced by int
21031 location. WFLs are non longer created for operators.
21032 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
21033 (qualified_name:): Now calls make_qualified_name to build the
21034 identifier.
21035 (type_declaration:): Consider generating <clinit> when class
21036 parsing completed.
21037 (variable_declarator:): Directly build an assignment node when the
21038 variable is initialized when declared.
21039 (this_or_super:): Build a WFL and set current location when THIS
21040 or SUPER are parsed.
21041 (expression_statement:): Wrap statement around a WFL.
21042 (primary_no_new_array:): Fixed typo. Changed value returned by
21043 THIS_TK because of its new type (temporary).
21044 (dim_exprs:): Temporary fix because of OSB_TK's new type.
21045 (field_access:): Build qualified name with SUPER.
21046 (method_invocation:): Fixed returned value because of SUPER's new
21047 type.
21048 (array_access:): Use OSB_TK location information.
21049 (post_increment_expression:, post_decrement_expression:,
21050 unary_expression:, pre_increment_expression:,
21051 pre_decrement_expression:, unary_expression_not_plus_minus:,
21052 cast_expression:, multiplicative_expression:,
21053 additive_expression:, shift_expression:, relational_expression:,
21054 equality_expression:, and_expression:, exclusive_or_expression:,
21055 inclusive_or_expression:, conditional_and_expression:,
21056 conditional_or_expression:, assignment:): Use new location/token
21057 information available on operators.
21058 (create_class): Set super_decl_type to NULL_TREE when processing
21059 java.lang.Object.
21060 (register_fields): Field initialization is now a MODIFY_EXPR
21061 node. Chain initialization code to the matching lists (according
21062 to the field declaration modifiers).
21063 (maybe_generate_clinit): New function.
21064 (method_header): Don't set method's DECL_NAME to a WFL when adding
21065 methods to java.lang.Object.
21066 (resolve_and_layout): Now can return NULL_TREE if the type
21067 resolution fails. Otherwise, return the class DECL instead of its
21068 TYPE.
21069 (check_method_redefinition): Don't patch method DECL_NAME if it
21070 belongs to java.lang.Object.
21071 (process_imports): Simply assign error_found to the value returned
21072 by check_pkg_class_access.
21073 (declare_local_variables): Don't use their init statements (if
21074 any) when parsing error were previously found. Reuse MODIFY_EXPR
21075 build during parsing as an init statement.
21076 (java_method_add_stmt): Now return the current method body.
21077 (java_layout_parsed_class, java_register_parsed_class): Functions
21078 removed.
21079 (java_complete_expand_methods): Initialize the constant pool on a
21080 per class basis. Layout the classes before expanding their method
21081 bodies. Don't try expand artificial constructor code if error were
21082 found. Make the classes data and register them if no error were
21083 found.
21084 (java_complete_expand_method): Retrieve an artificial constructor
21085 argument list before entering its body. Assign the top block to
21086 the artificial constructor function body and set types of declared
21087 blocks and compound statements to void. Walk method body if not an
21088 artificial constructor.
21089 (make_qualified_name, cut_identifier_in_qualified): New functions.
21090 (resolve_expression_name): Fixed comments. Save/restore the
21091 current class CLASS_LOADED_P flag value. Build non qualified
21092 static field access and handle qualified expression names.
21093 (resolve_field_access, resolve_qualified_expression_name): New
21094 functions.
21095 (patch_method_invocation_stmt): Use the new expression resolution
21096 scheme, calling resolve_field_access when the function call is
21097 resolved as an expression.
21098 (qualify_ambiguous_name): Function rewritten to work on qualified
21099 expression produced by make_qualified_name.
21100 (java_complete_tree): Promote type when function's argument are
21101 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
21102 the assignment to discover further errors if RHS is a expression
21103 name that fails to evaluate. Declare LHS initialized even though
21104 the assignment failed. Don't use the location variable and removed
21105 extra argument in patch function calls. Now handle the ARRAY_REF
21106 case and build internal string representation when STRING_CSTs are
21107 walked.
21108 (build_method_invocation): Don't wrap function call around a WFL.
21109 (build_assignment): Likewise. Use the operator location
21110 information.
21111 (patch_assignment): Handle array access LHSs. Handle error
21112 provenance, resulting in a better error report.
21113 (build_binop): Use op_location from operator as binop location
21114 information.
21115 (build_unaryop, build_incdec, build_cast): Likewise.
21116 (patch_binop): Extract location information from the node. Fixed
21117 typo in error message.
21118 (patch_unary_op): Extract location information from the node.
21119 (build_array_ref, patch_array_ref): New functions.
21120
21121 1998-07-01 Tom Tromey <tromey@cygnus.com>
21122
21123 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
21124 match _Jv_IsInstanceOf.
21125 * decl.c (init_decl_processing): Use _Jv_NewArray, not
21126 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
21127
21128 1998-06-30 Tom Tromey <tromey@cygnus.com>
21129
21130 * decl.c (init_decl_processing): Functions are now named
21131 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
21132
21133 1998-06-29 Per Bothner <bothner@cygnus.com>
21134
21135 * java-tree.h (load_class): Add prototype.
21136 * class.c (is_compiled_class): Add missing arg to load_class.
21137 * expr.c (expand_java_NEW): Call load_class.
21138 * parse.y (process_import): Removed bogus use of void return value.
21139
21140 1998-06-25 Per Bothner <bothner@cygnus.com>
21141
21142 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
21143 Function name is "_Jv_Throw" instead of "soft_athrow".
21144 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
21145 Function name is "_Jv_AllocObject" instead of "soft_new".
21146 Takes an extra parameter (object size).
21147 * expr.c: Update calls.
21148
21149 1998-06-24 Per Bothner <bothner@cygnus.com>
21150
21151 * lex.c (java_get_line_col): Handle end-of-file.
21152 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
21153
21154 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
21155
21156 * lang.c (lang_init): Make -fexceptions the default.
21157 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
21158 exception handling is not turned on.
21159
21160 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
21161
21162 * lang.c (flag_new_exceptions): Make this this default.
21163 * decl.c (end_java_method): Call emit_handlers.
21164 * except.c (method_init_exceptions): Set language code and version.
21165 (expand_start_java_handler): Enable exception, and call
21166 expand_eh_region_start.
21167 (expand_end_java_handler): Enable exception, and set up catch blocks.
21168 (emit_handlers): New routine to generate the saved handlers.
21169 * java-except.h (emit_handlers): Add prototype.
21170
21171 1998-06-12 Per Bothner <bothner@cygnus.com>
21172
21173 We used to have three different representations of the constant pool:
21174 the CPool structure, the tree_constant_pool, and the constructures
21175 used to build the Class object (which may need class and string
21176 constants) in compiled code. None were appropriate for compiling
21177 to .class files, so I did a major overhaul.
21178
21179 First, the tree_constant_pool array was removed. Things were
21180 modified to the CPool structure in the JCF could be used.
21181 Second, a "capacity" field was added to the CPool, and functions
21182 written to search for a matching constant, adding one if not found.
21183 The code that generated the Class object was changed to use a CPool.
21184 The actual TREE_LISTs used to build the CONSTRUCTORs used for
21185 the static Class object are now only in build_constants_constructor.
21186 Finally, I wrote code which can generate a .class file (including its
21187 constant pool) from the RECORD_TYPE of a class. This is a big step
21188 on the way to compiling Java source into .class files.
21189
21190 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
21191 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
21192
21193 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
21194 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
21195 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
21196 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
21197 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
21198 (lang_type): Removed constant_pool field.
21199 * jcf.h (CPool): Renamed size to count. Added field capacity.
21200 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
21201 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
21202 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
21203
21204 * constants.c (current_constant_pool_tags, current_constant_pool_data,
21205 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
21206 * constants.c (build_constants_constructor): Use new outgoing_cpool.
21207 (set_constant_entry, find_constant1, find_constant2,
21208 find_class_constant, count_constant_pool_bytes, write_constant_pool,
21209 find_utf8_constant, find_class_or_string_constant): New functions.
21210
21211 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
21212 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
21213 (give_name_to_class, get_class_constant): Likewise.
21214 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
21215 (get_name_and_type_constant, get_ref_constant): Removed.
21216 * parse.h (parser_ctxt): Remove field tree_constant_pool.
21217 * parse.y: Don't save/restore tree_constant_pool.
21218 * verify.c (verify_jvm_instructions): Update for new approach.
21219 * expr.c (expand_invoke, expand_java_field_op): Likewise.
21220
21221 * lang-options.h: Added -femit-class-file, -femit-class-files.
21222 * lang.c (flag_emit_class_files), java-tree.h: New flag.
21223 (lang_f_options): Added "emit-class-file(s)".
21224
21225 * expr.c (build_java_arrayaccess): Generate more efficient array
21226 bounds checking, by using unsigned compare.
21227
21228 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
21229
21230 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
21231
21232 * parse.h: New comment on the handling of unresolved type
21233 identifiers. JDEPs are now part of the jdep_code enum.
21234 (typedef struct jdep): Now use enum jdep_code or int, depending on
21235 availability. Both are narrowed down to an 8 bits bitfield.
21236 (CALL_EXPR_PRIMARY): Fixed comment.
21237
21238 1998-06-10 Tom Tromey <tromey@cygnus.com>
21239
21240 * Make-lang.in (java): Added gjavac and jvgenmain.
21241 (java.start.encap): Depend on gjavac.
21242 (java.rest.encap): Depend on jvgenmain.
21243
21244 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
21245 (JAVA_CROSS_NAME): Likewise.
21246 (java.all.build): Depend on jvgenmain and gjavac.
21247 (java.all.cross): Depend on jvgenmain and gjavac-cross.
21248 (jvgenmain$(exeext)): New target.
21249 (java.install-common): Wrote.
21250 * config-lang.in (compilers, stagestuff): Added gjavac and
21251 jvgenmain.
21252
21253 1998-06-10 Dave Brolley <brolley@cygnus.com>
21254
21255 * lang.c (lang_decode_option): New argc/argv interface.
21256
21257 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21258
21259 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
21260 * decl.c (build_decl_no_layout): New function.
21261 * expr.c (java_lang_expand_expr): Layout declarations found in
21262 blocks before they're pushed.
21263 * jcf-parse.c (load_class): Save current line when parsing class
21264 file.
21265 (parse_source_file): Register class before expanding their
21266 methods.
21267 * lang.c (put_decl_node): Produce `null' when `void *' is
21268 processed.
21269 * lex.c (static tree wfl_op): New static global, for error report
21270 on casts.
21271 (java_init_lex): wfl_operator and wfl_op initialized
21272 here. Filename caching added for wfl_op. Return wfl_op when `(' is
21273 parsed.
21274 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
21275 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
21276 build_unresolved_array_type): New static function definitions.
21277 (build_decl_no_layout): New extern function declared.
21278 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
21279 faulty modifier exists.
21280 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
21281 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
21282 (UNARY_PLUS_EXPR): New fake operator.
21283 (struct parser_ctxt): New field osb_number.
21284 * parse.y (static tree wfl_operator): New static WFL for operator
21285 bound error messages.
21286 (DECR_TK, INCR_TK): Moved.
21287 (OP_TK): Tagged <operator>.
21288 (array_type:): Now call build_unresolved_array_type.
21289 (dim_expr:): Count the number of '[' seen.
21290 (post_increment_expression, post_decrement_expression,
21291 pre_increment_expression, pre_decrement_expression,
21292 unary_expression_not_plus_minus, unary_expression:): Actions are
21293 now building the corresponding unary expressions.
21294 (cast_expression:): Actions are now building cast expressions.
21295 (build_unresolved_array_type): New function.
21296 (create_interface): Reset the number of declared interfaces.
21297 (create_class): Likewise.
21298 (method_header): Methods declared within the scope of an interface
21299 are now implicitly set public and abstract.
21300 (java_complete_class): Variable's and parameter's type are patched
21301 with a promoted type.
21302 (declare_local_variables): Resolved non builtin types are promoted
21303 before being used to build a variable decl. Removed type patch
21304 posted on variable initialization statement.
21305 (source_start_java_method): Use build_decl_no_layout to build the
21306 decl of a parameter of incomplete type.
21307 (java_register_parsed_class): Process interfaces too. Call
21308 rest_of_decl_compilation on each processed class declarations.
21309 (java_complete_expand_methods): Don't attempt to expand things in
21310 interfaces.
21311 (java_complete_tree): Process CONVERT_EXPR, even though it always
21312 has a type. Propagate error_mark_node to node's type too. Promote
21313 method's call argument type and return error_mark_node if
21314 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
21315 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
21316 handle unary operator nodes.
21317 (build_assignment): Added comment.
21318 (print_int_node): New function.
21319 (patch_assignment): New second argument. New error handling. Use
21320 print_int_node. Handle references. Use can_cast_to_p to issue
21321 different error message according to the context and check upon
21322 the initialization of the RHS.
21323 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
21324 (operator_string): Handle more operators.
21325 (patch_binop): No longer use a function static
21326 wfl_operator. Improved error message on shift distance.
21327 (build_unaryop, build_incdec, build_cast, patch_unaryop,
21328 patch_cast): New functions.
21329
21330 1998-06-05 Per Bothner <bothner@cygnus.com>
21331
21332 * jvspec.c: New file.
21333 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
21334
21335 * java-tree.h (identifier_subst): Add declaration.
21336
21337 1998-06-04 Tom Tromey <tromey@cygnus.com>
21338
21339 * jvgenmain.c (main): Generate call to JvRunMain.
21340
21341 * class.c (make_class_data): Push value for "sync_info" field.
21342 * decl.c (init_decl_processing): Push "sync_info" field.
21343
21344 1998-06-03 Per Bothner <bothner@cygnus.com>
21345
21346 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
21347 Java (source) name, not signature.
21348 Set TYPE_ALIGN to (at least) that of element_type.
21349
21350 1998-06-02 Per Bothner <bothner@cygnus.com>
21351
21352 * class.c: Moved classname-mangling-rekated code to ...
21353 * mangle.c: ... this new file.
21354 * jvgenmain.c: New program (needs mangle.c) to generate main program.
21355 * Makefile.in: Update for above changes.
21356
21357 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
21358
21359 * expr.c (truthvalue_conversion): Convert integer and floating
21360 point value to their truth value.
21361 * lex.c (java_lex): Handle the `null' literal.
21362 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
21363 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
21364 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
21365 New macros.
21366
21367 * parse.y: Reorganization/documentation on token declaration.
21368 (binop_lookup[]): New added new tree codes.
21369 (relational_expression): Build corresponding binary operators.
21370 (equality_expression, conditional_and_expression,
21371 conditional_or_expression): Likewise.
21372 (java_complete_class): Fix crash in debug message.
21373 (java_complete_tree): Check initialization of method call
21374 arguments. Further bogus node evaluation to detect more error
21375 during assignments. Handles more binary operators.
21376 (patch_assignment): Use DECL_P.
21377 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
21378 code.
21379 (operator_string): Handle more case. Compacted source.
21380 (patch_binop): Changed function comment. Checking for
21381 uninitialized first operand takes the compound assignment into
21382 account and uses DECL_P. Checking for uninitialized second operand
21383 delayed to routine's end. Use macros to issue type bound error
21384 messages and issue messages on both operands if their types are
21385 different. Force fixed type into node. Handle all binary
21386 operators.
21387
21388 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21389
21390 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
21391 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
21392 build operator node and return tokens.
21393 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
21394 * parse.h (java_complete_tree): Changed returned type in prototype.
21395 (build_method_invocation, build_assignment, patch_assignment,
21396 patch_binop): New static function declarations.
21397 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
21398 BUILD_EXPR_WFL): New macros.
21399 * parse.y (enum tree_code binop_lookup[]): New static for token to
21400 TREE_CODE lookup.
21401 (%union): Parser union has new sub-structure `operator'.
21402 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
21403 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
21404 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
21405 ASSIGN_ANY_TK): Tokens tagged `operator'.
21406 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
21407 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
21408 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
21409 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
21410 (assignment_operator:): Rule tagged `operator'.
21411 (expression_statement:): Re-installed default rule.
21412 (method_invocation:): Sub rules call build_method_invocation.
21413 (postfix_expression:): Don't attempt to resolve name here. Just
21414 return an ID.
21415 (multiplicative_expression:): Sub-rules build corresponding binop
21416 expression node.
21417 (additive_expression:, shift_expression:, and_expression:,
21418 exclusive_or_expression:, inclusive_or_expression:): Likewise.
21419 (assignment:): Sub rule invoke build_assignment.
21420 (assignment_operator:): Default rules on sub rules.
21421 (force_error): Added documentation on this variable.
21422 (declare_local_variables): Build initialization calling
21423 build_assignment.
21424 (expand_start_java_method): Removed unused rtx declaration. Mark
21425 arguments as already initialized.
21426 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
21427 (java_complete_expand_methods): Don't process next method if
21428 completion of the previous one triggered errors.
21429 (java_complete_expand_method): Call source_end_java_method if no
21430 error were found during completion.
21431 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
21432 locals declaratilon. Handle names found within a class. Return
21433 error_mark_node when things aren't found.
21434 (patch_method_invocation_stmt): Return error_mark_node on failures.
21435 (patch_invoke): Removed unused local. Return the correct node.
21436 (java_complete_tree): Now returns a value. The BLOCK section binds
21437 local identifiers and the type of a BLOCK is now void. Assign the
21438 result of operand completion on COMPOUND_EXPR. Assign the
21439 encapsulated node of a WFL to the result of its completion, except
21440 when the node is an identifier. Now handle MODIFY_EXPR and several
21441 binary operators. Return error_mark_node on errors.
21442 (build_method_invocation, build_assignment, patch_assignment,
21443 build_binop, operator_string, patch_binop): New functions.
21444 * typeck.c (binary_numeric_promotion): New function.
21445
21446 1998-05-21 Per Bothner <bothner@cygnus.com>
21447
21448 * class.c (identifier_subst): New convenience wrapper for ident_subst.
21449 Replace most uses of ident_subst by identifier_subst.
21450
21451 * class.c (push_class_static_dummy_field): Removed function.
21452 (build_class_ref): Find Class object decl by looking up "CNAME.class",
21453 instead of looking got "class" static field. Create that decl here.
21454 (class_identifier_node): Removed; no longer needed.
21455 (init_class_processing): Don't init class_identifier_node.
21456 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
21457 Do nreverse 0 times (instead of twice) for Object and Class.
21458 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
21459
21460 1998-05-20 Per Bothner <bothner@cygnus.com>
21461
21462 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
21463 while initializing linenumber_count and linenumber_table.
21464 Do it before init_function_start (which calls emit_line_note).
21465 * expr.c (expand_byte_code): Don't need to clear lineno here.
21466
21467 1998-05-18 Tom Tromey <tromey@cygnus.com>
21468
21469 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
21470 then mangle number as _N_.
21471
21472 * class.c (mangle_class_field): New function.
21473 (build_class_ref): Set assembler name of class reference using
21474 mangle_class_field.
21475 (push_class_static_dummy_field): Likewise.
21476
21477 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
21478
21479 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
21480 of assigning to TREE_CODE. The latter method exploits a feature
21481 of GCC that is not ANSI compliant.
21482
21483 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
21484
21485 * decl.c (pushdecl_force_head): New function.
21486 (pushlevel): Removed conditional printf.
21487 (complete_start_java_method): Don't enter local variable scope if
21488 function is compiled from source code.
21489 * expr.c: parse.h now included
21490 (java_lang_expand_expr): New function.
21491 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
21492 printf. Terminate buffer when doing directories.
21493 * jcf-parse.c (parse_source_file): Call lang_init_source before
21494 parsing and before code generation.
21495 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
21496 use printf if the macro is defined.
21497 * lang.c (lang_init): Install lang_expand_expr hook on
21498 java_lang_expand_expr.
21499 (java_dummy_print): New function.
21500 (lang_init_source): New function.
21501 * lex.c (java_lex): Remember location of an opening brace at the
21502 second nesting level.
21503 (java_is_eol): Unget character seen after a CR if it is EOF.
21504 * parse.h: Now includes lex.h
21505 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
21506 printf if the macro is defined.
21507 (expand_start_java_method, build_expr_block, enter_block,
21508 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
21509 New static function declarations.
21510 (pushdecl_force_head): New extern function declaration.
21511 (INCOMPLETE_TYPE_P): New macro.
21512 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
21513 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
21514 BLOCK_EXPR_ORIGIN): New macros.
21515 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
21516 DECL_SOURCE_LINE_LAST): New macros.
21517 (struct parser_ctxt): Removed field current_method_decl, redundant
21518 with the field current_function_decl. Added fields
21519 first_ccb_indent1 and pending_block.
21520 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
21521 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
21522 tagged <node>
21523 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
21524 (compilation_unit:): Cosmetic on sub rule.
21525 (type_declaration:): Cosmetic on sub rules. Added an error rule.
21526 (variable_initializer:): Installed default rule on expression:.
21527 (method_declaration:): method_header: starts a new
21528 method. method_body: installs the function body, absorbs blocks
21529 emitted for temporary variable scopings, pops function's body block
21530 and merges function's last statement lineno in DECL_SOURCE_LINE.
21531 (method_body:): Installed default rules.
21532 (block:): Call enter_block when an opening brace is seen. Absorb
21533 scoping blocks and call exit_block when a closing brace is seen.
21534 (block_statement:): Cosmetic changes.
21535 (method_invocation:): Create WFL around CALL_EXPR node.
21536 (patch_stage): Added comment around definition.
21537 (method_header): Try to use first_ccb_indent1 as the first line of
21538 the method, so BP debug info are emitted at the first opening
21539 brace of the function. If the function has no body, use the
21540 location of the function's name. Override currently defined method
21541 name with the matching WFL so we can point redefinition errors
21542 using the location where the function's name was declared.
21543 (check_abstract_method_header): Interprets DECL_NAME as an
21544 identifier or as a WFL, accordingly.
21545 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
21546 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
21547 location and name information out of it and reinstall DECL_NAME to
21548 its original identifier node value.
21549 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
21550 function's source code).
21551 (read_import_dir): Test the value returned by find_class and issue
21552 a fatal accordingly.
21553 (declare_local_variables): Push a new block for the scope of the
21554 new variable(s) if code has been already generated at that nesting
21555 level. Pinpoint redefinition errors using the variable id
21556 WFLs. Generate initialization code if necessary. If the variable
21557 type is incomplete, register a patch on its decl.
21558 (source_start_java_method): Rewritten. Define a new block for the
21559 function's parameters. Build parameter decl out of function's
21560 arguments and register them for a patch if their types are
21561 incomplete.
21562 (expand_start_java_method): Includes the part of
21563 source_start_java_method that was pushing the parameter decls and
21564 completing the method start code.
21565 (source_end_java_method): Removed call the expand_end_bindings and
21566 poplevel (already taken care of). Reinstall function's arguments
21567 and get function's last line of code before calling
21568 expand_function_end.
21569 (java_method_add_stmt): New comment before the function's
21570 code. Complement the second operand of the current COMPOUND_EXPR
21571 if necessary.
21572 (java_complete_expand_methods): Don't generate debug info on line
21573 zero when expanding a generated constructor.
21574 (java_complete_expand_method): Set start and end line numbers for
21575 a artificially generated constructor to one and manually call
21576 enter_block and exit_block when defining it. For all methods:
21577 expand function's start calling the new expand_start_java_method
21578 and invoke java_complete_tree on the effective method's body, if
21579 any.
21580 (resolve_expression_name): Now use lookup_name_in_blocks to search
21581 local variable decls and print out an error when variables are
21582 undefined.
21583 (patch_method_invocation_stmt): Inserted comment before the
21584 function's code.
21585 (lookup_method_invoke): Chain method's arguments using chainon
21586 with the current arg list as a second argument. Inserted missing
21587 IDENTIFIER_POINTER when reporting an error on methods not found.
21588 (refine_accessible_methods_list): Don't retain constructors.
21589 (patch_arguments): Function removed.
21590 (java_complete_tree): Inserted comment before the function's
21591 code. New case for BLOCKs. Moved the WFL case a bit
21592 further. Complete function's arguments.
21593 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21594 maybe_absorb_scoping_blocks): New functions.
21595
21596 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21597
21598 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21599 previously set.
21600 * jcf-parse.c (parse_source_file, java_error_count): New forward
21601 and extern declarations.
21602 (java_parse_abort_on_error): Macro moved.
21603 (jcf_parse_source): fatal called if fopen fails. Now calls
21604 parse_source_file.
21605 (parse_source_file): New parse_only parameter. Reflects the
21606 elimination of the second pass.
21607 (yyparse): parse_source_file called with argument set to 0.
21608 * jcf.h (JCF_ZERO): Sets java_source to zero.
21609 * lex.c (java_init_lex): pass argument is gone. Function modified
21610 to be called once during the analysis of a file.
21611 (java_unget_unicode): Fixed typo in fatal message.
21612 (java_get_line_col): Likewise.
21613 (java_lval): Likewise. String literals no longer built during
21614 second pass.
21615 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21616 account.
21617 * parse.h (MODIFIER_WFL): New macro.
21618 (parse_check_super, parser_check_super_interface): Now return int.
21619 (parser_chain_incomplete_item, not_builtin_p,
21620 complete_method_decl): Declarations removed.
21621 (build_method_invocation_stmt, build_invoke): Renamed using the
21622 `patch' instead of `build'
21623 (register-incomplete_type, obtain_incomplete_type,
21624 java_complete_tree, java_complete_expand_method,
21625 unresolved_type_p, create_jdep_list): New function declarations.
21626 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21627 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21628 (jdep): New typedef on new struct _jdep.
21629 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21630 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21631 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21632 JDEP_RESOLVED_P): New macros.
21633 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21634 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21635 JDEP_VARIABLE): New enum values and jdep kinds.
21636 (jdeplist): New typedef on struct _jdeplist.
21637 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21638 macros.
21639 (CALL_EXPR_PRIMARY): New macro.
21640 (struct parser_ctxt): Fields java_pass, current_method_decl,
21641 method_decl_list deleted. New field jdeplist.
21642 (INCOMPLETE_P): Macro deleted.
21643 * parse.y (single_type_import_declaration:): Removed pass switch.
21644 (type_import_on_demand_declaration): Likewise.
21645 (field_declaration:): Removed pass switch on all sub rules.
21646 (class_declaration:): Call the complete_class_decl removed on
21647 class_body rules.
21648 (method_declaration:): Removed second pass switch. No longer chain
21649 methods decl when method_header reduced.
21650 (method_header:): Sub rules no longer depend on pass switch.
21651 (method_declarator:): Likewise.
21652 (method_body:): Likewise.
21653 (abstract_method_declaration:): Likewise.
21654 (block_statement:): Likewise.
21655 (local_variable_declaration:): Likewise.
21656 (argument_list:): Likewise.
21657 (method_invocation:): Likewise. Call to build_method_invocation_stmt
21658 removed. Partial CLASS_EXPR tree node built instead.
21659 (postfix_expression:): Removed pass switch on all sub rules.
21660 (java_pop_parser_context): Free classd_list content.
21661 (yyerror): Call obstrack_grow0 to finalize error message.
21662 (check_class_interface_creation): Comment modified to reflect new
21663 returned value meaning. Removed second pass switch. Return 1 if an
21664 error was found, 0 otherwise. Adjust pointer on filename if a
21665 leading path separator was found.
21666 (maybe_create_class_interface_decl): Removed first pass switch
21667 when linking the class decl to the class_list. Install a new
21668 jdep_list for the class.
21669 (add_superinterfaces): List of unresolved interfaces is
21670 gone. Unresolved interfaces are directly added to the current
21671 dependencies list.
21672 (create_interface): Second pass shortcut removed.
21673 ctpx->modifier_ctx access through MODIFIER_WFL.
21674 (create_class): Second pass shortcut removed. Call to
21675 register_incomplete_type replaces the call to
21676 parser_chain_incomplete_item.
21677 (complete_class_decl): Function removed.
21678 (duplicate_declaration_error): New way of retrieving redeclared
21679 item type.
21680 (register_fields): Call to lookup_modifier_cl replaced by
21681 MODIFIER_WFL. New way of handling unresolved type, using
21682 unresolved_type_p and obtain_incomplete_type.
21683 register_incomplete_type replaces call to parser_chain_incomplete_item.
21684 (patch_stage): New static global variable.
21685 (method_header): New way of handling unresolved type, using
21686 unresolved_type_p and obtain_incomplete_type. patch_stage used to
21687 indicates that the method decl needs to be patched.
21688 (check_abstract_method_header): Call to lookup_modifier_cl
21689 replaced by MODIFIER_WFL.
21690 (method_declarator): Incomplete argument type are registered
21691 calling register_incomplete_type. Patch on the declared method is
21692 issued in that case.
21693 (unresolved_type_p): New function.
21694 (parser_check_super_interface): New comment to reflect function's
21695 modified returned type (int). Function and has a new argument
21696 this_wfl. Call to parse_error_context uses this_wfl instead of
21697 relying on lookup_cl.
21698 (parser_check_super): Comment reflects function's new returned
21699 type (int). Function returns nonzero value on error.
21700 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21701 register_incomplete_type, jdep_resolve_class): New functions to
21702 handle incomplete types in declarations.
21703 (java_complete_class): Rewritten to work with the new incomplete
21704 type handling scheme.
21705 (complete_class_report_errors): Likewise.
21706 (complete_method_decl): Removed: it jobs is now handled by
21707 java_complete_class.
21708 (do_resolve_class): Class loaded in not already loaded and not
21709 found in Java source code.
21710 (java_check_regular_methods, java_check_abstract_methods): Don't
21711 call complete_method_decl anymore.
21712 (lookup_modifier_cl, not_builtin_p): Functions deleted.
21713 (read_import_dir): Got rid of the pass number dependency.
21714 (declare_local_variables): New handling of unresolved types (patch
21715 issued).
21716 (source_start_java_method): New parameter level. Function called
21717 with level set to 1 when argument types are potentially
21718 unresolved. Called to complete the job with level set to 2 once
21719 types are complete.
21720 (source_end_java_method): Call to permanent_allocation
21721 removed. Waiting to be replaced by a more suitable obstack
21722 management.
21723 (java_complete_expand_methods, java_complete_expand_method,
21724 java_expand_finals): New functions.
21725 (build_method_invocation_stmt): Renamed
21726 patch_method_invocation_stmt. Extracts function call expression
21727 (wfl) and arguments (args) from CALL_EXPR tree operands.
21728 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21729 call. Patch the function and argument operand of the CALL_EXPR
21730 tree argument.
21731 (patch_argument, java_complete_tree): New functions.
21732
21733 1998-04-20 Per Bothner <bothner@cygnus.com>
21734
21735 Recover from missing fields and methods (i.e. error instead of fatal).
21736 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
21737 * expr.c (expand_invoke): Recover from missing method.
21738 (expand_java_field_op): Recover from missing field.
21739 Inline references to java.lang.{Integer,Char,...}.TYPE.
21740 * typeck.c (get_type_from_signature), java-tree.h: New function.
21741 * class.c (add_method): Use get_type_from_signature.
21742 (build_class_ref): Handle a class that was not found.
21743 * typeck.c (convert): Handle conversion to pointers (for convenience).
21744 * verify.c (verify_jvm_instructions): Use get_type_from_signature
21745 instead of lookup_field to handle missing fields.
21746
21747 * jcf-parse.c (process_zip_dir): Set java_source.
21748
21749 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
21750
21751 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21752
21753 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
21754
21755 * jcf-parse.c (load_class): Don't change input_filename before
21756 calling jcf_parse_source (but still do it before calling
21757 jcf_parse).
21758 (jcf_parse_source): Assign input_filename after having saved the
21759 parser context.
21760 * lex.c (java_init_lex): Chain a WFL node to the import on demand
21761 list. ctxp->modifier_ctx zeroed according to its new
21762 definition. ctxp->filename initialized. Removed
21763 JAVA_MODIFIER_CTX_UNMARK.
21764 (java_unget_unicode): Update the character based column position.
21765 (java_allocate_new_line): ref_count not used anymore. Always free
21766 ctxp->p_line. Initialize c_line->char_col to 0.
21767 (java_get_unicode): Update the character based column position.
21768 (java_lex): Use ctxp->elc to store current position in source
21769 file, at the beginning of the parsed token. Set modifier_ctx entry
21770 corresponding to the parse modifier to a WFL node. Return a WFL
21771 node when an identifier is parsed.
21772 (java_lex_error): Now uses ctxp->elc to store current position in
21773 source.
21774 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21775 * lex.h (build_wfl_node): New function definitions.
21776 (struct java_line): ref_count and next fields are gone. New field
21777 char_col.
21778 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21779 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21780 (JAVA_COLUMN_DELTA): New macro.
21781 (java_lc): New typedef on new struct _java_lc.
21782 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21783 (parse_error_context, parse_warning_context): Changed prototypes.
21784 (java_get_line_col): Added as an available global function.
21785 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21786 (IC_DECL): Replaced by macro IC_TYPE
21787 (DEPEND_WFL): New macro.
21788 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21789 wrong modifier.
21790 (exit_java_complete_class): Removed a commented out statement.
21791 (struct parser_ctxt): Added comments on fields. modifier_ctx is
21792 now an array of tree nodes. Deleted fields line_list and
21793 e_line. New field elc, to replace e_line.
21794 * parse.y (array_type:): Build WFL node.
21795 (qualified_name:): Build a single WFL node out of two. Retain
21796 the location information of the first node in the resulting node.
21797 (package_declaration:): Use package name as a WFL node
21798 (single_type_import_declaration:): Use imported name as a WFL node.
21799 (type_import_on_demand_declaration:): Use root of the imported
21800 packages as a WFL node.
21801 (field_declaration:): Removed unused local variable cl.
21802 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21803 (yyerror): New static elc. Removed static error_line, error_pos.
21804 New local code_from_source. Save ctxp->elc into elc at the first
21805 pass. Call java_get_line_col to get a string of the line where
21806 the error occurred.
21807 (debug_line): Removed static function.
21808 (parse_error_context, parse_warning_context): Parameter cl is now
21809 a WFL node. Use its value to initialize ctxp->elc.
21810 (redefinition_error): Parameter cl is now a WFL node.
21811 (parse_add_interface): New parameter wfl. No longer call
21812 lookup_cl, use wfl instead.
21813 (check_class_interface_creation): Parameter cl is now a WFL node.
21814 (maybe_create_class_interface_decl): Likewise.
21815 (add_superinterfaces): New function.
21816 (create_interface): Removed local cl, node, super_decl,
21817 super_decl_type. Function now uses id as a WFL node. Better
21818 warning/error report on obsolete or forbidden mix of
21819 modifiers. Now calls add_superinterfaces to register interfaces.
21820 (create_class): Removed local cl, node. Local variable id is used
21821 as a WFL node. Better error report on forbidden modifier
21822 mix. Uses add_superinterfaces to register interfaces.
21823 (find_field): Argument cl is now a WFL node. Now store the WFL
21824 node of a fields that needs to be checked for their
21825 initialization.
21826 (method_header): Local variable node non longer used. Local
21827 variable id replaces cl.
21828 (check_modifiers_consistency): Local variable cl is now a WFL
21829 node.
21830 (method_declarator): Local variable cl replaced by parameter id.
21831 (parser_qualified_name): Now uses parameter name as a WFL node.
21832 (parser_check_super_interface): New parameter wfl, for achieve
21833 greater accuracy during error reports.
21834 (parser_chain_incomplete_item): New parameter named location. Used,
21835 along the decl, to construct the incomplete item node.
21836 (java_complete_class): resolve_class now uses WFL node extracted
21837 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21838 where appropriate.
21839 (complete_method_decl): Unresolved function's argument types are WFL.
21840 (resolve_class): Parameter cl is now a WFL node.
21841 (resolve_and_layout): Likewise.
21842 (do_resolve_class): Likewise. Try first to use cl and then do the
21843 lookup on the decl when calling check_pkg_class_access.
21844 (complete_class_report_errors): Use IC_TYPE in place of
21845 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21846 instead of doing a lookup over the decl.
21847 (java_check_final): Use WFL info from field tree list.
21848 (lookup_cl): Rewritten and returns a statically defined WFL node.
21849 (lookup_modifier_cl): Now uses information from WFL nodes.
21850 (process_imports): Likewise.
21851 (read_import_dir): name and cl arguments replaced by a single WFL
21852 node. Function modified accordingly.
21853 (find_in_imports_on_demand): Now uses WFL node.
21854 (check_pkg_class_access): cl argument is now a WFL node.
21855 (declare_local_variables): Fixed to use WFL nodes.
21856 (resolve_expression_name): Likewise.
21857 (build_method_invocation_stmt): name_combo argument renamed
21858 wfl. Function modified to use WFL nodes.
21859 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21860 (lookup_method_invoke): cl is now a WFL node. Added missing
21861 IDENTIFIER_POINTER to class type decl name.
21862
21863 1998-04-14 Dave Brolley <brolley@cygnus.com>
21864
21865 * lang.c (init_parse): Now returns char* containing the filename.
21866
21867 1998-04-10 Per Bothner <bothner@cygnus.com>
21868
21869 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
21870
21871 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
21872 * class.c (make_class_data): If flag_assume_compiled, initial class
21873 state is CSTATE_PREPARED; make superclass and interfaces direct
21874 references, rather than constant pool indexes.
21875
21876 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21877
21878 * parser.y: Include flags.h. Removed debug variable pl.
21879 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21880 (block:): Likewise.
21881 (labeled_statement_nsi:): Generate debug info when reducing
21882 expression_statement:.
21883 (check_pkg_class_access): get_access_flags_from_decl invocation
21884 fixed for new CLASS_* flags location.
21885 (source_end_java_method): Save/restore parser context when
21886 entering/leaving this routine. Restore lineno to its right value
21887 before calling expand_end_bindings.
21888 (build_method_invocation_stmt): build_invoke called with the
21889 current line information.
21890 (build_invoke): New argument cl. Wrap the function call around a
21891 wfl node.
21892 (refine_accessible_methods_list): Changed comment, removed
21893 unnecessary code.
21894 * parse.h: Fixed typo in comments.
21895 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21896 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21897 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
21898 parser_ccb_indent.
21899 * lex.c (java_lex): Record the last closing curly bracket of a
21900 function.
21901 * jcf-parse.c (jcf_parse_source): Now calls
21902 java_check_methods. Clarified comment, fixed typo.
21903
21904 1998-04-09 Dave Brolley <brolley@cygnus.com>
21905
21906 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21907 (finish_parse): Expose for non USE_CPPLIB builds.
21908
21909 1998-04-08 Jeffrey A Law (law@cygnus.com)
21910
21911 * lang.c (lang_print_xnode): New function.
21912
21913 1998-04-03 Per Bothner <bothner@cygnus.com>
21914
21915 * decl.c (class_dtable_decl), java-tree.h: New tree node.
21916 * class.c (get_dispatch_vector, get_dispatch_table): New functions
21917 used to build a class's dispatch table.
21918 (make_class_data): Generate dispatch table if flag_assume_compiled.
21919 Set dtable of class object to address of class_dtable_decl.
21920
21921 * decl.c (int_decl_processing): Make soft_badarrayindex_node
21922 be volatile and have side effects - generates better code.
21923
21924 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
21925 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21926
21927 * expr.c (expand_invoke): If class is final, method is
21928 effectively final, so can call it directly.
21929
21930 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
21931
21932 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
21933
21934 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
21935
21936 * parse.y (build_method_invocation_stmt): Removed extra argument
21937 to build_invoke.
21938
21939 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
21940
21941 * expr.c (dtable_indent): Now static global.
21942 (expand_invoke): Now call invoke_build_dtable and
21943 build_invokevirtual.
21944 (invoke_build_dtable, build_invokevirtual): New functions.
21945 * jcf-io.c (find_class): Defer issuing a warning by setting
21946 jcf->outofsynch to 1.
21947 * jcf-parse.c (jcf_out_of_synch): New function.
21948 (load_class): Test this_jcf.outofsynch flag and call
21949 jcf_out_of_synch accordingly.
21950 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
21951 comment indentation.
21952 * lex.c (java_get_unicode): Fixed code indentation.
21953 (java_lex): Create string literal. Fixed typo. Removed several
21954 premature obstack_free.
21955 * parse.h: New enums for name resolution and invocation mode.
21956 (struct qualification): New data structure.
21957 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21958 (do_resolve_class, build_method_invocation_stmt,
21959 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21960 debug_line, identical_subpath_p, invocation_mode,
21961 refine_accessible_methods_list, build_invoke,
21962 lookup_method_invoke): New functions declared.
21963 (build_invokevirtual, invoke_build_dtable, match_java_method,
21964 build_field_ref, jcf_out_of_synch): New references to external
21965 functions.
21966 (struct parse_ctxt): Removed artificial_constructor field.
21967 * parse.y: (array_type:): Type defined for this rule.
21968 (class_type:): Installed default rule for interface_type:.
21969 (array_type:): Now build Java array type.
21970 (qualified_name:): Now use obstack_grow0.
21971 (method_declaration:): Skip the artificial constructor added to
21972 the list, if any.
21973 (abstract_method_declaration:): Execute the code only during pass 1.
21974 (block:): Installed default rule in block_statements:.
21975 (block_statement:): Add the statement to the method during pass 2.
21976 (statement_expression): Installed default rule for
21977 method_invocation:.
21978 (argument_list:): Added code to build the argument list.
21979 (method_invocation:): Added call to create the method invocation
21980 node.
21981 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21982 (debug_line): New function for debug.
21983 (complete_class_decl): No longer do something during pass 1.
21984 (method_header): Use BUILD_PTR_FROM_NAME.
21985 (parser_qualified_classname): Use obstack_grow0. Removed bogus
21986 obstack_free.
21987 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
21988 function's main comment.
21989 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
21990 classes.
21991 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
21992 (resolve_class): Now works with arrays.
21993 (do_resolve_class, resolve_and_layout): New functions.
21994 (java_check_regular_methods): Reverse method list before and after
21995 having processed it. No longer set ctxp->artificial_constructor.
21996 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
21997 accordingly. Fixed typo in issued error message. Now use
21998 obstack_grow0.
21999 (find_in_imports_on_demand): Now use obstack_grow0.
22000 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
22001 (source_end_java_method): Call expand_expr_stmt instead of
22002 expand_expr. Calls it before calling expand_function_end.
22003 (java_method_add_stmt): Do nothing if errors were found during
22004 parsing.
22005 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
22006 (build_method_invocation_stmt, build_invoke, invocation_mode,
22007 lookup_method_invoke, refine_accessible_methods_list,
22008 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
22009 New functions.
22010 * typeck.c (build_java_signature): Properly end method signature
22011 if return type skipped.
22012 (match_java_method): New function.
22013
22014 1998-03-16 Per Bothner <bothner@cygnus.com>
22015
22016 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
22017
22018 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
22019
22020 * expr.c (build_invoke_non_interface): New function.
22021 (methods_ident, ncode_ident): Now static globals.
22022 (expand_invoke): Use build_invoke_non_interface.
22023 * java-tree.h (struct lang_decl): New field function_decl_body.
22024 (DECL_FUNCTION_BODY): New macro.
22025 * jcf-parse.c (jcf_parse_source): Deeper check before setting
22026 CLASS_FROM_SOURCE_P.
22027 (parse_source_file): Fixed typos. Call java_layout_parsed_class
22028 before starting pass 2. Call to java_generate_parsed_class replaced
22029 by java_register_parsed_class.
22030 * lex.c: Fixed typo in header. Some line width related formating.
22031 * lex.h: Some line width related formating.
22032 * parse.h (source_end_java_method, resolve_expression_name,
22033 complete_class_decl, maybe_create_class_interface_decl,
22034 check_class_interface_creation): New static function declarations.
22035 (java_layout_parsed_class, java_method_add_stmt): New function
22036 declarations.
22037 (struct parser_ctxt): Field mark_class_generate removed. New
22038 fields class_list and artificial_constructor.
22039 * parse.y: Fixed typo in header.
22040 (class_declaration:): Call complete_class_decl when class body
22041 parsed.
22042 (method_declaration:): Call source_end_java_method in pass 2 when
22043 the method body is defined.
22044 (postfix_expression:): Do expression name resolution on sub-rule
22045 name during pass 2.
22046 (create_class, create_interface): Merged common pieces.
22047 (check_class_interface_creation, maybe_create_class_interface_decl):
22048 New functions.
22049 (complete_class_decl): New function.
22050 (register_fields): Fixed line width related typo.
22051 (method_header): Correctly skip first argument when fixing
22052 argument line. Changed the loop.
22053 (java_check_circular_reference): Now use ctxp->class_list.
22054 (java_complete_class): Removed start/stop marking.
22055 (java_check_regular_methods): Now takes a class decl as an
22056 argument. Add default constructor if none were encountered.
22057 (java_check_methods): Now use ctxp->class_list. Changed call to
22058 java_check_regular_methods.
22059 (source_start_java_method): Set DECL_ARG_TYPE for each function
22060 arguments.
22061 (source_end_java_method, java_method_add_stmt): New functions.
22062 (java_generate_parsed_class): No longer exists.
22063 (java_layout_parsed_class, java_register_parsed_class): New functions.
22064 (resolve_expression_name): New function.
22065
22066 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
22067
22068 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
22069 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
22070 until pass initializations are done. Call read_import_dir with
22071 pass set to 0.
22072 * parse.h: (lookup_modifier_cl): New function declared.
22073 (INTERFACE_FIELD_MODIFIERS): New macro.
22074 (OBSOLETE_MODIFIER_WARNING): New macro.
22075 * parse.y: (register_fields): Class type and current field name in
22076 local variables. Check modifier(s) if adding field(s) to an interface.
22077 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
22078 and report errors using the faulty modifier line context.
22079 (lookup_modifier_cl): New function.
22080 (read_import_dir): Detect and report default import processing
22081 failure.
22082
22083 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
22084
22085 Add a pair of -fassume-compiled/-fno-assume-compiled options.
22086 * class.c (is_compiled_class): Return 1 after making sure it
22087 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
22088 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
22089 * java-tree.h (flag_assume_compiled): Add decl.
22090 * lang.c (lang_f_options): Add the flag.
22091 (flag_assume_compiled): Add decl, default to 0.
22092
22093 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
22094
22095 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
22096 (is_compiled_class): Likewise.
22097 (layout_class): Likewise.
22098 (layout_class): Detect and lay out classes defined in source code.
22099 (interface_of_p, add_interface_do, may_add_interface): New
22100 function.
22101 (add_interface): Now use add_interface_do.
22102 (add_method_1): New function.
22103 (add_method): Now use add_method_1.
22104 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
22105 (complete_start_java_method): New function.
22106 (start_java_mehod): Now call complete_start_java_method.
22107 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
22108 (expand_invoke): Likewise and fixed typo.
22109 *gjava.c: (print_super_field): Use new argument to find_class
22110 DO_CLASS_FILE.
22111 (main): Likewise.
22112 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
22113 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
22114 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
22115 IDENTIFIER_NODE.
22116 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
22117 (add_method_1, push_class): New prototypes.
22118 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
22119 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
22120 directory where the class was found.
22121 (find_class): New argument DO_CLASS_FILE. Function find_class
22122 modified accordingly.
22123 *jcf-parse.c: (fix_class_path): New function.
22124 (load_class): Use new VERBOSE argument. load_class now finds and
22125 loads/parses .class/.java files. Save read_state of current_jcf
22126 if necessary.
22127 (java_parser_abort_on_error): New macro.
22128 (jcf_parse_source, parse_source_file): New function.
22129 (jcf_parse): Fixed typo.
22130 (yyparse): Call parse_source_file () only.
22131 (process_zip_dir): Fixed typo, fix zdir->filename_length when
22132 writing the real class name back in the zip directory entry.
22133 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
22134 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
22135 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
22136 (find_class): Prototype fixed.
22137 *lex.c: Added 1998 time stamp.
22138 Removed all static global variables, moved into the parser
22139 context data structure.. Now include unistd.h if SEEK_SET not
22140 defined.
22141 (java_init_lex): Rewritten.
22142 (java_sneak_unicode): Modified current unicode access in current line.
22143 (java_unget_unicode): Likewise.
22144 (java_allocate_new_line): New allocation management.
22145 (java_read_char): Modified access and storage of unget_utf8_value.
22146 New way of processing current unicode.
22147 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
22148 (java_get_unicode): Now use the parser context.
22149 (java_lineterminator): Likewise.
22150 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
22151 of the reentrant parser implementation. Function now use the
22152 parser context data structure and java_lval. Fixed production of
22153 the float and double constant "out of range" error message. Fixed
22154 obstack use. Return integer value when hitting a modifier. Now
22155 return type for TRUE, FALSE and other predefined types. Return
22156 identifier as a TREE_LIST list containing the current line context
22157 as the TREE_VALUE sub-node.
22158 (java_unicode_2_utf8): Fixed typo in declaration.
22159 (java_lex_error): Now use the parser context data structure.
22160 *lex.h: Added 1998 time stamp.
22161 (struct java_line): New fields ref_count and next.
22162 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
22163 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
22164 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
22165 *parse.h: Added 1998 time stamp.
22166 (java_parse_source_file): Renamed from parse_source_file.
22167 (YYERROR_NOW, YYNOT_TWICE): Fixed.
22168 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
22169 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
22170 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
22171 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
22172 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
22173 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
22174 (struct parser_ctxt): New data structure to keep the parser context.
22175 *parse.y: Added 1998 time stamp, got rid of static global variables.
22176 (java_error_count, ctxp): New global variables.
22177 (%union): New value field.
22178 (numeric_type, integral_type): Rules removed.
22179 (primitive_type): Rule defined to handle integral, float, double and
22180 boolean types.
22181 (qualified_name, package_declaration,
22182 single_type_import_declaration, type_import_on_demand_declaration,
22183 modifiers, class_declaration, super, interfaces,
22184 interface_type_list, class_body, field_declaration,
22185 field_declaration, variable_declarators, variable_declarator,
22186 variable_declarator_id, method_declaration, method_header,
22187 formal_parameter_list, formal_parameter, method_body, block,
22188 static, interface_declaration, extends_interfaces,
22189 abstract_method_declaration, local_variable_declarators): Rules now
22190 define actions.
22191 (force_error, do_warning): New global statics.
22192 (push_parser_context, parser_context_save_global,
22193 parser_context_restore_global, pop_parser_context): New functions.
22194 (yyerror): Now uses the global parser context. Fixed use of obstack.
22195 (parse_error, parse_error_context, parse_warning_context,
22196 java_accstring_lookup, redefinition_error, check_modifiers,
22197 parser_add_interface, create_interface, create_class, find_field,
22198 duplicate_declaration_error, register_fields, method_header,
22199 check_modifiers_consistency, check_abstract_method_header,
22200 method_declarator, parser_qualified_classname,
22201 parser_check_super_interface, parser_check_super,
22202 parser_chain_incomplete_item, java_check_circular_reference,
22203 layout_class_from_source, java_complete_class,
22204 complete_method_decl, resolve_class, complete_class_report_errors,
22205 java_check_final, check_method_redefinition,
22206 java_check_regular_methods, java_check_abstract_methods,
22207 java_check_methods, lookup_java_interface_method2,
22208 lookup_java_method2, lookup_cl, find_name_in_single_imports,
22209 process_imports, find_in_imports, read_import_entry,
22210 read_import_dir, find_in_imports_on_demand,
22211 check_pkg_class_access, not_builtin_p, declare_local_variables,
22212 source_start_java_method, java_generate_parsed_class): New
22213 functions.
22214 *typeck.c: (signature_include_return): New global variable.
22215 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
22216 to add the function returned type in the signature.
22217
22218 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
22219
22220 * jcf-io.c (open_in_zip): Use strncmp and LEN.
22221
22222 1998-01-29 Dave Brolley <brolley@cygnus.com>
22223
22224 * Make-lang.in (java.info): Added.
22225 (java.install-info): Added
22226
22227 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
22228
22229 * Makefile.in (clean): Also remove java/parse.c.
22230
22231 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
22232
22233 Add a pair of -fbounds-check/-fno-bounds-check options.
22234 * lang.c (lang_decode_option): Add code to grok arguments.
22235 (flag_bounds_check): Add decl.
22236 (lang_f_options): New array w/ the option in it.
22237 * java-tree.h (flag_bounds_check): Add decl.
22238 * lang-options.h: New file.
22239 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
22240 of a static macro value.
22241 (JAVA_ARRAY_EXCEPTION): Delete macro.
22242
22243 1998-01-23 Per Bothner <bothner@cygnus.com>
22244
22245 * typeck.c (build_java_array_type): Fix two bugs in previous change.
22246 * expr.c (build_anewarray): Add missing promote_type.
22247
22248 1998-01-22 Per Bothner <bothner@cygnus.com>
22249
22250 Add array types with known length to optimize bounds checking.
22251 * typeck.c (build_java_array_type): Take length parameter.
22252 (java_array_type_length, build_prim_array_type): New functions.
22253 * java-tree.h: Update for new functions.
22254 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
22255 * class.c: Use build_prim_array_type.
22256 * expr.c (can_widen_reference_to): Handle known-length array types.
22257 (verify_jvm_instructions): Keep track of integer push instructions
22258 followed by newarray/anewarray, so we can build known-length arrays.
22259 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
22260 (java_array_data_offset): New function.
22261 (build_java_array_length_access): New function. Optimize if constant.
22262 (build_java_arrayaccess): Constant fold bounds check.
22263 (expand_java_newarray, expand_java_anewarray): Replaced by ...
22264 (build_newarray, build_anewarray): New functions.
22265 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
22266 * verify.c (merge_types): Handle known-lengh array types.
22267
22268 1998-01-19 Per Bothner <bothner@cygnus.com>
22269
22270 * expr.c (expand_byte_code): Fix performace bug, which caused
22271 searching linenumber_table to be linear rather than constant.
22272
22273 1997-12-12 Per Bothner <bothner@cygnus.com>
22274
22275 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
22276
22277 * decl.c, java-tree.h (soft_fmod_node): New global.
22278 * decl.c (init_decl_processing): Define __builtin_fmod.
22279 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
22280 using __builtin_fmod.
22281
22282 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
22283
22284 * keyword.h: New file, output of keyword.gperf as processed by
22285 gperf.
22286 * lex.c (java_lex_init): Initialize java_error_flag.
22287 * parse.c (YYERROR_NOW): Uses java_error_flag.
22288 * parse.y: New static java_error_flag. Useless definition of
22289 buffer_error gone.
22290 * parse.y (java_error): Portable error recovery using
22291 java_error_flag (not yet completely tuned).
22292
22293 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
22294
22295 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
22296
22297 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
22298
22299 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
22300 (parse.c, lex.c, keyword.h): New rules for Java source code
22301 front-end.
22302 * parse.c: Renamed into jcf-parse.c.
22303 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
22304 * keyword.gperf: New file, Java keywords.
22305 * parse.y: New file, Java language grammar.
22306 * parse.h: New file, Java language grammar definitions.
22307 * lex.c: New file, Java language lexer.
22308 * lex.h: New file, Java language lexer definitions.
22309
22310 1997-12-03 Per Bothner <bothner@cygnus.com>
22311
22312 * decl.c (clinit_identifier_node), java-tree.h: New global.
22313 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
22314 * verify.c (verify_jvm_instructions): Inline use of removed macros.
22315 * expr.c (expand_java_field_op): Check for invalid assignment
22316 to final field.
22317
22318 * jcf-reader.c (get_attribute): Test for wrong attribute length.
22319
22320 1997-10-27 Per Bothner <bothner@cygnus.com>
22321
22322 * verify.c (verify_jvm_instructions): When processing a handler,
22323 attempt to set the current_subr to the right value.
22324 (More complicated code combines Sep 17 and Oct 22 versions.)
22325
22326 1997-10-24 Per Bothner <bothner@cygnus.com>
22327
22328 * class.c (push_class): Figure out (guess) name of source file.
22329 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
22330 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
22331 (parse_class_file): Change return type from int to void.
22332 Call debug_start_source_file/debug_end_source_file.
22333
22334 * expr.c (build_java_binop): Fix masking 2nd operand.
22335 * decl.c (init_decl_processing): Set sizetype first.
22336
22337 1997-10-22 Per Bothner <bothner@cygnus.com>
22338
22339 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
22340 (Revert Sep 17 change.)
22341
22342 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
22343
22344 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
22345 .class extension in their name and fix thing so we don't process
22346 them parse_zip_file_entries().
22347 (parse_zip_file_entries): Cleaned unused local variables.
22348
22349 1997-10-20 Per Bothner <bothner@cygnus.com>
22350
22351 * expr.c (can_widen_reference_to): Allows equal array element types.
22352 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
22353 * jcf-dump.c (RET): Get (and print) index.
22354
22355 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
22356 Promote element type to POINTER_TYPE.
22357
22358 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22359
22360 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
22361 find_in_current_zip, jcf_figure_file_type): Moved from
22362 jcf-reader.c to parse.c.
22363 * zextract.c: (read_zip_archive): takes file_comment_length possible
22364 field into account.
22365
22366 1997-10-20 Per Bothner <bothner@cygnus.com>
22367
22368 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
22369
22370 * verify.c (merge_types): Handle array types even better ...
22371
22372 1997-10-17 Per Bothner <bothner@cygnus.com>
22373
22374 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
22375
22376 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
22377 * class.c (make_class_data): Don't build fields_decl if no fields.
22378 When building fields_decl, skip if DECL_ARTIFICIAL.
22379
22380 * expr.c (java_stack_swap): Update stack_type_map.
22381 * verify.c (merge_types): Handle array types better.
22382
22383 1997-10-15 Per Bothner <bothner@cygnus.com>
22384
22385 * class.c (add_field): Don't promote short integral fields to
22386 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
22387 * expr.c (push_value): Promote and convert short integral values.
22388
22389 * decl.c, java-tree.h (integer_two_node): New constant node.
22390 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
22391
22392 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
22393
22394 * class.c (append_gpp_mangled_type): Use function argument
22395 unpromoted type to generate mangled name.
22396
22397 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
22398
22399 * constants.c (build_constant_data_ref): Now uses current_class
22400 instead of main_class.
22401 (build_constants_constructor): Now uses current_class instead of
22402 main_class.
22403 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
22404 of the global variable SeepZipFiles done here.
22405 * zextract.c (read_zip_archive): extra_field optional field taken
22406 into account while computing the position of the class file in the
22407 archive.
22408 * verify.c (verify_jvm_instructions): Use current_jcf to search
22409 the constant pool.
22410 * parse.c (load_class): First search for the class to load in the
22411 current zip file. Saves current_jcf (restored before returning
22412 from that function). Don't call JCF_FINISH in the class was found
22413 in the current ZIP file.
22414 (jcf_parse): If the class was found in the current ZIP file, save
22415 its tree_constant_pool (for later reuse).
22416 (parse_class_file): New function. Process each method defined in
22417 the current class and record the class as to be later registered.
22418 (yyparse): Rewritten. Figure the type of the current file and switch
22419 accordingly.
22420 * lang.c: New global variable current_jcf.
22421 (lang_init): Removed compiling_from_source test (done later, in
22422 yyparse). Removed call the jcf_parse ().
22423 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
22424 (typedef struct JCF): New fields seen_in_zip (to mark a class found
22425 in the current ZIP file) and zip_offset (offset to the class data in
22426 the current zip file).
22427 * jcf-reader.c: zipfile.h included.
22428 localToFile: New ZipFileCache static global variable
22429 (parse_zip_file_entries): New function. Browse the current ZIP
22430 file directory and process each class found.
22431 (process_zip_dir): New function. Register each class found in the
22432 ZIP file directory. The class aren't parsed but a valid JCF is
22433 link to each of them.
22434 (find_in_current_zip): New function. Search for a class in the
22435 current ZIP file directory. If found, prepare the class so that it
22436 can be loaded.
22437 (jcf_figure_file_type): New function. Examine the file structure
22438 to figure a class file, a ZIP file. If none of these categories are
22439 matched, a source file is assumed.
22440 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
22441 SeenZipFile: New global variable.
22442 (open_in_zip): Use zipmember's length to accelerate the search for
22443 a member. If zipmember was NULL and zip file successfully read,
22444 return 0.
22445 * java-tree.h: New global variable current_jcf declared. Added
22446 declaration for current_constant_pool_tags, current_constant_pool_data,
22447 current_constant_pool_length, current_constant_pool_data_ref.
22448 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
22449 store the JCF of classes seen in a zip file) and tree *constant_pool
22450 (to save a loaded class constant pool). current_class declared here.
22451 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
22452 retrieve method_ref_constant.
22453 (PUSHC): java_push_constant_from_pool now uses current_jcf.
22454 (OBJECT): get_class_constant now uses current_jcf.
22455 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
22456 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
22457 (expand_invoke): Now uses current_class instead of main_class
22458 (build_class_init): Now uses current_class instead of main_class
22459 * class.c: New static global variable registered_class.
22460 (register_class): New function.
22461 (emit_register_class): Modified to use registered_class instead of
22462 main_class
22463 (is_compiled_class): Now take into account class seen in the archive.
22464
22465 1997-10-06 Per Bothner <bothner@cygnus.com>
22466
22467 * except.h: Renamed to: java-except.h.
22468 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
22469 * except.c: Add semi-working (commented out) implementation.
22470
22471 * expr.c (expand_iinc): Add needed flush_quick_stack.
22472 * parse.c (set_source_filename): New function.
22473 (give_name_to_class): Set input_filename from package.classname.java.
22474
22475 * jcf-io.c (find_class): Don't look first in ".".
22476
22477 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
22478
22479 * zextract.c (read_zip_archive): Now takes into account the
22480 extra_field field.
22481 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
22482
22483 1997-09-20 Per Bothner <bothner@cygnus.com>
22484
22485 * constants.c, java-tree.h (build_internal_class_name): New function.
22486 (alloc_class_constant): Re-implement using build_internal_class_name.
22487 * class.c (make_class_data): Likewise.
22488 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
22489
22490 1997-09-17 Per Bothner <bothner@cygnus.com>
22491
22492 * verify.c (verify_jvm_instructions): Temporarily set current_subr
22493 to NULL before pushing an exception handler target.
22494
22495 * expr.c (flush_quick_stack): Save from low stack indexes to high.
22496 (java_stack_swap, java_stack_dup): Re-write to be safe from
22497 clobbering registers.
22498 (build_class_init): New function.
22499
22500 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
22501
22502 * typeck.c (build_java_array_type): Temporary use
22503 permanent_obstack to create the array 'length' field.
22504 * expr.c (lookup_label): Temporay use permanent_obstack to create
22505 label if not found.
22506 * class.c (push_super_field): Tempory use permanent_obstack.
22507
22508 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
22509
22510 * typeck.c (type_for_mode): Now handles double_type_node and
22511 float_type_node.
22512 * verify.c (verify_jvm_instructions): The instruction following
22513 the wide bytecode is checked. OPCODE_ret added to the list of
22514 wide.
22515
22516 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
22517
22518 * class.c (make_class): Temporary use permanent_obstack. Set the
22519 class CLASS_P field to 1.
22520 (push_class): Temporary use permanent_obstack.
22521 (set_super_info): Temporary use permanent_obstack.
22522 (add_method): Temporary use permanent_obstack, set
22523 METHOD_TRANSIENT().
22524 (add_field): Temporary use permanent_obstack. Sets
22525 FIELD_VOLATILE() and FIELD_TRANSIENT().
22526 (build_class_ref): Temporary use permanent_obstack if the class
22527 isn't compiled.
22528 (build_static_field_ref): Temporary use permanent_obstack when
22529 creating field's rtl.
22530 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
22531 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
22532 and fields. Function finalized, as far as flag handling.
22533 (push_class_static_dummy_field): Temporary use permanent_obstack.
22534 (emit_register_class): Force generation of class registration at
22535 -O3 or deeper.
22536 * decl.c (end_java_method): Call permanent_allocation() before
22537 returning.
22538 * expr.c (can_widen_reference_to): Added comment to interface
22539 handling, fixed typo.
22540 (lookup_field): Now uses CLASS_P() to correct FIXME
22541 (expand_invoke): Verification on public && !static &&
22542 !abstract moved into soft_lookupinterfacemethod (kaffe).
22543 Use Object class dtable if objectref is an array when expanding
22544 invokeinterface.
22545 (java_push_constant_from_pool): Temporary use permanent_obstack
22546 for CONSTANT_string
22547 * parse.c (get_ref_constant): Temporary use permanent_obstack to
22548 create constant references.
22549 (get_constant): Temporary use permanent_obstack to create constant.
22550 (load_class): Temporary use permanent_obstack to load class.
22551 (jcf_parse): Temporary use permanent_obstack to perform class
22552 layout.
22553 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
22554 (build_java_signature): Temporary use permanent_obstack.
22555 * verify.c: (verify_jvm_instruction): removed unnecessary verification
22556 on ACC_SUPER flag.
22557 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
22558 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
22559 (CLASS_P): Defined
22560
22561 1997-09-11 Per Bothner <bothner@cygnus.com>
22562
22563 * class.c (append_gpp_mangled_type): Fix typo.
22564 (emit_register_class): Use main_class to get class object, rather
22565 than looking for no-longer-existing static decl starting with _CL.
22566 * typeck.c (parse_signature_type): Promote array element type
22567 if it is a RECORD_TYPE.
22568
22569 1997-09-10 Per Bothner <bothner@cygnus.com>
22570
22571 * class.c (push_class_static_dummy_field): New function.
22572 (mangle_static_field): New. Do G++-style mangling of static fields.
22573 (layout_class): Mandle static fields here, not in add_field.
22574 (build_class_ref): The class object is now a dummy static field.
22575 * decl.c (find_local_variable): Look for best, instead of first match.
22576 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
22577 (build_java_athrow): Don't check here if exception is Throwable.
22578 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
22579 (TYPE_USED): Removed. No longer used ...
22580 * parse.c (jcf_parse): Call push_class_static_dummy_field.
22581 * verify.c (push_pending_label): New function.
22582 (push_pending_block): Renamed to check_pending_block.
22583 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
22584 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
22585 re-checking possible handlers) after a store (less wasted work).
22586 Check for null handler (finally) before calling add_handler.
22587 Various changes to (finally?) correctly handle try/finally.
22588
22589 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
22590
22591 * class.c: Include stdio.h.
22592
22593 1997-09-04 Per Bothner <bothner@cygnus.com>
22594
22595 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22596 to make sure class is initialized before static/special invoke.
22597
22598 * verify.c (verify_jvm_instructions): On a store instruction,
22599 call find_local_variable to force pre-allocation of decl and rtx.
22600 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
22601
22602 1997-09-03 Per Bothner <bothner@cygnus.com>
22603
22604 * class.c (build_class_ref): Strip off "promoted_" if need be.
22605 (make_field_value): Call build_java_signature when needed.
22606 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
22607 * expr.c (build_java_athrow): Don't push_value of exception.
22608 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22609 match specification of [fd]cmp[lg] for NaNs.
22610 (expand_byte_code): Add support for exception handler ranges.
22611 * except.c: Add skeleton for EH code-generation.
22612 * verify.c (merge_types): Treat all promoted integral types as equal.
22613 * constants.c (build_constants_constructor): To force creation of
22614 current_constant_pool_data_ref, call build_constant_data_ref.
22615
22616 * javaop.def (lload): Fix typo.
22617 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
22618
22619 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
22620
22621 * parse.c: Don't include function.h.
22622
22623 1997-08-27 Per Bothner <bothner@cygnus.com>
22624
22625 * except.[ch]: New files.
22626 * Makefile.in (JAVA_OBJS): Add except.o
22627 * expr.c: Temporary warning about unimplemented exceptions.
22628 * verify.c: Verify exception handlers.
22629
22630 * jcf-dump.c (disassemble_method): Print exception table.
22631
22632 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
22633
22634 * expr.c (verify_jvm_instructions): Started a thorough
22635 verification of invoke* bytecodes.
22636 (expand_byte_code): flush quick stack if PC is the target of a
22637 branch. and undef RET (conflicting with config/i386/i386.h).
22638 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22639 used.
22640 (expand_invoke): Now handles invokeinterface and do more
22641 verification according to the bytecode.
22642 (lookup_field): Don't try to load the class if processing
22643 dtable_type.
22644 (can_widen_reference_to): Now handles interfaces.
22645 * decl.c (init_decl_processing): New global variable
22646 soft_lookupinterfacemethod_node, declared in java-tree.h.
22647 Call set_super_info on string_type_node.
22648 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22649 defined.
22650 * class.c (set_super_info): Fills the CLASS_* flags according to
22651 access_flags.
22652 (get_access_flags_from_decl): Handles all class flags.
22653
22654 1997-08-26 Per Bothner <bothner@cygnus.com>
22655
22656 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
22657 * parse.c (yyparse): Check for abstract method, and missing code.
22658 * expr.c (expand_byte_code): Change interface.
22659 * lang.c (put_decl_node): Print promoted types prettier.
22660 * verify.c (verify_jvm_instruction): Change interface.
22661 Partial support for scanning exception table.
22662 For load instructions, handle promoted integral types.
22663
22664 1997-08-21 Per Bothner <bothner@cygnus.com>
22665
22666 * verify.c: New file, with contents moved from expr.c.
22667 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
22668 * typeck.c (is_array_type_p): Moved here from expr.c.
22669 * java-tree.h: Add some now-needed function declarations.
22670 * Makefile.in (JAVA_OBJS): Added verify.o.
22671
22672 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22673
22674 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22675 METHOD_ABSTRACT flag.
22676
22677 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22678 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22679 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22680
22681 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22682 variables.
22683 (start_java_method): Hook for SYNCHRONIZED methods.
22684
22685 * expr.c (build_java_jsr, build_java_ret): New functions
22686 (JSR,PRE): New macros
22687 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22688 (verify_jvm_instructions): tableswitch, lookupswitch,
22689 monitorenter, monitorexit, goto_w: verified.
22690 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22691 (build_java_monitor): New function.
22692 (MONITOR_OPERATION): Modified to call build_java_monitor()
22693 (verify_jvm_instructions): Started a thorough verification of
22694 invoke* bytecodes.
22695
22696 1997-08-19 Per Bothner <bothner@cygnus.com>
22697
22698 Support verification of jsr/ret subroutines (used for try/finally).
22699 * decl.c (return_address_type_node): New type node.
22700 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22701 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22702 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
22703 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22704 TYPE_USED): New macros for special types in type_map.
22705
22706 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
22707 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
22708 BCODE_JUMP_TARGET.
22709 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
22710
22711 * expr.c (can_widen_reference_to): New function.
22712 (pop_type): Use it.
22713 (merge_type_state): Support handling start of subroutine.
22714 (push_pending_block): Return char* error message, instead of calling
22715 fatal on an error. Also handle subroutines.
22716 (verify_jvm_instructions): Handle errors from push_poending_block.
22717 Support jsr and ret instructions.
22718
22719 1997-08-19 Per Bothner <bothner@cygnus.com>
22720
22721 * jcf-io.c (find_classfile): Fix thinko.
22722 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
22723
22724 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
22725
22726 * Makefile.in (BISON): Remove.
22727
22728 1997-08-07 Per Bothner <bothner@cygnus.com>
22729
22730 * Makefile.in: Convert to autoconf.
22731 * config-lang.in (outputs): Added java/Makefile.
22732
22733 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22734 Rename cc1java to jc1.
22735
22736 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
22737 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
22738
22739 * class.c (class_depth): Do load_class if needed.
22740
22741 Mostly better verification.
22742 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
22743 (init_decl_processing): Change return type of soft_checkcast.
22744 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
22745 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22746 lang_print_error): New functions.
22747 (lang_init): Set global hook print_error_function to lang_print_error.
22748 * expr.c: In the type_map ptr_type_node is only used for null now.
22749 (pop_type, merge_types): Hence ptr_type_node matches any reference.
22750 (merge_types): Dererence pointer to record types before comparing.
22751 (decode_newarray_type, merge_types): On error just return NULL.
22752 (build_java_binop): Add preliminary implementation (with warning)
22753 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22754 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
22755 (expand_compare, expand_java_goto, expand_java_call): Don't
22756 push_pending_block, since that only makes sense when verifying.
22757 (merge_type_state): Different return codes.
22758 (push_pending_block): A block may need to be verified more than once.
22759 (expand_byte_code): Warn about unused code at code generation time.
22760 (verify_jvm_instruction): Changed logic, since code may need to be
22761 re-verified if type-state has changed. Also, better error handling.
22762 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22763 Improve newarray, anewarray, ?aload, athrow,
22764 * java-tree.h (LABEL_CHANGED): New macro.
22765
22766 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
22767
22768 * decl.c (soft_athrow_node): New global variable initialized.
22769 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22770 * typeck.c (convert): Added support for REAL_TYPE.
22771 (convert_to_char): New function.
22772 (convert): Handle CHAR_TYPE.
22773 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22774 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22775 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22776 promoted type.
22777 (verify_jvm_instructions): Added break a the end of bogus unop: label.
22778 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22779 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22780 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22781 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22782 to Use The Right Things.
22783 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22784 compatible with INT. BOOLEAN is made equivalent to BYTE.
22785 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22786 OPCODE_ifnonnull): Now supported.
22787 (build_java_athrow): New function.
22788
22789 1997-08-04 Per Bothner <bothner@cygnus.com>
22790
22791 Rename method name <init> to match G++ (and fix mangling).
22792 * class.c (layout_class): Replace method name of <init> by class name.
22793 (make_method_value): Do inverse renaming of constructor from <init>.
22794 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
22795 * typeck.c (lookup_java_constructor): New function.
22796 * expr.c (expand_invoke): If method_name is <init>, call
22797 lookup_java_constructor to find constructor.
22798
22799 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
22800
22801 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
22802
22803 * parse.c (get_class_constant): Modified to handle array "classes"
22804 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22805 wide type.
22806 (convert): Modified to handle real type.
22807 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22808 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22809 variables declared.
22810 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22811 soft_multianewarray, soft_newarray_node, soft_throw_node): New
22812 global variables initialized.
22813 (find_local_variable): Handles the case of a pointer
22814 (end_java_method): Restore the use of one more scope
22815 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22816 build_java_array_length_access, expand_java_arrayload,
22817 expand_java_arraystore, expand_java_array_length,
22818 expand_java_multianewarray, expand_java_anewarray,
22819 build_java_check_indexed_type, is_array_type_p,
22820 build_java_throw_out_of_bound_exception): New functions.
22821 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22822 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22823 OPCODE_<t>aload): Implemented code for verification.
22824 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22825 ARRAY_NEW_MULTI): Macro defined.
22826 (CONVERT): Modified to invoke convert().
22827 (case OPCODE_aload2): Fixed index typo from 2 to 1.
22828
22829 1997-07-31 Per Bothner <bothner@cygnus.com>
22830
22831 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
22832 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
22833 (make_class_data): Field name needs '/' as package prefix.
22834 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
22835
22836 1997-07-25 Per Bothner <bothner@cygnus.com>
22837
22838 Implement debug information for local variables.
22839 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22840 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22841 DECL_LOCAL_SLOT_CHAIN): New macros.
22842 (struct lang_decl_var): New type.
22843 * parse.c (give_name_to_locals): Move to decl.c.
22844 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
22845 (start_java_method): Re-write parameter handling.
22846 (pending_local_decls): New global variable.
22847 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
22848 (find_local_variable): Accept pc so we can skips decls not in range.
22849 (struct binding_level): Add end_pc field.
22850 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22851 (various): Change so current pc gets passed to find_local_variable.
22852
22853 * decl.c (init_decl_processing): Re-arrange fields in
22854 class_type_node and and method_type_node to match kaffe 0.9.1.
22855 * class.c (make_method_value, make_class_data): Update
22856 initializations to match.
22857
22858 1997-07-16 Per Bothner <bothner@cygnus.com>
22859
22860 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22861 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
22862 (push_super_field): New function.
22863 (make_class_data): Handle inheritance of class static initializer.
22864 (layout_class): New name mangling.
22865 * constants.c (build_constant_data_ref): Init type of data array
22866 to a one-element array.
22867 (build_constants_constructor): Set DECL_SIZE from complete array type.
22868 * decl.c: Rename class_type, object_type etc to class_type_node,
22869 object_type_node etc. Make former inherit from latter.
22870 * expr.c (expand_invoke): Add cast of function address.
22871 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
22872 * parse.c (yyparse): Don't call layout_class here.
22873 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
22874
22875 1997-06-14 Per Bothner <bothner@cygnus.com>
22876
22877 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
22878 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
22879 (alloc_class_constant): New.
22880 * expr.c (expand_invoke): Make sure method's class is initialized.
22881 * class.c (interits_from_p, emit_register_class): New functions.
22882 * parse.c (yyparse): Call emit_register_class.
22883
22884 1997-06-09 Per Bothner <bothner@cygnus.com>
22885
22886 * constants.c: New file, to handle constant pool.
22887 * Makefile.in (JAVA_OBJS): Add constants.o.
22888 * decl.c (init_decl_processing): Update, fix, finish various structs.
22889 (pushdecl_top_level): New.
22890 * parse.c (layout_class): Moved to class.c.
22891 * expr.c (java_push_constant_from_pool): New function.
22892 * class.c (build_class_ref): Make work fully
22893 (make_class_data): Emit super-class, constant pool, interface vector.
22894
22895 1997-06-03 Per Bothner <bothner@cygnus.com>
22896
22897 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
22898 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
22899 * class.c (class_depth): New function.
22900 (lookup_named_class): Replaced by new function lookup_class.
22901 * decl.c (object_type_node, string_type_node): New.
22902 Remove various types that we no longer need.
22903 * expr.c (verify_jvm_instructions): New separate verifier pass.
22904 (push_type, pop_type): New functions for verifier.
22905 (type_stack_dup, pop_argument_types, merge_types): Likewise.
22906 (expand_byte_code): Simplify, since we assume already verified.
22907 (expand_invoke): Now mostly works.
22908 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22909 * lang.c (main_class): Move to parse.c. Don't make_class yet.
22910 * parse.c: Wait to allocate class object until we know its name.
22911 (layout_class): Calculate DECL_VINDEX for each virtual method.
22912 * typeck.c (get_array_type): Rename to ...
22913 (build_java_array_type): ... and provide working implementation.
22914 (build_java_signature): New function - build Java signature of type.
22915 (set_java_signature): New function - cache signature with type.
22916 (lookup_java_method): New function.
22917
22918 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
22919
22920 * class.c (ident_subst): Take extra SUFFIX parameter.
22921 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
22922 (set_constant_value, build_static_field_ref, is_compiled_class): New.
22923 (build_class_ref): Actually implement.
22924 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
22925 * decl.c (builtin_function): New.
22926 (init_decl_processing): Update for current Kaffe. Declare some
22927 builtin Kaffe functions.
22928 * expr.c (build_address_of): New.
22929 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22930 Renamed (from expand_java_new etc), and added working implementations.
22931 (build_field_ref): Now also handle static fields.
22932 (expand_invoke): Implement invokestatic, and start implement rest.
22933 * java-opcodes.h: Use javaop.def to avoid duplicated list.
22934 * javaop.def: Rename invokevirt -> invokevirtual.
22935 * lang.c (use_handles): Removed.
22936 * parse.c: Add support for ConstantValue attribute.
22937 Handle nested loading of a class. (JPOOL_UTF): New.
22938
22939 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
22940
22941 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
22942
22943 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
22944
22945 * Make-lang.in (java.install-man): New empty rule.
22946 * typeck.c (set_local_type): New function.
22947 * expr.c (STORE_INTERNAL): Call find_local_variable,
22948 not find_stack_slot. Call set_local_type.
22949
22950 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
22951
22952 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
22953 and building RECORD_TYPE CONSTRUCTORs.
22954 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22955
22956 * lang.c (use_handles): Change the default to 0.
22957 * decl.c: Define and build class_type, field_type, utf8const_type.
22958 * class.c (make_class_data, make_field_value,
22959 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22960 hashUtf8String, strLengthUtf8, mangled_classname:
22961 Functions to build reflective data structures.
22962 * parse.c (yyparse): Call make_class_data.
22963
22964 * jcf-io.c (open_class, find_classfile): New functions.
22965 * jcf-dump.c: Support reading classfile from explicitly-named
22966 class file (without CLASSPATH searching).
22967
22968 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22969
22970 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
22971 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22972 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22973 (get_constant): Now trivial for CONSTANT_Utf8.
22974
22975 * jcf.h: Make NEW_CPOOL the default.
22976 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
22977
22978 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22979
22980 New directory.
22981
22982 \f
22983 Copyright (C) 1996-2014 Free Software Foundation, Inc.
22984
22985 Copying and distribution of this file, with or without modification,
22986 are permitted in any medium without royalty provided the copyright
22987 notice and this notice are preserved.