Small ChangeLog fixes.
[gcc.git] / gcc / java / ChangeLog
1 2014-01-02 Tobias Burnus <burnus@net-b.de>
2
3 * jcf-dump.c (version): Update copyright notice dates.
4 * gcj.texi: Bump @copying's copyright year.
5
6 2013-12-19 Jakub Jelinek <jakub@redhat.com>
7
8 PR other/59545
9 * class.c (hashUtf8String): Compute hash in unsigned type.
10 * javaop.h (WORD_TO_INT): Avoid signed integer overflow.
11
12 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
13
14 * java-gimplify.c: Add required include files from gimple.h.
15
16 2013-11-22 David Malcolm <dmalcolm@redhat.com>
17
18 * class.c (maybe_layout_super_class): Update comment.
19 * decl.c (java_add_stmt): Remove use of input_filename macro.
20 * jcf-parse.c (set_source_filename): Remove use of
21 input_filename macro.
22 (parse_class_file): Remove use of input_line and input_filename
23 macros.
24 (java_parse_file): Remove use of input_filename macro.
25
26 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
27
28 * class.c, expr.c: Replace tree_low_cst (..., 0) with tree_to_shwi
29 throughout.
30
31 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
32
33 * class.c, expr.c: Replace host_integerp (..., 0) with
34 tree_fits_shwi_p throughout.
35
36 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
37
38 * java-gimplify.c: Include only gimplify.h and gimple.h as needed.
39
40 2013-11-14 Diego Novillo <dnovillo@google.com>
41
42 * builtins.c: Include stor-layout.h.
43 Include stringpool.h.
44 * class.c: Include stringpool.h.
45 Include stor-layout.h.
46 Include varasm.h.
47 * constants.c: Include stringpool.h.
48 Include stor-layout.h.
49 * decl.c: Include stor-layout.h.
50 Include stringpool.h.
51 Include varasm.h.
52 * except.c: Include stringpool.h.
53 Include stor-layout.h.
54 * expr.c: Include stringpool.h.
55 Include stor-layout.h.
56 * jcf-parse.c: Include stringpool.h.
57 * mangle.c: Include stringpool.h.
58 * resource.c: Include stringpool.h.
59 Include stor-layout.h.
60 * typeck.c: Include stor-layout.h.
61 Include stringpool.h.
62 * verify-glue.c: Include stringpool.h.
63
64 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
65
66 * java-gimplify.c: Include gimplify.h.
67
68 2013-11-07 Jeff Law <law@redhat.com>
69
70 * builtins.c (initialize_builtins): Provide __builtin_trap.
71
72 2013-10-29 David Malcolm <dmalcolm@redhat.com>
73
74 Patch autogenerated by refactor_symtab.py from
75 https://github.com/davidmalcolm/gcc-refactoring-scripts
76 revision 58bb219cc090b2f4516a9297d868c245495ee622
77
78 * decl.c (java_mark_decl_local): Update for conversion of symtab types
79 to a true class hierarchy.
80
81 2013-10-14 David Malcolm <dmalcolm@redhat.com>
82
83 * lang.c (java_handle_option): Update for introduction of
84 gcc::dump_manager.
85
86 2013-09-25 Tom Tromey <tromey@redhat.com>
87
88 * Make-lang.in (jvspec.o): Remove.
89 (CFLAGS-java/jvspec.o): New variable.
90 ($(XGCJ)$(exeext), java_OBJS): Use java/jvspec.o
91 (java/jvspec.o-warn): Rename from jvspec.o-warn.
92 (JAVA_TREE_H, java/jcf-dump.o, java/boehm.o, java/builtins.o)
93 (java/class.o, java/constants.o, java/decl.o, java/except.o)
94 (java/expr.o, java/jcf-depend.o, java/jcf-parse.o)
95 (java/jvgenmain.o, java/lang.o, java/mangle.o, java/mangle_name.o)
96 (java/resource.o java/typeck.o, java/win32-host.o)
97 (java/verify-glue.o, java/verify-impl.o, java/zextract.o)
98 (java/java-gimplify.o, java/jcf-io.o, java/jcf-path.o): Remove.
99
100 2013-09-25 Tom Tromey <tromey@redhat.com>
101
102 * Make-lang.in (jvspec.o): Don't use subshell.
103
104 2013-06-05 Jan Hubicka <jh@suse.cz>
105
106 * class.c (emit_register_classes_in_jcr_section): Use DECL_PRESERVE_P
107 instead of mark_decl_referenced.
108
109 2013-05-29 Jan Hubicka <jh@suse.cz>
110
111 * decl.c (java_mark_decl_local): Update for new symtab flags.
112
113 2013-05-22 Matthias Klose <doko@ubuntu.com>
114
115 * jvspec.c (jvgenmain_spec): Add %I to cc1 call.
116
117 2013-05-16 Jason Merrill <jason@redhat.com>
118
119 * Make-lang.in (jc1$(exeext)): Use link mutex.
120
121 2013-05-06 Jakub Jelinek <jakub@redhat.com>
122
123 PR libgcj/57074
124 * class.c (emit_symbol_table): Use array type of the
125 right size for the_syms_decl and its DECL_INITIAL, instead
126 of symbols_array_type. Set TREE_TYPE (the_syms_decl) to it.
127 (emit_assertion_table): Use array type of the right size
128 for table_decl and its DECL_INITIAL.
129
130 2013-04-15 Gerald Pfeifer <gerald@pfeifer.com>
131
132 * gcj.texi (Configure-time Options): Refer to GCC, not gcc.
133 (Resources): Adjust reference to Mauve.
134 Remove link to java.sun.com.
135 Refer to GCC, not gcc.
136
137 2013-04-09 Richard Biener <rguenther@suse.de>
138
139 * expr.c (build_java_binop): Pass a type to build_int_cst.
140
141 2013-03-22 Kai Tietz <ktietz@redhat.com>
142
143 * lang.c (put_decl_node): Don't iterate over end_params_node.
144
145 2013-01-03 Jakub Jelinek <jakub@redhat.com>
146
147 * jcf-dump.c (version): Update copyright notice dates.
148
149 2012-11-16 Diego Novillo <dnovillo@google.com>
150
151 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
152
153 * boehm.c: Use new vec API in vec.h.
154 * class.c: Likewise.
155 * constants.c: Likewise.
156 * decl.c: Likewise.
157 * expr.c: Likewise.
158 * java-tree.h: Likewise.
159 * jcf-parse.c: Likewise.
160 * resource.c: Likewise.
161 * verify-glue.c: Likewise.
162
163 2012-11-15 Jan Hubicka <jh@suse.cz>
164
165 * builtins.c (define_builtin): Accept ECF flags and
166 use set_call_expr_flags.
167 (initialize_builtins): Update.
168
169 2012-10-01 Lawrence Crowl <crowl@google.com>
170
171 * Make-lang.in (JAVA_OBJS): Add dependence on hash-table.o.
172 (JCFDUMP_OBJS): Add dependence on hash-table.o.
173 (jcf-io.o): Add dependence on hash-table.h.
174 * jcf-io.c (memoized_class_lookups): Change to use type-safe hash table.
175
176 2012-09-24 Lawrence Crowl <crowl@google.com>
177
178 * decl.c (java_init_decl_processing): Change to new double_int API.
179 * jcf-parse.c (get_constant): Likewise.
180 * boehm.c (mark_reference_fields): Likewise.
181 (get_boehm_type_descriptor): Likewise.
182
183 2012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com>
184
185 * jcf.h (CPool): Use the "atomic" GTY option for the tags field.
186 (bootstrap_method): Likewise for the bootstrap_arguments field.
187
188 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
189
190 * java-gimplify.c: Include dumpfile.h instead of tree-dump.h
191 * Make-lang.in: Fix dependencies.
192
193 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
194
195 * java-tree.h (force_evaluation_order): Remove prototype.
196 * expr.c (force_evaluation_order): Remove unused function.
197
198 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
199
200 * decl.c: Do not include libfuncs.h.
201 * class.c: Do not include defaults.h.
202 * jvgenmain.c: Likewise.
203 * magnle.c: Likewise.
204 * Make-lang.in (decl.o): Fix dependencies.
205
206 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
207
208 * verify.h: Do not include system.h and coretypes.h here.
209 * verify-impl.c: Include them here instead.
210
211 2012-07-05 Uros Bizjak <ubizjak@gmail.com>
212
213 * jcf-io.c (read_zip_member): Initialize d_stream.
214
215 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
216
217 * resource.c: Do not include output.h.
218
219 2012-05-21 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
220
221 PR java/52815
222 * class.c (emit_register_classes_in_jcr_section): Revise placement
223 of #ifdef JCR_SECTION_NAME.
224
225 2012-04-22 Jan Hubicka <jh@suse.cz>
226
227 * class.c (build_utf8_ref): Do not mark varpool node as needed.
228
229 2012-04-20 Jan Hubicka <jh@suse.cz>
230
231 * class.c (make_local_function_alias): Do not mark symbol referenced.
232
233 2012-04-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
234
235 * jcf-dump.c (print_constant): Cast JPOOL_USHORT2, JPOOL_USHORT1
236 results to long to match formats.
237
238 2012-04-11 Andrew Haley <aph@redhat.com>
239
240 * jcf-reader.c (jcf_parse_bootstrap_methods): Add
241 ATTRIBUTE_UNUSED.
242
243 2012-04-11 Andrew Haley <aph@redhat.com>
244
245 * jcf.h (bootstrap_method): New.
246 (BootstrapMethods): New.
247 (JCF): Add BootstrapMethods.
248 (enum cpool_tag): Add MethodHandle, MethodType, and InvokeDynamic.
249 * jcf-reader.c (jcf_parse_bootstrap_methods): New.
250 (jcf_parse_constant_pool): Handlers for MethodHandle, MethodType,
251 and InvokeDynamic.
252 (jcf_parse_bootstrap_methods): New.
253 * javaop.def (invokedynamic): New opcode.
254 * jcf-parse.c (get_constant): An unknown constant type should not
255 be an internal error, but a fatal one. Make it so.
256 * jcf-dump.c (HANDLE_BOOTSTRAP_METHODS_ATTRIBUTE): New.
257 (HANDLE_END_BOOTSTRAP_METHODS): New.
258 (print_constant): Handlers for MethodHandle, MethodType, and
259 InvokeDynamic.
260
261 2012-04-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
262
263 * class.c (emit_register_classes_in_jcr_section): Set DECL_USER_ALIGN.
264 Clear TREE_READONLY.
265
266 2012-03-29 Steven Bosscher <steven@gcc.gnu.org>
267
268 PR java/52730
269 * class.c (emit_register_classes_in_jcr_section): New function.
270 (emit_Jv_RegisterClass_calls): New function, split out from ...
271 (emit_register_classes): ... here. Reorganize. Do not call
272 output_constant.
273
274 2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
275
276 * lang.c (java_init_options_struct): Set
277 frontend_set_flag_trapping_math.
278
279 2012-01-01 Jakub Jelinek <jakub@redhat.com>
280
281 * jcf-dump.c (version): Update copyright notice dates.
282
283 2011-12-03 Matthias Klose <doko@ubuntu.com>
284
285 * expr.c (SPECIAL_WIDE): Fix typo in message.
286
287 2011-11-23 Jeffrey A Law (law@cygnus.com)
288
289 * lang.c (java_init_options_struct): Disable optimizations
290 which assume a NULL pointer dereference will cause a fault.
291
292 2011-11-07 Richard Henderson <rth@redhat.com>
293
294 * builtins.c (compareAndSwapInt_builtin): Use can_compare_and_swap_p.
295 (compareAndSwapLong_builtin): Likewise.
296 (compareAndSwapObject_builtin): Likewise.
297 (VMSupportsCS8_builtin): Likewise.
298
299 2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
300
301 * Make-lang.in (jvspec.o): Pass SHLIB instead of SHLIB_LINK.
302
303 2011-10-15 Tom Tromey <tromey@redhat.com>
304 Dodji Seketeli <dodji@redhat.com>
305
306 * jcf-parse.c (set_source_filename): Adjust to the new map API.
307
308 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
309
310 * class.c (build_static_field_ref): Delete old interface with two
311 parallel arrays to hold standard builtin declarations, and replace
312 it with a function based interface that can support creating
313 builtins on the fly in the future. Change all uses, and poison
314 the old names. Make sure 0 is not a legitimate builtin index.
315 * decl.c (java_init_decl_processing): Ditto.
316 * except.c (compareAndSwapLong_builtin): Ditto.
317 (compareAndSwapObject_builtin): Ditto.
318 (putVolatile_builtin): Ditto.
319 (define_builtin): Ditto.
320 (check_for_builtin): Ditto.
321 * expr.c (rewrite_arglist_getcaller): Ditto.
322 (expand_java_field_op): Ditto.
323
324 2011-08-24 Joseph Myers <joseph@codesourcery.com>
325
326 * Make-lang.in (CFLAGS-java/jcf-io.o, CFLAGS-java/jcf-path.o):
327 New.
328 (java/jcf-io.o, java/jcf-path.o): Remove explicit compilation
329 rules.
330
331 2011-08-18 Peter Collingbourne <peter@pcc.me.uk>
332
333 * expr.c (expand_invoke) Use the type of the method rewrite
334 target.
335
336 2011-08-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
337
338 * jcf-dump.c (print_constant): Cast first frexp arg.
339
340 2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
341
342 * Make-lang.in ($(XGCJ)$(exeext)): Add $(EXTRA_GCC_LIBS).
343
344 2011-07-19 Richard Guenther <rguenther@suse.de>
345
346 * builtins.c (static): Use fold_build_pointer_plus.
347 * class.c (make_class_data): Likewise.
348 (build_symbol_entry): Likewise.
349 * except.c (build_exception_object_ref): Likewise.
350 * expr.c (build_java_arrayaccess): Likewise.
351 (build_field_ref): Likewise.
352 (build_known_method_ref): Likewise.
353 (build_invokevirtual): Likewise.
354
355 2011-07-06 Richard Guenther <rguenther@suse.de>
356
357 * decl.c (java_init_decl_processing):
358 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
359
360 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
361
362 * builtins.c: Add sync_ or SYNC__ to builtin names.
363 * expr.c: Add sync_ or SYNC__ to builtin names.
364
365 2011-06-07 Richard Guenther <rguenther@suse.de>
366
367 * decl.c (java_init_decl_processing): Call build_common_nodes,
368 build_common_nodes_2 at the beginning. Remove then duplicate
369 initializations.
370
371 2011-06-07 Richard Guenther <rguenther@suse.de>
372
373 * decl.c (java_init_decl_processing): Properly initialize
374 size_type_node.
375
376 2011-05-30 Joern Rennecke <joern.rennecke@embecosm.com>
377
378 PR middle-end/46500
379 * expr.c: Include "tm.h" .
380
381 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
382
383 * decl.c (poplevel): Don't access TREE_TYPE of BLOCKs.
384 * expr.c (build_jni_stub): Likewise.
385
386 2011-05-24 Joseph Myers <joseph@codesourcery.com>
387
388 * Make-lang.in ($(XGCJ)$(exeext)): Use libcommon-target.a instead
389 of prefix.o.
390
391 2011-05-20 Joseph Myers <joseph@codesourcery.com>
392
393 * Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and
394 version.o.
395 (JCFDUMP_OBJS): Remove errors.o, version.o and intl.o.
396 (JVGENMAIN_OBJS): Remove errors.o and intl.o.
397 (java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H).
398 * jcf-dump.c: Include diagnostic.h.
399 (main): Initialize diagnostics.
400 * jvgenmain.c: Include diagnostic.h.
401 (main): Initialize diagnostics.
402
403 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
404
405 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
406
407 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
408
409 * java-tree.h (global_bindings_p): Adjust prototype.
410 * decl.c (global_bindings_p): Return bool.
411
412 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
413
414 * expr.c (expand_java_switch): Call build_case_label.
415 (expand_java_add_case): Likewise.
416
417 2011-04-29 Richard Guenther <rguenther@suse.de>
418
419 PR middle-end/48819
420 * constants.c (build_constants_constructor): Use ptr_type_node for
421 temp.
422
423 2011-04-20 Jim Meyering <meyering@redhat.com>
424
425 * jcf-parse.c (java_parse_file): Remove useless if-before-free.
426
427 2011-04-18 Jim Meyering <meyering@redhat.com>
428
429 * jcf-parse.c: Fix typo in comment.
430
431 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
432
433 * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon.
434
435 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
436
437 * java-tree.h (union lang_tree_node): Check for TS_COMMON before
438 calling TREE_CHAIN.
439
440 2011-04-11 Martin Jambor <mjambor@suse.cz>
441
442 * decl.c (java_mark_decl_local): Call cgraph_get_node instead of
443 cgraph_node and handle returned NULL.
444
445 2011-03-25 Kai Tietz <ktietz@redhat.com>
446
447 * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
448 instead of strcmp.
449 (set_source_filename): Likewise.
450 * win32-host.c (jcf_open_exact_case): Likewise.
451
452 2011-03-21 Kai Tietz <ktietz@redhat.com>
453
454 PR target/12171
455 * lang.c (java_attribute_table): Adjust table.
456
457 2011-02-13 Joseph Myers <joseph@codesourcery.com>
458
459 * jvspec.c (jvgenmain_spec): Remove %{a*}.
460
461 2011-01-21 Kai Tietz <kai.tietz@onevision.com>
462
463 PR bootstrap/47215
464 * decl.c (java_init_decl_processing): Remove
465 va_list_type_node related type initializations.
466
467 2011-01-11 Kai Tietz <kai.tietz@onevision.com>
468
469 PR bootstrap/47215
470 * decl.c (java_init_decl_processing): Initialize
471 long_integer_type_node.
472
473 2011-01-07 Kai Tietz <kai.tietz@onevision.com>
474
475 PR bootstrap/47215
476 * decl.c (java_init_decl_processing): Initialize unsigned_type_node.
477
478 2011-01-07 Kai Tietz <kai.tietz@onevision.com>
479
480 * decl.c (java_init_decl_processing): Setup va_list_type_node.
481
482 2011-01-03 Jakub Jelinek <jakub@redhat.com>
483
484 * jcf-dump.c (version): Update copyright notice dates.
485
486 2010-12-15 Dave Korn <dave.korn.cygwin@gmail.com>
487
488 * decl.c (java_init_decl_processing): Initialise integer_three_node.
489 * lang.c (put_decl_node): Handle nested function decls.
490
491 2010-12-07 Joseph Myers <joseph@codesourcery.com>
492
493 * jcf-parse.c: Don't include assert.h.
494 (java_parse_file): Use gcc_assert.
495
496 2010-12-03 Joseph Myers <joseph@codesourcery.com>
497
498 * lang.opt (static-libgcj): New option.
499
500 2010-12-01 Joseph Myers <joseph@codesourcery.com>
501
502 * jcf-parse.c: Don't include toplev.h.
503 * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
504
505 2010-11-30 Joseph Myers <joseph@codesourcery.com>
506
507 * boehm.c: Don't include toplev.h.
508 * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
509
510 2010-11-30 Joseph Myers <joseph@codesourcery.com>
511
512 * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
513 verify-glue.c: Don't include toplev.h.
514 * Make-lang.in: Dependencies for above files changed to remove
515 toplev.h.
516
517 2010-11-29 Joseph Myers <joseph@codesourcery.com>
518
519 * boehm.c: Include "config.h" instead of <config.h>.
520 * builtins.c: Don't include <stdarg.h>.
521 * class.c: Don't include "stdio.h".
522 (O_BINARY): Don't define here.
523 * jcf-depend.c: Don't include <assert.h>.
524 (jcf_dependency_set_dep_file, jcf_dependency_init,
525 jcf_dependency_write): Use gcc_assert.
526 * jcf-io.c (O_BINARY): Don't define here.
527 * jcf-path.c: Don't include "tm.h".
528 (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
529 * resource.c: Don't include "stdio.h".
530 (O_BINARY): Don't define here.
531 * verify-impl.c: Don't include <stdio.h>.
532
533 2010-11-17 Joseph Myers <joseph@codesourcery.com>
534
535 * jcf-parse.c (java_parse_file): Take no arguments.
536 * java-tree.h (java_parse_file): Update prototype.
537
538 2010-11-09 Joern Rennecke <amylaar@spamcop.net>
539 Andrew Haley <aph@redhat.com>
540
541 PR java/46386
542 * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
543
544 2010-11-12 Joseph Myers <joseph@codesourcery.com>
545
546 * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
547 * lang.c (java_handle_option): Take location_t parameter.
548
549 2010-11-10 Joseph Myers <joseph@codesourcery.com>
550
551 * expr.c (expand_java_field_op): Use %' in diagnostic.
552 * jcf-parse.c (java_parse_file): Use %' in diagnostics.
553 * jvspec.c (lang_specific_driver): Use %' in diagnostic.
554 * lang.c (java_post_options): Use %' in diagnostics.
555
556 2010-11-06 Joern Rennecke <amylaar@spamcop.net>
557
558 PR middle-end/46314
559 * class.c: Include target.h.
560 (make_local_function_alias):
561 Use targetm.asm_out.generate_internal_label.
562 * expr.c (lookup_label, generate_name): Likewise.
563
564 2010-11-03 Joern Rennecke <joern.rennecke@embecosm.com>
565
566 PR bootstrap/44335
567 * jfc-parse.c (target.h): Include.
568 (handle_constant): Use targetm.words_big_endian and
569 targetm.float_words_big_endian.
570 (get_constant): Use targetm.float_words_big_endian.
571
572 2010-10-13 Richard Henderson <rth@redhat.com>
573
574 * lang.c (java_eh_personality): Update call to
575 build_personality_function.
576
577 2010-10-12 Joseph Myers <joseph@codesourcery.com>
578
579 * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
580 options.h.
581
582 2010-10-11 Nathan Froyd <froydnj@codesourcery.com>
583
584 * decl.c (java_init_decl_processing): Use build_function_type_list
585 instead of build_function_type.
586 * jcf-parse.c (java_emit_static_constructor): Likewise.
587 * builtins.c (initialize_builtins): Likewise.
588
589 2010-10-08 Joseph Myers <joseph@codesourcery.com>
590
591 * lang.c (java_init_options_struct): New. Split out from
592 java_init_options.
593 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
594
595 2010-10-04 Andi Kleen <ak@linux.intel.com>
596
597 * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
598 Add + to build rule.
599
600 2010-09-29 Joseph Myers <joseph@codesourcery.com>
601
602 * lang.opt: Don't use VarExists.
603
604 2010-09-29 Joseph Myers <joseph@codesourcery.com>
605
606 * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
607 flag_force_classes_archive_check, flag_redundant, flag_newer,
608 flag_use_divide_subroutine, flag_use_atomic_builtins,
609 flag_use_boehm_gc, flag_hash_synchronization,
610 flag_check_references, flag_optimize_sci, flag_indirect_classes,
611 flag_indirect_dispatch, flag_store_check,
612 flag_reduced_reflection): Remove.
613 * jcf-dump.c (flag_newer): Remove.
614 * jcf.h (quiet_flag): Remove.
615 * parse.h (quiet_flag): Remove.
616
617 2010-09-28 Richard Henderson <rth@redhat.com>
618
619 * lang.c: Include "target.h".
620 (java_eh_personality): Use targetm.except_unwind_info.
621 * Make-lang.in (lang.o): Update deps.
622
623 2010-09-27 Andrew Haley <aph@redhat.com>
624
625 PR java/45773
626 * jvgenmain.c (main): Fix arg processing.
627
628 2010-09-22 Joseph Myers <joseph@codesourcery.com>
629
630 * jvspec.c (lang_specific_driver): Handle OPT__help instead of
631 OPT_fhelp.
632 * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
633 -dependencies, -encoding, -extdirs, -include-directory,
634 -include-directory=, -output-class-directory,
635 -output-class-directory=, -resource, -resource=,
636 -user-dependencies): New.
637
638 2010-09-16 Richard Guenther <rguenther@suse.de>
639
640 * jcf-parse.c (current_file_list): Remove.
641 (java_parse_file): Use build_translation_unit_decl. Adjust.
642
643 2010-09-03 Joseph Myers <joseph@codesourcery.com>
644
645 * lang.opt (d): New.
646
647 2010-09-03 H.J. Lu <hongjiu.lu@intel.com>
648
649 PR java/45504
650 * jvgenmain.c (main): Check "-D XXX=YYY".
651
652 2010-09-02 Joseph Myers <joseph@codesourcery.com>
653
654 * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
655
656 2010-09-02 Joseph Myers <joseph@codesourcery.com>
657
658 * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
659 fCLASSPATH=): Mark as Java options and as aliases.
660 * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
661 (lang_specific_driver): Don't handle options marked as aliases.
662 * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
663
664 2010-08-22 Joseph Myers <joseph@codesourcery.com>
665
666 * Make-lang.in (jvspec.o): Update dependencies.
667 * jvspec.c: Include opts.h.
668 (PARAM_ARG): Remove.
669 (find_spec_file): Do not add leading -specs=.
670 (lang_specific_driver): Use cl_decoded_option structures.
671 * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
672 extdirs, fmain=, s-bc-abi): New options.
673
674 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
675
676 * class.c: Use FOR_EACH_VEC_ELT.
677 * expr.c: Likewise.
678 * jcf-parse.c: Likewise.
679 * resource.c: Likewise.
680
681 2010-08-16 Joseph Myers <joseph@codesourcery.com>
682
683 * lang.opt (MD_, MMD_, version): Mark RejectDriver.
684
685 2010-08-05 David Daney <ddaney@caviumnetworks.com>
686
687 * class.c (build_utf8_ref): Fix code formatting from previous commit.
688
689 2010-08-05 David Daney <ddaney@caviumnetworks.com>
690
691 * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
692
693 2010-07-27 Joseph Myers <joseph@codesourcery.com>
694
695 * lang.c (java_handle_option): Update prototype and return value
696 type.
697
698 2010-07-27 Joseph Myers <joseph@codesourcery.com>
699
700 * lang.c (java_option_lang_mask): New.
701 (java_init_options): Update prototype.
702 (LANG_HOOKS_OPTION_LANG_MASK): Define.
703
704 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
705
706 * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
707 * boehm.c: Likewise.
708 * class.c: Likewise.
709 * decl.c: Likewise.
710 * expr.c: Likewise.
711 * jcf-parse.c: Likewise.
712 * typeck.c: Likewise.
713 * verify-glue.c: Likewise.
714
715 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
716
717 * boehm.c: Include diagnostic-core.h in every file that includes
718 toplev.h.
719 * class.c: Likewise.
720 * constants.c: Likewise.
721 * decl.c: Likewise.
722 * except.c: Likewise.
723 * expr.c: Likewise.
724 * jcf-parse.c: Likewise.
725 * mangle.c: Likewise.
726 * mangle_name.c: Likewise.
727 * resource.c: Likewise.
728 * typeck.c: Likewise.
729 * verify-glue.c: Likewise.
730
731 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
732
733 PR bootstrap/44825
734 * class.c (make_class_data): Cast result of VEC_length calls to int.
735
736 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
737
738 * constants.c (build_constants_constructor): Use build_constructor
739 instead of build_constructor_from_list.
740 * class.c (make_method_value): Likewise.
741 (get_dispatch_table): Likewise.
742 (make_class_data): Likewise.
743 (emit_indirect_register_classes): Likewise.
744 (emit_symbol_table): Likewise.
745 (add_assertion_table_entry): Likewise.
746 (emit_assertion_table): Likewise.
747 (make_field_value): Use build_constructor_single instead of
748 build_constructor_from_list.
749
750 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
751
752 * java-tree.h (struct lang_type) [catch_classes]: Change type to a
753 VEC.
754 * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
755 instead of tree_cons.
756 * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
757 (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
758
759 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
760
761 * lang.c: Do not include except.h
762 * except.c: Likewise.
763 (doing_eh): New, moved from except.c (in gcc/) but removed the
764 do_warning flag.
765 (maybe_start_try): Update doing_eh call.
766 * Make-lang.in: Update dependencies.
767
768 2010-06-23 Anatoly Sokolov <aesok@post.ru>
769
770 * decl.c (java_init_decl_processing): Use double_int_to_tree instead
771 of build_int_cst_wide.
772 * boehm.c (set_bit): Remove.
773 (mark_reference_fields): Use double_int type for 'mask' argument.
774 Use double_int_setbit instead of set_bit.
775 (get_boehm_type_descriptor): Use double_int_setbit instead of
776 set_bit. Use double_int_to_tree instead of build_int_cst_wide.
777
778 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
779
780 * gcj.texi: Move to GFDL version 1.3. Fix copyright years.
781
782 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
783
784 * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
785
786 * jcf-parse.c (java_parse_file): Likewise.
787 (process_zip_dir): Likewise.
788
789 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
790 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
791
792 * expr.c (add_type_assertion): Likewise.
793
794 * decl.c (make_binding_level): Likewise.
795 (java_dup_lang_specific_decl): Likewise.
796
797 * constants.c (set_constant_entry): Likewise.
798 (cpool_for_class): Likewise.
799
800 * class.c (add_method_1): Likewise.
801 (java_treetreehash_new): Likewise.
802
803 * java-tree.h (struct lang_type): Add variable_size GTY option.
804 (struct lang_decl): Likewise.
805
806 * jch.h (struct cpool_entry): Likewise.
807
808 * java-tree.h (java_treetreehash_create): Remove parameter ggc.
809
810 * except.c (prepare_eh_table_type): Update
811 java_treetreehash_create call.
812
813 * class.c (add_method_1): Update java_treetreehash_create call.
814 (java_treetreehash_create): Remove parameter gc. Use
815 htab_create_ggc.
816
817 2010-06-04 Joseph Myers <joseph@codesourcery.com>
818
819 * jvspec.c (lang_specific_driver): Use GCC-specific formats in
820 diagnostics.
821
822 2010-05-30 Steven Bosscher <steven@gcc.gnu.org>
823
824 * except.c: Include tm.h.
825
826 2010-05-28 Joseph Myers <joseph@codesourcery.com>
827
828 * jvspec.c (lang_specific_driver): Use fatal_error instead of
829 fatal. Use warning instead of error for warnings.
830
831 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
832
833 * expr.c (get_symbol_table_index): Add spaces in expression.
834
835 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
836
837 * java-tree.h (method_entry): Declare. Declare VECs containing it.
838 (struct lang_type): Change type of otable_methods, atable_methods, and
839 itable_methods to VECs. Fix comment for atable_methods.
840 (emit_symbol_table): Take a VEC instead of a tree.
841 (get_symbol_table_index): Take a VEC * instead of a tree *.
842 * class.c (add_table_and_syms): Take a VEC instead of a tree.
843 (emit_symbol_table): Update for changed parameter type.
844 * expr.c (get_symbol_table_index): Likewise.
845
846 2010-05-27 Steven Bosscher <steven@gcc.gnu.org>
847
848 * buildings.c: Pretend to be a backend file by undefining
849 IN_GCC_FRONTEND (still need rtl.h here).
850
851 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
852
853 * java-tree.h (struct lang_decl_func): Change type of throws_list
854 field to a VEC.
855 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
856 of DECL_FUNCTION_THROWS.
857 * class.c (make_method_value): Likewise.
858
859 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
860
861 * class.c (utf8_decl_list): Delete.
862 (build_utf8_ref): Remove references to it.
863 * java-tree.h (all_class_list): Delete.
864 (predef_filenames): Delete.
865 (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
866 Delete.
867 * jcf-parse.c (parse_roots): Decrease size to 2.
868 (current_file_list): Convert to a VEC.
869 (all_class_list): Declare.
870 (jcf_parse): Adjust for new type of all_class_list.
871 (java_layout_seen_class_methods): Likewise.
872 (predefined_filenames): Declare.
873 (add_predefined_file): Use it.
874 (predefined_filename_p): Likewise.
875 (java_parse_file): Adjust for new type of current_file_list.
876
877 2010-05-25 Jakub Jelinek <jakub@redhat.com>
878
879 * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
880 for interfaces.
881
882 PR debug/43260
883 * java-tree.h (pending_static_fields): New extern declaration.
884 (java_write_globals): New prototype.
885 * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
886 * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
887 of a static field push it into pending_static_fields vector.
888 * class.c (pending_static_fields): New variable.
889 (add_field): If static field is not DECL_EXTERNAL, push it into
890 pending_static_fields vector.
891 (java_write_globals): New function.
892
893 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
894
895 * expr.c (quick_stack): Change type to a VEC. Update comment.
896 (tree_list_free_list): Delete.
897 (flush_quick_stack): Update for quick_stack type change.
898 (push_value): Likewise.
899 (pop_value): Likewise.
900
901 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
902
903 * java-gimplify.c: Do not include tm.h, toplev.h.
904 * typeck.c: Do not include tm.h.
905 * mangle_name.c: Do not include tm.h.
906 * jcf-dump.c: Do not include tm.h, ggc.h.
907 * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
908 * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
909 and timevar.h.
910 * jcf-parse.c: Do not include tm.h and tm_p.h.
911 * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
912 target.h, and expr.h.
913 * except.c: Do not include tm.h, rtl.h, function.h.
914 * builtins.c: Do not include convert.h. Explain why RTL headers
915 have to be included here.
916 * verify-glue.c: Do not include tm.h.
917 * jcf-depend.c: Do not include tm.h.
918 * jcf-reader.c: Include ggc.h.
919 * jcf-io.c: Do not include tm.h, toplev.h.
920 * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
921 gimple.h.
922 * lang.c: Do not include rtl.h, expr.h.
923 * Make-lang.in: Update dependencies.
924
925 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
926
927 * jcf-parse.c: Include bitmap.h.
928 * Make-lang.in: Update dependencies.
929
930 2010-05-20 Jakub Jelinek <jakub@redhat.com>
931
932 PR debug/43521
933 * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
934 PARM_DECL.
935
936 2010-05-19 Anatoly Sokolov <aesok@post.ru>
937
938 * jcf-parse.c (get_constant): Use double_int_to_tree instead of
939 build_int_cst_wide_type.
940
941 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
942
943 * expr.c (pop_arguments): Fix use of undeclared variable.
944
945 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
946
947 * expr.c (expand_java_multianewarray): Use build_call_vec instead of
948 build_call_list.
949 (pop_arguments): Return a VEC instead of a tree. Take a method type
950 rather than a list of argument types.
951 (rewrite_rule): Change signature. of rewrite_arglist member.
952 (rewrite_arglist_getcaller): Update signature.
953 (rewrite_arglist_getclass): Likewise.
954 (maybe_rewrite_invocation): Update for rewrite_arglist change.
955 (build_known_method_ref): Take a VEC instead of a tree.
956 (invoke_build_dtable): Likewise.
957 (expand_invoke): Update calls to pop_arguments. Use build_call_vec
958 instead of build_call_list.
959 (build_jni_stub): Use build_call_vec instead of build_call_list.
960 * java-tree.h (maybe_rewrite_invocation): Update declaration.
961 (build_known_method_ref): Likewise.
962 (invoke_build_dtable): Likewise.
963
964 2010-05-14 Nathan Froyd <froydnj@codesourcery.com>
965
966 PR 44103
967 * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
968 vector. Move call to build_constructor...
969 (FINISH_RECORD_CONSTRUCTOR): ...here. Add necessary arguments. Clear
970 TREE_CONSTANT on the constructor.
971 (PUSH_SUPER_VALUE): Change first argument to a vector.
972 (PUSH_FIELD_VALUE): Likewise.
973 * resource.c (compile_resource_data): Update calls to above macros.
974 * constants.c (build_constants_constructor): Likewise.
975 * class.c (build_utf8_ref): Likewise.
976 (make_field_value): Likewise.
977 (make_method_value): Likewise.
978 (add_table_and_syms): New function.
979 (make_class_data): Call it. Update calls to above macros.
980 (build_symbol_table_entry): New function.
981 (build_symbol_entry): Call it. Update calls to above macros.
982 (emit_symbol_table): Likewise.
983 (make_catch_class_record): Update calls to above macros.
984 (build_assertion_table_entry): New function.
985 (add_assertion_table_entry): Call it.
986 (emit_assertion_table): Likewise.
987
988 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
989
990 PR 40989
991 * lang.c (java_handle_option): Add argument kind.
992
993 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
994
995 * decl.c (java_init_decl_processing): Remove argument in call to
996 initialize_sizetypes
997
998 2010-04-07 Jakub Jelinek <jakub@redhat.com>
999
1000 * exception.cc (_Jv_Throw): Avoid set but not used warning.
1001 * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
1002 sizeof to avoid set but not used warnings.
1003
1004 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
1005
1006 * lang.c (java_post_options): Constify variable "dot".
1007
1008 * jcf-parse.c (set_source_filename): Constify variable "dot".
1009 (load_class): Constify variable "separator".
1010 Use get_identifier_with_length.
1011
1012 * jvspec.c (lang_specific_driver): Constify two variables named "p".
1013
1014 2010-01-09 Jakub Jelinek <jakub@redhat.com>
1015
1016 * jcf-dump.c (version): Update copyright notice dates.
1017
1018 2009-11-28 Jakub Jelinek <jakub@redhat.com>
1019
1020 * jvspec.c (lang_specific_driver): Remove unused
1021 saw_verbose_flag variable.
1022 * jcf-dump.c (main): Remove unused general_purpose_bits
1023 variable.
1024 * builtins.c (initialize_builtins): Remove unused float_ftype_float
1025 variable.
1026 * expr.c (java_stack_pop): Remove unused val variable.
1027 (build_jni_stub): Remove unused res_type variable.
1028 * verify-impl.c (check_field_constant): Remove unused len variable.
1029
1030 2009-10-20 Joel Dice <dicej@mailsnare.net>
1031
1032 PR java/28474
1033 * mangle_name.c (append_unicode_mangled_name): Fix mangling
1034 of names with multiple underscores and "U".
1035 (unicode_mangling_length): Likewise.
1036
1037 2009-10-03 Simon Baldwin <simonb@google.com>
1038
1039 * config-lang.in (lang_dirs): Remove zlib.
1040
1041 2009-09-28 Richard Henderson <rth@redhat.com>
1042
1043 * builtins.c (initialize_builtins): Update call to
1044 build_common_builtin_nodes.
1045 * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
1046
1047 2009-09-14 Richard Henderson <rth@redhat.com>
1048
1049 * builtins.c (initialize_builtins): Update call to
1050 build_common_builtin_nodes.
1051 * decl.c (java_init_decl_processing): Don't call
1052 default_init_unwind_resume_libfunc.
1053 * except.c: Include tree-iterator.h.
1054 (build_exception_object_var): New.
1055 (build_exception_object_ref): Use it.
1056 (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
1057 Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
1058 * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
1059
1060 2009-09-13 Richard Guenther <rguenther@suse.de>
1061 Rafael Avila de Espindola <espindola@google.com>
1062
1063 * decl.c (do_nothing): Remove.
1064 (java_init_decl_processing): Do not set lang_eh_runtime_type.
1065 * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
1066 * lang.c (java_eh_personality): New.
1067 (java_eh_personality_decl): Likewise.
1068 (LANG_HOOKS_EH_PERSONALITY): Define.
1069
1070 2009-09-03 Diego Novillo <dnovillo@google.com>
1071
1072 * lang.c (lang_hooks): Remove const qualifier.
1073
1074 2009-09-01 Jakub Jelinek <jakub@redhat.com>
1075
1076 * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
1077 type.
1078
1079 2009-09-01 Richard Guenther <rguenther@suse.de>
1080
1081 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
1082 * java-tree.h (java_mark_addressable): Likewise.
1083 * typeck.c (java_mark_addressable): Likewise.
1084
1085 2009-08-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1086
1087 * Make-lang.in (java.install-pdf): Install gcj.pdf in
1088 $(pdfdir)/gcc, alongside the other manuals.
1089
1090 2009-08-12 Andrew Haley <aph@redhat.com>
1091
1092 * builtins.c (compareAndSwapInt_builtin): Use
1093 flag_use_atomic_builtins.
1094 (compareAndSwapLong_builtin): Likewise.
1095 (compareAndSwapObject_builtin): Likewise.
1096 * jvspec.c: Add flag_use_atomic_builtins.
1097 * gcj.texi: Likewise.
1098 * java-tree.h: Likewise.
1099 * lang.opt: Likewise.
1100
1101 2009-08-11 Dodji Seketeli <dodji@redhat.com>
1102
1103 PR debug/40990
1104 * lang.c (put_decl_node): Outputs different level of information
1105 depending on the verbosity level.
1106
1107 2009-07-31 Andrew Haley <aph@redhat.com>
1108
1109 PR java/40867
1110 * decl.c (java_replace_references): Set EXPR_LOCATION on all
1111 generated expressions.
1112 (binding_level.loc): new field.
1113 (clear_binding_level): Initialize loc.
1114 (set_input_location): New function.
1115 (pushlevel): Set new binding_level.loc.
1116 (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
1117 (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
1118 (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
1119
1120 2009-07-17 Richard Guenther <rguenther@suse.de>
1121
1122 PR c/40401
1123 * java-gimplify.c (java_genericize): Do not gimplify here.
1124 But replace all local references.
1125 (java_gimplify_expr): Do not replace local references here.
1126 (java_gimplify_modify_expr): Likewise.
1127 * jcf-parse.c (java_parse_file): Do not finalize the CU or
1128 optimize the cgraph here.
1129 * decl.c (java_replace_reference): Make static.
1130 (java_replace_references): New function.
1131 (end_java_method): Clear base_decl_map.
1132 * java-tree.h (java_replace_references): Declare.
1133 (java_replace_reference): Remove.
1134
1135 2009-07-14 Taras Glek <tglek@mozilla.com>
1136 Rafael Espindola <espindola@google.com>
1137
1138 * Make-lang.in (java.install-plugin): New target for
1139 installing plugin headers.
1140
1141 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1142
1143 * class.c: Replace %J by an explicit location. Update all calls.
1144
1145 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1146
1147 * jcf-parse.c: Replace %H by an explicit location. Update all calls.
1148
1149 2009-06-29 Andrew Haley <aph@redhat.com>
1150
1151 PR java/40590
1152 * java-tree.h (cxx_keyword_p): New declaration.
1153 * mangle_name.c (utf8_cmp): Move here from mangle.c.
1154 (cxx_keywords): Likewise.
1155 (cxx_keyword_p): Likewise.
1156 (MANGLE_CXX_KEYWORDS): New macro.
1157 (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
1158 (append_gpp_mangled_name): Likewise.
1159 * mangle.c: Move code to mangle_name.c.
1160 (mangle_member_name): Don't call cxx_keyword_p.
1161
1162 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
1163
1164 * java-gimplify.c (java_gimplify_block): New argument to
1165 build_empty_stmt.
1166 * expr.c (force_evaluation_order): Same.
1167 * typeck.c: Add location to build_decl or PUSH_FIELD calls.
1168 * class.c: Same.
1169 * decl.c: Same.
1170 * jcf-parse.c: Same.
1171 * constants.c: Same.
1172 * resource.c: Same.
1173 * except.c: Same.
1174 * builtins.c: Same.
1175 * expr.c: Same.
1176 * java-tree.h (PUSH_FIELD): Add location field.
1177
1178 2009-06-09 Ian Lance Taylor <iant@google.com>
1179
1180 * verify.h: Remove extern "C".
1181
1182 2009-06-07 Ian Lance Taylor <iant@google.com>
1183
1184 * jcf-parse.c (handle_constant): Change local variable 'kind' to
1185 unsigned int.
1186
1187 2009-06-01 Ian Lance Taylor <iant@google.com>
1188
1189 * jcf-io.c (find_class): Use CONST_CAST.
1190
1191 2009-05-27 Ian Lance Taylor <iant@google.com>
1192
1193 * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
1194 $(LINKER).
1195 (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
1196
1197 2009-05-26 Ian Lance Taylor <iant@google.com>
1198
1199 * Make-lang.in (jvspec.o): Use $(COMPILER).
1200 ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
1201 (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
1202
1203 2009-05-12 Alexandre Oliva <aoliva@redhat.com>
1204
1205 * Make-lang.in (GCJ): Renamed to...
1206 (XGCJ): ... this.
1207
1208 2009-04-27 Ian Lance Taylor <iant@google.com>
1209
1210 * builtins.c (java_builtins): Add casts to enum type.
1211 * verify-impl.c (check_class_constant): Add cast to enum type.
1212 (check_constant, check_wide_constant): Likewise.
1213
1214 2009-04-27 Richard Guenther <rguenther@suse.de>
1215
1216 PR java/38374
1217 * constants.c (build_constants_constructor): Retain the old
1218 pointer type as valid TYPE_POINTER_TO after patching the
1219 type of the constant pool decl.
1220
1221 2009-04-24 Ian Lance Taylor <iant@google.com>
1222
1223 * jcf-parse.c (handle_constant): Add cast to enum type.
1224
1225 2009-04-21 Taras Glek <tglek@mozilla.com>
1226
1227 * builtins.c: Update GTY annotations to new syntax
1228 * decl.c: Likewise
1229 * java-tree.h: Likewise
1230 * jcf.h: Likewise
1231 * lang.c: Likewise
1232
1233 2009-04-21 Joseph Myers <joseph@codesourcery.com>
1234
1235 * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
1236 license notices.
1237
1238 2009-04-18 Ian Lance Taylor <iant@google.com>
1239
1240 * verify-impl.c (verify_instructions_0): Add cast to enum type.
1241
1242 2009-04-09 Paolo Bonzini <bonzini@gnu.org>
1243
1244 * builtins.c (compareAndSwapLong_builtin,
1245 compareAndSwapInt_builtin, compareAndSwapObject_builtin,
1246 VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
1247
1248 2009-03-31 Richard Guenther <rguenther@suse.de>
1249
1250 * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
1251 the first operand of binary and comaprison expressions.
1252
1253 2009-03-30 Joseph Myers <joseph@codesourcery.com>
1254
1255 PR rtl-optimization/323
1256 * lang.c (java_post_options): Set flag_excess_precision_cmdline.
1257 Give an error for -fexcess-precision=standard for processors where
1258 the option is significant.
1259
1260 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1261
1262 * lang.opt: Unify help text for -Wdeprecated.
1263
1264 2009-02-03 Jakub Jelinek <jakub@redhat.com>
1265
1266 * jcf-dump.c (version): Update copyright notice dates.
1267
1268 2009-01-16 Richard Guenther <rguenther@suse.de>
1269
1270 PR tree-optimization/38835
1271 PR middle-end/36227
1272 * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
1273
1274 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
1275
1276 PR bootstrap/38262
1277 * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
1278
1279 2008-11-04 Andrew Haley <aph@redhat.com>
1280
1281 PR java/37068
1282 * jcf-parse.c (java_emit_static_constructor): Don't call
1283 cgraph_build_static_cdtor. Rewrite.
1284
1285 2008-10-24 Jakub Jelinek <jakub@redhat.com>
1286
1287 * Make-lang.in (check-java-subtargets): New target.
1288
1289 2008-10-16 David Edelsohn <edelsohn@gnu.org>
1290
1291 PR target/35483
1292 * Make-lang.in (class.o): Depend on $(TM_P_H).
1293 (expr.o): Same.
1294 * class.c: Include tm_p.h.
1295 * expr.c: Include tm_p.h.
1296
1297 2008-10-14 Andrew Haley <aph@redhat.com>
1298
1299 * constants.c (build_constant_data_ref): Make sure we only build
1300 one copy of the decl for the constant pool.
1301
1302 2008-09-22 Andrew Haley <aph@redhat.com>
1303
1304 * expr.c (rules): Add new rule for
1305 gnu.java.lang.VMCPStringBuilder.toString.
1306 (rewrite_rule.new_classname): New field.
1307 (maybe_rewrite_invocation): Use new_classname field instead of
1308 DECL_CONTEXT (*method_p).
1309 Allow rewrite_arglist to be NULL.
1310
1311 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
1312
1313 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1314 (java_get_callee_fndecl): Kill.
1315
1316 2008-09-17 Jan Hubicka <jh@suse.cz>
1317
1318 PR c++/18071
1319 * class.c (add_method_1): Do not initialize DECL_INLINE.
1320 (make_local_function_alias): Likewise.
1321 * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
1322 * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
1323
1324 2008-09-09 Richard Guenther <rguenther@suse.de>
1325
1326 * decl.c (build_result_decl): Remove no longer applicable
1327 promotion.
1328
1329 2008-09-05 David Daney <ddaney@avtrex.com>
1330
1331 * gcj.texi (-freduced-reflection): Clarify option's restrictions.
1332
1333 2008-08-21 David Daney <ddaney@avtrex.com>
1334
1335 * class.c (make_class_data): Don't add field_index when
1336 flag_reduced_reflection set.
1337
1338 2008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
1339
1340 * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
1341
1342 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1343
1344 PR 28875
1345 * lang.c (java_handle_option): Replace set_Wunused with
1346 warn_unused.
1347
1348 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1349
1350 * gcj.texi: Update copyright years. Do not list GPL as
1351 Invariant Section.
1352
1353 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1354
1355 * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
1356 from ctype's sizes.
1357
1358 * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
1359 alignment.
1360
1361 2008-07-29 Jan Hubicka <jh@suse.cz>
1362
1363 * lang.c (java_post_options): Remove handling of flag_no_inline.
1364
1365 2008-07-28 Richard Guenther <rguenther@suse.de>
1366
1367 Merge from gimple-tuples-branch.
1368
1369 2008-07-18 Richard Guenther <rguenther@suse.de>
1370
1371 * expr.c: Include tree-iterator.h.
1372 * Make-lang.in (expr.o): Add tree-iterator.h dependency.
1373
1374 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1375
1376 * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
1377 * expr.c: Same.
1378
1379 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1380
1381 * java-gimplify.c (java_gimplify_expr): Same.
1382 (java_gimplify_modify_expr): Same.
1383 * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
1384
1385 2008-05-02 Diego Novillo <dnovillo@google.com>
1386
1387 * expr.c (build_java_throw_out_of_bounds_exception): Fix
1388 mixed declarations and code.
1389
1390 2008-05-02 Doug Kwan <dougkwan@google.com>
1391
1392 * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
1393 _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
1394
1395 2008-02-19 Diego Novillo <dnovillo@google.com>
1396
1397 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1398
1399 * java-gimplify.c (java_gimplify_self_mod_expr): Change
1400 gimple_seq arguments to gimple_seq *. Update all users.
1401
1402 2007-11-26 Aldy Hernandez <aldyh@redhat.com>
1403
1404 * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
1405 sequences.
1406 (java_gimplify_self_mod_expr): Same.
1407 * java-tree.h (java_gimplify_expr): Make pre_p and post_p
1408 sequences.
1409
1410 2008-07-24 Jan Hubicka <jh@suse.cz>
1411
1412 * java/decl.c: Include cgraph.h
1413 (end_java_method): Remove non-unit-at-a-time code.
1414 (java_mark_decl_local): Likewise; sanity check that we don't touch
1415 finalized nodes.
1416
1417 2008-07-15 Jan Hubicka <jh@suse.cz>
1418
1419 * lang.c (java_init_options): Enable unit-at-a-time by default.
1420
1421 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1422
1423 * Make-lang.in (jvspec.o): Fix dependencies.
1424
1425 2008-07-06 Tom Tromey <tromey@redhat.com>
1426
1427 * Make-lang.in (java/parse.o-warn): Remove.
1428 (java/jcf-io.o-warn): Remove.
1429
1430 2008-07-05 Tom Tromey <tromey@redhat.com>
1431
1432 * jcf-io.c: Don't include fnmatch.h. Don't use JCF_USE_SCANDIR.
1433 (compare_path): Remove.
1434 (java_or_class_file): Likewise.
1435 (memoized_dirlist_entry): Likewise.
1436 (memoized_dirlist_hash): Likewise.
1437 (memoized_dirlist_lookup_eq): Likewise.
1438 (memoized_dirlists): Likewise.
1439 (caching_stat): Likewise.
1440 (find_class): Use stat.
1441 * jcf.h (JCF_USE_SCANDIR): Remove.
1442
1443 2008-06-30 Joshua Sumali <jsumali@redhat.com>
1444
1445 * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
1446 doc/rebuild-gcj-db.1
1447 (java.uninstall): Likewise.
1448 (java.maintainer-clean): Likewise.
1449 (aot-compile.pod): New rule.
1450 (rebuild-gcj-db.pod): New rule.
1451 (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
1452 * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
1453
1454 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1455
1456 * Make-lang.in (java/jcf-io.o-warn): New.
1457
1458 2008-06-24 Tom Tromey <tromey@redhat.com>
1459
1460 * jcf-path.c (jcf_path_init): Don't name variable 'try'.
1461 * expr.c (add_type_assertion): Rename argument.
1462 (build_java_arrayaccess): Don't name variable 'throw'.
1463 (ARRAY_NEW_MULTI): Don't name variable 'class'.
1464 * jcf-io.c (find_class): Don't name variable 'class'.
1465 * mangle.c (compression_table_add): Don't name variable 'new'.
1466 * constants.c (cpool_for_class): Rename argument.
1467 (alloc_constant_fieldref): Likewise.
1468 * jcf-parse.c (handle_innerclass_attribute): Don't name variable
1469 'class'.
1470 (read_class): Likewise.
1471 (parse_zip_file_entries): Likewise.
1472 (process_zip_dir): Likewise.
1473 * decl.c (java_mark_class_local): Rename argument.
1474 * class.c (GEN_TABLE): Use type_name, not typename.
1475 (gen_indirect_dispatch_tables): Likewise.
1476 (add_field): Rename argument.
1477 (is_compiled_class): Likewise.
1478 (safe_layout_class): Likewise.
1479 (emit_assertion_table): Likewise.
1480 * typeck.c (has_method): Rename argument.
1481
1482 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1483
1484 * class.c (ident_subst, mangled_classname, unmangle_classname,
1485 gen_indirect_dispatch_tables, add_method_1,
1486 build_fieldref_cache_entry, make_local_function_alias,
1487 layout_class, java_treetreehash_find, java_treetreehash_new,
1488 split_qualified_name): Fix for -Wc++-compat.
1489 * constants.c (set_constant_entry, cpool_for_class): Likewise.
1490 * decl.c (make_binding_level, java_dup_lang_specific_decl,
1491 start_java_method): Likewise.
1492 * except.c (prepare_eh_table_type): Likewise.
1493 * expr.c (type_assertion_hash, note_instructions): Likewise.
1494 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1495 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1496 * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1497 Likewise.
1498 * jcf-parse.c (reverse, java_read_sourcefilenames,
1499 annotation_grow, rewrite_reflection_indexes, java_parse_file,
1500 process_zip_dir): Likewise.
1501 * jcf-path.c (add_entry, add_path, jcf_path_init,
1502 jcf_path_extdirs_arg): Likewise.
1503 * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1504 * jvgenmain.c (do_mangle_classname): Likewise.
1505 * lang.c (put_decl_string): Likewise.
1506 * verify-impl.c (make_state_copy, make_state, add_new_state):
1507 Likewise.
1508
1509 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1510
1511 * gcj.texi: Expand TABs, remove whitespace from blank lines.
1512
1513 2008-06-14 Tom Tromey <tromey@redhat.com>
1514
1515 PR java/36247:
1516 * class.c (build_class_ref): Initialize this_classdollar when
1517 needed.
1518
1519 2008-05-23 Andrew Haley <aph@redhat.com>
1520
1521 * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1522 pathname of source file.
1523
1524 2008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1525
1526 * jcf-dump.c (print_constant): Use
1527 HOST_LONG_LONG_FORMAT.
1528
1529 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1530
1531 * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1532 DECL_PURE_P.
1533
1534 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1535
1536 * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1537 (build_classdollar_field): Don't set TREE_INVARIANT.
1538 (get_dispatch_table): Don't set TREE_INVARIANT.
1539 (make_class_data): Don't set TREE_INVARIANT.
1540 (build_symbol_entry): Don't set TREE_INVARIANT.
1541 (emit_symbol_table): Don't set TREE_INVARIANT.
1542 * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1543 (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1544 * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1545 * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1546
1547 2008-04-03 Tom Tromey <tromey@redhat.com>
1548
1549 * Make-lang.in (java_OBJS): New variable.
1550
1551 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1552
1553 * java-tree.h (insert_block): Kill.
1554 * decl.c (insert_block): Kill.
1555
1556 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1557
1558 * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1559 * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1560 gpl.texi.
1561
1562 2008-03-27 Tom Tromey <tromey@redhat.com>
1563
1564 * Make-lang.in: Revert automatic dependency patch.
1565
1566 2008-03-25 Tom Tromey <tromey@redhat.com>
1567
1568 * Make-lang.in: Removed most explicit .o targets.
1569 (java/jvspec.o): Reduce to variable setting. Moved to java/.
1570 ($(GCJ)$(exeext)): Update.
1571 (JAVA_OBJS): New variable.
1572 (JCFDUMP_OBJS): Reformat.
1573 (java_OBJS): New variable.
1574 (java/jvspec.o-warn): Update.
1575 (java/parse.o-warn): Remove.
1576 (JAVA_TREE_H): Remove.
1577 (java/jcf-io.o): Reduce to variable setting.
1578 (ALL_CPPFLAGS): Likewise.
1579
1580 2008-03-12 Paolo Bonzini <bonzini@gnu.org>
1581
1582 * mangle.c (java_mangle_decl): Remove dead check.
1583
1584 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1585
1586 * jcf-parse.c (java_parse_file): Assert binding levels are
1587 left in order.
1588 * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1589 Delete.
1590
1591 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1592
1593 * jcf-dump.c (version): Update copyright notice dates.
1594
1595 2008-02-29 Tom Tromey <tromey@redhat.com>
1596
1597 * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1598 method.
1599 * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1600
1601 2008-02-26 Tom Tromey <tromey@redhat.com>
1602
1603 * lang.c (java_post_options): Remove conditional.
1604 * expr.c (expand_byte_code): Remove old location code.
1605 * jcf-parse.c (set_source_filename): Remove old location code.
1606 (give_name_to_class): Likewise.
1607 (jcf_parse): Likewise.
1608 (duplicate_class_warning): Likewise.
1609 (parse_class_file): Likewise.
1610 (java_parse_file): Likewise.
1611 * decl.c (finish_method): Remove old location code.
1612 * class.c (push_class): Remove old location code.
1613
1614 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1615
1616 PR other/35107
1617 * Make-lang.in (jc1): Add $(GMPLIBS).
1618
1619 2008-01-23 David Daney <ddaney@avtrex.com>
1620
1621 * class.c (hide) Rename to...
1622 (java_hide_decl) ... this throughout, and make public.
1623 * resource.c (Jr_count): Remove.
1624 (compile_resource_data): Call java_mangle_resource_name to generate
1625 decl name. Make resource decl public and hidden.
1626 * mangle.c (java_mangle_resource_name): New function.
1627 * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1628 functions.
1629
1630 2008-01-04 Andrew Haley <aph@redhat.com>
1631
1632 PR java/17779
1633 * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1634 C90.
1635
1636 2008-01-03 Andrew Haley <aph@redhat.com>
1637
1638 PR java/17779
1639 * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1640 we're about to re-layout the type.
1641
1642 2007-12-20 Alexandre Oliva <aoliva@redhat.com>
1643
1644 * lang.c (java_classify_record): Don't return
1645 RECORD_IS_INTERFACE for now.
1646
1647 2007-12-18 Andrew Haley <aph@redhat.com>
1648
1649 PR java/27643
1650 * jcf-parse.c (java_parse_file): Remove call to
1651 java_mark_class_local.
1652 (parse_class_file): Reinstate call to java_mark_class_local here.
1653 * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1654 already set, call java_mangle_decl() and make_decl_rtl() to
1655 rewrite its name as a hidden alias.
1656
1657 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1658
1659 PR debug/7081
1660 * lang.c (java_classify_record): New.
1661 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1662
1663 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1664
1665 PR 34081/C++
1666 * decl.c (finish_method): Pass 'false' for the new
1667 allocate_struct_function parameter.
1668
1669 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1670
1671 * expr.c (build_jni_stub): Use the computed jni func type for
1672 variable meth.
1673
1674 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1675
1676 * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1677
1678 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1679
1680 * expr.c (type_assertion_hash): Hash type uids rather than
1681 tree pointers.
1682
1683 2007-11-17 David Daney <ddaney@avtrex.com>
1684 Andrew Haley <aph@redhat.com>
1685
1686 * constants.c (build_constants_constructor): Use POINTER_SIZE
1687 insead of BITS_PER_WORD in big-endian work around.
1688
1689 2007-11-07 Tom Tromey <tromey@redhat.com>
1690
1691 PR java/34019:
1692 * gcj.texi (Input Options): Add missing noun.
1693
1694 2007-11-02 Tom Tromey <tromey@redhat.com>
1695
1696 PR java/33765:
1697 * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1698 * zipfile.h (ZIPEMPTYMAGIC): New define.
1699
1700 2007-11-01 Tom Tromey <tromey@redhat.com>
1701
1702 * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1703 (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1704 (java/jcf-io.o): Depend on zipfile.h.
1705
1706 2007-10-17 Richard Guenther <rguenther@suse.de>
1707
1708 * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1709 dependencies.
1710
1711 2007-10-03 Andrew Haley <aph@redhat.com>
1712
1713 PR java/33639
1714 * class.c (mangled_classname): Detect and replace illegal
1715 characters in assembly language symbols.
1716 (gen_indirect_dispatch_tables): Call mangled_classname() on
1717 the type.
1718
1719 2007-09-27 Jakub Jelinek <jakub@redhat.com>
1720
1721 * lang.c (java_print_error_function): Add third argument.
1722
1723 2007-09-15 Tom Tromey <tromey@redhat.com>
1724
1725 * java-tree.h (struct lang_decl_func) <function_decl_body>:
1726 Remove.
1727 <init_final>: Likewise.
1728 * lang.c (java_dump_tree): Update.
1729 * java-tree.h (DECL_FUNCTION_BODY): Remove.
1730
1731 2007-09-11 Jan Hubicka <jh@suse.cz>
1732
1733 * decl.c (java_expand_body): Kill.
1734 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1735
1736 2007-09-06 Tom Tromey <tromey@redhat.com>
1737
1738 * jcf-parse.c (parse_class_file): Re-enter the current file.
1739
1740 2007-09-07 Roman Zippel <zippel@linux-m68k.org>
1741
1742 * boehm.c (mark_reference_fields): Move misaligned pointer check
1743 after JREFERENCE_TYPE_P test
1744
1745 2007-09-06 Roman Zippel <zippel@linux-m68k.org>
1746
1747 * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1748 if pointer is misaligned.
1749
1750 2007-09-06 Tom Tromey <tromey@redhat.com>
1751
1752 * lang.c (java_post_options): Update.
1753 * jcf-parse.c (set_source_filename): Update.
1754 (give_name_to_class): Update.
1755 (jcf_parse): Update.
1756 (duplicate_class_warning): Update.
1757 (parse_class_file): Update.
1758 (java_parse_file): Update.
1759 * expr.c (expand_byte_code): Update.
1760
1761 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
1762
1763 * decl.c (finish_method): Use set_cfun.
1764
1765 2007-09-04 Andrew Haley <aph@redhat.com>
1766
1767 * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1768 when using the ARM EABI.
1769
1770 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1771
1772 * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1773
1774 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1775
1776 * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1777 CONST_CAST.
1778 * jcf.h (JCF_FINISH): Likewise.
1779
1780 2007-08-28 Tom Tromey <tromey@redhat.com>
1781
1782 * Make-lang.in (java.tags): Don't tag '*.y' files.
1783
1784 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1785
1786 * lang.c (java_decl_ok_for_sibcall): Likewise.
1787
1788 2007-08-21 Paul Brook <paul@codesourcery.com>
1789 Nathan Sidwell <nathan@codesourcery.com>
1790 Mark Mitchell <mark@codesourcery.com>
1791 Joseph Myers <joseph@codesourcery.com>
1792
1793 * jcf-dump.c (version): Use pkgversion_string. Update copyright
1794 date.
1795
1796 2007-08-20 Richard Guenther <rguenther@suse.de>
1797
1798 * lang.c (java_tree_inlining_walk_subtrees): Remove.
1799 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1800
1801 2007-08-17 Tom Tromey <tromey@redhat.com>
1802
1803 * typeck.c (find_method_in_interfaces): Update.
1804 * jcf-parse.c (load_class): Update.
1805 * java-gimplify.c (java_gimplify_component_ref): Removed.
1806 (java_gimplify_modify_expr): Update. Removed pre_p and post_p
1807 arguments.
1808 (java_gimplify_expr): Update.
1809 * decl.c (java_init_decl_processing): Update.
1810 * class.c (set_constant_value): Update.
1811 (make_class_data): Update.
1812 (finish_class): Update.
1813 (build_static_field_ref): Update.
1814 (is_compiled_class): Update.
1815 (maybe_layout_super_class): Update.
1816 (layout_class): Update.
1817 (layout_class_method): Update.
1818 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1819 (lang_decl_var) <am, final_iud, cif>: Removed fields.
1820 (lang_decl_func) <init_calls_this>: Removed field.
1821 (lang_type) <dot_class, verify_method>: Removed fields.
1822 (FIELD_NESTED_ACCESS): Removed.
1823 (FIELD_NESTED_ACCESS_P): Removed.
1824 (DECL_FIELD_FINAL_IUD): Removed.
1825 (DECL_LOCAL_FINAL_IUD): Removed
1826 (LOCAL_FINAL_P): Removed.
1827 (FINAL_VARIABLE_P): Removed.
1828 (CLASS_FINAL_VARIABLE_P): Removed.
1829 (DECL_BIT_INDEX): Removed.
1830 (DECL_INIT_CALLS_THIS): Removed.
1831 (FIELD_LOCAL_ALIAS): Removed.
1832 (FIELD_LOCAL_ALIAS_USED): Removed.
1833 (FIELD_THISN): Removed.
1834 (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1835 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1836 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1837 (TYPE_DOT_CLASS): Removed.
1838 (TYPE_VERIFY_METHOD): Removed.
1839 (ID_CLASSDOLLAR_P): Removed.
1840 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1841 Removed.
1842 (classdollar_identifier_node): Removed.
1843 (TYPE_UNKNOWN): Removed.
1844 (CLASS_FROM_SOURCE_P): Removed.
1845 * expr.c (build_jni_stub): Update.
1846 (force_evaluation_order): Update.
1847 (build_java_empty_stmt): Update.
1848 (build_class_init): Update.
1849 (java_stack_swap): Update.
1850 (build_jni_stub): Update.
1851
1852 2007-08-17 Tom Tromey <tromey@redhat.com>
1853
1854 * java-tree.h (LABEL_TYPE_STATE): Removed.
1855 (load_type_state): Removed.
1856 (LABEL_PC): Removed.
1857 (LABEL_VERIFIED): Removed.
1858 (type_states): Declare.
1859 * expr.c (type_states): New global.
1860 (load_type_state): Now static. Use type_states. Changed
1861 argument.
1862 (lookup_label): Don't set LABEL_PC.
1863 (expand_byte_code): Don't use LABEL_VERIFIED.
1864 (note_instructions): Initialize type_states.
1865 * verify-glue.c (vfy_note_stack_depth): Rewrote.
1866 (vfy_note_stack_type): Use type_states.
1867 (vfy_note_local_type): Likewise.
1868
1869 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1870
1871 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1872 * jcf.h (JCF_FINISH): Likewise.
1873
1874 2007-07-31 Nick Clifton <nickc@redhat.com>
1875
1876 * java-gimplify.c: Change copyright header to refer to version 3
1877 of the GNU General Public License and to point readers at the
1878 COPYING3 file and the FSF's license web page.
1879 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1880 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1881 resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1882 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1883 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1884 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1885 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1886
1887 2007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1888
1889 * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1890
1891 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1892
1893 * lang.c (java_get_callee_fndecl): Constify.
1894
1895 2007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1896
1897 * mangle.c (set_type_package_list): Constify.
1898 * verify-glue.c (vfy_make_string): Delete.
1899 * verify.h (vfy_make_string): Likewise.
1900
1901 2007-07-26 Tom Tromey <tromey@redhat.com>
1902
1903 * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1904 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
1905 EXIT_BLOCK_LABELED_BLOCK): Likewise.
1906 * lang.c (java_tree_inlining_walk_subtrees): Update.
1907 (java_dump_tree): Likewise.
1908 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
1909 Remove.
1910 * decl.c (push_labeled_block, pop_labeled_block): Remove.
1911 * java-gimplify.c (java_gimplify_labeled_block_expr,
1912 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
1913 (java_gimplify_expr): Update.
1914
1915 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1916
1917 * class.c (java_treetreehash_hash, java_treetreehash_compare):
1918 Constify.
1919 * expr.c (type_assertion_eq): Likewise.
1920 * jcf-io.c (compare_path): Likewise.
1921 * jcf-parse.c (cmpstringp): Likewise.
1922 * verify-impl.c (get_one_type, compute_argument_types,
1923 compute_return_type): Likewise.
1924
1925 2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1926
1927 PR target/32462
1928 PR libgcj/32465
1929 * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
1930
1931 2007-07-12 Richard Guenther <rguenther@suse.de>
1932
1933 * expr.c (expand_java_return): RETURN_EXPR has void type.
1934 (build_jni_stub): Likewise. Use a comparison against zero
1935 for null-pointer test in COND_EXPR.
1936 (build_field_ref): Build POINTER_PLUS_EXPR with correct
1937 type. Convert result instead.
1938 (build_invokevirtual): Likewise.
1939
1940 2007-07-09 Geoffrey Keating <geoffk@apple.com>
1941
1942 PR 32617
1943 * lang.c (java_init): Remove setting of force_align_functions_log.
1944 * class.c (add_method_1): Set DECL_ALIGN of non-static method
1945 to cope with ptrmemfunc_vbit_in_pfn.
1946
1947 2007-07-03 David Daney <ddaney@avtrex.com>
1948
1949 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
1950 include path.
1951 (doc/gcj.dvi): Same.
1952 (doc/gcj.pdf): Same.
1953 (java/index.html): Same.
1954
1955 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1956
1957 * class.c (make_class_data): Build the index in sizetype.
1958 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
1959 adding to a pointer type.
1960 (build_symbol_entry): Likewise.
1961 * expr.c (build_java_arrayaccess): Likewise.
1962 (build_field_ref): Likewise.
1963 (build_known_method_ref): Likewise.
1964 (build_invokevirtual): Likewise.
1965 * except.c (build_exception_object_ref): Do a
1966 NEGATIVE and then a POINTER_PLUS_EXPR instead
1967 of a MINUS_EXPR.
1968
1969 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
1970
1971 * typeck.c (java_signed_type): Remove.
1972 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1973 * java-tree.h (java_signed_type): Remove.
1974
1975 2007-05-18 Geoffrey Keating <geoffk@apple.com>
1976
1977 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
1978 (print_constant): Likewise.
1979
1980 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
1981
1982 * expr.c (build_java_binop): Use unsigned_type_for instead of
1983 java_unsigned_type.
1984 * java-tree.h (java_unsigned_type): Remove.
1985 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1986 * typeck.c (java_unsigned_type): Remove.
1987
1988 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1989
1990 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
1991 instead of checking GIMPLE_STMT_P in chain_next.
1992
1993 2007-04-06 Colin Walters <walters@redhat.com>
1994
1995 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
1996 * jcf-io.c (open_class): Copy 'filename'.
1997
1998 2007-04-03 Andrew Haley <aph@redhat.com>
1999
2000 * jvgenmain.c (main): Change main to use class$, not class$$.
2001 (do_mangle_classname): Likewise.
2002 * class.c (hide): New function.
2003 (add_field): Hide everything that shouldn't be visible outside a
2004 DSO.
2005 (build_static_class_ref): Likewise.
2006 (build_classdollar_field): Likewise.
2007 (make_class_data): Likewise.
2008 (layout_class_method): Likewise.
2009 * expr.c (special_method_p): New function.
2010
2011 * class.c (push_class): Don't bogusly guess the source filename.
2012 * jcf-parse.c (give_name_to_class): Don't set input_location from
2013 DECL_ARTIFICIAL decls.
2014
2015 2007-03-30 Rafael Ávila de Espíndola <espindola@google.com>
2016
2017 * typeck.c (java_signed_or_unsigned_type): Removed.
2018 (java_signed_type): use get_signed_or_unsigned_type instead of
2019 java_signed_or_unsigned_type.
2020 (java_unsigned_type): Ditto.
2021 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
2022 * java-tree.h (java_signed_or_unsigned_type): Removed.
2023
2024 2007-03-26 Tom Tromey <tromey@redhat.com>
2025
2026 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
2027 (java.maintainer-clean): Likewise.
2028 (java.install-man): Likewise.
2029 (.INTERMEDIATE): Removed grmiregistry.pod.
2030 (grmiregistry.pod): Removed.
2031 * gcj.texi (Invoking gcjh): Removed.
2032 (Invoking gjnih): Likewise.
2033 (Invoking grmiregistry): Likewise.
2034 (direntry): Updated.
2035 (Top): Likewise.
2036 (which-gcj): Removed.
2037
2038 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2039
2040 * Make-lang.in: Add install-pdf target as copied from
2041 automake v1.10 rules.
2042
2043 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
2044
2045 * gcj.texi: Standardize title page.
2046
2047 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
2048
2049 * class.c: Fix a comment typo.
2050
2051 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2052 Brooks Moses <brooks.moses@codesourcery.com>
2053 Lee Millward <lee.millward@codesourcery.com>
2054
2055 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
2056 of build3.
2057 (BUILD_MONITOR_EXIT): Likewise.
2058
2059 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
2060 (java_gimplify_modify_expr): Likewise.
2061
2062 * class.c (cache_this_class_ref): Use build_call_expr.
2063 (build_static_field_ref): Likewise.
2064 (emit_indirect_register_classes): Likewise.
2065 (emit_register_classes): Likewise.
2066
2067 * resource.c (write_resource_constructor): Use build_call_expr.
2068
2069 * builtins.c (builtin_creator_function): Change interpretation of
2070 the second parameter to be the whole CALL_EXPR instead of the arglist.
2071 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
2072 (min_builtin): Likewise.
2073 (abs_builtin): Likewise.
2074 (java_build_function_call_expr): Likewise.
2075 (convert_real): Likewise.
2076 (UNMARSHAL3): Likewise.
2077 (UNMARSHAL4): Likewise.
2078 (UNMARSHAL5): Likewise.
2079 (build_arglist_for_builtin): Delete. Fix callers to use
2080 build_call_expr instead.
2081 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
2082 accessors.
2083 (compareAndSwapInt_builtin): Likewise.
2084 (compareAndSwapLong_builtin): Likewise.
2085 (compareAndSwapObject_builtin): Likewise.
2086 (putVolatile_builtin): Likewise.
2087 (getVolatile_builtin): Likewise.
2088 (VMSupportsCS8_builtin): Likewise.
2089 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
2090 instead of arglist.
2091
2092 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
2093 (build_java_throw_out_of_bounds_exception): Likewise.
2094 (java_check_reference): Likewise.
2095 (build_java_arraystore_check): Likewise.
2096 (build_newarray): Likewise.
2097 (build_anewarray): Likewise.
2098 (expand_java_multinewarray): Use build_call_list instead of build3.
2099 (build_java_monitor): Use build_call_nary instead of build3.
2100 (java_create_object): Likewise.
2101 (expand_java_NEW): Likewise.
2102 (build_instanceof): Likewise.
2103 (expand_java_CHECKCAST): Likewise.
2104 (build_java_soft_divmod): Likewise.
2105 (build_java_binop): Likewise.
2106 (build_field_ref): Likewise.
2107 (build_class_init): Likewise.
2108 (rewrite_arglist_getcaller): Use build_call_expr.
2109 (build_invokeinterface): Use build_call_nary instead of build3.
2110 (expand_invoke): Use build_call_list instead of build3.
2111 (build_jni_stub): Use build_call_nary, build_call_list, or
2112 build_call_expr instead of build3.
2113 (expand_java_field_op): Use build_call_expr instead of build3.
2114 (force_evaluation_order): Use new CALL_EXPR accessors.
2115
2116 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
2117
2118 2007-02-15 David Daney <ddaney@avtrex.com>
2119
2120 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
2121 (java.maintainer-clean):Add gc-analyze.1.
2122 (.INTERMEDIATE): Add gc-analyze.pod.
2123 (gc-analyze.pod): New rule.
2124 (java.install-man): Install gc-analyze.1
2125 * gcj.texi: Add new section for the gc-analyze program.
2126
2127 2007-02-07 Andrew Haley <aph@redhat.com>
2128
2129 * class.c (uncache_this_class_ref): New.
2130 * expr.c (build_jni_stub): Initialize the class.
2131 (expand_byte_code): Call uncache_this_class_ref after generating
2132 code.
2133
2134 2007-02-06 Tom Tromey <tromey@redhat.com>
2135
2136 PR java/30714:
2137 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
2138
2139 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
2140
2141 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
2142
2143 2007-02-02 Andrew Haley <aph@redhat.com>
2144
2145 * expr.c (expand_byte_code): Call cache_this_class_ref() and
2146 cache_cpool_data_ref().
2147 Set TYPE_CPOOL_DATA_REF.
2148 (cache_cpool_data_ref): New function.
2149 * constants.c (build_ref_from_constant_pool): Remove special-case
2150 code for flag_indirect_classes.
2151 (build_constant_data_ref): Move special-case code for
2152 flag_indirect_classes here from build_ref_from_constant_pool.
2153 * decl.c (finish_method): Move class initialization from here to
2154 cache_this_class_ref.
2155 * class.c (cache_this_class_ref): New function.
2156 (build_class_ref): Use this_classdollar for the ouput class.
2157
2158 2007-02-02 David Daney <ddaney@avtrex.com>
2159
2160 * class.c (is_compiled_class): Move check to avoid reloading
2161 current class.
2162 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
2163 already set.
2164
2165 2007-02-01 Andrew Haley <aph@redhat.com>
2166
2167 PR java/30641
2168 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
2169
2170 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
2171
2172 * class.c, jcf-parse.c: Fix comment typos.
2173
2174 2007-01-30 Tom Tromey <tromey@redhat.com>
2175
2176 * gcj.texi (Strings): Fix documentation for JvNewString.
2177
2178 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2179
2180 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
2181 typos.
2182
2183 2007-01-30 Ben Elliston <bje@au.ibm.com>
2184
2185 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
2186
2187 2007-01-29 Tom Tromey <tromey@redhat.com>
2188
2189 PR java/30607:
2190 * jvspec.c (lang_specific_driver): Handle separate -I argument.
2191 * lang.opt (-I): Add 'Separate'.
2192
2193 2007-01-29 Andrew Haley <aph@redhat.com>
2194
2195 * class.c (add_method_1): Mark fndecl as external unless we are
2196 compiling it into this object file.
2197
2198 2007-01-24 Andrew Haley <aph@redhat.com>
2199
2200 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
2201 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
2202
2203 2007-01-22 Andrew Haley <aph@redhat.com>
2204
2205 * builtins.c (VMSupportsCS8_builtin): New function.
2206
2207 2007-01-23 Andrew Pinski <pinskia@gmail.com>
2208
2209 PR java/30454
2210 * jcf-io.c (opendir_in_zip): Close the file
2211 and free zipf before returning after an error.
2212
2213 2007-01-16 Tom Tromey <tromey@redhat.com>
2214
2215 * java-tree.def: Added copyright header.
2216
2217 2007-01-15 Tom Tromey <tromey@redhat.com>
2218
2219 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
2220 case.
2221 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
2222 Removed case.
2223 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
2224 (EXPR_WFL_NODE): Likewise.
2225 (EXPR_WFL_LINECOL): Likewise.
2226 (EXPR_WFL_FILENAME): Likewise.
2227 (EXPR_WFL_LINENO): Likewise.
2228 (build_expr_wfl, expr_add_location): Don't declare.
2229 (build_unknown_wfl): Removed.
2230 (EXPR_WFL_FILENAME_NODE): Removed.
2231 (EXPR_WFL_COLNO): Removed.
2232 (EXPR_WFL_SET_LINECOL): Removed.
2233 (DECL_FUNCTION_WFL): Removed.
2234 (DECL_FIELD_FINAL_WFL): Removed.
2235 (struct lang_decl_func) <wfl>: Removed field.
2236 <called_constructor>: Likewise.
2237 <inner_access>: Likewise.
2238 (struct lang_decl_var) <wfl>: Removed field.
2239 (DECL_CONSTRUCTOR_CALLS): Removed.
2240 (DECL_FUNCTION_ACCESS_DECL): Likewise.
2241 (DECL_FUNCTION_INNER_ACCESS): Likewise.
2242 (DECL_SPECIFIC_COUNT): Likewise.
2243 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
2244 * expr.c (build_expr_wfl): Removed.
2245 (expr_add_location): Likewise.
2246
2247 2007-01-12 Tom Tromey <tromey@redhat.com>
2248
2249 * jcf-dump.c (main): Updated call to find_class.
2250 * lang.c (java_init): Removed dead code.
2251 * jcf-parse.c (read_class): Don't use java_source field. Removed
2252 dead code.
2253 (parse_zip_file_entries): Don't use java_source field.
2254 (process_zip_dir): Likewise.
2255 (jcf_parse): Removed dead code.
2256 (java_parse_file): Likewise.
2257 (read_class): Updated call to find_class.
2258 * jcf-io.c (find_class): Don't use java_source field. Removed
2259 'source_ok' argument, .java logic.
2260 * jcf.h (JCF) <java_source>: Removed field.
2261 (JCF_ZERO): Updated. (find_class): Updated.
2262 * decl.c: Removed dead code.
2263 * class.c: Removed dead code.
2264
2265 2007-01-11 Tom Tromey <tromey@redhat.com>
2266
2267 * typeck.c (convert): Don't use flag_emit_class_files.
2268 * lang.c (java_post_options): Don't use flag_emit_class_files.
2269 (java_handle_option): Don't use flag_extraneous_semicolon or
2270 flag_redundant.
2271 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
2272 flag_emit_class_files.
2273 (load_class): Likewise.
2274 * java-tree.h (flag_emit_class_files): Don't declare.
2275 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
2276 (flag_extraneous_semicolon): Don't declare.
2277 (flag_not_overriding): Likewise.
2278 (flag_static_local_jdk1_1): Likewise.
2279 (flag_redundant): Likewise.
2280 * expr.c (build_newarray): Don't use flag_emit_class_files.
2281 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
2282 flag_emit_class_files.
2283 (build_class_ref): Likewise.
2284 * builtins.c (check_for_builtin): Don't use
2285 flag_emit_class_files.
2286
2287 2007-01-10 Tom Tromey <tromey@redhat.com>
2288
2289 * lang.c (java_can_use_bit_fields_p): Removed.
2290 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
2291
2292 2007-01-09 Andrew Haley <aph@redhat.com>
2293
2294 * expr.c (build_java_arrayaccess): Rewrite to generate array
2295 access in canonical form.
2296 (expand_java_arraystore): Use build_fold_addr_expr() on address of
2297 array access.
2298
2299 2007-01-03 Andrew Haley <aph@redhat.com>
2300
2301 PR java/28754
2302 * expr.c (expand_java_field_op): If we're initializing a field's
2303 declaring interface we should not also initialize the class
2304 context in which it was referenced.
2305
2306 2007-01-02 Tom Tromey <tromey@redhat.com>
2307
2308 * java-tree.h (compiling_from_source, current_encoding,
2309 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
2310 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
2311 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
2312 JTI_WFL_OPERATOR): Removed
2313 (finit_identifier_node, instinit_identifier_node,
2314 length_identifier_node, super_identifier_node,
2315 continue_identifier_node, access0_identifier_node, wfl_operator):
2316 Removed.
2317 (cyclic_inheritance_report,
2318 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
2319 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
2320 DECL_FIXED_CONSTRUCTOR_P): Removed.
2321 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
2322 Removed.
2323 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
2324 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
2325 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
2326 import_list, import_demand_list>: Removed.
2327 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
2328 cxx_keyword_p): Removed.
2329 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
2330 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
2331 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
2332 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
2333 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
2334 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
2335 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
2336 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
2337 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
2338 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
2339 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
2340 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
2341 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
2342 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
2343 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
2344 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
2345 java_parse_abort_on_error, extract_field_decl): Removed.
2346 (finput): Declare.
2347 * lang.c: (compiling_from_source, current_encoding): Removed.
2348 (java_handle_option): Ignore -fencoding.
2349 * parse.h: Don't include lex.h.
2350 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
2351 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
2352 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
2353 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
2354 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
2355 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
2356 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
2357 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
2358 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
2359 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
2360 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
2361 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
2362 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
2363 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
2364 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
2365 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
2366 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
2367 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
2368 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
2369 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
2370 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
2371 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
2372 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
2373 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
2374 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
2375 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
2376 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
2377 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
2378 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
2379 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
2380 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
2381 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
2382 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
2383 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
2384 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
2385 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
2386 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
2387 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
2388 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
2389 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
2390 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
2391 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
2392 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
2393 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
2394 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
2395 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
2396 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
2397 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
2398 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
2399 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
2400 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
2401 SET_CPC_STATIC_INITIALIZER_STMT,
2402 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
2403 java_complete_class, java_check_circular_reference,
2404 java_fix_constructors, java_layout_classes, java_reorder_fields,
2405 java_method_add_stmt, java_get_line_col, reset_report,
2406 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
2407 java_finish_classes, ctxp, ctxp_for_generation,
2408 ctxp_for_generation_last): Removed.
2409 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
2410 * mangle.c (utf8_cmp): New function.
2411 (cxx_keywords): New global.
2412 (cxx_keyword_p): New function.
2413 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
2414 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
2415 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
2416 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
2417 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
2418 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
2419 * Make-lang.in (java.srcextra): Do nothing.
2420 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
2421 (JAVA_OBJS): Don't mention deleted files.
2422 (java.mostlyclean): Likewise.
2423 (java.clean): Likewise.
2424 (JAVA_LEX_C): Removed.
2425 (buffer.o, check-init.o, parse.o): Remove unused targets.
2426 (typeck.o): Updated.
2427 * jcf-parse.c (read_class): Comment out unused code.
2428 (java_layout_seen_class_methods): New function.
2429 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
2430 Removed.
2431 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
2432 (init_jcf_parse): Removed.
2433 * config-lang.in (gtfiles): Remove deleted files.
2434 * decl.c (java_init_decl_processing): Don't initialize
2435 finit_identifier_node, instinit_identifier_node,
2436 length_identifier_node, super_identifier_node,
2437 continue_identifier_node, access0_identifier_node. Don't call
2438 init_jcf_parse.
2439 * class.c (cyclic_inheritance_report): New global.
2440 (add_method_1): Don't use
2441 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
2442 (maybe_layout_super_class): Comment out code.
2443 (safe_layout_class): New function.
2444 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
2445 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
2446 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
2447 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
2448 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
2449 (java_gimplify_case_expr): Removed.
2450 (java_gimplify_default_expr): Likewise.
2451 (java_gimplify_new_array_init): Likewise.
2452 * parse.y: Removed.
2453 * keyword.gperf, keyword.h: Removed.
2454 * chartables.h: Removed.
2455 * check-init.c: Removed.
2456 * buffer.c, buffer.h: Removed.
2457 * convert.h: Removed.
2458 * gen-table.pl: Removed.
2459 * lex.c, lex.h: Removed.
2460
2461 2007-01-02 Andrew Haley <aph@redhat.com>
2462
2463 * expr.c (expand_java_arraystore): Make sure we perform a bounds
2464 check at runtime before we perform a type check.
2465
2466 2006-12-19 Andrew Haley <aph@redhat.com>
2467
2468 * decl.c: Bump minor BC ABI version.
2469
2470 2006-12-13 Gary Benson <gbenson@redhat.com>
2471
2472 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
2473
2474 2006-12-12 Tom Tromey <tromey@redhat.com>
2475
2476 * lang-specs.h: Pass -M options to jc1.
2477 * jcf-depend.c (jcf_dependency_add_file): Don't emit
2478 dependencies.
2479
2480 2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
2481
2482 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
2483
2484 2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
2485
2486 * lang-specs.h: Pass '%U'-based options as separate arguments.
2487
2488 2006-12-05 Tom Tromey <tromey@redhat.com>
2489
2490 PR java/29495:
2491 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
2492 classes as well.
2493 * class.c (add_field): Handle ACC_SYNTHETIC.
2494 (add_method_1): Likewise. Handle bridge and varargs.
2495 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2496 annotation.
2497 (set_class_decl_access_flags): Handle synthetic and annotation.
2498 * java-tree.h (METHOD_BRIDGE): New macro.
2499 (METHOD_VARARGS): Likewise.
2500 (TYPE_SYNTHETIC): Likewise.
2501 (TYPE_ANNOTATION): Likewise.
2502 (lang_type): New fields 'synthetic' and 'annotation'.
2503 (lang_decl_func): New fields 'varargs' and 'bridge'.
2504
2505 2006-12-04 Andrew Haley <aph@redhat.com>
2506
2507 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2508 there's no map.
2509
2510 2006-11-29 Gary Benson <gbenson@redhat.com>
2511
2512 * expr.c (rewrite_arglist_getcaller): Reorder.
2513
2514 2006-11-29 Andrew Haley <aph@redhat.com>
2515
2516 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2517 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2518
2519 2006-11-23 Andrew Haley <aph@redhat.com>
2520
2521 * expr.c (rewrite_arglist_getcaller): New.
2522 (rewrite_arglist_getclass): Fix indentation.
2523 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
2524 gnu.classpath.VMStackWalker.getCallingClassLoader().
2525 * builtins.c (initialize_builtins): Remove duplicate def'n of
2526 __sync_synchronize.
2527 Add __builtin_return_address.
2528
2529 2006-11-22 Andrew Haley <aph@redhat.com>
2530
2531 * jcf-reader.c (get_attribute): Mark attr_type unused.
2532
2533 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2534
2535 2007-01-08 Richard Guenther <rguenther@suse.de>
2536
2537 * lex.c (do_java_lex): Use build_int_cst_wide_type.
2538 * jcf-parse.c (get_constant): Likewise.
2539
2540 2006-11-12 Jan Hubicka <jh@suse.cz>
2541
2542 * resource.c (compile_resource_data): Update for new varpool names.
2543 * java/class.c (build_utf8_ref): Likewise.
2544
2545 2006-11-12 David Daney <ddaney@avtrex.com>
2546
2547 PR java/29805
2548 * typeck.c (build_java_array_type): Increase buffer sizes.
2549
2550 2006-11-11 Richard Guenther <rguenther@suse.de>
2551
2552 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2553 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2554
2555 2006-11-06 Andrew Haley <aph@redhat.com>
2556
2557 * java-tree.h (CONSTANT_LazyFlag): New.
2558 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2559 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2560 reflection_data.
2561 (handle_constant): Return 0 for dummy cpool entries.
2562 Handle constants of kind Class.
2563 Handle constants of kind NameAndType.
2564 (handle_enclosingmethod_attribute): New.
2565 (handle_signature_attribute): New.
2566 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2567 (HANDLE_SIGNATURE_ATTRIBUTE): New.
2568 (handle_constant): Use unmangle_classname()rather than calling
2569 identifier_subst() directly.
2570
2571 2006-11-02 Andrew Haley <aph@redhat.com>
2572
2573 * java-tree.h (FIELD_ENUM): New.
2574 (lang_decl_var.field_enum): New.
2575 (lang_type.enum_class): New.
2576 (CLASS_ENUM): New.
2577 * class.c (set_class_decl_access_flags): Handle enum types.
2578 (add_field): Handle enum fields.
2579 (get_access_flags_from_decl): Likewise.
2580
2581 * class.c (make_class_data): Put reflection_data into rodata.
2582
2583 2006-11-01 Andrew Haley <aph@redhat.com>
2584
2585 * jcf-parse.c (field_offsets, bit_obstack): New variables.
2586 (jcf_parse): Write end marker to annotation_data.
2587 (java_parse_file): Create field_offsets bitmap. Destroy it.
2588 (annotation_grow, annotation_rewrite_byte)
2589 (annotation_rewrite_short, annotation_rewrite_int)
2590 (annotation_read_short, annotation_write_byte)
2591 (annotation_write_short, annotation_write_int)
2592 (handle_long_constant, handle_constant, handle_element_value)
2593 (handle_annotation, handle_annotations)
2594 (handle_annotation_attribute, rewrite_reflection_indexes)
2595 (handle_member_annotations, handle_parameter_annotations)
2596 (handle_default_annotation): New functions.
2597 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
2598 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
2599 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2600 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2601 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2602 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
2603 (TYPE_REFLECTION_DATA): New.
2604 (TYPE_REFLECTION_DATASIZE): New.
2605 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2606 an enum.
2607 * jcf-reader.c (get_attribute): Pass field/method index and
2608 attribute type to get_attribute().
2609 * constants.c (find_class_or_string_constant): Make nonstatic.
2610 (cpool_for_class): Likewise.
2611 (build_constants_constructor): Separate string and scalar types.
2612 * class.c (make_class_data): Generate field_indexes permutation.
2613 Pass it to rewrite_reflection_indexes().
2614 (make_class_data): Generate constructor for reflection_data field.
2615
2616 2006-10-20 Tom Tromey <tromey@redhat.com>
2617
2618 * gcj.texi (Top): Don't mention jv-scan.
2619 (Invoking gcj): Likewise.
2620 (Invoking gcjh): Likewise.
2621 (Invoking gjnih): Likewise.
2622 (Invoking gij): Likewise.
2623 (Invoking gcj-dbtool): Likewise.
2624 (Invoking jv-scan): Removed.
2625 * parse-scan.y: Removed.
2626 * jv-scan.c: Removed.
2627 * config-lang.in (stagestuff): Don't mention jv-scan.
2628 * Make-lang.in (java): Removed jv-scan.
2629 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2630 (JVSCAN_OBJS): Removed.
2631 (jv-scan$(exeext)): Likewise.
2632 (JAVA_MANFILES): Removed jv-scan.1.
2633 (java.uninstall): Don't mention jv-scan.
2634 (java.mostlyclean): Likewise.
2635 (java.maintainer-clean): Likewise.
2636 (.INTERMEDIATE): Likewise.
2637 (java/jv-scan.o): Removed.
2638 (jv-scan.pod): Likewise.
2639 (java.srcextra): Don't mention parse-scan.c.
2640 (java.mostlyclean): Likewise.
2641 (java/parse-scan.c): Removed.
2642 (java/parse-scan.o-warn): Removed.
2643 (java/parse-scan.o): Removed.
2644
2645 2006-10-20 Tom Tromey <tromey@redhat.com>
2646
2647 * lang.c (java_handle_option): Don't use
2648 jcf_write_base_directory.
2649 * jcf.h (jcf_write_base_directory): Removed.
2650 * parse.y (java_expand_classes): Don't call write_classfile.
2651 * config-lang.in (gtfiles): Removed jcf-write.c.
2652 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2653 (java/jcf-write.o): Removed.
2654 * jcf-parse.c (parse_class_file): Don't call write_classfile.
2655 * java-tree.h (write_classfile): Removed declaration.
2656 * jcf-write.c: Removed.
2657
2658 2006-10-20 Tom Tromey <tromey@redhat.com>
2659
2660 * Make-lang.in (java): Removed gjnih, gcjh.
2661 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2662 (GCJH_OBJS): Removed.
2663 (GJNIH_OBJS): Likewise.
2664 (gjnih$(exeext)): Likewise.
2665 (gcjh$(exeext)): Likewise.
2666 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2667 (java.install-common): Don't special case gcjh.
2668 (java.uninstall): Don't mention gcjh, gjnih.
2669 (java.mostlyclean): Likewise.
2670 (java.maintainer-clean): Likewise.
2671 (.INTERMEDIATE): Likewise.
2672 (gcjh.pod): Removed.
2673 (gjnih.pod): Likewise.
2674 (GCJH_TARGET_INSTALL_NAME): Removed.
2675 (java/gjavah-jni.o): Removed.
2676 (java/gjavah.o): Likewise.
2677 * config-lang.in (stagestuff): Removed gjnih, gcjh.
2678 * gjavah.c: Removed.
2679
2680 2006-10-17 Tom Tromey <tromey@redhat.com>
2681
2682 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2683 "string" case.
2684
2685 2006-10-17 Tom Tromey <tromey@redhat.com>
2686
2687 * jvgenmain.c (main): Handle -findirect-dispatch.
2688 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2689 jvgenmain.
2690
2691 2006-10-06 Andrew Haley <aph@redhat.com>
2692
2693 * builtins.c (compareAndSwapInt_builtin): Check that we really do
2694 have a compare_and_swap builtin.
2695 (compareAndSwapLong_builtin): Likewise.
2696 (compareAndSwapObject_builtin): Likewise.
2697
2698 2006-10-04 Andrew Haley <aph@redhat.com>
2699
2700 * builtins.c (java_builtins): Add compareAndSwapInt,
2701 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2702 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2703 putObjectVolatile, getObjectVolatile, getIntVolatile,
2704 getLongVolatile, getLong.
2705 (UNMARSHAL3): New macro.
2706 (UNMARSHAL4): Likewise.
2707 (UNMARSHAL5): Likewise.
2708 (build_arglist_for_builtin): New function.
2709 (build_addr_sum, build_check_this): New functions.
2710 (putObject_builtin. compareAndSwapInt_builtin,
2711 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2712 putVolatile_builtin, getVolatile_builtin): New builtins.
2713
2714 2006-06-08 Andrew Haley <aph@redhat.com>
2715
2716 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2717 get_symbol_table_index().
2718 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2719 private method.
2720 (build_known_method_ref): New arg: special. Pass it to
2721 get_symbol_table_index.
2722 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2723 the method list.
2724 (build_invokevirtual): New arg: special. Pass it to
2725 get_symbol_table_index.
2726 (expand_invoke): New variable: special.
2727 Pass it to maybe_rewrite_invocation().
2728 Pass it to build_known_method_ref().
2729 * class.c (build_symbol_entry): Add new arg: special. Use it to
2730 build the symbol table conbstructor.
2731 (emit_symbol_table): Extract SPECIAL from the method list and pass
2732 it to build_symbol_entry().
2733 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2734 special accordingly.
2735
2736 2006-09-08 Andrew Haley <aph@redhat.com>
2737
2738 * class.c (layout_class_method): Use build_java_signature, not
2739 build_java_argument_signature. Use lookup_java_method, not
2740 lookup_argument_method.
2741
2742 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2743 Bryce McKinlay <bryce@mckinlay.net.nz>
2744
2745 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2746
2747 2006-07-18 Tom Tromey <tromey@redhat.com>
2748
2749 * lang.opt: Added missing -W options.
2750
2751 2006-07-12 Tom Tromey <tromey@redhat.com>
2752
2753 PR java/28329:
2754 * lang-specs.h: Pass '%U'-based options as separate arguments.
2755 Use -faux-classpath.
2756 * lang.c (java_handle_option): Handle OPT_faux_classpath.
2757 * lang.opt (faux-classpath): New option.
2758
2759 2006-07-07 Tom Tromey <tromey@redhat.com>
2760
2761 * class.c (make_class_data): Set value for reflection_data field.
2762 * decl.c (java_init_decl_processing): Add reflection_data field.
2763
2764 2006-07-07 Tom Tromey <tromey@redhat.com>
2765
2766 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2767 earlier.
2768 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2769
2770 2006-07-07 Andrew Haley <aph@redhat.com>
2771
2772 * jcf-parse.c (set_source_filename): Don't check for
2773 CLASS_FROM_CURRENTLY_COMPILED_P.
2774 Remove // comments.
2775
2776 2006-07-07 Andrew Haley <aph@redhat.com>
2777
2778 * java-tree.h (java_read_sourcefilenames): Declare.
2779 * lang.c (java_handle_option): Call java_read_sourcefilenames().
2780 * lang.opt (fsource-filename): New opt.
2781 * lang-specs.h: Add -fsource-filename.
2782 * jcf-parse.c (num_files, filenames): New variables.
2783 (reverse, cmpstringp, java_read_sourcefilenames,
2784 find_sourcefile): New.
2785 (set_source_filename): Call find_sourcefile to find the real name
2786 of a source file.
2787
2788 2006-06-27 Tom Tromey <tromey@redhat.com>
2789
2790 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2791 Signature, LocalVariableTypeTable, annotation attributes.
2792 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2793 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2794 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2795 (HANDLE_METHOD): Likewise.
2796 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2797 (print_annotation): New function.
2798 (print_element_value): Likewise.
2799 (indent): Likewise.
2800 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2801 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2802 (print_parameter_annotations): New function.
2803 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2804 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2805 Likewise.
2806 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2807 (print_annotations): New function.
2808
2809 2006-06-23 Tom Tromey <tromey@redhat.com>
2810
2811 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
2812 emitting class files, always use 1.5.
2813 * gcj.texi (Input Options): Document -fsource.
2814 (Code Generation): Document -ftarget.
2815
2816 2006-06-21 Tom Tromey <tromey@redhat.com>
2817
2818 PR java/28089:
2819 * expr.c (expand_java_field_op): Initialize field's declaring
2820 class.
2821
2822 2006-06-20 Tom Tromey <tromey@redhat.com>
2823
2824 * expr.c (push_value): Always flush quick stack.
2825
2826 2006-06-19 Tom Tromey <tromey@redhat.com>
2827
2828 * expr.c (push_value): Also flush quick stack if value is a
2829 component_ref.
2830
2831 2006-06-19 Tom Tromey <tromey@redhat.com>
2832
2833 * expr.c (push_value): Flush quick stack if value has side
2834 effects.
2835
2836 2006-06-13 Tom Tromey <tromey@redhat.com>
2837
2838 * class.c (is_compiled_class): Explicitly check for current
2839 class.
2840
2841 2006-06-09 Tom Tromey <tromey@redhat.com>
2842
2843 * gjavah.c (decompile_method): Don't decompile a static field
2844 accessor method.
2845
2846 2006-06-06 Tom Tromey <tromey@redhat.com>
2847
2848 * lang-specs.h <jc1>: Add .jar file to command line if
2849 -fsaw-java-file. Also, remove -ffilelist-file in this case.
2850
2851 2006-06-05 Tom Tromey <tromey@redhat.com>
2852
2853 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2854 synthetic, enum, annotation.
2855 * jcf.h (ACC_BRIDGE): New macro.
2856 (ACC_VARARGS): Likewise.
2857 (ACC_SYNTHETIC): Likewise.
2858 (ACC_ENUM): Likewise.
2859 (ACC_ANNOTATION): Likewise.
2860
2861 2006-06-04 Tom Tromey <tromey@redhat.com>
2862
2863 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2864 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2865 and -ftarget.
2866 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
2867 when needed. Handle classpath-setting.
2868 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2869 * lang-specs.h: Rewrote.
2870
2871 2006-06-04 Tom Tromey <tromey@redhat.com>
2872
2873 * jcf-io.c (find_class): Set source_ok to 0.
2874 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2875 (parse_class_file): Don't call java_mark_class_local.
2876 (java_parse_file): Skip .java files. Call java_mark_class_local
2877 before lowering any code.
2878 (parse_zip_file_entries): Don't call duplicate_class_warning
2879 here.
2880 (process_zip_dir): ... call it here.
2881 * class.c (add_field): Don't mark field external if it is being
2882 compiled into this object.
2883 (make_class_data): Handle situation where class_dtable_decl is
2884 created before Class is compiled.
2885 (is_compiled_class): Don't assume files in zip are compiled into
2886 this object.
2887 (layout_class_method): Don't mark method external if it is being
2888 compiled into this object.
2889
2890 2006-06-04 Tom Tromey <tromey@redhat.com>
2891
2892 * jcf-path.c (jcf_path_compute): New function.
2893 * jcf.h (jcf_path_compute): Declare.
2894
2895 2006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2896
2897 * decl.c: Include langhooks.h.
2898 (builtin_function): Remove.
2899 (java_init_decl_processing): Replace calls to builtin_function
2900 with add_builtin_function.
2901 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2902 (java/decl.o): Depend on langhooks.h.
2903 * java-tree.h (builtin_function): Remove.
2904
2905 2006-10-10 Brooks Moses <bmoses@stanford.edu>
2906
2907 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
2908
2909 2006-09-12 Tom Tromey <tromey@redhat.com>
2910
2911 * expr.c (push_value): Always flush quick stack.
2912
2913 2006-09-12 Tom Tromey <tromey@redhat.com>
2914
2915 PR java/29013:
2916 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
2917 the push of the called method's return result.
2918
2919 2006-09-12 Tom Tromey <tromey@redhat.com>
2920
2921 * jvspec.c (lang_specific_driver): Read spec file even if
2922 -fsyntax-only.
2923
2924 2006-09-12 Tom Tromey <tromey@redhat.com>
2925
2926 PR java/28754:
2927 * expr.c (expand_java_field_op): Initialize field's declaring
2928 interface if necessary.
2929
2930 2006-09-12 Tom Tromey <tromey@redhat.com>
2931
2932 PR java/28892:
2933 * expr.c (expand_java_field_op): No error for assignments not in
2934 class initializer or constructor.
2935
2936 2006-08-22 Andrew Haley <aph@redhat.com>
2937
2938 * decl.c (java_add_stmt): Give the statement list a type.
2939
2940 2006-08-16 Jakub Jelinek <jakub@redhat.com>
2941 Bryce McKinlay <bryce@mckinlay.net.nz>
2942
2943 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2944
2945 2006-08-10 Simon Martin <simartin@users.sourceforge.net>
2946
2947 PR java/8923
2948 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
2949 or '--' is used with a constant operand.
2950 (java_complete_lhs): When processing a '++' or '--' expression,
2951 don't call java_complete_tree but java_complete_lhs, so that a
2952 static final variable operand is never replaced by its value. This
2953 avoids an ICE later on.
2954 (patch_unaryop): Fixed typo in comment.
2955
2956 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2957
2958 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2959
2960 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2961
2962 * builtins.c (check_for_builtin): If a builtin could result in a
2963 direct call being generated, don't use it if flag_indirect_dispatch
2964 is set.
2965
2966 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2967
2968 * gcj.texi (Invocation): Corrections for Invocation API example.
2969
2970 2006-07-04 Andrew Haley <aph@redhat.com>
2971
2972 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
2973 entry.
2974
2975 2006-06-21 Andrew Haley <aph@redhat.com>
2976
2977 * java-tree.h (update_aliases): Remove
2978 * expr.c (expand_iinc): Remove call to update_aliases().
2979 (STORE_INTERNAL): Likewise.
2980 * decl.c (update_aliases, initialize_local_variable)
2981 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
2982
2983 2006-06-19 Andrew Haley <aph@redhat.com>
2984
2985 PR java/1305
2986 PR java/27908
2987 * expr.c (java_modify_addr_for_volatile): New function.
2988 (expand_java_field_op): Handle volatile fields.
2989 * java-gimplify.c (java_gimplify_component_ref): Call
2990 java_modify_addr_for_volatile to give the field_ref the correct
2991 volatile type.
2992 (java_gimplify_modify_expr): Likewise.
2993 * java-tree.h (java_modify_addr_for_volatile): New decl.
2994
2995 2006-06-17 Karl Berry <karl@gnu.org>
2996
2997 * gcj.texi (@dircategory): Use "Software development" instead
2998 of "Programming", following the Free Software Directory.
2999
3000 2006-06-16 Andrew Haley <aph@redhat.com>
3001
3002 * class.c (make_class_data): When using flag_indirect_classes,
3003 don't initialize the vtable of Class instances.
3004
3005 2006-06-09 Andrew Haley <aph@redhat.com>
3006
3007 PR java/1305
3008 PR java/27908
3009 * builtins.c (initialize_builtins): Add __sync_synchronize().
3010 * class.c (add_field): Mark volatile fields.
3011 * java-gimplify.c (java_gimplify_expr): Call new functions to
3012 handle self-modifying exprs and COMPONENT_REFs.
3013 (java_gimplify_component_ref): New.
3014 (java_gimplify_modify_expr): Add handling for volatiles.
3015
3016 2006-06-08 Tom Tromey <tromey@redhat.com>
3017
3018 * gcj.texi (libgcj Runtime Properties): Document
3019 gnu.gcj.user.realname.
3020
3021 2006-06-08 Andrew Haley <aph@redhat.com>
3022
3023 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
3024 get_symbol_table_index().
3025 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
3026 private method.
3027 (build_known_method_ref): New arg: special. Pass it to
3028 get_symbol_table_index.
3029 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
3030 the method list.
3031 (build_invokevirtual): New arg: special. Pass it to
3032 get_symbol_table_index.
3033 (expand_invoke): New variable: special.
3034 Pass it to maybe_rewrite_invocation().
3035 Pass it to build_known_method_ref().
3036 * class.c (build_symbol_entry): Add new arg: special. Use it to
3037 build the symbol table conbstructor.
3038 (emit_symbol_table): Extract SPECIAL from the method list and pass
3039 it to build_symbol_entry().
3040 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
3041 special accordingly.
3042
3043 2006-06-06 David Daney <ddaney@avtrex.com>
3044
3045 * gcj.texi (libgcj Runtime Properties): Document
3046 gnu.gcj.runtime.NameFinder.show_raw and
3047 gnu.gcj.runtime.NameFinder.remove_unknown.
3048
3049 2006-06-06 Tom Tromey <tromey@redhat.com>
3050
3051 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
3052 synthetic, enum, annotation.
3053 * jcf.h (ACC_BRIDGE): New macro.
3054 (ACC_VARARGS): Likewise.
3055 (ACC_SYNTHETIC): Likewise.
3056 (ACC_ENUM): Likewise.
3057 (ACC_ANNOTATION): Likewise.
3058
3059 2006-06-06 Mike Stump <mrs@apple.com>
3060
3061 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
3062 installing during build.
3063
3064 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
3065
3066 * gcj.texi (Extensions): Document the new gcj-dbtool-based
3067 classname-to-library resolution mechanism.
3068 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
3069 mechanism deprecated.
3070 (libgcj Runtime Properties): Document
3071 gnu.gcj.runtime.VMClassLoader.library_control's new default.
3072
3073 2006-05-29 Jakub Jelinek <jakub@redhat.com>
3074
3075 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
3076 bit wide type.
3077 (jword): Define to uint64 on 64-bit arches.
3078 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
3079
3080 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
3081
3082 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
3083 typos.
3084
3085 2006-05-26 Tom Tromey <tromey@redhat.com>
3086
3087 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
3088 * verify-glue.c (vfy_class_type): New function.
3089 * verify-impl.c (check_constant): Allow 'ldc class'.
3090 * verify.h (vfy_class_type): Declare.
3091
3092 2006-05-25 Andrew Haley <aph@redhat.com>
3093
3094 PR java/27756
3095 * decl.c (maybe_pushlevels): When variable ranges are non-nested
3096 update all lifetimes, not just the first one.
3097
3098 2006-05-24 Tom Tromey <tromey@redhat.com>
3099
3100 * java-tree.h: Fixed flag documentation.
3101
3102 2006-05-24 Tom Tromey <tromey@redhat.com>
3103
3104 PR libgcj/27729:
3105 * jcf.h (ACC_INVISIBLE): Changed value.
3106
3107 2006-05-24 Andrew Haley <aph@redhat.com>
3108
3109 PR java/27754
3110 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
3111 COMPOUND_EXPR.
3112
3113 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3114
3115 * lang.opt (femit-class-file): Remove VarExists.
3116
3117 2006-05-16 Tom Tromey <tromey@redhat.com>
3118
3119 * verify-impl.c (verify_instructions_0) <op_return>: Special case
3120 for Object.<init>.
3121
3122 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3123
3124 PR driver/26885
3125 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
3126 $(GCC_OBJS).
3127
3128 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
3129
3130 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
3131 (java/expr.o): Replace target.h with $(TARGET_H).
3132 (java/parse.o): Likewise.
3133
3134 2006-05-10 Andrew Haley <aph@redhat.com>
3135
3136 * class.c (emit_indirect_register_classes): Fix comment.
3137
3138 2006-05-04 Tom Tromey <tromey@redhat.com>
3139
3140 * java-tree.h (uses_jv_markobj_p): Declare.
3141 * class.c (uses_jv_markobj_p): Removed.
3142 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
3143 (get_boehm_type_descriptor): Use it.
3144 (uses_jv_markobj_p): Moved from class.c. Return bool.
3145
3146 2006-05-04 Tom Tromey <tromey@redhat.com>
3147
3148 * java-tree.def (THIS_EXPR): Now a tcc_expression.
3149
3150 2006-05-04 Andrew Haley <aph@redhat.com>
3151
3152 * class.c (make_field_value): Always build_address_of fdecl if
3153 there is an initializer.
3154
3155 2006-05-03 Andrew Haley <aph@redhat.com>
3156
3157 PR libgcj/27352
3158 * expr.c (maybe_rewrite_invocation): New function.
3159 (rewrite_arglist_getclass): Likewise.
3160 (rules): New.
3161 (expand_invoke): Call maybe_rewrite_invocation.
3162 * parse.y (patch_invoke): Likewise.
3163 * java-tree.h: (maybe_rewrite_invocation): New function.
3164
3165 2006-04-21 Andrew Haley <aph@redhat.com>
3166
3167 * lang.c (java_init): Handle flag_indirect_classes.
3168 * jvgenmain.c: Use "class$$" instead of "class$".
3169 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
3170 DECLs.
3171 (mangle_class_field): Special case "class$$" as well as "class$".
3172 * constants.c (build_ref_from_constant_pool): If
3173 flag_indirect_classes, generate a ref into the heap.
3174 * decl.c (constants_field_decl_node,
3175 constants_data_field_decl_node): New.
3176 * class.c (build_static_class_ref): New.
3177 (build_classdollar_field): Factor out from build_class_ref().
3178 (make_field_value): Handle static fields in heap.
3179 (make_class_data): Make sure we get a static ref to class.
3180 Make class initializer const if flag_indirect_classes.
3181 (register_class): Build a class_ref for initialization if
3182 flag_indirect_classes.
3183 (emit_indirect_register_classes): New.
3184
3185 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
3186
3187 * expr.c, gjavah.c: Fix comment typos.
3188
3189 2006-04-03 Andrew Haley <aph@redhat.com>
3190
3191 PR java/26858
3192 * expr.c (build_field_ref): Don't check the field offset if
3193 flag_syntax_only.
3194
3195 2006-03-30 Andrew Haley <aph@redhat.com>
3196
3197 PR java/26858
3198 * lang.c (java_attribute_table): New.
3199 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
3200 * expr.c (build_field_ref): Add a null pointer check for all
3201 fields of offset > 4k. Don't do so for accesses via the this
3202 pointer, which we know can never be null.
3203 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
3204 methods nonnull.
3205
3206 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
3207
3208 * Make-lang.in: Rename docdir to gcc_docdir.
3209
3210 2006-03-30 Tom Tromey <tromey@redhat.com>
3211
3212 PR java/26042:
3213 * parse.y (java_reorder_fields): Reset superclass field's size as
3214 well.
3215
3216 2006-03-28 Tom Tromey <tromey@redhat.com>
3217
3218 PR java/26390:
3219 * parse.y (find_most_specific_methods_list): Added 'class'
3220 argument.
3221 (lookup_method_invoke): Updated.
3222
3223 2006-03-15 Tom Tromey <tromey@redhat.com>
3224
3225 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
3226 non-static method calls.
3227
3228 2006-03-15 David Daney <ddaney@avtrex.com>
3229
3230 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
3231 declaration.
3232
3233 2006-03-15 David Daney <ddaney@avtrex.com>
3234
3235 * lang.opt (-freduced-reflection): New option.
3236 * lang.c (java_post_options): Generate an error if
3237 -freduced-reflection used with -fjni or -findirect-dispatch.
3238 * java-tree.h (flag_reduced_reflection): Declare new variable.
3239 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
3240 if bitmap overflows and flag_reduced_reflection set.
3241 * class.c (uses_jv_markobj_p): New function.
3242 (make_class_data): Moved generation of vtable to before
3243 reflection data, generate less reflection data if
3244 flag_reduced_reflection set.
3245 * gcj.texi: Document -freduced-reflection.
3246
3247 2006-03-15 Tom Tromey <tromey@redhat.com>
3248
3249 PR java/26638:
3250 * class.c (get_interface_method_index): Don't put <clinit> into
3251 interface table.
3252
3253 2006-03-15 Tom Tromey <tromey@redhat.com>
3254
3255 * parse.y (analyze_clinit_body): Ignore empty statements.
3256
3257 2006-03-08 David Daney <ddaney@avtrex.com>
3258
3259 * gcj.texi: Document -static-libgcj option.
3260
3261 2006-02-20 Andrew Haley <aph@redhat.com>
3262
3263 * jcf-parse.c (parse_class_file): Set input_location from
3264 current_class.
3265
3266 2006-02-15 Andrew Haley <aph@redhat.com>
3267
3268 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
3269 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
3270 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
3271
3272 2006-02-09 Andrew Haley <aph@redhat.com>
3273
3274 PR java/26192
3275 * expr.c (expand_invoke): Allow methods in arrays to be resolved
3276 in their superclass.
3277
3278 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
3279 array types.
3280
3281 2006-02-08 Tom Tromey <tromey@redhat.com>
3282
3283 PR java/22578:
3284 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
3285 * builtins.c (convert_real): New function.
3286 (java_builtins): Handle Float.intBitsToFloat,
3287 Float.floatToRawIntBits, Double.longBitsToDouble,
3288 Double.doubleToRawLongBits.
3289
3290 2006-02-07 Andrew Haley <aph@redhat.com>
3291
3292 * expr.c (expand_invoke): (BC mode.) If we find a method in a
3293 class other than the one in which we expected to find it, ignore
3294 the result.
3295
3296 PR java/25535
3297 * constants.c (build_constants_constructor): move initializer into
3298 first halfword on a 64-bit big-endian machine.
3299
3300 2006-02-04 Tom Tromey <tromey@redhat.com>
3301
3302 PR java/25676:
3303 * builtins.c (max_builtin): Skip floating point 'max'.
3304 (min_builtin): Skip floating point 'min'.
3305 (check_for_builtin): Never return NULL_TREE.
3306
3307 2006-02-04 Tom Tromey <tromey@redhat.com>
3308
3309 PR java/26097:
3310 * expr.c (push_type): Avoid side effect in gcc_assert.
3311
3312 2006-02-04 Roger Sayle <roger@eyesopen.com>
3313
3314 * decl.c (java_init_decl_processing): Create char_type_node as a
3315 regular INTEGER_TYPE node.
3316 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
3317 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
3318 test for char_type_node and promoted_char_type_node as special
3319 instances of INTEGER_TYPE tree codes.
3320 (promote_type,build_java_signature): Likewise.
3321 * jcf-write.c (adjust_typed_op): Likewise.
3322 * mangle.c (mangle_type): Likewise.
3323 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
3324 * parse.h (JINTEGRAL_TYPE_P): Likewise.
3325
3326 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
3327
3328 * expr.c (java_stack_swap): Revert gcc_assert patch.
3329
3330 2006-02-03 Ben Elliston <bje@au.ibm.com>
3331
3332 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
3333 * typeck.c: Likewise.
3334 * verify-impl.c: Likewise.
3335 * class.c: Likewise.
3336 * decl.c: Likewise.
3337 * jcf-parse.c: Likewise.
3338 * constants.c: Likewise.
3339 * check-init.c: Likewise.
3340 * jcf-write.c: Likewise.
3341 * verify-glue.c: Likewise.
3342 * mangle.c: Likewise.
3343 * expr.c: Likewise.
3344 * lang.c: Likewise.
3345 * boehm.c: Likewise.
3346
3347 2006-02-01 Jan Hubicka <jh@suse.cz>
3348
3349 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
3350 * lang.c (java_init_options): Set no_unit_at_a_time_default.
3351
3352 2006-01-30 Andrew Haley <aph@redhat.com>
3353
3354 PR java/21428
3355 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
3356
3357 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
3358
3359 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
3360 Update copyright notice dates.
3361
3362 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3363
3364 * jvspec.c (lang_specific_spec_functions): Remove.
3365
3366 2006-01-06 Tom Tromey <tromey@redhat.com>
3367
3368 * gcj.texi (Arrays): Added more documentation for
3369 JvNewObjectArray.
3370 (Primitive types): Correct information about primitive classes.
3371 (Reference types): New node.
3372 (Index): New node.
3373
3374 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
3375
3376 * jcf-parse.c (set_source_filename): Set the decl source location
3377 even when returning early.
3378
3379 2005-12-15 Tom Tromey <tromey@redhat.com>
3380 Andrew Haley <aph@redhat.com>
3381
3382 PR java/25429
3383 * parse.y (resolve_expression_name): Don't generate accessor
3384 methods for constant fields.
3385
3386 2005-12-13 Andrew Haley <aph@redhat.com>
3387
3388 PR java/25366
3389 PR java/25368
3390 * class.c (maybe_layout_super_class): Update current_class before
3391 calling do_resolve_class.
3392
3393 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
3394
3395 PR java/25330
3396 * jcf-write.c (write_classfile): Use PID in temporary class
3397 file. Save/restore errno when reporting error.
3398
3399 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
3400
3401 PR java/9861
3402 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
3403 to bare_function_type and including the return type
3404 * builtins.c (initialize_builtins) : Change builtin mangled name
3405 constants to conform to new mangling scheme
3406
3407 2005-12-08 Andrew Haley <aph@redhat.com>
3408
3409 PR libgcj/25265
3410 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
3411 (soft_abstractmethod_node): New.
3412 * expr.c (build_field_ref): Add in-line check for missing field.
3413 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
3414
3415 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3416
3417 * Make-lang.in (java.all.build, java.install-normal): Remove.
3418
3419 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3420
3421 * Make-lang.in: Remove all dependencies on s-gtype, except for
3422 gt-java-parse.h.
3423
3424 2005-12-07 Richard Sandiford <richard@codesourcery.com>
3425
3426 * class.c (build_utf8_ref, emit_register_classes): Use
3427 switch_to_section and get_section.
3428
3429 2005-12-06 Tom Tromey <tromey@redhat.com>
3430
3431 PR java/25283:
3432 * parse.y (patch_new_array_init): Revert previous patch.
3433 (lookup_method_invoke): Use size-less array type when creating an
3434 anonymous constructor.
3435
3436 2005-12-05 Tom Tromey <tromey@redhat.com>
3437
3438 * parse.y (patch_new_array_init): Don't set length on array.
3439
3440 2005-12-02 Richard Guenther <rguenther@suse.de>
3441
3442 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
3443 buildN instead of build.
3444 * class.c (finish_class): Likewise.
3445 * expr.c (java_create_object): Likewise.
3446
3447 2005-11-28 Tom Tromey <tromey@redhat.com>
3448
3449 PR java/18278:
3450 * expr.c (build_jni_stub): Unwrap the return value.
3451 * java-tree.h (soft_unwrapjni_node): New define.
3452 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
3453 * decl.c (java_init_decl_processing): Initialize
3454 soft_unwrapjni_node.
3455
3456 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
3457
3458 * gcj.texi (gij options): Add -Xss documentation.
3459
3460 2005-11-08 Wil Mahan <wmahan@gmail.com>
3461
3462 PR java/23617
3463 * zextract.c (read_zip_archive): Fix out of memory error when
3464 reading jar files with zip-style comments.
3465
3466 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
3467
3468 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
3469 formats.
3470 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
3471
3472 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
3473 Wil Mahan <wmahan@gmail.com>
3474
3475 PR java/23620
3476 * class.c (make_class): Create empty binfo here.
3477 (set_super_info): Only create binfo if we have superclasses.
3478
3479 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
3480
3481 PR java/24127
3482 * parse.y (method_header): Make the result of the rule a NULL_TREE
3483 when a parsing error occurs.
3484
3485 2005-09-29 Tom Tromey <tromey@redhat.com>
3486
3487 PR java/24120:
3488 * jcf-io.c (memoized_dirlist_hash): New function.
3489 (caching_stat): Use it.
3490
3491 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
3492
3493 PR java/21418
3494 * class.c (inherits_from_p): Try to lay out super class
3495 if it is not already laid out.
3496 (maybe_layout_super_class): Handle the case where SUPER_CLASS
3497 is a NULL_TREE.
3498
3499 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
3500
3501 * builtins.c (max_builtin, min_builtin, abs_builtin,
3502 java_build_function_call_expr): Use fold_buildN.
3503 * class.c (layout_class_method): Likewise.
3504 * expr.c (java_truthvalue_conversion, build_java_jsr,
3505 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3506 build_java_binop, build_field_ref, expand_compare,
3507 build_known_method_ref, build_invokevirtual,
3508 process_jvm_instruction): Likewise.
3509 * parse.y (patch_binop, patch_exit_expr): Likewise.
3510 * typeck.c (convert_ieee_real_to_integer): Likewise.
3511 (convert): Don't call fold after convert_ieee_real_to_integer.
3512
3513 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
3514
3515 PR java/23891
3516 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3517 the newly created type. Set import lists here, not in create_class.
3518 (jdep_resolve_class): Set current_class.
3519 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
3520 the current package context, not ctxp->package.
3521 (cicp_cache): Removed.
3522 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3523 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3524 * java-tree.h (TYPE_PACKAGE): New macro.
3525 (struct lang_type): New member 'package'.
3526
3527 2005-09-09 Andrew Haley <aph@redhat.com>
3528
3529 PR libgcj/23182
3530 * expr.c (pop_type_0): If the expected type is object or ptr
3531 (i.e. void*), return the type of the object we just popped from
3532 the stack.
3533
3534 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
3535
3536 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3537 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3538
3539 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
3540
3541 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3542 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3543 typos. Follow spelling conventions.
3544
3545 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
3546
3547 PR java/23431
3548 * typeck.c (lookup_do): Look up interfaces for the original class,
3549 not the base class.
3550 * parse.y (java_check_regular_methods): Fix diagnostic message for
3551 more restrictive overriding of a method from an interface.
3552
3553 2005-08-16 Tom Tromey <tromey@redhat.com>
3554
3555 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3556 class' initial state.
3557
3558 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3559
3560 PR java/22113
3561 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3562 `literal_token' for large numeric input tokens.
3563
3564 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3565
3566 PR java/19870
3567 * parse.y (nested_field_access_p): Rename to nested_member_access_p
3568 and expand to handle method accesses across nested classes.
3569 (build_outer_method_access_method): Rename to
3570 build_nested_method_access_method. Minor adjustments to comments.
3571 (resolve_expression_name): Use the newly-renamed
3572 nested_member_access_p method.
3573 (resolve_qualified_expression_name): Likewise.
3574 (patch_method_invocation): Also consider static methods for access
3575 method generation. Minor adjustments to comments.
3576 (maybe_use_access_method): Use the more general
3577 nested_memeber_access_p to determine access across nested class
3578 boundaries. Allow THIS_ARG to be NULL (for static methods).
3579
3580 2005-08-15 Tom Tromey <tromey@redhat.com>
3581
3582 PR java/23300.
3583 * expr.c (build_field_ref): Don't generate otable reference when
3584 DECL_FIELD_OFFSET is 0.
3585 * class.c (maybe_layout_super_class): Pass outer class to
3586 do_resolve_class.
3587
3588 2005-08-15 Tom Tromey <tromey@redhat.com>
3589
3590 * java-tree.h (LABEL_IN_SUBR): Removed.
3591 (LABEL_IN_SUBR): Likewise.
3592 (LABEL_IS_SUBR_START): Likewise.
3593 (LABEL_SUBR_START): Likewise.
3594 (LABEL_SUBR_CONTEXT): Likewise.
3595 (LABEL_CHANGED): Likewise.
3596 (LABEL_RETURN_LABEL): Likewise.
3597 (LABEL_RETURN_TYPE_STATE): Likewise.
3598 (LABEL_RETURN_LABELS): Likewise.
3599 (RETURN_MAP_ADJUSTED): Likewise.
3600 (LABEL_PENDING_CHAIN): Likewise.
3601
3602 2005-08-15 Tom Tromey <tromey@redhat.com>
3603
3604 * Make-lang.in (JAVA_OBJS): Removed verify.o
3605 (java/verify.o): Removed.
3606 * verify.c: Removed.
3607 * lang.c (flag_new_verifier): Removed.
3608 (java_post_options): Updated.
3609 * java-tree.h (flag_new_verifier): Removed.
3610 (verify_jvm_instructions): Removed.
3611 * expr.c (pop_type_0): Assume flag_new_verifier is true.
3612 (build_java_check_indexed_type): Likewise.
3613 (expand_java_arraystore): Likewise.
3614 (expand_java_arrayload): Likewise.
3615 (pop_arguments): Likewise.
3616 (expand_byte_code): Likewise.
3617 (process_jvm_instruction): Likewise.
3618
3619 2005-08-10 Andrew Haley <aph@redhat.com>
3620
3621 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3622 type mismatches to make legal GIMPLE.
3623
3624 2005-08-10 Robin Green <greenrd@greenrd.org>
3625
3626 PR java/23230:
3627 * parse.y (maybe_use_access_method): Generalize check from
3628 java.lang.Object to any superclass of current_class
3629
3630 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
3631
3632 * class.c (build_class_ref): Wrap the primary class type in a
3633 NOP_EXPR.
3634 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3635 primary class type from the NOP_EXPR in which it was placed.
3636
3637 2005-07-28 Diego Novillo <dnovillo@redhat.com>
3638
3639 * expr.c (expand_load_internal): Fix missing parens in
3640 predicate.
3641
3642 2005-07-28 Andrew Haley <aph@redhat.com>
3643
3644 * expr.c (expand_load_internal): Convert to destination type.
3645
3646 2005-07-22 Manfred Hollstein <mh@suse.com>
3647
3648 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3649 (check_constant): Likewise.
3650 (check_wide_constant): Likewise.
3651
3652 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
3653
3654 Make CONSTRUCTOR use VEC to store initializers.
3655 * check-init.c (check_init): Update to cope with VEC in
3656 CONSTRUCTOR_ELTS.
3657 * class.c (make_field_value, make_method_value, get_dispatch_table,
3658 make_class_data, emit_symbol_table, emit_catch_table,
3659 emit_assertion_table): Use build_constructor_from_list instead of
3660 build_constructor.
3661 * constants.c (build_constants_constructor): Likewise.
3662 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3663 VEC in CONSTRUCTOR_ELTS.
3664 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3665 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3666 of a TREE_LIST.
3667 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3668 CONSTRUCTOR_ELTS.
3669 * parse.y (build_new_array_init): Use build_constructor_from_list
3670 instead of build_constructor.
3671 (patch_new_array_init): Update to cope with VEC in
3672 CONSTRUCTOR_ELTS.
3673 (array_constructor_check_entry): Likewise.
3674
3675 2005-07-12 Tom Tromey <tromey@redhat.com>
3676
3677 * jvspec.c (lang_specific_driver): Put filelist_filename first on
3678 command line.
3679
3680 2005-07-12 Tom Tromey <tromey@redhat.com>
3681
3682 PR java/19674:
3683 * parse-scan.y (interface_member_declaration): Added
3684 empty_statement.
3685
3686 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
3687
3688 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3689 (LABEL_PENDING_CHAIN): Ditto.
3690 (LABEL_PC): Ditto.
3691 (DECL_BIT_INDEX): Ditto.
3692
3693 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3694
3695 PR java/18119
3696 * parse.y (inner_class_accessible): New function. Logic moved from
3697 check_inner_class_access.
3698 (check_inner_class_access): Use inner_class_accessible.
3699 (resolve_inner_class): Simplify arguments. Create circularity hash
3700 here. Keep looking for classes if we found one that was inaccessible.
3701 Return the inaccessible class only if there is no other match.
3702 (do_resolve_class): Update for new resolve_inner_class arguments.
3703 Don't create circularity_hash here.
3704
3705 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3706
3707 PR java/21045
3708 * parse.y (add_exception_to_throws): New function.
3709 (purge_unchecked_exceptions): Removed.
3710 (get_constructor_super): Renamed from verify_constructor_super. Now
3711 returns the super constructor after verification.
3712 (java_complete_expand_method): Don't use purge_unchecked_exceptions
3713 or save/restore the exception list.
3714 (check_thrown_exceptions): Add uncaught exceptions in anonymous
3715 class initializers and constructors to the throws clause of the method.
3716
3717 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
3718
3719 PR java/19674
3720 * parse.y (interface_member_declaration): Allow empty statements in
3721 interface declarations.
3722
3723 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
3724
3725 * Makefile.in (parse.o): Adjust dependencies.
3726 * parse.y: Include tree-dump.h.
3727
3728 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
3729
3730 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
3731 flag for quoting.
3732
3733 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
3734
3735 * parse.y (issue_warning_error_from_context): Call
3736 pp_output_formatted_text to be able to get the buffer.
3737
3738 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
3739
3740 * parse.y (issue_warning_error_from_context): Update for the
3741 renaming of pp_format_text to pp_format.
3742
3743 2005-06-28 Paul Brook <paul@codesourcery.com>
3744
3745 * decl.c (java_init_decl_processing): Call
3746 default_init_unwind_resume_libfunc.
3747
3748 2005-06-27 Tom Tromey <tromey@redhat.com>
3749
3750 PR java/21540, PR java/13788:
3751 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3752 fold_constant_for_init.
3753 (patch_binop): Added 'folding' argument. Updated all callers.
3754 (patch_unaryop) <NOP_EXPR>: New case.
3755 (fold_constant_for_init) <NOP_EXPR>: Likewise.
3756 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3757
3758 2005-06-25 Jan Hubicka <jh@suse.cz>
3759
3760 * builtins.c (define_builtin): Accept new flags parameter.
3761 (initialize_builtins): Mark the builtins const and nothrow accordingly.
3762
3763 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
3764
3765 * all files: Update FSF address in copyright headers.
3766
3767 2005-06-24 Tom Tromey <tromey@redhat.com>
3768
3769 * verify-impl.c (verify_instructions_0): Correctly handle
3770 situation where PC falls off end.
3771
3772 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
3773
3774 PR java/20697
3775 * parse.y (find_most_specific_methods_list): Remove special case for
3776 inner classes.
3777
3778 2005-06-15 Tom Tromey <tromey@redhat.com>
3779
3780 PR libgcj/21906:
3781 * class.c (make_method_value): Use soft_abstractmethod_node for
3782 abstract method.
3783 * java-tree.h (soft_abstractmethod_node): New define.
3784 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3785 * decl.c (java_init_decl_processing): Initialize
3786 soft_abstractmethod_node.
3787
3788 2005-06-13 Geoffrey Keating <geoffk@apple.com>
3789
3790 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3791
3792 2005-06-13 Per Bothner <per@bothner.com>
3793
3794 * expr.c (int highest_label_pc_this_method,
3795 start_label_pc_this_method): New globals.
3796 (lookup_label): Add start_label_pc_this_method to pc for label, and
3797 update highest_label_pc_this_method. This prevents conflicts between
3798 labels from different methods.
3799 * java-tree.h: Declare new globals.
3800 * jcf-parse.c (parse_class_file): If needed bump
3801 start_label_pc_this_method and reset highest_label_pc_this_method.
3802
3803 2005-06-13 Tom Tromey <tromey@redhat.com>
3804
3805 PR java/21844:
3806 * parse.y (nested_field_access_p): Handle case where outer field
3807 is inherited by enclosing class.
3808
3809 2005-06-12 Per Bothner <per@bothner.com>
3810
3811 * class.c (inherits_from_p): Do load_class if needed.
3812
3813 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3814
3815 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3816 * java-tree.h (parse_error_context): Move...
3817 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3818 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3819 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3820
3821 2005-06-08 Roger Sayle <roger@eyesopen.com>
3822
3823 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3824
3825 2005-06-06 Jakub Jelinek <jakub@redhat.com>
3826
3827 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3828 msgid for argument name.
3829 * gjavah.c (error): Likewise.
3830 * java-tree.h (parse_error_context): Likewise.
3831 * parse.y (parse_error_context, parse_warning_context,
3832 issue_warning_error_from_context): Likewise.
3833
3834 2005-06-01 Tom Tromey <tromey@redhat.com>
3835
3836 PR java/21722:
3837 * class.c (build_static_field_ref): Don't fold constant fields if
3838 current class is from a .class file and we're using indirect
3839 dispatch.
3840
3841 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3842
3843 * java/verify-glue.c: Don't include errors.h and include toplev.h.
3844 * java/Make-lang.in: Updates dependencies.
3845
3846 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
3847
3848 PR java/19870.
3849 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3850 NESTED_FIELD_ACCESS_IDENTIFIER_P.
3851 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3852 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3853 * jcf-write.c (generate_classfile): Use
3854 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3855 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3856 * parse.y (build_outer_field_access): Rename to
3857 build_nested_field_access. Support static fields and outer-to-inner
3858 class accesses.
3859 (outer_field_access_p): Rename to nested_field_access_p. Support
3860 static fields and generalise to outer-to-inner class and sibling
3861 inner class accesses.
3862 (outer_field_expanded_access_p): Rename to
3863 nested_field_expanded_access_p and support static fields.
3864 (outer_field_access_fix): Rename to nested_field_access_fix and
3865 support static fields.
3866 (build_outer_field_access_expr): Rename to
3867 build_nested_field_access_expr and support static fields.
3868 (build_outer_field_access_methods): Rename to
3869 build_nested_field_access_methods and support static fields. For
3870 static fields, generate accessors without class instance parameters.
3871 (build_outer_field_access_method): Rename to
3872 build_nested_field_access_method and support static fields.
3873 (build_outer_method_access_method): Use
3874 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3875 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3876 (resolve_expression_name): Consider static field accesses across
3877 nested classes.
3878 (resolve_qualified_expression_name): Likewise.
3879 (java_complete_lhs): Use nested_field_access_fix instead of
3880 outer_field_access_fix.
3881 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3882 Use nested_field_expanded_access_p instead of
3883 outer_field_expanded_access_p. Use nested_field_access_fix instead
3884 of outer_field_access_fix.
3885 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3886 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3887
3888 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
3889
3890 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
3891 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3892 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3893 MINOR_BINARYCOMPAT_ABI_VERSION): New.
3894 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3895 (parse_version): Calculate version ID using new method. Use bit-flags
3896 for flag_indirect_dispatch and flag_bootstrap_classes.
3897
3898 2005-05-25 Richard Henderson <rth@redhat.com>
3899
3900 PR libgcj/21692
3901 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3902 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3903 DECL_CONTEXT; avoid pushdecl_top_level.
3904 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
3905 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
3906 (layout_class_method): Likewise.
3907 * decl.c (java_mark_cni_decl_local): New.
3908 (java_mark_class_local): Use it.
3909 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
3910 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
3911 (struct lang_decl_func): Add local_cni;
3912 (struct lang_decl_var): Add class_field, vtable.
3913 (java_mangle_decl): Declare.
3914 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
3915 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
3916 (mangle_obstack_1): New.
3917 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
3918 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
3919 lhd_set_decl_assembler_name for things that don't need mangling.
3920 (mangle_class_field): Rename from java_mangle_class_field, make
3921 static, don't call init_mangling or finish_mangling.
3922 (mangle_vtable): Similarly.
3923 (mangle_local_cni_method_decl): New.
3924 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
3925 gcc_assert, and MANGLE_RAW_STRING.
3926 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
3927
3928 2005-05-25 DJ Delorie <dj@redhat.com>
3929
3930 * class.c (set_constant_value): Move warning control from if() to
3931 warning(OPT_*).
3932
3933 2005-05-24 Richard Henderson <rth@redhat.com>
3934
3935 * builtins.c (define_builtin): Don't call make_decl_rtl.
3936 * constants.c (build_constant_data_ref): Likewise.
3937 * class.c (build_utf8_ref): Likewise.
3938 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
3939 (get_dispatch_table, layout_class_method): Likewise.
3940 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
3941 by hand.
3942 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
3943 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
3944 to determine if we need a non-zero address.
3945 * decl.c (builtin_function): Don't call make_decl_rtl.
3946 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
3947 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
3948 * resource.c (compile_resource_data): Likewise.
3949 * parse.y (resolve_field_access): Re-word comment to avoid
3950 building DECL_RTL.
3951
3952 2005-05-24 Richard Henderson <rth@redhat.com>
3953
3954 * class.c (registered_class): Take it out of class_roots; turn into
3955 a vec of trees.
3956 (register_class): Make static. Don't duplicate decl node. Use
3957 VEC_safe_push.
3958 (emit_register_classes): Use VEC_iterate. Use output_constant
3959 instead of assemble_integer. Don't call mark_decl_referenced
3960 directly.
3961 * java-tree.h (register_class): Remove decl.
3962
3963 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
3964
3965 PR java/17845
3966
3967 * parse.y (register_package, package_list): Remove.
3968 (package_declaration): Do not call register_package.
3969 (do_resolve_class): Do not use package_list.
3970
3971 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
3972
3973 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
3974 unused variable.
3975
3976 2005-05-15 Tom Tromey <tromey@redhat.com>
3977
3978 PR java/21519:
3979 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
3980 NOTE_PUSH.
3981
3982 2005-05-12 Aaron Luchko <aluchko@redhat.com>
3983
3984 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
3985
3986 2005-05-11 Tom Tromey <tromey@redhat.com>
3987
3988 * gcj.texi (Code Generation): Document -fbootstrap-classes.
3989 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
3990 (parse_version): Use it.
3991 * lang.opt (-fbootstrap-classes): New option.
3992
3993 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
3994
3995 PR java/21436
3996 * class.c (maybe_layout_super_class): Look for imports in this_class.
3997 * parse.h (ctxp_for_generation_last): New.
3998 (do_resolve_class): Add a parameter.
3999 * parse.y (ctxp_for_generation_last): New.
4000 (java_pop_parser_context): Add at end of list.
4001 (find_in_imports, find_in_imports_on_demand): Look in ctxp
4002 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
4003 the given type are NULL.
4004 (do_resolve_class): Look into the imports of the new second parameter.
4005 Adjust recursive calls.
4006 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
4007 calls to do_resolve_class.
4008 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
4009 (java_complete_class): Do not do that here.
4010
4011 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
4012
4013 PR java/20309
4014 * Make-lang.in (java): Add gjnih.
4015 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
4016 (GJNIH_OBJS): New variable.
4017 (gjnih$(exeext)): New target.
4018 (JAVA_MANFILES): Add gjnih.1.
4019 (java.uninstall): Add gjnih.1.
4020 (java.mostlyclean): Add gjnih.
4021 (java.maintainer-clean): Add gjnih.1.
4022 (java/gjavah-jni.o): New target.
4023 (.INTERMEDIATE): Add gjnih.pod.
4024 (gjnih.pod): New target.
4025 * config-lang.in (stagestuff): Add gjnih.
4026 * gcj.texi (Top): Add gjnih node.
4027 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
4028 -bootclasspath options.
4029 (Invoking gjnih): New node.
4030 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
4031 (TOOLNAME): New macro.
4032 (error): Replace hard-coded gcjh with TOOLNAME.
4033 (process_file): Likewise.
4034 (usage): Likewise.
4035 (version): Likewise.
4036 (help): Likewise. Add help output for -force, -old, -trace and -J
4037 options.
4038 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
4039 (options): Add force, old, trace and J fields.
4040 (main): Handle -force, -old, -trace and -J options.
4041
4042 2005-05-03 Tom Tromey <tromey@redhat.com>
4043
4044 PR java/21245:
4045 * gjavah.c (main): Unlink output file on error.
4046
4047 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
4048
4049 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
4050 copyright.
4051
4052 2005-04-29 Tom Tromey <tromey@redhat.com>
4053
4054 * expr.c (build_jni_stub): Updated for change to build_block.
4055
4056 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
4057
4058 * expr.c (force_evaluation_order): Declare 'saved' earlier.
4059
4060 2005-04-28 Andrew Haley <aph@redhat.com>
4061
4062 PR java/19285
4063 * java-tree.h (soft_resolvepoolentry_node): New.
4064 (alloc_constant_fieldref): Declare.
4065 * expr.c (expand_java_field_op): Don't call class_init for
4066 accesses to static fields with indirect dispatch.
4067 * builtins.c (initialize_builtins): Add "__builtin_expect".
4068 * decl.c (soft_resolvepoolentry_node): New variable.
4069 (java_init_decl_processing): Create a decl for
4070 "_Jv_ResolvePoolEntry".
4071 * class.c (build_fieldref_cache_entry): New function.
4072 (build_static_field_ref): Rewrite for indirect dispatch.
4073 * constants.c (find_name_and_type_constant_tree): New function.
4074 (alloc_constant_fieldref): Likewise.
4075 (build_constants_constructor): Handle CONSTANT_Fieldref and
4076 CONSTANT_NameAndType.
4077
4078 PR java/21115
4079 * expr.c (force_evaluation_order): Convert outgoing args smaller
4080 than integer.
4081
4082 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
4083
4084 * gcj.texi (libgcj Runtime Properties): Remove obsolete
4085 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
4086 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
4087
4088 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4089
4090 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
4091 to `unlock_stream' with `unlock_std_streams'.
4092
4093 2005-04-25 Jakub Jelinek <jakub@redhat.com>
4094
4095 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
4096 instead of just expr.h.
4097
4098 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4099
4100 * gjavah.c (main): Unlock the stdio streams.
4101 * jcf-dump.c (main): Likewise.
4102 * jv-scan.c (main): Likewise.
4103 * jvgenmain.c (main): Likewise.
4104
4105 2005-04-23 DJ Delorie <dj@redhat.com>
4106
4107 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
4108 parse.y: Adjust warning() callers.
4109
4110 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
4111
4112 * gcj.texi (Object fields): Change "Integer" to "Int" in example
4113 contructor.
4114
4115 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
4116
4117 * gcj.texi: Fix typos and bogus example.
4118
4119 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
4120
4121 * except.c: Fix a comment typo.
4122
4123 2005-04-19 Julian Brown <julian@codesourcery.com>
4124
4125 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
4126 indirect dispatch with PIC.
4127
4128 2005-04-18 Andrew Haley <aph@redhat.com>
4129
4130 * java-except.h (struct eh_range.handler): Remove unused field.
4131 (handle_nested_ranges): Remove function declaration.
4132 (sanity_check_exception_range): Add function declaration.
4133 * verify.c (verify_jvm_instructions): Remove call to
4134 handle_nested_ranges.
4135 * verify-glue.c (verify_jvm_instructions_new): Call
4136 sanity_check_exception_range.
4137 * except.c (link_handler, eh_range_freelist, link_handler,
4138 handle_nested_ranges): Remove.
4139 (add_handler): Rewrite.
4140 (sanity_check_exception_range): New function.
4141 (print_ranges): New function.
4142
4143 2005-04-13 Julian Brown <julian@codesourcery.com>
4144
4145 * decl.c (finish_method): Give methods once-only linkage.
4146
4147 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
4148
4149 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
4150
4151 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4152
4153 * java-tree.h: Don't use PARAMS().
4154
4155 2005-04-07 Per Bothner <per@bothner.com>
4156
4157 * class.c (push_class): By default, suppress debug output.
4158 (finish_class): Enable debug output for classes we're emitting.
4159
4160 2005-04-07 Andrew Haley <aph@redhat.com>
4161
4162 * gcj.texi: Correct gcj-dbtool instructions.
4163
4164 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
4165
4166 * gcj.texi: Fix a typo.
4167 * lang.c: Fix a comment typo.
4168
4169 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
4170
4171 * gcj.texi (Invoking gij): Add descriptions of new -X options.
4172 Mention recognized-and-ignored compatibility options.
4173 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
4174 JvFree.
4175 (About CNI): Add Memory allocation section.
4176
4177 2005-04-01 Tom Tromey <tromey@redhat.com>
4178
4179 * decl.c (java_init_decl_processing): Fix types of
4180 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
4181 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
4182 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
4183
4184 2005-03-31 Jan Hubicka <jh@suse.cz>
4185
4186 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
4187 * class.c: Include cgraph.h
4188 (make_local_functoin_alias): Mark aslias as needed.
4189 * resource.c: Include cgraph.h
4190 (compile_resource_data): Go via cgraph interface.
4191
4192 2005-03-30 Ian Lance Taylor <ian@airs.com>
4193
4194 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
4195
4196 2005-03-30 Tom Tromey <tromey@redhat.com>
4197
4198 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
4199 inner_class_info_index==0 or outer_class_info_index==0.
4200
4201 2005-03-29 Tom Tromey <tromey@redhat.com>
4202
4203 * gcj.texi (libgcj Runtime Properties): Document
4204 gnu.gcj.runtime.endorsed.dirs.
4205
4206 2005-03-24 Anthony Green <green@redhat.com>
4207
4208 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
4209 'gcj-dbtool -p'.
4210
4211 2005-03-23 Tom Tromey <tromey@redhat.com>
4212
4213 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
4214 (parse_version): Use it.
4215
4216 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
4217
4218 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
4219
4220 2005-03-18 Andrew Haley <aph@redhat.com>
4221
4222 PR java/20522
4223 * decl.c (update_aliases): Don't update variables that are about
4224 to die.
4225 (maybe_poplevels): Add comment.
4226
4227 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
4228
4229 PR java/20502
4230 * jcf-parse.c (duplicate_class_warning): New function.
4231 (java_parse_file): Call duplicate_class_warning if
4232 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
4233 (parse_zip_file_entries): Likewise. Also set
4234 CLASS_FROM_CURRENTLY_COMPILED_P.
4235
4236 2005-03-16 Andrew Haley <aph@redhat.com>
4237
4238 * expr.c (expand_java_arrayload): Don't generate a
4239 NullPointerException based on the type of the node.
4240 (build_java_array_length_access): Likewise.
4241
4242 2005-03-15 Zack Weinberg <zack@codesourcery.com>
4243
4244 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
4245
4246 2005-03-11 Tom Tromey <tromey@redhat.com>
4247
4248 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
4249 (libgcj Runtime Properties): Document the default .db.
4250
4251 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
4252
4253 PR java/20312
4254 * parse.y (checks_throws_clauses): Check exceptions list even when
4255 the base class does not come from a source file being compiled.
4256 (java_complete_lhs): Remove unused variable 'wfl'.
4257
4258 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
4259
4260 PR java/20338
4261 * decl.c (finish_method): Emit _Jv_InitClass for private static
4262 methods inside inner classes as well.
4263
4264 2005-03-08 Julian Brown <julian@codesourcery.com>
4265 * Revert patch from 2005-03-08 for causing bootstrap failure on
4266 ppc-darwin.
4267
4268 2005-03-08 Julian Brown <julian@codesourcery.com>
4269
4270 * decl.c (finish_method): Give methods once-only linkage.
4271
4272 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
4273
4274 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
4275
4276 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
4277
4278 * verify-glue.c (vfy_is_assignable_from): Perform static check using
4279 can_widen_reference_to if the C++ ABI is in use.
4280 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
4281 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
4282 type_isresolved, init_state, set_pc, state_get_pc,
4283 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
4284 (verify_fail): Report the current PC from the verifier context.
4285 (free_state): Remove #if 0 block to enable this function.
4286 (free_verifier_context): Call free_state on state_list iterator
4287 values before freeing them.
4288 * expr.c (pop_type_0): Pop correct type for error message when stack
4289 contains a multi-word type.
4290
4291 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
4292
4293 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
4294 for known NULL array length access.
4295
4296 2005-03-07 Tom Tromey <tromey@redhat.com>
4297
4298 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
4299
4300 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
4301
4302 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
4303 typeck.c: Update copyright.
4304
4305 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
4306
4307 Remove xref code.
4308 * xref.c, xref.h: Remove file.
4309 * Make-lang.in (java/xref.o): Remove.
4310 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
4311 * lang.c (flag_emit_xref): Remove definition.
4312 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
4313 * typeck.c (convert): Remove use of do_not_fold.
4314 * parse.y (do_not_fold): Remove definition.
4315 (parser grammar): Remove xref code.
4316 (maybe_create_class_interface_decl, create_class): Likewise.
4317 (register_fields, method_header, finish_method_declaration): Likewise.
4318 (declare_local_variables, source_end_java_method): Likewise.
4319 (java_complete_expand_classes): Do not set do_not_fold.
4320 (java_complete_expand_method): Remove xref code.
4321 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
4322 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
4323 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
4324 (patch_synchronized_statement, patch_throw_statement): Likewise.
4325 (maybe_build_class_init_for_field): Likewise.
4326
4327 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
4328
4329 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
4330 instead of IS_NON_TYPE_CODE_CLASS.
4331
4332 2005-03-04 Andrew Haley <aph@redhat.com>
4333
4334 PR java/18362
4335 * class.c (set_method_index): Don't set method_index if it is
4336 NULL_TREE.
4337 (layout_class_method): Don't complain about "non-static method foo
4338 overrides static method" in the case of indirect dispatch.
4339
4340 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4341
4342 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
4343 warning.
4344 * Make-lang.in: Don't elide warnings in jcf-io.c.
4345
4346 2005-03-01 Per Bothner <per@bothner.com>
4347
4348 PR java/8608
4349 * check-init.c (wfl): Remove static.
4350 (final_assign_error, check_init): Replace calls to parse_error_context
4351 by plain error.
4352 (check_init): Save, set, and restore input_location for each exp.
4353
4354 2005-03-01 Per Bothner <per@bothner.com>
4355
4356 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
4357 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
4358 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
4359
4360 2005-03-01 Per Bothner <per@bothner.com>
4361
4362 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
4363
4364 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
4365
4366 PR libgcj/16923
4367 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
4368 JvVMOption.
4369
4370 2005-02-22 Tom Tromey <tromey@redhat.com>
4371
4372 PR java/20056:
4373 * verify-impl.c (EITHER): New define.
4374 (types_compatible): Handle it.
4375 (check_field_constant): Use it.
4376
4377 2005-02-18 Tom Tromey <tromey@redhat.com>
4378
4379 PR java/20056:
4380 * verify-impl.c (types_equal): Fixed test.
4381
4382 PR java/20056:
4383 * verify-glue.c (vfy_class_has_field): New function.
4384 * verify.h (vfy_class_has_field): Declare.
4385 * verify-impl.c (check_field_constant): Added 'putfield'
4386 argument.
4387 (verify_instructions_0): Updated.
4388 (types_equal): New function.
4389
4390 2005-02-14 Tom Tromey <tromey@redhat.com>
4391
4392 PR java/19921:
4393 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
4394 stack effect of multianewarray.
4395
4396 2005-02-14 Andrew Haley <aph@redhat.com>
4397
4398 PR java/19907
4399 * expr.c (expand_byte_code): Call promote_arguments().
4400 (promote_arguments): New function.
4401 * decl.c (check_local_unnamed_variable): Remove special case for
4402 new verifier.
4403 (find_local_variable): Promote all boolean types to int
4404 when searching for local variable decls.
4405
4406 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
4407
4408 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
4409 parse-scan.y: Update copyright.
4410
4411 2005-02-11 Per Bothner <per@bothner.com>
4412
4413 PR java/15543
4414 * parse-scan.y (input_location): Remove variable.
4415 (main_input_filename): New - replaces input_filename, which isn't
4416 settable if USE_MAPPED_LOCATION.
4417 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
4418 so we don't reference input_location or wfl_operator in that case.
4419 * jv-scan.c (expand_location): Remove - no longer used.
4420 (main): Set main_input_filename rather than input_filename.
4421
4422 2005-02-09 Richard Henderson <rth@redhat.com>
4423
4424 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
4425 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
4426
4427 2005-02-08 Marcin Dalecki <martin@dalecki.de>
4428
4429 * expr.c (add_type_assertion): Use the proper enumeration type,
4430 since this is what htab_find_slot() is expecting.
4431
4432 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
4433
4434 * gcj.texi: Update copyright dates.
4435
4436 2005-02-02 Tom Tromey <tromey@redhat.com>
4437
4438 * gcj.texi (libgcj Runtime Properties): Default library_control
4439 to 'cache'.
4440
4441 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
4442
4443 PR java/15543
4444 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
4445 (modifiers) when square brackets are present in a declaration for
4446 a final paramter.
4447 * jv-scan.c (main): Set input_filename and input_line.
4448
4449 2005-02-01 Tom Tromey <tromey@redhat.com>
4450
4451 PR java/19742:
4452 * gjavah.c (get_field_name): Don't override name for JNI header.
4453
4454 2005-02-01 Roger Sayle <roger@eyesopen.com>
4455
4456 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
4457 of unsigned types using iushr and lushr JVM bytecodes.
4458
4459 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
4460
4461 PR java/19738
4462 * gjavah.c (jni_print_float): Do not emit floating-point
4463 initialiser for a static final field.
4464 (jni_print_double): Likewise.
4465
4466 2005-02-01 Mark Mitchell <mark@codesourcery.com>
4467
4468 Revert:
4469 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4470 * gjavah.c (print_field_info): Mark static data members of
4471 floating-point type with "__extension__".
4472
4473 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4474
4475 * gjavah.c (print_field_info): Mark static data members of
4476 floating-point type with "__extension__".
4477
4478 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
4479
4480 PR java/9157
4481 * parse.y (build_string_concatenation): Remove redundant if.
4482 (patch_conditional_expr): Attempt to patch_string() the condition
4483 of a ?: as well, in addition to its other operands.
4484
4485 2005-01-25 Tom Tromey <tromey@redhat.com>
4486
4487 * Make-lang.in (java/java-tree-inline.o): Removed.
4488
4489 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
4490
4491 PR java/19070
4492 * parse.y (patch_binop): Allow comparisons against NULL only
4493 if the other operand is of a reference type.
4494
4495 2005-01-24 Tom Tromey <tromey@redhat.com>
4496
4497 * java-tree.h (gcj_abi_version): Declare.
4498 * class.c (make_class_data): Push gcj_abi_version into "next"
4499 field. Renamed field.
4500 * decl.c (gcj_abi_version): New global.
4501 (parse_version): New function.
4502 (java_init_decl_processing): Call it. Renamed 'next' field.
4503 Include version.h.
4504 (GCJ_BINARYCOMPAT_ADDITION): New define.
4505
4506 2005-01-24 Roger Sayle <roger@eyesopen.com>
4507
4508 PR java/19295
4509 * jcf-write.c (generate_bytecode_insns): Conversions between
4510 integer types of the same precision shouldn't generate widening
4511 or narrowing conversion bytecodes.
4512
4513 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
4514
4515 * java-except.h, java-tree.h: Remove unused prototypes.
4516
4517 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
4518
4519 PR java/18091:
4520 * jcf-write.c (perform_relocations): Don't call memcpy if source
4521 and destination are the same.
4522
4523 2005-01-17 Tom Tromey <tromey@redhat.com>
4524
4525 * verify-impl.c (get_short): Sign extend.
4526 (get_int): Likewise.
4527
4528 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
4529
4530 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4531 with TYPE_SIZE.
4532
4533 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4534
4535 * verify.c: Revert to the version before the BC-ABI merge.
4536
4537 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4538
4539 PR java/19277
4540 * check-init.c (check_init): Take care of references that do not
4541 have an explicit final variable declaration (e.g. array length
4542 access) for pre/post in/de-crement operators.
4543
4544 2005-01-08 Mark Wielaard <mark@klomp.org>
4545
4546 * parse.y (process_imports): Allocate (and free) original_name only
4547 when not already defined.
4548 * jcf-parse.c (read_class): Free results of find_class() and
4549 lrealpath().
4550 (java_parse_file): Keep pointer to head of file_list and free when
4551 done. Free result of lrealpath().
4552
4553 2005-01-05 Tom Tromey <tromey@redhat.com>
4554
4555 * gcj.texi (Standard Properties): java.ext.dirs is now used.
4556
4557 2004-12-20 Andrew Haley <aph@redhat.com>
4558
4559 * typeck.c: Use fold_convert for ints and booleans.
4560
4561 2004-12-17 Andrew Haley <aph@redhat.com>
4562
4563 PR java/18931
4564 * typeck.c (convert): Use a CONVERT_EXPR when converting to
4565 BOOLEAN_TYPE or CHAR_TYPE.
4566 (convert_to_boolean, convert_to_char) : Remove.
4567 * convert.h (convert_to_boolean, convert_to_char) : Remove.
4568 * expr.c (expand_load_internal): Do type conversion if type is not
4569 as required.
4570
4571 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
4572
4573 PR target/18459
4574 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4575 Update comment.
4576
4577 2004-12-07 Andrew Haley <aph@redhat.com>
4578
4579 PR java/18811:
4580 * jcf-parse.c (load_class): Remove sanity test for missing inner
4581 class file.
4582
4583 2004-12-06 Tom Tromey <tromey@redhat.com>
4584
4585 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4586 (java.uninstall): Likewise.
4587 (java.maintainer-clean): Likewise.
4588 (.INTERMEDIATE): Likewise.
4589 (java.install-man): Likewise.
4590 (gcj-dbtool.pod): New target.
4591 * gcj.texi (Code Generation): Document -findirect-dispatch.
4592 (libgcj Runtime Properties): Document
4593 gnu.gcj.precompiled.db.path.
4594 (Top): Link to "Invoking gcj-dbtool".
4595
4596 2004-12-06 Tom Tromey <tromey@redhat.com>
4597
4598 PR java/14853:
4599 * java-tree.h (extract_field_decl): Declare.
4600 * parse.y (extract_field_decl): Renamed from
4601 strip_out_static_field_access_decl. No longer static.
4602 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4603
4604 2004-12-03 Tom Tromey <tromey@redhat.com>
4605
4606 * lang.c (flag_new_verifier): Define.
4607 (java_post_options): Set flag_new_verifier if indirect dispatch
4608 is being used.
4609 * lang.opt (fnew-verifier): Removed.
4610
4611 2004-12-03 Tom Tromey <tromey@redhat.com>
4612
4613 PR bootstrap/14614:
4614 * Make-lang.in (java.install-common): Only install transformed
4615 gcjh if gcj-cross exists.
4616
4617 2004-12-03 Andrew Haley <aph@redhat.com>
4618
4619 PR java/18812
4620 * except.c (link_handler): Patch 'outer' field of siblings of the
4621 range we're demoting.
4622
4623 2004-12-03 Andrew Haley <aph@redhat.com>
4624
4625 PR java/18697
4626 * class.c (layout_class_method): Don't fail to override a method
4627 simply because it has DECL_ARTIFICIAL set.
4628
4629 2004-12-02 Tom Tromey <tromey@redhat.com>
4630
4631 PR java/16675:
4632 * parse.y (craft_constructor): Special case null_pointer_node.
4633
4634 2004-12-02 Tom Tromey <tromey@redhat.com>
4635
4636 PR java/18741:
4637 * java-gimplify.c (java_gimplify_expr): Don't call
4638 SET_EXPR_LOCATION unless wrapped tree is an expression.
4639
4640 2004-11-27 Per Bothner <per@bothner.com>
4641
4642 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
4643 Fix fencepost error in 'i', which got executed one too many times.
4644 Also, fold memcpy into explicit loop, as originally intended.
4645 Also, free temporary 'buf' which otherwise leaks.
4646
4647 2004-11-27 Per Bothner <per@bothner.com>
4648
4649 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4650 local static variables if not USE_MAPPED_LOCATION.
4651
4652 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
4653
4654 * class.c, decl.c, expr.c: Fix comment typos.
4655
4656 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
4657
4658 PR java/18305
4659 * decl.c (end_java_method): Call
4660 attach_init_test_initialization_flags on all the init_decls.
4661 * parse.y (attach_init_test_initialization_flags): Move to ...
4662 * expr.c (attach_init_test_initialization_flags): here and
4663 support BIND_EXPR also.
4664 * java-tree.h (attach_init_test_initialization_flags): Prototype.
4665 * jcf-parse.c (parse_class_file): Don't disable class init
4666 optimization.
4667
4668 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
4669
4670 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4671 in diagnostics.
4672
4673 2004-11-24 Richard Henderson <rth@redhat.com>
4674
4675 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4676 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4677
4678 2004-11-24 Tom Tromey <tromey@redhat.com>
4679
4680 * verify.c (defer_merging): Don't use C++-style comment.
4681 * verify.h (java_opcode): Added java_opcode_end.
4682 * class.c (build_class_ref): Remove C++ comment and old FIXME.
4683
4684 * verify-impl.c (vfy_push_type): Removed bogus "return".
4685 (initialize_stack): Use vfy_alloc and vfy_free.
4686 (verify_instructions_0): Likewise.
4687
4688 * Merged gcj-abi-2-dev-branch to trunk.
4689
4690 2004-11-24 Andrew Haley <aph@redhat.com>
4691
4692 * jcf-parse.c (parse_class_file): Set file_start_location.
4693
4694 2004-11-10 Tom Tromey <tromey@redhat.com>
4695
4696 * class.c (make_field_value): Don't call build_static_field_ref.
4697 (build_static_field_ref): Don't emit direct references when using
4698 indirect dispatch.
4699
4700 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
4701 -verbose:class into man page synopsis.
4702
4703 2004-11-09 Tom Tromey <tromey@redhat.com>
4704
4705 * expr.c (build_java_arraystore_check): Still generate check if
4706 element type is itself an array.
4707
4708 2004-11-08 Tom Tromey <tromey@redhat.com>
4709
4710 * java-tree.h (soft_check_assignment_node): Removed.
4711 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4712 * decl.c (java_init_decl_processing): Don't initialize
4713 soft_check_assignment_node.
4714
4715 2004-11-05 Tom Tromey <tromey@redhat.com>
4716
4717 * class.c (layout_class_methods): Don't add Miranda methods when
4718 using indirect dispatch.
4719
4720 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
4721
4722 * class.c (make_class_data): Call emit_assertion_table to set the
4723 'assertion_table' field.
4724 (build_signature_for_libgcj): Move here from expr.c.
4725 (add_assertion_table_entry): New function. Callback for assertion
4726 hashtable traversal.
4727 (emit_assertion_table): New. Take class argument, and generate
4728 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4729 * decl.c (init_decl_processing): Define assertion_entry_type record.
4730 Push 'assertion_table' class field instead of 'verify'.
4731 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4732 (type_assertion_hash): Include 'assertion_code' in hash.
4733 (add_type_assertion): Rewritten. Take class and assertion_code
4734 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4735 (can_widen_reference_to): Use new add_type_assertion() arguments.
4736 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4737 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4738 (verify_identifier_node): Removed.
4739 (assertion_entry_type, assertion_table_type): New.
4740 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4741 assertion code definitions.
4742 (struct type_assertion): Add assertion_code. Rename 'source_type' and
4743 'target_type' to 'op1' and 'op2'.
4744 (add_type_assertion): Declare.
4745 (lang_printable_name_wls): Remove unused definition.
4746 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4747 to emit runtime assertion.
4748 (vfy_note_stack_type): Clean up non-C90 declarations.
4749 (vfy_note_local_type): Likewise.
4750 * verify.h (vfy_is_assignable_from): Declare.
4751 * verify-impl.c (is_assignable_from_slow): Remove unused function.
4752 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4753 instead of is_assignable_from_slow().
4754 (types_compatible): Reinstate ref_compatible() call.
4755
4756 2004-11-04 Tom Tromey <tromey@redhat.com>
4757
4758 * class.c (build_static_field_ref): Reverted previous patch.
4759
4760 * class.c (build_static_field_ref): Don't emit direct references
4761 when using indirect dispatch.
4762
4763 2004-11-03 Tom Tromey <tromey@redhat.com>
4764
4765 * expr.c (expand_java_arrayload): Set lhs_type_node.
4766 (expand_java_arraystore): Set rhs_type_node.
4767
4768 2004-11-02 Tom Tromey <tromey@redhat.com>
4769
4770 * jcf-parse.c (compute_class_name): Use filename length from zip
4771 directory, not strlen.
4772
4773 * expr.c (expand_invoke): Mark new interface methods as abstract.
4774
4775 2004-11-01 Tom Tromey <tromey@redhat.com>
4776
4777 * verify-impl.c (push_jump): Removed check for uninitialized
4778 objects.
4779 (push_exception_jump): Likewise.
4780 (handle_ret_insn): Likewise.
4781 (handle_jsr_insn): Likewise.
4782 (state_check_no_uninitialized_objects): Removed.
4783
4784 * decl.c (check_local_unnamed_variable): Recognize
4785 promoted-to-int parameters when using the new verifier.
4786 * expr.c (expand_java_arraystore): Explicitly request array type
4787 when using new verifier.
4788 (expand_java_arrayload): Likewise.
4789 (invoke_build_dtable): Don't pass object_type_node as
4790 expression argument to build_java_indirect_ref.
4791 (build_java_check_indexed_type): Do nothing.
4792 (build_java_arraystore_check): Handle case where array doesn't
4793 have array type.
4794 (build_java_array_length_access): Likewise.
4795 (expand_invoke): Handle case where interface overrides a method
4796 from Object.
4797 (pop_type_0): Always succeed for reference types.
4798 (process_jvm_instruction): Don't pop a value in a dead
4799 exception handler.
4800 (pop_arguments): Convert arguments to correct types.
4801
4802 2004-10-29 Andrew Haley <aph@redhat.com>
4803
4804 * jcf-parse.c (give_name_to_class): Remove line that was
4805 incorrectly merged.
4806
4807 2004-10-29 Andrew Haley <aph@redhat.com>
4808
4809 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4810
4811 2004-10-20 Andrew Haley <aph@redhat.com>
4812
4813 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4814
4815 2004-10-26 Tom Tromey <tromey@redhat.com>
4816
4817 * verify.h (vfy_notify_verified): Removed.
4818 * verify-glue.c (vfy_notify_verified): Removed.
4819
4820 2004-10-26 Tom Tromey <tromey@redhat.com>
4821
4822 * verify-impl.c (debug_print_state): Declare `i' before code.
4823 (merge_types): Modify `t' when it is null_type.
4824
4825 2004-10-26 Tom Tromey <tromey@redhat.com>
4826
4827 * verify-impl.c (type_print): Renamed from print. Now static and
4828 takes an argument.
4829 (debug_print_state): Use type_print.
4830
4831 2004-10-25 Tom Tromey <tromey@redhat.com>
4832
4833 * expr.c (build_invokeinterface): Compute correct offset for
4834 index into interface methods.
4835
4836 2004-10-20 Tom Tromey <tromey@redhat.com>
4837
4838 * java-tree.h (verify_jvm_instructions_new): Declare.
4839
4840 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4841 command line.
4842
4843 * verify-impl.c (verify_instructions): Correctly handle wide
4844 types on the stack.
4845 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4846 (vfy_get_component_type): Strip pointer types.
4847 (vfy_find_class): Use get_type_from_signature. Strip pointer
4848 types.
4849 Include java-except.h.
4850
4851 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
4852
4853 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
4854 vfy_push_type_t, set_variable, add_new_state, merge_into,
4855 handle_jsr_insn, branch_prepass, check_class_constant,
4856 check_wide_constant, get_one_type, compute_static_types,
4857 verify_instructions_0): Clean up C99 declarations after statements.
4858
4859 2004-10-20 Tom Tromey <tromey@redhat.com>
4860
4861 * verify-impl.c (merge_refs): Compare reference against iterator,
4862 not ref2.
4863
4864 * verify-glue.c (vfy_tag): Mask off resolved flag.
4865
4866 2004-10-19 Tom Tromey <tromey@redhat.com>
4867
4868 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4869 (init_state_with_stack): Initialize `this_type' in state.
4870 (verify_method): Use debug_print.
4871 * verify-glue.c (vfy_is_primitive): Removed debugging print.
4872 (vfy_note_stack_depth): Reverted last patch.
4873 (vfy_note_stack_type): Note pointer to Object, not Object.
4874 (vfy_note_local_type): Likewise.
4875
4876 * verify.h (vfy_note_instruction_seen): Declare.
4877 * verify-glue.c (verify_jvm_instructions_new): Set
4878 BCODE_EXCEPTION_TARGET on target instruction.
4879 (vfy_note_instruction_seen): New function.
4880 * verify-impl.c (FLAG_INSN_SEEN): New define.
4881 (verify_instructions_0): Set flag on instruction. Save state for
4882 PC=0 later.
4883 (verify_instructions): Call vfy_note_instruction_seen.
4884
4885 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4886 (verify_jvm_instructions_new): Call method_init_exceptions,
4887 add_handler, and handle_nested_ranges.
4888 * verify-impl.c (verify_method): Return 1 on success.
4889 (verify_instructions_0): Save the state at PC=0.
4890
4891 * verify-impl.c (init_type_from_class): Set is_resolved and
4892 ref_next on new ref_intersection.
4893 (init_type_from_string): Likewise.
4894
4895 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
4896
4897 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4898 if flag_new_verifier is set.
4899 * java-tree.h (flag_new_verifier): Declare.
4900 * lang.opt (fnew-verifier): New option.
4901 * verify-impl.c: Work around namespace pollution by undef'ing
4902 'current_class'.
4903 (struct verifier_context): Make 'bytecode' const.
4904 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
4905 (types_compatible): For the BC-ABI, always consider reference types
4906 compatible.
4907 (check_class_constant): Use vfr->current_class.
4908 (check_constant): Likewise.
4909 (check_wide_constant): Likewise.
4910 (check_field_constant): Check for 'L' at start of type name.
4911 (get_one_type): Return pointer instead of type. Set type result in
4912 caller via passed type pointer.
4913 (compute_argument_types): Update to use new get_one_type arguments.
4914 (compute_return_type): Likewise.
4915 (make_verifier_context): New. Allocate and initialize 'vfr'.
4916 (free_verifier_context): New. Free 'vfr' and its contents.
4917 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
4918 and free_verifier_context.
4919
4920 2004-10-15 Tom Tromey <tromey@redhat.com>
4921
4922 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
4923 * verify.h (vfy_fail): Fixed formatting.
4924
4925 * verify-impl.c (vfr): Fixed comment formatting.
4926 (collapse_type): New function.
4927 (verify_instructions): Notify compiler about type map.
4928 * verify.h (vfy_note_stack_depth): Updated.
4929 (vfy_note_stack_type): Likewise.
4930 (vfy_note_local_type): Likewise.
4931 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
4932 Declare.
4933 * verify-glue.c (vfy_note_stack_depth): Correctly size type
4934 state. Added `method' argument.
4935 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
4936 argument.
4937 (vfy_note_local_type): New function.
4938 (vfy_unsuitable_type): Likewise.
4939 (vfy_return_address_type): Likewise.
4940 (vfy_null_type): Likewise.
4941
4942 * verify.h (VFY_IN_GCC): Removed.
4943 (VFY_WANT_TYPEMAP): Removed.
4944 * verify-impl.c (verify_instructions_0): Removed useless "\".
4945 (struct state) <next>: Uncomment.
4946
4947 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
4948
4949 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
4950 C-style.
4951
4952 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4953
4954 * Make-lang.in (verify.o): Re-enabled this target.
4955 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
4956 (vfy_get_interface): Likewise.
4957 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
4958 * verify.h (verify_jvm_instructions_new): Declare.
4959 * verify-impl.c (free_state): Temporarily comment out unused
4960 function.
4961
4962 2004-10-06 Tom Tromey <tromey@redhat.com>
4963
4964 * java-tree.h (JV_STATE_READ): New enum value.
4965
4966 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4967
4968 * verify.h: New file.
4969
4970 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
4971
4972 * verify-impl.c, verify-glue.c, verify.h: New files.
4973 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
4974
4975 2004-09-24 Andrew Haley <aph@redhat.com>
4976
4977 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
4978 for a slot if it's of pointer type.
4979
4980 2004-09-14 Tom Tromey <tromey@redhat.com>
4981
4982 * class.c (make_class_data): Correctly initialize "state" field.
4983 Initialize "engine" field.
4984 * decl.c (java_init_decl_processing): Add "engine" field.
4985
4986 2004-09-10 Andrew Haley <aph@redhat.com>
4987
4988 PR java/12760
4989 * expr.c (build_invokeinterface): Use fast method for interface
4990 dispatch.
4991 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
4992 JTI_ITABLE_PTR_TYPE.
4993 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
4994 (emit_symbol_table): Add new arg, element_size.
4995 * decl.c (java_init_decl_processing): Initialize Class.itable.
4996 * class.c (GEN_TABLE): New macro.
4997 (gen_indirect_dispatch_tables): Use it. Add itable.
4998 (make_class_data): Add new arg for emit_symbol_table().
4999 Emit itable.
5000 (add_miranda_methods): Make sure search_class has been parsed.
5001 (emit_symbol_table): Add new arg, element_size.
5002
5003 2004-09-06 Andrew Haley <aph@redhat.com>
5004
5005 * verify.c (merge_types): Return Object for all merges of
5006 interfaces.
5007 * expr.c (add_type_assertion): Don't generate assertions when
5008 source type is array of Object.
5009
5010 2004-09-03 Andrew Haley <aph@redhat.com>
5011
5012 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
5013
5014 * lang.c (java_post_options): Force flag_verify_invocations if
5015 we're not using indirect dispatch.
5016
5017 * expr.c (pop_type_0): Move test for interfaces before call to
5018 can_widen_reference_to().
5019 (build_signature_for_libgcj): Remove generation of canonical array
5020 type.
5021 (add_type_assertion): Canonicalize both arrays.
5022 Don't assert that type X can be assigned to Object.
5023 Don't assert that type X an be assigned to type X.
5024 Don't assert that Object can be assigned to type X.
5025 (can_widen_reference_to): Warn whenever we generate an assertion.
5026 (process_jvm_instruction): Use throwable_type_node for the type of
5027 an exception class.
5028
5029 2004-09-01 Andrew Haley <aph@redhat.com>
5030
5031 * decl.c (java_init_decl_processing): Change
5032 verify_identifier_node to "__verify".
5033 * expr.c (add_type_assertion): Use verify_identifier_node for name.
5034 * java-tree.h (verify_identifier_node): Change to "__verify".
5035
5036 * expr.c (build_signature_for_libgcj): New function.
5037 (add_type_assertion): Use it to construct signatures for
5038 source_type and target_type.
5039
5040 2004-08-27 Andrew Haley <aph@redhat.com>
5041
5042 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
5043 (verify_identifier_node): New.
5044 (TYPE_VERIFY_METHOD): New.
5045 (struct type_assertion): New type.
5046 * expr.c (type_assertion_eq): New function.
5047 (type_assertion_hash): New function.
5048 (add_type_assertion): New function.
5049 (can_widen_reference_to): Call add_type_assertion().
5050 * decl.c (java_init_decl_processing): Add verify_identifier_node.
5051 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
5052 (finish_class): Output TYPE_VERIFY_METHOD (type).
5053
5054 * decl.c (end_java_method): Nullify unused fields.
5055
5056 2004-08-17 Andrew Haley <aph@redhat.com>
5057
5058 * verify.c (defer_merging): Quieten.
5059 * jcf-parse.c (load_class): Only try to open a class file if it's
5060 java.lang.Object or if it's part of the current compilation.
5061 Check that the class we just tried to load is the class we just
5062 loaded. Quieten.
5063 (java_parse_file): Set flag_verify_invocations off if we're
5064 compiling from .class.
5065 (parse_zip_file_entries): Abort if we try to read a dummy class.
5066 * expr.c (can_widen_reference_to): Quieten.
5067 (build_invokevirtual): Abort if we try to invokevirtual an
5068 interface.
5069 (expand_invoke): Don't build a non-interface call to an interface.
5070 (build_instanceof): Don't do premature optimization if
5071 flag_verify_invocations is not set.
5072 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
5073 from superclass.
5074 (build_static_field_ref): Add correct type conversion for
5075 field_address.
5076 (add_miranda_methods): Disable generation of Miranda methods for
5077 dummy classes.
5078 (layout_class_method): Don't complain about non-static method
5079 overrides static method with dummy classes.
5080
5081 2004-08-13 Tom Tromey <tromey@redhat.com>
5082
5083 * class.c (build_static_field_ref): Re-enable atable lookups for
5084 static fields.
5085
5086 * parse.y (strip_out_static_field_access_decl): Indentation fix.
5087
5088 2004-08-11 Tom Tromey <tromey@redhat.com>
5089
5090 * gcj.texi (libgcj Runtime Properties): Document new properties.
5091
5092 2004-08-06 Andrew Haley <aph@redhat.com>
5093
5094 * jcf-parse.c (load_class): Check that we really have loaded the
5095 class we're looking for.
5096
5097 2004-07-19 Andrew Haley <aph@redhat.com>
5098
5099 * verify.c (verify_jvm_instructions): Comment change only.
5100
5101 * typeck.c (build_java_array_type): Add size field to array name.
5102
5103 * java-tree.h (LOCAL_SLOT_P): New.
5104 (update_aliases): Add PC argument.
5105 (pushdecl_function_level): New function.
5106
5107 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5108 MODIFY_EXPR, and SAVE_EXPR.
5109 (java_gimplify_modify_expr): New function.
5110
5111 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5112 (expand_iinc): Pass PC to update_aliases().
5113 (STORE_INTERNAL): Likewise.
5114 (process_jvm_instruction): Likewise.
5115
5116 * decl.c (base_decl_map): New variable.
5117 (uniq): New variable.
5118 (update_aliases): Rewrite with more thorough checking.
5119 (debug_variable_p): New function.
5120 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
5121 (check_local_named_variable): Delete whole function.
5122 (initialize_local_variable): New function.
5123 (check_local_unnamed_variable): Add checks and comments.
5124 (find_local_variable): Rewrite.
5125 (java_replace_reference): New function.
5126 (function_binding_level): New variable.
5127 (pushdecl_function_level): New function.
5128 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5129 (maybe_pushlevels): Call pushdecl() on each of the new decls.
5130 (start_java_method): Reset uniq. Create base_decl_map. Set
5131 function_binding_level.
5132 (end_java_method): Null unused fields to save memory.
5133
5134 2004-06-29 Andrew Haley <aph@redhat.com>
5135
5136 * except.c (expand_start_java_handler): Push a new binding level.
5137 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
5138 register_exception_range() to register where we'll do it.
5139 (expand_end_java_handler): Remove old bogus code. Replace with
5140 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5141 the top of the expression we're curently building.
5142 (maybe_end_try): Delete.
5143 * decl.c (binding_level.exception_range): New field.
5144 (clear_binding_level): Add field exception_range. Reformat.
5145 (poplevel): Call expand_end_java_handler().
5146 (poplevel): Call java_add_stmt only if functionbody is false.
5147 (maybe_poplevels): Don't call maybe_end_try() from here.
5148 (end_java_method): Clear no longer used trees in function decl.
5149 (register_exception_range): New function.
5150 * java-tree.h (register_exception_range, struct eh_range): Declare.
5151
5152 2004-06-22 Andrew Haley <aph@redhat.com>
5153
5154 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
5155 the otable.
5156 * check-init.c (get_variable_decl): Teach check-init about
5157 FIELD_DECLs addressed via the otable.
5158 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
5159 CLASS_PARSED_P.
5160
5161 2004-05-28 Andrew Haley <aph@redhat.com>
5162
5163 * jcf-parse.c (load_class): Don't try to read a class that we've
5164 already read.
5165
5166 * expr.c (build_invokeinterface): Use the old-fashioned way of
5167 doing indirect dispatch: look up interfaces by name.
5168 * java-tree.h (enum java_tree_index): Add
5169 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
5170 * decl.c (java_init_decl_processing): Add
5171 soft_lookupinterfacemethodbyname_node.
5172
5173 * gjavah.c (print_method_info): Final methods have vtable entries,
5174 so gjavah needs to output them.
5175 * class.c (layout_class_method): Generate vtable entries for final
5176 methods.
5177 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
5178 dispatch, even if a method is final.
5179
5180 2004-05-25 Andrew Haley <aph@redhat.com>
5181
5182 * class.c (build_symbol_entry): Convert the names of constructors
5183 to init_identifier_node when generating an entry for the indirect
5184 dispatch table.
5185
5186 * expr.c (build_known_method_ref): Generate indirect calls for
5187 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
5188
5189 2004-05-24 Andrew Haley <aph@redhat.com>
5190
5191 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
5192 atable element is of the right type.
5193
5194 * class.c (build_static_field_ref): Cast pointer to correct type
5195 for field.
5196
5197 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
5198
5199 * Merged with HEAD as of 20040514. Diff against
5200 gcj-abi-2-merge-20040514.
5201
5202 2004-04-16 Andrew Haley <aph@redhat.com>
5203
5204 * verify.c (check_pending_block): Disable subroutine checks.
5205 (defer_merging): New function.
5206 (merge_types): If types are dummy, use defer_merging to combine them.
5207 (verify_jvm_instructions): If invocation is invokeinterface and
5208 target is dummy, assume target really is an interface.
5209
5210 * parse.y (patch_invoke): Break out call to java_create_object.
5211
5212 * lang.c (flag_verify_invocations): New.
5213
5214 * jcf-parse.c (load_class): If we've already failed to load a
5215 class, don't try again.
5216 (load_class): If we can't find a .class file, don't fail, but emit
5217 a warning.
5218 (parse_class_file): Don't act on dummy methods.
5219
5220 * java-tree.h (flag_verify_invocations): New.
5221 (TYPE_DUMMY): New.
5222 (lang_type.dummy_class): New field.
5223 (java_create_object): New function.
5224 (METHOD_DUMMY): New.
5225
5226 * expr.c (build_field_ref): Widen field offset.
5227 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
5228 that each of its elements is compatible with the one we're
5229 popping.
5230 (pop_type_0): Issue a warning to say that we need to generate a
5231 runtime check.
5232 (java_create_object): New function.
5233 (build_field_ref): Only generate hard refs if we're not using
5234 indirect dispatch.
5235 (expand_java_field_op): If we're using !verify_invocations and we
5236 see a missing field, generate a decl for it.
5237
5238 (expand_invoke): If a class doesn't have the method we seek and
5239 we're using !flag_verify_invocations, generate a decl for the
5240 method now.
5241
5242 (build_known_method_ref): Always use indirect dispatch via the
5243 atable for static methods.
5244
5245 (expand_java_NEW): Break out object creation into new function,
5246 java_create_object.
5247
5248 (can_widen_reference_to): Issue a warning to say that we need to
5249 generate a runtime check.
5250
5251 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
5252 (make_method_value): Also use index for interfaces.
5253 (make_class_data): Skip dummy field for inherited data.
5254 Don't build method array for dummy methods.
5255 Set size_in_byte to -1 when using inirect dispatch
5256 Don't build a hard class ref if we don't have a hard ref to our
5257 superclass, or if we're using inirect dispatch.
5258 Null out dispatch tables.
5259
5260 (layout_class_method): Don't complain about non-static method
5261 overrides static method is method is artificial.
5262
5263 (build_static_field_ref): Disable atable references to static
5264 fields for the time being.
5265
5266 (layout_class_methods): Check for CLASS_INTERFACE as
5267 well as CLASS_ABSTRACT.
5268
5269 2004-11-24 Steven Bosscher <stevenb@suse.de>
5270
5271 * class.c (make_class_data): Don't check flag_inline_functions.
5272 * lang.c (flag_really_inline): Remove unused flag.
5273 (java_handle_option): Don't set it here. Remove special handling
5274 of flag_inline_functions for Java.
5275 (java_init): Don't set flag_inline_trees here. Already done...
5276 (java_post_options): ...here. Don't clear flag_inline_functions.
5277
5278 2004-11-24 Steven Bosscher <stevenb@suse.de>
5279
5280 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
5281 (java_gimplify_exit_block_expr): New function.
5282 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
5283 LABELED_BLOCK_EXPR.
5284 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
5285 (EXIT_BLOCK_EXPR): Likewise.
5286 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
5287 (LABELED_BLOCK_BODY): Likewise.
5288 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
5289 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
5290 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
5291 TREE_OPERAND.
5292 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
5293 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
5294 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
5295 second operand of EXIT_BLOCK_EXPR.
5296 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
5297 TREE_OPERAND.
5298 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
5299
5300 2004-11-23 Ben Elliston <bje@au.ibm.com>
5301
5302 * xref.h (xref_flag_value): Remove.
5303 (xref_set_data, xref_get_data): Likewise.
5304 (xref_set_current_fp): Likewise.
5305 (XREF_NONE): Likewise.
5306 (XREF_GET_DATA): Likewise.
5307 * xref.c (xref_flag_value): Remove.
5308 (xref_set_data, xref_get_data): Likewise.
5309 (xref_set_current_fp): Likewise.
5310
5311 2004-11-23 Ben Elliston <bje@au.ibm.com>
5312
5313 * gjavah.c (output_directory): Make static.
5314 (temp_directory): Likewise.
5315
5316 2004-11-15 Tom Tromey <tromey@redhat.com>
5317
5318 * decl.c (instn_ptr_type_node): Removed.
5319 (lineNumbers_ptr_type_node): Removed.
5320 (jint_type): Removed.
5321 (jint_ptr_type): Removed.
5322
5323 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
5324
5325 PR java/15576
5326 * check-init.c (check_init): Ignore DECL_EXPR.
5327 * expr.c (always_initialize_class_p): Reenable.
5328 (build_class_init): Use a variable to store the decl. Also use
5329 boolean_false_node instead of integer_zero_node.
5330 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
5331 to the block.
5332
5333 2004-11-08 Tom Tromey <tromey@redhat.com>
5334
5335 PR java/16843:
5336 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
5337 generating a JNI header.
5338 (print_field_info): Handle JNI headers.
5339 (jni_print_float): Likewise.
5340 (jni_print_double): Likewise.
5341
5342 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
5343
5344 * decl.c (end_java_method): Remove duplicated code.
5345
5346 2004-11-06 Zack Weinberg <zack@codesourcery.com>
5347 Gerald Pfeifer <gerald@pfeifer.com>
5348
5349 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
5350 as well.
5351
5352 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
5353
5354 PR java/17265
5355 * class.c: Reinstate 2004-08-18 patch.
5356 (make_local_function_alias): Don't create an alias for extern (native)
5357 functions.
5358
5359 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
5360
5361 PR java/17265
5362 * class.c (make_local_function_alias): Revert 2004-08-18 change.
5363 (make_method_value): Likewise.
5364
5365 2004-10-21 Andrew Haley <aph@redhat.com>
5366
5367 PR java/18091:
5368 * jcf-parse.c (set_source_filename): Add code to build new sfname.
5369
5370 2004-10-20 Andrew Haley <aph@redhat.com>
5371
5372 * decl.c (end_java_method): Don't expand if flag_syntax_only.
5373 Remove duplicated code block.
5374
5375 2004-10-18 Steven Bosscher <stevenb@suse.de>
5376
5377 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
5378 New rules to work around old Bison warnings.
5379
5380 2004-10-17 Steven Bosscher <stevenb@suse.de>
5381
5382 * class.c (ident_subst): Always alloca buffer.
5383 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
5384 opcode after including javaop.def.
5385 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
5386 conditional expression that exits, to avoid warnings.
5387 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
5388 a user of an extension.
5389 * win32-host.c: Move check down to have non-empty file when
5390 WIN32 is not defined.
5391
5392 * Make-lang.in (java-warn): Add STRICT_WARN.
5393 (java/jcf-io.o-warn): Don't have Werror for this file.
5394 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
5395
5396 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
5397
5398 * expr.c (expr_add_location): Move declaration to before all
5399 statements.
5400 * parse.y (java_expand_classes): Ditto.
5401 * lex.c (java_peek_unicode): Ditto.
5402
5403 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
5404
5405 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
5406 if possible, else convert `foo' to 'foo'.
5407 * class.c: Likewise.
5408 * decl.c: Likewise.
5409 * expr.c: Likewise.
5410 * jcf-io.c: Likewise.
5411 * jcf-parse.c: Likewise.
5412 * lang.c: Likewise.
5413 * lex.c: Likewise.
5414 * parse.h: Likewise.
5415
5416 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
5417
5418 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
5419 rename parameter 'msg' to 'msgid' in function declaration.
5420 (issue_warning_error_from_context): Likewise.
5421 (yyerror): Rename parameter 'msg' to 'msgid'.
5422 (all over): Use new quoting style for diagnostics.
5423
5424 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
5425
5426 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
5427 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
5428 Update copyright.
5429
5430 2004-10-14 Matt Austern <austern@apple.com>
5431
5432 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
5433 pointer_set_t* now.
5434
5435 2004-10-13 Tom Tromey <tromey@redhat.com>
5436
5437 PR java/15578:
5438 * lang.opt (--extdirs): Document.
5439 * jvspec.c (lang_specific_driver): Recognize -encoding and
5440 -extdirs.
5441
5442 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
5443
5444 * parse.y (issue_warning_error_from_context): Use va_list *
5445 instead of va_list parameter.
5446 (parse_error_context): Update call.
5447 (parse_warning_context): Likewise.
5448
5449 2004-10-05 Zack Weinberg <zack@codesourcery.com>
5450
5451 * parse.y, parse-scan.y: Add list of diagnostic messages to
5452 insulate translation template from version of yacc/bison used
5453 to compile the grammar.
5454
5455 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
5456
5457 Prepare for %q, %< and %> in diagnostic message strings.
5458 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
5459 Name second parameter 'msgid'.
5460 * parse.y: Additionally include pretty-print.h and diagnostic.h.
5461 (issue_warning_error_from_context): Use pretty-printer functions
5462 instead of vsprintf for constructing formatted messages. Rename
5463 parameter 'msg' to 'msgid'.
5464 (parse_error_context): Rename parameter 'msg' to 'msgid'.
5465 (parse_warning_context): Likewise.
5466
5467 2004-10-05 Andrew Haley <aph@redhat.com>
5468
5469 PR java/17779
5470 * jcf-parse.c (parse_zip_file_entries): If a class has a
5471 superclass and a TYPE_SIZE of zero, lay it out.
5472
5473 2004-09-30 Andrew Haley <aph@redhat.com>
5474
5475 PR java/17733
5476 * jcf-parse.c (compute_class_name): Rewrite.
5477
5478 2004-10-01 Jan Hubicka <jh@suse.cz>
5479
5480 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
5481
5482 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
5483
5484 * lex.c: Fix a comment typo.
5485
5486 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
5487
5488 * java-tree.h: Fix a comment typo.
5489
5490 2004-09-30 Per Bothner <per@bothner.com>
5491
5492 Simplify lexer. Implement --enable-mapped-location support.
5493 * jcf-parse.c (parse_class_file): Use linemap_line_start.
5494 (parse_source_file_1): Pass filename as extra parameter, so we can call
5495 linemap_add and set input_location here, rather than in both callers.
5496 (read_class): Pass copied filename to parse_source_file_1.
5497 Don't initialize wfl_operator - only needed for source compilation.
5498 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
5499 * lex.h: Remove a bunch of debugging macros.
5500 * lex.h (struct_java_line, struct java_error): Remove types.
5501 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
5502 (struct java_lc_s): Remove prev_col field.
5503 (struct java_lexer): New fields next_unicode, next_columns, and
5504 avail_unicode. New position field, and maybe token_start field.
5505 Don't need hit_eof field - use next_unicode == -1 instead.
5506 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
5507 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
5508 * parse.h: Various changes for USE_MAPPED_LOCATION.
5509 (EXPR_WFL_EMIT_LINE_NOTE): XXX
5510 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5511 (struct parser_ctxt): New file_start_location field.
5512 Remove p_line, c_line fields since we no longer save lines.
5513 Remove elc, lineno, and current_jcf fields - no longer used.
5514 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
5515 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5516 source_location and is probably not needed anymore anyway.
5517 Use new expr_add_Location function.
5518 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
5519 (java_pop_parser_context): Minor cleanup.
5520 (java_parser_context_save_global, java_parser_context_restore_global,
5521 java_pop_parser_context): Save/restore input_location as a unit.
5522 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
5523 a source_location instead of a wfl context node.
5524 (check_class_interface_creation): input_filename is not addressable.
5525 (create_artificial_method): Calling java_parser_context_save_global
5526 and java_parser_context_restore_global is overkill. Instead,
5527 temporarily set input_location from class decl.
5528 (java_layout_seen_class_methods): Set input_location from method decl.
5529 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5530 (finish_loop_body): Likewise.
5531 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
5532 (java_sprint_unicode): Take a character, not index in line.
5533 (java_sneak_uncode): Replaced by java_peek_unicode.
5534 (java_unget_unicode): No longer used.
5535 (java_allocate_new_line. java_store_unicode): Removed, since we
5536 no longer remember "lines".
5537 (java_new_lexer): Update for new data structures.
5538 (java_read_char): Move unget_value checking to java_read_unicode.
5539 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5540 efficient functions that are used directly when lexing.
5541 (java_read_unicode_collapsing_terminators): No longer needed.
5542 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5543 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5544 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
5545 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
5546 combine switch branches, and test for common token kinds earlier.
5547 (java_lex_error): Rewrite.
5548 * jv-scan.c (expand_location): New function, copied from tree.c.
5549 (main): Set ctxp->filename instead of setting input_filename directly.
5550
5551 2004-09-30 Per Bothner <per@bothner.com>
5552
5553 More cleanup for --enable-mapped-location.
5554 * class.c (push_class): If USE_MAPPED_LOCATION don't set
5555 input_location here. Instead do it in give_name_to_class.
5556 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5557 * expr.c (expand_byte_code): Call linemap_line_start.
5558 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
5559 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
5560 (expr_add_location): New function, if USE_MAPPED_LOCATION.
5561 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
5562 to USE_MAPPED_LOCATION case.
5563
5564 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
5565 * jcf-parse.c (java_parse_file): Don't set input_filename.
5566 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5567 Create a list of TRANSLATION_UNIT_DECL.
5568 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
5569 reason is so we can set a DECL_SOURCE_LOCATION for each file.
5570 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5571 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5572 (file_start_location): New static.
5573 (set_source_filename): Avoid extra access to input_filename macro.
5574 Concatenate new name with class's package prefix.
5575 (set_source_filename, give_name_to_class): Update.
5576 (give_name_to_class): Set class's "line 0" input_location here.
5577 (parse_class_file): Set input_location as a unit.
5578
5579 * jcf-parse.c (load_class): Sanity test if missing inner class file.
5580
5581 2004-09-29 Per Bothner <per@bothner.com>
5582
5583 * java-tree.h: Redefine some macros and add some declaration
5584 to handle the USE_MAPPED_LOCATION case.
5585 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
5586 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
5587 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5588 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5589
5590 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5591 * decl.c (finish_method, java_add_stmt): Likewise.
5592 * java-gimplify.c (java-gimplify.c): Likewise.
5593 * jcf-write.c (generate_bytecode_insns): Likewise.
5594 * lang.c (java_post_options): Likewise - call linemap_add.
5595
5596 2004-09-29 Andrew Haley <aph@redhat.com>
5597
5598 PR java/17007
5599 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5600 result of TRUNC_MOD_EXPR.
5601 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5602 * decl.c (java_init_decl_processing): Mark
5603 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5604
5605 2004-09-28 Tom Tromey <tromey@redhat.com>
5606
5607 PR java/15710:
5608 * class.c (add_miranda_methods): Load superinterface if not
5609 already loaded.
5610
5611 2004-09-28 Andrew Haley <aph@redhat.com>
5612
5613 PR java/17586
5614 * jcf-parse.c (load_class): Don't try to read a class that we've
5615 already read.
5616
5617 2004-09-28 Andrew Haley <aph@redhat.com>
5618
5619 * jcf-parse.c (load_class): Back out previous broken patch.
5620
5621 2004-09-28 Andrew Haley <aph@redhat.com>
5622
5623 PR java/17586
5624 * jcf-parse.c (load_class): Don't try to read a class that we've
5625 already read.
5626 Check that we really did read the right class.
5627
5628 2004-09-25 Tom Tromey <tromey@redhat.com>
5629
5630 PR java/17500:
5631 * parse.y (create_artificial_method): Use add_method_1.
5632
5633 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
5634
5635 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5636 comment typos.
5637 * gcj.texi: Fix typos.
5638
5639 2004-09-24 Tom Tromey <tromey@redhat.com>
5640
5641 PR java/15656:
5642 * parse.y (class_instance_creation_expression): Set `$$' to NULL
5643 in error parts of rule.
5644 (unary_expression): Don't call error_if_numeric_overflow when $1
5645 is NULL.
5646
5647 2004-09-24 Tom Tromey <tromey@redhat.com>
5648
5649 PR java/16789:
5650 * parse.y (resolve_qualified_expression_name): Set
5651 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5652 * expr.c (force_evaluation_order): Check for empty argument list
5653 after stripping COMPOUND_EXPR.
5654
5655 2004-09-23 Andrew Haley <aph@redhat.com>
5656
5657 PR java/16927:
5658 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5659 COND_EXPRs.
5660
5661 2004-09-23 Tom Tromey <tromey@redhat.com>
5662
5663 PR java/17329:
5664 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5665 where operand is null.
5666
5667 2004-09-23 Tom Tromey <tromey@redhat.com>
5668
5669 PR java/17380:
5670 * parse.y (not_accessible_p): Allow access to protected members
5671 even when class is not static.
5672
5673 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
5674
5675 * Make-lang.in: Revert the gcc-none.o change.
5676
5677 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
5678
5679 * parse.y (patch_anonymous_class): VEC_space returns true if there
5680 is space.
5681
5682 2004-09-21 Matt Austern <austern@apple.com>
5683
5684 Fix bootstrap.
5685 * gjavah.c (free_method_name_list): Fix function definition so
5686 it's a proper C prototype.
5687
5688 2004-09-21 Tom Tromey <tromey@redhat.com>
5689
5690 PR java/17575:
5691 * gjavah.c (free_method_name_list): New method.
5692 (main): Call it.
5693
5694 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
5695 Zack Weinberg <zack@codesourcery.com>
5696
5697 * java-tree.def: Use tree_code_class enumeration constants
5698 instead of code letters.
5699 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5700 new tree-class enumeration constants.
5701
5702 2004-09-13 Tom Tromey <tromey@redhat.com>
5703
5704 PR java/17216:
5705 * class.c (layout_class_method): Put synthetic methods into the
5706 vtable.
5707
5708 2004-09-11 Andrew Pinski <apinski@apple.com>
5709
5710 * Make-lang.in (java/ggc-none.c): Change dependency
5711 for ggc.h into $(GGC_H).
5712
5713 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5714
5715 * Make-lang.in (java/win32-host.o): Add dependency on
5716 coretypes.h.
5717 * win32-host.c: Add includes for coretypes.h, jcf.h
5718
5719 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5720
5721 * Make-lang.in (GCJH_OBJS): Change dependency from
5722 ggc-none.o to java/ggc-none.o
5723 (JCFDUMP_OBJS): Likewise.
5724 (java/ggc-none.o): New target.
5725
5726 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
5727
5728 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
5729 * class.c (build_utf8_ref, build_static_field_ref,
5730 make_field_value, make_method_value, get_dispatch_table,
5731 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5732 * constants.c (get_tag_node, build_ref_from_constant_pool,
5733 build_constants_constructor): Likewise.
5734 * decl.c (java_init_decl_processing): Likewise.
5735 * expr.c (build_java_array_length_access, build_newarray,
5736 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5737 build_java_binop, build_field_ref, expand_java_add_case,
5738 expand_java_call, build_known_method_ref, build_invokevirtual,
5739 build_invokeinterface, build_jni_stub): Likewise.
5740 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5741 * jcf-parse.c (get_constant): Likewise.
5742 * lex.c (do_java_lex): Likewise.
5743 * parse.y (patch_binop, patch_unaryop, patch_cast,
5744 build_newarray_node, patch_newarray): Likewise.
5745 * resource.c (compile_resource_data): Likewise.
5746 * typeck.c (build_prim_array_type): Likewise.
5747
5748 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
5749
5750 * decl.c (java_init_decl_processing): Adjust
5751 initialize_sizetypes call.
5752
5753 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
5754
5755 * jv-scan.c (fancy_abort): Add.
5756
5757 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
5758
5759 * expr.c (build_java_arrayaccess): Use convert to change
5760 len's type.
5761
5762 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
5763
5764 * class.c (make_local_function_alias): Allocate extra space for 'L'
5765 in name buffer. Reported by Thomas Neumann.
5766
5767 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
5768
5769 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5770 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
5771 * lex.c (do_java_lex): Adjust.
5772 (error_if_numeric_overflow): Likewise.
5773
5774 2004-08-18 Andrew Pinski <apinski@apple.com>
5775
5776 * class.c (make_local_function_alias): Only make a new decl if we
5777 support alias attribute on all decls.
5778
5779 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
5780
5781 * class.c (make_local_function_alias): New function. Create local
5782 alias for public method DECL.
5783 (make_method_value): Use make_local_function_alias.
5784 * parse.y (craft_constructor): Don't special-case anonymous classes.
5785 Always set ctor_name to init_identifier_node.
5786 (lookup_method_invoke): Call layout_class_method when creating
5787 anonymous class constructor.
5788
5789 2004-08-18 Richard Henderson <rth@redhat.com>
5790
5791 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5792 default case. Treat '<' similarly. Update for
5793 is_gimple_formal_tmp_var name change.
5794
5795 2004-08-17 Andrew Haley <aph@redhat.com>
5796
5797 * lang.c (lang_printable_name): Obey verbose flag.
5798 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5799 lang_printable_name().
5800 (verify_constructor_circularity, get_printable_method_name,
5801 check_abstract_method_definitions, java_check_regular_methods,
5802 java_check_abstract_methods, check_inner_class_access,
5803 fix_constructors, patch_method_invocation, patch_return):
5804 Likewise.
5805 * expr.c (pop_type_0): Likewise.
5806
5807 * java-tree.h (lang_printable_name_wls): Delete.
5808
5809 2004-08-16 Tom Tromey <tromey@redhat.com>
5810
5811 PR java/8473:
5812 * parse.y (primary): Changed for initialized and uninitialized
5813 array creations.
5814 (array_access): Handle array_creation_initialized.
5815 (array_creation_expression): Split into
5816 array_creation_initialized and array_creation_uninitialized.
5817
5818 2004-08-16 Andrew Haley <aph@redhat.com>
5819
5820 * jcf-write.c (find_constant_index): Canonicalize NaNs when
5821 generating bytecode.
5822
5823 2004-08-16 Elliot Lee <sopwith@redhat.com>
5824
5825 PR java/9677
5826 * jcf-parse.c (java_parse_file): Handle filenames with embedded
5827 spaces, and quoted filelists.
5828
5829 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
5830
5831 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5832 * class.c (build_utf8_ref, build_static_field_ref,
5833 make_field_value, make_method_value, get_dispatch_table,
5834 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5835 * constants.c (get_tag_node, build_ref_from_constant_pool,
5836 build_constants_constructor): Likewise.
5837 * decl.c (java_init_decl_processing): Likewise.
5838 * expr.c (build_java_array_length_access, build_newarray,
5839 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5840 build_java_binop, build_field_ref, expand_java_add_case,
5841 expand_java_call, build_known_method_ref, build_invokevirtual,
5842 build_invokeinterface, build_jni_stub): Likewise.
5843 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5844 * jcf-parse.c (get_constant): Likewise.
5845 * lex.c (do_java_lex): Likewise.
5846 * parse.y (patch_binop, patch_unaryop, patch_cast,
5847 build_null_of_type, patch_newarray): Likewise.
5848 * resource.c (compile_resource_data): Likewise.
5849 * typeck.c (build_prim_array_type): Likewise.
5850
5851 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
5852
5853 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5854 Don't create BLOCK here or call java_gimplify_block.
5855
5856 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
5857
5858 * java-tree.h (flag_deprecated): Removed.
5859 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5860 * parse.y (check_deprecation): Check warn_deprecated instead of
5861 flag_deprecated.
5862
5863 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
5864
5865 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5866 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5867 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5868 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5869 flag_force_classes_archive_check, flag_optimize_sci,
5870 flag_indirect_dispatch): Remove explicit declarations.
5871 * lang.opt: Add implicit declare/define/assign. Remove obsolete
5872 final comment.
5873
5874 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
5875
5876 PR bootstrap/14893
5877 * Make-lang.in (java.install-man): Install from either build
5878 tree or source tree, whichever has the file first.
5879
5880 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
5881
5882 * jcf-parse.c (get_constant): Adjust force_fit_type call.
5883 * lex.h (SET_LVAL_NODE_TYPE): Remove.
5884 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5885 (do_java_lex): Likewise. Adjust force_fit_type call.
5886
5887 2004-08-04 Roger Sayle <roger@eyesopen.com>
5888 Andrew Haley <aph@redhat.com>
5889
5890 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5891 checking trees as they're being built.
5892 (convert): Call convert_ieee_real_to_integer if we're
5893 converting a constant, even if we're writing a class file.
5894
5895 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
5896
5897 PR java/16701
5898 * parse.y (fold_constant_for_init): Call resolve_field_access with
5899 correct current_class context.
5900
5901 2004-08-01 Roger Sayle <roger@eyesopen.com>
5902
5903 * decl.c (update_aliases, initialize_local_variable): Replace calls
5904 to build with calls to buildN.
5905 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
5906 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
5907 * parse.h (BUILD_THROW): Likewise.
5908 * parse.y (switch_expression, synchronized_statement,
5909 catch_clause_parameter, array_creation_expression,
5910 conditional_expression, make_qualified_name,
5911 resolve_qualified_expression_name, patch_method_invocation,
5912 patch_invoke, build_method_invocation, build_new_invocation,
5913 build_assignment, patch_assignment, build_binop, patch_binop,
5914 build_string_concatenation, build_incdec, patch_unaryop,
5915 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
5916 patch_return, build_if_else_statement, build_labeled_block,
5917 build_new_loop, build_loop_body, build_bc_statement,
5918 build_assertion, encapsulate_with_try_catch, build_try_statement,
5919 build_try_finally_statement, patch_synchronized_statement,
5920 emit_test_initialization): Likewise, replace build with buildN.
5921
5922 2004-07-28 Eric Christopher <echristo@redhat.com>
5923
5924 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
5925 (java_unsafe_for_reeval): Ditto.
5926
5927 2004-07-26 <hp@bitrange.com>
5928
5929 * parse.y (build_super_invocation): Adjust declaration order to
5930 avoid declaration after statement.
5931
5932 2004-07-25 Bernardo Innocenti <bernie@develer.com>
5933
5934 * decl.c: Rename all identifiers named `class' to `cl'.
5935
5936 2004-07-25 Richard Henderson <rth@redhat.com>
5937
5938 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
5939
5940 2004-07-23 Mike Stump <mrs@apple.com>
5941
5942 * boehm.c (set_bit): Improve type safety wrt unsignedness.
5943 * gjavah.c (throwable_p, decode_signature_piece,
5944 print_full_cxx_name, print_include, add_namelet, add_class_decl,
5945 process_file): Likewise.
5946 * jcf-dump.c (main): Likewise.
5947 * jcf-io.c (read_zip_member): Likewise.
5948 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
5949 give_name_to_class, get_class_constant): Likewise.
5950 * jcf-write.c (find_constant_wide, push_long_const,
5951 generate_classfile): Likewise.
5952 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
5953 * parse.y (read_import_dir): Likewise.
5954 * typeck.c (parse_signature_type): Likewise.
5955 * verify.c (verify_jvm_instructions): Likewise.
5956 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
5957
5958 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
5959
5960 * Make-lang.in: Replace rmic and rmiregistry references with
5961 grmic and grmiregistry.
5962 * gcj.texi: Likewise.
5963
5964 2004-07-20 Andrew Haley <aph@redhat.com>
5965
5966 PR java/16431.
5967 * verify.c (verify_jvm_instructions): Comment change only.
5968
5969 * typeck.c (build_java_array_type): Add size field to array name.
5970
5971 * java-tree.h (LOCAL_SLOT_P): New.
5972 (update_aliases): Add PC argument.
5973 (pushdecl_function_level): New function.
5974
5975 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5976 MODIFY_EXPR, and SAVE_EXPR.
5977 (java_gimplify_modify_expr): New function.
5978
5979 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5980 (expand_iinc): Pass PC to update_aliases().
5981 (STORE_INTERNAL): Likewise.
5982 (process_jvm_instruction): Likewise.
5983
5984 * decl.c (base_decl_map): New variable.
5985 (uniq): New variable.
5986 (update_aliases): Rewrite with more thorough checking.
5987 (debug_variable_p): New function.
5988 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
5989 (check_local_named_variable): Delete whole function.
5990 (initialize_local_variable): New function.
5991 (check_local_unnamed_variable): Add checks and comments.
5992 (find_local_variable): Rewrite.
5993 (java_replace_reference): New function.
5994 (function_binding_level): New variable.
5995 (pushdecl_function_level): New function.
5996 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5997 (maybe_pushlevels): Call pushdecl() on each of the new decls.
5998 (start_java_method): Reset uniq. Create base_decl_map. Set
5999 function_binding_level.
6000 (end_java_method): Null unused fields to save memory.
6001
6002 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
6003
6004 * class.c (add_interface_do): Remove.
6005 (set_super_info, interface_of_p, maybe_add_interface,
6006 add_interface, make_class_data, layout_class,
6007 add_miranda_methods): Adjust BINFO accessors and addition.
6008 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
6009 accessors.
6010 * jcf-write.c (generate_classfile): Likewise.
6011 * parse.y (patch_anonymous_class, check_inner_circular_reference,
6012 check_circular_reference, java_complete_class,
6013 check_abstract_method_definitions,
6014 java_check_abstract_method_definitions,
6015 check_interface_throws_clauses, java_check_abstract_methods,
6016 lookup_java_interface_method2,
6017 find_applicable_accessible_methods_list): Adjust BINFO accessors
6018 and addition.
6019 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
6020
6021 2004-07-18 Roger Sayle <roger@eyesopen.com>
6022
6023 * builtins.c (max_builtin, min_builtin,
6024 java_build_function_call_expr): Replace calls to build with buildN.
6025 * class.c (build_class_ref, build_static_field_ref,
6026 get_dispatch_table, make_class_data, layout_class_method): Likewise.
6027 * constants.c (build_ref_from_constant_pool): Likewise.
6028 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
6029 add_stmt_to_compound): Likewise.
6030 * except.c (build_exception_object_ref, expand_end_java_handler):
6031 Likewise.
6032 * java-gimplify.c (java_gimplify_case_expr,
6033 java_gimplify_default_expr, java_gimplify_block,
6034 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
6035 * jcf-write.c (generate_bytecode_insns): Likewise.
6036 * typeck.c (convert_ieee_real_to_integer): Likewise.
6037
6038 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
6039
6040 * java-tree.h (builtin_function): Declare.
6041
6042 2004-07-16 Steven Bosscher <stevenb@suse.de>
6043
6044 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
6045 abuse restore_line_number_status.
6046
6047 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
6048
6049 g++/15861
6050 * jcf-parse.c (java_emit_static_constructor): Specify default
6051 priority.
6052
6053 2004-07-13 Per Bothner <per@bothner.com>
6054
6055 * java-tree.h (all_class_filename): Remove useless macro.
6056 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
6057 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
6058 * parse.y (java_parser_context_restore_global): Replace
6059 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
6060 * jcf-parse.c (read_class, java_parse_file): Likewise.
6061
6062 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
6063
6064 PR java/16474
6065 gjavah.c (print_field_info): Emit constant only if field is static.
6066
6067 2004-07-11 Roger Sayle <roger@eyesopen.com>
6068
6069 * expr.c (java_truthvalue_conversion, flush_quick_stack,
6070 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
6071 build_java_ret, build_java_throw_out_of_bounds_exception,
6072 build_java_array_length_access, java_check_reference,
6073 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
6074 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
6075 expand_java_arrayload, build_java_monitor, expand_java_return,
6076 expand_load_internal, expand_java_NEW, build_get_class,
6077 build_instanceof, expand_java_CHECKCAST, expand_iinc,
6078 build_java_soft_divmod, build_java_binop, build_field_ref,
6079 expand_compare, expand_java_goto, expand_java_switch,
6080 expand_java_add_case, build_class_init, build_known_method_ref,
6081 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
6082 expand_invoke, build_jni_stub, expand_java_field_op,
6083 java_expand_expr, expand_byte_code, STORE_INTERNAL,
6084 force_evaluation_order, emit_init_test_initialization): Convert
6085 calls to "build" into calls to the prefered "buildN" functions.
6086
6087 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
6088
6089 * java-tree.h (set_block): Remove.
6090 * lang.c (java_clear_binding_stack): New.
6091 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
6092 * decl.c (struct binding_level): Remove this_block.
6093 (clear_binding_level): Likewise.
6094 (poplevel): Don't handle this_block.
6095 (set_block): Remove.
6096
6097 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
6098
6099 * class.c (common_enclosing_context_p): Remove statement with no
6100 side-effects.
6101
6102 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
6103
6104 PR java/8618
6105 * parse.y (create_anonymous_class): Remove 'location' argument. Use
6106 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
6107 (craft_constructor): Inherit access flags for implicit constructor
6108 from the enclosing class.
6109 (create_class): Fix comment typo.
6110 (resolve_qualified_expression_name): Pass type of qualifier to
6111 not_accessible_p, not the type in which target field was found.
6112 (not_accessible_p): Handle inner classes. Expand protected
6113 qualifier-subtype check to enclosing instances, but don't apply this
6114 check to static members. Allow protected access to inner classes
6115 of a subtype. Allow private access within common enclosing context.
6116 (build_super_invocation): Get WFL line number info from current
6117 class decl.
6118 (build_incomplete_class_ref): Update for new create_anonymous_class
6119 signature.
6120 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
6121 common_enclosing_instance_p.
6122 * class.c (common_enclosing_context_p): New. Determine if types
6123 share a common enclosing context, even across static contexts.
6124 (common_enclosing_instance_p): Renamed from
6125 common_enclosing_context_p. Determines if types share a common
6126 non-static enclosing instance.
6127 * java-tree.h (common_enclosing_instance_p): Declare.
6128 * jcf-write.c (get_method_access_flags): New. Surpress private flag
6129 for inner class constructors.
6130 (generate_classfile): Use get_method_access_flags.
6131
6132 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
6133
6134 * class.c (interface_of_p): Check for null TYPE_BINFO.
6135
6136 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
6137
6138 * class.c (make_class): Do not create binfo here.
6139 (set_super_info): Create it here.
6140 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
6141
6142 2004-07-08 Richard Henderson <rth@redhat.com>
6143
6144 * expr.c (case_identity, get_primitive_array_vtable,
6145 java_expand_expr, emit_init_test_initialization): Remove.
6146 * java-tree.h (java_expand_expr): Remove.
6147 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
6148
6149 2004-07-07 Per Bothner <per@bothner.com>
6150
6151 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
6152 get internal error due to mismatched types.
6153
6154 * gcj.texi (Invoking gij): Document new -verbose:class flag.
6155
6156 * gcj.texi (Linking): New node. Document -lgij usage.
6157
6158 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
6159
6160 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
6161 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
6162 * java/class.c (set_super_info, class_depth, interface_of_p,
6163 maybe_add_interface, add_interface, make_class_data,
6164 layout_class, add_miranda_methods): Adjust BINFO macros.
6165 * expr.c (can_widen_reference_to, lookup_field): Likewise.
6166 * jcf-write.c (generate_classfile): Likewise.
6167 * parse.y (patch_anonymous_class,
6168 check_inner_circular_reference, check_circular_reference,
6169 java_complete_class, check_abstract_method_definitions,
6170 java_check_abstract_method_definitions,
6171 check_interface_throws_clauses, java_check_abstract_methods,
6172 lookup_java_interface_method2,
6173 find_applicable_accessible_methods_list): Likewise.
6174 * typeck.c (find_method_in_interface): Likewise.
6175 * verify.c (merge_types): Likewise.
6176
6177 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
6178
6179 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
6180 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
6181
6182 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
6183
6184 * class.c (make_class): Use make_tree_binfo.
6185 (set_super_info, add_interface_do): Likewise.
6186 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
6187
6188 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
6189
6190 * verify.c: Correct array element access formatting thinko.
6191
6192 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
6193
6194 * verify.c: Insert a short blurb at the start referring to the JVMS.
6195 (merge_type_state): Remove redundant nested if statement.
6196 (verify_jvm_instructions): Ensure current_subr is initialised to
6197 NULL_TREE.
6198 Minor formatting fixes all over the place.
6199
6200 2004-07-02 Richard Henderson <rth@redhat.com>
6201
6202 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
6203
6204 2004-07-01 Richard Henderson <rth@redhat.com>
6205
6206 * class.c (registerClass_libfunc): Remove.
6207 (init_class_processing): Don't set it.
6208 (emit_register_classes): Take list_p parameter. Fill it in
6209 with _Jv_RegisterClass calls.
6210 * decl.c (java_init_decl_processing): Don't call
6211 init_resource_processing.
6212 * jcf-parse.c (java_emit_static_constructor): New.
6213 (java_parse_file): Call it.
6214 * resource.c (registerResource_libfunc): Remove.
6215 (init_resource_processing): Remove.
6216 (write_resource_constructor): Take list_p parameter. Fill it in
6217 with _Jv_RegisterResource calls.
6218 * java-tree.h: Update prototypes.
6219
6220 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
6221
6222 PR java/1262
6223 * class.c (layout_class_method): Do not override package-private
6224 method if its in a different package.
6225 (split_qualified_name): Move here from parse.y. Rename from
6226 breakdown_qualified. Add comment.
6227 (in_same_package): Move here from parse.y. Add comment.
6228 * java-tree.h (break_down_qualified, in_same_package): Declare.
6229 (in_same_package): Likewise.
6230 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
6231 Callers updated.
6232
6233 2004-06-29 Andrew Haley <aph@redhat.com>
6234
6235 * except.c (expand_start_java_handler): Push a new binding level.
6236 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
6237 register_exception_range() to register where we'll do it.
6238 (expand_end_java_handler): Remove old bogus code. Replace with
6239 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
6240 the top of the expression we're curently building.
6241 (maybe_end_try): Delete.
6242 * decl.c (binding_level.exception_range): New field.
6243 (clear_binding_level): Add field exception_range. Reformat.
6244 (poplevel): Call expand_end_java_handler().
6245 (poplevel): Call java_add_stmt only if functionbody is false.
6246 (maybe_poplevels): Don't call maybe_end_try() from here.
6247 (end_java_method): Clear no longer used trees in function decl.
6248 (register_exception_range): New function.
6249 * java-tree.h (register_exception_range, struct eh_range): Declare.
6250
6251 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
6252
6253 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
6254
6255 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
6256
6257 Formatting fixes.
6258 * expr.c (class_has_finalize_method): Fix method name indentation.
6259 (expand_java_call): Remove K&R style parameter declaration.
6260 (expand_invoke): Fix statement indentation.
6261 (expand_java_field_op): Likewise.
6262 * parse-scan.y: Fix typo.
6263 (reset_report): Fix method name indentation.
6264 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
6265 line. Fix typos.
6266 * verify.c (verify_jvm_instructions): Document parameters, insert
6267 page break.
6268 * lang.c (lang_init_source): Fix method name indentation.
6269 * class.c (common_enclosing_context_p): Likewise.
6270 (emit_symbol_table): Fix parameter list indentation.
6271 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
6272 parameter declaration.
6273 * constants.c: Fix copyright notice indentation.
6274 * typeck.c (find_method_in_superclasses): Fix parameter list
6275 indentation.
6276 (find_method_in_interfaces): Likewise.
6277 * zextract.c (makelong): Fix method name indentation.
6278
6279 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6280
6281 PR java/15715.
6282 * parse.y (create_interface): Set correct access modifiers for
6283 interfaces.
6284 * jcf-write.c (get_classfile_modifiers): New function.
6285 (generate_classfile): Use get_classfile_modifiers, not
6286 get_access_flags.
6287
6288 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6289
6290 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
6291 dependency to current parser context, not NULL_TREE, for top-level
6292 classes.
6293 (jdep_resolve_class): Enable member access check for all inner
6294 class dependencies.
6295
6296 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6297
6298 * parse.y (qualify_and_find): Pass type decl, not identifier, to
6299 load_class.
6300
6301 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6302
6303 PR java/15734
6304 * expr.c (expand_java_field_op): Ensure that target class for static
6305 field access has been loaded.
6306
6307 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6308 Ranjit Mathew <rmathew@hotmail.com>
6309
6310 PR java/1207, java/16178
6311 * jcf-parse.c (load_class): Return immediately if passed a type decl
6312 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
6313 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
6314 before calling load_class.
6315 (qualify_and_find): Likewise.
6316 (find_in_imports_on_demand): Likewise.
6317 (find_applicable_accessible_methods_list): Likewise.
6318
6319 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
6320
6321 * parse.y (java_layout_seen_class_methods): Don't call load_class
6322 on class defined by source parser.
6323
6324 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
6325
6326 * parse.y (set_nested_class_simple_name_value): Removed.
6327 (java_complete_expand_class): Remove calls to
6328 set_nested_class_simple_name_value.
6329
6330 2004-06-22 Andrew Haley <aph@redhat.com>
6331 Ranjit Mathew <rmathew@hotmail.com>
6332
6333 Fixes PR java/16113.
6334 * decl.c (force_poplevels): Remove call to expand_end_bindings.
6335
6336 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
6337
6338 * parse.y (create_class): Correct diagnostic message about
6339 java.lang.Object extending anything else.
6340
6341 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6342
6343 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
6344 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
6345 * constants.c (build_ref_from_constant_pool): Likewise.
6346 * expr.c (build_java_array_length_access): Likewise.
6347 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
6348 (invoke_build_dtable, build_invokevirtual): Likewise.
6349 (build_invokeinterface, java_expand_expr): Likewise.
6350 (emit_init_test_initialization): Likewise.
6351 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6352 * parse.y (make_qualifed_name, build_array_ref): Likewise.
6353
6354 2004-06-21 Andrew Haley <aph@redhat.com>
6355
6356 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
6357 block.
6358
6359 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
6360
6361 * jcf.h (struct JCF): Change java_source, right_zip and finished
6362 to unsigned int.
6363 * lex.h (struct java_lexer): Change hit_eof, read_anything,
6364 byte_swap and use_fallback to unsigned int.
6365 * parse.h (struct _jdep): Change flag0 to unsigned int.
6366
6367 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
6368
6369 Fixes PR java/13948
6370 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
6371 before trying to lay out its methods.
6372 * jcf-parse.c (read_class): Track parsed files using canonical paths
6373 obtained via lrealpath from libiberty.
6374 (java_parse_file): Likewise.
6375 (parse_source_file_1): Rename formal parameter to reflect its
6376 modified purpose. Minor formatting fix.
6377
6378 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
6379
6380 * class.c (emit_register_classes): Make the function uninlinable,
6381 do not set current_function_cannot_inline.
6382 * resource.c (write_resource_constructor): Do not reset
6383 flag_inline_functions around rest_of_compilation.
6384
6385 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
6386
6387 PR java/15769
6388 * expr.c (java_truthvalue_conversion): Handle
6389 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
6390 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
6391 i.e. return the expression.
6392
6393 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
6394
6395 * gjavah.c: Include version.h
6396
6397 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
6398
6399 * jcf-write.c (generate_bytecode_conditional): Correct handling
6400 of unordered conditionals. Add comment.
6401
6402 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
6403 Per Bothner <per@bothner.com>
6404
6405 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
6406 local variable was initialised upon declaration.
6407 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
6408 variable was final and initialised upon declaration.
6409 * check-init.c (check_final_reassigned): Give error only if a blank
6410 final is not definitely unassigned or if an initialised final is
6411 reassigned.
6412 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
6413 assignment expressions. Remove case MODIFY_EXPR, label do_default.
6414 (check_init): Perform initialised-variable-removing-optimisation
6415 only on non-final local variables.
6416
6417 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6418
6419 * jcf-write.c (generate_bytecode_conditional): Handle binops
6420 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
6421 and LTGT_EXPR.
6422 (generate_bytecode_insns): Likewise.
6423
6424 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6425
6426 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
6427 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
6428
6429 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6430
6431 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
6432 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
6433
6434 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
6435
6436 * decl.c (struct binding_level): Add GTY marker. Compile
6437 binding_depth unconditionally.
6438 (current_binding_level, free_binding_level, global_binding_level):
6439 Likewise.
6440 (clear_binding_level): Unconditionally set binding_depth.
6441 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
6442
6443 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
6444
6445 * lex.c (java_new_lexer): Set 'encoding'.
6446 (java_read_char): Improve error message for unrecognized characters.
6447 * lex.h (struct java_lexer): New field 'encoding'.
6448
6449 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
6450
6451 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
6452
6453 2004-05-21 Mark Wielaard <mark@klomp.org>
6454
6455 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
6456 extern.
6457
6458 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
6459
6460 * typeck.c: Remove non-printable character 160.
6461
6462 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
6463
6464 * check-init.c: Correct minor typos.
6465
6466 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6467
6468 * Make-lang.in, expr.c, java-gimplify.c: Rename
6469 tree-simple.[ch] to tree-gimple.[ch].
6470
6471 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
6472
6473 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
6474
6475 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6476
6477 Merge from tree-ssa-20020619-branch. See
6478 ChangeLog.tree-ssa for details.
6479
6480 * Make-lang.in, builtins.c, check-init.c, class.c,
6481 constants.c, decl.c, except.c, expr.c, java-except.h,
6482 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
6483 lang.c, lang.opt, parse.y, resource.c: Merged.
6484 * java-gimplify.c: New file.
6485
6486 2004-05-10 Andrew Haley <aph@redhat.com>
6487
6488 * parse.y (create_class): Set TYPE_VFIELD.
6489 * decl.c (java_init_decl_processing): Likewise.
6490
6491 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
6492 * class.c (make_method_value): Replace DECL_VINDEX with call to
6493 get_method_index().
6494 (get_dispatch_vector): Likewise.
6495 (layout_class_method): Likewise.
6496 Replace set of DECL_VINDEX with call to set_method_index().
6497 (set_method_index): New function.
6498 (get_method_index): New function.
6499 * java-tree.h (set_method_index): New function decl.
6500 (get_method_index): New function decl.
6501
6502 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
6503
6504 * parse.y (check_pkg_class_access): Add new argument
6505 and use it when cl is NULL to call lookup_cl on it.
6506 (parser_check_super_interface): Do not call lookup_cl.
6507 Pass this_decl to check_pkg_class_access and NULL
6508 instead of lookup_cl.
6509 (parser_check_super): Update for change in
6510 check_pkg_class_access.
6511 (do_resolve_class): Likewise.
6512 (process_imports): Likewise.
6513 (find_in_imports_on_demand): Likewise.
6514 (resolve_qualified_expression_name): Likewise.
6515
6516 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
6517
6518 Fixes PR java/9685, PR java/15073
6519 * parse.y (accessibility_string): New method.
6520 (not_accessible_field_error): Use accessibility_string()
6521 instead of java_accstring_lookup().
6522 (resolve_qualified_expression_name): Check with
6523 check_pkg_class_access() before allowing access using
6524 qualified names.
6525 Fix comment typo.
6526 Use check_pkg_class_access() instead of not_accessible_p()
6527 for unqualified types.
6528 (not_accessible_p): Use DECL_CONTEXT (member) instead of
6529 REFERENCE for package-private access checking.
6530 (patch_method_invocation): Use accessibility_string() instead
6531 of java_accstring_lookup().
6532
6533 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
6534
6535 Fixes PR java/15133
6536 * gjavah.c (struct method_name): Add member is_native.
6537 (overloaded_jni_method_exists_p): Match candidate method only if
6538 it is native.
6539 (print_method_info): Initialise is_native flag from the method's
6540 access flags.
6541
6542 2004-04-30 Roger Sayle <roger@eyesopen.com>
6543
6544 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6545 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6546
6547 2004-04-22 Roger Sayle <roger@eyesopen.com>
6548
6549 * resource.c (write_resource_constructor): Guard call to possibly
6550 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6551
6552 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
6553
6554 * class.c (make_class_data): Add new field aux_info.
6555 * decl.c (java_init_decl_processing): Push type and decl for
6556 `aux_info'.
6557
6558 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6559
6560 * expr.c (expand_java_NEW): Don't use size argument for
6561 _Jv_AllocObject calls.
6562 * parse.y (patch_invoke): Likewise.
6563
6564 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6565
6566 * expr.c (build_invokeinterface): Remove unused variables to
6567 fix warnings.
6568
6569 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6570
6571 * class.c (get_interface_method_index): New function. Return dispatch
6572 index for interface method.
6573 (make_method_value): For interface methods, set index field to
6574 iface dispatch index, not DECL_VINDEX.
6575 * expr.c (build_invokeinterface): Use get_interface_method_index.
6576
6577 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6578
6579 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6580
6581 2004-03-31 Andrew Haley <aph@redhat.com>
6582
6583 PR java/14104
6584 * jcf-io.c (opendir_in_zip): Tidy up error handling.
6585
6586 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6587
6588 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6589 form of GTY markers.
6590
6591 2004-03-25 Marcus Meissner <meissner@suse.de>
6592
6593 PR java/14689:
6594 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6595
6596 2004-03-23 Tom Tromey <tromey@redhat.com>
6597
6598 PR java/14315:
6599 * jcf-write.c (make_class_file_name): Don't report if mkdir
6600 failed with EEXIST.
6601
6602 2004-03-23 Tom Tromey <tromey@redhat.com>
6603
6604 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6605
6606 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
6607
6608 * class.c, gjavah.c, lang.c: Fix comment typos.
6609 * gcj.texi: Fix typos.
6610
6611 2004-03-19 Per Bothner <per@bothner.com>
6612
6613 * gcj.texi (Code Generation): Document new flags and assert defaults.
6614
6615 * class.c (assume_compiled_node_struct): Rename type to
6616 class_flag_node_struct, as it is now also used for enable_assertions.
6617 Rename assume_compiled_node typedef. Rename excludep field to value.
6618 (find_assume_compiled_node): Rename function to find_class_flag_node.
6619 Minor optimization - avoid needless strlen.
6620 (add_assume_compiled): Some tweaking and optimization.
6621 Rename and generalize to add_class_flag takem an extra parameter.
6622 (add_assume_compled): New just calls add_class_flag.
6623 (add_enable_assert, enable_assertions): New functions.
6624 (enable_assert_tree): New static.
6625 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6626 * lang.opt (fenable-assertions, fenable-assertions=,
6627 fdisable-assertions, fdisable-assertions=): New options.
6628 * lang.c (java_handle_option): Handle new options.
6629 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
6630 class in an interface - create helper class nested in outer interface.
6631 (build_assertion): Short-circuit if enable_assertions is false.
6632
6633 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6634
6635 * java-tree.h: Changes throughout to add checking to macros
6636 and numerous whitespace changes.
6637 (VAR_OR_FIELD_CHECK): New macro.
6638 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6639 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6640
6641 2004-03-16 Per Bothner <per@bothner.com>
6642
6643 * jcf-jump.c (options): New --print-constants option.
6644 * gcj.texi (Invoking jcf-dump): Document --print-constants.
6645
6646 * jcf-dump.c (flag_print_constant_pool): Default to off.
6647 (print_constant_terse_with_index): New helper function.
6648 (various places): Check flag_print_constant_pool where missing.
6649 (main): If verbose set flag_print_constant_pool.
6650 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
6651
6652 2004-03-15 Andrew Haley <aph@redhat.com>
6653
6654 PR java/14581
6655 * parse.y (java_complete_lhs): Check that final variable has an
6656 initializer.
6657
6658 2004-03-12 Andrew Haley <aph@redhat.com>
6659
6660 PR java/14551
6661 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6662 conversion.
6663
6664 2004-02-29 Roger Sayle <roger@eyesopen.com>
6665
6666 * jcf-parse.c (java_parse_file): Handle the case that input_filename
6667 is NULL.
6668
6669 2004-02-27 Per Bothner <per@bothner.com>
6670
6671 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
6672 suggestion: Use build_incomplete_class_ref.
6673 This fixes PR java/13508, java/11714.
6674
6675 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
6676
6677 * java/parse.h: Update copyright.
6678
6679 2004-02-26 Andrew Haley <aph@redhat.com>
6680
6681 PR java/14231:
6682 * parse.y (check_interface_throws_clauses): Check for
6683 !METHOD_INVISIBLE (iface_method).
6684 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6685 well as CLASS_ABSTRACT.
6686
6687 2004-02-25 Per Bothner <per@bothner.com>
6688
6689 * parse.y (build_assertion): If we're in an inner class, create the
6690 class$ helper routine in the outer class.
6691
6692 2004-02-19 Richard Henderson <rth@redhat.com>
6693
6694 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6695
6696 2004-02-16 Geoffrey Keating <geoffk@apple.com>
6697
6698 * Make-lang.in (java.install-man): Add extra dependencies.
6699
6700 2004-02-13 Geoffrey Keating <geoffk@apple.com>
6701
6702 * Make-lang.in: Install man pages under the same names
6703 (possibly transformed) as the program they document.
6704
6705 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
6706
6707 * gjavah.c: Include "intl.h".
6708 (error): New function.
6709 (main): Call gcc_init_libintl.
6710 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6711 print_stub_or_jni, process_file, main): Use error rather than
6712 fprintf.
6713 (print_method_info, usage, help, version, main): Mark strings for
6714 translation with _. Avoid splitting up sentences. Send
6715 information messages to stdout.
6716 * jcf-dump.c: Include "intl.h".
6717 (main): Call gcc_init_libintl.
6718 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6719 Mark error, usage and version messages for translation with _.
6720 Avoid splitting up sentences.
6721 * jv-scan.c: Include "intl.h".
6722 (fatal_error, warning): Change parameter s to msgid. Translate
6723 messages.
6724 (main): Call gcc_init_libintl.
6725 (usage, help, version): Mark error, usage and version messages for
6726 translation with _. Avoid splitting up sentences.
6727 * jvgenmain.c: Include "intl.h".
6728 (main): Call gcc_init_libintl.
6729 (usage, main): Mark error messages for translation with _.
6730 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6731 JVGENMAIN_OBJS): Add intl.o.
6732 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6733 java/jvgenmain.o): Update dependencies.
6734
6735 2004-02-08 Per Bothner <per@bothner.com>
6736
6737 * parse.y (resolve_qualified_expression_name): In case of inaccessible
6738 class don't use not_accessible_field_error, which can get confused.
6739
6740 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
6741
6742 Make-lang.in (po-generated): Delete.
6743
6744 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
6745
6746 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6747 Depend on target.h.
6748 * decl.c: Include target.h.
6749 (start_java_method): Replace PROMOTE_PROTOTYPES with
6750 targetm.calls.promote_prototypes.
6751 * expr.c: Include target.h.
6752 (pop_arguments): Replace PROMOTE_PROTOTYPES with
6753 targetm.calls.promote_prototypes.
6754 * parse.y: Include target.h.
6755 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6756 with targetm.calls.promote_prototypes.
6757
6758 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6759
6760 * typeck.c: Update copyright.
6761
6762 2004-02-02 Tom Tromey <tromey@redhat.com>
6763
6764 * decl.c (java_init_decl_processing): Remove duplicate
6765 gnu/gcj/RawData.
6766
6767 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
6768
6769 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6770
6771 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
6772
6773 * expr.c (build_field_ref): Move variable
6774 definition up.
6775
6776 2004-01-28 Andrew Haley <aph@redhat.com>
6777
6778 * expr.c (build_field_ref): Widen field offset.
6779
6780 2004-01-27 Andrew Haley <aph@redhat.com>
6781
6782 java/13273
6783 * parse.y (check_interface_throws_clauses): Make sure class_decl
6784 has been loaded.
6785
6786 2004-01-22 Jeff Sturm <jsturm@one-point.com>
6787
6788 PR java/13733
6789 * parse.y (patch_assignment): Don't modify lhs_type for
6790 reference assignments.
6791
6792 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6793
6794 * Make-lang.in: Replace $(docdir) with doc.
6795 (java.info, java.srcinfo, java.man, java.srcman): New rules.
6796 (java.install-man): Revamp rule.
6797
6798 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6799
6800 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6801 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6802 instead of deferred backquote.
6803
6804 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
6805
6806 * typeck.c (find_method_in_interfaces): Move variable
6807 definition up.
6808
6809 2004-01-16 Andrew Haley <aph@redhat.com>
6810
6811 PR java/13273:
6812 * typeck.c (shallow_find_method): New.
6813 (find_method_in_superclasses): New.
6814 (find_method_in_interfaces): New.
6815 (lookup_do): Rewrite.
6816 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6817
6818 * jcf-parse.c (read_class): Save and restore output_class.
6819 * decl.c (java_expand_body): Set output_class from fndecl.
6820
6821 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
6822
6823 * class.c (gen_indirect_dispatch_tables): Fix string length
6824 calculations.
6825
6826 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6827
6828 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6829 (java.srcextra): Copy above back to source directory if requested.
6830 (po-generated): Delete reference to $(parsedir).
6831 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6832 Use implicit rule.
6833
6834 2004-01-14 Jan Hubicka <jh@suse.cz>
6835
6836 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6837 estimation.
6838
6839 2004-01-09 Mark Mitchell <mark@codesourcery.com>
6840
6841 * java-tree.h (java_expand_expr): Change prototype.
6842 * expr.c (java_expand_expr): Add alt_rtl parameter.
6843
6844 2004-01-09 Andrew Haley <aph@redhat.com>
6845
6846 PR java/12755:
6847 * parse.y (java_fix_constructors): Set output_class.
6848 (java_reorder_fields): Likewise.
6849 (java_layout_classes): Likewise.
6850 (java_expand_classes): Generate indirect dispatch tables.
6851 (java_expand_classes): Set output_class.
6852 (java_finish_classes): Likewise.
6853 * lang.c (java_init): Turn on always_initialize_class_p if we're
6854 using indirect dis[atch.
6855 (java_decl_ok_for_sibcall): Use output_class, not current_class.
6856 (java_get_callee_fndecl): Use class local atable.
6857 * jcf-parse.c
6858 (always_initialize_class_p): Decl moved to java-tree.h.
6859 (HANDLE_CLASS_INFO): Set output_class.
6860 (read_class): Likewise.
6861 (parse_class_file): Call gen_indirect_dispatch_tables.
6862 (parse_zip_file_entries): Set output_class.
6863 (java_parse_file): Set output_class. Don't emit symbol tables.
6864 * java-tree.h (output_class): New.
6865 Remove global declarations for otable, atable, and ctable.
6866 (always_initialize_class_p): moved here from decl.c.
6867 (DECL_OWNER): New.
6868 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6869 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6870 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6871 (struct lang_type): Add otable_methods, otable_decl,
6872 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6873 ctable_decl, catch_classes, type_to_runtime_map.
6874 * expr.c (build_field_ref): Make otable, atable, and ctable class
6875 local rather than global.
6876 (build_known_method_ref): Likewise.
6877 (build_invokeinterface): Likewise.
6878 (java_expand_expr): Pass runtime type (rather than actual type) to
6879 expand_start_catch.
6880 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6881 this class. Look up each class in that map to delete duplicates.
6882 (expand_end_java_handler): Pass runtime type (rather than actual
6883 type) to expand_start_catch.
6884 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6885 (do_nothing): New.
6886 (java_init_decl_processing): Rearrange things. Remove global
6887 declarations of otable, atable, and ctable.
6888 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6889 (java_expand_body): Set output_class.
6890 * constants.c (build_constant_data_ref): Use output_class, not
6891 current_class.
6892 (alloc_name_constant): Likewise.
6893 * class.c (gen_indirect_dispatch_tables): New.
6894 (build_class_ref): Generate hard reference to superclass, even if
6895 using indirect dispatch.
6896 (build_static_field_ref): Use class local atable.
6897 (make_class_data): Generate hard reference to superclass, even if
6898 using indirect dispatch.
6899 Generate symbolic references to interfaces when using indirect
6900 dispatch.
6901 (make_class_data): Emit otable, atable, and ctable.
6902 Make otable, atable, and ctable class local rather than global.
6903 (emit_catch_table): Make otable, atable, and ctable class local
6904 rather than global.
6905
6906 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
6907
6908 * parse.y (catch_clause_parameter): Fix typo.
6909
6910 PR java/13404
6911 * parse.y: (catch_clause_parameter): Return early if $3, aka
6912 formal_parameter, is null.
6913
6914 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
6915
6916 * class.c: Remove uses of "register" specifier in
6917 declarations of arguments and local variables.
6918 * decl.c: Likewise.
6919 * expr.c: Likewise.
6920 * gjavah.c: Likewise.
6921 * jcf-dump.c: Likewise.
6922 * jcf-io.c: Likewise.
6923 * jcf-parse.c: Likewise.
6924 * jcf-write.c: Likewise.
6925 * keyword.h: Likewise.
6926 * parse.y: Likewise.
6927 * typeck.c: Likewise.
6928 * verify.c: Likewise.
6929
6930 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
6931
6932 * Make-lang.in (GCJ_CROSS_NAME): Delete.
6933 (java.install_common, java.install-man): Adjust for above.
6934 (java.uninstall): Likewise.
6935
6936 2003-12-03 Michael Koch <konqueror@gmx.de>
6937
6938 * class.c (make_class_data):
6939 Push field value to 'hack_signers' instead of 'signers'.
6940 * decl.c (java_init_decl_processing):
6941 Push field 'hack_signers' instead of 'signers'.
6942
6943 2003-12-03 Zack Weinberg <zack@codesourcery.com>
6944
6945 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
6946 including iconv.h.
6947
6948 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
6949
6950 PR java/12374:
6951 * parse.y (qualify_ambiguous_name): Remove lots of broken
6952 field access processing - there's no need to do that here,
6953 because we have resolve_field_access. Remove
6954 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
6955 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
6956 used.
6957
6958 2003-12-01 Jeff Sturm <jsturm@one-point.com>
6959
6960 Fix PR java/13237
6961 * parse.y (java_complete_lhs): Save location prior to patching
6962 CALL_EXPR.
6963
6964 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
6965
6966 PR java/12548
6967 * resource.c (write_resource_constructor): Append
6968 "_resource" to constructor identifier name.
6969
6970 2003-11-25 Jeff Sturm <jsturm@one-point.com>
6971
6972 Fix PR java/13183.
6973 * constants.c (cpool_for_class): New function.
6974 (outgoing_cpool): Remove global variable.
6975 (alloc_name_constant): Use cpool_for_class.
6976 (build_constants_constructor): Likewise.
6977 * decl.c (java_expand_body): Set current_class.
6978 * java-tree.h (outgoing_cpool) Remove declaration.
6979 (init_outgoing_cpool): Likewise.
6980 * jcf-parse.c (init_outgoing_cpool): Remove function.
6981 (parse_class_file): Don't call init_outgoing_cpool.
6982 * parse.y (java_complete_expand_methods): Don't call
6983 init_outgoing_cpool. Don't save outgoing_cpool.
6984 (java_expand_classes): Don't restore outgoing_cpool.
6985 (java_finish_classes): Likewise.
6986
6987 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
6988
6989 * Make-lang.in: (java.install-common) Add
6990 symlink for $(target_noncanonical)-gcjh for
6991 native builds.
6992
6993 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
6994
6995 * Make-lang.in (java.extraclean): Delete.
6996
6997 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
6998
6999 * Make-lang.in (check-java): Add.
7000
7001 2003-11-19 Jeff Sturm <jsturm@one-point.com>
7002
7003 Fix PR java/13024.
7004 * except.c (prepare_eh_table_type): Allocate variable-sized
7005 buffer `buf' with alloca.
7006
7007 2003-11-17 Jeff Sturm <jsturm@one-point.com>
7008
7009 Fix PR java/12857.
7010
7011 decl.c (java_init_decl_processing): Don't initialize
7012 class_not_found_type_node, no_class_def_found_type_node.
7013
7014 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
7015 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
7016 (class_not_found_type_node, no_class_def_found_type_node):
7017 Don't define.
7018
7019 parse.y (build_dot_class_method_invocation): Add this_class
7020 argument. Qualify method invocations to a different class.
7021 (create_new_parser_context): Initialize saved_data_ctx to 0.
7022 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
7023 (build_dot_class_method): Don't load classes. Register
7024 incomplete types.
7025 (build_incomplete_class_ref): Special cases for interfaces
7026 and inner classes. Move build_dot_class_method call to here...
7027 (patch_incomplete_class_ref): ...from here. Pass current_class
7028 to build_dot_class_method_invocation.
7029 (build_assertion): Pass class_type to
7030 build_dot_class_method_invocation.
7031 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
7032
7033 2003-11-17 Jeff Sturm <jsturm@one-point.com>
7034
7035 Fix PR java/12739.
7036 * java-tree.h (BLOCK_EMPTY_P): Define.
7037 * parse.y (java_complete_lhs): Check for empty blocks
7038 in TRY_FINALLY_EXPR case.
7039
7040 2003-11-17 Andrew Haley <aph@redhat.com>
7041
7042 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
7043 (struct lang_decl_var:freed): New variable.
7044 * decl.c (poplevel): Mark local vars that have gone out of scope.
7045 (push_jvm_slot): Don't use the RTL of a var that has gone out of
7046 scope.
7047
7048 2003-11-16 Jason Merrill <jason@redhat.com>
7049
7050 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
7051 and TAGS files that include them for each front end.
7052
7053 2003-11-15 Tom Tromey <tromey@redhat.com>
7054
7055 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
7056
7057 2003-11-12 Jason Merrill <jason@redhat.com>
7058
7059 PR optimization/12547
7060 * lang.c (java_tree_inlining_walk_subtrees): Just walk
7061 BLOCK_EXPR_BODY directly.
7062
7063 2003-11-12 Andrew Haley <aph@redhat.com>
7064
7065 PR java/11045
7066 * parse.y (fold_constant_for_init): Check that we really do have a
7067 constant.
7068
7069 PR java/11533
7070 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
7071 init_test_decls being inlined.
7072
7073 PR java/12890:
7074 * parse.y (do_resolve_class): Check return value from
7075 breakdown_qualified().
7076
7077 2003-11-11 Tom Tromey <tromey@redhat.com>
7078
7079 PR java/12915:
7080 * parse.y (merge_string_cste): Handle case where we have a
7081 pointer that happens to be zero, not null_pointer_node.
7082
7083 2003-11-10 Tom Tromey <tromey@redhat.com>
7084
7085 * jcf-parse.c (classify_zip_file): Correctly compare
7086 filename_length against length of manifest file's name.
7087
7088 2003-11-08 Tom Tromey <tromey@redhat.com>
7089
7090 PR java/12894:
7091 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
7092
7093 2003-11-06 Andrew Haley <aph@redhat.com>
7094
7095 * expr.c (java_stack_swap): Make sure destination stack slots are
7096 of the correct type.
7097
7098 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
7099
7100 * Make-lang.in (dvi): Move targets to $(docobjdir).
7101 (gcj.dvi): Simplify rule and adjust target.
7102 (gcj.info): Simplify rule.
7103 (gcj.pod): New intermediate rule.
7104 (gcjh.pod): Likewise.
7105 (jv-scan.pod): Likewise.
7106 (jcf-dump.pod): Likewise.
7107 (gij.pod): Likewise.
7108 (jv-convert.pod): Likewise.
7109 (rmic.pod): Likewise.
7110 (rmiregistry.pod): Likewise.
7111 (gcj.1): Delete.
7112 (gcjh.1): Delete.
7113 (jv-scan.1): Delete.
7114 (jcf-dump.1): Delete.
7115 (gij.1): Delete.
7116 (jv-convert.1): Delete.
7117 (rmic.1): Delete.
7118 (rmiregistry.1): Delete.
7119
7120 2003-11-02 Jeff Sturm <jsturm@one-point.com>
7121
7122 Fixes PR java/12866.
7123 * parse.y (resolve_qualified_expression_name): Move test
7124 for outer field access methods from here...
7125 (check_thrown_exceptions) ...to here.
7126
7127 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
7128
7129 * .cvsignore: Delete.
7130
7131 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
7132
7133 * verify.c (verify_jvm_instructions): Don't warn about legal
7134 eh binding regions generated for example by jdk 1.4.1.
7135
7136 2003-10-24 David S. Miller <davem@redhat.com>
7137
7138 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
7139
7140 2003-10-22 Andrew Haley <aph@redhat.com>
7141
7142 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
7143 (java_get_callee_fndecl): New.
7144
7145 * jcf-parse.c (java_parse_file): Call emit_catch_table().
7146
7147 * java-tree.h (ctable_decl): New.
7148 (catch_classes): New.
7149 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
7150
7151 * decl.c (java_init_decl_processing): Add catch_class_type.
7152 Add ctable_decl.
7153 Add catch_classes field.
7154
7155 * class.c (build_indirect_class_ref): Break out from
7156 build_class_ref.
7157 (make_field_value): Check flag_indirect_dispatch.
7158 (make_class_data): Ditto.
7159 Tidy uses of PUSH_FIELD_VALUE.
7160 Add field catch_classes.
7161 (make_catch_class_record): New.
7162
7163 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
7164
7165 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
7166
7167 * jcf-write.c: Follow spelling conventions.
7168 * parse.y: Likewise.
7169
7170 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
7171
7172 * ChangeLog: Fix typos.
7173 * expr.c: Fix comment typos.
7174 * jcf-write.c: Likewise.
7175 * lang.c: Likewise.
7176 * lex.c: Likewise.
7177 * mangle.c: Likewise.
7178 * parse-scan.y: Likewise.
7179 * parse.y: Likewise.
7180
7181 2003-10-22 Tom Tromey <tromey@redhat.com>
7182
7183 * expr.c (expand_byte_code): Only warn about dead bytecode when
7184 extra_warnings is set.
7185
7186 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
7187
7188 Fix for PR java/12586.
7189 * mangle.c (find_compression_record_match): Don't iterate through
7190 package namespace elements unless they all match compression_table
7191 entries.
7192
7193 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
7194
7195 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
7196 (generate-manpages): Likewise.
7197 (java.maintainer-clean): Likewise.
7198 (gcj.info): Likewise.
7199 (gcj.1): Likewise.
7200 (gcjh.1): Likewise.
7201 (jv-scan.1): Likewise.
7202 (jcf-dump.1): Likewise.
7203 (gij.1): Likewise.
7204 (jv-convert.1): Likewise.
7205 (rmic.1): Likewise.
7206 (rmiregistry.1): Likewise.
7207 (java.install-man): Likewise.
7208 (parse-scan.o): Move and define complete compile line.
7209 (parse.o): Likewise.
7210 (jcf-tree-inline.o): Move.
7211
7212 2003-10-20 Mark Mitchell <mark@codesourcery.com>
7213
7214 * Make-lang.in (info): Update dependencies.
7215 (java.install-info): Remove.
7216 ($(srcdir)/java/gcj.info): Replace with ...
7217 ($(docobjdir)/gcj.info): ... this.
7218
7219 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
7220
7221 * Make-lang.in: Replace uses of $(target_alias) with
7222 $(target_noncanonical).
7223
7224 2003-10-09 Tom Tromey <tromey@redhat.com>
7225
7226 * decl.c (java_init_decl_processing): Declare signers field.
7227 * class.c (make_class_data): Set signers field.
7228
7229 2003-10-09 Jason Merrill <jason@redhat.com>
7230
7231 * parse.y (patch_assignment): Use make_node to create a BLOCK.
7232 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
7233 POINTER_TYPE.
7234
7235 2003-10-06 Mark Mitchell <mark@codesourcery.com>
7236
7237 * Make-lang.in (java.info): Replace with ...
7238 (info): ... this.
7239 (java.dvi): Replace with ...
7240 (dvi): ... this.
7241 (java.generated-manpages): Replace with ...
7242
7243 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
7244
7245 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
7246
7247 2003-10-01 Andrew Haley <aph@redhat.com>
7248
7249 * jcf-parse.c (java_parse_file): Write otable and atable.
7250 * java-tree.h (atable_methods): New.
7251 (atable_decl): New.
7252 (atable_syms_decl): New.
7253 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
7254 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
7255 (symbol_*type): Rename method_symbol* to symbol*type.
7256 (emit_offset_symbol_table): Delete.
7257 (emit_symbol_table): New.
7258 (get_symbol_table_index): New.
7259 (atable_type): New.
7260 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
7261 (build_known_method_ref): Likewise.
7262 (get_symbol_table_index): Rename from get_offset_table_index.
7263 Parameterize to allow re-use by differing types of symbol table.
7264 (build_invokevirtual): Pass table to get_offset_table_index.
7265 * decl.c (java_init_decl_processing): Push types and decls for
7266 atable and atable_syyms.
7267 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
7268 (make_class_data): Add new fields atable and atable_syms.
7269 (emit_symbol_table): Rename from emit_offset_symbol_table.
7270 Parameterize to allow re-use by different types of symbol table.
7271 (build_symbol_entry): Renamed from build_method_symbols_entry.
7272
7273 2003-09-30 Roger Sayle <roger@eyesopen.com>
7274
7275 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
7276 semantics for SAVE_EXPR, by caching the result in a temporary.
7277
7278 2003-09-28 Richard Henderson <rth@redhat.com>
7279
7280 * check-init.c (check_init): Save and restore input_location
7281 instead of file and line separately.
7282 * decl.c (java_expand_body): Likewise.
7283 * jcf-write.c (generate_bytecode_insns): Likewise.
7284 * parse.y (safe_layout_class): Likewise.
7285 * jcf-parse.c (read_class, parse_class_file): Likewise.
7286 (java_parse_file): Use %H for warning locator.
7287
7288 2003-09-28 Roger Sayle <roger@eyesopen.com>
7289
7290 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
7291 with void-type branches instead of using a COMPOUND_EXPR.
7292
7293 2003-09-28 Jeff Sturm <jsturm@one-point.com>
7294
7295 * decl.c (java_optimize_inline, dump_function): Remove.
7296 * java-tree.h (java_optimize_inline): Remove declaration.
7297 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
7298 * parse.y (source_end_java_method, java_expand_classes):
7299 Likewise. Remove dead code.
7300
7301 2003-09-27 Roger Sayle <roger@eyesopen.com>
7302
7303 * lang.c (java_init_options): Set flag_evaluation_order.
7304 * expr.c (force_evaluation_order): Don't attempt to force
7305 evaluation order of binary operations using save_expr.
7306 * parse.y (java_complete_lhs): No longer need to call
7307 force_evaluation_order when constructing binary operators.
7308
7309 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
7310 Bryce McKinlay <bryce@mckinlay.net.nz>
7311
7312 PR java/1333:
7313 * parse.y (not_accessible_field_error): New function.
7314 (resolve_expression_name): Check field access permissions.
7315 (resolve_qualified_expression_name): Use
7316 not_accessible_field_error.
7317 (resolve_qualified_expression_name): Likewise.
7318
7319 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7320
7321 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
7322
7323 2003-09-23 Roger Sayle <roger@eyesopen.com>
7324
7325 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
7326 with equal operands without side-effects.
7327
7328 2003-09-22 Jeff Sturm <jsturm@one-point.com>
7329
7330 * decl.c (java_init_decl_processing): Don't emit otable decls
7331 if flag_indirect_dispatch is not set.
7332
7333 2003-09-21 Richard Henderson <rth@redhat.com>
7334
7335 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7336 resource.c: Revert.
7337
7338 2003-09-21 Richard Henderson <rth@redhat.com>
7339
7340 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7341 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
7342
7343 2003-09-20 Richard Henderson <rth@redhat.com>
7344
7345 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
7346
7347 2003-09-18 Roger Sayle <roger@eyesopen.com>
7348
7349 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
7350 * check-init.c (check_init): Likewise.
7351
7352 2003-09-18 Roger Sayle <roger@eyesopen.com>
7353
7354 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
7355
7356 2003-09-16 Andrew Haley <aph@redhat.com>
7357
7358 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
7359
7360 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
7361
7362 Fixes PR java/9577
7363 * mangle.c (find_compression_record_match): Skip
7364 over a "6JArray" (the array template mangled string)
7365 IDENTIFIER_NODE.
7366 (mangle_array_type): Correct minor typo.
7367 (atms): Move definition to the beginning.
7368
7369 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
7370
7371 * class.c (add_miranda_methods): Ensure super-interfaces are laid
7372 out. Fix for PR java/12254.
7373
7374 2003-09-11 Richard Henderson <rth@redhat.com>
7375
7376 * parse.y (source_end_java_method): Update for new
7377 cgraph_finalize_function argument.
7378
7379 2003-09-09 Richard Henderson <rth@redhat.com>
7380
7381 * parse.y (source_end_java_method): Update call to
7382 cgraph_finalize_function.
7383
7384 2003-09-03 Jeff Sturm <jsturm@one-point.com>
7385
7386 * decl.c (java_expand_body): New function.
7387 * expr.c (build_class_init): Set DECL_IGNORED_P.
7388 * java-tree.h (start_complete_expand_method,
7389 java_expand_body): Declare.
7390 * jcf-parse.c (cgraph.h): Include.
7391 (java_parse_file): Handle flag_unit_at_a_time.
7392 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
7393 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
7394 (java_estimate_num_insns): Use walk_tree_without_duplicates.
7395 (java_start_inlining): New function.
7396 * parse.h (java_finish_classes): Declare.
7397 * parse.y: Include cgraph.h.
7398 (block): Don't special-case empty block production.
7399 (craft_constructor): Set DECL_INLINE.
7400 (source_end_java_method): Handle flag_unit_at_a_time.
7401 Replace inline code with call to java_expand_body.
7402 (start_complete_expand_method): Remove static modifier.
7403 (java_expand_method_bodies): Patch function tree for
7404 class initialization and/or synchronization as needed.
7405 Don't begin RTL expansion yet.
7406 (java_expand_classes): Check flag_unit_at_a_time before
7407 calling finish_class.
7408 (java_finish_classes): New function.
7409 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
7410 (patch_assignment): Set DECL_CONTEXT on temporary variable.
7411 (emit_test_initialization): Set DECL_IGNORED_P.
7412
7413 2003-09-03 Roger Sayle <roger@eyesopen.com>
7414
7415 * builtins.c (enum builtin_type): Delete unused enumeration.
7416 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
7417
7418 2003-08-28 Tom Tromey <tromey@redhat.com>
7419
7420 * gcj.texi (Extensions): Document gcjlib URLs.
7421
7422 2003-08-20 Tom Tromey <tromey@redhat.com>
7423
7424 * gcj.texi (Extensions): Added xref.
7425 (libgcj Runtime Properties): Document
7426 gnu.gcj.runtime.VMClassLoader.library_control.
7427
7428 2003-08-20 Andrew Haley <aph@redhat.com>
7429
7430 * except.c (prepare_eh_table_type): Use new encoding for exception
7431 handlers when using -fno-assume-compiled.
7432
7433 2003-08-13 Tom Tromey <tromey@redhat.com>
7434
7435 * gcj.texi (Invoking gij): Document -X and -?.
7436
7437 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
7438
7439 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
7440 GCJH_OBJS, JCFDUMP_OBJS
7441 * win32-host.c: Removed the unnecessary and broken dependency
7442 on jcf.h
7443
7444 2003-08-11 Tom Tromey <tromey@redhat.com>
7445
7446 * parse.y (java_check_regular_methods): Typo fixes. Call
7447 check_interface_throws_clauses. Use
7448 check_concrete_throws_clauses.
7449 (check_interface_throws_clauses): New function.
7450 (check_concrete_throws_clauses): New function.
7451 (hack_is_accessible_p): New function.
7452 (find_most_specific_methods_list): Added FIXME.
7453 * typeck.c (lookup_do): Use `flags' argument to decide what to
7454 do. Reimplemented.
7455 (lookup_argument_method_generic): New function.
7456 (lookup_argument_method2): Removed.
7457 * jcf.h (ACC_INVISIBLE): New define.
7458 * jcf-write.c (generate_classfile): Skip invisible methods.
7459 * class.c (add_miranda_methods): New function.
7460 (layout_class_methods): Use it.
7461 (get_access_flags_from_decl): Use ACC_INVISIBLE.
7462 * java-tree.h (METHOD_INVISIBLE): New define.
7463 (lang_decl_func) [invisible]: New field.
7464 (lookup_argument_method_generic): Declare.
7465 (SEARCH_INTERFACE): New define.
7466 (SEARCH_SUPER): Likewise.
7467 (SEARCH_ONLY_INTERFACE): Likewise.
7468 (SEARCH_VISIBLE): Likewise.
7469 (lookup_argument_method2): Removed declaration.
7470
7471 2003-08-05 Tom Tromey <tromey@redhat.com>
7472
7473 Fix for PR java/11600:
7474 * parse.y (java_complete_lhs): See whether we're calling a method
7475 on an array.
7476 (check_thrown_exceptions): Added `is_array_call' argument;
7477 fixed `clone' checking; updated all callers.
7478
7479 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
7480
7481 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
7482
7483 2003-08-03 Tom Tromey <tromey@redhat.com>
7484
7485 * java-tree.h (METHOD_TRANSIENT): Removed.
7486 * decl.c (pushdecl): Removed some dead code.
7487 * class.c (get_access_flags_from_decl): Can't have transient
7488 method.
7489 (add_method_1): Can't have a transient method.
7490
7491 2003-07-28 Andreas Jaeger <aj@suse.de>
7492
7493 * jvspec.c: Convert to ISO C90 prototypes.
7494
7495 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
7496
7497 * decl.c (force_poplevels): Fix warning call.
7498
7499 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7500
7501 * expr.c (expand_java_field_op): Don't use xxx_with_decl
7502 (expand_java_field_op): Likewise.
7503 * class.c (layout_class_method): Likewise
7504 (emit_register_classes): Likewise.
7505 * decl.c (pushdecl): Likewise.
7506 (poplevel): Likewise.
7507 (force_poplevels): Likewise.
7508 (give_name_to_locals): Likewise.
7509 * check-init.c (check_for_initialization): Likewise.
7510
7511 2003-07-24 Jason Merrill <jason@redhat.com>
7512
7513 * java-tree.h: Move boolean_type_node et al to the back end.
7514
7515 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7516
7517 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7518 casts.
7519
7520 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
7521
7522 * lang.opt: Don't show -MD_ and -MDD_.
7523
7524 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
7525
7526 * lang-options.h: Remove.
7527 * lang.opt: Add help text.
7528
7529 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
7530
7531 * expr.c: Remove the last argument to expand_assignment().
7532
7533 2003-07-09 Jan Hubicka <jh@suse.cz>
7534
7535 * java-tree.h (DECL_NUM_STMTS): Rename to...
7536 (DECL_ESTIMATED_INSNS): ... this.
7537 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7538 New static functions.
7539 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7540 * parser.y (add_stmt_to_compound): Do not account statements.
7541
7542 2003-07-08 Mark Wielaard <mark@klomp.org>
7543
7544 * gcj.texi: CNI now expands to Compiled Native Interface.
7545
7546 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7547
7548 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7549
7550 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
7551
7552 * expr.c (expand_byte_code): Adjist emit_line_note call.
7553
7554 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
7555
7556 * lang.c (java_handle_option): Don't handle filenames.
7557
7558 2003-07-02 Zack Weinberg <zack@codesourcery.com>
7559
7560 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7561 DIR_SEPARATOR.
7562 Use FILENAME_CMP.
7563 * jcf-write.c: Don't default-define DIR_SEPARATOR.
7564 * jcf.h: Delete COMPARE_FILENAMES definition.
7565
7566 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
7567
7568 * lang.c (java_init_options): Update prototype.
7569
7570 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
7571
7572 * decl.c (poplevel): Adjust define_label call.
7573
7574 2003-06-27 Zack Weinberg <zack@codesourcery.com>
7575
7576 * gjavah.c (flag_jni): Make non-static.
7577 * parse-scan.y (ctxp): Make non-static.
7578
7579 * class.c (build_method_symbols_entry)
7580 * expr.c (get_offset_table_index)
7581 * jcf-parse.c (jcf_parse):
7582 Mark the definition static, matching the forward declaration.
7583
7584 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
7585
7586 * lang.c (java_handle_option): Don't check for missing arguments.
7587
7588 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
7589
7590 * class.c (push_class): Use a location_t to save place.
7591 (emit_register_classes): Set input_location. Adjust
7592 expand_function_end call.
7593 * resource.c (write_resource_constructor): Likewise.
7594 * decl.c (end_java_method): Adjust expand_function_end call.
7595 * parse.y (source_end_java_method): Likewise.
7596
7597 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
7598
7599 * lang.c (java_handle_option): Likewise.
7600
7601 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
7602
7603 * lang.c (java_handle_option): Special-casing of optional
7604 joined arguments no longer needed.
7605 * lang.opt: Update switches that take optional argument.
7606
7607 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7608
7609 * lang.opt: Declare Java.
7610 * lang.c (java_init_options): Update.
7611
7612 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7613
7614 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7615
7616 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7617
7618 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7619 * lang.c (java_handle_option): -MD and -MMD have an underscore.
7620 * lang.opt: -MD and -MMD have an underscore.
7621
7622 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
7623
7624 * class.c (emit_register_classes): Adjust init_function_start
7625 call.
7626 * decl.c (complete_start_java_method): Likewise.
7627 * resource.c (write_resource_constructor): Likewise.
7628
7629 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7630
7631 * Make-lang.in: Update to use options.c and options.h.
7632 * lang.c: Include options.h not j-options.h.
7633 (java_handle_option): Abort on unrecognized option.
7634 (java_init_options): Request Java switches.
7635
7636 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
7637
7638 * Make-lang.in: Handle mostlyclean.
7639
7640 2003-06-11 Tom Tromey <tromey@redhat.com>
7641
7642 * lang.c (java_handle_option): Update dependency_tracking for
7643 OPT_MF case.
7644
7645 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7646 empty argument.
7647
7648 2003-06-10 Andrew Haley <aph@redhat.com>
7649
7650 * resource.c (write_resource_constructor): Use expand_expr to
7651 generate the address of the label attached to a resource.
7652 * Make-lang.in (java/resource.o): Add expr.h
7653
7654 2003-06-10 Andrew Haley <aph@redhat.com>
7655
7656 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7657 (java_decl_ok_for_sibcall): New.
7658
7659 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
7660
7661 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7662 (java/j-options.c, java/j-options.h): New.
7663 * java-tree.h (resource_name, compile_resource_file,
7664 compile_resource_data): Constify.
7665 * jcf-write.c (jcf_write_base_directory): Similarly.
7666 * jcf.h (jcf_write_base_directory): Similarly.
7667 * lang.c: Include j-options.h.
7668 (cl_options_count, cl_options, string_option, java_decode_option,
7669 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7670 process_option_with_no): Remove.
7671 (resource_name): Constify.
7672 (LANG_HOOKS_HANDLE_OPTION): Override.
7673 (java_handle_option): New.
7674 (java_init): Don't call jcf_path_init.
7675 (java_init_options): Call jcf_path_init.
7676 * lang.opt: New.
7677 * resource.c (compile_resource_data, compile_resource_file): Constify.
7678
7679 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
7680
7681 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7682 (struct lang_decl_func): Add last_line field.
7683 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7684 DECL_SOURCE_LINE_LAST): Remove.
7685 * parse.y (missing_return_error, finish_method_declaration,
7686 lookup_cl, start_artificial_method_body, source_end_java_method,
7687 start_complete_expand_method): Adjust.
7688
7689 2003-06-08 Tom Tromey <tromey@redhat.com>
7690
7691 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7692 fno-assume-compiled.
7693
7694 2003-06-08 Roger Sayle <roger@eyesopen.com>
7695
7696 * builtins.c (define_builtin_type, builtin_types): Delete.
7697 (define_builtin): Rewritten to take just the built-in code,
7698 the function's name, type and fallback library function name.
7699 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7700 (initialize_builtins): Overhaul to define the GCC builtins
7701 used by gcj manually, providing the Java run-time's
7702 implementations as the fallback library function.
7703
7704 2003-06-08 Anthony Green <green@redhat.com>
7705
7706 * parse.y (patch_cast): Fix conversions from floating-point to
7707 integral types.
7708
7709 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
7710
7711 * Make-lang.in: Update.
7712 * lang.c: Include opts.h. Define cl_options_count and cl_options.
7713
7714 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
7715
7716 * lang.c (java_init_options): Update.
7717
7718 2003-06-05 Jan Hubicka <jh@suse.cz>
7719
7720 * Make-lang.in: Add support for stageprofile and stagefeedback
7721
7722 2003-05-31 Roger Sayle <roger@eyesopen.com>
7723
7724 * lang.c (java_init_options): Prescribe wrap-around two's
7725 complement arithmetic overflow by setting flag_wrapv.
7726
7727 2003-05-29 Roger Sayle <roger@eyesopen.com>
7728
7729 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7730 (builtin_record): Add an additional builtin_code field to
7731 record which GCC built-in corresponds to the Java function.
7732 (java_builtins): Add new entries for atan, atan2, exp, log,
7733 pow and tan.
7734 (max_builtin, min_builtin, abs_builtin): Perform constant
7735 folding on the resulting tree.
7736 (java_build_function_call_expr): Likewise, perform constant
7737 folding on the resulting tree.
7738 (initialize_builtins): The NULL creators are now allowed in
7739 the java_builtins table, which is now terminated by an entry
7740 with builtin_code == END_BUILTINS.
7741 (check_for_builtin): Likewise. If the matching creator is
7742 NULL, construct the call using java_build_function_call_expr
7743 directly with the decl for the corresponding builtin_code.
7744
7745 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
7746
7747 * win32-host.c: Normalize copyright boilerplate.
7748
7749 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7750
7751 * parse.y (print_int_node): Use string concatentation on
7752 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7753 function calls into one.
7754
7755 2003-05-13 Zack Weinberg <zack@codesourcery.com>
7756
7757 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7758 fatal_io_error with calls to fatal_error; add ": %m" to the end of
7759 all the affected error messages.
7760
7761 2003-05-13 Richard Henderson <rth@redhat.com>
7762
7763 * class.c (layout_class_method): Set DECL_EXTERNAL.
7764 * decl.c (java_mark_decl_local, java_mark_class_local): New.
7765 * java-tree.h (java_mark_class_local): Declare.
7766 * jcf-parse.c (parse_class_file): Use it.
7767 * parse.y (java_expand_classes): Likewise.
7768
7769 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
7770
7771 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7772 * lex.h: #include input.h.
7773 * jv-scan.c (input_filename): Remove.
7774
7775 2003-05-02 Tom Tromey <tromey@redhat.com>
7776
7777 PR java/10491:
7778 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7779 (handle_inner_classes): New function.
7780
7781 2003-05-01 Tom Tromey <tromey@redhat.com>
7782
7783 PR java/10459:
7784 * parse.y (finish_for_loop): Do nothing if update expression is a
7785 EXPR_WFL_NODE wrapping nothing.
7786 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7787
7788 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
7789
7790 * lex.h (input_lineno): Remove declaration.
7791 * parse-scan.y: #include input.h.
7792 (input_filename): Remove declaration.
7793 (input_location): Add definition.
7794 (input_line): Remove definition.
7795
7796 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
7797
7798 * lex.h (lineno): Rename to ...
7799 (input_line): ... here
7800 * parse-scan.y (lineno): Rename to ...
7801 (input_line): ... here.
7802 (reset_report): Rename lineno to input_line.
7803 * check-init.c (check_init): Likewise.
7804 * class.c (push_class): Likewise.
7805 * decl.c (complete_start_java_method, end_java_method): Likewise.
7806 * expr.c (expand_byte_code): Likewise.
7807 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7808 * jcf-write.c (generate_bytecode_insns): Likewise.
7809 * lex.c (java_init_lex, java_allocate_new_line,
7810 do_java_lex): Likewise.
7811 * parse.h (YYNOT_TWICE): Likewise.
7812 * parse.y (empty_statement, expression_statement,
7813 java_pop_parser_context, java_parser_context_save_global,
7814 yyerror, register_fields, method_header, safe_layout_class,
7815 find_in_imports_on_demand, create_artificial_method,
7816 source_end_java_method, start_complete_expand_method,
7817 build_thisn_assign, java_complete_lhs,
7818 maybe_absorb_scoping_block): Likewise.
7819
7820 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
7821
7822 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7823 '/' when computing java source filename
7824
7825 2003-04-13 Tom Tromey <tromey@redhat.com>
7826
7827 * gjavah.c (print_c_decl): Indentation fix.
7828
7829 2003-04-12 Zack Weinberg <zack@codesourcery.com>
7830
7831 * class.c (make_field_value, make_method_value, get_dispatch_table)
7832 (make_class_data, emit_offset_symbol_table)
7833 * constants.c (build_constants_constructor)
7834 * java-tree.h (START_RECORD_CONSTRUCTOR)
7835 * parse.y (maybe_build_array_element_wfl):
7836 Use build_constructor.
7837
7838 2003-04-10 Eric Blake <ebb9@email.byu.edu>
7839
7840 PR java/10253:
7841 * parse.y (string_convert_int_cst): Always use at least one digit
7842 in string conversion. Remove ASCII dependence.
7843 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7844
7845 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
7846
7847 * Make-lang.in: added win32-host.c
7848 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7849 resolves to open() on non-Win32 platforms and
7850 Win32-specific jcf_open_exact_case() on Win32
7851 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7852 when trying .java and .class files
7853 * win32-host.c: added to repository. Defines
7854 Win32-specific jcf_open_exact_case()
7855
7856 2003-04-10 Andrew Haley <aph@redhat.com>
7857
7858 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7859 (maybe_free_localvar): Renamed from localvar_free.
7860 Add new arg, really.
7861 (generate_bytecode_insns): Set new variable, jsrs.
7862 Only free local vars if no jsr insns have been emittted.
7863 Call maybe_free_localvar, not localvar_free.
7864
7865 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
7866
7867 * gcj.texi: Remove @ at start of file.
7868
7869 2003-03-25 Tom Tromey <tromey@redhat.com>
7870
7871 * parse.y (create_interface): Call CHECK_DEPRECATED.
7872
7873 2003-03-23 Zack Weinberg <zack@codesourcery.com>
7874
7875 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7876
7877 2003-03-21 Zack Weinberg <zack@codesourcery.com>
7878
7879 * javaop.h (jfloat, jdouble): Make them structures mirroring
7880 the bit fields of IEEE float and double respectively.
7881 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7882 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7883 (union Word, union DWord): Delete.
7884 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7885
7886 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7887 D_NAN_MASK): Delete.
7888 (jni_print_float, jni_print_double): New. Generate
7889 hexadecimal floating constants.
7890 (print_field_info): Use jni_print_float/double.
7891
7892 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
7893 finite floating point numbers for output; special case
7894 non-finite floats.
7895
7896 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
7897
7898 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7899 Replace 0 and 1 with true and false in return statements.
7900
7901 2003-03-19 Tom Tromey <tromey@redhat.com>
7902
7903 * lex.c (do_java_lex): Renamed from java_lex.
7904 (java_lex): New function.
7905 Include timevar.h.
7906
7907 2003-03-13 Tom Tromey <tromey@redhat.com>
7908
7909 * parse.y (resolve_inner_class): Error if qualifier is a primitive
7910 type.
7911
7912 2003-03-04 Andrew Haley <aph@redhat.com>
7913
7914 * gjavah.c (is_first_data_member): New global variable.
7915 (print_c_decl): If it's the first data member, align it as the
7916 superclass.
7917 (process_file): Set is_first_data_member.
7918
7919 2003-03-11 Tom Tromey <tromey@redhat.com>
7920
7921 * parse.y (resolve_field_access): Initialize class if field is
7922 found in another static field.
7923 * expr.c (build_class_init): Don't optimize out initialization of
7924 implemented interface.
7925
7926 2003-03-11 Andrew Haley <aph@redhat.com>
7927
7928 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
7929 warning.
7930
7931 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
7932
7933 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
7934 and DIR_SEPARATOR_2 for a target.
7935 Correct minor typos.
7936
7937 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
7938 and DIR_SEPARATOR_2 for a target into account.
7939
7940 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
7941
7942 * lang.c (java_init): Update prototype, move code to java_post_options.
7943 (java_post_options): Similarly.
7944
7945 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
7946
7947 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
7948 compare file name components depending on the case-sensitivity
7949 or otherwise of the host file system.
7950
7951 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
7952 "strcmp" to compare file name components.
7953 Use IS_DIR_SEPARATOR instead of comparing directly against
7954 DIR_SEPARATOR.
7955 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
7956 comparing directly against DIR_SEPARATOR.
7957
7958 2003-03-04 Tom Tromey <tromey@redhat.com>
7959
7960 * Make-lang.in (java.tags): New target.
7961
7962 2003-03-01 Roger Sayle <roger@eyesopen.com>
7963
7964 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
7965 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
7966
7967 2003-03-01 Tom Tromey <tromey@redhat.com>
7968
7969 * parse.y (jdep_resolve_class): Only check deprecation if we found
7970 a decl.
7971
7972 2003-02-28 Tom Tromey <tromey@redhat.com>
7973
7974 PR java/9695:
7975 * class.c (maybe_layout_super_class): Always pass a WFL to
7976 do_resolve_class.
7977 * parse.y (do_resolve_class): Updated comment to explain
7978 parameters.
7979
7980 2003-02-26 Tom Tromey <tromey@redhat.com>
7981
7982 * jcf-write.c (generate_classfile): Check whether class is
7983 deprecated before writing attribute count.
7984
7985 2003-02-25 Roger Sayle <roger@eyesopen.com>
7986
7987 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
7988 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
7989
7990 2003-02-23 Tom Tromey <tromey@redhat.com>
7991
7992 * lang-options.h: Added -Wdeprecated.
7993 * gcj.texi (Warnings): Document -Wdeprecated.
7994 * java-tree.h (flag_deprecated): Declare.
7995 * lang.c (lang_W_options): Added deprecated.
7996 (flag_deprecated): New global.
7997 * chartables.h: Rebuilt.
7998 * gen-table.pl (process_one): Look at whitespace.
7999 (print_tables): Define LETTER_SPACE, LETTER_MASK.
8000 * parse.h (CLEAR_DEPRECATED): New macro.
8001 (CHECK_DEPRECATED_NO_RESET): New macro.
8002 * jcf-parse.c (handle_deprecated): New function.
8003 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
8004 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
8005 * parse.y (resolve_type_during_patch): Check deprecation.
8006 (jdep_resolve_class): Likewise.
8007 (process_imports): Likewise.
8008 (resolve_expression_name): Likewise.
8009 (check_deprecation): Strip arrays from decl. Check
8010 flag_deprecated.
8011 (patch_method_invocation): Also check the particular constructor
8012 for deprecation.
8013 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
8014 * jcf-write.c (append_deprecated_attribute): New function.
8015 (generate_classfile): Generate deprecated attribute when
8016 appropriate.
8017 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
8018 (java_lex) [case '*']: Simplify logic.
8019 (java_start_char_p): Use LETTER_MASK.
8020 (java_part_char_p): Likewise.
8021 (java_space_char_p): New function.
8022
8023 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
8024
8025 Change base class access representation.
8026 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
8027 (add_interface_do): Likewise.
8028
8029 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
8030
8031 * decl.c (java_init_decl_processing): Change
8032 soft_lookupjnimethod_node to reflect the change in
8033 signature of _Jv_LookupJNIMethod in libjava/jni.cc
8034 * expr.c (build_jni_stub): Calculate and pass the size
8035 on the stack of the arguments to a JNI function. Use
8036 new target macro MODIFY_JNI_METHOD_CALL to allow a
8037 target to modify the call to a JNI method.
8038
8039 2003-02-08 Roger Sayle <roger@eyesopen.com>
8040
8041 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
8042 instead of basename to avoid compiler warnings on Tru64.
8043
8044 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
8045
8046 * gcj.texi: Update to GFDL 1.2.
8047
8048 2003-01-31 Andrew Haley <aph@redhat.com>
8049
8050 * parse.y (java_expand_classes): Scan the whole class list looking
8051 for access methods that haven't yet been expanded.
8052
8053 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
8054
8055 Fix for java/4269:
8056
8057 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
8058 to fix bootstrap on sparc-unknown-netbsdelf1.5.
8059 * jcf-parse.c: Likewise.
8060
8061 2003-01-31 Mark Wielaard <mark@klomp.org>
8062
8063 * gjavah.c (throwable_p): Allocate 1 more byte for string.
8064
8065 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
8066
8067 * class.c (make_class): Use BINFO_ELTS.
8068 (set_super_info): Likewse.
8069 (add_interface_do): Likewise.
8070
8071 2003-01-30 Tom Tromey <tromey@redhat.com>
8072
8073 * jcf-parse.c (read_class): Update identifier's class value if it
8074 changed during parsing.
8075
8076 2003-01-30 Loren James Rittle <ljrittle@acm.org>
8077
8078 * Make-lang.in (po-generated): Find the targets in $(parsedir).
8079 Propagate change to all other rules as required.
8080 (java/parse-scan.o): Add explicit dependency on
8081 $(parsedir)/java/parse-scan.c .
8082
8083 2003-01-29 Tom Tromey <tromey@redhat.com>
8084
8085 * parse.y (patch_assignment): Only transform the rhs of an
8086 assignment when compiling to native.
8087
8088 2003-01-28 Tom Tromey <tromey@redhat.com>
8089
8090 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
8091
8092 2003-01-28 Tom Tromey <tromey@redhat.com>
8093
8094 * lex.c (java_lex): Don't include UEOF as part of token.
8095 (java_read_unicode): Error if \u sequence prematurely terminated.
8096
8097 2003-01-27 Tom Tromey <tromey@redhat.com>
8098
8099 * parse.y (java_check_regular_methods): Check for construct after
8100 checking types in throws clause.
8101
8102 2003-01-24 Tom Tromey <tromey@redhat.com>
8103
8104 * class.c (build_static_field_ref): Only a String or numeric field
8105 can fold to a constant.
8106
8107 2003-01-23 Tom Tromey <tromey@redhat.com>
8108
8109 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
8110 file name in resource buffer.
8111
8112 2003-01-23 Tom Tromey <tromey@redhat.com>
8113
8114 * expr.c (build_known_method_ref): Use method's context to find
8115 method table index.
8116
8117 2003-01-23 Tom Tromey <tromey@redhat.com>
8118
8119 * constants.c (set_constant_entry): Allocated cleared memory.
8120
8121 2003-01-22 Tom Tromey <tromey@redhat.com>
8122
8123 * java-tree.h: Don't use PARAMS.
8124 * resource.c: Add prototypes for all functions.
8125 (write_resource_constructor): Use `const char *' to avoid
8126 warning.
8127
8128 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
8129
8130 * jcf-parse.c (process_zip_dir): Remove unused variable.
8131
8132 2003-01-22 Tom Tromey <tromey@redhat.com>
8133
8134 * expr.c (build_invokeinterface): Abort if method's context is not
8135 an interface.
8136
8137 2003-01-22 Tom Tromey <tromey@redhat.com>
8138
8139 * gcj.texi (Input and output files): Mention non-class entries.
8140 * decl.c (java_init_decl_processing): Call
8141 init_resource_processing.
8142 * java-tree.h (compile_resource_data, write_resource_constructor,
8143 compile_resource_file, init_resource_processing): Declare.
8144 * config-lang.in (gtfiles): Added resource.c.
8145 * Make-lang.in (gt-java-resource.h): New target.
8146 (JAVA_OBJS): Added resource.o.
8147 (java/resource.o): New target.
8148 * resource.c: New file.
8149 * class.c (compile_resource_file): Moved to resource.c.
8150 (registerResource_libfunc): Likewise.
8151 (utf8_decl_list): Mark with GTY; now static.
8152 * jcf-parse.c (classify_zip_file): New function.
8153 (parse_zip_file_entries): Use it; compile .properties files.
8154 (process_zip_dir): Use classify_zip_file and compute_class_name.
8155 Don't write class name into zip directory.
8156 (java_parse_file): Call write_resource_constructor.
8157 (compute_class_name): New function.
8158 * jcf-io.c (read_zip_member): Reindented.
8159
8160 2003-01-21 Tom Tromey <tromey@redhat.com>
8161
8162 * class.c (supers_all_compiled): New function.
8163 (make_class_data): Use it.
8164
8165 2003-01-21 Tom Tromey <tromey@redhat.com>
8166
8167 * parse.y (method_header): Native method can't be strictfp.
8168 No method can be transient or volatile.
8169
8170 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8171
8172 Make-lang.in (jvspec.o-warn): Add -Wno-error.
8173
8174 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
8175
8176 * check-init.c: Fix comment typos.
8177 * class.c: Likewise.
8178 * constants.c: Likewise.
8179 * decl.c: Likewise.
8180 * except.c: Likewise.
8181 * expr.c: Likewise.
8182 * java-except.h: Likewise.
8183 * java-tree.h: Likewise.
8184 * javaop.h: Likewise.
8185 * jcf-dump.c: Likewise.
8186 * jcf-io.c: Likewise.
8187 * jcf-parse.c: Likewise.
8188 * jcf-write.c: Likewise.
8189 * lang.c: Likewise.
8190 * mangle.c: Likewise.
8191 * typeck.c: Likewise.
8192 * verify.c: Likewise.
8193
8194 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8195
8196 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
8197 * jcf-write.c: Include "tm_p.h".
8198
8199 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8200
8201 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
8202
8203 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8204
8205 * builtins.c (java_build_function_call_expr): Renamed from
8206 build_function_call_expr. All callers changed.
8207
8208 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
8209 * jcf-parse.c: Include tm_p.h.
8210
8211 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
8212 warning.
8213
8214 2003-01-14 Tom Tromey <tromey@redhat.com>
8215
8216 * class.c (make_class_data): Check that super is compiled before
8217 building class reference to it.
8218
8219 2003-01-14 Andrew Haley <aph@redhat.com>
8220
8221 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8222 varargs function -- correct.
8223
8224 2003-01-14 Andrew Haley <aph@redhat.com>
8225
8226 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
8227
8228 2003-01-14 Andrew Haley <aph@redhat.com>
8229
8230 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8231 varargs function -- correct.
8232
8233 * parse.y (patch_assignment): Copy the rhs of an assignment into a
8234 temporary if the RHS is a reference.
8235
8236 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8237
8238 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
8239 * keyword.h: Regenerated.
8240
8241 * All Files: Convert to ISO C style function definitions.
8242
8243 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
8244
8245 * parse.y (check_pkg_class_access): ANSIfy definition.
8246
8247 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8248
8249 * decl.c, parse-scan.y, parse.y: Don't cast return value of
8250 xmalloc et al.
8251
8252 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
8253
8254 2003-01-09 Geoffrey Keating <geoffk@apple.com>
8255
8256 Merge from pch-branch:
8257
8258 2002-12-02 Geoffrey Keating <geoffk@apple.com>
8259
8260 * Make-lang.in (java/gjavah.o): Update dependencies.
8261 * gjavah.c: Include ggc.h.
8262
8263 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
8264
8265 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
8266 (JCFDUMP_OBJS): Add ggc-none.o.
8267 (java/jcf-dump.o): Depend on GGC_H.
8268 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
8269 CPool substructures.
8270 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
8271 * jcf-dump.c: Include ggc.h.
8272
8273 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
8274
8275 * jcf.h (union cpool_entry): New.
8276 (struct CPool): Use gengtype to mark. Change field 'data' to be
8277 an array of unions.
8278 (struct JCF): Use gengtype to mark.
8279 (CPOOL_UINT): Update for new cpool_entry type.
8280 (CPOOL_USHORT1): Likewise.
8281 (CPOOL_USHORT2): Likewise.
8282 (CPOOL_FINISH): Use GC to free cpool subfields.
8283 * parse.h (struct parser_ctxt): Mark field current_jcf.
8284 * lex.c (java_init_lex): Use GC to allocate struct JCF.
8285 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
8286 (main_jcf): Use gengtype to mark.
8287 (ggc_mark_jcf): Delete.
8288 (get_constant): Update for new cpool_entry type.
8289 (give_name_to_class): Likewise.
8290 (get_class_constant): Likewise.
8291 (init_outgoing_cpool): Use GGC to allocate struct CPool.
8292 (java_parse_file): Use GGC to allocate struct JCF.
8293 (init_jcf_parse): Don't call ggc_add_root.
8294 * jcf-reader.c (jcf_parse_constant_pool): Update for new
8295 cpool_entry type.
8296 * java-tree.h (current_jcf): Use gengtype to mark.
8297 (CPOOL_UTF): Update for new cpool_entry type.
8298 (outgoing_cpool): Use gengtype to mark.
8299 (struct lang_type): GC struct JCF and struct CPool.
8300 * config-lang.in (gtfiles): Add jcf.h.
8301 * constants.c (find_tree_constant): New.
8302 (set_constant_entry): Allocate cpool subfields using GGC. Update
8303 for new cpool_entry type.
8304 (find_constant1): Update for new cpool_entry type.
8305 (find_constant2): Likewise.
8306 (find_utf8_constant): Use find_tree_constant.
8307 (find_class_or_string_constant): Remove unnecessary cast to jword.
8308 Update for new cpool_entry type.
8309 (count_constant_pool_bytes): Update for new cpool_entry type.
8310 (write_constant_pool): Likewise.
8311 (alloc_name_constant): Use find_tree_constant.
8312 (build_constants_constructor): Update for new cpool_entry type.
8313
8314 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
8315
8316 * parse.y (mark_parser_ctxt): Delete.
8317 (goal): Don't use ggc_add_root.
8318 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
8319 (java_pop_parser_context): Let GC free parser_ctxt.
8320 (java_parser_context_resume): Likewise.
8321 * parse.h (struct parser_ctxt): Use gengtype to mark.
8322 (ctxp): Likewise.
8323 (ctxp_for_generation): Likewise.
8324 * lex.h (struct java_lc_s): Mark for gengtype.
8325 (java_lexer): Rearrange for gengtype.
8326 * config-lang.in (gtfiles): Add lex.h, parse.h.
8327
8328 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8329
8330 * All Files: Remove PARAMS macro.
8331
8332 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
8333 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
8334 `__STDC__' macros.
8335
8336 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
8337 VA_CLOSE.
8338
8339 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
8340
8341 * Make-lang.in (java.install-common, java.uninstall,
8342 java.install-info, java.install-man): Prepend $(DESTDIR)
8343 to destination paths in all (un)installation commands.
8344 (java.install-common): Rewrite $(LN) command to support
8345 DESTDIR with "ln" as well as with "ln -s".
8346
8347 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
8348
8349 * java-tree.h: Protect against multiple inclusion.
8350
8351 2003-01-07 Tom Tromey <tromey@redhat.com>
8352
8353 * class.c (add_assume_compiled): Don't adjust parent if we're
8354 already at the root of tree.
8355
8356 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8357
8358 * lang.c (dump_compound_expr): Prototype.
8359
8360 2003-01-03 Tom Tromey <tromey@redhat.com>
8361
8362 Fix for PR java/8712:
8363 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
8364 when simply checking against `null'.
8365
8366 2003-01-03 Tom Tromey <tromey@redhat.com>
8367
8368 * gcj.texi (Standard Properties): Document http.proxyHost and
8369 http.proxyPort.
8370
8371 * gcj.texi (GNU Classpath Properties): Document new properties.
8372
8373 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8374
8375 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
8376 java/lang-options.h, java/mangle.c, java/mangle_name.c,
8377 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
8378
8379 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
8380
8381 * Make-lang.in, boehm.c, buffer.c,
8382 buffer.h, builtins.c, class.c,
8383 config-lang.in, constants.c,
8384 convert.h, decl.c, except.c,
8385 expr.c, java-except.h,
8386 java-tree.h, javaop.def,
8387 jcf-parse.c, jcf-write.c,
8388 jv-scan.c, jvgenmain.c,
8389 jvspec.c, keyword.gperf,
8390 keyword.h, lang-options.h,
8391 lang-specs.h, lang.c, lex.c,
8392 lex.h, mangle.c, mangle_name.c,
8393 parse-scan.y, parse.h, parse.y,
8394 typeck.c, verify.c, xref.c,
8395 xref.h: Replace "GNU CC" with
8396 "GCC" in the copyright header.
8397
8398 * check-init.c, gjavah.c, javaop.h,
8399 jcf-depend.c, jcf-dump.c, jcf-io.c,
8400 jcf-path.c, jcf-reader.c, jcf.h,
8401 zextract.c, zipfile.h: These files are
8402 "part of GCC". Also say "GCC" not "GNU CC".
8403
8404 2002-12-30 DJ Delorie <dj@redhat.com>
8405
8406 * Make-lang.in: Protect against texi2pod/pod2man failing.
8407
8408 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
8409
8410 * gcj.texi: Use @copying.
8411
8412 2002-12-27 Mark Mitchell <mark@codesourcery.com>
8413
8414 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
8415 print_cxx_classname.
8416 (print_cxx_classname): Add add_scope parameter.
8417 (print_class_decls): Do not emit a semicolon after the extern
8418 "Java" block.
8419 (process_file): Adjust calls to print_cxx_classname.
8420
8421 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
8422
8423 * gcj.texi: Include Cover Texts in man page.
8424
8425 2002-12-23 Jeff Sturm <jsturm@one-point.com>
8426
8427 * class.c (build_static_field_ref): Check FIELD_FINAL.
8428
8429 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
8430 instead of current_constant_pool_data_ref.
8431 * java-tree.h (current_constant_pool_data_ref): Undefine.
8432 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
8433 * jcf-parse.c (init_outgoing_cpool): Don't initialize
8434 current_constant_pool_data_ref.
8435
8436 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
8437 not build_internal_class_name.
8438
8439 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
8440 Use it when class ref isn't certain to be compiled.
8441
8442 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
8443
8444 * gcj.texi: Include gcc-common.texi.
8445 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
8446 $(srcdir)/doc/include/gcc-common.texi.
8447
8448 2002-12-22 Anthony Green <green@redhat.com>
8449
8450 * gcj.texi (Limitations): Add note about org.xml.sax and
8451 org.w3c.dom.
8452
8453 2002-12-20 Tom Tromey <tromey@redhat.com>
8454
8455 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
8456 where minimum case value is Integer.MIN_VALUE.
8457 Fixes PR java/8955.
8458
8459 2002-12-18 Andrew Haley <aph@redhat.com>
8460
8461 * parse.y (patch_invoke): Force evaluation order when `check' is
8462 set. For PR libgcj/8945.
8463
8464 2002-12-16 Mark Mitchell <mark@codesourcery.com>
8465
8466 * gcj.texi: Change version number to 3.4.
8467
8468 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
8469 Andrew Haley <aph@redhat.com>
8470
8471 * parse.y (source_end_java_method): Remove custom encoding of line
8472 numbers for a function decl before passing it to the back end.
8473
8474 2002-12-03 Andrew Haley <aph@redhat.com>
8475
8476 * class.c (make_class_data): New field, "chain".
8477 * decl.c (java_init_decl_processing): Likewise.
8478
8479 2002-12-02 Tom Tromey <tromey@redhat.com>
8480
8481 For PR java/8740:
8482 * parse.y (do_resolve_class): Handle qualified name via
8483 recursion.
8484
8485 2002-11-30 Zack Weinberg <zack@codesourcery.com>
8486
8487 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
8488 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
8489 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
8490 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
8491 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
8492 Include coretypes.h and tm.h.
8493 * Make-lang.in: Update dependencies.
8494
8495 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8496
8497 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8498
8499 2002-11-25 Diego Novillo <dnovillo@redhat.com>
8500
8501 * jcf-reader.c: Don't expand JCF_readu4 inside the
8502 expansion of JCF_SKIP.
8503
8504 2002-11-25 Diego Novillo <dnovillo@redhat.com>
8505
8506 * jcf-reader.c: Don't expand JCF_readu4 inside the
8507 expansion of JCF_SKIP.
8508
8509 2002-11-22 Tom Tromey <tromey@redhat.com>
8510
8511 * parse.y (patch_binop): Cast right hand side of shift expression
8512 to `int'. Fixes PR java/8676.
8513
8514 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
8515 Andrew Haley <aph@redhat.com>
8516
8517 * gcc/java/jcf-write.c (write_classfile): Remove target
8518 class file, if it exists, before renaming the temporary
8519 class file to it.
8520
8521 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
8522
8523 * jvspec.c (lang_specific_spec_functions): New.
8524
8525 2002-11-18 Tom Tromey <tromey@redhat.com>
8526
8527 Fix for PR java/7912:
8528 * expr.c (can_widen_reference_to): Allow cast of array to
8529 Cloneable or Serializable.
8530 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8531 (java_io_serializable_identifier_node): Likewise.
8532 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8533 (valid_ref_assignconv_cast_p): Use new identifier nodes.
8534 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8535 java_io_serializable.
8536 * decl.c (java_init_decl_processing): Initialize
8537 java_lang_cloneable_identifier_node and
8538 java_io_serializable_identifier_node.
8539 (java_lang_cloneable_identifier_node): New global.
8540 (java_io_serializable_identifier_node): Likewise.
8541
8542 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
8543
8544 * buffer.c: Remove unnecessary casts.
8545 * check-init.c: Likewise.
8546 * class.c: Likewise.
8547 * constants.c: Likewise.
8548 * decl.c: Likewise.
8549 * except.c: Likewise.
8550 * gjavah.c: Likewise.
8551 * jcf-io.c: Likewise.
8552 * jcf-parse.c: Likewise.
8553 * jcf-path.c: Likewise.
8554 * jvspec.c: Likewise.
8555 * lang.c: Likewise.
8556 * lex.c: Likewise.
8557 * verify.c: Likewise.
8558
8559 2002-11-06 Tom Tromey <tromey@redhat.com>
8560
8561 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8562 a JNI header.
8563
8564 2002-11-05 Tom Tromey <tromey@redhat.com>
8565
8566 Fix for PR java/6388.
8567 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8568 * java-tree.h (enum java_tree_index): New values
8569 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8570 (decimal_int_max, decimal_long_max): New defines.
8571 * lex.c (yylex): Rewrote range checking. Sign extend literals.
8572 (error_if_numeric_overflow): Rewrote range checking.
8573 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8574 decimal_long_max.
8575
8576 2002-11-02 Tom Tromey <tromey@redhat.com>
8577
8578 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8579
8580 * class.c (make_method_value): Put class name, not signature, into
8581 `throws' field. For PR java/8415.
8582
8583 2002-10-24 Tom Tromey <tromey@redhat.com>
8584
8585 * gcj.texi (Invoking gij): Document --showversion.
8586 (Standard Properties): java.library.path now set.
8587
8588 2002-10-23 Tom Tromey <tromey@redhat.com>
8589
8590 * gjavah.c (decode_signature_piece): In JNI mode, print
8591 `jobjectArray' when array depth is nonzero.
8592 Fixes PR java/8296.
8593
8594 2002-10-15 Andrew Haley <aph@redhat.com>
8595
8596 * parse.y (patch_invoke): Call force_evaluation_order on a static
8597 arg list.
8598 (resolve_qualified_expression_name): Call force_evaluation_order
8599 on a arg list that is part of a Qualified Expression Name.
8600
8601 * lang.c (dump_compound_expr): New.
8602 (java_dump_tree): New.
8603
8604 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
8605
8606 * gcj.texi: Added item describing the GCJ runtime property
8607 "gnu.gcj.progname".
8608
8609 2002-10-15 Richard Henderson <rth@redhat.com>
8610
8611 * jcf-parse.c (get_constant): Fix type warning.
8612
8613 2002-10-15 Andrew Haley <aph@redhat.com>
8614
8615 * java-tree.h (java_inlining_merge_static_initializers): Declare.
8616 (java_inlining_map_static_initializers): Declare.
8617
8618 2002-10-14 Andrew Haley <aph@redhat.com>
8619
8620 * tree-inline.c (remap_block): All local class initialization
8621 flags go in the outermost scope.
8622 (expand_call_inline): Call java_inlining_map_static_initializers.
8623 (expand_call_inline): Call java_inlining_merge_static_initializers.
8624 * java/lang.c (merge_init_test_initialization): New.
8625 (java_inlining_merge_static_initializers): New.
8626 (inline_init_test_initialization): New.
8627 (java_inlining_map_static_initializers): New.
8628
8629 2002-10-11 Mark Wielaard <mark@klomp.org>
8630
8631 * gcj.texi (Compatibility): Add Limitations and Extensions section.
8632
8633 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8634
8635 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8636
8637 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8638
8639 * parse.y (merge_string_cste): Add parentheses around & within |.
8640
8641 2002-10-08 Tom Tromey <tromey@redhat.com>
8642
8643 * parse.y (variable_declarator_id): Simplify error path for
8644 array declarator error. For PR java/8003.
8645
8646 2002-10-08 Zack Weinberg <zack@codesourcery.com>
8647
8648 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8649 bug_report_url.
8650
8651 2002-10-08 Andrew Haley <aph@redhat.com>
8652
8653 * parse.y (attach_init_test_initialization_flags): Check for
8654 error_mark_node.
8655
8656 2002-10-07 Anthony Green <green@redhat.com>
8657
8658 * parse.y (merge_string_cste): Fix bug in string concatenation.
8659
8660 2002-10-03 Michael Koch <konqueror@gmx.de>
8661
8662 * gcj.texi (Standard properties):
8663 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8664
8665 2002-10-02 Roger Sayle <roger@eyesopen.com>
8666
8667 PR optimization/6627
8668 * lang.c (java_init): If storing the vbit in function
8669 pointers, ensure that force_align_functions_log is atleast
8670 one to aid compatability with g++ vtables.
8671
8672 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
8673
8674 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8675 foul of type-based aliasing.
8676
8677 2002-09-30 Anthony Green <green@redhat.com>
8678
8679 * gcj.texi (Invoking jv-scan): Fix texinfo.
8680
8681 2002-09-28 Anthony Green <green@redhat.com>
8682
8683 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8684 (Code Generation): Add -fno-assert documentation.
8685 * jv-scan.c (flag_assert): New global.
8686 (options): Add assert option.
8687 (help): Add --no-assert documentation.
8688 * parse-scan.y (flag_assert): New global.
8689 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8690 (flag_assert): New global.
8691 * java-tree.h (flag_assert): New global.
8692 * lex.c (java_lex): Obey flag_assert.
8693 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8694 calling cc1.
8695
8696 2002-09-26 Andrew Haley <aph@redhat.com>
8697
8698 * expr.c (build_java_array_length_access): Check for null pointer.
8699 * expr.c (expand_java_arrayload): Likewise.
8700
8701 2002-09-21 Richard Henderson <rth@redhat.com>
8702
8703 * jcf-parse.c (get_constant): Decode from IEEE no matter
8704 what the target format.
8705
8706 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
8707
8708 * ChangeLog: Follow spelling conventions.
8709 * class.c: Likewise.
8710 * decl.c: Likewise.
8711 * expr.c: Likewise.
8712 * gjavah.c: Likewise.
8713 * java-tree.h: Likewise.
8714 * jcf-dump.c: Likewise.
8715 * jcf-parse.c: Likewise.
8716 * jvspec.c: Likewise.
8717 * lang.c: Likewise.
8718 * mangle.c: Likewise.
8719 * parse.y: Likewise.
8720
8721 2002-09-17 Tom Tromey <tromey@redhat.com>
8722
8723 * lex.c (java_read_unicode_collapsing_terminators): Handle case
8724 where \r appears at EOF. Fixes PR java/7950.
8725
8726 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
8727
8728 * jvspec.c (lang_specific_driver): Remove unused variable.
8729
8730 2002-09-16 Geoffrey Keating <geoffk@apple.com>
8731
8732 * java-tree.h (union lang_tree_node): Add chain_next option.
8733
8734 2002-09-16 Richard Henderson <rth@redhat.com>
8735
8736 * jcf-parse.c (get_constant): Runtime check for IEEE format;
8737 use new real.h interface.
8738 * jcf-write.c (find_constant_index): Use new real.h interface.
8739 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8740
8741 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8742
8743 * lang.c: Follow spelling conventions.
8744
8745 2002-09-11 Per Bothner <per@bothner.com>
8746
8747 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
8748 constant to the type of the field.
8749 (java_complete_tree): Remove now-redundant code.
8750
8751 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
8752
8753 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
8754
8755 For PR java/5794:
8756 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8757 return label if a ret instruction for the jsr has been reached.
8758
8759 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
8760
8761 * parse.y (DIR_SEPARATOR): Don't define.
8762 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8763
8764 2002-08-28 Andrew Haley <aph@redhat.com>
8765
8766 * verify.c (verify_jvm_instructions): Allow exception handler
8767 inside code that is being protected, but generate a warning.
8768 * except.c (link_handler): Initialize `expanded' in new eh_range.
8769 (binding_depth, is_class_level, current_pc): Declare extern.
8770
8771 2002-09-01 Mark Wielaard <mark@klomp.org>
8772
8773 * gcj.texi: Add chapter about system properties.
8774 Fixed some typos.
8775
8776 2002-08-26 Tom Tromey <tromey@redhat.com>
8777
8778 * parse.y (try_builtin_assignconv): Allow narrowing primitive
8779 conversion if RHS_TYPE is byte, short, or char.
8780
8781 2002-08-22 Tom Tromey <tromey@redhat.com>
8782
8783 * gcj.texi (Invoking gij): Document -cp and -classpath.
8784
8785 2002-08-21 Tom Tromey <tromey@redhat.com>
8786
8787 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8788 $(prefix)/share. For PR libgcj/7633.
8789
8790 For PR java/6005 and PR java/7611:
8791 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8792 (java_can_use_bit_fields_p): New function.
8793
8794 2002-08-16 Tom Tromey <tromey@redhat.com>
8795
8796 * gcj.texi (Class Initialization): Mention class initialization of
8797 arrays.
8798
8799 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
8800
8801 * Make-lang.in (java-tree-inline.o): New.
8802 (JAVA_OBJS): Add java-tree-inline.o.
8803 * parse.y (source_end_java_method): Call java_optimize_inline.
8804 (java_expand_method_bodies): Save method's tree in
8805 DECL_SAVED_TREE.
8806 (add_stmt_to_compound): Keep track of the number of statments.
8807 * lang.c (java_init): Enable flag_inline_trees.
8808 (java_post_options): If flag_inline_functions is on, enable
8809 flag_inline_trees instread.
8810 (decl_constant_value): New.
8811 (java_tree_inlining_walk_subtrees): New.
8812 * java-tree.h (DECL_NUM_STMTS): New macro.
8813 (java_optimize_inline): Declare.
8814 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8815 Handle a LABEL_EXPR.
8816 * decl.c (build_result_decl): If we already have a DECL_RESULT
8817 don't make another.
8818 (dump_function): New.
8819 (java_optimize_inline): New.
8820 (dump_function): New.
8821
8822 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
8823
8824 For PR java/7483:
8825 * parse.y (build_assertion): Invert return from
8826 desiredAssertionStatus.
8827
8828 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8829
8830 * jcf-write.c (get_access_flags): Return correct access flags for
8831 private and protected inner classes.
8832
8833 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8834
8835 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8836
8837 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
8838
8839 * mangle_name.c: Don't include obstack.h twice.
8840 * xref.c: Don't include obstack.h.
8841
8842 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
8843
8844 * class.c: (permanent_obstack): Delete declaration.
8845 * constants.c: (permanent_obstack): Delete declaration.
8846 * except.c: (permanent_obstack): Delete declaration.
8847 * expr.c: (permanent_obstack): Delete declaration.
8848 * jcf-parse.c: (permanent_obstack): Delete declaration.
8849 (saveable_obstack): Delete declaration.
8850 * parse.h: (permanent_obstack): Delete declaration.
8851 * typeck.c: (permanent_obstack): Delete declaration.
8852
8853 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
8854
8855 * gcj.texi (version-gcc): Increase to 3.3.
8856
8857 2002-07-22 Tom Tromey <tromey@redhat.com>
8858
8859 * lex.c (java_lex): Check for `e' or `E' after 0.
8860
8861 2002-07-21 Richard Henderson <rth@redhat.com>
8862
8863 * lang.c (java_unsafe_for_reeval): New.
8864 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8865
8866 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
8867
8868 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8869 (jcf_path_init): Use GET_ENVIRONMENT.
8870
8871 2002-07-10 Roger Sayle <roger@eyesopen.com>
8872 Zack Weinberg <zack@codesourcery.com>
8873
8874 * builtins.c (initialize_builtins): Remove defines that
8875 handled C/C++ specific junk hereby removed from builtins.def.
8876
8877 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
8878
8879 * lang.c (java_post_options): Update prototype.
8880
8881 2002-07-05 Roger Sayle <roger@eyesopen.com>
8882
8883 * builtins.c (initialize_builtins): Ignore the additional
8884 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
8885 the builtins.def file.
8886
8887 2002-07-01 Tom Tromey <tromey@redhat.com>
8888
8889 For PR libgcj/7073:
8890 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8891 specially.
8892
8893 2002-07-01 Roger Sayle <roger@eyesopen.com>
8894
8895 * java/decl.c (builtin_function): Accept additional parameter.
8896 (java_init_decl_processing): Pass an additional NULL_TREE
8897 argument to builtin_function.
8898
8899 2002-06-29 T.J. Mather <tjmather@maxmind.com>
8900
8901 * gcj.texi: Fixed gcj invocation example so that it compiles.
8902
8903 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8904
8905 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
8906 * parse.y (mark_parser_ctxt): Likewise.
8907 (check_modifiers, declare_local_variables): Avoid incorrect
8908 hardcoded constant 10.
8909
8910 * lex.c (java_read_char): Avoid "comparison is always true"
8911 warning.
8912
8913 2002-06-25 Andreas Schwab <schwab@suse.de>
8914
8915 * expr.c (JSR): Avoid undefined operation on PC.
8916
8917 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8918
8919 * decl.c (clear_binding_level): Const-ify.
8920
8921 2002-06-13 Akim Demaille <akim@epita.fr>
8922
8923 * parse.y (class_declaration, interface_declaration): Make sure
8924 all their rules have an action, in order to avoid meaningless `$$
8925 = $1' and their type clashes.
8926
8927 2002-06-11 Tom Tromey <tromey@redhat.com>
8928
8929 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
8930 * parse-scan.y (statement_without_trailing_substatement): Added
8931 assert_statement.
8932 (assert_statement): New rule.
8933 * java-tree.h (struct lang_type) [assertions]: New field.
8934 (TYPE_USES_ASSERTIONS): New macro.
8935 (CLASS_USES_ASSERTIONS): Likewise.
8936 (FIELD_SYNTHETIC): New define.
8937 * lex.c (java_lval;): Added ASSERT_TK.
8938 * parse.y (ASSERT_TK): Added.
8939 (statement_without_trailing_substatement): Added assert_statement.
8940 (assert_statement): New rule.
8941 (build_assertion): New function.
8942 (maybe_generate_pre_expand_clinit): Create and initialize
8943 $assertionsDisabled.
8944 (lookup_package_type): Removed decl.
8945 * keyword.h: Rebuilt.
8946 * keyword.gperf (assert): New token.
8947
8948 2002-06-10 Akim Demaille <akim@epita.fr>
8949
8950 * parse.y (interface_type_list, class_member_declaration)
8951 (unary_expression_not_plus_minus): Remove duplicate %type.
8952 Whitespace changes.
8953
8954 2002-06-09 Tom Tromey <tromey@redhat.com>
8955
8956 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
8957
8958 * parse.y (method_header): Give error message in all cases.
8959 Fixes PR java/6865.
8960
8961 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8962
8963 Don't use RTL inlining. Fix for PR java/6820.
8964 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
8965 (flag_really_inline): New.
8966 (java_decode_option): Set flag_really_inline if -finline-functions
8967 is seen.
8968 (java_post_options): New function. Turn off inlining unless
8969 flag_really_inline is set.
8970
8971 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8972
8973 * gjavah.c (throwable_p): Accept argument as either a classname or
8974 signature fragment. Create null-terminated classname string for super
8975 when calling itself recursively.
8976 (decode_signature_piece): Skip first character from class name
8977 signature when calling throwable_p.
8978
8979 2002-06-08 H.J. Lu (hjl@gnu.org)
8980
8981 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
8982
8983 2002-06-04 Tom Tromey <tromey@redhat.com>
8984
8985 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
8986
8987 2002-06-04 Michael Koch <konqueror@gmx.de>
8988
8989 * gcj.texi (Input Options): Fixed typo.
8990
8991 2002-06-04 Zack Weinberg <zack@codesourcery.com>
8992
8993 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
8994 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
8995 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
8996 and all now-pointless local variables. Rename other local
8997 variables to reflect their not being handles.
8998
8999 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
9000 #if JCF_USE_STDIO blocks.
9001
9002 * parse.y: Add missing semicolon at end of rule.
9003
9004 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
9005
9006 * check-init.c (attach_initialized_static_class): Delete, unused.
9007 * parse.y: Use htab_t instead of struct hashtable, update
9008 all uses.
9009 * java-tree.h: Include hashtab.h instead of hash.h.
9010 (struct lang_decl_func): Use htab_t, set up for gengtype.
9011 (struct init_test_hash_entry): Delete.
9012 (struct treetreehash_entry): New.
9013 (java_treetreehash_find): New
9014 (java_treetreehash_new): New prototype.
9015 (java_treetreehash_create): New prototype.
9016 (java_mark_tree): Delete prototype.
9017 (java_hash_hash_tree_node): Delete prototype.
9018 (java_hash_compare_tree_node): Delete prototype.
9019 (attach_initialized_static_class): Delete prototype.
9020 * expr.c (build_class_init): Update to use java_treetreehash
9021 functions.
9022 (java_expand_expr): Update to use htab_t.
9023 (emit_init_test_initialization): Likewise.
9024 * decl.c (java_mark_tree): Delete.
9025 * class.c (init_test_hash_newfunc): Delete.
9026 (java_hash_hash_tree_node): Delete.
9027 (java_hash_compare_tree_node): Delete.
9028 (add_method_1): Update to use java_treetreehash functions.
9029 (JAVA_TREEHASHHASH_H): New macro.
9030 (java_treetreehash_hash): New function.
9031 (java_treetreehash_compare): New function.
9032 (java_treetreehash_find): New function.
9033 (java_treetreehash_new): New function.
9034 (java_treetreehash_create): New function.
9035 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
9036
9037 * Make-lang.in (java/parse.o): Depend on debug.h.
9038 * java-tree.h (struct lang_identifier): Use gengtype.
9039 (union lang_tree_node): New.
9040 (struct lang_decl_func): Use gengtype.
9041 (struct lang_decl_var): Likewise.
9042 (struct lang_decl): Likewise.
9043 * parse.y: Include debug.h.
9044 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
9045
9046 * lang.c (struct language_function): New dummy structure.
9047
9048 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
9049 descriminator for DECL_LANG_SPECIFIC.
9050 (struct lang_decl_func): Rename from struct lang_decl.
9051 (enum lang_decl_desc): New.
9052 (struct lang_decl): Make it a union. Update all the accessor macros.
9053 (struct lang_type): Use gengtype.
9054 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
9055 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
9056 are now the same size.
9057 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
9058 use discriminator to mark DECL_LANG_SPECIFIC.
9059
9060 * Make-lang.in (gt-java-builtins.h): New rule.
9061 (java/builtins.o): Add dependency on gt-<filename>.h.
9062 * builtins.c: Use gengtype for roots.
9063 (union string_or_tree): Use gengtype.
9064 (struct builtin_record): Use gengtype.
9065 * config-lang.in (gtfiles): Add builtins.c.
9066
9067 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
9068 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
9069 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
9070 gt-java-parse.h, gtype-java.h): Add rules to generate.
9071 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
9072 (class.o): Add dependency on gt-*.h.
9073 (constants.o): Likewise.
9074 (decl.o): Likewise.
9075 (expr.o): Likewise.
9076 (jcf-parse.o): Likewise.
9077 (jcf-write.o): Likewise.
9078 (lang.o): Likewise.
9079 * config-lang.in (gtfiles): New.
9080 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9081 * constants.c: Replace uses of ggc_add_* with GTY markers.
9082 Include gt-*.h.
9083 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9084 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9085 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
9086 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
9087 Include gt-*.h.
9088 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
9089 Include gt-*.h.
9090 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9091 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
9092 gt-*.h.
9093 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9094 Include gtype-java.h.
9095
9096 2002-06-02 Tom Tromey <tromey@redhat.com>
9097
9098 Fix for PR java/5913:
9099 * parse.y (patch_binop): Call patch_string on op1.
9100
9101 2002-06-02 Tom Tromey <tromey@redhat.com>
9102
9103 Fix for PR java/1343, PR java/6336:
9104 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
9105 formatting. Changed return type.
9106 (anonymous_class_counter): Moved to top of file.
9107 (maybe_make_nested_class_name): Append number to class name for
9108 function-local classes.
9109
9110 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9111
9112 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
9113 * Make-lang.in: Update dependency lists.
9114
9115 2002-05-18 Mark Mitchell <mark@codesourcery.com>
9116
9117 * gjavah.c (throwable_p): Do not free the name of the class after
9118 passing it to find_class.
9119 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
9120 * jcf-io.c (dirent.h): Include it.
9121 (fnmatch.h): Likewise.
9122 (compare_path): New function.
9123 (java_or_class_file): Likewise.
9124 (memoized_dirlist_entry): New type.
9125 (memoized_dirlist_lookup_eq): New function.
9126 (memoized_dirlists): New variable.
9127 (caching_stat): New function.
9128 (memoized_class_lookup_eq): New function.
9129 (memoized_class_lookups): Likewise.
9130 (find_class): Use memoized_class_lookups and caching_stat.
9131 * jcf.h (JCF_USE_SCANDIR): Define.
9132 * parse.y (java_expand_classes): Write the class files in reverse
9133 order.
9134
9135 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9136
9137 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
9138
9139 2002-05-13 Mark Mitchell <mark@codesourcery.com>
9140
9141 * jcf-write.c (write_classfile): Unlink the temporary file if it
9142 cannot be renamed. Use concat to build up the name of the
9143 temporary file.
9144
9145 2002-05-08 Mark Mitchell <mark@codesourcery.com>
9146
9147 * jcf-write.c (write_classfile): Write the file to a
9148 temporary file and then rename it.
9149
9150 2002-05-07 Tom Tromey <tromey@redhat.com>
9151
9152 * gjavah.c (throwable_p): Use xstrdup, not strdup.
9153
9154 Fix for PR java/1200:
9155 * gjavah.c (throwable_p): New function.
9156 (decode_signature_piece): Use it. A `WeakReference' isn't the
9157 same as a `jweak'.
9158 Include hashtab.h.
9159 (gcjh_streq): New function.
9160
9161 2002-05-07 Andreas Jaeger <aj@suse.de>
9162
9163 * parse.y (finish_for_loop): Fix if statement.
9164
9165 2002-05-06 Tom Tromey <tromey@redhat.com>
9166
9167 Fix for PR java/5941:
9168 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
9169 loop update expression.
9170 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
9171 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
9172
9173 2002-05-04 Mark Wielaard <mark@klomp.org>
9174
9175 For PR java/6519:
9176 * parse.y (build_string_concatenation): Return just op1 only when op2
9177 is null and op1 is a STRING_CST, otherwise always construct a
9178 StringBuffer.
9179
9180 2002-04-27 Tom Tromey <tromey@redhat.com>
9181
9182 For PR java/6382:
9183 * parse.y (string_convert_int_cst): New function.
9184 (merge_string_cste): Use it.
9185
9186 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9187
9188 * java-tree.h (java_parse_file): Update.
9189 (java_set_yydebug): Remove.
9190 * jcf-parse.c (yydebug): Remove.
9191 (java_set_yydebug): Die.
9192 (java_parse_file): Update.
9193 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9194
9195 2002-04-24 Tom Tromey <tromey@redhat.com>
9196
9197 For PR java/6425:
9198 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
9199 EXPR_WFL_QUALIFICATION of qual_wfl.
9200
9201 2002-04-23 Per Bothner <per@bothner.com>
9202
9203 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
9204 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
9205 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
9206
9207 2002-04-23 Tom Tromey <tromey@redhat.com>
9208
9209 For PR java/6314:
9210 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
9211 recognize `-fcompile-resource='.
9212 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
9213 a bit.
9214
9215 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
9216
9217 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
9218 paths. Fixes PR java/2791.
9219
9220 2002-04-19 Andrew Haley <aph@redhat.com>
9221
9222 * jcf-write.c (push_long_const): lo, hi: New variables.
9223 Use rshift_double to extract the high part of a 64-bit long.
9224 Use WORD_TO_INT to extract the low part.
9225
9226 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
9227 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
9228 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
9229
9230 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9231
9232 * typeck.c (incomplete_type_error): Remove.
9233
9234 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9235
9236 * class.c (make_class_data): Set DECL_ALIGN on static class data,
9237 for hash synchronization.
9238 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
9239 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
9240 class_type_node.
9241
9242 2002-04-16 Mark Wielaard <mark@klomp.org>
9243
9244 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
9245 negative zero.
9246
9247 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9248
9249 Fix for PR java/6294:
9250 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
9251 interfaces.
9252
9253 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9254
9255 Fix for PR java/6085:
9256 * parse.y (patch_method_invocation): Always use build_access_to_thisn
9257 to get enclosing "this" argument for inner-class constructor
9258 invocation. Pass correct arguments to build_access_to_thisn.
9259
9260 2002-04-10 Andreas Jaeger <aj@suse.de>
9261
9262 * gcj.texi (Input Options): Fix extdirs patch.
9263
9264 2002-04-10 Anthony Green <green@redhat.com>
9265
9266 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
9267
9268 2002-04-09 Anthony Green <green@redhat.com>
9269
9270 * gcj.texi (Input Options): Add --extdirs documentation.
9271 * jcf-dump.c (OPT_extdirs): New macro.
9272 (options): Add extdirs option.
9273 (help): Describe --extdirs.
9274 (main): Handle OPT_extdirs.
9275 * gjavah.c (OPT_extdirs): New macro.
9276 (options): Add extdirs option.
9277 (help): Describe --extdirs.
9278 (main): Handle OPT_extdirs.
9279 * jcf-path.c (jcf_path_init): Add extdirs support.
9280 (jcf_path_extdirs_arg): New function.
9281 (extensions): New variable to hold extensions path entries.
9282 * jvspec.c: Remove -fextdirs= when compiling main().
9283 * lang.c (java_decode_option): Handle -fextdirs=.
9284 * jcf.h (jcf_path_extdirs_arg): Declare new function.
9285 * Make-lang.in: Compile jcf-path with version info for use in
9286 identifying the appropriate libgcj.jar.
9287
9288 2002-04-08 Tom Tromey <tromey@redhat.com>
9289
9290 For PR libgcj/5303:
9291 * .cvsignore: Added rmic.1 and rmiregistry.1.
9292 * gcj.texi (Top): Link to new nodes.
9293 (Invoking rmic): New node.
9294 (Invoking rmiregistry): Likewise.
9295 * Make-lang.in (java.generated-manpages): Added rmic.1 and
9296 rmiregistry.1.
9297 (java.maintainer-clean): Likewise.
9298 ($(srcdir)/java/rmic.1): New target.
9299 ($(srcdir)/java/rmiregistry.1): Likewise.
9300 (java.install-man): Handle rmic.1 and rmiregistry.1.
9301
9302 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9303
9304 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
9305 Add note about handling uncaught exceptions. Add an exception handler
9306 to example.
9307
9308 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9309
9310 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
9311 after using it to patch CALL_EXPR.
9312
9313 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9314
9315 * gcj.texi (Invocation): Document CNI invocation API.
9316
9317 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9318
9319 * expr.c (truthvalue_conversion): Rename. Update.
9320 (expand_compare): Update.
9321 * java-tree.h (java_truthvalue_conversion): New.
9322 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9323
9324 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9325
9326 * java-tree.h (java_mark_addressable): New.
9327 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9328 * typeck.c (mark_addressable): Rename, update.
9329
9330 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9331
9332 * expr.c (build_java_binop): Update.
9333 * java-tree.h (java_signed_type, java_unsigned_type,
9334 java_signed_or_unsigned_type): Update.
9335 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9336 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9337 * parse.y (patch_binop): Update.
9338 * typeck.c (signed_or_unsigned_type, unsigned_type,
9339 signed_type): Update.
9340
9341 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9342
9343 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9344 (java_dummy_print): Remove.
9345 (lang_print_error): Rename. Exit early if inhibiting output.
9346 (inhibit_error_printing_function): New.
9347 (java_init): Don't set hook.
9348 (lang_init_source): Use new boolean.
9349
9350 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
9351
9352 * parse.y (do_resolve_class): Fix infinite recursion.
9353
9354 2002-03-29 Tom Tromey <tromey@redhat.com>
9355
9356 * parse.y (check_inner_circular_reference): Ignore incomplete
9357 types.
9358
9359 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9360
9361 * Make-lang.in (builtins.o): Update.
9362 * boehm.c (get_boehm_type_descriptor): Update.
9363 * builtins.c: Include langhooks.h.
9364 * decl.c (java_init_decl_processing): Update.
9365 * java-tree.h (java_type_for_mode, java_type_for_size): New.
9366 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
9367 Redefine.
9368 * typeck.c (type_for_mode, type_for_size): Update.
9369
9370 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
9371
9372 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
9373
9374 2002-03-28 Tom Tromey <tromey@redhat.com>
9375
9376 * except.c (expand_end_java_handler): If the handler type is NULL,
9377 use java.lang.Throwable. Fixes PR java/5986.
9378
9379 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9380
9381 Fix for PR java/4715:
9382 * jcf-parse.c (parse_source_file_3): New function.
9383 (read_class): Call it.
9384 (java_parse_file): Likewise.
9385
9386 2002-03-28 Jan Hubicka <jh@suse.cz>
9387
9388 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
9389
9390 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9391
9392 * parse.y (resolve_package): Initialize "decl".
9393 (lookup_package_type): Remove unused function.
9394
9395 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9396
9397 Fix for PR java/5993:
9398 * parse.y (resolve_package): Return the decl if resolution was
9399 successful. Don't special case "java.lang" and "java.lang.reflect"
9400 packages. Set type_name to the merged identifier.
9401 (resolved_qualified_expression_name): Print error using "name" if
9402 resolve_package returns NULL_TREE.
9403
9404 2002-03-27 Tom Tromey <tromey@redhat.com>
9405
9406 * expr.c (expand_invoke): Don't generate null pointer check if
9407 we're calling <init>.
9408
9409 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9410
9411 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
9412 fix prototype.
9413 * java-tree.h (java_lang_expand_expr): Similarly.
9414 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9415 (java_init): Don't set hook.
9416
9417 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9418
9419 Fix for PR java/5850:
9420 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
9421 context if field was not found in the current scope.
9422 * expr.c (lookup_field): Don't look in enclosing contexts.
9423
9424 2002-03-26 Tom Tromey <tromey@redhat.com>
9425
9426 Fix for PR java/5942:
9427 * parse.y (init_src_parse): Added sanity check.
9428 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
9429 elements, not 11.
9430
9431 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
9432
9433 * decl.c (lang_mark_tree): Rename java_mark_tree.
9434 * java-tree.h (java_mark_tree): New.
9435 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9436
9437 2002-03-25 Zack Weinberg <zack@codesourcery.com>
9438
9439 * lex.c: Change java_perform_atof to take normal parameters
9440 instead of a pointer to a parameter block. Call it directly
9441 from java_lex.
9442
9443 2002-03-22 Mark Wielaard <mark@klomp.org>
9444
9445 Fix for PR java/5368:
9446 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
9447 when printing error message.
9448
9449 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
9450
9451 * decl.c (maybe_build_cleanup): Remove.
9452
9453 2002-03-22 Tom Tromey <tromey@redhat.com>
9454
9455 Andrew Haley <aph@cambridge.redhat.com>
9456
9457 * expr.c (build_field_ref): Don't build a check if the field is a
9458 member of `this'.
9459
9460 2002-03-21 Eric Blake <ebb9@email.byu.edu>
9461
9462 Fix for PR java/6026:
9463 * lex.c (java_lex): Fix parsing of consecutive floats.
9464
9465 2002-03-21 Tom Tromey <tromey@redhat.com>
9466
9467 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
9468 class.
9469
9470 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
9471
9472 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9473 insert_block, getdecls, kept_level_p, global_bindings_p): New.
9474
9475 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9476
9477 * gcj.texi: @code{gcj} becomes @command{gcj}.
9478 @code{gcc} becomes @command{gcc}.
9479 GcjRaw changed to gnu.gcc.RawData.
9480
9481 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
9482
9483 * decl.c (start_java_method): Use new hook.
9484 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9485 (java_init): Remove old hook.
9486
9487 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
9488
9489 * builtins.c (define_builtin): Do nothing if `type' is null.
9490 Fixes PR java/5876.
9491
9492 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9493
9494 * parse.y (parser_check_super_interface): Fix error message
9495 grammar/order.
9496
9497 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9498
9499 * jcf-parse.c (get_constant): Delete unused variables.
9500
9501 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
9502
9503 * java-tree.h (java_parse_file): New.
9504 * jcf-parse.c (yyparse): Rename java_parse_file.
9505 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9506
9507 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9508
9509 * parse.y (craft_constructor): Return the constructor decl.
9510 (java_expand_classes): Update comments.
9511 (lookup_method_invoke): Call fix_constructors immediately for
9512 anonymous class. Fixes PR java/5935.
9513
9514 2002-03-15 Anthony Green <green@redhat.com>
9515
9516 * jcf-parse.c (yyparse): Don't emit class registration
9517 constructor when compiling resource files.
9518
9519 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9520
9521 * lang.c (java_tree_code_type, java_tree_code_length,
9522 tree_code_name): Delete.
9523 (tree_code_type, tree_code_length, tree_code_name): Define.
9524 (java_init): Don't try to copy into the various tree_code
9525 arrays.
9526
9527 2002-03-12 Tom Tromey <tromey@redhat.com>
9528
9529 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9530 UTF-8, not UCS-2. Fixes PR java/5923.
9531
9532 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9533 a call_expr wrapped in a convert. Fixes PR java/5848.
9534
9535 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9536
9537 * jcf-write.c (write_classfile): Improve error strings.
9538
9539 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9540
9541 * lex.c: Adjust comments to GNU standards.
9542
9543 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9544
9545 Fix for PR java/5902:
9546 * lex.c (java_lex): Fix parsing of literals.
9547
9548 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9549
9550 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9551 to prevent it getting evaluated twice in the store checking case.
9552 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9553 examining OBJECT.
9554
9555 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9556
9557 * decl.c (java_init_decl_processing): Make sure class_type_node
9558 alignment is not less than 64 bits if hash synchronization is enabled.
9559
9560 2002-03-08 Per Bothner <per@bothner.com>
9561
9562 * parse.y (java_complete_lhs): Check if patch_assignment
9563 returned an error-mark.
9564
9565 * parse.y (try_builtin_assignconv): Don't special-case zero.
9566
9567 2002-03-08 Per Bothner <per@bothner.com>
9568
9569 Fix for PR java/5812.
9570 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
9571 here instead of in JSR macro. Likewise with load_type_state call.
9572 Do the latter on if the return_pc has been verified (the jsr returns).
9573 (JSR): Now just call build_java_jsr.
9574
9575 2002-03-07 Jeff Sturm <jsturm@one-point.com>
9576
9577 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9578 (java.install-common): Link native driver to
9579 JAVA_TARGET_INSTALL_NAME.
9580
9581 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
9582
9583 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9584 * builtins.c(sin_builtin): Likewise
9585 * builtins.c(sqrt_builtin): Likewise
9586
9587 2002-03-03 Zack Weinberg <zack@codesourcery.com>
9588
9589 * java/expr.c, java/jcf-parse.c, java/lex.c:
9590 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9591 REAL_ARITHMETIC blocks unconditional. Delete some further
9592 #ifdef blocks predicated on REAL_ARITHMETIC.
9593
9594 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9595
9596 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9597 explicit sizeof/sizeof.
9598 * decl.c (java_init_decl_processing): Likewise.
9599 * jcf-parse.c (init_jcf_parse): Likewise.
9600 * parse.y (init_src_parse): Likewise.
9601
9602 2002-03-02 Per Bothner <per@bothner.com>
9603
9604 Make --CLASSPATH by a synonym for --classpath and -classpath.
9605 Implement --bootclasspath.
9606 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
9607 (classpath_l): Remove.
9608 (jcf_path_CLASSPATH_arg): Remove.
9609 (jcf_path_bootclasspath_arg): New function.
9610 (jcf_path_seal): Simplify accordingly.
9611
9612 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
9613 (jcf_path_CLASSPATH): Remove declaration.
9614 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
9615 (lang_specific_driver): Translate -bootclasspath.
9616 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
9617 * lang.c (decode_lang_options): Do jcf_path_init first.
9618 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
9619 * gjavah.c: Also handle --bootclasspath.
9620 Handle --CLASSPATH as a synonum for --classpath.
9621 * jcf-dump.c: Likewise.
9622
9623 "." is not part of system path, but is the default for --classpath.
9624 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
9625 (jcf_path_seal): Add "." if no CLASSPATH specified.
9626
9627 * gcj.texi: Document changes.
9628
9629 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9630
9631 * expr.c (build_java_arraystore_check): Fix formatting.
9632
9633 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9634
9635 Fix for PR java/5758, java/5632:
9636 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9637 inner-class separator too.
9638 * parse.y (do_resolve_class): New local `decl_result.'
9639 Progressively build a name for what can have been loaded.
9640
9641 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9642
9643 * expr.c (java_array_data_offset): Removed function.
9644 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9645 (build_java_array_length_access): Obtain "length" value using a
9646 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9647 (build_java_arrayaccess): Correct comment. Access "data" using a
9648 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9649 (build_java_arraystore_check): New function.
9650 (expand_java_arraystore): Use build_java_arraystore_check.
9651 * parse.y (patch_assignment): Simplify code to insert a store check
9652 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9653 * check-init.c (check_init): Update to reflect that an array length
9654 access is now a COMPONENT_REF.
9655 * gcj.texi (Code Generation): Improve documentation of
9656 -fno-bounds-check. Add documentation for -fno-store-check.
9657 * java-tree.h (flag_store_check): Declare.
9658 (build_java_arraystore_check): Declare.
9659 * lang.c (flag_store_check): Initialize to 1.
9660 (lang_f_options): Add store-check option.
9661 * jvspec.c: Don't pass store-check option to jvgenmain.
9662 * lang-options.h: Add help string for -fno-store-check.
9663
9664 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9665
9666 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9667 * java-tree.h (java_dup_lang_specific_decl): New.
9668 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9669
9670 2002-02-27 Zack Weinberg <zack@codesourcery.com>
9671
9672 * builtins.c, decl.c: Delete traditional-mode-related code
9673 copied from the C front end but not used, or used only to
9674 permit the compiler to link.
9675
9676 2002-02-22 Tom Tromey <tromey@redhat.com>
9677
9678 Fix for PR java/2369:
9679 * jvspec.c (verify_class_name): New function.
9680 (lang_specific_driver): Call it.
9681 (JAVA_START_CHAR_P): New macro.
9682 (JAVA_PART_CHAR_P): Likewise.
9683
9684 2002-02-22 Per Bothner <per@bothner.com>
9685
9686 * class.c: Change vtable to be more compatible with g++ v3 abi.
9687 (get_dispatch_table): Prepend offset-to-top (always 0) and
9688 type_info pointer (currently unimplemented hence NULL) to vtable.
9689 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9690 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
9691 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9692 (build_dtable_decl): Add declarations for new fields.
9693
9694 2002-02-20 Per Bothner <per@bothner.com>
9695
9696 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9697 to finit$ (otherwise generate_bytecode_insns drops it). However, we
9698 don't need to set it on the COMPOUND_EXPR - the caller does that.
9699
9700 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9701
9702 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9703 `--CLASSPATH' becomes `--classpath.'
9704 * gjavah.c: Likewise.
9705 * jcf-dump.c: Likewise.
9706 * lang-options.h: Likewise.
9707 * lang.c: Likewise.
9708 * jcf-path.c: Updated comment.
9709 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9710 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9711 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9712 (jcf_path_CLASSPATH_arg): Ditto.
9713 (classpath_u): Updated leading comment.
9714
9715 2002-02-20 Per Bothner <per@bothner.com>
9716
9717 * builtins.c (check_for_builtin): New function.
9718 (build_call_or_builtin): Remove.
9719 * java-tree.h: Update accordingly.
9720 * expr.c (expand_invoke): Use build + check_for_builtin instead
9721 of build_call_or_builtin.
9722 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
9723 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9724 flag (which had caused jcf-write to incorrectly emit invokevirtual).
9725
9726 2002-02-17 Tom Tromey <tromey@redhat.com>
9727
9728 * java-tree.h (TYPE_STRICTFP): New macro.
9729 (struct lang_type) [strictfp]: New field.
9730 (CLASS_STRICTFP): New macro.
9731 (METHOD_STRICTFP): New macro.
9732 (struct lang_decl) [strictfp]: New field.
9733 * parse.y (method_header): Disallow strictfp constructor or
9734 abstract method.
9735 (STRICT_TK): Move before MODIFIER_TK.
9736 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9737 (METHOD_MODIFIERS): Likewise.
9738 (INTERFACE_MODIFIERS): Likewise.
9739 * jcf-write.c (get_access_flags): Likewise.
9740 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9741 (add_method_1): Likewise.
9742 (get_access_flags_from_decl): Likewise.
9743 * jcf-dump.c (print_access_flags): Print in standard order. Also,
9744 recognize strictfp flag.
9745 * jcf.h (ACC_STRICT): New define.
9746
9747 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
9748
9749 * class.c(build_utf8_ref): Move declaration of decl_size
9750
9751 2002-02-07 Tom Tromey <tromey@redhat.com>
9752
9753 * gcj.texi (Input Options): --CLASSPATH does not suppress system
9754 path.
9755
9756 2002-02-04 Anthony Green <green@redhat.com>
9757
9758 * class.c (build_utf8_ref): Put UTF-8 constants into merged
9759 sections if available.
9760
9761 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9762
9763 * parse.y (java_expand_classes): Fix typo in static field loop.
9764
9765 2002-02-02 Richard Henderson <rth@redhat.com>
9766
9767 * class.c (add_field): Mark static fields external.
9768 (build_class_ref): Remove redundant set.
9769 * parse.y (java_expand_classes): Mark static fields of classes
9770 to be compiled as local.
9771 * jcf-parse.c (parse_class_file): Likewise.
9772
9773 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9774
9775 * gcj.texi (About CNI): New node.
9776
9777 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
9778
9779 PR java/5080
9780 * jcf-parse.c : Check for HAVE_LOCALE_H before using
9781 setlocale() with LC_CTYPE as a parameter.
9782 * jv-scan.c: Same.
9783
9784 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
9785
9786 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9787 Follow GNU Coding Standards for --version.
9788
9789 2002-01-28 Tom Tromey <tromey@redhat.com>
9790
9791 * expr.c (build_jni_stub): Ensure storage for `meth' is
9792 generated.
9793 * parse.y (java_complete_expand_methods): Set
9794 current_function_decl before building JNI stub.
9795
9796 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9797
9798 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9799 BUILT_IN_SQRTF.
9800
9801 2002-01-22 Tom Tromey <tromey@redhat.com>
9802
9803 * decl.c (java_init_decl_processing): Use add_predefined_file.
9804 Predefine RawData.java.
9805 (predef_filenames): Removed.
9806 (java_init_decl_processing): Don't register predef_filenames.
9807 * jcf-parse.c (add_predefined_file): New function.
9808 (predefined_filename_p): Rewrote.
9809 (predefined_filename_p): No longer static.
9810 * decl.c (java_init_decl_processing): Call initialize_builtins.
9811 * Make-lang.in (JAVA_OBJS): Added builtins.o.
9812 (java/builtins.o): New target.
9813 * builtins.c: New file.
9814 * parse.y (patch_invoke): Use build_call_or_builtin.
9815 * java-tree.h (build_call_or_builtin): Declare.
9816 (initialize_builtins): Declare.
9817 (java_set_exception_lang_code): Removed unused declaration.
9818 (PREDEF_FILENAMES_SIZE): Removed.
9819 (java_tree_index): Added JTI_PREDEF_FILENAMES.
9820 (predef_filenames): New define.
9821 (add_predefined_file): Declare.
9822 (predefined_filename_p): Declare.
9823 * expr.c (expand_invoke): Use build_call_or_builtin.
9824
9825 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9826
9827 * parse.y (patch_switch_statement): Fix format specifier.
9828
9829 2002-01-16 Tom Tromey <tromey@redhat.com>
9830
9831 More for PR java/5365:
9832 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9833 default.
9834 (process_file): Generate include for
9835 java.lang.UnsupportedOperationExceptions.
9836
9837 2002-01-15 Andreas Jaeger <aj@suse.de>
9838
9839 * .cvsignore: Add man pages.
9840
9841 2002-01-15 Tom Tromey <tromey@redhat.com>
9842
9843 Fix for PR java/5365:
9844 * gjavah.c (process_file): Turn class name into a file name.
9845
9846 2002-01-14 Matthias Klose <doko@debian.org>
9847
9848 * gcj.texi: Fix whitespace and formatting errors in the
9849 synopsis of the man pages. Update copyright.
9850
9851 2002-01-14 Tom Tromey <tromey@redhat.com>
9852
9853 For PR libgcj/5303:
9854 * Make-lang.in (java.install-man): Handle jv-convert man page.
9855 (java.generated-manpages): Added jv-convert.1.
9856 (java.uninstall): Remove jv-convert.1.
9857 (java.maintainer-clean): Likewise.
9858 ($(srcdir)/java/jv-convert.1): New target.
9859 * gcj.texi (Top): Link to jv-convert node.
9860 (Individual utilities): Likewise.
9861 (Invoking jv-convert): New node.
9862
9863 2001-01-10 Jeff Sturm <jsturm@one-point.com>
9864 Martin Kahlert <martin.kahlert@infineon.com>
9865
9866 * jcf-parse.c (get_constant): Don't swap lo/hi for big
9867 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9868
9869 2002-01-03 Graham Stott <grahams@redhat.com>
9870
9871 * class.c (compile_resource_file): Update copyright date.
9872 Constify filename parameter.
9873 (java-tree.h): Update copyright date.
9874 (compile_resource_file): Constify filename parameter.
9875
9876 2002-01-03 Graham Stott <grahams@redhat.com>
9877
9878 * gcc/jcf-parse.c: Update copyright date.
9879 (yyparse): Constify resource_filename.
9880
9881 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9882
9883 * parse.y (src_parse_roots): Don't needlessly zero init.
9884
9885 2001-12-31 Tom Tromey <tromey@redhat.com>
9886
9887 * parse.y (dump_java_tree): New function.
9888 (source_end_java_method): Call it.
9889 (end_class_declaration): Likewise.
9890 * lang.c (java_decode_option): Call dump_switch_p.
9891
9892 2001-12-28 Tom Tromey <tromey@redhat.com>
9893
9894 * gen-table.pl: Don't process characters after \uffff. Added
9895 comment pointing to input file.
9896
9897 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9898
9899 * gen-table.pl: Const-ify output. Document the location of a
9900 suitable unicode input file.
9901
9902 * chartables.h: Regenerate.
9903
9904 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9905
9906 * chartables.h: Const-ify.
9907 * gjavah.c (options): Likewise.
9908 * jcf-dump.c (options): Likewise.
9909 * jv-scan.c (options): Likewise.
9910 * lex.c (java_start_char_p, java_part_char_p): Likewise.
9911 * parse.y (binop_lookup): Likewise.
9912
9913 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9914
9915 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
9916 the static arrays that are output.
9917 * jvspec.c (jvgenmain_spec): Make static.
9918 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
9919 * keyword.h: Regenerate.
9920 * lang.c (string_option, process_option_with_no, lang_f_options,
9921 lang_W_options): Const-ify.
9922 * lex.c (java_lex): Likewise.
9923
9924 2001-12-21 Richard Henderson <rth@redhat.com>
9925
9926 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
9927 (get_boehm_type_descriptor): ... here. Arrange for the
9928 TREE_TYPE to get set properly.
9929
9930 2001-12-21 Richard Henderson <rth@redhat.com>
9931
9932 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
9933 only if the target requires collect2.
9934
9935 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
9936
9937 2001-12-20 Tom Tromey <tromey@redhat.com>
9938
9939 For PR java/4509:
9940 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
9941 CAN_COMPLETE_NORMALLY for the node.
9942 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
9943 generate code for second branch if first branch can't complete
9944 normally.
9945 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
9946 the loop head if the loop body can't complete normally.
9947
9948 2001-12-20 Tom Tromey <tromey@redhat.com>
9949
9950 For PR java/4766:
9951 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
9952 case where `finally' clause can't complete normally.
9953
9954 2001-12-20 Tom Tromey <tromey@redhat.com>
9955
9956 Fixes PR java/5057:
9957 * parse.y (analyze_clinit_body): Added this_class parameter.
9958 Check for more cases where we must keep <clinit>.
9959 (maybe_yank_clinit): Cleaned up flow control.
9960
9961 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9962
9963 * decl.c (java_init_decl_processing): Don't initialize
9964 finit_leg_identifier_node.
9965 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
9966 (finit_leg_identifier_node): Remove.
9967 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
9968
9969 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9970
9971 * mangle.c (mangle_member_name): Don't special-case for
9972 NO_DOLLAR_IN_LABEL.
9973 * mangle_name.c (unicode_mangling_length): Likewise.
9974 (append_unicode_mangled_name): Likewise.
9975 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
9976 code.
9977
9978 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9979
9980 * expr.c (build_java_array_length_access): Don't force null pointer
9981 check unless flag_check_references is set.
9982
9983 2001-12-20 Tom Tromey <tromey@redhat.com>
9984
9985 Fix for PR java/3417:
9986 * parse.y (patch_assignment): Added special processing for
9987 `return'.
9988 (patch_return): Don't convert booleans to integers, and don't
9989 special-case `null'.
9990
9991 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
9992
9993 * config-lang.in (diff_excludes): Remove.
9994
9995 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
9996
9997 * gcj.texi: Update link to GCC manual.
9998
9999 2001-12-17 Tom Tromey <tromey@redhat.com>
10000
10001 * parse.y (link_nested_class_to_enclosing): Removed useless
10002 statement.
10003
10004 2001-12-16 Tom Tromey <tromey@redhat.com>
10005
10006 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
10007 Fixes PR java/5088.
10008
10009 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
10010
10011 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
10012 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
10013 spelling errors.
10014
10015 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10016
10017 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
10018
10019 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10020
10021 * decl.c (java_init_decl_processing): Build otable_type correctly.
10022 otable_decl is an otable_type.
10023
10024 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10025
10026 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
10027 otable_type, otable_ptr_type, method_symbol_type,
10028 method_symbols_array_type, method_symbols_array_ptr_type): New
10029 field/global tree definitions.
10030 (flag_indirect_dispatch): New flag.
10031 * decl.c (java_init_decl_processing): Initialize new otable and
10032 otable_syms type nodes and decls. Add new field "index" to
10033 method_type_node.
10034 * class.c (build_method_symbols_entry): New function.
10035 (make_method_value): Set "index" to to method's vtable index for
10036 virtual methods when indirect-dispatch is not used.
10037 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
10038 and set vtable_method_count to -1. Set otable and otable_syms field
10039 if indirect-dispatch is used and there was something to put in them.
10040 (build_method_symbols_entry): New function.
10041 (emit_offset_symbol_table): New function.
10042 * expr.c (get_offset_table_index): New function.
10043 (build_invokevirtual): Build array reference to otable at the index
10044 returned by get_offset_table_index, and use the result as the vtable
10045 offset.
10046 (build_invokeinterface): Similar.
10047 * jcf-parse.c (yyparse): If indirect-dispatch, call
10048 emit_offset_symbol_table at the end of compilation, after all classes
10049 have been generated.
10050 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
10051 * lang.c (flag_indirect_dispatch): Define.
10052 (lang_f_options): Add indirect-dispatch flag.
10053
10054 2001-12-14 Matthias Klose <doko@debian.org>
10055
10056 * gcj.texi: Markup for man page generation. Document missing
10057 options printed by <tool> --help.
10058 Terminate description of gij's -ms option with a dot.
10059 * Make-lang.in ($(srcdir)/java/*.1): New targets.
10060 (java.generated-manpages java.install-man, java.uninstall,
10061 java-maintainer-clean) Updated.
10062
10063 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
10064
10065 * class.c (get_dispatch_table): Fix java vtable layout
10066 for TARGET_VTABLE_USES_DESCRIPTORS.
10067 * decl.c (java_init_decl_processing): Initialize
10068 alloc_no_finalizer_node, finalize_identifier_node.
10069 * expr.c (class_has_finalize_method): New function.
10070 (expand_java_NEW): Generate calls for finalizer-free allocation.
10071 (build_invokevirtual): Fix java vtable layout for
10072 TARGET_VTABLE_USES_DESCRIPTORS.
10073 * java-tree.h (enum java_tree_index): New entries:
10074 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
10075 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
10076 (class_has_finalize_method): declare.
10077 (HAS_FINALIZER_P): New macro.
10078 * parse.y (patch_invoke): Generate calls for finalizer-free
10079 allocation.
10080
10081 2001-12-12 Matthias Klose <doko@debian.org>
10082
10083 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
10084 whitespace at end of line.
10085
10086 2001-12-11 Tom Tromey <tromey@redhat.com>
10087
10088 * lex.c (java_init_lex): Define wfl_to_string as
10089 gnu.gcj.runtime.StringBuffer unless generating bytecode.
10090
10091 2001-12-11 Jeff Sturm <jsturm@one-point.com>
10092
10093 * class.c (make_method_value): Use null_pointer_node to
10094 represent empty exception table.
10095
10096 2001-12-10 Tom Tromey <tromey@redhat.com>
10097
10098 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
10099
10100 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
10101
10102 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
10103
10104 2001-12-09 Per Bothner <per@bothner.com>
10105
10106 * check-init.c (current_switch_has_default): New static field.
10107 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
10108 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
10109 DEFAULT_EXPR seen, simulate a default alternative that copies state.
10110
10111 2001-12-09 Tom Tromey <tromey@redhat.com>
10112
10113 * check-init.c (check_init): Don't allow pre- or post- increment
10114 or decrement of final variable.
10115 (final_assign_error): Minor error message rewording.
10116
10117 2001-12-08 Tom Tromey <tromey@redhat.com>
10118
10119 * java-tree.h: Fixed typo.
10120
10121 * gjavah.c (decompile_method): Don't decompile to `return this'
10122 for static methods.
10123
10124 * gjavah.c (cxx_keywords): Re-sorted.
10125 * lex.c (cxx_keywords): Re-sorted.
10126
10127 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
10128 else.
10129
10130 * gjavah.c (print_namelet): Clear subnamelets.
10131 (HANDLE_METHOD): Set `method_printed' earlier.
10132
10133 2001-12-07 Tom Tromey <tromey@redhat.com>
10134
10135 * lang.c (lang_f_options): Added
10136 optimize-static-class-initialization.
10137 (java_decode_option): Removed special case.
10138
10139 2001-12-07 Per Bothner <per@bothner.com>
10140
10141 * check-init.c (check_init): Fix typo freeing memory twice.
10142
10143 2001-12-05 Per Bothner <per@bothner.com>
10144
10145 Restore support for static class initialization optimization.
10146 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
10147 * check-init.c (check_int): At end of BLOCK handle initialization
10148 blocks, which used to be done in java_complete_expand_method but did
10149 not handle the case where check_for_initialization might allocate
10150 more than a word of bits.
10151 * decl.c (lang_make_tree): The smic field is now a tree.
10152 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
10153 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
10154
10155 * parse.y (emit_test_initialization): Combine hash_lookup calls.
10156
10157 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
10158 Change from a hash table to a list.
10159 (struct_lang_decl): Change field 'smic' to match.
10160 * class.c (add_method_1): Initialize
10161 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
10162 * parse.y (adjust_init_test_initialization): Removed - inlined into -
10163 (java_expand_method_bodies): -here, since 'smic' is now a list.
10164 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
10165
10166 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
10167
10168 * class.c (java_hash_compare_tree_node): Fix casts.
10169
10170 2001-12-04 Per Bothner <per@bothner.com>
10171
10172 * check-init.c: Handle definite unassignment to finals in addition
10173 to definite assignment.
10174 (loop_current_locals): New field.
10175 (num_current_locals, int start_current_locals, num_current_words):
10176 Make static.
10177 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
10178 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
10179 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
10180 (get_variable_decl, check_final_reassigned): New functions.
10181 (check_init, check_bool_init): Modify as needed for checking finals.
10182 (check_for_initialization): Take extra parameter and return void.
10183 Do extra start-up logic to check final fields for assignment.
10184 * parse.y (check_static_final_variable_assignment_flag,
10185 reset_static_final_variable_assignment_flag, check_final_assignment,
10186 check_final_variable_local_assignment_flag,
10187 reset_final_variable_indirect_assignment_flag,
10188 reset_final_variable_global_assignment_flag): Remove functions.
10189 (java_complete_expand_methods, outer_field_access_fix,
10190 patch_assignment): Remove no-longer used logic.
10191 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
10192 * parse.y (register_fields, java_complete_tree): Update accordingly.
10193
10194 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
10195 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
10196 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
10197
10198 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
10199
10200 * java-tree.h (DECL FINAL): New bit-field.
10201 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
10202 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
10203 (DECL_INIT_CALLS_THIS): New macro.
10204 (struct lang_decl): New bit-field init_calls_this.
10205 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
10206 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
10207 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
10208 use it for both local variables and final fields.
10209 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
10210 and local_final.
10211 (struct lang_type): Remove hfv bit-field.
10212 (check_for_initialization): Change to return void.
10213
10214 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
10215 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
10216 * check-init.c (final_assign_error): New helper function.
10217 (check_final_reassigned, check_init): Use it.
10218 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
10219
10220 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
10221 bit-fields to unsigned.
10222
10223 2001-12-03 Per Bothner <per@bothner.com>
10224
10225 * parse.y (patch_binop): Minor constant folding.
10226
10227 * parse.y (build_current_thisn): Shorter 'buffer'.
10228
10229 2001-12-03 Per Bothner <per@bothner.com>
10230
10231 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
10232 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
10233 * jcf-write.c (generate_bytecode_insns): Remove support for
10234 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
10235 * check-init.c (check_init): Likewise.
10236
10237 2001-12-03 Per Bothner <per@bothner.com>
10238
10239 * verify.c (subroutine_nesting): New function.
10240 (verify_jvm_instructions): Use it to fix logic for checking that
10241 we're done with the current subroutine.
10242
10243 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
10244 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
10245
10246 2001-12-03 Per Bothner <per@bothner.com>
10247
10248 * jcf.h: Fix obvious typo in comment.
10249 * typeck.c (build_null_signature): Add comment.
10250
10251 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
10252
10253 * expr.c: Remove leading capital from diagnostic messages, as
10254 per GNU coding standards.
10255 * jcf-io.c: Similarly.
10256 * jcf-parse.c: Similarly.
10257 * jv-scan.c: Similarly.
10258 * jvspec.c: Similarly.
10259 * mangle.c: Similarly.
10260
10261 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
10262 Alexandre Petit-Bianco <apbianco@redhat.com>
10263
10264 * expr.c (build_java_arrayaccess): Call save_expr on array for
10265 correct evaluation order, modified comment, fixed indentation.
10266 * parse.y: (patch_assignment): Correctly extract the array base
10267 from the tree generate by build_java_arrayaccess, added comments.
10268 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
10269 Fixes PR java/3096, PR java/3803, PR java/3965.
10270
10271 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
10272
10273 * expr.c (expand_byte_code): Remove trailing periods from messages.
10274 * jcf-parse.c (load_class, jcf_parse): Similarly.
10275 * jcf-write.c (generate_classfile): Similarly.
10276 * lex.c (java_lex): Similarly.
10277
10278 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10279
10280 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
10281
10282 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
10283
10284 * Make-lang.in (java.generated-manpages): New dummy target.
10285
10286 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10287
10288 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10289 ASM_FINAL_SPEC.
10290 (lang_specific_pre_link): Use set_input to set input_filename.
10291 Append `main' here.
10292 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10293 (main): Fix definition.
10294 Strip `main' from classname.
10295 Fixes PR java/227.
10296
10297 2001-11-18 Roger Sayle <roger@eyesopen.com>
10298
10299 * parse.h (java_expand_switch): Remove old prototype.
10300
10301 2001-11-18 Tom Tromey <tromey@redhat.com>
10302
10303 Fix for PR java/1401:
10304 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
10305 arg0 is null.
10306 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
10307 correctly.
10308
10309 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
10310
10311 * lang.c (finish_parse): Rename to java_finish.
10312 (LANG_HOOKS_FINISH, java_finish): New.
10313
10314 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
10315
10316 * decl.c (init_decl_processing): Rename java_init_decl_processing.
10317 * java-tree.h: New prototype.
10318 * lang.c (java_init): Update prototype. Combine with old init_parse.
10319
10320 2001-11-13 Tom Tromey <tromey@redhat.com>
10321
10322 * gjavah.c (method_signature): New global.
10323 (HANDLE_METHOD): Set it.
10324 (decompile_return_statement): New function.
10325 (decompile_method): Use it.
10326 (print_method_info): Removed `synth' argument.
10327
10328 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10329
10330 * java-tree.h (java_set_yydebug): New.
10331 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
10332 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
10333 (print_lang_decl, print_lang_type, print_lang_identifier,
10334 print_lang_statistics, lang_print_xnode): Remove.
10335
10336 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10337
10338 * jcf-parse.c (init_lex): Remove.
10339 * lang.c (language_string, lang_identify): Remove.
10340 (struct lang_hooks): Constify.
10341 (LANG_HOOKS_NAME): Override.
10342 (init_parse): Update.
10343
10344 2001-11-08 Andreas Franck <afranck@gmx.de>
10345
10346 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
10347 program_transform_name the way suggested by autoconf.
10348 (java.install-common): Also transform auxiliary program names with
10349 program_transform_name.
10350
10351 2001-11-08 Tom Tromey <tromey@cygnus.com>
10352
10353 * parse.y (trap_overflow_corner_case): New rule.
10354 (unary_expression): Use it.
10355 * lex.c (java_init_lex): Don't set minus_seen.
10356 (yylex): Don't use minus_seen. Communicate overflow to parser for
10357 it to handle.
10358 (error_if_numeric_overflow): New function.
10359 * parse.h (minus_seen): Removed field.
10360 (JAVA_RADIX10_FLAG): New define.
10361
10362 2001-11-07 Tom Tromey <tromey@redhat.com>
10363
10364 Patch for PR java/1414:
10365 * parse.y (case_label_list): New global.
10366 (goal): Register case_label_list with GC.
10367 (java_complete_lhs): Save new case on case_label_list.
10368 (patch_switch_statement): Check for duplicate case labels.
10369
10370 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10371
10372 * parse.y (patch_assignment): Removed unused third argument.
10373 (java_complete_lhs): Removed unused third argument to patch_assignment.
10374
10375 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10376
10377 * lang.c: Include langhooks-def.h.
10378 * Make-lang.in: Update.
10379
10380 2001-10-31 Zack Weinberg <zack@codesourcery.com>
10381
10382 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10383
10384 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10385
10386 * mangle.c (find_compression_record_match): Don't match compression
10387 records for package name elements unless they occur at the start of
10388 the name. Fix for PR java/4717.
10389
10390 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10391
10392 * expr.c (expand_java_field_op): Don't special-case references to
10393 java.lang.PRIMTYPE.TYPE.
10394 (build_primtype_type_ref): Removed.
10395 * java-tree.h (build_primtype_type_ref): Remove prototype.
10396 * parse.y (maybe_build_primttype_type_ref): Removed.
10397 (complete_function_arguments): Don't special-case references to
10398 java.lang.PRIMTYPE.TYPE.
10399 (patch_assignment): Likewise.
10400 (array_constructor_check_entry): Likewise.
10401
10402 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10403
10404 * mangle.c (static tree compression_table): Fixed leading comment.
10405 * parse.h (struct parser_ctxt): Fixed field comment.
10406 * parse.y (check_pkg_class_access): New prototype, fixed leading
10407 comment, new parameter used to emit error only if passed as true.
10408 (parse_check_super): Pass extra argument to check_pkg_class_access.
10409 (do_resolve_class): Likewise.
10410 (process_imports): Likewise.
10411 (read_import_dir): Fixed indentation.
10412 (find_in_imports_on_demand): New local class_type_name. Local
10413 node_to_use deleted. while loop changed into for loop. Report
10414 multiple definition only for accessible classes. Improved error
10415 message.
10416 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
10417 assigned to parameter list, fixed indentation. while loop changed
10418 into for loop, restore TREE_CHAIN on local `tem' before the next
10419 iteration.
10420
10421 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10422
10423 * lang.c (lang_get_alias_set): Deleted.
10424
10425 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10426
10427 * gjavah.c (jni_print_char): Fix thinko in last change.
10428
10429 * gjavah.c (jni_print_char, decode_signature_piece): Use
10430 safe-ctype macros and/or fold extra calls into fewer ones.
10431 * lex.c (java_read_unicode, java_lex): Likewise.
10432 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
10433 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
10434 * mangle_name.c (append_unicode_mangled_name,
10435 unicode_mangling_length): Likewise.
10436
10437 2001-10-17 Richard Henderson <rth@redhat.com>
10438
10439 * Make-lang.in (java/lang.o): Depend on langhooks.h.
10440
10441 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
10442
10443 * lang.c (langhooks.h): Included.
10444 (LANG_HOOKS_INIT): Redefined.
10445 (LANG_HOOKS_INIT_OPTIONS): Likewise.
10446 (LANG_HOOKS_DECODE_OPTION): Likewise.
10447 (struct lang_hooks lang_hooks): New initialization.
10448
10449 2001-10-11 Per Bothner <per@bothner.com>
10450
10451 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
10452 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
10453 The former is simpler, and jcf-write.c handles it better.
10454 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
10455 or WITH_CLEANUP_EXPR.
10456 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
10457 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
10458
10459 * parse.y (patch_if_else_statement): If the condition is constant,
10460 optimize away the test.
10461
10462 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10463
10464 * parse.y (patch_cast): Call patch_string on the first operand of
10465 the incoming node, update it if necessary. Fixes PR java/4510.
10466
10467 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10468
10469 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
10470 when name qualifier matches a package name.
10471
10472 2001-10-08 Tom Tromey <tromey@redhat.com>
10473
10474 Fix for PR java/4489:
10475 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
10476 force a new label when computing `body_block'.
10477
10478 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10479
10480 * jcf-io.c (format_uint): Const-ify.
10481 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
10482 * lex.c (java_get_line_col): Likewise.
10483 * parse.y (build_incdec): Likewise.
10484
10485 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10486
10487 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
10488 a NULL enclosing context if appropriate. Fixes PR java/4466.
10489
10490 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
10491
10492 * parse.y (patch_assignment): Use lvalue's original TYPE when
10493 building the final COMPOUND_EXPR.
10494 (try_reference_assignconv): Fixed leading comment.
10495
10496 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
10497
10498 * parse.y (check_final_variable_indirect_assignment): For
10499 COMPOUND_EXPR, return only if finals were found initialized
10500 properly, if not, keep on checking.
10501 (check_final_variable_global_assignment_flag): New local
10502 error_found, set when appropriate and used to decide whether to
10503 report uninitialized finals. Fixed typo in comment.
10504
10505 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10506
10507 * decl.c (init_decl_processing): Fixed typo in predef_filenames
10508 last three initializations. Fixes PR java/4360.
10509
10510 2001-09-21 Richard Henderson <rth@redhat.com>
10511
10512 * class.c (get_dispatch_table): Handle function descriptors.
10513 (build_dtable_decl): Likewise.
10514 * expr.c (build_invokevirtual): Likewise.
10515
10516 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10517
10518 * parse.y (patch_method_invocation): Build class initialization
10519 when static finals are used to qualify method invocation.
10520 Fixes PR java/4366.
10521
10522 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
10523
10524 * parse.h: (WFL_STRIP_BRACKET): Re-written using
10525 build_type_name_from_array_name.
10526 (STRING_STRIP_BRACKETS): New macro.
10527 * parse.y (build_type_name_from_array_name): New function.
10528 (array_creation_expression:): Accumulate []s instead of [s.
10529 (cast_expression:): Accumulate []s instead of [s after cast type
10530 name.
10531 (build_array_from_name): Local string deleted, use
10532 build_type_name_from_array_name.
10533 (build_unresolved_array_type): Accumulate []s instead of [s after
10534 type name.
10535 (register_fields): Fixed comment.
10536 (resolve_class): Local name, base deleted, new locals tname and
10537 array_dims. Use build_type_name_from_array_name. Use array_dims to
10538 build array type.
10539 (purify_type_name): Use STRING_STRIP_BRACKETS.
10540
10541 2001-09-18 Andreas Jaeger <aj@suse.de>
10542
10543 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10544 * jv-scan.c: Likewise.
10545
10546 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10547
10548 * parse.y (patch_method_invocation): Inner class creation context
10549 check not enforced within constructors. Fixes PR java/1873.
10550
10551 2001-09-16 Tom Tromey <tromey@redhat.com>
10552
10553 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10554 NOTE_PUSH for single-case push. Fixes PR java/4189.
10555
10556 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10557
10558 * java-tree.h (TYPE_IMPORT_LIST): New macro.
10559 (TYPE_IMPORT_DEMAND_LIST): Likewise.
10560 (struct lang_type): New fields import_list and import_demand_list.
10561 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10562 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10563 (do_resolve_class): New local saved_enclosing_type, initialized,
10564 passed as parameter to find_in_imports and find_in_imports_on_demand.
10565 (find_in_imports): Added paramater enclosing_type, use its
10566 TYPE_IMPORT_LIST when applicable.
10567 (find_in_imports_on_demand): Added parameter enclosing_type, use
10568 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10569 declaration and initialization.
10570 (fold_constant_for_init): Switch/restore current_class to the
10571 appropriate context.
10572
10573 2001-09-13 Mark Mitchell <mark@codesourcery.com>
10574
10575 * verify.c (verify_jvm_instructions): Fix typo.
10576
10577 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10578
10579 * expr.c (expand_invoke): Const-ification.
10580 * parse.y (patch_method_invocation): Likewise.
10581
10582 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10583
10584 * gjavah.c (cxx_keywords): Const-ification.
10585 * keyword.gperf (java_keyword): Likewise.
10586 * lang.c (java_tree_code_name): Likewise.
10587 * lex.c (cxx_keywords): Likewise.
10588 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10589
10590 2001-09-11 Richard Henderson <rth@redhat.com>
10591
10592 * parse.h (ctxp_for_generation): Mark extern.
10593
10594 2001-09-10 Richard Henderson <rth@redhat.com>
10595
10596 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10597
10598 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10599
10600 * typeck.c (java_array_type_length, build_prim_array_type):
10601 Represent empty arrays by NULL index.
10602
10603 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
10604
10605 * java-tree.h (compile_resource_file): Grouped with other prototypes.
10606 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10607
10608 2001-09-06 Anthony Green <green@redhat.com>
10609
10610 * class.c (O_BINARY): Define if necessary.
10611 (registerResource_libfunc): Declare.
10612 (init_class_processing): Initilize registerResource_libfunc.
10613 (compile_resource_file): New function.
10614 * java-tree.h (resource_name): Declare.
10615 (compile_resource_file): Declare.
10616 * jcf-parse.c (yyparse): Handle compiling java resource files.
10617 * lang.c (java_decode_option): Handle -fcompile-resource option.
10618 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10619 resource files.
10620 * gcj.texi (Code Generation): Add documentation for -R flag.
10621
10622 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10623
10624 * jcf-write.c (generate_classfile): Issue an error in case of
10625 field/initial value mismatch.
10626 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10627 being initialized and we're generating bytecode.
10628 (java_complete_lhs): In MODIFY_EXPR section: added comments,
10629 set DECL_INITIAL properly when appropriate.
10630 Fixes PR java/4230
10631 Fixes PR java/4204
10632
10633 2001-09-01 Per Bothner <per@bothner.com>
10634
10635 * parse.y (maybe_yank_clinit): A field without an initializer is not
10636 relevant. All initializers except static final and constant require
10637 <clinit>, regardless of flag_emit_class_files.
10638
10639 2001-08-31 Per Bothner <per@bothner.com>
10640
10641 * class.c (set_constant_value): When not emitting class files, then a
10642 String ConstantValue is a utf8const_ptr_type.
10643
10644 2001-08-30 Per Bothner <per@bothner.com>
10645
10646 * jcf-write.c (generate_classfile): Check that field is primitive
10647 or string before emitting ConstantValue attribute.
10648
10649 2001-08-30 Per Bothner <per@bothner.com>
10650
10651 * parse.y (resolve_qualified_expression_name): If creating a
10652 COMPOUND_EXPR, set it's type correctly.
10653
10654 2001-08-30 Per Bothner <per@bothner.com>
10655
10656 * jcf-io.c (open_class): Set filename field.
10657
10658 * jcf-parse,c (parse_class_file): Set current_function_decl
10659 for better error message when Code attribute is missing.
10660
10661 * lang.c (put_decl_node, lang_print_error): Re-arrange for
10662 better diagnostics, especially for constructors.
10663
10664 2001-08-30 Per Bothner <per@bothner.com>
10665
10666 * jcf-write.c (generate_classfile): Don't write ConstantValue
10667 attribute if field is not final, for compatibility with jdk.
10668
10669 * jcf-write.c (generate_classfile): Convert ConstantValue values
10670 to correct type. Work-around for front-end bug.
10671 * class.c (set_constant_value): Error if constant has wrong type.
10672
10673 2001-08-30 Per Bothner <per@bothner.com>
10674
10675 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
10676 "Double" are printed at verbosity 1.
10677
10678 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
10679
10680 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
10681
10682 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10683
10684 * parse.y (patch_assignment): Don't verify final re-assignment here.
10685 (java_complete_lhs): Verify assignments to finals calling
10686 patch_assignment. Verify re-assignments to finals before calling
10687 patch_assignment.
10688
10689 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
10690
10691 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10692 Fixes PR java/1413
10693
10694 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
10695
10696 * lex.c (java_lex): new local found_hex_digits. Set and then used
10697 in test to reject invalid hexadecimal numbers.
10698 * parse.y (java_complete_tree): Prevent unwanted cast with
10699 initialized floating point finals.
10700 (patch_binop): Emit a warning when detecting a division by zero,
10701 mark result not constant, don't simplify non integer division.
10702
10703 2001-08-28 Per Bothner <per@bothner.com>
10704
10705 * jcf-write.c (generate_bytecode_insns): For increments and
10706 decrements just recurse to push constant. Improvement on Mark's patch.
10707
10708 2001-08-28 Mark Mitchell <mark@codesourcery.com>
10709
10710 * jcf-write.c (generate_bytecode_insns): Generate an integer to
10711 real conversion for increments and decrements of reals.
10712
10713 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10714
10715 * parse.y (resolve_qualified_expression_name): Handle unresolved
10716 qualified expressions, prevent numerical qualifiers, fixed typo.
10717 Fixes PR java/4141
10718
10719 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10720
10721 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10722 don't report anything but deprecated class when marked so. Handle
10723 VAR_DECL.
10724 (patch_method_invocation): Check deprecation on methods and types.
10725 (patch_binop): code becomes an enum tree_code, added default: to
10726 switch to handle that. Detect division by zero, try to fold and
10727 return before using a subroutine.
10728
10729 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
10730
10731 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10732 file smaller than 4 bytes.
10733 * parse.y (check_inner_circular_reference): New function.
10734 (check_circular_reference): Likewise.
10735 (array_initializer:): Accept {,}.
10736 (java_check_circular_reference): Rewritten using
10737 check_circular_reference and check_inner_circular_reference.
10738 (java_complete_expand_method): Unconditionally save and restore
10739 the unpurged exception list.
10740 (build_dot_class_method_invocation): Unmangle signature parameter.
10741
10742 2001-08-21 Tom Tromey <tromey@redhat.com>
10743
10744 * decl.c (init_decl_processing): Add `throws' field to method
10745 descriptor.
10746 * class.c (make_method_value): Compute `throws' field for method.
10747
10748 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10749
10750 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10751 circularity is detected.
10752 (ctors_unchecked_throws_clause_p): Fixed leading comment.
10753
10754 2001-08-17 Richard Henderson <rth@redhat.com>
10755
10756 * class.c (emit_register_classes): Add align parameter to
10757 call to assemble_integer.
10758
10759 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
10760
10761 * jcf-parse.c (load_class): New locals saved and class_loaded. If
10762 loading a class_or_name fails, try considering an innerclass name
10763 and load the enclosing context.
10764 * parse.y (resolve_inner_class): New function.
10765 (find_as_inner_class): Added leading comment.
10766 (register_incomplete_type): Keep the current context as enclosing
10767 context for JDEP_FIELD dependencies.
10768 (do_resolve_class): Locals new_class_decl and super initialized to
10769 NULL. Call resolve_inner_class, explore the enclosing context
10770 superclass if necessary.
10771 Fixes PR java/4007
10772
10773 2001-08-16 Tom Tromey <tromey@redhat.com>
10774
10775 * jcf-dump.c (main): Updated for change to jcf_path_seal.
10776 * gjavah.c (main): Updated for change to jcf_path_seal.
10777 * lang.c (version_flag): New global.
10778 (java_decode_option): Recognize `-version'.
10779 (java_init): Update for change to jcf_path_seal.
10780 * jcf.h (jcf_path_seal): Added `print' argument.
10781 * jcf-path.c (jcf_path_seal): Added `print' argument.
10782
10783 2001-08-13 Zack Weinberg <zackw@panix.com>
10784
10785 * Make-lang.in (java/decl.o): Update dependencies.
10786 * decl.c: Include libfuncs.h, don't include toplev.h.
10787
10788 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10789
10790 * decl.c (init_decl_processing): exception_type_node,
10791 class_not_found_type_node, and no_class_def_found_type_node
10792 initialized. predef_filenames augmented accordingly.
10793 instinit_identifier_node initialized.
10794 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10795 * java-tree.h (enum java_tree_index): New entries
10796 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10797 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10798 (exception_type_node): New macro.
10799 (class_not_found_type_node): Likewise.
10800 (no_class_def_found_type_node): Likewise.
10801 (instinit_identifier_node): Likewise.
10802 (PREDEF_FILENAMES_SIZE): Adjusted.
10803 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10804 (struct lang_type): Fixed typo in bitfield name.
10805 (DECL_INSTINIT_P): New macro.
10806 (ID_INSTINIT_P): Likewise.
10807 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10808 attribute.
10809 * parse.y (encapsulate_with_try_catch): New function.
10810 (generate_instinit): Likewise.
10811 (build_instinit_invocation): Likewise.
10812 (ctors_unchecked_throws_clause_p): Likewise.
10813 (add_instance_initializer): Deleted.
10814 (build_instance_initializer): Likewise.
10815 (in_instance_initializer): Likewise.
10816 (check_method_redefinition): instinit$ not to be verified.
10817 (java_complete_expand_methods): Generate instinit$, simplified code.
10818 (build_dot_class_method): Eliminated unnecessary locals. Use
10819 encapsulate_with_try_catch, removed unnecessary code.
10820 (fix_constructors): New local iii. Use build_instinit_invocation.
10821 (patch_method_invocation): Added comment.
10822 (maybe_use_access_method): Don't consider instinit$.
10823 (find_applicable_accessible_methods_list): Shorten the search for
10824 instinit$ too.
10825 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10826 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10827 (patch_throw_statement): Likewise. Fixed typo.
10828
10829 2001-08-12 David Edelsohn <edelsohn@gnu.org>
10830
10831 Revert:
10832 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10833 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10834 ASM_FINAL_SPEC.
10835 (lang_specific_pre_link): Use set_input to set input_filename.
10836 Append `main' here.
10837 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10838 (main): Fix definition.
10839 Strip `main' from classname.
10840 Fixes PR java/227.
10841
10842 2001-08-11 Zack Weinberg <zackw@panix.com>
10843
10844 * lex.h: Don't include setjmp.h. Don't define
10845 SET_FLOAT_HANDLER or prototype set_float_handler.
10846
10847 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10848
10849 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10850 `poplevel' in the right order.
10851
10852 2001-08-09 Richard Henderson <rth@redhat.com>
10853
10854 * Make-lang.in (class.o): Depend on TARGET_H.
10855 * class.c (emit_register_classes): Use target hooks instead of
10856 assemble_constructor and assemble_destructor.
10857
10858 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
10859
10860 * check-init.c (flags.h): Include
10861 (check_init): Don't report uninitialized static class
10862 initialization flags, don't free bit index when doing static class
10863 initialization optimization.
10864 (check_for_initialization): Return type changed to `unsigned int.'
10865 (attach_initialized_static_class): New function.
10866 * class.c (add_method_1): Create the initialized static class
10867 table if necessary.
10868 (finish_class): Always emit deferred inline methods.
10869 * decl.c (emit_init_test_initialization): Moved to expr.c
10870 (complete_start_java_method): Don't traverse
10871 DECL_FUNCTION_INIT_TEST_TABLE.
10872 (lang_mark_tree): Mark hash tables in function decls.
10873 * expr.c (emit_init_test_initialization): Moved from decl.c.
10874 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10875 initialization flag, set DECL_CONTEXT and
10876 LOCAL_CLASS_INITIALIZATION_FLAG.
10877 (java_lang_expand_expr): Emit initialization code for static class
10878 initialized flags when entering block, if necessary.
10879 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10880 * java-tree.h (flag_optimize_sci): New global variable declaration.
10881 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10882 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10883 (LOCAL_FINAL_P): Fixed typo in comment.
10884 (FINAL_VARIABLE_P): Likewise.
10885 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10886 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10887 (struct lang_decl): New fields `ict', `smic' and `cif.'
10888 (check_for_initialization): New returned value for global.
10889 (attach_initialized_static_class): New global function.
10890 (STATIC_CLASS_INIT_OPT_P): New macro.
10891 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10892 * lang.c (java_decode_option): Handle
10893 `-fno-optimize-static-class-initialization'
10894 * parse.y (start_complete_expand_method): New function.
10895 (java_expand_method_bodies): Likewise.
10896 (attach_init_test_initialization_flags): Likewise.
10897 (adjust_init_test_initialization): Likewise.
10898 (emit_test_initialization): Likewise.
10899 (java_complete_expand_methods): Nullify abstract and native method
10900 bodies.
10901 (java_complete_expand_method): New locals `fbody', `block_body'
10902 and `exception_copy.' Reorganized: directly return on empty method
10903 bodies, call `start_complete_expand_method', remember definitely
10904 initialized static class in function, don't expand method bodies.
10905 (java_expand_classes): Call `java_expand_method_bodies' before
10906 `finish_class' when compiling to native.
10907 (resolve_expression_name): Use `orig' after building outer class
10908 field access.
10909 (patch_invoke): Remember static method invocations.
10910
10911 2001-08-06 Richard Henderson <rth@redhat.com>
10912
10913 * class.c (emit_register_classes): Pass a symbol_ref and priority
10914 to assemble_constructor.
10915
10916 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
10917
10918 * java-tree.h (all_class_filename): New macro.
10919 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
10920 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
10921 newly created IDENTIFIER_NODE to `all_class_filename.'
10922
10923 2001-08-01 Jeff Sturm <jsturm@one-point.com>
10924
10925 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
10926 Use ggc_add_tree_root to register roots.
10927
10928 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10929
10930 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
10931 second operand calling check_init.
10932 * decl.c (complete_start_java_method): Swaped second and third
10933 arguments while creating WITH_CLEANUP_EXPR node.
10934 * jcf-write.c (generate_bytecode_insns): Use second operand
10935 instead of third when handling WITH_CLEANUP_EXPR.
10936 * parse.y (java_complete_lhs): Expand second operand of
10937 WITH_CLEANUP_EXPR nodes.
10938 (patch_synchronized_statement): Swaped second and third arguments
10939 while creating WITH_CLEANUP_EXPR node.
10940
10941 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
10942
10943 * parse.y (create_interface): Avoid cyclic inheritance report when
10944 syntax error encountered during class definition.
10945 Fixes PR java/2956
10946
10947 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10948
10949 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10950 ASM_FINAL_SPEC.
10951 (lang_specific_pre_link): Use set_input to set input_filename.
10952 Append `main' here.
10953 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10954 (main): Fix definition.
10955 Strip `main' from classname.
10956 Fixes PR java/227.
10957
10958 2001-07-18 Tom Tromey <tromey@redhat.com>
10959
10960 For PR java/2812:
10961 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
10962 * lex.c (java_new_lexer): Use ICONV_CONST.
10963 (java_read_char): Likewise.
10964 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
10965 (jv-scan$(exeext)): Likewise.
10966
10967 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10968
10969 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
10970 * parse.y (check_class_interface_creation): Allow `private' if the
10971 enclosing is not an interface.
10972 (create_interface): Interface tagged public if the enclosing
10973 context is an interface.
10974 (create_class): Class tagged public if the enclosing context
10975 is an interface.
10976 Fixes PR java/2959
10977
10978 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10979
10980 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
10981 Fixes PR java/2665
10982
10983 2001-07-14 Tim Josling <tej@melbpc.org.au>
10984
10985 * check-init.c (check_init): Remove references to EXPON_EXPR.
10986
10987 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10988
10989 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
10990 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
10991 Fixes PR java/3602
10992
10993 2001-07-13 Tom Tromey <tromey@redhat.com>
10994
10995 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
10996 invocation.
10997
10998 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10999
11000 * parse.y (patch_method_invocation): Don't override primary if one
11001 is already provided, but let this$<n> be built. Fixed comment.
11002
11003 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
11004
11005 * parse.y (empty_statement:): Report empty statement error only
11006 when found at class declaration level.
11007 Fixes PR java/3635
11008
11009 2001-07-12 Tom Tromey <tromey@redhat.com>
11010
11011 * expr.c (expand_load_internal): New function.
11012 (LOAD_INTERNAL): Use it.
11013
11014 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
11015
11016 * parse.y (verify_constructor_super): Compare anonymous class ctor
11017 args with `valid_method_invocation_conversion_p.'
11018 Fixes PR java/3285
11019
11020 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11021
11022 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
11023 `-fsyntax-only.' Fixes PR java/3248
11024
11025 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11026
11027 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
11028
11029 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11030
11031 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
11032 current function is static. Fixes PR java/1970
11033
11034 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11035
11036 * parse.y (patch_method_invocation): Add enclosing context to ctor
11037 calls if necessary. Fixes PR java/2953
11038
11039 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11040
11041 * parse.y (resolve_package): Abort if qualified expression member
11042 isn't right.
11043 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
11044 Fixes PR java/1391
11045
11046 2001-07-07 Zack Weinberg <zackw@stanford.edu>
11047
11048 * verify.c: Don't use // comments.
11049
11050 2001-07-05 Tom Tromey <tromey@redhat.com>
11051
11052 * lang.c (flag_assume_compiled): Removed.
11053 * java-tree.h (flag_assume_compiled): Removed.
11054 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
11055 -fhash-synchronization, -fuse-divide-subroutine,
11056 -fcheck-references, -femit-class-file, -femit-class-files,
11057 -fassume-compiled. Updated --encoding information. Changed
11058 -foutput-class-dir to `-d'.
11059
11060 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
11061
11062 * jcf-parse.c (parse_class_file): Add lineno parameter to
11063 debug_start_source_file call.
11064
11065 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
11066
11067 * gcj.texi: Use gpl.texi.
11068 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
11069 dependencies and use doc/include in search path.
11070
11071 2001-07-03 Jeff Sturm <jsturm@one-point.com>
11072
11073 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
11074 `this'. If so, don't build instance initializers.
11075
11076 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
11077
11078 * parse.y (resolve_expression_name): Improved error message for
11079 inner class cases. Fixes PR java/1958
11080
11081 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
11082
11083 * lang.c: #include diagnostic.h
11084 (lang_print_error): Add a `diagnostic_context *' parameter.
11085 (java_dummy_print): Likewise.
11086 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
11087
11088 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11089
11090 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
11091 * jcf.h (typedef struct JCF): New bitfield `finished.'
11092 (JCF_FINISH): Set `finished.'
11093 (JCF_ZERO): Reset `finished.'
11094 Fixes PR java/2633
11095
11096 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11097
11098 * parse.y (class_body_declaration:): Don't install empty instance
11099 initializers.
11100 Fixes PR java/1314
11101
11102 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11103
11104 * class.c (set_super_info): Call `set_class_decl_access_flags.'
11105 (set_class_decl_access_flags): New function.
11106 * java-tree.h (set_class_decl_access_flags): New prototype.
11107 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
11108 (parse_class_file): New local `decl_max_locals.' Take wide types
11109 into account to compute DECL_MAX_LOCALS.
11110 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
11111 imports on demand.
11112
11113 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
11114
11115 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
11116
11117 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11118
11119 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
11120 * parse.y (do_resolve_class): Moved comments out to leading comment
11121 section. Removed local `start', New local `_ht' and
11122 `circularity_hash.' Record `enclosing' in hash table and search
11123 it to detect circularity. Use `enclosing' as an argument to
11124 `lookup_cl.' Free the hash table when done.
11125
11126 2001-06-19 Tom Tromey <tromey@redhat.com>
11127
11128 * lex.c (java_read_char): Disallow invalid and overlong
11129 sequences. Fixes PR java/2319.
11130
11131 2001-06-05 Jeff Sturm <jsturm@one-point.com>
11132
11133 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
11134
11135 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11136
11137 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
11138 arguments accordingly.
11139
11140 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
11141
11142 * gcj.texi: Move contents to just after title page.
11143
11144 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
11145
11146 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
11147 builtin type.
11148 (patch_incomplete_class_ref): Build the class ref, build the class
11149 init if necessary, complete the tree.
11150 Fixes PR java/2605
11151
11152 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
11153
11154 * parse.y (lookup_field_wrapper): Test `name' code.
11155 (resolve_qualified_expression_name): Test `qual_wfl' code.
11156 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
11157 handle `qual_wfl' by code.
11158 (maybe_build_primttype_type_ref): Test `wfl' code.
11159
11160 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11161
11162 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
11163 fdl.texi.
11164 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
11165 the dvi file in the java directory.
11166
11167 2001-05-25 Sam TH <sam@uchicago.edu>
11168
11169 * gen-table.pl javaop.h jcf.h lex.h,
11170 parse.h: Fix header include guards.
11171
11172 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
11173
11174 * jv-scan.c (version): Update copyright year.
11175
11176 2001-05-21 Per Bothner <per@bothner.com>
11177
11178 * jcf-parse.c (read_class): If class is from .class or .zip file
11179 and it's already been read, don't push/pop parser context.
11180
11181 2001-05-18 Per Bothner <per@bothner.com>
11182
11183 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
11184 command line so the jvgenmain-generated main program comes first.
11185
11186 2001-05-15 Tom Tromey <tromey@redhat.com>
11187
11188 * class.c (build_utf8_ref): Don't generate identifier based on
11189 utf8const contents.
11190
11191 2001-05-12 Richard Henderson <rth@redhat.com>
11192
11193 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
11194 * expr.c (java_lang_expand_expr): Expand it.
11195 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
11196 calling build_exception_object_ref.
11197 * parse.y (catch_clause_parameter): Likewise.
11198 (build_dot_class_method): Likewise.
11199 (try_reference_assignconv): Likewise.
11200 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
11201 * jcf-write.c (generate_bytecode_insns): Likewise.
11202
11203 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
11204
11205 * parse.y (build_unresolved_array_type): Set
11206 EXPR_WFL_QUALIFICATION on the newly created wfl.
11207 Fixes PR java/2538. Fixes PR java/2535.
11208
11209 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
11210
11211 * parse.y (fix_constructors): Removed unnecessary assignment to
11212 local. Moved assignment to `this$<n>', fixed comments and
11213 indentation.
11214 (build_wfl_wrap): Fixed indentation.
11215 Fixes PR java/2598, java/2579 and java/2658.
11216
11217 2001-05-03 Mo DeJong <mdejong@redhat.com>
11218
11219 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
11220 check for byte swap.
11221
11222 2000-05-02 Jeff Sturm <jsturm@one-point.com>
11223
11224 * expr.c (build_class_init): Move MODIFY_EXPR
11225 outside of COND_EXPR. Remove variable `call'.
11226
11227 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11228
11229 * decl.c: NULL_PTR -> NULL.
11230 * jcf-write.c: Likewise.
11231
11232 2001-05-01 Tom Tromey <tromey@redhat.com>
11233
11234 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
11235 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
11236 * gcj.texi: Updated copyright text. Include fdl.texi.
11237 (Top): Link to new node.
11238
11239 2001-05-01 Per Bothner <per@bothner.com>
11240
11241 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
11242
11243 2001-05-01 Per Bothner <per@bothner.com>
11244
11245 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
11246 import_list contains the name, not the TREE_PURPOSE.
11247
11248 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11249
11250 * jcf-io.c (read_zip_member): Cast to long in comparison with
11251 signed value.
11252
11253 * jvspec.c (lang_specific_driver): Initialize variables.
11254
11255 * mangle.c (find_compression_record_match): Likewise.
11256
11257 * typeck.c (build_null_signature): Provide static prototype. Mark
11258 parameter with ATTRIBUTE_UNUSED.
11259
11260 * verify.c (verify_jvm_instructions): Initialize variable.
11261
11262 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11263
11264 * parse.y (do_resolve_class): Check for cyclic inheritance during
11265 inner class resolution.
11266
11267 2001-04-27 Per Bothner <per@bothner.com>
11268
11269 * parse.y (java_expand_classes): Don't change ctxp_for_generation
11270 while iterating, since that could cause gc to lose stuff.
11271
11272 2001-04-26 Per Bothner <per@bothner.com>
11273
11274 Fix method search wrt scope of inner classes to match JLS2.
11275 * typeck.c (build_null_signature): New static function.
11276 (has_method): New function. Uses build_null_signature and lookup_do.
11277 * java-tree.h (has_method): New declaration.
11278 * parse.y (find_applicable_accessible_methods_list): Do not search
11279 context of inner classes here.
11280 (patch_method_invocation): Search scope, ie. current and outer clases,
11281 for method matching simple name, to find class.
11282
11283 2001-04-26 Per Bothner <per@bothner.com>
11284
11285 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
11286 Fix thinko: If a single case, use if_icmpeq, not ifeq.
11287
11288 * constants.c (find_methodref_with_class_index): New function.
11289 (find_methodref_index): Use find_methodref_with_class_index.
11290 * java-tree.h (find_methodref_with_class_index): New declaration.
11291 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
11292 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
11293 If context changed from interface to class, don't use invokeinterface.
11294
11295 2001-04-25 Per Bothner <per@bothner.com>
11296
11297 * verify.c (verify_jvm_instructions): For field instructions,
11298 check that field index is valid. For invoke instructions, check that
11299 method index is valid.
11300
11301 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
11302
11303 * config-lang.in (target_libs): Copy from $libgcj_saved.
11304
11305 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11306
11307 * decl.c (init_decl_processing): Add new class "protectionDomain"
11308 field.
11309 * class.c (make_class_data): Set initial value for "protectionDomain".
11310
11311 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11312
11313 * jvspec.c (lang_specific_driver): Fix memory allocation
11314 deficit, by using concat in lieu of xmalloc/sprintf.
11315
11316 2001-04-20 Per Bothner <per@bothner.com>
11317
11318 Fixes to compile multiple .class files at once.
11319 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
11320 * java-tree.h (CLASS_PARSED_P): New macro.
11321 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
11322 * jcf-parse.c (jcf_parse_source): Inline into read_class.
11323 (read_class): Avoid some code duplication.
11324 Don't call JCF_FINISH for a .class file - might be needed later.
11325 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
11326 rather than CLASS_LOADED_P, since latter implies class laid out.
11327 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
11328 * parse.y: Don't need to set CLASS_LOADED_P for array types.
11329
11330 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11331
11332 * Make-lang.in (java/boehm.o): Depend on toplev.h.
11333
11334 * boehm.c: Include toplev.h.
11335
11336 2001-04-06 Tom Tromey <tromey@redhat.com>
11337 Alexandre Petit-Bianco <apbianco@redhat.com>
11338
11339 Fix for PR gcj/1404 and PR gcj/2332:
11340 * parse.y (build_array_from_name): If we use the type_wfl then
11341 accumulate dimensions from the original type as well.
11342 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
11343
11344 2001-04-06 Tom Tromey <tromey@redhat.com>
11345
11346 * parse.y (analyze_clinit_body): Return true if the second operand
11347 of a METHOD_EXPR is nonzero.
11348
11349 2001-04-06 Tom Tromey <tromey@redhat.com>
11350
11351 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
11352 directory.
11353 ($(srcdir)/java/parse.c): Likewise.
11354
11355 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
11356
11357 * gcj.texi: Use `which-gcj' instead of `which-g77.'
11358 (version-gcc): Initialized.
11359 (which-gcj): Likewise.
11360
11361 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11362
11363 * java-tree.h (struct lang_decl): New macro
11364 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
11365 * parse.y (build_instance_initializer): New function.
11366 (add_instance_initializer): Use it.
11367 (java_fix_constructors): Set `current_class' before fix pass.
11368 (fix_constructors): Just return if already fixed. Move `super()'
11369 invocation ahead. Use `build_instance_initializer.'
11370 Fixes PR java/1315.
11371
11372 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11373
11374 * parse.y (resolve_qualified_expression_name): Pass field's
11375 DECL_CONTEXT to `not_accessible_p.'
11376 (not_accessible_p): Changed parameters order in `inherits_from_p'
11377 invocation.
11378
11379 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
11380
11381 * lang-options.h: Add flag_check_references.
11382
11383 2001-04-04 Per Bothner <per@bothner.com>
11384
11385 * java-tree.h (CONSTANT_VALUE_P): New macro.
11386 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
11387 * parse.y (maybe_build_class_init_for_field): New static function.
11388 (resolve_expression_name, resolve_field_access): Use
11389 maybe_build_class_init_for_field instead of build_class_init
11390 This does not do the init if the field is compile-time-constant.
11391 (resolve_field_access): Simplify.
11392
11393 * parse.y (fold_constant_for_init): Merge test into switch.
11394
11395 2001-04-03 Zack Weinberg <zackw@stanford.edu>
11396
11397 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
11398 on gansidecl.h.
11399 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
11400
11401 2001-04-02 Zack Weinberg <zackw@stanford.edu>
11402
11403 * expr.c (pop_type_0): Save the result of the first
11404 lang_printable_name call in a scratch buffer, so it
11405 won't be clobbered by the second call.
11406
11407 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
11408
11409 * parse-scan.y (array_type:): Rewritten.
11410 (type_declaration:): `empty_statement' replaces `SC_TK.'
11411 (class_member_declaration:): `empty statement' added.
11412 (method_body:): Simplified.
11413 (static_initializer:): Likewise.
11414 (primary_no_new_array:): Use `type_literals.'
11415 (type_literals:): New rule.
11416 (dims:): Set and update `bracket_count.'
11417 Fixes PR java/1074. Fixes PR java/2412.
11418
11419 2001-03-28 Hans Boehm <boehm@acm.org>
11420
11421 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
11422 (get_boehm_type_descriptor): Set type on returned value to be a
11423 pointer length integer.
11424
11425 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11426
11427 * expr.c (pop_type_0): Call `concat' rather than building the
11428 string manually.
11429 (pop_type): Add format specifier in call to `error'.
11430
11431 * parse.y (patch_method_invocation): Avoid casting away
11432 const-ness.
11433
11434 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
11435
11436 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
11437
11438 2001-03-28 Richard Henderson <rth@redhat.com>
11439
11440 IA-64 ABI Exception Handling:
11441 * Make-lang.in (except.o): Don't depend on eh-common.h.
11442 * check-init.c (check_init): Handle EXC_PTR_EXPR.
11443 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
11444 [soft_exceptioninfo_call_node]: Remove.
11445 [eh_personality_libfunc, lang_eh_runtime_type]: New.
11446 (end_java_method): No emit_handlers.
11447 * except.c (java_set_exception_lang_code): Remove.
11448 (method_init_exceptions): Don't call it.
11449 (prepare_eh_table_type): No CATCH_ALL_TYPE.
11450 (build_exception_object_ref): New.
11451 (expand_end_java_handler): Update for except.h name changes.
11452 (emit_handlers, expand_resume_after_catch): Remove.
11453 * expr.c (java_lang_expand_expr): Update for except.h name changes.
11454 (process_jvm_instruction): Use build_exception_object_ref.
11455 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
11456 (soft_exceptioninfo_call_node): Remove.
11457 (build_exception_object_ref): Declare.
11458 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
11459 soft_exceptioninfo_call_node. Move processing ...
11460 [EXC_PTR_EXPR]: ... here.
11461 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
11462 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
11463 (source_end_java_method): No java_set_exception_lang_code or
11464 emit_handlers.
11465 (build_dot_class_method): Use build_exception_object_ref.
11466 (try_reference_assignconv): Check EXC_PTR_EXPR not
11467 soft_exceptioninfo_call_node.
11468
11469 2001-03-28 Richard Henderson <rth@redhat.com>
11470
11471 * java-tree.h (throw_node): Define as a single member of
11472 java_global_trees instead of a separate array.
11473 (JTI_THROW_NODE): New.
11474 * decl.c (throw_node): Don't declare.
11475 (init_decl_processing): Init a scalar throw_node.
11476 Don't register it for gc.
11477 * check-init.c (check_init): Reference scalar throw_node.
11478 * expr.c (build_java_athrow): Likewise.
11479 * jcf-write.c (generate_bytecode_insns): Likewise.
11480 * parse.h (BUILD_THROW): Likewise.
11481
11482 2001-03-28 Richard Henderson <rth@redhat.com>
11483
11484 * decl.c (end_java_method): Do not save and restore
11485 flag_non_call_exceptions.
11486 * parse.y (source_end_java_method): Likewise.
11487 * lang.c (flag_exceptions): Don't declare.
11488 (java_init_options): Set flag_non_call_exceptions. Set
11489 flag_exceptions here ...
11490 (java_init): ... not here.
11491
11492 2001-03-27 Richard Henderson <rth@redhat.com>
11493
11494 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11495 exceptions_via_longjmp.
11496
11497 * lang.c (flag_new_exceptions): Don't declare it.
11498 (java_init_options): Or set it.
11499
11500 2001-03-27 Richard Henderson <rth@redhat.com>
11501
11502 * decl.c (end_java_method): Rename asynchronous_exceptions to
11503 flag_non_call_exceptions.
11504 * parse.y (source_end_java_method): Likewise.
11505
11506 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11507
11508 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11509
11510 2001-03-26 Mark Mitchell <mark@codesourcery.com>
11511
11512 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11513
11514 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
11515
11516 * parse.y (find_as_inner_class): Follow current package
11517 indications not to mistakingly load an unrelated class.
11518
11519 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11520
11521 * constants.c (PUTN): Use memcpy, not bcopy.
11522
11523 * lex.c (java_read_char): Use memmove, not bcopy.
11524
11525 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11526
11527 2001-03-23 Per Bothner <per@bothner.com>
11528
11529 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
11530 macro for better error pin-pointing.
11531 * java-tree.h: Fix typo in comment.
11532
11533 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
11534 Don't include jsr/goto in exception range.
11535 Check if start and end of exception range are the same (also TRY_EXPR).
11536 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11537 However, do emit the following goto even if try_block is empty.
11538 Defer freeing exception_decl until after the finalizer, to make
11539 sure the local isn't reused in the finalizer. Fixes PR java/1208.
11540
11541 * parse.y (java_complete_lhs): If the try-clause is empty, just
11542 return the finally-clause and vice versa.
11543
11544 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
11545
11546 * gcj.texi (Input Options): documented the check for attribute
11547 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11548 * java-tree.h (flag_force_classes_archive_check): Declared extern.
11549 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11550 (jcf_parse): Check for the right classes archive if necessary.
11551 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11552 (jcf_parse_fields): Fixed indentation.
11553 * jcf-write.c (append_gcj_attribute): New function.
11554 (generate_classfile): Compute the attribute count, invoke
11555 `append_gcj_attribute'.
11556 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11557 turned into bit-fields. New bit-field `right_zip.'
11558 (JCF_ZERO): Set `right_zip' to zero.
11559 * lang-options.h (-fforce-classes-archive-check): Added flag.
11560 * lang.c (flag_force_classes_archive_check): New flag.
11561 (lang_f_options): New entry `force-classes-archive-check.'
11562 Fixes PR java/1213.
11563
11564 2001-02-07 Andrew Haley <aph@redhat.com>
11565
11566 * gcj.texi (Configure-time Options): Add -fcheck-references.
11567 * expr.c (build_java_indirect_ref): New function.
11568 (java_check_reference): New function.
11569 (build_java_array_length_access): Use build_java_indirect_ref to
11570 check for null references.
11571 (build_java_arrayaccess): Likewise.
11572 (build_get_class): Likewise.
11573 (build_field_ref): Likewise.
11574 (invoke_build_dtable): Likewise.
11575 (build_invokeinterface): Likewise.
11576 * lang.c (lang_f_options): Add flag_check_references.
11577 * jvspec.c (jvgenmain_spec): Add flag_check_references.
11578 * java-tree.h (flag_check_references): New variable.
11579 * lang.c (flag_check_references): Likewise.
11580 * parse.y (patch_invoke): Use java_check_reference.
11581 (patch_assignment): Allow for extra nesting in
11582 _Jv_CheckArrayStore.
11583
11584 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
11585
11586 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11587 * lex.c (cxx_keywords): Likewise.
11588
11589 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11590
11591 * parse.y (qualify_ambiguous_name): Broaden `length'
11592 recognition. Help MODIFY_EXPR be resolved as expression names.
11593 Fixes PR java/2066. Fixes PR java/2400.
11594
11595 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
11596
11597 * gjavah.c (process_file): Mark interface definitions with
11598 "__attribute__ ((java_interface))".
11599
11600 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11601
11602 * class.c (layout_class): Fixed push_super_field's second
11603 argument. Fixes PR java/2333.
11604 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11605 too early to lay innerclasses out.
11606
11607 2001-03-20 Tom Tromey <tromey@redhat.com>
11608 Alexandre Petit-Bianco <apbianco@redhat.com>
11609
11610 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11611 inside an array reference. Insertion of the array store check
11612 rewritten. Fixes PR java/2299.
11613
11614 2001-03-20 Tom Tromey <tromey@redhat.com>
11615
11616 * lex.c (java_read_unicode): Only accept leading `u's.
11617
11618 2001-03-20 Tom Tromey <tromey@redhat.com>
11619
11620 * jcf-parse.c (read_class): Initialize `class'.
11621
11622 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11623
11624 * jcf_parse.c (jcf_parse): Eliminate unused variable.
11625
11626 2001-03-19 Mark Mitchell <mark@codesourcery.com>
11627
11628 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11629 (layout_class): Likewise.
11630 (layout_class_method): Likewise.
11631 (emit_register_classes): Likewise.
11632 * decl.c (builtin_function): Likewise.
11633 (give_name_to_locals): Likewise.
11634
11635 2001-03-19 Per Bothner <per@bothner.com>
11636
11637 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
11638 before trying to load an inner class.
11639
11640 Fixes to process to command-line .class files in two passes.
11641 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
11642 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
11643 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
11644 * class.c (is_compiled_class): Fix for renamed flag.
11645 * parse.y (maybe_create_class_interface_decl): Likewise.
11646 * jcf-parse.c (yyparse): Also set if compiling .class files.
11647 * jcf-parse.c (read_class); Read current_class.
11648 (jcf_parse): Make static.
11649 (load_inner_classes): New function, with code moved from jcf_parse,
11650 because we need to inner classes after the command-line files are read.
11651 (yyparse): Set finput to NULL when it doesn't need to be closed.
11652 Reduce use of main_jcf (basically only for archive) and
11653 use finput instead of main_jcf->read_state.
11654 Inline jcf_figure_file_type into yyparse.
11655 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11656 Defer load_inner_classes and parse_class_file to a second pass,
11657 after we've correctly mapped command-line .clas fiels to classes.
11658 (jcf_figure_file_type): Removed.
11659 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
11660 (JCF_ZERO): Also clear zipd field.
11661 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
11662
11663 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11664
11665 * jcf-parse.c (yyparse): Change ch from char * to char.
11666
11667 2001-03-19 Per Bothner <per@bothner.com>
11668
11669 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
11670 Add constructed filelist-file at end, following -xjava. Thus any .o
11671 and library files are not affected by the -xjava. Also wrap
11672 explicit @FILE with -xjava and -xnone.
11673
11674 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
11675
11676 * class.c (build_static_field_ref): Call make_decl_rtl() after
11677 setting the DECL_EXTERNAL flag.
11678
11679 2001-03-17 Per Bothner <per@bothner.com>
11680
11681 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
11682
11683 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
11684 when result is is needed (target is STACK_TARGET).
11685
11686 * parse.h (JDEP_SOLV): Removed.
11687 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
11688
11689 * parse.y (incomplete_class_list): Removed.
11690 (obtain_incomplete_type): Don't use or set incomplete_class_list.
11691 It doesn't work if resolve_class changes the name of an array type
11692 that is on the list and then someone else looks for the modified name.
11693 Also, seems liable to break when compiling multiple source files at
11694 once. So the simplest is to just remove incomplete_class_list -
11695 it is only a minor space win and it is not even clear it saves time.
11696
11697 * parse.y (resolve_class): Remove unneeded promote_type.
11698
11699 2001-03-15 Per Bothner <per@bothner.com>
11700
11701 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
11702 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
11703 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11704 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11705
11706 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
11707 * parse.y (java_expand_classes): Likewise.
11708
11709 * parse.y (expand_start_java_method): Was only called once and had a
11710 misleading name, so inline in caller java_complete_expand_method.
11711 (enter_a_block): Likewise inline in enter_block and remove.
11712
11713 Remove junk from when gcc/java was created (by copying from C/C++).
11714 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
11715 (struct binding_level): Remove fields keep, keep_if_subblocks,
11716 more_cleanups_ok, have_cleanups (which have never been used).
11717 (pushlevel, poplevel): Remove related useless code.
11718
11719 * class.c (make_class_data): The class_dtable_decl (i.e. the
11720 vtable for Class) should be external, except when compiling Class.
11721
11722 * jvspec.c (lang_specific_driver): Fix -C handling.
11723 Check -save-temps to see if temp @FILE should be deleted.
11724 Follow-up to/fix for February 16 patch.
11725
11726 * verify.c (verify_jvm_instructions): Better error msgs for dup.
11727 (type_stack_dup): Remove no-longer neded error check.
11728
11729 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
11730
11731 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11732 to 'for_pointer'. If this type is for a pointer (argument) mangling,
11733 don't surround the element with 'N..E' if the type name is
11734 unqualified.
11735
11736 2001-03-14 Mark Mitchell <mark@codesourcery.com>
11737
11738 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11739 DECL_RTL_SET_P, etc.
11740 (make_method_value): Likewise.
11741 (get_dispatch_table): Likewise.
11742
11743 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11744
11745 2001-03-07 Tom Tromey <tromey@redhat.com>
11746
11747 * config-lang.in (lang_requires): Define.
11748
11749 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
11750
11751 * typeck.c (convert): Check flag_unsafe_math_optimizations,
11752 not flag_fast_math.
11753
11754 2001-03-05 Per Bothner <per@bothner.com>
11755
11756 Fix a problem where rest_of_decl_compilation applied to
11757 class_dtable_decl causes problems because it was done too early,
11758 before output file was opened.
11759 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
11760 * class.c (class_dtable_decl): Add macro - element of class_roots.
11761 (make_class_data): Define class_dtable_decl.
11762 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
11763
11764 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11765
11766 * java/class.c, java/decl.c, java/java-tree.h: Replace all
11767 uses of 'boolean' with 'bool'.
11768
11769 2001-03-01 Zack Weinberg <zackw@stanford.edu>
11770
11771 * lang-specs.h: Add zero initializer for cpp_spec field to all
11772 array elements.
11773
11774 2001-02-16 Per Bothner <per@bothner.com>
11775
11776 Handle compiling multiple input files at once, and @FILE syntax.
11777 * gcj.texi: Updated documentation to match.
11778 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
11779 * jcf-parse.c (parse_source_file): Split into ...
11780 (parse_source_file_1): New function - and:
11781 (parse_source_file_2): New function.
11782 (yyparse): On -ffilelist-file, open and scan named file.
11783 On first pass over files, only do parse_source_file_1.
11784 A new second pass calls parse_source_file_2 for each file to compile.
11785 (init_jcf_parse): Call init_src_parse.
11786 * jvspec.c (INDIRECT_FILE_ARG): New flag.
11787 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
11788 as multiple input file combined in one compilation.
11789 * lang-options.h: Add -ffilelist-file
11790 * lang.c (flag_filelist_file): New flag variable.
11791 (lang_f_options): Handle -ffilelist-file.
11792 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11793 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
11794 gclass_list - use global fields of src_parse_roots instead.
11795 * parse.y (src_parse_roots): New array.
11796 (incomplete_class_list, gclass_list): New macros.
11797 (push_parser_context, java_pop_parser_context,
11798 java_parser_context_resume): Don't fiddle with deleted fields.
11799 (various): Use incomplete_class gclass_list and global macros
11800 instead of parse_ctxt fields - the lists are global.
11801 (init_src_parse): New function.
11802
11803 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11804
11805 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11806
11807 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11808
11809 * parse.y (check_inner_class_access): Moved declaration of local
11810 `enclosing_decl_type' to the right location.
11811
11812 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
11813
11814 * parse.y (parser_check_super_interface): Don't call
11815 check_pkg_class_access for an inner interface.
11816 (parser_check_super): Don't call check_pkg_class_access for inner
11817 class.
11818 (do_resolve_class): Simplify enclosing type loop. Don't call
11819 check_pkg_class_access if CL and DECL are not set.
11820 (find_in_imports_on_demand): Set DECL if class_type needed to be
11821 loaded. Don't call check_pkg_class_access for an inner class.
11822 (check_inner_class_access): Rewritten to implement member access
11823 rules as per spec 6.6.1.
11824 (check_pkg_class_access): Handle the empty package correctly.
11825 (in_same_package): New function. Determine if two classes are in the
11826 same package.
11827
11828 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
11829
11830 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11831 method into array types.
11832 * parse.y (patch_method_invocation): Bypass access check on clone call
11833 to array instance.
11834
11835 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
11836
11837 * expr.c (build_instanceof): Check for arrays when trying fold to
11838 false.
11839
11840 2001-02-15 Jim Meyering <meyering@lucent.com>
11841
11842 * Make-lang.in (java.install-common): Depend on `installdirs'.
11843 (java.install-info): Likewise.
11844
11845 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
11846
11847 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11848
11849 2001-02-14 Tom Tromey <tromey@redhat.com>
11850 Alexandre Petit-Bianco <apbianco@cygnus.com>
11851
11852 Fix for PR java/1261.
11853 * typeck.c (build_java_array_type): Add public `clone' method to
11854 arrays.
11855 * parse.y (resolve_qualified_expression_name): Use current_class
11856 when checking for inaccessibility.
11857 (patch_method_invocation): Fixed error message when accessibility
11858 denied. Added `from_super' argument.
11859
11860 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11861
11862 * parse.y (resolve_class): Don't build a fake decl. Use the one
11863 already built.
11864 * typeck.c (build_java_array_type): Build and assign decl to array
11865 type.
11866
11867 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11868
11869 * parse.y (not_accessible_p): Changed leading comment. Added extra
11870 `where' argument. Use it to enforce protected access rules.
11871 (resolve_qualified_expression_name): Added extra argument to
11872 not_accessible_p.
11873 (patch_method_invocation): Use argument `primary' to provide
11874 not_accessible_p with an extra argument.
11875 (lookup_method_invoke): Added extra argument to not_accessible_p.
11876 (search_applicable_method_list): Likewise.
11877
11878 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
11879
11880 * parse.y (resolve_qualified_expression_name): Try to resolve as
11881 an inner class access only if `decl' is a TYPE_DECL.
11882
11883 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11884
11885 * decl.c (classdollar_identifier_node): Initialize.
11886 * java-tree.h (enum java_tree_index): New entry
11887 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11888 (classdollar_identifier_node): New macro.
11889 (ID_CLASSDOLLAR_P): Likewise.
11890 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11891 (build_dot_class_method_invocation): Likewise.
11892 (find_applicable_accessible_methods_list): `class$' can't be
11893 inherited.
11894
11895 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
11896
11897 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11898
11899 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11900
11901 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11902 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11903 gone.
11904
11905 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11906
11907 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
11908 outside of the `__U' sequence too.
11909 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
11910 sequence too.
11911
11912 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11913
11914 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
11915
11916 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11917
11918 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
11919 (JVGENMAIN_OBJS): Likewise.
11920 * java-tree.h (append_gpp_mangled_name): New prototype.
11921 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
11922 Removed cast calling `gcc_add_root.'
11923 * jvgenmain.c (mangle_obstack): New global, initialized.
11924 (main): Use it.
11925 (do_mangle_class): Constify local `ptr.'
11926 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
11927 append_gpp_mangle_name and update `count' if necessary.
11928 Use `mangle_obstack.'
11929 * mangle.c (append_unicode_mangled_name): Removed.
11930 (append_gpp_mangled_name): Likewise.
11931 (unicode_mangling_length): Likewise.
11932 (mangle_member_name): Return type set to `void.'
11933 (mangle_field_decl): Don't append `U' in escaped names.
11934 (mangle_method_decl): Likewise.
11935 (mangle_member_name): Just use `append_gpp_mangled_name.'
11936 * mangle_name.c: New file.
11937
11938 2001-02-07 Per Bothner <per@bothner.com>
11939
11940 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
11941
11942 * check-init.c (check_init): Don't call done_alternative after
11943 processing loop code, as a LOOP_EXPR never terminates normally.
11944
11945 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
11946
11947 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
11948
11949 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11950
11951 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
11952 DECLs.
11953
11954 2001-02-06 Tom Tromey <tromey@redhat.com>
11955
11956 * lex.c (java_new_lexer): Longer error message.
11957
11958 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
11959 Alexandre Petit-Bianco <apbianco@cygnus.com>
11960
11961 * typeck.c (build_prim_array_type): Added leading comment.
11962 (build_java_array_type): Moved locals out of
11963 block. Always create the `data' field, fixed alignment to match
11964 C++.
11965
11966 2001-02-04 Tom Tromey <tromey@redhat.com>
11967
11968 * expr.c (java_lang_expand_expr): Don't bother recomputing
11969 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
11970 Fixes PR java/1866.
11971
11972 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11973
11974 * parse.y (process_imports): Save the original name of the import
11975 for better error report.
11976
11977 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
11978
11979 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
11980 of macros used when compiling jvspec.c.
11981 * jvspec.c (lang_specific_driver): Link with the shared
11982 libgcc by default.
11983
11984 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11985
11986 * check-init.c (check_init): Call internal_error instead of fatal.
11987 * expr.c (java_lang_expand_expr): Likewise.
11988 * jcf-parse.c (get_constant): Likewise.
11989 * mangle.c (java_mangle_decl): Likewise.
11990 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
11991 (operator_string): Likewise.
11992 * check-init.c (check_init): Call abort instead of fatal.
11993 * class.c (build_class_ref): Likewise.
11994 * constants.c (write_constant_pool): Likewise.
11995 * decl.c (start_java_method): Likewise.
11996 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
11997 (java_stack_dup, encode_newarray_type): Likewise.
11998 (build_java_array_length_access): Likewise.
11999 (build_java_check_indexed_type, expand_java_pushc): Likewise.
12000 (build_java_soft_divmod, build_invokeinterface): Likewise.
12001 * java-tree.h (INNER_CLASS_P): Likewise.
12002 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
12003 (give_name_to_class, get_class_constant): Likewise.
12004 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
12005 (find_constant_index, generate_bytecode_conditional): Likewise.
12006 (generate_bytecode_insns, perform_relocations): Likewise.
12007 * lex.c (java_unget_unicode, java_lex): Likewise.
12008 * mangle.c (mangle_type, mangle_record_type): Likewise.
12009 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
12010 (finish_mangling): Likewise.
12011 * parse.h (MARK_FINAL_PARMS): Likewise.
12012 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
12013 (obtain_incomplete_type, java_complete_class): Likewise.
12014 (java_check_regular_methods, java_complete_expand_method): Likewise.
12015 (cut_identifier_in_qualified, check_deprecation): Likewise.
12016 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
12017 (java_complete_lhs, lookup_name_in_blocks): Likewise.
12018 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
12019 * typeck.c (set_local_type, parse_signature_type): Likewise.
12020 (parse_signature_string, build_java_signature): Likewise;
12021 (set_java_signature): Likewise.
12022 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
12023 * class.c (add_method): Call fatal_error instead of fatal.
12024 (build_static_field_ref): Likewise.
12025 * expr.c (build_known_method_ref, expand_invoke): Likewise.
12026 * jcf-parse.c (get_constant, jcf_parse): Likewise.
12027 * lex.c (java_new_new_lexer): Likewise.
12028 * jv-scan.c (main): Likewise.
12029 (fatal_error): Renamed from fatal.
12030 * jcf-parse.c (yyparse): Call fatal_io_error instead of
12031 pfatal_with_name.
12032 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
12033 (yyparse): Likewise.
12034 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
12035 * lex.c (java_get_line_col): Likewise.
12036 * jcf-parse.c (load_class): Make errors non-fatal.
12037 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
12038
12039 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
12040
12041 * jvgenmain.c (class_mangling_suffix): Remove unused string.
12042 (error): Remove unused function.
12043 (main): Don't use "__attribute__ alias" on generated class symbol.
12044
12045 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12046
12047 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
12048 argument.
12049 * parse.y (finish_method_declaration): Code accounting for WFLed
12050 method DECL_NAMEs deleted.
12051 (check_abstract_method_definitions): Likewise.
12052 (resolve_type_during_patch): Layout resolved type.
12053 * typeck.c (lookup_do): Removed unused local.
12054
12055 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
12056
12057 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
12058 * decl.c (init_decl_processing): Use integer_minus_one_node, not
12059 integer_negative_one_node.
12060 * expr.c (build_java_binop): Likewise.
12061
12062 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
12063
12064 * zextract.c (read_zip_archive): Read file_offset before writing
12065 zipd and consequently clobbering the header contents.
12066
12067 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12068
12069 * Make-lang.in: Remove all dependencies on defaults.h.
12070 * decl.c: Don't include defaults.h.
12071 * expr.c: Likewise.
12072 * parse.y: Likewise.
12073
12074 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12075
12076 * ChangeLog (2001-01-21): Fixed typo.
12077 * class.c (layout_class_method): Code accounting for WFLed
12078 method DECL_NAMEs deleted.
12079 * constant.c (find_methodref_index): Likewise.
12080 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
12081 * java-tree.h (DECL_FUNCTION_WFL): New macro.
12082 (struct lang_decl): New field `wfl'.
12083 (java_get_real_method_name): Prototype deleted.
12084 * mangle.c (mangle_method_decl): Code accounting for WFLed
12085 method DECL_NAMEs deleted.
12086 * parse.h (GET_METHOD_NAME): Macro deleted.
12087 * parse.y (reset_method_name): Deleted.
12088 (method_header): Set DECL_FUNCTION_WFL.
12089 (check_abstract_method_header): Code accounting for WFLed method
12090 DECL_NAMEs deleted.
12091 (java_get_real_method_name): Deleted.
12092 (check_method_redefinition): Code accounting for WFLed method
12093 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
12094 (java_check_regular_methods): Likewise.
12095 (java_check_abstract_methods): Likewise.
12096 (java_expand_classes): Don't call `reset_method_name.'
12097 (search_applicable_method_list): Use DECL_NAMEs instead of
12098 GET_METHOD_NAME.
12099 * typeck.c (lookup_do): Code accounting for WFLed method
12100 DECL_NAMEs deleted.
12101
12102 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
12103
12104 * lex.c (java_read_char): Check for EOF from getc first.
12105
12106 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12107
12108 * class.c (layout_class): Don't lay the superclass out if it's
12109 already being laid out.
12110 * jcf-parse.c (handle_innerclass_attribute): New function.
12111 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
12112 handle_innerclasses_attribute.
12113 (jcf_parse): Don't load an innerclasses if it's already being
12114 laid out.
12115 * jcf-write.c (append_innerclass_attribute_entry): Static
12116 `anonymous_name' and its initialization deleted. `ocii' and `ini'
12117 to be zero for anonymous classes.
12118
12119 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12120
12121 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
12122 necessary.
12123 * jcf-parse.c (set_source_filename): Use
12124 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
12125
12126 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12127
12128 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
12129 gets a unique asm name.
12130
12131 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12132
12133 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
12134 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12135 if necessary.
12136 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
12137 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
12138 * parse.y (lookup_package_type_and_set_next): Deleted.
12139 (resolve_package): Removed unnecessary code.
12140 (find_applicable_accessible_methods_list): `finit$' can't be
12141 inherited.
12142 * verify.c (pop_argument_types): Added missing prototype.
12143
12144 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
12145
12146 * config-lang.in: Disable java by default.
12147
12148 2001-01-23 Tom Tromey <tromey@redhat.com>
12149
12150 * gcj.texi (Copying): New node.
12151 Added copyright information.
12152
12153 2001-01-21 Per Bothner <per@bothner.com>
12154
12155 Various fixes to allow compiling a compressed .jar/.zip archive.
12156 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
12157 (struct ZipFile): Add fields name and next (from ZipFileCache).
12158 (struct ZipDirectory): New field zipf points to owning ZipFile.
12159 * jcf.h (struct ZipDirectory): Add forward declaration.
12160 (struct JCF): Declare zipd field to have type struct ZipDirectory.
12161 Remove seen_in_zip and zip_offset fields.
12162 (JCF_SEEN_IN_ZIP): New macro.
12163 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
12164 * jcf-io.c: Change all ZipFileCache to ZipFile.
12165 (read_zip_member): New function.
12166 (open_in_zip): Call read_zip_member.
12167 * jcf-parse.c (find_in_current_zip): Remove function.
12168 (read_class): Merge in find_in_current_zip functionality.
12169 Call read_zip_member if needed.
12170 (parse_zip_file_entries): Use read_zip_member.
12171 (process_zip_dir): Update for removed and added JCF fields.
12172 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
12173
12174 2001-01-21 Per Bothner <per@bothner.com>
12175
12176 Minor optimization of static ggc roots.
12177 * jcf-parse.c (parse_roots): New static field.
12178 (current_field, current_method, current_file_list): Replace by macros
12179 naming fields of parse_roots.
12180 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
12181 * class.c (class_roots): New static field.
12182 (registered_class, fields_ident, info_ident, class_list):
12183 New macros naming fields of parse_roots.
12184 (build_static_field_ref): Don't register roots here.
12185 (layout_class): Static field list replaced by macro class_list.
12186 (init_class_processing): Call ggc_add_tree_root for 4 roots.
12187 Initialize fields_ident and info_ident here.
12188
12189 2001-01-21 Per Bothner <per@bothner.com>
12190
12191 * jcf-parse.c (ggc_mark_jcf): New function.
12192 (init_jcf_parse): Register current_jcf as ggc root.
12193
12194 2001-01-21 Per Bothner <per@bothner.com>
12195
12196 * lang.c (put_decl_node): Print method's name.
12197
12198 2001-01-21 Per Bothner <per@bothner.com>
12199
12200 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
12201 (verify_jvm_instructions): Use it, for better error messages on loads.
12202
12203 2001-01-21 Per Bothner <per@bothner.com>
12204
12205 * verify.c (merge_type_state): Still may have to merge even if
12206 LABEL_VERIFIED (label).
12207
12208 2001-01-21 Per Bothner <per@bothner.com>
12209
12210 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
12211 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
12212
12213 2001-01-19 Per Bothner <per@bothner.com>
12214
12215 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
12216 if expeting an interface type. Refines Tom's change of 2000-09-12.
12217
12218 2001-01-18 Per Bothner <per@bothner.com>
12219
12220 * gcj.texi (Input Options): Mention .java files.
12221
12222 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12223
12224 * lang-options.h (-Wunsupported-jdk11): Removed.
12225 * lang.c (flag_not_overriding): Deleted.
12226 (flag_static_local_jdk1_1): Likewise.
12227 (lang_W_options): Removed "unsupported-jdk11" entry.
12228 * parse.y (java_check_methods): Removed dead code.
12229
12230 2001-01-17 Tom Tromey <tromey@redhat.com>
12231
12232 Changes suggested by Per Bothner:
12233 * gcj.texi (Input Options): Don't mention input files.
12234 (Code Generation): Updated --main information.
12235 (Invoking jcf-dump): Mention that --javap is incomplete.
12236 From Alexandre Petit-Bianco:
12237 (Warnings): Don't mention -Wunsupported-jdk11.
12238 My stuff:
12239 (Compatibility): Mention JDK 1.2-ness of libraries.
12240 (Resources): Mention resources used when writing gcj.
12241
12242 2001-01-17 Tom Tromey <tromey@redhat.com>
12243
12244 * gcj.texi: New file.
12245 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
12246 (java.info): Depend on gcj.info.
12247 (java/gcj.dvi): New target.
12248 (java.dvi): Depend on gcj.dvi.
12249 (java.install-info): Wrote.
12250
12251 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
12252
12253 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
12254 having called make_decl_rtl.
12255
12256 2001-01-14 Per Bothner <per@bothner.com>
12257
12258 Various patches to emit better messages on verification errors.
12259 * expr.c (push_type_0): Return error indication on stack overflow,
12260 instead of callinfg fatal.
12261 (push_type): Now just call push_type_0 (nd fatal on overflow).
12262 (pop_type_0): Return detailed error message (in a char** argument).
12263 (pop_type): If pop_type_0 fails, print error message.
12264 (pop_argument_types): Moved to verify.c.
12265 * verify.c (pop_argument_types): Moved from expr.c.
12266 Return a (possible) error message, rather than void.
12267 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
12268 (verify_jvm_instruction): Use new macros, improving error messages.
12269 For case OPCODE_astore use object_ptr_type_node.
12270 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
12271 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
12272
12273 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
12274 constant, return body without wrapper. (Improves constant folding.)
12275 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
12276
12277 2001-01-13 Per Bothner <per@bothner.com>
12278
12279 * expr.c (expand_java_field_op): Assigning to a final field outside
12280 an initializer does not violate JVM spec, so should be warning, not
12281 error. (Sun's verifier does not complain - though MicroSoft's does.)
12282
12283 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
12284
12285 * gjavah.c (version), jcf-dump.c (version): Update copyright year
12286 to 2001.
12287
12288 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
12289
12290 * parse.y (resolve_expression_name): Permit instance variables from
12291 enclosing context in super constructor call.
12292 (resolve_qualified_expression_name): Permit enclosing class's qualified
12293 "this" in super constructor call.
12294
12295 2001-01-10 Mark Mitchell <mark@codesourcery.com>
12296
12297 * class.c (build_utf8_ref): Remove last argument in call to
12298 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12299 (build_class_ref): Likewise.
12300 (build_static_field_ref): Likewise.
12301 (get_dispatch_table): Likewise.
12302 (layout_class_method): Likewise.
12303 (emit_register_classes): Likewise.
12304 * constants.c (build_constant_data_ref): Likewise.
12305 * decl.c (builtin_function): Likewise.
12306 (create_primitive_vtable): Likewise.
12307 * expr.c (build_known_method_def): Likewise.
12308 (build_jni_stub): Likewise.
12309 (java_lang_expand_expr): Likewise.
12310
12311 2001-01-10 Tom Tromey <tromey@redhat.com>
12312
12313 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
12314
12315 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12316
12317 * java-tree.h (lang_printable_name_wls): New prototype.
12318 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
12319 rather than `current_class' to print type name. Don't prepend type
12320 names when printing constructor names.
12321 (lang_printable_name_wls): New function.
12322 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
12323 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
12324 * parse.y (patch_method_invocation): Message tuned for constructors.
12325 (not_accessible_p): Grant `private' access from within
12326 enclosing contexts.
12327
12328 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12329
12330 All files with updated copyright when applicable.
12331 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
12332 * class.c (mangle_class_field): Function removed.
12333 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
12334 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
12335 (build_class_ref): Call `java_mangle_class_field' instead of
12336 `mangle_class_field.'
12337 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
12338 (layout_class): Call `java_mangle_decl' instead of
12339 `mangle_static_field.'
12340 (cxx_keywords): Initialized static array moved to `lex.c.'
12341 (layout_class_method): Changed leading comment. Simplified to
12342 call `java_mangle_decl.' Local `ptr' moved in for loop body.
12343 * decl.c (lang_mark_tree): Mark field `package_list.'
12344 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
12345 (struct lang_type): New field `package_list.'
12346 (unicode_mangling_length): Prototype removed.
12347 (append_gpp_mangled_name, append_gpp_mangled_classtype,
12348 emit_unicode_mangled_name): Likewise.
12349 (cxx_keyword_p): New prototype.
12350 (java_mangle_decl, java_mangle_class_field,
12351 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
12352 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
12353 `build_expr_wfl.'
12354 * jvgenmain.c (main_method_prefix): Global variable removed.
12355 (main_method_suffix): Likewise.
12356 (do_mangle_classname): New function.
12357 (main): Call it. Format changed to accommodate new mangling scheme.
12358 * lex.c: (utf8_cmp): Conditionally prototyped.
12359 (cxx_keywords): Moved from class.c, conditionally defined.
12360 (utf8_cmp, cxx_keyword_p): Likewise.
12361 * mangle.c (obstack.h, ggc.h): Included.
12362 (mangle_field_decl): New function.
12363 (mangle_method_decl, mangle_type, mangle_pointer_type,
12364 mangle_array_type, mangle_record_type,
12365 find_compression_pointer_match, find_compression_array_match,
12366 find_compression_record_match,
12367 find_compression_array_template_match, set_type_package_list,
12368 entry_match_pointer_p, emit_compression_string, init_mangling,
12369 finish_mangling, compression_table_add, mangle_member_name): Likewise.
12370 (mangle_obstack): New global.
12371 (MANGLE_RAW_STRING): New macro.
12372 (unicode_mangling_length): Turned static.
12373 (append_unicode_mangled_name): Renamed from
12374 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
12375 replaces `obstack', removed from the parameter list.
12376 (append_gpp_mangled_name): Turned static. `mangle_obstack'
12377 replaces parameter `obstack', removed from the parameter list. Call
12378 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
12379 (append_gpp_mangled_classtype): Removed.
12380 (compression_table, compression_next): New static variables.
12381 * parse.y (temporary_obstack): Extern declaration removed.
12382
12383 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12384
12385 * parse.y (patch_binop): Compute missing type in error situations.
12386
12387 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
12388
12389 * class.c (make_class_data): Push initial value for "arrayclass".
12390 * decl.c (init_decl_processing): Add new class field "arrayclass".
12391
12392 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
12393
12394 From patha@softlab.ericsson.se:
12395 * parse.y (switch_label): Use build, not build1, to construct
12396 DEFAULT_EXPR.
12397
12398 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
12399
12400 * lang.c (lang_decode_option): Change -MA to -MP.
12401 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
12402 Update to new prototype; do quote targets.
12403 (jcf_dependency_write): Update.
12404
12405 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
12406
12407 Shorten primitive array allocation path:
12408 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
12409 to create new primitive arrays.
12410 * expr.c (build_newarray): If generating native code, call
12411 soft_newarray_node with a reference to the primitive TYPE identifier
12412 instead of type_value.
12413
12414 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
12415
12416 Fix for PRs gcj/312 and gcj/253:
12417 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
12418 dest if they arn't already.
12419 * class.c (layout_class): Call maybe_layout_super_class on
12420 superinterfaces also, but only if compiling from bytecode.
12421
12422 Fix for PR gcj/373:
12423 * parse.y (create_class): Set ACC_STATIC if class is declared in an
12424 interface.
12425
12426 2000-12-15 Tom Tromey <tromey@redhat.com>
12427
12428 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
12429 set.
12430
12431 2000-12-14 Andrew Haley <aph@redhat.com>
12432
12433 * boehm.c (mark_reference_fields): Change test to correctly detect
12434 bitmap overflow.
12435
12436 2000-12-15 Andreas Jaeger <aj@suse.de>
12437
12438 * config-lang.in (lang_dirs): Added.
12439
12440 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12441
12442 * parse.y (end_artificial_method_body): Fixed undefined behavior.
12443 Credits go to rth for finding it.
12444
12445 2000-12-13 Mike Stump <mrs@wrs.com>
12446
12447 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
12448
12449 2000-11-07 Tom Tromey <tromey@cygnus.com>
12450
12451 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
12452 * lex.c (java_ignorable_control_p): Removed.
12453 (java_letter_or_digit_p): Removed.
12454 (java_start_char_p): New function.
12455 (java_read_char): Return `int', not `unicode_t'. Changed
12456 callers.
12457 (java_read_unicode): Likewise.
12458 (java_read_unicode_collapsing_terminators): Likewise.
12459 (java_get_unicode): Likewise.
12460 (java_new_lexer): Initialize hit_eof.
12461 (java_parse_end_comment): Take `int' argument.
12462 (java_parse_doc_section): Likewise.
12463 (java_parse_escape_sequence): Don't allow backlash-newline.
12464 Return `int'.
12465 * lex.h (JAVA_DIGIT_P): Removed.
12466 (_JAVA_LETTER_OR_DIGIT_P): Removed.
12467 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
12468 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
12469 (JAVA_PART_CHAR_P): New macro.
12470 (UEOF): Now -1.
12471 (JAVA_CHAR_ERROR): Now -2.
12472 (java_lexer): New field `hit_eof'.
12473 * chartables.h: New file.
12474 * gen-table.pl: new file.
12475
12476 2000-11-20 Tom Tromey <tromey@cygnus.com>
12477 Alexandre Petit-Bianco <apbianco@cygnus.com>
12478
12479 * parse.y (java_complete_lhs): Only allow compound assignment of
12480 reference type if type is String.
12481
12482 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12483
12484 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
12485 jcf-path.c: Likewise.
12486
12487 2000-12-09 Anthony Green <green@redhat.com>
12488
12489 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
12490 filestart and filename_length as int values.
12491
12492 2000-12-07 Mo DeJong <mdejong@redhat.com>
12493
12494 * jcf-io.c (find_class): Correct the logic that tests to see if a
12495 .java file is newer than its .class file. The compiler was
12496 incorrectly printing a warning when file mod times were equal.
12497
12498 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
12499
12500 * jvgenmain.c: Use ISPRINT not isascii.
12501
12502 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12503
12504 * parse.y (end_artificial_method_body): Fixed typo.
12505
12506 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
12507
12508 * parse.y (patch_method_invocation): Pick the correct enclosing
12509 context when creating inner class instances.
12510 Fixes gcj/332.
12511
12512 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
12513
12514 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12515 Update copyright year to 2000.
12516
12517 2000-11-23 Anthony Green <green@redhat.com>
12518
12519 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12520 Move current_file_list out of yyparse and make it static.
12521
12522 * expr.c: Declare quick_stack and tree_list_free_list as static
12523 (init_expr_processing): Register quick_stack and
12524 tree_list_free_list roots.
12525
12526 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12527
12528 * parse.y (build_outer_field_access): New local `decl_ctx', use
12529 it. Check for field's context and current class immediate outer
12530 context inheritance.
12531 (outer_field_access_p): Consider fields inherited from the last
12532 enclosing context.
12533 (build_access_to_thisn): Stop at the last enclosing context if
12534 necessary.
12535 Fixes gcj/367.
12536
12537 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
12538
12539 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12540
12541 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
12542
12543 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12544 scratch buffer.
12545
12546 2000-11-20 Tom Tromey <tromey@cygnus.com>
12547
12548 * jv-scan.c (help): Document --complexity.
12549 (options): Added --complexity.
12550 (flag_complexity): New global.
12551 (main): Call `report'.
12552 * parse-scan.y (complexity): New global.
12553 (if_then_statement, if_then_else_statement,
12554 if_then_else_statement_nsi, switch_block_statement_group,
12555 while_expression, do_statement, for_begin, continue_statement,
12556 throw_statement, catch_clause, finally, method_invocation,
12557 conditional_and_expression, conditional_or_expression,
12558 conditional_expression): Update complexity.
12559 (reset_report): Reset complexity.
12560 (report): New function.
12561
12562 2000-11-20 Tom Tromey <tromey@cygnus.com>
12563
12564 * lex.c (yylex): Added STRICT_TK case.
12565 * parse.y (STRICT_TK): Added.
12566 * parse-scan.y (STRICT_TK): Added.
12567 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12568 `;'. Use 4, not 3, with -k option. Correctly rename resulting
12569 file.
12570 * keyword.h: Rebuilt.
12571 * keyword.gperf (strictfp): Added.
12572
12573 2000-11-20 Tom Tromey <tromey@cygnus.com>
12574
12575 * lex.c (yylex): Recognize floating point constants with leading
12576 0.
12577
12578 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12579
12580 * java-tree.h (cyclic_inheritance_report): Constify.
12581 * parse.y (cyclic_inheritance_report): Likewise.
12582
12583 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
12584
12585 * parse.y (goal): Remove call to ggc_add_string_root.
12586
12587 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
12588
12589 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12590 Create string in scratch buffer, then pass to build_string.
12591
12592 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
12593
12594 * parse.y (issue_warning_error_from_context): Add
12595 ATTRIBUTE_PRINTF.
12596
12597 2000-11-11 Anthony Green <green@redhat.com>
12598
12599 * jcf-parse.c (process_zip_dir): Add finput parameter.
12600 (jcf_figure_file_type): Call process_zip_dir with appropriate
12601 argument.
12602
12603 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12604
12605 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12606 * jcf-parse.c (jcf_figure_file_type): Likewise.
12607
12608 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
12609
12610 * parse.y (create_new_parser_context): Use memset () instead of
12611 bzero ().
12612
12613 2000-11-08 Tom Tromey <tromey@cygnus.com>
12614
12615 * gjavah.c (process_file): Only include gcj/cni.h when generating
12616 CNI stubs.
12617
12618 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
12619
12620 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12621 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12622 instead of bzero ().
12623
12624 2000-11-05 Tom Tromey <tromey@cygnus.com>
12625
12626 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12627 * lex.c (IS_ZERO): New define.
12628 (java_perform_atof): Error on floating point underflow.
12629
12630 2000-11-04 Tom Tromey <tromey@cygnus.com>
12631
12632 * lex.c (java_parse_escape_sequence): Only read two octal
12633 characters if the first one is greater than 3. Don't allow
12634 "octal" numbers to include the digits 8 or 9.
12635
12636 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
12637
12638 * Make-lang.in (java.distdir): Remove.
12639
12640 2000-11-03 Tom Tromey <tromey@cygnus.com>
12641
12642 * Make-lang.in (java.dvi): New target.
12643 Partial fix for PR other/567.
12644
12645 * lang-options.h: Mention -Wout-of-date.
12646 * jcf-dump.c (flag_newer): New global.
12647 * gjavah.c (flag_newer): New global.
12648 * jcf-io.c (find_class): Only warn when flag_newer set.
12649 * lang.c (flag_newer): New global.
12650 (struct string_option): New declaration.
12651 (lang_W_options): New global.
12652 (process_option_with_no): New function.
12653 (lang_decode_option): Use it.
12654
12655 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12656 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12657 `$'.
12658
12659 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12660 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12661 * lex.c (java_read_unicode): Removed `term_context' argument.
12662 Recognize any number of `u' in `\u'.
12663 (java_read_unicode_collapsing_terminators): New function.
12664 (java_get_unicode): Use it.
12665 (java_lineterminator): Removed.
12666 (yylex): Produce error if character literal is newline or single
12667 quote. Return if eof found in middle of `//' comment. EOF in
12668 `//' comment is only an error if pedantic.
12669 (java_ignorable_control_p): New function.
12670 (java_parse_end_comment): Return if eof found in middle of
12671 comment.
12672 Include flags.h.
12673 * jv-scan.c (pedantic): New global.
12674
12675 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12676
12677 * parse.y (outer_field_access_p): Inherited fields aren't
12678 consider outer fields.
12679 (maybe_build_thisn_access_method): Use
12680 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12681 (resolve_expression_name): Trigger an error if a static field
12682 is being accessed as an outer field.
12683
12684 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12685
12686 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12687 Fixes gcj/365.
12688
12689 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
12690
12691 * Make-lang.in: Move all build rules here from Makefile.in,
12692 adapt to new context. Wrap all rules that change the current
12693 directory in parentheses. Expunge all references to $(P).
12694 When one command depends on another and they're run all at
12695 once, use && to separate them, not ;. Add OUTPUT_OPTION to
12696 all object-file generation rules. Delete obsolete variables.
12697
12698 * Makefile.in: Delete.
12699 * config-lang.in: Delete outputs= line.
12700
12701 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12702
12703 * parse.y (patch_method_invocation): NULLify this_arg when already
12704 inserted.
12705 (maybe_use_access_method): Handle call to methods unrelated to the
12706 current class. Fixed comment.
12707 Fixes gcj/361.
12708
12709 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12710
12711 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12712 scope.
12713
12714 2000-10-24 Tom Tromey <tromey@cygnus.com>
12715
12716 * lex.c (java_new_lexer): Initialize new fields. Work around
12717 broken iconv() implementations.
12718 (java_read_char): Swap bytes if required. Use fallback decoder if
12719 required.
12720 (byteswap_init, need_byteswap): New globals.
12721 (java_destroy_lexer): Only close iconv handle if it is in use.
12722 * lex.h (java_lexer): New fields read_anything, byte_swap,
12723 use_fallback.
12724 Made out_buffer unsigned.
12725
12726 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12727
12728 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12729 where an enclosing context can be set on the jdep.
12730 (do_resolve_class): Fixed identation.
12731
12732 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12733
12734 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12735
12736 * jcf-reader.c (peek_attribute, skip_attribute): Only define
12737 when requested.
12738
12739 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12740
12741 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12742
12743 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12744
12745 * jcf-write.c (OP1): Update `last_bc'.
12746 (struct jcf_block): Fixed indentation and typo in comments. New
12747 field `last_bc'.
12748 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12749 follows `monitorenter'.
12750 * parse.y (patch_synchronized_statement): New local `tmp'. Call
12751 `patch_string'.
12752 Fixes gcj/232.
12753
12754 2000-10-16 Tom Tromey <tromey@cygnus.com>
12755
12756 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12757 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12758 * lang-options.h: Added -MA, -MT, -MF..
12759 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12760 (DEPEND_TARGET_SET): New macro.
12761 (DEPEND_FILE_ALREADY_SET): Likewise.
12762 (init_parse): Handle new flags.
12763 * jcf.h (jcf_dependency_print_dummies): Declare.
12764 * Make-lang.in (s-java): Added mkdeps.o.
12765 * Makefile.in (BACKEND): Added mkdeps.o.
12766 (../gcjh$(exeext)): Added mkdeps.o.
12767 (../jcf-dump$(exeext)): Added mkdeps.o.
12768 * jcf-depend.c: Include mkdeps.h.
12769 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12770 add_entry): Removed.
12771 (jcf_dependency_reset): Rewrote.
12772 (dependencies): New global.
12773 (jcf_dependency_set_target): Rewrote.
12774 (jcf_dependency_add_target): Likewise.
12775 (jcf_dependency_add_file): Likewise.
12776 (munge): Removed.
12777 (print_ents): Removed.
12778 (jcf_dependency_write): Rewrote.
12779 (print_dummies): New global.
12780 (jcf_dependency_print_dummies): New function
12781 (jcf_dependency_write): Call deps_dummy_targets if required.
12782
12783 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12784
12785 * gjavah.c (add_class_decl): Removed unused variables `tname',
12786 `tlen' and `name_index'.
12787 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12788 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12789 in `wfl_operator' with value.
12790 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12791 (jcf_figure_file_type): Fixed identation.
12792 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12793 * parse.y (analyze_clinit_body): New function.
12794 (static_initializer:): Reset `current_static_block'.
12795 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12796 `wfl_operator' with new value.
12797 (lookup_cl): Use EXPR_WFL_FILENAME.
12798 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12799 analyze_clinit_body.
12800 (build_outer_field_access): Access to this$<n> built from
12801 current_class, not its outer context.
12802 (build_access_to_thisn): Fixed leading comment. Tidied things up.
12803 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12804 (patch_method_invocation): Use `is_static_flag' when already
12805 initialized.
12806 (patch_newarray): Removed assignment in ternary operator.
12807
12808 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12809
12810 * except.c (free_eh_ranges): Don't free `whole_range'.
12811
12812 2000-10-15 Anthony Green <green@redhat.com>
12813
12814 * decl.c (init_decl_processing): Call init_class_processing before
12815 anything else.
12816
12817 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12818
12819 * check-init.c (check_init): Fixed leading comment. Use
12820 LOCAL_FINAL_P.
12821 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12822 (give_name_to_locals): Likewise.
12823 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12824 fields in lang_decl_var.
12825 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12826 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12827 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12828 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12829 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12830 (LOCAL_FINAL): Rewritten.
12831 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12832 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12833 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12834 `init_final' fields.
12835 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12836 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12837 (TYPE_HAS_FINAL_VARIABLE): New macro.
12838 (struct lang_type): Added `afv' field.
12839 * parse.y (check_static_final_variable_assignment_flag): New function.
12840 (reset_static_final_variable_assignment_flag): Likewise.
12841 (check_final_variable_local_assignment_flag): Likewise.
12842 (reset_final_variable_local_assignment_flag): Likewise.
12843 (check_final_variable_indirect_assignment): Likewise.
12844 (check_final_variable_global_assignment_flag): Likewise.
12845 (add_inner_class_fields): Use LOCAL_FINAL_P.
12846 (register_fields): Handle local finals and final variables.
12847 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12848 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12849 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12850 on local finals.
12851 (java_complete_expand_methods): Loop to set
12852 TYPE_HAS_FINAL_VARIABLE. Call
12853 `reset_final_variable_local_assignment_flag' and
12854 `check_final_variable_local_assignment_flag' accordingly before
12855 and after constructor expansion. Call
12856 `reset_static_final_variable_assignment_flag'
12857 before expanding <clinit> and after call
12858 `check_static_final_variable_assignment_flag' if the
12859 current_class isn't an interface. After all methods have been
12860 expanded, call `check_final_variable_global_assignment_flag' and
12861 `check_static_final_variable_assignment_flag' if the current class
12862 is an interface.
12863 (maybe_yank_clinit): Fixed typo in comment.
12864 (build_outer_field_access_methods): Removed old sanity check. Use
12865 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12866 Don't create access methods for finals.
12867 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12868 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
12869 existing DECL_INIT has been processed.
12870 (java_complete_lhs): Likewise.
12871 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12872 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12873 logic.
12874 (patch_assignment): Use LOCAL_FINAL_P.
12875 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12876 DECL_INITIAL is nullified.
12877 Fixes gcj/163.
12878
12879 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12880
12881 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
12882
12883 * Makefile.in (parse.c, parse-scan.c): Likewise.
12884
12885 2000-10-12 Mark Mitchell <mark@codesourcery.com>
12886
12887 * class.c (temporary_obstack): Remove.
12888 (make_class): Don't mess with obstascks.
12889 (push_class): Likewise.
12890 (set_super_info): Likewise.
12891 (add_method_1): Likewise.
12892 (add_method): Likewise.
12893 (add_field): Likewise.
12894 (build_utf8_ref): Likewise.
12895 (build_class_ref): Likewise.
12896 (build_static_field_ref): Likewise.
12897 (finish_class): Likewise.
12898 (push_super_field): Likewise.
12899 (layout_class): Likewise.
12900 (layout_class_methods): Likewise.
12901 (init_class_processing): Likewise.
12902 * constants.c (get_tag_node): Likewise.
12903 (build_constant_data_ref): Likewise.
12904 * decl.c (ggc_p): Remove.
12905 (copy_lang_decl): Use ggc_alloc.
12906 (complete_start_java_method): Don't mess with obstacks.
12907 (start_java_method): Likewise.
12908 (end_java_method): Likewise.
12909 * except.c (link_handler): Use xmalloc.
12910 (free_eh_ranges): New function.
12911 (method_init_exceptions): Use it.
12912 (add_handler): Use xmalloc.
12913 (expand_start_java_handler): Don't mess with obstacks.
12914 (prepare_eh_table_type): Likewise.
12915 (expand_end_java_handler): Likewise.
12916 * expr.c (push_value): Likewise.
12917 (create_label_decl): Likewise.
12918 (build_jni_stub): Likewise.
12919 (java_lang_expand_expr): Likewise.
12920 (note_instructions): Use xrealloc.
12921 (java_push_constant_from_pool): Don't mess with obstacks.
12922 (process_jvm_instruction): Likewise.
12923 * java-tree.h (cyclic_inheritance_report): Remove duplicate
12924 declaration.
12925 * jcf-parse.c (get_constant): Don't mess with obstacks.
12926 (read_class): Likewise.
12927 (jcf_parse): Likewise.
12928 * lex.c (expression_obstack): Remove.
12929 (java_lex): Don't use obstack_free.
12930 * parse.h (exit_java_complete_class): Don't mess with obstacks.
12931 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
12932 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
12933 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
12934 * parse.y (gaol): Add more GC roots.
12935 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
12936 (lookup_field_wrapper): Likewise.
12937 (obtain_incomplete_type): Don't mess with obstacks.
12938 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
12939 macros.
12940 (craft_constructor): Don't mess with obstacks.
12941 (safe_layout_class): Likewise.
12942 (java_complete_class): Likewise.
12943 (source_end_java_method): Likewise.
12944 (build_outer_field_access_methods): Likewise.
12945 (build_outer_method_access_method): Likewise.
12946 (maybe_build_thisn_access_method): Likewise.
12947 (build_dot_class_method_invocation): Likewise.
12948 (java_complete_tree): Likewise.
12949 (java_complete_lhs): Likewise.
12950 (do_merge_string_cste): Likewise.
12951 (patch_string_cst): Likewise.
12952 (array_constructor_check_entry): Likewise.
12953 * typeck.c (build_java_array_type): Likewise.
12954 (parse_signature_string): Likewise.
12955 (build_java_signature): Likewise.
12956
12957 2000-10-12 Tom Tromey <tromey@cygnus.com>
12958
12959 Fix for PR gcj/356:
12960 * gjavah.c (add_class_decl): Don't special-case inner classes.
12961 (add_namelet): Likewise.
12962
12963 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
12964
12965 * java-tree.h: Constify current_encoding.
12966 * lang.c: Constify current_encoding.
12967
12968 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
12969
12970 * jvgenmain.c (class_mangling_suffix): Omit `.'.
12971 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
12972
12973 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12974
12975 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
12976 patch. Fixes gcj/340.
12977
12978 2000-10-10 Tom Tromey <tromey@cygnus.com>
12979
12980 * lex.c (java_new_lexer): Initialize out_first and out_last
12981 fields.
12982 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
12983
12984 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12985
12986 * parse.y (pop_current_osb): New function.
12987 (array_type:): Use `dims:', changed actions
12988 accordingly. Suggested by Anthony Green.
12989 (array_creation_expression:): Used pop_current_osb.
12990 (cast_expression:): Likewise.
12991 (search_applicable_method_list): Fixed indentation.
12992
12993 2000-10-08 Anthony Green <green@redhat.com>
12994
12995 * parse.y (array_type_literal): Remove production.
12996 (type_literals): Refer to array_type, not array_type_literal.
12997
12998 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12999
13000 Patch contributed by Corey Minyard.
13001 * decl.c (check_local_named_variable): New function.
13002 (tree check_local_unnamed_variable): Likewise.
13003 (find_local_variable): Splitted. Call check_local_{un}named_variable.
13004
13005 2000-10-07 Anthony Green <green@redhat.com>
13006
13007 * class.c (layout_class): Handle case where superclass can't be
13008 layed out yet.
13009
13010 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
13011
13012 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
13013 gperf.
13014
13015 2000-10-05 Tom Tromey <tromey@cygnus.com>
13016
13017 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
13018 * jvgenmain.c (class_mangling_prefix): Removed.
13019 (class_mangling_suffix): New global.
13020 (main): Use it.
13021 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
13022 `$'.
13023 (print_method_info): Handle overrides for static and final
13024 methods.
13025 (process_file): Generate declaration for class object field.
13026 * class.c (cxx_keywords): New array.
13027 (utf8_cmp): New function.
13028 (cxx_keyword_p): New function.
13029 (layout_class_method): Mangle C++ keywords by appending `$'.
13030 (mangle_field): New function.
13031 (mangle_class_field): Use mangle_field. Mangle class name as
13032 `class$'.
13033 (mangle_static_field): Use mangle_field.
13034
13035 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
13036
13037 * decl.c (find_local_variable): Removed uncessary type check and
13038 fixed range check typo. From Corey Minyard.
13039
13040 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13041
13042 * decl.c (give_name_to_locals): New local `code_offset'. Call
13043 `maybe_adjust_start_pc'.
13044 * expr.c (note_instructions): New function.
13045 (expand_byte_code): Don't collect insn starts here.
13046 (peek_opcode_at_pc): New function.
13047 (maybe_adjust_start_pc): Likewise.
13048 * java-tree.h (maybe_adjust_start_pc): Declare.
13049 (note_instructions): Likewise.
13050 * jcf-parse.c (parse_class_file): Call `note_instructions'.
13051
13052 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13053
13054 * parse.y (field_access:): Fixed indentation.
13055 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
13056
13057 2000-09-07 Tom Tromey <tromey@cygnus.com>
13058
13059 Fix for PR gcj/307:
13060 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
13061 JPRIMITIVE_TYPE_P, for arithmetic operators.
13062 (patch_method_invocation): Indentation fix.
13063 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
13064 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
13065 (do_unary_numeric_promotion): Cleaned up code.
13066 (valid_cast_to_p): Handle boolean correctly.
13067
13068 2000-09-27 Tom Tromey <tromey@cygnus.com>
13069
13070 * lex.c (java_read_unicode): Reset bs_count when finished with
13071 `\u' sequence.
13072
13073 2000-10-01 Mark Mitchell <mark@codesourcery.com>
13074
13075 Convert to GC.
13076 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
13077 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
13078 (typeck.o): Depend on ggc.h.
13079 * class.c (add_method_1): Use GC functions for allocation.
13080 (init_class_processing): Register roots.
13081 * decl.c (ggc_p): Set to 1.
13082 (pending_local_decls): Make it static.
13083 (push_jvm_slot): Use GC functions for allocation.
13084 (init_decl_processing): Register roots.
13085 (give_name_to_locals): Use GC functions for allocation.
13086 (lang_mark_tree): New function.
13087 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
13088 functions for allocation.
13089 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
13090 * lex.c (java_lex): Use build_string, rather than replicating it
13091 inline.
13092 * parse.y (goal): Add more roots.
13093 (mark_parser_ctxt): New function.
13094 * typeck.c: Include ggc.h.
13095
13096 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13097
13098 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
13099 contains something else than MODIFY_EXPR.
13100
13101 2000-09-23 Mark Mitchell <mark@codesourcery.com>
13102
13103 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
13104 * Makefile.in (parse.o): Depend on ggc.h.
13105 (class.o): Likewise.
13106 (constants.o): Likewise.
13107 (decl.o): Likewise.
13108 (expr.o): Likewise.
13109 (jcf-parse.o): Likewise.
13110 (jcf-write.o): Likewise.
13111 (mangle.o): Likewise.
13112 * class.c: Include ggc.h.
13113 (build_static_field_ref): Register GC roots.
13114 (layout_class): Likewise.
13115 (init_class_processing): Likewise.
13116 * constants.c: Include ggc.h.
13117 (current_constant_pool_data_ref): Remove.
13118 (tag_nodes): Move it to ...
13119 (get_tag_node): ... here. Register GC roots.
13120 * decl.c: Include ggc.h. Remove many global tree definitions.
13121 (throw_node): Define.
13122 (java_global_trees): Likewise.
13123 (predef_filenames): Make the size a constant.
13124 (init_decl_processing): Adjust accordingly.
13125 (init_decl_processing): Call init_jcf_parse. Register GC roots.
13126 * expr.c: Include ggc.h.
13127 (init_expr_processing): Register GC roots.
13128 (build_invokeinterface): Likewise.
13129 * java-tree.h: Replace extern tree declarations with macros.
13130 (java_global_trees): New variable.
13131 (java_tree_index): New enumeration.
13132 (init_jcf_parse): Declare.
13133 * jcf-parse.c: Include ggc.h.
13134 (current_class): Remove declaration.
13135 (main_class): Likewise.
13136 (all_class_list): Likewise.
13137 (predefined_filename_p): Adjust for constant size of
13138 predef_filenames.
13139 (init_jcf_parse): New function.
13140 * jcf-write.c: Include ggc.h.
13141 (generate_classfile): Register GC roots.
13142 (append_synthetic_attribute): Likewise.
13143 (append_innerclass_attribute_entry): Likewise.
13144 * lang.c: Include ggc.h.
13145 (lang_print_error): Register GC roots.
13146 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
13147 with macros.
13148 * parse.y: Include ggc.h.
13149 (wfl_operator): Remove.
13150 (goal): Register GC roots.
13151 (java_pop_parser_context): Adjust for new field names.
13152 (java_parser_context_save_global): Likewse.
13153 (java_parser_context_restore_global): Likewise.
13154 (java_parser_context_suspend): Likewise.
13155 (java_parser_context_resume): Likewise.
13156 (verify_constructor_circularity): Register GC roots.
13157 (lookup_cl): Likewise.
13158 (java_reorder_fields): Likewise.
13159 (build_current_this): Likewise.
13160 (class_in_current_package): Likewise.
13161 (argument_types_convertible): Likewise.
13162 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
13163
13164 2000-09-14 Tom Tromey <tromey@cygnus.com>
13165
13166 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
13167
13168 2000-09-13 Tom Tromey <tromey@cygnus.com>
13169
13170 * jcf-parse.c: Include <locale.h>.
13171 * jv-scan.c: Include <locale.h>.
13172
13173 2000-09-12 Tom Tromey <tromey@cygnus.com>
13174
13175 * expr.c (pop_type_0): Return `Object' if trying to merge two
13176 interface types.
13177 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
13178 interface types; `Object' is always a valid supertype.
13179
13180 2000-09-12 Tom Tromey <tromey@cygnus.com>
13181
13182 Fix for PR gcj/33:
13183 * jv-scan.c (help): Document --encoding.
13184 (options): Added `encoding' entry.
13185 (OPT_ENCODING): New define.
13186 (main): Handle --encoding.
13187 Include <langinfo.h> if nl_langinfo exists.
13188 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
13189 --encoding.
13190 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
13191 (parse_source_file): Correctly call java_init_lex. Added `finput'
13192 argument. Use nl_langinfo to determine default encoding.
13193 * java-tree.h (current_encoding): Declare.
13194 * parse.y (java_parser_context_restore_global): Don't restore
13195 `finput'.
13196 (java_parser_context_save_global): Don't set `finput' field.
13197 (java_pop_parser_context): Don't restore `finput'. Free old lexer
13198 if required.
13199 * lang.c (current_encoding): New global.
13200 (lang_decode_option): Recognize `-fencoding='.
13201 (finish_parse): Don't close finput.
13202 * parse.h (struct parser_ctxt): Removed `finput' and
13203 `unget_utf8_value' fields. Added `lexer' field.
13204 (java_init_lex): Fixed declaration.
13205 * lex.c (java_new_lexer): New function.
13206 (java_destroy_lexer): Likewise.
13207 (java_read_char): Added `lex' argument. Handle iconv case.
13208 (java_read_unicode): Added `lex' argument. Count backslashes in
13209 lexer structure.
13210 (java_init_lex): Added `finput' and `encoding' arguments. Set
13211 `lexer' field in ctxp.
13212 (BAD_UTF8_VALUE): Removed.
13213 (java_lex): Handle seeing UEOF in the middle of a string literal.
13214 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
13215 (java_lexer): New structure.
13216 (UNGETC): Removed.
13217 (GETC): Removed.
13218 (DEFAULT_ENCODING): New define.
13219 (java_destroy_lexer): Declare.
13220
13221 2000-09-12 Tom Tromey <tromey@cygnus.com>
13222
13223 Fix for PR gcj/343:
13224 * lex.c (java_init_lex): Initialize java_io_serializable.
13225 * parse.y (java_io_serializable): New global.
13226 (valid_ref_assignconv_cast_p): An array can be cast to
13227 serializable.
13228
13229 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
13230
13231 * decl.c, expr.c: Include defaults.h if not already included.
13232 Don't define the *_TYPE_SIZE macros.
13233
13234 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
13235
13236 * typeck.c (build_java_array_type): Correct first parameter
13237 in ADJUST_FIELD_ALIGN invocation.
13238
13239 2000-09-06 Tom Tromey <tromey@cygnus.com>
13240
13241 * lang-specs.h: Also recognize `-femit-class-files'.
13242
13243 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13244
13245 * verify.c (merge_types): Load the types to merge if necessary.
13246
13247 2000-09-02 Anthony Green <green@redhat.com>
13248
13249 * jcf-io.c: Include zlib.h.
13250 (open_in_zip): Read compressed class file archives.
13251 * zipfile.h (ZipDirectory): Add uncompressed_size and
13252 compression_method fields.
13253 * zextract.c (read_zip_archive): Collect file compression info.
13254
13255 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
13256
13257 * parse.y (do_resolve_class): Also explore superclasses of
13258 intermediate enclosing contexts when searching for inner classes.
13259
13260 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13261
13262 * parse.y (variable_declarator_id:): Better error message.
13263 (expression_statement:): Use YYNOT_TWICE.
13264 (cast_expression:): Likewise.
13265 (assignment:): Likewise.
13266
13267 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13268
13269 * parse.y (do_merge_string_cste): New locals. Create new
13270 STRING_CSTs each time, use memcpy. Fixes gcj/311.
13271
13272 2000-08-07 Hans Boehm <boehm@acm.org>
13273
13274 * boehm.c (mark_reference_fields): Set marking bits for all words in
13275 a multiple-word record.
13276 (get_boehm_type_descriptor): Use the procedure marking descriptor for
13277 java.lang.Class.
13278
13279 2000-08-31 Mike Stump <mrs@wrs.com>
13280
13281 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
13282 jcf-dump$(exeext)): Make parallel safe.
13283
13284 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
13285
13286 * jcf-parse.c (set_source_filename): Constify a char *.
13287 * jcf-write.c (append_innerclasses_attribute,
13288 make_class_file_name): Constify a char *. Don't recycle a
13289 variable for an unrelated purpose.
13290 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
13291 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
13292
13293 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13294
13295 * expr.c (can_widen_reference_to): Fixed indentation.
13296 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
13297 * parse.y: `finit$' replaces `$finit$' in comments.
13298 (try_builtin_assignconv): Fixed leading comment.
13299
13300 2000-08-25 Greg McGary <greg@mcgary.org>
13301
13302 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
13303
13304 2000-08-24 Greg McGary <greg@mcgary.org>
13305
13306 * lang.c (lang_decode_option): Use ARRAY_SIZE.
13307 * parse.y (BINOP_LOOKUP): Likewise.
13308
13309 2000-08-22 Andrew Haley <aph@cygnus.com>
13310
13311 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
13312 sign extending. Fixes gcj/321.
13313 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
13314 combining to make a jlong. Fixes gcj/321.
13315
13316 2000-08-21 Nix <nix@esperi.demon.co.uk>
13317
13318 * lang-specs.h: Do not process -o or run the assembler if
13319 -fsyntax-only.
13320
13321 2000-08-16 Andrew Haley <aph@cygnus.com>
13322
13323 * typeck.c (build_java_array_type): Rewrite code to do array
13324 alignment. Take into account back-end macros when aligning array
13325 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
13326 user to set alignment. Fixes gcj/252 and 160.
13327
13328 2000-08-09 Tom Tromey <tromey@cygnus.com>
13329
13330 * parse.y (check_abstract_method_definitions): Now return `int'.
13331 Check implemented interfaces. Fixes PR gcj/305.
13332
13333 * parse.y (patch_switch_statement): Disallow `long' in switch
13334 expressions. Fixes PR gcj/310.
13335
13336 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13337
13338 * decl.c (finit_leg_identifier_node): New global.
13339 (init_decl_processing): Use `finit$' to initialize
13340 finit_identifier_node. Use `$finit$' to initialize
13341 finit_leg_identifier_node.
13342 * expr.c (expand_java_field_op): Use ID_FINIT_P.
13343 * java-tree.h (finit_identifier_node): Changed attached comment.
13344 (finit_leg_identifier_node): New declaration.
13345 (ID_FINIT_P): Take finit_identifier_node and
13346 finit_leg_identifier_node into account. This is a backward
13347 compatibility hack.
13348
13349 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13350
13351 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
13352 Jan 6 2000 patch.
13353 (generate_bytecode_insns): Check `nargs' before emitting it.
13354 * verify.c (merge_type_state): Fixed typo.
13355 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
13356 generate_bytecode_{conditional,insns}.
13357
13358 2000-08-13 Anthony Green <green@redhat.com>
13359
13360 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
13361 for -pg builds).
13362
13363 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13364
13365 * class.c (maybe_layout_super_class): Fixed indentation.
13366 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
13367 (java_check_methods): New function declaration.
13368 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
13369 instead of `str_ptr'.
13370 * jcf-write.c (generate_bytecode_insns): Emit number the of args
13371 of a `invokeinterface' at the right time.
13372 * parse.h (WFL_STRIP_BRACKET): New macro.
13373 (SET_TYPE_FOR_RESOLUTION): Use it.
13374 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
13375 (check_class_interface_creation): Don't check for cross package
13376 innerclass name clashes.
13377 (method_header): Behave properly if MDECL is `error_mark_node'.
13378 (method_declarator): Return `error_mark_node' if bogus current
13379 class.
13380 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
13381 (resolve_and_layout): New local `decl_type', set and used. Call
13382 java_check_methods.
13383 (java_check_methods): New method.
13384 (java_layout_classes): Use it.
13385 (resolve_qualified_expression_name): No EH check necessary in
13386 access$<n>.
13387 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
13388 `case' statement.
13389 (patch_assignment): Set DECL_INITIAL on integral final local.
13390
13391 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
13392
13393 * java-tree.h (flag_extraneous_semicolon): New extern.
13394 * lang-options.h: (-Wextraneous-semicolon): New option.
13395 * lang.c (flag_redundant): Fixed typo in leading comment.
13396 (flag_extraneous_semicolon): New global.
13397 (lang_decode_option): Set `flag_extraneous_semicolon' when
13398 -Wall. Decode `-Wextraneous-semicolon'.
13399 * parse.y (type_declaration:): Removed `SC_TK' hack, added
13400 `empty_statement' rule.
13401 (class_body_declaration): Likewise.
13402 (method_body:): Accept `;' as a method body.
13403 (static_initializer:): Removed `SC_TK' hack.
13404 (constructor_block_end:): Likewise.
13405 (empty_statement:): Report deprecated empty declaration. Fixes
13406 gcj/295
13407
13408 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13409
13410 * parse.y (build_dot_class_method_invocation): Changed parameter
13411 name to `type'. Build signature from `type' and convert it to a
13412 STRING_CST if it's an array.
13413 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
13414 to use `ref_type' directly.
13415
13416 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
13417
13418 * lang-options.h: Added a comma after the last element to avoid
13419 syntax errors when other languages define additional options.
13420
13421 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
13422
13423 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
13424 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
13425 (jc1): Link with $(BACKEND).
13426 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
13427
13428 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
13429
13430 * jvspec.c: Adjust type of second argument to
13431 lang_specific_driver, and update code as necessary.
13432
13433 * class.c (build_dtable_decl): Initialize dummy.
13434
13435 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13436
13437 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
13438 method bodies not to rule out discarding `<clinit>'; don't use
13439 <clinit> to initialize static fields with constant initializers.
13440
13441 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13442
13443 * gjavah.c (print_method_info): Added `synth' parameter. Skip
13444 synthetic methods.
13445 (method_synthetic): New global.
13446 (HANDLE_METHOD): Recognize synthetic method and tell
13447 `print_method_info' about it.
13448 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
13449 processing a synthetic method.
13450 * jcf-reader.c (skip_attribute): New function.
13451 ( skip_attribute): Likewise.
13452
13453 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13454
13455 * parse.y (build_outer_field_access): Fixed comments.
13456 (fix_constructors): Emit the initialization of this$<n> before
13457 calling $finit$.
13458 (resolve_qualified_expression_name): Build an access to `decl' if
13459 necessary.
13460
13461 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13462
13463 * parse-scan.y (curent_class): Non longer const.
13464 (inner_qualifier, inner_qualifier_length): Deleted.
13465 (current_class_length): New global.
13466 (bracket_count): Fixed typo in leading comment.
13467 (anonymous_count): New global.
13468 (class_instance_creation_expression:): Handle anonymous classes.
13469 (anonymous_class_creation:): New rule.
13470 (push_class_context): Rewritten.
13471 (pop_class_context): Likewise.
13472 (INNER_QUALIFIER): Macro deleted.
13473 (report_class_declaration): call `push_class_context' when
13474 entering the function. `fprintf' format modified not to use
13475 INNER_QUALIFIER.
13476 (report_class_declaration): Assign `package_name' and
13477 `current_class' to NULL separately.
13478
13479 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13480
13481 * expr.c (build_invokeinterface): Call layout_class_methods on
13482 target interface.
13483
13484 2000-07-27 Tom Tromey <tromey@cygnus.com>
13485 Anthony Green <green@cygnus.com>
13486 Alexandre Petit-Bianco <apbianco@cygnus.com>
13487
13488 * class.c (make_class_data): Create vtable for abstract classes.
13489 (get_dispatch_table): Changed to cope with abstract classes.
13490
13491 2000-07-27 Tom Tromey <tromey@cygnus.com>
13492
13493 * parse.y (patch_method_invocation): Don't reverse the argument
13494 list when dealing with anonymous class constructors. Fixed typo in
13495 comment.
13496
13497 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13498
13499 * parse.y (build_alias_initializer_parameter_list): Reverse
13500 crafted list when building aliases for anonymous class
13501 constructors.
13502
13503 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13504
13505 * parse.y (jdep_resolve_class): Don't bother checking potential
13506 innerclass access if `decl' is NULL.
13507 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13508 WFL.
13509
13510 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13511
13512 * parse.c: Remove (again.)
13513
13514 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13515
13516 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13517 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13518 outside the `if' statement, alias to innerclass removed, `decl'
13519 used to mark the class complete.
13520
13521 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13522
13523 * parse.y (simple_name:): Fixed typo in error message.
13524
13525 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13526
13527 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13528 or its first operand can be error marks.
13529
13530 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13531
13532 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13533 * parse.y (method_header): Likewise.
13534
13535 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13536
13537 * parse.y (process_imports): Consider that one might be trying to
13538 import an innerclass. Fixes gcj/254
13539
13540 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13541
13542 * parse.y (find_as_inner_class): Handle the case where the
13543 enclosing context of an innerclass has been loaded as bytecode.
13544
13545 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13546
13547 * parse.y (simple_name:): Reject `$' in type names.
13548 (resolve_type_during_patch): Use `type' as a second
13549 argument to resolve_no_layout. Fixes gcj/257.
13550
13551 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
13552
13553 * parse.y (find_most_specific_methods_list): Select the only
13554 non-abstract method even if max has been set.
13555 Fixes gcj/285, gcj/298.
13556
13557 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
13558
13559 * lang-specs.h: Added %(jc1) to java compiler options.
13560
13561 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
13562
13563 * .cvsignore: New file.
13564
13565 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13566
13567 * parse.y (not_accessible_p): Access granted to innerclasses
13568 (indirectly) extending the reference type. Fixes gcj/249.
13569
13570 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13571
13572 * parse.y (patch_method_invocation): Fixed comment.
13573 (maybe_use_access_method): Build this$<n>s to the context of the
13574 target method, or a type that extends it. Fixes gcj/242.
13575
13576 2000-07-13 Mark Mitchell <mark@codesourcery.com>
13577
13578 * parse.c: Remove.
13579
13580 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13581
13582 * parse.y (fold_constant_for_init): Avoid bullish conversion.
13583
13584 2000-07-13 Tom Tromey <tromey@cygnus.com>
13585
13586 * lang-specs.h: Added %{I*}.
13587
13588 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
13589
13590 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
13591
13592 2000-07-12 Mark Mitchell <mark@codesourcery.com>
13593
13594 * parse-scan.c: Remove.
13595
13596 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13597
13598 * class.c (set_super_info): Handled protected inner classes.
13599 (common_enclosing_context_p): Bail early if arguments aren't both
13600 inner classes.
13601 (get_access_flags_from_decl): Handle private and protected inner
13602 classes.
13603 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13604 (CLASS_PROTECTED): Likewise.
13605 (struct lang_type): New bitfield `poic'.
13606 * parse.y (jdep_resolve_class): Call check_inner_class_access on
13607 inner classes only.
13608 (check_inner_class_access): Renamed arguments, added
13609 comments. Handles protected inner classes (fixes gcj/225)
13610 (not_accessible_p): Fixed comments. Avoid handling inner classes.
13611
13612 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13613
13614 * parse.y (resolve_qualified_expression_name): Verify qualified
13615 access to `this'. Fixes gcj/239.
13616
13617 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13618
13619 * jcf-write.c (generate_classfile): Don't install ConstantValue
13620 for null pointers.
13621
13622 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13623
13624 * parse.y (resolve_qualified_expression_name): Handle inner class
13625 access. Fixes gcj/256.
13626
13627 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13628
13629 * jcf-write.c (generate_classfile): Properly install the
13630 ConstantValue attribute and the initial value constant pool index
13631 on string constants.
13632 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13633 class files.
13634
13635 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13636
13637 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13638 construct.
13639 * parse.y (find_as_inner_class): Fixed typo.
13640 (do_resolve_class): Explore enclosing contexts when searching for
13641 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13642 (check_inner_class_access): Check `decl' which can be null in case
13643 of previous errors.
13644
13645 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13646
13647 * java-tree.h (java_debug_context): Declared `extern'.
13648 (safe_layout_class): Likewise.
13649 * parse.y (resolve_field_access): Field must be `static' in order
13650 to be replaced by its initial value. Added comments.
13651 (find_applicable_accessible_methods_list): Fixed typo.
13652 (find_most_specific_methods_list): Methods found in innerclasses
13653 take over methods founds in the enclosing contexts.
13654 (java_complete_tree): Loosen restrictions on the type of DECLs
13655 that can be replaced by their initialization values.
13656 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13657
13658 2000-07-05 Tom Tromey <tromey@cygnus.com>
13659
13660 * Make-lang.in (PARSE_DIR): New macro.
13661 (PARSE_RELDIR): Likewise.
13662 (PARSE_C): Likewise.
13663 (PARSE_SCAN_C): Likewise.
13664 ($(PARSE_C)): New target.
13665 ($(PARSE_SCAN_C)): Likewise.
13666 (SET_BISON): New macro.
13667 (BISONFLAGS): Likewise.
13668 (JAVABISONFLAGS): Likewise.
13669
13670 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
13671
13672 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13673 argument on the first pass for CNI as well as JNI.
13674 (print_method_info): Set up method name on the first pass only.
13675
13676 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13677
13678 * parse.y (parser_qualified_classname): Removed parameter
13679 `is_static'.
13680 (create_interface): Removed first passed parameter to
13681 parser_qualified_classname.
13682 (create_class): Likewise. Don't install alias on static
13683 innerclasses. Fixes gcj/275.
13684
13685 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13686
13687 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13688 debugable statement with empty_stmt_node. Fixes gcj/272
13689
13690 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13691
13692 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13693 gcj/271.
13694
13695 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13696
13697 * jcf-write.c (push_long_const): Appropriately cast short negative
13698 constant to jword.
13699
13700 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13701
13702 * parse.y (verify_constructor_super): Use loop variable
13703 `m_arg_type' initialized with `mdecl_arg_type'.
13704
13705 2000-06-29 Tom Tromey <tromey@cygnus.com>
13706
13707 * parse.y (resolve_field_access): Handle case where `type_found'
13708 is NULL.
13709
13710 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13711
13712 * expr.c (lookup_field): The same field can be found through two
13713 different interface. Don't declare it ambiguous in that case.
13714
13715 2000-06-27 Tom Tromey <tromey@cygnus.com>
13716
13717 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
13718 follows \r, then unget it at a lower level.
13719
13720 2000-06-26 Tom Tromey <tromey@cygnus.com>
13721
13722 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13723 java_complete_tree.
13724
13725 2000-06-25 Tom Tromey <tromey@cygnus.com>
13726
13727 * parse.y (for_statement): Wrap expression in a WFL if it is a
13728 constant. For PR gcj/268.
13729
13730 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13731
13732 * parse.y (do_resolve_class): Minor optimiztion in the package
13733 list search. Removed unnecessary test and return statement.
13734 (valid_ref_assignconv_cast_p): Order of arguments to
13735 enclosing_context_p fixed.
13736
13737 2000-06-24 Tom Tromey <tromey@cygnus.com>
13738
13739 * expr.c (lookup_field): Print error and return error_mark_node if
13740 field reference is ambiguous.
13741
13742 * parse.y (check_abstract_method_definitions): Also check if
13743 `other_method' is abstract.
13744
13745 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13746
13747 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13748 classes.
13749 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13750 (struct lang_type): New field `pic'.
13751 (CLASS_PRIVATE): New macro.
13752 * parse.y (check_inner_class_access): New function.
13753 (jdep_resolve_class): Call it.
13754
13755 2000-06-23 Tom Tromey <tromey@cygnus.com>
13756
13757 * parse.y (patch_incomplete_class_ref): Initialize the returned
13758 class. For PR gcj/260.
13759
13760 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13761
13762 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13763
13764 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13765
13766 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13767 Java specific checks.
13768 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13769 screened by DECL_P.
13770 * java-tree.def (CASE_EXPR): Marked 'e'.
13771 (DEFAULT_EXPR): Likewise.
13772 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13773 screened by DECL_P.
13774 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13775 Java specific checks.
13776 (generate_bytecode_insns): Test try_block for BLOCK before using
13777 BLOCK_EXPR_BODY.
13778 * parse.y (build_wfl_wrap): Added `location' argument. Set
13779 EXPR_WFL_LINECOL accordingly.
13780 (dim_expr:): Wrap constants with WFLs.
13781 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13782 (resolve_package): Check for `stmt' not being a BLOCK before
13783 building a debuggable statement with it.
13784 (make_qualified_primary): Added extra parameter to build_wfl_wrap
13785 invocation.
13786 (resolve_field_access): Make sure `decl' is a DECL before treating
13787 it as such.
13788 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13789 IDENTIFIER_NODE before treating it as such.
13790 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13791 treating it as such.
13792 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13793 to be applied only on non array types.
13794
13795 2000-06-16 Per Bothner <per@bothner.com>
13796
13797 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
13798 define in terms of DECL_RESULT, as that fails when --enable-checking.
13799
13800 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13801
13802 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
13803 types the same in comparison.
13804 (CHECK_OP): Add static prototype.
13805
13806 2000-06-13 Jakub Jelinek <jakub@redhat.com>
13807
13808 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13809 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13810 * parse.c: Rebuilt.
13811
13812 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13813
13814 * decl.c (create_primitive_vtable): Prototype.
13815
13816 * jcf-write.c (generate_bytecode_insns): Initialize variable
13817 `saved_context'.
13818
13819 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13820
13821 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13822
13823 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13824 to track searched classes, and do not search the same class more than
13825 once. Call find_applicable_accessible_methods_list on immediate
13826 superclass, instead of search_applicable_method_list on all ancestors.
13827 Fix for PR gcj/238.
13828
13829 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13830
13831 * parse.y (register_fields): Permit static fields in inner classes
13832 if they are final. Fix for PR gcj/255.
13833
13834 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13835
13836 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13837 * parse.y (find_in_imports): Returned type changed to void,
13838 leading comment fixed.
13839 (register_package): New function.
13840 (qualify_and_find): Likewise.
13841 (package_declaration:): Use `register_package'.
13842 (single_type_import_declaration:): Removed local variable
13843 `node'. Added missing `;' for consistency.
13844 (type_import_on_demand_declaration:): Use `chainon' to link new
13845 entries.
13846 (lookup_field_wrapper): Lookup local variables defined in outer
13847 contexts first.
13848 (java_complete_class): Don't reverse the list of imported on demand.
13849 (do_resolve_class): Reorganized. Removed local variable
13850 `original_name'. Call `qualify_and_find' with the current package
13851 name, invoke `find_in_imports_on_demand' right after. Call
13852 `qualify_and_find' with the packages we've seen so far. Fixed
13853 operations numbering in comments.
13854 (java_expand_class): Don't reverse `package_list'.
13855 (find_most_specific_methods_list): New local variables `abstract'
13856 and `candidates'. Use them to pick the right method.
13857
13858 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
13859
13860 * parse.y (check_modifiers_consistency): Don't subtract out
13861 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13862
13863 2000-06-04 Philipp Thomas <pthomas@suse.de>
13864
13865 * Makefile.in (INTLLIBS): New.
13866 (LIBS): Add above.
13867 (DEPLIBS): Ditto.
13868
13869 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13870
13871 * class.c (get_dispatch_table): Build the vtable dummy entry list
13872 element with a null purpose. Fixed leading comment.
13873 (build_dtable_decl): Build an accurate dtable type when appropriate
13874 and use it.
13875
13876 2000-06-02 Richard Henderson <rth@cygnus.com>
13877
13878 * lang.c (lang_get_alias_set): New.
13879
13880 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13881
13882 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13883 before using it as the accessed field.
13884
13885 2000-05-31 Tom Tromey <tromey@cygnus.com>
13886
13887 * java-tree.h (boolean_array_vtable, byte_array_vtable,
13888 char_array_vtable, short_array_vtable, int_array_vtable,
13889 long_array_vtable, float_array_vtable, double_array_vtable):
13890 Declare.
13891 * expr.c (get_primitive_array_vtable): New function.
13892 (create_primitive_vtable): New function.
13893 (java_lang_expand_expr): Enable code to statically generate
13894 arrays.
13895 * decl.c (init_decl_processing): Create primitive vtables.
13896 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13897 short_array_vtable, int_array_vtable, long_array_vtable,
13898 float_array_vtable, double_array_vtable): Define.
13899
13900 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
13901
13902 * java/parse.y (find_applicable_accessible_methods_list):
13903 Don't add an uninitialized value to the list.
13904
13905 2000-05-25 Tom Tromey <tromey@cygnus.com>
13906
13907 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
13908 when trying to see if field's class should be initialized. Always
13909 initialize field's declaring class, not qualified class.
13910 For PR gcj/162.
13911
13912 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
13913 `wfl_operator', to maybe_build_primttype_type_ref.
13914 Fixes PR gcj/235.
13915
13916 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
13917
13918 * parse.y (patch_method_invocation): Don't try to lookup methods
13919 in primitive types.
13920
13921 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13922
13923 * parse.y (resolve_field_access): Call the appropriate <clinit>
13924 before accessing the length of a static array. Craft a decl for
13925 the field while its time. Fixes PR gcj/129.
13926
13927 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13928
13929 * parse.y (resolve_package): Correctly set `*next' (was off by
13930 one.)
13931 (resolve_qualified_expression_name): Fixed comment.
13932
13933 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13934
13935 * jcf-parse.c (jcf_parse_source): Reset current_class and
13936 current_function_decl to NULL before parsing a new file.
13937
13938 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13939
13940 * parse.y (block_end:): If the collected block doesn't feature a
13941 statement, insert an empty statement.
13942
13943 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13944
13945 * parse.y (maybe_yank_clinit): New function.
13946 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
13947 end of the list of methods belonging to a class.
13948 (java_complete_expand_method): Check whether <clinit> is really
13949 necessary and expand it accordingly.
13950
13951 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13952
13953 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
13954 processed by the method's switch statement.
13955
13956 2000-05-19 Tom Tromey <tromey@cygnus.com>
13957
13958 * java-tree.h: Added init state enum.
13959 * decl.c (emit_init_test_initialization): Initialize class
13960 initialization check variable by looking at class' state.
13961
13962 2000-05-19 Tom Tromey <tromey@cygnus.com>
13963
13964 * java-tree.h (build_instanceof): Declare.
13965 (build_get_class): Declare.
13966 * parse.y (patch_binop): Use build_instanceof.
13967 * expr.c (build_instanceof): New function. If class is final,
13968 don't make a function call.
13969 (expand_java_INSTANCEOF): Use it.
13970 (build_get_class): New function.
13971
13972 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
13973
13974 * jcf-write.c (generate_classfile): Scan the source_file for
13975 slashes with the right pointer variable.
13976
13977 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
13978
13979 * lang.c (lang_decode_option): Update -Wunused flags by calling
13980 set_Wunused.
13981 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
13982
13983 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
13984
13985 * check_init.c (check_init): Constify local char *.
13986 * class.c (push_class): Constify local char *.
13987 * java_tree.h: Update prototypes.
13988 * jcf-io.c (open_class): Constify filename parameter and
13989 return value.
13990 (find_class): Remove redundant string copy. Cast return from
13991 open_class.
13992 * jcf-parse.c (read_class, parse_class_file, yyparse):
13993 Constify local char *.
13994 * jcf-write.c (generate_bytecode_insns, generate_classfile):
13995 Constify local char *.
13996 * jcf.h (JCF): Constify filename and classname.
13997 (JCF_FINISH): Cast args to FREE to char * when appropriate.
13998 * lang.c (init_parse): Constify parameter and return value.
13999 * lex.c (java_get_line_col): Constify filename parameter.
14000 * parse.h: Constify parser_ctxt.filename. Update prototypes.
14001 * parse.y (java_parser_context_suspend,
14002 issue_warning_error_from_context, safe_layout_class): Constify
14003 local char *.
14004 * parse.c: Regenerate.
14005
14006 2000-05-08 Tom Tromey <tromey@cygnus.com>
14007
14008 * expr.c (build_jni_stub): Cache the result of
14009 _Jv_LookupJNIMethod.
14010
14011 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14012
14013 * decl.c (predef_filenames_size): Now 7.
14014 (predef_filenames): New seventh entry.
14015
14016 2000-05-04 Tom Tromey <tromey@cygnus.com>
14017
14018 * boehm.c (mark_reference_fields): Don't mark RawData fields.
14019 Keep track of when we've seen a reference field after a
14020 non-reference field.
14021 (get_boehm_type_descriptor): Handle case where we see
14022 non-reference fields but no trailing reference field.
14023 * decl.c (rawdata_ptr_type_node): Define.
14024 (init_decl_processing): Initialize rawdata_ptr_type_node.
14025 * java-tree.h (rawdata_ptr_type_node): Declare.
14026
14027 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14028
14029 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
14030 specifiers in calls to fprintf.
14031
14032 2000-05-03 Andrew Haley <aph@cygnus.com>
14033
14034 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
14035
14036 * javaop.h (WORD_TO_INT): New function.
14037 (IMMEDIATE_s4): Use WORD_TO_INT.
14038 * jcf.h (JPOOL_INT): Ditto.
14039
14040 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
14041 separator.
14042
14043 2000-04-19 Tom Tromey <tromey@cygnus.com>
14044
14045 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
14046 on native function.
14047 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
14048 JNI methods.
14049 * expr.c (build_jni_stub): New function.
14050 * lang-specs.h: -fjni and -femit-class-file are incompatible.
14051 * parse.c: Rebuilt.
14052 * parse.y (java_complete_expand_methods): Expand a native method
14053 and call build_jni_stub if -fjni given.
14054 * lang-options.h: Document -fjni.
14055 * lang.c (flag_jni): New global.
14056 (lang_f_options): Added `jni' entry.
14057 * java-tree.h (soft_lookupjnimethod_node,
14058 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
14059 Declare.
14060 (flag_jni): Declare.
14061 (build_jni_stub): Declare.
14062 (struct lang_decl): Added `native' flag.
14063 (METHOD_NATIVE): Redefined to use `native' field of lang specific
14064 structure.
14065 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
14066 soft_jnipopsystemframe_node): New globals.
14067 (init_decl_processing): Set them. _Jv_InitClass only takes one
14068 argument.
14069
14070 * java-tree.def: Put into `C' mode.
14071
14072 2000-04-27 Tom Tromey <tromey@cygnus.com>
14073
14074 Fix for PR gcj/2:
14075 * expr.c (expand_invoke): Generate check to see if object pointer
14076 is null in nonvirtual invocation case.
14077 * java-tree.h (soft_nullpointer_node): Declare.
14078 * decl.c (soft_nullpointer_node): New global.
14079 (init_decl_processing): Initialize soft_nullpointer_node.
14080 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14081 or `private' methods.
14082 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14083
14084 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
14085
14086 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
14087 from <clinit>
14088
14089 2000-04-26 Tom Tromey <tromey@cygnus.com>
14090
14091 * zextract.c (find_zip_file_start): New function.
14092 (read_zip_archive): Use it.
14093
14094 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14095
14096 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
14097
14098 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14099
14100 * class.c (common_enclosing_context_p): New function.
14101 * java-tree.h (common_enclosing_context_p): Added prototype.
14102 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
14103 classes sharing an outer context with the current instance.
14104 * parse.y (build_access_to_thisn): Fixed leading comment.
14105 (verify_constructor_super): New local `supper_inner'. Skip
14106 enclosing context argument in the case of inner class constructors.
14107 (patch_method_invocation): Insert proper context as second
14108 parameter to pure inner class constructor super invocations.
14109
14110 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14111
14112 * parse.y (end_class_declaration): Reset the interface number
14113 counter.
14114
14115 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14116
14117 * parse.y (source_start_java_method): Deleted unnecessary code.
14118 (patch_method_invocation): Fixed comment.
14119
14120 2000-04-24 Robert Lipe <robertlipe@usa.net>
14121
14122 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
14123
14124 2000-04-23 Tom Tromey <tromey@cygnus.com>
14125
14126 * boehm.c (mark_reference_fields): Use int_byte_position.
14127
14128 2000-04-22 Tom Tromey <tromey@cygnus.com>
14129
14130 * boehm.c (mark_reference_fields): Only call byte_position on
14131 non-static fields.
14132
14133 2000-04-22 Tom Tromey <tromey@cygnus.com>
14134
14135 * boehm.c (mark_reference_fields): Added `last_view_index'
14136 argument. Use DECL_FIELD_OFFSET to determine field's offset.
14137
14138 2000-04-20 Mo DeJong <mdejong@cygnus.com>
14139
14140 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
14141 * parse.y (check_class_interface_creation): Fixed comments. Select
14142 permitted modifiers for (inner) interfaces. Changed error message
14143 to report rejected modifiers used with local classes.
14144
14145 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14146
14147 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
14148 of directly inherited type considered in scope.
14149 * parse.y (do_resolve_class): Search inherited classes for inner
14150 classes.
14151
14152 2000-04-20 Tom Tromey <tromey@cygnus.com>
14153
14154 * parse.y (not_accessible_p): Use member's class, not current
14155 class, when doing inheritance check for protected reference.
14156 Fixes PR gcj/124.
14157
14158 2000-04-20 Jason Schroeder <shrode@subnature.com>
14159
14160 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
14161
14162 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14163
14164 * parse.y (lookup_field_wrapper): Search for final local aliases.
14165 (resolve_expression_name): Let lookup_field_wrapper search for
14166 final local aliases. Force the value of `name' if one is found.
14167 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
14168 an expression name. Fixed comments.
14169
14170 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14171
14172 * parse.y (yyerror): `msg' can be null, don't use it in that case.
14173
14174 2000-04-19 Tom Tromey <tromey@cygnus.com>
14175
14176 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
14177
14178 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14179
14180 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
14181
14182 2000-04-18 Tom Tromey <tromey@cygnus.com>
14183
14184 PR gcj/211:
14185 * gjavah.c (utf8_cmp): Changed return value.
14186 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
14187 result.
14188 (cxx_keywords): New global.
14189 (get_field_name): Handle new result of cxx_keyword_subst.
14190 (print_method_info): Likewise.
14191
14192 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
14193
14194 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
14195 with a newline, for CNI.
14196 (print_stub_or_jni): Print a space or newline before method name for
14197 CNI as well as JNI.
14198 (print_cxx_classname): Don't write leading "::" in CNI stub method.
14199 (process_file): Include gcj/cni.h if generating CNI stubs.
14200
14201 2000-04-16 Tom Tromey <tromey@cygnus.com>
14202
14203 * gjavah.c (decompile_method): Use print_field_name.
14204 Fixes PR gcj/205.
14205
14206 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14207
14208 * parse.y (java_expand_classes): Reverse the package list once.
14209 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
14210 reduction.
14211 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
14212 the `==' and `!=' operators.
14213
14214 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14215
14216 * jcf-write.c (generate_bytecode_insns): At invocation time,
14217 always relate an interface method to the type of its selector.
14218
14219 2000-04-05 Tom Tromey <tromey@cygnus.com>
14220
14221 Fix for PR gcj/2:
14222 * expr.c (expand_invoke): Generate check to see if object pointer
14223 is null in nonvirtual invocation case.
14224 * java-tree.h (soft_nullpointer_node): Declare.
14225 * decl.c (soft_nullpointer_node): New global.
14226 (init_decl_processing): Initialize soft_nullpointer_node.
14227 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14228 or `private' methods.
14229 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14230
14231 2000-04-05 Tom Tromey <tromey@cygnus.com>
14232
14233 Fix for PR gcj/140:
14234 * parse.y (check_final_assignment): Recognize assignments to the
14235 `length' field of an array when generating class files.
14236
14237 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14238
14239 * class.c (decl_hash): Prototype removed.
14240 (decl_compare): Likewise.
14241
14242 2000-04-05 Tom Tromey <tromey@cygnus.com>
14243
14244 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
14245 * parse.y (check_modifiers_consistency): Check for final/volatile
14246 clash. Fixes PR gcj/164.
14247
14248 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14249
14250 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
14251 made global.
14252 (java_hash_compare_tree_node): Renamed from `decl_compare, made
14253 global.
14254 (add_method_1): Use `java_hash_hash_tree_node' and
14255 `java_hash_compare_tree_node'.
14256 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
14257 (java_hash_compare_tree_node): Likewise.
14258 * parse.y (find_applicable_accessible_methods_list): Create,
14259 delete and use a hash table to remember already searched interfaces.
14260
14261 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
14262
14263 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
14264 with latest entry.
14265
14266 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14267
14268 * boehm.c (mark_reference_fields, set_bit): Prototype.
14269 (set_bit): Un-ANSI-fy definition.
14270
14271 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
14272 Prototype.
14273
14274 * decl.c (emit_init_test_initialization): Likewise.
14275
14276 * gjavah.c (jni_print_char): Likewise.
14277
14278 * parse.y (create_new_parser_context): Likewise.
14279
14280 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
14281
14282 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
14283 patch missing hunk. Fixed indentation.
14284
14285 2000-03-30 Tom Tromey <tromey@cygnus.com>
14286
14287 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
14288 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
14289
14290 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14291
14292 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14293 when negative *before* using it as an array index.
14294 * ChangeLog: Fixed typo.
14295
14296 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14297
14298 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14299 to 0 when it reaches -1.
14300
14301 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14302
14303 * jcf-parse.c (get_constant): Properly cast `num' during the
14304 invocation of `add_double'.
14305 * jcf-write.c (push_long_const): Properly cast `lo' before
14306 comparing it to short bounds.
14307 * parse-scan.y (interface_declaration:): Rule re-arrange so that
14308 `interface_body:' is reduced after the current interface is
14309 pushed.
14310
14311 2000-03-26 Tom Tromey <tromey@cygnus.com>
14312
14313 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
14314 Java-specific `-f' option.
14315
14316 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14317
14318 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
14319 Adjust order of making types.
14320 Make bitsize_*_node values.
14321
14322 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14323
14324 * class.c (make_field_value): Use byte_position.
14325 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
14326 (java_array_data_offset): Likewise.
14327 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
14328 bzero call.
14329
14330 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14331
14332 * parse.y (check_abstract_method_definitions): New local
14333 `end_type_reached'. Make sure we also consider `end_type'.
14334 (java_check_abstract_method_definitions): Make sure we eventually
14335 consider `java.lang.Object'.
14336 (maybe_use_access_method): Don't use access method if not in the
14337 context of a pure inner class or if the method's context is right.
14338 (find_applicable_accessible_methods_list): New static flag
14339 `object_done'. Don't search abstract classes as interfaces. Fixed
14340 indentation. Fixed the `java.lang.Object' only search. Search
14341 class interface(s) first, then fully search enclosing contexts.
14342 (find_most_specific_methods_list): Pick the closest candidate when
14343 they're all abstract.
14344
14345 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14346
14347 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14348 properly initialize `finished_label'. Don't emit gotos for empty
14349 try statements.
14350
14351 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14352
14353 * except.c (emit_handlers): Clear catch_clauses_last.
14354
14355 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14356
14357 * parse.y (check_method_types_complete): New function.
14358 (create_class): Reset anonymous class counter only when seeing an
14359 non inner classe.
14360 (java_complete_class): JDEP_METHOD: Don't recompute signature
14361 if incomplete.
14362
14363 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14364
14365 * class.c (build_static_ref): Fixed indentation in comment.
14366 * java-tree.def (TRY_EXPR): Fixed typo in name.
14367 (CLASS_LITERAL): Likewise.
14368 * java-tree.h: (TYPE_DOT_CLASS): New macro.
14369 (struct lang_type): New field `dot_class'.
14370 * jcf-write.c (generate_bytecode_insns): Fixed error message.
14371 (generate_classfile): Method `class$' is synthetic.
14372 * parse.y (build_do_class_method): New function.
14373 (build_dot_class_method_invocation): Likewise.
14374 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
14375 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
14376 (qualify_ambiguous_name): Likewise.
14377 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
14378 (build_try_statement): Fixed leading comment.
14379
14380 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14381
14382 * class.c (make_field_value): Properly handle sizes.
14383 (get_dispatch_vector): Use tree_low_cst and host_integerp.
14384 (layout_class_method): Count using trees.
14385 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
14386 * expr.c (java_array_data_offset): Use int_bit_position.
14387 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
14388 (build_invokevirtual): Use tree_low_cst and do computations with trees.
14389
14390 2000-03-16 Tom Tromey <tromey@cygnus.com>
14391
14392 * lang.c (flag_hash_synchronization): New global.
14393 (lang_f_options): Added `hash-synchronization'.
14394 * lang-options.h: Mention -fhash-synchronization.
14395 * java-tree.h (flag_hash_synchronization): Declare.
14396 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
14397 hash table synchronization is disabled.
14398 * decl.c (init_decl_processing): Only push `sync_info' value when
14399 hash table synchronization is disabled.
14400 * class.c (make_class_data): Only push `sync_info' field when hash
14401 table synchronization is disabled. Removed dead code.
14402
14403 2000-03-16 Tom Tromey <tromey@cygnus.com>
14404
14405 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
14406
14407 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14408
14409 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
14410 classes.
14411 * parse.y (patch_method_invocation): Handle anonymous classes
14412 creation in static context.
14413
14414 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14415
14416 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
14417 * parse.y (resolve_qualified_expression_name): Use it.
14418 (patch_method_invocation): Likewise.
14419
14420 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14421
14422 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
14423 depending on the type of dependency which dictates what the
14424 current class is.
14425 (unresolved_type_p): Resolved types limited to the current class.
14426
14427 2000-03-15 Tom Tromey <tromey@cygnus.com>
14428
14429 * decl.c (init_decl_processing): Set type of `sync_info' to be
14430 pointer to Object.
14431
14432 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
14433 Correctly compute bit number for current slot. Zero `high' and
14434 `low' in DS_LENGTH case. Don't skip inherited fields. Use
14435 mark_reference_fields.
14436 (mark_reference_fields): New function.
14437
14438 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14439
14440 * parse.y (register_incomplete_type): Fixed initialization of
14441 JDEP_ENCLOSING.
14442
14443 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14444
14445 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
14446 static globals.
14447 (push_class_context, pop_class_context): New function.
14448 (class_body:): Call pop_class_context.
14449 (interface_body:): Likewise.
14450 (INNER_QUALIFIER): New macro.
14451 (report_class_declaration): Changed output format and use
14452 INNER_QUALIFIER. Call push_class_context.
14453
14454 2000-02-14 Andrew Haley <aph@cygnus.com>
14455
14456 * check-init.c (check_init): Add new cases for unary and binary
14457 tree nodes.
14458
14459 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14460
14461 * parse.y (resolve_package): Set `next' once a type name has been
14462 progressively discovered.
14463 (resolve_qualified_expression_name): Propagate resolution only if
14464 there are remaining qualifiers. Take into account `q' might have
14465 been cleared after re-qualification.
14466 * parse.y (patch_method_invocation): New local `resolved'.
14467 Section dealing with qualified expression rewritten to use
14468 resolve_field_access.
14469
14470 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14471
14472 * parse.h (PUSH_CPC): Fixed indentation.
14473 (DEBUG_CPC): New macro.
14474 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
14475 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
14476 * parse.y (class_body_declaration:): Use
14477 SET_CPC_INSTANCE_INITIALIZER_STMT.
14478 (method_declaration:): Check for null current_function_decl.
14479 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
14480 (java_parser_context_pop_initialized_field): Better handling of
14481 empty lists.
14482 (maybe_make_nested_class_name): Mark nested class name as
14483 qualified when necessary.
14484 (end_class_declaration): Don't call java_parse_context_resume when
14485 one or more error occurred.
14486 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
14487 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
14488 SET_CPC_INITIALIZER_STMT.
14489 (method_header): Check for inner classes declaring static methods.
14490 (resolve_qualified_expression_name): Handle situation where `this'
14491 is implied.
14492
14493 2000-03-13 Hans Boehm <boehm@acm.org>
14494
14495 * typeck.c (build_prim_array_type): Correctly set the high word too.
14496
14497 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14498
14499 * parse.y (java_complete_expand_methods): Leave <clinit> out of
14500 ordinary methods.
14501 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14502 list of methods for interfaces.
14503
14504 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14505
14506 * parse.y (qualify_ambiguous_name): Properly handle expressions
14507 using `null'.
14508
14509 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14510
14511 * parse.y (check_final_assignment): Extended to process
14512 COMPOUND_EXPR.
14513 (patch_assignment): Have check_final_assignment called only once.
14514
14515 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14516
14517 * java-tree.h (IS_INIT_CHECKED): New flag.
14518 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14519 * parse.y (patch_string): Call force_evaluation_order on the
14520 completed string concatenation tree.
14521 * expr.c (force_evaluation_order): Call force_evaluation_order on
14522 function's arguments too.
14523
14524 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14525
14526 * decl.c (emit_init_test_initialization): Mark KEY as unused.
14527 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14528 (build_anewarray): Likewise.
14529 * parse.y (patch_newarray): Likewise.
14530 * parse.c: Regenerated.
14531
14532 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14533
14534 * decl.c (init_decl_processing): Added new class fields `depth',
14535 `ancestors', and `idt' to class_type_node. Use
14536 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14537 * class.c (make_class_data): Push initial values for new fields.
14538 * java-tree.h: Updated prototype for `build_invokeinterface'.
14539 * expr.c (build_invokeinterface): Changed parameters to accept
14540 `method' tree. Calculate index of `method' in its declaring
14541 interface. Build call to _Jv_LookupInterfaceMethodIdx.
14542 (expand_invoke): Call `build_invokeinterface' with new parameters.
14543 * parse.y (patch_invoke): Call `build_invokeinterface' with new
14544 parameters.
14545
14546 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14547
14548 * typeck.c (lookup_do): Search superinterfaces first
14549 when looking up an interface method. From Godmar Back
14550 <gback@cs.utah.edu>
14551
14552 2000-03-06 Tom Tromey <tromey@cygnus.com>
14553
14554 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14555
14556 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14557
14558 * java-tree.h (lookup_argument_method2): Declared.
14559 (safe_layout_class): Prototype moved from parse.h.
14560 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14561 * parse.y (java_check_regular_methods): Local `super_class' gone.
14562 Call lookup_argument_method2 instead of lookup_argument_method.
14563 Perform modifier match for methods found declared in implemented
14564 interfaces. Fixed indentation problem. Overriding/hiding error
14565 report to take place only for methods found in classes.
14566 * typeck.c (lookup_argument_method): Changed leading
14567 comment. Re-written by calling lookup_do.
14568 (lookup_argument_method2): New function.
14569 (lookup_java_method): Re-written by calling lookup_do.
14570 (lookup_do): New function.
14571
14572 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14573
14574 * check-init.c (check_init): Removed dead code. Handle (blank)
14575 final variables.
14576 * parse.y (declare_local_variables): New local `final_p', set it
14577 and use it to initialize LOCAL_FINAL.
14578 (check_final_assignment): Only check FIELD_DECLs.
14579
14580 2000-02-17 Tom Tromey <tromey@cygnus.com>
14581
14582 * Makefile.in (JAVA_OBJS): Added boehm.o.
14583 (boehm.o): New target.
14584 * Make-lang.in (JAVA_SRCS): Added boehm.c.
14585 * java-tree.h (flag_use_boehm_gc): Declare.
14586 (get_boehm_type_descriptor): Declare.
14587 * lang.c (lang_f_options): Added `use-boehm-gc'.
14588 (flag_use_boehm_gc): New global.
14589 * lang-options.h: Added -fuse-boehm-gc.
14590 * boehm.c: New file.
14591 * class.c (get_dispatch_table): If class uses a Boehm type
14592 descriptor, put it in the vtable.
14593 (make_class_data): Removed dead code.
14594
14595 2000-03-03 Per Bothner <per@bothner.com>
14596
14597 * decl.c (init_decl_processing): Initialize sizetype properly.
14598
14599 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14600
14601 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14602 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14603 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14604 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14605 (jcf_parse): New local `current'. Load innerclasses seen in outer
14606 context being processed.
14607 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14608 * jcf-write.c (append_innerclasses_attribute): New function.
14609 (append_innerclasses_attribute_entry): Likewise.
14610 (get_access_flags): Handle static classes. Set anonymous and local
14611 classes to be private.
14612 (generate_classfile): Attribute count adjusted. Call
14613 append_innerclasses_attribute.
14614 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14615 PURE_INNER_CLASS_TYPE_P.
14616 * parse.y (parser_qualified_classname): New parameter `is_static',
14617 produce non qualified name accordingly.
14618 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14619 (create_interface): Added argument to parser_qualified_classname.
14620 (create_class): Added argument to parser_qualified_classname. Setup
14621 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14622 (add_inner_class_fields): Fixed indentation.
14623 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14624 (method_declarator): Fixed typo in comment.
14625 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14626 (build_current_thisn): Likewise.
14627 (patch_method_invocation): Likewise.
14628
14629 2000-03-01 Martin von Löwis <loewis@informatik.hu-berlin.de>
14630
14631 * decl.c (current_function_decl): Move to toplev.c.
14632
14633 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14634
14635 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14636 (DECL_BIT_INDEX): Use underlying representation.
14637 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14638
14639 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14640
14641 * expr.c (build_java_ret): Pass proper type to size_binop.
14642
14643 2000-02-25 Anthony Green <green@cygnus.com>
14644
14645 * expr.c (build_class_init): Mark the decl to be ignored by
14646 check_init.
14647 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14648 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14649 * class.c (init_test_hash_newfunc): New function.
14650 (decl_hash): New function.
14651 (decl_compare): New function.
14652 * decl.c (emit_init_test_initialization): New function.
14653 (complete_start_java_method): Traverse the init test hashtable,
14654 calling emit_init_test_initialization.
14655 (always_initialize_class_p): Define.
14656 * expr.c (build_class_init): Use initialization tests when
14657 emitting class initialization code.
14658 (always_initialize_class_p): Declare.
14659 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14660 1.
14661 * java-tree.h: Include hash.h.
14662 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14663 (struct lang_decl): Add init_test_table field.
14664 (init_test_hash_entry): Define.
14665
14666 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14667
14668 * gjavah.c (main): Avoid using `argi' to report unimplemented
14669 options.
14670
14671 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14672
14673 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14674 initialize locals to avoid warnings. Local `exception_type' moved
14675 into if statement.
14676
14677 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14678
14679 * parse.y (resolve_expression_name): Use `orig' as a second
14680 argument to resolve_field_access.
14681 (resolve_field_access): Removed unnecessary code when dealing with
14682 static fields.
14683
14684 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
14685
14686 * class.c (push_super_field): Don't push the field twice.
14687 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14688 * parse.h (java_reorder_fields): Prototyped.
14689 * parse.y (java_reorder_fields): New function.
14690 (java_layout_class): Simplified not to worry about re-ordering.
14691
14692 2000-02-23 Tom Tromey <tromey@cygnus.com>
14693
14694 * gjavah.c (print_name): In JNI case, correctly quote string.
14695 (print_method_info): Don't handle overrides in JNI mode.
14696
14697 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14698
14699 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14700 value type set to `boolean_type_node'.
14701
14702 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14703
14704 * jcf-dump.c (main): Test for correct condition after
14705 output file creation.
14706
14707 2000-02-19 Anthony Green <green@cygnus.com>
14708
14709 * jcf-depend.c (add_entry): Fix test for first list entry.
14710
14711 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14712
14713 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14714 * constants.c (build_constants_constructor): Likewise.
14715
14716 2000-02-19 Anthony Green <green@cygnus.com>
14717
14718 * jcf-depend.c (add_entry): Add entries to the end of the list.
14719
14720 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
14721
14722 * decl.c (INT_TYPE_SIZE): Define if necessary.
14723 (expand_java_return): Handle the case of a native integer smaller
14724 than a JVM integer.
14725
14726 2000-02-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
14727
14728 * gjavah.c (help): Use GCCBUGURL.
14729 * jv-scan.c (help): Likewise.
14730 * jcf-dump.c (help): Likewise.
14731
14732 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14733
14734 * jcf-write.c (generate_bytecode_insns): Don't generate empty
14735 `finally' clauses.
14736
14737 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14738
14739 * jcf-parse.c (load_class): Call `fatal' if no file containing
14740 the target class are found.
14741
14742 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
14743
14744 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14745 lex.c, lex.h, and PARSE_H to...
14746 (parse.o, parse-scan.o): ...here, respectively.
14747
14748 * lex.c: Split out code that may trigger SIGFPE from yylex()
14749 to its own function.
14750 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14751
14752 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14753
14754 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14755
14756 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14757
14758 * parse.y (outer_field_access_p): Stop in time when outer contexts
14759 are exhausted.
14760 (resolve_qualified_expression_name): Properly qualify *everything*
14761 after a package.type to be resoled as expression names.
14762 (find_applicable_accessible_methods_list): Save/restore `class' to
14763 isolate it from a possible outer context search.
14764
14765 2000-02-15 Tom Tromey <tromey@cygnus.com>
14766
14767 * gjavah.c (jni_print_char): New function.
14768 (print_full_cxx_name): Use it.
14769 (decode_signature_piece): Likewise.
14770 (print_cxx_classname): Likewise.
14771
14772 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14773
14774 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14775 version.o.
14776 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14777
14778 * gjavah.c: Include version.h.
14779
14780 * jcf-dump.c: Likewise.
14781
14782 * jv-scan.c: Likewise.
14783
14784 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14785
14786 * parse.y (outer_field_access_fix): First parameter now a tree
14787 node. Check for assignment to final. First argument to
14788 build_outer_field_access_fix modified to accommodate prototype.
14789 (build_outer_field_access): Don't check for assignment to final
14790 here.
14791 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14792 possibly returned by outer_field_access_fix. Changed
14793 outer_field_access_fix's first argument.
14794 (check_final_assignment): $finit$'s context is OK.
14795 (patch_unaryop): Use node instead of its line/column value when
14796 calling outer_field_access_fix.
14797
14798 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14799
14800 * parse.y (interface_declaration:): No longer tagged
14801 <node>. Re-installed default action.
14802 (class_member_declaration:): Handle inner interfaces.
14803 (interface_member_declaration): Handle inner interfaces and
14804 classes.
14805 (create_interface): Push error if one seen. Suspend parsing
14806 context when processing an inner interface.
14807 (register_fields): Inner class static field limitations not to
14808 apply to inner interfaces.
14809
14810 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14811
14812 * jcf-parse.c (load_class): Update `java_error_count' when a
14813 class' file can't be found.
14814 (parse.y): Avoid (byte)code generation when errors seen.
14815
14816 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14817
14818 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
14819 decodes a valid node.
14820 (patch_binop): Handle TRUNC_DIV_EXPR.
14821
14822 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14823
14824 * parse.y (resolve_package): New local `acc'. Try to progressively
14825 build and guess a package and type name.
14826
14827 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14828
14829 * parse.y (find_applicable_accessible_methods_list): Load and
14830 layout the search class if necessary.
14831 (java_complete_tree): Keep to original type of the folded initial
14832 value.
14833
14834 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14835
14836 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14837 Generate error message if circularity is detected. New static
14838 local `list'.
14839 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
14840 * jcf-write.c (generate_bytecode_insns): Very simply handle
14841 SAVE_EXPR.
14842 * parse.y (java_check_circular_reference): Use
14843 `cyclic_inheritance_report' during report, if necessary.
14844 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14845 walking NEW_ARRAY_INIT twice.
14846
14847 2000-02-09 Tom Tromey <tromey@cygnus.com>
14848
14849 * parse.y (check_class_interface_creation): Allow inner classes to
14850 be `private' or `protected', check modifiers' consistency. Prevent
14851 block local classes from bearing any modifiers.
14852
14853 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14854
14855 * except.c (check_start_handlers): Re-add prototype lost in last
14856 patch.
14857 (maybe_start_try): Remove excess argument to `check_start_handlers'.
14858
14859 2000-02-09 Andrew Haley <aph@cygnus.com>
14860
14861 * decl.c (clear_binding_level): Remove excess initializer.
14862 (maybe_poplevels): Remove unused variable.
14863 (force_poplevels): Ditto.
14864 (struct binding_level): Add comment.
14865
14866 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14867
14868 * jcf-write.c (generate_classfile): Don't consider
14869 pre-initialization with reference value (use <clinit> instead.)
14870 * parse.y (java_fix_constructors): No generated constructor for
14871 interfaces.
14872 (build_outer_field_access): Removed debug message.
14873 (outer_field_expanded_access_p): Adapted to bytecode generation.
14874 (build_outer_field_access_method): Use fix_method_argument_names.
14875 (build_outer_method_access_method): Fixed indentation. Added
14876 comment. Handle access method generation for static and also void
14877 methods.
14878 (build_access_to_thisn): Inserted debug message.
14879 (maybe_build_thisn_access_method): Use fix_method_argument_names.
14880 (resolve_qualified_expression_name): Fixed comment.
14881 (not_accessible_p): Adapted to bytecode generation. Added comment.
14882 (patch_method_invocation): Added comment.
14883 (maybe_use_access_method): Fixed leading comment. Handle static
14884 methods.
14885 (java_complete_lhs): Don't shortcut handling of initialized upon
14886 declaration String type static fields when generating bytecode.
14887 (patch_unaryop): Handle outer field access when generating
14888 bytecode.
14889
14890 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14891
14892 * java-tree.h (FIELD_THISN): New macro.
14893 * jcf-write.c (append_synthetic_attribute): New function.
14894 (generate_classfile): Set "Synthetic" attribute on this$<n>,
14895 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
14896 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
14897 this$<n> fields.
14898 (build_outer_field_access): Turned on access functions usage and
14899 generation when compiling to bytecode.
14900 (maybe_use_access_method): Likewise.
14901
14902 2000-01-25 Andrew Haley <aph@cygnus.com>
14903
14904 * java-except.h (struct eh_range): Add `expanded' field.
14905 (maybe_start_try): Add end_pc arg.
14906 (maybe_end_try): Ditto.
14907 * java-tree.h (force_poplevels): new function.
14908 * expr.c (expand_byte_code): Don't call maybe_start_try or
14909 maybe_end_try.
14910 * except.c (add_handler): Reset expanded.
14911 (expand_start_java_handler): Set expanded.
14912 (check_start_handlers): Don't expand a start handler that's
14913 already been expanded.
14914 (maybe_start_try): Add end_pc arg. Only expand a handler which
14915 ends after end_pc.
14916 (expand_end_java_handler): call force_poplevels.
14917 (force_poplevels): new function.
14918 * decl.c (binding_level): Add start_pc of binding level.
14919 (maybe_pushlevels): Call maybe_start_try when pushing binding
14920 levels.
14921 (maybe_poplevels): Call maybe_end_try when popping binding levels.
14922 (LARGEST_PC): Define.
14923 (clear_binding_level): Use LARGEST_PC.
14924
14925 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
14926 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
14927 (binding_depth, is_class_level, current_pc): new variables.
14928 (struct binding_level): ditto.
14929 (indent): new function.
14930 (push_jvm_slot): add debugging info.
14931 (maybe_pushlevels): ditto.
14932 (maybe_poplevels): ditto.
14933 (pushlevel): ditto.
14934 (poplevel): ditto.
14935 (start_java_method): ditto.
14936 (give_name_to_locals): comment only.
14937 * except.c (binding_depth, is_class_level, current_pc):
14938 new variables.
14939 (expand_start_java_handler): add debugging info.
14940 (expand_end_java_handler): ditto.
14941
14942 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14943
14944 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
14945 (print_name_for_stub_or_jni, process_file): Constify a char*.
14946
14947 2000-02-03 Tom Tromey <tromey@cygnus.com>
14948
14949 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
14950
14951 2000-01-31 Scott Bambrough <scottb@netwinder.org>
14952
14953 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
14954 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
14955 defined to be 1.
14956
14957 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14958
14959 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
14960 * java-tree.h (TYPE_II_STMT_LIST): New macro.
14961 (struct lang_type): New field `ii_block'.
14962 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
14963 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
14964 * parse.h (struct parser_ctxt): New field `instance_initializers'.
14965 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
14966 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
14967 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
14968 macros.
14969 * parse.y (add_instance_initializer): New function.
14970 (in_instance_initializer): New static global.
14971 (class_body_declaration:): Link instance initializer block.
14972 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
14973 (array_creation_expression:): Remove unused local.
14974 (java_parser_context_push_initialized_field): Fixed leading
14975 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
14976 CPC_INSTANCE_INITIALIZER_LIST.
14977 (java_parser_context_pop_initialized_field): Likewise.
14978 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
14979 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
14980 CPC_INITIALIZER_STMT.
14981 (fix_constructors): New local `class_type'. Use it. Call
14982 add_instance_initializer.
14983 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
14984 (patch_return): Forbid return in instance initializers.
14985 (patch_throw_statement): Enforce exception handling in the context
14986 of instance initializers.
14987
14988 2000-02-03 Tom Tromey <tromey@cygnus.com>
14989
14990 * Make-lang.in (java.mostlyclean): Remove executables in
14991 `mostlyclean'.
14992
14993 2000-01-31 Scott Bambrough <scottb@netwinder.org>
14994
14995 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
14996 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
14997 (java_float_finite): Convert to use union Word from javaop.h.
14998 (java_double_finite): Convert to use union DWord from javaop.h.
14999
15000 2000-02-02 Tom Tromey <tromey@cygnus.com>
15001
15002 * gjavah.c (options): Added `jni' entry.
15003 (help): Document -jni.
15004 (flag_jni): New global.
15005 (process_file): Handle JNI output. Don't print text from
15006 -prepend, -add, etc, when generating stubs. Only remove `.class'
15007 suffix if it actually exists.
15008 (main): Create a `.c' file when run with `--jni --stubs'. Create
15009 correct output file name with `--jni'.
15010 (print_include): Mangle header name differently in JNI case.
15011 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
15012 method list.
15013 (print_method_info): Handle JNI case. Put signature info into
15014 method name. Handle case when STREAM is NULL.
15015 (print_name_for_stub_or_jni): New function.
15016 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
15017 (print_cxx_classname): Handle JNI.
15018 (print_full_cxx_name): Likewise.
15019 (decode_signature_piece): Likewise.
15020 (overloaded_jni_method_exists_p): New function.
15021 (struct method_name): Added `signature' and `sig_length' fields.
15022 (HANDLE_END_FIELD): Do nothing in JNI mode.
15023
15024 2000-02-02 Tom Tromey <tromey@cygnus.com>
15025
15026 * jv-scan.c: Include version.c, <getopt.h>.
15027 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
15028 (options): New array.
15029 (usage): New function.
15030 (version): New function.
15031 (main): Use getopt_long to parse command line.
15032 * jcf-dump.c: Include version.c, <getopt.h>.
15033 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
15034 OPT_JAVAP): New macros.
15035 (options): New array.
15036 (usage): Return `void'. Changed message.
15037 (help): New function.
15038 (version): New function.
15039 (main): Use getopt_long_only to parse command line.
15040 * gjavah.c: Include <getopt.h>.
15041 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
15042 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
15043 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
15044 (options): New array.
15045 (java_no_argument): Removed.
15046 (help): Updated with missing options.
15047 (main): Use getopt_long_only to parse command line.
15048 (usage): Changed message.
15049
15050 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15051
15052 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
15053 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
15054 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
15055 * parse.y (array_creation_expression:): Handle anonymous arrays.
15056 (build_array_from_name): Don't set `ret_name' if null.
15057 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
15058 (qualify_ambiguous_name): Likewise.
15059 (java_complete_expand_class): Likewise.
15060
15061 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15062
15063 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
15064 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
15065 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
15066 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
15067 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
15068 AIPL_FUNCTION_COMPLETED_INVOCATION.
15069 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
15070 AIPL_FUNCTION_INVOCATION_READY.
15071 (AIPL_FUNCTION_DECLARATION): New enum entry.
15072 * parse.y (reorder_static_initialized): New function.
15073 (java_parser_context_pop_initialized_field): Use it.
15074 (add_inner_class_fields): Use
15075 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
15076 augmented. Install marker after last alias initializer, if any.
15077 (generate_finit): Fixed typo. Don't try to retain only the used
15078 fields.
15079 (method_header): Compute and set DECL_FUNCTION_NAP.
15080 (method_declarator): Fixed comment. Insert alias initializer in
15081 parameter list.
15082 (build_alias_initializer_parameter_list): Fixed leading
15083 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
15084 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
15085 (java_complete_expand_class): Code to retain only used aliases
15086 removed.
15087 (java_complete_expand_methods): New local `first_decl'. Generate
15088 $finit$ first, then expand the constructors, regular methods and
15089 <clinit>.
15090 (java_complete_expand_method): Don't report error on missing
15091 return statement if previously detected bogus.
15092 (fix_constructors): Don't patch constructor parameters list.
15093 (patch_method_invocation): Use new AIPL enum values. Reverse
15094 alias initializer list for anonymous classes.
15095
15096 2000-01-30 Anthony Green <green@redhat.com>
15097
15098 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
15099 determine how many stack slots to pop.
15100
15101 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15102
15103 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
15104 error handling/recovery.
15105 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
15106
15107 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
15108
15109 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
15110 FIELD_LOCAL_ALIAS_USED): New macros.
15111 (DECL_FUNCTION_NAP): New macro.
15112 (struct lang_decl): New field `nap'.
15113 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
15114 (struct lang_type): New fields `finit_stmt_list' and
15115 `clinit_stmt_list'.
15116 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
15117 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
15118 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
15119 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
15120 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
15121 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
15122 (BUILD_THROW): Macro line separator re-indented.
15123 * parse.y (end_class_declaration): New function.
15124 (maybe_generate_pre_expand_clinit): New name for
15125 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
15126 pre-expand static fields.
15127 (maybe_generate_clinit): Function deleted.
15128 (check_for_static_method_reference): Prototype's parameter list
15129 indented.
15130 (generate_finit): New name for maybe_generate_finit. Changed
15131 leading comment. Function rewritten to use
15132 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
15133 (build_alias_initializer_parameter_list): New function.
15134 (java_parser_context_pop_initialized_field): Likewise.
15135 (add_inner_class_fields): Likewise.
15136 (type_declaration:): Call end_class_declaration.
15137 (class_member_declaration:): Likewise.
15138 (formal_parameter_list:): Fixed typos.
15139 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
15140 element. Improved error handling.
15141 (block_statement:): Call end_class_declaration.
15142 (anonymous_class_creation:): Likewise.
15143 (create_anonymous_class): Fixed comments.
15144 (create_class): Call add_inner_class_fields.
15145 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
15146 (method_header): Use MARK_FINAL_PARMS.
15147 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
15148 (method_declarator): Propagate final argument flag.
15149 (craft_constructor): New local `artificial'. Call
15150 build_alias_initializer_parameter_list. Use
15151 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
15152 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
15153 necessary.
15154 (complete_expand_class): Get rid of unused outer context local
15155 alias fields.
15156 (java_complete_expand_methods): Fixed leading
15157 comment. Generate/pre-expand <clinit> first. Changed method
15158 expansion order to regular, $finit$, constructors, <clinit>.
15159 (java_complete_expand_method): Set current_function_decl.
15160 (fix_constructors): Fix constructor parameter list to account for
15161 outer context local alias initializers.
15162 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15163 (resolve_expression_name): Lookup outer context local aliases. New
15164 local `access', use it.
15165 (patch_method_invocation): Patch inner class ctor invocation with
15166 outer context local aliases initialization values. $finit$
15167 invocation patching now includes things generated with
15168 build_alias_initializer_parameter_list.
15169 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15170 (build_super_invocation): Likewise.
15171 (patch_assignment): Changed comment.
15172
15173 2000-01-27 Andrew Haley <aph@cygnus.com>
15174
15175 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
15176 (emit_if): Ditto.
15177 (emit_jsr): Ditto.
15178
15179 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15180
15181 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
15182 concatenation.
15183 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
15184
15185 * parse.y (register_fields): Don't pass a format specifier to
15186 OBSOLETE_MODIFIER_WARNING.
15187 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
15188 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
15189 specifier.
15190 (check_modifiers): Change function into a macro.
15191 (check_class_interface_creation): Pass a literal format string.
15192
15193 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15194
15195 * buffer.h: PROTO -> PARAMS.
15196 * check-init.c: Likewise.
15197 * class.c: Likewise.
15198 * constants.c: Likewise.
15199 * convert.h: Likewise.
15200 * decl.c: Likewise.
15201 * except.c: Likewise.
15202 * expr.c: Likewise.
15203 * gjavah.c: Likewise.
15204 * java-except.h: Likewise.
15205 * java-tree.h: Likewise.
15206 * jcf-depend.c: Likewise.
15207 * jcf-dump.c: Likewise.
15208 * jcf-parse.c: Likewise.
15209 * jcf-path.c: Likewise.
15210 * jcf-reader.c: Likewise.
15211 * jcf-write.c: Likewise.
15212 * jcf.h: Likewise.
15213 * jv-scan.c: Likewise.
15214 * jvgenmain.c: Likewise.
15215 * jvspec.c: Likewise.
15216 * lang.c: Likewise.
15217 * lex.c: Likewise.
15218 * lex.h: Likewise.
15219 * parse-scan.y: Likewise.
15220 * parse.h: Likewise.
15221 * parse.y: Likewise.
15222 * typeck.c: Likewise.
15223 * verify.c: Likewise.
15224 * xref.c: Likewise.
15225 * xref.h: Likewise.
15226 * zextract.c: Likewise.
15227 * zipfile.h: Likewise.
15228
15229 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15230
15231 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15232 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
15233 * constants.c (build_constant_data_ref): Check for cached
15234 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
15235 in TYPE_CPOOL_DATE_REF.
15236 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
15237 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
15238 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
15239 (LOCAL_FINAL): New macro.
15240 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
15241 constant pool -- don't try to reuse.
15242 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
15243 TYPE_LANG_SPECIFIC.
15244 (find_in_current_zip): Use TYPE_JCF.
15245 * parse.h (java_check_final): Prototype removed.
15246 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
15247 (maybe_create_class_interface_decl,
15248 check_class_interface_creation): Likewise.
15249 (java_expand_finals): Function removed.
15250 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
15251 (block_statement:): Fixed comment.
15252 (anonymous_class_creation:): Likewise.
15253 (check_class_interface_creation): Reversed Jan 12, 2000 extra
15254 argument patch.
15255 (check_class_interface_creation): Loosened error report on (inner)
15256 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
15257 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
15258 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
15259 argument patch.
15260 (create_interface): Likewise.
15261 (anonymous_class_counter): New static global.
15262 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
15263 patch. Fixed comments.
15264 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
15265 anonymous_class_counter when declaring a toplevel class.
15266 (craft_constructor): Fixed constructor name when handling
15267 anonymous classes. Anonymous class constructors to feature hidden
15268 this$<n> parameter.
15269 (java_fix_constructors): Added comment.
15270 (java_check_final): Function removed.
15271 (java_complete_expand_methods): Fixed comment. Don't generate
15272 class data, save its outgoing constant pool instead.
15273 (verify_constructor_super): Skip anonymous class constructor
15274 hidden this$<n> parameter.
15275 (java_expand_classes): New local `saved_ctxp'. Removed call to
15276 java_expand_finals and java_check_final. Expand anonymous class
15277 constructors. Generate class data.
15278 (build_super_invocation): Skip anonymous class hidden this$<n>
15279 parameter.
15280 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
15281 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15282 (set_java_signature): Likewise.
15283
15284 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
15285
15286 * gjavah.c: Delete ACC_VISIBILITY define.
15287 * jcf.h: Add ACC_VISIBILITY define.
15288 * parse.y: final: rule tagged <value>.
15289 (java_check_regular_methods): Use ACC_VISIBILITY define for
15290 default package access check.
15291 (local_variable_declaration_statement): Use final: rule.
15292
15293 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
15294
15295 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
15296 (final:): New rule.
15297
15298 2000-01-17 Tom Tromey <tromey@cygnus.com>
15299
15300 * gjavah.c (print_field_info): Allow non-static final fields.
15301
15302 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15303
15304 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
15305 * parse.y (patch_anonymous_class): New function.
15306 (create_anonymous_class): Register incomplete type when the
15307 class/interface to extends/implement isn't known yet.
15308 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
15309 (verify_constructor_super): Tuned error message.
15310
15311 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15312
15313 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
15314 (ANONYMOUS_CLASS_P): New macro.
15315 (TYPE_SIGNATURE, TYPE_JCF): New macros.
15316 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
15317 * parse.y (create_class): Added leading argument.
15318 (maybe_create_class_interface_decl,
15319 check_class_interface_creation): Likewise.
15320 (craft_constructor): New function.
15321 (verify_constructor_super): Added argument in prototype.
15322 (class_declaration:): Inserted leading argument.
15323 (for_begin:): Use FOR_LOOP_P.
15324 (anonymous_class_creation): Create WFL of the anonymous class to
15325 instantiate. Call build_new_invocation. Added comments.
15326 (check_class_interface_creation): Handle parameter `anonymous' in
15327 verbose mode class creation announce.
15328 (link_nested_class_to_enclosing): Exclude anonymous classes.
15329 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
15330 anonymous class, even though they appear to have an enclosing
15331 context.
15332 (create_interface): Pass extra argument to
15333 check_class_interface_creation.
15334 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
15335 (create_class): Call check_class_interface_creation and
15336 maybe_create_class_interface_decl with extra new argument. Don't
15337 add private this$<n> to anonymous classes.
15338 (method_declarator): Insert hidden this$<n> to anonymous class
15339 constructors.
15340 (java_fix_constructors): Deleted code creating default
15341 constructor. Call craft_constructor instead.
15342 (java_check_regular_methods): Set `saw_constructor' to 1 for
15343 anonymous classes.
15344 (fix_constructors): Pass extra argument to verify_constructor_super.
15345 (verify_constructor_super): New local `sdecl', use it. Search for
15346 matching constructor (possibly featuring arguments) in super
15347 class.
15348 (lookup_method_invoke): Craft constructor according to arguments
15349 list when dealing with anonymous class constructors.
15350 (build_super_invocation): Pass arguments to anonymous class super
15351 constructors.
15352 (search_loop): Use FOR_LOOP_P.
15353 (labeled_block_contains_loop_p): Likewise.
15354
15355 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15356
15357 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
15358 (enclosing_context_p): New function.
15359 (get_access_flags_from_decl): Handle CLASS_STATIC.
15360 (maybe_layout_super_class): Extra first argument passed to
15361 do_resolve_class.
15362 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
15363 ID_INIT_P.
15364 * decl.c (access0_identifier_node): New global.
15365 (init_decl_processing): access0_identifier_node initialized.
15366 (pushdecl): Set DECL_CONTEXT only on non type decls.
15367 * expr.c (lookup_field): Lookup inner class fields in enclosing
15368 contexts.
15369 (expand_invoke): Use ID_INIT_P.
15370 (expand_java_field_op): Use DECL_CLINIT_P.
15371 * java-tree.def (CLASS_LITERAL): New tree code.
15372 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
15373 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
15374 (struct lang_decl): New field `inner_access'.
15375 (enclosing_context_p): Prototyped.
15376 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
15377 ID_CLINIT_P): New macros.
15378 (CLASS_STATIC): New macro.
15379 (CLASS_ACCESS0_GENERATED_P): New macro.
15380 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
15381 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
15382 INNER_CLASS_P): New macros.
15383 (DECL_INNER_CLASS_LIST): New macro.
15384 * jcf-parse.c (yyparse): Avoid the use of ANSI string
15385 concatenation.
15386 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15387 the shift value to int. Fixed typo in comment.
15388 * lex.c (inst_id, wpv_id): Initialize.
15389 * mangle.c (unicode_mangling_length): Take `$' into account.
15390 * parse.h (DRECOVER, RECOVER): Terminate properly.
15391 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
15392 (typedef struct _jdep): New field `enclosing'.
15393 (JDEP_ENCLOSING): New macro.
15394 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
15395 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
15396 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
15397 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
15398 GET_ENCLOSING_CPC_CONTEXT): New macros.
15399 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
15400 (do_resolve_class): Added extra argument in prototype.
15401 * parse.y (resolve_class): Added extra argument in prototype.
15402 (maybe_create_class_interface_decl): Likewise.
15403 (maybe_use_access_method, build_wfl_wrap): New functions.
15404 (java_complete_expand_classes, java_complete_expand_class):
15405 Likewise.
15406 (java_parser_context_push_initialized_field,
15407 java_parser_context_suspend, java_parser_context_resume):
15408 Likewise.
15409 (maybe_make_nested_class_name, make_nested_class_name,
15410 set_nested_class_simple_name_value,
15411 link_nested_class_to_enclosing, find_as_inner_class,
15412 find_as_inner_class_do, check_inner_class_redefinition,
15413 build_thisn_assign, build_current_thisn, build_access_to_thisn,
15414 maybe_build_thisn_access_method, build_outer_field_access,
15415 build_outer_field_access_methods, build_outer_field_access_expr,
15416 build_outer_method_access_method, build_new_access_id,
15417 build_outer_field_access_method, outer_field_access_p,
15418 outer_field_expanded_access_p, outer_field_access_fix,
15419 build_incomplete_class_ref, patch_incomplete_class_ref,
15420 create_anonymous_class): Likewise.
15421 (inst_id, wpv_id): New static global variables.
15422 (synchronized:): New rule, tagged <node>.
15423 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
15424 rules.
15425 (anonymous_class_creation:): New rule, tagged <node>.
15426 (NEW_TK): Tagged <node>.
15427 (type_literals, array_type_literal): New rules, tagged <node>.
15428 (class_declaration:): Removed action when reducing by class_body:
15429 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
15430 using GET_CPC in sub-rules.
15431 (class_member_declaration): Handle inner classes.
15432 (method_declaration): When reducing method_header:, reset
15433 current_function_decl when appropriate.
15434 (method_declarator:): Set the number of formal parameter to 0 for
15435 method declared without arguments.
15436 (constructor_declarator:): Likewise.
15437 (static_initializer:): List of elements kept in a list.
15438 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
15439 use of the keyword `static' for type declarations.
15440 (block_statement:): Handle inner class declarations.
15441 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
15442 type qualified `this'.
15443 (class_instance_creation_expression): Use anonymous_class_creation:
15444 to handle inner class instances creation. Handle qualified `new'.
15445 (something_dot_new): Added appropriate actions.
15446 (create_new_parser_context): New function.
15447 (java_push_parser_context, java_parser_context_save_global,
15448 java_parser_context_suspend): Use create_new_parser_context.
15449 (check_modifiers): Changed leading comment.
15450 (check_class_interface_creation): Handle interclasses.
15451 (add_superinterfaces): Fixed comment.
15452 (create_interface): Build qualified name from the raw_name instead
15453 of its matching WFL. Push the initialized fields list. raw_name added
15454 as an extra argument to maybe_create_class_interface_decl.
15455 (create_class): Build qualified name from the raw_name instead of
15456 its matching WFL. Removed assignment to current_parsed_class_un.
15457 Call PUSH_ERROR before returning an error. Suspend the current
15458 parser context when processing an inner class. Push the
15459 initialized fields list. raw_name added as an extra argument to
15460 maybe_create_class_interface_decl. Add the private this$<n>
15461 field.
15462 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
15463 (register_fields): Get the class type from GET_CPC and handle
15464 previous errors. Added code to handle the creation of static
15465 fields in inner classes. Initialized fields initialization
15466 statements kept in a list of lists.
15467 (maybe_generate_finit): Initialized fields initialization
15468 statements kept in a list of lists. Use GET_CPC.
15469 (maybe_generate_clinit): Likewise.
15470 (method_header): Use GET_CPC and GET_CPC_UN.
15471 (parser_qualified_classname): Handle inner classes.
15472 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
15473 (java_fix_constructors): Hide pointer to enclosing context
15474 instance in constructor list when dealing with inner classes.
15475 (jdep_resolve_class): Call resolve_class with extra first argument
15476 JDEP_ENCLOSING.
15477 (resolve_class): Add enclosing context as a first extra argument
15478 to do_resolve_class.
15479 (do_resolve_class): Call find_as_inner_class. Handle WFLs
15480 properly.
15481 (resolve_no_layout): Extra argument added to resolve_class
15482 invocation.
15483 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
15484 (java_get_real_method_name): Use GET_CPC_UN.
15485 (check_abstract_method_definitions): Use DECL_CLINIT_P.
15486 (java_check_abstract_methods): Handle static method declared in
15487 inner classes by an error.
15488 (java_check_regular_methods): Use DECL_CLINIT_P.
15489 (source_start_java_method): Also set DECL_MAX_LOCALS.
15490 (create_artificial_method): Call java_parser_context_save_global
15491 and java_parser_context_restore_global instead of saving/restoring
15492 the context by hand.
15493 (expand_start_java_method): Improved verbose mode message.
15494 (java_complete_expand_methods): Fixed leading comment. Use
15495 DECL_CLINIT_P.
15496 (fix_constructors): Added assignment to this$<n> if necessary.
15497 (java_expand_classes): Call java_complete_expand_classes instead
15498 of java_complete_expand_methods.
15499 (make_qualified_primary): Simplified.
15500 (merge_qualified_name): Optimized for missing left or right parts.
15501 (resolve_expression_name): Handle access to outer class fields from
15502 interclasses.
15503 (resolve_qualified_expression_name): New macro
15504 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15505 classes. Report error on non appropriate qualification of
15506 `new'. Handle qualified `this'.
15507 (not_accessible_p): Allow access to outer class private fields from
15508 inner classes.
15509 (patch_method_invocation): Handle method invocations through
15510 access methods and inner class constructor invocations.
15511 (find_applicable_accessible_methods_list): Search enclosing
15512 contexts of an inner class.
15513 (search_applicable_methods_list): Fixed typo.
15514 (argument_types_convertible): Handle inner class constructors'
15515 hidden outer context reference argument.
15516 (qualify_ambiguous_name): Handle qualified `this'.
15517 (java_complete_lhs): Handle use of field accessed through
15518 artificial access methods in various cases of assignments. Handle
15519 CLASS_LITERAL node.
15520 (check_final_assignment): Use DECL_CLINIT_P.
15521 (valid_ref_assignconv_cast_p): Handle the destination being an
15522 enclosing context of the source.
15523 (patch_unaryop): Handle use of field accessed through artificial
15524 access methods.
15525 (patch_return): Use DECL_CLINIT_P.
15526 (patch_throw_statement): Use DECL_CLINIT_P.
15527 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15528 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15529 ID_INIT_P.
15530
15531 2000-01-16 Anthony Green <green@cygnus.com>
15532
15533 * parse.y (build_string_concatenation): Only use
15534 StringBuffer(String) shortcut if String arg is constant.
15535
15536 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15537
15538 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15539 the shift value to int. Fixed typo in comment.
15540
15541 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
15542
15543 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15544 * jcf-write.c: Likewise.
15545 * parse.y: Likewise.
15546 * parse.c: Regenerate.
15547
15548 2000-01-09 Anthony Green <green@cygnus.com>
15549
15550 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15551 bytecodes in the correct order.
15552
15553 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15554
15555 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15556
15557 2000-01-06 Anthony Green <green@cygnus.com>
15558
15559 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15560 before building constant array decl.
15561
15562 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
15563
15564 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15565 method invocation and typo in conditional expression.
15566 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15567 the appropriate NOTE_POP.
15568 * parse.y (patch_binop): Shift value mask to feature the right
15569 type.
15570
15571 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15572
15573 * class.c (assume_compiled, assume_compiled_node): Add static
15574 prototype.
15575 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15576
15577 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15578
15579 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15580
15581 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15582 to `__modifier' to avoid stringifying it.
15583
15584 * parse.y (verify_constructor_circularity): Don't call a variadic
15585 function with a non-literal format string.
15586 (java_check_abstract_methods): Move unreachable code inside
15587 `continue' statement.
15588 (lookup_method_invoke): Call xstrdup, not strdup.
15589
15590 * expr.c (expand_java_field_op): Avoid the use of ANSI string
15591 concatenation.
15592
15593 * jcf-parse.c (yyparse): Likewise.
15594
15595 * jv-scan.c (main): Likewise.
15596
15597 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15598
15599 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15600 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15601 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15602 concatenation.
15603
15604 * parse.y (synchronized, variable_redefinition_error,
15605 check_class_interface_creation, create_interface, create_class,
15606 method_header, finish_method_declaration,
15607 check_modifiers_consistency, method_declarator,
15608 complete_class_report_errors, check_abstract_method_definitions,
15609 java_check_regular_methods, check_throws_clauses,
15610 java_check_abstract_methods, read_import_dir,
15611 check_pkg_class_access, declare_local_variables, fix_constructors,
15612 cut_identifier_in_qualified, resolve_expression_name,
15613 resolve_qualified_expression_name, patch_method_invocation,
15614 java_complete_lhs, patch_assignment, try_builtin_assignconv,
15615 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15616 patch_exit_expr, patch_exit_expr, patch_switch_statement,
15617 patch_try_statement, patch_synchronized_statement,
15618 patch_throw_statement, check_thrown_exceptions,
15619 patch_conditional_expr): Likewise.
15620
15621 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15622
15623 * Makefile.in (LIBDEPS): Added gcc's errors.o
15624 (../jcf-dump$(exeext):): Link with gcc's errors.o
15625 (../gcjh$(exeext):): Likewise.
15626 * expr.c (expand_java_NEW): Layout the entire target type instead of
15627 laying out its methods only.
15628 (lookup_field): Layout the class after having loaded it.
15629 * java-tree.h (java_debug_context): Declared.
15630 * jcf-io.c (toplev.h): Included.
15631 (find_class): Removed assignment to jcf's outofsynch
15632 field. Force source file to be read if newer than its matching
15633 class file. Tweaked debug messages.
15634 * jcf-parse.c (jcf_out_of_synch): Deleted.
15635 (read_class): Call to jcf_out_of_synch removed.
15636 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15637 (jcf_out_of_synch): Prototype deleted.
15638 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15639 `deprecated' and `class_err': integer turned into bit-fields.
15640 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15641 * parse.y (package_list): New global.
15642 (package_declaration:): Record newly parsed package name.
15643 (extra_ctxp_pushed_p): Static global deleted.
15644 (java_parser_context_save_global): Create buffer context for the
15645 purpose of saving globals, if necessary.
15646 (java_parser_context_restore_global): Pop context pushed for the
15647 purpose of saving globals, if necessary.
15648 (java_debug_context_do): New prototype and function.
15649 (java_debug_context): Likewise.
15650 (do_resolve_class): Use already parsed package names to qualify
15651 and lookup class candidate.
15652 (java_pre_expand_clinit): Removed unnecessary local variable.
15653
15654 1999-12-17 Tom Tromey <tromey@cygnus.com>
15655
15656 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
15657 fixes PR gcj/119.
15658 (process_file): Use `\n\' at end of each line in string.
15659
15660 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15661
15662 * expr.c (expand_invoke): Layout the loaded class before
15663 attempting to use it.
15664 (expand_java_field_op): Allow final field assignments to take
15665 place in $finit$.
15666 * typeck.c (convert): Return error_mark_node if expr is null.
15667
15668 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15669
15670 * class.c (class_depth): Return -1 if the class doesn't load
15671 properly.
15672 * expr.c (can_widen_reference_to): Check for errors during depth
15673 computation and return 0 accordingly.
15674 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15675 create default constructors and add an other error check.
15676 * parse.h (java_fix_constructors): Prototyped.
15677 * parse.y (java_pre_expand_clinit): Likewise.
15678 (build_super_invocation): Re-prototyped to feature one argument.
15679 (java_check_circular_reference): Directly use `current'.
15680 (java_fix_constructors): New function.
15681 (java_check_regular_methods): Don't create default constructors
15682 here, but abort if none were found.
15683 (java_complete_expand_methods): Pre-process <clinit> calling
15684 java_pre_expand_clinit.
15685 (java_pre_expand_clinit): New function.
15686 (fix_constructors): build_super_invocation invoked with the
15687 current method declaration as an argument.
15688 (build_super_invocation): Use the context of the processed method
15689 decl argument instead of current_class.
15690 * typeck.c (lookup_java_method): Take WFLs in method names into
15691 account.
15692
15693 1999-12-14 Per Bothner <per@bothner.com>
15694
15695 * class.c (make_class_data): flag_keep_inline_functions to keep
15696 private methods in the method array.
15697
15698 1999-12-15 Anthony Green <green@cygnus.com>
15699
15700 * check-init.c (check_init): Take into account both types of
15701 `throw's when checking for uninitialized variables.
15702
15703 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15704
15705 * parse.y (java_complete_lhs): Force conversion of array
15706 dimensions to int_type_node, that's what runtime's ABI expects.
15707
15708 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15709
15710 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15711 operand of a WFL, until the Java front-end gets fixed with regard
15712 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15713
15714 1999-12-10 Andrew Haley <aph@cygnus.com>
15715
15716 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15717 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15718 expr.c (build_java_athrow): Add support for sjlj-exceptions.
15719 java-tree.h: Ditto.
15720 jcf-write.c: Ditto.
15721
15722 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
15723
15724 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15725 before calling expand_eh_region_start and expand_start_all_catch.
15726 * except.c (expand_start_java_handler): Switch to permanent
15727 obstack before calling expand_eh_region_start.
15728 (expand_end_java_handler): Switch to permanent obstack before
15729 calling expand_start_all_catch.
15730
15731 1999-12-5 Anthony Green <green@cygnus.com>
15732
15733 * decl.c (init_decl_processing): Mark throw_node as a noreturn
15734 function with side effects.
15735 (init_decl_processing): Mark all memory allocating DECLs with
15736 DECL_IS_MALLOC.
15737
15738 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15739
15740 * except.c (expand_end_java_handler): Call
15741 expand_resume_after_catch and end_catch_handler.
15742
15743 1999-11-30 Anthony Green <green@cygnus.com>
15744
15745 * verify.c (verify_jvm_instructions): Create new return label
15746 chain if non existent (don't rely on the verified state of the jsr
15747 target.)
15748
15749 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15750
15751 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15752 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15753
15754 * parse.y (patch_assignment): Removed bogus final class test on
15755 lhs when checking on whether to emit an ArrayStoreException runtime
15756 check.
15757 * expr.c (expand_java_arraystore): Likewise.
15758
15759 1999-11-28 Anthony Green <green@cygnus.com>
15760
15761 * decl.c (find_local_variable): Reuse single slot decls when
15762 appropriate.
15763
15764 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15765
15766 * jcf-parse.c (saw_java_source): Global variable removed.
15767 (read_class): Don't use `saw_java_source'. Added extra braces.
15768 (yyparse): Code setting `saw_java_source' removed.
15769
15770 1999-11-24 Mark Mitchell <mark@codesourcery.com>
15771
15772 * except.c (emit_handlers): Zero catch_clauses after emitting them.
15773
15774 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15775
15776 * verify.c (merge_type_state): Non verified subroutines being
15777 considered more than once to trigger passive type merge.
15778
15779 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15780
15781 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15782 in case of error. Error message tuned.
15783
15784 1999-11-21 Anthony Green <green@cygnus.com>
15785
15786 * constants.c (find_methodref_index): Unwrap method names before
15787 inserting them in the constant pool.
15788
15789 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15790
15791 * class.c (assume_compiled_node): New typedef.
15792 (assume_compiled_tree): New static data.
15793 (find_assume_compiled_node): New function.
15794 (add_assume_compiled): New function.
15795 (assume_compiled): New function.
15796 * class.c (make_class_data): Use assume_compiled.
15797 (is_compiled_class): Use assume_compiled.
15798
15799 * java-tree.h (add_assume_compiled): Declare.
15800
15801 * lang.c (lang_decode_option): Parse new options.
15802
15803 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15804
15805 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15806 int_type_node: that's what `_Jv_AllocObject' expects.
15807
15808 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15809
15810 * parse.y (lookup_method_invoke): Use lang_printable_name to
15811 reliably build the type name during error report. Fixes PR gcj/97.
15812
15813 1999-11-09 Tom Tromey <tromey@cygnus.com>
15814
15815 * jcf-path.c: Include <sys/stat.h>.
15816 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
15817 (DIR_UP): New macro.
15818
15819 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15820
15821 * parse.y (source_end_java_method): Resume permanent allocation,
15822 reversing Apr 27 1998 patch.
15823 (patch_string_cst): Pop obstacks after having pushed the permanent
15824 ones.
15825
15826 1999-11-05 Tom Tromey <tromey@cygnus.com>
15827
15828 * class.c (finish_class): Emit inlined methods if any native
15829 methods exist in the class. Fixes PR gcj/85.
15830
15831 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
15832
15833 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15834 (qualify_ambiguous_name): Likewise.
15835
15836 1999-11-03 Godmar Back <gback@cs.utah.edu>
15837
15838 * typeck.c: (lookup_java_method): search all inherited
15839 interfaces when looking up interface method.
15840
15841 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15842
15843 * parse.y (method_header:): Issue error message for rule `type
15844 error'.
15845 (synchronized:): Error report when not using synchronized.
15846
15847 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15848
15849 * parse.y (resolve_qualified_expression_name): Prevent `this' from
15850 being used before the superclass constructor has been called.
15851 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
15852 instead of `CALL_THIS_CONSTRUCTOR_P'.
15853
15854 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
15855
15856 * check-init.c: Fix typo in comment.
15857
15858 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15859
15860 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
15861 and final method.
15862
15863 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15864
15865 * parse.y (expression_statement:): Call function to report
15866 improper invocation of a constructor.
15867 (parse_ctor_invocation_error): New function.
15868
15869 1999-10-26 Mark Mitchell <mark@codesourcery.com>
15870
15871 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15872 remember_end_note.
15873
15874 1999-10-21 Tom Tromey <tromey@cygnus.com>
15875
15876 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15877 in generated `main'.
15878
15879 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
15880
15881 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15882 (qualify_ambiguous_name): Likewise.
15883
15884 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15885
15886 * parse.y (java_complete_tree): fold_constant_for_init to work on
15887 permanent_obstack.
15888 (java_complete_lhs): Likewise.
15889 (array_constructor_check_entry): Complete an initializer element
15890 on permanent_obstack.
15891
15892 1999-10-19 Tom Tromey <tromey@cygnus.com>
15893
15894 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15895 From Mike Moreton <mike@pillim.demon.co.uk>.
15896
15897 1999-10-15 Greg McGary <gkm@gnu.org>
15898
15899 * java-tree.h (flag_bounds_check): Remove extern decl.
15900 * lang.c (flag_bounds_check): Remove global variable.
15901 (lang_f_options): Remove "bounds-check" entry.
15902 (lang_init_options): Default flag_bounds_check to "on".
15903
15904 1999-10-14 Tom Tromey <tromey@cygnus.com>
15905
15906 * jvgenmain.c (usage): New function.
15907 (main): Use it. Also, handle `-D' options.
15908 * jvspec.c (lang_specific_driver): Recognize -D.
15909 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
15910
15911 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
15912
15913 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15914
15915 * jcf-dump.c (print_constant, disassemble_method): Don't call a
15916 variadic function with a non-literal format string.
15917
15918 * parse-scan.y (report_main_declaration): Likewise.
15919
15920 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
15921
15922 * parse.y (read_import_dir, patch_assignment, patch_binop,
15923 patch_array_ref): Likewise.
15924
15925 * typeck.c (build_java_array_type): Likewise.
15926
15927 * verify.c (verify_jvm_instructions): Likewise.
15928
15929 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15930
15931 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
15932
15933 1999-10-07 Anthony Green <green@cygnus.com>
15934
15935 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
15936 where CHECK_PUT may fail for valid reasons.
15937
15938 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
15939 UNSAFE_PUTN): New macros.
15940
15941 1999-10-04 Tom Tromey <tromey@cygnus.com>
15942
15943 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
15944 well. Fixes Java PR gcj/59.
15945 * parse-scan.y (yyerror): Report errors.
15946
15947 1999-09-24 Glenn Chambers <GChambers@provsol.com>
15948
15949 * decl.c (insert_block): Remove unconditional `abort'.
15950
15951 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
15952
15953 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
15954 FUNCTION_CODE now of type int. All callers changed.
15955 Set the builtin's DECL_BUILT_IN_CLASS.
15956
15957 1999-09-23 Tom Tromey <tromey@cygnus.com>
15958
15959 * jvspec.c (lang_specific_driver): Don't read spec file if
15960 -fsyntax-only given.
15961
15962 1999-09-22 Tom Tromey <tromey@cygnus.com>
15963
15964 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
15965
15966 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
15967 (WORDS_TO_LONG): Likewise.
15968 (WORDS_TO_DOUBLE): Likewise.
15969
15970 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15971
15972 * jcf-write.c (RELOCATION_VALUE_0): New macro.
15973 (RELOCATION_VALUE_1): Likewise.
15974 (emit_iinc, emit_reloc, push_constant1, push_constant2,
15975 push_in_const, push_long_const): Prototyped.
15976 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
15977 (push_constant2): Likewise.
15978 (push_int_const): Cast find_constant1's integer arguments to `jword'.
15979 (find_constant_wide): Cast find_constant2's integer arguments to
15980 `jword'.
15981 (find_constant_index): Cast find_constant2's and find_constant2's
15982 integer arguments to `jword'.
15983 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
15984 (emit_switch_reloc): Use RELOCATION_VALUE_0.
15985 (emit_if): Use RELOCATION_VALUE_1.
15986 (emit_goto): Likewise.
15987 (emit_jsr): Likewise.
15988 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
15989 argument to push_long_const to HOST_WIDE_INT.
15990
15991 1999-09-15 Andreas Schwab <schwab@suse.de>
15992
15993 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
15994
15995 1999-09-20 Nick Clifton <nickc@cygnus.com>
15996
15997 * lang.c (lang_decode_option): Extend comment.
15998
15999 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16000
16001 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
16002 instead of fndecl.
16003
16004 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16005
16006 * gjavah.c (get_field_name, print_method_info, print_include,
16007 add_namelet): Use xmalloc, not malloc.
16008
16009 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
16010 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
16011 NULL pointer.
16012
16013 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
16014
16015 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
16016
16017 * jcf-path.c (add_entry): Likewise.
16018
16019 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
16020
16021 * jv-scan.c (xmalloc): Remove definition.
16022
16023 * jvgenmain.c (xmalloc): Likewise.
16024
16025 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
16026
16027 * lex.c (java_store_unicode): Use xrealloc, not realloc.
16028
16029 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
16030 concat, not xmalloc/sprintf.
16031 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
16032 (xstrdup): Remove definition.
16033
16034 * parse.y (duplicate_declaration_error_p,
16035 constructor_circularity_msg, verify_constructor_circularity,
16036 check_abstract_method_definitions, java_check_regular_methods,
16037 java_check_abstract_methods, patch_method_invocation,
16038 check_for_static_method_reference, patch_assignment, patch_binop,
16039 patch_cast, array_constructor_check_entry, patch_return,
16040 patch_conditional_expr): Use xstrdup, not strdup.
16041
16042 * zextract.c (ALLOC): Use xmalloc, not malloc.
16043
16044 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16045
16046 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
16047
16048 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
16049 (do_spec, lang_specific_pre_link, lang_specific_driver,
16050 input_filename, input_filename_length): Don't declare.
16051 (main_class_name, jvgenmain_spec, lang_specific_driver):
16052 Constify a char*.
16053 (lang_specific_driver): All calls to the function pointer
16054 parameter now explicitly call `fatal'.
16055
16056 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16057
16058 * parse.y (find_applicable_accessible_methods_list): Search
16059 abstract classes as interfaces.
16060
16061 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
16062
16063 * class.c (finish_class): We're now outside a valid method
16064 declaration. Tell the rest of gcc so.
16065
16066 1999-09-08 Bruce Korb autogen@linuxbox.com
16067
16068 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
16069
16070 1999-09-07 Tom Tromey <tromey@cygnus.com>
16071
16072 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
16073 java-array.h.
16074 (decode_signature_piece): Don't emit "::" in JArray<>.
16075 (print_namelet): Only print trailing `;' when printing a class.
16076
16077 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
16078
16079 * java-tree.h: Delete declarations for all tree nodes now moved to
16080 global_trees.
16081 * decl.c: Delete their definitions.
16082
16083 1999-09-04 Mark Mitchell <mark@codesourcery.com>
16084
16085 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
16086 * Makefile.in (OBJS): Add ggc-callbacks.o.
16087 (OBJDEPS): Likewise.
16088
16089 1999-09-03 Tom Tromey <tromey@cygnus.com>
16090
16091 * parse.y (strip_out_static_field_access_decl): Return operand if
16092 it satisfies JDECL_P.
16093
16094 1999-09-02 Tom Tromey <tromey@cygnus.com>
16095
16096 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
16097 Handle nested arrays, like `[[I'.
16098
16099 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16100
16101 * class.c (finish_class): Remove unused parameter, all callers
16102 changed.
16103
16104 * expr.c (build_java_athrow): Change return type to void.
16105 (java_lang_expand_expr): Make sure each case in switch returns a
16106 value.
16107
16108 * java-tree.h (finish_class): Fix prototype to take void args.
16109
16110 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
16111 (main): Issue return from main, not exit.
16112
16113 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
16114
16115 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
16116
16117 * jv-scan.c (main): Issue return from main, not exit.
16118
16119 * parse.y (check_abstract_method_definitions,
16120 java_check_abstract_method_definitions): Add static prototypes.
16121 (java_complete_expand_methods): Fix call to `finish_class'.
16122
16123 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
16124 and `prevpc'.
16125
16126 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16127
16128 * lang.c (language_string): Constify.
16129
16130 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16131
16132 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
16133 Remove hacks for stuff which comes from libiberty.
16134
16135 * Make-lang.in: Likewise.
16136
16137 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
16138
16139 * Makefile.in (xref.o): Depend on xref.c explicitly.
16140
16141 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16142
16143 * java-tree.h (lang_printable_name): Constify a char*.
16144
16145 * lang.c (lang_printable_name): Likewise.
16146
16147 1999-08-27 Jeffrey A Law (law@cygnus.com)
16148
16149 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
16150 comments in C code.
16151
16152 1999-08-26 Tom Tromey <tromey@cygnus.com>
16153
16154 * gjavah.c (print_cxx_classname): Print "::" before qualified
16155 name.
16156
16157 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16158
16159 * parse.y (lookup_cl): Changed leading comment. Now does its best
16160 to set the column number.
16161 (qualify_ambiguous_name): Take WFL wrappers into account.
16162
16163 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
16164
16165 * verify.c (verify_jvm_instructions): Don't check instruction
16166 validity beyond end of method.
16167
16168 1999-08-25 Tom Tromey <tromey@cygnus.com>
16169
16170 * jvspec.c (lang_specific_driver): Correctly handle --help again.
16171
16172 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16173
16174 * gjavah.c (print_name, print_base_classname, utf8_cmp,
16175 cxx_keyword_subst, generate_access, name_is_method_p,
16176 get_field_name, print_field_name, super_class_name, print_include,
16177 decode_signature_piece, print_class_decls, usage, help,
16178 java_no_argument, version, add_namelet, print_namelet): Add static
16179 prototype.
16180 (print_base_classname, utf8_cmp, cxx_keyword_subst,
16181 name_is_method_p): Constify a char*.
16182 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
16183 Provide a final else clause in an if-else-if.
16184 (print_field_info): Add missing final arg in function call to
16185 `print_field_name'.
16186 (print_method_info, decompile_method, decode_signature_piece,
16187 print_c_decl, print_full_cxx_name, print_stub,
16188 print_mangled_classname, super_class_name, print_include,
16189 add_namelet, add_class_decl, print_class_decls, process_file,
16190 help): Constify a char*.
16191
16192 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
16193 push_int_const, find_constant_wide, find_constant_index,
16194 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
16195 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
16196 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
16197 emit_if, emit_goto, emit_jsr, call_cleanups,
16198 make_class_file_name): Add static prototypes.
16199 (generate_bytecode_return, generate_bytecode_insns): Pass a
16200 NULL_PTR, not a NULL_TREE.
16201
16202 * jv-scan.c: Include "jcf.h".
16203 (main): Declare using DEFUN macro.
16204
16205 * jvspec.c (find_spec_file, lang_specific_pre_link,
16206 lang_specific_driver): Add prototypes.
16207 (find_spec_file): Constify a char*.
16208
16209 * keyword.gperf (hash, java_keyword): Add prototypes.
16210
16211 * lang.c (lang_print_error): Add static prototype.
16212 (lang_init): Prefer memcpy over bcopy to avoid casts.
16213
16214 * lex.c (yylex): Add static prototype.
16215
16216 * parse-scan.y: Include "lex.c" earlier.
16217
16218 * parse.h: Remove redundant declaration for `yylex'.
16219
16220 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
16221 labeled_block_contains_loop_p): Add static prototypes.
16222 (not_accessible_p): Make static to match prototype.
16223
16224 * verify.c (start_pc_cmp): Don't needlessly cast away const.
16225
16226 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16227
16228 * parse.y (check_method_redefinition): Changed leading comment.
16229 (check_abstract_method_definitions): New function.
16230 (java_check_abstract_method_definitions): New function.
16231 (java_check_regular_methods): Call it.
16232 (verify_constructor_super): Fixed indentation.
16233 (lookup_method_invoke): Likewise.
16234
16235 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16236
16237 * parse.y (method_header): Return a null pointer if the current
16238 class node is null.
16239 (finish_method_declaration): Return if the current function decl
16240 is null.
16241 (source_start_java_method): Likewise.
16242 (java_method_add_stmt): Likewise.
16243
16244 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16245
16246 * class.c (emit_register_class): Removed unnecessary call to
16247 start_sequence.
16248 * parse.y (labeled_block_contains_loop_p): Removed unused local
16249 variable.
16250
16251 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16252
16253 * parse.y (java_refold): Added prototype.
16254
16255 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16256
16257 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
16258 (java_stabilize_reference): Removed unnecessary `else'.
16259 (java_complete_lhs): Set flag to remember boolean. Call
16260 java_refold. Added comments.
16261 (java_decl_equiv): New function.
16262 (binop_compound_p): Likewise.
16263 (java_refold): Likewise.
16264 (patch_unaryop): Striped static field access assigned to decl and
16265 op. Changed promotion scheme for ++/-- operators.
16266 (search_loop): New function.
16267 (labeled_block_contains_loop_p): Likewise.
16268 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
16269 comment.
16270 (patch_bc_statement): Call search_loop. Fixed comment.
16271
16272 1999-08-14 Anthony Green <green@cygnus.com>
16273
16274 * expr.c (java_lang_expand_expr): Mark static array data as
16275 referenced.
16276
16277 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
16278
16279 * jvgenmain.c (main): NUL-terminate name_obstack.
16280
16281 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16282
16283 * check-init.c (check_bool2_init, done_alternative): Add static
16284 prototypes.
16285
16286 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
16287 (add_method, build_utf8_ref, build_class_ref,
16288 append_gpp_mangled_type, layout_class_method): Constify a char*.
16289
16290 * decl.c (push_promoted_type, make_binding_level): Add static
16291 prototypes.
16292 (push_promoted_type, pushdecl): Constify a char*.
16293
16294 * except.c (find_handler_in_range, link_handler,
16295 check_start_handlers): Add static prototypes.
16296
16297 * expr.c (process_jvm_instruction): Constify a char*.
16298
16299 * gjavah.c (main): Constify a char*.
16300
16301 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
16302 Constify a char*.
16303
16304 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
16305 static prototypes.
16306 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
16307 munge, print_ents): Constify a char*.
16308
16309 * jcf-dump.c (disassemble_method): Constify a char*.
16310 (print_constant_pool, print_exception_table): Add static prototypes.
16311 (print_constant, print_exception_table, main, disassemble_method):
16312 Constify a char*.
16313
16314 * jcf-io.c (find_classfile, find_class): Likewise.
16315
16316 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
16317 (set_source_filename, predefined_filename_p): Add static prototypes.
16318 (set_source_filename, get_constant, get_class_constant,
16319 find_in_current_zip): Constify a char*.
16320
16321 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
16322 static prototypes.
16323 (add_entry, add_path, jcf_path_classpath_arg,
16324 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16325
16326 * jcf-reader.c (get_attribute, jcf_parse_preamble,
16327 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
16328 jcf_parse_one_method, jcf_parse_methods,
16329 jcf_parse_final_attributes): Add static prototypes.
16330 (get_attribute): Constify a char*.
16331
16332 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
16333 jcf_dependency_add_target, jcf_path_classpath_arg,
16334 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16335
16336 * jv-scan.c (main): Constify a char*.
16337 (gcc_obstack_init): Add prototype arguments.
16338
16339 * jvgenmain.c (gcc_obstack_init): Likewise.
16340 (main): Constify a char*.
16341
16342 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
16343 static prototypes.
16344 (put_decl_string, lang_print_error): Constify a char*.
16345 (lang_init): Remove redundant extern prototype.
16346
16347 * mangle.c (emit_unicode_mangled_name): Constify a char*.
16348
16349 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
16350 Add static prototypes.
16351 (get_type_from_signature): Constify a char*.
16352
16353 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
16354 Add static prototypes.
16355 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
16356 (verify_jvm_instructions): Constify a char*.
16357
16358 * xref.c (xref_flag_value): Likewise.
16359
16360 * xref.h (xref_flag_value): Likewise.
16361
16362 * zextract.c (makeword, makelong): Add static prototypes.
16363 (makeword, makelong): Constify a uch*.
16364
16365 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16366
16367 * lang.c (java_dummy_print): Constify a char*.
16368 (lang_print_error): Likewise.
16369 (lang_init): Remove redundant prototype for `print_error_function'.
16370 (lang_init_source): Likewise.
16371 (lang_identify): Constify a char*.
16372
16373 1999-08-09 Tom Tromey <tromey@cygnus.com>
16374
16375 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
16376 (WORDS_TO_LONG): Likewise.
16377 (WORDS_TO_DOUBLE): Likewise.
16378
16379 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16380
16381 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
16382
16383 * expr.c (java_stack_pop, java_array_data_offset,
16384 build_java_throw_out_of_bounds_exception, case_identity,
16385 build_java_check_indexed_type): Add static prototypes.
16386 (linenumber_table, expand_invoke, expand_java_field_op,
16387 build_primtype_type_ref, expand_byte_code): Constify a char*.
16388
16389 * java-tree.h (build_primtype_type_ref, linenumber_table):
16390 Constify a char*.
16391 (java_lang_expand_expr): Add prototype.
16392
16393 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
16394 `java_lang_expand_expr'.
16395
16396 * lex.c (java_lex_error): Constify a char*.
16397 (java_get_unicode, java_read_char, java_allocate_new_line,
16398 java_unget_unicode, java_sneak_unicode): Prototype.
16399
16400 * parse-scan.y (current_class, package_name, method_declarator,
16401 report_class_declaration, yyerror): Constify a char*.
16402
16403 * parse.h (java_report_errors): Prototype.
16404 (yyerror): Constify a char*.
16405
16406 * parse.y (classitf_redefinition_error, check_modifiers,
16407 parse_jdk1_1_error, lookup_package_type,
16408 lookup_package_type_and_set_next, get_printable_method_name,
16409 purify_type_name): Constify a char*.
16410 (build_super_invocation, maybe_generate_finit,
16411 verify_constructor_super, parser_add_interface,
16412 add_superinterfaces, jdep_resolve_class, note_possible_classname,
16413 java_complete_expand_methods, java_expand_finals,
16414 cut_identifier_in_qualified, java_stabilize_reference,
16415 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
16416 merge_string_cste): Prototype.
16417 (single_type_import_declaration, yyerror,
16418 variable_redefinition_error, build_array_from_name,
16419 build_unresolved_array_type, check_class_interface_creation,
16420 resolve_class, complete_class_report_errors,
16421 note_possible_classname, read_import_dir,
16422 find_in_imports_on_demand, resolve_package, fix_constructors,
16423 check_deprecation, lookup_method_invoke,
16424 maybe_build_primttype_type_ref, array_constructor_check_entry):
16425 Constify a char*.
16426 (java_complete_expand_methods, java_expand_finals): Make static.
16427 (convert_narrow): Remove static prototype.
16428
16429 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
16430
16431 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
16432
16433 1999-08-02 Richard Henderson <rth@cygnus.com>
16434
16435 * decl.c: Include defaults.h instead of expr.h.
16436 * parse.y: Likewise.
16437
16438 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
16439
16440 * java/decl.c (start_java_method): Change all uses of
16441 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
16442 Ensure expr.h is included.
16443 * java/expr.c (pop_arguments): Ditto.
16444 * java/parse.y (expand_start_java_method): Ditto.
16445
16446 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16447
16448 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
16449
16450 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
16451
16452 * decl.c: Include "function.h".
16453 * except.c: Likewise.
16454 * parse.y: Likewise.
16455 * Makefile.in: Update dependencies.
16456
16457 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16458
16459 * expr.c (build_java_soft_divmod): Provide a default case in switch.
16460 (java_lang_expand_expr): Mark parameters `target', `tmode' and
16461 `modifier' with ATTRIBUTE_UNUSED.
16462
16463 * gjavah.c (process_file): Add braces around ambiguous `else'.
16464
16465 * jcf-dump.c (print_access_flags, localvar_free): Change return
16466 type to void.
16467
16468 * parse.y (java_complete_expand_method): Initialize variable
16469 `exception_copy'.
16470 (resolve_qualified_expression_name): Likewise for `field_decl'.
16471 (patch_method_invocation): Likewise for `class_to_search'.
16472 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
16473 (patch_assignment): Likewise for `lhs_type'.
16474
16475 * verify.c (verify_jvm_instructions): Remove unused variable
16476 `caller'.
16477
16478 1999-07-25 Richard Henderson <rth@cygnus.com>
16479
16480 * decl.c (va_list_type_node): New.
16481
16482 1999-07-25 Anthony Green <green@cygnus.com>
16483
16484 * gjavah.c (print_stub): New function.
16485 (METHOD_IS_NATIVE): New macro.
16486 (print_mangled_classname): Make static.
16487 (HANDLE_END_FIELD): Don't emit fields during stub generation.
16488 (process_file): Perform stub generation.
16489 (HANDLE_METHOD): Don't emit class decls during stub
16490 generation.
16491 (HANDLE_END_METHOD): Take into account stub generation.
16492 (print_method_info): Handle stub generation.
16493 (print_stub): New function.
16494 (print_cxx_classname): Make signature consistant with others.
16495 (help): Describe -stubs option.
16496 (main): Create stub file.
16497 (version): Use version.c.
16498 (print_full_cxx_name): New function.
16499 (print_c_decl): Use print_full_cxx_name.
16500
16501 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16502
16503 * check-init.c (check_init): Handle MAX_EXPR.
16504
16505 1999-07-15 Andrew Haley <aph@cygnus.com>
16506
16507 * lang.c (flag_use_divide_subroutine): New variable.
16508 * typeck.c: (convert_ieee_real_to_integer): Bounds check
16509 fp-to-integer conversion.
16510 (convert): Call convert_ieee_real_to_integer when flag_fast_math
16511 is not set.
16512
16513 * expr.c (build_java_soft_divmod): New function.
16514 (build_java_binop): Call build_java_soft_divmod if
16515 flag_use_divide_subroutine is set.
16516 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16517 soft_lrem_node: new builtin functions.
16518 (init_decl_processing) Initialize the new builtins.
16519 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16520 soft_lrem_node: new builtin functions.
16521 (build_java_soft_divmod): New function.
16522 * parse.y: Call build_java_soft_divmod if
16523 flag_use_divide_subroutine is set.
16524 * parse.c: Rebuilt.
16525
16526 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16527 a --specs= arg) even if not linking.
16528 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16529 -fuse-divide-subroutine
16530
16531 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16532
16533 * parse.y (resolve_and_layout): Check methods only once.
16534 (resolve_qualified_expression_name): Verify thrown exceptions
16535 compatibility.
16536 (check_thrown_exceptions): Reject exceptions thrown in
16537 initializer. Error message tuned.
16538
16539 1999-07-14 Andrew Haley <aph@cygnus.com>
16540
16541 * expr.c (expand_expr): Do not return the last statement in a
16542 block as the block's value.
16543
16544 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
16545
16546 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16547 CALL_EXPR, to avoid order of evaluation changes.
16548
16549 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
16550
16551 * parse.y (qualify_ambiguous_name): Do not use
16552 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16553
16554 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16555
16556 * check-init.c (check_init): Handle MAX_EXPR.
16557 * expr.c (force_evaluation_order): Force method call arguments to
16558 be evaluated in left-to-right order.
16559 * parse.y (qualify_ambiguous_name): Loop again to qualify
16560 NEW_ARRAY_EXPR properly.
16561
16562 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16563
16564 * parse.y (patch_invoke): Resolve unresolved invoked method
16565 returned type.
16566 (qualify_ambiguous_name): STRING_CST to qualify expression for
16567 type name resolution.
16568
16569 1999-06-24 Andrew Haley <aph@cygnus.com>
16570
16571 * class.c (finish_class): Whenever a deferred method is
16572 output, rescan the list of methods to see if a new candidate for
16573 output can be found.
16574
16575 1999-06-28 Tom Tromey <tromey@cygnus.com>
16576
16577 * jvspec.c (lang_specific_driver): Recognize --help.
16578
16579 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16580
16581 * parse.y (resolve_package): Fixed bogus return statement.
16582 (patch_method_invocation): Resolve method invocation beginning with
16583 a package name qualifier.
16584
16585 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16586
16587 * Make-lang.in (java.stage1): Depend on stage1-start.
16588 (java.stage2): Likewise for stage2-start.
16589 (java.stage3): Likewise for stage3-start.
16590 (java.stage4): Likewise for stage4-start.
16591
16592 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16593
16594 * parse.y (java_complete_lhs): When doing cross referencing, don't
16595 try to keep file location on a WFL expanded as a CALL_EXPR.
16596
16597 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16598
16599 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16600 compiling to class file a void method with an empty method body.
16601 As a side effect, the bytecode backend will generate the
16602 appropriate `return' instruction.
16603
16604 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16605
16606 * parse.y (lookup_package_type_and_set_next): New function prototype.
16607 (resolve_package): Search current and imported packages.
16608 (lookup_package_type_and_set_next): New function.
16609
16610 1999-06-22 Andrew Haley <aph@cygnus.com>
16611
16612 * verify.c (verify_jvm_instructions): Check for pending blocks
16613 before invalid PC test and opcode switch, not after.
16614
16615 1999-06-21 Andrew Haley <aph@cygnus.com>
16616
16617 * except.c (find_handler_in_range): The upper limit for exception
16618 ranges is exclusive, not inclusive: (start <= pc < end).
16619 (link_handler): find child pointer which points to outer by
16620 searching sibling list: previous code incorrectly assumed that
16621 outer->outer->first_child must point to outer.
16622 * verify.c (verify_jvm_instructions): FIXME added to code for
16623 `athrow'.
16624 (verify_jvm_instructions): Do not assume that the last block
16625 processed in a subroutine is a block which ends with a `ret'
16626 instruction. With some control flows it is possible that the last
16627 block ends with an `athrow'.
16628
16629 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16630
16631 * parse.y (qualify_ambiguous_name): Reorganized the post
16632 evaluation of non WFL leading expression nodes.
16633
16634 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16635
16636 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16637 CONVERT_EXPR.
16638
16639 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16640
16641 * parse.y (qualify_ambiguous_name): Handle qualified expression
16642 beginning with a STRING_CST.
16643
16644 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16645
16646 * parse.y (register_fields): Set DECL_INITIAL on both
16647 pre-initialized static and public fields.
16648 (resolve_field_access): Static field access expressions to always
16649 use pointer types.
16650 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16651 qualification. CONVERT_EXPR to be resolved as an expression name.
16652 (java_complete_lhs): Identify and access qualified final
16653 initialized field in switch statement case expression.
16654 (fold_constant_for_init): Pre-initialized field decl constant to
16655 be folded.
16656
16657 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
16658
16659 * parse.y (note_possible_classname): Mark returned node with
16660 QUALIFIED_P only if the original class name contained a '/'.
16661
16662 1999-06-05 Anthony Green <green@cygnus.com>
16663
16664 * Make-lang.in (gcjh): More parallel build fixes.
16665
16666 1999-06-03 Mike Stump <mrs@wrs.com>
16667
16668 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16669
16670 1999-06-02 Anthony Green <green@cygnus.com>
16671
16672 * except.c (link_handler): Chain exception handlers in order.
16673
16674 1999-06-02 Anthony Green <green@cygnus.com>
16675
16676 * expr.c (expand_byte_code): Fill unreachable bytecode regions
16677 with nops and process as usual in order to always set correct EH
16678 ranges. Emit detailed warnings about unreachable bytecodes.
16679
16680 1999-06-02 Anthony Green <green@cygnus.com>
16681
16682 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16683 constant.
16684
16685 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16686
16687 * parse.y (lookup_field_wrapper): Unified returned value to NULL
16688 or the searched field decl.
16689
16690 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16691
16692 * parse.y (fold_constant_for_init): Convert numerical constant
16693 values to the type of the assigned field.
16694
16695 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16696
16697 * expr.c (lookup_field): Relaxed the test on class loading error
16698 detection.
16699 * parse.y (fold_constant_for_init): Enabeled old code.
16700
16701 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16702
16703 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16704 decide the validity of the cast of a java.lang.Cloneable reference
16705 to an array.
16706 (patch_conditional_expr): Fixed first argument passed to
16707 binary_numeric_promotion.
16708
16709 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16710
16711 * parse.y (qualify_ambiguous_name): Take into account that a
16712 CONVERT_EXPR might specify a type as a WFL.
16713
16714 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16715
16716 * parse.y (patch_assignment): Save the rhs before using it as an
16717 argument to _Jv_CheckArrayStore.
16718
16719 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16720
16721 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16722
16723 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16724
16725 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16726 floating point literal only when the exponent indicator has been
16727 parsed.
16728
16729 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16730
16731 * parse.y (formal_parameter:): Construct argument tree list
16732 element even if a yet unsupported final parameter was encountered.
16733
16734 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16735
16736 * parse.y (finish_method_declaration): Issue errors for native or
16737 abstract methods declared with a method body, as well as for non
16738 native or non abstract methods with no method body.
16739
16740 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16741
16742 * class.c (build_utf8_ref): Initialize variable `field'.
16743
16744 * decl.c (init_decl_processing): Initialize variable `field'.
16745
16746 * expr.c (build_known_method_ref): Mark parameters `method_type',
16747 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16748 (process_jvm_instruction): Likewise for parameter `length'.
16749
16750 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16751 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16752 ATTRIBUTE_UNUSED.
16753
16754 * parse.y (maybe_generate_clinit): Remove unused variable
16755 `has_non_primitive_fields'.
16756 (find_in_imports_on_demand): Initialize variables `node_to_use'
16757 and `cl'.
16758 (patch_binop): Likewise for variable `prom_type'.
16759 (patch_unaryop): Likewise for variable `prom_type'.
16760
16761 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16762
16763 * xref.c (xref_table): Add missing initializer.
16764
16765 1999-05-14 Tom Tromey <tromey@cygnus.com>
16766
16767 * java-except.h (struct eh_range): Removed unused `next' member.
16768 * verify.c (verify_jvm_instructions): Call check_nested_ranges
16769 after adding all exception handlers. Sort exception ranges in
16770 order of start PC.
16771 (struct pc_index): New structure.
16772 (start_pc_cmp): New function.
16773 * except.c (add_handler): Return `void'. Don't call link_handler;
16774 instead construct an ordinary linked list and do range
16775 coalescing.
16776 (check_nested_ranges): New function.
16777 (link_handler): Changed interface to allow merging of eh_ranges.
16778 Split overlapping ranges. Return `void'.
16779
16780 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16781
16782 * parse.y (constructor_block_end:): New rule, tagged <node>.
16783 (constructor_body:): Use `constructor_block_end' instead of
16784 `block_end'.
16785
16786 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16787
16788 * parse.y (statement_nsi:): Pop `for' statement block.
16789 (java_complete_lhs): Labeled blocks containing no statement are
16790 marked as completing normally.
16791
16792 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16793
16794 * xref.c (xref_set_current_fp): New function, defined.
16795 * xref.h (xref_set_current_fp): New function, prototyped.
16796
16797 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16798
16799 * check-init.c (check_init): Take into account that
16800 LABELED_BLOCK_STMT can be empty.
16801
16802 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16803
16804 * parse.y (java_check_regular_methods): Warning check on not
16805 overriding methods with default access in other packages does not
16806 apply to `<clinit>'.
16807 (java_complete_lhs): If block body is an empty_stmt_node, replace
16808 it by NULL_TREE. This prevents gcc from generating an irrelevant
16809 warning.
16810
16811 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16812
16813 * check-init.c (check_init): Removed code accepting to see things
16814 falling through default:, when doing xrefs.
16815 * java-tree.h (do_not_fold): New global variable, declared.
16816 * parse.y (do_not_fold): New global variable, defined.
16817 (java_complete_expand_method): Set `do_not_fold' to the value of
16818 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16819 and reinstall them after them have been purged; do not check for
16820 initializations; do not issue missing return errors.
16821 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
16822 when doing xrefs.
16823 (patch_binop): Skip the fold part when doing xrefs.
16824 (build_string_concatenation): Skip the concatenation part when
16825 doing xrefs.
16826 (patch_synchronized_statement): Do not generate a try-finally when
16827 doing xrefs.
16828 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
16829 and keep the location where the throw was seen.
16830 * typeck.c (convert): When `do_not_fold' is set, do not attempt
16831 any treatment on the converted node an simply return a NOP_EXPR of
16832 the targeted type.
16833 * xref.c (xref_get_data): New function, defined.
16834 * xref.h (xref_get_data): New function, declared.
16835 (XREF_GET_DATA): Use xref_get_data.
16836
16837 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16838
16839 * gjavah.c (print_include): Cast the result of `strlen' to int
16840 when comparing against a signed value.
16841 (add_namelet): Likewise.
16842
16843 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16844
16845 * expr.c (expand_invoke): Mark parameter `nargs' with
16846 ATTRIBUTE_UNUSED.
16847 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16848
16849 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16850 ATTRIBUTE_UNUSED.
16851
16852 * jcf-reader.c (get_attribute): Cast a value to long
16853 when comparing against a signed expression. Likewise.
16854
16855 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16856 HOST_BITS_PER_CHAR.
16857
16858 1999-05-11 Andrew Haley <aph@cygnus.com>
16859
16860 * parse.y (source_end_java_method): If the current method contains
16861 any exception handlers, force asynchronous_exceptions: this is
16862 necessary because signal handlers in libjava may throw exceptions.
16863 * decl.c (end_java_method): Ditto.
16864
16865 1999-05-11 Tom Tromey <tromey@cygnus.com>
16866
16867 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16868 flags.
16869 * jvspec.c (THREAD_NAME): Removed.
16870 (GC_NAME): Likewise.
16871 (MATHLIB): Likewise.
16872 (WITHLIBC): Likewise.
16873 (GCLIB): Likewise.
16874 (THREADLIB): Likewise.
16875 (MATH_LIBRARY): Likewise.
16876 (lang_specific_driver): Don't add `-l' options to command line.
16877 Instead, add a single --specs option. Recognize `-L' options and
16878 use them to search for spec file.
16879 (find_spec_file): New function.
16880 (SPEC_FILE): New define.
16881
16882 1999-05-11 Dave Brolley <brolley@cygnus.com>
16883
16884 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16885 cpplib-enabled build.
16886
16887 1999-05-05 Per Bothner <bothner@cygnus.com>
16888
16889 * class.c (make_field_value): DECL_INITIAL may be a string literal;
16890 temporarily zero it while calling rest_of_decl_compilation.
16891
16892 * java-tree.h (string_ptr_type_node): Add declaration.
16893 * decl.c: Define and initialize string_ptr_type_node.
16894 * parse.y (patch_string_cst): Use string_ptr_type_node.
16895
16896 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
16897 * parse.y (for_statement): Now unconditionally exit_block.
16898 (finish_labeled_statement): No longer exit_block if for-loop.
16899 (patch_loop_statement): Check harder if the loop is already labeled.
16900
16901 * parse.y (patch_initialized_static_field): Removed function.
16902 (maybe_generate_clinit): Removed special handling for interfaces.
16903 (java_complete_expand_methods): Do a preliminary java_complete_tree
16904 on <clinit> to determine if it can be removed.
16905 (java_complete_expand_method): Remove special handling for <clinit>.
16906 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
16907 optimize if we get back empty_stmt_node.
16908 For MODIFY_EXPR, re-do checking of static initializers.
16909 (fold_constant_for_init): Don't return immediate if VAR_DECL.
16910 For VAR_DECL, pass correct context.
16911
16912 * verify.c (verify_jvm_instructions): Better error messages.
16913
16914 1999-05-03 Tom Tromey <tromey@cygnus.com>
16915
16916 * parse-scan.y (interface_declaration): Call
16917 report_class_declaration for interfaces.
16918
16919 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
16920
16921 * Makefile.in: Remove -v from bison command lines.
16922
16923 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16924
16925 * check-init.c (check_init): Exclude a case of error when doing
16926 xrefs.
16927 * class.c (layout_class_method): Don't generate the error message
16928 twice when compiling from source.
16929 * lang-options.h: Added `-Wredundant-modifers' and
16930 `-Wunusupported-jdk11' flags and help text.
16931 * lang.c (lang_decode_option): Added support for
16932 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
16933 flag_static_local_jdk11 and flag_redundant set accordingly.
16934 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
16935 * parse.h (EXPR_WFL_ADD_COL): New macro.
16936 (DECL_END_SOURCE_LINE): Likewise.
16937 (DECL_INHERITED_SOURCE_LINE): Likewise.
16938 * parse.y (static_ref_err): New function, prototyped.
16939 (CCB_TK): Now tagged <operator>.
16940 (class_body:): Remember the location of the closing '}' of a class
16941 definition when doing xrefs.
16942 (block:): Likewise.
16943 (block_end:): Likewise.
16944 (create_class): Remember the location of the inherited class
16945 identifier when doing xrefs.
16946 (register_fields): Added test on first operand of `init' before
16947 testing it TREE_CODE.
16948 (method_header): Store the location of the class identifier in the
16949 class decl when doing xrefs.
16950 (finish_method_declaration): Don't combine first/last method line
16951 when doing xref.
16952 (java_check_regular_methods): Warning check on not overriding
16953 methods with default access on other packages move before check on
16954 static methods. Initialization of `aflags' also moved up.
16955 (resolve_expression_name): Call static_ref_err to report the error.
16956 (static_ref_err): New function, implemented.
16957 (resolve_field_access): Returned simplified static field access
16958 when doing xrefs.
16959 (resolve_qualified_expression_name): Check for illegal use of
16960 static fields in a non static context. Call static_ref_err to
16961 report error in various places.
16962 (java_complete_tree): Do not fold initialized static fields when
16963 doing xrefs.
16964 (java_complete_lhs): Likewise.
16965
16966 1999-04-29 Anthony Green <green@cygnus.com>
16967
16968 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
16969 create internal labels.
16970 (lookup_label): Ditto.
16971
16972 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16973
16974 * class.c (layout_class_method): Generate <clinit>'s rtl for
16975 interfaces.
16976 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
16977 for interfaces' <clinit>.
16978 * expr.c (lookup_field): Search for fields in interfaces.
16979 (expand_invoke): Fixed indentation.
16980 (expand_java_field_op): Likewise. Use IS_CLINIT.
16981 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
16982 (IS_CLINIT): New macro.
16983 * parse.y (type_declaration:): Call maybe_generate_clinit after an
16984 interface was parsed.
16985 (maybe_generate_clinit): Don't generate if the current class is an
16986 interface with only fields of primitive types.
16987 (reset_method_name): Use IS_CLINIT.
16988 (java_complete_expand_method): Expand <clinit> when it exists for
16989 interfaces. Use IS_CLINIT.
16990 (resolve_expression_name): Use DECL_CONTEXT instead of
16991 current_class to build static field references.
16992 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
16993 ARRAY_REF when doing xreferencing.
16994 (check_final_assignment): Fixed typo in leading comment. Use
16995 IS_CLINIT.
16996 (patch_array_ref): Don't fully expand array references when
16997 xreferencing.
16998 (patch_return): Use IS_CLINIT.
16999 (patch_throw_statement): Likewise.
17000
17001 1999-04-22 Tom Tromey <tromey@cygnus.com>
17002
17003 * Make-lang.in (JAVA_SRCS): Added check-init.c.
17004
17005 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
17006
17007 * decl.c (predef_filenames, predef_filenames_size): New globals
17008 (init_decl_processing): predef_filenames and predef_filenames_size
17009 initialized.
17010 * java-tree.h (predef_filenames, predef_filenames_size): Declared
17011 extern.
17012 * jcf-parse.c (predefined_filename_p): New function.
17013 (yyparse): Check that files on the command line are specified only
17014 once and issue a warning otherwise.
17015 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
17016 * parse.y (source_end_java_method): Nullify NOP method bodies, to
17017 avoid a gcc warning with -W -Wall turned on.
17018 (java_expand_classes): Abort if errors were encountered.
17019 (java_complete_lhs): If the cross reference flag is set, wrap
17020 field DECL node around a WFL when resolving expression name.
17021
17022 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17023
17024 * lang.c (lang_decode_option): Fixed returned value when parsing
17025 `-fxref=...' and `-Wall'.
17026 * parse.y (source_end_java_method): Do not generate code when
17027 flag_emit_xref is set.
17028 (resolve_expression_name): Do not build static field access when
17029 flag_emit_xref is set.
17030 (resolve_field_access): No special treatment on `length' when
17031 flag_emit_xref is set. Do not build qualified static field access
17032 when flag_emit_xref is set.
17033 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
17034 when flag_emit_xref is set.
17035 (patch_assignment): Do not generate array store runtime check when
17036 flag_emit_xref is set.
17037 * xref.c (xref_flag_value): Fixed function declaration
17038 indentation.
17039 (xset_set_data): New function.
17040 * xref.h (xref_set_data): Added prototype for new function.
17041 (typedef struct xref_flag_table): New field data.
17042 (XREF_GET_DATA): New macro.
17043
17044 1999-04-19 Tom Tromey <tromey@cygnus.com>
17045
17046 * xref.h (enum): Removed trailing comma.
17047
17048 * parse.y (resolve_qualified_expression_name): Added missing
17049 `break'.
17050
17051 1999-04-15 Anthony Green <green@cygnus.com>
17052
17053 * gjavah.c: New prototypes for java_float_finite and
17054 java_double_finite.
17055
17056 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17057
17058 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
17059 references.
17060
17061 1999-04-06 Jeffrey A Law (law@cygnus.com)
17062
17063 * Makefile.in (TREE_H): Add tree-check.h.
17064 (RTL_H): Add genrtl.h.
17065
17066 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
17067
17068 * parse.y (patch_assignment): Added ArrayStoreException runtime
17069 check.
17070
17071 1999-04-06 Per Bothner <bothner@cygnus.com>
17072
17073 * expr.c (pop_type_0): New function.
17074 (pop_type): Use pop_type_0.
17075 * java-tree.h (pop_type_0): New declaration.
17076 * verify.c (verify_jvm_instructions): Check return instructions.
17077
17078 * parse.y (patch_binop): Don't fold if non-constant and emiting
17079 class files.
17080
17081 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17082
17083 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
17084
17085 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
17086 (main_jcf): Don't define.
17087 (process_file): Don't set `main_jcf'.
17088
17089 * java-tree.h (main_jcf): Don't declare.
17090
17091 * jcf-parse.c (main_jcf): Add static definition.
17092
17093 * lang.c (main_jcf): Don't define.
17094
17095 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17096
17097 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
17098
17099 * decl.c (copy_lang_decl): Likewise for `bcopy'.
17100
17101 * jcf-depend.c: Include "config.h", not <config.h>.
17102
17103 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
17104 `bcopy' to PTR.
17105
17106 * jcf-path.c: Include "config.h", not <config.h>.
17107
17108 * lex.c: Don't include various system header files.
17109 (java_init_lex): Cast the argument of `bzero' to PTR
17110
17111 * parse-scan.y (java_push_parser_context): Likewise.
17112
17113 * parse.y (java_push_parser_context): Likewise.
17114 (patch_bc_statement): Match format specifier to variable argument.
17115
17116 * xref.c: Don't include <stdio.h>.
17117
17118 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
17119
17120 * parse.y (struct parser_ctxt *ctxp): Now global.
17121 (declare_local_variables): Use WFL compound value for the
17122 declaration source line value, when doing cross-referencing.
17123
17124 1999-03-31 Tom Tromey <tromey@cygnus.com>
17125
17126 * gjavah.c (print_field_info): Allow constants of other types.
17127 (print_include): Generate include when new name is proper prefix
17128 of already printed name.
17129 (add_namelet): Likewise.
17130 (cxx_keyword_subst): New function.
17131 (print_method_info): Use it.
17132 (print_field_name): New function.
17133 (get_field_name): New function.
17134 (print_field_info): Use get_field_name and print_field_name.
17135
17136 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17137
17138 * Makefile.in (keyword.h): Generate using gperf language 'C', not
17139 'KR-C', so gperf uses the `const' keyword on strings.
17140
17141 * keyword.gperf (java_keyword): Const-ify a char*.
17142
17143 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
17144
17145 * parse.y (patch_bc_statement): Fixed identation and a bogus
17146 `printf' format.
17147
17148 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
17149
17150 * parse.y (patch_assignment): Allow static variables in other
17151 classes to be assigned.
17152
17153 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17154
17155 * class.c (maybe_add_interface): Remove unused variable
17156 `interface_binfo'.
17157 (make_class_data): Use = for assignment, not ==. Likewise.
17158 (emit_register_classes): Remove unused variable `decl'.
17159
17160 * lex.c: Fix comment so as not to contain an embedded `/*'.
17161
17162 * verify.c (verify_jvm_instructions): Remove unused variable
17163 `self_type'.
17164
17165 1999-03-27 Per Bothner <bothner@cygnus.com>
17166
17167 * parse.y (complete_loop_body): Rename to finish_loop_body.
17168 (complete_labeled_statement): Rename to finish_labeled_statement.
17169 (complete_for_loop): Rename to finish_for_loop.
17170 (complete_method_declaration): Rename to finish_method_declaration.
17171
17172 * java-tree.h (continue_identifier_node): New global node.
17173 * decl.c: Define and initialize continue_identifier_node.
17174 * parse.y (generate_labeled_block): Remove - no longer needed.
17175 (build_loop_body): Use continue_identifier_node for continue block.
17176 (finish_labeled_statement): Also do pop_labeled_block actions.
17177 (java_complete_lhs): POP_LOOP even if error.
17178 (build_labeled_block): Special handling for continue_identifier_node.
17179 (patch_loop_statement): Re-organize.
17180 (patch_bc_statement): Re-write.
17181
17182 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17183
17184 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
17185 using a WFL compound value.
17186 * parse.y (xref.h): Include.
17187 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
17188 WFL compound value.
17189 (register_fields): Set WFL compound value to lineno if doing
17190 xrefs.
17191 (java_complete_expand_method): Call expand_xref if flag_emit_xref
17192 is set.
17193 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
17194 * xref.h (expand_xref): Prototype renamed from xref_generate.
17195
17196 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17197
17198 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
17199 (GET_CURRENT_BLOCK): New macro.
17200 * parse.y (current_static_block): New global variable.
17201 (method_body:): Define action.
17202 (complete_method_declaration): Set current_function_decl to NULL
17203 when work on the current method is done.
17204 (declare_local_variables): Use GET_CURRENT_BLOCK.
17205 (java_method_add_stmt): Likewise.
17206 (java_complete_expand_method): Disable the use of `this' when
17207 expanding <clinit>.
17208 (enter_a_block): If no current method exist, use
17209 current_static_block to link static initializer blocks.
17210 (exit_block): Rewritten to use current_static_block when no current
17211 method decl exists.
17212 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
17213 (patch_return): Forbid the use of `return' in static initializers.
17214 (patch_throw_statement): Fixed indentation. Issue specific error
17215 for uncaught thrown checked exception in static initializer
17216 blocks. Removed FIXME.
17217
17218 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
17219
17220 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
17221 Link gcj from gcc.o.
17222
17223 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
17224
17225 * parse.y (find_applicable_accessible_methods_list): When dealing
17226 with interface: ensure that a given interface or java.lang.Object
17227 are searched only once.
17228
17229 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17230
17231 * gjavah.c (print_c_decl): Remove unused argument `flags'.
17232
17233 * jcf-dump.c (print_access_flags): Add braces around if-else.
17234
17235 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
17236 COMBINE_INPUTS.
17237
17238 * lex.c (build_wfl_node): Add static prototype.
17239
17240 * lex.h (build_wfl_node): Remove static prototype.
17241
17242 * parse.y: Include lex.c early enough to declare everything needed.
17243 Ensure calls to `build_wfl_node' pass the proper arguments.
17244 (create_class): Remove unused variable `super_decl'.
17245 (get_printable_method_name): Initialize variable `name'.
17246
17247 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17248
17249 * Changelog: Fixed 1999-03-22 typos.
17250 * lang.c (lang_decode_option): Fixed typo in error string in the
17251 XARG section.
17252
17253 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17254
17255 * Makefile.in (JAVA_OBJS): Added entry xref.o.
17256 (xref.o): New rule.
17257 * java-tree.h (flag_emit_xref): Declared extern.
17258 * lang.c (xref.h): Included.
17259 (flag_emit_xref): New global variable.
17260 (lang_decode_option): Added support for -fxref.
17261 * xref.c: Created.
17262 * xref.h: Likewise.
17263
17264 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
17265
17266 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
17267 linked with.
17268
17269 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17270
17271 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
17272 $(srcdir)/../system.h and $(JAVA_TREE_H).
17273 (jcf-io.o): Depend on $(JAVA_TREE_H).
17274 (mangle.o): Likewise.
17275
17276 * check-init.c (check_cond_init): Add static prototype.
17277
17278 * class.c (build_java_method_type, hashUtf8String,
17279 make_field_value, get_dispatch_vector, get_dispatch_table,
17280 append_gpp_mangled_type, mangle_static_field): Likewise.
17281 (strLengthUtf8): Hide unused definition.
17282 (hashUtf8String): Const-ify.
17283 (make_field_value): Un-ANSI-fy.
17284
17285 * constants.c: Move inclusion of jcf.h above java-tree.h.
17286 (set_constant_entry, find_class_or_string_constant,
17287 find_name_and_type_constant, get_tag_node,
17288 build_constant_data_ref): Add static prototype.
17289
17290 * decl.c (push_jvm_slot, builtin_function,
17291 lookup_name_current_level): Likewise.
17292 (builtin_function): Const-ify.
17293
17294 * except.c (expand_start_java_handler, expand_end_java_handler):
17295 Add static prototype.
17296
17297 * expr.c (flush_quick_stack, push_value, pop_value,
17298 java_stack_swap, java_stack_dup, build_java_athrow,
17299 build_java_jsr, build_java_ret, expand_java_multianewarray,
17300 expand_java_arraystore, expand_java_arrayload,
17301 expand_java_array_length, build_java_monitor, expand_java_pushc,
17302 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
17303 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
17304 expand_compare, expand_test, expand_cond, expand_java_goto,
17305 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
17306 expand_java_field_op, java_push_constant_from_pool): Likewise.
17307
17308 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
17309 (build_java_arraynull_check): Mark parameters `node' and `type'
17310 with ATTRIBUTE_UNUSED.
17311 (note_label): Likewise for parameter `current_pc'.
17312 (expand_java_call, expand_java_ret): Hide unused definition.
17313
17314 * java-tree.h (make_class, build_constants_constructor,
17315 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
17316 init_outgoing_cpool, register_class, emit_register_classes,
17317 java_layout_seen_class_methods): Prototype.
17318 (unicode_mangling_length): Const-ify.
17319 (append_gpp_mangled_name, append_gpp_mangled_classtype,
17320 emit_unicode_mangled_name, format_int, format_uint,
17321 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
17322 jcf_print_utf8_replace, open_class): Prototype.
17323
17324 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
17325 <stdio.h>. Include tree.h/java-tree.h.
17326 (utf8_equal_string usage, process_class): Add static prototype.
17327 (open_class): Don't prototype this here.
17328 (utf8_equal_string): Match arguments to format specifiers.
17329 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
17330 TABLE_SWITCH, disassemble_method): Likewise.
17331
17332 * jcf-io.c: Include tree.h/java-tree.h.
17333 (open_class, find_classfile, jcf_print_utf8,
17334 jcf_print_utf8_replace): Const-ify.
17335
17336 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
17337 parse_class_file): Add static prototype.
17338 (find_in_current_zip): Match definition to existing static
17339 prototype.
17340
17341 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
17342 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
17343 finish_jcf_block, define_jcf_label, get_jcf_label_here,
17344 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
17345 write_chunks, adjust_typed_op, generate_bytecode_conditional,
17346 generate_bytecode_return, perform_relocations, init_jcf_state,
17347 init_jcf_method, release_jcf_state, generate_classfile):
17348 Add static prototype.
17349 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
17350 (make_class_file_name): Const-ify.
17351
17352 * jcf.h (find_classfile): Const-ify.
17353
17354 * jv-scan.c (reset_report): Remove prototype.
17355
17356 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
17357 (error): Rewrite to allow varargs.
17358
17359 * lang.c (lang_f_options): Const-ify.
17360
17361 * lex.c (java_parse_escape_sequence): Add static prototype.
17362 (java_allocate_new_line): Match definition to existing static
17363 prototype.
17364
17365 * mangle.c Include tree.h/java-tree.h.
17366 (unicode_mangling_length, emit_unicode_mangled_name,
17367 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
17368
17369 * parse.h (jdep_code): Remove trailing comma in enumeration.
17370 (java_get_line_col): Move prototype outside of !JC1_LITE test.
17371 (reset_report): Add prototype.
17372
17373 * verify.c (push_pending_label, merge_types): Add static
17374 prototypes.
17375
17376 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
17377
17378 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17379
17380 * parse.y (find_applicable_accessible_methods_list): Extend the
17381 search to superinterfaces when relevant.
17382 (search_applicable_methods_list): New function.
17383
17384 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
17385
17386 * class.c (unmangle_classname): Implemented stricter testing
17387 before setting the QUALIFIED_P flag on an identifier.
17388
17389 1999-03-16 Per Bothner <bothner@cygnus.com>
17390
17391 * parse.y (java_complete_lhs): Call force_evaluation_order
17392 after patch_newarray.
17393 (patch_binop): Don't call fold if there are side effects.
17394
17395 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
17396
17397 * parse.y (java_stabilize_reference): Use save_expr instead of
17398 building a SAVE_EXPR node.
17399 (java_complete_lhs): Patch the resulting string of the `+='
17400 operator (if necessary) and complete the RHS after having built
17401 the cast.
17402
17403 1999-03-15 Per Bothner <bothner@cygnus.com>
17404
17405 * class.c (make_class): Don't set CLASS_P here (because
17406 this function is also called by build_java_array_type).
17407 (push_class): Set CLASS_P here instead.
17408 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
17409
17410 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
17411 context. If the context is class, perfer "super" over "synchronized".
17412 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
17413
17414 * parse.y (create_class): Don't call parser_check_super here;
17415 it is not robust. Always wait until later.
17416
17417 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
17418 match what JDK 1.2 does), but don't set ACC_PUBLIC.
17419
17420 1999-03-13 Per Bothner <bothner@cygnus.com>
17421
17422 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
17423 * lex.h (UNGETC): Change misleading macro.
17424
17425 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17426
17427 * parse.y (java_stabilize_reference): Return NODE when patching a
17428 COMPOUND_EXPR.
17429 (java_complete_lhs): Put parenthesis around truth values.
17430
17431 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17432
17433 * class.c (layout_class_method): Don't make rtl for interface
17434 methods.
17435 * parse.h (GET_TYPE_NAME): New macro.
17436 * parse.y (if_then_statement:): Fixed indentation.
17437 (if_then_else_statement:): Likewise.
17438 (for_statement:): Fixed spacing.
17439 (try_statement:): Fixed indentation.
17440 (create_interface): Don't force interfaces to be abstract.
17441 (method_header): Abstract methods are OK in interfaces.
17442 (declare_local_variables): Fixed typo in comment.
17443 (java_complete_expand_method): Fixed indentation.
17444 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
17445 non accessible fields.
17446 (java_stabilize_reference): New function.
17447 (java_complete_lhs): Fixed indentation. Use
17448 java_stabilize_reference in compound assignment. Insert the
17449 cast. If not processing `+' fix string constants before processing
17450 binop.
17451
17452 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17453
17454 * constants.c (find_class_or_string_constant): Cast variable `j'
17455 to a `jword' when comparing against one.
17456
17457 * expr.c (java_lang_expand_expr): Remove unused variables
17458 `has_finally_p' and `op0'.
17459
17460 * gjavah.c (print_field_info): Cast a value to jint when comparing
17461 against one. Likewise for a jlong.
17462 (add_namelet): Likewise cast a `sizeof' to an int when comparing
17463 against a signed quantity.
17464
17465 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
17466 (print_signature): Don't needlessly dereference variable `str'
17467
17468 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
17469 `max_locals' with ATTRIBUTE_UNUSED.
17470 (jcf_parse_class): Likewise for variable `index'.
17471
17472 * parse.h (reverse_jdep_list): Remove static prototype.
17473
17474 * parse.y (build_jump_to_finally): Remove prototype and definition.
17475 (reverse_jdep_list): Add static prototype.
17476
17477 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
17478 `assignment' and `expr_decl'.
17479
17480 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
17481
17482 1999-03-12 Andrew Haley <aph@cygnus.com>
17483
17484 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
17485 we'll need a directory separator and a null character.
17486
17487 1999-03-10 Per Bothner <bothner@cygnus.com>
17488
17489 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
17490
17491 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
17492
17493 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17494 interfaces.
17495
17496 1999-03-05 Per Bothner <bothner@cygnus.com>
17497
17498 * lex.c (java_parse_end_comment): Take extra parameter (next char).
17499
17500 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
17501
17502 * class.c (layout_class_method): A static method in a base class
17503 is never overridden, so treat it like it doesn't exist.
17504 However, do complain about private non-static method overriding
17505 public static method.
17506
17507 * parse.y: Don't set unused INITIALIZED_P flag.
17508 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
17509
17510 * parse.y (find_expr_with_wfl): Optimize tail-calls.
17511 (build_array_from_name): Re-order &index[string] to &string[index].
17512
17513 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
17514 error_mark (it might catch more errors, but it is more likely to lose).
17515
17516 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17517
17518 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17519 (parse-scan.o): Depend on toplev.h.
17520
17521 * class.c (make_method_value): Add prototype. Make it static.
17522 Remove unused second argument, caller changed.
17523
17524 * expr.c (java_lang_expand_expr): Remove unused variable
17525 `return_label'.
17526
17527 * java-tree.h: Don't prototype find_in_current_zip.
17528 Add prototypes for verify_constant_pool, start_java_method,
17529 end_java_method, give_name_to_locals, expand_byte_code,
17530 open_in_zip, set_constant_value, find_constant1, find_constant2,
17531 find_utf8_constant, find_string_constant, find_class_constant,
17532 find_fieldref_index, find_methodref_index, write_constant_pool,
17533 count_constant_pool_bytes and encode_newarray_type.
17534
17535 * jcf-dump.c: Remove unused variable `LONG_temp'.
17536
17537 * jcf-parse.c: Include parse.h.
17538 (jcf_parse_source): Remove unused parameter, all callers changed.
17539 (jcf_figure_file_type): Add static prototype.
17540 (find_in_current_zip): Likewise. Also remove unused parameter,
17541 all callers changed.
17542 (read_class): Initialize variable `saved_pos'.
17543
17544 * jcf-reader.c (jcf_parse_preamble): Mark variables
17545 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17546
17547 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17548 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17549 (java_parse_doc_section): Initialize variable `seen_star'.
17550 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17551 (java_lex_error): Mark parameters `msg' and `forward' with
17552 ATTRIBUTE_UNUSED.
17553 (java_get_line_col): Mark parameters `filename' and `line' with
17554 ATTRIBUTE_UNUSED.
17555
17556 * parse-scan.y: Include toplev.h.
17557 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17558
17559 * parse.h: use `struct JCF', not plain `JCF'.
17560 (java_parser_context_save_global, java_expand_classes
17561 java_parser_context_restore_global, java_parse): Add prototypes.
17562
17563 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17564 `node'.
17565
17566 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
17567
17568 * check-init.c (check_init): COPYN takes word count, not bit count.
17569
17570 1999-02-26 Per Bothner <bothner@cygnus.com>
17571
17572 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
17573 explicit build_decl. (Avoids crash in reload when optimizing.)
17574
17575 1999-02-25 Per Bothner <bothner@cygnus.com>
17576
17577 * decl.c (complete_start_java_method): Handle synchronized method
17578 even when compiling from bytecode.
17579
17580 1999-02-26 Tom Tromey <tromey@cygnus.com>
17581
17582 * gjavah.c (add_class_decl): Only generate `#include' if outer
17583 class is not the name of the class we are processing. Correctly
17584 append `.h' in #include.
17585 (process_file): Clean up newlines around generated `#include's.
17586 (decode_signature_piece): Correctly handle inner classes.
17587 (struct include): New structure.
17588 (all_includes): New global.
17589 (print_include): New function.
17590 (add_class_decl): Use it.
17591 (process_file): Likewise.
17592 (add_class_decl): Generate include for java-array.h if array
17593 seen.
17594 (process_file): Don't generate java-array.h include.
17595
17596 * gjavah.c (add_namelet): Check for standard package names here.
17597 (add_class_decl): Don't check for standard package names here.
17598
17599 1999-02-25 Tom Tromey <tromey@cygnus.com>
17600
17601 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17602 When reading a zip file, only use strncmp if both strings are
17603 bigger than the buffer length. Initialize `k' when looping
17604 through zip file.
17605
17606 1999-02-24 Tom Tromey <tromey@cygnus.com>
17607
17608 * gjavah.c (struct namelet): New structure.
17609 (add_namelet): New function.
17610 (print_namelet): New function.
17611 (print_class_decls): Use add_namelet and print_namelet to generate
17612 namespaces and not classes.
17613 (method_printed): New global.
17614 (HANDLE_END_METHOD): Examine method_printed.
17615 (print_method_info): Set method_printed when required. Print
17616 error if function to be ignored is marked virtual. Handle $finit$
17617 method.
17618 (METHOD_IS_FINAL): New macro.
17619 (print_field_info): Use it.
17620 (HANDLE_METHOD): Clear method_printed.
17621 (method_pass): New global.
17622 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17623 (process_file): Do two passes over both fields and methods.
17624 (HANDLE_METHOD): Examine method_pass.
17625 (root): New global.
17626 (add_class_decl): New function.
17627 (print_class_decls): Don't scan over entire constant pool.
17628
17629 1999-02-23 Tom Tromey <tromey@cygnus.com>
17630
17631 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17632 disable linking in that case.
17633
17634 1999-02-20 Tom Tromey <tromey@cygnus.com>
17635
17636 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17637 not 0x1f.
17638
17639 1999-02-21 Per Bothner <bothner@cygnus.com>
17640
17641 * decl.c (build_result_decl), java-tree.h: New method.
17642 (complete_start_java_method): Handle synchronized methods.
17643 Don't build DECL_RESULT here. (Ordering dependency problem.)
17644 (start_java_method): Call build_result_decl here instead ...
17645 * parse.y (java_complete_expand_method): ... and here.
17646 (expand_start_java_method): Don't call complete_start_java_method here.
17647 (java_complete_expand_method): Call it here instead.
17648 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
17649 * java-tree.h: ... here.
17650
17651 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
17652 * parse.y (java_complete_lhs): Don't call force_evaluation_order
17653 for ARRAY_REF - it doesn't work when array bounds are checked.
17654 (patch_array_ref): Handle it here instead.
17655
17656 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
17657
17658 1999-02-19 Per Bothner <bothner@cygnus.com>
17659
17660 Force left-to-right evaluation of binary operations etc.
17661 * expr.c (force_evaluation_order), java-tree.h: New function.
17662 * parse.y (java_complete_lhs): Pass binary operations, procedure
17663 calls, and ARRAY_REFs to force_evaluation_order.
17664 (various): Set TREE_SIDE_EFFECTS more carefully.
17665
17666 Tolerate random (non-UTF8) encoding in comments without complaining.
17667 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
17668 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
17669
17670 * parse.y (resolve_qualified_expression_name): Handle error_mark.
17671 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
17672
17673 * parse.y (java_complete_lhs): Ignore an empty statement in a
17674 COMPOUND_EXPR. Don't complain about empty statement after return.
17675
17676 1999-02-19 Per Bothner <bothner@cygnus.com>
17677
17678 * parse.y (obtain_incomplete_type): Don't wrap unknown types
17679 in TREE_LIST - just chain the POINTER_TYPEs together.
17680 (resolve_class): If type already resolved, return decl.
17681 After resolving, update TREE_TYPE(class_type), and name (if array).
17682 * parse.h (do_resolve_class), parse.y: Make non-static.
17683 * class.c (maybe_layout_super_class): Take this_class argument.
17684 Do do_resolve_class if necessary.
17685 (layout_class, layout_class_methods): Adjust calls appropriately.
17686 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17687 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
17688 * typeck.c (build_java_array_type): Don't call layout_class.
17689
17690 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17691
17692 * parse.y (check_pkg_class_access): Allow private class access
17693 within the same package.
17694 (strip_out_static_field_access_decl): New function.
17695 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17696 operator argument before testing its nature.
17697
17698 1999-02-03 Per Bothner <bothner@cygnus.com>
17699
17700 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
17701 (TRY_EXPR): Simplify - it no longer has a finally clause.
17702 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
17703 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17704 * expr.c (java_lang_expand_expr): Likewise.
17705 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
17706 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
17707 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
17708 (build_try_statement): Remove finally parameter and handling.
17709 (build_try_finally_statement): New function.
17710 (patch_try_statement): No longer need to support finally clause.
17711 (try_statement): Update grammar action rules.
17712 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
17713 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17714
17715 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
17716
17717 * jcf-parse.c (get_constant): Add braces around computation of 'd'
17718 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
17719
17720 1999-02-17 Andrew Haley <aph@cygnus.com>
17721
17722 * class.c (build_utf8_ref): Back out broken patch which was
17723 intended to to output signatures using '.' as a separator.
17724
17725 * class.c (make_class_data): Output signatures using '.' as a
17726 separator, rather than '/'.
17727 (mangled_classname): Likewise.
17728 (make_field_value): Likewise.
17729 (make_method_value): Likewise.
17730 * constants.c (alloc_class_constant): Likewise.
17731 * expr.c (build_invokeinterface): Likewise.
17732
17733 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
17734
17735 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17736 of an ancient workaround.
17737
17738 1999-02-10 Jeffrey A Law (law@cygnus.com)
17739
17740 * jvspec.c (xmalloc): Kill the prototype. It does not belong
17741 here anymore.
17742
17743 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17744
17745 * lex.c (yylex): Encode \0 as UTF8.
17746
17747 1999-02-10 Tom Tromey <tromey@cygnus.com>
17748
17749 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17750 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17751 (libgcj_zip): Renamed.
17752 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17753 LIBJAVA_ZIP_FILE.
17754 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17755
17756 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17757 (GC_NAME): Renamed -lgc to -lgcjgc.
17758
17759 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17760
17761 * lex.c (java_lang_cloneable): Initialize.
17762 * parse.y (java_lang_cloneable): New static variable.
17763 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17764 doing one more qualification round.
17765 (valid_ref_assignconv_cast_p): Reject null source or
17766 destination. Allow an array to be cast into java.lang.Cloneable.
17767 (patch_cast): Swapped two first arguments to first call to
17768 valid_ref_assignconv_cast_p.
17769
17770 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
17771
17772 * parse.h: DECL_P renamed JDECL_P.
17773 * parse.y: DECL_P replaced by JDECL_P.
17774 (build_array_from_name): Always use pointer's type.
17775 (patch_bc_statement): Extra code to search continue target in a
17776 for loop. Fixed comments. Continue target is current loop when
17777 unlabeled.
17778
17779 1999-02-05 Andrew Haley <aph@cygnus.com>
17780
17781 * class.c (make_class_data): The superclass of an interface should
17782 be null, not class Object.
17783
17784 * lex.c (java_lex): Sign extend hex literals.
17785
17786 1999-02-04 Andrew Haley <aph@cygnus.com>
17787
17788 * class.c (build_utf8_ref): Output signatures using '.' as a
17789 separator, rather than '/'.
17790 (make_class_data): Likewise.
17791
17792 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
17793
17794 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17795 mkstemp.o. Get them from libiberty now.
17796
17797 1999-02-02 Jeffrey A Law (law@cygnus.com)
17798
17799 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17800
17801 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17802
17803 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17804 from libiberty.h
17805
17806 1999-02-02 Per Bothner <bothner@cygnus.com>
17807
17808 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17809 * jcf-write.c (generate_bytecode_return): New function.
17810 (generate_bytecode_insns): Use it, for RETURN_EXPR.
17811
17812 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
17813 generate special [fd]const_[01] instructions.
17814
17815 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
17816
17817 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
17818 handling OPCODE_lookupswitch or OPCODE_tableswitch.
17819
17820 1999-02-01 Per Bothner <bothner@cygnus.com>
17821
17822 * parse.y (patch_method_invocation): Handle calling static methods,
17823 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17824
17825 * parse.y (java_complete_lhs): Don't complain about unreachable
17826 exit condition in a do-while statement.
17827
17828 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
17829
17830 * lex.c (java_read_char): Fixed utf8 decoding.
17831 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
17832 range.
17833 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
17834 comments. Local variable `all_primitive' is gone. Broadened
17835 acceptance of `0' to floating point targets. `long' can now be
17836 widened to `double' or `float'.
17837 (valid_method_invocation_conversion_p): Added leading
17838 comment. Fixed tabulation.
17839 (build_string_concatenation): Optimize out left or right empty
17840 string constants.
17841
17842 1999-01-28 Per Bothner <bothner@cygnus.com>
17843
17844 * jcf-write.c (localvar_alloc): Only emit entry for
17845 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17846 (generate_bytecode_insns): Only call put_linenumber if
17847 debug_info_level > DINFO_LEVEL_NONE.
17848 * jvspec.c (lang_specific_driver): If no -O* or -g* option
17849 is specified, add -g1 (for compatibility wih javac).
17850
17851 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
17852
17853 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17854 gjavah.o, check-init.o, jv-scan.o
17855
17856 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17857
17858 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17859
17860 * gjavah.c: Include config.h and system.h.
17861
17862 * javaop.h (inline): Don't define, its handled by system.h.
17863 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17864 from `inline' to `static inline'.
17865
17866 * jcf.h (inline): Don't define, its handled by system.h.
17867
17868 * lex.c (inline): Likewise.
17869
17870 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
17871
17872 * lang-specs.h: Map -Qn to -fno-ident.
17873
17874 1999-01-29 Richard Henderson <rth@cygnus.com>
17875
17876 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17877
17878 1999-01-29 Tom Tromey <tromey@cygnus.com>
17879
17880 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17881 then cast it to Object before calling `append' method.
17882
17883 1999-01-28 Per Bothner <bothner@cygnus.com>
17884
17885 * check-init.c (check_bool2_init, check_bool_init, check_init):
17886 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17887 * jcf-write.c (generate_bytecode_insns): Likewise.
17888
17889 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
17890
17891 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17892 * parse.y (patch_cast): Allow a boolean to be cast into a
17893 boolean.
17894
17895 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17896
17897 * parse.y: (class_declaration:): Fixed indentation.
17898 (class_member_declaration:): Extra `;' after field declaration now
17899 accepted.
17900 (interface_declaration:): Removed debug messages in error reports.
17901 (patch_binop): Nodes created and returned inherit the orignal
17902 node's COMPOUND_ASSIGN_P flag value.
17903 (patch_cast): Fix cast from char to floating point.
17904
17905 1999-01-25 Andrew Haley <aph@cygnus.com>
17906
17907 * except.c, java-except.h (expand_resume_after_catch): new
17908 function.
17909 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
17910 to branch back to main flow of control after a catch block.
17911
17912 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17913
17914 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
17915 $(srcdir)/../system.h.
17916 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
17917 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
17918 (jcf-write.o): Likewise.
17919 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17920 (mangle.o): Depend on $(srcdir)/../toplev.h.
17921 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17922 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17923
17924 * class.c: Include output.h and parse.h.
17925 (mangled_classname): Add the `const' keyword to a char*.
17926 (find_named_method): Hide unused function definition.
17927 (build_utf8_ref): Change type of variable `c' to unsigned char.
17928 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
17929 (build_class_ref): Add the `const' keyword to a char*.
17930 (layout_class_method): Remove unused variable `buf'.
17931
17932 * decl.c (find_local_variable): Remove unused variable `rtl'.
17933 (pushdecl): Likewise for variables `different_binding_level' and
17934 `oldglobal'.
17935 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
17936 (maybe_build_cleanup): Likewise for parameter `decl'.
17937
17938 * except.c (expand_start_java_handler): Mark parameter `range'
17939 with ATTRIBUTE_UNUSED.
17940
17941 * expr.c: Include except.h.
17942 (pop_type): Remove unused variable `i'.
17943 (pop_value): Likewise for variables `n_words' and `i'.
17944 (expand_java_arrayload): Likewise for variable `convert'.
17945 (java_lang_expand_expr): Likewise for variables `op0', `type',
17946 `mode', `unsignedp', `node' and `elements'.
17947 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
17948 `eh_ranges'.
17949 (process_jvm_instruction): Add a `const' qualifier to a char*.
17950
17951 * gjavah.c (output_directory): Add the `const' keyword to a char*.
17952 (temp_directory): Likewise.
17953 (print_c_decl): Likewise.
17954 (print_method_info): Likewise.
17955 (decode_signature_piece): Likewise.
17956 (print_mangled_classname): Likewise.
17957
17958 * java-except.h: Provide prototypes for maybe_start_try,
17959 maybe_end_try and add_handler.
17960
17961 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
17962 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
17963 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
17964 init_expr_processing, push_super_field, init_class_processing,
17965 can_widen_reference_to, class_depth, verify_jvm_instructions,
17966 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
17967 set_local_type, merge_type_state, push_type, load_type_state,
17968 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
17969 emit_unicode_mangled_name): Add prototypes.
17970
17971 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
17972 (print_signature_type): Use ISDIGIT, not isdigit.
17973 (print_signature): Remove unused variable `j'.
17974
17975 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
17976 int when comparing against one.
17977
17978 * jcf-parse.c: Include toplev.h.
17979
17980 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
17981 (localvar_free): Remove unused variable `i'.
17982 (generate_bytecode_conditional): Likewise for variable `kind'.
17983
17984 * jv-scan.c: Include config.h and system.h. Remove redundant
17985 OS header and gansidecl.h includes.
17986 (warning): Add the `const' keyword to a char*. Also add
17987 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
17988 __STDC__, when determining whether to use ANSI-isms.
17989 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
17990 (xmalloc): Don't redundantly prototype here.
17991 (main): Remove unused parameter `envp'. Also fix the arguments
17992 passed to function `fatal' to match the format specifier.
17993
17994 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
17995
17996 * mangle.c: Include toplev.h.
17997 (emit_unicode_mangled_name): Declare parameter `len'.
17998
17999 * parse.y (parse_warning_context): Add the `const' keyword to a
18000 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
18001 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
18002 (issue_warning_error_from_context): Add the `const' keyword to
18003 a char*.
18004 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
18005 not `__STDC__' for whether to use ANSI-isms.
18006
18007 * typeck.c (incomplete_type_error): Mark parameters `value' and
18008 `type' with ATTRIBUTE_UNUSED.
18009 (parse_signature_type): Use ISDIGIT, not isdigit.
18010
18011 * verify.c (check_pending_block): Add the `const' keyword to a char*.
18012 (verify_jvm_instructions): Likewise. Remove unused variables
18013 `field_name' and `default_val'.
18014
18015 * zextract.c: Include config.h and system.h. Remove redundant
18016 OS header includes.
18017
18018 * zipfile.h: Prototype `read_zip_archive'.
18019
18020 1999-01-21 Andrew Haley <aph@cygnus.com>
18021
18022 * typeck.c (convert): Allow conversions to void type: some
18023 optimizations in gcc do this.
18024
18025 1999-01-21 Andrew Haley <aph@cygnus.com>
18026
18027 * typeck.c (convert_ieee_real_to_integer): New function.
18028 (convert): When not using fast-math and using hardware fp, convert
18029 an IEEE NaN to zero.
18030
18031 1999-01-18 Andrew Haley <aph@cygnus.com>
18032
18033 * parse.y (patch_binop): Do a type conversion from signed to
18034 unsigned and then back to signed when a ">>>" is found.
18035
18036 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
18037
18038 * java-tree.h: (check_for_initialization): Added prototype.
18039 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
18040 * parse.y (do_resolve_class): Removed unused locals.
18041 (read_import_dir): Likewise.
18042 (resolve_qualified_expression_name): Array creation
18043 expressions are valid primary expressions.
18044 (qualify_ambiguous_name): Likewise.
18045 (patch_synchronized_statement): Removed unused local.
18046
18047 1999-01-17 Jeffrey A Law (law@cygnus.com)
18048
18049 * Makefile.in (zextract.o): Add dependencies.
18050
18051 * Makefile.in: Do not put ^Ls at the start of a line.
18052
18053 1999-01-15 Per Bothner <bothner@cygnus.com>
18054
18055 * expr.c (process_jvm_instruction): Coerce to correct Throwable
18056 sub-type the result of the call that gets the exception value.
18057
18058 * parse.y (java_complete_expand_methods): If flags_syntax_only,
18059 don't call finish_class.
18060
18061 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
18062 clear found before continuing.
18063
18064 * verify.c (verify_jvm_instructions): On an array load, allow
18065 and handle top of stack to be TYPE_NULL.
18066
18067 * gjavah.c (generate_access): Translate Java package private or
18068 protected access to C++ public, but with a comment.
18069
18070 1999-01-13 Andrew Haley <aph@cygnus.com>
18071
18072 * expr.c (generate_name): Name prefix changed to avoid clashes
18073 with assembler temp labels.
18074
18075 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
18076 MODIFY_EXPR. Without this, code for the assignment may not be
18077 generated at all and the synchronized statement will read an
18078 uninitialized variable.
18079
18080 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
18081
18082 * class.c (maybe_layout_super_class): Fixed returned value.
18083 * lex.c: Added 1999 to the copyright.
18084 (java_init_lex): Initialize java_lang_imported.
18085 * lex.h: Added 1999 to the copyright.
18086 * parse.h: Added 1999 to the copyright.
18087 (REGISTER_IMPORT): Fixed typo in trailing macro.
18088 (CURRENT_OSB): New macro.
18089 (struct parser_ctxt): New fields osb_depth, osb_limit.
18090 * parse.y (java_lang_id): New global variable.
18091 (type_import_on_demand_declaration): Don't import java.lang.* twice.
18092 (array_creation_expression:): Use CURRENT_OSB.
18093 (dims:): Uses a stack to keep track of array dimensions.
18094 (cast_expression:): Use CURRENT_OSB.
18095 (find_expr_with_wfl): Return NULL if node found doesn't meet the
18096 conditions.
18097 (register_fields): Fixed typos in comment.
18098 (check_method_redefinition): Fixed comment indentation.
18099 (java_check_regular_methods): Set saved found wfl to NULL after
18100 having reinstalled it in the previously found DECL_NAME.
18101
18102 1999-01-10 Richard Henderson <rth@cygnus.com>
18103
18104 * gjavah.c (java_float_finite): Use a union to do type punning.
18105 (java_double_finite): Likewise.
18106
18107 1999-01-09 Per Bothner <bothner@cygnus.com>
18108
18109 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
18110 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
18111 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
18112 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
18113 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
18114 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
18115
18116 1999-01-08 Per Bothner <bothner@cygnus.com>
18117
18118 * check-init.c (check_init): If compiling to native, we don't
18119 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
18120
18121 1999-01-08 Tom Tromey <tromey@cygnus.com>
18122
18123 * parse-scan.y (variable_declarator_id): Set or increment
18124 bracket_count.
18125 (bracket_count): New global.
18126 (formal_parameter): Handle case where bracket pairs trail variable
18127 declarator id.
18128
18129 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
18130
18131 * jcf-parse.c (yyparse): variable len changed from a char to an
18132 int to prevent overflow.
18133
18134 1999-01-06 Per Bothner <bothner@cygnus.com>
18135
18136 * java-tree.h: Declare read_class.
18137 * jcf-parse.c (read_class): New function.
18138 (load_class): Now just call read_class.
18139
18140 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
18141 * jcf-parse.c (parse_source_file): Declare save_error_count,
18142 which is needed by java_parse_abort_on_error macro,
18143 * parse.y (java_layout_classes, java_expand_classes): Likewise.
18144
18145 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
18146 constructor, if initializing a static field.
18147 (patch_new_array_init): Set TREE_CONSTANT if it is.
18148 * expr.c (java_lang_expand_expr): For a static array constructor
18149 of primitive elements, allocate the array itself statically.
18150 Disabled until we can set the vtable field statically.
18151
18152 * check-init.c: New file. Checks for definite assignment.
18153 * Makefile.in (JAVA_OBJS): Add check-init.o.
18154 * parse.y (java_complete_expand_method): Call check_for_initialization.
18155 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
18156
18157 1999-01-06 Graham <grahams@rcp.co.uk>
18158
18159 * parse.y : include system.h instead of including
18160 standard headers directly with the exception of <dirent.h>.
18161
18162 1999-01-06 Per Bothner <bothner@cygnus.com>
18163
18164 * lex.h: Moved static function declarations to lex.c,
18165 to shut up some -Wall warnings.
18166 * lex.c: Static function declarations moved here.
18167 * jcf-dump.c: Small fixes to shut up -Wall warnings.
18168
18169 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18170
18171 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
18172
18173 1998-12-22 Per Bothner <bothner@cygnus.com>
18174
18175 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
18176 * verify.c (verify_jvm_instructions): Fix off-by-one error.
18177
18178 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
18179 (localvar_alloc): Change return type to void,
18180 (emit_unop): Remove unused variable size.
18181
18182 * jcf-write.c (struct jcf_block): Add new union.
18183 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
18184 (call_cleanups): New functions.
18185 (struct jcf_partial): New fields num_finalizers and return_value_decl.
18186 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
18187 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
18188 * lang.c (lang_init): Call using_eh_for_cleanups.
18189 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
18190 completing operands to patch_synchronized_statement.
18191 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
18192 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
18193 WITH_CLEANUP_EXPR instead of TRY_EXPR.
18194
18195 1998-12-20 John F. Carr <jfc@mit.edu>
18196
18197 * Make-lang.in: Comment out control-Ls; they upset some makes.
18198
18199 1998-12-18 Tom Tromey <tromey@cygnus.com>
18200
18201 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
18202 consistently.
18203
18204 1998-12-17 Tom Tromey <tromey@cygnus.com>
18205
18206 * parse.y (DIR_SEPARATOR): New define.
18207 (check_class_interface_creation): Use it.
18208
18209 * parse-scan.y (report_main_declaration): Recognize
18210 `java.lang.String' in argument to main.
18211
18212 1998-12-16 Per Bothner <bothner@cygnus.com>
18213
18214 * parse.y (create_interface): Remove bogus test.
18215
18216 1998-12-16 Per Bothner <bothner@cygnus.com>
18217
18218 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
18219 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
18220
18221 1998-12-16 Tom Tromey <tromey@cygnus.com>
18222
18223 * parse-scan.y (qualified_name): Use correct sprintf format.
18224
18225 1998-12-15 Tom Tromey <tromey@cygnus.com>
18226
18227 * gjavah.c (print_field_info): Changed how most negative number is
18228 printed.
18229
18230 1998-12-14 Per Bothner <bothner@cygnus.com>
18231
18232 * parse.y (fold_constant_for_init): New function.
18233 (resolve_expression_name): Don't replace static final
18234 constant-initialized fields by its value.
18235 (java_complete_lhs): New. Same as java_complete_tree, except does
18236 not replace static final constant-initialized fields by their values.
18237 (register_fields): If there is an initializer, set DECL_INITIAL and
18238 MODIFY_EXPR_FROM_INITIALIZATION_P.
18239 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
18240 Only call patch_initialized_static_field if
18241 MODIFY_EXPR_FROM_INITIALIZATION_P.
18242 (patch_initialized_static_field): If not valid constant, clear
18243 DECL_INITIAL.
18244
18245 * parse.y (lookup_field_wrapper): Fix thinko.
18246
18247 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
18248 set and restore global lineno.
18249
18250 1998-12-14 Tom Tromey <tromey@cygnus.com>
18251
18252 * gjavah.c (print_field_info): If value to print is the smallest
18253 value of its size, then print as hex to avoid later warnings from
18254 C++ compiler.
18255
18256 1998-12-14 Tom Tromey <tromey@cygnus.com>
18257
18258 * gjavah.c (decompile_method): Decompile `return null'.
18259 (process_file): Generate `#pragma interface'.
18260 (method_declared): New global.
18261 (print_method_info): Set it.
18262 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
18263 (print_method_info): Handle abstract methods.
18264
18265 1998-12-13 Per Bothner <bothner@cygnus.com>
18266
18267 * parse.y (patch_method_invocation): If class_decl is null
18268 (e.g. an array type), use original type.
18269
18270 * parse.y (check_thrown_exceptions): Temporary hack to suppress
18271 errors about uncaught exception from clone (of array, specifically).
18272
18273 1998-12-13 Tom Tromey <tromey@cygnus.com>
18274
18275 * gjavah.c (decompile_method): Handle all types of `return'
18276 opcode. Decompile `return this' and `return'.
18277 (method_access): New global.
18278 (print_method_info): Set it.
18279 (decompile_method): Don't decompile a synchronized method.
18280
18281 1998-12-13 Tom Tromey <tromey@cygnus.com>
18282
18283 * jcf-reader.c (jcf_parse_one_method): Recognize
18284 HANDLE_END_METHOD.
18285 * gjavah.c (HANDLE_END_METHOD): New macro.
18286 (HANDLE_CODE_ATTRIBUTE): New macro.
18287 (decompile_method): New function.
18288 (print_method_info): Don't print `;\n' at end of function decl.
18289 Include java-opcodes.h.
18290 (decompiled): New global.
18291
18292 1998-12-12 Per Bothner <bothner@cygnus.com>
18293
18294 * class.c (build_class_ref): Handle PRIMTYPE.class if
18295 flag_emit_class_files.
18296 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
18297 if flag_emit_class_files.
18298 * parse.y (java_complete_tree): Pre-liminary support for
18299 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
18300
18301 * parse.y (patch_synchronized_statement): Don't call monitorexit
18302 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
18303
18304 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
18305
18306 * zipfile.h (opendir_in_zip): New declaration.
18307 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
18308 (opendir_in_zip): New function, using code from open_in_zip.
18309 (open_in_zip): Call opendir_in_zip.
18310 (find_class): Remove no-longer-used do_class_file parameter,
18311 but add source_ok parameter. Change logic so if we find a .java file,
18312 we don't look for .class in later classpath emtries.
18313 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
18314 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
18315 * gjavah.c: Update call to find_class.
18316 * jcf-dump.c: Likewise.
18317
18318 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
18319 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
18320 nothing if body is empty_stmt_node.
18321 Various little fixes so SP gets correctly adjusted.
18322 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
18323 For CALL_EXPR, test if static first.
18324 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
18325 such as the ones we create for Object and Class.
18326 Set and restore current_function_decl.
18327 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
18328 (note_possible_classname): New function.
18329 (read_import_entry): Removed. Merged with read_import_dir.
18330 (read_import_dir): Don't call find_class - that only gives us
18331 the first classpath entry having the needed package.
18332 Use the struct buffer data structure from buffer.h.
18333 (read_import_dir, find_in_imports_on_demand): The remembered
18334 class names now use '.' (not '/') as package separator.
18335
18336 * parse.y (java_complete_expand_methods): Call write_classfile
18337 here, and not in java_expand_classes (which only gets first class).
18338
18339 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
18340
18341 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
18342 (register_fields): If a static fields has an initializer, just
18343 chain it on ctxp->static_initialized, and handle later.
18344 (java_complete_expand_methods): Force <clinit> first.
18345 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
18346 - it's already been completed.
18347 (patch_initialized_static_field): New function.
18348 (java_complete_field): Call it.
18349
18350 1998-12-12 Per Bothner <bothner@cygnus.com>
18351
18352 * expr.c (encode_newarray_type, build_new_array): New functions.
18353 * java-tree.h: Declare build_new_array.
18354 * jcf-write.c (patch_newarray): Use build_new_array.
18355
18356 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
18357 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
18358
18359 * parse.y (patch_new_array_init): Re-organize.
18360 Now is passed the actual array (pointer) type of the value.
18361 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
18362 (patch_array_constructor): Removed - merged into patch_new_array_init.
18363 (java_complete_tree): Update patch_new_array_init.
18364
18365 * jcf-write.c (find_constant_index): New function.
18366 (generate_bytecode_insns): Use find_constant_index.
18367 (generate_classfile): Use find_constant_index for ConstantValue.
18368
18369 1998-12-11 Tom Tromey <tromey@cygnus.com>
18370
18371 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
18372 * decl.c (init_decl_processing): Renamed dtable -> vtable.
18373 * class.c (make_class_data): Renamed dtable -> vtable, and
18374 dtable_method_count -> vtable_method_count.
18375
18376 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18377
18378 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
18379 global variables, initialized.
18380 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
18381 Declared new global variables.
18382 * lex.c (java_lex): Return long_zero_node, float_zero_node,
18383 double_zero_node, integer_zero_node upon direct matching.
18384 * parse.y (purify_type_name): Added function prototype.
18385 (duplicate_declaration_error_p): Consider new_type as potentially
18386 being a incomplete type. Use purify_type_name on type string.
18387 (method_header): saved_type: unused variable removed. Don't figure
18388 return type if method name is invalid.
18389 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
18390 processed by patch_unaryop.
18391 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
18392 increment/decrement node into its original type after binary
18393 numeric promotion on its operands.
18394
18395 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18396
18397 * parse.y (array_initializer:): Array init operand is NULL_TREE
18398 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
18399 now an error. Fixed indentation problems.
18400 (patch_string): Handle error_mark_node as an argument.
18401 (patch_new_array_init): Fixed indentation problems.
18402 (array_constructor_check_entry): Removed check on null wfl_value.
18403 Return an error if wfl_value's walk returns an error.
18404
18405 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
18406
18407 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
18408 * lex.c (java_lex): Remember column position before advancing one
18409 token. Retain location information on OCB_TK.
18410 * lex.h (typedef struct java_lc): Added new field.
18411 * parse.h (GET_SKIP_TYPE): New macro.
18412 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
18413 * parse.y (build_new_array_init, patch_new_array_init,
18414 patch_array_constructor, maybe_build_array_element_wfl,
18415 array_constructor_check_entry): New function prototypes.
18416 (switch_block:): Tagged <node>.
18417 (OCB_TK): Tagged <operator>.
18418 (array_initializer:): Installed actions.
18419 (variable_initializer): Build location information on element if
18420 necessary.
18421 (switch_statement:): Fixed indentation typo.
18422 (switch_block:): Redefined default action.
18423 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
18424 (patch_assignment): Removed duplicate code.
18425 (maybe_build_array_element_wfl, build_new_array_init,
18426 patch_new_array_init, patch_array_constructor,
18427 array_constructor_check_entry): New functions.
18428
18429 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
18430
18431 * parse.y (array_initializer): Tagged <node>.
18432 (variable_initializer:): Use default rule.
18433 (array_initializer:): Defined actions.
18434 (variable_initializers:): Likewise.
18435 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
18436 non-static field accesses.
18437 (patch_invoke): Fixed indentation typo.
18438 (java_complete_tree): Likewise.
18439 (build_labeled_block): Changed leading comment. Generate an error
18440 in case of duplicate loop labels.
18441 (patch_conditional_expr): Patch results of string concatenation
18442 operations.
18443
18444 1998-12-06 Per Bothner <bothner@cygnus.com>
18445
18446 * constants.c (find_methodref_index): When the class is an interface,
18447 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
18448
18449 * decl.c (finit_identifier_node): Use "$finit$", rather than
18450 "<finit>" (which Sun's verifier rejects).
18451 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
18452 (generate_field_initialization_code): Removed.
18453 (fix_constructors) Don't add call to $finit$ here (wrong order).
18454 (patch_method_invocation): Add $finit$ call here.
18455
18456 * java-tree.h (CALL_USING_SUPER): New macro.
18457 * parse.y (patch_invoke): Remove im local variable.
18458 (patch_method_invocation, patch_invoke): Don't pass super parameter.
18459 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
18460 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
18461
18462 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
18463
18464 * parse.y (java_complete_tree): Don't complain about unreachable
18465 statement if it is empty_stmt_node.
18466
18467 * jcf-write.c (find_constant_wide): New function.
18468 (push_long_const): Use find_constant_wide.
18469
18470 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
18471 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
18472 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
18473 Emit invokeinterface when calling an interface method.
18474 Emit invokespecial also when calling super or private methods.
18475
18476 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
18477
18478 1998-12-06 Per Bothner <bothner@cygnus.com>
18479
18480 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
18481
18482 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
18483
18484 * java-tree.h (java_layout_seen_class_methods): New function
18485 prototype.
18486 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
18487 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
18488 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
18489 * parse.y (method_declarator:): Defined action.
18490 (issue_warning_error_from_context): input_filename saved, set to
18491 the appropriate value and restored after java_error is called.
18492 (build_unresolved_array_type): Fixed comment.
18493 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
18494 (method_header): Deal with return type the same way type are
18495 handled for fields and method's parameters and local variables
18496 types are handled.
18497 (check_method_redefinition): Removed extra CR.
18498 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18499 (java_layout_seen_class_methods): New function.
18500 (java_layout_classes): Call java_layout_seen_class_methods.
18501
18502 1998-12-03 Per Bothner <bothner@cygnus.com>
18503
18504 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
18505
18506 1998-12-03 Per Bothner <bothner@cygnus.com>
18507
18508 * jcf-dump.c (main): Fix error message.
18509 * jcf-path.c (add_entry): Style fix.
18510
18511 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
18512
18513 * class.c (layout_class_method): Call build_java_argument_signature
18514 on constructors too.
18515 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18516 (patch_method_invocation): Define a primary when resolving an
18517 expression name. Augmented comment on code checking illegal `this'
18518 usage. Loosened it test by accepting NEW_CLASS_EXPR.
18519
18520 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
18521
18522 * class.c (layout_class_method): Don't report error on non-static
18523 overriding static if the method is private.
18524 * java-tree.h (finish_class): Prototype added.
18525 * lex.c (java_get_line_col): Handle col argument -2 value.
18526 * parse.h: All static method declarations moved to parse.y.
18527 * parse.y: Now contains all static method declarations previously
18528 found in parse.h.
18529 (find_expr_with_wfl, missing_return_error,
18530 unreachable_stmt_error): New functions.
18531 (java_get_real_method_name): Identify constructors bearing class
18532 names in source code compiled classes only.
18533 (java_complete_expand_methods): Call missing_return_error.
18534 (invocation_mode): Private methods invoked as static methods.
18535 (java_complete_tree): Call unreachable_stmt_error.
18536
18537 1998-12-01 Tom Tromey <tromey@cygnus.com>
18538
18539 * Makefile.in (+target): Removed.
18540 (+xmake_file): Likewise.
18541 (+tmake_file): Likewise.
18542 (.NOEXPORT): Removed duplicate.
18543
18544 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18545
18546 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18547
18548 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
18549
18550 * jvgenmain.c: Remove the xmalloc prototype, we get it from
18551 libiberty.h. Provide an xmalloc definition.
18552
18553 * jvspec.c: Remove the xmalloc prototype.
18554
18555 * parse-scan.y: Include config.h and system.h. Don't include
18556 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
18557 Provide an xstrdup definition.
18558
18559 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
18560
18561 * jcf-path.c (add_entry): Recognize ".jar" too.
18562 * lang-specs.h: Likewise.
18563
18564 1998-11-26 Per Bothner <bothner@cygnus.com>
18565
18566 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
18567 soft_monitorenter_node, soft_monitorexit_node, throw_node.
18568
18569 * jcf-write.c (generate_bytecode_insns):
18570 Handle pre/post-increment/decrement of long.
18571
18572 * jcf-write.c (generate_bytecode_insns):
18573 Handle missing exception handler (finally for synchronized).
18574
18575 1998-11-25 Per Bothner <bothner@cygnus.com>
18576
18577 * java-tree.h (end_params_node): Declare global.
18578 * decl.c (end_params_node): New global.
18579 (init_decl_processing, start_java_method): Use end_params_node for
18580 end of list of parameter types. Follows correct gcc conventions.
18581 * expr.c (pop_argument_types, pop_arguments): Likewise.
18582 * lang.c (put_decl_node): Likewise.
18583 * typeck.c (various places): Likewise.
18584 * class.y (various places): Likewise.
18585 * parse.y (various places): Likewise.
18586
18587 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
18588 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
18589
18590 * class.c: Add #include flags.h, remove no-longer needed declaration.
18591
18592 * class.c (layout_class_method): Remove commented-out code, re-format.
18593 Don't add vtable entry (or index) for private methods.
18594 * expr.c (expand_invoke): A private method is implicitly final.
18595 * class.c (make_class_data): If inlining or optimizing,
18596 skip private methods.
18597
18598 * class.c (finish_class): New function. Calls existing methods,
18599 but alls emits deferred inline functions.
18600 * jcf-parse.c (parse_class_file): Call finish_class.
18601 * parse.y (java_complete_expand_methods): Likewise.
18602
18603 * expr.c (build_java_binop): Explicit default, to silence -Wall.
18604
18605 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
18606
18607 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
18608
18609 * jcf-write.c (generate_bytecode_conditional): Fix typo.
18610
18611 1998-11-24 Per Bothner <bothner@cygnus.com>
18612
18613 * (generate_classfile): Always write class access flag with
18614 ACC_SUPER set.
18615
18616 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
18617
18618 * class.c (maybe_layout_super_class): New function.
18619 (layout_class): Reorganized. Loop on class methods dispatched into
18620 a new function. Call maybe_layout_super_class.
18621 (layout_class_methods, layout_class_method): New functions.
18622 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18623 class.
18624 (expand_invoke): Likewise.
18625 * java-tree.h (all_class_list): New global variable declared.
18626 (layout_class_methods, layout_class_method): New function
18627 prototypes.
18628 (LAYOUT_SEEN_CLASS_METHODS): New macro.
18629 * jcf-parse.c (all_class_list): New global variable.
18630 (load_class): Extended what class_or_name can be. Use parser
18631 context mechanism to save globals before calling jcf_parse.
18632 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18633 is set on the file name.
18634 (jcf_parse): Layout class methods when Object is loaded, otherwise
18635 record class in all_class_list for delayed method layout.
18636 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18637 * lang.c (put_decl_node): Decode <init> into the decl context
18638 class name.
18639 * lex.c (java_allocate_new_line): Use xmalloc.
18640 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18641 pointers, not TREE_LIST elements.
18642 (struct parser_ctxt): Fixed comment indentations, added comments
18643 and reordered some fields.
18644 (java_check_methods): Function prototype removed.
18645 * parse.y (java_push_parser_context): Use xmalloc.
18646 (java_parser_context_restore_global): Pop extra pushed ctxp only
18647 when there's nothing next.
18648 (maybe_create_class_interface_decl): Fixed comment, add new
18649 created class decl to all_class_list.
18650 (method_header): Use GET_REAL_TYPE on argument's types.
18651 (method_declarator): Use GET_REAL_TYPE, change type to the real
18652 type in TREE_LIST dependency node. Build argument list with the
18653 real type.
18654 (create_jdep_list): Use xmalloc. Removed allocation error message.
18655 (obtain_incomplete_type): Fixed leading comment. Broadened
18656 incoming argument meaning.
18657 (register_incomplete_type): Use xmalloc. Removed allocation error
18658 message.
18659 (safe_layout_class): Fixed leading comment.
18660 (jdep_resolve_class): Reversed if statement condition and switch
18661 if and else bodies.
18662 (resolve_and_layout): Fixed leading comment. Broadened incoming
18663 argument meaning.
18664 (complete_class_report_errors): New local variable name, for
18665 clarity. purify_type_name used for all error cases.
18666 (java_get_real_method_name): Stricter check on constructors.
18667 (java_check_regular_methods): Reverse methods list only if not
18668 already laid out. Layout artificial constructor.
18669 (java_check_methods): Deleted.
18670 (source_start_java_method): Obtain incomplete type for patchable
18671 method arguments.
18672 (java_layout_classes): Fixed leading comment. Use
18673 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18674 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18675 before returning. Fixed comments.
18676 (java_expand_classes): Check for errors up front.
18677 (patch_method_invocation): Class to search is resolved and laid
18678 out.
18679
18680 1998-11-24 Per Bothner <bothner@cygnus.com>
18681
18682 * expr.c (java_lang_expand_expr): Add missing emit_queue.
18683
18684 * javaop.h (int8): Removed - not used.
18685 (jbyte): Redefine portably with correct signedness.
18686
18687 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
18688
18689 * jcf-write.c (generate_bytecode_insns): Fix typo
18690 OPCODE_getstatic to OPCODE_getfield.
18691
18692 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
18693 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
18694 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18695
18696 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
18697
18698 * jcf-parse.c (jcf_parse_source): Function returned type is
18699 void. Added prototype.
18700 (jcf_parse): Function returned type is void.
18701 (yyparse): Remove call to fclose on the last parsed file.
18702
18703 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18704
18705 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
18706
18707 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18708 (layout_class): Cope with methods featuring WFL in decl names.
18709 * decl.c (unqualified_object_id_node): New global variable,
18710 initialized.
18711 (build_decl_no_layout): Removed.
18712 * expr.c (build_primtype_type_ref): Handle Double.
18713 (java_lang_expand_expr): Fixed indentations.
18714 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18715 (flag_wall, flag_redundant, flag_not_overriding,
18716 flag_static_local_jdk1_1, unqualified_object_id_node): Global
18717 variable declarations.
18718 (build_decl_no_layout): Removed prototype.
18719 (java_get_real_method_name): Added prototype.
18720 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18721 (java_parse_abort_on_error): Macro now just returns.
18722 * jcf-parse.c (jcf_parse_source): Check fclose returned
18723 value. Call emit_register_classes if java_report_errors returns
18724 zero.
18725 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18726 flag_static_local_jdk1_1): New integer flags.
18727 (lang_decode_option): New flags set here.
18728 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18729 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18730 the flag_redundant variable.
18731 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18732 when parsing java.lang.Object class.
18733 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18734 NULL_TREE to build.
18735 (resolve_qualified_expression_name): Fixed indentation.
18736 (patch_array_ref): Changed prototype.
18737 (not_initialized_as_it_should_p): Prototype removed.
18738 (java_report_errors): Added function prototype.
18739 * parse.y (formal_parameter:): Changed error message for not yet
18740 supported final parameters.
18741 (class_type_list:): Set both PURPOSE and VALUE of created
18742 TREE_LIST to be class_type.
18743 (primary_no_new_array:): Handle class literals on primitive types.
18744 (parse_warning_context): Reinstalled correct force_error and
18745 do_warning flags setups.
18746 (java_report_errors): Changed prototype. Return java_error_count
18747 value.
18748 (variable_redefinition_error): Consider treating variable type as
18749 a fake pointer.
18750 (create_interface): Warn about redundant abstract modifier if
18751 flag_redundant is set. Changed error message.
18752 (lookup_field_wrapper): Save/restore globals before/after looking
18753 up field.
18754 (duplicate_declaration_error_p): Consider treating declaration
18755 type as a fake pointer.
18756 (register_fields): Extract real type from dependency node. Check
18757 for duplicate field declaration after type adjustment. Use
18758 DECL_INITIAL to store static final initialized values.
18759 (method_header): Extract real function type from dependency node.
18760 (check_abstract_method_header): Use GET_METHOD_NAME.
18761 (obtain_incomplete_type): Layout fake pointer type.
18762 (safe_layout_class): Don't try to check for methods before layout.
18763 (java_complete_class): Don't check for correct throws clause
18764 elements inheritance here.
18765 (resolve_and_layout): Broadened name parameter meaning.
18766 (reset_method_name): Use GET_METHOD_NAME.
18767 (java_get_real_method_name): New function.
18768 (java_check_regular_methods): Don't check methods in
18769 java.lang.Object. Verify lineage of throws clause elements. Use
18770 flag_no_overriding in warning report.
18771 (check_throws_clauses): Don't check if class was from
18772 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18773 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18774 (declare_local_variables): Use flag_static_local_jdk1_1 to report
18775 warning on unsupported final local variables. Use build_decl
18776 instead of build_decl_no_layout. Get real local variable type from
18777 dependency node.
18778 (source_start_java_method): Get real parameter type from
18779 dependency node. Call build_decl instead of build_decl_no_layout.
18780 (java_layout_classes): Reverse tree and layout type and class as
18781 required. Mark class as loaded when done.
18782 (resolve_field_access): Fixed indentation. Restricted condition
18783 leading to static field access code generation. Set field_type
18784 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18785 (resolve_qualified_expression_name): Initialize type_found to
18786 null. Handle static field resolved during qualification. Fixed
18787 layout on non primitive field decl types.
18788 (not_accessible_p): Fixed typo in comment.
18789 (patch_method_invocation): Resolve and layout class to search from
18790 type.
18791 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18792 layout non primitive type, if necessary. Make method node only to
18793 report errors.
18794 (find_applicable_accessible_methods_list): Consider WFL'ed method
18795 decl names. Fixed indentation.
18796 (argument_types_convertible): Resolve and layout target type if
18797 necessary.
18798 (java_complete_tree): Fixed indentation problems. Rewrote
18799 CALL_EXPR thrown exceptions check. Re-installed further processing
18800 of the assignment in certain cases.
18801 (patch_assignment): Call maybe_build_primttype_type_ref to perform
18802 inlining on class literals.
18803 (valid_builtin_assignconv_identity_widening_p): Cope with constant
18804 0 literal.
18805 (valid_method_invocation_conversion_p): Likewise.
18806 (patch_string): Temporary disable forbidden use of `this' in
18807 explicit constructor invocations when doing string concatenation
18808 within their scope.
18809 (patch_unaryop): Added comment. Reinstalled code to disable
18810 further check on assignment operation with cast expression RHS.
18811 (patch_switch_statement): Fixed indentation.
18812 (build_try_statement): Call build_decl instead of
18813 build_decl_no_layout.
18814 (patch_synchronized_statement): Likewise.
18815 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
18816 IS_UNCHECKED_EXPRESSION_P.
18817 (check_thrown_exceptions_do): Changed leading comment. Resolve and
18818 layout argument exception type.
18819 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
18820 of IS_UNCHECKED_EXPRESSION_P.
18821
18822 1998-11-18 Anthony Green <green@cygnus.com>
18823
18824 * jcf-parse.c (yyparse): Open class file in binary mode.
18825
18826 1998-11-15 Per Bothner <bothner@cygnus.com>
18827
18828 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
18829
18830 * jcf-write.c (perform_relocations): Move check out one loop.
18831
18832 1998-11-15 Anthony Green <green@hoser.cygnus.com>
18833
18834 * Make-lang.in: Fix reference to srcdir.
18835 * jv-scan.c: Add missing xmalloc prototype.
18836 * jvgenmain.c: Ditto.
18837
18838 1998-11-15 Per Bothner <bothner@cygnus.com>
18839
18840 * decl.c (error_mark_node), java-tree.h: New global.
18841 * parse.y: Use empty_stmt_node instead of size_zero_node.
18842 (build_if_else_statement): If missing else, use empty_stmt_node.
18843
18844 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
18845 (java_complete_expand_method): Complain if return is missing.
18846 (java_check_regular_methods): Comment out incorrect error check.
18847 (not_accessible_p): Fix incorrect handling of protected methods.
18848 (patch_method_invocation): Pass correct context to not_accessible_p.
18849 (find_applicable_accessible_methods_list): Likewise.
18850 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
18851 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
18852 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
18853 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
18854
18855 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
18856 (push_int_const): Remove reundant NOTE_PUSH.
18857 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
18858 (- case SWITCH_EXPR): Fix code generation bug.
18859 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
18860 (generate_classfile): More robust for abstract methods.
18861
18862 1998-11-15 Anthony Green <green@cygnus.com>
18863
18864 * Makefile.in: jv-scan and jvgenmain all require libiberty.
18865 * Make-lang.in: Ditto.
18866
18867 * jv-scan.c: Remove xmalloc and xstrdup definitions.
18868 * jvgenmain: Ditto.
18869
18870 1998-11-15 Per Bothner <bothner@cygnus.com>
18871
18872 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
18873
18874 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
18875
18876 1998-11-14 Per Bothner <bothner@cygnus.com>
18877
18878 Allow uses of interface types to verify. This is not really
18879 type-safe, but it matches what Sun does, and is OK as long as
18880 there are appropriate run-time checks.
18881 * verify.c (merge_types): If merging two interface types,
18882 just set the result to java.lang.Object.
18883 * expr.c (pop_type): Any interface is matches by java.lang.Object.
18884
18885 1998-11-13 Tom Tromey <tromey@cygnus.com>
18886
18887 * gjavah.c (main): Handle --output-class-directory argument.
18888 * jvspec.c (lang_specific_driver): Translate `-d' into
18889 -foutput-class-dir.
18890 * jcf.h (jcf_write_base_directory): Declare.
18891 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18892 * lang-options.h: Mention -foutput-class-dir.
18893 * jcf-write.c (jcf_write_base_directory): New global.
18894 (make_class_file_name): Put generated .class file into `-d'
18895 directory, or into source directory if -d not given. Function now
18896 static.
18897 (write_classfile): Free class file name. Handle case where class
18898 file name is NULL.
18899 (DIR_SEPARATOR): New macro.
18900 Include <sys/stat.h>
18901
18902 * Makefile.in (prefix): New macro.
18903
18904 1998-11-12 Per Bothner <bothner@cygnus.com>
18905
18906 * parse.y (patch_invoke): Do less if flag_emit_class_files.
18907 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
18908 here (done in patch_invoke instead).
18909 (case_identity): Moved here from parse.y.
18910
18911 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
18912 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
18913 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
18914 so they can be efficiently scanned without recursion.
18915 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
18916 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
18917 in BLOCK iteratively, rather than recursively.
18918
18919 * parse.y (do_unary_numeric_promotion): New function.
18920 (patch_unaryop, patch_binop, patch_array_ref): Use it.
18921
18922 * parse.y (patch_newarray): Various fixes.
18923
18924 Re-do handling of switch statements (for proper block scoping).
18925 * parse.y: Add just a single block for the enture switch block,
18926 but don't create any "case blocks".
18927 (group_of_labels): Rmeoved unneeded non-terminal.
18928 CASE_EXPR and DEFAULT_EXPR are added to current block.
18929 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
18930 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
18931 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
18932 * parse.y (wfl_operator, print_int_node): Make non-static.
18933 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
18934 as part of recursive scan of block.
18935 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
18936 (patch_switch_statement): Most tests move dinto java_complete_tree.
18937
18938 * parse.y: Make various production be non-typed (void).
18939 * parse.y (parse_error): Merged into issue_warning_error_from_context.
18940 * parse.y (add_stmt_to_compound): Don't create/change extra node.
18941 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
18942
18943 * jcf-write.c (struct jcf_handler): New type.
18944 (struct jcf_switch_state): New type.
18945 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
18946 (alloc_handler, emit_unop, emit_reloc): New functions.
18947 (adjust_typed_op): Add extra parameter ("max type" offset).
18948 (emit_switch_reloc, emit_case-reloc): New function.
18949 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
18950 (generate_bytecode_insns): Support REAL_CST, switch statements,
18951 exception handling, method calls, object/array creation, and more.
18952
18953 * class.c: Remove some unused variables.
18954 * constants.c (find_string_constant): New function.
18955 (count_constant_pool_bytes): Fix to correctly handle wide constants.
18956 * decl.c (complete_start_java_method): Don't _Jv_InitClass
18957 if flag_emit_class_files.
18958
18959 1998-11-12 Tom Tromey <tromey@cygnus.com>
18960
18961 * jcf-io.c (find_class): Added explanatory comment.
18962
18963 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
18964 trailing slash to `.zip' entries.
18965
18966 * jvspec.c (lang_specific_driver): Correctly handle case where
18967 GC_NAME not defined.
18968
18969 1998-11-11 Tom Tromey <tromey@cygnus.com>
18970
18971 * jvspec.c (GC_NAME): New define.
18972 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
18973 if required.
18974 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
18975
18976 1998-11-11 Per Bothner <bothner@cygnus.com>
18977
18978 * jcf-dump.c (TABLE_SWITCH): Fix typos.
18979
18980 1998-11-11 Tom Tromey <tromey@cygnus.com>
18981
18982 * jcf-dump.c (main): Correctly recognize `--'-style long options.
18983
18984 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18985
18986 * class.c (is_compiled_class): Call safe_layout_class for class
18987 compiled from source.
18988 * conver.h (convert_to_integer, convert_to_real,
18989 convert_to_pointer): Added prototypes.
18990 * decl.c (init_decl_processing): Non longer push the decls of
18991 `methodtable', `constants', `Class', `Field', `dispatchTable'
18992 `jexception' and `Method'.
18993 * expr.c (build_invokeinterface): New function.
18994 (expand_invoke): static variable CLASS_IDENT now in
18995 build_invokeinterface. Use build_invokeinterface.
18996 (expand_java_field_op): Moved code to inline
18997 java.lang.PRIMTYPE.TYPE into a function.
18998 (build_primtype_type_ref): New function.
18999 * java-tree.def (INSTANCEOF_EXPR): New tree code.
19000 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
19001 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
19002 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
19003 (DECL_LOCAL_STATIC_VALUE): New macro.
19004 (build_invokeinterface, build_primtype_type_ref): New function
19005 prototypes.
19006 (java_parse_abort_on_error): Macro rewritten.
19007 * jcf-parse.c (current_method): Add comment to declaration.
19008 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
19009 Function prototypes fixed.
19010 (jcf_parse_source): push/pop parser context. save/restore global.
19011 (parse_source_file): Fixed leading comment. Now take a
19012 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
19013 classes and pop the parser context anymore.
19014 (yyparse): Push parser context, save globals, parse the source
19015 file, restore globals and pop the parser context when processing a
19016 source file.
19017 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
19018 * lex.c (java_parse_doc_section): New function.
19019 (java_lex): Call java_parse_doc_section when appropriate. Build an
19020 operator around INSTANCEOF_TK.
19021 * lex.h (java_lineterminator, java_sprint_unicode,
19022 java_unicode_2_utf8, java_lex_error, java_store_unicode):
19023 Prototypes rewritten.
19024 (java_parse_escape_sequence, java_letter_or_digit_p,
19025 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
19026 java_read_unicode, java_store_unicode, java_read_char,
19027 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
19028 Added function prototypes.
19029 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
19030 define.
19031 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
19032 New macros
19033 (struct parser_ctxt): New fields: deprecated,
19034 current_parsed_class_un, gclass_list.
19035 (fix_method_argument_names, issue_warning_error_from_context,
19036 resolve_package, lookup_package_type): New function prototypes.
19037 (resolve_expression_name): Fixed function prototype.
19038 (find_applicable_accessible_methods_list): Fixed indentation, added
19039 extra argument in prototype.
19040 (check_final_assignment, build_null_of_type, check_deprecation,
19041 check_method_redefinition, reset_method_name,
19042 java_check_regular_methods, java_check_abstract_methods,
19043 maybe_build_primttype_type_ref): New function prototype.
19044 * parse.y (conver.h): Include.
19045 (INSTANCEOF_TK): Tagged <operator>.
19046 (single_type_import_declaration): Use REGISTER_IMPORT macro.
19047 (relational_expression:): Build binop for instanceof.
19048 (java_push_parser_context): Remember ctxp->gclass_list across
19049 contexts.
19050 (java_pop_parser_context): Simply return if no context
19051 exists. Remember gclass_list across contexts.
19052 (issue_warning_error_from_context): New function.
19053 (parse_error_context): Don't setup ctxp->elc here. Call
19054 issue_warning_error_from_context instead.
19055 (parse_warning_context): Likewise.
19056 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
19057 setup. Link new class/interface to ctxp->gclass_list.
19058 (add_superinterfaces): Register interface as incomplete if not
19059 loaded.
19060 (create_class): Remember class unqualified name in
19061 ctxp->current_parsed_class_un. Check class deprecation.
19062 (register_fields): Check field deprecation. Remember static final
19063 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
19064 processing INIT.
19065 (method_header): New local variable ORIG_ARG. Use unqualified
19066 current class name for check on constructor errors. Promote return
19067 type if of record type. Argument list fix moved in
19068 fix_method_argument_names, called here. Check method deprecation.
19069 (fix_method_argument_names): New function.
19070 (method_declarator): Promote record typed arguments.
19071 (safe_layout_class): Check class methods before layout.
19072 (java_complete_class): Compute field layout when patched.
19073 (do_resolve_class): Try to load class after having it renamed
19074 after the package name.
19075 (get_printable_method_name): Use DECL_CONTEXT.
19076 (reset_method_name): New function.
19077 (check_method_redefinition): Use reset_method_name.
19078 (java_check_regular_methods): New local variable
19079 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
19080 names for error report. Check for compile-time error when method
19081 found has default (package) access.
19082 (java_check_abstract_methods): Now takes an interface DECL node as
19083 an argument. Also reinstall real name on unchecked
19084 overriding/hiding methods for error report.
19085 (java_check_methods): Fixed leading comment. Get classes to verify
19086 from ctxp->gclass_list. Use CHECK_METHODS macro and set
19087 CLASS_METHOD_CHECKED_P on class verification.
19088 (lookup_java_method2): Get real method name if necessary.
19089 (find_in_imports): Don't check package class access here.
19090 (resolve_package, lookup_package_type): New functions.
19091 (java_layout_classes): Fixed leading comment. Take classes to be
19092 laid out from ctxp->gclass_list.
19093 (java_complete_expand_methods): Don't expand native and abstract
19094 methods.
19095 (java_expand_classes): New function.
19096 (resolve_expression_name): Use additional argument ORIG. Retrieve
19097 values of static final field of primitive types.
19098 (resolve_field_access): Handles static final field of promotive
19099 type.
19100 (resolve_qualified_expression_name): Handle STRING_CST as
19101 primaries and package name resolution. Check deprecation on found
19102 decls. Set where_found and type_found on non static field resolved
19103 during qualification. Layout non primitive field decl types.
19104 (check_deprecation): New function.
19105 (maybe_access_field): Simplified.
19106 (patch_method_invocation_stmt): Local variable CLASS_TYPE
19107 removed. Reverse method's argument when primary is a type. Don't
19108 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
19109 instead. Include abstract class in the list of class searchable
19110 for constructors. Use DECL_CONTEXT of found method for access
19111 checks. Check method deprecation.
19112 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
19113 converting arguments. Handle INVOKE_INTERFACE.
19114 (lookup_method_invoke): Search constructor using existing
19115 infrastructure (don't rely on lookup_java_constructor anymore).
19116 (find_applicable_accessible_methods_list): Extra argument flag
19117 LC. Now include constructor in the search.
19118 (qualify_ambiguous_name): Conditional expression are primaries.
19119 (not_initialized_as_it_should_p): static final are always
19120 initialized.
19121 (java_complete_tree): Pass extra NULL argument to
19122 resolve_expression_name. Stricter test to carry on patching
19123 assignments. New case for INSTANCEOF_EXPR.
19124 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
19125 (check_final_assignment, maybe_build_primttype_type_ref): New
19126 functions.
19127 (patch_assignment): Detect resolved static finals and carry normal
19128 assignment error check on them. Inline PRIMTYPE.TYPE read access.
19129 (try_builtin_assignconv): Access constant 0 on all primitive
19130 types.
19131 (valid_builtin_assignconv_identity_widening_p): Accept identical
19132 types. Accept all promoted type on int type.
19133 (valid_ref_assignconv_cast_p): Accept a null pointer to be
19134 assigned to a reference.
19135 (valid_method_invocation_conversion_p): Accept to check null
19136 pointers.
19137 (build_binop): Merge declaration and initialization of local
19138 variable BINOP.
19139 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
19140 numeric types. Improved validity test for qualify operators on
19141 references.
19142 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
19143 and PREINCREMENT_EXPR. Also detect resolved static finals of a
19144 primitive type and issue the appropriate error message.
19145 (resolve_type_during_patch): Mark class loaded when resolved.
19146 (patch_cast): Allow null to be cased to reference types.
19147 (build_null_of_type): New function.
19148 (patch_array_ref): Handle array on references correctly.
19149 (patch_return): Removed unused local variable MODIFY. Force
19150 boolean to be returned as integers. Allows null to be returned by
19151 a function returning a reference.
19152 * typeck.c (convert_to_integer, convert_to_real,
19153 convert_to_pointer): Prototypes moved to convert.h
19154 (lookup_argument_method): Use method real name, if necessary.
19155
19156 1998-10-30 Tom Tromey <tromey@cygnus.com>
19157
19158 * class.c (build_class_ref): Changed name of primitive classes to
19159 start with `_Jv_'.
19160
19161 * class.c (make_class_data): Renamed fields: nmethods to
19162 method_count, method_count to dtable_method_count. Always set
19163 `state' field to 0.
19164 * decl.c (init_decl_processing): Likewise.
19165
19166 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
19167
19168 * class.c (layout_class): Don't mangle <finit>, produce
19169 __finit<class> instead. Don't verify artificial methods.
19170 * decl.c (finit_identifier_node): New declared global.
19171 (init_decl_processing): finit_identifier_node initialized.
19172 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
19173 * java-tree.h (finit_identifier_node): Declared as extern.
19174 (struct lang_decl): New field called_constructor.
19175 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
19176 (CLASS_HAS_FINIT_P): New macro.
19177 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
19178 explicit constructor invocation.
19179 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
19180 CALL_SUPER_CONSTRUCTOR_P): New macros.
19181 (write_classfile): Added prototype.
19182 * jcf-parse.c (jcf_parse_source): Parse and remember for
19183 generation if the file was seen on the command line.
19184 (parse_source_file): Don't write the class file here.
19185 (yyparse): Loop on files rewritten. Set current_jcf.
19186 (parse_zip_file_entries): Parse class file only if it was found.
19187 * lang.c (init_parse): Don't open command line provided filename
19188 here.
19189 (lang_parse): Don't set main_jcf anymore.
19190 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
19191 (JCONSTRUCTOR_CHECK): New macro.
19192 (JBSC_TYPE_P): New macro.
19193 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
19194 (COMPLETE_CHECK_OP_2): New macro.
19195 (struct parse_ctxt): New field explicit_constructor_p.
19196 (check_class_interface_creation): Fixed prototype indentation.
19197 (patch_method_invocation_stmt): Prototype reflects added argument.
19198 (patch_invoke): Likewise.
19199 (complete_method_declaration, build_super_invocation,
19200 verify_constructor_circularity,
19201 build_this_super_qualified_invocation, get_printable_method_name,
19202 patch_conditional_expr, maybe_generate_finit, fix_constructors,
19203 verify_constructor_super, create_artificial_method,
19204 start_artificial_method_body, end_artificial_method_body,
19205 generate_field_initialization_code): New function prototypes.
19206 * parse.y: Fixed leading comment
19207 (constructor_header:, constructor_body:, block_end:): Rules tagged
19208 <node>.
19209 (type_declaration:): Call maybe_generate_finit.
19210 (method_declaration:): Action for method_body: placed in new
19211 function complete_method_declaration, called here.
19212 (constructor_declaration:): Defined actions. Removed leading
19213 FIXME.
19214 (constructor_header:): New rule with action.
19215 (constructor_body:): Rule rewritten using block_begin: and
19216 block_end:. Defined actions.
19217 (constructor_declarator:, explicit_constructor_invocation:):
19218 Defined actions.
19219 (block:): Use new rules block_begin: block_end:.
19220 (block_begin:, block_end:): New rules and actions.
19221 (block_statements:): Fixed error message for explicit
19222 constructors.
19223 (method_invocation:): Call build_this_super_qualified_invocation
19224 if primary is `this' or `super' was seen.
19225 (conditional_expression:): Action defined.
19226 (extra_ctxp_pushed_p): New static global flag.
19227 (java_parser_context_save_global): Create parser context if
19228 necessary. Use extra_ctxp_pushed_p to remember it.
19229 (java_parser_context_restore_global): Pop extra parser context if
19230 one exists.
19231 (build_array_from_name): Array on primitive types are marked
19232 loaded.
19233 (register_fields): Restore new name in field initializer
19234 expression if type was altered. Non static fields initialized upon
19235 declaration marked initialized.
19236 (maybe_generate_finit): New function.
19237 (maybe_generate_clinit): Use create_artificial_method,
19238 start_artificial_method_body, end_artificial_method_body. Generate
19239 debug info for enclosed initialization statements.
19240 (method_header): Fixed leading comment. Check constructor
19241 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
19242 accordingly.
19243 (complete_method_declaration, constructor_circularity_msg,
19244 verify_constructor_circularity): New functions.
19245 (get_printable_method_name): New function.
19246 (check_method_redefinition): Don't rename <finit> methods. Fix
19247 declared constructor names. Error message for
19248 constructors modified.
19249 (java_check_regular_methods): Local variable seen_constructor
19250 renamed saw_constructor. Skip verification on constructors. Create
19251 default constructor with create_artificial_method.
19252 (java_check_methods): Removed unnecessary empty line.
19253 (create_artificial_method, start_artificial_method_body,
19254 end_artificial_method_body): New functions.
19255 (java_layout_classes): Changed leading comment. Reverse fields
19256 list if necessary. Always layout java.lang.Object if being
19257 defined.
19258 (java_complete_expand_methods): Verify constructor circularity.
19259 (java_complete_expand_method): Call fix_constructor on
19260 constructors. Local variable no_ac_found removed. Restore
19261 bindings if method body expansion failed.
19262 (fix_constructors, verify_constructor_super,
19263 generate_field_initialization_code): New function.
19264 (java_expand_classes): Fixed leading comment. Write class file
19265 here.
19266 (resolve_expression_name): Check for illegal instance variable
19267 usage within the argument scope of an explicit constructor
19268 invocation.
19269 (resolve_qualified_expression_name): Pass extra from_super flag
19270 when invoking patch_method_invocation_stmt. New case for
19271 conditional expression when used as a primary. Check for error
19272 when acquiring super.
19273 (patch_method_invocation_stmt): Added extra argument super. New
19274 local variable is_static_flag. Set class_to_search according to
19275 the nature of the constructor invocation. Don't add `this'
19276 argument when expanding NEW_CLASS_EXPR. Check for illegal method
19277 invocation within the argument scope of explicit constructor
19278 invocation. Set is_static according to is_static_flag. Provide
19279 extra `super' argument to patch_invoke invocation.
19280 (patch_invoke): New argument from_super. Loop on arguments
19281 indentation fixed. Pass from_super to invocation_mode. New switch
19282 case INVOKE_SUPER. Fixed error message in switch default case.
19283 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
19284 value.
19285 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
19286 (lookup_method_invoke): Fixed prototypes in candidates list. Error
19287 message takes constructors into account.
19288 (find_applicable_accessible_methods_list): Fixed indentation.
19289 (qualify_ambiguous_name): Take explicit constructor invocation
19290 into account. Deal with a conditional expression as a primary to
19291 a method call.
19292 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
19293 case. Added extra argument to patch_method_invocation_stmt.
19294 Register calls made to explicit constructor `this'. Don't call
19295 save_expr in ARRAY_REF case when emitting class files. Check for
19296 illegal use of this when expanding explicit constructor invocation
19297 arguments.
19298 (complete_function_arguments): Set and reset parser context
19299 explicit_constructor_p field value when appropriate.
19300 (build_super_invocation, build_this_super_qualified_invocation):
19301 New functions.
19302 (patch_assignment): Fixed typo.
19303 (patch_unaryop): Check on final fields occurs only when a decl
19304 exits.
19305 (patch_return): Take constructors into account.
19306 (patch_conditional_expr): New function.
19307 * typeck.c (build_java_signature): Removed unnecessary empty line.
19308
19309 1998-10-28 Jeffrey A Law (law@cygnus.com)
19310
19311 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
19312
19313 1998-10-28 Tom Tromey <tromey@cygnus.com>
19314
19315 * decl.c (init_decl_processing): Renamed fields.
19316 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
19317 interface_len, msize fields.
19318
19319 * class.c (make_class_data): Removed subclass_head and
19320 subclass_next fields.
19321 * decl.c (init_decl_processing): Removed subclass_head and
19322 subclass_next fields.
19323
19324 1998-10-28 Jeffrey A Law (law@cygnus.com)
19325
19326 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
19327 * mangle.c (emit_unicode_mangled_name): Similarly.
19328
19329 1998-10-26 Nick Clifton <nickc@cygnus.com>
19330
19331 * jcf-parse.c (get_constant): Place braces around code to compute
19332 'd' when REAL_ARITHMETIC is not defined.
19333
19334 1998-10-25 H.J. Lu (hjl@gnu.org)
19335
19336 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
19337 dependency.
19338
19339 1998-10-23 Tom Tromey <tromey@cygnus.com>
19340
19341 * lang-specs.h: `.zip' files are input to jc1.
19342
19343 1998-10-22 Per Bothner <bothner@cygnus.com>
19344
19345 * jvspecs.c: Add (but don't enable) support for combining multiple
19346 .class and .java input filenames to a single jc1 invocation.
19347 Add support for -C flag (copile to .class files).
19348 Translate -classpath and -CLASSPATH arguments.
19349 * lang-specs.h: Don't set %2 spec.
19350
19351 1998-10-22 Tom Tromey <tromey@cygnus.com>
19352
19353 * jcf-path.c (add_entry): Don't add trailing separator if entry is
19354 a .zip file.
19355 (add_path): Don't add trailing separator to non-empty path
19356 elements.
19357
19358 * lang.c (lang_decode_option): Check for -fclasspath and
19359 -fCLASSPATH before examining other `-f' options.
19360
19361 * java-tree.h (finalize_identifier_node): Don't declare.
19362 * class.c (make_class_data): Don't push "final" field.
19363 * decl.c (init_decl_processing): Don't push "final" field.
19364 (finalize_identifier_node): Removed.
19365 (init_decl_processing): Don't set finalize_identifier_node.
19366
19367 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
19368
19369 1998-10-11 Anthony Green <green@cygnus.com>
19370
19371 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
19372 (JV_SCAN_SOURCES): New macro.
19373 (JCF_DUMP_SOURCES): Likewise.
19374 (jcf-dump$(exeext)): New target.
19375 (jv-scan$(exeext)): New target.
19376
19377 1998-10-22 Tom Tromey <tromey@cygnus.com>
19378
19379 * Makefile.in (LEX): Removed.
19380 (LEXFLAGS): Likewise.
19381 (SET_BISON): New macro.
19382 (BISON): Removed.
19383 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
19384 spurious diffs in parse.c.
19385 ($(PARSE_SCAN_C)): Likewise.
19386 (PARSE_DIR): New macro.
19387 (PARSE_C): Use it.
19388 (PARSE_SCAN_C): Likewise.
19389 (PARSE_RELDIR): New macro.
19390
19391 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
19392
19393 * jcf-io.c (find_class): Use saw_java_source to determine when to
19394 look for `.java' file.
19395 * jcf-parse.c (saw_java_source): New global.
19396 (yyparse): Set it if `.java' file seen.
19397
19398 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
19399 (GCJH_SOURCES): Likewise.
19400 * Makefile.in (datadir): New macro.
19401 (libjava_zip): Likewise.
19402 (JAVA_OBJS): Added jcf-path.o.
19403 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19404 (../gcjh$(exeext)): Likewise.
19405 (jcf-path.o): New target.
19406 * java-tree.h (fix_classpath): Removed decl.
19407 * jcf-parse.c (fix_classpath): Removed.
19408 (load_class): Don't call fix_classpath.
19409 * parse.y (read_import_dir): Don't call fix_classpath.
19410 * lex.h: Don't mention classpath.
19411 * lex.c (java_init_lex): Don't initialize classpath.
19412 * jcf-io.c (classpath): Removed global.
19413 (find_class): Use jcf_path iteration functions. Correctly search
19414 class path for .java file.
19415 (open_in_zip): New argument `is_system'.
19416 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
19417 classpath-related options.
19418 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
19419 and -I.
19420 (lang_init): Call jcf_path_init.
19421 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
19422 * lang-specs.h: Handle -I. Minor cleanup to -M options.
19423 Correctly put braces around second string in each entry.
19424 * gjavah.c (main): Call jcf_path_init. Recognize all the new
19425 classpath-related options.
19426 (help): Updated for new options.
19427 * jcf.h: Declare functions from jcf-path.c. Don't mention
19428 `classpath' global.
19429 * jcf-path.c: New file.
19430
19431 * jcf-depend.c: Include jcf.h.
19432
19433 * jcf-write.c (localvar_alloc): Returns `void'.
19434 (localvar_free): Removed unused variable.
19435
19436 * lang.c (OBJECT_SUFFIX): Define if not already defined.
19437 (init_parse): Use OBJECT_SUFFIX, not ".o".
19438
19439 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
19440
19441 * class.c (emit_register_classes): Renamed from
19442 emit_register_class.
19443 * java-tree.h (emit_register_classes): Prototype renamed from
19444 emit_register_class.
19445 * jcf-parse.c (yyparse): Call emit_register_classes once before
19446 returning.
19447 * parse.y (java_expand_classes): No longer register classes.
19448
19449 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
19450
19451 * class.c (is_compiled_class): New local variable
19452 seen_in_zip. Identify classes found in currently compiled source
19453 file(s).
19454 * decl.c (complete_start_java_method): Fixed typo.
19455 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
19456 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
19457 (CLASS_P): Moved around.
19458 (java_parse_abort_on_error): Macro moved from jcf-parse.c
19459 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
19460 java-tree.h
19461 (jcf_parse_source): Changed leading comment. Removed unnecessary
19462 fclose and CLASS_FROM_SOURCE_P marking.
19463 (parse_source_file): New local variables remember_for_generation
19464 and filename. Mark parsed file name identifier node. Removed block
19465 executed when parse_only was null. Set remember_for_generation.
19466 Use it as an argument to java_pop_parser_context.
19467 (yyparse): New local variables several_files, list, next node and
19468 current_file_list. Split ampersand separated file names into
19469 current_file_list. Iterate through the list and parse accordingly.
19470 * parse.h (java_pop_parser_context): New function prototype.
19471 * parse.y (ctxp_for_generation): New static global variable.
19472 (java_pop_parser_context): New argument generate. Link popped ctxp
19473 to ctxp_for_generation list accordingly.
19474 (java_complete_expand_methods): Fixed indentation.
19475 (java_expand_classes): New function.
19476
19477 1998-10-17 Per Bothner <bothner@cygnus.com>
19478
19479 * Makefile.in: Link with libiberty.a instead of memmove.o.
19480
19481 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
19482
19483 * lex.c (setjmp.h): No longer included.
19484 * lex.h (setjmp.h): Included.
19485 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
19486 (duplicate_declaration_error_p): Renamed from
19487 duplicate_declaration_error.
19488 (build_array_from_name): New function prototype.
19489 * parse.y (setjmp.h): No longer included.
19490 (variable_declarator_id): Define action.
19491 (build_array_from_name): New function.
19492 (duplicate_declaration_error_p): Renamed from
19493 duplicate_declaration_error. Fixed leading comment.
19494 (register_fields): Main `for' loop reorganized. Uses
19495 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
19496 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
19497 build_array_from_name.
19498 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
19499 types.
19500 (read_import_dir): Don't try to skip `.' and `..'.
19501 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
19502 build_array_from_name. Main `for' loop reorganized.
19503 (resolve_qualified_expression_name): When building access to a
19504 field, use the type where the field was found, not its own type.
19505 (maybe_access_field): Use field DECL_CONTEXT if the type where the
19506 field was found is null.
19507 (qualify_ambiguous_name): Sweep through all successive array
19508 dimensions.
19509
19510 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
19511
19512 * java-tree.h (pop_labeled_block, lang_printable_name,
19513 maybe_add_interface, set_super_info, get_access_flags_from_decl,
19514 interface_of_p, inherits_from_p, fix_classpath,
19515 complete_start_java_method, emit_handlers, init_outgoing_cpool,
19516 make_class_data, register_class, alloc_name_constant): New
19517 function prototypes.
19518 * lang.c (lang_decode_option): Set argc argument unused. Fixed
19519 indentation. Added cast to remove warning.
19520 (lang_printable_name): Set v argument unused.
19521 (lang_print_error): Added argument to lang_printable_name call.
19522 (java_dummy_print, print_lang_decl, print_lang_type,
19523 print_lang_identifier, lang_print_xnode): All argument marked
19524 unused.
19525 * lex.c (java_unget_unicode): Removed unnecessary argument.
19526 (java_allocate_new_line): Unused local variable is gone.
19527 (java_read_char): Added parenthesis in expressions to remove
19528 warnings. Added final return statement.
19529 (java_read_unicode): Added parenthesis in expression to remove
19530 warning.
19531 (java_parse_end_comment): Fixed java_unget_unicode invocation.
19532 (java_parse_escape_sequence): Likewise.
19533 (java_lex): Unused local variables are gone. Fixed
19534 java_unget_unicode invocation.
19535 * lex.h (set_float_handler): Prototype added when JC1_LITE not
19536 defined.
19537 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19538 lang_printable_name invocation in macro.
19539 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19540 Likewise.
19541 (duplicate_declaration_error): Suppressed unused argument in
19542 prototype.
19543 (identical_subpath_p): Function declaration is gone.
19544 (patch_invoke): Suppressed unused argument in prototype.
19545 (patch_cast, build_labeled_block, check_thrown_exceptions):
19546 Likewise.
19547 * parse.y (setjmp.h): Included
19548 (toplev.h): Likewise.
19549 (field_declaration:): Suppressed unused local
19550 (label_decl:): Fixed build_labeled_block invocation.
19551 (java_pop_parser_context): Put extra parenthesis around assignment
19552 in if.
19553 (yyerror): Suppressed unused local variables.
19554 (variable_redefinition_error): Fixed lang_printable_name
19555 invocation.
19556 (create_interface): Suppressed unused local variables.
19557 (create_class): Likewise.
19558 (duplicate_declaration_error): Suppressed unused argument. Fixed
19559 lang_printable_name invocation.
19560 (register_fields): Suppressed unused local variable. Fixed
19561 duplicate_declaration_error invocation.
19562 (method_header): Suppressed unused local variable.
19563 (method_declarator, parser_check_super): Likewise.
19564 (java_complete_class): Suppressed unused local variable. Fixed
19565 fatal error message.
19566 (complete_class_report_errors): Added default: in switch.
19567 (java_check_regular_methods): Fixed lang_printable_name
19568 invocations.
19569 (check_throws_clauses): Likewise.
19570 (java_check_abstract_methods): Suppressed unused local
19571 variable. Fixed lang_printable_name invocation.
19572 (read_import_entry): Added supplemental return statement.
19573 (read_import_dir): Suppressed unused local variables.
19574 (check_pkg_class_access, declare_local_variables): Likewise.
19575 (source_start_java_method): Suppressed unused extern variable
19576 declarations
19577 (expand_start_java_method): Suppressed unused extern and local
19578 variable declarations.
19579 (java_complete_expand_methods): Likewise.
19580 (java_complete_expand_method): Suppressed unused local variables.
19581 (make_qualified_name): Likewise.
19582 (resolve_qualified_expression_name): Added default: in
19583 switch. Fixed lang_printable_name invocation.
19584 (class_instance_creation_expression): Added parenthesis around
19585 expressions.
19586 (patch_method_invocation_stmt): Fixed lang_printable_name and
19587 patch_invoke invocations.
19588 (check_for_static_method_reference): Fixed lang_printable_name
19589 invocation.
19590 (patch_invoke): Suppressed unused arguments and local variables.
19591 (lookup_method_invoke): Suppressed unused local variables.
19592 (qualify_ambiguous_name): Added default: in switch.
19593 (identical_subpath_p): Function removed.
19594 (patch_assignment): Suppressed unused local variables. Suppressed
19595 unnecessary if statement. Fixed lang_printable_name invocations.
19596 (try_builtin_assignconv): Fixed lang_printable_name invocations.
19597 (valid_ref_assignconv_cast_p): Parenthesis around
19598 expression. Suppressed unused local variables.
19599 (build_binop): Suppressed unused local variables. fixed
19600 lang_printable_name invocations.
19601 (string_constant_concatenation): Suppressed unused local
19602 variables.
19603 (patch_unaryop): Fixed lang_printable_name invocation.
19604 (patch_cast): Suppressed unnecessary argument. Fixed
19605 lang_printable_name invocation.
19606 (patch_array_ref): Fixed lang_printable_name invocation.
19607 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19608 (build_labeled_block): Suppressed unused argument.
19609 (generate_labeled_block): Fixed build_labeled_block invocation.
19610 (build_loop_body): Suppressed unused local variables.
19611 (patch_loop_statement): Likewise.
19612 (patch_exit): Fixed lang_printable_name invocation.
19613 (patch_switch_statement): Likewise.
19614 (case_identity): First argument marked unused.
19615 (patch_try_statement): Fixed lang_printable_name invocations.
19616 (patch_synchronized_statement, patch_throw_statement): Likewise.
19617 (check_thrown_exceptions): Fixed check_thrown_exceptions and
19618 lang_printable_name invocations.
19619 (check_thrown_exceptions_do): Suppressed unused argument.
19620
19621 1998-10-14 Tom Tromey <tromey@cygnus.com>
19622
19623 * jcf-write.c (write_classfile): Add output class file as target.
19624 * lang-options.h: Added -MD, -MMD, -M, and -MM.
19625 * jcf.h: Added declarations for dependency-tracking functions.
19626 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19627 * lang.c (lang_decode_option): Recognize -MD and -MMD.
19628 (finish_parse): Call jcf_dependency_write.
19629 (dependency_tracking): New global.
19630 (DEPEND_SET_FILE): New define.
19631 (DEPEND_ENABLE): New define.
19632 (init_parse): Enable dependency tracking if required.
19633 Include "flags.h".
19634 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19635 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19636 (../gcjh$(exeext)): Likewise.
19637 (jcf-depend.o): New target.
19638 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19639 (GCJH_SOURCES): Likewise.
19640 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
19641 dep_name argument.
19642 (find_classfile): Added dep_name argument.
19643 (find_class): Compute name of dependency.
19644 (open_in_zip): Call jcf_dependency_add_file.
19645 * gjavah.c (output_file): No longer global.
19646 (usage): Don't mention "gjavah".
19647 (help): Likewise.
19648 (java_no_argument): Likewise.
19649 (version): Likewise.
19650 (main): Recognize and handle -M family of options.
19651 (print_mangled_classname): Return is void.
19652 (process_file): Handle case where output is suppressed.
19653 (HANDLE_END_FIELD): Likewise.
19654 (HANDLE_METHOD): Likewise.
19655 * jcf-depend.c: New file.
19656
19657 1998-10-13 Jeffrey A Law (law@cygnus.com)
19658
19659 * java-tree.def: Add missing newline at EOF.
19660
19661 1998-10-13 Tom Tromey <tromey@cygnus.com>
19662
19663 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19664 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
19665 function.
19666 Include <config.h> and "system.h".
19667 (disassemble_method): Undefine RET to avoid clash with
19668 config/i386/i386.h.
19669
19670 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
19671
19672 * decl.c (runtime_exception_type_node, error_exception_type_node):
19673 New global variables.
19674 (init_decl_processing): Initialized.
19675 * expr.c (java_lang_expand_expr): Set caught exception type to
19676 null if catch handler argument doesn't exit.
19677 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19678 tree codes.
19679 * java-tree.h (runtime_exception_type_node,
19680 error_exception_type_node): Global variables declared.
19681 (DECL_FUNCTION_THROWS): New macro.
19682 (DECL_FUNCTION_BODY): Modified comment.
19683 (DECL_SPECIFIC_COUNT): Likewise.
19684 (struct lang_decl): New field throws_list.
19685 (IS_UNCHECKED_EXPRESSION_P): New macro.
19686 * lex.c (java_lex): Generate location information for THROW_TK.
19687 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19688 EXCEPTIONS_P): New macros.
19689 (enum jdep_code): New value JDEP_EXCEPTION.
19690 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19691 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19692 PATCH_METHOD_RETURN_ERROR): New macros.
19693 (patch_method_invocation_stmt): Added new argument to prototype.
19694 (patch_synchronized_statement, patch_throw_statement,
19695 check_thrown_exceptions, check_thrown_exceptions_do,
19696 purge_unchecked_exceptions, check_throws_clauses): New function
19697 prototypes.
19698 * parse.y Fixed typo in keyword section.
19699 (throw:): Rule tagged <node>.
19700 (THROW_TK): Keyword tagged <operator>.
19701 (method_header:): Last argument to call to method_header passed
19702 from throws: rule.
19703 (throws:, class_type_list:, throw_statement:,
19704 synchronized_statement:, synchronized:): Defined actions.
19705 (method_header): New local variable current. Register exceptions
19706 from throws clause.
19707 (java_complete_tree): Complete and verify exceptions from throws
19708 clause.
19709 (complete_class_report_errors): Error message on exceptions not
19710 found
19711 (java_check_regular_methods): Fixed typo. Shortcut on private
19712 overriding methods. Changed error message on method
19713 redefinition. Check for throws clause compatibility.
19714 (check_throws_clauses): New function.
19715 (java_check_abstract_methods): Use DECL_NAME for wfl or current
19716 method. Changed error message on method redefinition.
19717 (currently_caught_type_list): New static variable.
19718 (java_complete_expand_methods): Purge unchecked exceptions from
19719 throws clause list. Call PUSH_EXCEPTIONS before walk and
19720 POP_EXCEPTIONS after.
19721 (resolve_qualified_expression_name): Pass new argument as NULL to
19722 patch_method_invocation_stmt.
19723 (patch_method_invocation_stmt): New argument ref_decl. Invoke
19724 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19725 argument list when appropriate. Use new argument if non null to
19726 store selected method decl.
19727 (patch_invoke): Convert if necessary args of builtin types before
19728 forming CALL_EXPR. Argument list no longer reversed here.
19729 (invocation_mode): Treat final methods as static methods.
19730 (java_complete_tree): New cases for THROW_EXPR: and
19731 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19732 function call.
19733 (complete_function_arguments): No more RECORD_TYPE
19734 conversion. Function parameter nodes no longer saved.
19735 (valid_ref_assignconv_cast_p): Avoid handling null type.
19736 (patch_binop): Fixed null constant reference handling.
19737 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19738 BUILD_THROW macros.
19739 (patch_try_statement): Fixed comments. Record caught types in
19740 list, push the list, expand try block and pop the list.
19741 (patch_synchronized_statement, patch_throw_statement,
19742 check_thrown_exceptions, check_thrown_exceptions_do,
19743 purge_unchecked_exceptions): New functions.
19744 * typeck.c (lookup_argument_method): Allow WFL in place of method
19745 DECL_NAME during method definition check
19746
19747 1998-10-09 Tom Tromey <tromey@cygnus.com>
19748
19749 * gjavah.c (decode_signature_piece): New function.
19750 (print_c_decl): Use it. Added `name_override' argument.
19751 (print_method_info): Use name_override argument to print_c_decl.
19752 (seen_fields): Removed.
19753 (print_field_info): Don't update seen_fields.
19754 (struct method_name): New structure.
19755 (method_name_list): New global.
19756 (print_method_info): Add new method to list of methods.
19757 (name_is_method_p): New function.
19758 (print_field_info): If field name has same name as method, then
19759 change field name.
19760 (process_file): Parse methods before fields.
19761 (field_pass): New global.
19762 (HANDLE_END_FIELD): Take field_pass into account.
19763
19764 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19765
19766 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19767 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19768
19769 1998-10-03 Anthony Green <green@cygnus.com>
19770
19771 * jvspec.c: Fix bug in jvgenmain_spec patch.
19772
19773 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19774
19775 * Makefile.in (lang.o:): Install dependency on java-tree.def.
19776 * decl.c (soft_exceptioninfo_call_node): New global variable.
19777 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19778 takes extra integer argument. soft_exceptioninfo_call_node
19779 initialized.
19780 * except.c (java_set_exception_lang_code): New function
19781 (method_init_exceptions): Called here.
19782 (prepare_eh_table_type): New function.
19783 (expand_end_java_handler): Called here.
19784 * expr.c (build_java_throw_out_of_bounds_exception): Now features
19785 one argument. Modified generation of call to
19786 soft_badarrayindex_node to use new argument.
19787 (build_java_arrayaccess): Pass faulty index value to
19788 build_java_throw_out_of_bounds_exception.
19789 (generate_name): New function.
19790 (java_lang_expand_expr): New local variables node, current,
19791 has_finally_p. Expand TRY_EXPR node.
19792 (process_jvm_instruction): Replace top of the stack with thrown
19793 object reference when entering exception handler.
19794 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19795 specific tree codes.
19796 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19797 global.
19798 (DECL_SPECIFIC_COUNT): New macro.
19799 (prepare_eh_table_type, java_set_exception_lang_code,
19800 generate_name): New function declarations.
19801 (match_java_method): Declaration deleted.
19802 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19803 macros.
19804 * lex.c (TRY_TK, CATCH_TK): Generate location information.
19805 * parse.h (redefinition_error, refine_accessible_methods_list,
19806 can_cast_to_p): Function declaration removed.
19807 (classitf_redefinition_error, variable_redefinition_error,
19808 parse_jdk1_1_error, find_applicable_accessible_methods_list,
19809 find_most_specific_methods_list, argument_types_convertible,
19810 enter_a_block, valid_builtin_assignconv_identity_widening_p,
19811 valid_cast_to_p, valid_method_invocation_conversion_p,
19812 try_reference_assignconv, add_stmt_to_compound,
19813 build_jump_to_finally, build_tree_list, patch_try_statement,
19814 java_get_catch_block): New function declarations.
19815 * parse.y (string_buffer_type): Global variable deleted.
19816 (group_of_labels, catches, catch_clause, catch_clause_parameter,
19817 finally): Rules tagged <node>.
19818 (TRY_TK, CATCH_TK): Token tagged <operator>.
19819 (class_body_declaration:, class_member_declaration:,
19820 formal_parameter:, explicit_constructor_invocation:,
19821 interface_member_declaration:, constant_declaration:,
19822 primary_no_new_array:, class_instance_creation_expression:,
19823 array_creation_expression:): Issue error on unsuported JDK1.1
19824 features.
19825 (try_statement:, catches:, finally:): Define actions.
19826 (catch_clause_parameter): New rule.
19827 (catch_clause:): Use new rule catch_clause_parameter.
19828 (parse_jdk1_1_error): New function.
19829 (redefinition_error): Renamed classitf_redefinition_error.
19830 (variable_redefinition_error): New function.
19831 (check_class_interface_creation): Call
19832 classitf_redefinition_error.
19833 (java_complete_tree): Added error message on JDEP_TYPE: case.
19834 (complete_class_report_errors): Fixed indentation.
19835 (declare_local_variables): Call variable_redefinition_error.
19836 (source_end_java_method): Call java_set_exception_lang_code and
19837 emit_handlers where appropriate.
19838 (java_method_add_stmt): Call add_stmt_to_block.
19839 (add_stmt_to_block): New function.
19840 (lookup_method_invoke): Fixed outside comment. new local variable
19841 candicates. Call find_applicable_accessible_methods_list and
19842 find_most_specific_methods_list when searching for a
19843 method. Modified error report to list possible candidates when
19844 applicable.
19845 (find_applicable_accessible_methods_list,
19846 find_most_specific_methods_list, argument_types_convertible): New
19847 function.
19848 (refine_accessible_methods_list): Function deleted.
19849 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
19850 expr (if applicable) before calling patch_array_ref.
19851 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19852 (enter_block): Fixed comment.
19853 (enter_a_block): New function.
19854 (patch_assignment): Reorganized. Call try_reference_assignconv for
19855 references. Call valid_cast_to_p instead of can_cast_to_p.
19856 (try_reference_assignconv,
19857 valid_builtin_assignconv_identity_widening_p): New functions.
19858 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19859 (valid_cast_to_p, valid_method_invocation_conversion_p): New
19860 functions.
19861 (build_string_concatenation): Don't resolve StringBuffer.
19862 (patch_cast): Fixed inverted arguments.
19863 (patch_array_ref): Code to save array expr deleted. Call
19864 valid_cast_to_p instead of can_cast_to_p.
19865 (generate_labeled_block): Call generate_name.
19866 (build_jump_to_finally, build_try_statement, java_get_catch_block,
19867 patch_try_statement): New functions.
19868 * typeck.c (match_java_method): Function deleted.
19869
19870 1998-10-02 Anthony Green <green@cygnus.com>
19871
19872 * jvspec.c: jvgenmain_spec uses different temporary file names.
19873
19874 1998-10-02 Anthony Green <green@cygnus.com>
19875
19876 * jvspec.c (lang_specific_driver): Fail if user specifies
19877 --main= when not linking.
19878
19879 1998-09-28 Tom Tromey <tromey@cygnus.com>
19880
19881 * class.c (make_class_data): Push value for `thread' field.
19882 * decl.c (init_decl_processing): Added `thread' field to class.
19883
19884 * class.c (add_field): Always make static fields externally
19885 visible.
19886
19887 1998-09-26 Anthony Green <green@cygnus.com>
19888
19889 * expr.c (build_java_athrow,
19890 build_java_throw_out_of_bounds_exception, expand_invoke,
19891 build_newarray, expand_java_multianewarray, build_java_monitor):
19892 Update comments to reflect _Jv_* function names.
19893
19894 1998-09-25 Per Bothner <bothner@cygnus.com>
19895
19896 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
19897 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
19898 * parse.y (expand_start_java_method): Likewise.
19899
19900 1998-09-24 Per Bothner <bothner@cygnus.com>
19901
19902 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
19903
19904 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
19905 (add_field): No longer need to convert from RECORD_TYPE to pointer,
19906 * expr.c: Remove no-longer-needed calls to promote_type.
19907 * decl.c (give_name_to_locals): Liekwise.
19908 * jcf-parse.c (get_class_constant): Compensate for new signatures.
19909 * parse.y: Add/remove promote_type calls as appropriate.
19910 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
19911 (parse_signature_string): Likewise.
19912 (build_java_array_type): Fix for now signature convenions.
19913
19914 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
19915
19916 1998-09-23 Tom Tromey <tromey@cygnus.com>
19917
19918 * class.c (init_class_processing): libjava function renamed to
19919 _Jv_RegisterClass.
19920
19921 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
19922
19923 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
19924 * java-tree.def: Fixed DEFTREECODE third argument.
19925 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
19926 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
19927 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
19928 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19929 JAVA_THIS_EXPR): Now replaced by tree code definitions.
19930 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
19931 * lang.c (java_tree_code_type, java_tree_code_length,
19932 java_tree_code_name): New arrays.
19933 (lang_init): Append Java tree node definitions to Gcc ones.
19934 * lex.c (expression_obstack): Declared as extern when JC1_LITE
19935 defined.
19936 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
19937 wfl_to_string.
19938 (java_lex): Allow declaration of empty string constants. Retain
19939 location information on CASE_TK and DEFAULT_TK.
19940 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
19941 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
19942 Modified to be more robust.
19943 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
19944 (build_new_invocation, try_builtin_assignconv,
19945 patch_switch_statement, string_constant_concatenation,
19946 build_string_concatenation, patch_string_cst, patch_string,
19947 java_expand_switch): New function declarations.
19948 * parse.y: Rules related to switch and EH tagged <node>.
19949 (label_id): Set to NULL_TREE
19950 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
19951 tree nodes.
19952 (this_or_super:): Fixed indentation.
19953 (statement:, statement_nsi:, statement_without_trailing_substatement:,
19954 statement_expression:): Removed call to RULE on all sub-rules.
19955 (switch_expression:, switch_labels:): New rules.
19956 (switch_statement:, switch_block:, switch_block_statement_groups:,
19957 switch_block_statement_group:, switch_labels:, switch_label:):
19958 Defined actions.
19959 (throw_statement:, synchronized_statement:, try_statement:):
19960 Defined temporary actions.
19961 (class_instance_creation_expression:): Call
19962 build_new_invocation. Fixed indentation.
19963 (field_access): Fixed indentation.
19964 (method_invocation): Likewise.
19965 (make_qualified_primary): Use THIS_EXPR.
19966 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
19967 resolving from SUPER, set *type_found.
19968 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
19969 (java_complete_tree): Removed unused local variable `location'. Case
19970 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
19971 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
19972 on MODIFY_EXPR: and all binary operator tree code cases. Removed
19973 STRING_CST: case. default: checks for patchable strings.
19974 (complete_function_arguments): Transform string constant or
19975 crafted StringBuffer if necessary.
19976 (build_method_invocation): Fixed comments.
19977 (build_new_invocation): New function.
19978 (patch_assignment): Call try_builtin_assignconv to figure a valid
19979 assignment conversion between builtin types.
19980 (try_builtin_assignconv): New function.
19981 (build_binop): Use URSHIFT_EXPR directly to call build.
19982 (operator_string): Use UNARY_PLUS_EXPR.
19983 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
19984 operator.
19985 (do_merge_string_cste, merge_string_cste,
19986 string_constant_concatenation, build_string_concatenation,
19987 patch_string, patch_string_cst): New function.
19988 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
19989 (patch_unaryop): Likewise. New test of valid ++/-- operands.
19990 (build_newarray_node): Use NEW_ARRAY_EXPR.
19991 (build_this): Use THIS_EXPR.
19992 (build_return): Enable debug information on return statement.
19993 (build_if_else_statement): Likewise.
19994 (complete_labeled_statement): Fixed related comment.
19995 (build_loop_body): Fixed comment.
19996 (build_bc_statement): Enable debug information on break/continue
19997 statements.
19998 (patch_bc_statement): Fixed typos. Handle SWITCH statement
19999 context.
20000 (patch_switch_statement, case_identity, java_expand_switch): New
20001 functions.
20002
20003 1998-09-21 Per Bothner <bothner@cygnus.com>
20004
20005 * buffer.h (BUFFER_INIT): New macro.
20006 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
20007 Pass (struct jcf_partial *state) to most functions.
20008 (jcf_block, jcf_relocation): New types.
20009 Support labels, branches, conditionals, loops.
20010
20011 1998-09-21 Tom Tromey <tromey@cygnus.com>
20012
20013 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
20014
20015 1998-09-21 Per Bothner <bothner@cygnus.com>
20016
20017 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
20018 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
20019 not integer_type_node (INT_TYPE_SIZ bits).
20020
20021 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
20022
20023 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
20024 * jcf-dump.c (print_exception_table): New function.
20025 (disassemble_method): Better handling of wide instructions.
20026 Make more robust for bad input.
20027
20028 1998-09-30 Jeffrey A Law (law@cygnus.com)
20029
20030 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
20031 FreeBSD.
20032
20033 1998-09-17 Jeffrey A Law (law@cygnus.com)
20034
20035 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
20036
20037 1998-09-17 Tom Tromey <tromey@cygnus.com>
20038
20039 * Makefile.in ($(PARSE_H)): Removed target.
20040
20041 1998-09-17 Jeffrey A Law (law@cygnus.com)
20042
20043 * Makefile.in (JAVA_OBJS): Add memmove.o
20044 (memmove.o): New target & rules.
20045
20046 1998-09-15 Tom Tromey <tromey@cygnus.com>
20047
20048 * expr.c (expand_invoke): Don't generate a call to the class init
20049 code.
20050
20051 1998-09-14 Jeffrey A Law (law@cygnus.com)
20052
20053 * Makefile.in: Add many missing dependencies.
20054 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
20055 as appropriate.
20056 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
20057 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
20058
20059 1998-09-11 Per Bothner <bothner@cygnus.com>
20060
20061 * decl.c (complete_start_java_method): If method is static (and
20062 not private) call _Jv_InitClass.
20063 * expr.c (expand_invoke): Don't call build_class_init.
20064
20065 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
20066
20067 1998-09-10 Jeffrey A Law (law@cygnus.com)
20068
20069 * Make-lang.in (GCJ): Define before using.
20070
20071 1998-09-09 Jeffrey A Law (law@cygnus.com)
20072
20073 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
20074 losing due to namespace pollution in GNU getopt.h
20075
20076 1998-09-09 Tom Tromey <tromey@cygnus.com>
20077
20078 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
20079 (java.all.cross): Likewise.
20080 (java.rest.encap): Likewise.
20081
20082 1998-09-08 Jeffrey A Law (law@cygnus.com)
20083
20084 * gjavah.c (print_class_decls): Fix thinko in arglist
20085 * jcv-io.c (find_classfile): Similarly.
20086
20087 1998-09-07 Jeffrey A Law (law@cygnus.com)
20088
20089 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
20090
20091 1998-09-05 Tom Tromey <tromey@cygnus.com>
20092
20093 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
20094 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
20095 * Makefile.in (PARSE_C): New macro.
20096 (PARSE_H): Likewise.
20097 (PARSE_SCAN_C): Likewise.
20098 ($(PARSE_C)): Target renamed from parse.c.
20099 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
20100 (clean): Remove parse-scan.c as well.
20101 (parse.o): Depend on $(PARSE_C).
20102
20103 1998-09-05 Anthony Green <green@cygnus.com>
20104
20105 * README, license.terms: Removed.
20106
20107 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
20108 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
20109 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
20110 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
20111 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
20112 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
20113 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
20114 and Java trademark attribution.
20115
20116 1998-09-04 Tom Tromey <tromey@cygnus.com>
20117
20118 * Makefile.in: Use gcjh, not gjavah.
20119 * config-lang.in (stagestuff): Use gcjh, not gjavah.
20120 * Make-lang.in: Changed gjavah to gcjh everywhere.
20121
20122 1998-09-03 Per Bothner <bothner@cygnus.com>
20123
20124 * gjavah.c: Support new -prepend -add -append flags.
20125 (print_method_info): Method is not virtual if class is final.
20126
20127 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
20128
20129 * jv-scan.c: Fixed copyright assignment.
20130 * keyword.gperf: Likewise.
20131 * keyword.h: Likewise.
20132 * lex.c: Fixed copyright assignment.
20133 (java_lex): Push unicode back when parsing '<'.
20134 * lex.h: Fixed copyright assignment.
20135 * parse-scan.y: Likewise.
20136 * parse.h: Fixed copyright assignment.
20137 (build_debugable_stmt, complete_for_loop): New function prototypes.
20138 * parse.y: Fixed copyright assignment.
20139 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
20140 size_zero_node when completing a loop with no exit condition.
20141 (for_statement_nsi:): Define action.
20142 (for_init:, for_update:): Return size_zero_node when empty.
20143 (declare_local_variables): Call build_debugable_stmt.
20144 (build_debugable_stmt): New function.
20145 (build_loop_body): Build debugable statement around loop
20146 condition part.
20147 (complete_loop_body): Take into account the debugable statement
20148 around the EXIT_EXPR.
20149 (complete_loop_body): New function.
20150 (patch_exit_expr): Fixed condition inversion.
20151
20152 1998-09-02 Tom Tromey <tromey@cygnus.com>
20153
20154 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
20155 name of thread define.
20156 * jvspec.c (THREAD_NAME): New macro.
20157 (GCLIB): Likewise.
20158 (THREADLIB): Likewise.
20159 (lang_specific_driver): Recognize attempt to link with thread
20160 library or gc library. Recognize -ljava on command line so it
20161 isn't linked against more than once.
20162
20163 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20164
20165 * parse-scan.y (report_main_declaration): Name of the class
20166 containing `main' can be a qualified name.
20167
20168 1998-08-31 Tom Tromey <tromey@cygnus.com>
20169
20170 * config-lang.in: Changed gjavac to gjc everywhere.
20171 * Make-lang.in: Changed gjavac to gjc everywhere.
20172
20173 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20174
20175 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
20176 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
20177 and install the files.
20178 * Makefile.in (JAVA_OBJS_LITE): New variable.
20179 (compiler:): Now include jv-scan as a dependency.
20180 (../jv-scan$(exeext), parse-scan.c): New targets.
20181 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
20182 * config-lang.in (compilers): Removed gcj, gjavah from the list.
20183 * jcf-parse.c (parse_source_file): Call java_layout_classes and
20184 check for errors even if parse_only.
20185 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
20186 defined.
20187 (yylex): New function. Uses java_lex body.
20188 (java_lex): Removed commented out statement. Remove local variable
20189 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
20190 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
20191 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
20192 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
20193 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
20194 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
20195 where appropriate.
20196 (java_lex_error): Empty if JC1_LITE is defined.
20197 (java_get_line_col): Return 0 if JC1_LITE is defined.
20198 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
20199 SET_MODIFIER_CTX): Moved into the section containing the macros
20200 conditionally defined by JC1_LITE.
20201 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
20202 argument if JC1_LITE is defined.
20203 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
20204 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
20205 is defined.
20206 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
20207 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
20208 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
20209 to different values according to JC1_LITE.
20210 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
20211 declared if JC1_LITE set.
20212 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
20213 defined if JC1_LITE not set.
20214 (struct parser_ctx): Reorganized and skip the jc1 front end part
20215 if JC1_LITE set.
20216 (java_layout_classes): New function definition.
20217 (java_push_parser_context, java_init_lex, yyparse, yylex,
20218 yyerror): Prototype always declared. All other static function
20219 prototypes declared only if JC1_LITE is not set.
20220 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
20221 declared in parse.h.
20222 (java_layout_classes): New function.
20223 (java_complete_expand_methods): No longer layout the class here.
20224 * parse-scan.y: New file.
20225 * jv-scan.c: New file.
20226
20227 1998-08-25 Tom Tromey <tromey@cygnus.com>
20228
20229 * gjavah.c (main): Handle -friend option.
20230 (friend_specs): New global.
20231 (generate_access): Handle friend_specs.
20232 (process_file): Likewise.
20233 (MAX_FRIENDS): New macro.
20234 (friend_count): New global.
20235 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
20236 Changed all callers.
20237
20238 1998-08-24 Per Bothner <bothner@cygnus.com>
20239
20240 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
20241 (main): Handle processing all the entries of a named .zip archive.
20242 * jcf-io.c (jcf_trim_old_input): New function.
20243 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
20244
20245 1998-08-24 Per Bothner <bothner@cygnus.com>
20246
20247 * lang.c (flag_assume_compiled): Make default be on.
20248
20249 1998-08-21 Per Bothner <bothner@cygnus.com>
20250
20251 * jcf-dump.c: Add bunches of flags to control output more.
20252 (process_class): New function; support printing more than one class.
20253 (main): Support new --print-main and --javap flags.
20254 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
20255 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
20256
20257 1998-08-20 Per Bothner <bothner@cygnus.com>
20258
20259 Change mangling of dispatch table to match C++ vtable (w/thunks).
20260 * class.c (build_dtable_decl), java-tree.h: New function.
20261 (make_class_data): Call it.
20262 * decl.c (init_decl_processing): Likewise.
20263
20264 1998-08-19 Warren Levy <warrenl@cygnus.com>
20265
20266 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
20267 soft_anewarray; adjust args passed.
20268 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
20269 match _Jv_NewObjectArray.
20270
20271 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
20272
20273 * decl.c (push_labeled_block, pop_labeled_block): New functions.
20274 * expr.c (loopup_label): Call create_label_decl.
20275 (create_label_decl): New function.
20276 (java_lang_expand_expr): Call expand_start_bindings with argument
20277 set to zero.
20278 * java-tree.h Added space after PROTO in function declarations
20279 when necessary.
20280 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
20281 (create_label_decl, push_labeled_block): New function
20282 declarations.
20283 * lex.c (label_id): Initialize.
20284 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
20285 switch.
20286 * parse.h Added space after PROTO in function declarations when
20287 necessary.
20288 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
20289 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
20290 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
20291 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
20292 macros.
20293 (struct parser_ctxt): New fields current_loop,
20294 current_labeled_block.
20295 (build_if_else_statement, patch_if_else_statement,
20296 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
20297 generate_labeled_block, complete_labeled_statement,
20298 build_bc_statement, patch_bc_statement, patch_loop_statement,
20299 build_new_loop, build_loop_body, complete_loop_body): New function
20300 declarations.
20301 * parse.y (java_warning_count): New global variable.
20302 (label_id): New static variable.
20303 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
20304 (block:): Return size_zero_node when block is empty.
20305 (empty_statement:): Return size_zero_node.
20306 (statement:): Implement supplemental action when for_statement: is
20307 reduced.
20308 (label_decl:): New rule.
20309 (labeled_statement:): Rewritten using label_decl. Actions
20310 implemented.
20311 (labeled_statement_nsi:): Likewise.
20312 (if_then_statement): Actions implemented.
20313 (while_expression): New rule.
20314 (while_statement:): Rewritten using while_expression. Actions
20315 implemented.
20316 (while_statement_nsi:): Likewise.
20317 (do_statement_begin:): New rule.
20318 (do_statement:): Rewritten using do_statement_begin. Actions
20319 implemented.
20320 (for_statement:): Rewritten using for_begin. Actions implemented.
20321 (for_statement_nsi:): Likewise.
20322 (for_header:, for_begin:): New rules.
20323 (for_init:): Actions implemented.
20324 (statement_expression_list:, break_statement:,
20325 continue_statement:): Likewise.
20326 (yyerror): Count number of issued warning(s).
20327 (java_report_errors): Report error(s) and/or warning(s).
20328 (java_complete_class): Use build_java_argument_signature to
20329 recompute completed method signature.
20330 (java_check_regular_methods): New locals method_wfl and aflags.
20331 Use method_wfl instead of lookup_cl during error reports. Fixed
20332 indentation and modified some error messages. Use
20333 lang_printable_name in method instead of the DECL_NAME. New code
20334 to issue warnings on methods not overriding corresponding methods
20335 private to a different package.
20336 (java_method_add_stmt): Call add_stmt_to_compound.
20337 (add_stmt_to_compound): New function.
20338 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
20339 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
20340 (build_if_else_statement, patch_if_else_statement,
20341 build_labeled_block, generate_labeled_block,
20342 complete_labeled_statement, build_new_loop, build_loop_body,
20343 complete_loop_body, patch_loop_statement, build_bc_statement,
20344 patch_bc_statement, patch_exit_expr): New functions.
20345 * typeck.c (build_java_signature): Build argument signature before
20346 enclosing it in between parenthesis.
20347
20348 1998-08-17 Warren Levy <warrenl@cygnus.com>
20349
20350 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
20351 (JAVA_OBJS): Added reminder comment
20352
20353 1998-08-13 Nick Clifton <nickc@cygnus.com>
20354
20355 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
20356 be interpreted as a long long.
20357
20358 1998-08-13 Warren Levy <warrenl@cygnus.com>
20359
20360 * decl.c (init_decl_processing): Use _Jv_InitClass, not
20361 soft_initialise_class. Use _Jv_NewMultiArray, not
20362 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
20363 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
20364 _Jv_CheckArrayStore, not soft_checkarraystore. Use
20365 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
20366
20367 1998-08-12 Per Bothner <bothner@cygnus.com>
20368
20369 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
20370 length_identifier_node): New global tree node constants.
20371 * parse.y (kw_super, kw_this, kw_length): Removed globals.
20372 Replace uses by super_identifier_node etc.
20373 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
20374
20375 * parse.y (resolve_field_access): Don't special-case ".length" if
20376 flag_emit_class_files.
20377 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
20378 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
20379 and ARRAY.length.
20380
20381 1998-08-11 Per Bothner <bothner@cygnus.com>
20382
20383 * decl.c (init_decl_processing): Remove unused method_type_node fields.
20384 * class.c (make_method_value): Remove init for removed fields.
20385
20386 * class.c (layout_class): Use build_java_argument_signature.
20387 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
20388
20389 * typeck.c (push_java_argument_signature): Removed. Merged into ...
20390 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
20391 (build_java_signature): Don't use push_java_argument_signature.
20392
20393 * typeck.c (lookup_argument_method): New function.
20394 * parse.y (java_check_regular_methods): Use lookup_argument_method
20395 instead of lookup_java_method2 followed by lookup_java_method.
20396
20397 * parse.y (check_method_redefinition): Minor optimization.
20398
20399 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
20400 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
20401
20402 1998-08-10 Tom Tromey <tromey@cygnus.com>
20403
20404 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
20405 c-pragma.o.
20406
20407 * gjavah.c (java_float_finite): Use K&R-style definition.
20408 (java_double_finite): Likewise.
20409 (generate_access): Now returns void. Changed all callers.
20410 (last_access_generated): Removed.
20411 (process_file): Only make a single pass over the .class file.
20412
20413 1998-07-29 Per Bothner <bothner@cygnus.com>
20414
20415 * class.c (get_dispatch_table): Add extra dummy vtable entry,
20416 for compatibility for G++ (with -fvtable-thunks).
20417 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
20418
20419 * gjavah.c (process_file): Use public inheritance for super-class.
20420
20421 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
20422
20423 * lex.c (java_init_lex): Initialize ctxp->package.
20424 * parse.h (struct parser_ctxt): package and package_len replaced
20425 by tree package, an identifier node. Field method_decl_list is
20426 gone. Fixed comments.
20427 (lookup_field_wrapper, merge_qualified_name, not_accessible,
20428 class_in_current_package): New function prototypes.
20429 * parse.y (array_type:): Set class loaded flag on primitive type
20430 arrays.
20431 (package_declaration:): Assign ctxp->package to the
20432 identifier node.
20433 (method_invocation:): Handle invocation of method qualified by
20434 `super'.
20435 (single_type_import_declaration:): Removed ambiguity check.
20436 (java_pop_parser_context): New local variable `next'. Reset and
20437 set IMPORT_CLASSFILE_NAME flags on current and previous import
20438 list.
20439 (java_accstring_lookup): Use new local macro COPY_RETURN.
20440 (lookup_field_wrapper): New function.
20441 (parser_qualified_classname): Use merge_qualified_name.
20442 (parser_check_super_interface): Broaden error message.
20443 (do_resolve_class): Check for qualified class name in the current
20444 compilation unit if appropriate.
20445 (process_imports): Check for already defined classes.
20446 (check_pkg_class_access): Got rid of call to
20447 get_access_flags_from_decl.
20448 (java_complete_expand_methods): Call safe_layout_class based on
20449 the current class size.
20450 (make_qualified_primary): Build a WFL qualification on primary if
20451 none exists.
20452 (merge_qualified_name): New function.
20453 (make_qualified_name): Use merge_qualified_name.
20454 (resolve_expression_name): Use safe_lookup_field.
20455 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
20456 (resolve_qualified_expression_name): Likewise. Check on resolved
20457 element accessibility.
20458 (not_accessible_p, class_in_current_package): New functions.
20459 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
20460 (patch_method_invocation_stmt): Merged common pieces. Check
20461 accessibility of invoked method.
20462 (check_for_static_method_reference): Add returned type in error
20463 message.
20464 (invocation_mode): Get rid of bogus check on PRIVATE methods.
20465 (refine_accessible_methods_list): Merged two conditions in test.
20466 (java_complete_class): Sanity check on stabilize_ref gone.
20467 * zextract.c (read_zip_archive): Cast lseek second argument to long.
20468
20469 1998-07-28 Per Bothner <bothner@cygnus.com>
20470
20471 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
20472
20473 1998-07-24 Tom Tromey <tromey@cygnus.com>
20474
20475 * gjavah.c (F_NAN): Removed.
20476 (F_NAN_MASK): New macro.
20477 (F_POSITIVE_INFINITY): Removed.
20478 (F_NEGATIVE_INFINITY): Likewise.
20479 (java_float_finite): Rewrote.
20480 (D_NAN_MASK): Renamed.
20481 (java_double_finite): Rewrote.
20482 (D_POSITIVE_INFINITY): Removed.
20483 (D_NEGATIVE_INFINITY): Likewise.
20484
20485 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
20486 If verbose, print underlying representation of value in hex.
20487
20488 1998-07-24 Per Bothner <bothner@cygnus.com>
20489
20490 * buffer.h, buffer.c: New files.
20491 * Makefile.in (JAVA_OBJS): Add buffer.o.
20492
20493 Support locals variables and writing their debug entries to .class.
20494 * jcf-write.c: Simplify some by user new buffer type.
20495 (vode_buffer_grow): Removed.
20496 (struct localvar_info): New type.
20497 (localsvars, localvartable): New buffers.
20498 (localvar_alloc, localvar_free): New functions.
20499 (generate_bytecode_insns): Handle local variables.
20500 (generate_classfile): Write LocalVariableTable attribute.
20501
20502 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
20503
20504 * jcf-io.c (open_in_zip): Check the zipfile magic number.
20505 * zipfile.h (ZIPMAGIC): New macro.
20506
20507 1998-07-24 Tom Tromey <tromey@cygnus.com>
20508
20509 * Makefile.in (gjavah.o): Updated dependencies.
20510 (jcf-dump.o): Likewise.
20511 (all.indirect): Use ../gjavah.
20512 (../gjavah$(exeext)): Likewise.
20513 (clean): Don't remove gjavah.
20514 (clean): Remove parse.c, not java/parse.c.
20515 * Make-lang.in (java): Added gjavah.
20516 (gjavah$(exeext)): New target.
20517 (GJAVAH_SOURCES): New macro.
20518 (java.all.build): Added gjavah.
20519 (java.all.cross): Likewise.
20520 (java.rest.encap): Likewise.
20521 * config-lang.in (compilers, stagestuff): Added gjavah.
20522
20523 1998-07-23 Tom Tromey <tromey@cygnus.com>
20524
20525 * gjavah.c (java_float_finite): New function.
20526 (java_double_finite): Likewise.
20527 (F_POSITIVE_INFINITY): New macro.
20528 (F_NEGATIVE_INFINITY): Likewise.
20529 (F_NAN): Likewise.
20530 (D_POSITIVE_INFINITY): Likewise.
20531 (D_NEGATIVE_INFINITY): Likewise.
20532 (D_NAN): Likewise.
20533 (print_field_info): Use java_float_finite and java_double_finite.
20534
20535 1998-07-23 Per Bothner <bothner@cygnus.com>
20536
20537 * parse.y (method_header): Name "this" implicit argument.
20538
20539 1998-07-22 Per Bothner <bothner@cygnus.com>
20540
20541 * jcf-write.c: Write out LineNumberTable attribute in .class file.
20542 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
20543 (put_linenumber): New function.
20544 (generate_bytecode_insns, generate_classfile): Write line numbers.
20545
20546 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
20547
20548 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20549 (lookup_name, build_known_method_ref, build_class_init,
20550 build_invokevirtual, invoke_build_dtable, match_java_method,
20551 build_field_ref, pushdecl_force_head, build_java_binop,
20552 binary_numeric_promotion, build_decl_no_layout,
20553 build_java_arrayaccess, build_newarray, build_anewarray,
20554 build_java_array_length_access, build_java_arraynull_check): New
20555 extern function prototypes.
20556 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20557 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20558 java-tree.h.
20559 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20560 to NULL
20561 * jcf.h (jcf_out_of_synch): New extern function prototype.
20562 * parse.h: Static/global function implemented in parse.y
20563 prototyped and declarations moved at the end of the file.
20564 (DECL_P): Check that the argument isn't null.
20565 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20566 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20567 (QUAL_DECL_TYPE): New macro.
20568 (PARAMS): Macro definition removed.
20569 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20570 (return_statement:): Call build_return.
20571 (field_access:): Call make_qualified_primary in sub rule.
20572 (method_invocation:): Build method invocation and call
20573 make_qualified_primary when processing primaries.
20574 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20575 get_type_from_signature.
20576 (java_check_regular_method): Extra integer 0 argument when calling
20577 lookup_java_method2.
20578 (lookup_java_interface_method2): Extra method DECL argument when
20579 calling lookup_java_interface_method2.
20580 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20581 COMPOUND_EXPR node.
20582 (java_complete_expand_method): Layout current class iff not
20583 already done. Don't process interface's methods.
20584 (java_complete_expand_method): Use super class only if it
20585 exists. Use current class otherwise.
20586 (make_qualified_primary): New function.
20587 (resolve_expression_name): Process qualified expression or
20588 expression from primary the same way.
20589 (resolve_expression_name): Two last arguments to
20590 resolve_field_access are now NULL_TREEs.
20591 (resolve_field_access): New variable is_static. Local field must
20592 be DECLs. is_static computed on field DECLs only. Append code in
20593 where_found to the field access if necessary. Use QUAL_DECL_TYPE
20594 to initialize field_type.
20595 (resolve_qualified_expression_name): New local variable,
20596 previous_call_static and is_static. Handle primaries with function
20597 calls, casts, array references and `this'. `super' now handled as
20598 `(super_class)this'. Use is_static to clarify boolean expressions.
20599 Added code to handle case where a proper handle is required to
20600 access a field. Use QUAL_DECL_TYPE where applicable.
20601 (maybe_access_field): New function.
20602 (patch_method_invocation_stmt): New arguments primary, where,
20603 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20604 deleted. Use `where' as a type to search from if specified. Check
20605 for static method reference where forbidden. Append primary or
20606 current_this to the argument list if not calling constructor nor
20607 static methods.
20608 (check_for_static_method_reference): New function.
20609 (patch_invoke): Layout the class on which new is done if
20610 necessary.
20611 (lookup_method_invoke): Changed format to report errors on
20612 methods.
20613 (qualify_ambiguous_name): New local variable this_found. Now
20614 handle things from primaries. Method call are considered
20615 expression names.
20616 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20617 changed into NULLs.
20618 (not_initialized_as_it_should_p): Comply with the new DECL_P.
20619 (java_complete_tree): New case fo RETURN_EXPR. Process function
20620 call arguments in separate function.
20621 (complete_function_arguments): New function.
20622 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20623 anymore.
20624 (patch_assignment): Take the return function slot into account as
20625 a RHS. Distinguish assignment from a return.
20626 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20627 when checking methods in interfaces.
20628 (resolve_type_during_patch): NULL argument to unresolve_type_p
20629 instead of NULL_TREE.
20630 (patch_newarray): Fixed typo in comment.
20631 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20632 (build_return, patch_return): New functions.
20633 * typeck.c (lookup_java_constructor): Fixed typo in comment.
20634
20635 1998-07-21 Per Bothner <bothner@cygnus.com>
20636
20637 * constants.c (find_name_and_type_constant, find_fieldref_index,
20638 find_methodref_index): New methods.
20639 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
20640 just return given method. Also, rename to build_known_method_ref.
20641 (expand_invoke): Rename call to build_invoke_non_interface.
20642 * java-tree.h, parse.h: Update prototype.
20643 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
20644 (such as expand_expr_stmt) if flag_emit_class_files.
20645 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20646 STACK_TARGET, IGNORE_TARGET): New macros.
20647 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
20648 (generate_bytecode_insn): New function to generate method's bytecode.
20649 (generate_classfile): Node generate Code attribute for a method.
20650 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20651 push_long_const, field_op, adjust_typed_op, maybe_wide):
20652 New functions used by generate_bytecode_insn.
20653
20654 * typeck.c (signature_include_return): Remove variable.
20655 (push_java_argument_signature, build_java_argument_signature): New.
20656 (build_java_signature): Use push_java_argument_signature.
20657 * parse.y: Use build_java_argument_signature instead of fiddling
20658 with signature_include_return.
20659
20660 1998-07-17 Tom Tromey <tromey@cygnus.com>
20661
20662 * gjavah.c (print_c_decl): Always generate JArray<>* for array
20663 types.
20664
20665 * Makefile.in (all.indirect): Added gjavah$(exeext).
20666 (gjavah$(exeext)): Added $(exeext).
20667 (clean): Likewise.
20668
20669 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
20670
20671 * class.c (layout_class): Call to java_layout_parsed_class replace
20672 by safe_layout_class.
20673 * expr.c (build_java_array_length_access): Removed static storage
20674 class in the function definition.
20675 (build_java_arraynull_check): Likewise.
20676 Also fixed typos in two comments.
20677 * lex.c (java_init_lex): Initialize static global kw_length.
20678 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20679 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20680 java_lex_error.
20681 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20682 * parse.h (resolve_no_layout): New static function declaration.
20683 (get_identifier_in_static): Declaration removed.
20684 (java_layout_parsed_class): Function name declaration changed to
20685 safe_layout_class.
20686 (build_newarray_node, patch_newarray, resolve_type_during_patch,
20687 not_initialized_as_it_should_p, build_this): New static function
20688 declarations.
20689 (pushdecl_force_head, build_java_binop, int_fits_type_p,
20690 binary_numeric_promotion, stabilize_reference,
20691 build_decl_no_layout, build_java_arrayaccess): Extern function
20692 declarations moved into their own section.
20693 (build_newarray, build_anewarray, build_java_array_length_access,
20694 build_java_arraynull_check): New extern function declarations.
20695 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20696 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20697 fake tree codes.
20698 (CALL_CONSTRUCTOR_P): New macro.
20699 * parse.y (kw_length): New static global tree node.
20700 (return_statement): Tagged <node>.
20701 (RETURN_TK): Tagged <operator>.
20702 (variable_declarator_id:): Build variable declaration with an
20703 empty initialization value if a syntax error was found in the
20704 initialization part of the variable declaration.
20705 (statement_without_trailing_substatement:): return_statement: now
20706 uses the default rule.
20707 (return_statement:): Temporarily fixed to return NULL_TREE.
20708 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20709 (class_instance_creation_expression:): Class creation rules now
20710 call build_method_invocation upon reduction.
20711 (array_creation_expression:): Rules call build_newarray_node upon
20712 reduction.
20713 (dim_exprs:): Build a list of dimension expressions.
20714 (dim_expr:): Store location of the OSB_TK in the dimension
20715 expression node.
20716 (method_invocation:): Added a new error rule.
20717 (build_unresolved_array_type): WFL argument may also be an array
20718 on a primitive type. Name of the argument changed to reflect this.
20719 (method_declarator): Insert argument type at the beginning of the
20720 argument type list and later reverse the list.
20721 (unresolved_type_p): Argument 'returned' may be optionally
20722 NULL_TREE.
20723 (java_layout_class_from_source): Function renamed
20724 safe_layout_class.
20725 (resolve_and_layout): Now call resolve_no_layout and
20726 safe_layout_class.
20727 (resolve_no_layout): New function.
20728 (purify_type_name): New function.
20729 (complete_class_report_errors): Call purify_type_name during error
20730 report on a type not found.
20731 (process_imports): error_found local variable doesn't need to be
20732 initialized to zero.
20733 (declare_local_variables): New local type_wfl. Fixed typo in error
20734 message. type_wfl assigned to unresolved type and used to register
20735 incomplete type. Build a WFL around the variable initialization
20736 statement so that debug info can be generated on it.
20737 (source_start_java_method): Reverse argument list after they've
20738 been processed.
20739 (current_this): New static global variable.
20740 (java_complete_expand_methods): Set current_this when appropriate.
20741 (resolve_expression_name): Build correct static and non static
20742 field access bearing a simple name.
20743 (resolve_field_access): Resolve the length field of arrays. Handle
20744 f.m() cases.
20745 (patch_method_invocation_stmt): Set the type of the method
20746 invocation to error_mark_node. This value is later overridden by a
20747 valid type, if any. Don't handle qualified constructor invocation
20748 as qualified method invocation. Call lookup_method_invoke with its
20749 new flag. It's no longer necessary to access the selected method
20750 as the value of a tree list. Handle constructor invocation.
20751 (patch_invoke): Reverse argument list when invoking non interface
20752 methods. Insert call to new as the first argument of the
20753 constructor.
20754 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20755 defined within a final class. Return INVOKE_STATIC if the invoked
20756 method is a constructor.
20757 (lookup_method_invoke): New lc argument is a flag to indicate a
20758 constructor lookup. Now handle constructor lookup. Choose the most
20759 specific method in case several were matching the invocation
20760 requirements. Return a method decl instead of a tree list featuring
20761 one single method decl element.
20762 (refine_accessible_methods_list): New lc flag argument to
20763 indicate that a constructor is being looked up.
20764 (not_initialized_as_it_should_p): New function.
20765 (java_complete_tree): Now process fake tree codes
20766 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20767 save_expr on resolved function call arguments. Case on
20768 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20769 (patch_assignment): LHS can be a field access expression. When
20770 dealing with reference, lhs_type is the promoted type of the
20771 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20772 applicable.
20773 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20774 (patch_binop): Use not_initialized_as_it_should_p where
20775 applicable.
20776 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20777 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20778 where applicable.
20779 (resolve_type_during_patch): New function.
20780 (patch_cast): Call resolve_type_during_patch to resolve type and
20781 report error accordingly.
20782 (patch_array_ref): Use not_initialized_as_it_should_p where
20783 applicable. Array base expression is saved before being
20784 used. Promote the type of an array elements if it contains non
20785 builtin types.
20786 (build_newarray_node, patch_newarray, build_this): New functions.
20787
20788 1998-07-16 Tom Tromey <tromey@cygnus.com>
20789
20790 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20791 increment it in `for' statement.
20792 (print_field_info): If number is inf or nan, don't print it.
20793 (print_method_info): If method name is `delete', just ignore it.
20794 (print_c_decl): Special-case jstringArray.
20795
20796 * gjavah.c (help): New function.
20797 (no_argument): New function.
20798 (usage): Changed text.
20799 (main): Rewrote argument handling. Now handles -v, --help,
20800 --version.
20801 (version): New function.
20802 (found_error): New global.
20803 (main): Return found_error.
20804 (generate_access): Set found_error.
20805 (print_c_decl): Likewise.
20806
20807 1998-07-15 Tom Tromey <tromey@cygnus.com>
20808
20809 * gjavah.c (print_c_decl): Don't print "," when examining field.
20810 Skip type name when looking at "[L" types.
20811 (process_file): Now static.
20812 (generate_access): Now returns int.
20813 (last_access_generated): New global.
20814 (process_file): Clear last_access_generated; make multiple passes
20815 over the class.
20816 (print_field_info): Just return if generate_access returns true.
20817 (print_method_info): Likewise. Also, allow <init> functions to
20818 pass through.
20819 (print_c_decl): Added is_init argument. Print constructors
20820 properly.
20821 (print_cxx_classname): Use UTF8_GET to extract characters from
20822 string.
20823 (print_base_classname): New function.
20824 (print_class_decls): New function.
20825 (process_file): Use it.
20826 (utf8_cmp): New function.
20827
20828 1998-07-13 Nick Clifton <nickc@cygnus.com>
20829
20830 * lang-options.h: Format changed to match changes in gcc/toplev.c
20831 to implement a --help option.
20832
20833 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
20834
20835 * decl.c (init_decl_processing): Revert change to dtable_type.
20836
20837 1998-07-09 Per Bothner <bothner@cygnus.com>
20838
20839 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20840
20841 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
20842
20843 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20844
20845 * lang.c (lang_init): Default flag_exceptions to 1, without
20846 checking to see if it's 2 first.
20847
20848 1998-07-08 Jeffrey A Law (law@cygnus.com)
20849
20850 * constants.c: Include "system.h".
20851 * decl.c: Likewise.
20852 * lang.c (flag_new_exceptions): Get via extern now.
20853 (lang_init_options): New functions. Turn on flag_new_exceptions.
20854
20855 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
20856
20857 * lex.c (java_lex): Return 0 when we see an invalid character in
20858 the input.
20859
20860 * lex.c (java_read_char): Specify extra argument when calling
20861 java_lex_error.
20862 (java_read_unicode, java_parse_end_comment,
20863 java_parse_escape_sequence): Likewise,
20864 (java_lex): Specify extra argument when calling
20865 java_lex_error. Test that IDs are beginning with a legal character
20866 for IDs. Handle invalid characters with an error message and a
20867 call to java_lex_error.
20868 (java_lex_error): Adjust column position by new argument
20869 `forward'. Issue an error even if in the middle of reporting an
20870 other error.
20871
20872 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
20873
20874 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20875 we don't explicitly put a null pointer when we're copying it.
20876
20877 1998-07-07 Tom Tromey <tromey@cygnus.com>
20878
20879 * gjavah.c (print_cxx_classname): New function.
20880 (super_class_name): Likewise.
20881 (print_super_fields): Removed.
20882 (in_super): Removed.
20883 (print_field_info): Never generate #defines.
20884 (print_c_decl): Changed generated types to match JNI. No longer
20885 print class name before method name.
20886 (print_method_info): Print "static" before static methods.
20887 Print "virtual" before non-final methods.
20888 (usage): Use exit(1), not exit(-1).
20889 (main): Likewise.
20890 (print_field_info): Use %.17g to print a double.
20891 (last_access): New globals.
20892 (process_file): Initialize last_access.
20893 (usage): Now static.
20894 (ACC_VISIBILITY): New define.
20895 (generate_access): New function.
20896 (print_field_info): Call it.
20897 (print_method_info): Likewise. Also, generate information for all
20898 methods, not just native methods. Return void.
20899 (print_c_decl): Return void.
20900 (print_field_info): Return void.
20901
20902 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20903
20904 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
20905 processing the jc1 grammar file. Prefix bison functions and
20906 variables with java_.
20907 (parse.c): Dependencies on parse.h and lex.h
20908 * expr.c (build_java_arrayaccess): Function now global.
20909 * java-tree.h: Comment reorganized to carry on previous
20910 classification effort.
20911 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
20912 RESOLVE_TYPE_NAME_P): New flags on WFLs.
20913 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
20914 java_parse (new prefix java_ generated by bison).
20915 (java_layout_parsed_class, java_register_parsed_class): Function
20916 call removed.
20917 (yyparse): Removed unnecessary call to init_outgoing_cpool.
20918 * lex.c (static tree wfl_op): Variable deleted.
20919 (java_init_lex): Initialize kw_super and kw_this. Initialize more
20920 ctxp fields to NULL_TREE.
20921 (java_lex): No longer create WFL for operators. Filename caching
20922 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
20923 created as STRING_CST and later expanded. Removed extra argument
20924 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
20925 and SUPER.
20926 (build_wfl_node): Removed code in comments.
20927 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
20928 store token and location data in the current bison token.
20929 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
20930 static/extern function declaration at the beginning of the file.
20931 (struct qualification): Data structure definition deleted.
20932 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
20933 (qualify_ambiguous_name): Function declaration modified. Function
20934 now returns nothing.
20935 (build_array_ref, patch_array_ref, make_qualified_name,
20936 resolve_qualified_expression_name, maybe_generate_clinit,
20937 resolve_field_access): New static function declarations.
20938 (build_java_arrayaccess): New extern function declaration.
20939 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
20940 (CALL_EXPR_PRIMARY): Macro deleted.
20941 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
20942 (struct parser_ctxt): Field initialized_final
20943 removed. non_static_initialized, static_initialized: New fields.
20944 * parse.y (static tree kw_super, static tree kw_this): New global
20945 static.
20946 (%union): tree wfl field of operator member replaced by int
20947 location. WFLs are non longer created for operators.
20948 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
20949 (qualified_name:): Now calls make_qualified_name to build the
20950 identifier.
20951 (type_declaration:): Consider generating <clinit> when class
20952 parsing completed.
20953 (variable_declarator:): Directly build an assignment node when the
20954 variable is initialized when declared.
20955 (this_or_super:): Build a WFL and set current location when THIS
20956 or SUPER are parsed.
20957 (expression_statement:): Wrap statement around a WFL.
20958 (primary_no_new_array:): Fixed typo. Changed value returned by
20959 THIS_TK because of its new type (temporary).
20960 (dim_exprs:): Temporary fix because of OSB_TK's new type.
20961 (field_access:): Build qualified name with SUPER.
20962 (method_invocation:): Fixed returned value because of SUPER's new
20963 type.
20964 (array_access:): Use OSB_TK location information.
20965 (post_increment_expression:, post_decrement_expression:,
20966 unary_expression:, pre_increment_expression:,
20967 pre_decrement_expression:, unary_expression_not_plus_minus:,
20968 cast_expression:, multiplicative_expression:,
20969 additive_expression:, shift_expression:, relational_expression:,
20970 equality_expression:, and_expression:, exclusive_or_expression:,
20971 inclusive_or_expression:, conditional_and_expression:,
20972 conditional_or_expression:, assignment:): Use new location/token
20973 information available on operators.
20974 (create_class): Set super_decl_type to NULL_TREE when processing
20975 java.lang.Object.
20976 (register_fields): Field initialization is now a MODIFY_EXPR
20977 node. Chain initialization code to the matching lists (according
20978 to the field declaration modifiers).
20979 (maybe_generate_clinit): New function.
20980 (method_header): Don't set method's DECL_NAME to a WFL when adding
20981 methods to java.lang.Object.
20982 (resolve_and_layout): Now can return NULL_TREE if the type
20983 resolution fails. Otherwise, return the class DECL instead of its
20984 TYPE.
20985 (check_method_redefinition): Don't patch method DECL_NAME if it
20986 belongs to java.lang.Object.
20987 (process_imports): Simply assign error_found to the value returned
20988 by check_pkg_class_access.
20989 (declare_local_variables): Don't use their init statements (if
20990 any) when parsing error were previously found. Reuse MODIFY_EXPR
20991 build during parsing as an init statement.
20992 (java_method_add_stmt): Now return the current method body.
20993 (java_layout_parsed_class, java_register_parsed_class): Functions
20994 removed.
20995 (java_complete_expand_methods): Initialize the constant pool on a
20996 per class basis. Layout the classes before expanding their method
20997 bodies. Don't try expand artificial constructor code if error were
20998 found. Make the classes data and register them if no error were
20999 found.
21000 (java_complete_expand_method): Retrieve an artificial constructor
21001 argument list before entering its body. Assign the top block to
21002 the artificial constructor function body and set types of declared
21003 blocks and compound statements to void. Walk method body if not an
21004 artificial constructor.
21005 (make_qualified_name, cut_identifier_in_qualified): New functions.
21006 (resolve_expression_name): Fixed comments. Save/restore the
21007 current class CLASS_LOADED_P flag value. Build non qualified
21008 static field access and handle qualified expression names.
21009 (resolve_field_access, resolve_qualified_expression_name): New
21010 functions.
21011 (patch_method_invocation_stmt): Use the new expression resolution
21012 scheme, calling resolve_field_access when the function call is
21013 resolved as an expression.
21014 (qualify_ambiguous_name): Function rewritten to work on qualified
21015 expression produced by make_qualified_name.
21016 (java_complete_tree): Promote type when function's argument are
21017 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
21018 the assignment to discover further errors if RHS is a expression
21019 name that fails to evaluate. Declare LHS initialized even though
21020 the assignment failed. Don't use the location variable and removed
21021 extra argument in patch function calls. Now handle the ARRAY_REF
21022 case and build internal string representation when STRING_CSTs are
21023 walked.
21024 (build_method_invocation): Don't wrap function call around a WFL.
21025 (build_assignment): Likewise. Use the operator location
21026 information.
21027 (patch_assignment): Handle array access LHSs. Handle error
21028 provenance, resulting in a better error report.
21029 (build_binop): Use op_location from operator as binop location
21030 information.
21031 (build_unaryop, build_incdec, build_cast): Likewise.
21032 (patch_binop): Extract location information from the node. Fixed
21033 typo in error message.
21034 (patch_unary_op): Extract location information from the node.
21035 (build_array_ref, patch_array_ref): New functions.
21036
21037 1998-07-01 Tom Tromey <tromey@cygnus.com>
21038
21039 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
21040 match _Jv_IsInstanceOf.
21041 * decl.c (init_decl_processing): Use _Jv_NewArray, not
21042 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
21043
21044 1998-06-30 Tom Tromey <tromey@cygnus.com>
21045
21046 * decl.c (init_decl_processing): Functions are now named
21047 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
21048
21049 1998-06-29 Per Bothner <bothner@cygnus.com>
21050
21051 * java-tree.h (load_class): Add prototype.
21052 * class.c (is_compiled_class): Add missing arg to load_class.
21053 * expr.c (expand_java_NEW): Call load_class.
21054 * parse.y (process_import): Removed bogus use of void return value.
21055
21056 1998-06-25 Per Bothner <bothner@cygnus.com>
21057
21058 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
21059 Function name is "_Jv_Throw" instead of "soft_athrow".
21060 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
21061 Function name is "_Jv_AllocObject" instead of "soft_new".
21062 Takes an extra parameter (object size).
21063 * expr.c: Update calls.
21064
21065 1998-06-24 Per Bothner <bothner@cygnus.com>
21066
21067 * lex.c (java_get_line_col): Handle end-of-file.
21068 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
21069
21070 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
21071
21072 * lang.c (lang_init): Make -fexceptions the default.
21073 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
21074 exception handling is not turned on.
21075
21076 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
21077
21078 * lang.c (flag_new_exceptions): Make this this default.
21079 * decl.c (end_java_method): Call emit_handlers.
21080 * except.c (method_init_exceptions): Set language code and version.
21081 (expand_start_java_handler): Enable exception, and call
21082 expand_eh_region_start.
21083 (expand_end_java_handler): Enable exception, and set up catch blocks.
21084 (emit_handlers): New routine to generate the saved handlers.
21085 * java-except.h (emit_handlers): Add prototype.
21086
21087 1998-06-12 Per Bothner <bothner@cygnus.com>
21088
21089 We used to have three different representations of the constant pool:
21090 the CPool structure, the tree_constant_pool, and the constructures
21091 used to build the Class object (which may need class and string
21092 constants) in compiled code. None were appropriate for compiling
21093 to .class files, so I did a major overhaul.
21094
21095 First, the tree_constant_pool array was removed. Things were
21096 modified to the CPool structure in the JCF could be used.
21097 Second, a "capacity" field was added to the CPool, and functions
21098 written to search for a matching constant, adding one if not found.
21099 The code that generated the Class object was changed to use a CPool.
21100 The actual TREE_LISTs used to build the CONSTRUCTORs used for
21101 the static Class object are now only in build_constants_constructor.
21102 Finally, I wrote code which can generate a .class file (including its
21103 constant pool) from the RECORD_TYPE of a class. This is a big step
21104 on the way to compiling Java source into .class files.
21105
21106 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
21107 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
21108
21109 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
21110 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
21111 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
21112 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
21113 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
21114 (lang_type): Removed constant_pool field.
21115 * jcf.h (CPool): Renamed size to count. Added field capacity.
21116 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
21117 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
21118 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
21119
21120 * constants.c (current_constant_pool_tags, current_constant_pool_data,
21121 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
21122 * constants.c (build_constants_constructor): Use new outgoing_cpool.
21123 (set_constant_entry, find_constant1, find_constant2,
21124 find_class_constant, count_constant_pool_bytes, write_constant_pool,
21125 find_utf8_constant, find_class_or_string_constant): New functions.
21126
21127 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
21128 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
21129 (give_name_to_class, get_class_constant): Likewise.
21130 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
21131 (get_name_and_type_constant, get_ref_constant): Removed.
21132 * parse.h (parser_ctxt): Remove field tree_constant_pool.
21133 * parse.y: Don't save/restore tree_constant_pool.
21134 * verify.c (verify_jvm_instructions): Update for new approach.
21135 * expr.c (expand_invoke, expand_java_field_op): Likewise.
21136
21137 * lang-options.h: Added -femit-class-file, -femit-class-files.
21138 * lang.c (flag_emit_class_files), java-tree.h: New flag.
21139 (lang_f_options): Added "emit-class-file(s)".
21140
21141 * expr.c (build_java_arrayaccess): Generate more efficient array
21142 bounds checking, by using unsigned compare.
21143
21144 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
21145
21146 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
21147
21148 * parse.h: New comment on the handling of unresolved type
21149 identifiers. JDEPs are now part of the jdep_code enum.
21150 (typedef struct jdep): Now use enum jdep_code or int, depending on
21151 availability. Both are narrowed down to an 8 bits bitfield.
21152 (CALL_EXPR_PRIMARY): Fixed comment.
21153
21154 1998-06-10 Tom Tromey <tromey@cygnus.com>
21155
21156 * Make-lang.in (java): Added gjavac and jvgenmain.
21157 (java.start.encap): Depend on gjavac.
21158 (java.rest.encap): Depend on jvgenmain.
21159
21160 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
21161 (JAVA_CROSS_NAME): Likewise.
21162 (java.all.build): Depend on jvgenmain and gjavac.
21163 (java.all.cross): Depend on jvgenmain and gjavac-cross.
21164 (jvgenmain$(exeext)): New target.
21165 (java.install-common): Wrote.
21166 * config-lang.in (compilers, stagestuff): Added gjavac and
21167 jvgenmain.
21168
21169 1998-06-10 Dave Brolley <brolley@cygnus.com>
21170
21171 * lang.c (lang_decode_option): New argc/argv interface.
21172
21173 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21174
21175 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
21176 * decl.c (build_decl_no_layout): New function.
21177 * expr.c (java_lang_expand_expr): Layout declarations found in
21178 blocks before they're pushed.
21179 * jcf-parse.c (load_class): Save current line when parsing class
21180 file.
21181 (parse_source_file): Register class before expanding their
21182 methods.
21183 * lang.c (put_decl_node): Produce `null' when `void *' is
21184 processed.
21185 * lex.c (static tree wfl_op): New static global, for error report
21186 on casts.
21187 (java_init_lex): wfl_operator and wfl_op initialized
21188 here. Filename caching added for wfl_op. Return wfl_op when `(' is
21189 parsed.
21190 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
21191 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
21192 build_unresolved_array_type): New static function definitions.
21193 (build_decl_no_layout): New extern function declared.
21194 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
21195 faulty modifier exists.
21196 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
21197 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
21198 (UNARY_PLUS_EXPR): New fake operator.
21199 (struct parser_ctxt): New field osb_number.
21200 * parse.y (static tree wfl_operator): New static WFL for operator
21201 bound error messages.
21202 (DECR_TK, INCR_TK): Moved.
21203 (OP_TK): Tagged <operator>.
21204 (array_type:): Now call build_unresolved_array_type.
21205 (dim_expr:): Count the number of '[' seen.
21206 (post_increment_expression, post_decrement_expression,
21207 pre_increment_expression, pre_decrement_expression,
21208 unary_expression_not_plus_minus, unary_expression:): Actions are
21209 now building the corresponding unary expressions.
21210 (cast_expression:): Actions are now building cast expressions.
21211 (build_unresolved_array_type): New function.
21212 (create_interface): Reset the number of declared interfaces.
21213 (create_class): Likewise.
21214 (method_header): Methods declared within the scope of an interface
21215 are now implicitly set public and abstract.
21216 (java_complete_class): Variable's and parameter's type are patched
21217 with a promoted type.
21218 (declare_local_variables): Resolved non builtin types are promoted
21219 before being used to build a variable decl. Removed type patch
21220 posted on variable initialization statement.
21221 (source_start_java_method): Use build_decl_no_layout to build the
21222 decl of a parameter of incomplete type.
21223 (java_register_parsed_class): Process interfaces too. Call
21224 rest_of_decl_compilation on each processed class declarations.
21225 (java_complete_expand_methods): Don't attempt to expand things in
21226 interfaces.
21227 (java_complete_tree): Process CONVERT_EXPR, even though it always
21228 has a type. Propagate error_mark_node to node's type too. Promote
21229 method's call argument type and return error_mark_node if
21230 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
21231 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
21232 handle unary operator nodes.
21233 (build_assignment): Added comment.
21234 (print_int_node): New function.
21235 (patch_assignment): New second argument. New error handling. Use
21236 print_int_node. Handle references. Use can_cast_to_p to issue
21237 different error message according to the context and check upon
21238 the initialization of the RHS.
21239 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
21240 (operator_string): Handle more operators.
21241 (patch_binop): No longer use a function static
21242 wfl_operator. Improved error message on shift distance.
21243 (build_unaryop, build_incdec, build_cast, patch_unaryop,
21244 patch_cast): New functions.
21245
21246 1998-06-05 Per Bothner <bothner@cygnus.com>
21247
21248 * jvspec.c: New file.
21249 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
21250
21251 * java-tree.h (identifier_subst): Add declaration.
21252
21253 1998-06-04 Tom Tromey <tromey@cygnus.com>
21254
21255 * jvgenmain.c (main): Generate call to JvRunMain.
21256
21257 * class.c (make_class_data): Push value for "sync_info" field.
21258 * decl.c (init_decl_processing): Push "sync_info" field.
21259
21260 1998-06-03 Per Bothner <bothner@cygnus.com>
21261
21262 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
21263 Java (source) name, not signature.
21264 Set TYPE_ALIGN to (at least) that of element_type.
21265
21266 1998-06-02 Per Bothner <bothner@cygnus.com>
21267
21268 * class.c: Moved classname-mangling-rekated code to ...
21269 * mangle.c: ... this new file.
21270 * jvgenmain.c: New program (needs mangle.c) to generate main program.
21271 * Makefile.in: Update for above changes.
21272
21273 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
21274
21275 * expr.c (truthvalue_conversion): Convert integer and floating
21276 point value to their truth value.
21277 * lex.c (java_lex): Handle the `null' literal.
21278 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
21279 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
21280 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
21281 New macros.
21282
21283 * parse.y: Reorganization/documentation on token declaration.
21284 (binop_lookup[]): New added new tree codes.
21285 (relational_expression): Build corresponding binary operators.
21286 (equality_expression, conditional_and_expression,
21287 conditional_or_expression): Likewise.
21288 (java_complete_class): Fix crash in debug message.
21289 (java_complete_tree): Check initialization of method call
21290 arguments. Further bogus node evaluation to detect more error
21291 during assignments. Handles more binary operators.
21292 (patch_assignment): Use DECL_P.
21293 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
21294 code.
21295 (operator_string): Handle more case. Compacted source.
21296 (patch_binop): Changed function comment. Checking for
21297 uninitialized first operand takes the compound assignment into
21298 account and uses DECL_P. Checking for uninitialized second operand
21299 delayed to routine's end. Use macros to issue type bound error
21300 messages and issue messages on both operands if their types are
21301 different. Force fixed type into node. Handle all binary
21302 operators.
21303
21304 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21305
21306 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
21307 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
21308 build operator node and return tokens.
21309 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
21310 * parse.h (java_complete_tree): Changed returned type in prototype.
21311 (build_method_invocation, build_assignment, patch_assignment,
21312 patch_binop): New static function declarations.
21313 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
21314 BUILD_EXPR_WFL): New macros.
21315 * parse.y (enum tree_code binop_lookup[]): New static for token to
21316 TREE_CODE lookup.
21317 (%union): Parser union has new sub-structure `operator'.
21318 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
21319 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
21320 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
21321 ASSIGN_ANY_TK): Tokens tagged `operator'.
21322 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
21323 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
21324 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
21325 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
21326 (assignment_operator:): Rule tagged `operator'.
21327 (expression_statement:): Re-installed default rule.
21328 (method_invocation:): Sub rules call build_method_invocation.
21329 (postfix_expression:): Don't attempt to resolve name here. Just
21330 return an ID.
21331 (multiplicative_expression:): Sub-rules build corresponding binop
21332 expression node.
21333 (additive_expression:, shift_expression:, and_expression:,
21334 exclusive_or_expression:, inclusive_or_expression:): Likewise.
21335 (assignment:): Sub rule invoke build_assignment.
21336 (assignment_operator:): Default rules on sub rules.
21337 (force_error): Added documentation on this variable.
21338 (declare_local_variables): Build initialization calling
21339 build_assignment.
21340 (expand_start_java_method): Removed unused rtx declaration. Mark
21341 arguments as already initialized.
21342 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
21343 (java_complete_expand_methods): Don't process next method if
21344 completion of the previous one triggered errors.
21345 (java_complete_expand_method): Call source_end_java_method if no
21346 error were found during completion.
21347 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
21348 locals declaratilon. Handle names found within a class. Return
21349 error_mark_node when things aren't found.
21350 (patch_method_invocation_stmt): Return error_mark_node on failures.
21351 (patch_invoke): Removed unused local. Return the correct node.
21352 (java_complete_tree): Now returns a value. The BLOCK section binds
21353 local identifiers and the type of a BLOCK is now void. Assign the
21354 result of operand completion on COMPOUND_EXPR. Assign the
21355 encapsulated node of a WFL to the result of its completion, except
21356 when the node is an identifier. Now handle MODIFY_EXPR and several
21357 binary operators. Return error_mark_node on errors.
21358 (build_method_invocation, build_assignment, patch_assignment,
21359 build_binop, operator_string, patch_binop): New functions.
21360 * typeck.c (binary_numeric_promotion): New function.
21361
21362 1998-05-21 Per Bothner <bothner@cygnus.com>
21363
21364 * class.c (identifier_subst): New convenience wrapper for ident_subst.
21365 Replace most uses of ident_subst by identifier_subst.
21366
21367 * class.c (push_class_static_dummy_field): Removed function.
21368 (build_class_ref): Find Class object decl by looking up "CNAME.class",
21369 instead of looking got "class" static field. Create that decl here.
21370 (class_identifier_node): Removed; no longer needed.
21371 (init_class_processing): Don't init class_identifier_node.
21372 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
21373 Do nreverse 0 times (instead of twice) for Object and Class.
21374 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
21375
21376 1998-05-20 Per Bothner <bothner@cygnus.com>
21377
21378 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
21379 while initializing linenumber_count and linenumber_table.
21380 Do it before init_function_start (which calls emit_line_note).
21381 * expr.c (expand_byte_code): Don't need to clear lineno here.
21382
21383 1998-05-18 Tom Tromey <tromey@cygnus.com>
21384
21385 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
21386 then mangle number as _N_.
21387
21388 * class.c (mangle_class_field): New function.
21389 (build_class_ref): Set assembler name of class reference using
21390 mangle_class_field.
21391 (push_class_static_dummy_field): Likewise.
21392
21393 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
21394
21395 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
21396 of assigning to TREE_CODE. The latter method exploits a feature
21397 of GCC that is not ANSI compliant.
21398
21399 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
21400
21401 * decl.c (pushdecl_force_head): New function.
21402 (pushlevel): Removed conditional printf.
21403 (complete_start_java_method): Don't enter local variable scope if
21404 function is compiled from source code.
21405 * expr.c: parse.h now included
21406 (java_lang_expand_expr): New function.
21407 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
21408 printf. Terminate buffer when doing directories.
21409 * jcf-parse.c (parse_source_file): Call lang_init_source before
21410 parsing and before code generation.
21411 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
21412 use printf if the macro is defined.
21413 * lang.c (lang_init): Install lang_expand_expr hook on
21414 java_lang_expand_expr.
21415 (java_dummy_print): New function.
21416 (lang_init_source): New function.
21417 * lex.c (java_lex): Remember location of an opening brace at the
21418 second nesting level.
21419 (java_is_eol): Unget character seen after a CR if it is EOF.
21420 * parse.h: Now includes lex.h
21421 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
21422 printf if the macro is defined.
21423 (expand_start_java_method, build_expr_block, enter_block,
21424 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
21425 New static function declarations.
21426 (pushdecl_force_head): New extern function declaration.
21427 (INCOMPLETE_TYPE_P): New macro.
21428 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
21429 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
21430 BLOCK_EXPR_ORIGIN): New macros.
21431 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
21432 DECL_SOURCE_LINE_LAST): New macros.
21433 (struct parser_ctxt): Removed field current_method_decl, redundant
21434 with the field current_function_decl. Added fields
21435 first_ccb_indent1 and pending_block.
21436 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
21437 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
21438 tagged <node>
21439 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
21440 (compilation_unit:): Cosmetic on sub rule.
21441 (type_declaration:): Cosmetic on sub rules. Added an error rule.
21442 (variable_initializer:): Installed default rule on expression:.
21443 (method_declaration:): method_header: starts a new
21444 method. method_body: installs the function body, absorbs blocks
21445 emitted for temporary variable scopings, pops function's body block
21446 and merges function's last statement lineno in DECL_SOURCE_LINE.
21447 (method_body:): Installed default rules.
21448 (block:): Call enter_block when an opening brace is seen. Absorb
21449 scoping blocks and call exit_block when a closing brace is seen.
21450 (block_statement:): Cosmetic changes.
21451 (method_invocation:): Create WFL around CALL_EXPR node.
21452 (patch_stage): Added comment around definition.
21453 (method_header): Try to use first_ccb_indent1 as the first line of
21454 the method, so BP debug info are emitted at the first opening
21455 brace of the function. If the function has no body, use the
21456 location of the function's name. Override currently defined method
21457 name with the matching WFL so we can point redefinition errors
21458 using the location where the function's name was declared.
21459 (check_abstract_method_header): Interprets DECL_NAME as an
21460 identifier or as a WFL, accordingly.
21461 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
21462 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
21463 location and name information out of it and reinstall DECL_NAME to
21464 its original identifier node value.
21465 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
21466 function's source code).
21467 (read_import_dir): Test the value returned by find_class and issue
21468 a fatal accordingly.
21469 (declare_local_variables): Push a new block for the scope of the
21470 new variable(s) if code has been already generated at that nesting
21471 level. Pinpoint redefinition errors using the variable id
21472 WFLs. Generate initialization code if necessary. If the variable
21473 type is incomplete, register a patch on its decl.
21474 (source_start_java_method): Rewritten. Define a new block for the
21475 function's parameters. Build parameter decl out of function's
21476 arguments and register them for a patch if their types are
21477 incomplete.
21478 (expand_start_java_method): Includes the part of
21479 source_start_java_method that was pushing the parameter decls and
21480 completing the method start code.
21481 (source_end_java_method): Removed call the expand_end_bindings and
21482 poplevel (already taken care of). Reinstall function's arguments
21483 and get function's last line of code before calling
21484 expand_function_end.
21485 (java_method_add_stmt): New comment before the function's
21486 code. Complement the second operand of the current COMPOUND_EXPR
21487 if necessary.
21488 (java_complete_expand_methods): Don't generate debug info on line
21489 zero when expanding a generated constructor.
21490 (java_complete_expand_method): Set start and end line numbers for
21491 a artificially generated constructor to one and manually call
21492 enter_block and exit_block when defining it. For all methods:
21493 expand function's start calling the new expand_start_java_method
21494 and invoke java_complete_tree on the effective method's body, if
21495 any.
21496 (resolve_expression_name): Now use lookup_name_in_blocks to search
21497 local variable decls and print out an error when variables are
21498 undefined.
21499 (patch_method_invocation_stmt): Inserted comment before the
21500 function's code.
21501 (lookup_method_invoke): Chain method's arguments using chainon
21502 with the current arg list as a second argument. Inserted missing
21503 IDENTIFIER_POINTER when reporting an error on methods not found.
21504 (refine_accessible_methods_list): Don't retain constructors.
21505 (patch_arguments): Function removed.
21506 (java_complete_tree): Inserted comment before the function's
21507 code. New case for BLOCKs. Moved the WFL case a bit
21508 further. Complete function's arguments.
21509 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21510 maybe_absorb_scoping_blocks): New functions.
21511
21512 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21513
21514 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21515 previously set.
21516 * jcf-parse.c (parse_source_file, java_error_count): New forward
21517 and extern declarations.
21518 (java_parse_abort_on_error): Macro moved.
21519 (jcf_parse_source): fatal called if fopen fails. Now calls
21520 parse_source_file.
21521 (parse_source_file): New parse_only parameter. Reflects the
21522 elimination of the second pass.
21523 (yyparse): parse_source_file called with argument set to 0.
21524 * jcf.h (JCF_ZERO): Sets java_source to zero.
21525 * lex.c (java_init_lex): pass argument is gone. Function modified
21526 to be called once during the analysis of a file.
21527 (java_unget_unicode): Fixed typo in fatal message.
21528 (java_get_line_col): Likewise.
21529 (java_lval): Likewise. String literals no longer built during
21530 second pass.
21531 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21532 account.
21533 * parse.h (MODIFIER_WFL): New macro.
21534 (parse_check_super, parser_check_super_interface): Now return int.
21535 (parser_chain_incomplete_item, not_builtin_p,
21536 complete_method_decl): Declarations removed.
21537 (build_method_invocation_stmt, build_invoke): Renamed using the
21538 `patch' instead of `build'
21539 (register-incomplete_type, obtain_incomplete_type,
21540 java_complete_tree, java_complete_expand_method,
21541 unresolved_type_p, create_jdep_list): New function declarations.
21542 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21543 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21544 (jdep): New typedef on new struct _jdep.
21545 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21546 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21547 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21548 JDEP_RESOLVED_P): New macros.
21549 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21550 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21551 JDEP_VARIABLE): New enum values and jdep kinds.
21552 (jdeplist): New typedef on struct _jdeplist.
21553 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21554 macros.
21555 (CALL_EXPR_PRIMARY): New macro.
21556 (struct parser_ctxt): Fields java_pass, current_method_decl,
21557 method_decl_list deleted. New field jdeplist.
21558 (INCOMPLETE_P): Macro deleted.
21559 * parse.y (single_type_import_declaration:): Removed pass switch.
21560 (type_import_on_demand_declaration): Likewise.
21561 (field_declaration:): Removed pass switch on all sub rules.
21562 (class_declaration:): Call the complete_class_decl removed on
21563 class_body rules.
21564 (method_declaration:): Removed second pass switch. No longer chain
21565 methods decl when method_header reduced.
21566 (method_header:): Sub rules no longer depend on pass switch.
21567 (method_declarator:): Likewise.
21568 (method_body:): Likewise.
21569 (abstract_method_declaration:): Likewise.
21570 (block_statement:): Likewise.
21571 (local_variable_declaration:): Likewise.
21572 (argument_list:): Likewise.
21573 (method_invocation:): Likewise. Call to build_method_invocation_stmt
21574 removed. Partial CLASS_EXPR tree node built instead.
21575 (postfix_expression:): Removed pass switch on all sub rules.
21576 (java_pop_parser_context): Free classd_list content.
21577 (yyerror): Call obstrack_grow0 to finalize error message.
21578 (check_class_interface_creation): Comment modified to reflect new
21579 returned value meaning. Removed second pass switch. Return 1 if an
21580 error was found, 0 otherwise. Adjust pointer on filename if a
21581 leading path separator was found.
21582 (maybe_create_class_interface_decl): Removed first pass switch
21583 when linking the class decl to the class_list. Install a new
21584 jdep_list for the class.
21585 (add_superinterfaces): List of unresolved interfaces is
21586 gone. Unresolved interfaces are directly added to the current
21587 dependencies list.
21588 (create_interface): Second pass shortcut removed.
21589 ctpx->modifier_ctx access through MODIFIER_WFL.
21590 (create_class): Second pass shortcut removed. Call to
21591 register_incomplete_type replaces the call to
21592 parser_chain_incomplete_item.
21593 (complete_class_decl): Function removed.
21594 (duplicate_declaration_error): New way of retrieving redeclared
21595 item type.
21596 (register_fields): Call to lookup_modifier_cl replaced by
21597 MODIFIER_WFL. New way of handling unresolved type, using
21598 unresolved_type_p and obtain_incomplete_type.
21599 register_incomplete_type replaces call to parser_chain_incomplete_item.
21600 (patch_stage): New static global variable.
21601 (method_header): New way of handling unresolved type, using
21602 unresolved_type_p and obtain_incomplete_type. patch_stage used to
21603 indicates that the method decl needs to be patched.
21604 (check_abstract_method_header): Call to lookup_modifier_cl
21605 replaced by MODIFIER_WFL.
21606 (method_declarator): Incomplete argument type are registered
21607 calling register_incomplete_type. Patch on the declared method is
21608 issued in that case.
21609 (unresolved_type_p): New function.
21610 (parser_check_super_interface): New comment to reflect function's
21611 modified returned type (int). Function and has a new argument
21612 this_wfl. Call to parse_error_context uses this_wfl instead of
21613 relying on lookup_cl.
21614 (parser_check_super): Comment reflects function's new returned
21615 type (int). Function returns nonzero value on error.
21616 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21617 register_incomplete_type, jdep_resolve_class): New functions to
21618 handle incomplete types in declarations.
21619 (java_complete_class): Rewritten to work with the new incomplete
21620 type handling scheme.
21621 (complete_class_report_errors): Likewise.
21622 (complete_method_decl): Removed: it jobs is now handled by
21623 java_complete_class.
21624 (do_resolve_class): Class loaded in not already loaded and not
21625 found in Java source code.
21626 (java_check_regular_methods, java_check_abstract_methods): Don't
21627 call complete_method_decl anymore.
21628 (lookup_modifier_cl, not_builtin_p): Functions deleted.
21629 (read_import_dir): Got rid of the pass number dependency.
21630 (declare_local_variables): New handling of unresolved types (patch
21631 issued).
21632 (source_start_java_method): New parameter level. Function called
21633 with level set to 1 when argument types are potentially
21634 unresolved. Called to complete the job with level set to 2 once
21635 types are complete.
21636 (source_end_java_method): Call to permanent_allocation
21637 removed. Waiting to be replaced by a more suitable obstack
21638 management.
21639 (java_complete_expand_methods, java_complete_expand_method,
21640 java_expand_finals): New functions.
21641 (build_method_invocation_stmt): Renamed
21642 patch_method_invocation_stmt. Extracts function call expression
21643 (wfl) and arguments (args) from CALL_EXPR tree operands.
21644 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21645 call. Patch the function and argument operand of the CALL_EXPR
21646 tree argument.
21647 (patch_argument, java_complete_tree): New functions.
21648
21649 1998-04-20 Per Bothner <bothner@cygnus.com>
21650
21651 Recover from missing fields and methods (i.e. error instead of fatal).
21652 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
21653 * expr.c (expand_invoke): Recover from missing method.
21654 (expand_java_field_op): Recover from missing field.
21655 Inline references to java.lang.{Integer,Char,...}.TYPE.
21656 * typeck.c (get_type_from_signature), java-tree.h: New function.
21657 * class.c (add_method): Use get_type_from_signature.
21658 (build_class_ref): Handle a class that was not found.
21659 * typeck.c (convert): Handle conversion to pointers (for convenience).
21660 * verify.c (verify_jvm_instructions): Use get_type_from_signature
21661 instead of lookup_field to handle missing fields.
21662
21663 * jcf-parse.c (process_zip_dir): Set java_source.
21664
21665 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
21666
21667 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21668
21669 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
21670
21671 * jcf-parse.c (load_class): Don't change input_filename before
21672 calling jcf_parse_source (but still do it before calling
21673 jcf_parse).
21674 (jcf_parse_source): Assign input_filename after having saved the
21675 parser context.
21676 * lex.c (java_init_lex): Chain a WFL node to the import on demand
21677 list. ctxp->modifier_ctx zeroed according to its new
21678 definition. ctxp->filename initialized. Removed
21679 JAVA_MODIFIER_CTX_UNMARK.
21680 (java_unget_unicode): Update the character based column position.
21681 (java_allocate_new_line): ref_count not used anymore. Always free
21682 ctxp->p_line. Initialize c_line->char_col to 0.
21683 (java_get_unicode): Update the character based column position.
21684 (java_lex): Use ctxp->elc to store current position in source
21685 file, at the beginning of the parsed token. Set modifier_ctx entry
21686 corresponding to the parse modifier to a WFL node. Return a WFL
21687 node when an identifier is parsed.
21688 (java_lex_error): Now uses ctxp->elc to store current position in
21689 source.
21690 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21691 * lex.h (build_wfl_node): New function definitions.
21692 (struct java_line): ref_count and next fields are gone. New field
21693 char_col.
21694 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21695 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21696 (JAVA_COLUMN_DELTA): New macro.
21697 (java_lc): New typedef on new struct _java_lc.
21698 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21699 (parse_error_context, parse_warning_context): Changed prototypes.
21700 (java_get_line_col): Added as an available global function.
21701 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21702 (IC_DECL): Replaced by macro IC_TYPE
21703 (DEPEND_WFL): New macro.
21704 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21705 wrong modifier.
21706 (exit_java_complete_class): Removed a commented out statement.
21707 (struct parser_ctxt): Added comments on fields. modifier_ctx is
21708 now an array of tree nodes. Deleted fields line_list and
21709 e_line. New field elc, to replace e_line.
21710 * parse.y (array_type:): Build WFL node.
21711 (qualified_name:): Build a single WFL node out of two. Retain
21712 the location information of the first node in the resulting node.
21713 (package_declaration:): Use package name as a WFL node
21714 (single_type_import_declaration:): Use imported name as a WFL node.
21715 (type_import_on_demand_declaration:): Use root of the imported
21716 packages as a WFL node.
21717 (field_declaration:): Removed unused local variable cl.
21718 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21719 (yyerror): New static elc. Removed static error_line, error_pos.
21720 New local code_from_source. Save ctxp->elc into elc at the first
21721 pass. Call java_get_line_col to get a string of the line where
21722 the error occurred.
21723 (debug_line): Removed static function.
21724 (parse_error_context, parse_warning_context): Parameter cl is now
21725 a WFL node. Use its value to initialize ctxp->elc.
21726 (redefinition_error): Parameter cl is now a WFL node.
21727 (parse_add_interface): New parameter wfl. No longer call
21728 lookup_cl, use wfl instead.
21729 (check_class_interface_creation): Parameter cl is now a WFL node.
21730 (maybe_create_class_interface_decl): Likewise.
21731 (add_superinterfaces): New function.
21732 (create_interface): Removed local cl, node, super_decl,
21733 super_decl_type. Function now uses id as a WFL node. Better
21734 warning/error report on obsolete or forbidden mix of
21735 modifiers. Now calls add_superinterfaces to register interfaces.
21736 (create_class): Removed local cl, node. Local variable id is used
21737 as a WFL node. Better error report on forbidden modifier
21738 mix. Uses add_superinterfaces to register interfaces.
21739 (find_field): Argument cl is now a WFL node. Now store the WFL
21740 node of a fields that needs to be checked for their
21741 initialization.
21742 (method_header): Local variable node non longer used. Local
21743 variable id replaces cl.
21744 (check_modifiers_consistency): Local variable cl is now a WFL
21745 node.
21746 (method_declarator): Local variable cl replaced by parameter id.
21747 (parser_qualified_name): Now uses parameter name as a WFL node.
21748 (parser_check_super_interface): New parameter wfl, for achieve
21749 greater accuracy during error reports.
21750 (parser_chain_incomplete_item): New parameter named location. Used,
21751 along the decl, to construct the incomplete item node.
21752 (java_complete_class): resolve_class now uses WFL node extracted
21753 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21754 where appropriate.
21755 (complete_method_decl): Unresolved function's argument types are WFL.
21756 (resolve_class): Parameter cl is now a WFL node.
21757 (resolve_and_layout): Likewise.
21758 (do_resolve_class): Likewise. Try first to use cl and then do the
21759 lookup on the decl when calling check_pkg_class_access.
21760 (complete_class_report_errors): Use IC_TYPE in place of
21761 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21762 instead of doing a lookup over the decl.
21763 (java_check_final): Use WFL info from field tree list.
21764 (lookup_cl): Rewritten and returns a statically defined WFL node.
21765 (lookup_modifier_cl): Now uses information from WFL nodes.
21766 (process_imports): Likewise.
21767 (read_import_dir): name and cl arguments replaced by a single WFL
21768 node. Function modified accordingly.
21769 (find_in_imports_on_demand): Now uses WFL node.
21770 (check_pkg_class_access): cl argument is now a WFL node.
21771 (declare_local_variables): Fixed to use WFL nodes.
21772 (resolve_expression_name): Likewise.
21773 (build_method_invocation_stmt): name_combo argument renamed
21774 wfl. Function modified to use WFL nodes.
21775 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21776 (lookup_method_invoke): cl is now a WFL node. Added missing
21777 IDENTIFIER_POINTER to class type decl name.
21778
21779 1998-04-14 Dave Brolley <brolley@cygnus.com>
21780
21781 * lang.c (init_parse): Now returns char* containing the filename.
21782
21783 1998-04-10 Per Bothner <bothner@cygnus.com>
21784
21785 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
21786
21787 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
21788 * class.c (make_class_data): If flag_assume_compiled, initial class
21789 state is CSTATE_PREPARED; make superclass and interfaces direct
21790 references, rather than constant pool indexes.
21791
21792 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21793
21794 * parser.y: Include flags.h. Removed debug variable pl.
21795 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21796 (block:): Likewise.
21797 (labeled_statement_nsi:): Generate debug info when reducing
21798 expression_statement:.
21799 (check_pkg_class_access): get_access_flags_from_decl invocation
21800 fixed for new CLASS_* flags location.
21801 (source_end_java_method): Save/restore parser context when
21802 entering/leaving this routine. Restore lineno to its right value
21803 before calling expand_end_bindings.
21804 (build_method_invocation_stmt): build_invoke called with the
21805 current line information.
21806 (build_invoke): New argument cl. Wrap the function call around a
21807 wfl node.
21808 (refine_accessible_methods_list): Changed comment, removed
21809 unnecessary code.
21810 * parse.h: Fixed typo in comments.
21811 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21812 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21813 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
21814 parser_ccb_indent.
21815 * lex.c (java_lex): Record the last closing curly bracket of a
21816 function.
21817 * jcf-parse.c (jcf_parse_source): Now calls
21818 java_check_methods. Clarified comment, fixed typo.
21819
21820 1998-04-09 Dave Brolley <brolley@cygnus.com>
21821
21822 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21823 (finish_parse): Expose for non USE_CPPLIB builds.
21824
21825 1998-04-08 Jeffrey A Law (law@cygnus.com)
21826
21827 * lang.c (lang_print_xnode): New function.
21828
21829 1998-04-03 Per Bothner <bothner@cygnus.com>
21830
21831 * decl.c (class_dtable_decl), java-tree.h: New tree node.
21832 * class.c (get_dispatch_vector, get_dispatch_table): New functions
21833 used to build a class's dispatch table.
21834 (make_class_data): Generate dispatch table if flag_assume_compiled.
21835 Set dtable of class object to address of class_dtable_decl.
21836
21837 * decl.c (int_decl_processing): Make soft_badarrayindex_node
21838 be volatile and have side effects - generates better code.
21839
21840 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
21841 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21842
21843 * expr.c (expand_invoke): If class is final, method is
21844 effectively final, so can call it directly.
21845
21846 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
21847
21848 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
21849
21850 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
21851
21852 * parse.y (build_method_invocation_stmt): Removed extra argument
21853 to build_invoke.
21854
21855 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
21856
21857 * expr.c (dtable_indent): Now static global.
21858 (expand_invoke): Now call invoke_build_dtable and
21859 build_invokevirtual.
21860 (invoke_build_dtable, build_invokevirtual): New functions.
21861 * jcf-io.c (find_class): Defer issuing a warning by setting
21862 jcf->outofsynch to 1.
21863 * jcf-parse.c (jcf_out_of_synch): New function.
21864 (load_class): Test this_jcf.outofsynch flag and call
21865 jcf_out_of_synch accordingly.
21866 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
21867 comment indentation.
21868 * lex.c (java_get_unicode): Fixed code indentation.
21869 (java_lex): Create string literal. Fixed typo. Removed several
21870 premature obstack_free.
21871 * parse.h: New enums for name resolution and invocation mode.
21872 (struct qualification): New data structure.
21873 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21874 (do_resolve_class, build_method_invocation_stmt,
21875 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21876 debug_line, identical_subpath_p, invocation_mode,
21877 refine_accessible_methods_list, build_invoke,
21878 lookup_method_invoke): New functions declared.
21879 (build_invokevirtual, invoke_build_dtable, match_java_method,
21880 build_field_ref, jcf_out_of_synch): New references to external
21881 functions.
21882 (struct parse_ctxt): Removed artificial_constructor field.
21883 * parse.y: (array_type:): Type defined for this rule.
21884 (class_type:): Installed default rule for interface_type:.
21885 (array_type:): Now build Java array type.
21886 (qualified_name:): Now use obstack_grow0.
21887 (method_declaration:): Skip the artificial constructor added to
21888 the list, if any.
21889 (abstract_method_declaration:): Execute the code only during pass 1.
21890 (block:): Installed default rule in block_statements:.
21891 (block_statement:): Add the statement to the method during pass 2.
21892 (statement_expression): Installed default rule for
21893 method_invocation:.
21894 (argument_list:): Added code to build the argument list.
21895 (method_invocation:): Added call to create the method invocation
21896 node.
21897 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21898 (debug_line): New function for debug.
21899 (complete_class_decl): No longer do something during pass 1.
21900 (method_header): Use BUILD_PTR_FROM_NAME.
21901 (parser_qualified_classname): Use obstack_grow0. Removed bogus
21902 obstack_free.
21903 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
21904 function's main comment.
21905 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
21906 classes.
21907 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
21908 (resolve_class): Now works with arrays.
21909 (do_resolve_class, resolve_and_layout): New functions.
21910 (java_check_regular_methods): Reverse method list before and after
21911 having processed it. No longer set ctxp->artificial_constructor.
21912 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
21913 accordingly. Fixed typo in issued error message. Now use
21914 obstack_grow0.
21915 (find_in_imports_on_demand): Now use obstack_grow0.
21916 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
21917 (source_end_java_method): Call expand_expr_stmt instead of
21918 expand_expr. Calls it before calling expand_function_end.
21919 (java_method_add_stmt): Do nothing if errors were found during
21920 parsing.
21921 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
21922 (build_method_invocation_stmt, build_invoke, invocation_mode,
21923 lookup_method_invoke, refine_accessible_methods_list,
21924 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
21925 New functions.
21926 * typeck.c (build_java_signature): Properly end method signature
21927 if return type skipped.
21928 (match_java_method): New function.
21929
21930 1998-03-16 Per Bothner <bothner@cygnus.com>
21931
21932 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
21933
21934 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
21935
21936 * expr.c (build_invoke_non_interface): New function.
21937 (methods_ident, ncode_ident): Now static globals.
21938 (expand_invoke): Use build_invoke_non_interface.
21939 * java-tree.h (struct lang_decl): New field function_decl_body.
21940 (DECL_FUNCTION_BODY): New macro.
21941 * jcf-parse.c (jcf_parse_source): Deeper check before setting
21942 CLASS_FROM_SOURCE_P.
21943 (parse_source_file): Fixed typos. Call java_layout_parsed_class
21944 before starting pass 2. Call to java_generate_parsed_class replaced
21945 by java_register_parsed_class.
21946 * lex.c: Fixed typo in header. Some line width related formating.
21947 * lex.h: Some line width related formating.
21948 * parse.h (source_end_java_method, resolve_expression_name,
21949 complete_class_decl, maybe_create_class_interface_decl,
21950 check_class_interface_creation): New static function declarations.
21951 (java_layout_parsed_class, java_method_add_stmt): New function
21952 declarations.
21953 (struct parser_ctxt): Field mark_class_generate removed. New
21954 fields class_list and artificial_constructor.
21955 * parse.y: Fixed typo in header.
21956 (class_declaration:): Call complete_class_decl when class body
21957 parsed.
21958 (method_declaration:): Call source_end_java_method in pass 2 when
21959 the method body is defined.
21960 (postfix_expression:): Do expression name resolution on sub-rule
21961 name during pass 2.
21962 (create_class, create_interface): Merged common pieces.
21963 (check_class_interface_creation, maybe_create_class_interface_decl):
21964 New functions.
21965 (complete_class_decl): New function.
21966 (register_fields): Fixed line width related typo.
21967 (method_header): Correctly skip first argument when fixing
21968 argument line. Changed the loop.
21969 (java_check_circular_reference): Now use ctxp->class_list.
21970 (java_complete_class): Removed start/stop marking.
21971 (java_check_regular_methods): Now takes a class decl as an
21972 argument. Add default constructor if none were encountered.
21973 (java_check_methods): Now use ctxp->class_list. Changed call to
21974 java_check_regular_methods.
21975 (source_start_java_method): Set DECL_ARG_TYPE for each function
21976 arguments.
21977 (source_end_java_method, java_method_add_stmt): New functions.
21978 (java_generate_parsed_class): No longer exists.
21979 (java_layout_parsed_class, java_register_parsed_class): New functions.
21980 (resolve_expression_name): New function.
21981
21982 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
21983
21984 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
21985 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
21986 until pass initializations are done. Call read_import_dir with
21987 pass set to 0.
21988 * parse.h: (lookup_modifier_cl): New function declared.
21989 (INTERFACE_FIELD_MODIFIERS): New macro.
21990 (OBSOLETE_MODIFIER_WARNING): New macro.
21991 * parse.y: (register_fields): Class type and current field name in
21992 local variables. Check modifier(s) if adding field(s) to an interface.
21993 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
21994 and report errors using the faulty modifier line context.
21995 (lookup_modifier_cl): New function.
21996 (read_import_dir): Detect and report default import processing
21997 failure.
21998
21999 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
22000
22001 Add a pair of -fassume-compiled/-fno-assume-compiled options.
22002 * class.c (is_compiled_class): Return 1 after making sure it
22003 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
22004 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
22005 * java-tree.h (flag_assume_compiled): Add decl.
22006 * lang.c (lang_f_options): Add the flag.
22007 (flag_assume_compiled): Add decl, default to 0.
22008
22009 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
22010
22011 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
22012 (is_compiled_class): Likewise.
22013 (layout_class): Likewise.
22014 (layout_class): Detect and lay out classes defined in source code.
22015 (interface_of_p, add_interface_do, may_add_interface): New
22016 function.
22017 (add_interface): Now use add_interface_do.
22018 (add_method_1): New function.
22019 (add_method): Now use add_method_1.
22020 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
22021 (complete_start_java_method): New function.
22022 (start_java_mehod): Now call complete_start_java_method.
22023 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
22024 (expand_invoke): Likewise and fixed typo.
22025 *gjava.c: (print_super_field): Use new argument to find_class
22026 DO_CLASS_FILE.
22027 (main): Likewise.
22028 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
22029 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
22030 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
22031 IDENTIFIER_NODE.
22032 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
22033 (add_method_1, push_class): New prototypes.
22034 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
22035 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
22036 directory where the class was found.
22037 (find_class): New argument DO_CLASS_FILE. Function find_class
22038 modified accordingly.
22039 *jcf-parse.c: (fix_class_path): New function.
22040 (load_class): Use new VERBOSE argument. load_class now finds and
22041 loads/parses .class/.java files. Save read_state of current_jcf
22042 if necessary.
22043 (java_parser_abort_on_error): New macro.
22044 (jcf_parse_source, parse_source_file): New function.
22045 (jcf_parse): Fixed typo.
22046 (yyparse): Call parse_source_file () only.
22047 (process_zip_dir): Fixed typo, fix zdir->filename_length when
22048 writing the real class name back in the zip directory entry.
22049 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
22050 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
22051 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
22052 (find_class): Prototype fixed.
22053 *lex.c: Added 1998 time stamp.
22054 Removed all static global variables, moved into the parser
22055 context data structure.. Now include unistd.h if SEEK_SET not
22056 defined.
22057 (java_init_lex): Rewritten.
22058 (java_sneak_unicode): Modified current unicode access in current line.
22059 (java_unget_unicode): Likewise.
22060 (java_allocate_new_line): New allocation management.
22061 (java_read_char): Modified access and storage of unget_utf8_value.
22062 New way of processing current unicode.
22063 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
22064 (java_get_unicode): Now use the parser context.
22065 (java_lineterminator): Likewise.
22066 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
22067 of the reentrant parser implementation. Function now use the
22068 parser context data structure and java_lval. Fixed production of
22069 the float and double constant "out of range" error message. Fixed
22070 obstack use. Return integer value when hitting a modifier. Now
22071 return type for TRUE, FALSE and other predefined types. Return
22072 identifier as a TREE_LIST list containing the current line context
22073 as the TREE_VALUE sub-node.
22074 (java_unicode_2_utf8): Fixed typo in declaration.
22075 (java_lex_error): Now use the parser context data structure.
22076 *lex.h: Added 1998 time stamp.
22077 (struct java_line): New fields ref_count and next.
22078 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
22079 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
22080 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
22081 *parse.h: Added 1998 time stamp.
22082 (java_parse_source_file): Renamed from parse_source_file.
22083 (YYERROR_NOW, YYNOT_TWICE): Fixed.
22084 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
22085 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
22086 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
22087 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
22088 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
22089 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
22090 (struct parser_ctxt): New data structure to keep the parser context.
22091 *parse.y: Added 1998 time stamp, got rid of static global variables.
22092 (java_error_count, ctxp): New global variables.
22093 (%union): New value field.
22094 (numeric_type, integral_type): Rules removed.
22095 (primitive_type): Rule defined to handle integral, float, double and
22096 boolean types.
22097 (qualified_name, package_declaration,
22098 single_type_import_declaration, type_import_on_demand_declaration,
22099 modifiers, class_declaration, super, interfaces,
22100 interface_type_list, class_body, field_declaration,
22101 field_declaration, variable_declarators, variable_declarator,
22102 variable_declarator_id, method_declaration, method_header,
22103 formal_parameter_list, formal_parameter, method_body, block,
22104 static, interface_declaration, extends_interfaces,
22105 abstract_method_declaration, local_variable_declarators): Rules now
22106 define actions.
22107 (force_error, do_warning): New global statics.
22108 (push_parser_context, parser_context_save_global,
22109 parser_context_restore_global, pop_parser_context): New functions.
22110 (yyerror): Now uses the global parser context. Fixed use of obstack.
22111 (parse_error, parse_error_context, parse_warning_context,
22112 java_accstring_lookup, redefinition_error, check_modifiers,
22113 parser_add_interface, create_interface, create_class, find_field,
22114 duplicate_declaration_error, register_fields, method_header,
22115 check_modifiers_consistency, check_abstract_method_header,
22116 method_declarator, parser_qualified_classname,
22117 parser_check_super_interface, parser_check_super,
22118 parser_chain_incomplete_item, java_check_circular_reference,
22119 layout_class_from_source, java_complete_class,
22120 complete_method_decl, resolve_class, complete_class_report_errors,
22121 java_check_final, check_method_redefinition,
22122 java_check_regular_methods, java_check_abstract_methods,
22123 java_check_methods, lookup_java_interface_method2,
22124 lookup_java_method2, lookup_cl, find_name_in_single_imports,
22125 process_imports, find_in_imports, read_import_entry,
22126 read_import_dir, find_in_imports_on_demand,
22127 check_pkg_class_access, not_builtin_p, declare_local_variables,
22128 source_start_java_method, java_generate_parsed_class): New
22129 functions.
22130 *typeck.c: (signature_include_return): New global variable.
22131 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
22132 to add the function returned type in the signature.
22133
22134 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
22135
22136 * jcf-io.c (open_in_zip): Use strncmp and LEN.
22137
22138 1998-01-29 Dave Brolley <brolley@cygnus.com>
22139
22140 * Make-lang.in (java.info): Added.
22141 (java.install-info): Added
22142
22143 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
22144
22145 * Makefile.in (clean): Also remove java/parse.c.
22146
22147 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
22148
22149 Add a pair of -fbounds-check/-fno-bounds-check options.
22150 * lang.c (lang_decode_option): Add code to grok arguments.
22151 (flag_bounds_check): Add decl.
22152 (lang_f_options): New array w/ the option in it.
22153 * java-tree.h (flag_bounds_check): Add decl.
22154 * lang-options.h: New file.
22155 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
22156 of a static macro value.
22157 (JAVA_ARRAY_EXCEPTION): Delete macro.
22158
22159 1998-01-23 Per Bothner <bothner@cygnus.com>
22160
22161 * typeck.c (build_java_array_type): Fix two bugs in previous change.
22162 * expr.c (build_anewarray): Add missing promote_type.
22163
22164 1998-01-22 Per Bothner <bothner@cygnus.com>
22165
22166 Add array types with known length to optimize bounds checking.
22167 * typeck.c (build_java_array_type): Take length parameter.
22168 (java_array_type_length, build_prim_array_type): New functions.
22169 * java-tree.h: Update for new functions.
22170 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
22171 * class.c: Use build_prim_array_type.
22172 * expr.c (can_widen_reference_to): Handle known-length array types.
22173 (verify_jvm_instructions): Keep track of integer push instructions
22174 followed by newarray/anewarray, so we can build known-length arrays.
22175 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
22176 (java_array_data_offset): New function.
22177 (build_java_array_length_access): New function. Optimize if constant.
22178 (build_java_arrayaccess): Constant fold bounds check.
22179 (expand_java_newarray, expand_java_anewarray): Replaced by ...
22180 (build_newarray, build_anewarray): New functions.
22181 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
22182 * verify.c (merge_types): Handle known-lengh array types.
22183
22184 1998-01-19 Per Bothner <bothner@cygnus.com>
22185
22186 * expr.c (expand_byte_code): Fix performace bug, which caused
22187 searching linenumber_table to be linear rather than constant.
22188
22189 1997-12-12 Per Bothner <bothner@cygnus.com>
22190
22191 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
22192
22193 * decl.c, java-tree.h (soft_fmod_node): New global.
22194 * decl.c (init_decl_processing): Define __builtin_fmod.
22195 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
22196 using __builtin_fmod.
22197
22198 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
22199
22200 * keyword.h: New file, output of keyword.gperf as processed by
22201 gperf.
22202 * lex.c (java_lex_init): Initialize java_error_flag.
22203 * parse.c (YYERROR_NOW): Uses java_error_flag.
22204 * parse.y: New static java_error_flag. Useless definition of
22205 buffer_error gone.
22206 * parse.y (java_error): Portable error recovery using
22207 java_error_flag (not yet completely tuned).
22208
22209 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
22210
22211 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
22212
22213 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
22214
22215 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
22216 (parse.c, lex.c, keyword.h): New rules for Java source code
22217 front-end.
22218 * parse.c: Renamed into jcf-parse.c.
22219 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
22220 * keyword.gperf: New file, Java keywords.
22221 * parse.y: New file, Java language grammar.
22222 * parse.h: New file, Java language grammar definitions.
22223 * lex.c: New file, Java language lexer.
22224 * lex.h: New file, Java language lexer definitions.
22225
22226 1997-12-03 Per Bothner <bothner@cygnus.com>
22227
22228 * decl.c (clinit_identifier_node), java-tree.h: New global.
22229 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
22230 * verify.c (verify_jvm_instructions): Inline use of removed macros.
22231 * expr.c (expand_java_field_op): Check for invalid assignment
22232 to final field.
22233
22234 * jcf-reader.c (get_attribute): Test for wrong attribute length.
22235
22236 1997-10-27 Per Bothner <bothner@cygnus.com>
22237
22238 * verify.c (verify_jvm_instructions): When processing a handler,
22239 attempt to set the current_subr to the right value.
22240 (More complicated code combines Sep 17 and Oct 22 versions.)
22241
22242 1997-10-24 Per Bothner <bothner@cygnus.com>
22243
22244 * class.c (push_class): Figure out (guess) name of source file.
22245 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
22246 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
22247 (parse_class_file): Change return type from int to void.
22248 Call debug_start_source_file/debug_end_source_file.
22249
22250 * expr.c (build_java_binop): Fix masking 2nd operand.
22251 * decl.c (init_decl_processing): Set sizetype first.
22252
22253 1997-10-22 Per Bothner <bothner@cygnus.com>
22254
22255 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
22256 (Revert Sep 17 change.)
22257
22258 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
22259
22260 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
22261 .class extension in their name and fix thing so we don't process
22262 them parse_zip_file_entries().
22263 (parse_zip_file_entries): Cleaned unused local variables.
22264
22265 1997-10-20 Per Bothner <bothner@cygnus.com>
22266
22267 * expr.c (can_widen_reference_to): Allows equal array element types.
22268 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
22269 * jcf-dump.c (RET): Get (and print) index.
22270
22271 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
22272 Promote element type to POINTER_TYPE.
22273
22274 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22275
22276 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
22277 find_in_current_zip, jcf_figure_file_type): Moved from
22278 jcf-reader.c to parse.c.
22279 * zextract.c: (read_zip_archive): takes file_comment_length possible
22280 field into account.
22281
22282 1997-10-20 Per Bothner <bothner@cygnus.com>
22283
22284 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
22285
22286 * verify.c (merge_types): Handle array types even better ...
22287
22288 1997-10-17 Per Bothner <bothner@cygnus.com>
22289
22290 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
22291
22292 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
22293 * class.c (make_class_data): Don't build fields_decl if no fields.
22294 When building fields_decl, skip if DECL_ARTIFICIAL.
22295
22296 * expr.c (java_stack_swap): Update stack_type_map.
22297 * verify.c (merge_types): Handle array types better.
22298
22299 1997-10-15 Per Bothner <bothner@cygnus.com>
22300
22301 * class.c (add_field): Don't promote short integral fields to
22302 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
22303 * expr.c (push_value): Promote and convert short integral values.
22304
22305 * decl.c, java-tree.h (integer_two_node): New constant node.
22306 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
22307
22308 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
22309
22310 * class.c (append_gpp_mangled_type): Use function argument
22311 unpromoted type to generate mangled name.
22312
22313 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
22314
22315 * constants.c (build_constant_data_ref): Now uses current_class
22316 instead of main_class.
22317 (build_constants_constructor): Now uses current_class instead of
22318 main_class.
22319 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
22320 of the global variable SeepZipFiles done here.
22321 * zextract.c (read_zip_archive): extra_field optional field taken
22322 into account while computing the position of the class file in the
22323 archive.
22324 * verify.c (verify_jvm_instructions): Use current_jcf to search
22325 the constant pool.
22326 * parse.c (load_class): First search for the class to load in the
22327 current zip file. Saves current_jcf (restored before returning
22328 from that function). Don't call JCF_FINISH in the class was found
22329 in the current ZIP file.
22330 (jcf_parse): If the class was found in the current ZIP file, save
22331 its tree_constant_pool (for later reuse).
22332 (parse_class_file): New function. Process each method defined in
22333 the current class and record the class as to be later registered.
22334 (yyparse): Rewritten. Figure the type of the current file and switch
22335 accordingly.
22336 * lang.c: New global variable current_jcf.
22337 (lang_init): Removed compiling_from_source test (done later, in
22338 yyparse). Removed call the jcf_parse ().
22339 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
22340 (typedef struct JCF): New fields seen_in_zip (to mark a class found
22341 in the current ZIP file) and zip_offset (offset to the class data in
22342 the current zip file).
22343 * jcf-reader.c: zipfile.h included.
22344 localToFile: New ZipFileCache static global variable
22345 (parse_zip_file_entries): New function. Browse the current ZIP
22346 file directory and process each class found.
22347 (process_zip_dir): New function. Register each class found in the
22348 ZIP file directory. The class aren't parsed but a valid JCF is
22349 link to each of them.
22350 (find_in_current_zip): New function. Search for a class in the
22351 current ZIP file directory. If found, prepare the class so that it
22352 can be loaded.
22353 (jcf_figure_file_type): New function. Examine the file structure
22354 to figure a class file, a ZIP file. If none of these categories are
22355 matched, a source file is assumed.
22356 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
22357 SeenZipFile: New global variable.
22358 (open_in_zip): Use zipmember's length to accelerate the search for
22359 a member. If zipmember was NULL and zip file successfully read,
22360 return 0.
22361 * java-tree.h: New global variable current_jcf declared. Added
22362 declaration for current_constant_pool_tags, current_constant_pool_data,
22363 current_constant_pool_length, current_constant_pool_data_ref.
22364 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
22365 store the JCF of classes seen in a zip file) and tree *constant_pool
22366 (to save a loaded class constant pool). current_class declared here.
22367 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
22368 retrieve method_ref_constant.
22369 (PUSHC): java_push_constant_from_pool now uses current_jcf.
22370 (OBJECT): get_class_constant now uses current_jcf.
22371 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
22372 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
22373 (expand_invoke): Now uses current_class instead of main_class
22374 (build_class_init): Now uses current_class instead of main_class
22375 * class.c: New static global variable registered_class.
22376 (register_class): New function.
22377 (emit_register_class): Modified to use registered_class instead of
22378 main_class
22379 (is_compiled_class): Now take into account class seen in the archive.
22380
22381 1997-10-06 Per Bothner <bothner@cygnus.com>
22382
22383 * except.h: Renamed to: java-except.h.
22384 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
22385 * except.c: Add semi-working (commented out) implementation.
22386
22387 * expr.c (expand_iinc): Add needed flush_quick_stack.
22388 * parse.c (set_source_filename): New function.
22389 (give_name_to_class): Set input_filename from package.classname.java.
22390
22391 * jcf-io.c (find_class): Don't look first in ".".
22392
22393 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
22394
22395 * zextract.c (read_zip_archive): Now takes into account the
22396 extra_field field.
22397 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
22398
22399 1997-09-20 Per Bothner <bothner@cygnus.com>
22400
22401 * constants.c, java-tree.h (build_internal_class_name): New function.
22402 (alloc_class_constant): Re-implement using build_internal_class_name.
22403 * class.c (make_class_data): Likewise.
22404 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
22405
22406 1997-09-17 Per Bothner <bothner@cygnus.com>
22407
22408 * verify.c (verify_jvm_instructions): Temporarily set current_subr
22409 to NULL before pushing an exception handler target.
22410
22411 * expr.c (flush_quick_stack): Save from low stack indexes to high.
22412 (java_stack_swap, java_stack_dup): Re-write to be safe from
22413 clobbering registers.
22414 (build_class_init): New function.
22415
22416 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
22417
22418 * typeck.c (build_java_array_type): Temporary use
22419 permanent_obstack to create the array 'length' field.
22420 * expr.c (lookup_label): Temporay use permanent_obstack to create
22421 label if not found.
22422 * class.c (push_super_field): Tempory use permanent_obstack.
22423
22424 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
22425
22426 * typeck.c (type_for_mode): Now handles double_type_node and
22427 float_type_node.
22428 * verify.c (verify_jvm_instructions): The instruction following
22429 the wide bytecode is checked. OPCODE_ret added to the list of
22430 wide.
22431
22432 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
22433
22434 * class.c (make_class): Temporary use permanent_obstack. Set the
22435 class CLASS_P field to 1.
22436 (push_class): Temporary use permanent_obstack.
22437 (set_super_info): Temporary use permanent_obstack.
22438 (add_method): Temporary use permanent_obstack, set
22439 METHOD_TRANSIENT().
22440 (add_field): Temporary use permanent_obstack. Sets
22441 FIELD_VOLATILE() and FIELD_TRANSIENT().
22442 (build_class_ref): Temporary use permanent_obstack if the class
22443 isn't compiled.
22444 (build_static_field_ref): Temporary use permanent_obstack when
22445 creating field's rtl.
22446 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
22447 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
22448 and fields. Function finalized, as far as flag handling.
22449 (push_class_static_dummy_field): Temporary use permanent_obstack.
22450 (emit_register_class): Force generation of class registration at
22451 -O3 or deeper.
22452 * decl.c (end_java_method): Call permanent_allocation() before
22453 returning.
22454 * expr.c (can_widen_reference_to): Added comment to interface
22455 handling, fixed typo.
22456 (lookup_field): Now uses CLASS_P() to correct FIXME
22457 (expand_invoke): Verification on public && !static &&
22458 !abstract moved into soft_lookupinterfacemethod (kaffe).
22459 Use Object class dtable if objectref is an array when expanding
22460 invokeinterface.
22461 (java_push_constant_from_pool): Temporary use permanent_obstack
22462 for CONSTANT_string
22463 * parse.c (get_ref_constant): Temporary use permanent_obstack to
22464 create constant references.
22465 (get_constant): Temporary use permanent_obstack to create constant.
22466 (load_class): Temporary use permanent_obstack to load class.
22467 (jcf_parse): Temporary use permanent_obstack to perform class
22468 layout.
22469 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
22470 (build_java_signature): Temporary use permanent_obstack.
22471 * verify.c: (verify_jvm_instruction): removed unnecessary verification
22472 on ACC_SUPER flag.
22473 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
22474 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
22475 (CLASS_P): Defined
22476
22477 1997-09-11 Per Bothner <bothner@cygnus.com>
22478
22479 * class.c (append_gpp_mangled_type): Fix typo.
22480 (emit_register_class): Use main_class to get class object, rather
22481 than looking for no-longer-existing static decl starting with _CL.
22482 * typeck.c (parse_signature_type): Promote array element type
22483 if it is a RECORD_TYPE.
22484
22485 1997-09-10 Per Bothner <bothner@cygnus.com>
22486
22487 * class.c (push_class_static_dummy_field): New function.
22488 (mangle_static_field): New. Do G++-style mangling of static fields.
22489 (layout_class): Mandle static fields here, not in add_field.
22490 (build_class_ref): The class object is now a dummy static field.
22491 * decl.c (find_local_variable): Look for best, instead of first match.
22492 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
22493 (build_java_athrow): Don't check here if exception is Throwable.
22494 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
22495 (TYPE_USED): Removed. No longer used ...
22496 * parse.c (jcf_parse): Call push_class_static_dummy_field.
22497 * verify.c (push_pending_label): New function.
22498 (push_pending_block): Renamed to check_pending_block.
22499 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
22500 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
22501 re-checking possible handlers) after a store (less wasted work).
22502 Check for null handler (finally) before calling add_handler.
22503 Various changes to (finally?) correctly handle try/finally.
22504
22505 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
22506
22507 * class.c: Include stdio.h.
22508
22509 1997-09-04 Per Bothner <bothner@cygnus.com>
22510
22511 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22512 to make sure class is initialized before static/special invoke.
22513
22514 * verify.c (verify_jvm_instructions): On a store instruction,
22515 call find_local_variable to force pre-allocation of decl and rtx.
22516 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
22517
22518 1997-09-03 Per Bothner <bothner@cygnus.com>
22519
22520 * class.c (build_class_ref): Strip off "promoted_" if need be.
22521 (make_field_value): Call build_java_signature when needed.
22522 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
22523 * expr.c (build_java_athrow): Don't push_value of exception.
22524 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22525 match specification of [fd]cmp[lg] for NaNs.
22526 (expand_byte_code): Add support for exception handler ranges.
22527 * except.c: Add skeleton for EH code-generation.
22528 * verify.c (merge_types): Treat all promoted integral types as equal.
22529 * constants.c (build_constants_constructor): To force creation of
22530 current_constant_pool_data_ref, call build_constant_data_ref.
22531
22532 * javaop.def (lload): Fix typo.
22533 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
22534
22535 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
22536
22537 * parse.c: Don't include function.h.
22538
22539 1997-08-27 Per Bothner <bothner@cygnus.com>
22540
22541 * except.[ch]: New files.
22542 * Makefile.in (JAVA_OBJS): Add except.o
22543 * expr.c: Temporary warning about unimplemented exceptions.
22544 * verify.c: Verify exception handlers.
22545
22546 * jcf-dump.c (disassemble_method): Print exception table.
22547
22548 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
22549
22550 * expr.c (verify_jvm_instructions): Started a thorough
22551 verification of invoke* bytecodes.
22552 (expand_byte_code): flush quick stack if PC is the target of a
22553 branch. and undef RET (conflicting with config/i386/i386.h).
22554 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22555 used.
22556 (expand_invoke): Now handles invokeinterface and do more
22557 verification according to the bytecode.
22558 (lookup_field): Don't try to load the class if processing
22559 dtable_type.
22560 (can_widen_reference_to): Now handles interfaces.
22561 * decl.c (init_decl_processing): New global variable
22562 soft_lookupinterfacemethod_node, declared in java-tree.h.
22563 Call set_super_info on string_type_node.
22564 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22565 defined.
22566 * class.c (set_super_info): Fills the CLASS_* flags according to
22567 access_flags.
22568 (get_access_flags_from_decl): Handles all class flags.
22569
22570 1997-08-26 Per Bothner <bothner@cygnus.com>
22571
22572 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
22573 * parse.c (yyparse): Check for abstract method, and missing code.
22574 * expr.c (expand_byte_code): Change interface.
22575 * lang.c (put_decl_node): Print promoted types prettier.
22576 * verify.c (verify_jvm_instruction): Change interface.
22577 Partial support for scanning exception table.
22578 For load instructions, handle promoted integral types.
22579
22580 1997-08-21 Per Bothner <bothner@cygnus.com>
22581
22582 * verify.c: New file, with contents moved from expr.c.
22583 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
22584 * typeck.c (is_array_type_p): Moved here from expr.c.
22585 * java-tree.h: Add some now-needed function declarations.
22586 * Makefile.in (JAVA_OBJS): Added verify.o.
22587
22588 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22589
22590 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22591 METHOD_ABSTRACT flag.
22592
22593 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22594 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22595 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22596
22597 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22598 variables.
22599 (start_java_method): Hook for SYNCHRONIZED methods.
22600
22601 * expr.c (build_java_jsr, build_java_ret): New functions
22602 (JSR,PRE): New macros
22603 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22604 (verify_jvm_instructions): tableswitch, lookupswitch,
22605 monitorenter, monitorexit, goto_w: verified.
22606 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22607 (build_java_monitor): New function.
22608 (MONITOR_OPERATION): Modified to call build_java_monitor()
22609 (verify_jvm_instructions): Started a thorough verification of
22610 invoke* bytecodes.
22611
22612 1997-08-19 Per Bothner <bothner@cygnus.com>
22613
22614 Support verification of jsr/ret subroutines (used for try/finally).
22615 * decl.c (return_address_type_node): New type node.
22616 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22617 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22618 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
22619 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22620 TYPE_USED): New macros for special types in type_map.
22621
22622 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
22623 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
22624 BCODE_JUMP_TARGET.
22625 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
22626
22627 * expr.c (can_widen_reference_to): New function.
22628 (pop_type): Use it.
22629 (merge_type_state): Support handling start of subroutine.
22630 (push_pending_block): Return char* error message, instead of calling
22631 fatal on an error. Also handle subroutines.
22632 (verify_jvm_instructions): Handle errors from push_poending_block.
22633 Support jsr and ret instructions.
22634
22635 1997-08-19 Per Bothner <bothner@cygnus.com>
22636
22637 * jcf-io.c (find_classfile): Fix thinko.
22638 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
22639
22640 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
22641
22642 * Makefile.in (BISON): Remove.
22643
22644 1997-08-07 Per Bothner <bothner@cygnus.com>
22645
22646 * Makefile.in: Convert to autoconf.
22647 * config-lang.in (outputs): Added java/Makefile.
22648
22649 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22650 Rename cc1java to jc1.
22651
22652 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
22653 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
22654
22655 * class.c (class_depth): Do load_class if needed.
22656
22657 Mostly better verification.
22658 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
22659 (init_decl_processing): Change return type of soft_checkcast.
22660 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
22661 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22662 lang_print_error): New functions.
22663 (lang_init): Set global hook print_error_function to lang_print_error.
22664 * expr.c: In the type_map ptr_type_node is only used for null now.
22665 (pop_type, merge_types): Hence ptr_type_node matches any reference.
22666 (merge_types): Dererence pointer to record types before comparing.
22667 (decode_newarray_type, merge_types): On error just return NULL.
22668 (build_java_binop): Add preliminary implementation (with warning)
22669 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22670 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
22671 (expand_compare, expand_java_goto, expand_java_call): Don't
22672 push_pending_block, since that only makes sense when verifying.
22673 (merge_type_state): Different return codes.
22674 (push_pending_block): A block may need to be verified more than once.
22675 (expand_byte_code): Warn about unused code at code generation time.
22676 (verify_jvm_instruction): Changed logic, since code may need to be
22677 re-verified if type-state has changed. Also, better error handling.
22678 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22679 Improve newarray, anewarray, ?aload, athrow,
22680 * java-tree.h (LABEL_CHANGED): New macro.
22681
22682 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
22683
22684 * decl.c (soft_athrow_node): New global variable initialized.
22685 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22686 * typeck.c (convert): Added support for REAL_TYPE.
22687 (convert_to_char): New function.
22688 (convert): Handle CHAR_TYPE.
22689 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22690 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22691 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22692 promoted type.
22693 (verify_jvm_instructions): Added break a the end of bogus unop: label.
22694 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22695 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22696 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22697 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22698 to Use The Right Things.
22699 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22700 compatible with INT. BOOLEAN is made equivalent to BYTE.
22701 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22702 OPCODE_ifnonnull): Now supported.
22703 (build_java_athrow): New function.
22704
22705 1997-08-04 Per Bothner <bothner@cygnus.com>
22706
22707 Rename method name <init> to match G++ (and fix mangling).
22708 * class.c (layout_class): Replace method name of <init> by class name.
22709 (make_method_value): Do inverse renaming of constructor from <init>.
22710 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
22711 * typeck.c (lookup_java_constructor): New function.
22712 * expr.c (expand_invoke): If method_name is <init>, call
22713 lookup_java_constructor to find constructor.
22714
22715 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
22716
22717 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
22718
22719 * parse.c (get_class_constant): Modified to handle array "classes"
22720 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22721 wide type.
22722 (convert): Modified to handle real type.
22723 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22724 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22725 variables declared.
22726 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22727 soft_multianewarray, soft_newarray_node, soft_throw_node): New
22728 global variables initialized.
22729 (find_local_variable): Handles the case of a pointer
22730 (end_java_method): Restore the use of one more scope
22731 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22732 build_java_array_length_access, expand_java_arrayload,
22733 expand_java_arraystore, expand_java_array_length,
22734 expand_java_multianewarray, expand_java_anewarray,
22735 build_java_check_indexed_type, is_array_type_p,
22736 build_java_throw_out_of_bound_exception): New functions.
22737 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22738 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22739 OPCODE_<t>aload): Implemented code for verification.
22740 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22741 ARRAY_NEW_MULTI): Macro defined.
22742 (CONVERT): Modified to invoke convert().
22743 (case OPCODE_aload2): Fixed index typo from 2 to 1.
22744
22745 1997-07-31 Per Bothner <bothner@cygnus.com>
22746
22747 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
22748 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
22749 (make_class_data): Field name needs '/' as package prefix.
22750 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
22751
22752 1997-07-25 Per Bothner <bothner@cygnus.com>
22753
22754 Implement debug information for local variables.
22755 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22756 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22757 DECL_LOCAL_SLOT_CHAIN): New macros.
22758 (struct lang_decl_var): New type.
22759 * parse.c (give_name_to_locals): Move to decl.c.
22760 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
22761 (start_java_method): Re-write parameter handling.
22762 (pending_local_decls): New global variable.
22763 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
22764 (find_local_variable): Accept pc so we can skips decls not in range.
22765 (struct binding_level): Add end_pc field.
22766 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22767 (various): Change so current pc gets passed to find_local_variable.
22768
22769 * decl.c (init_decl_processing): Re-arrange fields in
22770 class_type_node and and method_type_node to match kaffe 0.9.1.
22771 * class.c (make_method_value, make_class_data): Update
22772 initializations to match.
22773
22774 1997-07-16 Per Bothner <bothner@cygnus.com>
22775
22776 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22777 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
22778 (push_super_field): New function.
22779 (make_class_data): Handle inheritance of class static initializer.
22780 (layout_class): New name mangling.
22781 * constants.c (build_constant_data_ref): Init type of data array
22782 to a one-element array.
22783 (build_constants_constructor): Set DECL_SIZE from complete array type.
22784 * decl.c: Rename class_type, object_type etc to class_type_node,
22785 object_type_node etc. Make former inherit from latter.
22786 * expr.c (expand_invoke): Add cast of function address.
22787 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
22788 * parse.c (yyparse): Don't call layout_class here.
22789 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
22790
22791 1997-06-14 Per Bothner <bothner@cygnus.com>
22792
22793 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
22794 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
22795 (alloc_class_constant): New.
22796 * expr.c (expand_invoke): Make sure method's class is initialized.
22797 * class.c (interits_from_p, emit_register_class): New functions.
22798 * parse.c (yyparse): Call emit_register_class.
22799
22800 1997-06-09 Per Bothner <bothner@cygnus.com>
22801
22802 * constants.c: New file, to handle constant pool.
22803 * Makefile.in (JAVA_OBJS): Add constants.o.
22804 * decl.c (init_decl_processing): Update, fix, finish various structs.
22805 (pushdecl_top_level): New.
22806 * parse.c (layout_class): Moved to class.c.
22807 * expr.c (java_push_constant_from_pool): New function.
22808 * class.c (build_class_ref): Make work fully
22809 (make_class_data): Emit super-class, constant pool, interface vector.
22810
22811 1997-06-03 Per Bothner <bothner@cygnus.com>
22812
22813 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
22814 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
22815 * class.c (class_depth): New function.
22816 (lookup_named_class): Replaced by new function lookup_class.
22817 * decl.c (object_type_node, string_type_node): New.
22818 Remove various types that we no longer need.
22819 * expr.c (verify_jvm_instructions): New separate verifier pass.
22820 (push_type, pop_type): New functions for verifier.
22821 (type_stack_dup, pop_argument_types, merge_types): Likewise.
22822 (expand_byte_code): Simplify, since we assume already verified.
22823 (expand_invoke): Now mostly works.
22824 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22825 * lang.c (main_class): Move to parse.c. Don't make_class yet.
22826 * parse.c: Wait to allocate class object until we know its name.
22827 (layout_class): Calculate DECL_VINDEX for each virtual method.
22828 * typeck.c (get_array_type): Rename to ...
22829 (build_java_array_type): ... and provide working implementation.
22830 (build_java_signature): New function - build Java signature of type.
22831 (set_java_signature): New function - cache signature with type.
22832 (lookup_java_method): New function.
22833
22834 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
22835
22836 * class.c (ident_subst): Take extra SUFFIX parameter.
22837 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
22838 (set_constant_value, build_static_field_ref, is_compiled_class): New.
22839 (build_class_ref): Actually implement.
22840 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
22841 * decl.c (builtin_function): New.
22842 (init_decl_processing): Update for current Kaffe. Declare some
22843 builtin Kaffe functions.
22844 * expr.c (build_address_of): New.
22845 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22846 Renamed (from expand_java_new etc), and added working implementations.
22847 (build_field_ref): Now also handle static fields.
22848 (expand_invoke): Implement invokestatic, and start implement rest.
22849 * java-opcodes.h: Use javaop.def to avoid duplicated list.
22850 * javaop.def: Rename invokevirt -> invokevirtual.
22851 * lang.c (use_handles): Removed.
22852 * parse.c: Add support for ConstantValue attribute.
22853 Handle nested loading of a class. (JPOOL_UTF): New.
22854
22855 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
22856
22857 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
22858
22859 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
22860
22861 * Make-lang.in (java.install-man): New empty rule.
22862 * typeck.c (set_local_type): New function.
22863 * expr.c (STORE_INTERNAL): Call find_local_variable,
22864 not find_stack_slot. Call set_local_type.
22865
22866 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
22867
22868 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
22869 and building RECORD_TYPE CONSTRUCTORs.
22870 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22871
22872 * lang.c (use_handles): Change the default to 0.
22873 * decl.c: Define and build class_type, field_type, utf8const_type.
22874 * class.c (make_class_data, make_field_value,
22875 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22876 hashUtf8String, strLengthUtf8, mangled_classname:
22877 Functions to build reflective data structures.
22878 * parse.c (yyparse): Call make_class_data.
22879
22880 * jcf-io.c (open_class, find_classfile): New functions.
22881 * jcf-dump.c: Support reading classfile from explicitly-named
22882 class file (without CLASSPATH searching).
22883
22884 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22885
22886 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
22887 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22888 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22889 (get_constant): Now trivial for CONSTANT_Utf8.
22890
22891 * jcf.h: Make NEW_CPOOL the default.
22892 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
22893
22894 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
22895
22896 New directory.
22897
22898 \f
22899 Copyright (C) 1996-2014 Free Software Foundation, Inc.
22900
22901 Copying and distribution of this file, with or without modification,
22902 are permitted in any medium without royalty provided the copyright
22903 notice and this notice are preserved.