]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/java/ChangeLog
hash-traits.h (ggc_hasher): Rename to...
[thirdparty/gcc.git] / gcc / java / ChangeLog
1 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2
3 * java-tree.h (treetreehasher): Inherit from ggc_ptr_hash
4 rather than ggc_hasher.
5 (ict_hasher, type_assertion_hasher): Likewise.
6
7 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8
9 * jcf-io.c (charstar_hash): Inherit from nofree_ptr_hash rather
10 than typed_noop_remove. Remove redudant typedefs.
11
12 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
13
14 * boehm.c: Do not include input.h, line-map.h or is-a.h.
15 * builtins.c: Likewise.
16 * class.c: Likewise.
17 * constants.c: Likewise.
18 * decl.c: Likewise.
19 * except.c: Likewise.
20 * expr.c: Likewise.
21 * java-gimplify.c: Likewise.
22 * jcf-dump.c: Likewise.
23 * jcf-io.c: Likewise.
24 * jcf-parse.c: Likewise.
25 * jvgenmain.c: Likewise.
26 * lang.c: Likewise.
27 * mangle.c: Likewise.
28 * mangle_name.c: Likewise.
29 * resource.c: Likewise.
30 * typeck.c: Likewise.
31 * verify-glue.c: Likewise.
32 * verify-impl.c: Likewise.
33
34 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
35
36 * boehm.c : Adjust include files.
37 * builtins.c : Likewise.
38 * class.c : Likewise.
39 * constants.c : Likewise.
40 * decl.c : Likewise.
41 * except.c : Likewise.
42 * expr.c : Likewise.
43 * java-gimplify.c : Likewise.
44 * java-tree.h : Likewise.
45 * jcf-dump.c : Likewise.
46 * jcf-io.c : Likewise.
47 * jcf-parse.c : Likewise.
48 * jcf-reader.c : Likewise.
49 * jvgenmain.c : Likewise.
50 * lang.c : Likewise.
51 * mangle.c : Likewise.
52 * mangle_name.c : Likewise.
53 * resource.c : Likewise.
54 * typeck.c : Likewise.
55 * verify-glue.c : Likewise.
56 * verify-impl.c : Likewise.
57
58 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
59
60 * jcf-parse.c: Include toplev.h.
61
62 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
63
64 * class.c: Remove pending_static_fields.
65 (add_field): Remove use of pending_static_fields.
66 (java_write_globals): Remove.
67 * decl.c (java_mark_class_local): Remove use of
68 pending_static_fields.
69 * java-tree.h: Remove pending_static_fields and
70 java_write_globals.
71 * jcf-parse.c (java_parse_file): Call global_decl_processing.
72 * lang.c (LANG_HOOKS_WRITE_GLOBALS): Remove.
73
74 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
75
76 * boehm.c: Adjust includes for restructured coretypes.h.
77 * builtins.c: Likewise.
78 * class.c: Likewise.
79 * constants.c: Likewise.
80 * decl.c: Likewise.
81 * except.c: Likewise.
82 * expr.c: Likewise.
83 * java-gimplify.c: Likewise.
84 * jcf-dump.c: Likewise.
85 * jcf-io.c: Likewise.
86 * jcf-parse.c: Likewise.
87 * jvgenmain.c: Likewise.
88 * lang.c: Likewise.
89 * mangle.c: Likewise.
90 * mangle_name.c: Likewise.
91 * resource.c: Likewise.
92 * typeck.c: Likewise.
93 * verify-glue.c: Likewise.
94 * verify-impl.c: Likewise.
95
96 2015-05-20 David Malcolm <dmalcolm@redhat.com>
97
98 * jcf-parse.c (set_source_filename): Replace write through
99 ORDINARY_MAP_FILE_NAME with direct access to "to_file".
100
101 2015-04-18 Trevor Saunders <tsaunders@mozilla.com>
102
103 * jcf-io.c: Adjust for hash_table changes.
104
105 2015-01-30 Joseph Myers <joseph@codesourcery.com>
106
107 * class.c, expr.c, jcf-parse.c, jvspec.c: All callers of
108 fatal_error changed to pass input_location as first argument.
109
110 2015-10-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
111
112 * builtins.c: Include calls.h dojump.h emit-rtl.h explow.h expmed.h
113 fixed-value.h function.h hard-reg-set.h hashtab.h insn-config.h
114 real.h statistics.h stmt.h varasm.h.
115
116 2015-01-09 Michael Collison <michael.collison@linaro.org>
117
118 * boehm.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
119 input.h, alias.h, symtab.h, options.h, fold-const.h,
120 wide-int.h, and inchash.h due to flattening of tree.h.
121 * builtins.c: Ditto.
122 * class.c: Ditto.
123 * constants.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
124 input.h, alias.h, symtab.h, options.h, fold-const.h,
125 wide-int.h, and inchash.h due to flattening of tree.h.
126 * decl.c: Ditto.
127 * except.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
128 input.h, alias.h, symtab.h, fold-const.h,
129 wide-int.h, and inchash.h due to flattening of tree.h.
130 * expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
131 input.h, alias.h, symtab.h, fold-const.h,
132 wide-int.h,inchash.h and real.h due to flattening of tree.h.
133 * gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
134 input.h, alias.h, symtab.h, options.h, fold-const.h,
135 wide-int.h, and inchash.h due to flattening of tree.h.
136 * jcf-dump.c: Ditto.
137 * jcf-io.c: Ditto.
138 * jcf-parse.c: Ditto.
139 * jvgenmain.c: Ditto.
140 * lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
141 input.h, alias.h, symtab.h, fold-const.h,
142 wide-int.h, and inchash.h due to flattening of tree.h.
143 * mangle.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
144 input.h, alias.h, symtab.h, options.h, fold-const.h,
145 wide-int.h, and inchash.h due to flattening of tree.h.
146 * mangle_name.c: Ditto.
147 * resource.c: Ditto.
148 * typeck.c: Ditto.
149 * verify-glue.c: Ditto.
150 * verify-impl.c: Ditto.
151
152 2015-01-05 Jakub Jelinek <jakub@redhat.com>
153
154 Update copyright years.
155
156 * jcf-dump.c (version): Update copyright notice dates.
157
158 2014-11-24 Richard Biener <rguenther@suse.de>
159
160 PR java/64004
161 * class.c (build_classdollar_field): Do not set TREE_READONLY.
162
163 2014-11-19 David Malcolm <dmalcolm@redhat.com>
164
165 Merger of git branch "gimple-classes-v2-option-3".
166 * ChangeLog.gimple-classes: New.
167 * java-gimplify.c (java_gimplify_block): Strengthen local "outer"
168 from gimple to gbind *.
169
170 2014-11-11 David Malcolm <dmalcolm@redhat.com>
171
172 * gcc/ChangeLog.jit: New.
173
174 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
175
176 * builtins.c, java-tree.h, typeck.c: Remove redundant enum from
177 machine_mode.
178
179 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
180
181 * class.c: Adjust include files.
182 * decl.c: Ditto.
183 * jcf-parse.c: Ditto.
184 * resource.c: Ditto.
185
186 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
187
188 * java-gimplify.c: Adjust include files.
189
190 2014-10-22 Alan Modra <amodra@gmail.com>
191
192 * mangle.c (finish_mangling): Cast result of obstack_base to (char *).
193 * typeck.c (build_java_argument_signature): Likewise.
194 (build_java_signature): Likewise.
195
196 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
197
198 * class.c: Adjust include files.
199 * resource.c: Likewise.
200
201 2014-10-15 Evgeny Stupachenko <evstupac@gmail.com>
202
203 PR target/63536
204 * lang.c (java_print_error_function): Add check on NULL function
205 context.
206
207 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
208
209 * class.c, decl.c, except.c, expr.c, java-tree.h, lang.c: Use
210 hash_table instead of hashtab.
211
212 2014-10-07 Marek Polacek <polacek@redhat.com>
213
214 * jvgenmain.c (main): Provide declarations for JvRunMain{,Name}.
215
216 2014-07-08 Mark Wielaard <mjw@redhat.com>
217
218 * builtins.c (putVolatile_builtin): Use build_qualified_type
219 instead of build_type_variant.
220 (getVolatile_builtin): Likewise.
221 (build_classdollar_field): Likewise.
222
223 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
224
225 * jcf-io.c: Adjust.
226
227 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
228
229 * java/class.c (build_utf8_ref): Update handling for section names
230 that are no longer trees.
231 (emit_register_classes_in_jcr_section): Update.
232
233 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
234
235 * class.c (build_utf8_ref): Use set_decl_section_name.
236 (emit_register_classes_in_jcr_section): Likewise.
237 (emit_register_classes_in_jcr_section): Likewise.
238
239 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
240
241 * class.c (add_method_1): Adjust.
242 (java_treetreehash_new): Likewise.
243 * constants.c (set_constant_entry): Likewise.
244 (cpool_for_class): Likewise.
245 * decl.c (make_binding_level): Likewise.
246 (java_dup_lang_specific_decl): Likewise.
247 * expr.c (add_type_assertion): Likewise.
248 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
249 (lang_decl): don't use variable_size gty attribute.
250 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Adjust.
251 (lang_type): Don't use variable_size gty attribute.
252 * jcf-parse.c (java_parse_file): Adjust.
253 (process_zip_dir): Likewise.
254 * jcf.h: Remove usage of variable_size gty attribute.
255 * jcf-reader.c (jcf_parse_constant_pool): Adjust.
256 (jcf_parse_bootstrap_methods): Likewise.
257
258 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
259
260 * constants.c (set_constant_entry): Adjust.
261
262 2014-05-06 Richard Sandiford <r.sandiford@uk.ibm.com>
263
264 * boehm.c (mark_reference_fields): Don't update the mask when
265 setting pointer_after_end.
266
267 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
268 Mike Stump <mikestump@comcast.net>
269 Richard Sandiford <rdsandiford@googlemail.com>
270
271 * boehm.c: Include wide-int.h.
272 (mark_reference_fields): Use a wide_int mask.
273 (get_boehm_type_descriptor): Use wide-int interfaces.
274 * expr.c: Include wide-int.h.
275 (build_newarray): Remove bogus "== INTEGER_CST".
276 (expand_java_pushc): Use real_from_integer.
277 (build_field_ref): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
278 * jcf-parse.c: Include wide-int.h.
279 (get_constant): Use wide-int interfaces.
280
281 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
282
283 Update copyright years
284
285 2014-01-02 Tobias Burnus <burnus@net-b.de>
286
287 * jcf-dump.c (version): Update copyright notice dates.
288 * gcj.texi: Bump @copying's copyright year.
289
290 2013-12-19 Jakub Jelinek <jakub@redhat.com>
291
292 PR other/59545
293 * class.c (hashUtf8String): Compute hash in unsigned type.
294 * javaop.h (WORD_TO_INT): Avoid signed integer overflow.
295
296 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
297
298 * java-gimplify.c: Add required include files from gimple.h.
299
300 2013-11-22 David Malcolm <dmalcolm@redhat.com>
301
302 * class.c (maybe_layout_super_class): Update comment.
303 * decl.c (java_add_stmt): Remove use of input_filename macro.
304 * jcf-parse.c (set_source_filename): Remove use of
305 input_filename macro.
306 (parse_class_file): Remove use of input_line and input_filename
307 macros.
308 (java_parse_file): Remove use of input_filename macro.
309
310 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
311
312 * class.c, expr.c: Replace tree_low_cst (..., 0) with tree_to_shwi
313 throughout.
314
315 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
316
317 * class.c, expr.c: Replace host_integerp (..., 0) with
318 tree_fits_shwi_p throughout.
319
320 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
321
322 * java-gimplify.c: Include only gimplify.h and gimple.h as needed.
323
324 2013-11-14 Diego Novillo <dnovillo@google.com>
325
326 * builtins.c: Include stor-layout.h.
327 Include stringpool.h.
328 * class.c: Include stringpool.h.
329 Include stor-layout.h.
330 Include varasm.h.
331 * constants.c: Include stringpool.h.
332 Include stor-layout.h.
333 * decl.c: Include stor-layout.h.
334 Include stringpool.h.
335 Include varasm.h.
336 * except.c: Include stringpool.h.
337 Include stor-layout.h.
338 * expr.c: Include stringpool.h.
339 Include stor-layout.h.
340 * jcf-parse.c: Include stringpool.h.
341 * mangle.c: Include stringpool.h.
342 * resource.c: Include stringpool.h.
343 Include stor-layout.h.
344 * typeck.c: Include stor-layout.h.
345 Include stringpool.h.
346 * verify-glue.c: Include stringpool.h.
347
348 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
349
350 * java-gimplify.c: Include gimplify.h.
351
352 2013-11-07 Jeff Law <law@redhat.com>
353
354 * builtins.c (initialize_builtins): Provide __builtin_trap.
355
356 2013-10-29 David Malcolm <dmalcolm@redhat.com>
357
358 Patch autogenerated by refactor_symtab.py from
359 https://github.com/davidmalcolm/gcc-refactoring-scripts
360 revision 58bb219cc090b2f4516a9297d868c245495ee622
361
362 * decl.c (java_mark_decl_local): Update for conversion of symtab types
363 to a true class hierarchy.
364
365 2013-10-14 David Malcolm <dmalcolm@redhat.com>
366
367 * lang.c (java_handle_option): Update for introduction of
368 gcc::dump_manager.
369
370 2013-09-25 Tom Tromey <tromey@redhat.com>
371
372 * Make-lang.in (jvspec.o): Remove.
373 (CFLAGS-java/jvspec.o): New variable.
374 ($(XGCJ)$(exeext), java_OBJS): Use java/jvspec.o
375 (java/jvspec.o-warn): Rename from jvspec.o-warn.
376 (JAVA_TREE_H, java/jcf-dump.o, java/boehm.o, java/builtins.o)
377 (java/class.o, java/constants.o, java/decl.o, java/except.o)
378 (java/expr.o, java/jcf-depend.o, java/jcf-parse.o)
379 (java/jvgenmain.o, java/lang.o, java/mangle.o, java/mangle_name.o)
380 (java/resource.o java/typeck.o, java/win32-host.o)
381 (java/verify-glue.o, java/verify-impl.o, java/zextract.o)
382 (java/java-gimplify.o, java/jcf-io.o, java/jcf-path.o): Remove.
383
384 2013-09-25 Tom Tromey <tromey@redhat.com>
385
386 * Make-lang.in (jvspec.o): Don't use subshell.
387
388 2013-06-05 Jan Hubicka <jh@suse.cz>
389
390 * class.c (emit_register_classes_in_jcr_section): Use DECL_PRESERVE_P
391 instead of mark_decl_referenced.
392
393 2013-05-29 Jan Hubicka <jh@suse.cz>
394
395 * decl.c (java_mark_decl_local): Update for new symtab flags.
396
397 2013-05-22 Matthias Klose <doko@ubuntu.com>
398
399 * jvspec.c (jvgenmain_spec): Add %I to cc1 call.
400
401 2013-05-16 Jason Merrill <jason@redhat.com>
402
403 * Make-lang.in (jc1$(exeext)): Use link mutex.
404
405 2013-05-06 Jakub Jelinek <jakub@redhat.com>
406
407 PR libgcj/57074
408 * class.c (emit_symbol_table): Use array type of the
409 right size for the_syms_decl and its DECL_INITIAL, instead
410 of symbols_array_type. Set TREE_TYPE (the_syms_decl) to it.
411 (emit_assertion_table): Use array type of the right size
412 for table_decl and its DECL_INITIAL.
413
414 2013-04-15 Gerald Pfeifer <gerald@pfeifer.com>
415
416 * gcj.texi (Configure-time Options): Refer to GCC, not gcc.
417 (Resources): Adjust reference to Mauve.
418 Remove link to java.sun.com.
419 Refer to GCC, not gcc.
420
421 2013-04-09 Richard Biener <rguenther@suse.de>
422
423 * expr.c (build_java_binop): Pass a type to build_int_cst.
424
425 2013-03-22 Kai Tietz <ktietz@redhat.com>
426
427 * lang.c (put_decl_node): Don't iterate over end_params_node.
428
429 2013-01-03 Jakub Jelinek <jakub@redhat.com>
430
431 * jcf-dump.c (version): Update copyright notice dates.
432
433 2012-11-16 Diego Novillo <dnovillo@google.com>
434
435 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
436
437 * boehm.c: Use new vec API in vec.h.
438 * class.c: Likewise.
439 * constants.c: Likewise.
440 * decl.c: Likewise.
441 * expr.c: Likewise.
442 * java-tree.h: Likewise.
443 * jcf-parse.c: Likewise.
444 * resource.c: Likewise.
445 * verify-glue.c: Likewise.
446
447 2012-11-15 Jan Hubicka <jh@suse.cz>
448
449 * builtins.c (define_builtin): Accept ECF flags and
450 use set_call_expr_flags.
451 (initialize_builtins): Update.
452
453 2012-10-01 Lawrence Crowl <crowl@google.com>
454
455 * Make-lang.in (JAVA_OBJS): Add dependence on hash-table.o.
456 (JCFDUMP_OBJS): Add dependence on hash-table.o.
457 (jcf-io.o): Add dependence on hash-table.h.
458 * jcf-io.c (memoized_class_lookups): Change to use type-safe hash table.
459
460 2012-09-24 Lawrence Crowl <crowl@google.com>
461
462 * decl.c (java_init_decl_processing): Change to new double_int API.
463 * jcf-parse.c (get_constant): Likewise.
464 * boehm.c (mark_reference_fields): Likewise.
465 (get_boehm_type_descriptor): Likewise.
466
467 2012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com>
468
469 * jcf.h (CPool): Use the "atomic" GTY option for the tags field.
470 (bootstrap_method): Likewise for the bootstrap_arguments field.
471
472 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
473
474 * java-gimplify.c: Include dumpfile.h instead of tree-dump.h
475 * Make-lang.in: Fix dependencies.
476
477 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
478
479 * java-tree.h (force_evaluation_order): Remove prototype.
480 * expr.c (force_evaluation_order): Remove unused function.
481
482 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
483
484 * decl.c: Do not include libfuncs.h.
485 * class.c: Do not include defaults.h.
486 * jvgenmain.c: Likewise.
487 * magnle.c: Likewise.
488 * Make-lang.in (decl.o): Fix dependencies.
489
490 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
491
492 * verify.h: Do not include system.h and coretypes.h here.
493 * verify-impl.c: Include them here instead.
494
495 2012-07-05 Uros Bizjak <ubizjak@gmail.com>
496
497 * jcf-io.c (read_zip_member): Initialize d_stream.
498
499 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
500
501 * resource.c: Do not include output.h.
502
503 2012-05-21 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
504
505 PR java/52815
506 * class.c (emit_register_classes_in_jcr_section): Revise placement
507 of #ifdef JCR_SECTION_NAME.
508
509 2012-04-22 Jan Hubicka <jh@suse.cz>
510
511 * class.c (build_utf8_ref): Do not mark varpool node as needed.
512
513 2012-04-20 Jan Hubicka <jh@suse.cz>
514
515 * class.c (make_local_function_alias): Do not mark symbol referenced.
516
517 2012-04-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
518
519 * jcf-dump.c (print_constant): Cast JPOOL_USHORT2, JPOOL_USHORT1
520 results to long to match formats.
521
522 2012-04-11 Andrew Haley <aph@redhat.com>
523
524 * jcf-reader.c (jcf_parse_bootstrap_methods): Add
525 ATTRIBUTE_UNUSED.
526
527 2012-04-11 Andrew Haley <aph@redhat.com>
528
529 * jcf.h (bootstrap_method): New.
530 (BootstrapMethods): New.
531 (JCF): Add BootstrapMethods.
532 (enum cpool_tag): Add MethodHandle, MethodType, and InvokeDynamic.
533 * jcf-reader.c (jcf_parse_bootstrap_methods): New.
534 (jcf_parse_constant_pool): Handlers for MethodHandle, MethodType,
535 and InvokeDynamic.
536 (jcf_parse_bootstrap_methods): New.
537 * javaop.def (invokedynamic): New opcode.
538 * jcf-parse.c (get_constant): An unknown constant type should not
539 be an internal error, but a fatal one. Make it so.
540 * jcf-dump.c (HANDLE_BOOTSTRAP_METHODS_ATTRIBUTE): New.
541 (HANDLE_END_BOOTSTRAP_METHODS): New.
542 (print_constant): Handlers for MethodHandle, MethodType, and
543 InvokeDynamic.
544
545 2012-04-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
546
547 * class.c (emit_register_classes_in_jcr_section): Set DECL_USER_ALIGN.
548 Clear TREE_READONLY.
549
550 2012-03-29 Steven Bosscher <steven@gcc.gnu.org>
551
552 PR java/52730
553 * class.c (emit_register_classes_in_jcr_section): New function.
554 (emit_Jv_RegisterClass_calls): New function, split out from ...
555 (emit_register_classes): ... here. Reorganize. Do not call
556 output_constant.
557
558 2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
559
560 * lang.c (java_init_options_struct): Set
561 frontend_set_flag_trapping_math.
562
563 2012-01-01 Jakub Jelinek <jakub@redhat.com>
564
565 * jcf-dump.c (version): Update copyright notice dates.
566
567 2011-12-03 Matthias Klose <doko@ubuntu.com>
568
569 * expr.c (SPECIAL_WIDE): Fix typo in message.
570
571 2011-11-23 Jeffrey A Law (law@cygnus.com)
572
573 * lang.c (java_init_options_struct): Disable optimizations
574 which assume a NULL pointer dereference will cause a fault.
575
576 2011-11-07 Richard Henderson <rth@redhat.com>
577
578 * builtins.c (compareAndSwapInt_builtin): Use can_compare_and_swap_p.
579 (compareAndSwapLong_builtin): Likewise.
580 (compareAndSwapObject_builtin): Likewise.
581 (VMSupportsCS8_builtin): Likewise.
582
583 2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
584
585 * Make-lang.in (jvspec.o): Pass SHLIB instead of SHLIB_LINK.
586
587 2011-10-15 Tom Tromey <tromey@redhat.com>
588 Dodji Seketeli <dodji@redhat.com>
589
590 * jcf-parse.c (set_source_filename): Adjust to the new map API.
591
592 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
593
594 * class.c (build_static_field_ref): Delete old interface with two
595 parallel arrays to hold standard builtin declarations, and replace
596 it with a function based interface that can support creating
597 builtins on the fly in the future. Change all uses, and poison
598 the old names. Make sure 0 is not a legitimate builtin index.
599 * decl.c (java_init_decl_processing): Ditto.
600 * except.c (compareAndSwapLong_builtin): Ditto.
601 (compareAndSwapObject_builtin): Ditto.
602 (putVolatile_builtin): Ditto.
603 (define_builtin): Ditto.
604 (check_for_builtin): Ditto.
605 * expr.c (rewrite_arglist_getcaller): Ditto.
606 (expand_java_field_op): Ditto.
607
608 2011-08-24 Joseph Myers <joseph@codesourcery.com>
609
610 * Make-lang.in (CFLAGS-java/jcf-io.o, CFLAGS-java/jcf-path.o):
611 New.
612 (java/jcf-io.o, java/jcf-path.o): Remove explicit compilation
613 rules.
614
615 2011-08-18 Peter Collingbourne <peter@pcc.me.uk>
616
617 * expr.c (expand_invoke) Use the type of the method rewrite
618 target.
619
620 2011-08-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
621
622 * jcf-dump.c (print_constant): Cast first frexp arg.
623
624 2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
625
626 * Make-lang.in ($(XGCJ)$(exeext)): Add $(EXTRA_GCC_LIBS).
627
628 2011-07-19 Richard Guenther <rguenther@suse.de>
629
630 * builtins.c (static): Use fold_build_pointer_plus.
631 * class.c (make_class_data): Likewise.
632 (build_symbol_entry): Likewise.
633 * except.c (build_exception_object_ref): Likewise.
634 * expr.c (build_java_arrayaccess): Likewise.
635 (build_field_ref): Likewise.
636 (build_known_method_ref): Likewise.
637 (build_invokevirtual): Likewise.
638
639 2011-07-06 Richard Guenther <rguenther@suse.de>
640
641 * decl.c (java_init_decl_processing):
642 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
643
644 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
645
646 * builtins.c: Add sync_ or SYNC__ to builtin names.
647 * expr.c: Add sync_ or SYNC__ to builtin names.
648
649 2011-06-07 Richard Guenther <rguenther@suse.de>
650
651 * decl.c (java_init_decl_processing): Call build_common_nodes,
652 build_common_nodes_2 at the beginning. Remove then duplicate
653 initializations.
654
655 2011-06-07 Richard Guenther <rguenther@suse.de>
656
657 * decl.c (java_init_decl_processing): Properly initialize
658 size_type_node.
659
660 2011-05-30 Joern Rennecke <joern.rennecke@embecosm.com>
661
662 PR middle-end/46500
663 * expr.c: Include "tm.h" .
664
665 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
666
667 * decl.c (poplevel): Don't access TREE_TYPE of BLOCKs.
668 * expr.c (build_jni_stub): Likewise.
669
670 2011-05-24 Joseph Myers <joseph@codesourcery.com>
671
672 * Make-lang.in ($(XGCJ)$(exeext)): Use libcommon-target.a instead
673 of prefix.o.
674
675 2011-05-20 Joseph Myers <joseph@codesourcery.com>
676
677 * Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and
678 version.o.
679 (JCFDUMP_OBJS): Remove errors.o, version.o and intl.o.
680 (JVGENMAIN_OBJS): Remove errors.o and intl.o.
681 (java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H).
682 * jcf-dump.c: Include diagnostic.h.
683 (main): Initialize diagnostics.
684 * jvgenmain.c: Include diagnostic.h.
685 (main): Initialize diagnostics.
686
687 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
688
689 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
690
691 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
692
693 * java-tree.h (global_bindings_p): Adjust prototype.
694 * decl.c (global_bindings_p): Return bool.
695
696 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
697
698 * expr.c (expand_java_switch): Call build_case_label.
699 (expand_java_add_case): Likewise.
700
701 2011-04-29 Richard Guenther <rguenther@suse.de>
702
703 PR middle-end/48819
704 * constants.c (build_constants_constructor): Use ptr_type_node for
705 temp.
706
707 2011-04-20 Jim Meyering <meyering@redhat.com>
708
709 * jcf-parse.c (java_parse_file): Remove useless if-before-free.
710
711 2011-04-18 Jim Meyering <meyering@redhat.com>
712
713 * jcf-parse.c: Fix typo in comment.
714
715 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
716
717 * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon.
718
719 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
720
721 * java-tree.h (union lang_tree_node): Check for TS_COMMON before
722 calling TREE_CHAIN.
723
724 2011-04-11 Martin Jambor <mjambor@suse.cz>
725
726 * decl.c (java_mark_decl_local): Call cgraph_get_node instead of
727 cgraph_node and handle returned NULL.
728
729 2011-03-25 Kai Tietz <ktietz@redhat.com>
730
731 * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
732 instead of strcmp.
733 (set_source_filename): Likewise.
734 * win32-host.c (jcf_open_exact_case): Likewise.
735
736 2011-03-21 Kai Tietz <ktietz@redhat.com>
737
738 PR target/12171
739 * lang.c (java_attribute_table): Adjust table.
740
741 2011-02-13 Joseph Myers <joseph@codesourcery.com>
742
743 * jvspec.c (jvgenmain_spec): Remove %{a*}.
744
745 2011-01-21 Kai Tietz <kai.tietz@onevision.com>
746
747 PR bootstrap/47215
748 * decl.c (java_init_decl_processing): Remove
749 va_list_type_node related type initializations.
750
751 2011-01-11 Kai Tietz <kai.tietz@onevision.com>
752
753 PR bootstrap/47215
754 * decl.c (java_init_decl_processing): Initialize
755 long_integer_type_node.
756
757 2011-01-07 Kai Tietz <kai.tietz@onevision.com>
758
759 PR bootstrap/47215
760 * decl.c (java_init_decl_processing): Initialize unsigned_type_node.
761
762 2011-01-07 Kai Tietz <kai.tietz@onevision.com>
763
764 * decl.c (java_init_decl_processing): Setup va_list_type_node.
765
766 2011-01-03 Jakub Jelinek <jakub@redhat.com>
767
768 * jcf-dump.c (version): Update copyright notice dates.
769
770 2010-12-15 Dave Korn <dave.korn.cygwin@gmail.com>
771
772 * decl.c (java_init_decl_processing): Initialise integer_three_node.
773 * lang.c (put_decl_node): Handle nested function decls.
774
775 2010-12-07 Joseph Myers <joseph@codesourcery.com>
776
777 * jcf-parse.c: Don't include assert.h.
778 (java_parse_file): Use gcc_assert.
779
780 2010-12-03 Joseph Myers <joseph@codesourcery.com>
781
782 * lang.opt (static-libgcj): New option.
783
784 2010-12-01 Joseph Myers <joseph@codesourcery.com>
785
786 * jcf-parse.c: Don't include toplev.h.
787 * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
788
789 2010-11-30 Joseph Myers <joseph@codesourcery.com>
790
791 * boehm.c: Don't include toplev.h.
792 * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
793
794 2010-11-30 Joseph Myers <joseph@codesourcery.com>
795
796 * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
797 verify-glue.c: Don't include toplev.h.
798 * Make-lang.in: Dependencies for above files changed to remove
799 toplev.h.
800
801 2010-11-29 Joseph Myers <joseph@codesourcery.com>
802
803 * boehm.c: Include "config.h" instead of <config.h>.
804 * builtins.c: Don't include <stdarg.h>.
805 * class.c: Don't include "stdio.h".
806 (O_BINARY): Don't define here.
807 * jcf-depend.c: Don't include <assert.h>.
808 (jcf_dependency_set_dep_file, jcf_dependency_init,
809 jcf_dependency_write): Use gcc_assert.
810 * jcf-io.c (O_BINARY): Don't define here.
811 * jcf-path.c: Don't include "tm.h".
812 (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
813 * resource.c: Don't include "stdio.h".
814 (O_BINARY): Don't define here.
815 * verify-impl.c: Don't include <stdio.h>.
816
817 2010-11-17 Joseph Myers <joseph@codesourcery.com>
818
819 * jcf-parse.c (java_parse_file): Take no arguments.
820 * java-tree.h (java_parse_file): Update prototype.
821
822 2010-11-09 Joern Rennecke <amylaar@spamcop.net>
823 Andrew Haley <aph@redhat.com>
824
825 PR java/46386
826 * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
827
828 2010-11-12 Joseph Myers <joseph@codesourcery.com>
829
830 * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
831 * lang.c (java_handle_option): Take location_t parameter.
832
833 2010-11-10 Joseph Myers <joseph@codesourcery.com>
834
835 * expr.c (expand_java_field_op): Use %' in diagnostic.
836 * jcf-parse.c (java_parse_file): Use %' in diagnostics.
837 * jvspec.c (lang_specific_driver): Use %' in diagnostic.
838 * lang.c (java_post_options): Use %' in diagnostics.
839
840 2010-11-06 Joern Rennecke <amylaar@spamcop.net>
841
842 PR middle-end/46314
843 * class.c: Include target.h.
844 (make_local_function_alias):
845 Use targetm.asm_out.generate_internal_label.
846 * expr.c (lookup_label, generate_name): Likewise.
847
848 2010-11-03 Joern Rennecke <joern.rennecke@embecosm.com>
849
850 PR bootstrap/44335
851 * jfc-parse.c (target.h): Include.
852 (handle_constant): Use targetm.words_big_endian and
853 targetm.float_words_big_endian.
854 (get_constant): Use targetm.float_words_big_endian.
855
856 2010-10-13 Richard Henderson <rth@redhat.com>
857
858 * lang.c (java_eh_personality): Update call to
859 build_personality_function.
860
861 2010-10-12 Joseph Myers <joseph@codesourcery.com>
862
863 * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
864 options.h.
865
866 2010-10-11 Nathan Froyd <froydnj@codesourcery.com>
867
868 * decl.c (java_init_decl_processing): Use build_function_type_list
869 instead of build_function_type.
870 * jcf-parse.c (java_emit_static_constructor): Likewise.
871 * builtins.c (initialize_builtins): Likewise.
872
873 2010-10-08 Joseph Myers <joseph@codesourcery.com>
874
875 * lang.c (java_init_options_struct): New. Split out from
876 java_init_options.
877 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
878
879 2010-10-04 Andi Kleen <ak@linux.intel.com>
880
881 * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
882 Add + to build rule.
883
884 2010-09-29 Joseph Myers <joseph@codesourcery.com>
885
886 * lang.opt: Don't use VarExists.
887
888 2010-09-29 Joseph Myers <joseph@codesourcery.com>
889
890 * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
891 flag_force_classes_archive_check, flag_redundant, flag_newer,
892 flag_use_divide_subroutine, flag_use_atomic_builtins,
893 flag_use_boehm_gc, flag_hash_synchronization,
894 flag_check_references, flag_optimize_sci, flag_indirect_classes,
895 flag_indirect_dispatch, flag_store_check,
896 flag_reduced_reflection): Remove.
897 * jcf-dump.c (flag_newer): Remove.
898 * jcf.h (quiet_flag): Remove.
899 * parse.h (quiet_flag): Remove.
900
901 2010-09-28 Richard Henderson <rth@redhat.com>
902
903 * lang.c: Include "target.h".
904 (java_eh_personality): Use targetm.except_unwind_info.
905 * Make-lang.in (lang.o): Update deps.
906
907 2010-09-27 Andrew Haley <aph@redhat.com>
908
909 PR java/45773
910 * jvgenmain.c (main): Fix arg processing.
911
912 2010-09-22 Joseph Myers <joseph@codesourcery.com>
913
914 * jvspec.c (lang_specific_driver): Handle OPT__help instead of
915 OPT_fhelp.
916 * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
917 -dependencies, -encoding, -extdirs, -include-directory,
918 -include-directory=, -output-class-directory,
919 -output-class-directory=, -resource, -resource=,
920 -user-dependencies): New.
921
922 2010-09-16 Richard Guenther <rguenther@suse.de>
923
924 * jcf-parse.c (current_file_list): Remove.
925 (java_parse_file): Use build_translation_unit_decl. Adjust.
926
927 2010-09-03 Joseph Myers <joseph@codesourcery.com>
928
929 * lang.opt (d): New.
930
931 2010-09-03 H.J. Lu <hongjiu.lu@intel.com>
932
933 PR java/45504
934 * jvgenmain.c (main): Check "-D XXX=YYY".
935
936 2010-09-02 Joseph Myers <joseph@codesourcery.com>
937
938 * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
939
940 2010-09-02 Joseph Myers <joseph@codesourcery.com>
941
942 * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
943 fCLASSPATH=): Mark as Java options and as aliases.
944 * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
945 (lang_specific_driver): Don't handle options marked as aliases.
946 * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
947
948 2010-08-22 Joseph Myers <joseph@codesourcery.com>
949
950 * Make-lang.in (jvspec.o): Update dependencies.
951 * jvspec.c: Include opts.h.
952 (PARAM_ARG): Remove.
953 (find_spec_file): Do not add leading -specs=.
954 (lang_specific_driver): Use cl_decoded_option structures.
955 * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
956 extdirs, fmain=, s-bc-abi): New options.
957
958 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
959
960 * class.c: Use FOR_EACH_VEC_ELT.
961 * expr.c: Likewise.
962 * jcf-parse.c: Likewise.
963 * resource.c: Likewise.
964
965 2010-08-16 Joseph Myers <joseph@codesourcery.com>
966
967 * lang.opt (MD_, MMD_, version): Mark RejectDriver.
968
969 2010-08-05 David Daney <ddaney@caviumnetworks.com>
970
971 * class.c (build_utf8_ref): Fix code formatting from previous commit.
972
973 2010-08-05 David Daney <ddaney@caviumnetworks.com>
974
975 * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
976
977 2010-07-27 Joseph Myers <joseph@codesourcery.com>
978
979 * lang.c (java_handle_option): Update prototype and return value
980 type.
981
982 2010-07-27 Joseph Myers <joseph@codesourcery.com>
983
984 * lang.c (java_option_lang_mask): New.
985 (java_init_options): Update prototype.
986 (LANG_HOOKS_OPTION_LANG_MASK): Define.
987
988 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
989
990 * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
991 * boehm.c: Likewise.
992 * class.c: Likewise.
993 * decl.c: Likewise.
994 * expr.c: Likewise.
995 * jcf-parse.c: Likewise.
996 * typeck.c: Likewise.
997 * verify-glue.c: Likewise.
998
999 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
1000
1001 * boehm.c: Include diagnostic-core.h in every file that includes
1002 toplev.h.
1003 * class.c: Likewise.
1004 * constants.c: Likewise.
1005 * decl.c: Likewise.
1006 * except.c: Likewise.
1007 * expr.c: Likewise.
1008 * jcf-parse.c: Likewise.
1009 * mangle.c: Likewise.
1010 * mangle_name.c: Likewise.
1011 * resource.c: Likewise.
1012 * typeck.c: Likewise.
1013 * verify-glue.c: Likewise.
1014
1015 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
1016
1017 PR bootstrap/44825
1018 * class.c (make_class_data): Cast result of VEC_length calls to int.
1019
1020 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
1021
1022 * constants.c (build_constants_constructor): Use build_constructor
1023 instead of build_constructor_from_list.
1024 * class.c (make_method_value): Likewise.
1025 (get_dispatch_table): Likewise.
1026 (make_class_data): Likewise.
1027 (emit_indirect_register_classes): Likewise.
1028 (emit_symbol_table): Likewise.
1029 (add_assertion_table_entry): Likewise.
1030 (emit_assertion_table): Likewise.
1031 (make_field_value): Use build_constructor_single instead of
1032 build_constructor_from_list.
1033
1034 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
1035
1036 * java-tree.h (struct lang_type) [catch_classes]: Change type to a
1037 VEC.
1038 * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
1039 instead of tree_cons.
1040 * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
1041 (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
1042
1043 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1044
1045 * lang.c: Do not include except.h
1046 * except.c: Likewise.
1047 (doing_eh): New, moved from except.c (in gcc/) but removed the
1048 do_warning flag.
1049 (maybe_start_try): Update doing_eh call.
1050 * Make-lang.in: Update dependencies.
1051
1052 2010-06-23 Anatoly Sokolov <aesok@post.ru>
1053
1054 * decl.c (java_init_decl_processing): Use double_int_to_tree instead
1055 of build_int_cst_wide.
1056 * boehm.c (set_bit): Remove.
1057 (mark_reference_fields): Use double_int type for 'mask' argument.
1058 Use double_int_setbit instead of set_bit.
1059 (get_boehm_type_descriptor): Use double_int_setbit instead of
1060 set_bit. Use double_int_to_tree instead of build_int_cst_wide.
1061
1062 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
1063
1064 * gcj.texi: Move to GFDL version 1.3. Fix copyright years.
1065
1066 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1067
1068 * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
1069
1070 * jcf-parse.c (java_parse_file): Likewise.
1071 (process_zip_dir): Likewise.
1072
1073 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
1074 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1075
1076 * expr.c (add_type_assertion): Likewise.
1077
1078 * decl.c (make_binding_level): Likewise.
1079 (java_dup_lang_specific_decl): Likewise.
1080
1081 * constants.c (set_constant_entry): Likewise.
1082 (cpool_for_class): Likewise.
1083
1084 * class.c (add_method_1): Likewise.
1085 (java_treetreehash_new): Likewise.
1086
1087 * java-tree.h (struct lang_type): Add variable_size GTY option.
1088 (struct lang_decl): Likewise.
1089
1090 * jch.h (struct cpool_entry): Likewise.
1091
1092 * java-tree.h (java_treetreehash_create): Remove parameter ggc.
1093
1094 * except.c (prepare_eh_table_type): Update
1095 java_treetreehash_create call.
1096
1097 * class.c (add_method_1): Update java_treetreehash_create call.
1098 (java_treetreehash_create): Remove parameter gc. Use
1099 htab_create_ggc.
1100
1101 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1102
1103 * jvspec.c (lang_specific_driver): Use GCC-specific formats in
1104 diagnostics.
1105
1106 2010-05-30 Steven Bosscher <steven@gcc.gnu.org>
1107
1108 * except.c: Include tm.h.
1109
1110 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1111
1112 * jvspec.c (lang_specific_driver): Use fatal_error instead of
1113 fatal. Use warning instead of error for warnings.
1114
1115 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
1116
1117 * expr.c (get_symbol_table_index): Add spaces in expression.
1118
1119 2010-05-28 Nathan Froyd <froydnj@codesourcery.com>
1120
1121 * java-tree.h (method_entry): Declare. Declare VECs containing it.
1122 (struct lang_type): Change type of otable_methods, atable_methods, and
1123 itable_methods to VECs. Fix comment for atable_methods.
1124 (emit_symbol_table): Take a VEC instead of a tree.
1125 (get_symbol_table_index): Take a VEC * instead of a tree *.
1126 * class.c (add_table_and_syms): Take a VEC instead of a tree.
1127 (emit_symbol_table): Update for changed parameter type.
1128 * expr.c (get_symbol_table_index): Likewise.
1129
1130 2010-05-27 Steven Bosscher <steven@gcc.gnu.org>
1131
1132 * buildings.c: Pretend to be a backend file by undefining
1133 IN_GCC_FRONTEND (still need rtl.h here).
1134
1135 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
1136
1137 * java-tree.h (struct lang_decl_func): Change type of throws_list
1138 field to a VEC.
1139 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
1140 of DECL_FUNCTION_THROWS.
1141 * class.c (make_method_value): Likewise.
1142
1143 2010-05-26 Nathan Froyd <froydnj@codesourcery.com>
1144
1145 * class.c (utf8_decl_list): Delete.
1146 (build_utf8_ref): Remove references to it.
1147 * java-tree.h (all_class_list): Delete.
1148 (predef_filenames): Delete.
1149 (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
1150 Delete.
1151 * jcf-parse.c (parse_roots): Decrease size to 2.
1152 (current_file_list): Convert to a VEC.
1153 (all_class_list): Declare.
1154 (jcf_parse): Adjust for new type of all_class_list.
1155 (java_layout_seen_class_methods): Likewise.
1156 (predefined_filenames): Declare.
1157 (add_predefined_file): Use it.
1158 (predefined_filename_p): Likewise.
1159 (java_parse_file): Adjust for new type of current_file_list.
1160
1161 2010-05-25 Jakub Jelinek <jakub@redhat.com>
1162
1163 * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
1164 for interfaces.
1165
1166 PR debug/43260
1167 * java-tree.h (pending_static_fields): New extern declaration.
1168 (java_write_globals): New prototype.
1169 * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
1170 * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
1171 of a static field push it into pending_static_fields vector.
1172 * class.c (pending_static_fields): New variable.
1173 (add_field): If static field is not DECL_EXTERNAL, push it into
1174 pending_static_fields vector.
1175 (java_write_globals): New function.
1176
1177 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
1178
1179 * expr.c (quick_stack): Change type to a VEC. Update comment.
1180 (tree_list_free_list): Delete.
1181 (flush_quick_stack): Update for quick_stack type change.
1182 (push_value): Likewise.
1183 (pop_value): Likewise.
1184
1185 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
1186
1187 * java-gimplify.c: Do not include tm.h, toplev.h.
1188 * typeck.c: Do not include tm.h.
1189 * mangle_name.c: Do not include tm.h.
1190 * jcf-dump.c: Do not include tm.h, ggc.h.
1191 * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
1192 * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
1193 and timevar.h.
1194 * jcf-parse.c: Do not include tm.h and tm_p.h.
1195 * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
1196 target.h, and expr.h.
1197 * except.c: Do not include tm.h, rtl.h, function.h.
1198 * builtins.c: Do not include convert.h. Explain why RTL headers
1199 have to be included here.
1200 * verify-glue.c: Do not include tm.h.
1201 * jcf-depend.c: Do not include tm.h.
1202 * jcf-reader.c: Include ggc.h.
1203 * jcf-io.c: Do not include tm.h, toplev.h.
1204 * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
1205 gimple.h.
1206 * lang.c: Do not include rtl.h, expr.h.
1207 * Make-lang.in: Update dependencies.
1208
1209 2010-05-23 Steven Bosscher <steven@gcc.gnu.org>
1210
1211 * jcf-parse.c: Include bitmap.h.
1212 * Make-lang.in: Update dependencies.
1213
1214 2010-05-20 Jakub Jelinek <jakub@redhat.com>
1215
1216 PR debug/43521
1217 * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
1218 PARM_DECL.
1219
1220 2010-05-19 Anatoly Sokolov <aesok@post.ru>
1221
1222 * jcf-parse.c (get_constant): Use double_int_to_tree instead of
1223 build_int_cst_wide_type.
1224
1225 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1226
1227 * expr.c (pop_arguments): Fix use of undeclared variable.
1228
1229 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1230
1231 * expr.c (expand_java_multianewarray): Use build_call_vec instead of
1232 build_call_list.
1233 (pop_arguments): Return a VEC instead of a tree. Take a method type
1234 rather than a list of argument types.
1235 (rewrite_rule): Change signature. of rewrite_arglist member.
1236 (rewrite_arglist_getcaller): Update signature.
1237 (rewrite_arglist_getclass): Likewise.
1238 (maybe_rewrite_invocation): Update for rewrite_arglist change.
1239 (build_known_method_ref): Take a VEC instead of a tree.
1240 (invoke_build_dtable): Likewise.
1241 (expand_invoke): Update calls to pop_arguments. Use build_call_vec
1242 instead of build_call_list.
1243 (build_jni_stub): Use build_call_vec instead of build_call_list.
1244 * java-tree.h (maybe_rewrite_invocation): Update declaration.
1245 (build_known_method_ref): Likewise.
1246 (invoke_build_dtable): Likewise.
1247
1248 2010-05-14 Nathan Froyd <froydnj@codesourcery.com>
1249
1250 PR 44103
1251 * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
1252 vector. Move call to build_constructor...
1253 (FINISH_RECORD_CONSTRUCTOR): ...here. Add necessary arguments. Clear
1254 TREE_CONSTANT on the constructor.
1255 (PUSH_SUPER_VALUE): Change first argument to a vector.
1256 (PUSH_FIELD_VALUE): Likewise.
1257 * resource.c (compile_resource_data): Update calls to above macros.
1258 * constants.c (build_constants_constructor): Likewise.
1259 * class.c (build_utf8_ref): Likewise.
1260 (make_field_value): Likewise.
1261 (make_method_value): Likewise.
1262 (add_table_and_syms): New function.
1263 (make_class_data): Call it. Update calls to above macros.
1264 (build_symbol_table_entry): New function.
1265 (build_symbol_entry): Call it. Update calls to above macros.
1266 (emit_symbol_table): Likewise.
1267 (make_catch_class_record): Update calls to above macros.
1268 (build_assertion_table_entry): New function.
1269 (add_assertion_table_entry): Call it.
1270 (emit_assertion_table): Likewise.
1271
1272 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
1273
1274 PR 40989
1275 * lang.c (java_handle_option): Add argument kind.
1276
1277 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1278
1279 * decl.c (java_init_decl_processing): Remove argument in call to
1280 initialize_sizetypes
1281
1282 2010-04-07 Jakub Jelinek <jakub@redhat.com>
1283
1284 * exception.cc (_Jv_Throw): Avoid set but not used warning.
1285 * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
1286 sizeof to avoid set but not used warnings.
1287
1288 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
1289
1290 * lang.c (java_post_options): Constify variable "dot".
1291
1292 * jcf-parse.c (set_source_filename): Constify variable "dot".
1293 (load_class): Constify variable "separator".
1294 Use get_identifier_with_length.
1295
1296 * jvspec.c (lang_specific_driver): Constify two variables named "p".
1297
1298 2010-01-09 Jakub Jelinek <jakub@redhat.com>
1299
1300 * jcf-dump.c (version): Update copyright notice dates.
1301
1302 2009-11-28 Jakub Jelinek <jakub@redhat.com>
1303
1304 * jvspec.c (lang_specific_driver): Remove unused
1305 saw_verbose_flag variable.
1306 * jcf-dump.c (main): Remove unused general_purpose_bits
1307 variable.
1308 * builtins.c (initialize_builtins): Remove unused float_ftype_float
1309 variable.
1310 * expr.c (java_stack_pop): Remove unused val variable.
1311 (build_jni_stub): Remove unused res_type variable.
1312 * verify-impl.c (check_field_constant): Remove unused len variable.
1313
1314 2009-10-20 Joel Dice <dicej@mailsnare.net>
1315
1316 PR java/28474
1317 * mangle_name.c (append_unicode_mangled_name): Fix mangling
1318 of names with multiple underscores and "U".
1319 (unicode_mangling_length): Likewise.
1320
1321 2009-10-03 Simon Baldwin <simonb@google.com>
1322
1323 * config-lang.in (lang_dirs): Remove zlib.
1324
1325 2009-09-28 Richard Henderson <rth@redhat.com>
1326
1327 * builtins.c (initialize_builtins): Update call to
1328 build_common_builtin_nodes.
1329 * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
1330
1331 2009-09-14 Richard Henderson <rth@redhat.com>
1332
1333 * builtins.c (initialize_builtins): Update call to
1334 build_common_builtin_nodes.
1335 * decl.c (java_init_decl_processing): Don't call
1336 default_init_unwind_resume_libfunc.
1337 * except.c: Include tree-iterator.h.
1338 (build_exception_object_var): New.
1339 (build_exception_object_ref): Use it.
1340 (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
1341 Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
1342 * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
1343
1344 2009-09-13 Richard Guenther <rguenther@suse.de>
1345 Rafael Avila de Espindola <espindola@google.com>
1346
1347 * decl.c (do_nothing): Remove.
1348 (java_init_decl_processing): Do not set lang_eh_runtime_type.
1349 * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
1350 * lang.c (java_eh_personality): New.
1351 (java_eh_personality_decl): Likewise.
1352 (LANG_HOOKS_EH_PERSONALITY): Define.
1353
1354 2009-09-03 Diego Novillo <dnovillo@google.com>
1355
1356 * lang.c (lang_hooks): Remove const qualifier.
1357
1358 2009-09-01 Jakub Jelinek <jakub@redhat.com>
1359
1360 * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
1361 type.
1362
1363 2009-09-01 Richard Guenther <rguenther@suse.de>
1364
1365 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
1366 * java-tree.h (java_mark_addressable): Likewise.
1367 * typeck.c (java_mark_addressable): Likewise.
1368
1369 2009-08-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1370
1371 * Make-lang.in (java.install-pdf): Install gcj.pdf in
1372 $(pdfdir)/gcc, alongside the other manuals.
1373
1374 2009-08-12 Andrew Haley <aph@redhat.com>
1375
1376 * builtins.c (compareAndSwapInt_builtin): Use
1377 flag_use_atomic_builtins.
1378 (compareAndSwapLong_builtin): Likewise.
1379 (compareAndSwapObject_builtin): Likewise.
1380 * jvspec.c: Add flag_use_atomic_builtins.
1381 * gcj.texi: Likewise.
1382 * java-tree.h: Likewise.
1383 * lang.opt: Likewise.
1384
1385 2009-08-11 Dodji Seketeli <dodji@redhat.com>
1386
1387 PR debug/40990
1388 * lang.c (put_decl_node): Outputs different level of information
1389 depending on the verbosity level.
1390
1391 2009-07-31 Andrew Haley <aph@redhat.com>
1392
1393 PR java/40867
1394 * decl.c (java_replace_references): Set EXPR_LOCATION on all
1395 generated expressions.
1396 (binding_level.loc): new field.
1397 (clear_binding_level): Initialize loc.
1398 (set_input_location): New function.
1399 (pushlevel): Set new binding_level.loc.
1400 (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
1401 (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
1402 (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
1403
1404 2009-07-17 Richard Guenther <rguenther@suse.de>
1405
1406 PR c/40401
1407 * java-gimplify.c (java_genericize): Do not gimplify here.
1408 But replace all local references.
1409 (java_gimplify_expr): Do not replace local references here.
1410 (java_gimplify_modify_expr): Likewise.
1411 * jcf-parse.c (java_parse_file): Do not finalize the CU or
1412 optimize the cgraph here.
1413 * decl.c (java_replace_reference): Make static.
1414 (java_replace_references): New function.
1415 (end_java_method): Clear base_decl_map.
1416 * java-tree.h (java_replace_references): Declare.
1417 (java_replace_reference): Remove.
1418
1419 2009-07-14 Taras Glek <tglek@mozilla.com>
1420 Rafael Espindola <espindola@google.com>
1421
1422 * Make-lang.in (java.install-plugin): New target for
1423 installing plugin headers.
1424
1425 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1426
1427 * class.c: Replace %J by an explicit location. Update all calls.
1428
1429 2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1430
1431 * jcf-parse.c: Replace %H by an explicit location. Update all calls.
1432
1433 2009-06-29 Andrew Haley <aph@redhat.com>
1434
1435 PR java/40590
1436 * java-tree.h (cxx_keyword_p): New declaration.
1437 * mangle_name.c (utf8_cmp): Move here from mangle.c.
1438 (cxx_keywords): Likewise.
1439 (cxx_keyword_p): Likewise.
1440 (MANGLE_CXX_KEYWORDS): New macro.
1441 (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
1442 (append_gpp_mangled_name): Likewise.
1443 * mangle.c: Move code to mangle_name.c.
1444 (mangle_member_name): Don't call cxx_keyword_p.
1445
1446 2009-06-12 Aldy Hernandez <aldyh@redhat.com>
1447
1448 * java-gimplify.c (java_gimplify_block): New argument to
1449 build_empty_stmt.
1450 * expr.c (force_evaluation_order): Same.
1451 * typeck.c: Add location to build_decl or PUSH_FIELD calls.
1452 * class.c: Same.
1453 * decl.c: Same.
1454 * jcf-parse.c: Same.
1455 * constants.c: Same.
1456 * resource.c: Same.
1457 * except.c: Same.
1458 * builtins.c: Same.
1459 * expr.c: Same.
1460 * java-tree.h (PUSH_FIELD): Add location field.
1461
1462 2009-06-09 Ian Lance Taylor <iant@google.com>
1463
1464 * verify.h: Remove extern "C".
1465
1466 2009-06-07 Ian Lance Taylor <iant@google.com>
1467
1468 * jcf-parse.c (handle_constant): Change local variable 'kind' to
1469 unsigned int.
1470
1471 2009-06-01 Ian Lance Taylor <iant@google.com>
1472
1473 * jcf-io.c (find_class): Use CONST_CAST.
1474
1475 2009-05-27 Ian Lance Taylor <iant@google.com>
1476
1477 * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
1478 $(LINKER).
1479 (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
1480
1481 2009-05-26 Ian Lance Taylor <iant@google.com>
1482
1483 * Make-lang.in (jvspec.o): Use $(COMPILER).
1484 ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
1485 (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
1486
1487 2009-05-12 Alexandre Oliva <aoliva@redhat.com>
1488
1489 * Make-lang.in (GCJ): Renamed to...
1490 (XGCJ): ... this.
1491
1492 2009-04-27 Ian Lance Taylor <iant@google.com>
1493
1494 * builtins.c (java_builtins): Add casts to enum type.
1495 * verify-impl.c (check_class_constant): Add cast to enum type.
1496 (check_constant, check_wide_constant): Likewise.
1497
1498 2009-04-27 Richard Guenther <rguenther@suse.de>
1499
1500 PR java/38374
1501 * constants.c (build_constants_constructor): Retain the old
1502 pointer type as valid TYPE_POINTER_TO after patching the
1503 type of the constant pool decl.
1504
1505 2009-04-24 Ian Lance Taylor <iant@google.com>
1506
1507 * jcf-parse.c (handle_constant): Add cast to enum type.
1508
1509 2009-04-21 Taras Glek <tglek@mozilla.com>
1510
1511 * builtins.c: Update GTY annotations to new syntax
1512 * decl.c: Likewise
1513 * java-tree.h: Likewise
1514 * jcf.h: Likewise
1515 * lang.c: Likewise
1516
1517 2009-04-21 Joseph Myers <joseph@codesourcery.com>
1518
1519 * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
1520 license notices.
1521
1522 2009-04-18 Ian Lance Taylor <iant@google.com>
1523
1524 * verify-impl.c (verify_instructions_0): Add cast to enum type.
1525
1526 2009-04-09 Paolo Bonzini <bonzini@gnu.org>
1527
1528 * builtins.c (compareAndSwapLong_builtin,
1529 compareAndSwapInt_builtin, compareAndSwapObject_builtin,
1530 VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
1531
1532 2009-03-31 Richard Guenther <rguenther@suse.de>
1533
1534 * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
1535 the first operand of binary and comaprison expressions.
1536
1537 2009-03-30 Joseph Myers <joseph@codesourcery.com>
1538
1539 PR rtl-optimization/323
1540 * lang.c (java_post_options): Set flag_excess_precision_cmdline.
1541 Give an error for -fexcess-precision=standard for processors where
1542 the option is significant.
1543
1544 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1545
1546 * lang.opt: Unify help text for -Wdeprecated.
1547
1548 2009-02-03 Jakub Jelinek <jakub@redhat.com>
1549
1550 * jcf-dump.c (version): Update copyright notice dates.
1551
1552 2009-01-16 Richard Guenther <rguenther@suse.de>
1553
1554 PR tree-optimization/38835
1555 PR middle-end/36227
1556 * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
1557
1558 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
1559
1560 PR bootstrap/38262
1561 * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
1562
1563 2008-11-04 Andrew Haley <aph@redhat.com>
1564
1565 PR java/37068
1566 * jcf-parse.c (java_emit_static_constructor): Don't call
1567 cgraph_build_static_cdtor. Rewrite.
1568
1569 2008-10-24 Jakub Jelinek <jakub@redhat.com>
1570
1571 * Make-lang.in (check-java-subtargets): New target.
1572
1573 2008-10-16 David Edelsohn <edelsohn@gnu.org>
1574
1575 PR target/35483
1576 * Make-lang.in (class.o): Depend on $(TM_P_H).
1577 (expr.o): Same.
1578 * class.c: Include tm_p.h.
1579 * expr.c: Include tm_p.h.
1580
1581 2008-10-14 Andrew Haley <aph@redhat.com>
1582
1583 * constants.c (build_constant_data_ref): Make sure we only build
1584 one copy of the decl for the constant pool.
1585
1586 2008-09-22 Andrew Haley <aph@redhat.com>
1587
1588 * expr.c (rules): Add new rule for
1589 gnu.java.lang.VMCPStringBuilder.toString.
1590 (rewrite_rule.new_classname): New field.
1591 (maybe_rewrite_invocation): Use new_classname field instead of
1592 DECL_CONTEXT (*method_p).
1593 Allow rewrite_arglist to be NULL.
1594
1595 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
1596
1597 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1598 (java_get_callee_fndecl): Kill.
1599
1600 2008-09-17 Jan Hubicka <jh@suse.cz>
1601
1602 PR c++/18071
1603 * class.c (add_method_1): Do not initialize DECL_INLINE.
1604 (make_local_function_alias): Likewise.
1605 * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
1606 * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
1607
1608 2008-09-09 Richard Guenther <rguenther@suse.de>
1609
1610 * decl.c (build_result_decl): Remove no longer applicable
1611 promotion.
1612
1613 2008-09-05 David Daney <ddaney@avtrex.com>
1614
1615 * gcj.texi (-freduced-reflection): Clarify option's restrictions.
1616
1617 2008-08-21 David Daney <ddaney@avtrex.com>
1618
1619 * class.c (make_class_data): Don't add field_index when
1620 flag_reduced_reflection set.
1621
1622 2008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
1623
1624 * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
1625
1626 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1627
1628 PR 28875
1629 * lang.c (java_handle_option): Replace set_Wunused with
1630 warn_unused.
1631
1632 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1633
1634 * gcj.texi: Update copyright years. Do not list GPL as
1635 Invariant Section.
1636
1637 2008-07-29 Jakub Jelinek <jakub@redhat.com>
1638
1639 * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
1640 from ctype's sizes.
1641
1642 * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
1643 alignment.
1644
1645 2008-07-29 Jan Hubicka <jh@suse.cz>
1646
1647 * lang.c (java_post_options): Remove handling of flag_no_inline.
1648
1649 2008-07-28 Richard Guenther <rguenther@suse.de>
1650
1651 Merge from gimple-tuples-branch.
1652
1653 2008-07-18 Richard Guenther <rguenther@suse.de>
1654
1655 * expr.c: Include tree-iterator.h.
1656 * Make-lang.in (expr.o): Add tree-iterator.h dependency.
1657
1658 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1659
1660 * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
1661 * expr.c: Same.
1662
1663 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1664
1665 * java-gimplify.c (java_gimplify_expr): Same.
1666 (java_gimplify_modify_expr): Same.
1667 * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
1668
1669 2008-05-02 Diego Novillo <dnovillo@google.com>
1670
1671 * expr.c (build_java_throw_out_of_bounds_exception): Fix
1672 mixed declarations and code.
1673
1674 2008-05-02 Doug Kwan <dougkwan@google.com>
1675
1676 * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
1677 _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
1678
1679 2008-02-19 Diego Novillo <dnovillo@google.com>
1680
1681 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1682
1683 * java-gimplify.c (java_gimplify_self_mod_expr): Change
1684 gimple_seq arguments to gimple_seq *. Update all users.
1685
1686 2007-11-26 Aldy Hernandez <aldyh@redhat.com>
1687
1688 * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
1689 sequences.
1690 (java_gimplify_self_mod_expr): Same.
1691 * java-tree.h (java_gimplify_expr): Make pre_p and post_p
1692 sequences.
1693
1694 2008-07-24 Jan Hubicka <jh@suse.cz>
1695
1696 * java/decl.c: Include cgraph.h
1697 (end_java_method): Remove non-unit-at-a-time code.
1698 (java_mark_decl_local): Likewise; sanity check that we don't touch
1699 finalized nodes.
1700
1701 2008-07-15 Jan Hubicka <jh@suse.cz>
1702
1703 * lang.c (java_init_options): Enable unit-at-a-time by default.
1704
1705 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1706
1707 * Make-lang.in (jvspec.o): Fix dependencies.
1708
1709 2008-07-06 Tom Tromey <tromey@redhat.com>
1710
1711 * Make-lang.in (java/parse.o-warn): Remove.
1712 (java/jcf-io.o-warn): Remove.
1713
1714 2008-07-05 Tom Tromey <tromey@redhat.com>
1715
1716 * jcf-io.c: Don't include fnmatch.h. Don't use JCF_USE_SCANDIR.
1717 (compare_path): Remove.
1718 (java_or_class_file): Likewise.
1719 (memoized_dirlist_entry): Likewise.
1720 (memoized_dirlist_hash): Likewise.
1721 (memoized_dirlist_lookup_eq): Likewise.
1722 (memoized_dirlists): Likewise.
1723 (caching_stat): Likewise.
1724 (find_class): Use stat.
1725 * jcf.h (JCF_USE_SCANDIR): Remove.
1726
1727 2008-06-30 Joshua Sumali <jsumali@redhat.com>
1728
1729 * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
1730 doc/rebuild-gcj-db.1
1731 (java.uninstall): Likewise.
1732 (java.maintainer-clean): Likewise.
1733 (aot-compile.pod): New rule.
1734 (rebuild-gcj-db.pod): New rule.
1735 (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
1736 * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
1737
1738 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1739
1740 * Make-lang.in (java/jcf-io.o-warn): New.
1741
1742 2008-06-24 Tom Tromey <tromey@redhat.com>
1743
1744 * jcf-path.c (jcf_path_init): Don't name variable 'try'.
1745 * expr.c (add_type_assertion): Rename argument.
1746 (build_java_arrayaccess): Don't name variable 'throw'.
1747 (ARRAY_NEW_MULTI): Don't name variable 'class'.
1748 * jcf-io.c (find_class): Don't name variable 'class'.
1749 * mangle.c (compression_table_add): Don't name variable 'new'.
1750 * constants.c (cpool_for_class): Rename argument.
1751 (alloc_constant_fieldref): Likewise.
1752 * jcf-parse.c (handle_innerclass_attribute): Don't name variable
1753 'class'.
1754 (read_class): Likewise.
1755 (parse_zip_file_entries): Likewise.
1756 (process_zip_dir): Likewise.
1757 * decl.c (java_mark_class_local): Rename argument.
1758 * class.c (GEN_TABLE): Use type_name, not typename.
1759 (gen_indirect_dispatch_tables): Likewise.
1760 (add_field): Rename argument.
1761 (is_compiled_class): Likewise.
1762 (safe_layout_class): Likewise.
1763 (emit_assertion_table): Likewise.
1764 * typeck.c (has_method): Rename argument.
1765
1766 2008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1767
1768 * class.c (ident_subst, mangled_classname, unmangle_classname,
1769 gen_indirect_dispatch_tables, add_method_1,
1770 build_fieldref_cache_entry, make_local_function_alias,
1771 layout_class, java_treetreehash_find, java_treetreehash_new,
1772 split_qualified_name): Fix for -Wc++-compat.
1773 * constants.c (set_constant_entry, cpool_for_class): Likewise.
1774 * decl.c (make_binding_level, java_dup_lang_specific_decl,
1775 start_java_method): Likewise.
1776 * except.c (prepare_eh_table_type): Likewise.
1777 * expr.c (type_assertion_hash, note_instructions): Likewise.
1778 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1779 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1780 * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1781 Likewise.
1782 * jcf-parse.c (reverse, java_read_sourcefilenames,
1783 annotation_grow, rewrite_reflection_indexes, java_parse_file,
1784 process_zip_dir): Likewise.
1785 * jcf-path.c (add_entry, add_path, jcf_path_init,
1786 jcf_path_extdirs_arg): Likewise.
1787 * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1788 * jvgenmain.c (do_mangle_classname): Likewise.
1789 * lang.c (put_decl_string): Likewise.
1790 * verify-impl.c (make_state_copy, make_state, add_new_state):
1791 Likewise.
1792
1793 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1794
1795 * gcj.texi: Expand TABs, remove whitespace from blank lines.
1796
1797 2008-06-14 Tom Tromey <tromey@redhat.com>
1798
1799 PR java/36247:
1800 * class.c (build_class_ref): Initialize this_classdollar when
1801 needed.
1802
1803 2008-05-23 Andrew Haley <aph@redhat.com>
1804
1805 * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1806 pathname of source file.
1807
1808 2008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1809
1810 * jcf-dump.c (print_constant): Use
1811 HOST_LONG_LONG_FORMAT.
1812
1813 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1814
1815 * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1816 DECL_PURE_P.
1817
1818 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1819
1820 * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1821 (build_classdollar_field): Don't set TREE_INVARIANT.
1822 (get_dispatch_table): Don't set TREE_INVARIANT.
1823 (make_class_data): Don't set TREE_INVARIANT.
1824 (build_symbol_entry): Don't set TREE_INVARIANT.
1825 (emit_symbol_table): Don't set TREE_INVARIANT.
1826 * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1827 (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1828 * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1829 * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1830
1831 2008-04-03 Tom Tromey <tromey@redhat.com>
1832
1833 * Make-lang.in (java_OBJS): New variable.
1834
1835 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1836
1837 * java-tree.h (insert_block): Kill.
1838 * decl.c (insert_block): Kill.
1839
1840 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1841
1842 * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1843 * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1844 gpl.texi.
1845
1846 2008-03-27 Tom Tromey <tromey@redhat.com>
1847
1848 * Make-lang.in: Revert automatic dependency patch.
1849
1850 2008-03-25 Tom Tromey <tromey@redhat.com>
1851
1852 * Make-lang.in: Removed most explicit .o targets.
1853 (java/jvspec.o): Reduce to variable setting. Moved to java/.
1854 ($(GCJ)$(exeext)): Update.
1855 (JAVA_OBJS): New variable.
1856 (JCFDUMP_OBJS): Reformat.
1857 (java_OBJS): New variable.
1858 (java/jvspec.o-warn): Update.
1859 (java/parse.o-warn): Remove.
1860 (JAVA_TREE_H): Remove.
1861 (java/jcf-io.o): Reduce to variable setting.
1862 (ALL_CPPFLAGS): Likewise.
1863
1864 2008-03-12 Paolo Bonzini <bonzini@gnu.org>
1865
1866 * mangle.c (java_mangle_decl): Remove dead check.
1867
1868 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1869
1870 * jcf-parse.c (java_parse_file): Assert binding levels are
1871 left in order.
1872 * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1873 Delete.
1874
1875 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1876
1877 * jcf-dump.c (version): Update copyright notice dates.
1878
1879 2008-02-29 Tom Tromey <tromey@redhat.com>
1880
1881 * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1882 method.
1883 * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1884
1885 2008-02-26 Tom Tromey <tromey@redhat.com>
1886
1887 * lang.c (java_post_options): Remove conditional.
1888 * expr.c (expand_byte_code): Remove old location code.
1889 * jcf-parse.c (set_source_filename): Remove old location code.
1890 (give_name_to_class): Likewise.
1891 (jcf_parse): Likewise.
1892 (duplicate_class_warning): Likewise.
1893 (parse_class_file): Likewise.
1894 (java_parse_file): Likewise.
1895 * decl.c (finish_method): Remove old location code.
1896 * class.c (push_class): Remove old location code.
1897
1898 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1899
1900 PR other/35107
1901 * Make-lang.in (jc1): Add $(GMPLIBS).
1902
1903 2008-01-23 David Daney <ddaney@avtrex.com>
1904
1905 * class.c (hide) Rename to...
1906 (java_hide_decl) ... this throughout, and make public.
1907 * resource.c (Jr_count): Remove.
1908 (compile_resource_data): Call java_mangle_resource_name to generate
1909 decl name. Make resource decl public and hidden.
1910 * mangle.c (java_mangle_resource_name): New function.
1911 * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1912 functions.
1913
1914 2008-01-04 Andrew Haley <aph@redhat.com>
1915
1916 PR java/17779
1917 * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1918 C90.
1919
1920 2008-01-03 Andrew Haley <aph@redhat.com>
1921
1922 PR java/17779
1923 * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1924 we're about to re-layout the type.
1925
1926 2007-12-20 Alexandre Oliva <aoliva@redhat.com>
1927
1928 * lang.c (java_classify_record): Don't return
1929 RECORD_IS_INTERFACE for now.
1930
1931 2007-12-18 Andrew Haley <aph@redhat.com>
1932
1933 PR java/27643
1934 * jcf-parse.c (java_parse_file): Remove call to
1935 java_mark_class_local.
1936 (parse_class_file): Reinstate call to java_mark_class_local here.
1937 * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1938 already set, call java_mangle_decl() and make_decl_rtl() to
1939 rewrite its name as a hidden alias.
1940
1941 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1942
1943 PR debug/7081
1944 * lang.c (java_classify_record): New.
1945 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1946
1947 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1948
1949 PR 34081/C++
1950 * decl.c (finish_method): Pass 'false' for the new
1951 allocate_struct_function parameter.
1952
1953 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1954
1955 * expr.c (build_jni_stub): Use the computed jni func type for
1956 variable meth.
1957
1958 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1959
1960 * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1961
1962 2007-11-26 Alexandre Oliva <aoliva@redhat.com>
1963
1964 * expr.c (type_assertion_hash): Hash type uids rather than
1965 tree pointers.
1966
1967 2007-11-17 David Daney <ddaney@avtrex.com>
1968 Andrew Haley <aph@redhat.com>
1969
1970 * constants.c (build_constants_constructor): Use POINTER_SIZE
1971 insead of BITS_PER_WORD in big-endian work around.
1972
1973 2007-11-07 Tom Tromey <tromey@redhat.com>
1974
1975 PR java/34019:
1976 * gcj.texi (Input Options): Add missing noun.
1977
1978 2007-11-02 Tom Tromey <tromey@redhat.com>
1979
1980 PR java/33765:
1981 * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1982 * zipfile.h (ZIPEMPTYMAGIC): New define.
1983
1984 2007-11-01 Tom Tromey <tromey@redhat.com>
1985
1986 * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1987 (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1988 (java/jcf-io.o): Depend on zipfile.h.
1989
1990 2007-10-17 Richard Guenther <rguenther@suse.de>
1991
1992 * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1993 dependencies.
1994
1995 2007-10-03 Andrew Haley <aph@redhat.com>
1996
1997 PR java/33639
1998 * class.c (mangled_classname): Detect and replace illegal
1999 characters in assembly language symbols.
2000 (gen_indirect_dispatch_tables): Call mangled_classname() on
2001 the type.
2002
2003 2007-09-27 Jakub Jelinek <jakub@redhat.com>
2004
2005 * lang.c (java_print_error_function): Add third argument.
2006
2007 2007-09-15 Tom Tromey <tromey@redhat.com>
2008
2009 * java-tree.h (struct lang_decl_func) <function_decl_body>:
2010 Remove.
2011 <init_final>: Likewise.
2012 * lang.c (java_dump_tree): Update.
2013 * java-tree.h (DECL_FUNCTION_BODY): Remove.
2014
2015 2007-09-11 Jan Hubicka <jh@suse.cz>
2016
2017 * decl.c (java_expand_body): Kill.
2018 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
2019
2020 2007-09-06 Tom Tromey <tromey@redhat.com>
2021
2022 * jcf-parse.c (parse_class_file): Re-enter the current file.
2023
2024 2007-09-07 Roman Zippel <zippel@linux-m68k.org>
2025
2026 * boehm.c (mark_reference_fields): Move misaligned pointer check
2027 after JREFERENCE_TYPE_P test
2028
2029 2007-09-06 Roman Zippel <zippel@linux-m68k.org>
2030
2031 * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
2032 if pointer is misaligned.
2033
2034 2007-09-06 Tom Tromey <tromey@redhat.com>
2035
2036 * lang.c (java_post_options): Update.
2037 * jcf-parse.c (set_source_filename): Update.
2038 (give_name_to_class): Update.
2039 (jcf_parse): Update.
2040 (duplicate_class_warning): Update.
2041 (parse_class_file): Update.
2042 (java_parse_file): Update.
2043 * expr.c (expand_byte_code): Update.
2044
2045 2007-09-05 Sandra Loosemore <sandra@codesourcery.com>
2046
2047 * decl.c (finish_method): Use set_cfun.
2048
2049 2007-09-04 Andrew Haley <aph@redhat.com>
2050
2051 * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
2052 when using the ARM EABI.
2053
2054 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
2055
2056 * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
2057
2058 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2059
2060 * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
2061 CONST_CAST.
2062 * jcf.h (JCF_FINISH): Likewise.
2063
2064 2007-08-28 Tom Tromey <tromey@redhat.com>
2065
2066 * Make-lang.in (java.tags): Don't tag '*.y' files.
2067
2068 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2069
2070 * lang.c (java_decl_ok_for_sibcall): Likewise.
2071
2072 2007-08-21 Paul Brook <paul@codesourcery.com>
2073 Nathan Sidwell <nathan@codesourcery.com>
2074 Mark Mitchell <mark@codesourcery.com>
2075 Joseph Myers <joseph@codesourcery.com>
2076
2077 * jcf-dump.c (version): Use pkgversion_string. Update copyright
2078 date.
2079
2080 2007-08-20 Richard Guenther <rguenther@suse.de>
2081
2082 * lang.c (java_tree_inlining_walk_subtrees): Remove.
2083 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
2084
2085 2007-08-17 Tom Tromey <tromey@redhat.com>
2086
2087 * typeck.c (find_method_in_interfaces): Update.
2088 * jcf-parse.c (load_class): Update.
2089 * java-gimplify.c (java_gimplify_component_ref): Removed.
2090 (java_gimplify_modify_expr): Update. Removed pre_p and post_p
2091 arguments.
2092 (java_gimplify_expr): Update.
2093 * decl.c (java_init_decl_processing): Update.
2094 * class.c (set_constant_value): Update.
2095 (make_class_data): Update.
2096 (finish_class): Update.
2097 (build_static_field_ref): Update.
2098 (is_compiled_class): Update.
2099 (maybe_layout_super_class): Update.
2100 (layout_class): Update.
2101 (layout_class_method): Update.
2102 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
2103 (lang_decl_var) <am, final_iud, cif>: Removed fields.
2104 (lang_decl_func) <init_calls_this>: Removed field.
2105 (lang_type) <dot_class, verify_method>: Removed fields.
2106 (FIELD_NESTED_ACCESS): Removed.
2107 (FIELD_NESTED_ACCESS_P): Removed.
2108 (DECL_FIELD_FINAL_IUD): Removed.
2109 (DECL_LOCAL_FINAL_IUD): Removed
2110 (LOCAL_FINAL_P): Removed.
2111 (FINAL_VARIABLE_P): Removed.
2112 (CLASS_FINAL_VARIABLE_P): Removed.
2113 (DECL_BIT_INDEX): Removed.
2114 (DECL_INIT_CALLS_THIS): Removed.
2115 (FIELD_LOCAL_ALIAS): Removed.
2116 (FIELD_LOCAL_ALIAS_USED): Removed.
2117 (FIELD_THISN): Removed.
2118 (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
2119 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
2120 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
2121 (TYPE_DOT_CLASS): Removed.
2122 (TYPE_VERIFY_METHOD): Removed.
2123 (ID_CLASSDOLLAR_P): Removed.
2124 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
2125 Removed.
2126 (classdollar_identifier_node): Removed.
2127 (TYPE_UNKNOWN): Removed.
2128 (CLASS_FROM_SOURCE_P): Removed.
2129 * expr.c (build_jni_stub): Update.
2130 (force_evaluation_order): Update.
2131 (build_java_empty_stmt): Update.
2132 (build_class_init): Update.
2133 (java_stack_swap): Update.
2134 (build_jni_stub): Update.
2135
2136 2007-08-17 Tom Tromey <tromey@redhat.com>
2137
2138 * java-tree.h (LABEL_TYPE_STATE): Removed.
2139 (load_type_state): Removed.
2140 (LABEL_PC): Removed.
2141 (LABEL_VERIFIED): Removed.
2142 (type_states): Declare.
2143 * expr.c (type_states): New global.
2144 (load_type_state): Now static. Use type_states. Changed
2145 argument.
2146 (lookup_label): Don't set LABEL_PC.
2147 (expand_byte_code): Don't use LABEL_VERIFIED.
2148 (note_instructions): Initialize type_states.
2149 * verify-glue.c (vfy_note_stack_depth): Rewrote.
2150 (vfy_note_stack_type): Use type_states.
2151 (vfy_note_local_type): Likewise.
2152
2153 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2154
2155 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
2156 * jcf.h (JCF_FINISH): Likewise.
2157
2158 2007-07-31 Nick Clifton <nickc@redhat.com>
2159
2160 * java-gimplify.c: Change copyright header to refer to version 3
2161 of the GNU General Public License and to point readers at the
2162 COPYING3 file and the FSF's license web page.
2163 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
2164 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
2165 resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
2166 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
2167 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
2168 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
2169 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
2170
2171 2007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2172
2173 * jcf-io.c (find_class): Fix -Wcast-qual warnings.
2174
2175 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2176
2177 * lang.c (java_get_callee_fndecl): Constify.
2178
2179 2007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2180
2181 * mangle.c (set_type_package_list): Constify.
2182 * verify-glue.c (vfy_make_string): Delete.
2183 * verify.h (vfy_make_string): Likewise.
2184
2185 2007-07-26 Tom Tromey <tromey@redhat.com>
2186
2187 * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
2188 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
2189 EXIT_BLOCK_LABELED_BLOCK): Likewise.
2190 * lang.c (java_tree_inlining_walk_subtrees): Update.
2191 (java_dump_tree): Likewise.
2192 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
2193 Remove.
2194 * decl.c (push_labeled_block, pop_labeled_block): Remove.
2195 * java-gimplify.c (java_gimplify_labeled_block_expr,
2196 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
2197 (java_gimplify_expr): Update.
2198
2199 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2200
2201 * class.c (java_treetreehash_hash, java_treetreehash_compare):
2202 Constify.
2203 * expr.c (type_assertion_eq): Likewise.
2204 * jcf-io.c (compare_path): Likewise.
2205 * jcf-parse.c (cmpstringp): Likewise.
2206 * verify-impl.c (get_one_type, compute_argument_types,
2207 compute_return_type): Likewise.
2208
2209 2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2210
2211 PR target/32462
2212 PR libgcj/32465
2213 * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
2214
2215 2007-07-12 Richard Guenther <rguenther@suse.de>
2216
2217 * expr.c (expand_java_return): RETURN_EXPR has void type.
2218 (build_jni_stub): Likewise. Use a comparison against zero
2219 for null-pointer test in COND_EXPR.
2220 (build_field_ref): Build POINTER_PLUS_EXPR with correct
2221 type. Convert result instead.
2222 (build_invokevirtual): Likewise.
2223
2224 2007-07-09 Geoffrey Keating <geoffk@apple.com>
2225
2226 PR 32617
2227 * lang.c (java_init): Remove setting of force_align_functions_log.
2228 * class.c (add_method_1): Set DECL_ALIGN of non-static method
2229 to cope with ptrmemfunc_vbit_in_pfn.
2230
2231 2007-07-03 David Daney <ddaney@avtrex.com>
2232
2233 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
2234 include path.
2235 (doc/gcj.dvi): Same.
2236 (doc/gcj.pdf): Same.
2237 (java/index.html): Same.
2238
2239 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
2240
2241 * class.c (make_class_data): Build the index in sizetype.
2242 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
2243 adding to a pointer type.
2244 (build_symbol_entry): Likewise.
2245 * expr.c (build_java_arrayaccess): Likewise.
2246 (build_field_ref): Likewise.
2247 (build_known_method_ref): Likewise.
2248 (build_invokevirtual): Likewise.
2249 * except.c (build_exception_object_ref): Do a
2250 NEGATIVE and then a POINTER_PLUS_EXPR instead
2251 of a MINUS_EXPR.
2252
2253 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
2254
2255 * typeck.c (java_signed_type): Remove.
2256 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
2257 * java-tree.h (java_signed_type): Remove.
2258
2259 2007-05-18 Geoffrey Keating <geoffk@apple.com>
2260
2261 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
2262 (print_constant): Likewise.
2263
2264 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
2265
2266 * expr.c (build_java_binop): Use unsigned_type_for instead of
2267 java_unsigned_type.
2268 * java-tree.h (java_unsigned_type): Remove.
2269 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2270 * typeck.c (java_unsigned_type): Remove.
2271
2272 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
2273
2274 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
2275 instead of checking GIMPLE_STMT_P in chain_next.
2276
2277 2007-04-06 Colin Walters <walters@redhat.com>
2278
2279 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
2280 * jcf-io.c (open_class): Copy 'filename'.
2281
2282 2007-04-03 Andrew Haley <aph@redhat.com>
2283
2284 * jvgenmain.c (main): Change main to use class$, not class$$.
2285 (do_mangle_classname): Likewise.
2286 * class.c (hide): New function.
2287 (add_field): Hide everything that shouldn't be visible outside a
2288 DSO.
2289 (build_static_class_ref): Likewise.
2290 (build_classdollar_field): Likewise.
2291 (make_class_data): Likewise.
2292 (layout_class_method): Likewise.
2293 * expr.c (special_method_p): New function.
2294
2295 * class.c (push_class): Don't bogusly guess the source filename.
2296 * jcf-parse.c (give_name_to_class): Don't set input_location from
2297 DECL_ARTIFICIAL decls.
2298
2299 2007-03-30 Rafael Ávila de Espíndola <espindola@google.com>
2300
2301 * typeck.c (java_signed_or_unsigned_type): Removed.
2302 (java_signed_type): use get_signed_or_unsigned_type instead of
2303 java_signed_or_unsigned_type.
2304 (java_unsigned_type): Ditto.
2305 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
2306 * java-tree.h (java_signed_or_unsigned_type): Removed.
2307
2308 2007-03-26 Tom Tromey <tromey@redhat.com>
2309
2310 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
2311 (java.maintainer-clean): Likewise.
2312 (java.install-man): Likewise.
2313 (.INTERMEDIATE): Removed grmiregistry.pod.
2314 (grmiregistry.pod): Removed.
2315 * gcj.texi (Invoking gcjh): Removed.
2316 (Invoking gjnih): Likewise.
2317 (Invoking grmiregistry): Likewise.
2318 (direntry): Updated.
2319 (Top): Likewise.
2320 (which-gcj): Removed.
2321
2322 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2323
2324 * Make-lang.in: Add install-pdf target as copied from
2325 automake v1.10 rules.
2326
2327 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
2328
2329 * gcj.texi: Standardize title page.
2330
2331 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
2332
2333 * class.c: Fix a comment typo.
2334
2335 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2336 Brooks Moses <brooks.moses@codesourcery.com>
2337 Lee Millward <lee.millward@codesourcery.com>
2338
2339 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
2340 of build3.
2341 (BUILD_MONITOR_EXIT): Likewise.
2342
2343 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
2344 (java_gimplify_modify_expr): Likewise.
2345
2346 * class.c (cache_this_class_ref): Use build_call_expr.
2347 (build_static_field_ref): Likewise.
2348 (emit_indirect_register_classes): Likewise.
2349 (emit_register_classes): Likewise.
2350
2351 * resource.c (write_resource_constructor): Use build_call_expr.
2352
2353 * builtins.c (builtin_creator_function): Change interpretation of
2354 the second parameter to be the whole CALL_EXPR instead of the arglist.
2355 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
2356 (min_builtin): Likewise.
2357 (abs_builtin): Likewise.
2358 (java_build_function_call_expr): Likewise.
2359 (convert_real): Likewise.
2360 (UNMARSHAL3): Likewise.
2361 (UNMARSHAL4): Likewise.
2362 (UNMARSHAL5): Likewise.
2363 (build_arglist_for_builtin): Delete. Fix callers to use
2364 build_call_expr instead.
2365 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
2366 accessors.
2367 (compareAndSwapInt_builtin): Likewise.
2368 (compareAndSwapLong_builtin): Likewise.
2369 (compareAndSwapObject_builtin): Likewise.
2370 (putVolatile_builtin): Likewise.
2371 (getVolatile_builtin): Likewise.
2372 (VMSupportsCS8_builtin): Likewise.
2373 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
2374 instead of arglist.
2375
2376 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
2377 (build_java_throw_out_of_bounds_exception): Likewise.
2378 (java_check_reference): Likewise.
2379 (build_java_arraystore_check): Likewise.
2380 (build_newarray): Likewise.
2381 (build_anewarray): Likewise.
2382 (expand_java_multinewarray): Use build_call_list instead of build3.
2383 (build_java_monitor): Use build_call_nary instead of build3.
2384 (java_create_object): Likewise.
2385 (expand_java_NEW): Likewise.
2386 (build_instanceof): Likewise.
2387 (expand_java_CHECKCAST): Likewise.
2388 (build_java_soft_divmod): Likewise.
2389 (build_java_binop): Likewise.
2390 (build_field_ref): Likewise.
2391 (build_class_init): Likewise.
2392 (rewrite_arglist_getcaller): Use build_call_expr.
2393 (build_invokeinterface): Use build_call_nary instead of build3.
2394 (expand_invoke): Use build_call_list instead of build3.
2395 (build_jni_stub): Use build_call_nary, build_call_list, or
2396 build_call_expr instead of build3.
2397 (expand_java_field_op): Use build_call_expr instead of build3.
2398 (force_evaluation_order): Use new CALL_EXPR accessors.
2399
2400 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
2401
2402 2007-02-15 David Daney <ddaney@avtrex.com>
2403
2404 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
2405 (java.maintainer-clean):Add gc-analyze.1.
2406 (.INTERMEDIATE): Add gc-analyze.pod.
2407 (gc-analyze.pod): New rule.
2408 (java.install-man): Install gc-analyze.1
2409 * gcj.texi: Add new section for the gc-analyze program.
2410
2411 2007-02-07 Andrew Haley <aph@redhat.com>
2412
2413 * class.c (uncache_this_class_ref): New.
2414 * expr.c (build_jni_stub): Initialize the class.
2415 (expand_byte_code): Call uncache_this_class_ref after generating
2416 code.
2417
2418 2007-02-06 Tom Tromey <tromey@redhat.com>
2419
2420 PR java/30714:
2421 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
2422
2423 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
2424
2425 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
2426
2427 2007-02-02 Andrew Haley <aph@redhat.com>
2428
2429 * expr.c (expand_byte_code): Call cache_this_class_ref() and
2430 cache_cpool_data_ref().
2431 Set TYPE_CPOOL_DATA_REF.
2432 (cache_cpool_data_ref): New function.
2433 * constants.c (build_ref_from_constant_pool): Remove special-case
2434 code for flag_indirect_classes.
2435 (build_constant_data_ref): Move special-case code for
2436 flag_indirect_classes here from build_ref_from_constant_pool.
2437 * decl.c (finish_method): Move class initialization from here to
2438 cache_this_class_ref.
2439 * class.c (cache_this_class_ref): New function.
2440 (build_class_ref): Use this_classdollar for the ouput class.
2441
2442 2007-02-02 David Daney <ddaney@avtrex.com>
2443
2444 * class.c (is_compiled_class): Move check to avoid reloading
2445 current class.
2446 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
2447 already set.
2448
2449 2007-02-01 Andrew Haley <aph@redhat.com>
2450
2451 PR java/30641
2452 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
2453
2454 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
2455
2456 * class.c, jcf-parse.c: Fix comment typos.
2457
2458 2007-01-30 Tom Tromey <tromey@redhat.com>
2459
2460 * gcj.texi (Strings): Fix documentation for JvNewString.
2461
2462 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2463
2464 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
2465 typos.
2466
2467 2007-01-30 Ben Elliston <bje@au.ibm.com>
2468
2469 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
2470
2471 2007-01-29 Tom Tromey <tromey@redhat.com>
2472
2473 PR java/30607:
2474 * jvspec.c (lang_specific_driver): Handle separate -I argument.
2475 * lang.opt (-I): Add 'Separate'.
2476
2477 2007-01-29 Andrew Haley <aph@redhat.com>
2478
2479 * class.c (add_method_1): Mark fndecl as external unless we are
2480 compiling it into this object file.
2481
2482 2007-01-24 Andrew Haley <aph@redhat.com>
2483
2484 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
2485 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
2486
2487 2007-01-22 Andrew Haley <aph@redhat.com>
2488
2489 * builtins.c (VMSupportsCS8_builtin): New function.
2490
2491 2007-01-23 Andrew Pinski <pinskia@gmail.com>
2492
2493 PR java/30454
2494 * jcf-io.c (opendir_in_zip): Close the file
2495 and free zipf before returning after an error.
2496
2497 2007-01-16 Tom Tromey <tromey@redhat.com>
2498
2499 * java-tree.def: Added copyright header.
2500
2501 2007-01-15 Tom Tromey <tromey@redhat.com>
2502
2503 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
2504 case.
2505 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
2506 Removed case.
2507 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
2508 (EXPR_WFL_NODE): Likewise.
2509 (EXPR_WFL_LINECOL): Likewise.
2510 (EXPR_WFL_FILENAME): Likewise.
2511 (EXPR_WFL_LINENO): Likewise.
2512 (build_expr_wfl, expr_add_location): Don't declare.
2513 (build_unknown_wfl): Removed.
2514 (EXPR_WFL_FILENAME_NODE): Removed.
2515 (EXPR_WFL_COLNO): Removed.
2516 (EXPR_WFL_SET_LINECOL): Removed.
2517 (DECL_FUNCTION_WFL): Removed.
2518 (DECL_FIELD_FINAL_WFL): Removed.
2519 (struct lang_decl_func) <wfl>: Removed field.
2520 <called_constructor>: Likewise.
2521 <inner_access>: Likewise.
2522 (struct lang_decl_var) <wfl>: Removed field.
2523 (DECL_CONSTRUCTOR_CALLS): Removed.
2524 (DECL_FUNCTION_ACCESS_DECL): Likewise.
2525 (DECL_FUNCTION_INNER_ACCESS): Likewise.
2526 (DECL_SPECIFIC_COUNT): Likewise.
2527 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
2528 * expr.c (build_expr_wfl): Removed.
2529 (expr_add_location): Likewise.
2530
2531 2007-01-12 Tom Tromey <tromey@redhat.com>
2532
2533 * jcf-dump.c (main): Updated call to find_class.
2534 * lang.c (java_init): Removed dead code.
2535 * jcf-parse.c (read_class): Don't use java_source field. Removed
2536 dead code.
2537 (parse_zip_file_entries): Don't use java_source field.
2538 (process_zip_dir): Likewise.
2539 (jcf_parse): Removed dead code.
2540 (java_parse_file): Likewise.
2541 (read_class): Updated call to find_class.
2542 * jcf-io.c (find_class): Don't use java_source field. Removed
2543 'source_ok' argument, .java logic.
2544 * jcf.h (JCF) <java_source>: Removed field.
2545 (JCF_ZERO): Updated. (find_class): Updated.
2546 * decl.c: Removed dead code.
2547 * class.c: Removed dead code.
2548
2549 2007-01-11 Tom Tromey <tromey@redhat.com>
2550
2551 * typeck.c (convert): Don't use flag_emit_class_files.
2552 * lang.c (java_post_options): Don't use flag_emit_class_files.
2553 (java_handle_option): Don't use flag_extraneous_semicolon or
2554 flag_redundant.
2555 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
2556 flag_emit_class_files.
2557 (load_class): Likewise.
2558 * java-tree.h (flag_emit_class_files): Don't declare.
2559 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
2560 (flag_extraneous_semicolon): Don't declare.
2561 (flag_not_overriding): Likewise.
2562 (flag_static_local_jdk1_1): Likewise.
2563 (flag_redundant): Likewise.
2564 * expr.c (build_newarray): Don't use flag_emit_class_files.
2565 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
2566 flag_emit_class_files.
2567 (build_class_ref): Likewise.
2568 * builtins.c (check_for_builtin): Don't use
2569 flag_emit_class_files.
2570
2571 2007-01-10 Tom Tromey <tromey@redhat.com>
2572
2573 * lang.c (java_can_use_bit_fields_p): Removed.
2574 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
2575
2576 2007-01-09 Andrew Haley <aph@redhat.com>
2577
2578 * expr.c (build_java_arrayaccess): Rewrite to generate array
2579 access in canonical form.
2580 (expand_java_arraystore): Use build_fold_addr_expr() on address of
2581 array access.
2582
2583 2007-01-03 Andrew Haley <aph@redhat.com>
2584
2585 PR java/28754
2586 * expr.c (expand_java_field_op): If we're initializing a field's
2587 declaring interface we should not also initialize the class
2588 context in which it was referenced.
2589
2590 2007-01-02 Tom Tromey <tromey@redhat.com>
2591
2592 * java-tree.h (compiling_from_source, current_encoding,
2593 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
2594 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
2595 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
2596 JTI_WFL_OPERATOR): Removed
2597 (finit_identifier_node, instinit_identifier_node,
2598 length_identifier_node, super_identifier_node,
2599 continue_identifier_node, access0_identifier_node, wfl_operator):
2600 Removed.
2601 (cyclic_inheritance_report,
2602 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
2603 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
2604 DECL_FIXED_CONSTRUCTOR_P): Removed.
2605 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
2606 Removed.
2607 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
2608 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
2609 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
2610 import_list, import_demand_list>: Removed.
2611 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
2612 cxx_keyword_p): Removed.
2613 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
2614 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
2615 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
2616 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
2617 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
2618 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
2619 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
2620 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
2621 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
2622 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
2623 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
2624 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
2625 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
2626 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
2627 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
2628 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
2629 java_parse_abort_on_error, extract_field_decl): Removed.
2630 (finput): Declare.
2631 * lang.c: (compiling_from_source, current_encoding): Removed.
2632 (java_handle_option): Ignore -fencoding.
2633 * parse.h: Don't include lex.h.
2634 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
2635 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
2636 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
2637 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
2638 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
2639 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
2640 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
2641 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
2642 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
2643 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
2644 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
2645 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
2646 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
2647 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
2648 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
2649 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
2650 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
2651 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
2652 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
2653 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
2654 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
2655 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
2656 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
2657 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
2658 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
2659 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
2660 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
2661 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
2662 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
2663 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
2664 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
2665 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
2666 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
2667 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
2668 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
2669 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
2670 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
2671 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
2672 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
2673 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
2674 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
2675 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
2676 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
2677 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
2678 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
2679 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
2680 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
2681 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
2682 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
2683 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
2684 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
2685 SET_CPC_STATIC_INITIALIZER_STMT,
2686 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
2687 java_complete_class, java_check_circular_reference,
2688 java_fix_constructors, java_layout_classes, java_reorder_fields,
2689 java_method_add_stmt, java_get_line_col, reset_report,
2690 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
2691 java_finish_classes, ctxp, ctxp_for_generation,
2692 ctxp_for_generation_last): Removed.
2693 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
2694 * mangle.c (utf8_cmp): New function.
2695 (cxx_keywords): New global.
2696 (cxx_keyword_p): New function.
2697 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
2698 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
2699 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
2700 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
2701 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
2702 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
2703 * Make-lang.in (java.srcextra): Do nothing.
2704 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
2705 (JAVA_OBJS): Don't mention deleted files.
2706 (java.mostlyclean): Likewise.
2707 (java.clean): Likewise.
2708 (JAVA_LEX_C): Removed.
2709 (buffer.o, check-init.o, parse.o): Remove unused targets.
2710 (typeck.o): Updated.
2711 * jcf-parse.c (read_class): Comment out unused code.
2712 (java_layout_seen_class_methods): New function.
2713 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
2714 Removed.
2715 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
2716 (init_jcf_parse): Removed.
2717 * config-lang.in (gtfiles): Remove deleted files.
2718 * decl.c (java_init_decl_processing): Don't initialize
2719 finit_identifier_node, instinit_identifier_node,
2720 length_identifier_node, super_identifier_node,
2721 continue_identifier_node, access0_identifier_node. Don't call
2722 init_jcf_parse.
2723 * class.c (cyclic_inheritance_report): New global.
2724 (add_method_1): Don't use
2725 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
2726 (maybe_layout_super_class): Comment out code.
2727 (safe_layout_class): New function.
2728 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
2729 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
2730 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
2731 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
2732 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
2733 (java_gimplify_case_expr): Removed.
2734 (java_gimplify_default_expr): Likewise.
2735 (java_gimplify_new_array_init): Likewise.
2736 * parse.y: Removed.
2737 * keyword.gperf, keyword.h: Removed.
2738 * chartables.h: Removed.
2739 * check-init.c: Removed.
2740 * buffer.c, buffer.h: Removed.
2741 * convert.h: Removed.
2742 * gen-table.pl: Removed.
2743 * lex.c, lex.h: Removed.
2744
2745 2007-01-02 Andrew Haley <aph@redhat.com>
2746
2747 * expr.c (expand_java_arraystore): Make sure we perform a bounds
2748 check at runtime before we perform a type check.
2749
2750 2006-12-19 Andrew Haley <aph@redhat.com>
2751
2752 * decl.c: Bump minor BC ABI version.
2753
2754 2006-12-13 Gary Benson <gbenson@redhat.com>
2755
2756 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
2757
2758 2006-12-12 Tom Tromey <tromey@redhat.com>
2759
2760 * lang-specs.h: Pass -M options to jc1.
2761 * jcf-depend.c (jcf_dependency_add_file): Don't emit
2762 dependencies.
2763
2764 2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
2765
2766 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
2767
2768 2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
2769
2770 * lang-specs.h: Pass '%U'-based options as separate arguments.
2771
2772 2006-12-05 Tom Tromey <tromey@redhat.com>
2773
2774 PR java/29495:
2775 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
2776 classes as well.
2777 * class.c (add_field): Handle ACC_SYNTHETIC.
2778 (add_method_1): Likewise. Handle bridge and varargs.
2779 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2780 annotation.
2781 (set_class_decl_access_flags): Handle synthetic and annotation.
2782 * java-tree.h (METHOD_BRIDGE): New macro.
2783 (METHOD_VARARGS): Likewise.
2784 (TYPE_SYNTHETIC): Likewise.
2785 (TYPE_ANNOTATION): Likewise.
2786 (lang_type): New fields 'synthetic' and 'annotation'.
2787 (lang_decl_func): New fields 'varargs' and 'bridge'.
2788
2789 2006-12-04 Andrew Haley <aph@redhat.com>
2790
2791 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2792 there's no map.
2793
2794 2006-11-29 Gary Benson <gbenson@redhat.com>
2795
2796 * expr.c (rewrite_arglist_getcaller): Reorder.
2797
2798 2006-11-29 Andrew Haley <aph@redhat.com>
2799
2800 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2801 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2802
2803 2006-11-23 Andrew Haley <aph@redhat.com>
2804
2805 * expr.c (rewrite_arglist_getcaller): New.
2806 (rewrite_arglist_getclass): Fix indentation.
2807 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
2808 gnu.classpath.VMStackWalker.getCallingClassLoader().
2809 * builtins.c (initialize_builtins): Remove duplicate def'n of
2810 __sync_synchronize.
2811 Add __builtin_return_address.
2812
2813 2006-11-22 Andrew Haley <aph@redhat.com>
2814
2815 * jcf-reader.c (get_attribute): Mark attr_type unused.
2816
2817 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2818
2819 2007-01-08 Richard Guenther <rguenther@suse.de>
2820
2821 * lex.c (do_java_lex): Use build_int_cst_wide_type.
2822 * jcf-parse.c (get_constant): Likewise.
2823
2824 2006-11-12 Jan Hubicka <jh@suse.cz>
2825
2826 * resource.c (compile_resource_data): Update for new varpool names.
2827 * java/class.c (build_utf8_ref): Likewise.
2828
2829 2006-11-12 David Daney <ddaney@avtrex.com>
2830
2831 PR java/29805
2832 * typeck.c (build_java_array_type): Increase buffer sizes.
2833
2834 2006-11-11 Richard Guenther <rguenther@suse.de>
2835
2836 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2837 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2838
2839 2006-11-06 Andrew Haley <aph@redhat.com>
2840
2841 * java-tree.h (CONSTANT_LazyFlag): New.
2842 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2843 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2844 reflection_data.
2845 (handle_constant): Return 0 for dummy cpool entries.
2846 Handle constants of kind Class.
2847 Handle constants of kind NameAndType.
2848 (handle_enclosingmethod_attribute): New.
2849 (handle_signature_attribute): New.
2850 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2851 (HANDLE_SIGNATURE_ATTRIBUTE): New.
2852 (handle_constant): Use unmangle_classname()rather than calling
2853 identifier_subst() directly.
2854
2855 2006-11-02 Andrew Haley <aph@redhat.com>
2856
2857 * java-tree.h (FIELD_ENUM): New.
2858 (lang_decl_var.field_enum): New.
2859 (lang_type.enum_class): New.
2860 (CLASS_ENUM): New.
2861 * class.c (set_class_decl_access_flags): Handle enum types.
2862 (add_field): Handle enum fields.
2863 (get_access_flags_from_decl): Likewise.
2864
2865 * class.c (make_class_data): Put reflection_data into rodata.
2866
2867 2006-11-01 Andrew Haley <aph@redhat.com>
2868
2869 * jcf-parse.c (field_offsets, bit_obstack): New variables.
2870 (jcf_parse): Write end marker to annotation_data.
2871 (java_parse_file): Create field_offsets bitmap. Destroy it.
2872 (annotation_grow, annotation_rewrite_byte)
2873 (annotation_rewrite_short, annotation_rewrite_int)
2874 (annotation_read_short, annotation_write_byte)
2875 (annotation_write_short, annotation_write_int)
2876 (handle_long_constant, handle_constant, handle_element_value)
2877 (handle_annotation, handle_annotations)
2878 (handle_annotation_attribute, rewrite_reflection_indexes)
2879 (handle_member_annotations, handle_parameter_annotations)
2880 (handle_default_annotation): New functions.
2881 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
2882 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
2883 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2884 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2885 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2886 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
2887 (TYPE_REFLECTION_DATA): New.
2888 (TYPE_REFLECTION_DATASIZE): New.
2889 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2890 an enum.
2891 * jcf-reader.c (get_attribute): Pass field/method index and
2892 attribute type to get_attribute().
2893 * constants.c (find_class_or_string_constant): Make nonstatic.
2894 (cpool_for_class): Likewise.
2895 (build_constants_constructor): Separate string and scalar types.
2896 * class.c (make_class_data): Generate field_indexes permutation.
2897 Pass it to rewrite_reflection_indexes().
2898 (make_class_data): Generate constructor for reflection_data field.
2899
2900 2006-10-20 Tom Tromey <tromey@redhat.com>
2901
2902 * gcj.texi (Top): Don't mention jv-scan.
2903 (Invoking gcj): Likewise.
2904 (Invoking gcjh): Likewise.
2905 (Invoking gjnih): Likewise.
2906 (Invoking gij): Likewise.
2907 (Invoking gcj-dbtool): Likewise.
2908 (Invoking jv-scan): Removed.
2909 * parse-scan.y: Removed.
2910 * jv-scan.c: Removed.
2911 * config-lang.in (stagestuff): Don't mention jv-scan.
2912 * Make-lang.in (java): Removed jv-scan.
2913 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2914 (JVSCAN_OBJS): Removed.
2915 (jv-scan$(exeext)): Likewise.
2916 (JAVA_MANFILES): Removed jv-scan.1.
2917 (java.uninstall): Don't mention jv-scan.
2918 (java.mostlyclean): Likewise.
2919 (java.maintainer-clean): Likewise.
2920 (.INTERMEDIATE): Likewise.
2921 (java/jv-scan.o): Removed.
2922 (jv-scan.pod): Likewise.
2923 (java.srcextra): Don't mention parse-scan.c.
2924 (java.mostlyclean): Likewise.
2925 (java/parse-scan.c): Removed.
2926 (java/parse-scan.o-warn): Removed.
2927 (java/parse-scan.o): Removed.
2928
2929 2006-10-20 Tom Tromey <tromey@redhat.com>
2930
2931 * lang.c (java_handle_option): Don't use
2932 jcf_write_base_directory.
2933 * jcf.h (jcf_write_base_directory): Removed.
2934 * parse.y (java_expand_classes): Don't call write_classfile.
2935 * config-lang.in (gtfiles): Removed jcf-write.c.
2936 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2937 (java/jcf-write.o): Removed.
2938 * jcf-parse.c (parse_class_file): Don't call write_classfile.
2939 * java-tree.h (write_classfile): Removed declaration.
2940 * jcf-write.c: Removed.
2941
2942 2006-10-20 Tom Tromey <tromey@redhat.com>
2943
2944 * Make-lang.in (java): Removed gjnih, gcjh.
2945 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2946 (GCJH_OBJS): Removed.
2947 (GJNIH_OBJS): Likewise.
2948 (gjnih$(exeext)): Likewise.
2949 (gcjh$(exeext)): Likewise.
2950 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2951 (java.install-common): Don't special case gcjh.
2952 (java.uninstall): Don't mention gcjh, gjnih.
2953 (java.mostlyclean): Likewise.
2954 (java.maintainer-clean): Likewise.
2955 (.INTERMEDIATE): Likewise.
2956 (gcjh.pod): Removed.
2957 (gjnih.pod): Likewise.
2958 (GCJH_TARGET_INSTALL_NAME): Removed.
2959 (java/gjavah-jni.o): Removed.
2960 (java/gjavah.o): Likewise.
2961 * config-lang.in (stagestuff): Removed gjnih, gcjh.
2962 * gjavah.c: Removed.
2963
2964 2006-10-17 Tom Tromey <tromey@redhat.com>
2965
2966 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2967 "string" case.
2968
2969 2006-10-17 Tom Tromey <tromey@redhat.com>
2970
2971 * jvgenmain.c (main): Handle -findirect-dispatch.
2972 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2973 jvgenmain.
2974
2975 2006-10-06 Andrew Haley <aph@redhat.com>
2976
2977 * builtins.c (compareAndSwapInt_builtin): Check that we really do
2978 have a compare_and_swap builtin.
2979 (compareAndSwapLong_builtin): Likewise.
2980 (compareAndSwapObject_builtin): Likewise.
2981
2982 2006-10-04 Andrew Haley <aph@redhat.com>
2983
2984 * builtins.c (java_builtins): Add compareAndSwapInt,
2985 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2986 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2987 putObjectVolatile, getObjectVolatile, getIntVolatile,
2988 getLongVolatile, getLong.
2989 (UNMARSHAL3): New macro.
2990 (UNMARSHAL4): Likewise.
2991 (UNMARSHAL5): Likewise.
2992 (build_arglist_for_builtin): New function.
2993 (build_addr_sum, build_check_this): New functions.
2994 (putObject_builtin. compareAndSwapInt_builtin,
2995 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2996 putVolatile_builtin, getVolatile_builtin): New builtins.
2997
2998 2006-06-08 Andrew Haley <aph@redhat.com>
2999
3000 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
3001 get_symbol_table_index().
3002 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
3003 private method.
3004 (build_known_method_ref): New arg: special. Pass it to
3005 get_symbol_table_index.
3006 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
3007 the method list.
3008 (build_invokevirtual): New arg: special. Pass it to
3009 get_symbol_table_index.
3010 (expand_invoke): New variable: special.
3011 Pass it to maybe_rewrite_invocation().
3012 Pass it to build_known_method_ref().
3013 * class.c (build_symbol_entry): Add new arg: special. Use it to
3014 build the symbol table conbstructor.
3015 (emit_symbol_table): Extract SPECIAL from the method list and pass
3016 it to build_symbol_entry().
3017 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
3018 special accordingly.
3019
3020 2006-09-08 Andrew Haley <aph@redhat.com>
3021
3022 * class.c (layout_class_method): Use build_java_signature, not
3023 build_java_argument_signature. Use lookup_java_method, not
3024 lookup_argument_method.
3025
3026 2006-08-16 Jakub Jelinek <jakub@redhat.com>
3027 Bryce McKinlay <bryce@mckinlay.net.nz>
3028
3029 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
3030
3031 2006-07-18 Tom Tromey <tromey@redhat.com>
3032
3033 * lang.opt: Added missing -W options.
3034
3035 2006-07-12 Tom Tromey <tromey@redhat.com>
3036
3037 PR java/28329:
3038 * lang-specs.h: Pass '%U'-based options as separate arguments.
3039 Use -faux-classpath.
3040 * lang.c (java_handle_option): Handle OPT_faux_classpath.
3041 * lang.opt (faux-classpath): New option.
3042
3043 2006-07-07 Tom Tromey <tromey@redhat.com>
3044
3045 * class.c (make_class_data): Set value for reflection_data field.
3046 * decl.c (java_init_decl_processing): Add reflection_data field.
3047
3048 2006-07-07 Tom Tromey <tromey@redhat.com>
3049
3050 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
3051 earlier.
3052 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
3053
3054 2006-07-07 Andrew Haley <aph@redhat.com>
3055
3056 * jcf-parse.c (set_source_filename): Don't check for
3057 CLASS_FROM_CURRENTLY_COMPILED_P.
3058 Remove // comments.
3059
3060 2006-07-07 Andrew Haley <aph@redhat.com>
3061
3062 * java-tree.h (java_read_sourcefilenames): Declare.
3063 * lang.c (java_handle_option): Call java_read_sourcefilenames().
3064 * lang.opt (fsource-filename): New opt.
3065 * lang-specs.h: Add -fsource-filename.
3066 * jcf-parse.c (num_files, filenames): New variables.
3067 (reverse, cmpstringp, java_read_sourcefilenames,
3068 find_sourcefile): New.
3069 (set_source_filename): Call find_sourcefile to find the real name
3070 of a source file.
3071
3072 2006-06-27 Tom Tromey <tromey@redhat.com>
3073
3074 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
3075 Signature, LocalVariableTypeTable, annotation attributes.
3076 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
3077 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
3078 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
3079 (HANDLE_METHOD): Likewise.
3080 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
3081 (print_annotation): New function.
3082 (print_element_value): Likewise.
3083 (indent): Likewise.
3084 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
3085 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
3086 (print_parameter_annotations): New function.
3087 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
3088 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
3089 Likewise.
3090 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
3091 (print_annotations): New function.
3092
3093 2006-06-23 Tom Tromey <tromey@redhat.com>
3094
3095 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
3096 emitting class files, always use 1.5.
3097 * gcj.texi (Input Options): Document -fsource.
3098 (Code Generation): Document -ftarget.
3099
3100 2006-06-21 Tom Tromey <tromey@redhat.com>
3101
3102 PR java/28089:
3103 * expr.c (expand_java_field_op): Initialize field's declaring
3104 class.
3105
3106 2006-06-20 Tom Tromey <tromey@redhat.com>
3107
3108 * expr.c (push_value): Always flush quick stack.
3109
3110 2006-06-19 Tom Tromey <tromey@redhat.com>
3111
3112 * expr.c (push_value): Also flush quick stack if value is a
3113 component_ref.
3114
3115 2006-06-19 Tom Tromey <tromey@redhat.com>
3116
3117 * expr.c (push_value): Flush quick stack if value has side
3118 effects.
3119
3120 2006-06-13 Tom Tromey <tromey@redhat.com>
3121
3122 * class.c (is_compiled_class): Explicitly check for current
3123 class.
3124
3125 2006-06-09 Tom Tromey <tromey@redhat.com>
3126
3127 * gjavah.c (decompile_method): Don't decompile a static field
3128 accessor method.
3129
3130 2006-06-06 Tom Tromey <tromey@redhat.com>
3131
3132 * lang-specs.h <jc1>: Add .jar file to command line if
3133 -fsaw-java-file. Also, remove -ffilelist-file in this case.
3134
3135 2006-06-05 Tom Tromey <tromey@redhat.com>
3136
3137 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
3138 synthetic, enum, annotation.
3139 * jcf.h (ACC_BRIDGE): New macro.
3140 (ACC_VARARGS): Likewise.
3141 (ACC_SYNTHETIC): Likewise.
3142 (ACC_ENUM): Likewise.
3143 (ACC_ANNOTATION): Likewise.
3144
3145 2006-06-04 Tom Tromey <tromey@redhat.com>
3146
3147 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
3148 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
3149 and -ftarget.
3150 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
3151 when needed. Handle classpath-setting.
3152 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
3153 * lang-specs.h: Rewrote.
3154
3155 2006-06-04 Tom Tromey <tromey@redhat.com>
3156
3157 * jcf-io.c (find_class): Set source_ok to 0.
3158 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
3159 (parse_class_file): Don't call java_mark_class_local.
3160 (java_parse_file): Skip .java files. Call java_mark_class_local
3161 before lowering any code.
3162 (parse_zip_file_entries): Don't call duplicate_class_warning
3163 here.
3164 (process_zip_dir): ... call it here.
3165 * class.c (add_field): Don't mark field external if it is being
3166 compiled into this object.
3167 (make_class_data): Handle situation where class_dtable_decl is
3168 created before Class is compiled.
3169 (is_compiled_class): Don't assume files in zip are compiled into
3170 this object.
3171 (layout_class_method): Don't mark method external if it is being
3172 compiled into this object.
3173
3174 2006-06-04 Tom Tromey <tromey@redhat.com>
3175
3176 * jcf-path.c (jcf_path_compute): New function.
3177 * jcf.h (jcf_path_compute): Declare.
3178
3179 2006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3180
3181 * decl.c: Include langhooks.h.
3182 (builtin_function): Remove.
3183 (java_init_decl_processing): Replace calls to builtin_function
3184 with add_builtin_function.
3185 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
3186 (java/decl.o): Depend on langhooks.h.
3187 * java-tree.h (builtin_function): Remove.
3188
3189 2006-10-10 Brooks Moses <bmoses@stanford.edu>
3190
3191 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
3192
3193 2006-09-12 Tom Tromey <tromey@redhat.com>
3194
3195 * expr.c (push_value): Always flush quick stack.
3196
3197 2006-09-12 Tom Tromey <tromey@redhat.com>
3198
3199 PR java/29013:
3200 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
3201 the push of the called method's return result.
3202
3203 2006-09-12 Tom Tromey <tromey@redhat.com>
3204
3205 * jvspec.c (lang_specific_driver): Read spec file even if
3206 -fsyntax-only.
3207
3208 2006-09-12 Tom Tromey <tromey@redhat.com>
3209
3210 PR java/28754:
3211 * expr.c (expand_java_field_op): Initialize field's declaring
3212 interface if necessary.
3213
3214 2006-09-12 Tom Tromey <tromey@redhat.com>
3215
3216 PR java/28892:
3217 * expr.c (expand_java_field_op): No error for assignments not in
3218 class initializer or constructor.
3219
3220 2006-08-22 Andrew Haley <aph@redhat.com>
3221
3222 * decl.c (java_add_stmt): Give the statement list a type.
3223
3224 2006-08-16 Jakub Jelinek <jakub@redhat.com>
3225 Bryce McKinlay <bryce@mckinlay.net.nz>
3226
3227 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
3228
3229 2006-08-10 Simon Martin <simartin@users.sourceforge.net>
3230
3231 PR java/8923
3232 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
3233 or '--' is used with a constant operand.
3234 (java_complete_lhs): When processing a '++' or '--' expression,
3235 don't call java_complete_tree but java_complete_lhs, so that a
3236 static final variable operand is never replaced by its value. This
3237 avoids an ICE later on.
3238 (patch_unaryop): Fixed typo in comment.
3239
3240 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3241
3242 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
3243
3244 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
3245
3246 * builtins.c (check_for_builtin): If a builtin could result in a
3247 direct call being generated, don't use it if flag_indirect_dispatch
3248 is set.
3249
3250 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
3251
3252 * gcj.texi (Invocation): Corrections for Invocation API example.
3253
3254 2006-07-04 Andrew Haley <aph@redhat.com>
3255
3256 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
3257 entry.
3258
3259 2006-06-21 Andrew Haley <aph@redhat.com>
3260
3261 * java-tree.h (update_aliases): Remove
3262 * expr.c (expand_iinc): Remove call to update_aliases().
3263 (STORE_INTERNAL): Likewise.
3264 * decl.c (update_aliases, initialize_local_variable)
3265 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
3266
3267 2006-06-19 Andrew Haley <aph@redhat.com>
3268
3269 PR java/1305
3270 PR java/27908
3271 * expr.c (java_modify_addr_for_volatile): New function.
3272 (expand_java_field_op): Handle volatile fields.
3273 * java-gimplify.c (java_gimplify_component_ref): Call
3274 java_modify_addr_for_volatile to give the field_ref the correct
3275 volatile type.
3276 (java_gimplify_modify_expr): Likewise.
3277 * java-tree.h (java_modify_addr_for_volatile): New decl.
3278
3279 2006-06-17 Karl Berry <karl@gnu.org>
3280
3281 * gcj.texi (@dircategory): Use "Software development" instead
3282 of "Programming", following the Free Software Directory.
3283
3284 2006-06-16 Andrew Haley <aph@redhat.com>
3285
3286 * class.c (make_class_data): When using flag_indirect_classes,
3287 don't initialize the vtable of Class instances.
3288
3289 2006-06-09 Andrew Haley <aph@redhat.com>
3290
3291 PR java/1305
3292 PR java/27908
3293 * builtins.c (initialize_builtins): Add __sync_synchronize().
3294 * class.c (add_field): Mark volatile fields.
3295 * java-gimplify.c (java_gimplify_expr): Call new functions to
3296 handle self-modifying exprs and COMPONENT_REFs.
3297 (java_gimplify_component_ref): New.
3298 (java_gimplify_modify_expr): Add handling for volatiles.
3299
3300 2006-06-08 Tom Tromey <tromey@redhat.com>
3301
3302 * gcj.texi (libgcj Runtime Properties): Document
3303 gnu.gcj.user.realname.
3304
3305 2006-06-08 Andrew Haley <aph@redhat.com>
3306
3307 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
3308 get_symbol_table_index().
3309 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
3310 private method.
3311 (build_known_method_ref): New arg: special. Pass it to
3312 get_symbol_table_index.
3313 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
3314 the method list.
3315 (build_invokevirtual): New arg: special. Pass it to
3316 get_symbol_table_index.
3317 (expand_invoke): New variable: special.
3318 Pass it to maybe_rewrite_invocation().
3319 Pass it to build_known_method_ref().
3320 * class.c (build_symbol_entry): Add new arg: special. Use it to
3321 build the symbol table conbstructor.
3322 (emit_symbol_table): Extract SPECIAL from the method list and pass
3323 it to build_symbol_entry().
3324 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
3325 special accordingly.
3326
3327 2006-06-06 David Daney <ddaney@avtrex.com>
3328
3329 * gcj.texi (libgcj Runtime Properties): Document
3330 gnu.gcj.runtime.NameFinder.show_raw and
3331 gnu.gcj.runtime.NameFinder.remove_unknown.
3332
3333 2006-06-06 Tom Tromey <tromey@redhat.com>
3334
3335 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
3336 synthetic, enum, annotation.
3337 * jcf.h (ACC_BRIDGE): New macro.
3338 (ACC_VARARGS): Likewise.
3339 (ACC_SYNTHETIC): Likewise.
3340 (ACC_ENUM): Likewise.
3341 (ACC_ANNOTATION): Likewise.
3342
3343 2006-06-06 Mike Stump <mrs@apple.com>
3344
3345 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
3346 installing during build.
3347
3348 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
3349
3350 * gcj.texi (Extensions): Document the new gcj-dbtool-based
3351 classname-to-library resolution mechanism.
3352 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
3353 mechanism deprecated.
3354 (libgcj Runtime Properties): Document
3355 gnu.gcj.runtime.VMClassLoader.library_control's new default.
3356
3357 2006-05-29 Jakub Jelinek <jakub@redhat.com>
3358
3359 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
3360 bit wide type.
3361 (jword): Define to uint64 on 64-bit arches.
3362 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
3363
3364 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
3365
3366 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
3367 typos.
3368
3369 2006-05-26 Tom Tromey <tromey@redhat.com>
3370
3371 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
3372 * verify-glue.c (vfy_class_type): New function.
3373 * verify-impl.c (check_constant): Allow 'ldc class'.
3374 * verify.h (vfy_class_type): Declare.
3375
3376 2006-05-25 Andrew Haley <aph@redhat.com>
3377
3378 PR java/27756
3379 * decl.c (maybe_pushlevels): When variable ranges are non-nested
3380 update all lifetimes, not just the first one.
3381
3382 2006-05-24 Tom Tromey <tromey@redhat.com>
3383
3384 * java-tree.h: Fixed flag documentation.
3385
3386 2006-05-24 Tom Tromey <tromey@redhat.com>
3387
3388 PR libgcj/27729:
3389 * jcf.h (ACC_INVISIBLE): Changed value.
3390
3391 2006-05-24 Andrew Haley <aph@redhat.com>
3392
3393 PR java/27754
3394 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
3395 COMPOUND_EXPR.
3396
3397 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3398
3399 * lang.opt (femit-class-file): Remove VarExists.
3400
3401 2006-05-16 Tom Tromey <tromey@redhat.com>
3402
3403 * verify-impl.c (verify_instructions_0) <op_return>: Special case
3404 for Object.<init>.
3405
3406 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3407
3408 PR driver/26885
3409 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
3410 $(GCC_OBJS).
3411
3412 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
3413
3414 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
3415 (java/expr.o): Replace target.h with $(TARGET_H).
3416 (java/parse.o): Likewise.
3417
3418 2006-05-10 Andrew Haley <aph@redhat.com>
3419
3420 * class.c (emit_indirect_register_classes): Fix comment.
3421
3422 2006-05-04 Tom Tromey <tromey@redhat.com>
3423
3424 * java-tree.h (uses_jv_markobj_p): Declare.
3425 * class.c (uses_jv_markobj_p): Removed.
3426 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
3427 (get_boehm_type_descriptor): Use it.
3428 (uses_jv_markobj_p): Moved from class.c. Return bool.
3429
3430 2006-05-04 Tom Tromey <tromey@redhat.com>
3431
3432 * java-tree.def (THIS_EXPR): Now a tcc_expression.
3433
3434 2006-05-04 Andrew Haley <aph@redhat.com>
3435
3436 * class.c (make_field_value): Always build_address_of fdecl if
3437 there is an initializer.
3438
3439 2006-05-03 Andrew Haley <aph@redhat.com>
3440
3441 PR libgcj/27352
3442 * expr.c (maybe_rewrite_invocation): New function.
3443 (rewrite_arglist_getclass): Likewise.
3444 (rules): New.
3445 (expand_invoke): Call maybe_rewrite_invocation.
3446 * parse.y (patch_invoke): Likewise.
3447 * java-tree.h: (maybe_rewrite_invocation): New function.
3448
3449 2006-04-21 Andrew Haley <aph@redhat.com>
3450
3451 * lang.c (java_init): Handle flag_indirect_classes.
3452 * jvgenmain.c: Use "class$$" instead of "class$".
3453 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
3454 DECLs.
3455 (mangle_class_field): Special case "class$$" as well as "class$".
3456 * constants.c (build_ref_from_constant_pool): If
3457 flag_indirect_classes, generate a ref into the heap.
3458 * decl.c (constants_field_decl_node,
3459 constants_data_field_decl_node): New.
3460 * class.c (build_static_class_ref): New.
3461 (build_classdollar_field): Factor out from build_class_ref().
3462 (make_field_value): Handle static fields in heap.
3463 (make_class_data): Make sure we get a static ref to class.
3464 Make class initializer const if flag_indirect_classes.
3465 (register_class): Build a class_ref for initialization if
3466 flag_indirect_classes.
3467 (emit_indirect_register_classes): New.
3468
3469 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
3470
3471 * expr.c, gjavah.c: Fix comment typos.
3472
3473 2006-04-03 Andrew Haley <aph@redhat.com>
3474
3475 PR java/26858
3476 * expr.c (build_field_ref): Don't check the field offset if
3477 flag_syntax_only.
3478
3479 2006-03-30 Andrew Haley <aph@redhat.com>
3480
3481 PR java/26858
3482 * lang.c (java_attribute_table): New.
3483 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
3484 * expr.c (build_field_ref): Add a null pointer check for all
3485 fields of offset > 4k. Don't do so for accesses via the this
3486 pointer, which we know can never be null.
3487 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
3488 methods nonnull.
3489
3490 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
3491
3492 * Make-lang.in: Rename docdir to gcc_docdir.
3493
3494 2006-03-30 Tom Tromey <tromey@redhat.com>
3495
3496 PR java/26042:
3497 * parse.y (java_reorder_fields): Reset superclass field's size as
3498 well.
3499
3500 2006-03-28 Tom Tromey <tromey@redhat.com>
3501
3502 PR java/26390:
3503 * parse.y (find_most_specific_methods_list): Added 'class'
3504 argument.
3505 (lookup_method_invoke): Updated.
3506
3507 2006-03-15 Tom Tromey <tromey@redhat.com>
3508
3509 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
3510 non-static method calls.
3511
3512 2006-03-15 David Daney <ddaney@avtrex.com>
3513
3514 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
3515 declaration.
3516
3517 2006-03-15 David Daney <ddaney@avtrex.com>
3518
3519 * lang.opt (-freduced-reflection): New option.
3520 * lang.c (java_post_options): Generate an error if
3521 -freduced-reflection used with -fjni or -findirect-dispatch.
3522 * java-tree.h (flag_reduced_reflection): Declare new variable.
3523 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
3524 if bitmap overflows and flag_reduced_reflection set.
3525 * class.c (uses_jv_markobj_p): New function.
3526 (make_class_data): Moved generation of vtable to before
3527 reflection data, generate less reflection data if
3528 flag_reduced_reflection set.
3529 * gcj.texi: Document -freduced-reflection.
3530
3531 2006-03-15 Tom Tromey <tromey@redhat.com>
3532
3533 PR java/26638:
3534 * class.c (get_interface_method_index): Don't put <clinit> into
3535 interface table.
3536
3537 2006-03-15 Tom Tromey <tromey@redhat.com>
3538
3539 * parse.y (analyze_clinit_body): Ignore empty statements.
3540
3541 2006-03-08 David Daney <ddaney@avtrex.com>
3542
3543 * gcj.texi: Document -static-libgcj option.
3544
3545 2006-02-20 Andrew Haley <aph@redhat.com>
3546
3547 * jcf-parse.c (parse_class_file): Set input_location from
3548 current_class.
3549
3550 2006-02-15 Andrew Haley <aph@redhat.com>
3551
3552 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
3553 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
3554 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
3555
3556 2006-02-09 Andrew Haley <aph@redhat.com>
3557
3558 PR java/26192
3559 * expr.c (expand_invoke): Allow methods in arrays to be resolved
3560 in their superclass.
3561
3562 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
3563 array types.
3564
3565 2006-02-08 Tom Tromey <tromey@redhat.com>
3566
3567 PR java/22578:
3568 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
3569 * builtins.c (convert_real): New function.
3570 (java_builtins): Handle Float.intBitsToFloat,
3571 Float.floatToRawIntBits, Double.longBitsToDouble,
3572 Double.doubleToRawLongBits.
3573
3574 2006-02-07 Andrew Haley <aph@redhat.com>
3575
3576 * expr.c (expand_invoke): (BC mode.) If we find a method in a
3577 class other than the one in which we expected to find it, ignore
3578 the result.
3579
3580 PR java/25535
3581 * constants.c (build_constants_constructor): move initializer into
3582 first halfword on a 64-bit big-endian machine.
3583
3584 2006-02-04 Tom Tromey <tromey@redhat.com>
3585
3586 PR java/25676:
3587 * builtins.c (max_builtin): Skip floating point 'max'.
3588 (min_builtin): Skip floating point 'min'.
3589 (check_for_builtin): Never return NULL_TREE.
3590
3591 2006-02-04 Tom Tromey <tromey@redhat.com>
3592
3593 PR java/26097:
3594 * expr.c (push_type): Avoid side effect in gcc_assert.
3595
3596 2006-02-04 Roger Sayle <roger@eyesopen.com>
3597
3598 * decl.c (java_init_decl_processing): Create char_type_node as a
3599 regular INTEGER_TYPE node.
3600 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
3601 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
3602 test for char_type_node and promoted_char_type_node as special
3603 instances of INTEGER_TYPE tree codes.
3604 (promote_type,build_java_signature): Likewise.
3605 * jcf-write.c (adjust_typed_op): Likewise.
3606 * mangle.c (mangle_type): Likewise.
3607 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
3608 * parse.h (JINTEGRAL_TYPE_P): Likewise.
3609
3610 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
3611
3612 * expr.c (java_stack_swap): Revert gcc_assert patch.
3613
3614 2006-02-03 Ben Elliston <bje@au.ibm.com>
3615
3616 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
3617 * typeck.c: Likewise.
3618 * verify-impl.c: Likewise.
3619 * class.c: Likewise.
3620 * decl.c: Likewise.
3621 * jcf-parse.c: Likewise.
3622 * constants.c: Likewise.
3623 * check-init.c: Likewise.
3624 * jcf-write.c: Likewise.
3625 * verify-glue.c: Likewise.
3626 * mangle.c: Likewise.
3627 * expr.c: Likewise.
3628 * lang.c: Likewise.
3629 * boehm.c: Likewise.
3630
3631 2006-02-01 Jan Hubicka <jh@suse.cz>
3632
3633 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
3634 * lang.c (java_init_options): Set no_unit_at_a_time_default.
3635
3636 2006-01-30 Andrew Haley <aph@redhat.com>
3637
3638 PR java/21428
3639 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
3640
3641 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
3642
3643 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
3644 Update copyright notice dates.
3645
3646 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3647
3648 * jvspec.c (lang_specific_spec_functions): Remove.
3649
3650 2006-01-06 Tom Tromey <tromey@redhat.com>
3651
3652 * gcj.texi (Arrays): Added more documentation for
3653 JvNewObjectArray.
3654 (Primitive types): Correct information about primitive classes.
3655 (Reference types): New node.
3656 (Index): New node.
3657
3658 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
3659
3660 * jcf-parse.c (set_source_filename): Set the decl source location
3661 even when returning early.
3662
3663 2005-12-15 Tom Tromey <tromey@redhat.com>
3664 Andrew Haley <aph@redhat.com>
3665
3666 PR java/25429
3667 * parse.y (resolve_expression_name): Don't generate accessor
3668 methods for constant fields.
3669
3670 2005-12-13 Andrew Haley <aph@redhat.com>
3671
3672 PR java/25366
3673 PR java/25368
3674 * class.c (maybe_layout_super_class): Update current_class before
3675 calling do_resolve_class.
3676
3677 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
3678
3679 PR java/25330
3680 * jcf-write.c (write_classfile): Use PID in temporary class
3681 file. Save/restore errno when reporting error.
3682
3683 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
3684
3685 PR java/9861
3686 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
3687 to bare_function_type and including the return type
3688 * builtins.c (initialize_builtins) : Change builtin mangled name
3689 constants to conform to new mangling scheme
3690
3691 2005-12-08 Andrew Haley <aph@redhat.com>
3692
3693 PR libgcj/25265
3694 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
3695 (soft_abstractmethod_node): New.
3696 * expr.c (build_field_ref): Add in-line check for missing field.
3697 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
3698
3699 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3700
3701 * Make-lang.in (java.all.build, java.install-normal): Remove.
3702
3703 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
3704
3705 * Make-lang.in: Remove all dependencies on s-gtype, except for
3706 gt-java-parse.h.
3707
3708 2005-12-07 Richard Sandiford <richard@codesourcery.com>
3709
3710 * class.c (build_utf8_ref, emit_register_classes): Use
3711 switch_to_section and get_section.
3712
3713 2005-12-06 Tom Tromey <tromey@redhat.com>
3714
3715 PR java/25283:
3716 * parse.y (patch_new_array_init): Revert previous patch.
3717 (lookup_method_invoke): Use size-less array type when creating an
3718 anonymous constructor.
3719
3720 2005-12-05 Tom Tromey <tromey@redhat.com>
3721
3722 * parse.y (patch_new_array_init): Don't set length on array.
3723
3724 2005-12-02 Richard Guenther <rguenther@suse.de>
3725
3726 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
3727 buildN instead of build.
3728 * class.c (finish_class): Likewise.
3729 * expr.c (java_create_object): Likewise.
3730
3731 2005-11-28 Tom Tromey <tromey@redhat.com>
3732
3733 PR java/18278:
3734 * expr.c (build_jni_stub): Unwrap the return value.
3735 * java-tree.h (soft_unwrapjni_node): New define.
3736 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
3737 * decl.c (java_init_decl_processing): Initialize
3738 soft_unwrapjni_node.
3739
3740 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
3741
3742 * gcj.texi (gij options): Add -Xss documentation.
3743
3744 2005-11-08 Wil Mahan <wmahan@gmail.com>
3745
3746 PR java/23617
3747 * zextract.c (read_zip_archive): Fix out of memory error when
3748 reading jar files with zip-style comments.
3749
3750 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
3751
3752 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
3753 formats.
3754 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
3755
3756 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
3757 Wil Mahan <wmahan@gmail.com>
3758
3759 PR java/23620
3760 * class.c (make_class): Create empty binfo here.
3761 (set_super_info): Only create binfo if we have superclasses.
3762
3763 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
3764
3765 PR java/24127
3766 * parse.y (method_header): Make the result of the rule a NULL_TREE
3767 when a parsing error occurs.
3768
3769 2005-09-29 Tom Tromey <tromey@redhat.com>
3770
3771 PR java/24120:
3772 * jcf-io.c (memoized_dirlist_hash): New function.
3773 (caching_stat): Use it.
3774
3775 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
3776
3777 PR java/21418
3778 * class.c (inherits_from_p): Try to lay out super class
3779 if it is not already laid out.
3780 (maybe_layout_super_class): Handle the case where SUPER_CLASS
3781 is a NULL_TREE.
3782
3783 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
3784
3785 * builtins.c (max_builtin, min_builtin, abs_builtin,
3786 java_build_function_call_expr): Use fold_buildN.
3787 * class.c (layout_class_method): Likewise.
3788 * expr.c (java_truthvalue_conversion, build_java_jsr,
3789 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3790 build_java_binop, build_field_ref, expand_compare,
3791 build_known_method_ref, build_invokevirtual,
3792 process_jvm_instruction): Likewise.
3793 * parse.y (patch_binop, patch_exit_expr): Likewise.
3794 * typeck.c (convert_ieee_real_to_integer): Likewise.
3795 (convert): Don't call fold after convert_ieee_real_to_integer.
3796
3797 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
3798
3799 PR java/23891
3800 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3801 the newly created type. Set import lists here, not in create_class.
3802 (jdep_resolve_class): Set current_class.
3803 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
3804 the current package context, not ctxp->package.
3805 (cicp_cache): Removed.
3806 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3807 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3808 * java-tree.h (TYPE_PACKAGE): New macro.
3809 (struct lang_type): New member 'package'.
3810
3811 2005-09-09 Andrew Haley <aph@redhat.com>
3812
3813 PR libgcj/23182
3814 * expr.c (pop_type_0): If the expected type is object or ptr
3815 (i.e. void*), return the type of the object we just popped from
3816 the stack.
3817
3818 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
3819
3820 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3821 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3822
3823 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
3824
3825 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3826 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3827 typos. Follow spelling conventions.
3828
3829 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
3830
3831 PR java/23431
3832 * typeck.c (lookup_do): Look up interfaces for the original class,
3833 not the base class.
3834 * parse.y (java_check_regular_methods): Fix diagnostic message for
3835 more restrictive overriding of a method from an interface.
3836
3837 2005-08-16 Tom Tromey <tromey@redhat.com>
3838
3839 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3840 class' initial state.
3841
3842 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3843
3844 PR java/22113
3845 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3846 `literal_token' for large numeric input tokens.
3847
3848 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3849
3850 PR java/19870
3851 * parse.y (nested_field_access_p): Rename to nested_member_access_p
3852 and expand to handle method accesses across nested classes.
3853 (build_outer_method_access_method): Rename to
3854 build_nested_method_access_method. Minor adjustments to comments.
3855 (resolve_expression_name): Use the newly-renamed
3856 nested_member_access_p method.
3857 (resolve_qualified_expression_name): Likewise.
3858 (patch_method_invocation): Also consider static methods for access
3859 method generation. Minor adjustments to comments.
3860 (maybe_use_access_method): Use the more general
3861 nested_memeber_access_p to determine access across nested class
3862 boundaries. Allow THIS_ARG to be NULL (for static methods).
3863
3864 2005-08-15 Tom Tromey <tromey@redhat.com>
3865
3866 PR java/23300.
3867 * expr.c (build_field_ref): Don't generate otable reference when
3868 DECL_FIELD_OFFSET is 0.
3869 * class.c (maybe_layout_super_class): Pass outer class to
3870 do_resolve_class.
3871
3872 2005-08-15 Tom Tromey <tromey@redhat.com>
3873
3874 * java-tree.h (LABEL_IN_SUBR): Removed.
3875 (LABEL_IN_SUBR): Likewise.
3876 (LABEL_IS_SUBR_START): Likewise.
3877 (LABEL_SUBR_START): Likewise.
3878 (LABEL_SUBR_CONTEXT): Likewise.
3879 (LABEL_CHANGED): Likewise.
3880 (LABEL_RETURN_LABEL): Likewise.
3881 (LABEL_RETURN_TYPE_STATE): Likewise.
3882 (LABEL_RETURN_LABELS): Likewise.
3883 (RETURN_MAP_ADJUSTED): Likewise.
3884 (LABEL_PENDING_CHAIN): Likewise.
3885
3886 2005-08-15 Tom Tromey <tromey@redhat.com>
3887
3888 * Make-lang.in (JAVA_OBJS): Removed verify.o
3889 (java/verify.o): Removed.
3890 * verify.c: Removed.
3891 * lang.c (flag_new_verifier): Removed.
3892 (java_post_options): Updated.
3893 * java-tree.h (flag_new_verifier): Removed.
3894 (verify_jvm_instructions): Removed.
3895 * expr.c (pop_type_0): Assume flag_new_verifier is true.
3896 (build_java_check_indexed_type): Likewise.
3897 (expand_java_arraystore): Likewise.
3898 (expand_java_arrayload): Likewise.
3899 (pop_arguments): Likewise.
3900 (expand_byte_code): Likewise.
3901 (process_jvm_instruction): Likewise.
3902
3903 2005-08-10 Andrew Haley <aph@redhat.com>
3904
3905 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3906 type mismatches to make legal GIMPLE.
3907
3908 2005-08-10 Robin Green <greenrd@greenrd.org>
3909
3910 PR java/23230:
3911 * parse.y (maybe_use_access_method): Generalize check from
3912 java.lang.Object to any superclass of current_class
3913
3914 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
3915
3916 * class.c (build_class_ref): Wrap the primary class type in a
3917 NOP_EXPR.
3918 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3919 primary class type from the NOP_EXPR in which it was placed.
3920
3921 2005-07-28 Diego Novillo <dnovillo@redhat.com>
3922
3923 * expr.c (expand_load_internal): Fix missing parens in
3924 predicate.
3925
3926 2005-07-28 Andrew Haley <aph@redhat.com>
3927
3928 * expr.c (expand_load_internal): Convert to destination type.
3929
3930 2005-07-22 Manfred Hollstein <mh@suse.com>
3931
3932 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3933 (check_constant): Likewise.
3934 (check_wide_constant): Likewise.
3935
3936 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
3937
3938 Make CONSTRUCTOR use VEC to store initializers.
3939 * check-init.c (check_init): Update to cope with VEC in
3940 CONSTRUCTOR_ELTS.
3941 * class.c (make_field_value, make_method_value, get_dispatch_table,
3942 make_class_data, emit_symbol_table, emit_catch_table,
3943 emit_assertion_table): Use build_constructor_from_list instead of
3944 build_constructor.
3945 * constants.c (build_constants_constructor): Likewise.
3946 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3947 VEC in CONSTRUCTOR_ELTS.
3948 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3949 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3950 of a TREE_LIST.
3951 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3952 CONSTRUCTOR_ELTS.
3953 * parse.y (build_new_array_init): Use build_constructor_from_list
3954 instead of build_constructor.
3955 (patch_new_array_init): Update to cope with VEC in
3956 CONSTRUCTOR_ELTS.
3957 (array_constructor_check_entry): Likewise.
3958
3959 2005-07-12 Tom Tromey <tromey@redhat.com>
3960
3961 * jvspec.c (lang_specific_driver): Put filelist_filename first on
3962 command line.
3963
3964 2005-07-12 Tom Tromey <tromey@redhat.com>
3965
3966 PR java/19674:
3967 * parse-scan.y (interface_member_declaration): Added
3968 empty_statement.
3969
3970 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
3971
3972 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3973 (LABEL_PENDING_CHAIN): Ditto.
3974 (LABEL_PC): Ditto.
3975 (DECL_BIT_INDEX): Ditto.
3976
3977 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3978
3979 PR java/18119
3980 * parse.y (inner_class_accessible): New function. Logic moved from
3981 check_inner_class_access.
3982 (check_inner_class_access): Use inner_class_accessible.
3983 (resolve_inner_class): Simplify arguments. Create circularity hash
3984 here. Keep looking for classes if we found one that was inaccessible.
3985 Return the inaccessible class only if there is no other match.
3986 (do_resolve_class): Update for new resolve_inner_class arguments.
3987 Don't create circularity_hash here.
3988
3989 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3990
3991 PR java/21045
3992 * parse.y (add_exception_to_throws): New function.
3993 (purge_unchecked_exceptions): Removed.
3994 (get_constructor_super): Renamed from verify_constructor_super. Now
3995 returns the super constructor after verification.
3996 (java_complete_expand_method): Don't use purge_unchecked_exceptions
3997 or save/restore the exception list.
3998 (check_thrown_exceptions): Add uncaught exceptions in anonymous
3999 class initializers and constructors to the throws clause of the method.
4000
4001 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
4002
4003 PR java/19674
4004 * parse.y (interface_member_declaration): Allow empty statements in
4005 interface declarations.
4006
4007 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
4008
4009 * Makefile.in (parse.o): Adjust dependencies.
4010 * parse.y: Include tree-dump.h.
4011
4012 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
4013
4014 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
4015 flag for quoting.
4016
4017 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
4018
4019 * parse.y (issue_warning_error_from_context): Call
4020 pp_output_formatted_text to be able to get the buffer.
4021
4022 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
4023
4024 * parse.y (issue_warning_error_from_context): Update for the
4025 renaming of pp_format_text to pp_format.
4026
4027 2005-06-28 Paul Brook <paul@codesourcery.com>
4028
4029 * decl.c (java_init_decl_processing): Call
4030 default_init_unwind_resume_libfunc.
4031
4032 2005-06-27 Tom Tromey <tromey@redhat.com>
4033
4034 PR java/21540, PR java/13788:
4035 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
4036 fold_constant_for_init.
4037 (patch_binop): Added 'folding' argument. Updated all callers.
4038 (patch_unaryop) <NOP_EXPR>: New case.
4039 (fold_constant_for_init) <NOP_EXPR>: Likewise.
4040 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
4041
4042 2005-06-25 Jan Hubicka <jh@suse.cz>
4043
4044 * builtins.c (define_builtin): Accept new flags parameter.
4045 (initialize_builtins): Mark the builtins const and nothrow accordingly.
4046
4047 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
4048
4049 * all files: Update FSF address in copyright headers.
4050
4051 2005-06-24 Tom Tromey <tromey@redhat.com>
4052
4053 * verify-impl.c (verify_instructions_0): Correctly handle
4054 situation where PC falls off end.
4055
4056 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
4057
4058 PR java/20697
4059 * parse.y (find_most_specific_methods_list): Remove special case for
4060 inner classes.
4061
4062 2005-06-15 Tom Tromey <tromey@redhat.com>
4063
4064 PR libgcj/21906:
4065 * class.c (make_method_value): Use soft_abstractmethod_node for
4066 abstract method.
4067 * java-tree.h (soft_abstractmethod_node): New define.
4068 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
4069 * decl.c (java_init_decl_processing): Initialize
4070 soft_abstractmethod_node.
4071
4072 2005-06-13 Geoffrey Keating <geoffk@apple.com>
4073
4074 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
4075
4076 2005-06-13 Per Bothner <per@bothner.com>
4077
4078 * expr.c (int highest_label_pc_this_method,
4079 start_label_pc_this_method): New globals.
4080 (lookup_label): Add start_label_pc_this_method to pc for label, and
4081 update highest_label_pc_this_method. This prevents conflicts between
4082 labels from different methods.
4083 * java-tree.h: Declare new globals.
4084 * jcf-parse.c (parse_class_file): If needed bump
4085 start_label_pc_this_method and reset highest_label_pc_this_method.
4086
4087 2005-06-13 Tom Tromey <tromey@redhat.com>
4088
4089 PR java/21844:
4090 * parse.y (nested_field_access_p): Handle case where outer field
4091 is inherited by enclosing class.
4092
4093 2005-06-12 Per Bothner <per@bothner.com>
4094
4095 * class.c (inherits_from_p): Do load_class if needed.
4096
4097 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4098
4099 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
4100 * java-tree.h (parse_error_context): Move...
4101 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
4102 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
4103 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
4104
4105 2005-06-08 Roger Sayle <roger@eyesopen.com>
4106
4107 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
4108
4109 2005-06-06 Jakub Jelinek <jakub@redhat.com>
4110
4111 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
4112 msgid for argument name.
4113 * gjavah.c (error): Likewise.
4114 * java-tree.h (parse_error_context): Likewise.
4115 * parse.y (parse_error_context, parse_warning_context,
4116 issue_warning_error_from_context): Likewise.
4117
4118 2005-06-01 Tom Tromey <tromey@redhat.com>
4119
4120 PR java/21722:
4121 * class.c (build_static_field_ref): Don't fold constant fields if
4122 current class is from a .class file and we're using indirect
4123 dispatch.
4124
4125 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4126
4127 * java/verify-glue.c: Don't include errors.h and include toplev.h.
4128 * java/Make-lang.in: Updates dependencies.
4129
4130 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
4131
4132 PR java/19870.
4133 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
4134 NESTED_FIELD_ACCESS_IDENTIFIER_P.
4135 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
4136 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
4137 * jcf-write.c (generate_classfile): Use
4138 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
4139 OUTER_FIELD_ACCESS_IDENTIFIER_P.
4140 * parse.y (build_outer_field_access): Rename to
4141 build_nested_field_access. Support static fields and outer-to-inner
4142 class accesses.
4143 (outer_field_access_p): Rename to nested_field_access_p. Support
4144 static fields and generalise to outer-to-inner class and sibling
4145 inner class accesses.
4146 (outer_field_expanded_access_p): Rename to
4147 nested_field_expanded_access_p and support static fields.
4148 (outer_field_access_fix): Rename to nested_field_access_fix and
4149 support static fields.
4150 (build_outer_field_access_expr): Rename to
4151 build_nested_field_access_expr and support static fields.
4152 (build_outer_field_access_methods): Rename to
4153 build_nested_field_access_methods and support static fields. For
4154 static fields, generate accessors without class instance parameters.
4155 (build_outer_field_access_method): Rename to
4156 build_nested_field_access_method and support static fields.
4157 (build_outer_method_access_method): Use
4158 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
4159 OUTER_FIELD_ACCESS_IDENTIFIER_P.
4160 (resolve_expression_name): Consider static field accesses across
4161 nested classes.
4162 (resolve_qualified_expression_name): Likewise.
4163 (java_complete_lhs): Use nested_field_access_fix instead of
4164 outer_field_access_fix.
4165 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
4166 Use nested_field_expanded_access_p instead of
4167 outer_field_expanded_access_p. Use nested_field_access_fix instead
4168 of outer_field_access_fix.
4169 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
4170 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
4171
4172 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
4173
4174 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
4175 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
4176 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
4177 MINOR_BINARYCOMPAT_ABI_VERSION): New.
4178 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
4179 (parse_version): Calculate version ID using new method. Use bit-flags
4180 for flag_indirect_dispatch and flag_bootstrap_classes.
4181
4182 2005-05-25 Richard Henderson <rth@redhat.com>
4183
4184 PR libgcj/21692
4185 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
4186 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
4187 DECL_CONTEXT; avoid pushdecl_top_level.
4188 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
4189 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
4190 (layout_class_method): Likewise.
4191 * decl.c (java_mark_cni_decl_local): New.
4192 (java_mark_class_local): Use it.
4193 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
4194 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
4195 (struct lang_decl_func): Add local_cni;
4196 (struct lang_decl_var): Add class_field, vtable.
4197 (java_mangle_decl): Declare.
4198 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
4199 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
4200 (mangle_obstack_1): New.
4201 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
4202 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
4203 lhd_set_decl_assembler_name for things that don't need mangling.
4204 (mangle_class_field): Rename from java_mangle_class_field, make
4205 static, don't call init_mangling or finish_mangling.
4206 (mangle_vtable): Similarly.
4207 (mangle_local_cni_method_decl): New.
4208 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
4209 gcc_assert, and MANGLE_RAW_STRING.
4210 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
4211
4212 2005-05-25 DJ Delorie <dj@redhat.com>
4213
4214 * class.c (set_constant_value): Move warning control from if() to
4215 warning(OPT_*).
4216
4217 2005-05-24 Richard Henderson <rth@redhat.com>
4218
4219 * builtins.c (define_builtin): Don't call make_decl_rtl.
4220 * constants.c (build_constant_data_ref): Likewise.
4221 * class.c (build_utf8_ref): Likewise.
4222 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
4223 (get_dispatch_table, layout_class_method): Likewise.
4224 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
4225 by hand.
4226 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
4227 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
4228 to determine if we need a non-zero address.
4229 * decl.c (builtin_function): Don't call make_decl_rtl.
4230 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
4231 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
4232 * resource.c (compile_resource_data): Likewise.
4233 * parse.y (resolve_field_access): Re-word comment to avoid
4234 building DECL_RTL.
4235
4236 2005-05-24 Richard Henderson <rth@redhat.com>
4237
4238 * class.c (registered_class): Take it out of class_roots; turn into
4239 a vec of trees.
4240 (register_class): Make static. Don't duplicate decl node. Use
4241 VEC_safe_push.
4242 (emit_register_classes): Use VEC_iterate. Use output_constant
4243 instead of assemble_integer. Don't call mark_decl_referenced
4244 directly.
4245 * java-tree.h (register_class): Remove decl.
4246
4247 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
4248
4249 PR java/17845
4250
4251 * parse.y (register_package, package_list): Remove.
4252 (package_declaration): Do not call register_package.
4253 (do_resolve_class): Do not use package_list.
4254
4255 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
4256
4257 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
4258 unused variable.
4259
4260 2005-05-15 Tom Tromey <tromey@redhat.com>
4261
4262 PR java/21519:
4263 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
4264 NOTE_PUSH.
4265
4266 2005-05-12 Aaron Luchko <aluchko@redhat.com>
4267
4268 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
4269
4270 2005-05-11 Tom Tromey <tromey@redhat.com>
4271
4272 * gcj.texi (Code Generation): Document -fbootstrap-classes.
4273 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
4274 (parse_version): Use it.
4275 * lang.opt (-fbootstrap-classes): New option.
4276
4277 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
4278
4279 PR java/21436
4280 * class.c (maybe_layout_super_class): Look for imports in this_class.
4281 * parse.h (ctxp_for_generation_last): New.
4282 (do_resolve_class): Add a parameter.
4283 * parse.y (ctxp_for_generation_last): New.
4284 (java_pop_parser_context): Add at end of list.
4285 (find_in_imports, find_in_imports_on_demand): Look in ctxp
4286 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
4287 the given type are NULL.
4288 (do_resolve_class): Look into the imports of the new second parameter.
4289 Adjust recursive calls.
4290 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
4291 calls to do_resolve_class.
4292 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
4293 (java_complete_class): Do not do that here.
4294
4295 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
4296
4297 PR java/20309
4298 * Make-lang.in (java): Add gjnih.
4299 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
4300 (GJNIH_OBJS): New variable.
4301 (gjnih$(exeext)): New target.
4302 (JAVA_MANFILES): Add gjnih.1.
4303 (java.uninstall): Add gjnih.1.
4304 (java.mostlyclean): Add gjnih.
4305 (java.maintainer-clean): Add gjnih.1.
4306 (java/gjavah-jni.o): New target.
4307 (.INTERMEDIATE): Add gjnih.pod.
4308 (gjnih.pod): New target.
4309 * config-lang.in (stagestuff): Add gjnih.
4310 * gcj.texi (Top): Add gjnih node.
4311 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
4312 -bootclasspath options.
4313 (Invoking gjnih): New node.
4314 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
4315 (TOOLNAME): New macro.
4316 (error): Replace hard-coded gcjh with TOOLNAME.
4317 (process_file): Likewise.
4318 (usage): Likewise.
4319 (version): Likewise.
4320 (help): Likewise. Add help output for -force, -old, -trace and -J
4321 options.
4322 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
4323 (options): Add force, old, trace and J fields.
4324 (main): Handle -force, -old, -trace and -J options.
4325
4326 2005-05-03 Tom Tromey <tromey@redhat.com>
4327
4328 PR java/21245:
4329 * gjavah.c (main): Unlink output file on error.
4330
4331 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
4332
4333 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
4334 copyright.
4335
4336 2005-04-29 Tom Tromey <tromey@redhat.com>
4337
4338 * expr.c (build_jni_stub): Updated for change to build_block.
4339
4340 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
4341
4342 * expr.c (force_evaluation_order): Declare 'saved' earlier.
4343
4344 2005-04-28 Andrew Haley <aph@redhat.com>
4345
4346 PR java/19285
4347 * java-tree.h (soft_resolvepoolentry_node): New.
4348 (alloc_constant_fieldref): Declare.
4349 * expr.c (expand_java_field_op): Don't call class_init for
4350 accesses to static fields with indirect dispatch.
4351 * builtins.c (initialize_builtins): Add "__builtin_expect".
4352 * decl.c (soft_resolvepoolentry_node): New variable.
4353 (java_init_decl_processing): Create a decl for
4354 "_Jv_ResolvePoolEntry".
4355 * class.c (build_fieldref_cache_entry): New function.
4356 (build_static_field_ref): Rewrite for indirect dispatch.
4357 * constants.c (find_name_and_type_constant_tree): New function.
4358 (alloc_constant_fieldref): Likewise.
4359 (build_constants_constructor): Handle CONSTANT_Fieldref and
4360 CONSTANT_NameAndType.
4361
4362 PR java/21115
4363 * expr.c (force_evaluation_order): Convert outgoing args smaller
4364 than integer.
4365
4366 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
4367
4368 * gcj.texi (libgcj Runtime Properties): Remove obsolete
4369 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
4370 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
4371
4372 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4373
4374 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
4375 to `unlock_stream' with `unlock_std_streams'.
4376
4377 2005-04-25 Jakub Jelinek <jakub@redhat.com>
4378
4379 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
4380 instead of just expr.h.
4381
4382 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4383
4384 * gjavah.c (main): Unlock the stdio streams.
4385 * jcf-dump.c (main): Likewise.
4386 * jv-scan.c (main): Likewise.
4387 * jvgenmain.c (main): Likewise.
4388
4389 2005-04-23 DJ Delorie <dj@redhat.com>
4390
4391 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
4392 parse.y: Adjust warning() callers.
4393
4394 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
4395
4396 * gcj.texi (Object fields): Change "Integer" to "Int" in example
4397 contructor.
4398
4399 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
4400
4401 * gcj.texi: Fix typos and bogus example.
4402
4403 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
4404
4405 * except.c: Fix a comment typo.
4406
4407 2005-04-19 Julian Brown <julian@codesourcery.com>
4408
4409 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
4410 indirect dispatch with PIC.
4411
4412 2005-04-18 Andrew Haley <aph@redhat.com>
4413
4414 * java-except.h (struct eh_range.handler): Remove unused field.
4415 (handle_nested_ranges): Remove function declaration.
4416 (sanity_check_exception_range): Add function declaration.
4417 * verify.c (verify_jvm_instructions): Remove call to
4418 handle_nested_ranges.
4419 * verify-glue.c (verify_jvm_instructions_new): Call
4420 sanity_check_exception_range.
4421 * except.c (link_handler, eh_range_freelist, link_handler,
4422 handle_nested_ranges): Remove.
4423 (add_handler): Rewrite.
4424 (sanity_check_exception_range): New function.
4425 (print_ranges): New function.
4426
4427 2005-04-13 Julian Brown <julian@codesourcery.com>
4428
4429 * decl.c (finish_method): Give methods once-only linkage.
4430
4431 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
4432
4433 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
4434
4435 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4436
4437 * java-tree.h: Don't use PARAMS().
4438
4439 2005-04-07 Per Bothner <per@bothner.com>
4440
4441 * class.c (push_class): By default, suppress debug output.
4442 (finish_class): Enable debug output for classes we're emitting.
4443
4444 2005-04-07 Andrew Haley <aph@redhat.com>
4445
4446 * gcj.texi: Correct gcj-dbtool instructions.
4447
4448 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
4449
4450 * gcj.texi: Fix a typo.
4451 * lang.c: Fix a comment typo.
4452
4453 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
4454
4455 * gcj.texi (Invoking gij): Add descriptions of new -X options.
4456 Mention recognized-and-ignored compatibility options.
4457 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
4458 JvFree.
4459 (About CNI): Add Memory allocation section.
4460
4461 2005-04-01 Tom Tromey <tromey@redhat.com>
4462
4463 * decl.c (java_init_decl_processing): Fix types of
4464 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
4465 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
4466 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
4467
4468 2005-03-31 Jan Hubicka <jh@suse.cz>
4469
4470 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
4471 * class.c: Include cgraph.h
4472 (make_local_functoin_alias): Mark aslias as needed.
4473 * resource.c: Include cgraph.h
4474 (compile_resource_data): Go via cgraph interface.
4475
4476 2005-03-30 Ian Lance Taylor <ian@airs.com>
4477
4478 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
4479
4480 2005-03-30 Tom Tromey <tromey@redhat.com>
4481
4482 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
4483 inner_class_info_index==0 or outer_class_info_index==0.
4484
4485 2005-03-29 Tom Tromey <tromey@redhat.com>
4486
4487 * gcj.texi (libgcj Runtime Properties): Document
4488 gnu.gcj.runtime.endorsed.dirs.
4489
4490 2005-03-24 Anthony Green <green@redhat.com>
4491
4492 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
4493 'gcj-dbtool -p'.
4494
4495 2005-03-23 Tom Tromey <tromey@redhat.com>
4496
4497 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
4498 (parse_version): Use it.
4499
4500 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
4501
4502 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
4503
4504 2005-03-18 Andrew Haley <aph@redhat.com>
4505
4506 PR java/20522
4507 * decl.c (update_aliases): Don't update variables that are about
4508 to die.
4509 (maybe_poplevels): Add comment.
4510
4511 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
4512
4513 PR java/20502
4514 * jcf-parse.c (duplicate_class_warning): New function.
4515 (java_parse_file): Call duplicate_class_warning if
4516 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
4517 (parse_zip_file_entries): Likewise. Also set
4518 CLASS_FROM_CURRENTLY_COMPILED_P.
4519
4520 2005-03-16 Andrew Haley <aph@redhat.com>
4521
4522 * expr.c (expand_java_arrayload): Don't generate a
4523 NullPointerException based on the type of the node.
4524 (build_java_array_length_access): Likewise.
4525
4526 2005-03-15 Zack Weinberg <zack@codesourcery.com>
4527
4528 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
4529
4530 2005-03-11 Tom Tromey <tromey@redhat.com>
4531
4532 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
4533 (libgcj Runtime Properties): Document the default .db.
4534
4535 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
4536
4537 PR java/20312
4538 * parse.y (checks_throws_clauses): Check exceptions list even when
4539 the base class does not come from a source file being compiled.
4540 (java_complete_lhs): Remove unused variable 'wfl'.
4541
4542 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
4543
4544 PR java/20338
4545 * decl.c (finish_method): Emit _Jv_InitClass for private static
4546 methods inside inner classes as well.
4547
4548 2005-03-08 Julian Brown <julian@codesourcery.com>
4549 * Revert patch from 2005-03-08 for causing bootstrap failure on
4550 ppc-darwin.
4551
4552 2005-03-08 Julian Brown <julian@codesourcery.com>
4553
4554 * decl.c (finish_method): Give methods once-only linkage.
4555
4556 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
4557
4558 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
4559
4560 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
4561
4562 * verify-glue.c (vfy_is_assignable_from): Perform static check using
4563 can_widen_reference_to if the C++ ABI is in use.
4564 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
4565 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
4566 type_isresolved, init_state, set_pc, state_get_pc,
4567 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
4568 (verify_fail): Report the current PC from the verifier context.
4569 (free_state): Remove #if 0 block to enable this function.
4570 (free_verifier_context): Call free_state on state_list iterator
4571 values before freeing them.
4572 * expr.c (pop_type_0): Pop correct type for error message when stack
4573 contains a multi-word type.
4574
4575 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
4576
4577 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
4578 for known NULL array length access.
4579
4580 2005-03-07 Tom Tromey <tromey@redhat.com>
4581
4582 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
4583
4584 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
4585
4586 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
4587 typeck.c: Update copyright.
4588
4589 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
4590
4591 Remove xref code.
4592 * xref.c, xref.h: Remove file.
4593 * Make-lang.in (java/xref.o): Remove.
4594 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
4595 * lang.c (flag_emit_xref): Remove definition.
4596 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
4597 * typeck.c (convert): Remove use of do_not_fold.
4598 * parse.y (do_not_fold): Remove definition.
4599 (parser grammar): Remove xref code.
4600 (maybe_create_class_interface_decl, create_class): Likewise.
4601 (register_fields, method_header, finish_method_declaration): Likewise.
4602 (declare_local_variables, source_end_java_method): Likewise.
4603 (java_complete_expand_classes): Do not set do_not_fold.
4604 (java_complete_expand_method): Remove xref code.
4605 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
4606 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
4607 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
4608 (patch_synchronized_statement, patch_throw_statement): Likewise.
4609 (maybe_build_class_init_for_field): Likewise.
4610
4611 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
4612
4613 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
4614 instead of IS_NON_TYPE_CODE_CLASS.
4615
4616 2005-03-04 Andrew Haley <aph@redhat.com>
4617
4618 PR java/18362
4619 * class.c (set_method_index): Don't set method_index if it is
4620 NULL_TREE.
4621 (layout_class_method): Don't complain about "non-static method foo
4622 overrides static method" in the case of indirect dispatch.
4623
4624 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4625
4626 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
4627 warning.
4628 * Make-lang.in: Don't elide warnings in jcf-io.c.
4629
4630 2005-03-01 Per Bothner <per@bothner.com>
4631
4632 PR java/8608
4633 * check-init.c (wfl): Remove static.
4634 (final_assign_error, check_init): Replace calls to parse_error_context
4635 by plain error.
4636 (check_init): Save, set, and restore input_location for each exp.
4637
4638 2005-03-01 Per Bothner <per@bothner.com>
4639
4640 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
4641 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
4642 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
4643
4644 2005-03-01 Per Bothner <per@bothner.com>
4645
4646 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
4647
4648 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
4649
4650 PR libgcj/16923
4651 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
4652 JvVMOption.
4653
4654 2005-02-22 Tom Tromey <tromey@redhat.com>
4655
4656 PR java/20056:
4657 * verify-impl.c (EITHER): New define.
4658 (types_compatible): Handle it.
4659 (check_field_constant): Use it.
4660
4661 2005-02-18 Tom Tromey <tromey@redhat.com>
4662
4663 PR java/20056:
4664 * verify-impl.c (types_equal): Fixed test.
4665
4666 PR java/20056:
4667 * verify-glue.c (vfy_class_has_field): New function.
4668 * verify.h (vfy_class_has_field): Declare.
4669 * verify-impl.c (check_field_constant): Added 'putfield'
4670 argument.
4671 (verify_instructions_0): Updated.
4672 (types_equal): New function.
4673
4674 2005-02-14 Tom Tromey <tromey@redhat.com>
4675
4676 PR java/19921:
4677 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
4678 stack effect of multianewarray.
4679
4680 2005-02-14 Andrew Haley <aph@redhat.com>
4681
4682 PR java/19907
4683 * expr.c (expand_byte_code): Call promote_arguments().
4684 (promote_arguments): New function.
4685 * decl.c (check_local_unnamed_variable): Remove special case for
4686 new verifier.
4687 (find_local_variable): Promote all boolean types to int
4688 when searching for local variable decls.
4689
4690 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
4691
4692 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
4693 parse-scan.y: Update copyright.
4694
4695 2005-02-11 Per Bothner <per@bothner.com>
4696
4697 PR java/15543
4698 * parse-scan.y (input_location): Remove variable.
4699 (main_input_filename): New - replaces input_filename, which isn't
4700 settable if USE_MAPPED_LOCATION.
4701 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
4702 so we don't reference input_location or wfl_operator in that case.
4703 * jv-scan.c (expand_location): Remove - no longer used.
4704 (main): Set main_input_filename rather than input_filename.
4705
4706 2005-02-09 Richard Henderson <rth@redhat.com>
4707
4708 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
4709 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
4710
4711 2005-02-08 Marcin Dalecki <martin@dalecki.de>
4712
4713 * expr.c (add_type_assertion): Use the proper enumeration type,
4714 since this is what htab_find_slot() is expecting.
4715
4716 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
4717
4718 * gcj.texi: Update copyright dates.
4719
4720 2005-02-02 Tom Tromey <tromey@redhat.com>
4721
4722 * gcj.texi (libgcj Runtime Properties): Default library_control
4723 to 'cache'.
4724
4725 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
4726
4727 PR java/15543
4728 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
4729 (modifiers) when square brackets are present in a declaration for
4730 a final paramter.
4731 * jv-scan.c (main): Set input_filename and input_line.
4732
4733 2005-02-01 Tom Tromey <tromey@redhat.com>
4734
4735 PR java/19742:
4736 * gjavah.c (get_field_name): Don't override name for JNI header.
4737
4738 2005-02-01 Roger Sayle <roger@eyesopen.com>
4739
4740 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
4741 of unsigned types using iushr and lushr JVM bytecodes.
4742
4743 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
4744
4745 PR java/19738
4746 * gjavah.c (jni_print_float): Do not emit floating-point
4747 initialiser for a static final field.
4748 (jni_print_double): Likewise.
4749
4750 2005-02-01 Mark Mitchell <mark@codesourcery.com>
4751
4752 Revert:
4753 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4754 * gjavah.c (print_field_info): Mark static data members of
4755 floating-point type with "__extension__".
4756
4757 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4758
4759 * gjavah.c (print_field_info): Mark static data members of
4760 floating-point type with "__extension__".
4761
4762 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
4763
4764 PR java/9157
4765 * parse.y (build_string_concatenation): Remove redundant if.
4766 (patch_conditional_expr): Attempt to patch_string() the condition
4767 of a ?: as well, in addition to its other operands.
4768
4769 2005-01-25 Tom Tromey <tromey@redhat.com>
4770
4771 * Make-lang.in (java/java-tree-inline.o): Removed.
4772
4773 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
4774
4775 PR java/19070
4776 * parse.y (patch_binop): Allow comparisons against NULL only
4777 if the other operand is of a reference type.
4778
4779 2005-01-24 Tom Tromey <tromey@redhat.com>
4780
4781 * java-tree.h (gcj_abi_version): Declare.
4782 * class.c (make_class_data): Push gcj_abi_version into "next"
4783 field. Renamed field.
4784 * decl.c (gcj_abi_version): New global.
4785 (parse_version): New function.
4786 (java_init_decl_processing): Call it. Renamed 'next' field.
4787 Include version.h.
4788 (GCJ_BINARYCOMPAT_ADDITION): New define.
4789
4790 2005-01-24 Roger Sayle <roger@eyesopen.com>
4791
4792 PR java/19295
4793 * jcf-write.c (generate_bytecode_insns): Conversions between
4794 integer types of the same precision shouldn't generate widening
4795 or narrowing conversion bytecodes.
4796
4797 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
4798
4799 * java-except.h, java-tree.h: Remove unused prototypes.
4800
4801 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
4802
4803 PR java/18091:
4804 * jcf-write.c (perform_relocations): Don't call memcpy if source
4805 and destination are the same.
4806
4807 2005-01-17 Tom Tromey <tromey@redhat.com>
4808
4809 * verify-impl.c (get_short): Sign extend.
4810 (get_int): Likewise.
4811
4812 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
4813
4814 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4815 with TYPE_SIZE.
4816
4817 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4818
4819 * verify.c: Revert to the version before the BC-ABI merge.
4820
4821 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4822
4823 PR java/19277
4824 * check-init.c (check_init): Take care of references that do not
4825 have an explicit final variable declaration (e.g. array length
4826 access) for pre/post in/de-crement operators.
4827
4828 2005-01-08 Mark Wielaard <mark@klomp.org>
4829
4830 * parse.y (process_imports): Allocate (and free) original_name only
4831 when not already defined.
4832 * jcf-parse.c (read_class): Free results of find_class() and
4833 lrealpath().
4834 (java_parse_file): Keep pointer to head of file_list and free when
4835 done. Free result of lrealpath().
4836
4837 2005-01-05 Tom Tromey <tromey@redhat.com>
4838
4839 * gcj.texi (Standard Properties): java.ext.dirs is now used.
4840
4841 2004-12-20 Andrew Haley <aph@redhat.com>
4842
4843 * typeck.c: Use fold_convert for ints and booleans.
4844
4845 2004-12-17 Andrew Haley <aph@redhat.com>
4846
4847 PR java/18931
4848 * typeck.c (convert): Use a CONVERT_EXPR when converting to
4849 BOOLEAN_TYPE or CHAR_TYPE.
4850 (convert_to_boolean, convert_to_char) : Remove.
4851 * convert.h (convert_to_boolean, convert_to_char) : Remove.
4852 * expr.c (expand_load_internal): Do type conversion if type is not
4853 as required.
4854
4855 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
4856
4857 PR target/18459
4858 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4859 Update comment.
4860
4861 2004-12-07 Andrew Haley <aph@redhat.com>
4862
4863 PR java/18811:
4864 * jcf-parse.c (load_class): Remove sanity test for missing inner
4865 class file.
4866
4867 2004-12-06 Tom Tromey <tromey@redhat.com>
4868
4869 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4870 (java.uninstall): Likewise.
4871 (java.maintainer-clean): Likewise.
4872 (.INTERMEDIATE): Likewise.
4873 (java.install-man): Likewise.
4874 (gcj-dbtool.pod): New target.
4875 * gcj.texi (Code Generation): Document -findirect-dispatch.
4876 (libgcj Runtime Properties): Document
4877 gnu.gcj.precompiled.db.path.
4878 (Top): Link to "Invoking gcj-dbtool".
4879
4880 2004-12-06 Tom Tromey <tromey@redhat.com>
4881
4882 PR java/14853:
4883 * java-tree.h (extract_field_decl): Declare.
4884 * parse.y (extract_field_decl): Renamed from
4885 strip_out_static_field_access_decl. No longer static.
4886 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4887
4888 2004-12-03 Tom Tromey <tromey@redhat.com>
4889
4890 * lang.c (flag_new_verifier): Define.
4891 (java_post_options): Set flag_new_verifier if indirect dispatch
4892 is being used.
4893 * lang.opt (fnew-verifier): Removed.
4894
4895 2004-12-03 Tom Tromey <tromey@redhat.com>
4896
4897 PR bootstrap/14614:
4898 * Make-lang.in (java.install-common): Only install transformed
4899 gcjh if gcj-cross exists.
4900
4901 2004-12-03 Andrew Haley <aph@redhat.com>
4902
4903 PR java/18812
4904 * except.c (link_handler): Patch 'outer' field of siblings of the
4905 range we're demoting.
4906
4907 2004-12-03 Andrew Haley <aph@redhat.com>
4908
4909 PR java/18697
4910 * class.c (layout_class_method): Don't fail to override a method
4911 simply because it has DECL_ARTIFICIAL set.
4912
4913 2004-12-02 Tom Tromey <tromey@redhat.com>
4914
4915 PR java/16675:
4916 * parse.y (craft_constructor): Special case null_pointer_node.
4917
4918 2004-12-02 Tom Tromey <tromey@redhat.com>
4919
4920 PR java/18741:
4921 * java-gimplify.c (java_gimplify_expr): Don't call
4922 SET_EXPR_LOCATION unless wrapped tree is an expression.
4923
4924 2004-11-27 Per Bothner <per@bothner.com>
4925
4926 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
4927 Fix fencepost error in 'i', which got executed one too many times.
4928 Also, fold memcpy into explicit loop, as originally intended.
4929 Also, free temporary 'buf' which otherwise leaks.
4930
4931 2004-11-27 Per Bothner <per@bothner.com>
4932
4933 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4934 local static variables if not USE_MAPPED_LOCATION.
4935
4936 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
4937
4938 * class.c, decl.c, expr.c: Fix comment typos.
4939
4940 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
4941
4942 PR java/18305
4943 * decl.c (end_java_method): Call
4944 attach_init_test_initialization_flags on all the init_decls.
4945 * parse.y (attach_init_test_initialization_flags): Move to ...
4946 * expr.c (attach_init_test_initialization_flags): here and
4947 support BIND_EXPR also.
4948 * java-tree.h (attach_init_test_initialization_flags): Prototype.
4949 * jcf-parse.c (parse_class_file): Don't disable class init
4950 optimization.
4951
4952 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
4953
4954 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4955 in diagnostics.
4956
4957 2004-11-24 Richard Henderson <rth@redhat.com>
4958
4959 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4960 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4961
4962 2004-11-24 Tom Tromey <tromey@redhat.com>
4963
4964 * verify.c (defer_merging): Don't use C++-style comment.
4965 * verify.h (java_opcode): Added java_opcode_end.
4966 * class.c (build_class_ref): Remove C++ comment and old FIXME.
4967
4968 * verify-impl.c (vfy_push_type): Removed bogus "return".
4969 (initialize_stack): Use vfy_alloc and vfy_free.
4970 (verify_instructions_0): Likewise.
4971
4972 * Merged gcj-abi-2-dev-branch to trunk.
4973
4974 2004-11-24 Andrew Haley <aph@redhat.com>
4975
4976 * jcf-parse.c (parse_class_file): Set file_start_location.
4977
4978 2004-11-10 Tom Tromey <tromey@redhat.com>
4979
4980 * class.c (make_field_value): Don't call build_static_field_ref.
4981 (build_static_field_ref): Don't emit direct references when using
4982 indirect dispatch.
4983
4984 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
4985 -verbose:class into man page synopsis.
4986
4987 2004-11-09 Tom Tromey <tromey@redhat.com>
4988
4989 * expr.c (build_java_arraystore_check): Still generate check if
4990 element type is itself an array.
4991
4992 2004-11-08 Tom Tromey <tromey@redhat.com>
4993
4994 * java-tree.h (soft_check_assignment_node): Removed.
4995 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4996 * decl.c (java_init_decl_processing): Don't initialize
4997 soft_check_assignment_node.
4998
4999 2004-11-05 Tom Tromey <tromey@redhat.com>
5000
5001 * class.c (layout_class_methods): Don't add Miranda methods when
5002 using indirect dispatch.
5003
5004 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
5005
5006 * class.c (make_class_data): Call emit_assertion_table to set the
5007 'assertion_table' field.
5008 (build_signature_for_libgcj): Move here from expr.c.
5009 (add_assertion_table_entry): New function. Callback for assertion
5010 hashtable traversal.
5011 (emit_assertion_table): New. Take class argument, and generate
5012 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
5013 * decl.c (init_decl_processing): Define assertion_entry_type record.
5014 Push 'assertion_table' class field instead of 'verify'.
5015 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
5016 (type_assertion_hash): Include 'assertion_code' in hash.
5017 (add_type_assertion): Rewritten. Take class and assertion_code
5018 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
5019 (can_widen_reference_to): Use new add_type_assertion() arguments.
5020 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
5021 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
5022 (verify_identifier_node): Removed.
5023 (assertion_entry_type, assertion_table_type): New.
5024 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
5025 assertion code definitions.
5026 (struct type_assertion): Add assertion_code. Rename 'source_type' and
5027 'target_type' to 'op1' and 'op2'.
5028 (add_type_assertion): Declare.
5029 (lang_printable_name_wls): Remove unused definition.
5030 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
5031 to emit runtime assertion.
5032 (vfy_note_stack_type): Clean up non-C90 declarations.
5033 (vfy_note_local_type): Likewise.
5034 * verify.h (vfy_is_assignable_from): Declare.
5035 * verify-impl.c (is_assignable_from_slow): Remove unused function.
5036 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
5037 instead of is_assignable_from_slow().
5038 (types_compatible): Reinstate ref_compatible() call.
5039
5040 2004-11-04 Tom Tromey <tromey@redhat.com>
5041
5042 * class.c (build_static_field_ref): Reverted previous patch.
5043
5044 * class.c (build_static_field_ref): Don't emit direct references
5045 when using indirect dispatch.
5046
5047 2004-11-03 Tom Tromey <tromey@redhat.com>
5048
5049 * expr.c (expand_java_arrayload): Set lhs_type_node.
5050 (expand_java_arraystore): Set rhs_type_node.
5051
5052 2004-11-02 Tom Tromey <tromey@redhat.com>
5053
5054 * jcf-parse.c (compute_class_name): Use filename length from zip
5055 directory, not strlen.
5056
5057 * expr.c (expand_invoke): Mark new interface methods as abstract.
5058
5059 2004-11-01 Tom Tromey <tromey@redhat.com>
5060
5061 * verify-impl.c (push_jump): Removed check for uninitialized
5062 objects.
5063 (push_exception_jump): Likewise.
5064 (handle_ret_insn): Likewise.
5065 (handle_jsr_insn): Likewise.
5066 (state_check_no_uninitialized_objects): Removed.
5067
5068 * decl.c (check_local_unnamed_variable): Recognize
5069 promoted-to-int parameters when using the new verifier.
5070 * expr.c (expand_java_arraystore): Explicitly request array type
5071 when using new verifier.
5072 (expand_java_arrayload): Likewise.
5073 (invoke_build_dtable): Don't pass object_type_node as
5074 expression argument to build_java_indirect_ref.
5075 (build_java_check_indexed_type): Do nothing.
5076 (build_java_arraystore_check): Handle case where array doesn't
5077 have array type.
5078 (build_java_array_length_access): Likewise.
5079 (expand_invoke): Handle case where interface overrides a method
5080 from Object.
5081 (pop_type_0): Always succeed for reference types.
5082 (process_jvm_instruction): Don't pop a value in a dead
5083 exception handler.
5084 (pop_arguments): Convert arguments to correct types.
5085
5086 2004-10-29 Andrew Haley <aph@redhat.com>
5087
5088 * jcf-parse.c (give_name_to_class): Remove line that was
5089 incorrectly merged.
5090
5091 2004-10-29 Andrew Haley <aph@redhat.com>
5092
5093 * jcf-parse.c (set_source_filename): Add code to build new sfname.
5094
5095 2004-10-20 Andrew Haley <aph@redhat.com>
5096
5097 * decl.c (end_java_method): Don't expand if flag_syntax_only.
5098
5099 2004-10-26 Tom Tromey <tromey@redhat.com>
5100
5101 * verify.h (vfy_notify_verified): Removed.
5102 * verify-glue.c (vfy_notify_verified): Removed.
5103
5104 2004-10-26 Tom Tromey <tromey@redhat.com>
5105
5106 * verify-impl.c (debug_print_state): Declare `i' before code.
5107 (merge_types): Modify `t' when it is null_type.
5108
5109 2004-10-26 Tom Tromey <tromey@redhat.com>
5110
5111 * verify-impl.c (type_print): Renamed from print. Now static and
5112 takes an argument.
5113 (debug_print_state): Use type_print.
5114
5115 2004-10-25 Tom Tromey <tromey@redhat.com>
5116
5117 * expr.c (build_invokeinterface): Compute correct offset for
5118 index into interface methods.
5119
5120 2004-10-20 Tom Tromey <tromey@redhat.com>
5121
5122 * java-tree.h (verify_jvm_instructions_new): Declare.
5123
5124 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
5125 command line.
5126
5127 * verify-impl.c (verify_instructions): Correctly handle wide
5128 types on the stack.
5129 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
5130 (vfy_get_component_type): Strip pointer types.
5131 (vfy_find_class): Use get_type_from_signature. Strip pointer
5132 types.
5133 Include java-except.h.
5134
5135 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
5136
5137 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
5138 vfy_push_type_t, set_variable, add_new_state, merge_into,
5139 handle_jsr_insn, branch_prepass, check_class_constant,
5140 check_wide_constant, get_one_type, compute_static_types,
5141 verify_instructions_0): Clean up C99 declarations after statements.
5142
5143 2004-10-20 Tom Tromey <tromey@redhat.com>
5144
5145 * verify-impl.c (merge_refs): Compare reference against iterator,
5146 not ref2.
5147
5148 * verify-glue.c (vfy_tag): Mask off resolved flag.
5149
5150 2004-10-19 Tom Tromey <tromey@redhat.com>
5151
5152 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
5153 (init_state_with_stack): Initialize `this_type' in state.
5154 (verify_method): Use debug_print.
5155 * verify-glue.c (vfy_is_primitive): Removed debugging print.
5156 (vfy_note_stack_depth): Reverted last patch.
5157 (vfy_note_stack_type): Note pointer to Object, not Object.
5158 (vfy_note_local_type): Likewise.
5159
5160 * verify.h (vfy_note_instruction_seen): Declare.
5161 * verify-glue.c (verify_jvm_instructions_new): Set
5162 BCODE_EXCEPTION_TARGET on target instruction.
5163 (vfy_note_instruction_seen): New function.
5164 * verify-impl.c (FLAG_INSN_SEEN): New define.
5165 (verify_instructions_0): Set flag on instruction. Save state for
5166 PC=0 later.
5167 (verify_instructions): Call vfy_note_instruction_seen.
5168
5169 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
5170 (verify_jvm_instructions_new): Call method_init_exceptions,
5171 add_handler, and handle_nested_ranges.
5172 * verify-impl.c (verify_method): Return 1 on success.
5173 (verify_instructions_0): Save the state at PC=0.
5174
5175 * verify-impl.c (init_type_from_class): Set is_resolved and
5176 ref_next on new ref_intersection.
5177 (init_type_from_string): Likewise.
5178
5179 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
5180
5181 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
5182 if flag_new_verifier is set.
5183 * java-tree.h (flag_new_verifier): Declare.
5184 * lang.opt (fnew-verifier): New option.
5185 * verify-impl.c: Work around namespace pollution by undef'ing
5186 'current_class'.
5187 (struct verifier_context): Make 'bytecode' const.
5188 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
5189 (types_compatible): For the BC-ABI, always consider reference types
5190 compatible.
5191 (check_class_constant): Use vfr->current_class.
5192 (check_constant): Likewise.
5193 (check_wide_constant): Likewise.
5194 (check_field_constant): Check for 'L' at start of type name.
5195 (get_one_type): Return pointer instead of type. Set type result in
5196 caller via passed type pointer.
5197 (compute_argument_types): Update to use new get_one_type arguments.
5198 (compute_return_type): Likewise.
5199 (make_verifier_context): New. Allocate and initialize 'vfr'.
5200 (free_verifier_context): New. Free 'vfr' and its contents.
5201 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
5202 and free_verifier_context.
5203
5204 2004-10-15 Tom Tromey <tromey@redhat.com>
5205
5206 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
5207 * verify.h (vfy_fail): Fixed formatting.
5208
5209 * verify-impl.c (vfr): Fixed comment formatting.
5210 (collapse_type): New function.
5211 (verify_instructions): Notify compiler about type map.
5212 * verify.h (vfy_note_stack_depth): Updated.
5213 (vfy_note_stack_type): Likewise.
5214 (vfy_note_local_type): Likewise.
5215 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
5216 Declare.
5217 * verify-glue.c (vfy_note_stack_depth): Correctly size type
5218 state. Added `method' argument.
5219 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
5220 argument.
5221 (vfy_note_local_type): New function.
5222 (vfy_unsuitable_type): Likewise.
5223 (vfy_return_address_type): Likewise.
5224 (vfy_null_type): Likewise.
5225
5226 * verify.h (VFY_IN_GCC): Removed.
5227 (VFY_WANT_TYPEMAP): Removed.
5228 * verify-impl.c (verify_instructions_0): Removed useless "\".
5229 (struct state) <next>: Uncomment.
5230
5231 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
5232
5233 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
5234 C-style.
5235
5236 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
5237
5238 * Make-lang.in (verify.o): Re-enabled this target.
5239 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
5240 (vfy_get_interface): Likewise.
5241 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
5242 * verify.h (verify_jvm_instructions_new): Declare.
5243 * verify-impl.c (free_state): Temporarily comment out unused
5244 function.
5245
5246 2004-10-06 Tom Tromey <tromey@redhat.com>
5247
5248 * java-tree.h (JV_STATE_READ): New enum value.
5249
5250 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
5251
5252 * verify.h: New file.
5253
5254 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
5255
5256 * verify-impl.c, verify-glue.c, verify.h: New files.
5257 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
5258
5259 2004-09-24 Andrew Haley <aph@redhat.com>
5260
5261 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
5262 for a slot if it's of pointer type.
5263
5264 2004-09-14 Tom Tromey <tromey@redhat.com>
5265
5266 * class.c (make_class_data): Correctly initialize "state" field.
5267 Initialize "engine" field.
5268 * decl.c (java_init_decl_processing): Add "engine" field.
5269
5270 2004-09-10 Andrew Haley <aph@redhat.com>
5271
5272 PR java/12760
5273 * expr.c (build_invokeinterface): Use fast method for interface
5274 dispatch.
5275 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
5276 JTI_ITABLE_PTR_TYPE.
5277 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
5278 (emit_symbol_table): Add new arg, element_size.
5279 * decl.c (java_init_decl_processing): Initialize Class.itable.
5280 * class.c (GEN_TABLE): New macro.
5281 (gen_indirect_dispatch_tables): Use it. Add itable.
5282 (make_class_data): Add new arg for emit_symbol_table().
5283 Emit itable.
5284 (add_miranda_methods): Make sure search_class has been parsed.
5285 (emit_symbol_table): Add new arg, element_size.
5286
5287 2004-09-06 Andrew Haley <aph@redhat.com>
5288
5289 * verify.c (merge_types): Return Object for all merges of
5290 interfaces.
5291 * expr.c (add_type_assertion): Don't generate assertions when
5292 source type is array of Object.
5293
5294 2004-09-03 Andrew Haley <aph@redhat.com>
5295
5296 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
5297
5298 * lang.c (java_post_options): Force flag_verify_invocations if
5299 we're not using indirect dispatch.
5300
5301 * expr.c (pop_type_0): Move test for interfaces before call to
5302 can_widen_reference_to().
5303 (build_signature_for_libgcj): Remove generation of canonical array
5304 type.
5305 (add_type_assertion): Canonicalize both arrays.
5306 Don't assert that type X can be assigned to Object.
5307 Don't assert that type X an be assigned to type X.
5308 Don't assert that Object can be assigned to type X.
5309 (can_widen_reference_to): Warn whenever we generate an assertion.
5310 (process_jvm_instruction): Use throwable_type_node for the type of
5311 an exception class.
5312
5313 2004-09-01 Andrew Haley <aph@redhat.com>
5314
5315 * decl.c (java_init_decl_processing): Change
5316 verify_identifier_node to "__verify".
5317 * expr.c (add_type_assertion): Use verify_identifier_node for name.
5318 * java-tree.h (verify_identifier_node): Change to "__verify".
5319
5320 * expr.c (build_signature_for_libgcj): New function.
5321 (add_type_assertion): Use it to construct signatures for
5322 source_type and target_type.
5323
5324 2004-08-27 Andrew Haley <aph@redhat.com>
5325
5326 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
5327 (verify_identifier_node): New.
5328 (TYPE_VERIFY_METHOD): New.
5329 (struct type_assertion): New type.
5330 * expr.c (type_assertion_eq): New function.
5331 (type_assertion_hash): New function.
5332 (add_type_assertion): New function.
5333 (can_widen_reference_to): Call add_type_assertion().
5334 * decl.c (java_init_decl_processing): Add verify_identifier_node.
5335 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
5336 (finish_class): Output TYPE_VERIFY_METHOD (type).
5337
5338 * decl.c (end_java_method): Nullify unused fields.
5339
5340 2004-08-17 Andrew Haley <aph@redhat.com>
5341
5342 * verify.c (defer_merging): Quieten.
5343 * jcf-parse.c (load_class): Only try to open a class file if it's
5344 java.lang.Object or if it's part of the current compilation.
5345 Check that the class we just tried to load is the class we just
5346 loaded. Quieten.
5347 (java_parse_file): Set flag_verify_invocations off if we're
5348 compiling from .class.
5349 (parse_zip_file_entries): Abort if we try to read a dummy class.
5350 * expr.c (can_widen_reference_to): Quieten.
5351 (build_invokevirtual): Abort if we try to invokevirtual an
5352 interface.
5353 (expand_invoke): Don't build a non-interface call to an interface.
5354 (build_instanceof): Don't do premature optimization if
5355 flag_verify_invocations is not set.
5356 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
5357 from superclass.
5358 (build_static_field_ref): Add correct type conversion for
5359 field_address.
5360 (add_miranda_methods): Disable generation of Miranda methods for
5361 dummy classes.
5362 (layout_class_method): Don't complain about non-static method
5363 overrides static method with dummy classes.
5364
5365 2004-08-13 Tom Tromey <tromey@redhat.com>
5366
5367 * class.c (build_static_field_ref): Re-enable atable lookups for
5368 static fields.
5369
5370 * parse.y (strip_out_static_field_access_decl): Indentation fix.
5371
5372 2004-08-11 Tom Tromey <tromey@redhat.com>
5373
5374 * gcj.texi (libgcj Runtime Properties): Document new properties.
5375
5376 2004-08-06 Andrew Haley <aph@redhat.com>
5377
5378 * jcf-parse.c (load_class): Check that we really have loaded the
5379 class we're looking for.
5380
5381 2004-07-19 Andrew Haley <aph@redhat.com>
5382
5383 * verify.c (verify_jvm_instructions): Comment change only.
5384
5385 * typeck.c (build_java_array_type): Add size field to array name.
5386
5387 * java-tree.h (LOCAL_SLOT_P): New.
5388 (update_aliases): Add PC argument.
5389 (pushdecl_function_level): New function.
5390
5391 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5392 MODIFY_EXPR, and SAVE_EXPR.
5393 (java_gimplify_modify_expr): New function.
5394
5395 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5396 (expand_iinc): Pass PC to update_aliases().
5397 (STORE_INTERNAL): Likewise.
5398 (process_jvm_instruction): Likewise.
5399
5400 * decl.c (base_decl_map): New variable.
5401 (uniq): New variable.
5402 (update_aliases): Rewrite with more thorough checking.
5403 (debug_variable_p): New function.
5404 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
5405 (check_local_named_variable): Delete whole function.
5406 (initialize_local_variable): New function.
5407 (check_local_unnamed_variable): Add checks and comments.
5408 (find_local_variable): Rewrite.
5409 (java_replace_reference): New function.
5410 (function_binding_level): New variable.
5411 (pushdecl_function_level): New function.
5412 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5413 (maybe_pushlevels): Call pushdecl() on each of the new decls.
5414 (start_java_method): Reset uniq. Create base_decl_map. Set
5415 function_binding_level.
5416 (end_java_method): Null unused fields to save memory.
5417
5418 2004-06-29 Andrew Haley <aph@redhat.com>
5419
5420 * except.c (expand_start_java_handler): Push a new binding level.
5421 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
5422 register_exception_range() to register where we'll do it.
5423 (expand_end_java_handler): Remove old bogus code. Replace with
5424 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5425 the top of the expression we're curently building.
5426 (maybe_end_try): Delete.
5427 * decl.c (binding_level.exception_range): New field.
5428 (clear_binding_level): Add field exception_range. Reformat.
5429 (poplevel): Call expand_end_java_handler().
5430 (poplevel): Call java_add_stmt only if functionbody is false.
5431 (maybe_poplevels): Don't call maybe_end_try() from here.
5432 (end_java_method): Clear no longer used trees in function decl.
5433 (register_exception_range): New function.
5434 * java-tree.h (register_exception_range, struct eh_range): Declare.
5435
5436 2004-06-22 Andrew Haley <aph@redhat.com>
5437
5438 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
5439 the otable.
5440 * check-init.c (get_variable_decl): Teach check-init about
5441 FIELD_DECLs addressed via the otable.
5442 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
5443 CLASS_PARSED_P.
5444
5445 2004-05-28 Andrew Haley <aph@redhat.com>
5446
5447 * jcf-parse.c (load_class): Don't try to read a class that we've
5448 already read.
5449
5450 * expr.c (build_invokeinterface): Use the old-fashioned way of
5451 doing indirect dispatch: look up interfaces by name.
5452 * java-tree.h (enum java_tree_index): Add
5453 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
5454 * decl.c (java_init_decl_processing): Add
5455 soft_lookupinterfacemethodbyname_node.
5456
5457 * gjavah.c (print_method_info): Final methods have vtable entries,
5458 so gjavah needs to output them.
5459 * class.c (layout_class_method): Generate vtable entries for final
5460 methods.
5461 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
5462 dispatch, even if a method is final.
5463
5464 2004-05-25 Andrew Haley <aph@redhat.com>
5465
5466 * class.c (build_symbol_entry): Convert the names of constructors
5467 to init_identifier_node when generating an entry for the indirect
5468 dispatch table.
5469
5470 * expr.c (build_known_method_ref): Generate indirect calls for
5471 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
5472
5473 2004-05-24 Andrew Haley <aph@redhat.com>
5474
5475 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
5476 atable element is of the right type.
5477
5478 * class.c (build_static_field_ref): Cast pointer to correct type
5479 for field.
5480
5481 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
5482
5483 * Merged with HEAD as of 20040514. Diff against
5484 gcj-abi-2-merge-20040514.
5485
5486 2004-04-16 Andrew Haley <aph@redhat.com>
5487
5488 * verify.c (check_pending_block): Disable subroutine checks.
5489 (defer_merging): New function.
5490 (merge_types): If types are dummy, use defer_merging to combine them.
5491 (verify_jvm_instructions): If invocation is invokeinterface and
5492 target is dummy, assume target really is an interface.
5493
5494 * parse.y (patch_invoke): Break out call to java_create_object.
5495
5496 * lang.c (flag_verify_invocations): New.
5497
5498 * jcf-parse.c (load_class): If we've already failed to load a
5499 class, don't try again.
5500 (load_class): If we can't find a .class file, don't fail, but emit
5501 a warning.
5502 (parse_class_file): Don't act on dummy methods.
5503
5504 * java-tree.h (flag_verify_invocations): New.
5505 (TYPE_DUMMY): New.
5506 (lang_type.dummy_class): New field.
5507 (java_create_object): New function.
5508 (METHOD_DUMMY): New.
5509
5510 * expr.c (build_field_ref): Widen field offset.
5511 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
5512 that each of its elements is compatible with the one we're
5513 popping.
5514 (pop_type_0): Issue a warning to say that we need to generate a
5515 runtime check.
5516 (java_create_object): New function.
5517 (build_field_ref): Only generate hard refs if we're not using
5518 indirect dispatch.
5519 (expand_java_field_op): If we're using !verify_invocations and we
5520 see a missing field, generate a decl for it.
5521
5522 (expand_invoke): If a class doesn't have the method we seek and
5523 we're using !flag_verify_invocations, generate a decl for the
5524 method now.
5525
5526 (build_known_method_ref): Always use indirect dispatch via the
5527 atable for static methods.
5528
5529 (expand_java_NEW): Break out object creation into new function,
5530 java_create_object.
5531
5532 (can_widen_reference_to): Issue a warning to say that we need to
5533 generate a runtime check.
5534
5535 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
5536 (make_method_value): Also use index for interfaces.
5537 (make_class_data): Skip dummy field for inherited data.
5538 Don't build method array for dummy methods.
5539 Set size_in_byte to -1 when using inirect dispatch
5540 Don't build a hard class ref if we don't have a hard ref to our
5541 superclass, or if we're using inirect dispatch.
5542 Null out dispatch tables.
5543
5544 (layout_class_method): Don't complain about non-static method
5545 overrides static method is method is artificial.
5546
5547 (build_static_field_ref): Disable atable references to static
5548 fields for the time being.
5549
5550 (layout_class_methods): Check for CLASS_INTERFACE as
5551 well as CLASS_ABSTRACT.
5552
5553 2004-11-24 Steven Bosscher <stevenb@suse.de>
5554
5555 * class.c (make_class_data): Don't check flag_inline_functions.
5556 * lang.c (flag_really_inline): Remove unused flag.
5557 (java_handle_option): Don't set it here. Remove special handling
5558 of flag_inline_functions for Java.
5559 (java_init): Don't set flag_inline_trees here. Already done...
5560 (java_post_options): ...here. Don't clear flag_inline_functions.
5561
5562 2004-11-24 Steven Bosscher <stevenb@suse.de>
5563
5564 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
5565 (java_gimplify_exit_block_expr): New function.
5566 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
5567 LABELED_BLOCK_EXPR.
5568 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
5569 (EXIT_BLOCK_EXPR): Likewise.
5570 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
5571 (LABELED_BLOCK_BODY): Likewise.
5572 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
5573 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
5574 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
5575 TREE_OPERAND.
5576 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
5577 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
5578 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
5579 second operand of EXIT_BLOCK_EXPR.
5580 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
5581 TREE_OPERAND.
5582 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
5583
5584 2004-11-23 Ben Elliston <bje@au.ibm.com>
5585
5586 * xref.h (xref_flag_value): Remove.
5587 (xref_set_data, xref_get_data): Likewise.
5588 (xref_set_current_fp): Likewise.
5589 (XREF_NONE): Likewise.
5590 (XREF_GET_DATA): Likewise.
5591 * xref.c (xref_flag_value): Remove.
5592 (xref_set_data, xref_get_data): Likewise.
5593 (xref_set_current_fp): Likewise.
5594
5595 2004-11-23 Ben Elliston <bje@au.ibm.com>
5596
5597 * gjavah.c (output_directory): Make static.
5598 (temp_directory): Likewise.
5599
5600 2004-11-15 Tom Tromey <tromey@redhat.com>
5601
5602 * decl.c (instn_ptr_type_node): Removed.
5603 (lineNumbers_ptr_type_node): Removed.
5604 (jint_type): Removed.
5605 (jint_ptr_type): Removed.
5606
5607 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
5608
5609 PR java/15576
5610 * check-init.c (check_init): Ignore DECL_EXPR.
5611 * expr.c (always_initialize_class_p): Reenable.
5612 (build_class_init): Use a variable to store the decl. Also use
5613 boolean_false_node instead of integer_zero_node.
5614 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
5615 to the block.
5616
5617 2004-11-08 Tom Tromey <tromey@redhat.com>
5618
5619 PR java/16843:
5620 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
5621 generating a JNI header.
5622 (print_field_info): Handle JNI headers.
5623 (jni_print_float): Likewise.
5624 (jni_print_double): Likewise.
5625
5626 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
5627
5628 * decl.c (end_java_method): Remove duplicated code.
5629
5630 2004-11-06 Zack Weinberg <zack@codesourcery.com>
5631 Gerald Pfeifer <gerald@pfeifer.com>
5632
5633 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
5634 as well.
5635
5636 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
5637
5638 PR java/17265
5639 * class.c: Reinstate 2004-08-18 patch.
5640 (make_local_function_alias): Don't create an alias for extern (native)
5641 functions.
5642
5643 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
5644
5645 PR java/17265
5646 * class.c (make_local_function_alias): Revert 2004-08-18 change.
5647 (make_method_value): Likewise.
5648
5649 2004-10-21 Andrew Haley <aph@redhat.com>
5650
5651 PR java/18091:
5652 * jcf-parse.c (set_source_filename): Add code to build new sfname.
5653
5654 2004-10-20 Andrew Haley <aph@redhat.com>
5655
5656 * decl.c (end_java_method): Don't expand if flag_syntax_only.
5657 Remove duplicated code block.
5658
5659 2004-10-18 Steven Bosscher <stevenb@suse.de>
5660
5661 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
5662 New rules to work around old Bison warnings.
5663
5664 2004-10-17 Steven Bosscher <stevenb@suse.de>
5665
5666 * class.c (ident_subst): Always alloca buffer.
5667 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
5668 opcode after including javaop.def.
5669 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
5670 conditional expression that exits, to avoid warnings.
5671 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
5672 a user of an extension.
5673 * win32-host.c: Move check down to have non-empty file when
5674 WIN32 is not defined.
5675
5676 * Make-lang.in (java-warn): Add STRICT_WARN.
5677 (java/jcf-io.o-warn): Don't have Werror for this file.
5678 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
5679
5680 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
5681
5682 * expr.c (expr_add_location): Move declaration to before all
5683 statements.
5684 * parse.y (java_expand_classes): Ditto.
5685 * lex.c (java_peek_unicode): Ditto.
5686
5687 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
5688
5689 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
5690 if possible, else convert `foo' to 'foo'.
5691 * class.c: Likewise.
5692 * decl.c: Likewise.
5693 * expr.c: Likewise.
5694 * jcf-io.c: Likewise.
5695 * jcf-parse.c: Likewise.
5696 * lang.c: Likewise.
5697 * lex.c: Likewise.
5698 * parse.h: Likewise.
5699
5700 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
5701
5702 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
5703 rename parameter 'msg' to 'msgid' in function declaration.
5704 (issue_warning_error_from_context): Likewise.
5705 (yyerror): Rename parameter 'msg' to 'msgid'.
5706 (all over): Use new quoting style for diagnostics.
5707
5708 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
5709
5710 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
5711 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
5712 Update copyright.
5713
5714 2004-10-14 Matt Austern <austern@apple.com>
5715
5716 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
5717 pointer_set_t* now.
5718
5719 2004-10-13 Tom Tromey <tromey@redhat.com>
5720
5721 PR java/15578:
5722 * lang.opt (--extdirs): Document.
5723 * jvspec.c (lang_specific_driver): Recognize -encoding and
5724 -extdirs.
5725
5726 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
5727
5728 * parse.y (issue_warning_error_from_context): Use va_list *
5729 instead of va_list parameter.
5730 (parse_error_context): Update call.
5731 (parse_warning_context): Likewise.
5732
5733 2004-10-05 Zack Weinberg <zack@codesourcery.com>
5734
5735 * parse.y, parse-scan.y: Add list of diagnostic messages to
5736 insulate translation template from version of yacc/bison used
5737 to compile the grammar.
5738
5739 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
5740
5741 Prepare for %q, %< and %> in diagnostic message strings.
5742 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
5743 Name second parameter 'msgid'.
5744 * parse.y: Additionally include pretty-print.h and diagnostic.h.
5745 (issue_warning_error_from_context): Use pretty-printer functions
5746 instead of vsprintf for constructing formatted messages. Rename
5747 parameter 'msg' to 'msgid'.
5748 (parse_error_context): Rename parameter 'msg' to 'msgid'.
5749 (parse_warning_context): Likewise.
5750
5751 2004-10-05 Andrew Haley <aph@redhat.com>
5752
5753 PR java/17779
5754 * jcf-parse.c (parse_zip_file_entries): If a class has a
5755 superclass and a TYPE_SIZE of zero, lay it out.
5756
5757 2004-09-30 Andrew Haley <aph@redhat.com>
5758
5759 PR java/17733
5760 * jcf-parse.c (compute_class_name): Rewrite.
5761
5762 2004-10-01 Jan Hubicka <jh@suse.cz>
5763
5764 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
5765
5766 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
5767
5768 * lex.c: Fix a comment typo.
5769
5770 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
5771
5772 * java-tree.h: Fix a comment typo.
5773
5774 2004-09-30 Per Bothner <per@bothner.com>
5775
5776 Simplify lexer. Implement --enable-mapped-location support.
5777 * jcf-parse.c (parse_class_file): Use linemap_line_start.
5778 (parse_source_file_1): Pass filename as extra parameter, so we can call
5779 linemap_add and set input_location here, rather than in both callers.
5780 (read_class): Pass copied filename to parse_source_file_1.
5781 Don't initialize wfl_operator - only needed for source compilation.
5782 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
5783 * lex.h: Remove a bunch of debugging macros.
5784 * lex.h (struct_java_line, struct java_error): Remove types.
5785 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
5786 (struct java_lc_s): Remove prev_col field.
5787 (struct java_lexer): New fields next_unicode, next_columns, and
5788 avail_unicode. New position field, and maybe token_start field.
5789 Don't need hit_eof field - use next_unicode == -1 instead.
5790 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
5791 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
5792 * parse.h: Various changes for USE_MAPPED_LOCATION.
5793 (EXPR_WFL_EMIT_LINE_NOTE): XXX
5794 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5795 (struct parser_ctxt): New file_start_location field.
5796 Remove p_line, c_line fields since we no longer save lines.
5797 Remove elc, lineno, and current_jcf fields - no longer used.
5798 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
5799 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5800 source_location and is probably not needed anymore anyway.
5801 Use new expr_add_Location function.
5802 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
5803 (java_pop_parser_context): Minor cleanup.
5804 (java_parser_context_save_global, java_parser_context_restore_global,
5805 java_pop_parser_context): Save/restore input_location as a unit.
5806 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
5807 a source_location instead of a wfl context node.
5808 (check_class_interface_creation): input_filename is not addressable.
5809 (create_artificial_method): Calling java_parser_context_save_global
5810 and java_parser_context_restore_global is overkill. Instead,
5811 temporarily set input_location from class decl.
5812 (java_layout_seen_class_methods): Set input_location from method decl.
5813 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5814 (finish_loop_body): Likewise.
5815 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
5816 (java_sprint_unicode): Take a character, not index in line.
5817 (java_sneak_uncode): Replaced by java_peek_unicode.
5818 (java_unget_unicode): No longer used.
5819 (java_allocate_new_line. java_store_unicode): Removed, since we
5820 no longer remember "lines".
5821 (java_new_lexer): Update for new data structures.
5822 (java_read_char): Move unget_value checking to java_read_unicode.
5823 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5824 efficient functions that are used directly when lexing.
5825 (java_read_unicode_collapsing_terminators): No longer needed.
5826 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5827 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5828 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
5829 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
5830 combine switch branches, and test for common token kinds earlier.
5831 (java_lex_error): Rewrite.
5832 * jv-scan.c (expand_location): New function, copied from tree.c.
5833 (main): Set ctxp->filename instead of setting input_filename directly.
5834
5835 2004-09-30 Per Bothner <per@bothner.com>
5836
5837 More cleanup for --enable-mapped-location.
5838 * class.c (push_class): If USE_MAPPED_LOCATION don't set
5839 input_location here. Instead do it in give_name_to_class.
5840 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5841 * expr.c (expand_byte_code): Call linemap_line_start.
5842 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
5843 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
5844 (expr_add_location): New function, if USE_MAPPED_LOCATION.
5845 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
5846 to USE_MAPPED_LOCATION case.
5847
5848 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
5849 * jcf-parse.c (java_parse_file): Don't set input_filename.
5850 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5851 Create a list of TRANSLATION_UNIT_DECL.
5852 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
5853 reason is so we can set a DECL_SOURCE_LOCATION for each file.
5854 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5855 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5856 (file_start_location): New static.
5857 (set_source_filename): Avoid extra access to input_filename macro.
5858 Concatenate new name with class's package prefix.
5859 (set_source_filename, give_name_to_class): Update.
5860 (give_name_to_class): Set class's "line 0" input_location here.
5861 (parse_class_file): Set input_location as a unit.
5862
5863 * jcf-parse.c (load_class): Sanity test if missing inner class file.
5864
5865 2004-09-29 Per Bothner <per@bothner.com>
5866
5867 * java-tree.h: Redefine some macros and add some declaration
5868 to handle the USE_MAPPED_LOCATION case.
5869 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
5870 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
5871 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5872 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5873
5874 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5875 * decl.c (finish_method, java_add_stmt): Likewise.
5876 * java-gimplify.c (java-gimplify.c): Likewise.
5877 * jcf-write.c (generate_bytecode_insns): Likewise.
5878 * lang.c (java_post_options): Likewise - call linemap_add.
5879
5880 2004-09-29 Andrew Haley <aph@redhat.com>
5881
5882 PR java/17007
5883 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5884 result of TRUNC_MOD_EXPR.
5885 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5886 * decl.c (java_init_decl_processing): Mark
5887 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5888
5889 2004-09-28 Tom Tromey <tromey@redhat.com>
5890
5891 PR java/15710:
5892 * class.c (add_miranda_methods): Load superinterface if not
5893 already loaded.
5894
5895 2004-09-28 Andrew Haley <aph@redhat.com>
5896
5897 PR java/17586
5898 * jcf-parse.c (load_class): Don't try to read a class that we've
5899 already read.
5900
5901 2004-09-28 Andrew Haley <aph@redhat.com>
5902
5903 * jcf-parse.c (load_class): Back out previous broken patch.
5904
5905 2004-09-28 Andrew Haley <aph@redhat.com>
5906
5907 PR java/17586
5908 * jcf-parse.c (load_class): Don't try to read a class that we've
5909 already read.
5910 Check that we really did read the right class.
5911
5912 2004-09-25 Tom Tromey <tromey@redhat.com>
5913
5914 PR java/17500:
5915 * parse.y (create_artificial_method): Use add_method_1.
5916
5917 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
5918
5919 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5920 comment typos.
5921 * gcj.texi: Fix typos.
5922
5923 2004-09-24 Tom Tromey <tromey@redhat.com>
5924
5925 PR java/15656:
5926 * parse.y (class_instance_creation_expression): Set `$$' to NULL
5927 in error parts of rule.
5928 (unary_expression): Don't call error_if_numeric_overflow when $1
5929 is NULL.
5930
5931 2004-09-24 Tom Tromey <tromey@redhat.com>
5932
5933 PR java/16789:
5934 * parse.y (resolve_qualified_expression_name): Set
5935 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5936 * expr.c (force_evaluation_order): Check for empty argument list
5937 after stripping COMPOUND_EXPR.
5938
5939 2004-09-23 Andrew Haley <aph@redhat.com>
5940
5941 PR java/16927:
5942 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5943 COND_EXPRs.
5944
5945 2004-09-23 Tom Tromey <tromey@redhat.com>
5946
5947 PR java/17329:
5948 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5949 where operand is null.
5950
5951 2004-09-23 Tom Tromey <tromey@redhat.com>
5952
5953 PR java/17380:
5954 * parse.y (not_accessible_p): Allow access to protected members
5955 even when class is not static.
5956
5957 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
5958
5959 * Make-lang.in: Revert the gcc-none.o change.
5960
5961 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
5962
5963 * parse.y (patch_anonymous_class): VEC_space returns true if there
5964 is space.
5965
5966 2004-09-21 Matt Austern <austern@apple.com>
5967
5968 Fix bootstrap.
5969 * gjavah.c (free_method_name_list): Fix function definition so
5970 it's a proper C prototype.
5971
5972 2004-09-21 Tom Tromey <tromey@redhat.com>
5973
5974 PR java/17575:
5975 * gjavah.c (free_method_name_list): New method.
5976 (main): Call it.
5977
5978 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
5979 Zack Weinberg <zack@codesourcery.com>
5980
5981 * java-tree.def: Use tree_code_class enumeration constants
5982 instead of code letters.
5983 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5984 new tree-class enumeration constants.
5985
5986 2004-09-13 Tom Tromey <tromey@redhat.com>
5987
5988 PR java/17216:
5989 * class.c (layout_class_method): Put synthetic methods into the
5990 vtable.
5991
5992 2004-09-11 Andrew Pinski <apinski@apple.com>
5993
5994 * Make-lang.in (java/ggc-none.c): Change dependency
5995 for ggc.h into $(GGC_H).
5996
5997 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5998
5999 * Make-lang.in (java/win32-host.o): Add dependency on
6000 coretypes.h.
6001 * win32-host.c: Add includes for coretypes.h, jcf.h
6002
6003 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
6004
6005 * Make-lang.in (GCJH_OBJS): Change dependency from
6006 ggc-none.o to java/ggc-none.o
6007 (JCFDUMP_OBJS): Likewise.
6008 (java/ggc-none.o): New target.
6009
6010 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
6011
6012 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
6013 * class.c (build_utf8_ref, build_static_field_ref,
6014 make_field_value, make_method_value, get_dispatch_table,
6015 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
6016 * constants.c (get_tag_node, build_ref_from_constant_pool,
6017 build_constants_constructor): Likewise.
6018 * decl.c (java_init_decl_processing): Likewise.
6019 * expr.c (build_java_array_length_access, build_newarray,
6020 expand_java_multianewarray, expand_java_pushc, expand_iinc,
6021 build_java_binop, build_field_ref, expand_java_add_case,
6022 expand_java_call, build_known_method_ref, build_invokevirtual,
6023 build_invokeinterface, build_jni_stub): Likewise.
6024 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6025 * jcf-parse.c (get_constant): Likewise.
6026 * lex.c (do_java_lex): Likewise.
6027 * parse.y (patch_binop, patch_unaryop, patch_cast,
6028 build_newarray_node, patch_newarray): Likewise.
6029 * resource.c (compile_resource_data): Likewise.
6030 * typeck.c (build_prim_array_type): Likewise.
6031
6032 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
6033
6034 * decl.c (java_init_decl_processing): Adjust
6035 initialize_sizetypes call.
6036
6037 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
6038
6039 * jv-scan.c (fancy_abort): Add.
6040
6041 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
6042
6043 * expr.c (build_java_arrayaccess): Use convert to change
6044 len's type.
6045
6046 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
6047
6048 * class.c (make_local_function_alias): Allocate extra space for 'L'
6049 in name buffer. Reported by Thomas Neumann.
6050
6051 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
6052
6053 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
6054 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
6055 * lex.c (do_java_lex): Adjust.
6056 (error_if_numeric_overflow): Likewise.
6057
6058 2004-08-18 Andrew Pinski <apinski@apple.com>
6059
6060 * class.c (make_local_function_alias): Only make a new decl if we
6061 support alias attribute on all decls.
6062
6063 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
6064
6065 * class.c (make_local_function_alias): New function. Create local
6066 alias for public method DECL.
6067 (make_method_value): Use make_local_function_alias.
6068 * parse.y (craft_constructor): Don't special-case anonymous classes.
6069 Always set ctor_name to init_identifier_node.
6070 (lookup_method_invoke): Call layout_class_method when creating
6071 anonymous class constructor.
6072
6073 2004-08-18 Richard Henderson <rth@redhat.com>
6074
6075 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
6076 default case. Treat '<' similarly. Update for
6077 is_gimple_formal_tmp_var name change.
6078
6079 2004-08-17 Andrew Haley <aph@redhat.com>
6080
6081 * lang.c (lang_printable_name): Obey verbose flag.
6082 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
6083 lang_printable_name().
6084 (verify_constructor_circularity, get_printable_method_name,
6085 check_abstract_method_definitions, java_check_regular_methods,
6086 java_check_abstract_methods, check_inner_class_access,
6087 fix_constructors, patch_method_invocation, patch_return):
6088 Likewise.
6089 * expr.c (pop_type_0): Likewise.
6090
6091 * java-tree.h (lang_printable_name_wls): Delete.
6092
6093 2004-08-16 Tom Tromey <tromey@redhat.com>
6094
6095 PR java/8473:
6096 * parse.y (primary): Changed for initialized and uninitialized
6097 array creations.
6098 (array_access): Handle array_creation_initialized.
6099 (array_creation_expression): Split into
6100 array_creation_initialized and array_creation_uninitialized.
6101
6102 2004-08-16 Andrew Haley <aph@redhat.com>
6103
6104 * jcf-write.c (find_constant_index): Canonicalize NaNs when
6105 generating bytecode.
6106
6107 2004-08-16 Elliot Lee <sopwith@redhat.com>
6108
6109 PR java/9677
6110 * jcf-parse.c (java_parse_file): Handle filenames with embedded
6111 spaces, and quoted filelists.
6112
6113 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
6114
6115 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
6116 * class.c (build_utf8_ref, build_static_field_ref,
6117 make_field_value, make_method_value, get_dispatch_table,
6118 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
6119 * constants.c (get_tag_node, build_ref_from_constant_pool,
6120 build_constants_constructor): Likewise.
6121 * decl.c (java_init_decl_processing): Likewise.
6122 * expr.c (build_java_array_length_access, build_newarray,
6123 expand_java_multianewarray, expand_java_pushc, expand_iinc,
6124 build_java_binop, build_field_ref, expand_java_add_case,
6125 expand_java_call, build_known_method_ref, build_invokevirtual,
6126 build_invokeinterface, build_jni_stub): Likewise.
6127 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6128 * jcf-parse.c (get_constant): Likewise.
6129 * lex.c (do_java_lex): Likewise.
6130 * parse.y (patch_binop, patch_unaryop, patch_cast,
6131 build_null_of_type, patch_newarray): Likewise.
6132 * resource.c (compile_resource_data): Likewise.
6133 * typeck.c (build_prim_array_type): Likewise.
6134
6135 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
6136
6137 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
6138 Don't create BLOCK here or call java_gimplify_block.
6139
6140 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
6141
6142 * java-tree.h (flag_deprecated): Removed.
6143 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
6144 * parse.y (check_deprecation): Check warn_deprecated instead of
6145 flag_deprecated.
6146
6147 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
6148
6149 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
6150 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
6151 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
6152 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
6153 flag_force_classes_archive_check, flag_optimize_sci,
6154 flag_indirect_dispatch): Remove explicit declarations.
6155 * lang.opt: Add implicit declare/define/assign. Remove obsolete
6156 final comment.
6157
6158 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
6159
6160 PR bootstrap/14893
6161 * Make-lang.in (java.install-man): Install from either build
6162 tree or source tree, whichever has the file first.
6163
6164 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
6165
6166 * jcf-parse.c (get_constant): Adjust force_fit_type call.
6167 * lex.h (SET_LVAL_NODE_TYPE): Remove.
6168 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
6169 (do_java_lex): Likewise. Adjust force_fit_type call.
6170
6171 2004-08-04 Roger Sayle <roger@eyesopen.com>
6172 Andrew Haley <aph@redhat.com>
6173
6174 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
6175 checking trees as they're being built.
6176 (convert): Call convert_ieee_real_to_integer if we're
6177 converting a constant, even if we're writing a class file.
6178
6179 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
6180
6181 PR java/16701
6182 * parse.y (fold_constant_for_init): Call resolve_field_access with
6183 correct current_class context.
6184
6185 2004-08-01 Roger Sayle <roger@eyesopen.com>
6186
6187 * decl.c (update_aliases, initialize_local_variable): Replace calls
6188 to build with calls to buildN.
6189 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
6190 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
6191 * parse.h (BUILD_THROW): Likewise.
6192 * parse.y (switch_expression, synchronized_statement,
6193 catch_clause_parameter, array_creation_expression,
6194 conditional_expression, make_qualified_name,
6195 resolve_qualified_expression_name, patch_method_invocation,
6196 patch_invoke, build_method_invocation, build_new_invocation,
6197 build_assignment, patch_assignment, build_binop, patch_binop,
6198 build_string_concatenation, build_incdec, patch_unaryop,
6199 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
6200 patch_return, build_if_else_statement, build_labeled_block,
6201 build_new_loop, build_loop_body, build_bc_statement,
6202 build_assertion, encapsulate_with_try_catch, build_try_statement,
6203 build_try_finally_statement, patch_synchronized_statement,
6204 emit_test_initialization): Likewise, replace build with buildN.
6205
6206 2004-07-28 Eric Christopher <echristo@redhat.com>
6207
6208 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
6209 (java_unsafe_for_reeval): Ditto.
6210
6211 2004-07-26 <hp@bitrange.com>
6212
6213 * parse.y (build_super_invocation): Adjust declaration order to
6214 avoid declaration after statement.
6215
6216 2004-07-25 Bernardo Innocenti <bernie@develer.com>
6217
6218 * decl.c: Rename all identifiers named `class' to `cl'.
6219
6220 2004-07-25 Richard Henderson <rth@redhat.com>
6221
6222 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
6223
6224 2004-07-23 Mike Stump <mrs@apple.com>
6225
6226 * boehm.c (set_bit): Improve type safety wrt unsignedness.
6227 * gjavah.c (throwable_p, decode_signature_piece,
6228 print_full_cxx_name, print_include, add_namelet, add_class_decl,
6229 process_file): Likewise.
6230 * jcf-dump.c (main): Likewise.
6231 * jcf-io.c (read_zip_member): Likewise.
6232 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
6233 give_name_to_class, get_class_constant): Likewise.
6234 * jcf-write.c (find_constant_wide, push_long_const,
6235 generate_classfile): Likewise.
6236 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
6237 * parse.y (read_import_dir): Likewise.
6238 * typeck.c (parse_signature_type): Likewise.
6239 * verify.c (verify_jvm_instructions): Likewise.
6240 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
6241
6242 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
6243
6244 * Make-lang.in: Replace rmic and rmiregistry references with
6245 grmic and grmiregistry.
6246 * gcj.texi: Likewise.
6247
6248 2004-07-20 Andrew Haley <aph@redhat.com>
6249
6250 PR java/16431.
6251 * verify.c (verify_jvm_instructions): Comment change only.
6252
6253 * typeck.c (build_java_array_type): Add size field to array name.
6254
6255 * java-tree.h (LOCAL_SLOT_P): New.
6256 (update_aliases): Add PC argument.
6257 (pushdecl_function_level): New function.
6258
6259 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
6260 MODIFY_EXPR, and SAVE_EXPR.
6261 (java_gimplify_modify_expr): New function.
6262
6263 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
6264 (expand_iinc): Pass PC to update_aliases().
6265 (STORE_INTERNAL): Likewise.
6266 (process_jvm_instruction): Likewise.
6267
6268 * decl.c (base_decl_map): New variable.
6269 (uniq): New variable.
6270 (update_aliases): Rewrite with more thorough checking.
6271 (debug_variable_p): New function.
6272 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
6273 (check_local_named_variable): Delete whole function.
6274 (initialize_local_variable): New function.
6275 (check_local_unnamed_variable): Add checks and comments.
6276 (find_local_variable): Rewrite.
6277 (java_replace_reference): New function.
6278 (function_binding_level): New variable.
6279 (pushdecl_function_level): New function.
6280 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
6281 (maybe_pushlevels): Call pushdecl() on each of the new decls.
6282 (start_java_method): Reset uniq. Create base_decl_map. Set
6283 function_binding_level.
6284 (end_java_method): Null unused fields to save memory.
6285
6286 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
6287
6288 * class.c (add_interface_do): Remove.
6289 (set_super_info, interface_of_p, maybe_add_interface,
6290 add_interface, make_class_data, layout_class,
6291 add_miranda_methods): Adjust BINFO accessors and addition.
6292 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
6293 accessors.
6294 * jcf-write.c (generate_classfile): Likewise.
6295 * parse.y (patch_anonymous_class, check_inner_circular_reference,
6296 check_circular_reference, java_complete_class,
6297 check_abstract_method_definitions,
6298 java_check_abstract_method_definitions,
6299 check_interface_throws_clauses, java_check_abstract_methods,
6300 lookup_java_interface_method2,
6301 find_applicable_accessible_methods_list): Adjust BINFO accessors
6302 and addition.
6303 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
6304
6305 2004-07-18 Roger Sayle <roger@eyesopen.com>
6306
6307 * builtins.c (max_builtin, min_builtin,
6308 java_build_function_call_expr): Replace calls to build with buildN.
6309 * class.c (build_class_ref, build_static_field_ref,
6310 get_dispatch_table, make_class_data, layout_class_method): Likewise.
6311 * constants.c (build_ref_from_constant_pool): Likewise.
6312 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
6313 add_stmt_to_compound): Likewise.
6314 * except.c (build_exception_object_ref, expand_end_java_handler):
6315 Likewise.
6316 * java-gimplify.c (java_gimplify_case_expr,
6317 java_gimplify_default_expr, java_gimplify_block,
6318 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
6319 * jcf-write.c (generate_bytecode_insns): Likewise.
6320 * typeck.c (convert_ieee_real_to_integer): Likewise.
6321
6322 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
6323
6324 * java-tree.h (builtin_function): Declare.
6325
6326 2004-07-16 Steven Bosscher <stevenb@suse.de>
6327
6328 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
6329 abuse restore_line_number_status.
6330
6331 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
6332
6333 g++/15861
6334 * jcf-parse.c (java_emit_static_constructor): Specify default
6335 priority.
6336
6337 2004-07-13 Per Bothner <per@bothner.com>
6338
6339 * java-tree.h (all_class_filename): Remove useless macro.
6340 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
6341 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
6342 * parse.y (java_parser_context_restore_global): Replace
6343 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
6344 * jcf-parse.c (read_class, java_parse_file): Likewise.
6345
6346 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
6347
6348 PR java/16474
6349 gjavah.c (print_field_info): Emit constant only if field is static.
6350
6351 2004-07-11 Roger Sayle <roger@eyesopen.com>
6352
6353 * expr.c (java_truthvalue_conversion, flush_quick_stack,
6354 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
6355 build_java_ret, build_java_throw_out_of_bounds_exception,
6356 build_java_array_length_access, java_check_reference,
6357 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
6358 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
6359 expand_java_arrayload, build_java_monitor, expand_java_return,
6360 expand_load_internal, expand_java_NEW, build_get_class,
6361 build_instanceof, expand_java_CHECKCAST, expand_iinc,
6362 build_java_soft_divmod, build_java_binop, build_field_ref,
6363 expand_compare, expand_java_goto, expand_java_switch,
6364 expand_java_add_case, build_class_init, build_known_method_ref,
6365 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
6366 expand_invoke, build_jni_stub, expand_java_field_op,
6367 java_expand_expr, expand_byte_code, STORE_INTERNAL,
6368 force_evaluation_order, emit_init_test_initialization): Convert
6369 calls to "build" into calls to the prefered "buildN" functions.
6370
6371 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
6372
6373 * java-tree.h (set_block): Remove.
6374 * lang.c (java_clear_binding_stack): New.
6375 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
6376 * decl.c (struct binding_level): Remove this_block.
6377 (clear_binding_level): Likewise.
6378 (poplevel): Don't handle this_block.
6379 (set_block): Remove.
6380
6381 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
6382
6383 * class.c (common_enclosing_context_p): Remove statement with no
6384 side-effects.
6385
6386 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
6387
6388 PR java/8618
6389 * parse.y (create_anonymous_class): Remove 'location' argument. Use
6390 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
6391 (craft_constructor): Inherit access flags for implicit constructor
6392 from the enclosing class.
6393 (create_class): Fix comment typo.
6394 (resolve_qualified_expression_name): Pass type of qualifier to
6395 not_accessible_p, not the type in which target field was found.
6396 (not_accessible_p): Handle inner classes. Expand protected
6397 qualifier-subtype check to enclosing instances, but don't apply this
6398 check to static members. Allow protected access to inner classes
6399 of a subtype. Allow private access within common enclosing context.
6400 (build_super_invocation): Get WFL line number info from current
6401 class decl.
6402 (build_incomplete_class_ref): Update for new create_anonymous_class
6403 signature.
6404 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
6405 common_enclosing_instance_p.
6406 * class.c (common_enclosing_context_p): New. Determine if types
6407 share a common enclosing context, even across static contexts.
6408 (common_enclosing_instance_p): Renamed from
6409 common_enclosing_context_p. Determines if types share a common
6410 non-static enclosing instance.
6411 * java-tree.h (common_enclosing_instance_p): Declare.
6412 * jcf-write.c (get_method_access_flags): New. Surpress private flag
6413 for inner class constructors.
6414 (generate_classfile): Use get_method_access_flags.
6415
6416 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
6417
6418 * class.c (interface_of_p): Check for null TYPE_BINFO.
6419
6420 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
6421
6422 * class.c (make_class): Do not create binfo here.
6423 (set_super_info): Create it here.
6424 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
6425
6426 2004-07-08 Richard Henderson <rth@redhat.com>
6427
6428 * expr.c (case_identity, get_primitive_array_vtable,
6429 java_expand_expr, emit_init_test_initialization): Remove.
6430 * java-tree.h (java_expand_expr): Remove.
6431 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
6432
6433 2004-07-07 Per Bothner <per@bothner.com>
6434
6435 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
6436 get internal error due to mismatched types.
6437
6438 * gcj.texi (Invoking gij): Document new -verbose:class flag.
6439
6440 * gcj.texi (Linking): New node. Document -lgij usage.
6441
6442 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
6443
6444 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
6445 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
6446 * java/class.c (set_super_info, class_depth, interface_of_p,
6447 maybe_add_interface, add_interface, make_class_data,
6448 layout_class, add_miranda_methods): Adjust BINFO macros.
6449 * expr.c (can_widen_reference_to, lookup_field): Likewise.
6450 * jcf-write.c (generate_classfile): Likewise.
6451 * parse.y (patch_anonymous_class,
6452 check_inner_circular_reference, check_circular_reference,
6453 java_complete_class, check_abstract_method_definitions,
6454 java_check_abstract_method_definitions,
6455 check_interface_throws_clauses, java_check_abstract_methods,
6456 lookup_java_interface_method2,
6457 find_applicable_accessible_methods_list): Likewise.
6458 * typeck.c (find_method_in_interface): Likewise.
6459 * verify.c (merge_types): Likewise.
6460
6461 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
6462
6463 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
6464 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
6465
6466 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
6467
6468 * class.c (make_class): Use make_tree_binfo.
6469 (set_super_info, add_interface_do): Likewise.
6470 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
6471
6472 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
6473
6474 * verify.c: Correct array element access formatting thinko.
6475
6476 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
6477
6478 * verify.c: Insert a short blurb at the start referring to the JVMS.
6479 (merge_type_state): Remove redundant nested if statement.
6480 (verify_jvm_instructions): Ensure current_subr is initialised to
6481 NULL_TREE.
6482 Minor formatting fixes all over the place.
6483
6484 2004-07-02 Richard Henderson <rth@redhat.com>
6485
6486 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
6487
6488 2004-07-01 Richard Henderson <rth@redhat.com>
6489
6490 * class.c (registerClass_libfunc): Remove.
6491 (init_class_processing): Don't set it.
6492 (emit_register_classes): Take list_p parameter. Fill it in
6493 with _Jv_RegisterClass calls.
6494 * decl.c (java_init_decl_processing): Don't call
6495 init_resource_processing.
6496 * jcf-parse.c (java_emit_static_constructor): New.
6497 (java_parse_file): Call it.
6498 * resource.c (registerResource_libfunc): Remove.
6499 (init_resource_processing): Remove.
6500 (write_resource_constructor): Take list_p parameter. Fill it in
6501 with _Jv_RegisterResource calls.
6502 * java-tree.h: Update prototypes.
6503
6504 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
6505
6506 PR java/1262
6507 * class.c (layout_class_method): Do not override package-private
6508 method if its in a different package.
6509 (split_qualified_name): Move here from parse.y. Rename from
6510 breakdown_qualified. Add comment.
6511 (in_same_package): Move here from parse.y. Add comment.
6512 * java-tree.h (break_down_qualified, in_same_package): Declare.
6513 (in_same_package): Likewise.
6514 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
6515 Callers updated.
6516
6517 2004-06-29 Andrew Haley <aph@redhat.com>
6518
6519 * except.c (expand_start_java_handler): Push a new binding level.
6520 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
6521 register_exception_range() to register where we'll do it.
6522 (expand_end_java_handler): Remove old bogus code. Replace with
6523 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
6524 the top of the expression we're curently building.
6525 (maybe_end_try): Delete.
6526 * decl.c (binding_level.exception_range): New field.
6527 (clear_binding_level): Add field exception_range. Reformat.
6528 (poplevel): Call expand_end_java_handler().
6529 (poplevel): Call java_add_stmt only if functionbody is false.
6530 (maybe_poplevels): Don't call maybe_end_try() from here.
6531 (end_java_method): Clear no longer used trees in function decl.
6532 (register_exception_range): New function.
6533 * java-tree.h (register_exception_range, struct eh_range): Declare.
6534
6535 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
6536
6537 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
6538
6539 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
6540
6541 Formatting fixes.
6542 * expr.c (class_has_finalize_method): Fix method name indentation.
6543 (expand_java_call): Remove K&R style parameter declaration.
6544 (expand_invoke): Fix statement indentation.
6545 (expand_java_field_op): Likewise.
6546 * parse-scan.y: Fix typo.
6547 (reset_report): Fix method name indentation.
6548 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
6549 line. Fix typos.
6550 * verify.c (verify_jvm_instructions): Document parameters, insert
6551 page break.
6552 * lang.c (lang_init_source): Fix method name indentation.
6553 * class.c (common_enclosing_context_p): Likewise.
6554 (emit_symbol_table): Fix parameter list indentation.
6555 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
6556 parameter declaration.
6557 * constants.c: Fix copyright notice indentation.
6558 * typeck.c (find_method_in_superclasses): Fix parameter list
6559 indentation.
6560 (find_method_in_interfaces): Likewise.
6561 * zextract.c (makelong): Fix method name indentation.
6562
6563 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6564
6565 PR java/15715.
6566 * parse.y (create_interface): Set correct access modifiers for
6567 interfaces.
6568 * jcf-write.c (get_classfile_modifiers): New function.
6569 (generate_classfile): Use get_classfile_modifiers, not
6570 get_access_flags.
6571
6572 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6573
6574 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
6575 dependency to current parser context, not NULL_TREE, for top-level
6576 classes.
6577 (jdep_resolve_class): Enable member access check for all inner
6578 class dependencies.
6579
6580 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6581
6582 * parse.y (qualify_and_find): Pass type decl, not identifier, to
6583 load_class.
6584
6585 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6586
6587 PR java/15734
6588 * expr.c (expand_java_field_op): Ensure that target class for static
6589 field access has been loaded.
6590
6591 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6592 Ranjit Mathew <rmathew@hotmail.com>
6593
6594 PR java/1207, java/16178
6595 * jcf-parse.c (load_class): Return immediately if passed a type decl
6596 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
6597 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
6598 before calling load_class.
6599 (qualify_and_find): Likewise.
6600 (find_in_imports_on_demand): Likewise.
6601 (find_applicable_accessible_methods_list): Likewise.
6602
6603 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
6604
6605 * parse.y (java_layout_seen_class_methods): Don't call load_class
6606 on class defined by source parser.
6607
6608 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
6609
6610 * parse.y (set_nested_class_simple_name_value): Removed.
6611 (java_complete_expand_class): Remove calls to
6612 set_nested_class_simple_name_value.
6613
6614 2004-06-22 Andrew Haley <aph@redhat.com>
6615 Ranjit Mathew <rmathew@hotmail.com>
6616
6617 Fixes PR java/16113.
6618 * decl.c (force_poplevels): Remove call to expand_end_bindings.
6619
6620 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
6621
6622 * parse.y (create_class): Correct diagnostic message about
6623 java.lang.Object extending anything else.
6624
6625 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6626
6627 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
6628 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
6629 * constants.c (build_ref_from_constant_pool): Likewise.
6630 * expr.c (build_java_array_length_access): Likewise.
6631 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
6632 (invoke_build_dtable, build_invokevirtual): Likewise.
6633 (build_invokeinterface, java_expand_expr): Likewise.
6634 (emit_init_test_initialization): Likewise.
6635 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6636 * parse.y (make_qualifed_name, build_array_ref): Likewise.
6637
6638 2004-06-21 Andrew Haley <aph@redhat.com>
6639
6640 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
6641 block.
6642
6643 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
6644
6645 * jcf.h (struct JCF): Change java_source, right_zip and finished
6646 to unsigned int.
6647 * lex.h (struct java_lexer): Change hit_eof, read_anything,
6648 byte_swap and use_fallback to unsigned int.
6649 * parse.h (struct _jdep): Change flag0 to unsigned int.
6650
6651 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
6652
6653 Fixes PR java/13948
6654 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
6655 before trying to lay out its methods.
6656 * jcf-parse.c (read_class): Track parsed files using canonical paths
6657 obtained via lrealpath from libiberty.
6658 (java_parse_file): Likewise.
6659 (parse_source_file_1): Rename formal parameter to reflect its
6660 modified purpose. Minor formatting fix.
6661
6662 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
6663
6664 * class.c (emit_register_classes): Make the function uninlinable,
6665 do not set current_function_cannot_inline.
6666 * resource.c (write_resource_constructor): Do not reset
6667 flag_inline_functions around rest_of_compilation.
6668
6669 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
6670
6671 PR java/15769
6672 * expr.c (java_truthvalue_conversion): Handle
6673 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
6674 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
6675 i.e. return the expression.
6676
6677 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
6678
6679 * gjavah.c: Include version.h
6680
6681 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
6682
6683 * jcf-write.c (generate_bytecode_conditional): Correct handling
6684 of unordered conditionals. Add comment.
6685
6686 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
6687 Per Bothner <per@bothner.com>
6688
6689 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
6690 local variable was initialised upon declaration.
6691 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
6692 variable was final and initialised upon declaration.
6693 * check-init.c (check_final_reassigned): Give error only if a blank
6694 final is not definitely unassigned or if an initialised final is
6695 reassigned.
6696 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
6697 assignment expressions. Remove case MODIFY_EXPR, label do_default.
6698 (check_init): Perform initialised-variable-removing-optimisation
6699 only on non-final local variables.
6700
6701 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6702
6703 * jcf-write.c (generate_bytecode_conditional): Handle binops
6704 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
6705 and LTGT_EXPR.
6706 (generate_bytecode_insns): Likewise.
6707
6708 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6709
6710 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
6711 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
6712
6713 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6714
6715 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
6716 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
6717
6718 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
6719
6720 * decl.c (struct binding_level): Add GTY marker. Compile
6721 binding_depth unconditionally.
6722 (current_binding_level, free_binding_level, global_binding_level):
6723 Likewise.
6724 (clear_binding_level): Unconditionally set binding_depth.
6725 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
6726
6727 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
6728
6729 * lex.c (java_new_lexer): Set 'encoding'.
6730 (java_read_char): Improve error message for unrecognized characters.
6731 * lex.h (struct java_lexer): New field 'encoding'.
6732
6733 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
6734
6735 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
6736
6737 2004-05-21 Mark Wielaard <mark@klomp.org>
6738
6739 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
6740 extern.
6741
6742 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
6743
6744 * typeck.c: Remove non-printable character 160.
6745
6746 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
6747
6748 * check-init.c: Correct minor typos.
6749
6750 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6751
6752 * Make-lang.in, expr.c, java-gimplify.c: Rename
6753 tree-simple.[ch] to tree-gimple.[ch].
6754
6755 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
6756
6757 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
6758
6759 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6760
6761 Merge from tree-ssa-20020619-branch. See
6762 ChangeLog.tree-ssa for details.
6763
6764 * Make-lang.in, builtins.c, check-init.c, class.c,
6765 constants.c, decl.c, except.c, expr.c, java-except.h,
6766 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
6767 lang.c, lang.opt, parse.y, resource.c: Merged.
6768 * java-gimplify.c: New file.
6769
6770 2004-05-10 Andrew Haley <aph@redhat.com>
6771
6772 * parse.y (create_class): Set TYPE_VFIELD.
6773 * decl.c (java_init_decl_processing): Likewise.
6774
6775 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
6776 * class.c (make_method_value): Replace DECL_VINDEX with call to
6777 get_method_index().
6778 (get_dispatch_vector): Likewise.
6779 (layout_class_method): Likewise.
6780 Replace set of DECL_VINDEX with call to set_method_index().
6781 (set_method_index): New function.
6782 (get_method_index): New function.
6783 * java-tree.h (set_method_index): New function decl.
6784 (get_method_index): New function decl.
6785
6786 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
6787
6788 * parse.y (check_pkg_class_access): Add new argument
6789 and use it when cl is NULL to call lookup_cl on it.
6790 (parser_check_super_interface): Do not call lookup_cl.
6791 Pass this_decl to check_pkg_class_access and NULL
6792 instead of lookup_cl.
6793 (parser_check_super): Update for change in
6794 check_pkg_class_access.
6795 (do_resolve_class): Likewise.
6796 (process_imports): Likewise.
6797 (find_in_imports_on_demand): Likewise.
6798 (resolve_qualified_expression_name): Likewise.
6799
6800 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
6801
6802 Fixes PR java/9685, PR java/15073
6803 * parse.y (accessibility_string): New method.
6804 (not_accessible_field_error): Use accessibility_string()
6805 instead of java_accstring_lookup().
6806 (resolve_qualified_expression_name): Check with
6807 check_pkg_class_access() before allowing access using
6808 qualified names.
6809 Fix comment typo.
6810 Use check_pkg_class_access() instead of not_accessible_p()
6811 for unqualified types.
6812 (not_accessible_p): Use DECL_CONTEXT (member) instead of
6813 REFERENCE for package-private access checking.
6814 (patch_method_invocation): Use accessibility_string() instead
6815 of java_accstring_lookup().
6816
6817 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
6818
6819 Fixes PR java/15133
6820 * gjavah.c (struct method_name): Add member is_native.
6821 (overloaded_jni_method_exists_p): Match candidate method only if
6822 it is native.
6823 (print_method_info): Initialise is_native flag from the method's
6824 access flags.
6825
6826 2004-04-30 Roger Sayle <roger@eyesopen.com>
6827
6828 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6829 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6830
6831 2004-04-22 Roger Sayle <roger@eyesopen.com>
6832
6833 * resource.c (write_resource_constructor): Guard call to possibly
6834 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6835
6836 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
6837
6838 * class.c (make_class_data): Add new field aux_info.
6839 * decl.c (java_init_decl_processing): Push type and decl for
6840 `aux_info'.
6841
6842 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6843
6844 * expr.c (expand_java_NEW): Don't use size argument for
6845 _Jv_AllocObject calls.
6846 * parse.y (patch_invoke): Likewise.
6847
6848 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6849
6850 * expr.c (build_invokeinterface): Remove unused variables to
6851 fix warnings.
6852
6853 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6854
6855 * class.c (get_interface_method_index): New function. Return dispatch
6856 index for interface method.
6857 (make_method_value): For interface methods, set index field to
6858 iface dispatch index, not DECL_VINDEX.
6859 * expr.c (build_invokeinterface): Use get_interface_method_index.
6860
6861 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6862
6863 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6864
6865 2004-03-31 Andrew Haley <aph@redhat.com>
6866
6867 PR java/14104
6868 * jcf-io.c (opendir_in_zip): Tidy up error handling.
6869
6870 2004-03-30 Zack Weinberg <zack@codesourcery.com>
6871
6872 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6873 form of GTY markers.
6874
6875 2004-03-25 Marcus Meissner <meissner@suse.de>
6876
6877 PR java/14689:
6878 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6879
6880 2004-03-23 Tom Tromey <tromey@redhat.com>
6881
6882 PR java/14315:
6883 * jcf-write.c (make_class_file_name): Don't report if mkdir
6884 failed with EEXIST.
6885
6886 2004-03-23 Tom Tromey <tromey@redhat.com>
6887
6888 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6889
6890 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
6891
6892 * class.c, gjavah.c, lang.c: Fix comment typos.
6893 * gcj.texi: Fix typos.
6894
6895 2004-03-19 Per Bothner <per@bothner.com>
6896
6897 * gcj.texi (Code Generation): Document new flags and assert defaults.
6898
6899 * class.c (assume_compiled_node_struct): Rename type to
6900 class_flag_node_struct, as it is now also used for enable_assertions.
6901 Rename assume_compiled_node typedef. Rename excludep field to value.
6902 (find_assume_compiled_node): Rename function to find_class_flag_node.
6903 Minor optimization - avoid needless strlen.
6904 (add_assume_compiled): Some tweaking and optimization.
6905 Rename and generalize to add_class_flag takem an extra parameter.
6906 (add_assume_compled): New just calls add_class_flag.
6907 (add_enable_assert, enable_assertions): New functions.
6908 (enable_assert_tree): New static.
6909 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6910 * lang.opt (fenable-assertions, fenable-assertions=,
6911 fdisable-assertions, fdisable-assertions=): New options.
6912 * lang.c (java_handle_option): Handle new options.
6913 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
6914 class in an interface - create helper class nested in outer interface.
6915 (build_assertion): Short-circuit if enable_assertions is false.
6916
6917 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6918
6919 * java-tree.h: Changes throughout to add checking to macros
6920 and numerous whitespace changes.
6921 (VAR_OR_FIELD_CHECK): New macro.
6922 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6923 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6924
6925 2004-03-16 Per Bothner <per@bothner.com>
6926
6927 * jcf-jump.c (options): New --print-constants option.
6928 * gcj.texi (Invoking jcf-dump): Document --print-constants.
6929
6930 * jcf-dump.c (flag_print_constant_pool): Default to off.
6931 (print_constant_terse_with_index): New helper function.
6932 (various places): Check flag_print_constant_pool where missing.
6933 (main): If verbose set flag_print_constant_pool.
6934 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
6935
6936 2004-03-15 Andrew Haley <aph@redhat.com>
6937
6938 PR java/14581
6939 * parse.y (java_complete_lhs): Check that final variable has an
6940 initializer.
6941
6942 2004-03-12 Andrew Haley <aph@redhat.com>
6943
6944 PR java/14551
6945 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6946 conversion.
6947
6948 2004-02-29 Roger Sayle <roger@eyesopen.com>
6949
6950 * jcf-parse.c (java_parse_file): Handle the case that input_filename
6951 is NULL.
6952
6953 2004-02-27 Per Bothner <per@bothner.com>
6954
6955 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
6956 suggestion: Use build_incomplete_class_ref.
6957 This fixes PR java/13508, java/11714.
6958
6959 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
6960
6961 * java/parse.h: Update copyright.
6962
6963 2004-02-26 Andrew Haley <aph@redhat.com>
6964
6965 PR java/14231:
6966 * parse.y (check_interface_throws_clauses): Check for
6967 !METHOD_INVISIBLE (iface_method).
6968 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6969 well as CLASS_ABSTRACT.
6970
6971 2004-02-25 Per Bothner <per@bothner.com>
6972
6973 * parse.y (build_assertion): If we're in an inner class, create the
6974 class$ helper routine in the outer class.
6975
6976 2004-02-19 Richard Henderson <rth@redhat.com>
6977
6978 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6979
6980 2004-02-16 Geoffrey Keating <geoffk@apple.com>
6981
6982 * Make-lang.in (java.install-man): Add extra dependencies.
6983
6984 2004-02-13 Geoffrey Keating <geoffk@apple.com>
6985
6986 * Make-lang.in: Install man pages under the same names
6987 (possibly transformed) as the program they document.
6988
6989 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
6990
6991 * gjavah.c: Include "intl.h".
6992 (error): New function.
6993 (main): Call gcc_init_libintl.
6994 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6995 print_stub_or_jni, process_file, main): Use error rather than
6996 fprintf.
6997 (print_method_info, usage, help, version, main): Mark strings for
6998 translation with _. Avoid splitting up sentences. Send
6999 information messages to stdout.
7000 * jcf-dump.c: Include "intl.h".
7001 (main): Call gcc_init_libintl.
7002 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
7003 Mark error, usage and version messages for translation with _.
7004 Avoid splitting up sentences.
7005 * jv-scan.c: Include "intl.h".
7006 (fatal_error, warning): Change parameter s to msgid. Translate
7007 messages.
7008 (main): Call gcc_init_libintl.
7009 (usage, help, version): Mark error, usage and version messages for
7010 translation with _. Avoid splitting up sentences.
7011 * jvgenmain.c: Include "intl.h".
7012 (main): Call gcc_init_libintl.
7013 (usage, main): Mark error messages for translation with _.
7014 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
7015 JVGENMAIN_OBJS): Add intl.o.
7016 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
7017 java/jvgenmain.o): Update dependencies.
7018
7019 2004-02-08 Per Bothner <per@bothner.com>
7020
7021 * parse.y (resolve_qualified_expression_name): In case of inaccessible
7022 class don't use not_accessible_field_error, which can get confused.
7023
7024 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
7025
7026 Make-lang.in (po-generated): Delete.
7027
7028 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
7029
7030 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
7031 Depend on target.h.
7032 * decl.c: Include target.h.
7033 (start_java_method): Replace PROMOTE_PROTOTYPES with
7034 targetm.calls.promote_prototypes.
7035 * expr.c: Include target.h.
7036 (pop_arguments): Replace PROMOTE_PROTOTYPES with
7037 targetm.calls.promote_prototypes.
7038 * parse.y: Include target.h.
7039 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
7040 with targetm.calls.promote_prototypes.
7041
7042 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
7043
7044 * typeck.c: Update copyright.
7045
7046 2004-02-02 Tom Tromey <tromey@redhat.com>
7047
7048 * decl.c (java_init_decl_processing): Remove duplicate
7049 gnu/gcj/RawData.
7050
7051 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
7052
7053 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
7054
7055 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
7056
7057 * expr.c (build_field_ref): Move variable
7058 definition up.
7059
7060 2004-01-28 Andrew Haley <aph@redhat.com>
7061
7062 * expr.c (build_field_ref): Widen field offset.
7063
7064 2004-01-27 Andrew Haley <aph@redhat.com>
7065
7066 java/13273
7067 * parse.y (check_interface_throws_clauses): Make sure class_decl
7068 has been loaded.
7069
7070 2004-01-22 Jeff Sturm <jsturm@one-point.com>
7071
7072 PR java/13733
7073 * parse.y (patch_assignment): Don't modify lhs_type for
7074 reference assignments.
7075
7076 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
7077
7078 * Make-lang.in: Replace $(docdir) with doc.
7079 (java.info, java.srcinfo, java.man, java.srcman): New rules.
7080 (java.install-man): Revamp rule.
7081
7082 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
7083
7084 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
7085 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
7086 instead of deferred backquote.
7087
7088 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
7089
7090 * typeck.c (find_method_in_interfaces): Move variable
7091 definition up.
7092
7093 2004-01-16 Andrew Haley <aph@redhat.com>
7094
7095 PR java/13273:
7096 * typeck.c (shallow_find_method): New.
7097 (find_method_in_superclasses): New.
7098 (find_method_in_interfaces): New.
7099 (lookup_do): Rewrite.
7100 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
7101
7102 * jcf-parse.c (read_class): Save and restore output_class.
7103 * decl.c (java_expand_body): Set output_class from fndecl.
7104
7105 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
7106
7107 * class.c (gen_indirect_dispatch_tables): Fix string length
7108 calculations.
7109
7110 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
7111
7112 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
7113 (java.srcextra): Copy above back to source directory if requested.
7114 (po-generated): Delete reference to $(parsedir).
7115 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
7116 Use implicit rule.
7117
7118 2004-01-14 Jan Hubicka <jh@suse.cz>
7119
7120 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
7121 estimation.
7122
7123 2004-01-09 Mark Mitchell <mark@codesourcery.com>
7124
7125 * java-tree.h (java_expand_expr): Change prototype.
7126 * expr.c (java_expand_expr): Add alt_rtl parameter.
7127
7128 2004-01-09 Andrew Haley <aph@redhat.com>
7129
7130 PR java/12755:
7131 * parse.y (java_fix_constructors): Set output_class.
7132 (java_reorder_fields): Likewise.
7133 (java_layout_classes): Likewise.
7134 (java_expand_classes): Generate indirect dispatch tables.
7135 (java_expand_classes): Set output_class.
7136 (java_finish_classes): Likewise.
7137 * lang.c (java_init): Turn on always_initialize_class_p if we're
7138 using indirect dis[atch.
7139 (java_decl_ok_for_sibcall): Use output_class, not current_class.
7140 (java_get_callee_fndecl): Use class local atable.
7141 * jcf-parse.c
7142 (always_initialize_class_p): Decl moved to java-tree.h.
7143 (HANDLE_CLASS_INFO): Set output_class.
7144 (read_class): Likewise.
7145 (parse_class_file): Call gen_indirect_dispatch_tables.
7146 (parse_zip_file_entries): Set output_class.
7147 (java_parse_file): Set output_class. Don't emit symbol tables.
7148 * java-tree.h (output_class): New.
7149 Remove global declarations for otable, atable, and ctable.
7150 (always_initialize_class_p): moved here from decl.c.
7151 (DECL_OWNER): New.
7152 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
7153 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
7154 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
7155 (struct lang_type): Add otable_methods, otable_decl,
7156 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
7157 ctable_decl, catch_classes, type_to_runtime_map.
7158 * expr.c (build_field_ref): Make otable, atable, and ctable class
7159 local rather than global.
7160 (build_known_method_ref): Likewise.
7161 (build_invokeinterface): Likewise.
7162 (java_expand_expr): Pass runtime type (rather than actual type) to
7163 expand_start_catch.
7164 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
7165 this class. Look up each class in that map to delete duplicates.
7166 (expand_end_java_handler): Pass runtime type (rather than actual
7167 type) to expand_start_catch.
7168 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
7169 (do_nothing): New.
7170 (java_init_decl_processing): Rearrange things. Remove global
7171 declarations of otable, atable, and ctable.
7172 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
7173 (java_expand_body): Set output_class.
7174 * constants.c (build_constant_data_ref): Use output_class, not
7175 current_class.
7176 (alloc_name_constant): Likewise.
7177 * class.c (gen_indirect_dispatch_tables): New.
7178 (build_class_ref): Generate hard reference to superclass, even if
7179 using indirect dispatch.
7180 (build_static_field_ref): Use class local atable.
7181 (make_class_data): Generate hard reference to superclass, even if
7182 using indirect dispatch.
7183 Generate symbolic references to interfaces when using indirect
7184 dispatch.
7185 (make_class_data): Emit otable, atable, and ctable.
7186 Make otable, atable, and ctable class local rather than global.
7187 (emit_catch_table): Make otable, atable, and ctable class local
7188 rather than global.
7189
7190 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
7191
7192 * parse.y (catch_clause_parameter): Fix typo.
7193
7194 PR java/13404
7195 * parse.y: (catch_clause_parameter): Return early if $3, aka
7196 formal_parameter, is null.
7197
7198 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
7199
7200 * class.c: Remove uses of "register" specifier in
7201 declarations of arguments and local variables.
7202 * decl.c: Likewise.
7203 * expr.c: Likewise.
7204 * gjavah.c: Likewise.
7205 * jcf-dump.c: Likewise.
7206 * jcf-io.c: Likewise.
7207 * jcf-parse.c: Likewise.
7208 * jcf-write.c: Likewise.
7209 * keyword.h: Likewise.
7210 * parse.y: Likewise.
7211 * typeck.c: Likewise.
7212 * verify.c: Likewise.
7213
7214 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
7215
7216 * Make-lang.in (GCJ_CROSS_NAME): Delete.
7217 (java.install_common, java.install-man): Adjust for above.
7218 (java.uninstall): Likewise.
7219
7220 2003-12-03 Michael Koch <konqueror@gmx.de>
7221
7222 * class.c (make_class_data):
7223 Push field value to 'hack_signers' instead of 'signers'.
7224 * decl.c (java_init_decl_processing):
7225 Push field 'hack_signers' instead of 'signers'.
7226
7227 2003-12-03 Zack Weinberg <zack@codesourcery.com>
7228
7229 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
7230 including iconv.h.
7231
7232 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
7233
7234 PR java/12374:
7235 * parse.y (qualify_ambiguous_name): Remove lots of broken
7236 field access processing - there's no need to do that here,
7237 because we have resolve_field_access. Remove
7238 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
7239 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
7240 used.
7241
7242 2003-12-01 Jeff Sturm <jsturm@one-point.com>
7243
7244 Fix PR java/13237
7245 * parse.y (java_complete_lhs): Save location prior to patching
7246 CALL_EXPR.
7247
7248 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
7249
7250 PR java/12548
7251 * resource.c (write_resource_constructor): Append
7252 "_resource" to constructor identifier name.
7253
7254 2003-11-25 Jeff Sturm <jsturm@one-point.com>
7255
7256 Fix PR java/13183.
7257 * constants.c (cpool_for_class): New function.
7258 (outgoing_cpool): Remove global variable.
7259 (alloc_name_constant): Use cpool_for_class.
7260 (build_constants_constructor): Likewise.
7261 * decl.c (java_expand_body): Set current_class.
7262 * java-tree.h (outgoing_cpool) Remove declaration.
7263 (init_outgoing_cpool): Likewise.
7264 * jcf-parse.c (init_outgoing_cpool): Remove function.
7265 (parse_class_file): Don't call init_outgoing_cpool.
7266 * parse.y (java_complete_expand_methods): Don't call
7267 init_outgoing_cpool. Don't save outgoing_cpool.
7268 (java_expand_classes): Don't restore outgoing_cpool.
7269 (java_finish_classes): Likewise.
7270
7271 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
7272
7273 * Make-lang.in: (java.install-common) Add
7274 symlink for $(target_noncanonical)-gcjh for
7275 native builds.
7276
7277 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
7278
7279 * Make-lang.in (java.extraclean): Delete.
7280
7281 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
7282
7283 * Make-lang.in (check-java): Add.
7284
7285 2003-11-19 Jeff Sturm <jsturm@one-point.com>
7286
7287 Fix PR java/13024.
7288 * except.c (prepare_eh_table_type): Allocate variable-sized
7289 buffer `buf' with alloca.
7290
7291 2003-11-17 Jeff Sturm <jsturm@one-point.com>
7292
7293 Fix PR java/12857.
7294
7295 decl.c (java_init_decl_processing): Don't initialize
7296 class_not_found_type_node, no_class_def_found_type_node.
7297
7298 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
7299 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
7300 (class_not_found_type_node, no_class_def_found_type_node):
7301 Don't define.
7302
7303 parse.y (build_dot_class_method_invocation): Add this_class
7304 argument. Qualify method invocations to a different class.
7305 (create_new_parser_context): Initialize saved_data_ctx to 0.
7306 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
7307 (build_dot_class_method): Don't load classes. Register
7308 incomplete types.
7309 (build_incomplete_class_ref): Special cases for interfaces
7310 and inner classes. Move build_dot_class_method call to here...
7311 (patch_incomplete_class_ref): ...from here. Pass current_class
7312 to build_dot_class_method_invocation.
7313 (build_assertion): Pass class_type to
7314 build_dot_class_method_invocation.
7315 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
7316
7317 2003-11-17 Jeff Sturm <jsturm@one-point.com>
7318
7319 Fix PR java/12739.
7320 * java-tree.h (BLOCK_EMPTY_P): Define.
7321 * parse.y (java_complete_lhs): Check for empty blocks
7322 in TRY_FINALLY_EXPR case.
7323
7324 2003-11-17 Andrew Haley <aph@redhat.com>
7325
7326 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
7327 (struct lang_decl_var:freed): New variable.
7328 * decl.c (poplevel): Mark local vars that have gone out of scope.
7329 (push_jvm_slot): Don't use the RTL of a var that has gone out of
7330 scope.
7331
7332 2003-11-16 Jason Merrill <jason@redhat.com>
7333
7334 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
7335 and TAGS files that include them for each front end.
7336
7337 2003-11-15 Tom Tromey <tromey@redhat.com>
7338
7339 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
7340
7341 2003-11-12 Jason Merrill <jason@redhat.com>
7342
7343 PR optimization/12547
7344 * lang.c (java_tree_inlining_walk_subtrees): Just walk
7345 BLOCK_EXPR_BODY directly.
7346
7347 2003-11-12 Andrew Haley <aph@redhat.com>
7348
7349 PR java/11045
7350 * parse.y (fold_constant_for_init): Check that we really do have a
7351 constant.
7352
7353 PR java/11533
7354 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
7355 init_test_decls being inlined.
7356
7357 PR java/12890:
7358 * parse.y (do_resolve_class): Check return value from
7359 breakdown_qualified().
7360
7361 2003-11-11 Tom Tromey <tromey@redhat.com>
7362
7363 PR java/12915:
7364 * parse.y (merge_string_cste): Handle case where we have a
7365 pointer that happens to be zero, not null_pointer_node.
7366
7367 2003-11-10 Tom Tromey <tromey@redhat.com>
7368
7369 * jcf-parse.c (classify_zip_file): Correctly compare
7370 filename_length against length of manifest file's name.
7371
7372 2003-11-08 Tom Tromey <tromey@redhat.com>
7373
7374 PR java/12894:
7375 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
7376
7377 2003-11-06 Andrew Haley <aph@redhat.com>
7378
7379 * expr.c (java_stack_swap): Make sure destination stack slots are
7380 of the correct type.
7381
7382 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
7383
7384 * Make-lang.in (dvi): Move targets to $(docobjdir).
7385 (gcj.dvi): Simplify rule and adjust target.
7386 (gcj.info): Simplify rule.
7387 (gcj.pod): New intermediate rule.
7388 (gcjh.pod): Likewise.
7389 (jv-scan.pod): Likewise.
7390 (jcf-dump.pod): Likewise.
7391 (gij.pod): Likewise.
7392 (jv-convert.pod): Likewise.
7393 (rmic.pod): Likewise.
7394 (rmiregistry.pod): Likewise.
7395 (gcj.1): Delete.
7396 (gcjh.1): Delete.
7397 (jv-scan.1): Delete.
7398 (jcf-dump.1): Delete.
7399 (gij.1): Delete.
7400 (jv-convert.1): Delete.
7401 (rmic.1): Delete.
7402 (rmiregistry.1): Delete.
7403
7404 2003-11-02 Jeff Sturm <jsturm@one-point.com>
7405
7406 Fixes PR java/12866.
7407 * parse.y (resolve_qualified_expression_name): Move test
7408 for outer field access methods from here...
7409 (check_thrown_exceptions) ...to here.
7410
7411 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
7412
7413 * .cvsignore: Delete.
7414
7415 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
7416
7417 * verify.c (verify_jvm_instructions): Don't warn about legal
7418 eh binding regions generated for example by jdk 1.4.1.
7419
7420 2003-10-24 David S. Miller <davem@redhat.com>
7421
7422 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
7423
7424 2003-10-22 Andrew Haley <aph@redhat.com>
7425
7426 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
7427 (java_get_callee_fndecl): New.
7428
7429 * jcf-parse.c (java_parse_file): Call emit_catch_table().
7430
7431 * java-tree.h (ctable_decl): New.
7432 (catch_classes): New.
7433 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
7434
7435 * decl.c (java_init_decl_processing): Add catch_class_type.
7436 Add ctable_decl.
7437 Add catch_classes field.
7438
7439 * class.c (build_indirect_class_ref): Break out from
7440 build_class_ref.
7441 (make_field_value): Check flag_indirect_dispatch.
7442 (make_class_data): Ditto.
7443 Tidy uses of PUSH_FIELD_VALUE.
7444 Add field catch_classes.
7445 (make_catch_class_record): New.
7446
7447 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
7448
7449 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
7450
7451 * jcf-write.c: Follow spelling conventions.
7452 * parse.y: Likewise.
7453
7454 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
7455
7456 * ChangeLog: Fix typos.
7457 * expr.c: Fix comment typos.
7458 * jcf-write.c: Likewise.
7459 * lang.c: Likewise.
7460 * lex.c: Likewise.
7461 * mangle.c: Likewise.
7462 * parse-scan.y: Likewise.
7463 * parse.y: Likewise.
7464
7465 2003-10-22 Tom Tromey <tromey@redhat.com>
7466
7467 * expr.c (expand_byte_code): Only warn about dead bytecode when
7468 extra_warnings is set.
7469
7470 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
7471
7472 Fix for PR java/12586.
7473 * mangle.c (find_compression_record_match): Don't iterate through
7474 package namespace elements unless they all match compression_table
7475 entries.
7476
7477 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
7478
7479 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
7480 (generate-manpages): Likewise.
7481 (java.maintainer-clean): Likewise.
7482 (gcj.info): Likewise.
7483 (gcj.1): Likewise.
7484 (gcjh.1): Likewise.
7485 (jv-scan.1): Likewise.
7486 (jcf-dump.1): Likewise.
7487 (gij.1): Likewise.
7488 (jv-convert.1): Likewise.
7489 (rmic.1): Likewise.
7490 (rmiregistry.1): Likewise.
7491 (java.install-man): Likewise.
7492 (parse-scan.o): Move and define complete compile line.
7493 (parse.o): Likewise.
7494 (jcf-tree-inline.o): Move.
7495
7496 2003-10-20 Mark Mitchell <mark@codesourcery.com>
7497
7498 * Make-lang.in (info): Update dependencies.
7499 (java.install-info): Remove.
7500 ($(srcdir)/java/gcj.info): Replace with ...
7501 ($(docobjdir)/gcj.info): ... this.
7502
7503 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
7504
7505 * Make-lang.in: Replace uses of $(target_alias) with
7506 $(target_noncanonical).
7507
7508 2003-10-09 Tom Tromey <tromey@redhat.com>
7509
7510 * decl.c (java_init_decl_processing): Declare signers field.
7511 * class.c (make_class_data): Set signers field.
7512
7513 2003-10-09 Jason Merrill <jason@redhat.com>
7514
7515 * parse.y (patch_assignment): Use make_node to create a BLOCK.
7516 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
7517 POINTER_TYPE.
7518
7519 2003-10-06 Mark Mitchell <mark@codesourcery.com>
7520
7521 * Make-lang.in (java.info): Replace with ...
7522 (info): ... this.
7523 (java.dvi): Replace with ...
7524 (dvi): ... this.
7525 (java.generated-manpages): Replace with ...
7526
7527 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
7528
7529 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
7530
7531 2003-10-01 Andrew Haley <aph@redhat.com>
7532
7533 * jcf-parse.c (java_parse_file): Write otable and atable.
7534 * java-tree.h (atable_methods): New.
7535 (atable_decl): New.
7536 (atable_syms_decl): New.
7537 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
7538 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
7539 (symbol_*type): Rename method_symbol* to symbol*type.
7540 (emit_offset_symbol_table): Delete.
7541 (emit_symbol_table): New.
7542 (get_symbol_table_index): New.
7543 (atable_type): New.
7544 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
7545 (build_known_method_ref): Likewise.
7546 (get_symbol_table_index): Rename from get_offset_table_index.
7547 Parameterize to allow re-use by differing types of symbol table.
7548 (build_invokevirtual): Pass table to get_offset_table_index.
7549 * decl.c (java_init_decl_processing): Push types and decls for
7550 atable and atable_syyms.
7551 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
7552 (make_class_data): Add new fields atable and atable_syms.
7553 (emit_symbol_table): Rename from emit_offset_symbol_table.
7554 Parameterize to allow re-use by different types of symbol table.
7555 (build_symbol_entry): Renamed from build_method_symbols_entry.
7556
7557 2003-09-30 Roger Sayle <roger@eyesopen.com>
7558
7559 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
7560 semantics for SAVE_EXPR, by caching the result in a temporary.
7561
7562 2003-09-28 Richard Henderson <rth@redhat.com>
7563
7564 * check-init.c (check_init): Save and restore input_location
7565 instead of file and line separately.
7566 * decl.c (java_expand_body): Likewise.
7567 * jcf-write.c (generate_bytecode_insns): Likewise.
7568 * parse.y (safe_layout_class): Likewise.
7569 * jcf-parse.c (read_class, parse_class_file): Likewise.
7570 (java_parse_file): Use %H for warning locator.
7571
7572 2003-09-28 Roger Sayle <roger@eyesopen.com>
7573
7574 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
7575 with void-type branches instead of using a COMPOUND_EXPR.
7576
7577 2003-09-28 Jeff Sturm <jsturm@one-point.com>
7578
7579 * decl.c (java_optimize_inline, dump_function): Remove.
7580 * java-tree.h (java_optimize_inline): Remove declaration.
7581 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
7582 * parse.y (source_end_java_method, java_expand_classes):
7583 Likewise. Remove dead code.
7584
7585 2003-09-27 Roger Sayle <roger@eyesopen.com>
7586
7587 * lang.c (java_init_options): Set flag_evaluation_order.
7588 * expr.c (force_evaluation_order): Don't attempt to force
7589 evaluation order of binary operations using save_expr.
7590 * parse.y (java_complete_lhs): No longer need to call
7591 force_evaluation_order when constructing binary operators.
7592
7593 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
7594 Bryce McKinlay <bryce@mckinlay.net.nz>
7595
7596 PR java/1333:
7597 * parse.y (not_accessible_field_error): New function.
7598 (resolve_expression_name): Check field access permissions.
7599 (resolve_qualified_expression_name): Use
7600 not_accessible_field_error.
7601 (resolve_qualified_expression_name): Likewise.
7602
7603 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7604
7605 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
7606
7607 2003-09-23 Roger Sayle <roger@eyesopen.com>
7608
7609 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
7610 with equal operands without side-effects.
7611
7612 2003-09-22 Jeff Sturm <jsturm@one-point.com>
7613
7614 * decl.c (java_init_decl_processing): Don't emit otable decls
7615 if flag_indirect_dispatch is not set.
7616
7617 2003-09-21 Richard Henderson <rth@redhat.com>
7618
7619 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7620 resource.c: Revert.
7621
7622 2003-09-21 Richard Henderson <rth@redhat.com>
7623
7624 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7625 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
7626
7627 2003-09-20 Richard Henderson <rth@redhat.com>
7628
7629 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
7630
7631 2003-09-18 Roger Sayle <roger@eyesopen.com>
7632
7633 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
7634 * check-init.c (check_init): Likewise.
7635
7636 2003-09-18 Roger Sayle <roger@eyesopen.com>
7637
7638 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
7639
7640 2003-09-16 Andrew Haley <aph@redhat.com>
7641
7642 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
7643
7644 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
7645
7646 Fixes PR java/9577
7647 * mangle.c (find_compression_record_match): Skip
7648 over a "6JArray" (the array template mangled string)
7649 IDENTIFIER_NODE.
7650 (mangle_array_type): Correct minor typo.
7651 (atms): Move definition to the beginning.
7652
7653 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
7654
7655 * class.c (add_miranda_methods): Ensure super-interfaces are laid
7656 out. Fix for PR java/12254.
7657
7658 2003-09-11 Richard Henderson <rth@redhat.com>
7659
7660 * parse.y (source_end_java_method): Update for new
7661 cgraph_finalize_function argument.
7662
7663 2003-09-09 Richard Henderson <rth@redhat.com>
7664
7665 * parse.y (source_end_java_method): Update call to
7666 cgraph_finalize_function.
7667
7668 2003-09-03 Jeff Sturm <jsturm@one-point.com>
7669
7670 * decl.c (java_expand_body): New function.
7671 * expr.c (build_class_init): Set DECL_IGNORED_P.
7672 * java-tree.h (start_complete_expand_method,
7673 java_expand_body): Declare.
7674 * jcf-parse.c (cgraph.h): Include.
7675 (java_parse_file): Handle flag_unit_at_a_time.
7676 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
7677 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
7678 (java_estimate_num_insns): Use walk_tree_without_duplicates.
7679 (java_start_inlining): New function.
7680 * parse.h (java_finish_classes): Declare.
7681 * parse.y: Include cgraph.h.
7682 (block): Don't special-case empty block production.
7683 (craft_constructor): Set DECL_INLINE.
7684 (source_end_java_method): Handle flag_unit_at_a_time.
7685 Replace inline code with call to java_expand_body.
7686 (start_complete_expand_method): Remove static modifier.
7687 (java_expand_method_bodies): Patch function tree for
7688 class initialization and/or synchronization as needed.
7689 Don't begin RTL expansion yet.
7690 (java_expand_classes): Check flag_unit_at_a_time before
7691 calling finish_class.
7692 (java_finish_classes): New function.
7693 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
7694 (patch_assignment): Set DECL_CONTEXT on temporary variable.
7695 (emit_test_initialization): Set DECL_IGNORED_P.
7696
7697 2003-09-03 Roger Sayle <roger@eyesopen.com>
7698
7699 * builtins.c (enum builtin_type): Delete unused enumeration.
7700 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
7701
7702 2003-08-28 Tom Tromey <tromey@redhat.com>
7703
7704 * gcj.texi (Extensions): Document gcjlib URLs.
7705
7706 2003-08-20 Tom Tromey <tromey@redhat.com>
7707
7708 * gcj.texi (Extensions): Added xref.
7709 (libgcj Runtime Properties): Document
7710 gnu.gcj.runtime.VMClassLoader.library_control.
7711
7712 2003-08-20 Andrew Haley <aph@redhat.com>
7713
7714 * except.c (prepare_eh_table_type): Use new encoding for exception
7715 handlers when using -fno-assume-compiled.
7716
7717 2003-08-13 Tom Tromey <tromey@redhat.com>
7718
7719 * gcj.texi (Invoking gij): Document -X and -?.
7720
7721 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
7722
7723 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
7724 GCJH_OBJS, JCFDUMP_OBJS
7725 * win32-host.c: Removed the unnecessary and broken dependency
7726 on jcf.h
7727
7728 2003-08-11 Tom Tromey <tromey@redhat.com>
7729
7730 * parse.y (java_check_regular_methods): Typo fixes. Call
7731 check_interface_throws_clauses. Use
7732 check_concrete_throws_clauses.
7733 (check_interface_throws_clauses): New function.
7734 (check_concrete_throws_clauses): New function.
7735 (hack_is_accessible_p): New function.
7736 (find_most_specific_methods_list): Added FIXME.
7737 * typeck.c (lookup_do): Use `flags' argument to decide what to
7738 do. Reimplemented.
7739 (lookup_argument_method_generic): New function.
7740 (lookup_argument_method2): Removed.
7741 * jcf.h (ACC_INVISIBLE): New define.
7742 * jcf-write.c (generate_classfile): Skip invisible methods.
7743 * class.c (add_miranda_methods): New function.
7744 (layout_class_methods): Use it.
7745 (get_access_flags_from_decl): Use ACC_INVISIBLE.
7746 * java-tree.h (METHOD_INVISIBLE): New define.
7747 (lang_decl_func) [invisible]: New field.
7748 (lookup_argument_method_generic): Declare.
7749 (SEARCH_INTERFACE): New define.
7750 (SEARCH_SUPER): Likewise.
7751 (SEARCH_ONLY_INTERFACE): Likewise.
7752 (SEARCH_VISIBLE): Likewise.
7753 (lookup_argument_method2): Removed declaration.
7754
7755 2003-08-05 Tom Tromey <tromey@redhat.com>
7756
7757 Fix for PR java/11600:
7758 * parse.y (java_complete_lhs): See whether we're calling a method
7759 on an array.
7760 (check_thrown_exceptions): Added `is_array_call' argument;
7761 fixed `clone' checking; updated all callers.
7762
7763 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
7764
7765 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
7766
7767 2003-08-03 Tom Tromey <tromey@redhat.com>
7768
7769 * java-tree.h (METHOD_TRANSIENT): Removed.
7770 * decl.c (pushdecl): Removed some dead code.
7771 * class.c (get_access_flags_from_decl): Can't have transient
7772 method.
7773 (add_method_1): Can't have a transient method.
7774
7775 2003-07-28 Andreas Jaeger <aj@suse.de>
7776
7777 * jvspec.c: Convert to ISO C90 prototypes.
7778
7779 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
7780
7781 * decl.c (force_poplevels): Fix warning call.
7782
7783 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7784
7785 * expr.c (expand_java_field_op): Don't use xxx_with_decl
7786 (expand_java_field_op): Likewise.
7787 * class.c (layout_class_method): Likewise
7788 (emit_register_classes): Likewise.
7789 * decl.c (pushdecl): Likewise.
7790 (poplevel): Likewise.
7791 (force_poplevels): Likewise.
7792 (give_name_to_locals): Likewise.
7793 * check-init.c (check_for_initialization): Likewise.
7794
7795 2003-07-24 Jason Merrill <jason@redhat.com>
7796
7797 * java-tree.h: Move boolean_type_node et al to the back end.
7798
7799 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7800
7801 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7802 casts.
7803
7804 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
7805
7806 * lang.opt: Don't show -MD_ and -MDD_.
7807
7808 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
7809
7810 * lang-options.h: Remove.
7811 * lang.opt: Add help text.
7812
7813 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
7814
7815 * expr.c: Remove the last argument to expand_assignment().
7816
7817 2003-07-09 Jan Hubicka <jh@suse.cz>
7818
7819 * java-tree.h (DECL_NUM_STMTS): Rename to...
7820 (DECL_ESTIMATED_INSNS): ... this.
7821 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7822 New static functions.
7823 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7824 * parser.y (add_stmt_to_compound): Do not account statements.
7825
7826 2003-07-08 Mark Wielaard <mark@klomp.org>
7827
7828 * gcj.texi: CNI now expands to Compiled Native Interface.
7829
7830 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7831
7832 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7833
7834 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
7835
7836 * expr.c (expand_byte_code): Adjist emit_line_note call.
7837
7838 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
7839
7840 * lang.c (java_handle_option): Don't handle filenames.
7841
7842 2003-07-02 Zack Weinberg <zack@codesourcery.com>
7843
7844 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7845 DIR_SEPARATOR.
7846 Use FILENAME_CMP.
7847 * jcf-write.c: Don't default-define DIR_SEPARATOR.
7848 * jcf.h: Delete COMPARE_FILENAMES definition.
7849
7850 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
7851
7852 * lang.c (java_init_options): Update prototype.
7853
7854 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
7855
7856 * decl.c (poplevel): Adjust define_label call.
7857
7858 2003-06-27 Zack Weinberg <zack@codesourcery.com>
7859
7860 * gjavah.c (flag_jni): Make non-static.
7861 * parse-scan.y (ctxp): Make non-static.
7862
7863 * class.c (build_method_symbols_entry)
7864 * expr.c (get_offset_table_index)
7865 * jcf-parse.c (jcf_parse):
7866 Mark the definition static, matching the forward declaration.
7867
7868 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
7869
7870 * lang.c (java_handle_option): Don't check for missing arguments.
7871
7872 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
7873
7874 * class.c (push_class): Use a location_t to save place.
7875 (emit_register_classes): Set input_location. Adjust
7876 expand_function_end call.
7877 * resource.c (write_resource_constructor): Likewise.
7878 * decl.c (end_java_method): Adjust expand_function_end call.
7879 * parse.y (source_end_java_method): Likewise.
7880
7881 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
7882
7883 * lang.c (java_handle_option): Likewise.
7884
7885 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
7886
7887 * lang.c (java_handle_option): Special-casing of optional
7888 joined arguments no longer needed.
7889 * lang.opt: Update switches that take optional argument.
7890
7891 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7892
7893 * lang.opt: Declare Java.
7894 * lang.c (java_init_options): Update.
7895
7896 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
7897
7898 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7899
7900 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7901
7902 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7903 * lang.c (java_handle_option): -MD and -MMD have an underscore.
7904 * lang.opt: -MD and -MMD have an underscore.
7905
7906 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
7907
7908 * class.c (emit_register_classes): Adjust init_function_start
7909 call.
7910 * decl.c (complete_start_java_method): Likewise.
7911 * resource.c (write_resource_constructor): Likewise.
7912
7913 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
7914
7915 * Make-lang.in: Update to use options.c and options.h.
7916 * lang.c: Include options.h not j-options.h.
7917 (java_handle_option): Abort on unrecognized option.
7918 (java_init_options): Request Java switches.
7919
7920 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
7921
7922 * Make-lang.in: Handle mostlyclean.
7923
7924 2003-06-11 Tom Tromey <tromey@redhat.com>
7925
7926 * lang.c (java_handle_option): Update dependency_tracking for
7927 OPT_MF case.
7928
7929 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7930 empty argument.
7931
7932 2003-06-10 Andrew Haley <aph@redhat.com>
7933
7934 * resource.c (write_resource_constructor): Use expand_expr to
7935 generate the address of the label attached to a resource.
7936 * Make-lang.in (java/resource.o): Add expr.h
7937
7938 2003-06-10 Andrew Haley <aph@redhat.com>
7939
7940 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7941 (java_decl_ok_for_sibcall): New.
7942
7943 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
7944
7945 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7946 (java/j-options.c, java/j-options.h): New.
7947 * java-tree.h (resource_name, compile_resource_file,
7948 compile_resource_data): Constify.
7949 * jcf-write.c (jcf_write_base_directory): Similarly.
7950 * jcf.h (jcf_write_base_directory): Similarly.
7951 * lang.c: Include j-options.h.
7952 (cl_options_count, cl_options, string_option, java_decode_option,
7953 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7954 process_option_with_no): Remove.
7955 (resource_name): Constify.
7956 (LANG_HOOKS_HANDLE_OPTION): Override.
7957 (java_handle_option): New.
7958 (java_init): Don't call jcf_path_init.
7959 (java_init_options): Call jcf_path_init.
7960 * lang.opt: New.
7961 * resource.c (compile_resource_data, compile_resource_file): Constify.
7962
7963 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
7964
7965 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7966 (struct lang_decl_func): Add last_line field.
7967 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7968 DECL_SOURCE_LINE_LAST): Remove.
7969 * parse.y (missing_return_error, finish_method_declaration,
7970 lookup_cl, start_artificial_method_body, source_end_java_method,
7971 start_complete_expand_method): Adjust.
7972
7973 2003-06-08 Tom Tromey <tromey@redhat.com>
7974
7975 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7976 fno-assume-compiled.
7977
7978 2003-06-08 Roger Sayle <roger@eyesopen.com>
7979
7980 * builtins.c (define_builtin_type, builtin_types): Delete.
7981 (define_builtin): Rewritten to take just the built-in code,
7982 the function's name, type and fallback library function name.
7983 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7984 (initialize_builtins): Overhaul to define the GCC builtins
7985 used by gcj manually, providing the Java run-time's
7986 implementations as the fallback library function.
7987
7988 2003-06-08 Anthony Green <green@redhat.com>
7989
7990 * parse.y (patch_cast): Fix conversions from floating-point to
7991 integral types.
7992
7993 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
7994
7995 * Make-lang.in: Update.
7996 * lang.c: Include opts.h. Define cl_options_count and cl_options.
7997
7998 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
7999
8000 * lang.c (java_init_options): Update.
8001
8002 2003-06-05 Jan Hubicka <jh@suse.cz>
8003
8004 * Make-lang.in: Add support for stageprofile and stagefeedback
8005
8006 2003-05-31 Roger Sayle <roger@eyesopen.com>
8007
8008 * lang.c (java_init_options): Prescribe wrap-around two's
8009 complement arithmetic overflow by setting flag_wrapv.
8010
8011 2003-05-29 Roger Sayle <roger@eyesopen.com>
8012
8013 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
8014 (builtin_record): Add an additional builtin_code field to
8015 record which GCC built-in corresponds to the Java function.
8016 (java_builtins): Add new entries for atan, atan2, exp, log,
8017 pow and tan.
8018 (max_builtin, min_builtin, abs_builtin): Perform constant
8019 folding on the resulting tree.
8020 (java_build_function_call_expr): Likewise, perform constant
8021 folding on the resulting tree.
8022 (initialize_builtins): The NULL creators are now allowed in
8023 the java_builtins table, which is now terminated by an entry
8024 with builtin_code == END_BUILTINS.
8025 (check_for_builtin): Likewise. If the matching creator is
8026 NULL, construct the call using java_build_function_call_expr
8027 directly with the decl for the corresponding builtin_code.
8028
8029 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
8030
8031 * win32-host.c: Normalize copyright boilerplate.
8032
8033 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8034
8035 * parse.y (print_int_node): Use string concatentation on
8036 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
8037 function calls into one.
8038
8039 2003-05-13 Zack Weinberg <zack@codesourcery.com>
8040
8041 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
8042 fatal_io_error with calls to fatal_error; add ": %m" to the end of
8043 all the affected error messages.
8044
8045 2003-05-13 Richard Henderson <rth@redhat.com>
8046
8047 * class.c (layout_class_method): Set DECL_EXTERNAL.
8048 * decl.c (java_mark_decl_local, java_mark_class_local): New.
8049 * java-tree.h (java_mark_class_local): Declare.
8050 * jcf-parse.c (parse_class_file): Use it.
8051 * parse.y (java_expand_classes): Likewise.
8052
8053 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
8054
8055 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
8056 * lex.h: #include input.h.
8057 * jv-scan.c (input_filename): Remove.
8058
8059 2003-05-02 Tom Tromey <tromey@redhat.com>
8060
8061 PR java/10491:
8062 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8063 (handle_inner_classes): New function.
8064
8065 2003-05-01 Tom Tromey <tromey@redhat.com>
8066
8067 PR java/10459:
8068 * parse.y (finish_for_loop): Do nothing if update expression is a
8069 EXPR_WFL_NODE wrapping nothing.
8070 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
8071
8072 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
8073
8074 * lex.h (input_lineno): Remove declaration.
8075 * parse-scan.y: #include input.h.
8076 (input_filename): Remove declaration.
8077 (input_location): Add definition.
8078 (input_line): Remove definition.
8079
8080 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
8081
8082 * lex.h (lineno): Rename to ...
8083 (input_line): ... here
8084 * parse-scan.y (lineno): Rename to ...
8085 (input_line): ... here.
8086 (reset_report): Rename lineno to input_line.
8087 * check-init.c (check_init): Likewise.
8088 * class.c (push_class): Likewise.
8089 * decl.c (complete_start_java_method, end_java_method): Likewise.
8090 * expr.c (expand_byte_code): Likewise.
8091 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
8092 * jcf-write.c (generate_bytecode_insns): Likewise.
8093 * lex.c (java_init_lex, java_allocate_new_line,
8094 do_java_lex): Likewise.
8095 * parse.h (YYNOT_TWICE): Likewise.
8096 * parse.y (empty_statement, expression_statement,
8097 java_pop_parser_context, java_parser_context_save_global,
8098 yyerror, register_fields, method_header, safe_layout_class,
8099 find_in_imports_on_demand, create_artificial_method,
8100 source_end_java_method, start_complete_expand_method,
8101 build_thisn_assign, java_complete_lhs,
8102 maybe_absorb_scoping_block): Likewise.
8103
8104 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
8105
8106 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
8107 '/' when computing java source filename
8108
8109 2003-04-13 Tom Tromey <tromey@redhat.com>
8110
8111 * gjavah.c (print_c_decl): Indentation fix.
8112
8113 2003-04-12 Zack Weinberg <zack@codesourcery.com>
8114
8115 * class.c (make_field_value, make_method_value, get_dispatch_table)
8116 (make_class_data, emit_offset_symbol_table)
8117 * constants.c (build_constants_constructor)
8118 * java-tree.h (START_RECORD_CONSTRUCTOR)
8119 * parse.y (maybe_build_array_element_wfl):
8120 Use build_constructor.
8121
8122 2003-04-10 Eric Blake <ebb9@email.byu.edu>
8123
8124 PR java/10253:
8125 * parse.y (string_convert_int_cst): Always use at least one digit
8126 in string conversion. Remove ASCII dependence.
8127 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
8128
8129 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
8130
8131 * Make-lang.in: added win32-host.c
8132 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
8133 resolves to open() on non-Win32 platforms and
8134 Win32-specific jcf_open_exact_case() on Win32
8135 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
8136 when trying .java and .class files
8137 * win32-host.c: added to repository. Defines
8138 Win32-specific jcf_open_exact_case()
8139
8140 2003-04-10 Andrew Haley <aph@redhat.com>
8141
8142 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
8143 (maybe_free_localvar): Renamed from localvar_free.
8144 Add new arg, really.
8145 (generate_bytecode_insns): Set new variable, jsrs.
8146 Only free local vars if no jsr insns have been emittted.
8147 Call maybe_free_localvar, not localvar_free.
8148
8149 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
8150
8151 * gcj.texi: Remove @ at start of file.
8152
8153 2003-03-25 Tom Tromey <tromey@redhat.com>
8154
8155 * parse.y (create_interface): Call CHECK_DEPRECATED.
8156
8157 2003-03-23 Zack Weinberg <zack@codesourcery.com>
8158
8159 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
8160
8161 2003-03-21 Zack Weinberg <zack@codesourcery.com>
8162
8163 * javaop.h (jfloat, jdouble): Make them structures mirroring
8164 the bit fields of IEEE float and double respectively.
8165 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
8166 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
8167 (union Word, union DWord): Delete.
8168 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
8169
8170 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
8171 D_NAN_MASK): Delete.
8172 (jni_print_float, jni_print_double): New. Generate
8173 hexadecimal floating constants.
8174 (print_field_info): Use jni_print_float/double.
8175
8176 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
8177 finite floating point numbers for output; special case
8178 non-finite floats.
8179
8180 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
8181
8182 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
8183 Replace 0 and 1 with true and false in return statements.
8184
8185 2003-03-19 Tom Tromey <tromey@redhat.com>
8186
8187 * lex.c (do_java_lex): Renamed from java_lex.
8188 (java_lex): New function.
8189 Include timevar.h.
8190
8191 2003-03-13 Tom Tromey <tromey@redhat.com>
8192
8193 * parse.y (resolve_inner_class): Error if qualifier is a primitive
8194 type.
8195
8196 2003-03-04 Andrew Haley <aph@redhat.com>
8197
8198 * gjavah.c (is_first_data_member): New global variable.
8199 (print_c_decl): If it's the first data member, align it as the
8200 superclass.
8201 (process_file): Set is_first_data_member.
8202
8203 2003-03-11 Tom Tromey <tromey@redhat.com>
8204
8205 * parse.y (resolve_field_access): Initialize class if field is
8206 found in another static field.
8207 * expr.c (build_class_init): Don't optimize out initialization of
8208 implemented interface.
8209
8210 2003-03-11 Andrew Haley <aph@redhat.com>
8211
8212 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
8213 warning.
8214
8215 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
8216
8217 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
8218 and DIR_SEPARATOR_2 for a target.
8219 Correct minor typos.
8220
8221 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
8222 and DIR_SEPARATOR_2 for a target into account.
8223
8224 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
8225
8226 * lang.c (java_init): Update prototype, move code to java_post_options.
8227 (java_post_options): Similarly.
8228
8229 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
8230
8231 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
8232 compare file name components depending on the case-sensitivity
8233 or otherwise of the host file system.
8234
8235 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
8236 "strcmp" to compare file name components.
8237 Use IS_DIR_SEPARATOR instead of comparing directly against
8238 DIR_SEPARATOR.
8239 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
8240 comparing directly against DIR_SEPARATOR.
8241
8242 2003-03-04 Tom Tromey <tromey@redhat.com>
8243
8244 * Make-lang.in (java.tags): New target.
8245
8246 2003-03-01 Roger Sayle <roger@eyesopen.com>
8247
8248 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
8249 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
8250
8251 2003-03-01 Tom Tromey <tromey@redhat.com>
8252
8253 * parse.y (jdep_resolve_class): Only check deprecation if we found
8254 a decl.
8255
8256 2003-02-28 Tom Tromey <tromey@redhat.com>
8257
8258 PR java/9695:
8259 * class.c (maybe_layout_super_class): Always pass a WFL to
8260 do_resolve_class.
8261 * parse.y (do_resolve_class): Updated comment to explain
8262 parameters.
8263
8264 2003-02-26 Tom Tromey <tromey@redhat.com>
8265
8266 * jcf-write.c (generate_classfile): Check whether class is
8267 deprecated before writing attribute count.
8268
8269 2003-02-25 Roger Sayle <roger@eyesopen.com>
8270
8271 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
8272 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
8273
8274 2003-02-23 Tom Tromey <tromey@redhat.com>
8275
8276 * lang-options.h: Added -Wdeprecated.
8277 * gcj.texi (Warnings): Document -Wdeprecated.
8278 * java-tree.h (flag_deprecated): Declare.
8279 * lang.c (lang_W_options): Added deprecated.
8280 (flag_deprecated): New global.
8281 * chartables.h: Rebuilt.
8282 * gen-table.pl (process_one): Look at whitespace.
8283 (print_tables): Define LETTER_SPACE, LETTER_MASK.
8284 * parse.h (CLEAR_DEPRECATED): New macro.
8285 (CHECK_DEPRECATED_NO_RESET): New macro.
8286 * jcf-parse.c (handle_deprecated): New function.
8287 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
8288 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
8289 * parse.y (resolve_type_during_patch): Check deprecation.
8290 (jdep_resolve_class): Likewise.
8291 (process_imports): Likewise.
8292 (resolve_expression_name): Likewise.
8293 (check_deprecation): Strip arrays from decl. Check
8294 flag_deprecated.
8295 (patch_method_invocation): Also check the particular constructor
8296 for deprecation.
8297 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
8298 * jcf-write.c (append_deprecated_attribute): New function.
8299 (generate_classfile): Generate deprecated attribute when
8300 appropriate.
8301 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
8302 (java_lex) [case '*']: Simplify logic.
8303 (java_start_char_p): Use LETTER_MASK.
8304 (java_part_char_p): Likewise.
8305 (java_space_char_p): New function.
8306
8307 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
8308
8309 Change base class access representation.
8310 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
8311 (add_interface_do): Likewise.
8312
8313 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
8314
8315 * decl.c (java_init_decl_processing): Change
8316 soft_lookupjnimethod_node to reflect the change in
8317 signature of _Jv_LookupJNIMethod in libjava/jni.cc
8318 * expr.c (build_jni_stub): Calculate and pass the size
8319 on the stack of the arguments to a JNI function. Use
8320 new target macro MODIFY_JNI_METHOD_CALL to allow a
8321 target to modify the call to a JNI method.
8322
8323 2003-02-08 Roger Sayle <roger@eyesopen.com>
8324
8325 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
8326 instead of basename to avoid compiler warnings on Tru64.
8327
8328 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
8329
8330 * gcj.texi: Update to GFDL 1.2.
8331
8332 2003-01-31 Andrew Haley <aph@redhat.com>
8333
8334 * parse.y (java_expand_classes): Scan the whole class list looking
8335 for access methods that haven't yet been expanded.
8336
8337 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
8338
8339 Fix for java/4269:
8340
8341 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
8342 to fix bootstrap on sparc-unknown-netbsdelf1.5.
8343 * jcf-parse.c: Likewise.
8344
8345 2003-01-31 Mark Wielaard <mark@klomp.org>
8346
8347 * gjavah.c (throwable_p): Allocate 1 more byte for string.
8348
8349 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
8350
8351 * class.c (make_class): Use BINFO_ELTS.
8352 (set_super_info): Likewse.
8353 (add_interface_do): Likewise.
8354
8355 2003-01-30 Tom Tromey <tromey@redhat.com>
8356
8357 * jcf-parse.c (read_class): Update identifier's class value if it
8358 changed during parsing.
8359
8360 2003-01-30 Loren James Rittle <ljrittle@acm.org>
8361
8362 * Make-lang.in (po-generated): Find the targets in $(parsedir).
8363 Propagate change to all other rules as required.
8364 (java/parse-scan.o): Add explicit dependency on
8365 $(parsedir)/java/parse-scan.c .
8366
8367 2003-01-29 Tom Tromey <tromey@redhat.com>
8368
8369 * parse.y (patch_assignment): Only transform the rhs of an
8370 assignment when compiling to native.
8371
8372 2003-01-28 Tom Tromey <tromey@redhat.com>
8373
8374 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
8375
8376 2003-01-28 Tom Tromey <tromey@redhat.com>
8377
8378 * lex.c (java_lex): Don't include UEOF as part of token.
8379 (java_read_unicode): Error if \u sequence prematurely terminated.
8380
8381 2003-01-27 Tom Tromey <tromey@redhat.com>
8382
8383 * parse.y (java_check_regular_methods): Check for construct after
8384 checking types in throws clause.
8385
8386 2003-01-24 Tom Tromey <tromey@redhat.com>
8387
8388 * class.c (build_static_field_ref): Only a String or numeric field
8389 can fold to a constant.
8390
8391 2003-01-23 Tom Tromey <tromey@redhat.com>
8392
8393 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
8394 file name in resource buffer.
8395
8396 2003-01-23 Tom Tromey <tromey@redhat.com>
8397
8398 * expr.c (build_known_method_ref): Use method's context to find
8399 method table index.
8400
8401 2003-01-23 Tom Tromey <tromey@redhat.com>
8402
8403 * constants.c (set_constant_entry): Allocated cleared memory.
8404
8405 2003-01-22 Tom Tromey <tromey@redhat.com>
8406
8407 * java-tree.h: Don't use PARAMS.
8408 * resource.c: Add prototypes for all functions.
8409 (write_resource_constructor): Use `const char *' to avoid
8410 warning.
8411
8412 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
8413
8414 * jcf-parse.c (process_zip_dir): Remove unused variable.
8415
8416 2003-01-22 Tom Tromey <tromey@redhat.com>
8417
8418 * expr.c (build_invokeinterface): Abort if method's context is not
8419 an interface.
8420
8421 2003-01-22 Tom Tromey <tromey@redhat.com>
8422
8423 * gcj.texi (Input and output files): Mention non-class entries.
8424 * decl.c (java_init_decl_processing): Call
8425 init_resource_processing.
8426 * java-tree.h (compile_resource_data, write_resource_constructor,
8427 compile_resource_file, init_resource_processing): Declare.
8428 * config-lang.in (gtfiles): Added resource.c.
8429 * Make-lang.in (gt-java-resource.h): New target.
8430 (JAVA_OBJS): Added resource.o.
8431 (java/resource.o): New target.
8432 * resource.c: New file.
8433 * class.c (compile_resource_file): Moved to resource.c.
8434 (registerResource_libfunc): Likewise.
8435 (utf8_decl_list): Mark with GTY; now static.
8436 * jcf-parse.c (classify_zip_file): New function.
8437 (parse_zip_file_entries): Use it; compile .properties files.
8438 (process_zip_dir): Use classify_zip_file and compute_class_name.
8439 Don't write class name into zip directory.
8440 (java_parse_file): Call write_resource_constructor.
8441 (compute_class_name): New function.
8442 * jcf-io.c (read_zip_member): Reindented.
8443
8444 2003-01-21 Tom Tromey <tromey@redhat.com>
8445
8446 * class.c (supers_all_compiled): New function.
8447 (make_class_data): Use it.
8448
8449 2003-01-21 Tom Tromey <tromey@redhat.com>
8450
8451 * parse.y (method_header): Native method can't be strictfp.
8452 No method can be transient or volatile.
8453
8454 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8455
8456 Make-lang.in (jvspec.o-warn): Add -Wno-error.
8457
8458 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
8459
8460 * check-init.c: Fix comment typos.
8461 * class.c: Likewise.
8462 * constants.c: Likewise.
8463 * decl.c: Likewise.
8464 * except.c: Likewise.
8465 * expr.c: Likewise.
8466 * java-except.h: Likewise.
8467 * java-tree.h: Likewise.
8468 * javaop.h: Likewise.
8469 * jcf-dump.c: Likewise.
8470 * jcf-io.c: Likewise.
8471 * jcf-parse.c: Likewise.
8472 * jcf-write.c: Likewise.
8473 * lang.c: Likewise.
8474 * mangle.c: Likewise.
8475 * typeck.c: Likewise.
8476 * verify.c: Likewise.
8477
8478 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8479
8480 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
8481 * jcf-write.c: Include "tm_p.h".
8482
8483 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8484
8485 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
8486
8487 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8488
8489 * builtins.c (java_build_function_call_expr): Renamed from
8490 build_function_call_expr. All callers changed.
8491
8492 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
8493 * jcf-parse.c: Include tm_p.h.
8494
8495 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
8496 warning.
8497
8498 2003-01-14 Tom Tromey <tromey@redhat.com>
8499
8500 * class.c (make_class_data): Check that super is compiled before
8501 building class reference to it.
8502
8503 2003-01-14 Andrew Haley <aph@redhat.com>
8504
8505 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8506 varargs function -- correct.
8507
8508 2003-01-14 Andrew Haley <aph@redhat.com>
8509
8510 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
8511
8512 2003-01-14 Andrew Haley <aph@redhat.com>
8513
8514 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8515 varargs function -- correct.
8516
8517 * parse.y (patch_assignment): Copy the rhs of an assignment into a
8518 temporary if the RHS is a reference.
8519
8520 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8521
8522 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
8523 * keyword.h: Regenerated.
8524
8525 * All Files: Convert to ISO C style function definitions.
8526
8527 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
8528
8529 * parse.y (check_pkg_class_access): ANSIfy definition.
8530
8531 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8532
8533 * decl.c, parse-scan.y, parse.y: Don't cast return value of
8534 xmalloc et al.
8535
8536 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
8537
8538 2003-01-09 Geoffrey Keating <geoffk@apple.com>
8539
8540 Merge from pch-branch:
8541
8542 2002-12-02 Geoffrey Keating <geoffk@apple.com>
8543
8544 * Make-lang.in (java/gjavah.o): Update dependencies.
8545 * gjavah.c: Include ggc.h.
8546
8547 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
8548
8549 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
8550 (JCFDUMP_OBJS): Add ggc-none.o.
8551 (java/jcf-dump.o): Depend on GGC_H.
8552 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
8553 CPool substructures.
8554 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
8555 * jcf-dump.c: Include ggc.h.
8556
8557 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
8558
8559 * jcf.h (union cpool_entry): New.
8560 (struct CPool): Use gengtype to mark. Change field 'data' to be
8561 an array of unions.
8562 (struct JCF): Use gengtype to mark.
8563 (CPOOL_UINT): Update for new cpool_entry type.
8564 (CPOOL_USHORT1): Likewise.
8565 (CPOOL_USHORT2): Likewise.
8566 (CPOOL_FINISH): Use GC to free cpool subfields.
8567 * parse.h (struct parser_ctxt): Mark field current_jcf.
8568 * lex.c (java_init_lex): Use GC to allocate struct JCF.
8569 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
8570 (main_jcf): Use gengtype to mark.
8571 (ggc_mark_jcf): Delete.
8572 (get_constant): Update for new cpool_entry type.
8573 (give_name_to_class): Likewise.
8574 (get_class_constant): Likewise.
8575 (init_outgoing_cpool): Use GGC to allocate struct CPool.
8576 (java_parse_file): Use GGC to allocate struct JCF.
8577 (init_jcf_parse): Don't call ggc_add_root.
8578 * jcf-reader.c (jcf_parse_constant_pool): Update for new
8579 cpool_entry type.
8580 * java-tree.h (current_jcf): Use gengtype to mark.
8581 (CPOOL_UTF): Update for new cpool_entry type.
8582 (outgoing_cpool): Use gengtype to mark.
8583 (struct lang_type): GC struct JCF and struct CPool.
8584 * config-lang.in (gtfiles): Add jcf.h.
8585 * constants.c (find_tree_constant): New.
8586 (set_constant_entry): Allocate cpool subfields using GGC. Update
8587 for new cpool_entry type.
8588 (find_constant1): Update for new cpool_entry type.
8589 (find_constant2): Likewise.
8590 (find_utf8_constant): Use find_tree_constant.
8591 (find_class_or_string_constant): Remove unnecessary cast to jword.
8592 Update for new cpool_entry type.
8593 (count_constant_pool_bytes): Update for new cpool_entry type.
8594 (write_constant_pool): Likewise.
8595 (alloc_name_constant): Use find_tree_constant.
8596 (build_constants_constructor): Update for new cpool_entry type.
8597
8598 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
8599
8600 * parse.y (mark_parser_ctxt): Delete.
8601 (goal): Don't use ggc_add_root.
8602 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
8603 (java_pop_parser_context): Let GC free parser_ctxt.
8604 (java_parser_context_resume): Likewise.
8605 * parse.h (struct parser_ctxt): Use gengtype to mark.
8606 (ctxp): Likewise.
8607 (ctxp_for_generation): Likewise.
8608 * lex.h (struct java_lc_s): Mark for gengtype.
8609 (java_lexer): Rearrange for gengtype.
8610 * config-lang.in (gtfiles): Add lex.h, parse.h.
8611
8612 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8613
8614 * All Files: Remove PARAMS macro.
8615
8616 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
8617 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
8618 `__STDC__' macros.
8619
8620 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
8621 VA_CLOSE.
8622
8623 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
8624
8625 * Make-lang.in (java.install-common, java.uninstall,
8626 java.install-info, java.install-man): Prepend $(DESTDIR)
8627 to destination paths in all (un)installation commands.
8628 (java.install-common): Rewrite $(LN) command to support
8629 DESTDIR with "ln" as well as with "ln -s".
8630
8631 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
8632
8633 * java-tree.h: Protect against multiple inclusion.
8634
8635 2003-01-07 Tom Tromey <tromey@redhat.com>
8636
8637 * class.c (add_assume_compiled): Don't adjust parent if we're
8638 already at the root of tree.
8639
8640 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8641
8642 * lang.c (dump_compound_expr): Prototype.
8643
8644 2003-01-03 Tom Tromey <tromey@redhat.com>
8645
8646 Fix for PR java/8712:
8647 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
8648 when simply checking against `null'.
8649
8650 2003-01-03 Tom Tromey <tromey@redhat.com>
8651
8652 * gcj.texi (Standard Properties): Document http.proxyHost and
8653 http.proxyPort.
8654
8655 * gcj.texi (GNU Classpath Properties): Document new properties.
8656
8657 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8658
8659 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
8660 java/lang-options.h, java/mangle.c, java/mangle_name.c,
8661 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
8662
8663 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
8664
8665 * Make-lang.in, boehm.c, buffer.c,
8666 buffer.h, builtins.c, class.c,
8667 config-lang.in, constants.c,
8668 convert.h, decl.c, except.c,
8669 expr.c, java-except.h,
8670 java-tree.h, javaop.def,
8671 jcf-parse.c, jcf-write.c,
8672 jv-scan.c, jvgenmain.c,
8673 jvspec.c, keyword.gperf,
8674 keyword.h, lang-options.h,
8675 lang-specs.h, lang.c, lex.c,
8676 lex.h, mangle.c, mangle_name.c,
8677 parse-scan.y, parse.h, parse.y,
8678 typeck.c, verify.c, xref.c,
8679 xref.h: Replace "GNU CC" with
8680 "GCC" in the copyright header.
8681
8682 * check-init.c, gjavah.c, javaop.h,
8683 jcf-depend.c, jcf-dump.c, jcf-io.c,
8684 jcf-path.c, jcf-reader.c, jcf.h,
8685 zextract.c, zipfile.h: These files are
8686 "part of GCC". Also say "GCC" not "GNU CC".
8687
8688 2002-12-30 DJ Delorie <dj@redhat.com>
8689
8690 * Make-lang.in: Protect against texi2pod/pod2man failing.
8691
8692 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
8693
8694 * gcj.texi: Use @copying.
8695
8696 2002-12-27 Mark Mitchell <mark@codesourcery.com>
8697
8698 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
8699 print_cxx_classname.
8700 (print_cxx_classname): Add add_scope parameter.
8701 (print_class_decls): Do not emit a semicolon after the extern
8702 "Java" block.
8703 (process_file): Adjust calls to print_cxx_classname.
8704
8705 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
8706
8707 * gcj.texi: Include Cover Texts in man page.
8708
8709 2002-12-23 Jeff Sturm <jsturm@one-point.com>
8710
8711 * class.c (build_static_field_ref): Check FIELD_FINAL.
8712
8713 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
8714 instead of current_constant_pool_data_ref.
8715 * java-tree.h (current_constant_pool_data_ref): Undefine.
8716 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
8717 * jcf-parse.c (init_outgoing_cpool): Don't initialize
8718 current_constant_pool_data_ref.
8719
8720 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
8721 not build_internal_class_name.
8722
8723 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
8724 Use it when class ref isn't certain to be compiled.
8725
8726 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
8727
8728 * gcj.texi: Include gcc-common.texi.
8729 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
8730 $(srcdir)/doc/include/gcc-common.texi.
8731
8732 2002-12-22 Anthony Green <green@redhat.com>
8733
8734 * gcj.texi (Limitations): Add note about org.xml.sax and
8735 org.w3c.dom.
8736
8737 2002-12-20 Tom Tromey <tromey@redhat.com>
8738
8739 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
8740 where minimum case value is Integer.MIN_VALUE.
8741 Fixes PR java/8955.
8742
8743 2002-12-18 Andrew Haley <aph@redhat.com>
8744
8745 * parse.y (patch_invoke): Force evaluation order when `check' is
8746 set. For PR libgcj/8945.
8747
8748 2002-12-16 Mark Mitchell <mark@codesourcery.com>
8749
8750 * gcj.texi: Change version number to 3.4.
8751
8752 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
8753 Andrew Haley <aph@redhat.com>
8754
8755 * parse.y (source_end_java_method): Remove custom encoding of line
8756 numbers for a function decl before passing it to the back end.
8757
8758 2002-12-03 Andrew Haley <aph@redhat.com>
8759
8760 * class.c (make_class_data): New field, "chain".
8761 * decl.c (java_init_decl_processing): Likewise.
8762
8763 2002-12-02 Tom Tromey <tromey@redhat.com>
8764
8765 For PR java/8740:
8766 * parse.y (do_resolve_class): Handle qualified name via
8767 recursion.
8768
8769 2002-11-30 Zack Weinberg <zack@codesourcery.com>
8770
8771 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
8772 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
8773 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
8774 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
8775 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
8776 Include coretypes.h and tm.h.
8777 * Make-lang.in: Update dependencies.
8778
8779 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8780
8781 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8782
8783 2002-11-25 Diego Novillo <dnovillo@redhat.com>
8784
8785 * jcf-reader.c: Don't expand JCF_readu4 inside the
8786 expansion of JCF_SKIP.
8787
8788 2002-11-25 Diego Novillo <dnovillo@redhat.com>
8789
8790 * jcf-reader.c: Don't expand JCF_readu4 inside the
8791 expansion of JCF_SKIP.
8792
8793 2002-11-22 Tom Tromey <tromey@redhat.com>
8794
8795 * parse.y (patch_binop): Cast right hand side of shift expression
8796 to `int'. Fixes PR java/8676.
8797
8798 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
8799 Andrew Haley <aph@redhat.com>
8800
8801 * gcc/java/jcf-write.c (write_classfile): Remove target
8802 class file, if it exists, before renaming the temporary
8803 class file to it.
8804
8805 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
8806
8807 * jvspec.c (lang_specific_spec_functions): New.
8808
8809 2002-11-18 Tom Tromey <tromey@redhat.com>
8810
8811 Fix for PR java/7912:
8812 * expr.c (can_widen_reference_to): Allow cast of array to
8813 Cloneable or Serializable.
8814 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8815 (java_io_serializable_identifier_node): Likewise.
8816 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8817 (valid_ref_assignconv_cast_p): Use new identifier nodes.
8818 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8819 java_io_serializable.
8820 * decl.c (java_init_decl_processing): Initialize
8821 java_lang_cloneable_identifier_node and
8822 java_io_serializable_identifier_node.
8823 (java_lang_cloneable_identifier_node): New global.
8824 (java_io_serializable_identifier_node): Likewise.
8825
8826 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
8827
8828 * buffer.c: Remove unnecessary casts.
8829 * check-init.c: Likewise.
8830 * class.c: Likewise.
8831 * constants.c: Likewise.
8832 * decl.c: Likewise.
8833 * except.c: Likewise.
8834 * gjavah.c: Likewise.
8835 * jcf-io.c: Likewise.
8836 * jcf-parse.c: Likewise.
8837 * jcf-path.c: Likewise.
8838 * jvspec.c: Likewise.
8839 * lang.c: Likewise.
8840 * lex.c: Likewise.
8841 * verify.c: Likewise.
8842
8843 2002-11-06 Tom Tromey <tromey@redhat.com>
8844
8845 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8846 a JNI header.
8847
8848 2002-11-05 Tom Tromey <tromey@redhat.com>
8849
8850 Fix for PR java/6388.
8851 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8852 * java-tree.h (enum java_tree_index): New values
8853 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8854 (decimal_int_max, decimal_long_max): New defines.
8855 * lex.c (yylex): Rewrote range checking. Sign extend literals.
8856 (error_if_numeric_overflow): Rewrote range checking.
8857 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8858 decimal_long_max.
8859
8860 2002-11-02 Tom Tromey <tromey@redhat.com>
8861
8862 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8863
8864 * class.c (make_method_value): Put class name, not signature, into
8865 `throws' field. For PR java/8415.
8866
8867 2002-10-24 Tom Tromey <tromey@redhat.com>
8868
8869 * gcj.texi (Invoking gij): Document --showversion.
8870 (Standard Properties): java.library.path now set.
8871
8872 2002-10-23 Tom Tromey <tromey@redhat.com>
8873
8874 * gjavah.c (decode_signature_piece): In JNI mode, print
8875 `jobjectArray' when array depth is nonzero.
8876 Fixes PR java/8296.
8877
8878 2002-10-15 Andrew Haley <aph@redhat.com>
8879
8880 * parse.y (patch_invoke): Call force_evaluation_order on a static
8881 arg list.
8882 (resolve_qualified_expression_name): Call force_evaluation_order
8883 on a arg list that is part of a Qualified Expression Name.
8884
8885 * lang.c (dump_compound_expr): New.
8886 (java_dump_tree): New.
8887
8888 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
8889
8890 * gcj.texi: Added item describing the GCJ runtime property
8891 "gnu.gcj.progname".
8892
8893 2002-10-15 Richard Henderson <rth@redhat.com>
8894
8895 * jcf-parse.c (get_constant): Fix type warning.
8896
8897 2002-10-15 Andrew Haley <aph@redhat.com>
8898
8899 * java-tree.h (java_inlining_merge_static_initializers): Declare.
8900 (java_inlining_map_static_initializers): Declare.
8901
8902 2002-10-14 Andrew Haley <aph@redhat.com>
8903
8904 * tree-inline.c (remap_block): All local class initialization
8905 flags go in the outermost scope.
8906 (expand_call_inline): Call java_inlining_map_static_initializers.
8907 (expand_call_inline): Call java_inlining_merge_static_initializers.
8908 * java/lang.c (merge_init_test_initialization): New.
8909 (java_inlining_merge_static_initializers): New.
8910 (inline_init_test_initialization): New.
8911 (java_inlining_map_static_initializers): New.
8912
8913 2002-10-11 Mark Wielaard <mark@klomp.org>
8914
8915 * gcj.texi (Compatibility): Add Limitations and Extensions section.
8916
8917 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8918
8919 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8920
8921 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8922
8923 * parse.y (merge_string_cste): Add parentheses around & within |.
8924
8925 2002-10-08 Tom Tromey <tromey@redhat.com>
8926
8927 * parse.y (variable_declarator_id): Simplify error path for
8928 array declarator error. For PR java/8003.
8929
8930 2002-10-08 Zack Weinberg <zack@codesourcery.com>
8931
8932 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8933 bug_report_url.
8934
8935 2002-10-08 Andrew Haley <aph@redhat.com>
8936
8937 * parse.y (attach_init_test_initialization_flags): Check for
8938 error_mark_node.
8939
8940 2002-10-07 Anthony Green <green@redhat.com>
8941
8942 * parse.y (merge_string_cste): Fix bug in string concatenation.
8943
8944 2002-10-03 Michael Koch <konqueror@gmx.de>
8945
8946 * gcj.texi (Standard properties):
8947 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8948
8949 2002-10-02 Roger Sayle <roger@eyesopen.com>
8950
8951 PR optimization/6627
8952 * lang.c (java_init): If storing the vbit in function
8953 pointers, ensure that force_align_functions_log is atleast
8954 one to aid compatability with g++ vtables.
8955
8956 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
8957
8958 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8959 foul of type-based aliasing.
8960
8961 2002-09-30 Anthony Green <green@redhat.com>
8962
8963 * gcj.texi (Invoking jv-scan): Fix texinfo.
8964
8965 2002-09-28 Anthony Green <green@redhat.com>
8966
8967 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8968 (Code Generation): Add -fno-assert documentation.
8969 * jv-scan.c (flag_assert): New global.
8970 (options): Add assert option.
8971 (help): Add --no-assert documentation.
8972 * parse-scan.y (flag_assert): New global.
8973 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8974 (flag_assert): New global.
8975 * java-tree.h (flag_assert): New global.
8976 * lex.c (java_lex): Obey flag_assert.
8977 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8978 calling cc1.
8979
8980 2002-09-26 Andrew Haley <aph@redhat.com>
8981
8982 * expr.c (build_java_array_length_access): Check for null pointer.
8983 * expr.c (expand_java_arrayload): Likewise.
8984
8985 2002-09-21 Richard Henderson <rth@redhat.com>
8986
8987 * jcf-parse.c (get_constant): Decode from IEEE no matter
8988 what the target format.
8989
8990 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
8991
8992 * ChangeLog: Follow spelling conventions.
8993 * class.c: Likewise.
8994 * decl.c: Likewise.
8995 * expr.c: Likewise.
8996 * gjavah.c: Likewise.
8997 * java-tree.h: Likewise.
8998 * jcf-dump.c: Likewise.
8999 * jcf-parse.c: Likewise.
9000 * jvspec.c: Likewise.
9001 * lang.c: Likewise.
9002 * mangle.c: Likewise.
9003 * parse.y: Likewise.
9004
9005 2002-09-17 Tom Tromey <tromey@redhat.com>
9006
9007 * lex.c (java_read_unicode_collapsing_terminators): Handle case
9008 where \r appears at EOF. Fixes PR java/7950.
9009
9010 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
9011
9012 * jvspec.c (lang_specific_driver): Remove unused variable.
9013
9014 2002-09-16 Geoffrey Keating <geoffk@apple.com>
9015
9016 * java-tree.h (union lang_tree_node): Add chain_next option.
9017
9018 2002-09-16 Richard Henderson <rth@redhat.com>
9019
9020 * jcf-parse.c (get_constant): Runtime check for IEEE format;
9021 use new real.h interface.
9022 * jcf-write.c (find_constant_index): Use new real.h interface.
9023 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
9024
9025 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
9026
9027 * lang.c: Follow spelling conventions.
9028
9029 2002-09-11 Per Bothner <per@bothner.com>
9030
9031 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
9032 constant to the type of the field.
9033 (java_complete_tree): Remove now-redundant code.
9034
9035 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
9036
9037 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
9038
9039 For PR java/5794:
9040 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
9041 return label if a ret instruction for the jsr has been reached.
9042
9043 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
9044
9045 * parse.y (DIR_SEPARATOR): Don't define.
9046 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
9047
9048 2002-08-28 Andrew Haley <aph@redhat.com>
9049
9050 * verify.c (verify_jvm_instructions): Allow exception handler
9051 inside code that is being protected, but generate a warning.
9052 * except.c (link_handler): Initialize `expanded' in new eh_range.
9053 (binding_depth, is_class_level, current_pc): Declare extern.
9054
9055 2002-09-01 Mark Wielaard <mark@klomp.org>
9056
9057 * gcj.texi: Add chapter about system properties.
9058 Fixed some typos.
9059
9060 2002-08-26 Tom Tromey <tromey@redhat.com>
9061
9062 * parse.y (try_builtin_assignconv): Allow narrowing primitive
9063 conversion if RHS_TYPE is byte, short, or char.
9064
9065 2002-08-22 Tom Tromey <tromey@redhat.com>
9066
9067 * gcj.texi (Invoking gij): Document -cp and -classpath.
9068
9069 2002-08-21 Tom Tromey <tromey@redhat.com>
9070
9071 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
9072 $(prefix)/share. For PR libgcj/7633.
9073
9074 For PR java/6005 and PR java/7611:
9075 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
9076 (java_can_use_bit_fields_p): New function.
9077
9078 2002-08-16 Tom Tromey <tromey@redhat.com>
9079
9080 * gcj.texi (Class Initialization): Mention class initialization of
9081 arrays.
9082
9083 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
9084
9085 * Make-lang.in (java-tree-inline.o): New.
9086 (JAVA_OBJS): Add java-tree-inline.o.
9087 * parse.y (source_end_java_method): Call java_optimize_inline.
9088 (java_expand_method_bodies): Save method's tree in
9089 DECL_SAVED_TREE.
9090 (add_stmt_to_compound): Keep track of the number of statments.
9091 * lang.c (java_init): Enable flag_inline_trees.
9092 (java_post_options): If flag_inline_functions is on, enable
9093 flag_inline_trees instread.
9094 (decl_constant_value): New.
9095 (java_tree_inlining_walk_subtrees): New.
9096 * java-tree.h (DECL_NUM_STMTS): New macro.
9097 (java_optimize_inline): Declare.
9098 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
9099 Handle a LABEL_EXPR.
9100 * decl.c (build_result_decl): If we already have a DECL_RESULT
9101 don't make another.
9102 (dump_function): New.
9103 (java_optimize_inline): New.
9104 (dump_function): New.
9105
9106 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
9107
9108 For PR java/7483:
9109 * parse.y (build_assertion): Invert return from
9110 desiredAssertionStatus.
9111
9112 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9113
9114 * jcf-write.c (get_access_flags): Return correct access flags for
9115 private and protected inner classes.
9116
9117 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
9118
9119 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
9120
9121 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
9122
9123 * mangle_name.c: Don't include obstack.h twice.
9124 * xref.c: Don't include obstack.h.
9125
9126 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
9127
9128 * class.c: (permanent_obstack): Delete declaration.
9129 * constants.c: (permanent_obstack): Delete declaration.
9130 * except.c: (permanent_obstack): Delete declaration.
9131 * expr.c: (permanent_obstack): Delete declaration.
9132 * jcf-parse.c: (permanent_obstack): Delete declaration.
9133 (saveable_obstack): Delete declaration.
9134 * parse.h: (permanent_obstack): Delete declaration.
9135 * typeck.c: (permanent_obstack): Delete declaration.
9136
9137 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
9138
9139 * gcj.texi (version-gcc): Increase to 3.3.
9140
9141 2002-07-22 Tom Tromey <tromey@redhat.com>
9142
9143 * lex.c (java_lex): Check for `e' or `E' after 0.
9144
9145 2002-07-21 Richard Henderson <rth@redhat.com>
9146
9147 * lang.c (java_unsafe_for_reeval): New.
9148 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
9149
9150 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
9151
9152 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
9153 (jcf_path_init): Use GET_ENVIRONMENT.
9154
9155 2002-07-10 Roger Sayle <roger@eyesopen.com>
9156 Zack Weinberg <zack@codesourcery.com>
9157
9158 * builtins.c (initialize_builtins): Remove defines that
9159 handled C/C++ specific junk hereby removed from builtins.def.
9160
9161 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
9162
9163 * lang.c (java_post_options): Update prototype.
9164
9165 2002-07-05 Roger Sayle <roger@eyesopen.com>
9166
9167 * builtins.c (initialize_builtins): Ignore the additional
9168 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
9169 the builtins.def file.
9170
9171 2002-07-01 Tom Tromey <tromey@redhat.com>
9172
9173 For PR libgcj/7073:
9174 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
9175 specially.
9176
9177 2002-07-01 Roger Sayle <roger@eyesopen.com>
9178
9179 * java/decl.c (builtin_function): Accept additional parameter.
9180 (java_init_decl_processing): Pass an additional NULL_TREE
9181 argument to builtin_function.
9182
9183 2002-06-29 T.J. Mather <tjmather@maxmind.com>
9184
9185 * gcj.texi: Fixed gcj invocation example so that it compiles.
9186
9187 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9188
9189 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
9190 * parse.y (mark_parser_ctxt): Likewise.
9191 (check_modifiers, declare_local_variables): Avoid incorrect
9192 hardcoded constant 10.
9193
9194 * lex.c (java_read_char): Avoid "comparison is always true"
9195 warning.
9196
9197 2002-06-25 Andreas Schwab <schwab@suse.de>
9198
9199 * expr.c (JSR): Avoid undefined operation on PC.
9200
9201 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9202
9203 * decl.c (clear_binding_level): Const-ify.
9204
9205 2002-06-13 Akim Demaille <akim@epita.fr>
9206
9207 * parse.y (class_declaration, interface_declaration): Make sure
9208 all their rules have an action, in order to avoid meaningless `$$
9209 = $1' and their type clashes.
9210
9211 2002-06-11 Tom Tromey <tromey@redhat.com>
9212
9213 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
9214 * parse-scan.y (statement_without_trailing_substatement): Added
9215 assert_statement.
9216 (assert_statement): New rule.
9217 * java-tree.h (struct lang_type) [assertions]: New field.
9218 (TYPE_USES_ASSERTIONS): New macro.
9219 (CLASS_USES_ASSERTIONS): Likewise.
9220 (FIELD_SYNTHETIC): New define.
9221 * lex.c (java_lval;): Added ASSERT_TK.
9222 * parse.y (ASSERT_TK): Added.
9223 (statement_without_trailing_substatement): Added assert_statement.
9224 (assert_statement): New rule.
9225 (build_assertion): New function.
9226 (maybe_generate_pre_expand_clinit): Create and initialize
9227 $assertionsDisabled.
9228 (lookup_package_type): Removed decl.
9229 * keyword.h: Rebuilt.
9230 * keyword.gperf (assert): New token.
9231
9232 2002-06-10 Akim Demaille <akim@epita.fr>
9233
9234 * parse.y (interface_type_list, class_member_declaration)
9235 (unary_expression_not_plus_minus): Remove duplicate %type.
9236 Whitespace changes.
9237
9238 2002-06-09 Tom Tromey <tromey@redhat.com>
9239
9240 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
9241
9242 * parse.y (method_header): Give error message in all cases.
9243 Fixes PR java/6865.
9244
9245 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9246
9247 Don't use RTL inlining. Fix for PR java/6820.
9248 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
9249 (flag_really_inline): New.
9250 (java_decode_option): Set flag_really_inline if -finline-functions
9251 is seen.
9252 (java_post_options): New function. Turn off inlining unless
9253 flag_really_inline is set.
9254
9255 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9256
9257 * gjavah.c (throwable_p): Accept argument as either a classname or
9258 signature fragment. Create null-terminated classname string for super
9259 when calling itself recursively.
9260 (decode_signature_piece): Skip first character from class name
9261 signature when calling throwable_p.
9262
9263 2002-06-08 H.J. Lu (hjl@gnu.org)
9264
9265 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
9266
9267 2002-06-04 Tom Tromey <tromey@redhat.com>
9268
9269 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
9270
9271 2002-06-04 Michael Koch <konqueror@gmx.de>
9272
9273 * gcj.texi (Input Options): Fixed typo.
9274
9275 2002-06-04 Zack Weinberg <zack@codesourcery.com>
9276
9277 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
9278 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
9279 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
9280 and all now-pointless local variables. Rename other local
9281 variables to reflect their not being handles.
9282
9283 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
9284 #if JCF_USE_STDIO blocks.
9285
9286 * parse.y: Add missing semicolon at end of rule.
9287
9288 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
9289
9290 * check-init.c (attach_initialized_static_class): Delete, unused.
9291 * parse.y: Use htab_t instead of struct hashtable, update
9292 all uses.
9293 * java-tree.h: Include hashtab.h instead of hash.h.
9294 (struct lang_decl_func): Use htab_t, set up for gengtype.
9295 (struct init_test_hash_entry): Delete.
9296 (struct treetreehash_entry): New.
9297 (java_treetreehash_find): New
9298 (java_treetreehash_new): New prototype.
9299 (java_treetreehash_create): New prototype.
9300 (java_mark_tree): Delete prototype.
9301 (java_hash_hash_tree_node): Delete prototype.
9302 (java_hash_compare_tree_node): Delete prototype.
9303 (attach_initialized_static_class): Delete prototype.
9304 * expr.c (build_class_init): Update to use java_treetreehash
9305 functions.
9306 (java_expand_expr): Update to use htab_t.
9307 (emit_init_test_initialization): Likewise.
9308 * decl.c (java_mark_tree): Delete.
9309 * class.c (init_test_hash_newfunc): Delete.
9310 (java_hash_hash_tree_node): Delete.
9311 (java_hash_compare_tree_node): Delete.
9312 (add_method_1): Update to use java_treetreehash functions.
9313 (JAVA_TREEHASHHASH_H): New macro.
9314 (java_treetreehash_hash): New function.
9315 (java_treetreehash_compare): New function.
9316 (java_treetreehash_find): New function.
9317 (java_treetreehash_new): New function.
9318 (java_treetreehash_create): New function.
9319 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
9320
9321 * Make-lang.in (java/parse.o): Depend on debug.h.
9322 * java-tree.h (struct lang_identifier): Use gengtype.
9323 (union lang_tree_node): New.
9324 (struct lang_decl_func): Use gengtype.
9325 (struct lang_decl_var): Likewise.
9326 (struct lang_decl): Likewise.
9327 * parse.y: Include debug.h.
9328 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
9329
9330 * lang.c (struct language_function): New dummy structure.
9331
9332 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
9333 descriminator for DECL_LANG_SPECIFIC.
9334 (struct lang_decl_func): Rename from struct lang_decl.
9335 (enum lang_decl_desc): New.
9336 (struct lang_decl): Make it a union. Update all the accessor macros.
9337 (struct lang_type): Use gengtype.
9338 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
9339 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
9340 are now the same size.
9341 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
9342 use discriminator to mark DECL_LANG_SPECIFIC.
9343
9344 * Make-lang.in (gt-java-builtins.h): New rule.
9345 (java/builtins.o): Add dependency on gt-<filename>.h.
9346 * builtins.c: Use gengtype for roots.
9347 (union string_or_tree): Use gengtype.
9348 (struct builtin_record): Use gengtype.
9349 * config-lang.in (gtfiles): Add builtins.c.
9350
9351 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
9352 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
9353 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
9354 gt-java-parse.h, gtype-java.h): Add rules to generate.
9355 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
9356 (class.o): Add dependency on gt-*.h.
9357 (constants.o): Likewise.
9358 (decl.o): Likewise.
9359 (expr.o): Likewise.
9360 (jcf-parse.o): Likewise.
9361 (jcf-write.o): Likewise.
9362 (lang.o): Likewise.
9363 * config-lang.in (gtfiles): New.
9364 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9365 * constants.c: Replace uses of ggc_add_* with GTY markers.
9366 Include gt-*.h.
9367 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9368 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9369 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
9370 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
9371 Include gt-*.h.
9372 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
9373 Include gt-*.h.
9374 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9375 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
9376 gt-*.h.
9377 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9378 Include gtype-java.h.
9379
9380 2002-06-02 Tom Tromey <tromey@redhat.com>
9381
9382 Fix for PR java/5913:
9383 * parse.y (patch_binop): Call patch_string on op1.
9384
9385 2002-06-02 Tom Tromey <tromey@redhat.com>
9386
9387 Fix for PR java/1343, PR java/6336:
9388 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
9389 formatting. Changed return type.
9390 (anonymous_class_counter): Moved to top of file.
9391 (maybe_make_nested_class_name): Append number to class name for
9392 function-local classes.
9393
9394 2002-05-28 Zack Weinberg <zack@codesourcery.com>
9395
9396 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
9397 * Make-lang.in: Update dependency lists.
9398
9399 2002-05-18 Mark Mitchell <mark@codesourcery.com>
9400
9401 * gjavah.c (throwable_p): Do not free the name of the class after
9402 passing it to find_class.
9403 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
9404 * jcf-io.c (dirent.h): Include it.
9405 (fnmatch.h): Likewise.
9406 (compare_path): New function.
9407 (java_or_class_file): Likewise.
9408 (memoized_dirlist_entry): New type.
9409 (memoized_dirlist_lookup_eq): New function.
9410 (memoized_dirlists): New variable.
9411 (caching_stat): New function.
9412 (memoized_class_lookup_eq): New function.
9413 (memoized_class_lookups): Likewise.
9414 (find_class): Use memoized_class_lookups and caching_stat.
9415 * jcf.h (JCF_USE_SCANDIR): Define.
9416 * parse.y (java_expand_classes): Write the class files in reverse
9417 order.
9418
9419 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9420
9421 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
9422
9423 2002-05-13 Mark Mitchell <mark@codesourcery.com>
9424
9425 * jcf-write.c (write_classfile): Unlink the temporary file if it
9426 cannot be renamed. Use concat to build up the name of the
9427 temporary file.
9428
9429 2002-05-08 Mark Mitchell <mark@codesourcery.com>
9430
9431 * jcf-write.c (write_classfile): Write the file to a
9432 temporary file and then rename it.
9433
9434 2002-05-07 Tom Tromey <tromey@redhat.com>
9435
9436 * gjavah.c (throwable_p): Use xstrdup, not strdup.
9437
9438 Fix for PR java/1200:
9439 * gjavah.c (throwable_p): New function.
9440 (decode_signature_piece): Use it. A `WeakReference' isn't the
9441 same as a `jweak'.
9442 Include hashtab.h.
9443 (gcjh_streq): New function.
9444
9445 2002-05-07 Andreas Jaeger <aj@suse.de>
9446
9447 * parse.y (finish_for_loop): Fix if statement.
9448
9449 2002-05-06 Tom Tromey <tromey@redhat.com>
9450
9451 Fix for PR java/5941:
9452 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
9453 loop update expression.
9454 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
9455 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
9456
9457 2002-05-04 Mark Wielaard <mark@klomp.org>
9458
9459 For PR java/6519:
9460 * parse.y (build_string_concatenation): Return just op1 only when op2
9461 is null and op1 is a STRING_CST, otherwise always construct a
9462 StringBuffer.
9463
9464 2002-04-27 Tom Tromey <tromey@redhat.com>
9465
9466 For PR java/6382:
9467 * parse.y (string_convert_int_cst): New function.
9468 (merge_string_cste): Use it.
9469
9470 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9471
9472 * java-tree.h (java_parse_file): Update.
9473 (java_set_yydebug): Remove.
9474 * jcf-parse.c (yydebug): Remove.
9475 (java_set_yydebug): Die.
9476 (java_parse_file): Update.
9477 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9478
9479 2002-04-24 Tom Tromey <tromey@redhat.com>
9480
9481 For PR java/6425:
9482 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
9483 EXPR_WFL_QUALIFICATION of qual_wfl.
9484
9485 2002-04-23 Per Bothner <per@bothner.com>
9486
9487 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
9488 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
9489 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
9490
9491 2002-04-23 Tom Tromey <tromey@redhat.com>
9492
9493 For PR java/6314:
9494 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
9495 recognize `-fcompile-resource='.
9496 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
9497 a bit.
9498
9499 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
9500
9501 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
9502 paths. Fixes PR java/2791.
9503
9504 2002-04-19 Andrew Haley <aph@redhat.com>
9505
9506 * jcf-write.c (push_long_const): lo, hi: New variables.
9507 Use rshift_double to extract the high part of a 64-bit long.
9508 Use WORD_TO_INT to extract the low part.
9509
9510 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
9511 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
9512 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
9513
9514 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9515
9516 * typeck.c (incomplete_type_error): Remove.
9517
9518 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9519
9520 * class.c (make_class_data): Set DECL_ALIGN on static class data,
9521 for hash synchronization.
9522 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
9523 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
9524 class_type_node.
9525
9526 2002-04-16 Mark Wielaard <mark@klomp.org>
9527
9528 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
9529 negative zero.
9530
9531 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9532
9533 Fix for PR java/6294:
9534 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
9535 interfaces.
9536
9537 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9538
9539 Fix for PR java/6085:
9540 * parse.y (patch_method_invocation): Always use build_access_to_thisn
9541 to get enclosing "this" argument for inner-class constructor
9542 invocation. Pass correct arguments to build_access_to_thisn.
9543
9544 2002-04-10 Andreas Jaeger <aj@suse.de>
9545
9546 * gcj.texi (Input Options): Fix extdirs patch.
9547
9548 2002-04-10 Anthony Green <green@redhat.com>
9549
9550 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
9551
9552 2002-04-09 Anthony Green <green@redhat.com>
9553
9554 * gcj.texi (Input Options): Add --extdirs documentation.
9555 * jcf-dump.c (OPT_extdirs): New macro.
9556 (options): Add extdirs option.
9557 (help): Describe --extdirs.
9558 (main): Handle OPT_extdirs.
9559 * gjavah.c (OPT_extdirs): New macro.
9560 (options): Add extdirs option.
9561 (help): Describe --extdirs.
9562 (main): Handle OPT_extdirs.
9563 * jcf-path.c (jcf_path_init): Add extdirs support.
9564 (jcf_path_extdirs_arg): New function.
9565 (extensions): New variable to hold extensions path entries.
9566 * jvspec.c: Remove -fextdirs= when compiling main().
9567 * lang.c (java_decode_option): Handle -fextdirs=.
9568 * jcf.h (jcf_path_extdirs_arg): Declare new function.
9569 * Make-lang.in: Compile jcf-path with version info for use in
9570 identifying the appropriate libgcj.jar.
9571
9572 2002-04-08 Tom Tromey <tromey@redhat.com>
9573
9574 For PR libgcj/5303:
9575 * .cvsignore: Added rmic.1 and rmiregistry.1.
9576 * gcj.texi (Top): Link to new nodes.
9577 (Invoking rmic): New node.
9578 (Invoking rmiregistry): Likewise.
9579 * Make-lang.in (java.generated-manpages): Added rmic.1 and
9580 rmiregistry.1.
9581 (java.maintainer-clean): Likewise.
9582 ($(srcdir)/java/rmic.1): New target.
9583 ($(srcdir)/java/rmiregistry.1): Likewise.
9584 (java.install-man): Handle rmic.1 and rmiregistry.1.
9585
9586 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9587
9588 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
9589 Add note about handling uncaught exceptions. Add an exception handler
9590 to example.
9591
9592 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9593
9594 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
9595 after using it to patch CALL_EXPR.
9596
9597 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9598
9599 * gcj.texi (Invocation): Document CNI invocation API.
9600
9601 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9602
9603 * expr.c (truthvalue_conversion): Rename. Update.
9604 (expand_compare): Update.
9605 * java-tree.h (java_truthvalue_conversion): New.
9606 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9607
9608 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9609
9610 * java-tree.h (java_mark_addressable): New.
9611 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9612 * typeck.c (mark_addressable): Rename, update.
9613
9614 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9615
9616 * expr.c (build_java_binop): Update.
9617 * java-tree.h (java_signed_type, java_unsigned_type,
9618 java_signed_or_unsigned_type): Update.
9619 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9620 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9621 * parse.y (patch_binop): Update.
9622 * typeck.c (signed_or_unsigned_type, unsigned_type,
9623 signed_type): Update.
9624
9625 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9626
9627 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9628 (java_dummy_print): Remove.
9629 (lang_print_error): Rename. Exit early if inhibiting output.
9630 (inhibit_error_printing_function): New.
9631 (java_init): Don't set hook.
9632 (lang_init_source): Use new boolean.
9633
9634 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
9635
9636 * parse.y (do_resolve_class): Fix infinite recursion.
9637
9638 2002-03-29 Tom Tromey <tromey@redhat.com>
9639
9640 * parse.y (check_inner_circular_reference): Ignore incomplete
9641 types.
9642
9643 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9644
9645 * Make-lang.in (builtins.o): Update.
9646 * boehm.c (get_boehm_type_descriptor): Update.
9647 * builtins.c: Include langhooks.h.
9648 * decl.c (java_init_decl_processing): Update.
9649 * java-tree.h (java_type_for_mode, java_type_for_size): New.
9650 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
9651 Redefine.
9652 * typeck.c (type_for_mode, type_for_size): Update.
9653
9654 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
9655
9656 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
9657
9658 2002-03-28 Tom Tromey <tromey@redhat.com>
9659
9660 * except.c (expand_end_java_handler): If the handler type is NULL,
9661 use java.lang.Throwable. Fixes PR java/5986.
9662
9663 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9664
9665 Fix for PR java/4715:
9666 * jcf-parse.c (parse_source_file_3): New function.
9667 (read_class): Call it.
9668 (java_parse_file): Likewise.
9669
9670 2002-03-28 Jan Hubicka <jh@suse.cz>
9671
9672 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
9673
9674 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9675
9676 * parse.y (resolve_package): Initialize "decl".
9677 (lookup_package_type): Remove unused function.
9678
9679 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9680
9681 Fix for PR java/5993:
9682 * parse.y (resolve_package): Return the decl if resolution was
9683 successful. Don't special case "java.lang" and "java.lang.reflect"
9684 packages. Set type_name to the merged identifier.
9685 (resolved_qualified_expression_name): Print error using "name" if
9686 resolve_package returns NULL_TREE.
9687
9688 2002-03-27 Tom Tromey <tromey@redhat.com>
9689
9690 * expr.c (expand_invoke): Don't generate null pointer check if
9691 we're calling <init>.
9692
9693 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9694
9695 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
9696 fix prototype.
9697 * java-tree.h (java_lang_expand_expr): Similarly.
9698 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9699 (java_init): Don't set hook.
9700
9701 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9702
9703 Fix for PR java/5850:
9704 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
9705 context if field was not found in the current scope.
9706 * expr.c (lookup_field): Don't look in enclosing contexts.
9707
9708 2002-03-26 Tom Tromey <tromey@redhat.com>
9709
9710 Fix for PR java/5942:
9711 * parse.y (init_src_parse): Added sanity check.
9712 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
9713 elements, not 11.
9714
9715 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
9716
9717 * decl.c (lang_mark_tree): Rename java_mark_tree.
9718 * java-tree.h (java_mark_tree): New.
9719 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9720
9721 2002-03-25 Zack Weinberg <zack@codesourcery.com>
9722
9723 * lex.c: Change java_perform_atof to take normal parameters
9724 instead of a pointer to a parameter block. Call it directly
9725 from java_lex.
9726
9727 2002-03-22 Mark Wielaard <mark@klomp.org>
9728
9729 Fix for PR java/5368:
9730 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
9731 when printing error message.
9732
9733 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
9734
9735 * decl.c (maybe_build_cleanup): Remove.
9736
9737 2002-03-22 Tom Tromey <tromey@redhat.com>
9738
9739 Andrew Haley <aph@cambridge.redhat.com>
9740
9741 * expr.c (build_field_ref): Don't build a check if the field is a
9742 member of `this'.
9743
9744 2002-03-21 Eric Blake <ebb9@email.byu.edu>
9745
9746 Fix for PR java/6026:
9747 * lex.c (java_lex): Fix parsing of consecutive floats.
9748
9749 2002-03-21 Tom Tromey <tromey@redhat.com>
9750
9751 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
9752 class.
9753
9754 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
9755
9756 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9757 insert_block, getdecls, kept_level_p, global_bindings_p): New.
9758
9759 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9760
9761 * gcj.texi: @code{gcj} becomes @command{gcj}.
9762 @code{gcc} becomes @command{gcc}.
9763 GcjRaw changed to gnu.gcc.RawData.
9764
9765 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
9766
9767 * decl.c (start_java_method): Use new hook.
9768 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9769 (java_init): Remove old hook.
9770
9771 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
9772
9773 * builtins.c (define_builtin): Do nothing if `type' is null.
9774 Fixes PR java/5876.
9775
9776 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9777
9778 * parse.y (parser_check_super_interface): Fix error message
9779 grammar/order.
9780
9781 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9782
9783 * jcf-parse.c (get_constant): Delete unused variables.
9784
9785 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
9786
9787 * java-tree.h (java_parse_file): New.
9788 * jcf-parse.c (yyparse): Rename java_parse_file.
9789 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9790
9791 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9792
9793 * parse.y (craft_constructor): Return the constructor decl.
9794 (java_expand_classes): Update comments.
9795 (lookup_method_invoke): Call fix_constructors immediately for
9796 anonymous class. Fixes PR java/5935.
9797
9798 2002-03-15 Anthony Green <green@redhat.com>
9799
9800 * jcf-parse.c (yyparse): Don't emit class registration
9801 constructor when compiling resource files.
9802
9803 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9804
9805 * lang.c (java_tree_code_type, java_tree_code_length,
9806 tree_code_name): Delete.
9807 (tree_code_type, tree_code_length, tree_code_name): Define.
9808 (java_init): Don't try to copy into the various tree_code
9809 arrays.
9810
9811 2002-03-12 Tom Tromey <tromey@redhat.com>
9812
9813 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9814 UTF-8, not UCS-2. Fixes PR java/5923.
9815
9816 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9817 a call_expr wrapped in a convert. Fixes PR java/5848.
9818
9819 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9820
9821 * jcf-write.c (write_classfile): Improve error strings.
9822
9823 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9824
9825 * lex.c: Adjust comments to GNU standards.
9826
9827 2002-03-11 Eric Blake <ebb9@email.byu.edu>
9828
9829 Fix for PR java/5902:
9830 * lex.c (java_lex): Fix parsing of literals.
9831
9832 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9833
9834 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9835 to prevent it getting evaluated twice in the store checking case.
9836 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9837 examining OBJECT.
9838
9839 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9840
9841 * decl.c (java_init_decl_processing): Make sure class_type_node
9842 alignment is not less than 64 bits if hash synchronization is enabled.
9843
9844 2002-03-08 Per Bothner <per@bothner.com>
9845
9846 * parse.y (java_complete_lhs): Check if patch_assignment
9847 returned an error-mark.
9848
9849 * parse.y (try_builtin_assignconv): Don't special-case zero.
9850
9851 2002-03-08 Per Bothner <per@bothner.com>
9852
9853 Fix for PR java/5812.
9854 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
9855 here instead of in JSR macro. Likewise with load_type_state call.
9856 Do the latter on if the return_pc has been verified (the jsr returns).
9857 (JSR): Now just call build_java_jsr.
9858
9859 2002-03-07 Jeff Sturm <jsturm@one-point.com>
9860
9861 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9862 (java.install-common): Link native driver to
9863 JAVA_TARGET_INSTALL_NAME.
9864
9865 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
9866
9867 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9868 * builtins.c(sin_builtin): Likewise
9869 * builtins.c(sqrt_builtin): Likewise
9870
9871 2002-03-03 Zack Weinberg <zack@codesourcery.com>
9872
9873 * java/expr.c, java/jcf-parse.c, java/lex.c:
9874 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9875 REAL_ARITHMETIC blocks unconditional. Delete some further
9876 #ifdef blocks predicated on REAL_ARITHMETIC.
9877
9878 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9879
9880 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9881 explicit sizeof/sizeof.
9882 * decl.c (java_init_decl_processing): Likewise.
9883 * jcf-parse.c (init_jcf_parse): Likewise.
9884 * parse.y (init_src_parse): Likewise.
9885
9886 2002-03-02 Per Bothner <per@bothner.com>
9887
9888 Make --CLASSPATH by a synonym for --classpath and -classpath.
9889 Implement --bootclasspath.
9890 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
9891 (classpath_l): Remove.
9892 (jcf_path_CLASSPATH_arg): Remove.
9893 (jcf_path_bootclasspath_arg): New function.
9894 (jcf_path_seal): Simplify accordingly.
9895
9896 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
9897 (jcf_path_CLASSPATH): Remove declaration.
9898 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
9899 (lang_specific_driver): Translate -bootclasspath.
9900 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
9901 * lang.c (decode_lang_options): Do jcf_path_init first.
9902 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
9903 * gjavah.c: Also handle --bootclasspath.
9904 Handle --CLASSPATH as a synonum for --classpath.
9905 * jcf-dump.c: Likewise.
9906
9907 "." is not part of system path, but is the default for --classpath.
9908 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
9909 (jcf_path_seal): Add "." if no CLASSPATH specified.
9910
9911 * gcj.texi: Document changes.
9912
9913 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9914
9915 * expr.c (build_java_arraystore_check): Fix formatting.
9916
9917 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9918
9919 Fix for PR java/5758, java/5632:
9920 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9921 inner-class separator too.
9922 * parse.y (do_resolve_class): New local `decl_result.'
9923 Progressively build a name for what can have been loaded.
9924
9925 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9926
9927 * expr.c (java_array_data_offset): Removed function.
9928 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9929 (build_java_array_length_access): Obtain "length" value using a
9930 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9931 (build_java_arrayaccess): Correct comment. Access "data" using a
9932 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9933 (build_java_arraystore_check): New function.
9934 (expand_java_arraystore): Use build_java_arraystore_check.
9935 * parse.y (patch_assignment): Simplify code to insert a store check
9936 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9937 * check-init.c (check_init): Update to reflect that an array length
9938 access is now a COMPONENT_REF.
9939 * gcj.texi (Code Generation): Improve documentation of
9940 -fno-bounds-check. Add documentation for -fno-store-check.
9941 * java-tree.h (flag_store_check): Declare.
9942 (build_java_arraystore_check): Declare.
9943 * lang.c (flag_store_check): Initialize to 1.
9944 (lang_f_options): Add store-check option.
9945 * jvspec.c: Don't pass store-check option to jvgenmain.
9946 * lang-options.h: Add help string for -fno-store-check.
9947
9948 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9949
9950 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9951 * java-tree.h (java_dup_lang_specific_decl): New.
9952 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9953
9954 2002-02-27 Zack Weinberg <zack@codesourcery.com>
9955
9956 * builtins.c, decl.c: Delete traditional-mode-related code
9957 copied from the C front end but not used, or used only to
9958 permit the compiler to link.
9959
9960 2002-02-22 Tom Tromey <tromey@redhat.com>
9961
9962 Fix for PR java/2369:
9963 * jvspec.c (verify_class_name): New function.
9964 (lang_specific_driver): Call it.
9965 (JAVA_START_CHAR_P): New macro.
9966 (JAVA_PART_CHAR_P): Likewise.
9967
9968 2002-02-22 Per Bothner <per@bothner.com>
9969
9970 * class.c: Change vtable to be more compatible with g++ v3 abi.
9971 (get_dispatch_table): Prepend offset-to-top (always 0) and
9972 type_info pointer (currently unimplemented hence NULL) to vtable.
9973 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9974 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
9975 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9976 (build_dtable_decl): Add declarations for new fields.
9977
9978 2002-02-20 Per Bothner <per@bothner.com>
9979
9980 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9981 to finit$ (otherwise generate_bytecode_insns drops it). However, we
9982 don't need to set it on the COMPOUND_EXPR - the caller does that.
9983
9984 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9985
9986 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9987 `--CLASSPATH' becomes `--classpath.'
9988 * gjavah.c: Likewise.
9989 * jcf-dump.c: Likewise.
9990 * lang-options.h: Likewise.
9991 * lang.c: Likewise.
9992 * jcf-path.c: Updated comment.
9993 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9994 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9995 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9996 (jcf_path_CLASSPATH_arg): Ditto.
9997 (classpath_u): Updated leading comment.
9998
9999 2002-02-20 Per Bothner <per@bothner.com>
10000
10001 * builtins.c (check_for_builtin): New function.
10002 (build_call_or_builtin): Remove.
10003 * java-tree.h: Update accordingly.
10004 * expr.c (expand_invoke): Use build + check_for_builtin instead
10005 of build_call_or_builtin.
10006 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
10007 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
10008 flag (which had caused jcf-write to incorrectly emit invokevirtual).
10009
10010 2002-02-17 Tom Tromey <tromey@redhat.com>
10011
10012 * java-tree.h (TYPE_STRICTFP): New macro.
10013 (struct lang_type) [strictfp]: New field.
10014 (CLASS_STRICTFP): New macro.
10015 (METHOD_STRICTFP): New macro.
10016 (struct lang_decl) [strictfp]: New field.
10017 * parse.y (method_header): Disallow strictfp constructor or
10018 abstract method.
10019 (STRICT_TK): Move before MODIFIER_TK.
10020 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
10021 (METHOD_MODIFIERS): Likewise.
10022 (INTERFACE_MODIFIERS): Likewise.
10023 * jcf-write.c (get_access_flags): Likewise.
10024 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
10025 (add_method_1): Likewise.
10026 (get_access_flags_from_decl): Likewise.
10027 * jcf-dump.c (print_access_flags): Print in standard order. Also,
10028 recognize strictfp flag.
10029 * jcf.h (ACC_STRICT): New define.
10030
10031 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
10032
10033 * class.c(build_utf8_ref): Move declaration of decl_size
10034
10035 2002-02-07 Tom Tromey <tromey@redhat.com>
10036
10037 * gcj.texi (Input Options): --CLASSPATH does not suppress system
10038 path.
10039
10040 2002-02-04 Anthony Green <green@redhat.com>
10041
10042 * class.c (build_utf8_ref): Put UTF-8 constants into merged
10043 sections if available.
10044
10045 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10046
10047 * parse.y (java_expand_classes): Fix typo in static field loop.
10048
10049 2002-02-02 Richard Henderson <rth@redhat.com>
10050
10051 * class.c (add_field): Mark static fields external.
10052 (build_class_ref): Remove redundant set.
10053 * parse.y (java_expand_classes): Mark static fields of classes
10054 to be compiled as local.
10055 * jcf-parse.c (parse_class_file): Likewise.
10056
10057 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
10058
10059 * gcj.texi (About CNI): New node.
10060
10061 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
10062
10063 PR java/5080
10064 * jcf-parse.c : Check for HAVE_LOCALE_H before using
10065 setlocale() with LC_CTYPE as a parameter.
10066 * jv-scan.c: Same.
10067
10068 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
10069
10070 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
10071 Follow GNU Coding Standards for --version.
10072
10073 2002-01-28 Tom Tromey <tromey@redhat.com>
10074
10075 * expr.c (build_jni_stub): Ensure storage for `meth' is
10076 generated.
10077 * parse.y (java_complete_expand_methods): Set
10078 current_function_decl before building JNI stub.
10079
10080 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
10081
10082 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
10083 BUILT_IN_SQRTF.
10084
10085 2002-01-22 Tom Tromey <tromey@redhat.com>
10086
10087 * decl.c (java_init_decl_processing): Use add_predefined_file.
10088 Predefine RawData.java.
10089 (predef_filenames): Removed.
10090 (java_init_decl_processing): Don't register predef_filenames.
10091 * jcf-parse.c (add_predefined_file): New function.
10092 (predefined_filename_p): Rewrote.
10093 (predefined_filename_p): No longer static.
10094 * decl.c (java_init_decl_processing): Call initialize_builtins.
10095 * Make-lang.in (JAVA_OBJS): Added builtins.o.
10096 (java/builtins.o): New target.
10097 * builtins.c: New file.
10098 * parse.y (patch_invoke): Use build_call_or_builtin.
10099 * java-tree.h (build_call_or_builtin): Declare.
10100 (initialize_builtins): Declare.
10101 (java_set_exception_lang_code): Removed unused declaration.
10102 (PREDEF_FILENAMES_SIZE): Removed.
10103 (java_tree_index): Added JTI_PREDEF_FILENAMES.
10104 (predef_filenames): New define.
10105 (add_predefined_file): Declare.
10106 (predefined_filename_p): Declare.
10107 * expr.c (expand_invoke): Use build_call_or_builtin.
10108
10109 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10110
10111 * parse.y (patch_switch_statement): Fix format specifier.
10112
10113 2002-01-16 Tom Tromey <tromey@redhat.com>
10114
10115 More for PR java/5365:
10116 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
10117 default.
10118 (process_file): Generate include for
10119 java.lang.UnsupportedOperationExceptions.
10120
10121 2002-01-15 Andreas Jaeger <aj@suse.de>
10122
10123 * .cvsignore: Add man pages.
10124
10125 2002-01-15 Tom Tromey <tromey@redhat.com>
10126
10127 Fix for PR java/5365:
10128 * gjavah.c (process_file): Turn class name into a file name.
10129
10130 2002-01-14 Matthias Klose <doko@debian.org>
10131
10132 * gcj.texi: Fix whitespace and formatting errors in the
10133 synopsis of the man pages. Update copyright.
10134
10135 2002-01-14 Tom Tromey <tromey@redhat.com>
10136
10137 For PR libgcj/5303:
10138 * Make-lang.in (java.install-man): Handle jv-convert man page.
10139 (java.generated-manpages): Added jv-convert.1.
10140 (java.uninstall): Remove jv-convert.1.
10141 (java.maintainer-clean): Likewise.
10142 ($(srcdir)/java/jv-convert.1): New target.
10143 * gcj.texi (Top): Link to jv-convert node.
10144 (Individual utilities): Likewise.
10145 (Invoking jv-convert): New node.
10146
10147 2001-01-10 Jeff Sturm <jsturm@one-point.com>
10148 Martin Kahlert <martin.kahlert@infineon.com>
10149
10150 * jcf-parse.c (get_constant): Don't swap lo/hi for big
10151 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
10152
10153 2002-01-03 Graham Stott <grahams@redhat.com>
10154
10155 * class.c (compile_resource_file): Update copyright date.
10156 Constify filename parameter.
10157 (java-tree.h): Update copyright date.
10158 (compile_resource_file): Constify filename parameter.
10159
10160 2002-01-03 Graham Stott <grahams@redhat.com>
10161
10162 * gcc/jcf-parse.c: Update copyright date.
10163 (yyparse): Constify resource_filename.
10164
10165 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10166
10167 * parse.y (src_parse_roots): Don't needlessly zero init.
10168
10169 2001-12-31 Tom Tromey <tromey@redhat.com>
10170
10171 * parse.y (dump_java_tree): New function.
10172 (source_end_java_method): Call it.
10173 (end_class_declaration): Likewise.
10174 * lang.c (java_decode_option): Call dump_switch_p.
10175
10176 2001-12-28 Tom Tromey <tromey@redhat.com>
10177
10178 * gen-table.pl: Don't process characters after \uffff. Added
10179 comment pointing to input file.
10180
10181 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10182
10183 * gen-table.pl: Const-ify output. Document the location of a
10184 suitable unicode input file.
10185
10186 * chartables.h: Regenerate.
10187
10188 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10189
10190 * chartables.h: Const-ify.
10191 * gjavah.c (options): Likewise.
10192 * jcf-dump.c (options): Likewise.
10193 * jv-scan.c (options): Likewise.
10194 * lex.c (java_start_char_p, java_part_char_p): Likewise.
10195 * parse.y (binop_lookup): Likewise.
10196
10197 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10198
10199 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
10200 the static arrays that are output.
10201 * jvspec.c (jvgenmain_spec): Make static.
10202 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
10203 * keyword.h: Regenerate.
10204 * lang.c (string_option, process_option_with_no, lang_f_options,
10205 lang_W_options): Const-ify.
10206 * lex.c (java_lex): Likewise.
10207
10208 2001-12-21 Richard Henderson <rth@redhat.com>
10209
10210 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
10211 (get_boehm_type_descriptor): ... here. Arrange for the
10212 TREE_TYPE to get set properly.
10213
10214 2001-12-21 Richard Henderson <rth@redhat.com>
10215
10216 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
10217 only if the target requires collect2.
10218
10219 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
10220
10221 2001-12-20 Tom Tromey <tromey@redhat.com>
10222
10223 For PR java/4509:
10224 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
10225 CAN_COMPLETE_NORMALLY for the node.
10226 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
10227 generate code for second branch if first branch can't complete
10228 normally.
10229 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
10230 the loop head if the loop body can't complete normally.
10231
10232 2001-12-20 Tom Tromey <tromey@redhat.com>
10233
10234 For PR java/4766:
10235 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
10236 case where `finally' clause can't complete normally.
10237
10238 2001-12-20 Tom Tromey <tromey@redhat.com>
10239
10240 Fixes PR java/5057:
10241 * parse.y (analyze_clinit_body): Added this_class parameter.
10242 Check for more cases where we must keep <clinit>.
10243 (maybe_yank_clinit): Cleaned up flow control.
10244
10245 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10246
10247 * decl.c (java_init_decl_processing): Don't initialize
10248 finit_leg_identifier_node.
10249 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
10250 (finit_leg_identifier_node): Remove.
10251 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
10252
10253 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10254
10255 * mangle.c (mangle_member_name): Don't special-case for
10256 NO_DOLLAR_IN_LABEL.
10257 * mangle_name.c (unicode_mangling_length): Likewise.
10258 (append_unicode_mangled_name): Likewise.
10259 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
10260 code.
10261
10262 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10263
10264 * expr.c (build_java_array_length_access): Don't force null pointer
10265 check unless flag_check_references is set.
10266
10267 2001-12-20 Tom Tromey <tromey@redhat.com>
10268
10269 Fix for PR java/3417:
10270 * parse.y (patch_assignment): Added special processing for
10271 `return'.
10272 (patch_return): Don't convert booleans to integers, and don't
10273 special-case `null'.
10274
10275 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
10276
10277 * config-lang.in (diff_excludes): Remove.
10278
10279 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
10280
10281 * gcj.texi: Update link to GCC manual.
10282
10283 2001-12-17 Tom Tromey <tromey@redhat.com>
10284
10285 * parse.y (link_nested_class_to_enclosing): Removed useless
10286 statement.
10287
10288 2001-12-16 Tom Tromey <tromey@redhat.com>
10289
10290 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
10291 Fixes PR java/5088.
10292
10293 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
10294
10295 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
10296 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
10297 spelling errors.
10298
10299 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10300
10301 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
10302
10303 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10304
10305 * decl.c (java_init_decl_processing): Build otable_type correctly.
10306 otable_decl is an otable_type.
10307
10308 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10309
10310 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
10311 otable_type, otable_ptr_type, method_symbol_type,
10312 method_symbols_array_type, method_symbols_array_ptr_type): New
10313 field/global tree definitions.
10314 (flag_indirect_dispatch): New flag.
10315 * decl.c (java_init_decl_processing): Initialize new otable and
10316 otable_syms type nodes and decls. Add new field "index" to
10317 method_type_node.
10318 * class.c (build_method_symbols_entry): New function.
10319 (make_method_value): Set "index" to to method's vtable index for
10320 virtual methods when indirect-dispatch is not used.
10321 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
10322 and set vtable_method_count to -1. Set otable and otable_syms field
10323 if indirect-dispatch is used and there was something to put in them.
10324 (build_method_symbols_entry): New function.
10325 (emit_offset_symbol_table): New function.
10326 * expr.c (get_offset_table_index): New function.
10327 (build_invokevirtual): Build array reference to otable at the index
10328 returned by get_offset_table_index, and use the result as the vtable
10329 offset.
10330 (build_invokeinterface): Similar.
10331 * jcf-parse.c (yyparse): If indirect-dispatch, call
10332 emit_offset_symbol_table at the end of compilation, after all classes
10333 have been generated.
10334 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
10335 * lang.c (flag_indirect_dispatch): Define.
10336 (lang_f_options): Add indirect-dispatch flag.
10337
10338 2001-12-14 Matthias Klose <doko@debian.org>
10339
10340 * gcj.texi: Markup for man page generation. Document missing
10341 options printed by <tool> --help.
10342 Terminate description of gij's -ms option with a dot.
10343 * Make-lang.in ($(srcdir)/java/*.1): New targets.
10344 (java.generated-manpages java.install-man, java.uninstall,
10345 java-maintainer-clean) Updated.
10346
10347 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
10348
10349 * class.c (get_dispatch_table): Fix java vtable layout
10350 for TARGET_VTABLE_USES_DESCRIPTORS.
10351 * decl.c (java_init_decl_processing): Initialize
10352 alloc_no_finalizer_node, finalize_identifier_node.
10353 * expr.c (class_has_finalize_method): New function.
10354 (expand_java_NEW): Generate calls for finalizer-free allocation.
10355 (build_invokevirtual): Fix java vtable layout for
10356 TARGET_VTABLE_USES_DESCRIPTORS.
10357 * java-tree.h (enum java_tree_index): New entries:
10358 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
10359 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
10360 (class_has_finalize_method): declare.
10361 (HAS_FINALIZER_P): New macro.
10362 * parse.y (patch_invoke): Generate calls for finalizer-free
10363 allocation.
10364
10365 2001-12-12 Matthias Klose <doko@debian.org>
10366
10367 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
10368 whitespace at end of line.
10369
10370 2001-12-11 Tom Tromey <tromey@redhat.com>
10371
10372 * lex.c (java_init_lex): Define wfl_to_string as
10373 gnu.gcj.runtime.StringBuffer unless generating bytecode.
10374
10375 2001-12-11 Jeff Sturm <jsturm@one-point.com>
10376
10377 * class.c (make_method_value): Use null_pointer_node to
10378 represent empty exception table.
10379
10380 2001-12-10 Tom Tromey <tromey@redhat.com>
10381
10382 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
10383
10384 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
10385
10386 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
10387
10388 2001-12-09 Per Bothner <per@bothner.com>
10389
10390 * check-init.c (current_switch_has_default): New static field.
10391 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
10392 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
10393 DEFAULT_EXPR seen, simulate a default alternative that copies state.
10394
10395 2001-12-09 Tom Tromey <tromey@redhat.com>
10396
10397 * check-init.c (check_init): Don't allow pre- or post- increment
10398 or decrement of final variable.
10399 (final_assign_error): Minor error message rewording.
10400
10401 2001-12-08 Tom Tromey <tromey@redhat.com>
10402
10403 * java-tree.h: Fixed typo.
10404
10405 * gjavah.c (decompile_method): Don't decompile to `return this'
10406 for static methods.
10407
10408 * gjavah.c (cxx_keywords): Re-sorted.
10409 * lex.c (cxx_keywords): Re-sorted.
10410
10411 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
10412 else.
10413
10414 * gjavah.c (print_namelet): Clear subnamelets.
10415 (HANDLE_METHOD): Set `method_printed' earlier.
10416
10417 2001-12-07 Tom Tromey <tromey@redhat.com>
10418
10419 * lang.c (lang_f_options): Added
10420 optimize-static-class-initialization.
10421 (java_decode_option): Removed special case.
10422
10423 2001-12-07 Per Bothner <per@bothner.com>
10424
10425 * check-init.c (check_init): Fix typo freeing memory twice.
10426
10427 2001-12-05 Per Bothner <per@bothner.com>
10428
10429 Restore support for static class initialization optimization.
10430 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
10431 * check-init.c (check_int): At end of BLOCK handle initialization
10432 blocks, which used to be done in java_complete_expand_method but did
10433 not handle the case where check_for_initialization might allocate
10434 more than a word of bits.
10435 * decl.c (lang_make_tree): The smic field is now a tree.
10436 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
10437 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
10438
10439 * parse.y (emit_test_initialization): Combine hash_lookup calls.
10440
10441 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
10442 Change from a hash table to a list.
10443 (struct_lang_decl): Change field 'smic' to match.
10444 * class.c (add_method_1): Initialize
10445 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
10446 * parse.y (adjust_init_test_initialization): Removed - inlined into -
10447 (java_expand_method_bodies): -here, since 'smic' is now a list.
10448 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
10449
10450 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
10451
10452 * class.c (java_hash_compare_tree_node): Fix casts.
10453
10454 2001-12-04 Per Bothner <per@bothner.com>
10455
10456 * check-init.c: Handle definite unassignment to finals in addition
10457 to definite assignment.
10458 (loop_current_locals): New field.
10459 (num_current_locals, int start_current_locals, num_current_words):
10460 Make static.
10461 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
10462 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
10463 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
10464 (get_variable_decl, check_final_reassigned): New functions.
10465 (check_init, check_bool_init): Modify as needed for checking finals.
10466 (check_for_initialization): Take extra parameter and return void.
10467 Do extra start-up logic to check final fields for assignment.
10468 * parse.y (check_static_final_variable_assignment_flag,
10469 reset_static_final_variable_assignment_flag, check_final_assignment,
10470 check_final_variable_local_assignment_flag,
10471 reset_final_variable_indirect_assignment_flag,
10472 reset_final_variable_global_assignment_flag): Remove functions.
10473 (java_complete_expand_methods, outer_field_access_fix,
10474 patch_assignment): Remove no-longer used logic.
10475 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
10476 * parse.y (register_fields, java_complete_tree): Update accordingly.
10477
10478 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
10479 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
10480 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
10481
10482 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
10483
10484 * java-tree.h (DECL FINAL): New bit-field.
10485 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
10486 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
10487 (DECL_INIT_CALLS_THIS): New macro.
10488 (struct lang_decl): New bit-field init_calls_this.
10489 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
10490 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
10491 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
10492 use it for both local variables and final fields.
10493 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
10494 and local_final.
10495 (struct lang_type): Remove hfv bit-field.
10496 (check_for_initialization): Change to return void.
10497
10498 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
10499 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
10500 * check-init.c (final_assign_error): New helper function.
10501 (check_final_reassigned, check_init): Use it.
10502 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
10503
10504 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
10505 bit-fields to unsigned.
10506
10507 2001-12-03 Per Bothner <per@bothner.com>
10508
10509 * parse.y (patch_binop): Minor constant folding.
10510
10511 * parse.y (build_current_thisn): Shorter 'buffer'.
10512
10513 2001-12-03 Per Bothner <per@bothner.com>
10514
10515 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
10516 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
10517 * jcf-write.c (generate_bytecode_insns): Remove support for
10518 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
10519 * check-init.c (check_init): Likewise.
10520
10521 2001-12-03 Per Bothner <per@bothner.com>
10522
10523 * verify.c (subroutine_nesting): New function.
10524 (verify_jvm_instructions): Use it to fix logic for checking that
10525 we're done with the current subroutine.
10526
10527 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
10528 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
10529
10530 2001-12-03 Per Bothner <per@bothner.com>
10531
10532 * jcf.h: Fix obvious typo in comment.
10533 * typeck.c (build_null_signature): Add comment.
10534
10535 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
10536
10537 * expr.c: Remove leading capital from diagnostic messages, as
10538 per GNU coding standards.
10539 * jcf-io.c: Similarly.
10540 * jcf-parse.c: Similarly.
10541 * jv-scan.c: Similarly.
10542 * jvspec.c: Similarly.
10543 * mangle.c: Similarly.
10544
10545 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
10546 Alexandre Petit-Bianco <apbianco@redhat.com>
10547
10548 * expr.c (build_java_arrayaccess): Call save_expr on array for
10549 correct evaluation order, modified comment, fixed indentation.
10550 * parse.y: (patch_assignment): Correctly extract the array base
10551 from the tree generate by build_java_arrayaccess, added comments.
10552 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
10553 Fixes PR java/3096, PR java/3803, PR java/3965.
10554
10555 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
10556
10557 * expr.c (expand_byte_code): Remove trailing periods from messages.
10558 * jcf-parse.c (load_class, jcf_parse): Similarly.
10559 * jcf-write.c (generate_classfile): Similarly.
10560 * lex.c (java_lex): Similarly.
10561
10562 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10563
10564 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
10565
10566 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
10567
10568 * Make-lang.in (java.generated-manpages): New dummy target.
10569
10570 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10571
10572 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10573 ASM_FINAL_SPEC.
10574 (lang_specific_pre_link): Use set_input to set input_filename.
10575 Append `main' here.
10576 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10577 (main): Fix definition.
10578 Strip `main' from classname.
10579 Fixes PR java/227.
10580
10581 2001-11-18 Roger Sayle <roger@eyesopen.com>
10582
10583 * parse.h (java_expand_switch): Remove old prototype.
10584
10585 2001-11-18 Tom Tromey <tromey@redhat.com>
10586
10587 Fix for PR java/1401:
10588 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
10589 arg0 is null.
10590 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
10591 correctly.
10592
10593 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
10594
10595 * lang.c (finish_parse): Rename to java_finish.
10596 (LANG_HOOKS_FINISH, java_finish): New.
10597
10598 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
10599
10600 * decl.c (init_decl_processing): Rename java_init_decl_processing.
10601 * java-tree.h: New prototype.
10602 * lang.c (java_init): Update prototype. Combine with old init_parse.
10603
10604 2001-11-13 Tom Tromey <tromey@redhat.com>
10605
10606 * gjavah.c (method_signature): New global.
10607 (HANDLE_METHOD): Set it.
10608 (decompile_return_statement): New function.
10609 (decompile_method): Use it.
10610 (print_method_info): Removed `synth' argument.
10611
10612 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10613
10614 * java-tree.h (java_set_yydebug): New.
10615 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
10616 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
10617 (print_lang_decl, print_lang_type, print_lang_identifier,
10618 print_lang_statistics, lang_print_xnode): Remove.
10619
10620 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10621
10622 * jcf-parse.c (init_lex): Remove.
10623 * lang.c (language_string, lang_identify): Remove.
10624 (struct lang_hooks): Constify.
10625 (LANG_HOOKS_NAME): Override.
10626 (init_parse): Update.
10627
10628 2001-11-08 Andreas Franck <afranck@gmx.de>
10629
10630 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
10631 program_transform_name the way suggested by autoconf.
10632 (java.install-common): Also transform auxiliary program names with
10633 program_transform_name.
10634
10635 2001-11-08 Tom Tromey <tromey@cygnus.com>
10636
10637 * parse.y (trap_overflow_corner_case): New rule.
10638 (unary_expression): Use it.
10639 * lex.c (java_init_lex): Don't set minus_seen.
10640 (yylex): Don't use minus_seen. Communicate overflow to parser for
10641 it to handle.
10642 (error_if_numeric_overflow): New function.
10643 * parse.h (minus_seen): Removed field.
10644 (JAVA_RADIX10_FLAG): New define.
10645
10646 2001-11-07 Tom Tromey <tromey@redhat.com>
10647
10648 Patch for PR java/1414:
10649 * parse.y (case_label_list): New global.
10650 (goal): Register case_label_list with GC.
10651 (java_complete_lhs): Save new case on case_label_list.
10652 (patch_switch_statement): Check for duplicate case labels.
10653
10654 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10655
10656 * parse.y (patch_assignment): Removed unused third argument.
10657 (java_complete_lhs): Removed unused third argument to patch_assignment.
10658
10659 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10660
10661 * lang.c: Include langhooks-def.h.
10662 * Make-lang.in: Update.
10663
10664 2001-10-31 Zack Weinberg <zack@codesourcery.com>
10665
10666 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10667
10668 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10669
10670 * mangle.c (find_compression_record_match): Don't match compression
10671 records for package name elements unless they occur at the start of
10672 the name. Fix for PR java/4717.
10673
10674 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10675
10676 * expr.c (expand_java_field_op): Don't special-case references to
10677 java.lang.PRIMTYPE.TYPE.
10678 (build_primtype_type_ref): Removed.
10679 * java-tree.h (build_primtype_type_ref): Remove prototype.
10680 * parse.y (maybe_build_primttype_type_ref): Removed.
10681 (complete_function_arguments): Don't special-case references to
10682 java.lang.PRIMTYPE.TYPE.
10683 (patch_assignment): Likewise.
10684 (array_constructor_check_entry): Likewise.
10685
10686 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10687
10688 * mangle.c (static tree compression_table): Fixed leading comment.
10689 * parse.h (struct parser_ctxt): Fixed field comment.
10690 * parse.y (check_pkg_class_access): New prototype, fixed leading
10691 comment, new parameter used to emit error only if passed as true.
10692 (parse_check_super): Pass extra argument to check_pkg_class_access.
10693 (do_resolve_class): Likewise.
10694 (process_imports): Likewise.
10695 (read_import_dir): Fixed indentation.
10696 (find_in_imports_on_demand): New local class_type_name. Local
10697 node_to_use deleted. while loop changed into for loop. Report
10698 multiple definition only for accessible classes. Improved error
10699 message.
10700 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
10701 assigned to parameter list, fixed indentation. while loop changed
10702 into for loop, restore TREE_CHAIN on local `tem' before the next
10703 iteration.
10704
10705 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10706
10707 * lang.c (lang_get_alias_set): Deleted.
10708
10709 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10710
10711 * gjavah.c (jni_print_char): Fix thinko in last change.
10712
10713 * gjavah.c (jni_print_char, decode_signature_piece): Use
10714 safe-ctype macros and/or fold extra calls into fewer ones.
10715 * lex.c (java_read_unicode, java_lex): Likewise.
10716 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
10717 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
10718 * mangle_name.c (append_unicode_mangled_name,
10719 unicode_mangling_length): Likewise.
10720
10721 2001-10-17 Richard Henderson <rth@redhat.com>
10722
10723 * Make-lang.in (java/lang.o): Depend on langhooks.h.
10724
10725 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
10726
10727 * lang.c (langhooks.h): Included.
10728 (LANG_HOOKS_INIT): Redefined.
10729 (LANG_HOOKS_INIT_OPTIONS): Likewise.
10730 (LANG_HOOKS_DECODE_OPTION): Likewise.
10731 (struct lang_hooks lang_hooks): New initialization.
10732
10733 2001-10-11 Per Bothner <per@bothner.com>
10734
10735 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
10736 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
10737 The former is simpler, and jcf-write.c handles it better.
10738 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
10739 or WITH_CLEANUP_EXPR.
10740 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
10741 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
10742
10743 * parse.y (patch_if_else_statement): If the condition is constant,
10744 optimize away the test.
10745
10746 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10747
10748 * parse.y (patch_cast): Call patch_string on the first operand of
10749 the incoming node, update it if necessary. Fixes PR java/4510.
10750
10751 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10752
10753 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
10754 when name qualifier matches a package name.
10755
10756 2001-10-08 Tom Tromey <tromey@redhat.com>
10757
10758 Fix for PR java/4489:
10759 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
10760 force a new label when computing `body_block'.
10761
10762 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10763
10764 * jcf-io.c (format_uint): Const-ify.
10765 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
10766 * lex.c (java_get_line_col): Likewise.
10767 * parse.y (build_incdec): Likewise.
10768
10769 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10770
10771 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
10772 a NULL enclosing context if appropriate. Fixes PR java/4466.
10773
10774 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
10775
10776 * parse.y (patch_assignment): Use lvalue's original TYPE when
10777 building the final COMPOUND_EXPR.
10778 (try_reference_assignconv): Fixed leading comment.
10779
10780 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
10781
10782 * parse.y (check_final_variable_indirect_assignment): For
10783 COMPOUND_EXPR, return only if finals were found initialized
10784 properly, if not, keep on checking.
10785 (check_final_variable_global_assignment_flag): New local
10786 error_found, set when appropriate and used to decide whether to
10787 report uninitialized finals. Fixed typo in comment.
10788
10789 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10790
10791 * decl.c (init_decl_processing): Fixed typo in predef_filenames
10792 last three initializations. Fixes PR java/4360.
10793
10794 2001-09-21 Richard Henderson <rth@redhat.com>
10795
10796 * class.c (get_dispatch_table): Handle function descriptors.
10797 (build_dtable_decl): Likewise.
10798 * expr.c (build_invokevirtual): Likewise.
10799
10800 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10801
10802 * parse.y (patch_method_invocation): Build class initialization
10803 when static finals are used to qualify method invocation.
10804 Fixes PR java/4366.
10805
10806 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
10807
10808 * parse.h: (WFL_STRIP_BRACKET): Re-written using
10809 build_type_name_from_array_name.
10810 (STRING_STRIP_BRACKETS): New macro.
10811 * parse.y (build_type_name_from_array_name): New function.
10812 (array_creation_expression:): Accumulate []s instead of [s.
10813 (cast_expression:): Accumulate []s instead of [s after cast type
10814 name.
10815 (build_array_from_name): Local string deleted, use
10816 build_type_name_from_array_name.
10817 (build_unresolved_array_type): Accumulate []s instead of [s after
10818 type name.
10819 (register_fields): Fixed comment.
10820 (resolve_class): Local name, base deleted, new locals tname and
10821 array_dims. Use build_type_name_from_array_name. Use array_dims to
10822 build array type.
10823 (purify_type_name): Use STRING_STRIP_BRACKETS.
10824
10825 2001-09-18 Andreas Jaeger <aj@suse.de>
10826
10827 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10828 * jv-scan.c: Likewise.
10829
10830 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10831
10832 * parse.y (patch_method_invocation): Inner class creation context
10833 check not enforced within constructors. Fixes PR java/1873.
10834
10835 2001-09-16 Tom Tromey <tromey@redhat.com>
10836
10837 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10838 NOTE_PUSH for single-case push. Fixes PR java/4189.
10839
10840 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10841
10842 * java-tree.h (TYPE_IMPORT_LIST): New macro.
10843 (TYPE_IMPORT_DEMAND_LIST): Likewise.
10844 (struct lang_type): New fields import_list and import_demand_list.
10845 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10846 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10847 (do_resolve_class): New local saved_enclosing_type, initialized,
10848 passed as parameter to find_in_imports and find_in_imports_on_demand.
10849 (find_in_imports): Added paramater enclosing_type, use its
10850 TYPE_IMPORT_LIST when applicable.
10851 (find_in_imports_on_demand): Added parameter enclosing_type, use
10852 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10853 declaration and initialization.
10854 (fold_constant_for_init): Switch/restore current_class to the
10855 appropriate context.
10856
10857 2001-09-13 Mark Mitchell <mark@codesourcery.com>
10858
10859 * verify.c (verify_jvm_instructions): Fix typo.
10860
10861 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10862
10863 * expr.c (expand_invoke): Const-ification.
10864 * parse.y (patch_method_invocation): Likewise.
10865
10866 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10867
10868 * gjavah.c (cxx_keywords): Const-ification.
10869 * keyword.gperf (java_keyword): Likewise.
10870 * lang.c (java_tree_code_name): Likewise.
10871 * lex.c (cxx_keywords): Likewise.
10872 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10873
10874 2001-09-11 Richard Henderson <rth@redhat.com>
10875
10876 * parse.h (ctxp_for_generation): Mark extern.
10877
10878 2001-09-10 Richard Henderson <rth@redhat.com>
10879
10880 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10881
10882 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10883
10884 * typeck.c (java_array_type_length, build_prim_array_type):
10885 Represent empty arrays by NULL index.
10886
10887 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
10888
10889 * java-tree.h (compile_resource_file): Grouped with other prototypes.
10890 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10891
10892 2001-09-06 Anthony Green <green@redhat.com>
10893
10894 * class.c (O_BINARY): Define if necessary.
10895 (registerResource_libfunc): Declare.
10896 (init_class_processing): Initilize registerResource_libfunc.
10897 (compile_resource_file): New function.
10898 * java-tree.h (resource_name): Declare.
10899 (compile_resource_file): Declare.
10900 * jcf-parse.c (yyparse): Handle compiling java resource files.
10901 * lang.c (java_decode_option): Handle -fcompile-resource option.
10902 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10903 resource files.
10904 * gcj.texi (Code Generation): Add documentation for -R flag.
10905
10906 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10907
10908 * jcf-write.c (generate_classfile): Issue an error in case of
10909 field/initial value mismatch.
10910 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10911 being initialized and we're generating bytecode.
10912 (java_complete_lhs): In MODIFY_EXPR section: added comments,
10913 set DECL_INITIAL properly when appropriate.
10914 Fixes PR java/4230
10915 Fixes PR java/4204
10916
10917 2001-09-01 Per Bothner <per@bothner.com>
10918
10919 * parse.y (maybe_yank_clinit): A field without an initializer is not
10920 relevant. All initializers except static final and constant require
10921 <clinit>, regardless of flag_emit_class_files.
10922
10923 2001-08-31 Per Bothner <per@bothner.com>
10924
10925 * class.c (set_constant_value): When not emitting class files, then a
10926 String ConstantValue is a utf8const_ptr_type.
10927
10928 2001-08-30 Per Bothner <per@bothner.com>
10929
10930 * jcf-write.c (generate_classfile): Check that field is primitive
10931 or string before emitting ConstantValue attribute.
10932
10933 2001-08-30 Per Bothner <per@bothner.com>
10934
10935 * parse.y (resolve_qualified_expression_name): If creating a
10936 COMPOUND_EXPR, set it's type correctly.
10937
10938 2001-08-30 Per Bothner <per@bothner.com>
10939
10940 * jcf-io.c (open_class): Set filename field.
10941
10942 * jcf-parse,c (parse_class_file): Set current_function_decl
10943 for better error message when Code attribute is missing.
10944
10945 * lang.c (put_decl_node, lang_print_error): Re-arrange for
10946 better diagnostics, especially for constructors.
10947
10948 2001-08-30 Per Bothner <per@bothner.com>
10949
10950 * jcf-write.c (generate_classfile): Don't write ConstantValue
10951 attribute if field is not final, for compatibility with jdk.
10952
10953 * jcf-write.c (generate_classfile): Convert ConstantValue values
10954 to correct type. Work-around for front-end bug.
10955 * class.c (set_constant_value): Error if constant has wrong type.
10956
10957 2001-08-30 Per Bothner <per@bothner.com>
10958
10959 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
10960 "Double" are printed at verbosity 1.
10961
10962 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
10963
10964 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
10965
10966 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10967
10968 * parse.y (patch_assignment): Don't verify final re-assignment here.
10969 (java_complete_lhs): Verify assignments to finals calling
10970 patch_assignment. Verify re-assignments to finals before calling
10971 patch_assignment.
10972
10973 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
10974
10975 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10976 Fixes PR java/1413
10977
10978 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
10979
10980 * lex.c (java_lex): new local found_hex_digits. Set and then used
10981 in test to reject invalid hexadecimal numbers.
10982 * parse.y (java_complete_tree): Prevent unwanted cast with
10983 initialized floating point finals.
10984 (patch_binop): Emit a warning when detecting a division by zero,
10985 mark result not constant, don't simplify non integer division.
10986
10987 2001-08-28 Per Bothner <per@bothner.com>
10988
10989 * jcf-write.c (generate_bytecode_insns): For increments and
10990 decrements just recurse to push constant. Improvement on Mark's patch.
10991
10992 2001-08-28 Mark Mitchell <mark@codesourcery.com>
10993
10994 * jcf-write.c (generate_bytecode_insns): Generate an integer to
10995 real conversion for increments and decrements of reals.
10996
10997 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10998
10999 * parse.y (resolve_qualified_expression_name): Handle unresolved
11000 qualified expressions, prevent numerical qualifiers, fixed typo.
11001 Fixes PR java/4141
11002
11003 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
11004
11005 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
11006 don't report anything but deprecated class when marked so. Handle
11007 VAR_DECL.
11008 (patch_method_invocation): Check deprecation on methods and types.
11009 (patch_binop): code becomes an enum tree_code, added default: to
11010 switch to handle that. Detect division by zero, try to fold and
11011 return before using a subroutine.
11012
11013 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
11014
11015 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
11016 file smaller than 4 bytes.
11017 * parse.y (check_inner_circular_reference): New function.
11018 (check_circular_reference): Likewise.
11019 (array_initializer:): Accept {,}.
11020 (java_check_circular_reference): Rewritten using
11021 check_circular_reference and check_inner_circular_reference.
11022 (java_complete_expand_method): Unconditionally save and restore
11023 the unpurged exception list.
11024 (build_dot_class_method_invocation): Unmangle signature parameter.
11025
11026 2001-08-21 Tom Tromey <tromey@redhat.com>
11027
11028 * decl.c (init_decl_processing): Add `throws' field to method
11029 descriptor.
11030 * class.c (make_method_value): Compute `throws' field for method.
11031
11032 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
11033
11034 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
11035 circularity is detected.
11036 (ctors_unchecked_throws_clause_p): Fixed leading comment.
11037
11038 2001-08-17 Richard Henderson <rth@redhat.com>
11039
11040 * class.c (emit_register_classes): Add align parameter to
11041 call to assemble_integer.
11042
11043 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
11044
11045 * jcf-parse.c (load_class): New locals saved and class_loaded. If
11046 loading a class_or_name fails, try considering an innerclass name
11047 and load the enclosing context.
11048 * parse.y (resolve_inner_class): New function.
11049 (find_as_inner_class): Added leading comment.
11050 (register_incomplete_type): Keep the current context as enclosing
11051 context for JDEP_FIELD dependencies.
11052 (do_resolve_class): Locals new_class_decl and super initialized to
11053 NULL. Call resolve_inner_class, explore the enclosing context
11054 superclass if necessary.
11055 Fixes PR java/4007
11056
11057 2001-08-16 Tom Tromey <tromey@redhat.com>
11058
11059 * jcf-dump.c (main): Updated for change to jcf_path_seal.
11060 * gjavah.c (main): Updated for change to jcf_path_seal.
11061 * lang.c (version_flag): New global.
11062 (java_decode_option): Recognize `-version'.
11063 (java_init): Update for change to jcf_path_seal.
11064 * jcf.h (jcf_path_seal): Added `print' argument.
11065 * jcf-path.c (jcf_path_seal): Added `print' argument.
11066
11067 2001-08-13 Zack Weinberg <zackw@panix.com>
11068
11069 * Make-lang.in (java/decl.o): Update dependencies.
11070 * decl.c: Include libfuncs.h, don't include toplev.h.
11071
11072 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
11073
11074 * decl.c (init_decl_processing): exception_type_node,
11075 class_not_found_type_node, and no_class_def_found_type_node
11076 initialized. predef_filenames augmented accordingly.
11077 instinit_identifier_node initialized.
11078 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
11079 * java-tree.h (enum java_tree_index): New entries
11080 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
11081 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
11082 (exception_type_node): New macro.
11083 (class_not_found_type_node): Likewise.
11084 (no_class_def_found_type_node): Likewise.
11085 (instinit_identifier_node): Likewise.
11086 (PREDEF_FILENAMES_SIZE): Adjusted.
11087 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
11088 (struct lang_type): Fixed typo in bitfield name.
11089 (DECL_INSTINIT_P): New macro.
11090 (ID_INSTINIT_P): Likewise.
11091 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
11092 attribute.
11093 * parse.y (encapsulate_with_try_catch): New function.
11094 (generate_instinit): Likewise.
11095 (build_instinit_invocation): Likewise.
11096 (ctors_unchecked_throws_clause_p): Likewise.
11097 (add_instance_initializer): Deleted.
11098 (build_instance_initializer): Likewise.
11099 (in_instance_initializer): Likewise.
11100 (check_method_redefinition): instinit$ not to be verified.
11101 (java_complete_expand_methods): Generate instinit$, simplified code.
11102 (build_dot_class_method): Eliminated unnecessary locals. Use
11103 encapsulate_with_try_catch, removed unnecessary code.
11104 (fix_constructors): New local iii. Use build_instinit_invocation.
11105 (patch_method_invocation): Added comment.
11106 (maybe_use_access_method): Don't consider instinit$.
11107 (find_applicable_accessible_methods_list): Shorten the search for
11108 instinit$ too.
11109 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
11110 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
11111 (patch_throw_statement): Likewise. Fixed typo.
11112
11113 2001-08-12 David Edelsohn <edelsohn@gnu.org>
11114
11115 Revert:
11116 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
11117 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
11118 ASM_FINAL_SPEC.
11119 (lang_specific_pre_link): Use set_input to set input_filename.
11120 Append `main' here.
11121 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
11122 (main): Fix definition.
11123 Strip `main' from classname.
11124 Fixes PR java/227.
11125
11126 2001-08-11 Zack Weinberg <zackw@panix.com>
11127
11128 * lex.h: Don't include setjmp.h. Don't define
11129 SET_FLOAT_HANDLER or prototype set_float_handler.
11130
11131 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11132
11133 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
11134 `poplevel' in the right order.
11135
11136 2001-08-09 Richard Henderson <rth@redhat.com>
11137
11138 * Make-lang.in (class.o): Depend on TARGET_H.
11139 * class.c (emit_register_classes): Use target hooks instead of
11140 assemble_constructor and assemble_destructor.
11141
11142 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
11143
11144 * check-init.c (flags.h): Include
11145 (check_init): Don't report uninitialized static class
11146 initialization flags, don't free bit index when doing static class
11147 initialization optimization.
11148 (check_for_initialization): Return type changed to `unsigned int.'
11149 (attach_initialized_static_class): New function.
11150 * class.c (add_method_1): Create the initialized static class
11151 table if necessary.
11152 (finish_class): Always emit deferred inline methods.
11153 * decl.c (emit_init_test_initialization): Moved to expr.c
11154 (complete_start_java_method): Don't traverse
11155 DECL_FUNCTION_INIT_TEST_TABLE.
11156 (lang_mark_tree): Mark hash tables in function decls.
11157 * expr.c (emit_init_test_initialization): Moved from decl.c.
11158 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
11159 initialization flag, set DECL_CONTEXT and
11160 LOCAL_CLASS_INITIALIZATION_FLAG.
11161 (java_lang_expand_expr): Emit initialization code for static class
11162 initialized flags when entering block, if necessary.
11163 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
11164 * java-tree.h (flag_optimize_sci): New global variable declaration.
11165 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
11166 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
11167 (LOCAL_FINAL_P): Fixed typo in comment.
11168 (FINAL_VARIABLE_P): Likewise.
11169 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
11170 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
11171 (struct lang_decl): New fields `ict', `smic' and `cif.'
11172 (check_for_initialization): New returned value for global.
11173 (attach_initialized_static_class): New global function.
11174 (STATIC_CLASS_INIT_OPT_P): New macro.
11175 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
11176 * lang.c (java_decode_option): Handle
11177 `-fno-optimize-static-class-initialization'
11178 * parse.y (start_complete_expand_method): New function.
11179 (java_expand_method_bodies): Likewise.
11180 (attach_init_test_initialization_flags): Likewise.
11181 (adjust_init_test_initialization): Likewise.
11182 (emit_test_initialization): Likewise.
11183 (java_complete_expand_methods): Nullify abstract and native method
11184 bodies.
11185 (java_complete_expand_method): New locals `fbody', `block_body'
11186 and `exception_copy.' Reorganized: directly return on empty method
11187 bodies, call `start_complete_expand_method', remember definitely
11188 initialized static class in function, don't expand method bodies.
11189 (java_expand_classes): Call `java_expand_method_bodies' before
11190 `finish_class' when compiling to native.
11191 (resolve_expression_name): Use `orig' after building outer class
11192 field access.
11193 (patch_invoke): Remember static method invocations.
11194
11195 2001-08-06 Richard Henderson <rth@redhat.com>
11196
11197 * class.c (emit_register_classes): Pass a symbol_ref and priority
11198 to assemble_constructor.
11199
11200 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
11201
11202 * java-tree.h (all_class_filename): New macro.
11203 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
11204 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
11205 newly created IDENTIFIER_NODE to `all_class_filename.'
11206
11207 2001-08-01 Jeff Sturm <jsturm@one-point.com>
11208
11209 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
11210 Use ggc_add_tree_root to register roots.
11211
11212 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
11213
11214 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
11215 second operand calling check_init.
11216 * decl.c (complete_start_java_method): Swaped second and third
11217 arguments while creating WITH_CLEANUP_EXPR node.
11218 * jcf-write.c (generate_bytecode_insns): Use second operand
11219 instead of third when handling WITH_CLEANUP_EXPR.
11220 * parse.y (java_complete_lhs): Expand second operand of
11221 WITH_CLEANUP_EXPR nodes.
11222 (patch_synchronized_statement): Swaped second and third arguments
11223 while creating WITH_CLEANUP_EXPR node.
11224
11225 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
11226
11227 * parse.y (create_interface): Avoid cyclic inheritance report when
11228 syntax error encountered during class definition.
11229 Fixes PR java/2956
11230
11231 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
11232
11233 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
11234 ASM_FINAL_SPEC.
11235 (lang_specific_pre_link): Use set_input to set input_filename.
11236 Append `main' here.
11237 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
11238 (main): Fix definition.
11239 Strip `main' from classname.
11240 Fixes PR java/227.
11241
11242 2001-07-18 Tom Tromey <tromey@redhat.com>
11243
11244 For PR java/2812:
11245 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
11246 * lex.c (java_new_lexer): Use ICONV_CONST.
11247 (java_read_char): Likewise.
11248 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
11249 (jv-scan$(exeext)): Likewise.
11250
11251 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
11252
11253 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
11254 * parse.y (check_class_interface_creation): Allow `private' if the
11255 enclosing is not an interface.
11256 (create_interface): Interface tagged public if the enclosing
11257 context is an interface.
11258 (create_class): Class tagged public if the enclosing context
11259 is an interface.
11260 Fixes PR java/2959
11261
11262 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
11263
11264 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
11265 Fixes PR java/2665
11266
11267 2001-07-14 Tim Josling <tej@melbpc.org.au>
11268
11269 * check-init.c (check_init): Remove references to EXPON_EXPR.
11270
11271 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
11272
11273 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
11274 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
11275 Fixes PR java/3602
11276
11277 2001-07-13 Tom Tromey <tromey@redhat.com>
11278
11279 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
11280 invocation.
11281
11282 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
11283
11284 * parse.y (patch_method_invocation): Don't override primary if one
11285 is already provided, but let this$<n> be built. Fixed comment.
11286
11287 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
11288
11289 * parse.y (empty_statement:): Report empty statement error only
11290 when found at class declaration level.
11291 Fixes PR java/3635
11292
11293 2001-07-12 Tom Tromey <tromey@redhat.com>
11294
11295 * expr.c (expand_load_internal): New function.
11296 (LOAD_INTERNAL): Use it.
11297
11298 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
11299
11300 * parse.y (verify_constructor_super): Compare anonymous class ctor
11301 args with `valid_method_invocation_conversion_p.'
11302 Fixes PR java/3285
11303
11304 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11305
11306 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
11307 `-fsyntax-only.' Fixes PR java/3248
11308
11309 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11310
11311 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
11312
11313 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
11314
11315 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
11316 current function is static. Fixes PR java/1970
11317
11318 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11319
11320 * parse.y (patch_method_invocation): Add enclosing context to ctor
11321 calls if necessary. Fixes PR java/2953
11322
11323 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11324
11325 * parse.y (resolve_package): Abort if qualified expression member
11326 isn't right.
11327 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
11328 Fixes PR java/1391
11329
11330 2001-07-07 Zack Weinberg <zackw@stanford.edu>
11331
11332 * verify.c: Don't use // comments.
11333
11334 2001-07-05 Tom Tromey <tromey@redhat.com>
11335
11336 * lang.c (flag_assume_compiled): Removed.
11337 * java-tree.h (flag_assume_compiled): Removed.
11338 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
11339 -fhash-synchronization, -fuse-divide-subroutine,
11340 -fcheck-references, -femit-class-file, -femit-class-files,
11341 -fassume-compiled. Updated --encoding information. Changed
11342 -foutput-class-dir to `-d'.
11343
11344 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
11345
11346 * jcf-parse.c (parse_class_file): Add lineno parameter to
11347 debug_start_source_file call.
11348
11349 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
11350
11351 * gcj.texi: Use gpl.texi.
11352 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
11353 dependencies and use doc/include in search path.
11354
11355 2001-07-03 Jeff Sturm <jsturm@one-point.com>
11356
11357 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
11358 `this'. If so, don't build instance initializers.
11359
11360 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
11361
11362 * parse.y (resolve_expression_name): Improved error message for
11363 inner class cases. Fixes PR java/1958
11364
11365 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
11366
11367 * lang.c: #include diagnostic.h
11368 (lang_print_error): Add a `diagnostic_context *' parameter.
11369 (java_dummy_print): Likewise.
11370 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
11371
11372 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11373
11374 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
11375 * jcf.h (typedef struct JCF): New bitfield `finished.'
11376 (JCF_FINISH): Set `finished.'
11377 (JCF_ZERO): Reset `finished.'
11378 Fixes PR java/2633
11379
11380 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11381
11382 * parse.y (class_body_declaration:): Don't install empty instance
11383 initializers.
11384 Fixes PR java/1314
11385
11386 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11387
11388 * class.c (set_super_info): Call `set_class_decl_access_flags.'
11389 (set_class_decl_access_flags): New function.
11390 * java-tree.h (set_class_decl_access_flags): New prototype.
11391 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
11392 (parse_class_file): New local `decl_max_locals.' Take wide types
11393 into account to compute DECL_MAX_LOCALS.
11394 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
11395 imports on demand.
11396
11397 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
11398
11399 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
11400
11401 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11402
11403 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
11404 * parse.y (do_resolve_class): Moved comments out to leading comment
11405 section. Removed local `start', New local `_ht' and
11406 `circularity_hash.' Record `enclosing' in hash table and search
11407 it to detect circularity. Use `enclosing' as an argument to
11408 `lookup_cl.' Free the hash table when done.
11409
11410 2001-06-19 Tom Tromey <tromey@redhat.com>
11411
11412 * lex.c (java_read_char): Disallow invalid and overlong
11413 sequences. Fixes PR java/2319.
11414
11415 2001-06-05 Jeff Sturm <jsturm@one-point.com>
11416
11417 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
11418
11419 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11420
11421 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
11422 arguments accordingly.
11423
11424 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
11425
11426 * gcj.texi: Move contents to just after title page.
11427
11428 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
11429
11430 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
11431 builtin type.
11432 (patch_incomplete_class_ref): Build the class ref, build the class
11433 init if necessary, complete the tree.
11434 Fixes PR java/2605
11435
11436 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
11437
11438 * parse.y (lookup_field_wrapper): Test `name' code.
11439 (resolve_qualified_expression_name): Test `qual_wfl' code.
11440 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
11441 handle `qual_wfl' by code.
11442 (maybe_build_primttype_type_ref): Test `wfl' code.
11443
11444 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11445
11446 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
11447 fdl.texi.
11448 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
11449 the dvi file in the java directory.
11450
11451 2001-05-25 Sam TH <sam@uchicago.edu>
11452
11453 * gen-table.pl javaop.h jcf.h lex.h,
11454 parse.h: Fix header include guards.
11455
11456 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
11457
11458 * jv-scan.c (version): Update copyright year.
11459
11460 2001-05-21 Per Bothner <per@bothner.com>
11461
11462 * jcf-parse.c (read_class): If class is from .class or .zip file
11463 and it's already been read, don't push/pop parser context.
11464
11465 2001-05-18 Per Bothner <per@bothner.com>
11466
11467 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
11468 command line so the jvgenmain-generated main program comes first.
11469
11470 2001-05-15 Tom Tromey <tromey@redhat.com>
11471
11472 * class.c (build_utf8_ref): Don't generate identifier based on
11473 utf8const contents.
11474
11475 2001-05-12 Richard Henderson <rth@redhat.com>
11476
11477 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
11478 * expr.c (java_lang_expand_expr): Expand it.
11479 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
11480 calling build_exception_object_ref.
11481 * parse.y (catch_clause_parameter): Likewise.
11482 (build_dot_class_method): Likewise.
11483 (try_reference_assignconv): Likewise.
11484 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
11485 * jcf-write.c (generate_bytecode_insns): Likewise.
11486
11487 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
11488
11489 * parse.y (build_unresolved_array_type): Set
11490 EXPR_WFL_QUALIFICATION on the newly created wfl.
11491 Fixes PR java/2538. Fixes PR java/2535.
11492
11493 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
11494
11495 * parse.y (fix_constructors): Removed unnecessary assignment to
11496 local. Moved assignment to `this$<n>', fixed comments and
11497 indentation.
11498 (build_wfl_wrap): Fixed indentation.
11499 Fixes PR java/2598, java/2579 and java/2658.
11500
11501 2001-05-03 Mo DeJong <mdejong@redhat.com>
11502
11503 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
11504 check for byte swap.
11505
11506 2000-05-02 Jeff Sturm <jsturm@one-point.com>
11507
11508 * expr.c (build_class_init): Move MODIFY_EXPR
11509 outside of COND_EXPR. Remove variable `call'.
11510
11511 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11512
11513 * decl.c: NULL_PTR -> NULL.
11514 * jcf-write.c: Likewise.
11515
11516 2001-05-01 Tom Tromey <tromey@redhat.com>
11517
11518 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
11519 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
11520 * gcj.texi: Updated copyright text. Include fdl.texi.
11521 (Top): Link to new node.
11522
11523 2001-05-01 Per Bothner <per@bothner.com>
11524
11525 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
11526
11527 2001-05-01 Per Bothner <per@bothner.com>
11528
11529 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
11530 import_list contains the name, not the TREE_PURPOSE.
11531
11532 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11533
11534 * jcf-io.c (read_zip_member): Cast to long in comparison with
11535 signed value.
11536
11537 * jvspec.c (lang_specific_driver): Initialize variables.
11538
11539 * mangle.c (find_compression_record_match): Likewise.
11540
11541 * typeck.c (build_null_signature): Provide static prototype. Mark
11542 parameter with ATTRIBUTE_UNUSED.
11543
11544 * verify.c (verify_jvm_instructions): Initialize variable.
11545
11546 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11547
11548 * parse.y (do_resolve_class): Check for cyclic inheritance during
11549 inner class resolution.
11550
11551 2001-04-27 Per Bothner <per@bothner.com>
11552
11553 * parse.y (java_expand_classes): Don't change ctxp_for_generation
11554 while iterating, since that could cause gc to lose stuff.
11555
11556 2001-04-26 Per Bothner <per@bothner.com>
11557
11558 Fix method search wrt scope of inner classes to match JLS2.
11559 * typeck.c (build_null_signature): New static function.
11560 (has_method): New function. Uses build_null_signature and lookup_do.
11561 * java-tree.h (has_method): New declaration.
11562 * parse.y (find_applicable_accessible_methods_list): Do not search
11563 context of inner classes here.
11564 (patch_method_invocation): Search scope, ie. current and outer clases,
11565 for method matching simple name, to find class.
11566
11567 2001-04-26 Per Bothner <per@bothner.com>
11568
11569 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
11570 Fix thinko: If a single case, use if_icmpeq, not ifeq.
11571
11572 * constants.c (find_methodref_with_class_index): New function.
11573 (find_methodref_index): Use find_methodref_with_class_index.
11574 * java-tree.h (find_methodref_with_class_index): New declaration.
11575 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
11576 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
11577 If context changed from interface to class, don't use invokeinterface.
11578
11579 2001-04-25 Per Bothner <per@bothner.com>
11580
11581 * verify.c (verify_jvm_instructions): For field instructions,
11582 check that field index is valid. For invoke instructions, check that
11583 method index is valid.
11584
11585 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
11586
11587 * config-lang.in (target_libs): Copy from $libgcj_saved.
11588
11589 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11590
11591 * decl.c (init_decl_processing): Add new class "protectionDomain"
11592 field.
11593 * class.c (make_class_data): Set initial value for "protectionDomain".
11594
11595 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11596
11597 * jvspec.c (lang_specific_driver): Fix memory allocation
11598 deficit, by using concat in lieu of xmalloc/sprintf.
11599
11600 2001-04-20 Per Bothner <per@bothner.com>
11601
11602 Fixes to compile multiple .class files at once.
11603 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
11604 * java-tree.h (CLASS_PARSED_P): New macro.
11605 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
11606 * jcf-parse.c (jcf_parse_source): Inline into read_class.
11607 (read_class): Avoid some code duplication.
11608 Don't call JCF_FINISH for a .class file - might be needed later.
11609 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
11610 rather than CLASS_LOADED_P, since latter implies class laid out.
11611 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
11612 * parse.y: Don't need to set CLASS_LOADED_P for array types.
11613
11614 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11615
11616 * Make-lang.in (java/boehm.o): Depend on toplev.h.
11617
11618 * boehm.c: Include toplev.h.
11619
11620 2001-04-06 Tom Tromey <tromey@redhat.com>
11621 Alexandre Petit-Bianco <apbianco@redhat.com>
11622
11623 Fix for PR gcj/1404 and PR gcj/2332:
11624 * parse.y (build_array_from_name): If we use the type_wfl then
11625 accumulate dimensions from the original type as well.
11626 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
11627
11628 2001-04-06 Tom Tromey <tromey@redhat.com>
11629
11630 * parse.y (analyze_clinit_body): Return true if the second operand
11631 of a METHOD_EXPR is nonzero.
11632
11633 2001-04-06 Tom Tromey <tromey@redhat.com>
11634
11635 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
11636 directory.
11637 ($(srcdir)/java/parse.c): Likewise.
11638
11639 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
11640
11641 * gcj.texi: Use `which-gcj' instead of `which-g77.'
11642 (version-gcc): Initialized.
11643 (which-gcj): Likewise.
11644
11645 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11646
11647 * java-tree.h (struct lang_decl): New macro
11648 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
11649 * parse.y (build_instance_initializer): New function.
11650 (add_instance_initializer): Use it.
11651 (java_fix_constructors): Set `current_class' before fix pass.
11652 (fix_constructors): Just return if already fixed. Move `super()'
11653 invocation ahead. Use `build_instance_initializer.'
11654 Fixes PR java/1315.
11655
11656 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11657
11658 * parse.y (resolve_qualified_expression_name): Pass field's
11659 DECL_CONTEXT to `not_accessible_p.'
11660 (not_accessible_p): Changed parameters order in `inherits_from_p'
11661 invocation.
11662
11663 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
11664
11665 * lang-options.h: Add flag_check_references.
11666
11667 2001-04-04 Per Bothner <per@bothner.com>
11668
11669 * java-tree.h (CONSTANT_VALUE_P): New macro.
11670 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
11671 * parse.y (maybe_build_class_init_for_field): New static function.
11672 (resolve_expression_name, resolve_field_access): Use
11673 maybe_build_class_init_for_field instead of build_class_init
11674 This does not do the init if the field is compile-time-constant.
11675 (resolve_field_access): Simplify.
11676
11677 * parse.y (fold_constant_for_init): Merge test into switch.
11678
11679 2001-04-03 Zack Weinberg <zackw@stanford.edu>
11680
11681 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
11682 on gansidecl.h.
11683 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
11684
11685 2001-04-02 Zack Weinberg <zackw@stanford.edu>
11686
11687 * expr.c (pop_type_0): Save the result of the first
11688 lang_printable_name call in a scratch buffer, so it
11689 won't be clobbered by the second call.
11690
11691 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
11692
11693 * parse-scan.y (array_type:): Rewritten.
11694 (type_declaration:): `empty_statement' replaces `SC_TK.'
11695 (class_member_declaration:): `empty statement' added.
11696 (method_body:): Simplified.
11697 (static_initializer:): Likewise.
11698 (primary_no_new_array:): Use `type_literals.'
11699 (type_literals:): New rule.
11700 (dims:): Set and update `bracket_count.'
11701 Fixes PR java/1074. Fixes PR java/2412.
11702
11703 2001-03-28 Hans Boehm <boehm@acm.org>
11704
11705 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
11706 (get_boehm_type_descriptor): Set type on returned value to be a
11707 pointer length integer.
11708
11709 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11710
11711 * expr.c (pop_type_0): Call `concat' rather than building the
11712 string manually.
11713 (pop_type): Add format specifier in call to `error'.
11714
11715 * parse.y (patch_method_invocation): Avoid casting away
11716 const-ness.
11717
11718 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
11719
11720 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
11721
11722 2001-03-28 Richard Henderson <rth@redhat.com>
11723
11724 IA-64 ABI Exception Handling:
11725 * Make-lang.in (except.o): Don't depend on eh-common.h.
11726 * check-init.c (check_init): Handle EXC_PTR_EXPR.
11727 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
11728 [soft_exceptioninfo_call_node]: Remove.
11729 [eh_personality_libfunc, lang_eh_runtime_type]: New.
11730 (end_java_method): No emit_handlers.
11731 * except.c (java_set_exception_lang_code): Remove.
11732 (method_init_exceptions): Don't call it.
11733 (prepare_eh_table_type): No CATCH_ALL_TYPE.
11734 (build_exception_object_ref): New.
11735 (expand_end_java_handler): Update for except.h name changes.
11736 (emit_handlers, expand_resume_after_catch): Remove.
11737 * expr.c (java_lang_expand_expr): Update for except.h name changes.
11738 (process_jvm_instruction): Use build_exception_object_ref.
11739 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
11740 (soft_exceptioninfo_call_node): Remove.
11741 (build_exception_object_ref): Declare.
11742 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
11743 soft_exceptioninfo_call_node. Move processing ...
11744 [EXC_PTR_EXPR]: ... here.
11745 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
11746 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
11747 (source_end_java_method): No java_set_exception_lang_code or
11748 emit_handlers.
11749 (build_dot_class_method): Use build_exception_object_ref.
11750 (try_reference_assignconv): Check EXC_PTR_EXPR not
11751 soft_exceptioninfo_call_node.
11752
11753 2001-03-28 Richard Henderson <rth@redhat.com>
11754
11755 * java-tree.h (throw_node): Define as a single member of
11756 java_global_trees instead of a separate array.
11757 (JTI_THROW_NODE): New.
11758 * decl.c (throw_node): Don't declare.
11759 (init_decl_processing): Init a scalar throw_node.
11760 Don't register it for gc.
11761 * check-init.c (check_init): Reference scalar throw_node.
11762 * expr.c (build_java_athrow): Likewise.
11763 * jcf-write.c (generate_bytecode_insns): Likewise.
11764 * parse.h (BUILD_THROW): Likewise.
11765
11766 2001-03-28 Richard Henderson <rth@redhat.com>
11767
11768 * decl.c (end_java_method): Do not save and restore
11769 flag_non_call_exceptions.
11770 * parse.y (source_end_java_method): Likewise.
11771 * lang.c (flag_exceptions): Don't declare.
11772 (java_init_options): Set flag_non_call_exceptions. Set
11773 flag_exceptions here ...
11774 (java_init): ... not here.
11775
11776 2001-03-27 Richard Henderson <rth@redhat.com>
11777
11778 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11779 exceptions_via_longjmp.
11780
11781 * lang.c (flag_new_exceptions): Don't declare it.
11782 (java_init_options): Or set it.
11783
11784 2001-03-27 Richard Henderson <rth@redhat.com>
11785
11786 * decl.c (end_java_method): Rename asynchronous_exceptions to
11787 flag_non_call_exceptions.
11788 * parse.y (source_end_java_method): Likewise.
11789
11790 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11791
11792 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11793
11794 2001-03-26 Mark Mitchell <mark@codesourcery.com>
11795
11796 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11797
11798 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
11799
11800 * parse.y (find_as_inner_class): Follow current package
11801 indications not to mistakingly load an unrelated class.
11802
11803 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11804
11805 * constants.c (PUTN): Use memcpy, not bcopy.
11806
11807 * lex.c (java_read_char): Use memmove, not bcopy.
11808
11809 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11810
11811 2001-03-23 Per Bothner <per@bothner.com>
11812
11813 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
11814 macro for better error pin-pointing.
11815 * java-tree.h: Fix typo in comment.
11816
11817 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
11818 Don't include jsr/goto in exception range.
11819 Check if start and end of exception range are the same (also TRY_EXPR).
11820 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11821 However, do emit the following goto even if try_block is empty.
11822 Defer freeing exception_decl until after the finalizer, to make
11823 sure the local isn't reused in the finalizer. Fixes PR java/1208.
11824
11825 * parse.y (java_complete_lhs): If the try-clause is empty, just
11826 return the finally-clause and vice versa.
11827
11828 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
11829
11830 * gcj.texi (Input Options): documented the check for attribute
11831 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11832 * java-tree.h (flag_force_classes_archive_check): Declared extern.
11833 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11834 (jcf_parse): Check for the right classes archive if necessary.
11835 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11836 (jcf_parse_fields): Fixed indentation.
11837 * jcf-write.c (append_gcj_attribute): New function.
11838 (generate_classfile): Compute the attribute count, invoke
11839 `append_gcj_attribute'.
11840 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11841 turned into bit-fields. New bit-field `right_zip.'
11842 (JCF_ZERO): Set `right_zip' to zero.
11843 * lang-options.h (-fforce-classes-archive-check): Added flag.
11844 * lang.c (flag_force_classes_archive_check): New flag.
11845 (lang_f_options): New entry `force-classes-archive-check.'
11846 Fixes PR java/1213.
11847
11848 2001-02-07 Andrew Haley <aph@redhat.com>
11849
11850 * gcj.texi (Configure-time Options): Add -fcheck-references.
11851 * expr.c (build_java_indirect_ref): New function.
11852 (java_check_reference): New function.
11853 (build_java_array_length_access): Use build_java_indirect_ref to
11854 check for null references.
11855 (build_java_arrayaccess): Likewise.
11856 (build_get_class): Likewise.
11857 (build_field_ref): Likewise.
11858 (invoke_build_dtable): Likewise.
11859 (build_invokeinterface): Likewise.
11860 * lang.c (lang_f_options): Add flag_check_references.
11861 * jvspec.c (jvgenmain_spec): Add flag_check_references.
11862 * java-tree.h (flag_check_references): New variable.
11863 * lang.c (flag_check_references): Likewise.
11864 * parse.y (patch_invoke): Use java_check_reference.
11865 (patch_assignment): Allow for extra nesting in
11866 _Jv_CheckArrayStore.
11867
11868 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
11869
11870 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11871 * lex.c (cxx_keywords): Likewise.
11872
11873 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11874
11875 * parse.y (qualify_ambiguous_name): Broaden `length'
11876 recognition. Help MODIFY_EXPR be resolved as expression names.
11877 Fixes PR java/2066. Fixes PR java/2400.
11878
11879 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
11880
11881 * gjavah.c (process_file): Mark interface definitions with
11882 "__attribute__ ((java_interface))".
11883
11884 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11885
11886 * class.c (layout_class): Fixed push_super_field's second
11887 argument. Fixes PR java/2333.
11888 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11889 too early to lay innerclasses out.
11890
11891 2001-03-20 Tom Tromey <tromey@redhat.com>
11892 Alexandre Petit-Bianco <apbianco@redhat.com>
11893
11894 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11895 inside an array reference. Insertion of the array store check
11896 rewritten. Fixes PR java/2299.
11897
11898 2001-03-20 Tom Tromey <tromey@redhat.com>
11899
11900 * lex.c (java_read_unicode): Only accept leading `u's.
11901
11902 2001-03-20 Tom Tromey <tromey@redhat.com>
11903
11904 * jcf-parse.c (read_class): Initialize `class'.
11905
11906 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11907
11908 * jcf_parse.c (jcf_parse): Eliminate unused variable.
11909
11910 2001-03-19 Mark Mitchell <mark@codesourcery.com>
11911
11912 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11913 (layout_class): Likewise.
11914 (layout_class_method): Likewise.
11915 (emit_register_classes): Likewise.
11916 * decl.c (builtin_function): Likewise.
11917 (give_name_to_locals): Likewise.
11918
11919 2001-03-19 Per Bothner <per@bothner.com>
11920
11921 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
11922 before trying to load an inner class.
11923
11924 Fixes to process to command-line .class files in two passes.
11925 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
11926 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
11927 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
11928 * class.c (is_compiled_class): Fix for renamed flag.
11929 * parse.y (maybe_create_class_interface_decl): Likewise.
11930 * jcf-parse.c (yyparse): Also set if compiling .class files.
11931 * jcf-parse.c (read_class); Read current_class.
11932 (jcf_parse): Make static.
11933 (load_inner_classes): New function, with code moved from jcf_parse,
11934 because we need to inner classes after the command-line files are read.
11935 (yyparse): Set finput to NULL when it doesn't need to be closed.
11936 Reduce use of main_jcf (basically only for archive) and
11937 use finput instead of main_jcf->read_state.
11938 Inline jcf_figure_file_type into yyparse.
11939 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11940 Defer load_inner_classes and parse_class_file to a second pass,
11941 after we've correctly mapped command-line .clas fiels to classes.
11942 (jcf_figure_file_type): Removed.
11943 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
11944 (JCF_ZERO): Also clear zipd field.
11945 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
11946
11947 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11948
11949 * jcf-parse.c (yyparse): Change ch from char * to char.
11950
11951 2001-03-19 Per Bothner <per@bothner.com>
11952
11953 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
11954 Add constructed filelist-file at end, following -xjava. Thus any .o
11955 and library files are not affected by the -xjava. Also wrap
11956 explicit @FILE with -xjava and -xnone.
11957
11958 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
11959
11960 * class.c (build_static_field_ref): Call make_decl_rtl() after
11961 setting the DECL_EXTERNAL flag.
11962
11963 2001-03-17 Per Bothner <per@bothner.com>
11964
11965 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
11966
11967 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
11968 when result is is needed (target is STACK_TARGET).
11969
11970 * parse.h (JDEP_SOLV): Removed.
11971 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
11972
11973 * parse.y (incomplete_class_list): Removed.
11974 (obtain_incomplete_type): Don't use or set incomplete_class_list.
11975 It doesn't work if resolve_class changes the name of an array type
11976 that is on the list and then someone else looks for the modified name.
11977 Also, seems liable to break when compiling multiple source files at
11978 once. So the simplest is to just remove incomplete_class_list -
11979 it is only a minor space win and it is not even clear it saves time.
11980
11981 * parse.y (resolve_class): Remove unneeded promote_type.
11982
11983 2001-03-15 Per Bothner <per@bothner.com>
11984
11985 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
11986 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
11987 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11988 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11989
11990 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
11991 * parse.y (java_expand_classes): Likewise.
11992
11993 * parse.y (expand_start_java_method): Was only called once and had a
11994 misleading name, so inline in caller java_complete_expand_method.
11995 (enter_a_block): Likewise inline in enter_block and remove.
11996
11997 Remove junk from when gcc/java was created (by copying from C/C++).
11998 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
11999 (struct binding_level): Remove fields keep, keep_if_subblocks,
12000 more_cleanups_ok, have_cleanups (which have never been used).
12001 (pushlevel, poplevel): Remove related useless code.
12002
12003 * class.c (make_class_data): The class_dtable_decl (i.e. the
12004 vtable for Class) should be external, except when compiling Class.
12005
12006 * jvspec.c (lang_specific_driver): Fix -C handling.
12007 Check -save-temps to see if temp @FILE should be deleted.
12008 Follow-up to/fix for February 16 patch.
12009
12010 * verify.c (verify_jvm_instructions): Better error msgs for dup.
12011 (type_stack_dup): Remove no-longer neded error check.
12012
12013 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
12014
12015 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
12016 to 'for_pointer'. If this type is for a pointer (argument) mangling,
12017 don't surround the element with 'N..E' if the type name is
12018 unqualified.
12019
12020 2001-03-14 Mark Mitchell <mark@codesourcery.com>
12021
12022 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
12023 DECL_RTL_SET_P, etc.
12024 (make_method_value): Likewise.
12025 (get_dispatch_table): Likewise.
12026
12027 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12028
12029 2001-03-07 Tom Tromey <tromey@redhat.com>
12030
12031 * config-lang.in (lang_requires): Define.
12032
12033 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
12034
12035 * typeck.c (convert): Check flag_unsafe_math_optimizations,
12036 not flag_fast_math.
12037
12038 2001-03-05 Per Bothner <per@bothner.com>
12039
12040 Fix a problem where rest_of_decl_compilation applied to
12041 class_dtable_decl causes problems because it was done too early,
12042 before output file was opened.
12043 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
12044 * class.c (class_dtable_decl): Add macro - element of class_roots.
12045 (make_class_data): Define class_dtable_decl.
12046 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
12047
12048 2001-03-01 Zack Weinberg <zackw@stanford.edu>
12049
12050 * java/class.c, java/decl.c, java/java-tree.h: Replace all
12051 uses of 'boolean' with 'bool'.
12052
12053 2001-03-01 Zack Weinberg <zackw@stanford.edu>
12054
12055 * lang-specs.h: Add zero initializer for cpp_spec field to all
12056 array elements.
12057
12058 2001-02-16 Per Bothner <per@bothner.com>
12059
12060 Handle compiling multiple input files at once, and @FILE syntax.
12061 * gcj.texi: Updated documentation to match.
12062 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
12063 * jcf-parse.c (parse_source_file): Split into ...
12064 (parse_source_file_1): New function - and:
12065 (parse_source_file_2): New function.
12066 (yyparse): On -ffilelist-file, open and scan named file.
12067 On first pass over files, only do parse_source_file_1.
12068 A new second pass calls parse_source_file_2 for each file to compile.
12069 (init_jcf_parse): Call init_src_parse.
12070 * jvspec.c (INDIRECT_FILE_ARG): New flag.
12071 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
12072 as multiple input file combined in one compilation.
12073 * lang-options.h: Add -ffilelist-file
12074 * lang.c (flag_filelist_file): New flag variable.
12075 (lang_f_options): Handle -ffilelist-file.
12076 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
12077 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
12078 gclass_list - use global fields of src_parse_roots instead.
12079 * parse.y (src_parse_roots): New array.
12080 (incomplete_class_list, gclass_list): New macros.
12081 (push_parser_context, java_pop_parser_context,
12082 java_parser_context_resume): Don't fiddle with deleted fields.
12083 (various): Use incomplete_class gclass_list and global macros
12084 instead of parse_ctxt fields - the lists are global.
12085 (init_src_parse): New function.
12086
12087 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12088
12089 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
12090
12091 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
12092
12093 * parse.y (check_inner_class_access): Moved declaration of local
12094 `enclosing_decl_type' to the right location.
12095
12096 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
12097
12098 * parse.y (parser_check_super_interface): Don't call
12099 check_pkg_class_access for an inner interface.
12100 (parser_check_super): Don't call check_pkg_class_access for inner
12101 class.
12102 (do_resolve_class): Simplify enclosing type loop. Don't call
12103 check_pkg_class_access if CL and DECL are not set.
12104 (find_in_imports_on_demand): Set DECL if class_type needed to be
12105 loaded. Don't call check_pkg_class_access for an inner class.
12106 (check_inner_class_access): Rewritten to implement member access
12107 rules as per spec 6.6.1.
12108 (check_pkg_class_access): Handle the empty package correctly.
12109 (in_same_package): New function. Determine if two classes are in the
12110 same package.
12111
12112 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
12113
12114 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
12115 method into array types.
12116 * parse.y (patch_method_invocation): Bypass access check on clone call
12117 to array instance.
12118
12119 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
12120
12121 * expr.c (build_instanceof): Check for arrays when trying fold to
12122 false.
12123
12124 2001-02-15 Jim Meyering <meyering@lucent.com>
12125
12126 * Make-lang.in (java.install-common): Depend on `installdirs'.
12127 (java.install-info): Likewise.
12128
12129 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
12130
12131 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
12132
12133 2001-02-14 Tom Tromey <tromey@redhat.com>
12134 Alexandre Petit-Bianco <apbianco@cygnus.com>
12135
12136 Fix for PR java/1261.
12137 * typeck.c (build_java_array_type): Add public `clone' method to
12138 arrays.
12139 * parse.y (resolve_qualified_expression_name): Use current_class
12140 when checking for inaccessibility.
12141 (patch_method_invocation): Fixed error message when accessibility
12142 denied. Added `from_super' argument.
12143
12144 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
12145
12146 * parse.y (resolve_class): Don't build a fake decl. Use the one
12147 already built.
12148 * typeck.c (build_java_array_type): Build and assign decl to array
12149 type.
12150
12151 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
12152
12153 * parse.y (not_accessible_p): Changed leading comment. Added extra
12154 `where' argument. Use it to enforce protected access rules.
12155 (resolve_qualified_expression_name): Added extra argument to
12156 not_accessible_p.
12157 (patch_method_invocation): Use argument `primary' to provide
12158 not_accessible_p with an extra argument.
12159 (lookup_method_invoke): Added extra argument to not_accessible_p.
12160 (search_applicable_method_list): Likewise.
12161
12162 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
12163
12164 * parse.y (resolve_qualified_expression_name): Try to resolve as
12165 an inner class access only if `decl' is a TYPE_DECL.
12166
12167 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12168
12169 * decl.c (classdollar_identifier_node): Initialize.
12170 * java-tree.h (enum java_tree_index): New entry
12171 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
12172 (classdollar_identifier_node): New macro.
12173 (ID_CLASSDOLLAR_P): Likewise.
12174 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
12175 (build_dot_class_method_invocation): Likewise.
12176 (find_applicable_accessible_methods_list): `class$' can't be
12177 inherited.
12178
12179 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
12180
12181 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
12182
12183 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
12184
12185 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
12186 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
12187 gone.
12188
12189 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
12190
12191 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
12192 outside of the `__U' sequence too.
12193 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
12194 sequence too.
12195
12196 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
12197
12198 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
12199
12200 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12201
12202 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
12203 (JVGENMAIN_OBJS): Likewise.
12204 * java-tree.h (append_gpp_mangled_name): New prototype.
12205 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
12206 Removed cast calling `gcc_add_root.'
12207 * jvgenmain.c (mangle_obstack): New global, initialized.
12208 (main): Use it.
12209 (do_mangle_class): Constify local `ptr.'
12210 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
12211 append_gpp_mangle_name and update `count' if necessary.
12212 Use `mangle_obstack.'
12213 * mangle.c (append_unicode_mangled_name): Removed.
12214 (append_gpp_mangled_name): Likewise.
12215 (unicode_mangling_length): Likewise.
12216 (mangle_member_name): Return type set to `void.'
12217 (mangle_field_decl): Don't append `U' in escaped names.
12218 (mangle_method_decl): Likewise.
12219 (mangle_member_name): Just use `append_gpp_mangled_name.'
12220 * mangle_name.c: New file.
12221
12222 2001-02-07 Per Bothner <per@bothner.com>
12223
12224 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
12225
12226 * check-init.c (check_init): Don't call done_alternative after
12227 processing loop code, as a LOOP_EXPR never terminates normally.
12228
12229 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
12230
12231 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
12232
12233 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12234
12235 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
12236 DECLs.
12237
12238 2001-02-06 Tom Tromey <tromey@redhat.com>
12239
12240 * lex.c (java_new_lexer): Longer error message.
12241
12242 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
12243 Alexandre Petit-Bianco <apbianco@cygnus.com>
12244
12245 * typeck.c (build_prim_array_type): Added leading comment.
12246 (build_java_array_type): Moved locals out of
12247 block. Always create the `data' field, fixed alignment to match
12248 C++.
12249
12250 2001-02-04 Tom Tromey <tromey@redhat.com>
12251
12252 * expr.c (java_lang_expand_expr): Don't bother recomputing
12253 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
12254 Fixes PR java/1866.
12255
12256 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12257
12258 * parse.y (process_imports): Save the original name of the import
12259 for better error report.
12260
12261 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
12262
12263 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
12264 of macros used when compiling jvspec.c.
12265 * jvspec.c (lang_specific_driver): Link with the shared
12266 libgcc by default.
12267
12268 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12269
12270 * check-init.c (check_init): Call internal_error instead of fatal.
12271 * expr.c (java_lang_expand_expr): Likewise.
12272 * jcf-parse.c (get_constant): Likewise.
12273 * mangle.c (java_mangle_decl): Likewise.
12274 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
12275 (operator_string): Likewise.
12276 * check-init.c (check_init): Call abort instead of fatal.
12277 * class.c (build_class_ref): Likewise.
12278 * constants.c (write_constant_pool): Likewise.
12279 * decl.c (start_java_method): Likewise.
12280 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
12281 (java_stack_dup, encode_newarray_type): Likewise.
12282 (build_java_array_length_access): Likewise.
12283 (build_java_check_indexed_type, expand_java_pushc): Likewise.
12284 (build_java_soft_divmod, build_invokeinterface): Likewise.
12285 * java-tree.h (INNER_CLASS_P): Likewise.
12286 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
12287 (give_name_to_class, get_class_constant): Likewise.
12288 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
12289 (find_constant_index, generate_bytecode_conditional): Likewise.
12290 (generate_bytecode_insns, perform_relocations): Likewise.
12291 * lex.c (java_unget_unicode, java_lex): Likewise.
12292 * mangle.c (mangle_type, mangle_record_type): Likewise.
12293 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
12294 (finish_mangling): Likewise.
12295 * parse.h (MARK_FINAL_PARMS): Likewise.
12296 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
12297 (obtain_incomplete_type, java_complete_class): Likewise.
12298 (java_check_regular_methods, java_complete_expand_method): Likewise.
12299 (cut_identifier_in_qualified, check_deprecation): Likewise.
12300 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
12301 (java_complete_lhs, lookup_name_in_blocks): Likewise.
12302 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
12303 * typeck.c (set_local_type, parse_signature_type): Likewise.
12304 (parse_signature_string, build_java_signature): Likewise;
12305 (set_java_signature): Likewise.
12306 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
12307 * class.c (add_method): Call fatal_error instead of fatal.
12308 (build_static_field_ref): Likewise.
12309 * expr.c (build_known_method_ref, expand_invoke): Likewise.
12310 * jcf-parse.c (get_constant, jcf_parse): Likewise.
12311 * lex.c (java_new_new_lexer): Likewise.
12312 * jv-scan.c (main): Likewise.
12313 (fatal_error): Renamed from fatal.
12314 * jcf-parse.c (yyparse): Call fatal_io_error instead of
12315 pfatal_with_name.
12316 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
12317 (yyparse): Likewise.
12318 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
12319 * lex.c (java_get_line_col): Likewise.
12320 * jcf-parse.c (load_class): Make errors non-fatal.
12321 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
12322
12323 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
12324
12325 * jvgenmain.c (class_mangling_suffix): Remove unused string.
12326 (error): Remove unused function.
12327 (main): Don't use "__attribute__ alias" on generated class symbol.
12328
12329 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12330
12331 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
12332 argument.
12333 * parse.y (finish_method_declaration): Code accounting for WFLed
12334 method DECL_NAMEs deleted.
12335 (check_abstract_method_definitions): Likewise.
12336 (resolve_type_during_patch): Layout resolved type.
12337 * typeck.c (lookup_do): Removed unused local.
12338
12339 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
12340
12341 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
12342 * decl.c (init_decl_processing): Use integer_minus_one_node, not
12343 integer_negative_one_node.
12344 * expr.c (build_java_binop): Likewise.
12345
12346 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
12347
12348 * zextract.c (read_zip_archive): Read file_offset before writing
12349 zipd and consequently clobbering the header contents.
12350
12351 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12352
12353 * Make-lang.in: Remove all dependencies on defaults.h.
12354 * decl.c: Don't include defaults.h.
12355 * expr.c: Likewise.
12356 * parse.y: Likewise.
12357
12358 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12359
12360 * ChangeLog (2001-01-21): Fixed typo.
12361 * class.c (layout_class_method): Code accounting for WFLed
12362 method DECL_NAMEs deleted.
12363 * constant.c (find_methodref_index): Likewise.
12364 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
12365 * java-tree.h (DECL_FUNCTION_WFL): New macro.
12366 (struct lang_decl): New field `wfl'.
12367 (java_get_real_method_name): Prototype deleted.
12368 * mangle.c (mangle_method_decl): Code accounting for WFLed
12369 method DECL_NAMEs deleted.
12370 * parse.h (GET_METHOD_NAME): Macro deleted.
12371 * parse.y (reset_method_name): Deleted.
12372 (method_header): Set DECL_FUNCTION_WFL.
12373 (check_abstract_method_header): Code accounting for WFLed method
12374 DECL_NAMEs deleted.
12375 (java_get_real_method_name): Deleted.
12376 (check_method_redefinition): Code accounting for WFLed method
12377 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
12378 (java_check_regular_methods): Likewise.
12379 (java_check_abstract_methods): Likewise.
12380 (java_expand_classes): Don't call `reset_method_name.'
12381 (search_applicable_method_list): Use DECL_NAMEs instead of
12382 GET_METHOD_NAME.
12383 * typeck.c (lookup_do): Code accounting for WFLed method
12384 DECL_NAMEs deleted.
12385
12386 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
12387
12388 * lex.c (java_read_char): Check for EOF from getc first.
12389
12390 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12391
12392 * class.c (layout_class): Don't lay the superclass out if it's
12393 already being laid out.
12394 * jcf-parse.c (handle_innerclass_attribute): New function.
12395 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
12396 handle_innerclasses_attribute.
12397 (jcf_parse): Don't load an innerclasses if it's already being
12398 laid out.
12399 * jcf-write.c (append_innerclass_attribute_entry): Static
12400 `anonymous_name' and its initialization deleted. `ocii' and `ini'
12401 to be zero for anonymous classes.
12402
12403 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12404
12405 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
12406 necessary.
12407 * jcf-parse.c (set_source_filename): Use
12408 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
12409
12410 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12411
12412 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
12413 gets a unique asm name.
12414
12415 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12416
12417 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
12418 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12419 if necessary.
12420 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
12421 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
12422 * parse.y (lookup_package_type_and_set_next): Deleted.
12423 (resolve_package): Removed unnecessary code.
12424 (find_applicable_accessible_methods_list): `finit$' can't be
12425 inherited.
12426 * verify.c (pop_argument_types): Added missing prototype.
12427
12428 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
12429
12430 * config-lang.in: Disable java by default.
12431
12432 2001-01-23 Tom Tromey <tromey@redhat.com>
12433
12434 * gcj.texi (Copying): New node.
12435 Added copyright information.
12436
12437 2001-01-21 Per Bothner <per@bothner.com>
12438
12439 Various fixes to allow compiling a compressed .jar/.zip archive.
12440 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
12441 (struct ZipFile): Add fields name and next (from ZipFileCache).
12442 (struct ZipDirectory): New field zipf points to owning ZipFile.
12443 * jcf.h (struct ZipDirectory): Add forward declaration.
12444 (struct JCF): Declare zipd field to have type struct ZipDirectory.
12445 Remove seen_in_zip and zip_offset fields.
12446 (JCF_SEEN_IN_ZIP): New macro.
12447 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
12448 * jcf-io.c: Change all ZipFileCache to ZipFile.
12449 (read_zip_member): New function.
12450 (open_in_zip): Call read_zip_member.
12451 * jcf-parse.c (find_in_current_zip): Remove function.
12452 (read_class): Merge in find_in_current_zip functionality.
12453 Call read_zip_member if needed.
12454 (parse_zip_file_entries): Use read_zip_member.
12455 (process_zip_dir): Update for removed and added JCF fields.
12456 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
12457
12458 2001-01-21 Per Bothner <per@bothner.com>
12459
12460 Minor optimization of static ggc roots.
12461 * jcf-parse.c (parse_roots): New static field.
12462 (current_field, current_method, current_file_list): Replace by macros
12463 naming fields of parse_roots.
12464 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
12465 * class.c (class_roots): New static field.
12466 (registered_class, fields_ident, info_ident, class_list):
12467 New macros naming fields of parse_roots.
12468 (build_static_field_ref): Don't register roots here.
12469 (layout_class): Static field list replaced by macro class_list.
12470 (init_class_processing): Call ggc_add_tree_root for 4 roots.
12471 Initialize fields_ident and info_ident here.
12472
12473 2001-01-21 Per Bothner <per@bothner.com>
12474
12475 * jcf-parse.c (ggc_mark_jcf): New function.
12476 (init_jcf_parse): Register current_jcf as ggc root.
12477
12478 2001-01-21 Per Bothner <per@bothner.com>
12479
12480 * lang.c (put_decl_node): Print method's name.
12481
12482 2001-01-21 Per Bothner <per@bothner.com>
12483
12484 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
12485 (verify_jvm_instructions): Use it, for better error messages on loads.
12486
12487 2001-01-21 Per Bothner <per@bothner.com>
12488
12489 * verify.c (merge_type_state): Still may have to merge even if
12490 LABEL_VERIFIED (label).
12491
12492 2001-01-21 Per Bothner <per@bothner.com>
12493
12494 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
12495 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
12496
12497 2001-01-19 Per Bothner <per@bothner.com>
12498
12499 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
12500 if expeting an interface type. Refines Tom's change of 2000-09-12.
12501
12502 2001-01-18 Per Bothner <per@bothner.com>
12503
12504 * gcj.texi (Input Options): Mention .java files.
12505
12506 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12507
12508 * lang-options.h (-Wunsupported-jdk11): Removed.
12509 * lang.c (flag_not_overriding): Deleted.
12510 (flag_static_local_jdk1_1): Likewise.
12511 (lang_W_options): Removed "unsupported-jdk11" entry.
12512 * parse.y (java_check_methods): Removed dead code.
12513
12514 2001-01-17 Tom Tromey <tromey@redhat.com>
12515
12516 Changes suggested by Per Bothner:
12517 * gcj.texi (Input Options): Don't mention input files.
12518 (Code Generation): Updated --main information.
12519 (Invoking jcf-dump): Mention that --javap is incomplete.
12520 From Alexandre Petit-Bianco:
12521 (Warnings): Don't mention -Wunsupported-jdk11.
12522 My stuff:
12523 (Compatibility): Mention JDK 1.2-ness of libraries.
12524 (Resources): Mention resources used when writing gcj.
12525
12526 2001-01-17 Tom Tromey <tromey@redhat.com>
12527
12528 * gcj.texi: New file.
12529 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
12530 (java.info): Depend on gcj.info.
12531 (java/gcj.dvi): New target.
12532 (java.dvi): Depend on gcj.dvi.
12533 (java.install-info): Wrote.
12534
12535 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
12536
12537 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
12538 having called make_decl_rtl.
12539
12540 2001-01-14 Per Bothner <per@bothner.com>
12541
12542 Various patches to emit better messages on verification errors.
12543 * expr.c (push_type_0): Return error indication on stack overflow,
12544 instead of callinfg fatal.
12545 (push_type): Now just call push_type_0 (nd fatal on overflow).
12546 (pop_type_0): Return detailed error message (in a char** argument).
12547 (pop_type): If pop_type_0 fails, print error message.
12548 (pop_argument_types): Moved to verify.c.
12549 * verify.c (pop_argument_types): Moved from expr.c.
12550 Return a (possible) error message, rather than void.
12551 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
12552 (verify_jvm_instruction): Use new macros, improving error messages.
12553 For case OPCODE_astore use object_ptr_type_node.
12554 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
12555 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
12556
12557 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
12558 constant, return body without wrapper. (Improves constant folding.)
12559 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
12560
12561 2001-01-13 Per Bothner <per@bothner.com>
12562
12563 * expr.c (expand_java_field_op): Assigning to a final field outside
12564 an initializer does not violate JVM spec, so should be warning, not
12565 error. (Sun's verifier does not complain - though MicroSoft's does.)
12566
12567 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
12568
12569 * gjavah.c (version), jcf-dump.c (version): Update copyright year
12570 to 2001.
12571
12572 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
12573
12574 * parse.y (resolve_expression_name): Permit instance variables from
12575 enclosing context in super constructor call.
12576 (resolve_qualified_expression_name): Permit enclosing class's qualified
12577 "this" in super constructor call.
12578
12579 2001-01-10 Mark Mitchell <mark@codesourcery.com>
12580
12581 * class.c (build_utf8_ref): Remove last argument in call to
12582 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12583 (build_class_ref): Likewise.
12584 (build_static_field_ref): Likewise.
12585 (get_dispatch_table): Likewise.
12586 (layout_class_method): Likewise.
12587 (emit_register_classes): Likewise.
12588 * constants.c (build_constant_data_ref): Likewise.
12589 * decl.c (builtin_function): Likewise.
12590 (create_primitive_vtable): Likewise.
12591 * expr.c (build_known_method_def): Likewise.
12592 (build_jni_stub): Likewise.
12593 (java_lang_expand_expr): Likewise.
12594
12595 2001-01-10 Tom Tromey <tromey@redhat.com>
12596
12597 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
12598
12599 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12600
12601 * java-tree.h (lang_printable_name_wls): New prototype.
12602 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
12603 rather than `current_class' to print type name. Don't prepend type
12604 names when printing constructor names.
12605 (lang_printable_name_wls): New function.
12606 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
12607 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
12608 * parse.y (patch_method_invocation): Message tuned for constructors.
12609 (not_accessible_p): Grant `private' access from within
12610 enclosing contexts.
12611
12612 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12613
12614 All files with updated copyright when applicable.
12615 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
12616 * class.c (mangle_class_field): Function removed.
12617 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
12618 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
12619 (build_class_ref): Call `java_mangle_class_field' instead of
12620 `mangle_class_field.'
12621 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
12622 (layout_class): Call `java_mangle_decl' instead of
12623 `mangle_static_field.'
12624 (cxx_keywords): Initialized static array moved to `lex.c.'
12625 (layout_class_method): Changed leading comment. Simplified to
12626 call `java_mangle_decl.' Local `ptr' moved in for loop body.
12627 * decl.c (lang_mark_tree): Mark field `package_list.'
12628 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
12629 (struct lang_type): New field `package_list.'
12630 (unicode_mangling_length): Prototype removed.
12631 (append_gpp_mangled_name, append_gpp_mangled_classtype,
12632 emit_unicode_mangled_name): Likewise.
12633 (cxx_keyword_p): New prototype.
12634 (java_mangle_decl, java_mangle_class_field,
12635 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
12636 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
12637 `build_expr_wfl.'
12638 * jvgenmain.c (main_method_prefix): Global variable removed.
12639 (main_method_suffix): Likewise.
12640 (do_mangle_classname): New function.
12641 (main): Call it. Format changed to accommodate new mangling scheme.
12642 * lex.c: (utf8_cmp): Conditionally prototyped.
12643 (cxx_keywords): Moved from class.c, conditionally defined.
12644 (utf8_cmp, cxx_keyword_p): Likewise.
12645 * mangle.c (obstack.h, ggc.h): Included.
12646 (mangle_field_decl): New function.
12647 (mangle_method_decl, mangle_type, mangle_pointer_type,
12648 mangle_array_type, mangle_record_type,
12649 find_compression_pointer_match, find_compression_array_match,
12650 find_compression_record_match,
12651 find_compression_array_template_match, set_type_package_list,
12652 entry_match_pointer_p, emit_compression_string, init_mangling,
12653 finish_mangling, compression_table_add, mangle_member_name): Likewise.
12654 (mangle_obstack): New global.
12655 (MANGLE_RAW_STRING): New macro.
12656 (unicode_mangling_length): Turned static.
12657 (append_unicode_mangled_name): Renamed from
12658 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
12659 replaces `obstack', removed from the parameter list.
12660 (append_gpp_mangled_name): Turned static. `mangle_obstack'
12661 replaces parameter `obstack', removed from the parameter list. Call
12662 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
12663 (append_gpp_mangled_classtype): Removed.
12664 (compression_table, compression_next): New static variables.
12665 * parse.y (temporary_obstack): Extern declaration removed.
12666
12667 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12668
12669 * parse.y (patch_binop): Compute missing type in error situations.
12670
12671 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
12672
12673 * class.c (make_class_data): Push initial value for "arrayclass".
12674 * decl.c (init_decl_processing): Add new class field "arrayclass".
12675
12676 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
12677
12678 From patha@softlab.ericsson.se:
12679 * parse.y (switch_label): Use build, not build1, to construct
12680 DEFAULT_EXPR.
12681
12682 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
12683
12684 * lang.c (lang_decode_option): Change -MA to -MP.
12685 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
12686 Update to new prototype; do quote targets.
12687 (jcf_dependency_write): Update.
12688
12689 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
12690
12691 Shorten primitive array allocation path:
12692 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
12693 to create new primitive arrays.
12694 * expr.c (build_newarray): If generating native code, call
12695 soft_newarray_node with a reference to the primitive TYPE identifier
12696 instead of type_value.
12697
12698 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
12699
12700 Fix for PRs gcj/312 and gcj/253:
12701 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
12702 dest if they arn't already.
12703 * class.c (layout_class): Call maybe_layout_super_class on
12704 superinterfaces also, but only if compiling from bytecode.
12705
12706 Fix for PR gcj/373:
12707 * parse.y (create_class): Set ACC_STATIC if class is declared in an
12708 interface.
12709
12710 2000-12-15 Tom Tromey <tromey@redhat.com>
12711
12712 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
12713 set.
12714
12715 2000-12-14 Andrew Haley <aph@redhat.com>
12716
12717 * boehm.c (mark_reference_fields): Change test to correctly detect
12718 bitmap overflow.
12719
12720 2000-12-15 Andreas Jaeger <aj@suse.de>
12721
12722 * config-lang.in (lang_dirs): Added.
12723
12724 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12725
12726 * parse.y (end_artificial_method_body): Fixed undefined behavior.
12727 Credits go to rth for finding it.
12728
12729 2000-12-13 Mike Stump <mrs@wrs.com>
12730
12731 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
12732
12733 2000-11-07 Tom Tromey <tromey@cygnus.com>
12734
12735 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
12736 * lex.c (java_ignorable_control_p): Removed.
12737 (java_letter_or_digit_p): Removed.
12738 (java_start_char_p): New function.
12739 (java_read_char): Return `int', not `unicode_t'. Changed
12740 callers.
12741 (java_read_unicode): Likewise.
12742 (java_read_unicode_collapsing_terminators): Likewise.
12743 (java_get_unicode): Likewise.
12744 (java_new_lexer): Initialize hit_eof.
12745 (java_parse_end_comment): Take `int' argument.
12746 (java_parse_doc_section): Likewise.
12747 (java_parse_escape_sequence): Don't allow backlash-newline.
12748 Return `int'.
12749 * lex.h (JAVA_DIGIT_P): Removed.
12750 (_JAVA_LETTER_OR_DIGIT_P): Removed.
12751 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
12752 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
12753 (JAVA_PART_CHAR_P): New macro.
12754 (UEOF): Now -1.
12755 (JAVA_CHAR_ERROR): Now -2.
12756 (java_lexer): New field `hit_eof'.
12757 * chartables.h: New file.
12758 * gen-table.pl: new file.
12759
12760 2000-11-20 Tom Tromey <tromey@cygnus.com>
12761 Alexandre Petit-Bianco <apbianco@cygnus.com>
12762
12763 * parse.y (java_complete_lhs): Only allow compound assignment of
12764 reference type if type is String.
12765
12766 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12767
12768 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
12769 jcf-path.c: Likewise.
12770
12771 2000-12-09 Anthony Green <green@redhat.com>
12772
12773 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
12774 filestart and filename_length as int values.
12775
12776 2000-12-07 Mo DeJong <mdejong@redhat.com>
12777
12778 * jcf-io.c (find_class): Correct the logic that tests to see if a
12779 .java file is newer than its .class file. The compiler was
12780 incorrectly printing a warning when file mod times were equal.
12781
12782 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
12783
12784 * jvgenmain.c: Use ISPRINT not isascii.
12785
12786 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12787
12788 * parse.y (end_artificial_method_body): Fixed typo.
12789
12790 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
12791
12792 * parse.y (patch_method_invocation): Pick the correct enclosing
12793 context when creating inner class instances.
12794 Fixes gcj/332.
12795
12796 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
12797
12798 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12799 Update copyright year to 2000.
12800
12801 2000-11-23 Anthony Green <green@redhat.com>
12802
12803 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12804 Move current_file_list out of yyparse and make it static.
12805
12806 * expr.c: Declare quick_stack and tree_list_free_list as static
12807 (init_expr_processing): Register quick_stack and
12808 tree_list_free_list roots.
12809
12810 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12811
12812 * parse.y (build_outer_field_access): New local `decl_ctx', use
12813 it. Check for field's context and current class immediate outer
12814 context inheritance.
12815 (outer_field_access_p): Consider fields inherited from the last
12816 enclosing context.
12817 (build_access_to_thisn): Stop at the last enclosing context if
12818 necessary.
12819 Fixes gcj/367.
12820
12821 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
12822
12823 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12824
12825 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
12826
12827 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12828 scratch buffer.
12829
12830 2000-11-20 Tom Tromey <tromey@cygnus.com>
12831
12832 * jv-scan.c (help): Document --complexity.
12833 (options): Added --complexity.
12834 (flag_complexity): New global.
12835 (main): Call `report'.
12836 * parse-scan.y (complexity): New global.
12837 (if_then_statement, if_then_else_statement,
12838 if_then_else_statement_nsi, switch_block_statement_group,
12839 while_expression, do_statement, for_begin, continue_statement,
12840 throw_statement, catch_clause, finally, method_invocation,
12841 conditional_and_expression, conditional_or_expression,
12842 conditional_expression): Update complexity.
12843 (reset_report): Reset complexity.
12844 (report): New function.
12845
12846 2000-11-20 Tom Tromey <tromey@cygnus.com>
12847
12848 * lex.c (yylex): Added STRICT_TK case.
12849 * parse.y (STRICT_TK): Added.
12850 * parse-scan.y (STRICT_TK): Added.
12851 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12852 `;'. Use 4, not 3, with -k option. Correctly rename resulting
12853 file.
12854 * keyword.h: Rebuilt.
12855 * keyword.gperf (strictfp): Added.
12856
12857 2000-11-20 Tom Tromey <tromey@cygnus.com>
12858
12859 * lex.c (yylex): Recognize floating point constants with leading
12860 0.
12861
12862 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12863
12864 * java-tree.h (cyclic_inheritance_report): Constify.
12865 * parse.y (cyclic_inheritance_report): Likewise.
12866
12867 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
12868
12869 * parse.y (goal): Remove call to ggc_add_string_root.
12870
12871 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
12872
12873 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12874 Create string in scratch buffer, then pass to build_string.
12875
12876 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
12877
12878 * parse.y (issue_warning_error_from_context): Add
12879 ATTRIBUTE_PRINTF.
12880
12881 2000-11-11 Anthony Green <green@redhat.com>
12882
12883 * jcf-parse.c (process_zip_dir): Add finput parameter.
12884 (jcf_figure_file_type): Call process_zip_dir with appropriate
12885 argument.
12886
12887 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12888
12889 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12890 * jcf-parse.c (jcf_figure_file_type): Likewise.
12891
12892 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
12893
12894 * parse.y (create_new_parser_context): Use memset () instead of
12895 bzero ().
12896
12897 2000-11-08 Tom Tromey <tromey@cygnus.com>
12898
12899 * gjavah.c (process_file): Only include gcj/cni.h when generating
12900 CNI stubs.
12901
12902 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
12903
12904 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12905 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12906 instead of bzero ().
12907
12908 2000-11-05 Tom Tromey <tromey@cygnus.com>
12909
12910 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12911 * lex.c (IS_ZERO): New define.
12912 (java_perform_atof): Error on floating point underflow.
12913
12914 2000-11-04 Tom Tromey <tromey@cygnus.com>
12915
12916 * lex.c (java_parse_escape_sequence): Only read two octal
12917 characters if the first one is greater than 3. Don't allow
12918 "octal" numbers to include the digits 8 or 9.
12919
12920 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
12921
12922 * Make-lang.in (java.distdir): Remove.
12923
12924 2000-11-03 Tom Tromey <tromey@cygnus.com>
12925
12926 * Make-lang.in (java.dvi): New target.
12927 Partial fix for PR other/567.
12928
12929 * lang-options.h: Mention -Wout-of-date.
12930 * jcf-dump.c (flag_newer): New global.
12931 * gjavah.c (flag_newer): New global.
12932 * jcf-io.c (find_class): Only warn when flag_newer set.
12933 * lang.c (flag_newer): New global.
12934 (struct string_option): New declaration.
12935 (lang_W_options): New global.
12936 (process_option_with_no): New function.
12937 (lang_decode_option): Use it.
12938
12939 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12940 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12941 `$'.
12942
12943 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12944 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12945 * lex.c (java_read_unicode): Removed `term_context' argument.
12946 Recognize any number of `u' in `\u'.
12947 (java_read_unicode_collapsing_terminators): New function.
12948 (java_get_unicode): Use it.
12949 (java_lineterminator): Removed.
12950 (yylex): Produce error if character literal is newline or single
12951 quote. Return if eof found in middle of `//' comment. EOF in
12952 `//' comment is only an error if pedantic.
12953 (java_ignorable_control_p): New function.
12954 (java_parse_end_comment): Return if eof found in middle of
12955 comment.
12956 Include flags.h.
12957 * jv-scan.c (pedantic): New global.
12958
12959 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12960
12961 * parse.y (outer_field_access_p): Inherited fields aren't
12962 consider outer fields.
12963 (maybe_build_thisn_access_method): Use
12964 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12965 (resolve_expression_name): Trigger an error if a static field
12966 is being accessed as an outer field.
12967
12968 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12969
12970 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12971 Fixes gcj/365.
12972
12973 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
12974
12975 * Make-lang.in: Move all build rules here from Makefile.in,
12976 adapt to new context. Wrap all rules that change the current
12977 directory in parentheses. Expunge all references to $(P).
12978 When one command depends on another and they're run all at
12979 once, use && to separate them, not ;. Add OUTPUT_OPTION to
12980 all object-file generation rules. Delete obsolete variables.
12981
12982 * Makefile.in: Delete.
12983 * config-lang.in: Delete outputs= line.
12984
12985 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12986
12987 * parse.y (patch_method_invocation): NULLify this_arg when already
12988 inserted.
12989 (maybe_use_access_method): Handle call to methods unrelated to the
12990 current class. Fixed comment.
12991 Fixes gcj/361.
12992
12993 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12994
12995 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12996 scope.
12997
12998 2000-10-24 Tom Tromey <tromey@cygnus.com>
12999
13000 * lex.c (java_new_lexer): Initialize new fields. Work around
13001 broken iconv() implementations.
13002 (java_read_char): Swap bytes if required. Use fallback decoder if
13003 required.
13004 (byteswap_init, need_byteswap): New globals.
13005 (java_destroy_lexer): Only close iconv handle if it is in use.
13006 * lex.h (java_lexer): New fields read_anything, byte_swap,
13007 use_fallback.
13008 Made out_buffer unsigned.
13009
13010 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13011
13012 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
13013 where an enclosing context can be set on the jdep.
13014 (do_resolve_class): Fixed identation.
13015
13016 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13017
13018 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
13019
13020 * jcf-reader.c (peek_attribute, skip_attribute): Only define
13021 when requested.
13022
13023 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
13024
13025 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
13026
13027 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
13028
13029 * jcf-write.c (OP1): Update `last_bc'.
13030 (struct jcf_block): Fixed indentation and typo in comments. New
13031 field `last_bc'.
13032 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
13033 follows `monitorenter'.
13034 * parse.y (patch_synchronized_statement): New local `tmp'. Call
13035 `patch_string'.
13036 Fixes gcj/232.
13037
13038 2000-10-16 Tom Tromey <tromey@cygnus.com>
13039
13040 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
13041 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
13042 * lang-options.h: Added -MA, -MT, -MF..
13043 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
13044 (DEPEND_TARGET_SET): New macro.
13045 (DEPEND_FILE_ALREADY_SET): Likewise.
13046 (init_parse): Handle new flags.
13047 * jcf.h (jcf_dependency_print_dummies): Declare.
13048 * Make-lang.in (s-java): Added mkdeps.o.
13049 * Makefile.in (BACKEND): Added mkdeps.o.
13050 (../gcjh$(exeext)): Added mkdeps.o.
13051 (../jcf-dump$(exeext)): Added mkdeps.o.
13052 * jcf-depend.c: Include mkdeps.h.
13053 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
13054 add_entry): Removed.
13055 (jcf_dependency_reset): Rewrote.
13056 (dependencies): New global.
13057 (jcf_dependency_set_target): Rewrote.
13058 (jcf_dependency_add_target): Likewise.
13059 (jcf_dependency_add_file): Likewise.
13060 (munge): Removed.
13061 (print_ents): Removed.
13062 (jcf_dependency_write): Rewrote.
13063 (print_dummies): New global.
13064 (jcf_dependency_print_dummies): New function
13065 (jcf_dependency_write): Call deps_dummy_targets if required.
13066
13067 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
13068
13069 * gjavah.c (add_class_decl): Removed unused variables `tname',
13070 `tlen' and `name_index'.
13071 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
13072 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
13073 in `wfl_operator' with value.
13074 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
13075 (jcf_figure_file_type): Fixed identation.
13076 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
13077 * parse.y (analyze_clinit_body): New function.
13078 (static_initializer:): Reset `current_static_block'.
13079 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
13080 `wfl_operator' with new value.
13081 (lookup_cl): Use EXPR_WFL_FILENAME.
13082 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
13083 analyze_clinit_body.
13084 (build_outer_field_access): Access to this$<n> built from
13085 current_class, not its outer context.
13086 (build_access_to_thisn): Fixed leading comment. Tidied things up.
13087 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
13088 (patch_method_invocation): Use `is_static_flag' when already
13089 initialized.
13090 (patch_newarray): Removed assignment in ternary operator.
13091
13092 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13093
13094 * except.c (free_eh_ranges): Don't free `whole_range'.
13095
13096 2000-10-15 Anthony Green <green@redhat.com>
13097
13098 * decl.c (init_decl_processing): Call init_class_processing before
13099 anything else.
13100
13101 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13102
13103 * check-init.c (check_init): Fixed leading comment. Use
13104 LOCAL_FINAL_P.
13105 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
13106 (give_name_to_locals): Likewise.
13107 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
13108 fields in lang_decl_var.
13109 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
13110 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
13111 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
13112 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
13113 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
13114 (LOCAL_FINAL): Rewritten.
13115 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
13116 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
13117 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
13118 `init_final' fields.
13119 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
13120 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
13121 (TYPE_HAS_FINAL_VARIABLE): New macro.
13122 (struct lang_type): Added `afv' field.
13123 * parse.y (check_static_final_variable_assignment_flag): New function.
13124 (reset_static_final_variable_assignment_flag): Likewise.
13125 (check_final_variable_local_assignment_flag): Likewise.
13126 (reset_final_variable_local_assignment_flag): Likewise.
13127 (check_final_variable_indirect_assignment): Likewise.
13128 (check_final_variable_global_assignment_flag): Likewise.
13129 (add_inner_class_fields): Use LOCAL_FINAL_P.
13130 (register_fields): Handle local finals and final variables.
13131 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
13132 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
13133 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
13134 on local finals.
13135 (java_complete_expand_methods): Loop to set
13136 TYPE_HAS_FINAL_VARIABLE. Call
13137 `reset_final_variable_local_assignment_flag' and
13138 `check_final_variable_local_assignment_flag' accordingly before
13139 and after constructor expansion. Call
13140 `reset_static_final_variable_assignment_flag'
13141 before expanding <clinit> and after call
13142 `check_static_final_variable_assignment_flag' if the
13143 current_class isn't an interface. After all methods have been
13144 expanded, call `check_final_variable_global_assignment_flag' and
13145 `check_static_final_variable_assignment_flag' if the current class
13146 is an interface.
13147 (maybe_yank_clinit): Fixed typo in comment.
13148 (build_outer_field_access_methods): Removed old sanity check. Use
13149 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
13150 Don't create access methods for finals.
13151 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
13152 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
13153 existing DECL_INIT has been processed.
13154 (java_complete_lhs): Likewise.
13155 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
13156 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
13157 logic.
13158 (patch_assignment): Use LOCAL_FINAL_P.
13159 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
13160 DECL_INITIAL is nullified.
13161 Fixes gcj/163.
13162
13163 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13164
13165 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
13166
13167 * Makefile.in (parse.c, parse-scan.c): Likewise.
13168
13169 2000-10-12 Mark Mitchell <mark@codesourcery.com>
13170
13171 * class.c (temporary_obstack): Remove.
13172 (make_class): Don't mess with obstascks.
13173 (push_class): Likewise.
13174 (set_super_info): Likewise.
13175 (add_method_1): Likewise.
13176 (add_method): Likewise.
13177 (add_field): Likewise.
13178 (build_utf8_ref): Likewise.
13179 (build_class_ref): Likewise.
13180 (build_static_field_ref): Likewise.
13181 (finish_class): Likewise.
13182 (push_super_field): Likewise.
13183 (layout_class): Likewise.
13184 (layout_class_methods): Likewise.
13185 (init_class_processing): Likewise.
13186 * constants.c (get_tag_node): Likewise.
13187 (build_constant_data_ref): Likewise.
13188 * decl.c (ggc_p): Remove.
13189 (copy_lang_decl): Use ggc_alloc.
13190 (complete_start_java_method): Don't mess with obstacks.
13191 (start_java_method): Likewise.
13192 (end_java_method): Likewise.
13193 * except.c (link_handler): Use xmalloc.
13194 (free_eh_ranges): New function.
13195 (method_init_exceptions): Use it.
13196 (add_handler): Use xmalloc.
13197 (expand_start_java_handler): Don't mess with obstacks.
13198 (prepare_eh_table_type): Likewise.
13199 (expand_end_java_handler): Likewise.
13200 * expr.c (push_value): Likewise.
13201 (create_label_decl): Likewise.
13202 (build_jni_stub): Likewise.
13203 (java_lang_expand_expr): Likewise.
13204 (note_instructions): Use xrealloc.
13205 (java_push_constant_from_pool): Don't mess with obstacks.
13206 (process_jvm_instruction): Likewise.
13207 * java-tree.h (cyclic_inheritance_report): Remove duplicate
13208 declaration.
13209 * jcf-parse.c (get_constant): Don't mess with obstacks.
13210 (read_class): Likewise.
13211 (jcf_parse): Likewise.
13212 * lex.c (expression_obstack): Remove.
13213 (java_lex): Don't use obstack_free.
13214 * parse.h (exit_java_complete_class): Don't mess with obstacks.
13215 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
13216 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
13217 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
13218 * parse.y (gaol): Add more GC roots.
13219 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
13220 (lookup_field_wrapper): Likewise.
13221 (obtain_incomplete_type): Don't mess with obstacks.
13222 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
13223 macros.
13224 (craft_constructor): Don't mess with obstacks.
13225 (safe_layout_class): Likewise.
13226 (java_complete_class): Likewise.
13227 (source_end_java_method): Likewise.
13228 (build_outer_field_access_methods): Likewise.
13229 (build_outer_method_access_method): Likewise.
13230 (maybe_build_thisn_access_method): Likewise.
13231 (build_dot_class_method_invocation): Likewise.
13232 (java_complete_tree): Likewise.
13233 (java_complete_lhs): Likewise.
13234 (do_merge_string_cste): Likewise.
13235 (patch_string_cst): Likewise.
13236 (array_constructor_check_entry): Likewise.
13237 * typeck.c (build_java_array_type): Likewise.
13238 (parse_signature_string): Likewise.
13239 (build_java_signature): Likewise.
13240
13241 2000-10-12 Tom Tromey <tromey@cygnus.com>
13242
13243 Fix for PR gcj/356:
13244 * gjavah.c (add_class_decl): Don't special-case inner classes.
13245 (add_namelet): Likewise.
13246
13247 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
13248
13249 * java-tree.h: Constify current_encoding.
13250 * lang.c: Constify current_encoding.
13251
13252 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
13253
13254 * jvgenmain.c (class_mangling_suffix): Omit `.'.
13255 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
13256
13257 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13258
13259 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
13260 patch. Fixes gcj/340.
13261
13262 2000-10-10 Tom Tromey <tromey@cygnus.com>
13263
13264 * lex.c (java_new_lexer): Initialize out_first and out_last
13265 fields.
13266 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
13267
13268 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13269
13270 * parse.y (pop_current_osb): New function.
13271 (array_type:): Use `dims:', changed actions
13272 accordingly. Suggested by Anthony Green.
13273 (array_creation_expression:): Used pop_current_osb.
13274 (cast_expression:): Likewise.
13275 (search_applicable_method_list): Fixed indentation.
13276
13277 2000-10-08 Anthony Green <green@redhat.com>
13278
13279 * parse.y (array_type_literal): Remove production.
13280 (type_literals): Refer to array_type, not array_type_literal.
13281
13282 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13283
13284 Patch contributed by Corey Minyard.
13285 * decl.c (check_local_named_variable): New function.
13286 (tree check_local_unnamed_variable): Likewise.
13287 (find_local_variable): Splitted. Call check_local_{un}named_variable.
13288
13289 2000-10-07 Anthony Green <green@redhat.com>
13290
13291 * class.c (layout_class): Handle case where superclass can't be
13292 layed out yet.
13293
13294 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
13295
13296 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
13297 gperf.
13298
13299 2000-10-05 Tom Tromey <tromey@cygnus.com>
13300
13301 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
13302 * jvgenmain.c (class_mangling_prefix): Removed.
13303 (class_mangling_suffix): New global.
13304 (main): Use it.
13305 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
13306 `$'.
13307 (print_method_info): Handle overrides for static and final
13308 methods.
13309 (process_file): Generate declaration for class object field.
13310 * class.c (cxx_keywords): New array.
13311 (utf8_cmp): New function.
13312 (cxx_keyword_p): New function.
13313 (layout_class_method): Mangle C++ keywords by appending `$'.
13314 (mangle_field): New function.
13315 (mangle_class_field): Use mangle_field. Mangle class name as
13316 `class$'.
13317 (mangle_static_field): Use mangle_field.
13318
13319 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
13320
13321 * decl.c (find_local_variable): Removed uncessary type check and
13322 fixed range check typo. From Corey Minyard.
13323
13324 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13325
13326 * decl.c (give_name_to_locals): New local `code_offset'. Call
13327 `maybe_adjust_start_pc'.
13328 * expr.c (note_instructions): New function.
13329 (expand_byte_code): Don't collect insn starts here.
13330 (peek_opcode_at_pc): New function.
13331 (maybe_adjust_start_pc): Likewise.
13332 * java-tree.h (maybe_adjust_start_pc): Declare.
13333 (note_instructions): Likewise.
13334 * jcf-parse.c (parse_class_file): Call `note_instructions'.
13335
13336 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13337
13338 * parse.y (field_access:): Fixed indentation.
13339 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
13340
13341 2000-09-07 Tom Tromey <tromey@cygnus.com>
13342
13343 Fix for PR gcj/307:
13344 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
13345 JPRIMITIVE_TYPE_P, for arithmetic operators.
13346 (patch_method_invocation): Indentation fix.
13347 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
13348 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
13349 (do_unary_numeric_promotion): Cleaned up code.
13350 (valid_cast_to_p): Handle boolean correctly.
13351
13352 2000-09-27 Tom Tromey <tromey@cygnus.com>
13353
13354 * lex.c (java_read_unicode): Reset bs_count when finished with
13355 `\u' sequence.
13356
13357 2000-10-01 Mark Mitchell <mark@codesourcery.com>
13358
13359 Convert to GC.
13360 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
13361 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
13362 (typeck.o): Depend on ggc.h.
13363 * class.c (add_method_1): Use GC functions for allocation.
13364 (init_class_processing): Register roots.
13365 * decl.c (ggc_p): Set to 1.
13366 (pending_local_decls): Make it static.
13367 (push_jvm_slot): Use GC functions for allocation.
13368 (init_decl_processing): Register roots.
13369 (give_name_to_locals): Use GC functions for allocation.
13370 (lang_mark_tree): New function.
13371 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
13372 functions for allocation.
13373 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
13374 * lex.c (java_lex): Use build_string, rather than replicating it
13375 inline.
13376 * parse.y (goal): Add more roots.
13377 (mark_parser_ctxt): New function.
13378 * typeck.c: Include ggc.h.
13379
13380 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13381
13382 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
13383 contains something else than MODIFY_EXPR.
13384
13385 2000-09-23 Mark Mitchell <mark@codesourcery.com>
13386
13387 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
13388 * Makefile.in (parse.o): Depend on ggc.h.
13389 (class.o): Likewise.
13390 (constants.o): Likewise.
13391 (decl.o): Likewise.
13392 (expr.o): Likewise.
13393 (jcf-parse.o): Likewise.
13394 (jcf-write.o): Likewise.
13395 (mangle.o): Likewise.
13396 * class.c: Include ggc.h.
13397 (build_static_field_ref): Register GC roots.
13398 (layout_class): Likewise.
13399 (init_class_processing): Likewise.
13400 * constants.c: Include ggc.h.
13401 (current_constant_pool_data_ref): Remove.
13402 (tag_nodes): Move it to ...
13403 (get_tag_node): ... here. Register GC roots.
13404 * decl.c: Include ggc.h. Remove many global tree definitions.
13405 (throw_node): Define.
13406 (java_global_trees): Likewise.
13407 (predef_filenames): Make the size a constant.
13408 (init_decl_processing): Adjust accordingly.
13409 (init_decl_processing): Call init_jcf_parse. Register GC roots.
13410 * expr.c: Include ggc.h.
13411 (init_expr_processing): Register GC roots.
13412 (build_invokeinterface): Likewise.
13413 * java-tree.h: Replace extern tree declarations with macros.
13414 (java_global_trees): New variable.
13415 (java_tree_index): New enumeration.
13416 (init_jcf_parse): Declare.
13417 * jcf-parse.c: Include ggc.h.
13418 (current_class): Remove declaration.
13419 (main_class): Likewise.
13420 (all_class_list): Likewise.
13421 (predefined_filename_p): Adjust for constant size of
13422 predef_filenames.
13423 (init_jcf_parse): New function.
13424 * jcf-write.c: Include ggc.h.
13425 (generate_classfile): Register GC roots.
13426 (append_synthetic_attribute): Likewise.
13427 (append_innerclass_attribute_entry): Likewise.
13428 * lang.c: Include ggc.h.
13429 (lang_print_error): Register GC roots.
13430 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
13431 with macros.
13432 * parse.y: Include ggc.h.
13433 (wfl_operator): Remove.
13434 (goal): Register GC roots.
13435 (java_pop_parser_context): Adjust for new field names.
13436 (java_parser_context_save_global): Likewse.
13437 (java_parser_context_restore_global): Likewise.
13438 (java_parser_context_suspend): Likewise.
13439 (java_parser_context_resume): Likewise.
13440 (verify_constructor_circularity): Register GC roots.
13441 (lookup_cl): Likewise.
13442 (java_reorder_fields): Likewise.
13443 (build_current_this): Likewise.
13444 (class_in_current_package): Likewise.
13445 (argument_types_convertible): Likewise.
13446 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
13447
13448 2000-09-14 Tom Tromey <tromey@cygnus.com>
13449
13450 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
13451
13452 2000-09-13 Tom Tromey <tromey@cygnus.com>
13453
13454 * jcf-parse.c: Include <locale.h>.
13455 * jv-scan.c: Include <locale.h>.
13456
13457 2000-09-12 Tom Tromey <tromey@cygnus.com>
13458
13459 * expr.c (pop_type_0): Return `Object' if trying to merge two
13460 interface types.
13461 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
13462 interface types; `Object' is always a valid supertype.
13463
13464 2000-09-12 Tom Tromey <tromey@cygnus.com>
13465
13466 Fix for PR gcj/33:
13467 * jv-scan.c (help): Document --encoding.
13468 (options): Added `encoding' entry.
13469 (OPT_ENCODING): New define.
13470 (main): Handle --encoding.
13471 Include <langinfo.h> if nl_langinfo exists.
13472 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
13473 --encoding.
13474 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
13475 (parse_source_file): Correctly call java_init_lex. Added `finput'
13476 argument. Use nl_langinfo to determine default encoding.
13477 * java-tree.h (current_encoding): Declare.
13478 * parse.y (java_parser_context_restore_global): Don't restore
13479 `finput'.
13480 (java_parser_context_save_global): Don't set `finput' field.
13481 (java_pop_parser_context): Don't restore `finput'. Free old lexer
13482 if required.
13483 * lang.c (current_encoding): New global.
13484 (lang_decode_option): Recognize `-fencoding='.
13485 (finish_parse): Don't close finput.
13486 * parse.h (struct parser_ctxt): Removed `finput' and
13487 `unget_utf8_value' fields. Added `lexer' field.
13488 (java_init_lex): Fixed declaration.
13489 * lex.c (java_new_lexer): New function.
13490 (java_destroy_lexer): Likewise.
13491 (java_read_char): Added `lex' argument. Handle iconv case.
13492 (java_read_unicode): Added `lex' argument. Count backslashes in
13493 lexer structure.
13494 (java_init_lex): Added `finput' and `encoding' arguments. Set
13495 `lexer' field in ctxp.
13496 (BAD_UTF8_VALUE): Removed.
13497 (java_lex): Handle seeing UEOF in the middle of a string literal.
13498 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
13499 (java_lexer): New structure.
13500 (UNGETC): Removed.
13501 (GETC): Removed.
13502 (DEFAULT_ENCODING): New define.
13503 (java_destroy_lexer): Declare.
13504
13505 2000-09-12 Tom Tromey <tromey@cygnus.com>
13506
13507 Fix for PR gcj/343:
13508 * lex.c (java_init_lex): Initialize java_io_serializable.
13509 * parse.y (java_io_serializable): New global.
13510 (valid_ref_assignconv_cast_p): An array can be cast to
13511 serializable.
13512
13513 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
13514
13515 * decl.c, expr.c: Include defaults.h if not already included.
13516 Don't define the *_TYPE_SIZE macros.
13517
13518 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
13519
13520 * typeck.c (build_java_array_type): Correct first parameter
13521 in ADJUST_FIELD_ALIGN invocation.
13522
13523 2000-09-06 Tom Tromey <tromey@cygnus.com>
13524
13525 * lang-specs.h: Also recognize `-femit-class-files'.
13526
13527 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13528
13529 * verify.c (merge_types): Load the types to merge if necessary.
13530
13531 2000-09-02 Anthony Green <green@redhat.com>
13532
13533 * jcf-io.c: Include zlib.h.
13534 (open_in_zip): Read compressed class file archives.
13535 * zipfile.h (ZipDirectory): Add uncompressed_size and
13536 compression_method fields.
13537 * zextract.c (read_zip_archive): Collect file compression info.
13538
13539 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
13540
13541 * parse.y (do_resolve_class): Also explore superclasses of
13542 intermediate enclosing contexts when searching for inner classes.
13543
13544 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13545
13546 * parse.y (variable_declarator_id:): Better error message.
13547 (expression_statement:): Use YYNOT_TWICE.
13548 (cast_expression:): Likewise.
13549 (assignment:): Likewise.
13550
13551 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13552
13553 * parse.y (do_merge_string_cste): New locals. Create new
13554 STRING_CSTs each time, use memcpy. Fixes gcj/311.
13555
13556 2000-08-07 Hans Boehm <boehm@acm.org>
13557
13558 * boehm.c (mark_reference_fields): Set marking bits for all words in
13559 a multiple-word record.
13560 (get_boehm_type_descriptor): Use the procedure marking descriptor for
13561 java.lang.Class.
13562
13563 2000-08-31 Mike Stump <mrs@wrs.com>
13564
13565 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
13566 jcf-dump$(exeext)): Make parallel safe.
13567
13568 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
13569
13570 * jcf-parse.c (set_source_filename): Constify a char *.
13571 * jcf-write.c (append_innerclasses_attribute,
13572 make_class_file_name): Constify a char *. Don't recycle a
13573 variable for an unrelated purpose.
13574 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
13575 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
13576
13577 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13578
13579 * expr.c (can_widen_reference_to): Fixed indentation.
13580 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
13581 * parse.y: `finit$' replaces `$finit$' in comments.
13582 (try_builtin_assignconv): Fixed leading comment.
13583
13584 2000-08-25 Greg McGary <greg@mcgary.org>
13585
13586 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
13587
13588 2000-08-24 Greg McGary <greg@mcgary.org>
13589
13590 * lang.c (lang_decode_option): Use ARRAY_SIZE.
13591 * parse.y (BINOP_LOOKUP): Likewise.
13592
13593 2000-08-22 Andrew Haley <aph@cygnus.com>
13594
13595 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
13596 sign extending. Fixes gcj/321.
13597 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
13598 combining to make a jlong. Fixes gcj/321.
13599
13600 2000-08-21 Nix <nix@esperi.demon.co.uk>
13601
13602 * lang-specs.h: Do not process -o or run the assembler if
13603 -fsyntax-only.
13604
13605 2000-08-16 Andrew Haley <aph@cygnus.com>
13606
13607 * typeck.c (build_java_array_type): Rewrite code to do array
13608 alignment. Take into account back-end macros when aligning array
13609 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
13610 user to set alignment. Fixes gcj/252 and 160.
13611
13612 2000-08-09 Tom Tromey <tromey@cygnus.com>
13613
13614 * parse.y (check_abstract_method_definitions): Now return `int'.
13615 Check implemented interfaces. Fixes PR gcj/305.
13616
13617 * parse.y (patch_switch_statement): Disallow `long' in switch
13618 expressions. Fixes PR gcj/310.
13619
13620 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13621
13622 * decl.c (finit_leg_identifier_node): New global.
13623 (init_decl_processing): Use `finit$' to initialize
13624 finit_identifier_node. Use `$finit$' to initialize
13625 finit_leg_identifier_node.
13626 * expr.c (expand_java_field_op): Use ID_FINIT_P.
13627 * java-tree.h (finit_identifier_node): Changed attached comment.
13628 (finit_leg_identifier_node): New declaration.
13629 (ID_FINIT_P): Take finit_identifier_node and
13630 finit_leg_identifier_node into account. This is a backward
13631 compatibility hack.
13632
13633 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13634
13635 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
13636 Jan 6 2000 patch.
13637 (generate_bytecode_insns): Check `nargs' before emitting it.
13638 * verify.c (merge_type_state): Fixed typo.
13639 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
13640 generate_bytecode_{conditional,insns}.
13641
13642 2000-08-13 Anthony Green <green@redhat.com>
13643
13644 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
13645 for -pg builds).
13646
13647 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13648
13649 * class.c (maybe_layout_super_class): Fixed indentation.
13650 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
13651 (java_check_methods): New function declaration.
13652 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
13653 instead of `str_ptr'.
13654 * jcf-write.c (generate_bytecode_insns): Emit number the of args
13655 of a `invokeinterface' at the right time.
13656 * parse.h (WFL_STRIP_BRACKET): New macro.
13657 (SET_TYPE_FOR_RESOLUTION): Use it.
13658 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
13659 (check_class_interface_creation): Don't check for cross package
13660 innerclass name clashes.
13661 (method_header): Behave properly if MDECL is `error_mark_node'.
13662 (method_declarator): Return `error_mark_node' if bogus current
13663 class.
13664 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
13665 (resolve_and_layout): New local `decl_type', set and used. Call
13666 java_check_methods.
13667 (java_check_methods): New method.
13668 (java_layout_classes): Use it.
13669 (resolve_qualified_expression_name): No EH check necessary in
13670 access$<n>.
13671 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
13672 `case' statement.
13673 (patch_assignment): Set DECL_INITIAL on integral final local.
13674
13675 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
13676
13677 * java-tree.h (flag_extraneous_semicolon): New extern.
13678 * lang-options.h: (-Wextraneous-semicolon): New option.
13679 * lang.c (flag_redundant): Fixed typo in leading comment.
13680 (flag_extraneous_semicolon): New global.
13681 (lang_decode_option): Set `flag_extraneous_semicolon' when
13682 -Wall. Decode `-Wextraneous-semicolon'.
13683 * parse.y (type_declaration:): Removed `SC_TK' hack, added
13684 `empty_statement' rule.
13685 (class_body_declaration): Likewise.
13686 (method_body:): Accept `;' as a method body.
13687 (static_initializer:): Removed `SC_TK' hack.
13688 (constructor_block_end:): Likewise.
13689 (empty_statement:): Report deprecated empty declaration. Fixes
13690 gcj/295
13691
13692 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13693
13694 * parse.y (build_dot_class_method_invocation): Changed parameter
13695 name to `type'. Build signature from `type' and convert it to a
13696 STRING_CST if it's an array.
13697 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
13698 to use `ref_type' directly.
13699
13700 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
13701
13702 * lang-options.h: Added a comma after the last element to avoid
13703 syntax errors when other languages define additional options.
13704
13705 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
13706
13707 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
13708 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
13709 (jc1): Link with $(BACKEND).
13710 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
13711
13712 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
13713
13714 * jvspec.c: Adjust type of second argument to
13715 lang_specific_driver, and update code as necessary.
13716
13717 * class.c (build_dtable_decl): Initialize dummy.
13718
13719 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13720
13721 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
13722 method bodies not to rule out discarding `<clinit>'; don't use
13723 <clinit> to initialize static fields with constant initializers.
13724
13725 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13726
13727 * gjavah.c (print_method_info): Added `synth' parameter. Skip
13728 synthetic methods.
13729 (method_synthetic): New global.
13730 (HANDLE_METHOD): Recognize synthetic method and tell
13731 `print_method_info' about it.
13732 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
13733 processing a synthetic method.
13734 * jcf-reader.c (skip_attribute): New function.
13735 ( skip_attribute): Likewise.
13736
13737 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13738
13739 * parse.y (build_outer_field_access): Fixed comments.
13740 (fix_constructors): Emit the initialization of this$<n> before
13741 calling $finit$.
13742 (resolve_qualified_expression_name): Build an access to `decl' if
13743 necessary.
13744
13745 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13746
13747 * parse-scan.y (curent_class): Non longer const.
13748 (inner_qualifier, inner_qualifier_length): Deleted.
13749 (current_class_length): New global.
13750 (bracket_count): Fixed typo in leading comment.
13751 (anonymous_count): New global.
13752 (class_instance_creation_expression:): Handle anonymous classes.
13753 (anonymous_class_creation:): New rule.
13754 (push_class_context): Rewritten.
13755 (pop_class_context): Likewise.
13756 (INNER_QUALIFIER): Macro deleted.
13757 (report_class_declaration): call `push_class_context' when
13758 entering the function. `fprintf' format modified not to use
13759 INNER_QUALIFIER.
13760 (report_class_declaration): Assign `package_name' and
13761 `current_class' to NULL separately.
13762
13763 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13764
13765 * expr.c (build_invokeinterface): Call layout_class_methods on
13766 target interface.
13767
13768 2000-07-27 Tom Tromey <tromey@cygnus.com>
13769 Anthony Green <green@cygnus.com>
13770 Alexandre Petit-Bianco <apbianco@cygnus.com>
13771
13772 * class.c (make_class_data): Create vtable for abstract classes.
13773 (get_dispatch_table): Changed to cope with abstract classes.
13774
13775 2000-07-27 Tom Tromey <tromey@cygnus.com>
13776
13777 * parse.y (patch_method_invocation): Don't reverse the argument
13778 list when dealing with anonymous class constructors. Fixed typo in
13779 comment.
13780
13781 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13782
13783 * parse.y (build_alias_initializer_parameter_list): Reverse
13784 crafted list when building aliases for anonymous class
13785 constructors.
13786
13787 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13788
13789 * parse.y (jdep_resolve_class): Don't bother checking potential
13790 innerclass access if `decl' is NULL.
13791 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13792 WFL.
13793
13794 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13795
13796 * parse.c: Remove (again.)
13797
13798 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13799
13800 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13801 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13802 outside the `if' statement, alias to innerclass removed, `decl'
13803 used to mark the class complete.
13804
13805 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13806
13807 * parse.y (simple_name:): Fixed typo in error message.
13808
13809 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13810
13811 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13812 or its first operand can be error marks.
13813
13814 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13815
13816 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13817 * parse.y (method_header): Likewise.
13818
13819 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13820
13821 * parse.y (process_imports): Consider that one might be trying to
13822 import an innerclass. Fixes gcj/254
13823
13824 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13825
13826 * parse.y (find_as_inner_class): Handle the case where the
13827 enclosing context of an innerclass has been loaded as bytecode.
13828
13829 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13830
13831 * parse.y (simple_name:): Reject `$' in type names.
13832 (resolve_type_during_patch): Use `type' as a second
13833 argument to resolve_no_layout. Fixes gcj/257.
13834
13835 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
13836
13837 * parse.y (find_most_specific_methods_list): Select the only
13838 non-abstract method even if max has been set.
13839 Fixes gcj/285, gcj/298.
13840
13841 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
13842
13843 * lang-specs.h: Added %(jc1) to java compiler options.
13844
13845 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
13846
13847 * .cvsignore: New file.
13848
13849 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13850
13851 * parse.y (not_accessible_p): Access granted to innerclasses
13852 (indirectly) extending the reference type. Fixes gcj/249.
13853
13854 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13855
13856 * parse.y (patch_method_invocation): Fixed comment.
13857 (maybe_use_access_method): Build this$<n>s to the context of the
13858 target method, or a type that extends it. Fixes gcj/242.
13859
13860 2000-07-13 Mark Mitchell <mark@codesourcery.com>
13861
13862 * parse.c: Remove.
13863
13864 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13865
13866 * parse.y (fold_constant_for_init): Avoid bullish conversion.
13867
13868 2000-07-13 Tom Tromey <tromey@cygnus.com>
13869
13870 * lang-specs.h: Added %{I*}.
13871
13872 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
13873
13874 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
13875
13876 2000-07-12 Mark Mitchell <mark@codesourcery.com>
13877
13878 * parse-scan.c: Remove.
13879
13880 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13881
13882 * class.c (set_super_info): Handled protected inner classes.
13883 (common_enclosing_context_p): Bail early if arguments aren't both
13884 inner classes.
13885 (get_access_flags_from_decl): Handle private and protected inner
13886 classes.
13887 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13888 (CLASS_PROTECTED): Likewise.
13889 (struct lang_type): New bitfield `poic'.
13890 * parse.y (jdep_resolve_class): Call check_inner_class_access on
13891 inner classes only.
13892 (check_inner_class_access): Renamed arguments, added
13893 comments. Handles protected inner classes (fixes gcj/225)
13894 (not_accessible_p): Fixed comments. Avoid handling inner classes.
13895
13896 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13897
13898 * parse.y (resolve_qualified_expression_name): Verify qualified
13899 access to `this'. Fixes gcj/239.
13900
13901 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13902
13903 * jcf-write.c (generate_classfile): Don't install ConstantValue
13904 for null pointers.
13905
13906 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13907
13908 * parse.y (resolve_qualified_expression_name): Handle inner class
13909 access. Fixes gcj/256.
13910
13911 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13912
13913 * jcf-write.c (generate_classfile): Properly install the
13914 ConstantValue attribute and the initial value constant pool index
13915 on string constants.
13916 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13917 class files.
13918
13919 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13920
13921 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13922 construct.
13923 * parse.y (find_as_inner_class): Fixed typo.
13924 (do_resolve_class): Explore enclosing contexts when searching for
13925 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13926 (check_inner_class_access): Check `decl' which can be null in case
13927 of previous errors.
13928
13929 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13930
13931 * java-tree.h (java_debug_context): Declared `extern'.
13932 (safe_layout_class): Likewise.
13933 * parse.y (resolve_field_access): Field must be `static' in order
13934 to be replaced by its initial value. Added comments.
13935 (find_applicable_accessible_methods_list): Fixed typo.
13936 (find_most_specific_methods_list): Methods found in innerclasses
13937 take over methods founds in the enclosing contexts.
13938 (java_complete_tree): Loosen restrictions on the type of DECLs
13939 that can be replaced by their initialization values.
13940 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13941
13942 2000-07-05 Tom Tromey <tromey@cygnus.com>
13943
13944 * Make-lang.in (PARSE_DIR): New macro.
13945 (PARSE_RELDIR): Likewise.
13946 (PARSE_C): Likewise.
13947 (PARSE_SCAN_C): Likewise.
13948 ($(PARSE_C)): New target.
13949 ($(PARSE_SCAN_C)): Likewise.
13950 (SET_BISON): New macro.
13951 (BISONFLAGS): Likewise.
13952 (JAVABISONFLAGS): Likewise.
13953
13954 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
13955
13956 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13957 argument on the first pass for CNI as well as JNI.
13958 (print_method_info): Set up method name on the first pass only.
13959
13960 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13961
13962 * parse.y (parser_qualified_classname): Removed parameter
13963 `is_static'.
13964 (create_interface): Removed first passed parameter to
13965 parser_qualified_classname.
13966 (create_class): Likewise. Don't install alias on static
13967 innerclasses. Fixes gcj/275.
13968
13969 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13970
13971 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13972 debugable statement with empty_stmt_node. Fixes gcj/272
13973
13974 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13975
13976 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13977 gcj/271.
13978
13979 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13980
13981 * jcf-write.c (push_long_const): Appropriately cast short negative
13982 constant to jword.
13983
13984 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13985
13986 * parse.y (verify_constructor_super): Use loop variable
13987 `m_arg_type' initialized with `mdecl_arg_type'.
13988
13989 2000-06-29 Tom Tromey <tromey@cygnus.com>
13990
13991 * parse.y (resolve_field_access): Handle case where `type_found'
13992 is NULL.
13993
13994 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13995
13996 * expr.c (lookup_field): The same field can be found through two
13997 different interface. Don't declare it ambiguous in that case.
13998
13999 2000-06-27 Tom Tromey <tromey@cygnus.com>
14000
14001 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
14002 follows \r, then unget it at a lower level.
14003
14004 2000-06-26 Tom Tromey <tromey@cygnus.com>
14005
14006 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
14007 java_complete_tree.
14008
14009 2000-06-25 Tom Tromey <tromey@cygnus.com>
14010
14011 * parse.y (for_statement): Wrap expression in a WFL if it is a
14012 constant. For PR gcj/268.
14013
14014 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14015
14016 * parse.y (do_resolve_class): Minor optimiztion in the package
14017 list search. Removed unnecessary test and return statement.
14018 (valid_ref_assignconv_cast_p): Order of arguments to
14019 enclosing_context_p fixed.
14020
14021 2000-06-24 Tom Tromey <tromey@cygnus.com>
14022
14023 * expr.c (lookup_field): Print error and return error_mark_node if
14024 field reference is ambiguous.
14025
14026 * parse.y (check_abstract_method_definitions): Also check if
14027 `other_method' is abstract.
14028
14029 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
14030
14031 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
14032 classes.
14033 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
14034 (struct lang_type): New field `pic'.
14035 (CLASS_PRIVATE): New macro.
14036 * parse.y (check_inner_class_access): New function.
14037 (jdep_resolve_class): Call it.
14038
14039 2000-06-23 Tom Tromey <tromey@cygnus.com>
14040
14041 * parse.y (patch_incomplete_class_ref): Initialize the returned
14042 class. For PR gcj/260.
14043
14044 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
14045
14046 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
14047
14048 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14049
14050 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
14051 Java specific checks.
14052 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
14053 screened by DECL_P.
14054 * java-tree.def (CASE_EXPR): Marked 'e'.
14055 (DEFAULT_EXPR): Likewise.
14056 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
14057 screened by DECL_P.
14058 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
14059 Java specific checks.
14060 (generate_bytecode_insns): Test try_block for BLOCK before using
14061 BLOCK_EXPR_BODY.
14062 * parse.y (build_wfl_wrap): Added `location' argument. Set
14063 EXPR_WFL_LINECOL accordingly.
14064 (dim_expr:): Wrap constants with WFLs.
14065 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
14066 (resolve_package): Check for `stmt' not being a BLOCK before
14067 building a debuggable statement with it.
14068 (make_qualified_primary): Added extra parameter to build_wfl_wrap
14069 invocation.
14070 (resolve_field_access): Make sure `decl' is a DECL before treating
14071 it as such.
14072 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
14073 IDENTIFIER_NODE before treating it as such.
14074 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
14075 treating it as such.
14076 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
14077 to be applied only on non array types.
14078
14079 2000-06-16 Per Bothner <per@bothner.com>
14080
14081 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
14082 define in terms of DECL_RESULT, as that fails when --enable-checking.
14083
14084 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14085
14086 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
14087 types the same in comparison.
14088 (CHECK_OP): Add static prototype.
14089
14090 2000-06-13 Jakub Jelinek <jakub@redhat.com>
14091
14092 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
14093 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
14094 * parse.c: Rebuilt.
14095
14096 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14097
14098 * decl.c (create_primitive_vtable): Prototype.
14099
14100 * jcf-write.c (generate_bytecode_insns): Initialize variable
14101 `saved_context'.
14102
14103 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
14104
14105 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
14106
14107 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
14108 to track searched classes, and do not search the same class more than
14109 once. Call find_applicable_accessible_methods_list on immediate
14110 superclass, instead of search_applicable_method_list on all ancestors.
14111 Fix for PR gcj/238.
14112
14113 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
14114
14115 * parse.y (register_fields): Permit static fields in inner classes
14116 if they are final. Fix for PR gcj/255.
14117
14118 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
14119
14120 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
14121 * parse.y (find_in_imports): Returned type changed to void,
14122 leading comment fixed.
14123 (register_package): New function.
14124 (qualify_and_find): Likewise.
14125 (package_declaration:): Use `register_package'.
14126 (single_type_import_declaration:): Removed local variable
14127 `node'. Added missing `;' for consistency.
14128 (type_import_on_demand_declaration:): Use `chainon' to link new
14129 entries.
14130 (lookup_field_wrapper): Lookup local variables defined in outer
14131 contexts first.
14132 (java_complete_class): Don't reverse the list of imported on demand.
14133 (do_resolve_class): Reorganized. Removed local variable
14134 `original_name'. Call `qualify_and_find' with the current package
14135 name, invoke `find_in_imports_on_demand' right after. Call
14136 `qualify_and_find' with the packages we've seen so far. Fixed
14137 operations numbering in comments.
14138 (java_expand_class): Don't reverse `package_list'.
14139 (find_most_specific_methods_list): New local variables `abstract'
14140 and `candidates'. Use them to pick the right method.
14141
14142 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
14143
14144 * parse.y (check_modifiers_consistency): Don't subtract out
14145 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
14146
14147 2000-06-04 Philipp Thomas <pthomas@suse.de>
14148
14149 * Makefile.in (INTLLIBS): New.
14150 (LIBS): Add above.
14151 (DEPLIBS): Ditto.
14152
14153 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14154
14155 * class.c (get_dispatch_table): Build the vtable dummy entry list
14156 element with a null purpose. Fixed leading comment.
14157 (build_dtable_decl): Build an accurate dtable type when appropriate
14158 and use it.
14159
14160 2000-06-02 Richard Henderson <rth@cygnus.com>
14161
14162 * lang.c (lang_get_alias_set): New.
14163
14164 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
14165
14166 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
14167 before using it as the accessed field.
14168
14169 2000-05-31 Tom Tromey <tromey@cygnus.com>
14170
14171 * java-tree.h (boolean_array_vtable, byte_array_vtable,
14172 char_array_vtable, short_array_vtable, int_array_vtable,
14173 long_array_vtable, float_array_vtable, double_array_vtable):
14174 Declare.
14175 * expr.c (get_primitive_array_vtable): New function.
14176 (create_primitive_vtable): New function.
14177 (java_lang_expand_expr): Enable code to statically generate
14178 arrays.
14179 * decl.c (init_decl_processing): Create primitive vtables.
14180 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
14181 short_array_vtable, int_array_vtable, long_array_vtable,
14182 float_array_vtable, double_array_vtable): Define.
14183
14184 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
14185
14186 * java/parse.y (find_applicable_accessible_methods_list):
14187 Don't add an uninitialized value to the list.
14188
14189 2000-05-25 Tom Tromey <tromey@cygnus.com>
14190
14191 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
14192 when trying to see if field's class should be initialized. Always
14193 initialize field's declaring class, not qualified class.
14194 For PR gcj/162.
14195
14196 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
14197 `wfl_operator', to maybe_build_primttype_type_ref.
14198 Fixes PR gcj/235.
14199
14200 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
14201
14202 * parse.y (patch_method_invocation): Don't try to lookup methods
14203 in primitive types.
14204
14205 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14206
14207 * parse.y (resolve_field_access): Call the appropriate <clinit>
14208 before accessing the length of a static array. Craft a decl for
14209 the field while its time. Fixes PR gcj/129.
14210
14211 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14212
14213 * parse.y (resolve_package): Correctly set `*next' (was off by
14214 one.)
14215 (resolve_qualified_expression_name): Fixed comment.
14216
14217 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14218
14219 * jcf-parse.c (jcf_parse_source): Reset current_class and
14220 current_function_decl to NULL before parsing a new file.
14221
14222 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14223
14224 * parse.y (block_end:): If the collected block doesn't feature a
14225 statement, insert an empty statement.
14226
14227 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14228
14229 * parse.y (maybe_yank_clinit): New function.
14230 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
14231 end of the list of methods belonging to a class.
14232 (java_complete_expand_method): Check whether <clinit> is really
14233 necessary and expand it accordingly.
14234
14235 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14236
14237 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
14238 processed by the method's switch statement.
14239
14240 2000-05-19 Tom Tromey <tromey@cygnus.com>
14241
14242 * java-tree.h: Added init state enum.
14243 * decl.c (emit_init_test_initialization): Initialize class
14244 initialization check variable by looking at class' state.
14245
14246 2000-05-19 Tom Tromey <tromey@cygnus.com>
14247
14248 * java-tree.h (build_instanceof): Declare.
14249 (build_get_class): Declare.
14250 * parse.y (patch_binop): Use build_instanceof.
14251 * expr.c (build_instanceof): New function. If class is final,
14252 don't make a function call.
14253 (expand_java_INSTANCEOF): Use it.
14254 (build_get_class): New function.
14255
14256 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
14257
14258 * jcf-write.c (generate_classfile): Scan the source_file for
14259 slashes with the right pointer variable.
14260
14261 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
14262
14263 * lang.c (lang_decode_option): Update -Wunused flags by calling
14264 set_Wunused.
14265 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
14266
14267 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
14268
14269 * check_init.c (check_init): Constify local char *.
14270 * class.c (push_class): Constify local char *.
14271 * java_tree.h: Update prototypes.
14272 * jcf-io.c (open_class): Constify filename parameter and
14273 return value.
14274 (find_class): Remove redundant string copy. Cast return from
14275 open_class.
14276 * jcf-parse.c (read_class, parse_class_file, yyparse):
14277 Constify local char *.
14278 * jcf-write.c (generate_bytecode_insns, generate_classfile):
14279 Constify local char *.
14280 * jcf.h (JCF): Constify filename and classname.
14281 (JCF_FINISH): Cast args to FREE to char * when appropriate.
14282 * lang.c (init_parse): Constify parameter and return value.
14283 * lex.c (java_get_line_col): Constify filename parameter.
14284 * parse.h: Constify parser_ctxt.filename. Update prototypes.
14285 * parse.y (java_parser_context_suspend,
14286 issue_warning_error_from_context, safe_layout_class): Constify
14287 local char *.
14288 * parse.c: Regenerate.
14289
14290 2000-05-08 Tom Tromey <tromey@cygnus.com>
14291
14292 * expr.c (build_jni_stub): Cache the result of
14293 _Jv_LookupJNIMethod.
14294
14295 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14296
14297 * decl.c (predef_filenames_size): Now 7.
14298 (predef_filenames): New seventh entry.
14299
14300 2000-05-04 Tom Tromey <tromey@cygnus.com>
14301
14302 * boehm.c (mark_reference_fields): Don't mark RawData fields.
14303 Keep track of when we've seen a reference field after a
14304 non-reference field.
14305 (get_boehm_type_descriptor): Handle case where we see
14306 non-reference fields but no trailing reference field.
14307 * decl.c (rawdata_ptr_type_node): Define.
14308 (init_decl_processing): Initialize rawdata_ptr_type_node.
14309 * java-tree.h (rawdata_ptr_type_node): Declare.
14310
14311 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14312
14313 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
14314 specifiers in calls to fprintf.
14315
14316 2000-05-03 Andrew Haley <aph@cygnus.com>
14317
14318 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
14319
14320 * javaop.h (WORD_TO_INT): New function.
14321 (IMMEDIATE_s4): Use WORD_TO_INT.
14322 * jcf.h (JPOOL_INT): Ditto.
14323
14324 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
14325 separator.
14326
14327 2000-04-19 Tom Tromey <tromey@cygnus.com>
14328
14329 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
14330 on native function.
14331 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
14332 JNI methods.
14333 * expr.c (build_jni_stub): New function.
14334 * lang-specs.h: -fjni and -femit-class-file are incompatible.
14335 * parse.c: Rebuilt.
14336 * parse.y (java_complete_expand_methods): Expand a native method
14337 and call build_jni_stub if -fjni given.
14338 * lang-options.h: Document -fjni.
14339 * lang.c (flag_jni): New global.
14340 (lang_f_options): Added `jni' entry.
14341 * java-tree.h (soft_lookupjnimethod_node,
14342 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
14343 Declare.
14344 (flag_jni): Declare.
14345 (build_jni_stub): Declare.
14346 (struct lang_decl): Added `native' flag.
14347 (METHOD_NATIVE): Redefined to use `native' field of lang specific
14348 structure.
14349 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
14350 soft_jnipopsystemframe_node): New globals.
14351 (init_decl_processing): Set them. _Jv_InitClass only takes one
14352 argument.
14353
14354 * java-tree.def: Put into `C' mode.
14355
14356 2000-04-27 Tom Tromey <tromey@cygnus.com>
14357
14358 Fix for PR gcj/2:
14359 * expr.c (expand_invoke): Generate check to see if object pointer
14360 is null in nonvirtual invocation case.
14361 * java-tree.h (soft_nullpointer_node): Declare.
14362 * decl.c (soft_nullpointer_node): New global.
14363 (init_decl_processing): Initialize soft_nullpointer_node.
14364 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14365 or `private' methods.
14366 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14367
14368 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
14369
14370 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
14371 from <clinit>
14372
14373 2000-04-26 Tom Tromey <tromey@cygnus.com>
14374
14375 * zextract.c (find_zip_file_start): New function.
14376 (read_zip_archive): Use it.
14377
14378 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14379
14380 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
14381
14382 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14383
14384 * class.c (common_enclosing_context_p): New function.
14385 * java-tree.h (common_enclosing_context_p): Added prototype.
14386 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
14387 classes sharing an outer context with the current instance.
14388 * parse.y (build_access_to_thisn): Fixed leading comment.
14389 (verify_constructor_super): New local `supper_inner'. Skip
14390 enclosing context argument in the case of inner class constructors.
14391 (patch_method_invocation): Insert proper context as second
14392 parameter to pure inner class constructor super invocations.
14393
14394 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14395
14396 * parse.y (end_class_declaration): Reset the interface number
14397 counter.
14398
14399 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14400
14401 * parse.y (source_start_java_method): Deleted unnecessary code.
14402 (patch_method_invocation): Fixed comment.
14403
14404 2000-04-24 Robert Lipe <robertlipe@usa.net>
14405
14406 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
14407
14408 2000-04-23 Tom Tromey <tromey@cygnus.com>
14409
14410 * boehm.c (mark_reference_fields): Use int_byte_position.
14411
14412 2000-04-22 Tom Tromey <tromey@cygnus.com>
14413
14414 * boehm.c (mark_reference_fields): Only call byte_position on
14415 non-static fields.
14416
14417 2000-04-22 Tom Tromey <tromey@cygnus.com>
14418
14419 * boehm.c (mark_reference_fields): Added `last_view_index'
14420 argument. Use DECL_FIELD_OFFSET to determine field's offset.
14421
14422 2000-04-20 Mo DeJong <mdejong@cygnus.com>
14423
14424 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
14425 * parse.y (check_class_interface_creation): Fixed comments. Select
14426 permitted modifiers for (inner) interfaces. Changed error message
14427 to report rejected modifiers used with local classes.
14428
14429 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14430
14431 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
14432 of directly inherited type considered in scope.
14433 * parse.y (do_resolve_class): Search inherited classes for inner
14434 classes.
14435
14436 2000-04-20 Tom Tromey <tromey@cygnus.com>
14437
14438 * parse.y (not_accessible_p): Use member's class, not current
14439 class, when doing inheritance check for protected reference.
14440 Fixes PR gcj/124.
14441
14442 2000-04-20 Jason Schroeder <shrode@subnature.com>
14443
14444 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
14445
14446 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14447
14448 * parse.y (lookup_field_wrapper): Search for final local aliases.
14449 (resolve_expression_name): Let lookup_field_wrapper search for
14450 final local aliases. Force the value of `name' if one is found.
14451 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
14452 an expression name. Fixed comments.
14453
14454 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14455
14456 * parse.y (yyerror): `msg' can be null, don't use it in that case.
14457
14458 2000-04-19 Tom Tromey <tromey@cygnus.com>
14459
14460 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
14461
14462 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14463
14464 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
14465
14466 2000-04-18 Tom Tromey <tromey@cygnus.com>
14467
14468 PR gcj/211:
14469 * gjavah.c (utf8_cmp): Changed return value.
14470 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
14471 result.
14472 (cxx_keywords): New global.
14473 (get_field_name): Handle new result of cxx_keyword_subst.
14474 (print_method_info): Likewise.
14475
14476 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
14477
14478 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
14479 with a newline, for CNI.
14480 (print_stub_or_jni): Print a space or newline before method name for
14481 CNI as well as JNI.
14482 (print_cxx_classname): Don't write leading "::" in CNI stub method.
14483 (process_file): Include gcj/cni.h if generating CNI stubs.
14484
14485 2000-04-16 Tom Tromey <tromey@cygnus.com>
14486
14487 * gjavah.c (decompile_method): Use print_field_name.
14488 Fixes PR gcj/205.
14489
14490 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14491
14492 * parse.y (java_expand_classes): Reverse the package list once.
14493 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
14494 reduction.
14495 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
14496 the `==' and `!=' operators.
14497
14498 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14499
14500 * jcf-write.c (generate_bytecode_insns): At invocation time,
14501 always relate an interface method to the type of its selector.
14502
14503 2000-04-05 Tom Tromey <tromey@cygnus.com>
14504
14505 Fix for PR gcj/2:
14506 * expr.c (expand_invoke): Generate check to see if object pointer
14507 is null in nonvirtual invocation case.
14508 * java-tree.h (soft_nullpointer_node): Declare.
14509 * decl.c (soft_nullpointer_node): New global.
14510 (init_decl_processing): Initialize soft_nullpointer_node.
14511 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14512 or `private' methods.
14513 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14514
14515 2000-04-05 Tom Tromey <tromey@cygnus.com>
14516
14517 Fix for PR gcj/140:
14518 * parse.y (check_final_assignment): Recognize assignments to the
14519 `length' field of an array when generating class files.
14520
14521 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14522
14523 * class.c (decl_hash): Prototype removed.
14524 (decl_compare): Likewise.
14525
14526 2000-04-05 Tom Tromey <tromey@cygnus.com>
14527
14528 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
14529 * parse.y (check_modifiers_consistency): Check for final/volatile
14530 clash. Fixes PR gcj/164.
14531
14532 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14533
14534 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
14535 made global.
14536 (java_hash_compare_tree_node): Renamed from `decl_compare, made
14537 global.
14538 (add_method_1): Use `java_hash_hash_tree_node' and
14539 `java_hash_compare_tree_node'.
14540 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
14541 (java_hash_compare_tree_node): Likewise.
14542 * parse.y (find_applicable_accessible_methods_list): Create,
14543 delete and use a hash table to remember already searched interfaces.
14544
14545 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
14546
14547 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
14548 with latest entry.
14549
14550 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14551
14552 * boehm.c (mark_reference_fields, set_bit): Prototype.
14553 (set_bit): Un-ANSI-fy definition.
14554
14555 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
14556 Prototype.
14557
14558 * decl.c (emit_init_test_initialization): Likewise.
14559
14560 * gjavah.c (jni_print_char): Likewise.
14561
14562 * parse.y (create_new_parser_context): Likewise.
14563
14564 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
14565
14566 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
14567 patch missing hunk. Fixed indentation.
14568
14569 2000-03-30 Tom Tromey <tromey@cygnus.com>
14570
14571 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
14572 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
14573
14574 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14575
14576 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14577 when negative *before* using it as an array index.
14578 * ChangeLog: Fixed typo.
14579
14580 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14581
14582 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14583 to 0 when it reaches -1.
14584
14585 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14586
14587 * jcf-parse.c (get_constant): Properly cast `num' during the
14588 invocation of `add_double'.
14589 * jcf-write.c (push_long_const): Properly cast `lo' before
14590 comparing it to short bounds.
14591 * parse-scan.y (interface_declaration:): Rule re-arrange so that
14592 `interface_body:' is reduced after the current interface is
14593 pushed.
14594
14595 2000-03-26 Tom Tromey <tromey@cygnus.com>
14596
14597 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
14598 Java-specific `-f' option.
14599
14600 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14601
14602 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
14603 Adjust order of making types.
14604 Make bitsize_*_node values.
14605
14606 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14607
14608 * class.c (make_field_value): Use byte_position.
14609 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
14610 (java_array_data_offset): Likewise.
14611 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
14612 bzero call.
14613
14614 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14615
14616 * parse.y (check_abstract_method_definitions): New local
14617 `end_type_reached'. Make sure we also consider `end_type'.
14618 (java_check_abstract_method_definitions): Make sure we eventually
14619 consider `java.lang.Object'.
14620 (maybe_use_access_method): Don't use access method if not in the
14621 context of a pure inner class or if the method's context is right.
14622 (find_applicable_accessible_methods_list): New static flag
14623 `object_done'. Don't search abstract classes as interfaces. Fixed
14624 indentation. Fixed the `java.lang.Object' only search. Search
14625 class interface(s) first, then fully search enclosing contexts.
14626 (find_most_specific_methods_list): Pick the closest candidate when
14627 they're all abstract.
14628
14629 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14630
14631 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14632 properly initialize `finished_label'. Don't emit gotos for empty
14633 try statements.
14634
14635 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14636
14637 * except.c (emit_handlers): Clear catch_clauses_last.
14638
14639 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14640
14641 * parse.y (check_method_types_complete): New function.
14642 (create_class): Reset anonymous class counter only when seeing an
14643 non inner classe.
14644 (java_complete_class): JDEP_METHOD: Don't recompute signature
14645 if incomplete.
14646
14647 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14648
14649 * class.c (build_static_ref): Fixed indentation in comment.
14650 * java-tree.def (TRY_EXPR): Fixed typo in name.
14651 (CLASS_LITERAL): Likewise.
14652 * java-tree.h: (TYPE_DOT_CLASS): New macro.
14653 (struct lang_type): New field `dot_class'.
14654 * jcf-write.c (generate_bytecode_insns): Fixed error message.
14655 (generate_classfile): Method `class$' is synthetic.
14656 * parse.y (build_do_class_method): New function.
14657 (build_dot_class_method_invocation): Likewise.
14658 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
14659 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
14660 (qualify_ambiguous_name): Likewise.
14661 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
14662 (build_try_statement): Fixed leading comment.
14663
14664 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14665
14666 * class.c (make_field_value): Properly handle sizes.
14667 (get_dispatch_vector): Use tree_low_cst and host_integerp.
14668 (layout_class_method): Count using trees.
14669 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
14670 * expr.c (java_array_data_offset): Use int_bit_position.
14671 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
14672 (build_invokevirtual): Use tree_low_cst and do computations with trees.
14673
14674 2000-03-16 Tom Tromey <tromey@cygnus.com>
14675
14676 * lang.c (flag_hash_synchronization): New global.
14677 (lang_f_options): Added `hash-synchronization'.
14678 * lang-options.h: Mention -fhash-synchronization.
14679 * java-tree.h (flag_hash_synchronization): Declare.
14680 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
14681 hash table synchronization is disabled.
14682 * decl.c (init_decl_processing): Only push `sync_info' value when
14683 hash table synchronization is disabled.
14684 * class.c (make_class_data): Only push `sync_info' field when hash
14685 table synchronization is disabled. Removed dead code.
14686
14687 2000-03-16 Tom Tromey <tromey@cygnus.com>
14688
14689 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
14690
14691 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14692
14693 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
14694 classes.
14695 * parse.y (patch_method_invocation): Handle anonymous classes
14696 creation in static context.
14697
14698 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14699
14700 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
14701 * parse.y (resolve_qualified_expression_name): Use it.
14702 (patch_method_invocation): Likewise.
14703
14704 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14705
14706 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
14707 depending on the type of dependency which dictates what the
14708 current class is.
14709 (unresolved_type_p): Resolved types limited to the current class.
14710
14711 2000-03-15 Tom Tromey <tromey@cygnus.com>
14712
14713 * decl.c (init_decl_processing): Set type of `sync_info' to be
14714 pointer to Object.
14715
14716 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
14717 Correctly compute bit number for current slot. Zero `high' and
14718 `low' in DS_LENGTH case. Don't skip inherited fields. Use
14719 mark_reference_fields.
14720 (mark_reference_fields): New function.
14721
14722 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14723
14724 * parse.y (register_incomplete_type): Fixed initialization of
14725 JDEP_ENCLOSING.
14726
14727 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14728
14729 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
14730 static globals.
14731 (push_class_context, pop_class_context): New function.
14732 (class_body:): Call pop_class_context.
14733 (interface_body:): Likewise.
14734 (INNER_QUALIFIER): New macro.
14735 (report_class_declaration): Changed output format and use
14736 INNER_QUALIFIER. Call push_class_context.
14737
14738 2000-02-14 Andrew Haley <aph@cygnus.com>
14739
14740 * check-init.c (check_init): Add new cases for unary and binary
14741 tree nodes.
14742
14743 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14744
14745 * parse.y (resolve_package): Set `next' once a type name has been
14746 progressively discovered.
14747 (resolve_qualified_expression_name): Propagate resolution only if
14748 there are remaining qualifiers. Take into account `q' might have
14749 been cleared after re-qualification.
14750 * parse.y (patch_method_invocation): New local `resolved'.
14751 Section dealing with qualified expression rewritten to use
14752 resolve_field_access.
14753
14754 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14755
14756 * parse.h (PUSH_CPC): Fixed indentation.
14757 (DEBUG_CPC): New macro.
14758 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
14759 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
14760 * parse.y (class_body_declaration:): Use
14761 SET_CPC_INSTANCE_INITIALIZER_STMT.
14762 (method_declaration:): Check for null current_function_decl.
14763 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
14764 (java_parser_context_pop_initialized_field): Better handling of
14765 empty lists.
14766 (maybe_make_nested_class_name): Mark nested class name as
14767 qualified when necessary.
14768 (end_class_declaration): Don't call java_parse_context_resume when
14769 one or more error occurred.
14770 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
14771 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
14772 SET_CPC_INITIALIZER_STMT.
14773 (method_header): Check for inner classes declaring static methods.
14774 (resolve_qualified_expression_name): Handle situation where `this'
14775 is implied.
14776
14777 2000-03-13 Hans Boehm <boehm@acm.org>
14778
14779 * typeck.c (build_prim_array_type): Correctly set the high word too.
14780
14781 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14782
14783 * parse.y (java_complete_expand_methods): Leave <clinit> out of
14784 ordinary methods.
14785 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14786 list of methods for interfaces.
14787
14788 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14789
14790 * parse.y (qualify_ambiguous_name): Properly handle expressions
14791 using `null'.
14792
14793 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14794
14795 * parse.y (check_final_assignment): Extended to process
14796 COMPOUND_EXPR.
14797 (patch_assignment): Have check_final_assignment called only once.
14798
14799 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14800
14801 * java-tree.h (IS_INIT_CHECKED): New flag.
14802 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14803 * parse.y (patch_string): Call force_evaluation_order on the
14804 completed string concatenation tree.
14805 * expr.c (force_evaluation_order): Call force_evaluation_order on
14806 function's arguments too.
14807
14808 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14809
14810 * decl.c (emit_init_test_initialization): Mark KEY as unused.
14811 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14812 (build_anewarray): Likewise.
14813 * parse.y (patch_newarray): Likewise.
14814 * parse.c: Regenerated.
14815
14816 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14817
14818 * decl.c (init_decl_processing): Added new class fields `depth',
14819 `ancestors', and `idt' to class_type_node. Use
14820 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14821 * class.c (make_class_data): Push initial values for new fields.
14822 * java-tree.h: Updated prototype for `build_invokeinterface'.
14823 * expr.c (build_invokeinterface): Changed parameters to accept
14824 `method' tree. Calculate index of `method' in its declaring
14825 interface. Build call to _Jv_LookupInterfaceMethodIdx.
14826 (expand_invoke): Call `build_invokeinterface' with new parameters.
14827 * parse.y (patch_invoke): Call `build_invokeinterface' with new
14828 parameters.
14829
14830 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14831
14832 * typeck.c (lookup_do): Search superinterfaces first
14833 when looking up an interface method. From Godmar Back
14834 <gback@cs.utah.edu>
14835
14836 2000-03-06 Tom Tromey <tromey@cygnus.com>
14837
14838 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14839
14840 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14841
14842 * java-tree.h (lookup_argument_method2): Declared.
14843 (safe_layout_class): Prototype moved from parse.h.
14844 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14845 * parse.y (java_check_regular_methods): Local `super_class' gone.
14846 Call lookup_argument_method2 instead of lookup_argument_method.
14847 Perform modifier match for methods found declared in implemented
14848 interfaces. Fixed indentation problem. Overriding/hiding error
14849 report to take place only for methods found in classes.
14850 * typeck.c (lookup_argument_method): Changed leading
14851 comment. Re-written by calling lookup_do.
14852 (lookup_argument_method2): New function.
14853 (lookup_java_method): Re-written by calling lookup_do.
14854 (lookup_do): New function.
14855
14856 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14857
14858 * check-init.c (check_init): Removed dead code. Handle (blank)
14859 final variables.
14860 * parse.y (declare_local_variables): New local `final_p', set it
14861 and use it to initialize LOCAL_FINAL.
14862 (check_final_assignment): Only check FIELD_DECLs.
14863
14864 2000-02-17 Tom Tromey <tromey@cygnus.com>
14865
14866 * Makefile.in (JAVA_OBJS): Added boehm.o.
14867 (boehm.o): New target.
14868 * Make-lang.in (JAVA_SRCS): Added boehm.c.
14869 * java-tree.h (flag_use_boehm_gc): Declare.
14870 (get_boehm_type_descriptor): Declare.
14871 * lang.c (lang_f_options): Added `use-boehm-gc'.
14872 (flag_use_boehm_gc): New global.
14873 * lang-options.h: Added -fuse-boehm-gc.
14874 * boehm.c: New file.
14875 * class.c (get_dispatch_table): If class uses a Boehm type
14876 descriptor, put it in the vtable.
14877 (make_class_data): Removed dead code.
14878
14879 2000-03-03 Per Bothner <per@bothner.com>
14880
14881 * decl.c (init_decl_processing): Initialize sizetype properly.
14882
14883 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14884
14885 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14886 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14887 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14888 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14889 (jcf_parse): New local `current'. Load innerclasses seen in outer
14890 context being processed.
14891 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14892 * jcf-write.c (append_innerclasses_attribute): New function.
14893 (append_innerclasses_attribute_entry): Likewise.
14894 (get_access_flags): Handle static classes. Set anonymous and local
14895 classes to be private.
14896 (generate_classfile): Attribute count adjusted. Call
14897 append_innerclasses_attribute.
14898 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14899 PURE_INNER_CLASS_TYPE_P.
14900 * parse.y (parser_qualified_classname): New parameter `is_static',
14901 produce non qualified name accordingly.
14902 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14903 (create_interface): Added argument to parser_qualified_classname.
14904 (create_class): Added argument to parser_qualified_classname. Setup
14905 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14906 (add_inner_class_fields): Fixed indentation.
14907 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14908 (method_declarator): Fixed typo in comment.
14909 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14910 (build_current_thisn): Likewise.
14911 (patch_method_invocation): Likewise.
14912
14913 2000-03-01 Martin von Löwis <loewis@informatik.hu-berlin.de>
14914
14915 * decl.c (current_function_decl): Move to toplev.c.
14916
14917 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14918
14919 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14920 (DECL_BIT_INDEX): Use underlying representation.
14921 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14922
14923 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14924
14925 * expr.c (build_java_ret): Pass proper type to size_binop.
14926
14927 2000-02-25 Anthony Green <green@cygnus.com>
14928
14929 * expr.c (build_class_init): Mark the decl to be ignored by
14930 check_init.
14931 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14932 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14933 * class.c (init_test_hash_newfunc): New function.
14934 (decl_hash): New function.
14935 (decl_compare): New function.
14936 * decl.c (emit_init_test_initialization): New function.
14937 (complete_start_java_method): Traverse the init test hashtable,
14938 calling emit_init_test_initialization.
14939 (always_initialize_class_p): Define.
14940 * expr.c (build_class_init): Use initialization tests when
14941 emitting class initialization code.
14942 (always_initialize_class_p): Declare.
14943 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14944 1.
14945 * java-tree.h: Include hash.h.
14946 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14947 (struct lang_decl): Add init_test_table field.
14948 (init_test_hash_entry): Define.
14949
14950 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14951
14952 * gjavah.c (main): Avoid using `argi' to report unimplemented
14953 options.
14954
14955 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14956
14957 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14958 initialize locals to avoid warnings. Local `exception_type' moved
14959 into if statement.
14960
14961 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14962
14963 * parse.y (resolve_expression_name): Use `orig' as a second
14964 argument to resolve_field_access.
14965 (resolve_field_access): Removed unnecessary code when dealing with
14966 static fields.
14967
14968 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
14969
14970 * class.c (push_super_field): Don't push the field twice.
14971 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14972 * parse.h (java_reorder_fields): Prototyped.
14973 * parse.y (java_reorder_fields): New function.
14974 (java_layout_class): Simplified not to worry about re-ordering.
14975
14976 2000-02-23 Tom Tromey <tromey@cygnus.com>
14977
14978 * gjavah.c (print_name): In JNI case, correctly quote string.
14979 (print_method_info): Don't handle overrides in JNI mode.
14980
14981 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14982
14983 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14984 value type set to `boolean_type_node'.
14985
14986 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
14987
14988 * jcf-dump.c (main): Test for correct condition after
14989 output file creation.
14990
14991 2000-02-19 Anthony Green <green@cygnus.com>
14992
14993 * jcf-depend.c (add_entry): Fix test for first list entry.
14994
14995 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14996
14997 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14998 * constants.c (build_constants_constructor): Likewise.
14999
15000 2000-02-19 Anthony Green <green@cygnus.com>
15001
15002 * jcf-depend.c (add_entry): Add entries to the end of the list.
15003
15004 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
15005
15006 * decl.c (INT_TYPE_SIZE): Define if necessary.
15007 (expand_java_return): Handle the case of a native integer smaller
15008 than a JVM integer.
15009
15010 2000-02-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
15011
15012 * gjavah.c (help): Use GCCBUGURL.
15013 * jv-scan.c (help): Likewise.
15014 * jcf-dump.c (help): Likewise.
15015
15016 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15017
15018 * jcf-write.c (generate_bytecode_insns): Don't generate empty
15019 `finally' clauses.
15020
15021 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15022
15023 * jcf-parse.c (load_class): Call `fatal' if no file containing
15024 the target class are found.
15025
15026 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
15027
15028 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
15029 lex.c, lex.h, and PARSE_H to...
15030 (parse.o, parse-scan.o): ...here, respectively.
15031
15032 * lex.c: Split out code that may trigger SIGFPE from yylex()
15033 to its own function.
15034 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
15035
15036 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15037
15038 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
15039
15040 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
15041
15042 * parse.y (outer_field_access_p): Stop in time when outer contexts
15043 are exhausted.
15044 (resolve_qualified_expression_name): Properly qualify *everything*
15045 after a package.type to be resoled as expression names.
15046 (find_applicable_accessible_methods_list): Save/restore `class' to
15047 isolate it from a possible outer context search.
15048
15049 2000-02-15 Tom Tromey <tromey@cygnus.com>
15050
15051 * gjavah.c (jni_print_char): New function.
15052 (print_full_cxx_name): Use it.
15053 (decode_signature_piece): Likewise.
15054 (print_cxx_classname): Likewise.
15055
15056 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15057
15058 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
15059 version.o.
15060 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
15061
15062 * gjavah.c: Include version.h.
15063
15064 * jcf-dump.c: Likewise.
15065
15066 * jv-scan.c: Likewise.
15067
15068 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15069
15070 * parse.y (outer_field_access_fix): First parameter now a tree
15071 node. Check for assignment to final. First argument to
15072 build_outer_field_access_fix modified to accommodate prototype.
15073 (build_outer_field_access): Don't check for assignment to final
15074 here.
15075 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
15076 possibly returned by outer_field_access_fix. Changed
15077 outer_field_access_fix's first argument.
15078 (check_final_assignment): $finit$'s context is OK.
15079 (patch_unaryop): Use node instead of its line/column value when
15080 calling outer_field_access_fix.
15081
15082 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15083
15084 * parse.y (interface_declaration:): No longer tagged
15085 <node>. Re-installed default action.
15086 (class_member_declaration:): Handle inner interfaces.
15087 (interface_member_declaration): Handle inner interfaces and
15088 classes.
15089 (create_interface): Push error if one seen. Suspend parsing
15090 context when processing an inner interface.
15091 (register_fields): Inner class static field limitations not to
15092 apply to inner interfaces.
15093
15094 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15095
15096 * jcf-parse.c (load_class): Update `java_error_count' when a
15097 class' file can't be found.
15098 (parse.y): Avoid (byte)code generation when errors seen.
15099
15100 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15101
15102 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
15103 decodes a valid node.
15104 (patch_binop): Handle TRUNC_DIV_EXPR.
15105
15106 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15107
15108 * parse.y (resolve_package): New local `acc'. Try to progressively
15109 build and guess a package and type name.
15110
15111 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15112
15113 * parse.y (find_applicable_accessible_methods_list): Load and
15114 layout the search class if necessary.
15115 (java_complete_tree): Keep to original type of the folded initial
15116 value.
15117
15118 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15119
15120 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
15121 Generate error message if circularity is detected. New static
15122 local `list'.
15123 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
15124 * jcf-write.c (generate_bytecode_insns): Very simply handle
15125 SAVE_EXPR.
15126 * parse.y (java_check_circular_reference): Use
15127 `cyclic_inheritance_report' during report, if necessary.
15128 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
15129 walking NEW_ARRAY_INIT twice.
15130
15131 2000-02-09 Tom Tromey <tromey@cygnus.com>
15132
15133 * parse.y (check_class_interface_creation): Allow inner classes to
15134 be `private' or `protected', check modifiers' consistency. Prevent
15135 block local classes from bearing any modifiers.
15136
15137 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15138
15139 * except.c (check_start_handlers): Re-add prototype lost in last
15140 patch.
15141 (maybe_start_try): Remove excess argument to `check_start_handlers'.
15142
15143 2000-02-09 Andrew Haley <aph@cygnus.com>
15144
15145 * decl.c (clear_binding_level): Remove excess initializer.
15146 (maybe_poplevels): Remove unused variable.
15147 (force_poplevels): Ditto.
15148 (struct binding_level): Add comment.
15149
15150 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
15151
15152 * jcf-write.c (generate_classfile): Don't consider
15153 pre-initialization with reference value (use <clinit> instead.)
15154 * parse.y (java_fix_constructors): No generated constructor for
15155 interfaces.
15156 (build_outer_field_access): Removed debug message.
15157 (outer_field_expanded_access_p): Adapted to bytecode generation.
15158 (build_outer_field_access_method): Use fix_method_argument_names.
15159 (build_outer_method_access_method): Fixed indentation. Added
15160 comment. Handle access method generation for static and also void
15161 methods.
15162 (build_access_to_thisn): Inserted debug message.
15163 (maybe_build_thisn_access_method): Use fix_method_argument_names.
15164 (resolve_qualified_expression_name): Fixed comment.
15165 (not_accessible_p): Adapted to bytecode generation. Added comment.
15166 (patch_method_invocation): Added comment.
15167 (maybe_use_access_method): Fixed leading comment. Handle static
15168 methods.
15169 (java_complete_lhs): Don't shortcut handling of initialized upon
15170 declaration String type static fields when generating bytecode.
15171 (patch_unaryop): Handle outer field access when generating
15172 bytecode.
15173
15174 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
15175
15176 * java-tree.h (FIELD_THISN): New macro.
15177 * jcf-write.c (append_synthetic_attribute): New function.
15178 (generate_classfile): Set "Synthetic" attribute on this$<n>,
15179 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
15180 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
15181 this$<n> fields.
15182 (build_outer_field_access): Turned on access functions usage and
15183 generation when compiling to bytecode.
15184 (maybe_use_access_method): Likewise.
15185
15186 2000-01-25 Andrew Haley <aph@cygnus.com>
15187
15188 * java-except.h (struct eh_range): Add `expanded' field.
15189 (maybe_start_try): Add end_pc arg.
15190 (maybe_end_try): Ditto.
15191 * java-tree.h (force_poplevels): new function.
15192 * expr.c (expand_byte_code): Don't call maybe_start_try or
15193 maybe_end_try.
15194 * except.c (add_handler): Reset expanded.
15195 (expand_start_java_handler): Set expanded.
15196 (check_start_handlers): Don't expand a start handler that's
15197 already been expanded.
15198 (maybe_start_try): Add end_pc arg. Only expand a handler which
15199 ends after end_pc.
15200 (expand_end_java_handler): call force_poplevels.
15201 (force_poplevels): new function.
15202 * decl.c (binding_level): Add start_pc of binding level.
15203 (maybe_pushlevels): Call maybe_start_try when pushing binding
15204 levels.
15205 (maybe_poplevels): Call maybe_end_try when popping binding levels.
15206 (LARGEST_PC): Define.
15207 (clear_binding_level): Use LARGEST_PC.
15208
15209 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
15210 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
15211 (binding_depth, is_class_level, current_pc): new variables.
15212 (struct binding_level): ditto.
15213 (indent): new function.
15214 (push_jvm_slot): add debugging info.
15215 (maybe_pushlevels): ditto.
15216 (maybe_poplevels): ditto.
15217 (pushlevel): ditto.
15218 (poplevel): ditto.
15219 (start_java_method): ditto.
15220 (give_name_to_locals): comment only.
15221 * except.c (binding_depth, is_class_level, current_pc):
15222 new variables.
15223 (expand_start_java_handler): add debugging info.
15224 (expand_end_java_handler): ditto.
15225
15226 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15227
15228 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
15229 (print_name_for_stub_or_jni, process_file): Constify a char*.
15230
15231 2000-02-03 Tom Tromey <tromey@cygnus.com>
15232
15233 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
15234
15235 2000-01-31 Scott Bambrough <scottb@netwinder.org>
15236
15237 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
15238 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
15239 defined to be 1.
15240
15241 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
15242
15243 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
15244 * java-tree.h (TYPE_II_STMT_LIST): New macro.
15245 (struct lang_type): New field `ii_block'.
15246 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
15247 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
15248 * parse.h (struct parser_ctxt): New field `instance_initializers'.
15249 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
15250 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
15251 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
15252 macros.
15253 * parse.y (add_instance_initializer): New function.
15254 (in_instance_initializer): New static global.
15255 (class_body_declaration:): Link instance initializer block.
15256 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
15257 (array_creation_expression:): Remove unused local.
15258 (java_parser_context_push_initialized_field): Fixed leading
15259 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
15260 CPC_INSTANCE_INITIALIZER_LIST.
15261 (java_parser_context_pop_initialized_field): Likewise.
15262 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
15263 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
15264 CPC_INITIALIZER_STMT.
15265 (fix_constructors): New local `class_type'. Use it. Call
15266 add_instance_initializer.
15267 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
15268 (patch_return): Forbid return in instance initializers.
15269 (patch_throw_statement): Enforce exception handling in the context
15270 of instance initializers.
15271
15272 2000-02-03 Tom Tromey <tromey@cygnus.com>
15273
15274 * Make-lang.in (java.mostlyclean): Remove executables in
15275 `mostlyclean'.
15276
15277 2000-01-31 Scott Bambrough <scottb@netwinder.org>
15278
15279 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
15280 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
15281 (java_float_finite): Convert to use union Word from javaop.h.
15282 (java_double_finite): Convert to use union DWord from javaop.h.
15283
15284 2000-02-02 Tom Tromey <tromey@cygnus.com>
15285
15286 * gjavah.c (options): Added `jni' entry.
15287 (help): Document -jni.
15288 (flag_jni): New global.
15289 (process_file): Handle JNI output. Don't print text from
15290 -prepend, -add, etc, when generating stubs. Only remove `.class'
15291 suffix if it actually exists.
15292 (main): Create a `.c' file when run with `--jni --stubs'. Create
15293 correct output file name with `--jni'.
15294 (print_include): Mangle header name differently in JNI case.
15295 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
15296 method list.
15297 (print_method_info): Handle JNI case. Put signature info into
15298 method name. Handle case when STREAM is NULL.
15299 (print_name_for_stub_or_jni): New function.
15300 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
15301 (print_cxx_classname): Handle JNI.
15302 (print_full_cxx_name): Likewise.
15303 (decode_signature_piece): Likewise.
15304 (overloaded_jni_method_exists_p): New function.
15305 (struct method_name): Added `signature' and `sig_length' fields.
15306 (HANDLE_END_FIELD): Do nothing in JNI mode.
15307
15308 2000-02-02 Tom Tromey <tromey@cygnus.com>
15309
15310 * jv-scan.c: Include version.c, <getopt.h>.
15311 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
15312 (options): New array.
15313 (usage): New function.
15314 (version): New function.
15315 (main): Use getopt_long to parse command line.
15316 * jcf-dump.c: Include version.c, <getopt.h>.
15317 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
15318 OPT_JAVAP): New macros.
15319 (options): New array.
15320 (usage): Return `void'. Changed message.
15321 (help): New function.
15322 (version): New function.
15323 (main): Use getopt_long_only to parse command line.
15324 * gjavah.c: Include <getopt.h>.
15325 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
15326 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
15327 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
15328 (options): New array.
15329 (java_no_argument): Removed.
15330 (help): Updated with missing options.
15331 (main): Use getopt_long_only to parse command line.
15332 (usage): Changed message.
15333
15334 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15335
15336 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
15337 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
15338 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
15339 * parse.y (array_creation_expression:): Handle anonymous arrays.
15340 (build_array_from_name): Don't set `ret_name' if null.
15341 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
15342 (qualify_ambiguous_name): Likewise.
15343 (java_complete_expand_class): Likewise.
15344
15345 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15346
15347 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
15348 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
15349 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
15350 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
15351 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
15352 AIPL_FUNCTION_COMPLETED_INVOCATION.
15353 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
15354 AIPL_FUNCTION_INVOCATION_READY.
15355 (AIPL_FUNCTION_DECLARATION): New enum entry.
15356 * parse.y (reorder_static_initialized): New function.
15357 (java_parser_context_pop_initialized_field): Use it.
15358 (add_inner_class_fields): Use
15359 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
15360 augmented. Install marker after last alias initializer, if any.
15361 (generate_finit): Fixed typo. Don't try to retain only the used
15362 fields.
15363 (method_header): Compute and set DECL_FUNCTION_NAP.
15364 (method_declarator): Fixed comment. Insert alias initializer in
15365 parameter list.
15366 (build_alias_initializer_parameter_list): Fixed leading
15367 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
15368 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
15369 (java_complete_expand_class): Code to retain only used aliases
15370 removed.
15371 (java_complete_expand_methods): New local `first_decl'. Generate
15372 $finit$ first, then expand the constructors, regular methods and
15373 <clinit>.
15374 (java_complete_expand_method): Don't report error on missing
15375 return statement if previously detected bogus.
15376 (fix_constructors): Don't patch constructor parameters list.
15377 (patch_method_invocation): Use new AIPL enum values. Reverse
15378 alias initializer list for anonymous classes.
15379
15380 2000-01-30 Anthony Green <green@redhat.com>
15381
15382 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
15383 determine how many stack slots to pop.
15384
15385 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15386
15387 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
15388 error handling/recovery.
15389 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
15390
15391 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
15392
15393 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
15394 FIELD_LOCAL_ALIAS_USED): New macros.
15395 (DECL_FUNCTION_NAP): New macro.
15396 (struct lang_decl): New field `nap'.
15397 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
15398 (struct lang_type): New fields `finit_stmt_list' and
15399 `clinit_stmt_list'.
15400 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
15401 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
15402 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
15403 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
15404 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
15405 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
15406 (BUILD_THROW): Macro line separator re-indented.
15407 * parse.y (end_class_declaration): New function.
15408 (maybe_generate_pre_expand_clinit): New name for
15409 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
15410 pre-expand static fields.
15411 (maybe_generate_clinit): Function deleted.
15412 (check_for_static_method_reference): Prototype's parameter list
15413 indented.
15414 (generate_finit): New name for maybe_generate_finit. Changed
15415 leading comment. Function rewritten to use
15416 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
15417 (build_alias_initializer_parameter_list): New function.
15418 (java_parser_context_pop_initialized_field): Likewise.
15419 (add_inner_class_fields): Likewise.
15420 (type_declaration:): Call end_class_declaration.
15421 (class_member_declaration:): Likewise.
15422 (formal_parameter_list:): Fixed typos.
15423 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
15424 element. Improved error handling.
15425 (block_statement:): Call end_class_declaration.
15426 (anonymous_class_creation:): Likewise.
15427 (create_anonymous_class): Fixed comments.
15428 (create_class): Call add_inner_class_fields.
15429 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
15430 (method_header): Use MARK_FINAL_PARMS.
15431 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
15432 (method_declarator): Propagate final argument flag.
15433 (craft_constructor): New local `artificial'. Call
15434 build_alias_initializer_parameter_list. Use
15435 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
15436 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
15437 necessary.
15438 (complete_expand_class): Get rid of unused outer context local
15439 alias fields.
15440 (java_complete_expand_methods): Fixed leading
15441 comment. Generate/pre-expand <clinit> first. Changed method
15442 expansion order to regular, $finit$, constructors, <clinit>.
15443 (java_complete_expand_method): Set current_function_decl.
15444 (fix_constructors): Fix constructor parameter list to account for
15445 outer context local alias initializers.
15446 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15447 (resolve_expression_name): Lookup outer context local aliases. New
15448 local `access', use it.
15449 (patch_method_invocation): Patch inner class ctor invocation with
15450 outer context local aliases initialization values. $finit$
15451 invocation patching now includes things generated with
15452 build_alias_initializer_parameter_list.
15453 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15454 (build_super_invocation): Likewise.
15455 (patch_assignment): Changed comment.
15456
15457 2000-01-27 Andrew Haley <aph@cygnus.com>
15458
15459 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
15460 (emit_if): Ditto.
15461 (emit_jsr): Ditto.
15462
15463 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15464
15465 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
15466 concatenation.
15467 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
15468
15469 * parse.y (register_fields): Don't pass a format specifier to
15470 OBSOLETE_MODIFIER_WARNING.
15471 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
15472 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
15473 specifier.
15474 (check_modifiers): Change function into a macro.
15475 (check_class_interface_creation): Pass a literal format string.
15476
15477 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15478
15479 * buffer.h: PROTO -> PARAMS.
15480 * check-init.c: Likewise.
15481 * class.c: Likewise.
15482 * constants.c: Likewise.
15483 * convert.h: Likewise.
15484 * decl.c: Likewise.
15485 * except.c: Likewise.
15486 * expr.c: Likewise.
15487 * gjavah.c: Likewise.
15488 * java-except.h: Likewise.
15489 * java-tree.h: Likewise.
15490 * jcf-depend.c: Likewise.
15491 * jcf-dump.c: Likewise.
15492 * jcf-parse.c: Likewise.
15493 * jcf-path.c: Likewise.
15494 * jcf-reader.c: Likewise.
15495 * jcf-write.c: Likewise.
15496 * jcf.h: Likewise.
15497 * jv-scan.c: Likewise.
15498 * jvgenmain.c: Likewise.
15499 * jvspec.c: Likewise.
15500 * lang.c: Likewise.
15501 * lex.c: Likewise.
15502 * lex.h: Likewise.
15503 * parse-scan.y: Likewise.
15504 * parse.h: Likewise.
15505 * parse.y: Likewise.
15506 * typeck.c: Likewise.
15507 * verify.c: Likewise.
15508 * xref.c: Likewise.
15509 * xref.h: Likewise.
15510 * zextract.c: Likewise.
15511 * zipfile.h: Likewise.
15512
15513 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15514
15515 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15516 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
15517 * constants.c (build_constant_data_ref): Check for cached
15518 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
15519 in TYPE_CPOOL_DATE_REF.
15520 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
15521 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
15522 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
15523 (LOCAL_FINAL): New macro.
15524 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
15525 constant pool -- don't try to reuse.
15526 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
15527 TYPE_LANG_SPECIFIC.
15528 (find_in_current_zip): Use TYPE_JCF.
15529 * parse.h (java_check_final): Prototype removed.
15530 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
15531 (maybe_create_class_interface_decl,
15532 check_class_interface_creation): Likewise.
15533 (java_expand_finals): Function removed.
15534 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
15535 (block_statement:): Fixed comment.
15536 (anonymous_class_creation:): Likewise.
15537 (check_class_interface_creation): Reversed Jan 12, 2000 extra
15538 argument patch.
15539 (check_class_interface_creation): Loosened error report on (inner)
15540 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
15541 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
15542 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
15543 argument patch.
15544 (create_interface): Likewise.
15545 (anonymous_class_counter): New static global.
15546 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
15547 patch. Fixed comments.
15548 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
15549 anonymous_class_counter when declaring a toplevel class.
15550 (craft_constructor): Fixed constructor name when handling
15551 anonymous classes. Anonymous class constructors to feature hidden
15552 this$<n> parameter.
15553 (java_fix_constructors): Added comment.
15554 (java_check_final): Function removed.
15555 (java_complete_expand_methods): Fixed comment. Don't generate
15556 class data, save its outgoing constant pool instead.
15557 (verify_constructor_super): Skip anonymous class constructor
15558 hidden this$<n> parameter.
15559 (java_expand_classes): New local `saved_ctxp'. Removed call to
15560 java_expand_finals and java_check_final. Expand anonymous class
15561 constructors. Generate class data.
15562 (build_super_invocation): Skip anonymous class hidden this$<n>
15563 parameter.
15564 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
15565 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15566 (set_java_signature): Likewise.
15567
15568 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
15569
15570 * gjavah.c: Delete ACC_VISIBILITY define.
15571 * jcf.h: Add ACC_VISIBILITY define.
15572 * parse.y: final: rule tagged <value>.
15573 (java_check_regular_methods): Use ACC_VISIBILITY define for
15574 default package access check.
15575 (local_variable_declaration_statement): Use final: rule.
15576
15577 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
15578
15579 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
15580 (final:): New rule.
15581
15582 2000-01-17 Tom Tromey <tromey@cygnus.com>
15583
15584 * gjavah.c (print_field_info): Allow non-static final fields.
15585
15586 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15587
15588 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
15589 * parse.y (patch_anonymous_class): New function.
15590 (create_anonymous_class): Register incomplete type when the
15591 class/interface to extends/implement isn't known yet.
15592 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
15593 (verify_constructor_super): Tuned error message.
15594
15595 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15596
15597 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
15598 (ANONYMOUS_CLASS_P): New macro.
15599 (TYPE_SIGNATURE, TYPE_JCF): New macros.
15600 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
15601 * parse.y (create_class): Added leading argument.
15602 (maybe_create_class_interface_decl,
15603 check_class_interface_creation): Likewise.
15604 (craft_constructor): New function.
15605 (verify_constructor_super): Added argument in prototype.
15606 (class_declaration:): Inserted leading argument.
15607 (for_begin:): Use FOR_LOOP_P.
15608 (anonymous_class_creation): Create WFL of the anonymous class to
15609 instantiate. Call build_new_invocation. Added comments.
15610 (check_class_interface_creation): Handle parameter `anonymous' in
15611 verbose mode class creation announce.
15612 (link_nested_class_to_enclosing): Exclude anonymous classes.
15613 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
15614 anonymous class, even though they appear to have an enclosing
15615 context.
15616 (create_interface): Pass extra argument to
15617 check_class_interface_creation.
15618 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
15619 (create_class): Call check_class_interface_creation and
15620 maybe_create_class_interface_decl with extra new argument. Don't
15621 add private this$<n> to anonymous classes.
15622 (method_declarator): Insert hidden this$<n> to anonymous class
15623 constructors.
15624 (java_fix_constructors): Deleted code creating default
15625 constructor. Call craft_constructor instead.
15626 (java_check_regular_methods): Set `saw_constructor' to 1 for
15627 anonymous classes.
15628 (fix_constructors): Pass extra argument to verify_constructor_super.
15629 (verify_constructor_super): New local `sdecl', use it. Search for
15630 matching constructor (possibly featuring arguments) in super
15631 class.
15632 (lookup_method_invoke): Craft constructor according to arguments
15633 list when dealing with anonymous class constructors.
15634 (build_super_invocation): Pass arguments to anonymous class super
15635 constructors.
15636 (search_loop): Use FOR_LOOP_P.
15637 (labeled_block_contains_loop_p): Likewise.
15638
15639 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15640
15641 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
15642 (enclosing_context_p): New function.
15643 (get_access_flags_from_decl): Handle CLASS_STATIC.
15644 (maybe_layout_super_class): Extra first argument passed to
15645 do_resolve_class.
15646 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
15647 ID_INIT_P.
15648 * decl.c (access0_identifier_node): New global.
15649 (init_decl_processing): access0_identifier_node initialized.
15650 (pushdecl): Set DECL_CONTEXT only on non type decls.
15651 * expr.c (lookup_field): Lookup inner class fields in enclosing
15652 contexts.
15653 (expand_invoke): Use ID_INIT_P.
15654 (expand_java_field_op): Use DECL_CLINIT_P.
15655 * java-tree.def (CLASS_LITERAL): New tree code.
15656 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
15657 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
15658 (struct lang_decl): New field `inner_access'.
15659 (enclosing_context_p): Prototyped.
15660 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
15661 ID_CLINIT_P): New macros.
15662 (CLASS_STATIC): New macro.
15663 (CLASS_ACCESS0_GENERATED_P): New macro.
15664 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
15665 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
15666 INNER_CLASS_P): New macros.
15667 (DECL_INNER_CLASS_LIST): New macro.
15668 * jcf-parse.c (yyparse): Avoid the use of ANSI string
15669 concatenation.
15670 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15671 the shift value to int. Fixed typo in comment.
15672 * lex.c (inst_id, wpv_id): Initialize.
15673 * mangle.c (unicode_mangling_length): Take `$' into account.
15674 * parse.h (DRECOVER, RECOVER): Terminate properly.
15675 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
15676 (typedef struct _jdep): New field `enclosing'.
15677 (JDEP_ENCLOSING): New macro.
15678 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
15679 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
15680 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
15681 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
15682 GET_ENCLOSING_CPC_CONTEXT): New macros.
15683 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
15684 (do_resolve_class): Added extra argument in prototype.
15685 * parse.y (resolve_class): Added extra argument in prototype.
15686 (maybe_create_class_interface_decl): Likewise.
15687 (maybe_use_access_method, build_wfl_wrap): New functions.
15688 (java_complete_expand_classes, java_complete_expand_class):
15689 Likewise.
15690 (java_parser_context_push_initialized_field,
15691 java_parser_context_suspend, java_parser_context_resume):
15692 Likewise.
15693 (maybe_make_nested_class_name, make_nested_class_name,
15694 set_nested_class_simple_name_value,
15695 link_nested_class_to_enclosing, find_as_inner_class,
15696 find_as_inner_class_do, check_inner_class_redefinition,
15697 build_thisn_assign, build_current_thisn, build_access_to_thisn,
15698 maybe_build_thisn_access_method, build_outer_field_access,
15699 build_outer_field_access_methods, build_outer_field_access_expr,
15700 build_outer_method_access_method, build_new_access_id,
15701 build_outer_field_access_method, outer_field_access_p,
15702 outer_field_expanded_access_p, outer_field_access_fix,
15703 build_incomplete_class_ref, patch_incomplete_class_ref,
15704 create_anonymous_class): Likewise.
15705 (inst_id, wpv_id): New static global variables.
15706 (synchronized:): New rule, tagged <node>.
15707 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
15708 rules.
15709 (anonymous_class_creation:): New rule, tagged <node>.
15710 (NEW_TK): Tagged <node>.
15711 (type_literals, array_type_literal): New rules, tagged <node>.
15712 (class_declaration:): Removed action when reducing by class_body:
15713 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
15714 using GET_CPC in sub-rules.
15715 (class_member_declaration): Handle inner classes.
15716 (method_declaration): When reducing method_header:, reset
15717 current_function_decl when appropriate.
15718 (method_declarator:): Set the number of formal parameter to 0 for
15719 method declared without arguments.
15720 (constructor_declarator:): Likewise.
15721 (static_initializer:): List of elements kept in a list.
15722 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
15723 use of the keyword `static' for type declarations.
15724 (block_statement:): Handle inner class declarations.
15725 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
15726 type qualified `this'.
15727 (class_instance_creation_expression): Use anonymous_class_creation:
15728 to handle inner class instances creation. Handle qualified `new'.
15729 (something_dot_new): Added appropriate actions.
15730 (create_new_parser_context): New function.
15731 (java_push_parser_context, java_parser_context_save_global,
15732 java_parser_context_suspend): Use create_new_parser_context.
15733 (check_modifiers): Changed leading comment.
15734 (check_class_interface_creation): Handle interclasses.
15735 (add_superinterfaces): Fixed comment.
15736 (create_interface): Build qualified name from the raw_name instead
15737 of its matching WFL. Push the initialized fields list. raw_name added
15738 as an extra argument to maybe_create_class_interface_decl.
15739 (create_class): Build qualified name from the raw_name instead of
15740 its matching WFL. Removed assignment to current_parsed_class_un.
15741 Call PUSH_ERROR before returning an error. Suspend the current
15742 parser context when processing an inner class. Push the
15743 initialized fields list. raw_name added as an extra argument to
15744 maybe_create_class_interface_decl. Add the private this$<n>
15745 field.
15746 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
15747 (register_fields): Get the class type from GET_CPC and handle
15748 previous errors. Added code to handle the creation of static
15749 fields in inner classes. Initialized fields initialization
15750 statements kept in a list of lists.
15751 (maybe_generate_finit): Initialized fields initialization
15752 statements kept in a list of lists. Use GET_CPC.
15753 (maybe_generate_clinit): Likewise.
15754 (method_header): Use GET_CPC and GET_CPC_UN.
15755 (parser_qualified_classname): Handle inner classes.
15756 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
15757 (java_fix_constructors): Hide pointer to enclosing context
15758 instance in constructor list when dealing with inner classes.
15759 (jdep_resolve_class): Call resolve_class with extra first argument
15760 JDEP_ENCLOSING.
15761 (resolve_class): Add enclosing context as a first extra argument
15762 to do_resolve_class.
15763 (do_resolve_class): Call find_as_inner_class. Handle WFLs
15764 properly.
15765 (resolve_no_layout): Extra argument added to resolve_class
15766 invocation.
15767 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
15768 (java_get_real_method_name): Use GET_CPC_UN.
15769 (check_abstract_method_definitions): Use DECL_CLINIT_P.
15770 (java_check_abstract_methods): Handle static method declared in
15771 inner classes by an error.
15772 (java_check_regular_methods): Use DECL_CLINIT_P.
15773 (source_start_java_method): Also set DECL_MAX_LOCALS.
15774 (create_artificial_method): Call java_parser_context_save_global
15775 and java_parser_context_restore_global instead of saving/restoring
15776 the context by hand.
15777 (expand_start_java_method): Improved verbose mode message.
15778 (java_complete_expand_methods): Fixed leading comment. Use
15779 DECL_CLINIT_P.
15780 (fix_constructors): Added assignment to this$<n> if necessary.
15781 (java_expand_classes): Call java_complete_expand_classes instead
15782 of java_complete_expand_methods.
15783 (make_qualified_primary): Simplified.
15784 (merge_qualified_name): Optimized for missing left or right parts.
15785 (resolve_expression_name): Handle access to outer class fields from
15786 interclasses.
15787 (resolve_qualified_expression_name): New macro
15788 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15789 classes. Report error on non appropriate qualification of
15790 `new'. Handle qualified `this'.
15791 (not_accessible_p): Allow access to outer class private fields from
15792 inner classes.
15793 (patch_method_invocation): Handle method invocations through
15794 access methods and inner class constructor invocations.
15795 (find_applicable_accessible_methods_list): Search enclosing
15796 contexts of an inner class.
15797 (search_applicable_methods_list): Fixed typo.
15798 (argument_types_convertible): Handle inner class constructors'
15799 hidden outer context reference argument.
15800 (qualify_ambiguous_name): Handle qualified `this'.
15801 (java_complete_lhs): Handle use of field accessed through
15802 artificial access methods in various cases of assignments. Handle
15803 CLASS_LITERAL node.
15804 (check_final_assignment): Use DECL_CLINIT_P.
15805 (valid_ref_assignconv_cast_p): Handle the destination being an
15806 enclosing context of the source.
15807 (patch_unaryop): Handle use of field accessed through artificial
15808 access methods.
15809 (patch_return): Use DECL_CLINIT_P.
15810 (patch_throw_statement): Use DECL_CLINIT_P.
15811 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15812 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15813 ID_INIT_P.
15814
15815 2000-01-16 Anthony Green <green@cygnus.com>
15816
15817 * parse.y (build_string_concatenation): Only use
15818 StringBuffer(String) shortcut if String arg is constant.
15819
15820 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15821
15822 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15823 the shift value to int. Fixed typo in comment.
15824
15825 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
15826
15827 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15828 * jcf-write.c: Likewise.
15829 * parse.y: Likewise.
15830 * parse.c: Regenerate.
15831
15832 2000-01-09 Anthony Green <green@cygnus.com>
15833
15834 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15835 bytecodes in the correct order.
15836
15837 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15838
15839 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15840
15841 2000-01-06 Anthony Green <green@cygnus.com>
15842
15843 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15844 before building constant array decl.
15845
15846 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
15847
15848 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15849 method invocation and typo in conditional expression.
15850 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15851 the appropriate NOTE_POP.
15852 * parse.y (patch_binop): Shift value mask to feature the right
15853 type.
15854
15855 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15856
15857 * class.c (assume_compiled, assume_compiled_node): Add static
15858 prototype.
15859 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15860
15861 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15862
15863 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15864
15865 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15866 to `__modifier' to avoid stringifying it.
15867
15868 * parse.y (verify_constructor_circularity): Don't call a variadic
15869 function with a non-literal format string.
15870 (java_check_abstract_methods): Move unreachable code inside
15871 `continue' statement.
15872 (lookup_method_invoke): Call xstrdup, not strdup.
15873
15874 * expr.c (expand_java_field_op): Avoid the use of ANSI string
15875 concatenation.
15876
15877 * jcf-parse.c (yyparse): Likewise.
15878
15879 * jv-scan.c (main): Likewise.
15880
15881 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15882
15883 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15884 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15885 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15886 concatenation.
15887
15888 * parse.y (synchronized, variable_redefinition_error,
15889 check_class_interface_creation, create_interface, create_class,
15890 method_header, finish_method_declaration,
15891 check_modifiers_consistency, method_declarator,
15892 complete_class_report_errors, check_abstract_method_definitions,
15893 java_check_regular_methods, check_throws_clauses,
15894 java_check_abstract_methods, read_import_dir,
15895 check_pkg_class_access, declare_local_variables, fix_constructors,
15896 cut_identifier_in_qualified, resolve_expression_name,
15897 resolve_qualified_expression_name, patch_method_invocation,
15898 java_complete_lhs, patch_assignment, try_builtin_assignconv,
15899 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15900 patch_exit_expr, patch_exit_expr, patch_switch_statement,
15901 patch_try_statement, patch_synchronized_statement,
15902 patch_throw_statement, check_thrown_exceptions,
15903 patch_conditional_expr): Likewise.
15904
15905 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15906
15907 * Makefile.in (LIBDEPS): Added gcc's errors.o
15908 (../jcf-dump$(exeext):): Link with gcc's errors.o
15909 (../gcjh$(exeext):): Likewise.
15910 * expr.c (expand_java_NEW): Layout the entire target type instead of
15911 laying out its methods only.
15912 (lookup_field): Layout the class after having loaded it.
15913 * java-tree.h (java_debug_context): Declared.
15914 * jcf-io.c (toplev.h): Included.
15915 (find_class): Removed assignment to jcf's outofsynch
15916 field. Force source file to be read if newer than its matching
15917 class file. Tweaked debug messages.
15918 * jcf-parse.c (jcf_out_of_synch): Deleted.
15919 (read_class): Call to jcf_out_of_synch removed.
15920 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15921 (jcf_out_of_synch): Prototype deleted.
15922 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15923 `deprecated' and `class_err': integer turned into bit-fields.
15924 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15925 * parse.y (package_list): New global.
15926 (package_declaration:): Record newly parsed package name.
15927 (extra_ctxp_pushed_p): Static global deleted.
15928 (java_parser_context_save_global): Create buffer context for the
15929 purpose of saving globals, if necessary.
15930 (java_parser_context_restore_global): Pop context pushed for the
15931 purpose of saving globals, if necessary.
15932 (java_debug_context_do): New prototype and function.
15933 (java_debug_context): Likewise.
15934 (do_resolve_class): Use already parsed package names to qualify
15935 and lookup class candidate.
15936 (java_pre_expand_clinit): Removed unnecessary local variable.
15937
15938 1999-12-17 Tom Tromey <tromey@cygnus.com>
15939
15940 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
15941 fixes PR gcj/119.
15942 (process_file): Use `\n\' at end of each line in string.
15943
15944 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15945
15946 * expr.c (expand_invoke): Layout the loaded class before
15947 attempting to use it.
15948 (expand_java_field_op): Allow final field assignments to take
15949 place in $finit$.
15950 * typeck.c (convert): Return error_mark_node if expr is null.
15951
15952 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15953
15954 * class.c (class_depth): Return -1 if the class doesn't load
15955 properly.
15956 * expr.c (can_widen_reference_to): Check for errors during depth
15957 computation and return 0 accordingly.
15958 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15959 create default constructors and add an other error check.
15960 * parse.h (java_fix_constructors): Prototyped.
15961 * parse.y (java_pre_expand_clinit): Likewise.
15962 (build_super_invocation): Re-prototyped to feature one argument.
15963 (java_check_circular_reference): Directly use `current'.
15964 (java_fix_constructors): New function.
15965 (java_check_regular_methods): Don't create default constructors
15966 here, but abort if none were found.
15967 (java_complete_expand_methods): Pre-process <clinit> calling
15968 java_pre_expand_clinit.
15969 (java_pre_expand_clinit): New function.
15970 (fix_constructors): build_super_invocation invoked with the
15971 current method declaration as an argument.
15972 (build_super_invocation): Use the context of the processed method
15973 decl argument instead of current_class.
15974 * typeck.c (lookup_java_method): Take WFLs in method names into
15975 account.
15976
15977 1999-12-14 Per Bothner <per@bothner.com>
15978
15979 * class.c (make_class_data): flag_keep_inline_functions to keep
15980 private methods in the method array.
15981
15982 1999-12-15 Anthony Green <green@cygnus.com>
15983
15984 * check-init.c (check_init): Take into account both types of
15985 `throw's when checking for uninitialized variables.
15986
15987 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15988
15989 * parse.y (java_complete_lhs): Force conversion of array
15990 dimensions to int_type_node, that's what runtime's ABI expects.
15991
15992 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15993
15994 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15995 operand of a WFL, until the Java front-end gets fixed with regard
15996 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15997
15998 1999-12-10 Andrew Haley <aph@cygnus.com>
15999
16000 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
16001 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
16002 expr.c (build_java_athrow): Add support for sjlj-exceptions.
16003 java-tree.h: Ditto.
16004 jcf-write.c: Ditto.
16005
16006 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
16007
16008 * expr.c (java_lang_expand_expr): Switch to permanent obstack
16009 before calling expand_eh_region_start and expand_start_all_catch.
16010 * except.c (expand_start_java_handler): Switch to permanent
16011 obstack before calling expand_eh_region_start.
16012 (expand_end_java_handler): Switch to permanent obstack before
16013 calling expand_start_all_catch.
16014
16015 1999-12-5 Anthony Green <green@cygnus.com>
16016
16017 * decl.c (init_decl_processing): Mark throw_node as a noreturn
16018 function with side effects.
16019 (init_decl_processing): Mark all memory allocating DECLs with
16020 DECL_IS_MALLOC.
16021
16022 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16023
16024 * except.c (expand_end_java_handler): Call
16025 expand_resume_after_catch and end_catch_handler.
16026
16027 1999-11-30 Anthony Green <green@cygnus.com>
16028
16029 * verify.c (verify_jvm_instructions): Create new return label
16030 chain if non existent (don't rely on the verified state of the jsr
16031 target.)
16032
16033 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16034
16035 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
16036 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
16037
16038 * parse.y (patch_assignment): Removed bogus final class test on
16039 lhs when checking on whether to emit an ArrayStoreException runtime
16040 check.
16041 * expr.c (expand_java_arraystore): Likewise.
16042
16043 1999-11-28 Anthony Green <green@cygnus.com>
16044
16045 * decl.c (find_local_variable): Reuse single slot decls when
16046 appropriate.
16047
16048 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16049
16050 * jcf-parse.c (saw_java_source): Global variable removed.
16051 (read_class): Don't use `saw_java_source'. Added extra braces.
16052 (yyparse): Code setting `saw_java_source' removed.
16053
16054 1999-11-24 Mark Mitchell <mark@codesourcery.com>
16055
16056 * except.c (emit_handlers): Zero catch_clauses after emitting them.
16057
16058 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16059
16060 * verify.c (merge_type_state): Non verified subroutines being
16061 considered more than once to trigger passive type merge.
16062
16063 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16064
16065 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
16066 in case of error. Error message tuned.
16067
16068 1999-11-21 Anthony Green <green@cygnus.com>
16069
16070 * constants.c (find_methodref_index): Unwrap method names before
16071 inserting them in the constant pool.
16072
16073 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
16074
16075 * class.c (assume_compiled_node): New typedef.
16076 (assume_compiled_tree): New static data.
16077 (find_assume_compiled_node): New function.
16078 (add_assume_compiled): New function.
16079 (assume_compiled): New function.
16080 * class.c (make_class_data): Use assume_compiled.
16081 (is_compiled_class): Use assume_compiled.
16082
16083 * java-tree.h (add_assume_compiled): Declare.
16084
16085 * lang.c (lang_decode_option): Parse new options.
16086
16087 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16088
16089 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
16090 int_type_node: that's what `_Jv_AllocObject' expects.
16091
16092 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16093
16094 * parse.y (lookup_method_invoke): Use lang_printable_name to
16095 reliably build the type name during error report. Fixes PR gcj/97.
16096
16097 1999-11-09 Tom Tromey <tromey@cygnus.com>
16098
16099 * jcf-path.c: Include <sys/stat.h>.
16100 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
16101 (DIR_UP): New macro.
16102
16103 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
16104
16105 * parse.y (source_end_java_method): Resume permanent allocation,
16106 reversing Apr 27 1998 patch.
16107 (patch_string_cst): Pop obstacks after having pushed the permanent
16108 ones.
16109
16110 1999-11-05 Tom Tromey <tromey@cygnus.com>
16111
16112 * class.c (finish_class): Emit inlined methods if any native
16113 methods exist in the class. Fixes PR gcj/85.
16114
16115 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
16116
16117 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
16118 (qualify_ambiguous_name): Likewise.
16119
16120 1999-11-03 Godmar Back <gback@cs.utah.edu>
16121
16122 * typeck.c: (lookup_java_method): search all inherited
16123 interfaces when looking up interface method.
16124
16125 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16126
16127 * parse.y (method_header:): Issue error message for rule `type
16128 error'.
16129 (synchronized:): Error report when not using synchronized.
16130
16131 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16132
16133 * parse.y (resolve_qualified_expression_name): Prevent `this' from
16134 being used before the superclass constructor has been called.
16135 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
16136 instead of `CALL_THIS_CONSTRUCTOR_P'.
16137
16138 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
16139
16140 * check-init.c: Fix typo in comment.
16141
16142 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
16143
16144 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
16145 and final method.
16146
16147 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
16148
16149 * parse.y (expression_statement:): Call function to report
16150 improper invocation of a constructor.
16151 (parse_ctor_invocation_error): New function.
16152
16153 1999-10-26 Mark Mitchell <mark@codesourcery.com>
16154
16155 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
16156 remember_end_note.
16157
16158 1999-10-21 Tom Tromey <tromey@cygnus.com>
16159
16160 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
16161 in generated `main'.
16162
16163 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
16164
16165 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
16166 (qualify_ambiguous_name): Likewise.
16167
16168 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16169
16170 * parse.y (java_complete_tree): fold_constant_for_init to work on
16171 permanent_obstack.
16172 (java_complete_lhs): Likewise.
16173 (array_constructor_check_entry): Complete an initializer element
16174 on permanent_obstack.
16175
16176 1999-10-19 Tom Tromey <tromey@cygnus.com>
16177
16178 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
16179 From Mike Moreton <mike@pillim.demon.co.uk>.
16180
16181 1999-10-15 Greg McGary <gkm@gnu.org>
16182
16183 * java-tree.h (flag_bounds_check): Remove extern decl.
16184 * lang.c (flag_bounds_check): Remove global variable.
16185 (lang_f_options): Remove "bounds-check" entry.
16186 (lang_init_options): Default flag_bounds_check to "on".
16187
16188 1999-10-14 Tom Tromey <tromey@cygnus.com>
16189
16190 * jvgenmain.c (usage): New function.
16191 (main): Use it. Also, handle `-D' options.
16192 * jvspec.c (lang_specific_driver): Recognize -D.
16193 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
16194
16195 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
16196
16197 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16198
16199 * jcf-dump.c (print_constant, disassemble_method): Don't call a
16200 variadic function with a non-literal format string.
16201
16202 * parse-scan.y (report_main_declaration): Likewise.
16203
16204 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
16205
16206 * parse.y (read_import_dir, patch_assignment, patch_binop,
16207 patch_array_ref): Likewise.
16208
16209 * typeck.c (build_java_array_type): Likewise.
16210
16211 * verify.c (verify_jvm_instructions): Likewise.
16212
16213 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16214
16215 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
16216
16217 1999-10-07 Anthony Green <green@cygnus.com>
16218
16219 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
16220 where CHECK_PUT may fail for valid reasons.
16221
16222 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
16223 UNSAFE_PUTN): New macros.
16224
16225 1999-10-04 Tom Tromey <tromey@cygnus.com>
16226
16227 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
16228 well. Fixes Java PR gcj/59.
16229 * parse-scan.y (yyerror): Report errors.
16230
16231 1999-09-24 Glenn Chambers <GChambers@provsol.com>
16232
16233 * decl.c (insert_block): Remove unconditional `abort'.
16234
16235 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
16236
16237 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
16238 FUNCTION_CODE now of type int. All callers changed.
16239 Set the builtin's DECL_BUILT_IN_CLASS.
16240
16241 1999-09-23 Tom Tromey <tromey@cygnus.com>
16242
16243 * jvspec.c (lang_specific_driver): Don't read spec file if
16244 -fsyntax-only given.
16245
16246 1999-09-22 Tom Tromey <tromey@cygnus.com>
16247
16248 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
16249
16250 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
16251 (WORDS_TO_LONG): Likewise.
16252 (WORDS_TO_DOUBLE): Likewise.
16253
16254 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16255
16256 * jcf-write.c (RELOCATION_VALUE_0): New macro.
16257 (RELOCATION_VALUE_1): Likewise.
16258 (emit_iinc, emit_reloc, push_constant1, push_constant2,
16259 push_in_const, push_long_const): Prototyped.
16260 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
16261 (push_constant2): Likewise.
16262 (push_int_const): Cast find_constant1's integer arguments to `jword'.
16263 (find_constant_wide): Cast find_constant2's integer arguments to
16264 `jword'.
16265 (find_constant_index): Cast find_constant2's and find_constant2's
16266 integer arguments to `jword'.
16267 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
16268 (emit_switch_reloc): Use RELOCATION_VALUE_0.
16269 (emit_if): Use RELOCATION_VALUE_1.
16270 (emit_goto): Likewise.
16271 (emit_jsr): Likewise.
16272 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
16273 argument to push_long_const to HOST_WIDE_INT.
16274
16275 1999-09-15 Andreas Schwab <schwab@suse.de>
16276
16277 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
16278
16279 1999-09-20 Nick Clifton <nickc@cygnus.com>
16280
16281 * lang.c (lang_decode_option): Extend comment.
16282
16283 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16284
16285 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
16286 instead of fndecl.
16287
16288 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16289
16290 * gjavah.c (get_field_name, print_method_info, print_include,
16291 add_namelet): Use xmalloc, not malloc.
16292
16293 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
16294 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
16295 NULL pointer.
16296
16297 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
16298
16299 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
16300
16301 * jcf-path.c (add_entry): Likewise.
16302
16303 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
16304
16305 * jv-scan.c (xmalloc): Remove definition.
16306
16307 * jvgenmain.c (xmalloc): Likewise.
16308
16309 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
16310
16311 * lex.c (java_store_unicode): Use xrealloc, not realloc.
16312
16313 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
16314 concat, not xmalloc/sprintf.
16315 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
16316 (xstrdup): Remove definition.
16317
16318 * parse.y (duplicate_declaration_error_p,
16319 constructor_circularity_msg, verify_constructor_circularity,
16320 check_abstract_method_definitions, java_check_regular_methods,
16321 java_check_abstract_methods, patch_method_invocation,
16322 check_for_static_method_reference, patch_assignment, patch_binop,
16323 patch_cast, array_constructor_check_entry, patch_return,
16324 patch_conditional_expr): Use xstrdup, not strdup.
16325
16326 * zextract.c (ALLOC): Use xmalloc, not malloc.
16327
16328 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16329
16330 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
16331
16332 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
16333 (do_spec, lang_specific_pre_link, lang_specific_driver,
16334 input_filename, input_filename_length): Don't declare.
16335 (main_class_name, jvgenmain_spec, lang_specific_driver):
16336 Constify a char*.
16337 (lang_specific_driver): All calls to the function pointer
16338 parameter now explicitly call `fatal'.
16339
16340 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16341
16342 * parse.y (find_applicable_accessible_methods_list): Search
16343 abstract classes as interfaces.
16344
16345 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
16346
16347 * class.c (finish_class): We're now outside a valid method
16348 declaration. Tell the rest of gcc so.
16349
16350 1999-09-08 Bruce Korb autogen@linuxbox.com
16351
16352 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
16353
16354 1999-09-07 Tom Tromey <tromey@cygnus.com>
16355
16356 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
16357 java-array.h.
16358 (decode_signature_piece): Don't emit "::" in JArray<>.
16359 (print_namelet): Only print trailing `;' when printing a class.
16360
16361 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
16362
16363 * java-tree.h: Delete declarations for all tree nodes now moved to
16364 global_trees.
16365 * decl.c: Delete their definitions.
16366
16367 1999-09-04 Mark Mitchell <mark@codesourcery.com>
16368
16369 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
16370 * Makefile.in (OBJS): Add ggc-callbacks.o.
16371 (OBJDEPS): Likewise.
16372
16373 1999-09-03 Tom Tromey <tromey@cygnus.com>
16374
16375 * parse.y (strip_out_static_field_access_decl): Return operand if
16376 it satisfies JDECL_P.
16377
16378 1999-09-02 Tom Tromey <tromey@cygnus.com>
16379
16380 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
16381 Handle nested arrays, like `[[I'.
16382
16383 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16384
16385 * class.c (finish_class): Remove unused parameter, all callers
16386 changed.
16387
16388 * expr.c (build_java_athrow): Change return type to void.
16389 (java_lang_expand_expr): Make sure each case in switch returns a
16390 value.
16391
16392 * java-tree.h (finish_class): Fix prototype to take void args.
16393
16394 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
16395 (main): Issue return from main, not exit.
16396
16397 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
16398
16399 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
16400
16401 * jv-scan.c (main): Issue return from main, not exit.
16402
16403 * parse.y (check_abstract_method_definitions,
16404 java_check_abstract_method_definitions): Add static prototypes.
16405 (java_complete_expand_methods): Fix call to `finish_class'.
16406
16407 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
16408 and `prevpc'.
16409
16410 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16411
16412 * lang.c (language_string): Constify.
16413
16414 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16415
16416 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
16417 Remove hacks for stuff which comes from libiberty.
16418
16419 * Make-lang.in: Likewise.
16420
16421 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
16422
16423 * Makefile.in (xref.o): Depend on xref.c explicitly.
16424
16425 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16426
16427 * java-tree.h (lang_printable_name): Constify a char*.
16428
16429 * lang.c (lang_printable_name): Likewise.
16430
16431 1999-08-27 Jeffrey A Law (law@cygnus.com)
16432
16433 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
16434 comments in C code.
16435
16436 1999-08-26 Tom Tromey <tromey@cygnus.com>
16437
16438 * gjavah.c (print_cxx_classname): Print "::" before qualified
16439 name.
16440
16441 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16442
16443 * parse.y (lookup_cl): Changed leading comment. Now does its best
16444 to set the column number.
16445 (qualify_ambiguous_name): Take WFL wrappers into account.
16446
16447 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
16448
16449 * verify.c (verify_jvm_instructions): Don't check instruction
16450 validity beyond end of method.
16451
16452 1999-08-25 Tom Tromey <tromey@cygnus.com>
16453
16454 * jvspec.c (lang_specific_driver): Correctly handle --help again.
16455
16456 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16457
16458 * gjavah.c (print_name, print_base_classname, utf8_cmp,
16459 cxx_keyword_subst, generate_access, name_is_method_p,
16460 get_field_name, print_field_name, super_class_name, print_include,
16461 decode_signature_piece, print_class_decls, usage, help,
16462 java_no_argument, version, add_namelet, print_namelet): Add static
16463 prototype.
16464 (print_base_classname, utf8_cmp, cxx_keyword_subst,
16465 name_is_method_p): Constify a char*.
16466 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
16467 Provide a final else clause in an if-else-if.
16468 (print_field_info): Add missing final arg in function call to
16469 `print_field_name'.
16470 (print_method_info, decompile_method, decode_signature_piece,
16471 print_c_decl, print_full_cxx_name, print_stub,
16472 print_mangled_classname, super_class_name, print_include,
16473 add_namelet, add_class_decl, print_class_decls, process_file,
16474 help): Constify a char*.
16475
16476 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
16477 push_int_const, find_constant_wide, find_constant_index,
16478 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
16479 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
16480 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
16481 emit_if, emit_goto, emit_jsr, call_cleanups,
16482 make_class_file_name): Add static prototypes.
16483 (generate_bytecode_return, generate_bytecode_insns): Pass a
16484 NULL_PTR, not a NULL_TREE.
16485
16486 * jv-scan.c: Include "jcf.h".
16487 (main): Declare using DEFUN macro.
16488
16489 * jvspec.c (find_spec_file, lang_specific_pre_link,
16490 lang_specific_driver): Add prototypes.
16491 (find_spec_file): Constify a char*.
16492
16493 * keyword.gperf (hash, java_keyword): Add prototypes.
16494
16495 * lang.c (lang_print_error): Add static prototype.
16496 (lang_init): Prefer memcpy over bcopy to avoid casts.
16497
16498 * lex.c (yylex): Add static prototype.
16499
16500 * parse-scan.y: Include "lex.c" earlier.
16501
16502 * parse.h: Remove redundant declaration for `yylex'.
16503
16504 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
16505 labeled_block_contains_loop_p): Add static prototypes.
16506 (not_accessible_p): Make static to match prototype.
16507
16508 * verify.c (start_pc_cmp): Don't needlessly cast away const.
16509
16510 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16511
16512 * parse.y (check_method_redefinition): Changed leading comment.
16513 (check_abstract_method_definitions): New function.
16514 (java_check_abstract_method_definitions): New function.
16515 (java_check_regular_methods): Call it.
16516 (verify_constructor_super): Fixed indentation.
16517 (lookup_method_invoke): Likewise.
16518
16519 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16520
16521 * parse.y (method_header): Return a null pointer if the current
16522 class node is null.
16523 (finish_method_declaration): Return if the current function decl
16524 is null.
16525 (source_start_java_method): Likewise.
16526 (java_method_add_stmt): Likewise.
16527
16528 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16529
16530 * class.c (emit_register_class): Removed unnecessary call to
16531 start_sequence.
16532 * parse.y (labeled_block_contains_loop_p): Removed unused local
16533 variable.
16534
16535 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16536
16537 * parse.y (java_refold): Added prototype.
16538
16539 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16540
16541 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
16542 (java_stabilize_reference): Removed unnecessary `else'.
16543 (java_complete_lhs): Set flag to remember boolean. Call
16544 java_refold. Added comments.
16545 (java_decl_equiv): New function.
16546 (binop_compound_p): Likewise.
16547 (java_refold): Likewise.
16548 (patch_unaryop): Striped static field access assigned to decl and
16549 op. Changed promotion scheme for ++/-- operators.
16550 (search_loop): New function.
16551 (labeled_block_contains_loop_p): Likewise.
16552 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
16553 comment.
16554 (patch_bc_statement): Call search_loop. Fixed comment.
16555
16556 1999-08-14 Anthony Green <green@cygnus.com>
16557
16558 * expr.c (java_lang_expand_expr): Mark static array data as
16559 referenced.
16560
16561 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
16562
16563 * jvgenmain.c (main): NUL-terminate name_obstack.
16564
16565 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16566
16567 * check-init.c (check_bool2_init, done_alternative): Add static
16568 prototypes.
16569
16570 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
16571 (add_method, build_utf8_ref, build_class_ref,
16572 append_gpp_mangled_type, layout_class_method): Constify a char*.
16573
16574 * decl.c (push_promoted_type, make_binding_level): Add static
16575 prototypes.
16576 (push_promoted_type, pushdecl): Constify a char*.
16577
16578 * except.c (find_handler_in_range, link_handler,
16579 check_start_handlers): Add static prototypes.
16580
16581 * expr.c (process_jvm_instruction): Constify a char*.
16582
16583 * gjavah.c (main): Constify a char*.
16584
16585 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
16586 Constify a char*.
16587
16588 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
16589 static prototypes.
16590 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
16591 munge, print_ents): Constify a char*.
16592
16593 * jcf-dump.c (disassemble_method): Constify a char*.
16594 (print_constant_pool, print_exception_table): Add static prototypes.
16595 (print_constant, print_exception_table, main, disassemble_method):
16596 Constify a char*.
16597
16598 * jcf-io.c (find_classfile, find_class): Likewise.
16599
16600 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
16601 (set_source_filename, predefined_filename_p): Add static prototypes.
16602 (set_source_filename, get_constant, get_class_constant,
16603 find_in_current_zip): Constify a char*.
16604
16605 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
16606 static prototypes.
16607 (add_entry, add_path, jcf_path_classpath_arg,
16608 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16609
16610 * jcf-reader.c (get_attribute, jcf_parse_preamble,
16611 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
16612 jcf_parse_one_method, jcf_parse_methods,
16613 jcf_parse_final_attributes): Add static prototypes.
16614 (get_attribute): Constify a char*.
16615
16616 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
16617 jcf_dependency_add_target, jcf_path_classpath_arg,
16618 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16619
16620 * jv-scan.c (main): Constify a char*.
16621 (gcc_obstack_init): Add prototype arguments.
16622
16623 * jvgenmain.c (gcc_obstack_init): Likewise.
16624 (main): Constify a char*.
16625
16626 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
16627 static prototypes.
16628 (put_decl_string, lang_print_error): Constify a char*.
16629 (lang_init): Remove redundant extern prototype.
16630
16631 * mangle.c (emit_unicode_mangled_name): Constify a char*.
16632
16633 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
16634 Add static prototypes.
16635 (get_type_from_signature): Constify a char*.
16636
16637 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
16638 Add static prototypes.
16639 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
16640 (verify_jvm_instructions): Constify a char*.
16641
16642 * xref.c (xref_flag_value): Likewise.
16643
16644 * xref.h (xref_flag_value): Likewise.
16645
16646 * zextract.c (makeword, makelong): Add static prototypes.
16647 (makeword, makelong): Constify a uch*.
16648
16649 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16650
16651 * lang.c (java_dummy_print): Constify a char*.
16652 (lang_print_error): Likewise.
16653 (lang_init): Remove redundant prototype for `print_error_function'.
16654 (lang_init_source): Likewise.
16655 (lang_identify): Constify a char*.
16656
16657 1999-08-09 Tom Tromey <tromey@cygnus.com>
16658
16659 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
16660 (WORDS_TO_LONG): Likewise.
16661 (WORDS_TO_DOUBLE): Likewise.
16662
16663 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16664
16665 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
16666
16667 * expr.c (java_stack_pop, java_array_data_offset,
16668 build_java_throw_out_of_bounds_exception, case_identity,
16669 build_java_check_indexed_type): Add static prototypes.
16670 (linenumber_table, expand_invoke, expand_java_field_op,
16671 build_primtype_type_ref, expand_byte_code): Constify a char*.
16672
16673 * java-tree.h (build_primtype_type_ref, linenumber_table):
16674 Constify a char*.
16675 (java_lang_expand_expr): Add prototype.
16676
16677 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
16678 `java_lang_expand_expr'.
16679
16680 * lex.c (java_lex_error): Constify a char*.
16681 (java_get_unicode, java_read_char, java_allocate_new_line,
16682 java_unget_unicode, java_sneak_unicode): Prototype.
16683
16684 * parse-scan.y (current_class, package_name, method_declarator,
16685 report_class_declaration, yyerror): Constify a char*.
16686
16687 * parse.h (java_report_errors): Prototype.
16688 (yyerror): Constify a char*.
16689
16690 * parse.y (classitf_redefinition_error, check_modifiers,
16691 parse_jdk1_1_error, lookup_package_type,
16692 lookup_package_type_and_set_next, get_printable_method_name,
16693 purify_type_name): Constify a char*.
16694 (build_super_invocation, maybe_generate_finit,
16695 verify_constructor_super, parser_add_interface,
16696 add_superinterfaces, jdep_resolve_class, note_possible_classname,
16697 java_complete_expand_methods, java_expand_finals,
16698 cut_identifier_in_qualified, java_stabilize_reference,
16699 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
16700 merge_string_cste): Prototype.
16701 (single_type_import_declaration, yyerror,
16702 variable_redefinition_error, build_array_from_name,
16703 build_unresolved_array_type, check_class_interface_creation,
16704 resolve_class, complete_class_report_errors,
16705 note_possible_classname, read_import_dir,
16706 find_in_imports_on_demand, resolve_package, fix_constructors,
16707 check_deprecation, lookup_method_invoke,
16708 maybe_build_primttype_type_ref, array_constructor_check_entry):
16709 Constify a char*.
16710 (java_complete_expand_methods, java_expand_finals): Make static.
16711 (convert_narrow): Remove static prototype.
16712
16713 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
16714
16715 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
16716
16717 1999-08-02 Richard Henderson <rth@cygnus.com>
16718
16719 * decl.c: Include defaults.h instead of expr.h.
16720 * parse.y: Likewise.
16721
16722 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
16723
16724 * java/decl.c (start_java_method): Change all uses of
16725 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
16726 Ensure expr.h is included.
16727 * java/expr.c (pop_arguments): Ditto.
16728 * java/parse.y (expand_start_java_method): Ditto.
16729
16730 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16731
16732 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
16733
16734 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
16735
16736 * decl.c: Include "function.h".
16737 * except.c: Likewise.
16738 * parse.y: Likewise.
16739 * Makefile.in: Update dependencies.
16740
16741 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16742
16743 * expr.c (build_java_soft_divmod): Provide a default case in switch.
16744 (java_lang_expand_expr): Mark parameters `target', `tmode' and
16745 `modifier' with ATTRIBUTE_UNUSED.
16746
16747 * gjavah.c (process_file): Add braces around ambiguous `else'.
16748
16749 * jcf-dump.c (print_access_flags, localvar_free): Change return
16750 type to void.
16751
16752 * parse.y (java_complete_expand_method): Initialize variable
16753 `exception_copy'.
16754 (resolve_qualified_expression_name): Likewise for `field_decl'.
16755 (patch_method_invocation): Likewise for `class_to_search'.
16756 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
16757 (patch_assignment): Likewise for `lhs_type'.
16758
16759 * verify.c (verify_jvm_instructions): Remove unused variable
16760 `caller'.
16761
16762 1999-07-25 Richard Henderson <rth@cygnus.com>
16763
16764 * decl.c (va_list_type_node): New.
16765
16766 1999-07-25 Anthony Green <green@cygnus.com>
16767
16768 * gjavah.c (print_stub): New function.
16769 (METHOD_IS_NATIVE): New macro.
16770 (print_mangled_classname): Make static.
16771 (HANDLE_END_FIELD): Don't emit fields during stub generation.
16772 (process_file): Perform stub generation.
16773 (HANDLE_METHOD): Don't emit class decls during stub
16774 generation.
16775 (HANDLE_END_METHOD): Take into account stub generation.
16776 (print_method_info): Handle stub generation.
16777 (print_stub): New function.
16778 (print_cxx_classname): Make signature consistant with others.
16779 (help): Describe -stubs option.
16780 (main): Create stub file.
16781 (version): Use version.c.
16782 (print_full_cxx_name): New function.
16783 (print_c_decl): Use print_full_cxx_name.
16784
16785 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16786
16787 * check-init.c (check_init): Handle MAX_EXPR.
16788
16789 1999-07-15 Andrew Haley <aph@cygnus.com>
16790
16791 * lang.c (flag_use_divide_subroutine): New variable.
16792 * typeck.c: (convert_ieee_real_to_integer): Bounds check
16793 fp-to-integer conversion.
16794 (convert): Call convert_ieee_real_to_integer when flag_fast_math
16795 is not set.
16796
16797 * expr.c (build_java_soft_divmod): New function.
16798 (build_java_binop): Call build_java_soft_divmod if
16799 flag_use_divide_subroutine is set.
16800 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16801 soft_lrem_node: new builtin functions.
16802 (init_decl_processing) Initialize the new builtins.
16803 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16804 soft_lrem_node: new builtin functions.
16805 (build_java_soft_divmod): New function.
16806 * parse.y: Call build_java_soft_divmod if
16807 flag_use_divide_subroutine is set.
16808 * parse.c: Rebuilt.
16809
16810 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16811 a --specs= arg) even if not linking.
16812 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16813 -fuse-divide-subroutine
16814
16815 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16816
16817 * parse.y (resolve_and_layout): Check methods only once.
16818 (resolve_qualified_expression_name): Verify thrown exceptions
16819 compatibility.
16820 (check_thrown_exceptions): Reject exceptions thrown in
16821 initializer. Error message tuned.
16822
16823 1999-07-14 Andrew Haley <aph@cygnus.com>
16824
16825 * expr.c (expand_expr): Do not return the last statement in a
16826 block as the block's value.
16827
16828 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
16829
16830 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16831 CALL_EXPR, to avoid order of evaluation changes.
16832
16833 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
16834
16835 * parse.y (qualify_ambiguous_name): Do not use
16836 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16837
16838 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16839
16840 * check-init.c (check_init): Handle MAX_EXPR.
16841 * expr.c (force_evaluation_order): Force method call arguments to
16842 be evaluated in left-to-right order.
16843 * parse.y (qualify_ambiguous_name): Loop again to qualify
16844 NEW_ARRAY_EXPR properly.
16845
16846 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
16847
16848 * parse.y (patch_invoke): Resolve unresolved invoked method
16849 returned type.
16850 (qualify_ambiguous_name): STRING_CST to qualify expression for
16851 type name resolution.
16852
16853 1999-06-24 Andrew Haley <aph@cygnus.com>
16854
16855 * class.c (finish_class): Whenever a deferred method is
16856 output, rescan the list of methods to see if a new candidate for
16857 output can be found.
16858
16859 1999-06-28 Tom Tromey <tromey@cygnus.com>
16860
16861 * jvspec.c (lang_specific_driver): Recognize --help.
16862
16863 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16864
16865 * parse.y (resolve_package): Fixed bogus return statement.
16866 (patch_method_invocation): Resolve method invocation beginning with
16867 a package name qualifier.
16868
16869 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16870
16871 * Make-lang.in (java.stage1): Depend on stage1-start.
16872 (java.stage2): Likewise for stage2-start.
16873 (java.stage3): Likewise for stage3-start.
16874 (java.stage4): Likewise for stage4-start.
16875
16876 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16877
16878 * parse.y (java_complete_lhs): When doing cross referencing, don't
16879 try to keep file location on a WFL expanded as a CALL_EXPR.
16880
16881 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
16882
16883 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16884 compiling to class file a void method with an empty method body.
16885 As a side effect, the bytecode backend will generate the
16886 appropriate `return' instruction.
16887
16888 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16889
16890 * parse.y (lookup_package_type_and_set_next): New function prototype.
16891 (resolve_package): Search current and imported packages.
16892 (lookup_package_type_and_set_next): New function.
16893
16894 1999-06-22 Andrew Haley <aph@cygnus.com>
16895
16896 * verify.c (verify_jvm_instructions): Check for pending blocks
16897 before invalid PC test and opcode switch, not after.
16898
16899 1999-06-21 Andrew Haley <aph@cygnus.com>
16900
16901 * except.c (find_handler_in_range): The upper limit for exception
16902 ranges is exclusive, not inclusive: (start <= pc < end).
16903 (link_handler): find child pointer which points to outer by
16904 searching sibling list: previous code incorrectly assumed that
16905 outer->outer->first_child must point to outer.
16906 * verify.c (verify_jvm_instructions): FIXME added to code for
16907 `athrow'.
16908 (verify_jvm_instructions): Do not assume that the last block
16909 processed in a subroutine is a block which ends with a `ret'
16910 instruction. With some control flows it is possible that the last
16911 block ends with an `athrow'.
16912
16913 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16914
16915 * parse.y (qualify_ambiguous_name): Reorganized the post
16916 evaluation of non WFL leading expression nodes.
16917
16918 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16919
16920 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16921 CONVERT_EXPR.
16922
16923 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16924
16925 * parse.y (qualify_ambiguous_name): Handle qualified expression
16926 beginning with a STRING_CST.
16927
16928 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16929
16930 * parse.y (register_fields): Set DECL_INITIAL on both
16931 pre-initialized static and public fields.
16932 (resolve_field_access): Static field access expressions to always
16933 use pointer types.
16934 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16935 qualification. CONVERT_EXPR to be resolved as an expression name.
16936 (java_complete_lhs): Identify and access qualified final
16937 initialized field in switch statement case expression.
16938 (fold_constant_for_init): Pre-initialized field decl constant to
16939 be folded.
16940
16941 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
16942
16943 * parse.y (note_possible_classname): Mark returned node with
16944 QUALIFIED_P only if the original class name contained a '/'.
16945
16946 1999-06-05 Anthony Green <green@cygnus.com>
16947
16948 * Make-lang.in (gcjh): More parallel build fixes.
16949
16950 1999-06-03 Mike Stump <mrs@wrs.com>
16951
16952 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16953
16954 1999-06-02 Anthony Green <green@cygnus.com>
16955
16956 * except.c (link_handler): Chain exception handlers in order.
16957
16958 1999-06-02 Anthony Green <green@cygnus.com>
16959
16960 * expr.c (expand_byte_code): Fill unreachable bytecode regions
16961 with nops and process as usual in order to always set correct EH
16962 ranges. Emit detailed warnings about unreachable bytecodes.
16963
16964 1999-06-02 Anthony Green <green@cygnus.com>
16965
16966 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16967 constant.
16968
16969 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16970
16971 * parse.y (lookup_field_wrapper): Unified returned value to NULL
16972 or the searched field decl.
16973
16974 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16975
16976 * parse.y (fold_constant_for_init): Convert numerical constant
16977 values to the type of the assigned field.
16978
16979 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16980
16981 * expr.c (lookup_field): Relaxed the test on class loading error
16982 detection.
16983 * parse.y (fold_constant_for_init): Enabeled old code.
16984
16985 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16986
16987 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16988 decide the validity of the cast of a java.lang.Cloneable reference
16989 to an array.
16990 (patch_conditional_expr): Fixed first argument passed to
16991 binary_numeric_promotion.
16992
16993 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
16994
16995 * parse.y (qualify_ambiguous_name): Take into account that a
16996 CONVERT_EXPR might specify a type as a WFL.
16997
16998 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16999
17000 * parse.y (patch_assignment): Save the rhs before using it as an
17001 argument to _Jv_CheckArrayStore.
17002
17003 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
17004
17005 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
17006
17007 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
17008
17009 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
17010 floating point literal only when the exponent indicator has been
17011 parsed.
17012
17013 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17014
17015 * parse.y (formal_parameter:): Construct argument tree list
17016 element even if a yet unsupported final parameter was encountered.
17017
17018 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
17019
17020 * parse.y (finish_method_declaration): Issue errors for native or
17021 abstract methods declared with a method body, as well as for non
17022 native or non abstract methods with no method body.
17023
17024 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17025
17026 * class.c (build_utf8_ref): Initialize variable `field'.
17027
17028 * decl.c (init_decl_processing): Initialize variable `field'.
17029
17030 * expr.c (build_known_method_ref): Mark parameters `method_type',
17031 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
17032 (process_jvm_instruction): Likewise for parameter `length'.
17033
17034 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
17035 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
17036 ATTRIBUTE_UNUSED.
17037
17038 * parse.y (maybe_generate_clinit): Remove unused variable
17039 `has_non_primitive_fields'.
17040 (find_in_imports_on_demand): Initialize variables `node_to_use'
17041 and `cl'.
17042 (patch_binop): Likewise for variable `prom_type'.
17043 (patch_unaryop): Likewise for variable `prom_type'.
17044
17045 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
17046
17047 * xref.c (xref_table): Add missing initializer.
17048
17049 1999-05-14 Tom Tromey <tromey@cygnus.com>
17050
17051 * java-except.h (struct eh_range): Removed unused `next' member.
17052 * verify.c (verify_jvm_instructions): Call check_nested_ranges
17053 after adding all exception handlers. Sort exception ranges in
17054 order of start PC.
17055 (struct pc_index): New structure.
17056 (start_pc_cmp): New function.
17057 * except.c (add_handler): Return `void'. Don't call link_handler;
17058 instead construct an ordinary linked list and do range
17059 coalescing.
17060 (check_nested_ranges): New function.
17061 (link_handler): Changed interface to allow merging of eh_ranges.
17062 Split overlapping ranges. Return `void'.
17063
17064 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17065
17066 * parse.y (constructor_block_end:): New rule, tagged <node>.
17067 (constructor_body:): Use `constructor_block_end' instead of
17068 `block_end'.
17069
17070 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17071
17072 * parse.y (statement_nsi:): Pop `for' statement block.
17073 (java_complete_lhs): Labeled blocks containing no statement are
17074 marked as completing normally.
17075
17076 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
17077
17078 * xref.c (xref_set_current_fp): New function, defined.
17079 * xref.h (xref_set_current_fp): New function, prototyped.
17080
17081 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
17082
17083 * check-init.c (check_init): Take into account that
17084 LABELED_BLOCK_STMT can be empty.
17085
17086 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
17087
17088 * parse.y (java_check_regular_methods): Warning check on not
17089 overriding methods with default access in other packages does not
17090 apply to `<clinit>'.
17091 (java_complete_lhs): If block body is an empty_stmt_node, replace
17092 it by NULL_TREE. This prevents gcc from generating an irrelevant
17093 warning.
17094
17095 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
17096
17097 * check-init.c (check_init): Removed code accepting to see things
17098 falling through default:, when doing xrefs.
17099 * java-tree.h (do_not_fold): New global variable, declared.
17100 * parse.y (do_not_fold): New global variable, defined.
17101 (java_complete_expand_method): Set `do_not_fold' to the value of
17102 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
17103 and reinstall them after them have been purged; do not check for
17104 initializations; do not issue missing return errors.
17105 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
17106 when doing xrefs.
17107 (patch_binop): Skip the fold part when doing xrefs.
17108 (build_string_concatenation): Skip the concatenation part when
17109 doing xrefs.
17110 (patch_synchronized_statement): Do not generate a try-finally when
17111 doing xrefs.
17112 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
17113 and keep the location where the throw was seen.
17114 * typeck.c (convert): When `do_not_fold' is set, do not attempt
17115 any treatment on the converted node an simply return a NOP_EXPR of
17116 the targeted type.
17117 * xref.c (xref_get_data): New function, defined.
17118 * xref.h (xref_get_data): New function, declared.
17119 (XREF_GET_DATA): Use xref_get_data.
17120
17121 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17122
17123 * gjavah.c (print_include): Cast the result of `strlen' to int
17124 when comparing against a signed value.
17125 (add_namelet): Likewise.
17126
17127 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17128
17129 * expr.c (expand_invoke): Mark parameter `nargs' with
17130 ATTRIBUTE_UNUSED.
17131 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
17132
17133 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
17134 ATTRIBUTE_UNUSED.
17135
17136 * jcf-reader.c (get_attribute): Cast a value to long
17137 when comparing against a signed expression. Likewise.
17138
17139 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
17140 HOST_BITS_PER_CHAR.
17141
17142 1999-05-11 Andrew Haley <aph@cygnus.com>
17143
17144 * parse.y (source_end_java_method): If the current method contains
17145 any exception handlers, force asynchronous_exceptions: this is
17146 necessary because signal handlers in libjava may throw exceptions.
17147 * decl.c (end_java_method): Ditto.
17148
17149 1999-05-11 Tom Tromey <tromey@cygnus.com>
17150
17151 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
17152 flags.
17153 * jvspec.c (THREAD_NAME): Removed.
17154 (GC_NAME): Likewise.
17155 (MATHLIB): Likewise.
17156 (WITHLIBC): Likewise.
17157 (GCLIB): Likewise.
17158 (THREADLIB): Likewise.
17159 (MATH_LIBRARY): Likewise.
17160 (lang_specific_driver): Don't add `-l' options to command line.
17161 Instead, add a single --specs option. Recognize `-L' options and
17162 use them to search for spec file.
17163 (find_spec_file): New function.
17164 (SPEC_FILE): New define.
17165
17166 1999-05-11 Dave Brolley <brolley@cygnus.com>
17167
17168 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
17169 cpplib-enabled build.
17170
17171 1999-05-05 Per Bothner <bothner@cygnus.com>
17172
17173 * class.c (make_field_value): DECL_INITIAL may be a string literal;
17174 temporarily zero it while calling rest_of_decl_compilation.
17175
17176 * java-tree.h (string_ptr_type_node): Add declaration.
17177 * decl.c: Define and initialize string_ptr_type_node.
17178 * parse.y (patch_string_cst): Use string_ptr_type_node.
17179
17180 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
17181 * parse.y (for_statement): Now unconditionally exit_block.
17182 (finish_labeled_statement): No longer exit_block if for-loop.
17183 (patch_loop_statement): Check harder if the loop is already labeled.
17184
17185 * parse.y (patch_initialized_static_field): Removed function.
17186 (maybe_generate_clinit): Removed special handling for interfaces.
17187 (java_complete_expand_methods): Do a preliminary java_complete_tree
17188 on <clinit> to determine if it can be removed.
17189 (java_complete_expand_method): Remove special handling for <clinit>.
17190 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
17191 optimize if we get back empty_stmt_node.
17192 For MODIFY_EXPR, re-do checking of static initializers.
17193 (fold_constant_for_init): Don't return immediate if VAR_DECL.
17194 For VAR_DECL, pass correct context.
17195
17196 * verify.c (verify_jvm_instructions): Better error messages.
17197
17198 1999-05-03 Tom Tromey <tromey@cygnus.com>
17199
17200 * parse-scan.y (interface_declaration): Call
17201 report_class_declaration for interfaces.
17202
17203 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
17204
17205 * Makefile.in: Remove -v from bison command lines.
17206
17207 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
17208
17209 * check-init.c (check_init): Exclude a case of error when doing
17210 xrefs.
17211 * class.c (layout_class_method): Don't generate the error message
17212 twice when compiling from source.
17213 * lang-options.h: Added `-Wredundant-modifers' and
17214 `-Wunusupported-jdk11' flags and help text.
17215 * lang.c (lang_decode_option): Added support for
17216 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
17217 flag_static_local_jdk11 and flag_redundant set accordingly.
17218 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
17219 * parse.h (EXPR_WFL_ADD_COL): New macro.
17220 (DECL_END_SOURCE_LINE): Likewise.
17221 (DECL_INHERITED_SOURCE_LINE): Likewise.
17222 * parse.y (static_ref_err): New function, prototyped.
17223 (CCB_TK): Now tagged <operator>.
17224 (class_body:): Remember the location of the closing '}' of a class
17225 definition when doing xrefs.
17226 (block:): Likewise.
17227 (block_end:): Likewise.
17228 (create_class): Remember the location of the inherited class
17229 identifier when doing xrefs.
17230 (register_fields): Added test on first operand of `init' before
17231 testing it TREE_CODE.
17232 (method_header): Store the location of the class identifier in the
17233 class decl when doing xrefs.
17234 (finish_method_declaration): Don't combine first/last method line
17235 when doing xref.
17236 (java_check_regular_methods): Warning check on not overriding
17237 methods with default access on other packages move before check on
17238 static methods. Initialization of `aflags' also moved up.
17239 (resolve_expression_name): Call static_ref_err to report the error.
17240 (static_ref_err): New function, implemented.
17241 (resolve_field_access): Returned simplified static field access
17242 when doing xrefs.
17243 (resolve_qualified_expression_name): Check for illegal use of
17244 static fields in a non static context. Call static_ref_err to
17245 report error in various places.
17246 (java_complete_tree): Do not fold initialized static fields when
17247 doing xrefs.
17248 (java_complete_lhs): Likewise.
17249
17250 1999-04-29 Anthony Green <green@cygnus.com>
17251
17252 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
17253 create internal labels.
17254 (lookup_label): Ditto.
17255
17256 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
17257
17258 * class.c (layout_class_method): Generate <clinit>'s rtl for
17259 interfaces.
17260 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
17261 for interfaces' <clinit>.
17262 * expr.c (lookup_field): Search for fields in interfaces.
17263 (expand_invoke): Fixed indentation.
17264 (expand_java_field_op): Likewise. Use IS_CLINIT.
17265 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
17266 (IS_CLINIT): New macro.
17267 * parse.y (type_declaration:): Call maybe_generate_clinit after an
17268 interface was parsed.
17269 (maybe_generate_clinit): Don't generate if the current class is an
17270 interface with only fields of primitive types.
17271 (reset_method_name): Use IS_CLINIT.
17272 (java_complete_expand_method): Expand <clinit> when it exists for
17273 interfaces. Use IS_CLINIT.
17274 (resolve_expression_name): Use DECL_CONTEXT instead of
17275 current_class to build static field references.
17276 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
17277 ARRAY_REF when doing xreferencing.
17278 (check_final_assignment): Fixed typo in leading comment. Use
17279 IS_CLINIT.
17280 (patch_array_ref): Don't fully expand array references when
17281 xreferencing.
17282 (patch_return): Use IS_CLINIT.
17283 (patch_throw_statement): Likewise.
17284
17285 1999-04-22 Tom Tromey <tromey@cygnus.com>
17286
17287 * Make-lang.in (JAVA_SRCS): Added check-init.c.
17288
17289 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
17290
17291 * decl.c (predef_filenames, predef_filenames_size): New globals
17292 (init_decl_processing): predef_filenames and predef_filenames_size
17293 initialized.
17294 * java-tree.h (predef_filenames, predef_filenames_size): Declared
17295 extern.
17296 * jcf-parse.c (predefined_filename_p): New function.
17297 (yyparse): Check that files on the command line are specified only
17298 once and issue a warning otherwise.
17299 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
17300 * parse.y (source_end_java_method): Nullify NOP method bodies, to
17301 avoid a gcc warning with -W -Wall turned on.
17302 (java_expand_classes): Abort if errors were encountered.
17303 (java_complete_lhs): If the cross reference flag is set, wrap
17304 field DECL node around a WFL when resolving expression name.
17305
17306 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17307
17308 * lang.c (lang_decode_option): Fixed returned value when parsing
17309 `-fxref=...' and `-Wall'.
17310 * parse.y (source_end_java_method): Do not generate code when
17311 flag_emit_xref is set.
17312 (resolve_expression_name): Do not build static field access when
17313 flag_emit_xref is set.
17314 (resolve_field_access): No special treatment on `length' when
17315 flag_emit_xref is set. Do not build qualified static field access
17316 when flag_emit_xref is set.
17317 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
17318 when flag_emit_xref is set.
17319 (patch_assignment): Do not generate array store runtime check when
17320 flag_emit_xref is set.
17321 * xref.c (xref_flag_value): Fixed function declaration
17322 indentation.
17323 (xset_set_data): New function.
17324 * xref.h (xref_set_data): Added prototype for new function.
17325 (typedef struct xref_flag_table): New field data.
17326 (XREF_GET_DATA): New macro.
17327
17328 1999-04-19 Tom Tromey <tromey@cygnus.com>
17329
17330 * xref.h (enum): Removed trailing comma.
17331
17332 * parse.y (resolve_qualified_expression_name): Added missing
17333 `break'.
17334
17335 1999-04-15 Anthony Green <green@cygnus.com>
17336
17337 * gjavah.c: New prototypes for java_float_finite and
17338 java_double_finite.
17339
17340 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17341
17342 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
17343 references.
17344
17345 1999-04-06 Jeffrey A Law (law@cygnus.com)
17346
17347 * Makefile.in (TREE_H): Add tree-check.h.
17348 (RTL_H): Add genrtl.h.
17349
17350 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
17351
17352 * parse.y (patch_assignment): Added ArrayStoreException runtime
17353 check.
17354
17355 1999-04-06 Per Bothner <bothner@cygnus.com>
17356
17357 * expr.c (pop_type_0): New function.
17358 (pop_type): Use pop_type_0.
17359 * java-tree.h (pop_type_0): New declaration.
17360 * verify.c (verify_jvm_instructions): Check return instructions.
17361
17362 * parse.y (patch_binop): Don't fold if non-constant and emiting
17363 class files.
17364
17365 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17366
17367 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
17368
17369 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
17370 (main_jcf): Don't define.
17371 (process_file): Don't set `main_jcf'.
17372
17373 * java-tree.h (main_jcf): Don't declare.
17374
17375 * jcf-parse.c (main_jcf): Add static definition.
17376
17377 * lang.c (main_jcf): Don't define.
17378
17379 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17380
17381 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
17382
17383 * decl.c (copy_lang_decl): Likewise for `bcopy'.
17384
17385 * jcf-depend.c: Include "config.h", not <config.h>.
17386
17387 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
17388 `bcopy' to PTR.
17389
17390 * jcf-path.c: Include "config.h", not <config.h>.
17391
17392 * lex.c: Don't include various system header files.
17393 (java_init_lex): Cast the argument of `bzero' to PTR
17394
17395 * parse-scan.y (java_push_parser_context): Likewise.
17396
17397 * parse.y (java_push_parser_context): Likewise.
17398 (patch_bc_statement): Match format specifier to variable argument.
17399
17400 * xref.c: Don't include <stdio.h>.
17401
17402 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
17403
17404 * parse.y (struct parser_ctxt *ctxp): Now global.
17405 (declare_local_variables): Use WFL compound value for the
17406 declaration source line value, when doing cross-referencing.
17407
17408 1999-03-31 Tom Tromey <tromey@cygnus.com>
17409
17410 * gjavah.c (print_field_info): Allow constants of other types.
17411 (print_include): Generate include when new name is proper prefix
17412 of already printed name.
17413 (add_namelet): Likewise.
17414 (cxx_keyword_subst): New function.
17415 (print_method_info): Use it.
17416 (print_field_name): New function.
17417 (get_field_name): New function.
17418 (print_field_info): Use get_field_name and print_field_name.
17419
17420 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17421
17422 * Makefile.in (keyword.h): Generate using gperf language 'C', not
17423 'KR-C', so gperf uses the `const' keyword on strings.
17424
17425 * keyword.gperf (java_keyword): Const-ify a char*.
17426
17427 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
17428
17429 * parse.y (patch_bc_statement): Fixed identation and a bogus
17430 `printf' format.
17431
17432 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
17433
17434 * parse.y (patch_assignment): Allow static variables in other
17435 classes to be assigned.
17436
17437 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17438
17439 * class.c (maybe_add_interface): Remove unused variable
17440 `interface_binfo'.
17441 (make_class_data): Use = for assignment, not ==. Likewise.
17442 (emit_register_classes): Remove unused variable `decl'.
17443
17444 * lex.c: Fix comment so as not to contain an embedded `/*'.
17445
17446 * verify.c (verify_jvm_instructions): Remove unused variable
17447 `self_type'.
17448
17449 1999-03-27 Per Bothner <bothner@cygnus.com>
17450
17451 * parse.y (complete_loop_body): Rename to finish_loop_body.
17452 (complete_labeled_statement): Rename to finish_labeled_statement.
17453 (complete_for_loop): Rename to finish_for_loop.
17454 (complete_method_declaration): Rename to finish_method_declaration.
17455
17456 * java-tree.h (continue_identifier_node): New global node.
17457 * decl.c: Define and initialize continue_identifier_node.
17458 * parse.y (generate_labeled_block): Remove - no longer needed.
17459 (build_loop_body): Use continue_identifier_node for continue block.
17460 (finish_labeled_statement): Also do pop_labeled_block actions.
17461 (java_complete_lhs): POP_LOOP even if error.
17462 (build_labeled_block): Special handling for continue_identifier_node.
17463 (patch_loop_statement): Re-organize.
17464 (patch_bc_statement): Re-write.
17465
17466 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17467
17468 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
17469 using a WFL compound value.
17470 * parse.y (xref.h): Include.
17471 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
17472 WFL compound value.
17473 (register_fields): Set WFL compound value to lineno if doing
17474 xrefs.
17475 (java_complete_expand_method): Call expand_xref if flag_emit_xref
17476 is set.
17477 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
17478 * xref.h (expand_xref): Prototype renamed from xref_generate.
17479
17480 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17481
17482 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
17483 (GET_CURRENT_BLOCK): New macro.
17484 * parse.y (current_static_block): New global variable.
17485 (method_body:): Define action.
17486 (complete_method_declaration): Set current_function_decl to NULL
17487 when work on the current method is done.
17488 (declare_local_variables): Use GET_CURRENT_BLOCK.
17489 (java_method_add_stmt): Likewise.
17490 (java_complete_expand_method): Disable the use of `this' when
17491 expanding <clinit>.
17492 (enter_a_block): If no current method exist, use
17493 current_static_block to link static initializer blocks.
17494 (exit_block): Rewritten to use current_static_block when no current
17495 method decl exists.
17496 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
17497 (patch_return): Forbid the use of `return' in static initializers.
17498 (patch_throw_statement): Fixed indentation. Issue specific error
17499 for uncaught thrown checked exception in static initializer
17500 blocks. Removed FIXME.
17501
17502 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
17503
17504 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
17505 Link gcj from gcc.o.
17506
17507 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
17508
17509 * parse.y (find_applicable_accessible_methods_list): When dealing
17510 with interface: ensure that a given interface or java.lang.Object
17511 are searched only once.
17512
17513 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17514
17515 * gjavah.c (print_c_decl): Remove unused argument `flags'.
17516
17517 * jcf-dump.c (print_access_flags): Add braces around if-else.
17518
17519 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
17520 COMBINE_INPUTS.
17521
17522 * lex.c (build_wfl_node): Add static prototype.
17523
17524 * lex.h (build_wfl_node): Remove static prototype.
17525
17526 * parse.y: Include lex.c early enough to declare everything needed.
17527 Ensure calls to `build_wfl_node' pass the proper arguments.
17528 (create_class): Remove unused variable `super_decl'.
17529 (get_printable_method_name): Initialize variable `name'.
17530
17531 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17532
17533 * Changelog: Fixed 1999-03-22 typos.
17534 * lang.c (lang_decode_option): Fixed typo in error string in the
17535 XARG section.
17536
17537 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17538
17539 * Makefile.in (JAVA_OBJS): Added entry xref.o.
17540 (xref.o): New rule.
17541 * java-tree.h (flag_emit_xref): Declared extern.
17542 * lang.c (xref.h): Included.
17543 (flag_emit_xref): New global variable.
17544 (lang_decode_option): Added support for -fxref.
17545 * xref.c: Created.
17546 * xref.h: Likewise.
17547
17548 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
17549
17550 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
17551 linked with.
17552
17553 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17554
17555 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
17556 $(srcdir)/../system.h and $(JAVA_TREE_H).
17557 (jcf-io.o): Depend on $(JAVA_TREE_H).
17558 (mangle.o): Likewise.
17559
17560 * check-init.c (check_cond_init): Add static prototype.
17561
17562 * class.c (build_java_method_type, hashUtf8String,
17563 make_field_value, get_dispatch_vector, get_dispatch_table,
17564 append_gpp_mangled_type, mangle_static_field): Likewise.
17565 (strLengthUtf8): Hide unused definition.
17566 (hashUtf8String): Const-ify.
17567 (make_field_value): Un-ANSI-fy.
17568
17569 * constants.c: Move inclusion of jcf.h above java-tree.h.
17570 (set_constant_entry, find_class_or_string_constant,
17571 find_name_and_type_constant, get_tag_node,
17572 build_constant_data_ref): Add static prototype.
17573
17574 * decl.c (push_jvm_slot, builtin_function,
17575 lookup_name_current_level): Likewise.
17576 (builtin_function): Const-ify.
17577
17578 * except.c (expand_start_java_handler, expand_end_java_handler):
17579 Add static prototype.
17580
17581 * expr.c (flush_quick_stack, push_value, pop_value,
17582 java_stack_swap, java_stack_dup, build_java_athrow,
17583 build_java_jsr, build_java_ret, expand_java_multianewarray,
17584 expand_java_arraystore, expand_java_arrayload,
17585 expand_java_array_length, build_java_monitor, expand_java_pushc,
17586 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
17587 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
17588 expand_compare, expand_test, expand_cond, expand_java_goto,
17589 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
17590 expand_java_field_op, java_push_constant_from_pool): Likewise.
17591
17592 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
17593 (build_java_arraynull_check): Mark parameters `node' and `type'
17594 with ATTRIBUTE_UNUSED.
17595 (note_label): Likewise for parameter `current_pc'.
17596 (expand_java_call, expand_java_ret): Hide unused definition.
17597
17598 * java-tree.h (make_class, build_constants_constructor,
17599 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
17600 init_outgoing_cpool, register_class, emit_register_classes,
17601 java_layout_seen_class_methods): Prototype.
17602 (unicode_mangling_length): Const-ify.
17603 (append_gpp_mangled_name, append_gpp_mangled_classtype,
17604 emit_unicode_mangled_name, format_int, format_uint,
17605 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
17606 jcf_print_utf8_replace, open_class): Prototype.
17607
17608 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
17609 <stdio.h>. Include tree.h/java-tree.h.
17610 (utf8_equal_string usage, process_class): Add static prototype.
17611 (open_class): Don't prototype this here.
17612 (utf8_equal_string): Match arguments to format specifiers.
17613 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
17614 TABLE_SWITCH, disassemble_method): Likewise.
17615
17616 * jcf-io.c: Include tree.h/java-tree.h.
17617 (open_class, find_classfile, jcf_print_utf8,
17618 jcf_print_utf8_replace): Const-ify.
17619
17620 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
17621 parse_class_file): Add static prototype.
17622 (find_in_current_zip): Match definition to existing static
17623 prototype.
17624
17625 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
17626 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
17627 finish_jcf_block, define_jcf_label, get_jcf_label_here,
17628 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
17629 write_chunks, adjust_typed_op, generate_bytecode_conditional,
17630 generate_bytecode_return, perform_relocations, init_jcf_state,
17631 init_jcf_method, release_jcf_state, generate_classfile):
17632 Add static prototype.
17633 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
17634 (make_class_file_name): Const-ify.
17635
17636 * jcf.h (find_classfile): Const-ify.
17637
17638 * jv-scan.c (reset_report): Remove prototype.
17639
17640 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
17641 (error): Rewrite to allow varargs.
17642
17643 * lang.c (lang_f_options): Const-ify.
17644
17645 * lex.c (java_parse_escape_sequence): Add static prototype.
17646 (java_allocate_new_line): Match definition to existing static
17647 prototype.
17648
17649 * mangle.c Include tree.h/java-tree.h.
17650 (unicode_mangling_length, emit_unicode_mangled_name,
17651 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
17652
17653 * parse.h (jdep_code): Remove trailing comma in enumeration.
17654 (java_get_line_col): Move prototype outside of !JC1_LITE test.
17655 (reset_report): Add prototype.
17656
17657 * verify.c (push_pending_label, merge_types): Add static
17658 prototypes.
17659
17660 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
17661
17662 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17663
17664 * parse.y (find_applicable_accessible_methods_list): Extend the
17665 search to superinterfaces when relevant.
17666 (search_applicable_methods_list): New function.
17667
17668 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
17669
17670 * class.c (unmangle_classname): Implemented stricter testing
17671 before setting the QUALIFIED_P flag on an identifier.
17672
17673 1999-03-16 Per Bothner <bothner@cygnus.com>
17674
17675 * parse.y (java_complete_lhs): Call force_evaluation_order
17676 after patch_newarray.
17677 (patch_binop): Don't call fold if there are side effects.
17678
17679 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
17680
17681 * parse.y (java_stabilize_reference): Use save_expr instead of
17682 building a SAVE_EXPR node.
17683 (java_complete_lhs): Patch the resulting string of the `+='
17684 operator (if necessary) and complete the RHS after having built
17685 the cast.
17686
17687 1999-03-15 Per Bothner <bothner@cygnus.com>
17688
17689 * class.c (make_class): Don't set CLASS_P here (because
17690 this function is also called by build_java_array_type).
17691 (push_class): Set CLASS_P here instead.
17692 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
17693
17694 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
17695 context. If the context is class, perfer "super" over "synchronized".
17696 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
17697
17698 * parse.y (create_class): Don't call parser_check_super here;
17699 it is not robust. Always wait until later.
17700
17701 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
17702 match what JDK 1.2 does), but don't set ACC_PUBLIC.
17703
17704 1999-03-13 Per Bothner <bothner@cygnus.com>
17705
17706 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
17707 * lex.h (UNGETC): Change misleading macro.
17708
17709 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17710
17711 * parse.y (java_stabilize_reference): Return NODE when patching a
17712 COMPOUND_EXPR.
17713 (java_complete_lhs): Put parenthesis around truth values.
17714
17715 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17716
17717 * class.c (layout_class_method): Don't make rtl for interface
17718 methods.
17719 * parse.h (GET_TYPE_NAME): New macro.
17720 * parse.y (if_then_statement:): Fixed indentation.
17721 (if_then_else_statement:): Likewise.
17722 (for_statement:): Fixed spacing.
17723 (try_statement:): Fixed indentation.
17724 (create_interface): Don't force interfaces to be abstract.
17725 (method_header): Abstract methods are OK in interfaces.
17726 (declare_local_variables): Fixed typo in comment.
17727 (java_complete_expand_method): Fixed indentation.
17728 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
17729 non accessible fields.
17730 (java_stabilize_reference): New function.
17731 (java_complete_lhs): Fixed indentation. Use
17732 java_stabilize_reference in compound assignment. Insert the
17733 cast. If not processing `+' fix string constants before processing
17734 binop.
17735
17736 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17737
17738 * constants.c (find_class_or_string_constant): Cast variable `j'
17739 to a `jword' when comparing against one.
17740
17741 * expr.c (java_lang_expand_expr): Remove unused variables
17742 `has_finally_p' and `op0'.
17743
17744 * gjavah.c (print_field_info): Cast a value to jint when comparing
17745 against one. Likewise for a jlong.
17746 (add_namelet): Likewise cast a `sizeof' to an int when comparing
17747 against a signed quantity.
17748
17749 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
17750 (print_signature): Don't needlessly dereference variable `str'
17751
17752 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
17753 `max_locals' with ATTRIBUTE_UNUSED.
17754 (jcf_parse_class): Likewise for variable `index'.
17755
17756 * parse.h (reverse_jdep_list): Remove static prototype.
17757
17758 * parse.y (build_jump_to_finally): Remove prototype and definition.
17759 (reverse_jdep_list): Add static prototype.
17760
17761 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
17762 `assignment' and `expr_decl'.
17763
17764 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
17765
17766 1999-03-12 Andrew Haley <aph@cygnus.com>
17767
17768 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
17769 we'll need a directory separator and a null character.
17770
17771 1999-03-10 Per Bothner <bothner@cygnus.com>
17772
17773 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
17774
17775 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
17776
17777 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17778 interfaces.
17779
17780 1999-03-05 Per Bothner <bothner@cygnus.com>
17781
17782 * lex.c (java_parse_end_comment): Take extra parameter (next char).
17783
17784 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
17785
17786 * class.c (layout_class_method): A static method in a base class
17787 is never overridden, so treat it like it doesn't exist.
17788 However, do complain about private non-static method overriding
17789 public static method.
17790
17791 * parse.y: Don't set unused INITIALIZED_P flag.
17792 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
17793
17794 * parse.y (find_expr_with_wfl): Optimize tail-calls.
17795 (build_array_from_name): Re-order &index[string] to &string[index].
17796
17797 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
17798 error_mark (it might catch more errors, but it is more likely to lose).
17799
17800 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17801
17802 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17803 (parse-scan.o): Depend on toplev.h.
17804
17805 * class.c (make_method_value): Add prototype. Make it static.
17806 Remove unused second argument, caller changed.
17807
17808 * expr.c (java_lang_expand_expr): Remove unused variable
17809 `return_label'.
17810
17811 * java-tree.h: Don't prototype find_in_current_zip.
17812 Add prototypes for verify_constant_pool, start_java_method,
17813 end_java_method, give_name_to_locals, expand_byte_code,
17814 open_in_zip, set_constant_value, find_constant1, find_constant2,
17815 find_utf8_constant, find_string_constant, find_class_constant,
17816 find_fieldref_index, find_methodref_index, write_constant_pool,
17817 count_constant_pool_bytes and encode_newarray_type.
17818
17819 * jcf-dump.c: Remove unused variable `LONG_temp'.
17820
17821 * jcf-parse.c: Include parse.h.
17822 (jcf_parse_source): Remove unused parameter, all callers changed.
17823 (jcf_figure_file_type): Add static prototype.
17824 (find_in_current_zip): Likewise. Also remove unused parameter,
17825 all callers changed.
17826 (read_class): Initialize variable `saved_pos'.
17827
17828 * jcf-reader.c (jcf_parse_preamble): Mark variables
17829 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17830
17831 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17832 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17833 (java_parse_doc_section): Initialize variable `seen_star'.
17834 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17835 (java_lex_error): Mark parameters `msg' and `forward' with
17836 ATTRIBUTE_UNUSED.
17837 (java_get_line_col): Mark parameters `filename' and `line' with
17838 ATTRIBUTE_UNUSED.
17839
17840 * parse-scan.y: Include toplev.h.
17841 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17842
17843 * parse.h: use `struct JCF', not plain `JCF'.
17844 (java_parser_context_save_global, java_expand_classes
17845 java_parser_context_restore_global, java_parse): Add prototypes.
17846
17847 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17848 `node'.
17849
17850 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
17851
17852 * check-init.c (check_init): COPYN takes word count, not bit count.
17853
17854 1999-02-26 Per Bothner <bothner@cygnus.com>
17855
17856 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
17857 explicit build_decl. (Avoids crash in reload when optimizing.)
17858
17859 1999-02-25 Per Bothner <bothner@cygnus.com>
17860
17861 * decl.c (complete_start_java_method): Handle synchronized method
17862 even when compiling from bytecode.
17863
17864 1999-02-26 Tom Tromey <tromey@cygnus.com>
17865
17866 * gjavah.c (add_class_decl): Only generate `#include' if outer
17867 class is not the name of the class we are processing. Correctly
17868 append `.h' in #include.
17869 (process_file): Clean up newlines around generated `#include's.
17870 (decode_signature_piece): Correctly handle inner classes.
17871 (struct include): New structure.
17872 (all_includes): New global.
17873 (print_include): New function.
17874 (add_class_decl): Use it.
17875 (process_file): Likewise.
17876 (add_class_decl): Generate include for java-array.h if array
17877 seen.
17878 (process_file): Don't generate java-array.h include.
17879
17880 * gjavah.c (add_namelet): Check for standard package names here.
17881 (add_class_decl): Don't check for standard package names here.
17882
17883 1999-02-25 Tom Tromey <tromey@cygnus.com>
17884
17885 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17886 When reading a zip file, only use strncmp if both strings are
17887 bigger than the buffer length. Initialize `k' when looping
17888 through zip file.
17889
17890 1999-02-24 Tom Tromey <tromey@cygnus.com>
17891
17892 * gjavah.c (struct namelet): New structure.
17893 (add_namelet): New function.
17894 (print_namelet): New function.
17895 (print_class_decls): Use add_namelet and print_namelet to generate
17896 namespaces and not classes.
17897 (method_printed): New global.
17898 (HANDLE_END_METHOD): Examine method_printed.
17899 (print_method_info): Set method_printed when required. Print
17900 error if function to be ignored is marked virtual. Handle $finit$
17901 method.
17902 (METHOD_IS_FINAL): New macro.
17903 (print_field_info): Use it.
17904 (HANDLE_METHOD): Clear method_printed.
17905 (method_pass): New global.
17906 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17907 (process_file): Do two passes over both fields and methods.
17908 (HANDLE_METHOD): Examine method_pass.
17909 (root): New global.
17910 (add_class_decl): New function.
17911 (print_class_decls): Don't scan over entire constant pool.
17912
17913 1999-02-23 Tom Tromey <tromey@cygnus.com>
17914
17915 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17916 disable linking in that case.
17917
17918 1999-02-20 Tom Tromey <tromey@cygnus.com>
17919
17920 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17921 not 0x1f.
17922
17923 1999-02-21 Per Bothner <bothner@cygnus.com>
17924
17925 * decl.c (build_result_decl), java-tree.h: New method.
17926 (complete_start_java_method): Handle synchronized methods.
17927 Don't build DECL_RESULT here. (Ordering dependency problem.)
17928 (start_java_method): Call build_result_decl here instead ...
17929 * parse.y (java_complete_expand_method): ... and here.
17930 (expand_start_java_method): Don't call complete_start_java_method here.
17931 (java_complete_expand_method): Call it here instead.
17932 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
17933 * java-tree.h: ... here.
17934
17935 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
17936 * parse.y (java_complete_lhs): Don't call force_evaluation_order
17937 for ARRAY_REF - it doesn't work when array bounds are checked.
17938 (patch_array_ref): Handle it here instead.
17939
17940 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
17941
17942 1999-02-19 Per Bothner <bothner@cygnus.com>
17943
17944 Force left-to-right evaluation of binary operations etc.
17945 * expr.c (force_evaluation_order), java-tree.h: New function.
17946 * parse.y (java_complete_lhs): Pass binary operations, procedure
17947 calls, and ARRAY_REFs to force_evaluation_order.
17948 (various): Set TREE_SIDE_EFFECTS more carefully.
17949
17950 Tolerate random (non-UTF8) encoding in comments without complaining.
17951 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
17952 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
17953
17954 * parse.y (resolve_qualified_expression_name): Handle error_mark.
17955 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
17956
17957 * parse.y (java_complete_lhs): Ignore an empty statement in a
17958 COMPOUND_EXPR. Don't complain about empty statement after return.
17959
17960 1999-02-19 Per Bothner <bothner@cygnus.com>
17961
17962 * parse.y (obtain_incomplete_type): Don't wrap unknown types
17963 in TREE_LIST - just chain the POINTER_TYPEs together.
17964 (resolve_class): If type already resolved, return decl.
17965 After resolving, update TREE_TYPE(class_type), and name (if array).
17966 * parse.h (do_resolve_class), parse.y: Make non-static.
17967 * class.c (maybe_layout_super_class): Take this_class argument.
17968 Do do_resolve_class if necessary.
17969 (layout_class, layout_class_methods): Adjust calls appropriately.
17970 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17971 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
17972 * typeck.c (build_java_array_type): Don't call layout_class.
17973
17974 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17975
17976 * parse.y (check_pkg_class_access): Allow private class access
17977 within the same package.
17978 (strip_out_static_field_access_decl): New function.
17979 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17980 operator argument before testing its nature.
17981
17982 1999-02-03 Per Bothner <bothner@cygnus.com>
17983
17984 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
17985 (TRY_EXPR): Simplify - it no longer has a finally clause.
17986 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
17987 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17988 * expr.c (java_lang_expand_expr): Likewise.
17989 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
17990 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
17991 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
17992 (build_try_statement): Remove finally parameter and handling.
17993 (build_try_finally_statement): New function.
17994 (patch_try_statement): No longer need to support finally clause.
17995 (try_statement): Update grammar action rules.
17996 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
17997 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17998
17999 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
18000
18001 * jcf-parse.c (get_constant): Add braces around computation of 'd'
18002 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
18003
18004 1999-02-17 Andrew Haley <aph@cygnus.com>
18005
18006 * class.c (build_utf8_ref): Back out broken patch which was
18007 intended to to output signatures using '.' as a separator.
18008
18009 * class.c (make_class_data): Output signatures using '.' as a
18010 separator, rather than '/'.
18011 (mangled_classname): Likewise.
18012 (make_field_value): Likewise.
18013 (make_method_value): Likewise.
18014 * constants.c (alloc_class_constant): Likewise.
18015 * expr.c (build_invokeinterface): Likewise.
18016
18017 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
18018
18019 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
18020 of an ancient workaround.
18021
18022 1999-02-10 Jeffrey A Law (law@cygnus.com)
18023
18024 * jvspec.c (xmalloc): Kill the prototype. It does not belong
18025 here anymore.
18026
18027 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18028
18029 * lex.c (yylex): Encode \0 as UTF8.
18030
18031 1999-02-10 Tom Tromey <tromey@cygnus.com>
18032
18033 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
18034 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
18035 (libgcj_zip): Renamed.
18036 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
18037 LIBJAVA_ZIP_FILE.
18038 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
18039
18040 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
18041 (GC_NAME): Renamed -lgc to -lgcjgc.
18042
18043 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
18044
18045 * lex.c (java_lang_cloneable): Initialize.
18046 * parse.y (java_lang_cloneable): New static variable.
18047 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
18048 doing one more qualification round.
18049 (valid_ref_assignconv_cast_p): Reject null source or
18050 destination. Allow an array to be cast into java.lang.Cloneable.
18051 (patch_cast): Swapped two first arguments to first call to
18052 valid_ref_assignconv_cast_p.
18053
18054 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
18055
18056 * parse.h: DECL_P renamed JDECL_P.
18057 * parse.y: DECL_P replaced by JDECL_P.
18058 (build_array_from_name): Always use pointer's type.
18059 (patch_bc_statement): Extra code to search continue target in a
18060 for loop. Fixed comments. Continue target is current loop when
18061 unlabeled.
18062
18063 1999-02-05 Andrew Haley <aph@cygnus.com>
18064
18065 * class.c (make_class_data): The superclass of an interface should
18066 be null, not class Object.
18067
18068 * lex.c (java_lex): Sign extend hex literals.
18069
18070 1999-02-04 Andrew Haley <aph@cygnus.com>
18071
18072 * class.c (build_utf8_ref): Output signatures using '.' as a
18073 separator, rather than '/'.
18074 (make_class_data): Likewise.
18075
18076 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
18077
18078 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
18079 mkstemp.o. Get them from libiberty now.
18080
18081 1999-02-02 Jeffrey A Law (law@cygnus.com)
18082
18083 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
18084
18085 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18086
18087 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
18088 from libiberty.h
18089
18090 1999-02-02 Per Bothner <bothner@cygnus.com>
18091
18092 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
18093 * jcf-write.c (generate_bytecode_return): New function.
18094 (generate_bytecode_insns): Use it, for RETURN_EXPR.
18095
18096 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
18097 generate special [fd]const_[01] instructions.
18098
18099 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
18100
18101 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
18102 handling OPCODE_lookupswitch or OPCODE_tableswitch.
18103
18104 1999-02-01 Per Bothner <bothner@cygnus.com>
18105
18106 * parse.y (patch_method_invocation): Handle calling static methods,
18107 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
18108
18109 * parse.y (java_complete_lhs): Don't complain about unreachable
18110 exit condition in a do-while statement.
18111
18112 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
18113
18114 * lex.c (java_read_char): Fixed utf8 decoding.
18115 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
18116 range.
18117 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
18118 comments. Local variable `all_primitive' is gone. Broadened
18119 acceptance of `0' to floating point targets. `long' can now be
18120 widened to `double' or `float'.
18121 (valid_method_invocation_conversion_p): Added leading
18122 comment. Fixed tabulation.
18123 (build_string_concatenation): Optimize out left or right empty
18124 string constants.
18125
18126 1999-01-28 Per Bothner <bothner@cygnus.com>
18127
18128 * jcf-write.c (localvar_alloc): Only emit entry for
18129 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
18130 (generate_bytecode_insns): Only call put_linenumber if
18131 debug_info_level > DINFO_LEVEL_NONE.
18132 * jvspec.c (lang_specific_driver): If no -O* or -g* option
18133 is specified, add -g1 (for compatibility wih javac).
18134
18135 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
18136
18137 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
18138 gjavah.o, check-init.o, jv-scan.o
18139
18140 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18141
18142 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
18143
18144 * gjavah.c: Include config.h and system.h.
18145
18146 * javaop.h (inline): Don't define, its handled by system.h.
18147 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
18148 from `inline' to `static inline'.
18149
18150 * jcf.h (inline): Don't define, its handled by system.h.
18151
18152 * lex.c (inline): Likewise.
18153
18154 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
18155
18156 * lang-specs.h: Map -Qn to -fno-ident.
18157
18158 1999-01-29 Richard Henderson <rth@cygnus.com>
18159
18160 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
18161
18162 1999-01-29 Tom Tromey <tromey@cygnus.com>
18163
18164 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
18165 then cast it to Object before calling `append' method.
18166
18167 1999-01-28 Per Bothner <bothner@cygnus.com>
18168
18169 * check-init.c (check_bool2_init, check_bool_init, check_init):
18170 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
18171 * jcf-write.c (generate_bytecode_insns): Likewise.
18172
18173 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
18174
18175 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
18176 * parse.y (patch_cast): Allow a boolean to be cast into a
18177 boolean.
18178
18179 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
18180
18181 * parse.y: (class_declaration:): Fixed indentation.
18182 (class_member_declaration:): Extra `;' after field declaration now
18183 accepted.
18184 (interface_declaration:): Removed debug messages in error reports.
18185 (patch_binop): Nodes created and returned inherit the orignal
18186 node's COMPOUND_ASSIGN_P flag value.
18187 (patch_cast): Fix cast from char to floating point.
18188
18189 1999-01-25 Andrew Haley <aph@cygnus.com>
18190
18191 * except.c, java-except.h (expand_resume_after_catch): new
18192 function.
18193 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
18194 to branch back to main flow of control after a catch block.
18195
18196 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18197
18198 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
18199 $(srcdir)/../system.h.
18200 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
18201 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
18202 (jcf-write.o): Likewise.
18203 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18204 (mangle.o): Depend on $(srcdir)/../toplev.h.
18205 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18206 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
18207
18208 * class.c: Include output.h and parse.h.
18209 (mangled_classname): Add the `const' keyword to a char*.
18210 (find_named_method): Hide unused function definition.
18211 (build_utf8_ref): Change type of variable `c' to unsigned char.
18212 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
18213 (build_class_ref): Add the `const' keyword to a char*.
18214 (layout_class_method): Remove unused variable `buf'.
18215
18216 * decl.c (find_local_variable): Remove unused variable `rtl'.
18217 (pushdecl): Likewise for variables `different_binding_level' and
18218 `oldglobal'.
18219 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
18220 (maybe_build_cleanup): Likewise for parameter `decl'.
18221
18222 * except.c (expand_start_java_handler): Mark parameter `range'
18223 with ATTRIBUTE_UNUSED.
18224
18225 * expr.c: Include except.h.
18226 (pop_type): Remove unused variable `i'.
18227 (pop_value): Likewise for variables `n_words' and `i'.
18228 (expand_java_arrayload): Likewise for variable `convert'.
18229 (java_lang_expand_expr): Likewise for variables `op0', `type',
18230 `mode', `unsignedp', `node' and `elements'.
18231 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
18232 `eh_ranges'.
18233 (process_jvm_instruction): Add a `const' qualifier to a char*.
18234
18235 * gjavah.c (output_directory): Add the `const' keyword to a char*.
18236 (temp_directory): Likewise.
18237 (print_c_decl): Likewise.
18238 (print_method_info): Likewise.
18239 (decode_signature_piece): Likewise.
18240 (print_mangled_classname): Likewise.
18241
18242 * java-except.h: Provide prototypes for maybe_start_try,
18243 maybe_end_try and add_handler.
18244
18245 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
18246 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
18247 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
18248 init_expr_processing, push_super_field, init_class_processing,
18249 can_widen_reference_to, class_depth, verify_jvm_instructions,
18250 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
18251 set_local_type, merge_type_state, push_type, load_type_state,
18252 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
18253 emit_unicode_mangled_name): Add prototypes.
18254
18255 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
18256 (print_signature_type): Use ISDIGIT, not isdigit.
18257 (print_signature): Remove unused variable `j'.
18258
18259 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
18260 int when comparing against one.
18261
18262 * jcf-parse.c: Include toplev.h.
18263
18264 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
18265 (localvar_free): Remove unused variable `i'.
18266 (generate_bytecode_conditional): Likewise for variable `kind'.
18267
18268 * jv-scan.c: Include config.h and system.h. Remove redundant
18269 OS header and gansidecl.h includes.
18270 (warning): Add the `const' keyword to a char*. Also add
18271 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
18272 __STDC__, when determining whether to use ANSI-isms.
18273 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
18274 (xmalloc): Don't redundantly prototype here.
18275 (main): Remove unused parameter `envp'. Also fix the arguments
18276 passed to function `fatal' to match the format specifier.
18277
18278 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
18279
18280 * mangle.c: Include toplev.h.
18281 (emit_unicode_mangled_name): Declare parameter `len'.
18282
18283 * parse.y (parse_warning_context): Add the `const' keyword to a
18284 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
18285 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
18286 (issue_warning_error_from_context): Add the `const' keyword to
18287 a char*.
18288 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
18289 not `__STDC__' for whether to use ANSI-isms.
18290
18291 * typeck.c (incomplete_type_error): Mark parameters `value' and
18292 `type' with ATTRIBUTE_UNUSED.
18293 (parse_signature_type): Use ISDIGIT, not isdigit.
18294
18295 * verify.c (check_pending_block): Add the `const' keyword to a char*.
18296 (verify_jvm_instructions): Likewise. Remove unused variables
18297 `field_name' and `default_val'.
18298
18299 * zextract.c: Include config.h and system.h. Remove redundant
18300 OS header includes.
18301
18302 * zipfile.h: Prototype `read_zip_archive'.
18303
18304 1999-01-21 Andrew Haley <aph@cygnus.com>
18305
18306 * typeck.c (convert): Allow conversions to void type: some
18307 optimizations in gcc do this.
18308
18309 1999-01-21 Andrew Haley <aph@cygnus.com>
18310
18311 * typeck.c (convert_ieee_real_to_integer): New function.
18312 (convert): When not using fast-math and using hardware fp, convert
18313 an IEEE NaN to zero.
18314
18315 1999-01-18 Andrew Haley <aph@cygnus.com>
18316
18317 * parse.y (patch_binop): Do a type conversion from signed to
18318 unsigned and then back to signed when a ">>>" is found.
18319
18320 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
18321
18322 * java-tree.h: (check_for_initialization): Added prototype.
18323 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
18324 * parse.y (do_resolve_class): Removed unused locals.
18325 (read_import_dir): Likewise.
18326 (resolve_qualified_expression_name): Array creation
18327 expressions are valid primary expressions.
18328 (qualify_ambiguous_name): Likewise.
18329 (patch_synchronized_statement): Removed unused local.
18330
18331 1999-01-17 Jeffrey A Law (law@cygnus.com)
18332
18333 * Makefile.in (zextract.o): Add dependencies.
18334
18335 * Makefile.in: Do not put ^Ls at the start of a line.
18336
18337 1999-01-15 Per Bothner <bothner@cygnus.com>
18338
18339 * expr.c (process_jvm_instruction): Coerce to correct Throwable
18340 sub-type the result of the call that gets the exception value.
18341
18342 * parse.y (java_complete_expand_methods): If flags_syntax_only,
18343 don't call finish_class.
18344
18345 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
18346 clear found before continuing.
18347
18348 * verify.c (verify_jvm_instructions): On an array load, allow
18349 and handle top of stack to be TYPE_NULL.
18350
18351 * gjavah.c (generate_access): Translate Java package private or
18352 protected access to C++ public, but with a comment.
18353
18354 1999-01-13 Andrew Haley <aph@cygnus.com>
18355
18356 * expr.c (generate_name): Name prefix changed to avoid clashes
18357 with assembler temp labels.
18358
18359 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
18360 MODIFY_EXPR. Without this, code for the assignment may not be
18361 generated at all and the synchronized statement will read an
18362 uninitialized variable.
18363
18364 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
18365
18366 * class.c (maybe_layout_super_class): Fixed returned value.
18367 * lex.c: Added 1999 to the copyright.
18368 (java_init_lex): Initialize java_lang_imported.
18369 * lex.h: Added 1999 to the copyright.
18370 * parse.h: Added 1999 to the copyright.
18371 (REGISTER_IMPORT): Fixed typo in trailing macro.
18372 (CURRENT_OSB): New macro.
18373 (struct parser_ctxt): New fields osb_depth, osb_limit.
18374 * parse.y (java_lang_id): New global variable.
18375 (type_import_on_demand_declaration): Don't import java.lang.* twice.
18376 (array_creation_expression:): Use CURRENT_OSB.
18377 (dims:): Uses a stack to keep track of array dimensions.
18378 (cast_expression:): Use CURRENT_OSB.
18379 (find_expr_with_wfl): Return NULL if node found doesn't meet the
18380 conditions.
18381 (register_fields): Fixed typos in comment.
18382 (check_method_redefinition): Fixed comment indentation.
18383 (java_check_regular_methods): Set saved found wfl to NULL after
18384 having reinstalled it in the previously found DECL_NAME.
18385
18386 1999-01-10 Richard Henderson <rth@cygnus.com>
18387
18388 * gjavah.c (java_float_finite): Use a union to do type punning.
18389 (java_double_finite): Likewise.
18390
18391 1999-01-09 Per Bothner <bothner@cygnus.com>
18392
18393 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
18394 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
18395 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
18396 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
18397 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
18398 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
18399
18400 1999-01-08 Per Bothner <bothner@cygnus.com>
18401
18402 * check-init.c (check_init): If compiling to native, we don't
18403 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
18404
18405 1999-01-08 Tom Tromey <tromey@cygnus.com>
18406
18407 * parse-scan.y (variable_declarator_id): Set or increment
18408 bracket_count.
18409 (bracket_count): New global.
18410 (formal_parameter): Handle case where bracket pairs trail variable
18411 declarator id.
18412
18413 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
18414
18415 * jcf-parse.c (yyparse): variable len changed from a char to an
18416 int to prevent overflow.
18417
18418 1999-01-06 Per Bothner <bothner@cygnus.com>
18419
18420 * java-tree.h: Declare read_class.
18421 * jcf-parse.c (read_class): New function.
18422 (load_class): Now just call read_class.
18423
18424 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
18425 * jcf-parse.c (parse_source_file): Declare save_error_count,
18426 which is needed by java_parse_abort_on_error macro,
18427 * parse.y (java_layout_classes, java_expand_classes): Likewise.
18428
18429 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
18430 constructor, if initializing a static field.
18431 (patch_new_array_init): Set TREE_CONSTANT if it is.
18432 * expr.c (java_lang_expand_expr): For a static array constructor
18433 of primitive elements, allocate the array itself statically.
18434 Disabled until we can set the vtable field statically.
18435
18436 * check-init.c: New file. Checks for definite assignment.
18437 * Makefile.in (JAVA_OBJS): Add check-init.o.
18438 * parse.y (java_complete_expand_method): Call check_for_initialization.
18439 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
18440
18441 1999-01-06 Graham <grahams@rcp.co.uk>
18442
18443 * parse.y : include system.h instead of including
18444 standard headers directly with the exception of <dirent.h>.
18445
18446 1999-01-06 Per Bothner <bothner@cygnus.com>
18447
18448 * lex.h: Moved static function declarations to lex.c,
18449 to shut up some -Wall warnings.
18450 * lex.c: Static function declarations moved here.
18451 * jcf-dump.c: Small fixes to shut up -Wall warnings.
18452
18453 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18454
18455 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
18456
18457 1998-12-22 Per Bothner <bothner@cygnus.com>
18458
18459 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
18460 * verify.c (verify_jvm_instructions): Fix off-by-one error.
18461
18462 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
18463 (localvar_alloc): Change return type to void,
18464 (emit_unop): Remove unused variable size.
18465
18466 * jcf-write.c (struct jcf_block): Add new union.
18467 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
18468 (call_cleanups): New functions.
18469 (struct jcf_partial): New fields num_finalizers and return_value_decl.
18470 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
18471 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
18472 * lang.c (lang_init): Call using_eh_for_cleanups.
18473 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
18474 completing operands to patch_synchronized_statement.
18475 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
18476 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
18477 WITH_CLEANUP_EXPR instead of TRY_EXPR.
18478
18479 1998-12-20 John F. Carr <jfc@mit.edu>
18480
18481 * Make-lang.in: Comment out control-Ls; they upset some makes.
18482
18483 1998-12-18 Tom Tromey <tromey@cygnus.com>
18484
18485 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
18486 consistently.
18487
18488 1998-12-17 Tom Tromey <tromey@cygnus.com>
18489
18490 * parse.y (DIR_SEPARATOR): New define.
18491 (check_class_interface_creation): Use it.
18492
18493 * parse-scan.y (report_main_declaration): Recognize
18494 `java.lang.String' in argument to main.
18495
18496 1998-12-16 Per Bothner <bothner@cygnus.com>
18497
18498 * parse.y (create_interface): Remove bogus test.
18499
18500 1998-12-16 Per Bothner <bothner@cygnus.com>
18501
18502 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
18503 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
18504
18505 1998-12-16 Tom Tromey <tromey@cygnus.com>
18506
18507 * parse-scan.y (qualified_name): Use correct sprintf format.
18508
18509 1998-12-15 Tom Tromey <tromey@cygnus.com>
18510
18511 * gjavah.c (print_field_info): Changed how most negative number is
18512 printed.
18513
18514 1998-12-14 Per Bothner <bothner@cygnus.com>
18515
18516 * parse.y (fold_constant_for_init): New function.
18517 (resolve_expression_name): Don't replace static final
18518 constant-initialized fields by its value.
18519 (java_complete_lhs): New. Same as java_complete_tree, except does
18520 not replace static final constant-initialized fields by their values.
18521 (register_fields): If there is an initializer, set DECL_INITIAL and
18522 MODIFY_EXPR_FROM_INITIALIZATION_P.
18523 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
18524 Only call patch_initialized_static_field if
18525 MODIFY_EXPR_FROM_INITIALIZATION_P.
18526 (patch_initialized_static_field): If not valid constant, clear
18527 DECL_INITIAL.
18528
18529 * parse.y (lookup_field_wrapper): Fix thinko.
18530
18531 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
18532 set and restore global lineno.
18533
18534 1998-12-14 Tom Tromey <tromey@cygnus.com>
18535
18536 * gjavah.c (print_field_info): If value to print is the smallest
18537 value of its size, then print as hex to avoid later warnings from
18538 C++ compiler.
18539
18540 1998-12-14 Tom Tromey <tromey@cygnus.com>
18541
18542 * gjavah.c (decompile_method): Decompile `return null'.
18543 (process_file): Generate `#pragma interface'.
18544 (method_declared): New global.
18545 (print_method_info): Set it.
18546 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
18547 (print_method_info): Handle abstract methods.
18548
18549 1998-12-13 Per Bothner <bothner@cygnus.com>
18550
18551 * parse.y (patch_method_invocation): If class_decl is null
18552 (e.g. an array type), use original type.
18553
18554 * parse.y (check_thrown_exceptions): Temporary hack to suppress
18555 errors about uncaught exception from clone (of array, specifically).
18556
18557 1998-12-13 Tom Tromey <tromey@cygnus.com>
18558
18559 * gjavah.c (decompile_method): Handle all types of `return'
18560 opcode. Decompile `return this' and `return'.
18561 (method_access): New global.
18562 (print_method_info): Set it.
18563 (decompile_method): Don't decompile a synchronized method.
18564
18565 1998-12-13 Tom Tromey <tromey@cygnus.com>
18566
18567 * jcf-reader.c (jcf_parse_one_method): Recognize
18568 HANDLE_END_METHOD.
18569 * gjavah.c (HANDLE_END_METHOD): New macro.
18570 (HANDLE_CODE_ATTRIBUTE): New macro.
18571 (decompile_method): New function.
18572 (print_method_info): Don't print `;\n' at end of function decl.
18573 Include java-opcodes.h.
18574 (decompiled): New global.
18575
18576 1998-12-12 Per Bothner <bothner@cygnus.com>
18577
18578 * class.c (build_class_ref): Handle PRIMTYPE.class if
18579 flag_emit_class_files.
18580 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
18581 if flag_emit_class_files.
18582 * parse.y (java_complete_tree): Pre-liminary support for
18583 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
18584
18585 * parse.y (patch_synchronized_statement): Don't call monitorexit
18586 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
18587
18588 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
18589
18590 * zipfile.h (opendir_in_zip): New declaration.
18591 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
18592 (opendir_in_zip): New function, using code from open_in_zip.
18593 (open_in_zip): Call opendir_in_zip.
18594 (find_class): Remove no-longer-used do_class_file parameter,
18595 but add source_ok parameter. Change logic so if we find a .java file,
18596 we don't look for .class in later classpath emtries.
18597 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
18598 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
18599 * gjavah.c: Update call to find_class.
18600 * jcf-dump.c: Likewise.
18601
18602 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
18603 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
18604 nothing if body is empty_stmt_node.
18605 Various little fixes so SP gets correctly adjusted.
18606 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
18607 For CALL_EXPR, test if static first.
18608 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
18609 such as the ones we create for Object and Class.
18610 Set and restore current_function_decl.
18611 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
18612 (note_possible_classname): New function.
18613 (read_import_entry): Removed. Merged with read_import_dir.
18614 (read_import_dir): Don't call find_class - that only gives us
18615 the first classpath entry having the needed package.
18616 Use the struct buffer data structure from buffer.h.
18617 (read_import_dir, find_in_imports_on_demand): The remembered
18618 class names now use '.' (not '/') as package separator.
18619
18620 * parse.y (java_complete_expand_methods): Call write_classfile
18621 here, and not in java_expand_classes (which only gets first class).
18622
18623 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
18624
18625 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
18626 (register_fields): If a static fields has an initializer, just
18627 chain it on ctxp->static_initialized, and handle later.
18628 (java_complete_expand_methods): Force <clinit> first.
18629 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
18630 - it's already been completed.
18631 (patch_initialized_static_field): New function.
18632 (java_complete_field): Call it.
18633
18634 1998-12-12 Per Bothner <bothner@cygnus.com>
18635
18636 * expr.c (encode_newarray_type, build_new_array): New functions.
18637 * java-tree.h: Declare build_new_array.
18638 * jcf-write.c (patch_newarray): Use build_new_array.
18639
18640 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
18641 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
18642
18643 * parse.y (patch_new_array_init): Re-organize.
18644 Now is passed the actual array (pointer) type of the value.
18645 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
18646 (patch_array_constructor): Removed - merged into patch_new_array_init.
18647 (java_complete_tree): Update patch_new_array_init.
18648
18649 * jcf-write.c (find_constant_index): New function.
18650 (generate_bytecode_insns): Use find_constant_index.
18651 (generate_classfile): Use find_constant_index for ConstantValue.
18652
18653 1998-12-11 Tom Tromey <tromey@cygnus.com>
18654
18655 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
18656 * decl.c (init_decl_processing): Renamed dtable -> vtable.
18657 * class.c (make_class_data): Renamed dtable -> vtable, and
18658 dtable_method_count -> vtable_method_count.
18659
18660 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18661
18662 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
18663 global variables, initialized.
18664 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
18665 Declared new global variables.
18666 * lex.c (java_lex): Return long_zero_node, float_zero_node,
18667 double_zero_node, integer_zero_node upon direct matching.
18668 * parse.y (purify_type_name): Added function prototype.
18669 (duplicate_declaration_error_p): Consider new_type as potentially
18670 being a incomplete type. Use purify_type_name on type string.
18671 (method_header): saved_type: unused variable removed. Don't figure
18672 return type if method name is invalid.
18673 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
18674 processed by patch_unaryop.
18675 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
18676 increment/decrement node into its original type after binary
18677 numeric promotion on its operands.
18678
18679 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
18680
18681 * parse.y (array_initializer:): Array init operand is NULL_TREE
18682 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
18683 now an error. Fixed indentation problems.
18684 (patch_string): Handle error_mark_node as an argument.
18685 (patch_new_array_init): Fixed indentation problems.
18686 (array_constructor_check_entry): Removed check on null wfl_value.
18687 Return an error if wfl_value's walk returns an error.
18688
18689 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
18690
18691 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
18692 * lex.c (java_lex): Remember column position before advancing one
18693 token. Retain location information on OCB_TK.
18694 * lex.h (typedef struct java_lc): Added new field.
18695 * parse.h (GET_SKIP_TYPE): New macro.
18696 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
18697 * parse.y (build_new_array_init, patch_new_array_init,
18698 patch_array_constructor, maybe_build_array_element_wfl,
18699 array_constructor_check_entry): New function prototypes.
18700 (switch_block:): Tagged <node>.
18701 (OCB_TK): Tagged <operator>.
18702 (array_initializer:): Installed actions.
18703 (variable_initializer): Build location information on element if
18704 necessary.
18705 (switch_statement:): Fixed indentation typo.
18706 (switch_block:): Redefined default action.
18707 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
18708 (patch_assignment): Removed duplicate code.
18709 (maybe_build_array_element_wfl, build_new_array_init,
18710 patch_new_array_init, patch_array_constructor,
18711 array_constructor_check_entry): New functions.
18712
18713 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
18714
18715 * parse.y (array_initializer): Tagged <node>.
18716 (variable_initializer:): Use default rule.
18717 (array_initializer:): Defined actions.
18718 (variable_initializers:): Likewise.
18719 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
18720 non-static field accesses.
18721 (patch_invoke): Fixed indentation typo.
18722 (java_complete_tree): Likewise.
18723 (build_labeled_block): Changed leading comment. Generate an error
18724 in case of duplicate loop labels.
18725 (patch_conditional_expr): Patch results of string concatenation
18726 operations.
18727
18728 1998-12-06 Per Bothner <bothner@cygnus.com>
18729
18730 * constants.c (find_methodref_index): When the class is an interface,
18731 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
18732
18733 * decl.c (finit_identifier_node): Use "$finit$", rather than
18734 "<finit>" (which Sun's verifier rejects).
18735 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
18736 (generate_field_initialization_code): Removed.
18737 (fix_constructors) Don't add call to $finit$ here (wrong order).
18738 (patch_method_invocation): Add $finit$ call here.
18739
18740 * java-tree.h (CALL_USING_SUPER): New macro.
18741 * parse.y (patch_invoke): Remove im local variable.
18742 (patch_method_invocation, patch_invoke): Don't pass super parameter.
18743 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
18744 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
18745
18746 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
18747
18748 * parse.y (java_complete_tree): Don't complain about unreachable
18749 statement if it is empty_stmt_node.
18750
18751 * jcf-write.c (find_constant_wide): New function.
18752 (push_long_const): Use find_constant_wide.
18753
18754 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
18755 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
18756 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
18757 Emit invokeinterface when calling an interface method.
18758 Emit invokespecial also when calling super or private methods.
18759
18760 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
18761
18762 1998-12-06 Per Bothner <bothner@cygnus.com>
18763
18764 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
18765
18766 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
18767
18768 * java-tree.h (java_layout_seen_class_methods): New function
18769 prototype.
18770 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
18771 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
18772 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
18773 * parse.y (method_declarator:): Defined action.
18774 (issue_warning_error_from_context): input_filename saved, set to
18775 the appropriate value and restored after java_error is called.
18776 (build_unresolved_array_type): Fixed comment.
18777 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
18778 (method_header): Deal with return type the same way type are
18779 handled for fields and method's parameters and local variables
18780 types are handled.
18781 (check_method_redefinition): Removed extra CR.
18782 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18783 (java_layout_seen_class_methods): New function.
18784 (java_layout_classes): Call java_layout_seen_class_methods.
18785
18786 1998-12-03 Per Bothner <bothner@cygnus.com>
18787
18788 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
18789
18790 1998-12-03 Per Bothner <bothner@cygnus.com>
18791
18792 * jcf-dump.c (main): Fix error message.
18793 * jcf-path.c (add_entry): Style fix.
18794
18795 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
18796
18797 * class.c (layout_class_method): Call build_java_argument_signature
18798 on constructors too.
18799 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18800 (patch_method_invocation): Define a primary when resolving an
18801 expression name. Augmented comment on code checking illegal `this'
18802 usage. Loosened it test by accepting NEW_CLASS_EXPR.
18803
18804 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
18805
18806 * class.c (layout_class_method): Don't report error on non-static
18807 overriding static if the method is private.
18808 * java-tree.h (finish_class): Prototype added.
18809 * lex.c (java_get_line_col): Handle col argument -2 value.
18810 * parse.h: All static method declarations moved to parse.y.
18811 * parse.y: Now contains all static method declarations previously
18812 found in parse.h.
18813 (find_expr_with_wfl, missing_return_error,
18814 unreachable_stmt_error): New functions.
18815 (java_get_real_method_name): Identify constructors bearing class
18816 names in source code compiled classes only.
18817 (java_complete_expand_methods): Call missing_return_error.
18818 (invocation_mode): Private methods invoked as static methods.
18819 (java_complete_tree): Call unreachable_stmt_error.
18820
18821 1998-12-01 Tom Tromey <tromey@cygnus.com>
18822
18823 * Makefile.in (+target): Removed.
18824 (+xmake_file): Likewise.
18825 (+tmake_file): Likewise.
18826 (.NOEXPORT): Removed duplicate.
18827
18828 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18829
18830 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18831
18832 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
18833
18834 * jvgenmain.c: Remove the xmalloc prototype, we get it from
18835 libiberty.h. Provide an xmalloc definition.
18836
18837 * jvspec.c: Remove the xmalloc prototype.
18838
18839 * parse-scan.y: Include config.h and system.h. Don't include
18840 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
18841 Provide an xstrdup definition.
18842
18843 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
18844
18845 * jcf-path.c (add_entry): Recognize ".jar" too.
18846 * lang-specs.h: Likewise.
18847
18848 1998-11-26 Per Bothner <bothner@cygnus.com>
18849
18850 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
18851 soft_monitorenter_node, soft_monitorexit_node, throw_node.
18852
18853 * jcf-write.c (generate_bytecode_insns):
18854 Handle pre/post-increment/decrement of long.
18855
18856 * jcf-write.c (generate_bytecode_insns):
18857 Handle missing exception handler (finally for synchronized).
18858
18859 1998-11-25 Per Bothner <bothner@cygnus.com>
18860
18861 * java-tree.h (end_params_node): Declare global.
18862 * decl.c (end_params_node): New global.
18863 (init_decl_processing, start_java_method): Use end_params_node for
18864 end of list of parameter types. Follows correct gcc conventions.
18865 * expr.c (pop_argument_types, pop_arguments): Likewise.
18866 * lang.c (put_decl_node): Likewise.
18867 * typeck.c (various places): Likewise.
18868 * class.y (various places): Likewise.
18869 * parse.y (various places): Likewise.
18870
18871 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
18872 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
18873
18874 * class.c: Add #include flags.h, remove no-longer needed declaration.
18875
18876 * class.c (layout_class_method): Remove commented-out code, re-format.
18877 Don't add vtable entry (or index) for private methods.
18878 * expr.c (expand_invoke): A private method is implicitly final.
18879 * class.c (make_class_data): If inlining or optimizing,
18880 skip private methods.
18881
18882 * class.c (finish_class): New function. Calls existing methods,
18883 but alls emits deferred inline functions.
18884 * jcf-parse.c (parse_class_file): Call finish_class.
18885 * parse.y (java_complete_expand_methods): Likewise.
18886
18887 * expr.c (build_java_binop): Explicit default, to silence -Wall.
18888
18889 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
18890
18891 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
18892
18893 * jcf-write.c (generate_bytecode_conditional): Fix typo.
18894
18895 1998-11-24 Per Bothner <bothner@cygnus.com>
18896
18897 * (generate_classfile): Always write class access flag with
18898 ACC_SUPER set.
18899
18900 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
18901
18902 * class.c (maybe_layout_super_class): New function.
18903 (layout_class): Reorganized. Loop on class methods dispatched into
18904 a new function. Call maybe_layout_super_class.
18905 (layout_class_methods, layout_class_method): New functions.
18906 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18907 class.
18908 (expand_invoke): Likewise.
18909 * java-tree.h (all_class_list): New global variable declared.
18910 (layout_class_methods, layout_class_method): New function
18911 prototypes.
18912 (LAYOUT_SEEN_CLASS_METHODS): New macro.
18913 * jcf-parse.c (all_class_list): New global variable.
18914 (load_class): Extended what class_or_name can be. Use parser
18915 context mechanism to save globals before calling jcf_parse.
18916 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18917 is set on the file name.
18918 (jcf_parse): Layout class methods when Object is loaded, otherwise
18919 record class in all_class_list for delayed method layout.
18920 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18921 * lang.c (put_decl_node): Decode <init> into the decl context
18922 class name.
18923 * lex.c (java_allocate_new_line): Use xmalloc.
18924 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18925 pointers, not TREE_LIST elements.
18926 (struct parser_ctxt): Fixed comment indentations, added comments
18927 and reordered some fields.
18928 (java_check_methods): Function prototype removed.
18929 * parse.y (java_push_parser_context): Use xmalloc.
18930 (java_parser_context_restore_global): Pop extra pushed ctxp only
18931 when there's nothing next.
18932 (maybe_create_class_interface_decl): Fixed comment, add new
18933 created class decl to all_class_list.
18934 (method_header): Use GET_REAL_TYPE on argument's types.
18935 (method_declarator): Use GET_REAL_TYPE, change type to the real
18936 type in TREE_LIST dependency node. Build argument list with the
18937 real type.
18938 (create_jdep_list): Use xmalloc. Removed allocation error message.
18939 (obtain_incomplete_type): Fixed leading comment. Broadened
18940 incoming argument meaning.
18941 (register_incomplete_type): Use xmalloc. Removed allocation error
18942 message.
18943 (safe_layout_class): Fixed leading comment.
18944 (jdep_resolve_class): Reversed if statement condition and switch
18945 if and else bodies.
18946 (resolve_and_layout): Fixed leading comment. Broadened incoming
18947 argument meaning.
18948 (complete_class_report_errors): New local variable name, for
18949 clarity. purify_type_name used for all error cases.
18950 (java_get_real_method_name): Stricter check on constructors.
18951 (java_check_regular_methods): Reverse methods list only if not
18952 already laid out. Layout artificial constructor.
18953 (java_check_methods): Deleted.
18954 (source_start_java_method): Obtain incomplete type for patchable
18955 method arguments.
18956 (java_layout_classes): Fixed leading comment. Use
18957 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18958 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18959 before returning. Fixed comments.
18960 (java_expand_classes): Check for errors up front.
18961 (patch_method_invocation): Class to search is resolved and laid
18962 out.
18963
18964 1998-11-24 Per Bothner <bothner@cygnus.com>
18965
18966 * expr.c (java_lang_expand_expr): Add missing emit_queue.
18967
18968 * javaop.h (int8): Removed - not used.
18969 (jbyte): Redefine portably with correct signedness.
18970
18971 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
18972
18973 * jcf-write.c (generate_bytecode_insns): Fix typo
18974 OPCODE_getstatic to OPCODE_getfield.
18975
18976 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
18977 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
18978 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18979
18980 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
18981
18982 * jcf-parse.c (jcf_parse_source): Function returned type is
18983 void. Added prototype.
18984 (jcf_parse): Function returned type is void.
18985 (yyparse): Remove call to fclose on the last parsed file.
18986
18987 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18988
18989 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
18990
18991 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18992 (layout_class): Cope with methods featuring WFL in decl names.
18993 * decl.c (unqualified_object_id_node): New global variable,
18994 initialized.
18995 (build_decl_no_layout): Removed.
18996 * expr.c (build_primtype_type_ref): Handle Double.
18997 (java_lang_expand_expr): Fixed indentations.
18998 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18999 (flag_wall, flag_redundant, flag_not_overriding,
19000 flag_static_local_jdk1_1, unqualified_object_id_node): Global
19001 variable declarations.
19002 (build_decl_no_layout): Removed prototype.
19003 (java_get_real_method_name): Added prototype.
19004 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
19005 (java_parse_abort_on_error): Macro now just returns.
19006 * jcf-parse.c (jcf_parse_source): Check fclose returned
19007 value. Call emit_register_classes if java_report_errors returns
19008 zero.
19009 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
19010 flag_static_local_jdk1_1): New integer flags.
19011 (lang_decode_option): New flags set here.
19012 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
19013 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
19014 the flag_redundant variable.
19015 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
19016 when parsing java.lang.Object class.
19017 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
19018 NULL_TREE to build.
19019 (resolve_qualified_expression_name): Fixed indentation.
19020 (patch_array_ref): Changed prototype.
19021 (not_initialized_as_it_should_p): Prototype removed.
19022 (java_report_errors): Added function prototype.
19023 * parse.y (formal_parameter:): Changed error message for not yet
19024 supported final parameters.
19025 (class_type_list:): Set both PURPOSE and VALUE of created
19026 TREE_LIST to be class_type.
19027 (primary_no_new_array:): Handle class literals on primitive types.
19028 (parse_warning_context): Reinstalled correct force_error and
19029 do_warning flags setups.
19030 (java_report_errors): Changed prototype. Return java_error_count
19031 value.
19032 (variable_redefinition_error): Consider treating variable type as
19033 a fake pointer.
19034 (create_interface): Warn about redundant abstract modifier if
19035 flag_redundant is set. Changed error message.
19036 (lookup_field_wrapper): Save/restore globals before/after looking
19037 up field.
19038 (duplicate_declaration_error_p): Consider treating declaration
19039 type as a fake pointer.
19040 (register_fields): Extract real type from dependency node. Check
19041 for duplicate field declaration after type adjustment. Use
19042 DECL_INITIAL to store static final initialized values.
19043 (method_header): Extract real function type from dependency node.
19044 (check_abstract_method_header): Use GET_METHOD_NAME.
19045 (obtain_incomplete_type): Layout fake pointer type.
19046 (safe_layout_class): Don't try to check for methods before layout.
19047 (java_complete_class): Don't check for correct throws clause
19048 elements inheritance here.
19049 (resolve_and_layout): Broadened name parameter meaning.
19050 (reset_method_name): Use GET_METHOD_NAME.
19051 (java_get_real_method_name): New function.
19052 (java_check_regular_methods): Don't check methods in
19053 java.lang.Object. Verify lineage of throws clause elements. Use
19054 flag_no_overriding in warning report.
19055 (check_throws_clauses): Don't check if class was from
19056 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
19057 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
19058 (declare_local_variables): Use flag_static_local_jdk1_1 to report
19059 warning on unsupported final local variables. Use build_decl
19060 instead of build_decl_no_layout. Get real local variable type from
19061 dependency node.
19062 (source_start_java_method): Get real parameter type from
19063 dependency node. Call build_decl instead of build_decl_no_layout.
19064 (java_layout_classes): Reverse tree and layout type and class as
19065 required. Mark class as loaded when done.
19066 (resolve_field_access): Fixed indentation. Restricted condition
19067 leading to static field access code generation. Set field_type
19068 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
19069 (resolve_qualified_expression_name): Initialize type_found to
19070 null. Handle static field resolved during qualification. Fixed
19071 layout on non primitive field decl types.
19072 (not_accessible_p): Fixed typo in comment.
19073 (patch_method_invocation): Resolve and layout class to search from
19074 type.
19075 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
19076 layout non primitive type, if necessary. Make method node only to
19077 report errors.
19078 (find_applicable_accessible_methods_list): Consider WFL'ed method
19079 decl names. Fixed indentation.
19080 (argument_types_convertible): Resolve and layout target type if
19081 necessary.
19082 (java_complete_tree): Fixed indentation problems. Rewrote
19083 CALL_EXPR thrown exceptions check. Re-installed further processing
19084 of the assignment in certain cases.
19085 (patch_assignment): Call maybe_build_primttype_type_ref to perform
19086 inlining on class literals.
19087 (valid_builtin_assignconv_identity_widening_p): Cope with constant
19088 0 literal.
19089 (valid_method_invocation_conversion_p): Likewise.
19090 (patch_string): Temporary disable forbidden use of `this' in
19091 explicit constructor invocations when doing string concatenation
19092 within their scope.
19093 (patch_unaryop): Added comment. Reinstalled code to disable
19094 further check on assignment operation with cast expression RHS.
19095 (patch_switch_statement): Fixed indentation.
19096 (build_try_statement): Call build_decl instead of
19097 build_decl_no_layout.
19098 (patch_synchronized_statement): Likewise.
19099 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
19100 IS_UNCHECKED_EXPRESSION_P.
19101 (check_thrown_exceptions_do): Changed leading comment. Resolve and
19102 layout argument exception type.
19103 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
19104 of IS_UNCHECKED_EXPRESSION_P.
19105
19106 1998-11-18 Anthony Green <green@cygnus.com>
19107
19108 * jcf-parse.c (yyparse): Open class file in binary mode.
19109
19110 1998-11-15 Per Bothner <bothner@cygnus.com>
19111
19112 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
19113
19114 * jcf-write.c (perform_relocations): Move check out one loop.
19115
19116 1998-11-15 Anthony Green <green@hoser.cygnus.com>
19117
19118 * Make-lang.in: Fix reference to srcdir.
19119 * jv-scan.c: Add missing xmalloc prototype.
19120 * jvgenmain.c: Ditto.
19121
19122 1998-11-15 Per Bothner <bothner@cygnus.com>
19123
19124 * decl.c (error_mark_node), java-tree.h: New global.
19125 * parse.y: Use empty_stmt_node instead of size_zero_node.
19126 (build_if_else_statement): If missing else, use empty_stmt_node.
19127
19128 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
19129 (java_complete_expand_method): Complain if return is missing.
19130 (java_check_regular_methods): Comment out incorrect error check.
19131 (not_accessible_p): Fix incorrect handling of protected methods.
19132 (patch_method_invocation): Pass correct context to not_accessible_p.
19133 (find_applicable_accessible_methods_list): Likewise.
19134 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
19135 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
19136 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
19137 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
19138
19139 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
19140 (push_int_const): Remove reundant NOTE_PUSH.
19141 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
19142 (- case SWITCH_EXPR): Fix code generation bug.
19143 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
19144 (generate_classfile): More robust for abstract methods.
19145
19146 1998-11-15 Anthony Green <green@cygnus.com>
19147
19148 * Makefile.in: jv-scan and jvgenmain all require libiberty.
19149 * Make-lang.in: Ditto.
19150
19151 * jv-scan.c: Remove xmalloc and xstrdup definitions.
19152 * jvgenmain: Ditto.
19153
19154 1998-11-15 Per Bothner <bothner@cygnus.com>
19155
19156 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
19157
19158 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
19159
19160 1998-11-14 Per Bothner <bothner@cygnus.com>
19161
19162 Allow uses of interface types to verify. This is not really
19163 type-safe, but it matches what Sun does, and is OK as long as
19164 there are appropriate run-time checks.
19165 * verify.c (merge_types): If merging two interface types,
19166 just set the result to java.lang.Object.
19167 * expr.c (pop_type): Any interface is matches by java.lang.Object.
19168
19169 1998-11-13 Tom Tromey <tromey@cygnus.com>
19170
19171 * gjavah.c (main): Handle --output-class-directory argument.
19172 * jvspec.c (lang_specific_driver): Translate `-d' into
19173 -foutput-class-dir.
19174 * jcf.h (jcf_write_base_directory): Declare.
19175 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
19176 * lang-options.h: Mention -foutput-class-dir.
19177 * jcf-write.c (jcf_write_base_directory): New global.
19178 (make_class_file_name): Put generated .class file into `-d'
19179 directory, or into source directory if -d not given. Function now
19180 static.
19181 (write_classfile): Free class file name. Handle case where class
19182 file name is NULL.
19183 (DIR_SEPARATOR): New macro.
19184 Include <sys/stat.h>
19185
19186 * Makefile.in (prefix): New macro.
19187
19188 1998-11-12 Per Bothner <bothner@cygnus.com>
19189
19190 * parse.y (patch_invoke): Do less if flag_emit_class_files.
19191 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
19192 here (done in patch_invoke instead).
19193 (case_identity): Moved here from parse.y.
19194
19195 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
19196 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
19197 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
19198 so they can be efficiently scanned without recursion.
19199 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
19200 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
19201 in BLOCK iteratively, rather than recursively.
19202
19203 * parse.y (do_unary_numeric_promotion): New function.
19204 (patch_unaryop, patch_binop, patch_array_ref): Use it.
19205
19206 * parse.y (patch_newarray): Various fixes.
19207
19208 Re-do handling of switch statements (for proper block scoping).
19209 * parse.y: Add just a single block for the enture switch block,
19210 but don't create any "case blocks".
19211 (group_of_labels): Rmeoved unneeded non-terminal.
19212 CASE_EXPR and DEFAULT_EXPR are added to current block.
19213 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
19214 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
19215 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
19216 * parse.y (wfl_operator, print_int_node): Make non-static.
19217 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
19218 as part of recursive scan of block.
19219 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
19220 (patch_switch_statement): Most tests move dinto java_complete_tree.
19221
19222 * parse.y: Make various production be non-typed (void).
19223 * parse.y (parse_error): Merged into issue_warning_error_from_context.
19224 * parse.y (add_stmt_to_compound): Don't create/change extra node.
19225 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
19226
19227 * jcf-write.c (struct jcf_handler): New type.
19228 (struct jcf_switch_state): New type.
19229 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
19230 (alloc_handler, emit_unop, emit_reloc): New functions.
19231 (adjust_typed_op): Add extra parameter ("max type" offset).
19232 (emit_switch_reloc, emit_case-reloc): New function.
19233 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
19234 (generate_bytecode_insns): Support REAL_CST, switch statements,
19235 exception handling, method calls, object/array creation, and more.
19236
19237 * class.c: Remove some unused variables.
19238 * constants.c (find_string_constant): New function.
19239 (count_constant_pool_bytes): Fix to correctly handle wide constants.
19240 * decl.c (complete_start_java_method): Don't _Jv_InitClass
19241 if flag_emit_class_files.
19242
19243 1998-11-12 Tom Tromey <tromey@cygnus.com>
19244
19245 * jcf-io.c (find_class): Added explanatory comment.
19246
19247 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
19248 trailing slash to `.zip' entries.
19249
19250 * jvspec.c (lang_specific_driver): Correctly handle case where
19251 GC_NAME not defined.
19252
19253 1998-11-11 Tom Tromey <tromey@cygnus.com>
19254
19255 * jvspec.c (GC_NAME): New define.
19256 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
19257 if required.
19258 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
19259
19260 1998-11-11 Per Bothner <bothner@cygnus.com>
19261
19262 * jcf-dump.c (TABLE_SWITCH): Fix typos.
19263
19264 1998-11-11 Tom Tromey <tromey@cygnus.com>
19265
19266 * jcf-dump.c (main): Correctly recognize `--'-style long options.
19267
19268 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
19269
19270 * class.c (is_compiled_class): Call safe_layout_class for class
19271 compiled from source.
19272 * conver.h (convert_to_integer, convert_to_real,
19273 convert_to_pointer): Added prototypes.
19274 * decl.c (init_decl_processing): Non longer push the decls of
19275 `methodtable', `constants', `Class', `Field', `dispatchTable'
19276 `jexception' and `Method'.
19277 * expr.c (build_invokeinterface): New function.
19278 (expand_invoke): static variable CLASS_IDENT now in
19279 build_invokeinterface. Use build_invokeinterface.
19280 (expand_java_field_op): Moved code to inline
19281 java.lang.PRIMTYPE.TYPE into a function.
19282 (build_primtype_type_ref): New function.
19283 * java-tree.def (INSTANCEOF_EXPR): New tree code.
19284 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
19285 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
19286 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
19287 (DECL_LOCAL_STATIC_VALUE): New macro.
19288 (build_invokeinterface, build_primtype_type_ref): New function
19289 prototypes.
19290 (java_parse_abort_on_error): Macro rewritten.
19291 * jcf-parse.c (current_method): Add comment to declaration.
19292 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
19293 Function prototypes fixed.
19294 (jcf_parse_source): push/pop parser context. save/restore global.
19295 (parse_source_file): Fixed leading comment. Now take a
19296 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
19297 classes and pop the parser context anymore.
19298 (yyparse): Push parser context, save globals, parse the source
19299 file, restore globals and pop the parser context when processing a
19300 source file.
19301 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
19302 * lex.c (java_parse_doc_section): New function.
19303 (java_lex): Call java_parse_doc_section when appropriate. Build an
19304 operator around INSTANCEOF_TK.
19305 * lex.h (java_lineterminator, java_sprint_unicode,
19306 java_unicode_2_utf8, java_lex_error, java_store_unicode):
19307 Prototypes rewritten.
19308 (java_parse_escape_sequence, java_letter_or_digit_p,
19309 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
19310 java_read_unicode, java_store_unicode, java_read_char,
19311 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
19312 Added function prototypes.
19313 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
19314 define.
19315 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
19316 New macros
19317 (struct parser_ctxt): New fields: deprecated,
19318 current_parsed_class_un, gclass_list.
19319 (fix_method_argument_names, issue_warning_error_from_context,
19320 resolve_package, lookup_package_type): New function prototypes.
19321 (resolve_expression_name): Fixed function prototype.
19322 (find_applicable_accessible_methods_list): Fixed indentation, added
19323 extra argument in prototype.
19324 (check_final_assignment, build_null_of_type, check_deprecation,
19325 check_method_redefinition, reset_method_name,
19326 java_check_regular_methods, java_check_abstract_methods,
19327 maybe_build_primttype_type_ref): New function prototype.
19328 * parse.y (conver.h): Include.
19329 (INSTANCEOF_TK): Tagged <operator>.
19330 (single_type_import_declaration): Use REGISTER_IMPORT macro.
19331 (relational_expression:): Build binop for instanceof.
19332 (java_push_parser_context): Remember ctxp->gclass_list across
19333 contexts.
19334 (java_pop_parser_context): Simply return if no context
19335 exists. Remember gclass_list across contexts.
19336 (issue_warning_error_from_context): New function.
19337 (parse_error_context): Don't setup ctxp->elc here. Call
19338 issue_warning_error_from_context instead.
19339 (parse_warning_context): Likewise.
19340 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
19341 setup. Link new class/interface to ctxp->gclass_list.
19342 (add_superinterfaces): Register interface as incomplete if not
19343 loaded.
19344 (create_class): Remember class unqualified name in
19345 ctxp->current_parsed_class_un. Check class deprecation.
19346 (register_fields): Check field deprecation. Remember static final
19347 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
19348 processing INIT.
19349 (method_header): New local variable ORIG_ARG. Use unqualified
19350 current class name for check on constructor errors. Promote return
19351 type if of record type. Argument list fix moved in
19352 fix_method_argument_names, called here. Check method deprecation.
19353 (fix_method_argument_names): New function.
19354 (method_declarator): Promote record typed arguments.
19355 (safe_layout_class): Check class methods before layout.
19356 (java_complete_class): Compute field layout when patched.
19357 (do_resolve_class): Try to load class after having it renamed
19358 after the package name.
19359 (get_printable_method_name): Use DECL_CONTEXT.
19360 (reset_method_name): New function.
19361 (check_method_redefinition): Use reset_method_name.
19362 (java_check_regular_methods): New local variable
19363 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
19364 names for error report. Check for compile-time error when method
19365 found has default (package) access.
19366 (java_check_abstract_methods): Now takes an interface DECL node as
19367 an argument. Also reinstall real name on unchecked
19368 overriding/hiding methods for error report.
19369 (java_check_methods): Fixed leading comment. Get classes to verify
19370 from ctxp->gclass_list. Use CHECK_METHODS macro and set
19371 CLASS_METHOD_CHECKED_P on class verification.
19372 (lookup_java_method2): Get real method name if necessary.
19373 (find_in_imports): Don't check package class access here.
19374 (resolve_package, lookup_package_type): New functions.
19375 (java_layout_classes): Fixed leading comment. Take classes to be
19376 laid out from ctxp->gclass_list.
19377 (java_complete_expand_methods): Don't expand native and abstract
19378 methods.
19379 (java_expand_classes): New function.
19380 (resolve_expression_name): Use additional argument ORIG. Retrieve
19381 values of static final field of primitive types.
19382 (resolve_field_access): Handles static final field of promotive
19383 type.
19384 (resolve_qualified_expression_name): Handle STRING_CST as
19385 primaries and package name resolution. Check deprecation on found
19386 decls. Set where_found and type_found on non static field resolved
19387 during qualification. Layout non primitive field decl types.
19388 (check_deprecation): New function.
19389 (maybe_access_field): Simplified.
19390 (patch_method_invocation_stmt): Local variable CLASS_TYPE
19391 removed. Reverse method's argument when primary is a type. Don't
19392 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
19393 instead. Include abstract class in the list of class searchable
19394 for constructors. Use DECL_CONTEXT of found method for access
19395 checks. Check method deprecation.
19396 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
19397 converting arguments. Handle INVOKE_INTERFACE.
19398 (lookup_method_invoke): Search constructor using existing
19399 infrastructure (don't rely on lookup_java_constructor anymore).
19400 (find_applicable_accessible_methods_list): Extra argument flag
19401 LC. Now include constructor in the search.
19402 (qualify_ambiguous_name): Conditional expression are primaries.
19403 (not_initialized_as_it_should_p): static final are always
19404 initialized.
19405 (java_complete_tree): Pass extra NULL argument to
19406 resolve_expression_name. Stricter test to carry on patching
19407 assignments. New case for INSTANCEOF_EXPR.
19408 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
19409 (check_final_assignment, maybe_build_primttype_type_ref): New
19410 functions.
19411 (patch_assignment): Detect resolved static finals and carry normal
19412 assignment error check on them. Inline PRIMTYPE.TYPE read access.
19413 (try_builtin_assignconv): Access constant 0 on all primitive
19414 types.
19415 (valid_builtin_assignconv_identity_widening_p): Accept identical
19416 types. Accept all promoted type on int type.
19417 (valid_ref_assignconv_cast_p): Accept a null pointer to be
19418 assigned to a reference.
19419 (valid_method_invocation_conversion_p): Accept to check null
19420 pointers.
19421 (build_binop): Merge declaration and initialization of local
19422 variable BINOP.
19423 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
19424 numeric types. Improved validity test for qualify operators on
19425 references.
19426 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
19427 and PREINCREMENT_EXPR. Also detect resolved static finals of a
19428 primitive type and issue the appropriate error message.
19429 (resolve_type_during_patch): Mark class loaded when resolved.
19430 (patch_cast): Allow null to be cased to reference types.
19431 (build_null_of_type): New function.
19432 (patch_array_ref): Handle array on references correctly.
19433 (patch_return): Removed unused local variable MODIFY. Force
19434 boolean to be returned as integers. Allows null to be returned by
19435 a function returning a reference.
19436 * typeck.c (convert_to_integer, convert_to_real,
19437 convert_to_pointer): Prototypes moved to convert.h
19438 (lookup_argument_method): Use method real name, if necessary.
19439
19440 1998-10-30 Tom Tromey <tromey@cygnus.com>
19441
19442 * class.c (build_class_ref): Changed name of primitive classes to
19443 start with `_Jv_'.
19444
19445 * class.c (make_class_data): Renamed fields: nmethods to
19446 method_count, method_count to dtable_method_count. Always set
19447 `state' field to 0.
19448 * decl.c (init_decl_processing): Likewise.
19449
19450 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
19451
19452 * class.c (layout_class): Don't mangle <finit>, produce
19453 __finit<class> instead. Don't verify artificial methods.
19454 * decl.c (finit_identifier_node): New declared global.
19455 (init_decl_processing): finit_identifier_node initialized.
19456 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
19457 * java-tree.h (finit_identifier_node): Declared as extern.
19458 (struct lang_decl): New field called_constructor.
19459 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
19460 (CLASS_HAS_FINIT_P): New macro.
19461 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
19462 explicit constructor invocation.
19463 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
19464 CALL_SUPER_CONSTRUCTOR_P): New macros.
19465 (write_classfile): Added prototype.
19466 * jcf-parse.c (jcf_parse_source): Parse and remember for
19467 generation if the file was seen on the command line.
19468 (parse_source_file): Don't write the class file here.
19469 (yyparse): Loop on files rewritten. Set current_jcf.
19470 (parse_zip_file_entries): Parse class file only if it was found.
19471 * lang.c (init_parse): Don't open command line provided filename
19472 here.
19473 (lang_parse): Don't set main_jcf anymore.
19474 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
19475 (JCONSTRUCTOR_CHECK): New macro.
19476 (JBSC_TYPE_P): New macro.
19477 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
19478 (COMPLETE_CHECK_OP_2): New macro.
19479 (struct parse_ctxt): New field explicit_constructor_p.
19480 (check_class_interface_creation): Fixed prototype indentation.
19481 (patch_method_invocation_stmt): Prototype reflects added argument.
19482 (patch_invoke): Likewise.
19483 (complete_method_declaration, build_super_invocation,
19484 verify_constructor_circularity,
19485 build_this_super_qualified_invocation, get_printable_method_name,
19486 patch_conditional_expr, maybe_generate_finit, fix_constructors,
19487 verify_constructor_super, create_artificial_method,
19488 start_artificial_method_body, end_artificial_method_body,
19489 generate_field_initialization_code): New function prototypes.
19490 * parse.y: Fixed leading comment
19491 (constructor_header:, constructor_body:, block_end:): Rules tagged
19492 <node>.
19493 (type_declaration:): Call maybe_generate_finit.
19494 (method_declaration:): Action for method_body: placed in new
19495 function complete_method_declaration, called here.
19496 (constructor_declaration:): Defined actions. Removed leading
19497 FIXME.
19498 (constructor_header:): New rule with action.
19499 (constructor_body:): Rule rewritten using block_begin: and
19500 block_end:. Defined actions.
19501 (constructor_declarator:, explicit_constructor_invocation:):
19502 Defined actions.
19503 (block:): Use new rules block_begin: block_end:.
19504 (block_begin:, block_end:): New rules and actions.
19505 (block_statements:): Fixed error message for explicit
19506 constructors.
19507 (method_invocation:): Call build_this_super_qualified_invocation
19508 if primary is `this' or `super' was seen.
19509 (conditional_expression:): Action defined.
19510 (extra_ctxp_pushed_p): New static global flag.
19511 (java_parser_context_save_global): Create parser context if
19512 necessary. Use extra_ctxp_pushed_p to remember it.
19513 (java_parser_context_restore_global): Pop extra parser context if
19514 one exists.
19515 (build_array_from_name): Array on primitive types are marked
19516 loaded.
19517 (register_fields): Restore new name in field initializer
19518 expression if type was altered. Non static fields initialized upon
19519 declaration marked initialized.
19520 (maybe_generate_finit): New function.
19521 (maybe_generate_clinit): Use create_artificial_method,
19522 start_artificial_method_body, end_artificial_method_body. Generate
19523 debug info for enclosed initialization statements.
19524 (method_header): Fixed leading comment. Check constructor
19525 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
19526 accordingly.
19527 (complete_method_declaration, constructor_circularity_msg,
19528 verify_constructor_circularity): New functions.
19529 (get_printable_method_name): New function.
19530 (check_method_redefinition): Don't rename <finit> methods. Fix
19531 declared constructor names. Error message for
19532 constructors modified.
19533 (java_check_regular_methods): Local variable seen_constructor
19534 renamed saw_constructor. Skip verification on constructors. Create
19535 default constructor with create_artificial_method.
19536 (java_check_methods): Removed unnecessary empty line.
19537 (create_artificial_method, start_artificial_method_body,
19538 end_artificial_method_body): New functions.
19539 (java_layout_classes): Changed leading comment. Reverse fields
19540 list if necessary. Always layout java.lang.Object if being
19541 defined.
19542 (java_complete_expand_methods): Verify constructor circularity.
19543 (java_complete_expand_method): Call fix_constructor on
19544 constructors. Local variable no_ac_found removed. Restore
19545 bindings if method body expansion failed.
19546 (fix_constructors, verify_constructor_super,
19547 generate_field_initialization_code): New function.
19548 (java_expand_classes): Fixed leading comment. Write class file
19549 here.
19550 (resolve_expression_name): Check for illegal instance variable
19551 usage within the argument scope of an explicit constructor
19552 invocation.
19553 (resolve_qualified_expression_name): Pass extra from_super flag
19554 when invoking patch_method_invocation_stmt. New case for
19555 conditional expression when used as a primary. Check for error
19556 when acquiring super.
19557 (patch_method_invocation_stmt): Added extra argument super. New
19558 local variable is_static_flag. Set class_to_search according to
19559 the nature of the constructor invocation. Don't add `this'
19560 argument when expanding NEW_CLASS_EXPR. Check for illegal method
19561 invocation within the argument scope of explicit constructor
19562 invocation. Set is_static according to is_static_flag. Provide
19563 extra `super' argument to patch_invoke invocation.
19564 (patch_invoke): New argument from_super. Loop on arguments
19565 indentation fixed. Pass from_super to invocation_mode. New switch
19566 case INVOKE_SUPER. Fixed error message in switch default case.
19567 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
19568 value.
19569 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
19570 (lookup_method_invoke): Fixed prototypes in candidates list. Error
19571 message takes constructors into account.
19572 (find_applicable_accessible_methods_list): Fixed indentation.
19573 (qualify_ambiguous_name): Take explicit constructor invocation
19574 into account. Deal with a conditional expression as a primary to
19575 a method call.
19576 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
19577 case. Added extra argument to patch_method_invocation_stmt.
19578 Register calls made to explicit constructor `this'. Don't call
19579 save_expr in ARRAY_REF case when emitting class files. Check for
19580 illegal use of this when expanding explicit constructor invocation
19581 arguments.
19582 (complete_function_arguments): Set and reset parser context
19583 explicit_constructor_p field value when appropriate.
19584 (build_super_invocation, build_this_super_qualified_invocation):
19585 New functions.
19586 (patch_assignment): Fixed typo.
19587 (patch_unaryop): Check on final fields occurs only when a decl
19588 exits.
19589 (patch_return): Take constructors into account.
19590 (patch_conditional_expr): New function.
19591 * typeck.c (build_java_signature): Removed unnecessary empty line.
19592
19593 1998-10-28 Jeffrey A Law (law@cygnus.com)
19594
19595 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
19596
19597 1998-10-28 Tom Tromey <tromey@cygnus.com>
19598
19599 * decl.c (init_decl_processing): Renamed fields.
19600 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
19601 interface_len, msize fields.
19602
19603 * class.c (make_class_data): Removed subclass_head and
19604 subclass_next fields.
19605 * decl.c (init_decl_processing): Removed subclass_head and
19606 subclass_next fields.
19607
19608 1998-10-28 Jeffrey A Law (law@cygnus.com)
19609
19610 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
19611 * mangle.c (emit_unicode_mangled_name): Similarly.
19612
19613 1998-10-26 Nick Clifton <nickc@cygnus.com>
19614
19615 * jcf-parse.c (get_constant): Place braces around code to compute
19616 'd' when REAL_ARITHMETIC is not defined.
19617
19618 1998-10-25 H.J. Lu (hjl@gnu.org)
19619
19620 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
19621 dependency.
19622
19623 1998-10-23 Tom Tromey <tromey@cygnus.com>
19624
19625 * lang-specs.h: `.zip' files are input to jc1.
19626
19627 1998-10-22 Per Bothner <bothner@cygnus.com>
19628
19629 * jvspecs.c: Add (but don't enable) support for combining multiple
19630 .class and .java input filenames to a single jc1 invocation.
19631 Add support for -C flag (copile to .class files).
19632 Translate -classpath and -CLASSPATH arguments.
19633 * lang-specs.h: Don't set %2 spec.
19634
19635 1998-10-22 Tom Tromey <tromey@cygnus.com>
19636
19637 * jcf-path.c (add_entry): Don't add trailing separator if entry is
19638 a .zip file.
19639 (add_path): Don't add trailing separator to non-empty path
19640 elements.
19641
19642 * lang.c (lang_decode_option): Check for -fclasspath and
19643 -fCLASSPATH before examining other `-f' options.
19644
19645 * java-tree.h (finalize_identifier_node): Don't declare.
19646 * class.c (make_class_data): Don't push "final" field.
19647 * decl.c (init_decl_processing): Don't push "final" field.
19648 (finalize_identifier_node): Removed.
19649 (init_decl_processing): Don't set finalize_identifier_node.
19650
19651 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
19652
19653 1998-10-11 Anthony Green <green@cygnus.com>
19654
19655 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
19656 (JV_SCAN_SOURCES): New macro.
19657 (JCF_DUMP_SOURCES): Likewise.
19658 (jcf-dump$(exeext)): New target.
19659 (jv-scan$(exeext)): New target.
19660
19661 1998-10-22 Tom Tromey <tromey@cygnus.com>
19662
19663 * Makefile.in (LEX): Removed.
19664 (LEXFLAGS): Likewise.
19665 (SET_BISON): New macro.
19666 (BISON): Removed.
19667 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
19668 spurious diffs in parse.c.
19669 ($(PARSE_SCAN_C)): Likewise.
19670 (PARSE_DIR): New macro.
19671 (PARSE_C): Use it.
19672 (PARSE_SCAN_C): Likewise.
19673 (PARSE_RELDIR): New macro.
19674
19675 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
19676
19677 * jcf-io.c (find_class): Use saw_java_source to determine when to
19678 look for `.java' file.
19679 * jcf-parse.c (saw_java_source): New global.
19680 (yyparse): Set it if `.java' file seen.
19681
19682 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
19683 (GCJH_SOURCES): Likewise.
19684 * Makefile.in (datadir): New macro.
19685 (libjava_zip): Likewise.
19686 (JAVA_OBJS): Added jcf-path.o.
19687 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19688 (../gcjh$(exeext)): Likewise.
19689 (jcf-path.o): New target.
19690 * java-tree.h (fix_classpath): Removed decl.
19691 * jcf-parse.c (fix_classpath): Removed.
19692 (load_class): Don't call fix_classpath.
19693 * parse.y (read_import_dir): Don't call fix_classpath.
19694 * lex.h: Don't mention classpath.
19695 * lex.c (java_init_lex): Don't initialize classpath.
19696 * jcf-io.c (classpath): Removed global.
19697 (find_class): Use jcf_path iteration functions. Correctly search
19698 class path for .java file.
19699 (open_in_zip): New argument `is_system'.
19700 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
19701 classpath-related options.
19702 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
19703 and -I.
19704 (lang_init): Call jcf_path_init.
19705 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
19706 * lang-specs.h: Handle -I. Minor cleanup to -M options.
19707 Correctly put braces around second string in each entry.
19708 * gjavah.c (main): Call jcf_path_init. Recognize all the new
19709 classpath-related options.
19710 (help): Updated for new options.
19711 * jcf.h: Declare functions from jcf-path.c. Don't mention
19712 `classpath' global.
19713 * jcf-path.c: New file.
19714
19715 * jcf-depend.c: Include jcf.h.
19716
19717 * jcf-write.c (localvar_alloc): Returns `void'.
19718 (localvar_free): Removed unused variable.
19719
19720 * lang.c (OBJECT_SUFFIX): Define if not already defined.
19721 (init_parse): Use OBJECT_SUFFIX, not ".o".
19722
19723 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
19724
19725 * class.c (emit_register_classes): Renamed from
19726 emit_register_class.
19727 * java-tree.h (emit_register_classes): Prototype renamed from
19728 emit_register_class.
19729 * jcf-parse.c (yyparse): Call emit_register_classes once before
19730 returning.
19731 * parse.y (java_expand_classes): No longer register classes.
19732
19733 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
19734
19735 * class.c (is_compiled_class): New local variable
19736 seen_in_zip. Identify classes found in currently compiled source
19737 file(s).
19738 * decl.c (complete_start_java_method): Fixed typo.
19739 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
19740 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
19741 (CLASS_P): Moved around.
19742 (java_parse_abort_on_error): Macro moved from jcf-parse.c
19743 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
19744 java-tree.h
19745 (jcf_parse_source): Changed leading comment. Removed unnecessary
19746 fclose and CLASS_FROM_SOURCE_P marking.
19747 (parse_source_file): New local variables remember_for_generation
19748 and filename. Mark parsed file name identifier node. Removed block
19749 executed when parse_only was null. Set remember_for_generation.
19750 Use it as an argument to java_pop_parser_context.
19751 (yyparse): New local variables several_files, list, next node and
19752 current_file_list. Split ampersand separated file names into
19753 current_file_list. Iterate through the list and parse accordingly.
19754 * parse.h (java_pop_parser_context): New function prototype.
19755 * parse.y (ctxp_for_generation): New static global variable.
19756 (java_pop_parser_context): New argument generate. Link popped ctxp
19757 to ctxp_for_generation list accordingly.
19758 (java_complete_expand_methods): Fixed indentation.
19759 (java_expand_classes): New function.
19760
19761 1998-10-17 Per Bothner <bothner@cygnus.com>
19762
19763 * Makefile.in: Link with libiberty.a instead of memmove.o.
19764
19765 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
19766
19767 * lex.c (setjmp.h): No longer included.
19768 * lex.h (setjmp.h): Included.
19769 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
19770 (duplicate_declaration_error_p): Renamed from
19771 duplicate_declaration_error.
19772 (build_array_from_name): New function prototype.
19773 * parse.y (setjmp.h): No longer included.
19774 (variable_declarator_id): Define action.
19775 (build_array_from_name): New function.
19776 (duplicate_declaration_error_p): Renamed from
19777 duplicate_declaration_error. Fixed leading comment.
19778 (register_fields): Main `for' loop reorganized. Uses
19779 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
19780 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
19781 build_array_from_name.
19782 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
19783 types.
19784 (read_import_dir): Don't try to skip `.' and `..'.
19785 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
19786 build_array_from_name. Main `for' loop reorganized.
19787 (resolve_qualified_expression_name): When building access to a
19788 field, use the type where the field was found, not its own type.
19789 (maybe_access_field): Use field DECL_CONTEXT if the type where the
19790 field was found is null.
19791 (qualify_ambiguous_name): Sweep through all successive array
19792 dimensions.
19793
19794 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
19795
19796 * java-tree.h (pop_labeled_block, lang_printable_name,
19797 maybe_add_interface, set_super_info, get_access_flags_from_decl,
19798 interface_of_p, inherits_from_p, fix_classpath,
19799 complete_start_java_method, emit_handlers, init_outgoing_cpool,
19800 make_class_data, register_class, alloc_name_constant): New
19801 function prototypes.
19802 * lang.c (lang_decode_option): Set argc argument unused. Fixed
19803 indentation. Added cast to remove warning.
19804 (lang_printable_name): Set v argument unused.
19805 (lang_print_error): Added argument to lang_printable_name call.
19806 (java_dummy_print, print_lang_decl, print_lang_type,
19807 print_lang_identifier, lang_print_xnode): All argument marked
19808 unused.
19809 * lex.c (java_unget_unicode): Removed unnecessary argument.
19810 (java_allocate_new_line): Unused local variable is gone.
19811 (java_read_char): Added parenthesis in expressions to remove
19812 warnings. Added final return statement.
19813 (java_read_unicode): Added parenthesis in expression to remove
19814 warning.
19815 (java_parse_end_comment): Fixed java_unget_unicode invocation.
19816 (java_parse_escape_sequence): Likewise.
19817 (java_lex): Unused local variables are gone. Fixed
19818 java_unget_unicode invocation.
19819 * lex.h (set_float_handler): Prototype added when JC1_LITE not
19820 defined.
19821 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19822 lang_printable_name invocation in macro.
19823 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19824 Likewise.
19825 (duplicate_declaration_error): Suppressed unused argument in
19826 prototype.
19827 (identical_subpath_p): Function declaration is gone.
19828 (patch_invoke): Suppressed unused argument in prototype.
19829 (patch_cast, build_labeled_block, check_thrown_exceptions):
19830 Likewise.
19831 * parse.y (setjmp.h): Included
19832 (toplev.h): Likewise.
19833 (field_declaration:): Suppressed unused local
19834 (label_decl:): Fixed build_labeled_block invocation.
19835 (java_pop_parser_context): Put extra parenthesis around assignment
19836 in if.
19837 (yyerror): Suppressed unused local variables.
19838 (variable_redefinition_error): Fixed lang_printable_name
19839 invocation.
19840 (create_interface): Suppressed unused local variables.
19841 (create_class): Likewise.
19842 (duplicate_declaration_error): Suppressed unused argument. Fixed
19843 lang_printable_name invocation.
19844 (register_fields): Suppressed unused local variable. Fixed
19845 duplicate_declaration_error invocation.
19846 (method_header): Suppressed unused local variable.
19847 (method_declarator, parser_check_super): Likewise.
19848 (java_complete_class): Suppressed unused local variable. Fixed
19849 fatal error message.
19850 (complete_class_report_errors): Added default: in switch.
19851 (java_check_regular_methods): Fixed lang_printable_name
19852 invocations.
19853 (check_throws_clauses): Likewise.
19854 (java_check_abstract_methods): Suppressed unused local
19855 variable. Fixed lang_printable_name invocation.
19856 (read_import_entry): Added supplemental return statement.
19857 (read_import_dir): Suppressed unused local variables.
19858 (check_pkg_class_access, declare_local_variables): Likewise.
19859 (source_start_java_method): Suppressed unused extern variable
19860 declarations
19861 (expand_start_java_method): Suppressed unused extern and local
19862 variable declarations.
19863 (java_complete_expand_methods): Likewise.
19864 (java_complete_expand_method): Suppressed unused local variables.
19865 (make_qualified_name): Likewise.
19866 (resolve_qualified_expression_name): Added default: in
19867 switch. Fixed lang_printable_name invocation.
19868 (class_instance_creation_expression): Added parenthesis around
19869 expressions.
19870 (patch_method_invocation_stmt): Fixed lang_printable_name and
19871 patch_invoke invocations.
19872 (check_for_static_method_reference): Fixed lang_printable_name
19873 invocation.
19874 (patch_invoke): Suppressed unused arguments and local variables.
19875 (lookup_method_invoke): Suppressed unused local variables.
19876 (qualify_ambiguous_name): Added default: in switch.
19877 (identical_subpath_p): Function removed.
19878 (patch_assignment): Suppressed unused local variables. Suppressed
19879 unnecessary if statement. Fixed lang_printable_name invocations.
19880 (try_builtin_assignconv): Fixed lang_printable_name invocations.
19881 (valid_ref_assignconv_cast_p): Parenthesis around
19882 expression. Suppressed unused local variables.
19883 (build_binop): Suppressed unused local variables. fixed
19884 lang_printable_name invocations.
19885 (string_constant_concatenation): Suppressed unused local
19886 variables.
19887 (patch_unaryop): Fixed lang_printable_name invocation.
19888 (patch_cast): Suppressed unnecessary argument. Fixed
19889 lang_printable_name invocation.
19890 (patch_array_ref): Fixed lang_printable_name invocation.
19891 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19892 (build_labeled_block): Suppressed unused argument.
19893 (generate_labeled_block): Fixed build_labeled_block invocation.
19894 (build_loop_body): Suppressed unused local variables.
19895 (patch_loop_statement): Likewise.
19896 (patch_exit): Fixed lang_printable_name invocation.
19897 (patch_switch_statement): Likewise.
19898 (case_identity): First argument marked unused.
19899 (patch_try_statement): Fixed lang_printable_name invocations.
19900 (patch_synchronized_statement, patch_throw_statement): Likewise.
19901 (check_thrown_exceptions): Fixed check_thrown_exceptions and
19902 lang_printable_name invocations.
19903 (check_thrown_exceptions_do): Suppressed unused argument.
19904
19905 1998-10-14 Tom Tromey <tromey@cygnus.com>
19906
19907 * jcf-write.c (write_classfile): Add output class file as target.
19908 * lang-options.h: Added -MD, -MMD, -M, and -MM.
19909 * jcf.h: Added declarations for dependency-tracking functions.
19910 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19911 * lang.c (lang_decode_option): Recognize -MD and -MMD.
19912 (finish_parse): Call jcf_dependency_write.
19913 (dependency_tracking): New global.
19914 (DEPEND_SET_FILE): New define.
19915 (DEPEND_ENABLE): New define.
19916 (init_parse): Enable dependency tracking if required.
19917 Include "flags.h".
19918 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19919 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19920 (../gcjh$(exeext)): Likewise.
19921 (jcf-depend.o): New target.
19922 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19923 (GCJH_SOURCES): Likewise.
19924 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
19925 dep_name argument.
19926 (find_classfile): Added dep_name argument.
19927 (find_class): Compute name of dependency.
19928 (open_in_zip): Call jcf_dependency_add_file.
19929 * gjavah.c (output_file): No longer global.
19930 (usage): Don't mention "gjavah".
19931 (help): Likewise.
19932 (java_no_argument): Likewise.
19933 (version): Likewise.
19934 (main): Recognize and handle -M family of options.
19935 (print_mangled_classname): Return is void.
19936 (process_file): Handle case where output is suppressed.
19937 (HANDLE_END_FIELD): Likewise.
19938 (HANDLE_METHOD): Likewise.
19939 * jcf-depend.c: New file.
19940
19941 1998-10-13 Jeffrey A Law (law@cygnus.com)
19942
19943 * java-tree.def: Add missing newline at EOF.
19944
19945 1998-10-13 Tom Tromey <tromey@cygnus.com>
19946
19947 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19948 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
19949 function.
19950 Include <config.h> and "system.h".
19951 (disassemble_method): Undefine RET to avoid clash with
19952 config/i386/i386.h.
19953
19954 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
19955
19956 * decl.c (runtime_exception_type_node, error_exception_type_node):
19957 New global variables.
19958 (init_decl_processing): Initialized.
19959 * expr.c (java_lang_expand_expr): Set caught exception type to
19960 null if catch handler argument doesn't exit.
19961 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19962 tree codes.
19963 * java-tree.h (runtime_exception_type_node,
19964 error_exception_type_node): Global variables declared.
19965 (DECL_FUNCTION_THROWS): New macro.
19966 (DECL_FUNCTION_BODY): Modified comment.
19967 (DECL_SPECIFIC_COUNT): Likewise.
19968 (struct lang_decl): New field throws_list.
19969 (IS_UNCHECKED_EXPRESSION_P): New macro.
19970 * lex.c (java_lex): Generate location information for THROW_TK.
19971 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19972 EXCEPTIONS_P): New macros.
19973 (enum jdep_code): New value JDEP_EXCEPTION.
19974 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19975 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19976 PATCH_METHOD_RETURN_ERROR): New macros.
19977 (patch_method_invocation_stmt): Added new argument to prototype.
19978 (patch_synchronized_statement, patch_throw_statement,
19979 check_thrown_exceptions, check_thrown_exceptions_do,
19980 purge_unchecked_exceptions, check_throws_clauses): New function
19981 prototypes.
19982 * parse.y Fixed typo in keyword section.
19983 (throw:): Rule tagged <node>.
19984 (THROW_TK): Keyword tagged <operator>.
19985 (method_header:): Last argument to call to method_header passed
19986 from throws: rule.
19987 (throws:, class_type_list:, throw_statement:,
19988 synchronized_statement:, synchronized:): Defined actions.
19989 (method_header): New local variable current. Register exceptions
19990 from throws clause.
19991 (java_complete_tree): Complete and verify exceptions from throws
19992 clause.
19993 (complete_class_report_errors): Error message on exceptions not
19994 found
19995 (java_check_regular_methods): Fixed typo. Shortcut on private
19996 overriding methods. Changed error message on method
19997 redefinition. Check for throws clause compatibility.
19998 (check_throws_clauses): New function.
19999 (java_check_abstract_methods): Use DECL_NAME for wfl or current
20000 method. Changed error message on method redefinition.
20001 (currently_caught_type_list): New static variable.
20002 (java_complete_expand_methods): Purge unchecked exceptions from
20003 throws clause list. Call PUSH_EXCEPTIONS before walk and
20004 POP_EXCEPTIONS after.
20005 (resolve_qualified_expression_name): Pass new argument as NULL to
20006 patch_method_invocation_stmt.
20007 (patch_method_invocation_stmt): New argument ref_decl. Invoke
20008 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
20009 argument list when appropriate. Use new argument if non null to
20010 store selected method decl.
20011 (patch_invoke): Convert if necessary args of builtin types before
20012 forming CALL_EXPR. Argument list no longer reversed here.
20013 (invocation_mode): Treat final methods as static methods.
20014 (java_complete_tree): New cases for THROW_EXPR: and
20015 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
20016 function call.
20017 (complete_function_arguments): No more RECORD_TYPE
20018 conversion. Function parameter nodes no longer saved.
20019 (valid_ref_assignconv_cast_p): Avoid handling null type.
20020 (patch_binop): Fixed null constant reference handling.
20021 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
20022 BUILD_THROW macros.
20023 (patch_try_statement): Fixed comments. Record caught types in
20024 list, push the list, expand try block and pop the list.
20025 (patch_synchronized_statement, patch_throw_statement,
20026 check_thrown_exceptions, check_thrown_exceptions_do,
20027 purge_unchecked_exceptions): New functions.
20028 * typeck.c (lookup_argument_method): Allow WFL in place of method
20029 DECL_NAME during method definition check
20030
20031 1998-10-09 Tom Tromey <tromey@cygnus.com>
20032
20033 * gjavah.c (decode_signature_piece): New function.
20034 (print_c_decl): Use it. Added `name_override' argument.
20035 (print_method_info): Use name_override argument to print_c_decl.
20036 (seen_fields): Removed.
20037 (print_field_info): Don't update seen_fields.
20038 (struct method_name): New structure.
20039 (method_name_list): New global.
20040 (print_method_info): Add new method to list of methods.
20041 (name_is_method_p): New function.
20042 (print_field_info): If field name has same name as method, then
20043 change field name.
20044 (process_file): Parse methods before fields.
20045 (field_pass): New global.
20046 (HANDLE_END_FIELD): Take field_pass into account.
20047
20048 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
20049
20050 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
20051 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
20052
20053 1998-10-03 Anthony Green <green@cygnus.com>
20054
20055 * jvspec.c: Fix bug in jvgenmain_spec patch.
20056
20057 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20058
20059 * Makefile.in (lang.o:): Install dependency on java-tree.def.
20060 * decl.c (soft_exceptioninfo_call_node): New global variable.
20061 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
20062 takes extra integer argument. soft_exceptioninfo_call_node
20063 initialized.
20064 * except.c (java_set_exception_lang_code): New function
20065 (method_init_exceptions): Called here.
20066 (prepare_eh_table_type): New function.
20067 (expand_end_java_handler): Called here.
20068 * expr.c (build_java_throw_out_of_bounds_exception): Now features
20069 one argument. Modified generation of call to
20070 soft_badarrayindex_node to use new argument.
20071 (build_java_arrayaccess): Pass faulty index value to
20072 build_java_throw_out_of_bounds_exception.
20073 (generate_name): New function.
20074 (java_lang_expand_expr): New local variables node, current,
20075 has_finally_p. Expand TRY_EXPR node.
20076 (process_jvm_instruction): Replace top of the stack with thrown
20077 object reference when entering exception handler.
20078 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
20079 specific tree codes.
20080 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
20081 global.
20082 (DECL_SPECIFIC_COUNT): New macro.
20083 (prepare_eh_table_type, java_set_exception_lang_code,
20084 generate_name): New function declarations.
20085 (match_java_method): Declaration deleted.
20086 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
20087 macros.
20088 * lex.c (TRY_TK, CATCH_TK): Generate location information.
20089 * parse.h (redefinition_error, refine_accessible_methods_list,
20090 can_cast_to_p): Function declaration removed.
20091 (classitf_redefinition_error, variable_redefinition_error,
20092 parse_jdk1_1_error, find_applicable_accessible_methods_list,
20093 find_most_specific_methods_list, argument_types_convertible,
20094 enter_a_block, valid_builtin_assignconv_identity_widening_p,
20095 valid_cast_to_p, valid_method_invocation_conversion_p,
20096 try_reference_assignconv, add_stmt_to_compound,
20097 build_jump_to_finally, build_tree_list, patch_try_statement,
20098 java_get_catch_block): New function declarations.
20099 * parse.y (string_buffer_type): Global variable deleted.
20100 (group_of_labels, catches, catch_clause, catch_clause_parameter,
20101 finally): Rules tagged <node>.
20102 (TRY_TK, CATCH_TK): Token tagged <operator>.
20103 (class_body_declaration:, class_member_declaration:,
20104 formal_parameter:, explicit_constructor_invocation:,
20105 interface_member_declaration:, constant_declaration:,
20106 primary_no_new_array:, class_instance_creation_expression:,
20107 array_creation_expression:): Issue error on unsuported JDK1.1
20108 features.
20109 (try_statement:, catches:, finally:): Define actions.
20110 (catch_clause_parameter): New rule.
20111 (catch_clause:): Use new rule catch_clause_parameter.
20112 (parse_jdk1_1_error): New function.
20113 (redefinition_error): Renamed classitf_redefinition_error.
20114 (variable_redefinition_error): New function.
20115 (check_class_interface_creation): Call
20116 classitf_redefinition_error.
20117 (java_complete_tree): Added error message on JDEP_TYPE: case.
20118 (complete_class_report_errors): Fixed indentation.
20119 (declare_local_variables): Call variable_redefinition_error.
20120 (source_end_java_method): Call java_set_exception_lang_code and
20121 emit_handlers where appropriate.
20122 (java_method_add_stmt): Call add_stmt_to_block.
20123 (add_stmt_to_block): New function.
20124 (lookup_method_invoke): Fixed outside comment. new local variable
20125 candicates. Call find_applicable_accessible_methods_list and
20126 find_most_specific_methods_list when searching for a
20127 method. Modified error report to list possible candidates when
20128 applicable.
20129 (find_applicable_accessible_methods_list,
20130 find_most_specific_methods_list, argument_types_convertible): New
20131 function.
20132 (refine_accessible_methods_list): Function deleted.
20133 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
20134 expr (if applicable) before calling patch_array_ref.
20135 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
20136 (enter_block): Fixed comment.
20137 (enter_a_block): New function.
20138 (patch_assignment): Reorganized. Call try_reference_assignconv for
20139 references. Call valid_cast_to_p instead of can_cast_to_p.
20140 (try_reference_assignconv,
20141 valid_builtin_assignconv_identity_widening_p): New functions.
20142 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
20143 (valid_cast_to_p, valid_method_invocation_conversion_p): New
20144 functions.
20145 (build_string_concatenation): Don't resolve StringBuffer.
20146 (patch_cast): Fixed inverted arguments.
20147 (patch_array_ref): Code to save array expr deleted. Call
20148 valid_cast_to_p instead of can_cast_to_p.
20149 (generate_labeled_block): Call generate_name.
20150 (build_jump_to_finally, build_try_statement, java_get_catch_block,
20151 patch_try_statement): New functions.
20152 * typeck.c (match_java_method): Function deleted.
20153
20154 1998-10-02 Anthony Green <green@cygnus.com>
20155
20156 * jvspec.c: jvgenmain_spec uses different temporary file names.
20157
20158 1998-10-02 Anthony Green <green@cygnus.com>
20159
20160 * jvspec.c (lang_specific_driver): Fail if user specifies
20161 --main= when not linking.
20162
20163 1998-09-28 Tom Tromey <tromey@cygnus.com>
20164
20165 * class.c (make_class_data): Push value for `thread' field.
20166 * decl.c (init_decl_processing): Added `thread' field to class.
20167
20168 * class.c (add_field): Always make static fields externally
20169 visible.
20170
20171 1998-09-26 Anthony Green <green@cygnus.com>
20172
20173 * expr.c (build_java_athrow,
20174 build_java_throw_out_of_bounds_exception, expand_invoke,
20175 build_newarray, expand_java_multianewarray, build_java_monitor):
20176 Update comments to reflect _Jv_* function names.
20177
20178 1998-09-25 Per Bothner <bothner@cygnus.com>
20179
20180 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
20181 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
20182 * parse.y (expand_start_java_method): Likewise.
20183
20184 1998-09-24 Per Bothner <bothner@cygnus.com>
20185
20186 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
20187
20188 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
20189 (add_field): No longer need to convert from RECORD_TYPE to pointer,
20190 * expr.c: Remove no-longer-needed calls to promote_type.
20191 * decl.c (give_name_to_locals): Liekwise.
20192 * jcf-parse.c (get_class_constant): Compensate for new signatures.
20193 * parse.y: Add/remove promote_type calls as appropriate.
20194 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
20195 (parse_signature_string): Likewise.
20196 (build_java_array_type): Fix for now signature convenions.
20197
20198 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
20199
20200 1998-09-23 Tom Tromey <tromey@cygnus.com>
20201
20202 * class.c (init_class_processing): libjava function renamed to
20203 _Jv_RegisterClass.
20204
20205 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
20206
20207 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
20208 * java-tree.def: Fixed DEFTREECODE third argument.
20209 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
20210 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
20211 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
20212 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20213 JAVA_THIS_EXPR): Now replaced by tree code definitions.
20214 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
20215 * lang.c (java_tree_code_type, java_tree_code_length,
20216 java_tree_code_name): New arrays.
20217 (lang_init): Append Java tree node definitions to Gcc ones.
20218 * lex.c (expression_obstack): Declared as extern when JC1_LITE
20219 defined.
20220 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
20221 wfl_to_string.
20222 (java_lex): Allow declaration of empty string constants. Retain
20223 location information on CASE_TK and DEFAULT_TK.
20224 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
20225 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
20226 Modified to be more robust.
20227 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
20228 (build_new_invocation, try_builtin_assignconv,
20229 patch_switch_statement, string_constant_concatenation,
20230 build_string_concatenation, patch_string_cst, patch_string,
20231 java_expand_switch): New function declarations.
20232 * parse.y: Rules related to switch and EH tagged <node>.
20233 (label_id): Set to NULL_TREE
20234 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
20235 tree nodes.
20236 (this_or_super:): Fixed indentation.
20237 (statement:, statement_nsi:, statement_without_trailing_substatement:,
20238 statement_expression:): Removed call to RULE on all sub-rules.
20239 (switch_expression:, switch_labels:): New rules.
20240 (switch_statement:, switch_block:, switch_block_statement_groups:,
20241 switch_block_statement_group:, switch_labels:, switch_label:):
20242 Defined actions.
20243 (throw_statement:, synchronized_statement:, try_statement:):
20244 Defined temporary actions.
20245 (class_instance_creation_expression:): Call
20246 build_new_invocation. Fixed indentation.
20247 (field_access): Fixed indentation.
20248 (method_invocation): Likewise.
20249 (make_qualified_primary): Use THIS_EXPR.
20250 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
20251 resolving from SUPER, set *type_found.
20252 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
20253 (java_complete_tree): Removed unused local variable `location'. Case
20254 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
20255 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
20256 on MODIFY_EXPR: and all binary operator tree code cases. Removed
20257 STRING_CST: case. default: checks for patchable strings.
20258 (complete_function_arguments): Transform string constant or
20259 crafted StringBuffer if necessary.
20260 (build_method_invocation): Fixed comments.
20261 (build_new_invocation): New function.
20262 (patch_assignment): Call try_builtin_assignconv to figure a valid
20263 assignment conversion between builtin types.
20264 (try_builtin_assignconv): New function.
20265 (build_binop): Use URSHIFT_EXPR directly to call build.
20266 (operator_string): Use UNARY_PLUS_EXPR.
20267 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
20268 operator.
20269 (do_merge_string_cste, merge_string_cste,
20270 string_constant_concatenation, build_string_concatenation,
20271 patch_string, patch_string_cst): New function.
20272 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
20273 (patch_unaryop): Likewise. New test of valid ++/-- operands.
20274 (build_newarray_node): Use NEW_ARRAY_EXPR.
20275 (build_this): Use THIS_EXPR.
20276 (build_return): Enable debug information on return statement.
20277 (build_if_else_statement): Likewise.
20278 (complete_labeled_statement): Fixed related comment.
20279 (build_loop_body): Fixed comment.
20280 (build_bc_statement): Enable debug information on break/continue
20281 statements.
20282 (patch_bc_statement): Fixed typos. Handle SWITCH statement
20283 context.
20284 (patch_switch_statement, case_identity, java_expand_switch): New
20285 functions.
20286
20287 1998-09-21 Per Bothner <bothner@cygnus.com>
20288
20289 * buffer.h (BUFFER_INIT): New macro.
20290 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
20291 Pass (struct jcf_partial *state) to most functions.
20292 (jcf_block, jcf_relocation): New types.
20293 Support labels, branches, conditionals, loops.
20294
20295 1998-09-21 Tom Tromey <tromey@cygnus.com>
20296
20297 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
20298
20299 1998-09-21 Per Bothner <bothner@cygnus.com>
20300
20301 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
20302 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
20303 not integer_type_node (INT_TYPE_SIZ bits).
20304
20305 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
20306
20307 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
20308 * jcf-dump.c (print_exception_table): New function.
20309 (disassemble_method): Better handling of wide instructions.
20310 Make more robust for bad input.
20311
20312 1998-09-30 Jeffrey A Law (law@cygnus.com)
20313
20314 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
20315 FreeBSD.
20316
20317 1998-09-17 Jeffrey A Law (law@cygnus.com)
20318
20319 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
20320
20321 1998-09-17 Tom Tromey <tromey@cygnus.com>
20322
20323 * Makefile.in ($(PARSE_H)): Removed target.
20324
20325 1998-09-17 Jeffrey A Law (law@cygnus.com)
20326
20327 * Makefile.in (JAVA_OBJS): Add memmove.o
20328 (memmove.o): New target & rules.
20329
20330 1998-09-15 Tom Tromey <tromey@cygnus.com>
20331
20332 * expr.c (expand_invoke): Don't generate a call to the class init
20333 code.
20334
20335 1998-09-14 Jeffrey A Law (law@cygnus.com)
20336
20337 * Makefile.in: Add many missing dependencies.
20338 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
20339 as appropriate.
20340 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
20341 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
20342
20343 1998-09-11 Per Bothner <bothner@cygnus.com>
20344
20345 * decl.c (complete_start_java_method): If method is static (and
20346 not private) call _Jv_InitClass.
20347 * expr.c (expand_invoke): Don't call build_class_init.
20348
20349 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
20350
20351 1998-09-10 Jeffrey A Law (law@cygnus.com)
20352
20353 * Make-lang.in (GCJ): Define before using.
20354
20355 1998-09-09 Jeffrey A Law (law@cygnus.com)
20356
20357 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
20358 losing due to namespace pollution in GNU getopt.h
20359
20360 1998-09-09 Tom Tromey <tromey@cygnus.com>
20361
20362 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
20363 (java.all.cross): Likewise.
20364 (java.rest.encap): Likewise.
20365
20366 1998-09-08 Jeffrey A Law (law@cygnus.com)
20367
20368 * gjavah.c (print_class_decls): Fix thinko in arglist
20369 * jcv-io.c (find_classfile): Similarly.
20370
20371 1998-09-07 Jeffrey A Law (law@cygnus.com)
20372
20373 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
20374
20375 1998-09-05 Tom Tromey <tromey@cygnus.com>
20376
20377 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
20378 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
20379 * Makefile.in (PARSE_C): New macro.
20380 (PARSE_H): Likewise.
20381 (PARSE_SCAN_C): Likewise.
20382 ($(PARSE_C)): Target renamed from parse.c.
20383 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
20384 (clean): Remove parse-scan.c as well.
20385 (parse.o): Depend on $(PARSE_C).
20386
20387 1998-09-05 Anthony Green <green@cygnus.com>
20388
20389 * README, license.terms: Removed.
20390
20391 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
20392 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
20393 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
20394 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
20395 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
20396 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
20397 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
20398 and Java trademark attribution.
20399
20400 1998-09-04 Tom Tromey <tromey@cygnus.com>
20401
20402 * Makefile.in: Use gcjh, not gjavah.
20403 * config-lang.in (stagestuff): Use gcjh, not gjavah.
20404 * Make-lang.in: Changed gjavah to gcjh everywhere.
20405
20406 1998-09-03 Per Bothner <bothner@cygnus.com>
20407
20408 * gjavah.c: Support new -prepend -add -append flags.
20409 (print_method_info): Method is not virtual if class is final.
20410
20411 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
20412
20413 * jv-scan.c: Fixed copyright assignment.
20414 * keyword.gperf: Likewise.
20415 * keyword.h: Likewise.
20416 * lex.c: Fixed copyright assignment.
20417 (java_lex): Push unicode back when parsing '<'.
20418 * lex.h: Fixed copyright assignment.
20419 * parse-scan.y: Likewise.
20420 * parse.h: Fixed copyright assignment.
20421 (build_debugable_stmt, complete_for_loop): New function prototypes.
20422 * parse.y: Fixed copyright assignment.
20423 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
20424 size_zero_node when completing a loop with no exit condition.
20425 (for_statement_nsi:): Define action.
20426 (for_init:, for_update:): Return size_zero_node when empty.
20427 (declare_local_variables): Call build_debugable_stmt.
20428 (build_debugable_stmt): New function.
20429 (build_loop_body): Build debugable statement around loop
20430 condition part.
20431 (complete_loop_body): Take into account the debugable statement
20432 around the EXIT_EXPR.
20433 (complete_loop_body): New function.
20434 (patch_exit_expr): Fixed condition inversion.
20435
20436 1998-09-02 Tom Tromey <tromey@cygnus.com>
20437
20438 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
20439 name of thread define.
20440 * jvspec.c (THREAD_NAME): New macro.
20441 (GCLIB): Likewise.
20442 (THREADLIB): Likewise.
20443 (lang_specific_driver): Recognize attempt to link with thread
20444 library or gc library. Recognize -ljava on command line so it
20445 isn't linked against more than once.
20446
20447 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
20448
20449 * parse-scan.y (report_main_declaration): Name of the class
20450 containing `main' can be a qualified name.
20451
20452 1998-08-31 Tom Tromey <tromey@cygnus.com>
20453
20454 * config-lang.in: Changed gjavac to gjc everywhere.
20455 * Make-lang.in: Changed gjavac to gjc everywhere.
20456
20457 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20458
20459 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
20460 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
20461 and install the files.
20462 * Makefile.in (JAVA_OBJS_LITE): New variable.
20463 (compiler:): Now include jv-scan as a dependency.
20464 (../jv-scan$(exeext), parse-scan.c): New targets.
20465 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
20466 * config-lang.in (compilers): Removed gcj, gjavah from the list.
20467 * jcf-parse.c (parse_source_file): Call java_layout_classes and
20468 check for errors even if parse_only.
20469 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
20470 defined.
20471 (yylex): New function. Uses java_lex body.
20472 (java_lex): Removed commented out statement. Remove local variable
20473 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
20474 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
20475 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
20476 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
20477 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
20478 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
20479 where appropriate.
20480 (java_lex_error): Empty if JC1_LITE is defined.
20481 (java_get_line_col): Return 0 if JC1_LITE is defined.
20482 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
20483 SET_MODIFIER_CTX): Moved into the section containing the macros
20484 conditionally defined by JC1_LITE.
20485 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
20486 argument if JC1_LITE is defined.
20487 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
20488 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
20489 is defined.
20490 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
20491 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
20492 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
20493 to different values according to JC1_LITE.
20494 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
20495 declared if JC1_LITE set.
20496 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
20497 defined if JC1_LITE not set.
20498 (struct parser_ctx): Reorganized and skip the jc1 front end part
20499 if JC1_LITE set.
20500 (java_layout_classes): New function definition.
20501 (java_push_parser_context, java_init_lex, yyparse, yylex,
20502 yyerror): Prototype always declared. All other static function
20503 prototypes declared only if JC1_LITE is not set.
20504 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
20505 declared in parse.h.
20506 (java_layout_classes): New function.
20507 (java_complete_expand_methods): No longer layout the class here.
20508 * parse-scan.y: New file.
20509 * jv-scan.c: New file.
20510
20511 1998-08-25 Tom Tromey <tromey@cygnus.com>
20512
20513 * gjavah.c (main): Handle -friend option.
20514 (friend_specs): New global.
20515 (generate_access): Handle friend_specs.
20516 (process_file): Likewise.
20517 (MAX_FRIENDS): New macro.
20518 (friend_count): New global.
20519 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
20520 Changed all callers.
20521
20522 1998-08-24 Per Bothner <bothner@cygnus.com>
20523
20524 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
20525 (main): Handle processing all the entries of a named .zip archive.
20526 * jcf-io.c (jcf_trim_old_input): New function.
20527 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
20528
20529 1998-08-24 Per Bothner <bothner@cygnus.com>
20530
20531 * lang.c (flag_assume_compiled): Make default be on.
20532
20533 1998-08-21 Per Bothner <bothner@cygnus.com>
20534
20535 * jcf-dump.c: Add bunches of flags to control output more.
20536 (process_class): New function; support printing more than one class.
20537 (main): Support new --print-main and --javap flags.
20538 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
20539 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
20540
20541 1998-08-20 Per Bothner <bothner@cygnus.com>
20542
20543 Change mangling of dispatch table to match C++ vtable (w/thunks).
20544 * class.c (build_dtable_decl), java-tree.h: New function.
20545 (make_class_data): Call it.
20546 * decl.c (init_decl_processing): Likewise.
20547
20548 1998-08-19 Warren Levy <warrenl@cygnus.com>
20549
20550 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
20551 soft_anewarray; adjust args passed.
20552 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
20553 match _Jv_NewObjectArray.
20554
20555 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
20556
20557 * decl.c (push_labeled_block, pop_labeled_block): New functions.
20558 * expr.c (loopup_label): Call create_label_decl.
20559 (create_label_decl): New function.
20560 (java_lang_expand_expr): Call expand_start_bindings with argument
20561 set to zero.
20562 * java-tree.h Added space after PROTO in function declarations
20563 when necessary.
20564 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
20565 (create_label_decl, push_labeled_block): New function
20566 declarations.
20567 * lex.c (label_id): Initialize.
20568 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
20569 switch.
20570 * parse.h Added space after PROTO in function declarations when
20571 necessary.
20572 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
20573 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
20574 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
20575 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
20576 macros.
20577 (struct parser_ctxt): New fields current_loop,
20578 current_labeled_block.
20579 (build_if_else_statement, patch_if_else_statement,
20580 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
20581 generate_labeled_block, complete_labeled_statement,
20582 build_bc_statement, patch_bc_statement, patch_loop_statement,
20583 build_new_loop, build_loop_body, complete_loop_body): New function
20584 declarations.
20585 * parse.y (java_warning_count): New global variable.
20586 (label_id): New static variable.
20587 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
20588 (block:): Return size_zero_node when block is empty.
20589 (empty_statement:): Return size_zero_node.
20590 (statement:): Implement supplemental action when for_statement: is
20591 reduced.
20592 (label_decl:): New rule.
20593 (labeled_statement:): Rewritten using label_decl. Actions
20594 implemented.
20595 (labeled_statement_nsi:): Likewise.
20596 (if_then_statement): Actions implemented.
20597 (while_expression): New rule.
20598 (while_statement:): Rewritten using while_expression. Actions
20599 implemented.
20600 (while_statement_nsi:): Likewise.
20601 (do_statement_begin:): New rule.
20602 (do_statement:): Rewritten using do_statement_begin. Actions
20603 implemented.
20604 (for_statement:): Rewritten using for_begin. Actions implemented.
20605 (for_statement_nsi:): Likewise.
20606 (for_header:, for_begin:): New rules.
20607 (for_init:): Actions implemented.
20608 (statement_expression_list:, break_statement:,
20609 continue_statement:): Likewise.
20610 (yyerror): Count number of issued warning(s).
20611 (java_report_errors): Report error(s) and/or warning(s).
20612 (java_complete_class): Use build_java_argument_signature to
20613 recompute completed method signature.
20614 (java_check_regular_methods): New locals method_wfl and aflags.
20615 Use method_wfl instead of lookup_cl during error reports. Fixed
20616 indentation and modified some error messages. Use
20617 lang_printable_name in method instead of the DECL_NAME. New code
20618 to issue warnings on methods not overriding corresponding methods
20619 private to a different package.
20620 (java_method_add_stmt): Call add_stmt_to_compound.
20621 (add_stmt_to_compound): New function.
20622 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
20623 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
20624 (build_if_else_statement, patch_if_else_statement,
20625 build_labeled_block, generate_labeled_block,
20626 complete_labeled_statement, build_new_loop, build_loop_body,
20627 complete_loop_body, patch_loop_statement, build_bc_statement,
20628 patch_bc_statement, patch_exit_expr): New functions.
20629 * typeck.c (build_java_signature): Build argument signature before
20630 enclosing it in between parenthesis.
20631
20632 1998-08-17 Warren Levy <warrenl@cygnus.com>
20633
20634 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
20635 (JAVA_OBJS): Added reminder comment
20636
20637 1998-08-13 Nick Clifton <nickc@cygnus.com>
20638
20639 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
20640 be interpreted as a long long.
20641
20642 1998-08-13 Warren Levy <warrenl@cygnus.com>
20643
20644 * decl.c (init_decl_processing): Use _Jv_InitClass, not
20645 soft_initialise_class. Use _Jv_NewMultiArray, not
20646 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
20647 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
20648 _Jv_CheckArrayStore, not soft_checkarraystore. Use
20649 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
20650
20651 1998-08-12 Per Bothner <bothner@cygnus.com>
20652
20653 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
20654 length_identifier_node): New global tree node constants.
20655 * parse.y (kw_super, kw_this, kw_length): Removed globals.
20656 Replace uses by super_identifier_node etc.
20657 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
20658
20659 * parse.y (resolve_field_access): Don't special-case ".length" if
20660 flag_emit_class_files.
20661 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
20662 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
20663 and ARRAY.length.
20664
20665 1998-08-11 Per Bothner <bothner@cygnus.com>
20666
20667 * decl.c (init_decl_processing): Remove unused method_type_node fields.
20668 * class.c (make_method_value): Remove init for removed fields.
20669
20670 * class.c (layout_class): Use build_java_argument_signature.
20671 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
20672
20673 * typeck.c (push_java_argument_signature): Removed. Merged into ...
20674 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
20675 (build_java_signature): Don't use push_java_argument_signature.
20676
20677 * typeck.c (lookup_argument_method): New function.
20678 * parse.y (java_check_regular_methods): Use lookup_argument_method
20679 instead of lookup_java_method2 followed by lookup_java_method.
20680
20681 * parse.y (check_method_redefinition): Minor optimization.
20682
20683 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
20684 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
20685
20686 1998-08-10 Tom Tromey <tromey@cygnus.com>
20687
20688 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
20689 c-pragma.o.
20690
20691 * gjavah.c (java_float_finite): Use K&R-style definition.
20692 (java_double_finite): Likewise.
20693 (generate_access): Now returns void. Changed all callers.
20694 (last_access_generated): Removed.
20695 (process_file): Only make a single pass over the .class file.
20696
20697 1998-07-29 Per Bothner <bothner@cygnus.com>
20698
20699 * class.c (get_dispatch_table): Add extra dummy vtable entry,
20700 for compatibility for G++ (with -fvtable-thunks).
20701 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
20702
20703 * gjavah.c (process_file): Use public inheritance for super-class.
20704
20705 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
20706
20707 * lex.c (java_init_lex): Initialize ctxp->package.
20708 * parse.h (struct parser_ctxt): package and package_len replaced
20709 by tree package, an identifier node. Field method_decl_list is
20710 gone. Fixed comments.
20711 (lookup_field_wrapper, merge_qualified_name, not_accessible,
20712 class_in_current_package): New function prototypes.
20713 * parse.y (array_type:): Set class loaded flag on primitive type
20714 arrays.
20715 (package_declaration:): Assign ctxp->package to the
20716 identifier node.
20717 (method_invocation:): Handle invocation of method qualified by
20718 `super'.
20719 (single_type_import_declaration:): Removed ambiguity check.
20720 (java_pop_parser_context): New local variable `next'. Reset and
20721 set IMPORT_CLASSFILE_NAME flags on current and previous import
20722 list.
20723 (java_accstring_lookup): Use new local macro COPY_RETURN.
20724 (lookup_field_wrapper): New function.
20725 (parser_qualified_classname): Use merge_qualified_name.
20726 (parser_check_super_interface): Broaden error message.
20727 (do_resolve_class): Check for qualified class name in the current
20728 compilation unit if appropriate.
20729 (process_imports): Check for already defined classes.
20730 (check_pkg_class_access): Got rid of call to
20731 get_access_flags_from_decl.
20732 (java_complete_expand_methods): Call safe_layout_class based on
20733 the current class size.
20734 (make_qualified_primary): Build a WFL qualification on primary if
20735 none exists.
20736 (merge_qualified_name): New function.
20737 (make_qualified_name): Use merge_qualified_name.
20738 (resolve_expression_name): Use safe_lookup_field.
20739 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
20740 (resolve_qualified_expression_name): Likewise. Check on resolved
20741 element accessibility.
20742 (not_accessible_p, class_in_current_package): New functions.
20743 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
20744 (patch_method_invocation_stmt): Merged common pieces. Check
20745 accessibility of invoked method.
20746 (check_for_static_method_reference): Add returned type in error
20747 message.
20748 (invocation_mode): Get rid of bogus check on PRIVATE methods.
20749 (refine_accessible_methods_list): Merged two conditions in test.
20750 (java_complete_class): Sanity check on stabilize_ref gone.
20751 * zextract.c (read_zip_archive): Cast lseek second argument to long.
20752
20753 1998-07-28 Per Bothner <bothner@cygnus.com>
20754
20755 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
20756
20757 1998-07-24 Tom Tromey <tromey@cygnus.com>
20758
20759 * gjavah.c (F_NAN): Removed.
20760 (F_NAN_MASK): New macro.
20761 (F_POSITIVE_INFINITY): Removed.
20762 (F_NEGATIVE_INFINITY): Likewise.
20763 (java_float_finite): Rewrote.
20764 (D_NAN_MASK): Renamed.
20765 (java_double_finite): Rewrote.
20766 (D_POSITIVE_INFINITY): Removed.
20767 (D_NEGATIVE_INFINITY): Likewise.
20768
20769 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
20770 If verbose, print underlying representation of value in hex.
20771
20772 1998-07-24 Per Bothner <bothner@cygnus.com>
20773
20774 * buffer.h, buffer.c: New files.
20775 * Makefile.in (JAVA_OBJS): Add buffer.o.
20776
20777 Support locals variables and writing their debug entries to .class.
20778 * jcf-write.c: Simplify some by user new buffer type.
20779 (vode_buffer_grow): Removed.
20780 (struct localvar_info): New type.
20781 (localsvars, localvartable): New buffers.
20782 (localvar_alloc, localvar_free): New functions.
20783 (generate_bytecode_insns): Handle local variables.
20784 (generate_classfile): Write LocalVariableTable attribute.
20785
20786 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
20787
20788 * jcf-io.c (open_in_zip): Check the zipfile magic number.
20789 * zipfile.h (ZIPMAGIC): New macro.
20790
20791 1998-07-24 Tom Tromey <tromey@cygnus.com>
20792
20793 * Makefile.in (gjavah.o): Updated dependencies.
20794 (jcf-dump.o): Likewise.
20795 (all.indirect): Use ../gjavah.
20796 (../gjavah$(exeext)): Likewise.
20797 (clean): Don't remove gjavah.
20798 (clean): Remove parse.c, not java/parse.c.
20799 * Make-lang.in (java): Added gjavah.
20800 (gjavah$(exeext)): New target.
20801 (GJAVAH_SOURCES): New macro.
20802 (java.all.build): Added gjavah.
20803 (java.all.cross): Likewise.
20804 (java.rest.encap): Likewise.
20805 * config-lang.in (compilers, stagestuff): Added gjavah.
20806
20807 1998-07-23 Tom Tromey <tromey@cygnus.com>
20808
20809 * gjavah.c (java_float_finite): New function.
20810 (java_double_finite): Likewise.
20811 (F_POSITIVE_INFINITY): New macro.
20812 (F_NEGATIVE_INFINITY): Likewise.
20813 (F_NAN): Likewise.
20814 (D_POSITIVE_INFINITY): Likewise.
20815 (D_NEGATIVE_INFINITY): Likewise.
20816 (D_NAN): Likewise.
20817 (print_field_info): Use java_float_finite and java_double_finite.
20818
20819 1998-07-23 Per Bothner <bothner@cygnus.com>
20820
20821 * parse.y (method_header): Name "this" implicit argument.
20822
20823 1998-07-22 Per Bothner <bothner@cygnus.com>
20824
20825 * jcf-write.c: Write out LineNumberTable attribute in .class file.
20826 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
20827 (put_linenumber): New function.
20828 (generate_bytecode_insns, generate_classfile): Write line numbers.
20829
20830 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
20831
20832 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20833 (lookup_name, build_known_method_ref, build_class_init,
20834 build_invokevirtual, invoke_build_dtable, match_java_method,
20835 build_field_ref, pushdecl_force_head, build_java_binop,
20836 binary_numeric_promotion, build_decl_no_layout,
20837 build_java_arrayaccess, build_newarray, build_anewarray,
20838 build_java_array_length_access, build_java_arraynull_check): New
20839 extern function prototypes.
20840 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20841 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20842 java-tree.h.
20843 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20844 to NULL
20845 * jcf.h (jcf_out_of_synch): New extern function prototype.
20846 * parse.h: Static/global function implemented in parse.y
20847 prototyped and declarations moved at the end of the file.
20848 (DECL_P): Check that the argument isn't null.
20849 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20850 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20851 (QUAL_DECL_TYPE): New macro.
20852 (PARAMS): Macro definition removed.
20853 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20854 (return_statement:): Call build_return.
20855 (field_access:): Call make_qualified_primary in sub rule.
20856 (method_invocation:): Build method invocation and call
20857 make_qualified_primary when processing primaries.
20858 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20859 get_type_from_signature.
20860 (java_check_regular_method): Extra integer 0 argument when calling
20861 lookup_java_method2.
20862 (lookup_java_interface_method2): Extra method DECL argument when
20863 calling lookup_java_interface_method2.
20864 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20865 COMPOUND_EXPR node.
20866 (java_complete_expand_method): Layout current class iff not
20867 already done. Don't process interface's methods.
20868 (java_complete_expand_method): Use super class only if it
20869 exists. Use current class otherwise.
20870 (make_qualified_primary): New function.
20871 (resolve_expression_name): Process qualified expression or
20872 expression from primary the same way.
20873 (resolve_expression_name): Two last arguments to
20874 resolve_field_access are now NULL_TREEs.
20875 (resolve_field_access): New variable is_static. Local field must
20876 be DECLs. is_static computed on field DECLs only. Append code in
20877 where_found to the field access if necessary. Use QUAL_DECL_TYPE
20878 to initialize field_type.
20879 (resolve_qualified_expression_name): New local variable,
20880 previous_call_static and is_static. Handle primaries with function
20881 calls, casts, array references and `this'. `super' now handled as
20882 `(super_class)this'. Use is_static to clarify boolean expressions.
20883 Added code to handle case where a proper handle is required to
20884 access a field. Use QUAL_DECL_TYPE where applicable.
20885 (maybe_access_field): New function.
20886 (patch_method_invocation_stmt): New arguments primary, where,
20887 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20888 deleted. Use `where' as a type to search from if specified. Check
20889 for static method reference where forbidden. Append primary or
20890 current_this to the argument list if not calling constructor nor
20891 static methods.
20892 (check_for_static_method_reference): New function.
20893 (patch_invoke): Layout the class on which new is done if
20894 necessary.
20895 (lookup_method_invoke): Changed format to report errors on
20896 methods.
20897 (qualify_ambiguous_name): New local variable this_found. Now
20898 handle things from primaries. Method call are considered
20899 expression names.
20900 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20901 changed into NULLs.
20902 (not_initialized_as_it_should_p): Comply with the new DECL_P.
20903 (java_complete_tree): New case fo RETURN_EXPR. Process function
20904 call arguments in separate function.
20905 (complete_function_arguments): New function.
20906 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20907 anymore.
20908 (patch_assignment): Take the return function slot into account as
20909 a RHS. Distinguish assignment from a return.
20910 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20911 when checking methods in interfaces.
20912 (resolve_type_during_patch): NULL argument to unresolve_type_p
20913 instead of NULL_TREE.
20914 (patch_newarray): Fixed typo in comment.
20915 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20916 (build_return, patch_return): New functions.
20917 * typeck.c (lookup_java_constructor): Fixed typo in comment.
20918
20919 1998-07-21 Per Bothner <bothner@cygnus.com>
20920
20921 * constants.c (find_name_and_type_constant, find_fieldref_index,
20922 find_methodref_index): New methods.
20923 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
20924 just return given method. Also, rename to build_known_method_ref.
20925 (expand_invoke): Rename call to build_invoke_non_interface.
20926 * java-tree.h, parse.h: Update prototype.
20927 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
20928 (such as expand_expr_stmt) if flag_emit_class_files.
20929 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20930 STACK_TARGET, IGNORE_TARGET): New macros.
20931 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
20932 (generate_bytecode_insn): New function to generate method's bytecode.
20933 (generate_classfile): Node generate Code attribute for a method.
20934 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20935 push_long_const, field_op, adjust_typed_op, maybe_wide):
20936 New functions used by generate_bytecode_insn.
20937
20938 * typeck.c (signature_include_return): Remove variable.
20939 (push_java_argument_signature, build_java_argument_signature): New.
20940 (build_java_signature): Use push_java_argument_signature.
20941 * parse.y: Use build_java_argument_signature instead of fiddling
20942 with signature_include_return.
20943
20944 1998-07-17 Tom Tromey <tromey@cygnus.com>
20945
20946 * gjavah.c (print_c_decl): Always generate JArray<>* for array
20947 types.
20948
20949 * Makefile.in (all.indirect): Added gjavah$(exeext).
20950 (gjavah$(exeext)): Added $(exeext).
20951 (clean): Likewise.
20952
20953 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
20954
20955 * class.c (layout_class): Call to java_layout_parsed_class replace
20956 by safe_layout_class.
20957 * expr.c (build_java_array_length_access): Removed static storage
20958 class in the function definition.
20959 (build_java_arraynull_check): Likewise.
20960 Also fixed typos in two comments.
20961 * lex.c (java_init_lex): Initialize static global kw_length.
20962 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20963 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20964 java_lex_error.
20965 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20966 * parse.h (resolve_no_layout): New static function declaration.
20967 (get_identifier_in_static): Declaration removed.
20968 (java_layout_parsed_class): Function name declaration changed to
20969 safe_layout_class.
20970 (build_newarray_node, patch_newarray, resolve_type_during_patch,
20971 not_initialized_as_it_should_p, build_this): New static function
20972 declarations.
20973 (pushdecl_force_head, build_java_binop, int_fits_type_p,
20974 binary_numeric_promotion, stabilize_reference,
20975 build_decl_no_layout, build_java_arrayaccess): Extern function
20976 declarations moved into their own section.
20977 (build_newarray, build_anewarray, build_java_array_length_access,
20978 build_java_arraynull_check): New extern function declarations.
20979 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20980 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20981 fake tree codes.
20982 (CALL_CONSTRUCTOR_P): New macro.
20983 * parse.y (kw_length): New static global tree node.
20984 (return_statement): Tagged <node>.
20985 (RETURN_TK): Tagged <operator>.
20986 (variable_declarator_id:): Build variable declaration with an
20987 empty initialization value if a syntax error was found in the
20988 initialization part of the variable declaration.
20989 (statement_without_trailing_substatement:): return_statement: now
20990 uses the default rule.
20991 (return_statement:): Temporarily fixed to return NULL_TREE.
20992 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20993 (class_instance_creation_expression:): Class creation rules now
20994 call build_method_invocation upon reduction.
20995 (array_creation_expression:): Rules call build_newarray_node upon
20996 reduction.
20997 (dim_exprs:): Build a list of dimension expressions.
20998 (dim_expr:): Store location of the OSB_TK in the dimension
20999 expression node.
21000 (method_invocation:): Added a new error rule.
21001 (build_unresolved_array_type): WFL argument may also be an array
21002 on a primitive type. Name of the argument changed to reflect this.
21003 (method_declarator): Insert argument type at the beginning of the
21004 argument type list and later reverse the list.
21005 (unresolved_type_p): Argument 'returned' may be optionally
21006 NULL_TREE.
21007 (java_layout_class_from_source): Function renamed
21008 safe_layout_class.
21009 (resolve_and_layout): Now call resolve_no_layout and
21010 safe_layout_class.
21011 (resolve_no_layout): New function.
21012 (purify_type_name): New function.
21013 (complete_class_report_errors): Call purify_type_name during error
21014 report on a type not found.
21015 (process_imports): error_found local variable doesn't need to be
21016 initialized to zero.
21017 (declare_local_variables): New local type_wfl. Fixed typo in error
21018 message. type_wfl assigned to unresolved type and used to register
21019 incomplete type. Build a WFL around the variable initialization
21020 statement so that debug info can be generated on it.
21021 (source_start_java_method): Reverse argument list after they've
21022 been processed.
21023 (current_this): New static global variable.
21024 (java_complete_expand_methods): Set current_this when appropriate.
21025 (resolve_expression_name): Build correct static and non static
21026 field access bearing a simple name.
21027 (resolve_field_access): Resolve the length field of arrays. Handle
21028 f.m() cases.
21029 (patch_method_invocation_stmt): Set the type of the method
21030 invocation to error_mark_node. This value is later overridden by a
21031 valid type, if any. Don't handle qualified constructor invocation
21032 as qualified method invocation. Call lookup_method_invoke with its
21033 new flag. It's no longer necessary to access the selected method
21034 as the value of a tree list. Handle constructor invocation.
21035 (patch_invoke): Reverse argument list when invoking non interface
21036 methods. Insert call to new as the first argument of the
21037 constructor.
21038 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
21039 defined within a final class. Return INVOKE_STATIC if the invoked
21040 method is a constructor.
21041 (lookup_method_invoke): New lc argument is a flag to indicate a
21042 constructor lookup. Now handle constructor lookup. Choose the most
21043 specific method in case several were matching the invocation
21044 requirements. Return a method decl instead of a tree list featuring
21045 one single method decl element.
21046 (refine_accessible_methods_list): New lc flag argument to
21047 indicate that a constructor is being looked up.
21048 (not_initialized_as_it_should_p): New function.
21049 (java_complete_tree): Now process fake tree codes
21050 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
21051 save_expr on resolved function call arguments. Case on
21052 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
21053 (patch_assignment): LHS can be a field access expression. When
21054 dealing with reference, lhs_type is the promoted type of the
21055 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
21056 applicable.
21057 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
21058 (patch_binop): Use not_initialized_as_it_should_p where
21059 applicable.
21060 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
21061 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
21062 where applicable.
21063 (resolve_type_during_patch): New function.
21064 (patch_cast): Call resolve_type_during_patch to resolve type and
21065 report error accordingly.
21066 (patch_array_ref): Use not_initialized_as_it_should_p where
21067 applicable. Array base expression is saved before being
21068 used. Promote the type of an array elements if it contains non
21069 builtin types.
21070 (build_newarray_node, patch_newarray, build_this): New functions.
21071
21072 1998-07-16 Tom Tromey <tromey@cygnus.com>
21073
21074 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
21075 increment it in `for' statement.
21076 (print_field_info): If number is inf or nan, don't print it.
21077 (print_method_info): If method name is `delete', just ignore it.
21078 (print_c_decl): Special-case jstringArray.
21079
21080 * gjavah.c (help): New function.
21081 (no_argument): New function.
21082 (usage): Changed text.
21083 (main): Rewrote argument handling. Now handles -v, --help,
21084 --version.
21085 (version): New function.
21086 (found_error): New global.
21087 (main): Return found_error.
21088 (generate_access): Set found_error.
21089 (print_c_decl): Likewise.
21090
21091 1998-07-15 Tom Tromey <tromey@cygnus.com>
21092
21093 * gjavah.c (print_c_decl): Don't print "," when examining field.
21094 Skip type name when looking at "[L" types.
21095 (process_file): Now static.
21096 (generate_access): Now returns int.
21097 (last_access_generated): New global.
21098 (process_file): Clear last_access_generated; make multiple passes
21099 over the class.
21100 (print_field_info): Just return if generate_access returns true.
21101 (print_method_info): Likewise. Also, allow <init> functions to
21102 pass through.
21103 (print_c_decl): Added is_init argument. Print constructors
21104 properly.
21105 (print_cxx_classname): Use UTF8_GET to extract characters from
21106 string.
21107 (print_base_classname): New function.
21108 (print_class_decls): New function.
21109 (process_file): Use it.
21110 (utf8_cmp): New function.
21111
21112 1998-07-13 Nick Clifton <nickc@cygnus.com>
21113
21114 * lang-options.h: Format changed to match changes in gcc/toplev.c
21115 to implement a --help option.
21116
21117 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
21118
21119 * decl.c (init_decl_processing): Revert change to dtable_type.
21120
21121 1998-07-09 Per Bothner <bothner@cygnus.com>
21122
21123 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
21124
21125 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
21126
21127 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
21128
21129 * lang.c (lang_init): Default flag_exceptions to 1, without
21130 checking to see if it's 2 first.
21131
21132 1998-07-08 Jeffrey A Law (law@cygnus.com)
21133
21134 * constants.c: Include "system.h".
21135 * decl.c: Likewise.
21136 * lang.c (flag_new_exceptions): Get via extern now.
21137 (lang_init_options): New functions. Turn on flag_new_exceptions.
21138
21139 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
21140
21141 * lex.c (java_lex): Return 0 when we see an invalid character in
21142 the input.
21143
21144 * lex.c (java_read_char): Specify extra argument when calling
21145 java_lex_error.
21146 (java_read_unicode, java_parse_end_comment,
21147 java_parse_escape_sequence): Likewise,
21148 (java_lex): Specify extra argument when calling
21149 java_lex_error. Test that IDs are beginning with a legal character
21150 for IDs. Handle invalid characters with an error message and a
21151 call to java_lex_error.
21152 (java_lex_error): Adjust column position by new argument
21153 `forward'. Issue an error even if in the middle of reporting an
21154 other error.
21155
21156 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
21157
21158 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
21159 we don't explicitly put a null pointer when we're copying it.
21160
21161 1998-07-07 Tom Tromey <tromey@cygnus.com>
21162
21163 * gjavah.c (print_cxx_classname): New function.
21164 (super_class_name): Likewise.
21165 (print_super_fields): Removed.
21166 (in_super): Removed.
21167 (print_field_info): Never generate #defines.
21168 (print_c_decl): Changed generated types to match JNI. No longer
21169 print class name before method name.
21170 (print_method_info): Print "static" before static methods.
21171 Print "virtual" before non-final methods.
21172 (usage): Use exit(1), not exit(-1).
21173 (main): Likewise.
21174 (print_field_info): Use %.17g to print a double.
21175 (last_access): New globals.
21176 (process_file): Initialize last_access.
21177 (usage): Now static.
21178 (ACC_VISIBILITY): New define.
21179 (generate_access): New function.
21180 (print_field_info): Call it.
21181 (print_method_info): Likewise. Also, generate information for all
21182 methods, not just native methods. Return void.
21183 (print_c_decl): Return void.
21184 (print_field_info): Return void.
21185
21186 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
21187
21188 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
21189 processing the jc1 grammar file. Prefix bison functions and
21190 variables with java_.
21191 (parse.c): Dependencies on parse.h and lex.h
21192 * expr.c (build_java_arrayaccess): Function now global.
21193 * java-tree.h: Comment reorganized to carry on previous
21194 classification effort.
21195 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
21196 RESOLVE_TYPE_NAME_P): New flags on WFLs.
21197 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
21198 java_parse (new prefix java_ generated by bison).
21199 (java_layout_parsed_class, java_register_parsed_class): Function
21200 call removed.
21201 (yyparse): Removed unnecessary call to init_outgoing_cpool.
21202 * lex.c (static tree wfl_op): Variable deleted.
21203 (java_init_lex): Initialize kw_super and kw_this. Initialize more
21204 ctxp fields to NULL_TREE.
21205 (java_lex): No longer create WFL for operators. Filename caching
21206 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
21207 created as STRING_CST and later expanded. Removed extra argument
21208 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
21209 and SUPER.
21210 (build_wfl_node): Removed code in comments.
21211 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
21212 store token and location data in the current bison token.
21213 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
21214 static/extern function declaration at the beginning of the file.
21215 (struct qualification): Data structure definition deleted.
21216 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
21217 (qualify_ambiguous_name): Function declaration modified. Function
21218 now returns nothing.
21219 (build_array_ref, patch_array_ref, make_qualified_name,
21220 resolve_qualified_expression_name, maybe_generate_clinit,
21221 resolve_field_access): New static function declarations.
21222 (build_java_arrayaccess): New extern function declaration.
21223 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
21224 (CALL_EXPR_PRIMARY): Macro deleted.
21225 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
21226 (struct parser_ctxt): Field initialized_final
21227 removed. non_static_initialized, static_initialized: New fields.
21228 * parse.y (static tree kw_super, static tree kw_this): New global
21229 static.
21230 (%union): tree wfl field of operator member replaced by int
21231 location. WFLs are non longer created for operators.
21232 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
21233 (qualified_name:): Now calls make_qualified_name to build the
21234 identifier.
21235 (type_declaration:): Consider generating <clinit> when class
21236 parsing completed.
21237 (variable_declarator:): Directly build an assignment node when the
21238 variable is initialized when declared.
21239 (this_or_super:): Build a WFL and set current location when THIS
21240 or SUPER are parsed.
21241 (expression_statement:): Wrap statement around a WFL.
21242 (primary_no_new_array:): Fixed typo. Changed value returned by
21243 THIS_TK because of its new type (temporary).
21244 (dim_exprs:): Temporary fix because of OSB_TK's new type.
21245 (field_access:): Build qualified name with SUPER.
21246 (method_invocation:): Fixed returned value because of SUPER's new
21247 type.
21248 (array_access:): Use OSB_TK location information.
21249 (post_increment_expression:, post_decrement_expression:,
21250 unary_expression:, pre_increment_expression:,
21251 pre_decrement_expression:, unary_expression_not_plus_minus:,
21252 cast_expression:, multiplicative_expression:,
21253 additive_expression:, shift_expression:, relational_expression:,
21254 equality_expression:, and_expression:, exclusive_or_expression:,
21255 inclusive_or_expression:, conditional_and_expression:,
21256 conditional_or_expression:, assignment:): Use new location/token
21257 information available on operators.
21258 (create_class): Set super_decl_type to NULL_TREE when processing
21259 java.lang.Object.
21260 (register_fields): Field initialization is now a MODIFY_EXPR
21261 node. Chain initialization code to the matching lists (according
21262 to the field declaration modifiers).
21263 (maybe_generate_clinit): New function.
21264 (method_header): Don't set method's DECL_NAME to a WFL when adding
21265 methods to java.lang.Object.
21266 (resolve_and_layout): Now can return NULL_TREE if the type
21267 resolution fails. Otherwise, return the class DECL instead of its
21268 TYPE.
21269 (check_method_redefinition): Don't patch method DECL_NAME if it
21270 belongs to java.lang.Object.
21271 (process_imports): Simply assign error_found to the value returned
21272 by check_pkg_class_access.
21273 (declare_local_variables): Don't use their init statements (if
21274 any) when parsing error were previously found. Reuse MODIFY_EXPR
21275 build during parsing as an init statement.
21276 (java_method_add_stmt): Now return the current method body.
21277 (java_layout_parsed_class, java_register_parsed_class): Functions
21278 removed.
21279 (java_complete_expand_methods): Initialize the constant pool on a
21280 per class basis. Layout the classes before expanding their method
21281 bodies. Don't try expand artificial constructor code if error were
21282 found. Make the classes data and register them if no error were
21283 found.
21284 (java_complete_expand_method): Retrieve an artificial constructor
21285 argument list before entering its body. Assign the top block to
21286 the artificial constructor function body and set types of declared
21287 blocks and compound statements to void. Walk method body if not an
21288 artificial constructor.
21289 (make_qualified_name, cut_identifier_in_qualified): New functions.
21290 (resolve_expression_name): Fixed comments. Save/restore the
21291 current class CLASS_LOADED_P flag value. Build non qualified
21292 static field access and handle qualified expression names.
21293 (resolve_field_access, resolve_qualified_expression_name): New
21294 functions.
21295 (patch_method_invocation_stmt): Use the new expression resolution
21296 scheme, calling resolve_field_access when the function call is
21297 resolved as an expression.
21298 (qualify_ambiguous_name): Function rewritten to work on qualified
21299 expression produced by make_qualified_name.
21300 (java_complete_tree): Promote type when function's argument are
21301 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
21302 the assignment to discover further errors if RHS is a expression
21303 name that fails to evaluate. Declare LHS initialized even though
21304 the assignment failed. Don't use the location variable and removed
21305 extra argument in patch function calls. Now handle the ARRAY_REF
21306 case and build internal string representation when STRING_CSTs are
21307 walked.
21308 (build_method_invocation): Don't wrap function call around a WFL.
21309 (build_assignment): Likewise. Use the operator location
21310 information.
21311 (patch_assignment): Handle array access LHSs. Handle error
21312 provenance, resulting in a better error report.
21313 (build_binop): Use op_location from operator as binop location
21314 information.
21315 (build_unaryop, build_incdec, build_cast): Likewise.
21316 (patch_binop): Extract location information from the node. Fixed
21317 typo in error message.
21318 (patch_unary_op): Extract location information from the node.
21319 (build_array_ref, patch_array_ref): New functions.
21320
21321 1998-07-01 Tom Tromey <tromey@cygnus.com>
21322
21323 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
21324 match _Jv_IsInstanceOf.
21325 * decl.c (init_decl_processing): Use _Jv_NewArray, not
21326 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
21327
21328 1998-06-30 Tom Tromey <tromey@cygnus.com>
21329
21330 * decl.c (init_decl_processing): Functions are now named
21331 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
21332
21333 1998-06-29 Per Bothner <bothner@cygnus.com>
21334
21335 * java-tree.h (load_class): Add prototype.
21336 * class.c (is_compiled_class): Add missing arg to load_class.
21337 * expr.c (expand_java_NEW): Call load_class.
21338 * parse.y (process_import): Removed bogus use of void return value.
21339
21340 1998-06-25 Per Bothner <bothner@cygnus.com>
21341
21342 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
21343 Function name is "_Jv_Throw" instead of "soft_athrow".
21344 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
21345 Function name is "_Jv_AllocObject" instead of "soft_new".
21346 Takes an extra parameter (object size).
21347 * expr.c: Update calls.
21348
21349 1998-06-24 Per Bothner <bothner@cygnus.com>
21350
21351 * lex.c (java_get_line_col): Handle end-of-file.
21352 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
21353
21354 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
21355
21356 * lang.c (lang_init): Make -fexceptions the default.
21357 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
21358 exception handling is not turned on.
21359
21360 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
21361
21362 * lang.c (flag_new_exceptions): Make this this default.
21363 * decl.c (end_java_method): Call emit_handlers.
21364 * except.c (method_init_exceptions): Set language code and version.
21365 (expand_start_java_handler): Enable exception, and call
21366 expand_eh_region_start.
21367 (expand_end_java_handler): Enable exception, and set up catch blocks.
21368 (emit_handlers): New routine to generate the saved handlers.
21369 * java-except.h (emit_handlers): Add prototype.
21370
21371 1998-06-12 Per Bothner <bothner@cygnus.com>
21372
21373 We used to have three different representations of the constant pool:
21374 the CPool structure, the tree_constant_pool, and the constructures
21375 used to build the Class object (which may need class and string
21376 constants) in compiled code. None were appropriate for compiling
21377 to .class files, so I did a major overhaul.
21378
21379 First, the tree_constant_pool array was removed. Things were
21380 modified to the CPool structure in the JCF could be used.
21381 Second, a "capacity" field was added to the CPool, and functions
21382 written to search for a matching constant, adding one if not found.
21383 The code that generated the Class object was changed to use a CPool.
21384 The actual TREE_LISTs used to build the CONSTRUCTORs used for
21385 the static Class object are now only in build_constants_constructor.
21386 Finally, I wrote code which can generate a .class file (including its
21387 constant pool) from the RECORD_TYPE of a class. This is a big step
21388 on the way to compiling Java source into .class files.
21389
21390 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
21391 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
21392
21393 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
21394 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
21395 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
21396 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
21397 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
21398 (lang_type): Removed constant_pool field.
21399 * jcf.h (CPool): Renamed size to count. Added field capacity.
21400 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
21401 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
21402 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
21403
21404 * constants.c (current_constant_pool_tags, current_constant_pool_data,
21405 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
21406 * constants.c (build_constants_constructor): Use new outgoing_cpool.
21407 (set_constant_entry, find_constant1, find_constant2,
21408 find_class_constant, count_constant_pool_bytes, write_constant_pool,
21409 find_utf8_constant, find_class_or_string_constant): New functions.
21410
21411 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
21412 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
21413 (give_name_to_class, get_class_constant): Likewise.
21414 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
21415 (get_name_and_type_constant, get_ref_constant): Removed.
21416 * parse.h (parser_ctxt): Remove field tree_constant_pool.
21417 * parse.y: Don't save/restore tree_constant_pool.
21418 * verify.c (verify_jvm_instructions): Update for new approach.
21419 * expr.c (expand_invoke, expand_java_field_op): Likewise.
21420
21421 * lang-options.h: Added -femit-class-file, -femit-class-files.
21422 * lang.c (flag_emit_class_files), java-tree.h: New flag.
21423 (lang_f_options): Added "emit-class-file(s)".
21424
21425 * expr.c (build_java_arrayaccess): Generate more efficient array
21426 bounds checking, by using unsigned compare.
21427
21428 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
21429
21430 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
21431
21432 * parse.h: New comment on the handling of unresolved type
21433 identifiers. JDEPs are now part of the jdep_code enum.
21434 (typedef struct jdep): Now use enum jdep_code or int, depending on
21435 availability. Both are narrowed down to an 8 bits bitfield.
21436 (CALL_EXPR_PRIMARY): Fixed comment.
21437
21438 1998-06-10 Tom Tromey <tromey@cygnus.com>
21439
21440 * Make-lang.in (java): Added gjavac and jvgenmain.
21441 (java.start.encap): Depend on gjavac.
21442 (java.rest.encap): Depend on jvgenmain.
21443
21444 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
21445 (JAVA_CROSS_NAME): Likewise.
21446 (java.all.build): Depend on jvgenmain and gjavac.
21447 (java.all.cross): Depend on jvgenmain and gjavac-cross.
21448 (jvgenmain$(exeext)): New target.
21449 (java.install-common): Wrote.
21450 * config-lang.in (compilers, stagestuff): Added gjavac and
21451 jvgenmain.
21452
21453 1998-06-10 Dave Brolley <brolley@cygnus.com>
21454
21455 * lang.c (lang_decode_option): New argc/argv interface.
21456
21457 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
21458
21459 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
21460 * decl.c (build_decl_no_layout): New function.
21461 * expr.c (java_lang_expand_expr): Layout declarations found in
21462 blocks before they're pushed.
21463 * jcf-parse.c (load_class): Save current line when parsing class
21464 file.
21465 (parse_source_file): Register class before expanding their
21466 methods.
21467 * lang.c (put_decl_node): Produce `null' when `void *' is
21468 processed.
21469 * lex.c (static tree wfl_op): New static global, for error report
21470 on casts.
21471 (java_init_lex): wfl_operator and wfl_op initialized
21472 here. Filename caching added for wfl_op. Return wfl_op when `(' is
21473 parsed.
21474 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
21475 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
21476 build_unresolved_array_type): New static function definitions.
21477 (build_decl_no_layout): New extern function declared.
21478 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
21479 faulty modifier exists.
21480 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
21481 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
21482 (UNARY_PLUS_EXPR): New fake operator.
21483 (struct parser_ctxt): New field osb_number.
21484 * parse.y (static tree wfl_operator): New static WFL for operator
21485 bound error messages.
21486 (DECR_TK, INCR_TK): Moved.
21487 (OP_TK): Tagged <operator>.
21488 (array_type:): Now call build_unresolved_array_type.
21489 (dim_expr:): Count the number of '[' seen.
21490 (post_increment_expression, post_decrement_expression,
21491 pre_increment_expression, pre_decrement_expression,
21492 unary_expression_not_plus_minus, unary_expression:): Actions are
21493 now building the corresponding unary expressions.
21494 (cast_expression:): Actions are now building cast expressions.
21495 (build_unresolved_array_type): New function.
21496 (create_interface): Reset the number of declared interfaces.
21497 (create_class): Likewise.
21498 (method_header): Methods declared within the scope of an interface
21499 are now implicitly set public and abstract.
21500 (java_complete_class): Variable's and parameter's type are patched
21501 with a promoted type.
21502 (declare_local_variables): Resolved non builtin types are promoted
21503 before being used to build a variable decl. Removed type patch
21504 posted on variable initialization statement.
21505 (source_start_java_method): Use build_decl_no_layout to build the
21506 decl of a parameter of incomplete type.
21507 (java_register_parsed_class): Process interfaces too. Call
21508 rest_of_decl_compilation on each processed class declarations.
21509 (java_complete_expand_methods): Don't attempt to expand things in
21510 interfaces.
21511 (java_complete_tree): Process CONVERT_EXPR, even though it always
21512 has a type. Propagate error_mark_node to node's type too. Promote
21513 method's call argument type and return error_mark_node if
21514 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
21515 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
21516 handle unary operator nodes.
21517 (build_assignment): Added comment.
21518 (print_int_node): New function.
21519 (patch_assignment): New second argument. New error handling. Use
21520 print_int_node. Handle references. Use can_cast_to_p to issue
21521 different error message according to the context and check upon
21522 the initialization of the RHS.
21523 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
21524 (operator_string): Handle more operators.
21525 (patch_binop): No longer use a function static
21526 wfl_operator. Improved error message on shift distance.
21527 (build_unaryop, build_incdec, build_cast, patch_unaryop,
21528 patch_cast): New functions.
21529
21530 1998-06-05 Per Bothner <bothner@cygnus.com>
21531
21532 * jvspec.c: New file.
21533 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
21534
21535 * java-tree.h (identifier_subst): Add declaration.
21536
21537 1998-06-04 Tom Tromey <tromey@cygnus.com>
21538
21539 * jvgenmain.c (main): Generate call to JvRunMain.
21540
21541 * class.c (make_class_data): Push value for "sync_info" field.
21542 * decl.c (init_decl_processing): Push "sync_info" field.
21543
21544 1998-06-03 Per Bothner <bothner@cygnus.com>
21545
21546 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
21547 Java (source) name, not signature.
21548 Set TYPE_ALIGN to (at least) that of element_type.
21549
21550 1998-06-02 Per Bothner <bothner@cygnus.com>
21551
21552 * class.c: Moved classname-mangling-rekated code to ...
21553 * mangle.c: ... this new file.
21554 * jvgenmain.c: New program (needs mangle.c) to generate main program.
21555 * Makefile.in: Update for above changes.
21556
21557 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
21558
21559 * expr.c (truthvalue_conversion): Convert integer and floating
21560 point value to their truth value.
21561 * lex.c (java_lex): Handle the `null' literal.
21562 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
21563 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
21564 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
21565 New macros.
21566
21567 * parse.y: Reorganization/documentation on token declaration.
21568 (binop_lookup[]): New added new tree codes.
21569 (relational_expression): Build corresponding binary operators.
21570 (equality_expression, conditional_and_expression,
21571 conditional_or_expression): Likewise.
21572 (java_complete_class): Fix crash in debug message.
21573 (java_complete_tree): Check initialization of method call
21574 arguments. Further bogus node evaluation to detect more error
21575 during assignments. Handles more binary operators.
21576 (patch_assignment): Use DECL_P.
21577 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
21578 code.
21579 (operator_string): Handle more case. Compacted source.
21580 (patch_binop): Changed function comment. Checking for
21581 uninitialized first operand takes the compound assignment into
21582 account and uses DECL_P. Checking for uninitialized second operand
21583 delayed to routine's end. Use macros to issue type bound error
21584 messages and issue messages on both operands if their types are
21585 different. Force fixed type into node. Handle all binary
21586 operators.
21587
21588 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21589
21590 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
21591 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
21592 build operator node and return tokens.
21593 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
21594 * parse.h (java_complete_tree): Changed returned type in prototype.
21595 (build_method_invocation, build_assignment, patch_assignment,
21596 patch_binop): New static function declarations.
21597 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
21598 BUILD_EXPR_WFL): New macros.
21599 * parse.y (enum tree_code binop_lookup[]): New static for token to
21600 TREE_CODE lookup.
21601 (%union): Parser union has new sub-structure `operator'.
21602 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
21603 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
21604 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
21605 ASSIGN_ANY_TK): Tokens tagged `operator'.
21606 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
21607 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
21608 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
21609 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
21610 (assignment_operator:): Rule tagged `operator'.
21611 (expression_statement:): Re-installed default rule.
21612 (method_invocation:): Sub rules call build_method_invocation.
21613 (postfix_expression:): Don't attempt to resolve name here. Just
21614 return an ID.
21615 (multiplicative_expression:): Sub-rules build corresponding binop
21616 expression node.
21617 (additive_expression:, shift_expression:, and_expression:,
21618 exclusive_or_expression:, inclusive_or_expression:): Likewise.
21619 (assignment:): Sub rule invoke build_assignment.
21620 (assignment_operator:): Default rules on sub rules.
21621 (force_error): Added documentation on this variable.
21622 (declare_local_variables): Build initialization calling
21623 build_assignment.
21624 (expand_start_java_method): Removed unused rtx declaration. Mark
21625 arguments as already initialized.
21626 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
21627 (java_complete_expand_methods): Don't process next method if
21628 completion of the previous one triggered errors.
21629 (java_complete_expand_method): Call source_end_java_method if no
21630 error were found during completion.
21631 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
21632 locals declaratilon. Handle names found within a class. Return
21633 error_mark_node when things aren't found.
21634 (patch_method_invocation_stmt): Return error_mark_node on failures.
21635 (patch_invoke): Removed unused local. Return the correct node.
21636 (java_complete_tree): Now returns a value. The BLOCK section binds
21637 local identifiers and the type of a BLOCK is now void. Assign the
21638 result of operand completion on COMPOUND_EXPR. Assign the
21639 encapsulated node of a WFL to the result of its completion, except
21640 when the node is an identifier. Now handle MODIFY_EXPR and several
21641 binary operators. Return error_mark_node on errors.
21642 (build_method_invocation, build_assignment, patch_assignment,
21643 build_binop, operator_string, patch_binop): New functions.
21644 * typeck.c (binary_numeric_promotion): New function.
21645
21646 1998-05-21 Per Bothner <bothner@cygnus.com>
21647
21648 * class.c (identifier_subst): New convenience wrapper for ident_subst.
21649 Replace most uses of ident_subst by identifier_subst.
21650
21651 * class.c (push_class_static_dummy_field): Removed function.
21652 (build_class_ref): Find Class object decl by looking up "CNAME.class",
21653 instead of looking got "class" static field. Create that decl here.
21654 (class_identifier_node): Removed; no longer needed.
21655 (init_class_processing): Don't init class_identifier_node.
21656 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
21657 Do nreverse 0 times (instead of twice) for Object and Class.
21658 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
21659
21660 1998-05-20 Per Bothner <bothner@cygnus.com>
21661
21662 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
21663 while initializing linenumber_count and linenumber_table.
21664 Do it before init_function_start (which calls emit_line_note).
21665 * expr.c (expand_byte_code): Don't need to clear lineno here.
21666
21667 1998-05-18 Tom Tromey <tromey@cygnus.com>
21668
21669 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
21670 then mangle number as _N_.
21671
21672 * class.c (mangle_class_field): New function.
21673 (build_class_ref): Set assembler name of class reference using
21674 mangle_class_field.
21675 (push_class_static_dummy_field): Likewise.
21676
21677 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
21678
21679 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
21680 of assigning to TREE_CODE. The latter method exploits a feature
21681 of GCC that is not ANSI compliant.
21682
21683 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
21684
21685 * decl.c (pushdecl_force_head): New function.
21686 (pushlevel): Removed conditional printf.
21687 (complete_start_java_method): Don't enter local variable scope if
21688 function is compiled from source code.
21689 * expr.c: parse.h now included
21690 (java_lang_expand_expr): New function.
21691 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
21692 printf. Terminate buffer when doing directories.
21693 * jcf-parse.c (parse_source_file): Call lang_init_source before
21694 parsing and before code generation.
21695 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
21696 use printf if the macro is defined.
21697 * lang.c (lang_init): Install lang_expand_expr hook on
21698 java_lang_expand_expr.
21699 (java_dummy_print): New function.
21700 (lang_init_source): New function.
21701 * lex.c (java_lex): Remember location of an opening brace at the
21702 second nesting level.
21703 (java_is_eol): Unget character seen after a CR if it is EOF.
21704 * parse.h: Now includes lex.h
21705 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
21706 printf if the macro is defined.
21707 (expand_start_java_method, build_expr_block, enter_block,
21708 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
21709 New static function declarations.
21710 (pushdecl_force_head): New extern function declaration.
21711 (INCOMPLETE_TYPE_P): New macro.
21712 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
21713 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
21714 BLOCK_EXPR_ORIGIN): New macros.
21715 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
21716 DECL_SOURCE_LINE_LAST): New macros.
21717 (struct parser_ctxt): Removed field current_method_decl, redundant
21718 with the field current_function_decl. Added fields
21719 first_ccb_indent1 and pending_block.
21720 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
21721 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
21722 tagged <node>
21723 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
21724 (compilation_unit:): Cosmetic on sub rule.
21725 (type_declaration:): Cosmetic on sub rules. Added an error rule.
21726 (variable_initializer:): Installed default rule on expression:.
21727 (method_declaration:): method_header: starts a new
21728 method. method_body: installs the function body, absorbs blocks
21729 emitted for temporary variable scopings, pops function's body block
21730 and merges function's last statement lineno in DECL_SOURCE_LINE.
21731 (method_body:): Installed default rules.
21732 (block:): Call enter_block when an opening brace is seen. Absorb
21733 scoping blocks and call exit_block when a closing brace is seen.
21734 (block_statement:): Cosmetic changes.
21735 (method_invocation:): Create WFL around CALL_EXPR node.
21736 (patch_stage): Added comment around definition.
21737 (method_header): Try to use first_ccb_indent1 as the first line of
21738 the method, so BP debug info are emitted at the first opening
21739 brace of the function. If the function has no body, use the
21740 location of the function's name. Override currently defined method
21741 name with the matching WFL so we can point redefinition errors
21742 using the location where the function's name was declared.
21743 (check_abstract_method_header): Interprets DECL_NAME as an
21744 identifier or as a WFL, accordingly.
21745 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
21746 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
21747 location and name information out of it and reinstall DECL_NAME to
21748 its original identifier node value.
21749 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
21750 function's source code).
21751 (read_import_dir): Test the value returned by find_class and issue
21752 a fatal accordingly.
21753 (declare_local_variables): Push a new block for the scope of the
21754 new variable(s) if code has been already generated at that nesting
21755 level. Pinpoint redefinition errors using the variable id
21756 WFLs. Generate initialization code if necessary. If the variable
21757 type is incomplete, register a patch on its decl.
21758 (source_start_java_method): Rewritten. Define a new block for the
21759 function's parameters. Build parameter decl out of function's
21760 arguments and register them for a patch if their types are
21761 incomplete.
21762 (expand_start_java_method): Includes the part of
21763 source_start_java_method that was pushing the parameter decls and
21764 completing the method start code.
21765 (source_end_java_method): Removed call the expand_end_bindings and
21766 poplevel (already taken care of). Reinstall function's arguments
21767 and get function's last line of code before calling
21768 expand_function_end.
21769 (java_method_add_stmt): New comment before the function's
21770 code. Complement the second operand of the current COMPOUND_EXPR
21771 if necessary.
21772 (java_complete_expand_methods): Don't generate debug info on line
21773 zero when expanding a generated constructor.
21774 (java_complete_expand_method): Set start and end line numbers for
21775 a artificially generated constructor to one and manually call
21776 enter_block and exit_block when defining it. For all methods:
21777 expand function's start calling the new expand_start_java_method
21778 and invoke java_complete_tree on the effective method's body, if
21779 any.
21780 (resolve_expression_name): Now use lookup_name_in_blocks to search
21781 local variable decls and print out an error when variables are
21782 undefined.
21783 (patch_method_invocation_stmt): Inserted comment before the
21784 function's code.
21785 (lookup_method_invoke): Chain method's arguments using chainon
21786 with the current arg list as a second argument. Inserted missing
21787 IDENTIFIER_POINTER when reporting an error on methods not found.
21788 (refine_accessible_methods_list): Don't retain constructors.
21789 (patch_arguments): Function removed.
21790 (java_complete_tree): Inserted comment before the function's
21791 code. New case for BLOCKs. Moved the WFL case a bit
21792 further. Complete function's arguments.
21793 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21794 maybe_absorb_scoping_blocks): New functions.
21795
21796 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
21797
21798 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21799 previously set.
21800 * jcf-parse.c (parse_source_file, java_error_count): New forward
21801 and extern declarations.
21802 (java_parse_abort_on_error): Macro moved.
21803 (jcf_parse_source): fatal called if fopen fails. Now calls
21804 parse_source_file.
21805 (parse_source_file): New parse_only parameter. Reflects the
21806 elimination of the second pass.
21807 (yyparse): parse_source_file called with argument set to 0.
21808 * jcf.h (JCF_ZERO): Sets java_source to zero.
21809 * lex.c (java_init_lex): pass argument is gone. Function modified
21810 to be called once during the analysis of a file.
21811 (java_unget_unicode): Fixed typo in fatal message.
21812 (java_get_line_col): Likewise.
21813 (java_lval): Likewise. String literals no longer built during
21814 second pass.
21815 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21816 account.
21817 * parse.h (MODIFIER_WFL): New macro.
21818 (parse_check_super, parser_check_super_interface): Now return int.
21819 (parser_chain_incomplete_item, not_builtin_p,
21820 complete_method_decl): Declarations removed.
21821 (build_method_invocation_stmt, build_invoke): Renamed using the
21822 `patch' instead of `build'
21823 (register-incomplete_type, obtain_incomplete_type,
21824 java_complete_tree, java_complete_expand_method,
21825 unresolved_type_p, create_jdep_list): New function declarations.
21826 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21827 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21828 (jdep): New typedef on new struct _jdep.
21829 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21830 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21831 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21832 JDEP_RESOLVED_P): New macros.
21833 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21834 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21835 JDEP_VARIABLE): New enum values and jdep kinds.
21836 (jdeplist): New typedef on struct _jdeplist.
21837 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21838 macros.
21839 (CALL_EXPR_PRIMARY): New macro.
21840 (struct parser_ctxt): Fields java_pass, current_method_decl,
21841 method_decl_list deleted. New field jdeplist.
21842 (INCOMPLETE_P): Macro deleted.
21843 * parse.y (single_type_import_declaration:): Removed pass switch.
21844 (type_import_on_demand_declaration): Likewise.
21845 (field_declaration:): Removed pass switch on all sub rules.
21846 (class_declaration:): Call the complete_class_decl removed on
21847 class_body rules.
21848 (method_declaration:): Removed second pass switch. No longer chain
21849 methods decl when method_header reduced.
21850 (method_header:): Sub rules no longer depend on pass switch.
21851 (method_declarator:): Likewise.
21852 (method_body:): Likewise.
21853 (abstract_method_declaration:): Likewise.
21854 (block_statement:): Likewise.
21855 (local_variable_declaration:): Likewise.
21856 (argument_list:): Likewise.
21857 (method_invocation:): Likewise. Call to build_method_invocation_stmt
21858 removed. Partial CLASS_EXPR tree node built instead.
21859 (postfix_expression:): Removed pass switch on all sub rules.
21860 (java_pop_parser_context): Free classd_list content.
21861 (yyerror): Call obstrack_grow0 to finalize error message.
21862 (check_class_interface_creation): Comment modified to reflect new
21863 returned value meaning. Removed second pass switch. Return 1 if an
21864 error was found, 0 otherwise. Adjust pointer on filename if a
21865 leading path separator was found.
21866 (maybe_create_class_interface_decl): Removed first pass switch
21867 when linking the class decl to the class_list. Install a new
21868 jdep_list for the class.
21869 (add_superinterfaces): List of unresolved interfaces is
21870 gone. Unresolved interfaces are directly added to the current
21871 dependencies list.
21872 (create_interface): Second pass shortcut removed.
21873 ctpx->modifier_ctx access through MODIFIER_WFL.
21874 (create_class): Second pass shortcut removed. Call to
21875 register_incomplete_type replaces the call to
21876 parser_chain_incomplete_item.
21877 (complete_class_decl): Function removed.
21878 (duplicate_declaration_error): New way of retrieving redeclared
21879 item type.
21880 (register_fields): Call to lookup_modifier_cl replaced by
21881 MODIFIER_WFL. New way of handling unresolved type, using
21882 unresolved_type_p and obtain_incomplete_type.
21883 register_incomplete_type replaces call to parser_chain_incomplete_item.
21884 (patch_stage): New static global variable.
21885 (method_header): New way of handling unresolved type, using
21886 unresolved_type_p and obtain_incomplete_type. patch_stage used to
21887 indicates that the method decl needs to be patched.
21888 (check_abstract_method_header): Call to lookup_modifier_cl
21889 replaced by MODIFIER_WFL.
21890 (method_declarator): Incomplete argument type are registered
21891 calling register_incomplete_type. Patch on the declared method is
21892 issued in that case.
21893 (unresolved_type_p): New function.
21894 (parser_check_super_interface): New comment to reflect function's
21895 modified returned type (int). Function and has a new argument
21896 this_wfl. Call to parse_error_context uses this_wfl instead of
21897 relying on lookup_cl.
21898 (parser_check_super): Comment reflects function's new returned
21899 type (int). Function returns nonzero value on error.
21900 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21901 register_incomplete_type, jdep_resolve_class): New functions to
21902 handle incomplete types in declarations.
21903 (java_complete_class): Rewritten to work with the new incomplete
21904 type handling scheme.
21905 (complete_class_report_errors): Likewise.
21906 (complete_method_decl): Removed: it jobs is now handled by
21907 java_complete_class.
21908 (do_resolve_class): Class loaded in not already loaded and not
21909 found in Java source code.
21910 (java_check_regular_methods, java_check_abstract_methods): Don't
21911 call complete_method_decl anymore.
21912 (lookup_modifier_cl, not_builtin_p): Functions deleted.
21913 (read_import_dir): Got rid of the pass number dependency.
21914 (declare_local_variables): New handling of unresolved types (patch
21915 issued).
21916 (source_start_java_method): New parameter level. Function called
21917 with level set to 1 when argument types are potentially
21918 unresolved. Called to complete the job with level set to 2 once
21919 types are complete.
21920 (source_end_java_method): Call to permanent_allocation
21921 removed. Waiting to be replaced by a more suitable obstack
21922 management.
21923 (java_complete_expand_methods, java_complete_expand_method,
21924 java_expand_finals): New functions.
21925 (build_method_invocation_stmt): Renamed
21926 patch_method_invocation_stmt. Extracts function call expression
21927 (wfl) and arguments (args) from CALL_EXPR tree operands.
21928 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21929 call. Patch the function and argument operand of the CALL_EXPR
21930 tree argument.
21931 (patch_argument, java_complete_tree): New functions.
21932
21933 1998-04-20 Per Bothner <bothner@cygnus.com>
21934
21935 Recover from missing fields and methods (i.e. error instead of fatal).
21936 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
21937 * expr.c (expand_invoke): Recover from missing method.
21938 (expand_java_field_op): Recover from missing field.
21939 Inline references to java.lang.{Integer,Char,...}.TYPE.
21940 * typeck.c (get_type_from_signature), java-tree.h: New function.
21941 * class.c (add_method): Use get_type_from_signature.
21942 (build_class_ref): Handle a class that was not found.
21943 * typeck.c (convert): Handle conversion to pointers (for convenience).
21944 * verify.c (verify_jvm_instructions): Use get_type_from_signature
21945 instead of lookup_field to handle missing fields.
21946
21947 * jcf-parse.c (process_zip_dir): Set java_source.
21948
21949 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
21950
21951 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21952
21953 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
21954
21955 * jcf-parse.c (load_class): Don't change input_filename before
21956 calling jcf_parse_source (but still do it before calling
21957 jcf_parse).
21958 (jcf_parse_source): Assign input_filename after having saved the
21959 parser context.
21960 * lex.c (java_init_lex): Chain a WFL node to the import on demand
21961 list. ctxp->modifier_ctx zeroed according to its new
21962 definition. ctxp->filename initialized. Removed
21963 JAVA_MODIFIER_CTX_UNMARK.
21964 (java_unget_unicode): Update the character based column position.
21965 (java_allocate_new_line): ref_count not used anymore. Always free
21966 ctxp->p_line. Initialize c_line->char_col to 0.
21967 (java_get_unicode): Update the character based column position.
21968 (java_lex): Use ctxp->elc to store current position in source
21969 file, at the beginning of the parsed token. Set modifier_ctx entry
21970 corresponding to the parse modifier to a WFL node. Return a WFL
21971 node when an identifier is parsed.
21972 (java_lex_error): Now uses ctxp->elc to store current position in
21973 source.
21974 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21975 * lex.h (build_wfl_node): New function definitions.
21976 (struct java_line): ref_count and next fields are gone. New field
21977 char_col.
21978 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21979 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21980 (JAVA_COLUMN_DELTA): New macro.
21981 (java_lc): New typedef on new struct _java_lc.
21982 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21983 (parse_error_context, parse_warning_context): Changed prototypes.
21984 (java_get_line_col): Added as an available global function.
21985 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21986 (IC_DECL): Replaced by macro IC_TYPE
21987 (DEPEND_WFL): New macro.
21988 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21989 wrong modifier.
21990 (exit_java_complete_class): Removed a commented out statement.
21991 (struct parser_ctxt): Added comments on fields. modifier_ctx is
21992 now an array of tree nodes. Deleted fields line_list and
21993 e_line. New field elc, to replace e_line.
21994 * parse.y (array_type:): Build WFL node.
21995 (qualified_name:): Build a single WFL node out of two. Retain
21996 the location information of the first node in the resulting node.
21997 (package_declaration:): Use package name as a WFL node
21998 (single_type_import_declaration:): Use imported name as a WFL node.
21999 (type_import_on_demand_declaration:): Use root of the imported
22000 packages as a WFL node.
22001 (field_declaration:): Removed unused local variable cl.
22002 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
22003 (yyerror): New static elc. Removed static error_line, error_pos.
22004 New local code_from_source. Save ctxp->elc into elc at the first
22005 pass. Call java_get_line_col to get a string of the line where
22006 the error occurred.
22007 (debug_line): Removed static function.
22008 (parse_error_context, parse_warning_context): Parameter cl is now
22009 a WFL node. Use its value to initialize ctxp->elc.
22010 (redefinition_error): Parameter cl is now a WFL node.
22011 (parse_add_interface): New parameter wfl. No longer call
22012 lookup_cl, use wfl instead.
22013 (check_class_interface_creation): Parameter cl is now a WFL node.
22014 (maybe_create_class_interface_decl): Likewise.
22015 (add_superinterfaces): New function.
22016 (create_interface): Removed local cl, node, super_decl,
22017 super_decl_type. Function now uses id as a WFL node. Better
22018 warning/error report on obsolete or forbidden mix of
22019 modifiers. Now calls add_superinterfaces to register interfaces.
22020 (create_class): Removed local cl, node. Local variable id is used
22021 as a WFL node. Better error report on forbidden modifier
22022 mix. Uses add_superinterfaces to register interfaces.
22023 (find_field): Argument cl is now a WFL node. Now store the WFL
22024 node of a fields that needs to be checked for their
22025 initialization.
22026 (method_header): Local variable node non longer used. Local
22027 variable id replaces cl.
22028 (check_modifiers_consistency): Local variable cl is now a WFL
22029 node.
22030 (method_declarator): Local variable cl replaced by parameter id.
22031 (parser_qualified_name): Now uses parameter name as a WFL node.
22032 (parser_check_super_interface): New parameter wfl, for achieve
22033 greater accuracy during error reports.
22034 (parser_chain_incomplete_item): New parameter named location. Used,
22035 along the decl, to construct the incomplete item node.
22036 (java_complete_class): resolve_class now uses WFL node extracted
22037 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
22038 where appropriate.
22039 (complete_method_decl): Unresolved function's argument types are WFL.
22040 (resolve_class): Parameter cl is now a WFL node.
22041 (resolve_and_layout): Likewise.
22042 (do_resolve_class): Likewise. Try first to use cl and then do the
22043 lookup on the decl when calling check_pkg_class_access.
22044 (complete_class_report_errors): Use IC_TYPE in place of
22045 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
22046 instead of doing a lookup over the decl.
22047 (java_check_final): Use WFL info from field tree list.
22048 (lookup_cl): Rewritten and returns a statically defined WFL node.
22049 (lookup_modifier_cl): Now uses information from WFL nodes.
22050 (process_imports): Likewise.
22051 (read_import_dir): name and cl arguments replaced by a single WFL
22052 node. Function modified accordingly.
22053 (find_in_imports_on_demand): Now uses WFL node.
22054 (check_pkg_class_access): cl argument is now a WFL node.
22055 (declare_local_variables): Fixed to use WFL nodes.
22056 (resolve_expression_name): Likewise.
22057 (build_method_invocation_stmt): name_combo argument renamed
22058 wfl. Function modified to use WFL nodes.
22059 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
22060 (lookup_method_invoke): cl is now a WFL node. Added missing
22061 IDENTIFIER_POINTER to class type decl name.
22062
22063 1998-04-14 Dave Brolley <brolley@cygnus.com>
22064
22065 * lang.c (init_parse): Now returns char* containing the filename.
22066
22067 1998-04-10 Per Bothner <bothner@cygnus.com>
22068
22069 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
22070
22071 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
22072 * class.c (make_class_data): If flag_assume_compiled, initial class
22073 state is CSTATE_PREPARED; make superclass and interfaces direct
22074 references, rather than constant pool indexes.
22075
22076 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
22077
22078 * parser.y: Include flags.h. Removed debug variable pl.
22079 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
22080 (block:): Likewise.
22081 (labeled_statement_nsi:): Generate debug info when reducing
22082 expression_statement:.
22083 (check_pkg_class_access): get_access_flags_from_decl invocation
22084 fixed for new CLASS_* flags location.
22085 (source_end_java_method): Save/restore parser context when
22086 entering/leaving this routine. Restore lineno to its right value
22087 before calling expand_end_bindings.
22088 (build_method_invocation_stmt): build_invoke called with the
22089 current line information.
22090 (build_invoke): New argument cl. Wrap the function call around a
22091 wfl node.
22092 (refine_accessible_methods_list): Changed comment, removed
22093 unnecessary code.
22094 * parse.h: Fixed typo in comments.
22095 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
22096 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
22097 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
22098 parser_ccb_indent.
22099 * lex.c (java_lex): Record the last closing curly bracket of a
22100 function.
22101 * jcf-parse.c (jcf_parse_source): Now calls
22102 java_check_methods. Clarified comment, fixed typo.
22103
22104 1998-04-09 Dave Brolley <brolley@cygnus.com>
22105
22106 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
22107 (finish_parse): Expose for non USE_CPPLIB builds.
22108
22109 1998-04-08 Jeffrey A Law (law@cygnus.com)
22110
22111 * lang.c (lang_print_xnode): New function.
22112
22113 1998-04-03 Per Bothner <bothner@cygnus.com>
22114
22115 * decl.c (class_dtable_decl), java-tree.h: New tree node.
22116 * class.c (get_dispatch_vector, get_dispatch_table): New functions
22117 used to build a class's dispatch table.
22118 (make_class_data): Generate dispatch table if flag_assume_compiled.
22119 Set dtable of class object to address of class_dtable_decl.
22120
22121 * decl.c (int_decl_processing): Make soft_badarrayindex_node
22122 be volatile and have side effects - generates better code.
22123
22124 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
22125 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
22126
22127 * expr.c (expand_invoke): If class is final, method is
22128 effectively final, so can call it directly.
22129
22130 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
22131
22132 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
22133
22134 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
22135
22136 * parse.y (build_method_invocation_stmt): Removed extra argument
22137 to build_invoke.
22138
22139 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
22140
22141 * expr.c (dtable_indent): Now static global.
22142 (expand_invoke): Now call invoke_build_dtable and
22143 build_invokevirtual.
22144 (invoke_build_dtable, build_invokevirtual): New functions.
22145 * jcf-io.c (find_class): Defer issuing a warning by setting
22146 jcf->outofsynch to 1.
22147 * jcf-parse.c (jcf_out_of_synch): New function.
22148 (load_class): Test this_jcf.outofsynch flag and call
22149 jcf_out_of_synch accordingly.
22150 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
22151 comment indentation.
22152 * lex.c (java_get_unicode): Fixed code indentation.
22153 (java_lex): Create string literal. Fixed typo. Removed several
22154 premature obstack_free.
22155 * parse.h: New enums for name resolution and invocation mode.
22156 (struct qualification): New data structure.
22157 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
22158 (do_resolve_class, build_method_invocation_stmt,
22159 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
22160 debug_line, identical_subpath_p, invocation_mode,
22161 refine_accessible_methods_list, build_invoke,
22162 lookup_method_invoke): New functions declared.
22163 (build_invokevirtual, invoke_build_dtable, match_java_method,
22164 build_field_ref, jcf_out_of_synch): New references to external
22165 functions.
22166 (struct parse_ctxt): Removed artificial_constructor field.
22167 * parse.y: (array_type:): Type defined for this rule.
22168 (class_type:): Installed default rule for interface_type:.
22169 (array_type:): Now build Java array type.
22170 (qualified_name:): Now use obstack_grow0.
22171 (method_declaration:): Skip the artificial constructor added to
22172 the list, if any.
22173 (abstract_method_declaration:): Execute the code only during pass 1.
22174 (block:): Installed default rule in block_statements:.
22175 (block_statement:): Add the statement to the method during pass 2.
22176 (statement_expression): Installed default rule for
22177 method_invocation:.
22178 (argument_list:): Added code to build the argument list.
22179 (method_invocation:): Added call to create the method invocation
22180 node.
22181 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
22182 (debug_line): New function for debug.
22183 (complete_class_decl): No longer do something during pass 1.
22184 (method_header): Use BUILD_PTR_FROM_NAME.
22185 (parser_qualified_classname): Use obstack_grow0. Removed bogus
22186 obstack_free.
22187 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
22188 function's main comment.
22189 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
22190 classes.
22191 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
22192 (resolve_class): Now works with arrays.
22193 (do_resolve_class, resolve_and_layout): New functions.
22194 (java_check_regular_methods): Reverse method list before and after
22195 having processed it. No longer set ctxp->artificial_constructor.
22196 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
22197 accordingly. Fixed typo in issued error message. Now use
22198 obstack_grow0.
22199 (find_in_imports_on_demand): Now use obstack_grow0.
22200 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
22201 (source_end_java_method): Call expand_expr_stmt instead of
22202 expand_expr. Calls it before calling expand_function_end.
22203 (java_method_add_stmt): Do nothing if errors were found during
22204 parsing.
22205 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
22206 (build_method_invocation_stmt, build_invoke, invocation_mode,
22207 lookup_method_invoke, refine_accessible_methods_list,
22208 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
22209 New functions.
22210 * typeck.c (build_java_signature): Properly end method signature
22211 if return type skipped.
22212 (match_java_method): New function.
22213
22214 1998-03-16 Per Bothner <bothner@cygnus.com>
22215
22216 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
22217
22218 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
22219
22220 * expr.c (build_invoke_non_interface): New function.
22221 (methods_ident, ncode_ident): Now static globals.
22222 (expand_invoke): Use build_invoke_non_interface.
22223 * java-tree.h (struct lang_decl): New field function_decl_body.
22224 (DECL_FUNCTION_BODY): New macro.
22225 * jcf-parse.c (jcf_parse_source): Deeper check before setting
22226 CLASS_FROM_SOURCE_P.
22227 (parse_source_file): Fixed typos. Call java_layout_parsed_class
22228 before starting pass 2. Call to java_generate_parsed_class replaced
22229 by java_register_parsed_class.
22230 * lex.c: Fixed typo in header. Some line width related formating.
22231 * lex.h: Some line width related formating.
22232 * parse.h (source_end_java_method, resolve_expression_name,
22233 complete_class_decl, maybe_create_class_interface_decl,
22234 check_class_interface_creation): New static function declarations.
22235 (java_layout_parsed_class, java_method_add_stmt): New function
22236 declarations.
22237 (struct parser_ctxt): Field mark_class_generate removed. New
22238 fields class_list and artificial_constructor.
22239 * parse.y: Fixed typo in header.
22240 (class_declaration:): Call complete_class_decl when class body
22241 parsed.
22242 (method_declaration:): Call source_end_java_method in pass 2 when
22243 the method body is defined.
22244 (postfix_expression:): Do expression name resolution on sub-rule
22245 name during pass 2.
22246 (create_class, create_interface): Merged common pieces.
22247 (check_class_interface_creation, maybe_create_class_interface_decl):
22248 New functions.
22249 (complete_class_decl): New function.
22250 (register_fields): Fixed line width related typo.
22251 (method_header): Correctly skip first argument when fixing
22252 argument line. Changed the loop.
22253 (java_check_circular_reference): Now use ctxp->class_list.
22254 (java_complete_class): Removed start/stop marking.
22255 (java_check_regular_methods): Now takes a class decl as an
22256 argument. Add default constructor if none were encountered.
22257 (java_check_methods): Now use ctxp->class_list. Changed call to
22258 java_check_regular_methods.
22259 (source_start_java_method): Set DECL_ARG_TYPE for each function
22260 arguments.
22261 (source_end_java_method, java_method_add_stmt): New functions.
22262 (java_generate_parsed_class): No longer exists.
22263 (java_layout_parsed_class, java_register_parsed_class): New functions.
22264 (resolve_expression_name): New function.
22265
22266 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
22267
22268 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
22269 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
22270 until pass initializations are done. Call read_import_dir with
22271 pass set to 0.
22272 * parse.h: (lookup_modifier_cl): New function declared.
22273 (INTERFACE_FIELD_MODIFIERS): New macro.
22274 (OBSOLETE_MODIFIER_WARNING): New macro.
22275 * parse.y: (register_fields): Class type and current field name in
22276 local variables. Check modifier(s) if adding field(s) to an interface.
22277 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
22278 and report errors using the faulty modifier line context.
22279 (lookup_modifier_cl): New function.
22280 (read_import_dir): Detect and report default import processing
22281 failure.
22282
22283 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
22284
22285 Add a pair of -fassume-compiled/-fno-assume-compiled options.
22286 * class.c (is_compiled_class): Return 1 after making sure it
22287 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
22288 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
22289 * java-tree.h (flag_assume_compiled): Add decl.
22290 * lang.c (lang_f_options): Add the flag.
22291 (flag_assume_compiled): Add decl, default to 0.
22292
22293 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
22294
22295 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
22296 (is_compiled_class): Likewise.
22297 (layout_class): Likewise.
22298 (layout_class): Detect and lay out classes defined in source code.
22299 (interface_of_p, add_interface_do, may_add_interface): New
22300 function.
22301 (add_interface): Now use add_interface_do.
22302 (add_method_1): New function.
22303 (add_method): Now use add_method_1.
22304 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
22305 (complete_start_java_method): New function.
22306 (start_java_mehod): Now call complete_start_java_method.
22307 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
22308 (expand_invoke): Likewise and fixed typo.
22309 *gjava.c: (print_super_field): Use new argument to find_class
22310 DO_CLASS_FILE.
22311 (main): Likewise.
22312 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
22313 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
22314 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
22315 IDENTIFIER_NODE.
22316 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
22317 (add_method_1, push_class): New prototypes.
22318 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
22319 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
22320 directory where the class was found.
22321 (find_class): New argument DO_CLASS_FILE. Function find_class
22322 modified accordingly.
22323 *jcf-parse.c: (fix_class_path): New function.
22324 (load_class): Use new VERBOSE argument. load_class now finds and
22325 loads/parses .class/.java files. Save read_state of current_jcf
22326 if necessary.
22327 (java_parser_abort_on_error): New macro.
22328 (jcf_parse_source, parse_source_file): New function.
22329 (jcf_parse): Fixed typo.
22330 (yyparse): Call parse_source_file () only.
22331 (process_zip_dir): Fixed typo, fix zdir->filename_length when
22332 writing the real class name back in the zip directory entry.
22333 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
22334 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
22335 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
22336 (find_class): Prototype fixed.
22337 *lex.c: Added 1998 time stamp.
22338 Removed all static global variables, moved into the parser
22339 context data structure.. Now include unistd.h if SEEK_SET not
22340 defined.
22341 (java_init_lex): Rewritten.
22342 (java_sneak_unicode): Modified current unicode access in current line.
22343 (java_unget_unicode): Likewise.
22344 (java_allocate_new_line): New allocation management.
22345 (java_read_char): Modified access and storage of unget_utf8_value.
22346 New way of processing current unicode.
22347 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
22348 (java_get_unicode): Now use the parser context.
22349 (java_lineterminator): Likewise.
22350 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
22351 of the reentrant parser implementation. Function now use the
22352 parser context data structure and java_lval. Fixed production of
22353 the float and double constant "out of range" error message. Fixed
22354 obstack use. Return integer value when hitting a modifier. Now
22355 return type for TRUE, FALSE and other predefined types. Return
22356 identifier as a TREE_LIST list containing the current line context
22357 as the TREE_VALUE sub-node.
22358 (java_unicode_2_utf8): Fixed typo in declaration.
22359 (java_lex_error): Now use the parser context data structure.
22360 *lex.h: Added 1998 time stamp.
22361 (struct java_line): New fields ref_count and next.
22362 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
22363 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
22364 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
22365 *parse.h: Added 1998 time stamp.
22366 (java_parse_source_file): Renamed from parse_source_file.
22367 (YYERROR_NOW, YYNOT_TWICE): Fixed.
22368 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
22369 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
22370 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
22371 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
22372 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
22373 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
22374 (struct parser_ctxt): New data structure to keep the parser context.
22375 *parse.y: Added 1998 time stamp, got rid of static global variables.
22376 (java_error_count, ctxp): New global variables.
22377 (%union): New value field.
22378 (numeric_type, integral_type): Rules removed.
22379 (primitive_type): Rule defined to handle integral, float, double and
22380 boolean types.
22381 (qualified_name, package_declaration,
22382 single_type_import_declaration, type_import_on_demand_declaration,
22383 modifiers, class_declaration, super, interfaces,
22384 interface_type_list, class_body, field_declaration,
22385 field_declaration, variable_declarators, variable_declarator,
22386 variable_declarator_id, method_declaration, method_header,
22387 formal_parameter_list, formal_parameter, method_body, block,
22388 static, interface_declaration, extends_interfaces,
22389 abstract_method_declaration, local_variable_declarators): Rules now
22390 define actions.
22391 (force_error, do_warning): New global statics.
22392 (push_parser_context, parser_context_save_global,
22393 parser_context_restore_global, pop_parser_context): New functions.
22394 (yyerror): Now uses the global parser context. Fixed use of obstack.
22395 (parse_error, parse_error_context, parse_warning_context,
22396 java_accstring_lookup, redefinition_error, check_modifiers,
22397 parser_add_interface, create_interface, create_class, find_field,
22398 duplicate_declaration_error, register_fields, method_header,
22399 check_modifiers_consistency, check_abstract_method_header,
22400 method_declarator, parser_qualified_classname,
22401 parser_check_super_interface, parser_check_super,
22402 parser_chain_incomplete_item, java_check_circular_reference,
22403 layout_class_from_source, java_complete_class,
22404 complete_method_decl, resolve_class, complete_class_report_errors,
22405 java_check_final, check_method_redefinition,
22406 java_check_regular_methods, java_check_abstract_methods,
22407 java_check_methods, lookup_java_interface_method2,
22408 lookup_java_method2, lookup_cl, find_name_in_single_imports,
22409 process_imports, find_in_imports, read_import_entry,
22410 read_import_dir, find_in_imports_on_demand,
22411 check_pkg_class_access, not_builtin_p, declare_local_variables,
22412 source_start_java_method, java_generate_parsed_class): New
22413 functions.
22414 *typeck.c: (signature_include_return): New global variable.
22415 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
22416 to add the function returned type in the signature.
22417
22418 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
22419
22420 * jcf-io.c (open_in_zip): Use strncmp and LEN.
22421
22422 1998-01-29 Dave Brolley <brolley@cygnus.com>
22423
22424 * Make-lang.in (java.info): Added.
22425 (java.install-info): Added
22426
22427 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
22428
22429 * Makefile.in (clean): Also remove java/parse.c.
22430
22431 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
22432
22433 Add a pair of -fbounds-check/-fno-bounds-check options.
22434 * lang.c (lang_decode_option): Add code to grok arguments.
22435 (flag_bounds_check): Add decl.
22436 (lang_f_options): New array w/ the option in it.
22437 * java-tree.h (flag_bounds_check): Add decl.
22438 * lang-options.h: New file.
22439 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
22440 of a static macro value.
22441 (JAVA_ARRAY_EXCEPTION): Delete macro.
22442
22443 1998-01-23 Per Bothner <bothner@cygnus.com>
22444
22445 * typeck.c (build_java_array_type): Fix two bugs in previous change.
22446 * expr.c (build_anewarray): Add missing promote_type.
22447
22448 1998-01-22 Per Bothner <bothner@cygnus.com>
22449
22450 Add array types with known length to optimize bounds checking.
22451 * typeck.c (build_java_array_type): Take length parameter.
22452 (java_array_type_length, build_prim_array_type): New functions.
22453 * java-tree.h: Update for new functions.
22454 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
22455 * class.c: Use build_prim_array_type.
22456 * expr.c (can_widen_reference_to): Handle known-length array types.
22457 (verify_jvm_instructions): Keep track of integer push instructions
22458 followed by newarray/anewarray, so we can build known-length arrays.
22459 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
22460 (java_array_data_offset): New function.
22461 (build_java_array_length_access): New function. Optimize if constant.
22462 (build_java_arrayaccess): Constant fold bounds check.
22463 (expand_java_newarray, expand_java_anewarray): Replaced by ...
22464 (build_newarray, build_anewarray): New functions.
22465 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
22466 * verify.c (merge_types): Handle known-lengh array types.
22467
22468 1998-01-19 Per Bothner <bothner@cygnus.com>
22469
22470 * expr.c (expand_byte_code): Fix performace bug, which caused
22471 searching linenumber_table to be linear rather than constant.
22472
22473 1997-12-12 Per Bothner <bothner@cygnus.com>
22474
22475 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
22476
22477 * decl.c, java-tree.h (soft_fmod_node): New global.
22478 * decl.c (init_decl_processing): Define __builtin_fmod.
22479 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
22480 using __builtin_fmod.
22481
22482 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
22483
22484 * keyword.h: New file, output of keyword.gperf as processed by
22485 gperf.
22486 * lex.c (java_lex_init): Initialize java_error_flag.
22487 * parse.c (YYERROR_NOW): Uses java_error_flag.
22488 * parse.y: New static java_error_flag. Useless definition of
22489 buffer_error gone.
22490 * parse.y (java_error): Portable error recovery using
22491 java_error_flag (not yet completely tuned).
22492
22493 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
22494
22495 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
22496
22497 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
22498
22499 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
22500 (parse.c, lex.c, keyword.h): New rules for Java source code
22501 front-end.
22502 * parse.c: Renamed into jcf-parse.c.
22503 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
22504 * keyword.gperf: New file, Java keywords.
22505 * parse.y: New file, Java language grammar.
22506 * parse.h: New file, Java language grammar definitions.
22507 * lex.c: New file, Java language lexer.
22508 * lex.h: New file, Java language lexer definitions.
22509
22510 1997-12-03 Per Bothner <bothner@cygnus.com>
22511
22512 * decl.c (clinit_identifier_node), java-tree.h: New global.
22513 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
22514 * verify.c (verify_jvm_instructions): Inline use of removed macros.
22515 * expr.c (expand_java_field_op): Check for invalid assignment
22516 to final field.
22517
22518 * jcf-reader.c (get_attribute): Test for wrong attribute length.
22519
22520 1997-10-27 Per Bothner <bothner@cygnus.com>
22521
22522 * verify.c (verify_jvm_instructions): When processing a handler,
22523 attempt to set the current_subr to the right value.
22524 (More complicated code combines Sep 17 and Oct 22 versions.)
22525
22526 1997-10-24 Per Bothner <bothner@cygnus.com>
22527
22528 * class.c (push_class): Figure out (guess) name of source file.
22529 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
22530 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
22531 (parse_class_file): Change return type from int to void.
22532 Call debug_start_source_file/debug_end_source_file.
22533
22534 * expr.c (build_java_binop): Fix masking 2nd operand.
22535 * decl.c (init_decl_processing): Set sizetype first.
22536
22537 1997-10-22 Per Bothner <bothner@cygnus.com>
22538
22539 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
22540 (Revert Sep 17 change.)
22541
22542 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
22543
22544 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
22545 .class extension in their name and fix thing so we don't process
22546 them parse_zip_file_entries().
22547 (parse_zip_file_entries): Cleaned unused local variables.
22548
22549 1997-10-20 Per Bothner <bothner@cygnus.com>
22550
22551 * expr.c (can_widen_reference_to): Allows equal array element types.
22552 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
22553 * jcf-dump.c (RET): Get (and print) index.
22554
22555 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
22556 Promote element type to POINTER_TYPE.
22557
22558 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22559
22560 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
22561 find_in_current_zip, jcf_figure_file_type): Moved from
22562 jcf-reader.c to parse.c.
22563 * zextract.c: (read_zip_archive): takes file_comment_length possible
22564 field into account.
22565
22566 1997-10-20 Per Bothner <bothner@cygnus.com>
22567
22568 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
22569
22570 * verify.c (merge_types): Handle array types even better ...
22571
22572 1997-10-17 Per Bothner <bothner@cygnus.com>
22573
22574 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
22575
22576 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
22577 * class.c (make_class_data): Don't build fields_decl if no fields.
22578 When building fields_decl, skip if DECL_ARTIFICIAL.
22579
22580 * expr.c (java_stack_swap): Update stack_type_map.
22581 * verify.c (merge_types): Handle array types better.
22582
22583 1997-10-15 Per Bothner <bothner@cygnus.com>
22584
22585 * class.c (add_field): Don't promote short integral fields to
22586 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
22587 * expr.c (push_value): Promote and convert short integral values.
22588
22589 * decl.c, java-tree.h (integer_two_node): New constant node.
22590 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
22591
22592 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
22593
22594 * class.c (append_gpp_mangled_type): Use function argument
22595 unpromoted type to generate mangled name.
22596
22597 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
22598
22599 * constants.c (build_constant_data_ref): Now uses current_class
22600 instead of main_class.
22601 (build_constants_constructor): Now uses current_class instead of
22602 main_class.
22603 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
22604 of the global variable SeepZipFiles done here.
22605 * zextract.c (read_zip_archive): extra_field optional field taken
22606 into account while computing the position of the class file in the
22607 archive.
22608 * verify.c (verify_jvm_instructions): Use current_jcf to search
22609 the constant pool.
22610 * parse.c (load_class): First search for the class to load in the
22611 current zip file. Saves current_jcf (restored before returning
22612 from that function). Don't call JCF_FINISH in the class was found
22613 in the current ZIP file.
22614 (jcf_parse): If the class was found in the current ZIP file, save
22615 its tree_constant_pool (for later reuse).
22616 (parse_class_file): New function. Process each method defined in
22617 the current class and record the class as to be later registered.
22618 (yyparse): Rewritten. Figure the type of the current file and switch
22619 accordingly.
22620 * lang.c: New global variable current_jcf.
22621 (lang_init): Removed compiling_from_source test (done later, in
22622 yyparse). Removed call the jcf_parse ().
22623 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
22624 (typedef struct JCF): New fields seen_in_zip (to mark a class found
22625 in the current ZIP file) and zip_offset (offset to the class data in
22626 the current zip file).
22627 * jcf-reader.c: zipfile.h included.
22628 localToFile: New ZipFileCache static global variable
22629 (parse_zip_file_entries): New function. Browse the current ZIP
22630 file directory and process each class found.
22631 (process_zip_dir): New function. Register each class found in the
22632 ZIP file directory. The class aren't parsed but a valid JCF is
22633 link to each of them.
22634 (find_in_current_zip): New function. Search for a class in the
22635 current ZIP file directory. If found, prepare the class so that it
22636 can be loaded.
22637 (jcf_figure_file_type): New function. Examine the file structure
22638 to figure a class file, a ZIP file. If none of these categories are
22639 matched, a source file is assumed.
22640 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
22641 SeenZipFile: New global variable.
22642 (open_in_zip): Use zipmember's length to accelerate the search for
22643 a member. If zipmember was NULL and zip file successfully read,
22644 return 0.
22645 * java-tree.h: New global variable current_jcf declared. Added
22646 declaration for current_constant_pool_tags, current_constant_pool_data,
22647 current_constant_pool_length, current_constant_pool_data_ref.
22648 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
22649 store the JCF of classes seen in a zip file) and tree *constant_pool
22650 (to save a loaded class constant pool). current_class declared here.
22651 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
22652 retrieve method_ref_constant.
22653 (PUSHC): java_push_constant_from_pool now uses current_jcf.
22654 (OBJECT): get_class_constant now uses current_jcf.
22655 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
22656 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
22657 (expand_invoke): Now uses current_class instead of main_class
22658 (build_class_init): Now uses current_class instead of main_class
22659 * class.c: New static global variable registered_class.
22660 (register_class): New function.
22661 (emit_register_class): Modified to use registered_class instead of
22662 main_class
22663 (is_compiled_class): Now take into account class seen in the archive.
22664
22665 1997-10-06 Per Bothner <bothner@cygnus.com>
22666
22667 * except.h: Renamed to: java-except.h.
22668 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
22669 * except.c: Add semi-working (commented out) implementation.
22670
22671 * expr.c (expand_iinc): Add needed flush_quick_stack.
22672 * parse.c (set_source_filename): New function.
22673 (give_name_to_class): Set input_filename from package.classname.java.
22674
22675 * jcf-io.c (find_class): Don't look first in ".".
22676
22677 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
22678
22679 * zextract.c (read_zip_archive): Now takes into account the
22680 extra_field field.
22681 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
22682
22683 1997-09-20 Per Bothner <bothner@cygnus.com>
22684
22685 * constants.c, java-tree.h (build_internal_class_name): New function.
22686 (alloc_class_constant): Re-implement using build_internal_class_name.
22687 * class.c (make_class_data): Likewise.
22688 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
22689
22690 1997-09-17 Per Bothner <bothner@cygnus.com>
22691
22692 * verify.c (verify_jvm_instructions): Temporarily set current_subr
22693 to NULL before pushing an exception handler target.
22694
22695 * expr.c (flush_quick_stack): Save from low stack indexes to high.
22696 (java_stack_swap, java_stack_dup): Re-write to be safe from
22697 clobbering registers.
22698 (build_class_init): New function.
22699
22700 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
22701
22702 * typeck.c (build_java_array_type): Temporary use
22703 permanent_obstack to create the array 'length' field.
22704 * expr.c (lookup_label): Temporay use permanent_obstack to create
22705 label if not found.
22706 * class.c (push_super_field): Tempory use permanent_obstack.
22707
22708 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
22709
22710 * typeck.c (type_for_mode): Now handles double_type_node and
22711 float_type_node.
22712 * verify.c (verify_jvm_instructions): The instruction following
22713 the wide bytecode is checked. OPCODE_ret added to the list of
22714 wide.
22715
22716 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
22717
22718 * class.c (make_class): Temporary use permanent_obstack. Set the
22719 class CLASS_P field to 1.
22720 (push_class): Temporary use permanent_obstack.
22721 (set_super_info): Temporary use permanent_obstack.
22722 (add_method): Temporary use permanent_obstack, set
22723 METHOD_TRANSIENT().
22724 (add_field): Temporary use permanent_obstack. Sets
22725 FIELD_VOLATILE() and FIELD_TRANSIENT().
22726 (build_class_ref): Temporary use permanent_obstack if the class
22727 isn't compiled.
22728 (build_static_field_ref): Temporary use permanent_obstack when
22729 creating field's rtl.
22730 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
22731 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
22732 and fields. Function finalized, as far as flag handling.
22733 (push_class_static_dummy_field): Temporary use permanent_obstack.
22734 (emit_register_class): Force generation of class registration at
22735 -O3 or deeper.
22736 * decl.c (end_java_method): Call permanent_allocation() before
22737 returning.
22738 * expr.c (can_widen_reference_to): Added comment to interface
22739 handling, fixed typo.
22740 (lookup_field): Now uses CLASS_P() to correct FIXME
22741 (expand_invoke): Verification on public && !static &&
22742 !abstract moved into soft_lookupinterfacemethod (kaffe).
22743 Use Object class dtable if objectref is an array when expanding
22744 invokeinterface.
22745 (java_push_constant_from_pool): Temporary use permanent_obstack
22746 for CONSTANT_string
22747 * parse.c (get_ref_constant): Temporary use permanent_obstack to
22748 create constant references.
22749 (get_constant): Temporary use permanent_obstack to create constant.
22750 (load_class): Temporary use permanent_obstack to load class.
22751 (jcf_parse): Temporary use permanent_obstack to perform class
22752 layout.
22753 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
22754 (build_java_signature): Temporary use permanent_obstack.
22755 * verify.c: (verify_jvm_instruction): removed unnecessary verification
22756 on ACC_SUPER flag.
22757 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
22758 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
22759 (CLASS_P): Defined
22760
22761 1997-09-11 Per Bothner <bothner@cygnus.com>
22762
22763 * class.c (append_gpp_mangled_type): Fix typo.
22764 (emit_register_class): Use main_class to get class object, rather
22765 than looking for no-longer-existing static decl starting with _CL.
22766 * typeck.c (parse_signature_type): Promote array element type
22767 if it is a RECORD_TYPE.
22768
22769 1997-09-10 Per Bothner <bothner@cygnus.com>
22770
22771 * class.c (push_class_static_dummy_field): New function.
22772 (mangle_static_field): New. Do G++-style mangling of static fields.
22773 (layout_class): Mandle static fields here, not in add_field.
22774 (build_class_ref): The class object is now a dummy static field.
22775 * decl.c (find_local_variable): Look for best, instead of first match.
22776 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
22777 (build_java_athrow): Don't check here if exception is Throwable.
22778 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
22779 (TYPE_USED): Removed. No longer used ...
22780 * parse.c (jcf_parse): Call push_class_static_dummy_field.
22781 * verify.c (push_pending_label): New function.
22782 (push_pending_block): Renamed to check_pending_block.
22783 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
22784 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
22785 re-checking possible handlers) after a store (less wasted work).
22786 Check for null handler (finally) before calling add_handler.
22787 Various changes to (finally?) correctly handle try/finally.
22788
22789 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
22790
22791 * class.c: Include stdio.h.
22792
22793 1997-09-04 Per Bothner <bothner@cygnus.com>
22794
22795 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22796 to make sure class is initialized before static/special invoke.
22797
22798 * verify.c (verify_jvm_instructions): On a store instruction,
22799 call find_local_variable to force pre-allocation of decl and rtx.
22800 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
22801
22802 1997-09-03 Per Bothner <bothner@cygnus.com>
22803
22804 * class.c (build_class_ref): Strip off "promoted_" if need be.
22805 (make_field_value): Call build_java_signature when needed.
22806 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
22807 * expr.c (build_java_athrow): Don't push_value of exception.
22808 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22809 match specification of [fd]cmp[lg] for NaNs.
22810 (expand_byte_code): Add support for exception handler ranges.
22811 * except.c: Add skeleton for EH code-generation.
22812 * verify.c (merge_types): Treat all promoted integral types as equal.
22813 * constants.c (build_constants_constructor): To force creation of
22814 current_constant_pool_data_ref, call build_constant_data_ref.
22815
22816 * javaop.def (lload): Fix typo.
22817 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
22818
22819 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
22820
22821 * parse.c: Don't include function.h.
22822
22823 1997-08-27 Per Bothner <bothner@cygnus.com>
22824
22825 * except.[ch]: New files.
22826 * Makefile.in (JAVA_OBJS): Add except.o
22827 * expr.c: Temporary warning about unimplemented exceptions.
22828 * verify.c: Verify exception handlers.
22829
22830 * jcf-dump.c (disassemble_method): Print exception table.
22831
22832 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
22833
22834 * expr.c (verify_jvm_instructions): Started a thorough
22835 verification of invoke* bytecodes.
22836 (expand_byte_code): flush quick stack if PC is the target of a
22837 branch. and undef RET (conflicting with config/i386/i386.h).
22838 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22839 used.
22840 (expand_invoke): Now handles invokeinterface and do more
22841 verification according to the bytecode.
22842 (lookup_field): Don't try to load the class if processing
22843 dtable_type.
22844 (can_widen_reference_to): Now handles interfaces.
22845 * decl.c (init_decl_processing): New global variable
22846 soft_lookupinterfacemethod_node, declared in java-tree.h.
22847 Call set_super_info on string_type_node.
22848 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22849 defined.
22850 * class.c (set_super_info): Fills the CLASS_* flags according to
22851 access_flags.
22852 (get_access_flags_from_decl): Handles all class flags.
22853
22854 1997-08-26 Per Bothner <bothner@cygnus.com>
22855
22856 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
22857 * parse.c (yyparse): Check for abstract method, and missing code.
22858 * expr.c (expand_byte_code): Change interface.
22859 * lang.c (put_decl_node): Print promoted types prettier.
22860 * verify.c (verify_jvm_instruction): Change interface.
22861 Partial support for scanning exception table.
22862 For load instructions, handle promoted integral types.
22863
22864 1997-08-21 Per Bothner <bothner@cygnus.com>
22865
22866 * verify.c: New file, with contents moved from expr.c.
22867 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
22868 * typeck.c (is_array_type_p): Moved here from expr.c.
22869 * java-tree.h: Add some now-needed function declarations.
22870 * Makefile.in (JAVA_OBJS): Added verify.o.
22871
22872 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
22873
22874 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22875 METHOD_ABSTRACT flag.
22876
22877 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22878 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22879 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22880
22881 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22882 variables.
22883 (start_java_method): Hook for SYNCHRONIZED methods.
22884
22885 * expr.c (build_java_jsr, build_java_ret): New functions
22886 (JSR,PRE): New macros
22887 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22888 (verify_jvm_instructions): tableswitch, lookupswitch,
22889 monitorenter, monitorexit, goto_w: verified.
22890 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22891 (build_java_monitor): New function.
22892 (MONITOR_OPERATION): Modified to call build_java_monitor()
22893 (verify_jvm_instructions): Started a thorough verification of
22894 invoke* bytecodes.
22895
22896 1997-08-19 Per Bothner <bothner@cygnus.com>
22897
22898 Support verification of jsr/ret subroutines (used for try/finally).
22899 * decl.c (return_address_type_node): New type node.
22900 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22901 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22902 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
22903 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22904 TYPE_USED): New macros for special types in type_map.
22905
22906 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
22907 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
22908 BCODE_JUMP_TARGET.
22909 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
22910
22911 * expr.c (can_widen_reference_to): New function.
22912 (pop_type): Use it.
22913 (merge_type_state): Support handling start of subroutine.
22914 (push_pending_block): Return char* error message, instead of calling
22915 fatal on an error. Also handle subroutines.
22916 (verify_jvm_instructions): Handle errors from push_poending_block.
22917 Support jsr and ret instructions.
22918
22919 1997-08-19 Per Bothner <bothner@cygnus.com>
22920
22921 * jcf-io.c (find_classfile): Fix thinko.
22922 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
22923
22924 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
22925
22926 * Makefile.in (BISON): Remove.
22927
22928 1997-08-07 Per Bothner <bothner@cygnus.com>
22929
22930 * Makefile.in: Convert to autoconf.
22931 * config-lang.in (outputs): Added java/Makefile.
22932
22933 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22934 Rename cc1java to jc1.
22935
22936 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
22937 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
22938
22939 * class.c (class_depth): Do load_class if needed.
22940
22941 Mostly better verification.
22942 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
22943 (init_decl_processing): Change return type of soft_checkcast.
22944 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
22945 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22946 lang_print_error): New functions.
22947 (lang_init): Set global hook print_error_function to lang_print_error.
22948 * expr.c: In the type_map ptr_type_node is only used for null now.
22949 (pop_type, merge_types): Hence ptr_type_node matches any reference.
22950 (merge_types): Dererence pointer to record types before comparing.
22951 (decode_newarray_type, merge_types): On error just return NULL.
22952 (build_java_binop): Add preliminary implementation (with warning)
22953 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22954 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
22955 (expand_compare, expand_java_goto, expand_java_call): Don't
22956 push_pending_block, since that only makes sense when verifying.
22957 (merge_type_state): Different return codes.
22958 (push_pending_block): A block may need to be verified more than once.
22959 (expand_byte_code): Warn about unused code at code generation time.
22960 (verify_jvm_instruction): Changed logic, since code may need to be
22961 re-verified if type-state has changed. Also, better error handling.
22962 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22963 Improve newarray, anewarray, ?aload, athrow,
22964 * java-tree.h (LABEL_CHANGED): New macro.
22965
22966 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
22967
22968 * decl.c (soft_athrow_node): New global variable initialized.
22969 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22970 * typeck.c (convert): Added support for REAL_TYPE.
22971 (convert_to_char): New function.
22972 (convert): Handle CHAR_TYPE.
22973 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22974 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22975 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22976 promoted type.
22977 (verify_jvm_instructions): Added break a the end of bogus unop: label.
22978 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22979 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22980 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22981 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22982 to Use The Right Things.
22983 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22984 compatible with INT. BOOLEAN is made equivalent to BYTE.
22985 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22986 OPCODE_ifnonnull): Now supported.
22987 (build_java_athrow): New function.
22988
22989 1997-08-04 Per Bothner <bothner@cygnus.com>
22990
22991 Rename method name <init> to match G++ (and fix mangling).
22992 * class.c (layout_class): Replace method name of <init> by class name.
22993 (make_method_value): Do inverse renaming of constructor from <init>.
22994 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
22995 * typeck.c (lookup_java_constructor): New function.
22996 * expr.c (expand_invoke): If method_name is <init>, call
22997 lookup_java_constructor to find constructor.
22998
22999 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
23000
23001 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
23002
23003 * parse.c (get_class_constant): Modified to handle array "classes"
23004 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
23005 wide type.
23006 (convert): Modified to handle real type.
23007 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
23008 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
23009 variables declared.
23010 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
23011 soft_multianewarray, soft_newarray_node, soft_throw_node): New
23012 global variables initialized.
23013 (find_local_variable): Handles the case of a pointer
23014 (end_java_method): Restore the use of one more scope
23015 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
23016 build_java_array_length_access, expand_java_arrayload,
23017 expand_java_arraystore, expand_java_array_length,
23018 expand_java_multianewarray, expand_java_anewarray,
23019 build_java_check_indexed_type, is_array_type_p,
23020 build_java_throw_out_of_bound_exception): New functions.
23021 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
23022 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
23023 OPCODE_<t>aload): Implemented code for verification.
23024 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
23025 ARRAY_NEW_MULTI): Macro defined.
23026 (CONVERT): Modified to invoke convert().
23027 (case OPCODE_aload2): Fixed index typo from 2 to 1.
23028
23029 1997-07-31 Per Bothner <bothner@cygnus.com>
23030
23031 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
23032 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
23033 (make_class_data): Field name needs '/' as package prefix.
23034 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
23035
23036 1997-07-25 Per Bothner <bothner@cygnus.com>
23037
23038 Implement debug information for local variables.
23039 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
23040 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
23041 DECL_LOCAL_SLOT_CHAIN): New macros.
23042 (struct lang_decl_var): New type.
23043 * parse.c (give_name_to_locals): Move to decl.c.
23044 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
23045 (start_java_method): Re-write parameter handling.
23046 (pending_local_decls): New global variable.
23047 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
23048 (find_local_variable): Accept pc so we can skips decls not in range.
23049 (struct binding_level): Add end_pc field.
23050 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
23051 (various): Change so current pc gets passed to find_local_variable.
23052
23053 * decl.c (init_decl_processing): Re-arrange fields in
23054 class_type_node and and method_type_node to match kaffe 0.9.1.
23055 * class.c (make_method_value, make_class_data): Update
23056 initializations to match.
23057
23058 1997-07-16 Per Bothner <bothner@cygnus.com>
23059
23060 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
23061 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
23062 (push_super_field): New function.
23063 (make_class_data): Handle inheritance of class static initializer.
23064 (layout_class): New name mangling.
23065 * constants.c (build_constant_data_ref): Init type of data array
23066 to a one-element array.
23067 (build_constants_constructor): Set DECL_SIZE from complete array type.
23068 * decl.c: Rename class_type, object_type etc to class_type_node,
23069 object_type_node etc. Make former inherit from latter.
23070 * expr.c (expand_invoke): Add cast of function address.
23071 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
23072 * parse.c (yyparse): Don't call layout_class here.
23073 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
23074
23075 1997-06-14 Per Bothner <bothner@cygnus.com>
23076
23077 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
23078 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
23079 (alloc_class_constant): New.
23080 * expr.c (expand_invoke): Make sure method's class is initialized.
23081 * class.c (interits_from_p, emit_register_class): New functions.
23082 * parse.c (yyparse): Call emit_register_class.
23083
23084 1997-06-09 Per Bothner <bothner@cygnus.com>
23085
23086 * constants.c: New file, to handle constant pool.
23087 * Makefile.in (JAVA_OBJS): Add constants.o.
23088 * decl.c (init_decl_processing): Update, fix, finish various structs.
23089 (pushdecl_top_level): New.
23090 * parse.c (layout_class): Moved to class.c.
23091 * expr.c (java_push_constant_from_pool): New function.
23092 * class.c (build_class_ref): Make work fully
23093 (make_class_data): Emit super-class, constant pool, interface vector.
23094
23095 1997-06-03 Per Bothner <bothner@cygnus.com>
23096
23097 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
23098 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
23099 * class.c (class_depth): New function.
23100 (lookup_named_class): Replaced by new function lookup_class.
23101 * decl.c (object_type_node, string_type_node): New.
23102 Remove various types that we no longer need.
23103 * expr.c (verify_jvm_instructions): New separate verifier pass.
23104 (push_type, pop_type): New functions for verifier.
23105 (type_stack_dup, pop_argument_types, merge_types): Likewise.
23106 (expand_byte_code): Simplify, since we assume already verified.
23107 (expand_invoke): Now mostly works.
23108 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
23109 * lang.c (main_class): Move to parse.c. Don't make_class yet.
23110 * parse.c: Wait to allocate class object until we know its name.
23111 (layout_class): Calculate DECL_VINDEX for each virtual method.
23112 * typeck.c (get_array_type): Rename to ...
23113 (build_java_array_type): ... and provide working implementation.
23114 (build_java_signature): New function - build Java signature of type.
23115 (set_java_signature): New function - cache signature with type.
23116 (lookup_java_method): New function.
23117
23118 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
23119
23120 * class.c (ident_subst): Take extra SUFFIX parameter.
23121 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
23122 (set_constant_value, build_static_field_ref, is_compiled_class): New.
23123 (build_class_ref): Actually implement.
23124 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
23125 * decl.c (builtin_function): New.
23126 (init_decl_processing): Update for current Kaffe. Declare some
23127 builtin Kaffe functions.
23128 * expr.c (build_address_of): New.
23129 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
23130 Renamed (from expand_java_new etc), and added working implementations.
23131 (build_field_ref): Now also handle static fields.
23132 (expand_invoke): Implement invokestatic, and start implement rest.
23133 * java-opcodes.h: Use javaop.def to avoid duplicated list.
23134 * javaop.def: Rename invokevirt -> invokevirtual.
23135 * lang.c (use_handles): Removed.
23136 * parse.c: Add support for ConstantValue attribute.
23137 Handle nested loading of a class. (JPOOL_UTF): New.
23138
23139 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
23140
23141 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
23142
23143 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
23144
23145 * Make-lang.in (java.install-man): New empty rule.
23146 * typeck.c (set_local_type): New function.
23147 * expr.c (STORE_INTERNAL): Call find_local_variable,
23148 not find_stack_slot. Call set_local_type.
23149
23150 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
23151
23152 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
23153 and building RECORD_TYPE CONSTRUCTORs.
23154 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
23155
23156 * lang.c (use_handles): Change the default to 0.
23157 * decl.c: Define and build class_type, field_type, utf8const_type.
23158 * class.c (make_class_data, make_field_value,
23159 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
23160 hashUtf8String, strLengthUtf8, mangled_classname:
23161 Functions to build reflective data structures.
23162 * parse.c (yyparse): Call make_class_data.
23163
23164 * jcf-io.c (open_class, find_classfile): New functions.
23165 * jcf-dump.c: Support reading classfile from explicitly-named
23166 class file (without CLASSPATH searching).
23167
23168 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
23169
23170 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
23171 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
23172 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
23173 (get_constant): Now trivial for CONSTANT_Utf8.
23174
23175 * jcf.h: Make NEW_CPOOL the default.
23176 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
23177
23178 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
23179
23180 New directory.
23181
23182 \f
23183 Copyright (C) 1996-2015 Free Software Foundation, Inc.
23184
23185 Copying and distribution of this file, with or without modification,
23186 are permitted in any medium without royalty provided the copyright
23187 notice and this notice are preserved.