]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/java/ChangeLog
cuintp.c: Replace host_integerp (..., 0) with tree_fits_shwi_p throughout.
[thirdparty/gcc.git] / gcc / java / ChangeLog
CommitLineData
9541ffee
RS
12013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2
3 * class.c, expr.c: Replace host_integerp (..., 0) with
4 tree_fits_shwi_p throughout.
5
18f429e2
AM
62013-11-14 Andrew MacLeod <amacleod@redhat.com>
7
8 * java-gimplify.c: Include only gimplify.h and gimple.h as needed.
9
45b0be94
AM
102013-11-12 Andrew MacLeod <amacleod@redhat.com>
11
18f429e2 12 * java-gimplify.c: Include gimplify.h.
45b0be94 13
89d3d605
JL
142013-11-07 Jeff Law <law@redhat.com>
15
16 * builtins.c (initialize_builtins): Provide __builtin_trap.
17
67348ccc
DM
182013-10-29 David Malcolm <dmalcolm@redhat.com>
19
20 Patch autogenerated by refactor_symtab.py from
21 https://github.com/davidmalcolm/gcc-refactoring-scripts
22 revision 58bb219cc090b2f4516a9297d868c245495ee622
23
24 * decl.c (java_mark_decl_local): Update for conversion of symtab types
25 to a true class hierarchy.
26
47e0da37
DM
272013-10-14 David Malcolm <dmalcolm@redhat.com>
28
29 * lang.c (java_handle_option): Update for introduction of
30 gcc::dump_manager.
31
76af5b38
TT
322013-09-25 Tom Tromey <tromey@redhat.com>
33
34 * Make-lang.in (jvspec.o): Remove.
35 (CFLAGS-java/jvspec.o): New variable.
36 ($(XGCJ)$(exeext), java_OBJS): Use java/jvspec.o
37 (java/jvspec.o-warn): Rename from jvspec.o-warn.
38 (JAVA_TREE_H, java/jcf-dump.o, java/boehm.o, java/builtins.o)
39 (java/class.o, java/constants.o, java/decl.o, java/except.o)
40 (java/expr.o, java/jcf-depend.o, java/jcf-parse.o)
41 (java/jvgenmain.o, java/lang.o, java/mangle.o, java/mangle_name.o)
42 (java/resource.o java/typeck.o, java/win32-host.o)
43 (java/verify-glue.o, java/verify-impl.o, java/zextract.o)
44 (java/java-gimplify.o, java/jcf-io.o, java/jcf-path.o): Remove.
45
f3bc55f0
TT
462013-09-25 Tom Tromey <tromey@redhat.com>
47
48 * Make-lang.in (jvspec.o): Don't use subshell.
49
edb983b2
JH
502013-06-05 Jan Hubicka <jh@suse.cz>
51
52 * class.c (emit_register_classes_in_jcr_section): Use DECL_PRESERVE_P
53 instead of mark_decl_referenced.
54
e70670cf
JH
552013-05-29 Jan Hubicka <jh@suse.cz>
56
57 * decl.c (java_mark_decl_local): Update for new symtab flags.
58
4270eba5
MK
592013-05-22 Matthias Klose <doko@ubuntu.com>
60
61 * jvspec.c (jvgenmain_spec): Add %I to cc1 call.
62
427b248d
JM
632013-05-16 Jason Merrill <jason@redhat.com>
64
65 * Make-lang.in (jc1$(exeext)): Use link mutex.
66
cb3f6a88
JJ
672013-05-06 Jakub Jelinek <jakub@redhat.com>
68
69 PR libgcj/57074
70 * class.c (emit_symbol_table): Use array type of the
71 right size for the_syms_decl and its DECL_INITIAL, instead
72 of symbols_array_type. Set TREE_TYPE (the_syms_decl) to it.
73 (emit_assertion_table): Use array type of the right size
74 for table_decl and its DECL_INITIAL.
75
cdbaf71a
GP
762013-04-15 Gerald Pfeifer <gerald@pfeifer.com>
77
78 * gcj.texi (Configure-time Options): Refer to GCC, not gcc.
79 (Resources): Adjust reference to Mauve.
80 Remove link to java.sun.com.
81 Refer to GCC, not gcc.
82
3d741091
RB
832013-04-09 Richard Biener <rguenther@suse.de>
84
85 * expr.c (build_java_binop): Pass a type to build_int_cst.
86
226e58b7
KT
872013-03-22 Kai Tietz <ktietz@redhat.com>
88
89 * lang.c (put_decl_node): Don't iterate over end_params_node.
90
df8e2b4f
JJ
912013-01-03 Jakub Jelinek <jakub@redhat.com>
92
93 * jcf-dump.c (version): Update copyright notice dates.
94
9771b263
DN
952012-11-16 Diego Novillo <dnovillo@google.com>
96
97 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
98
99 * boehm.c: Use new vec API in vec.h.
100 * class.c: Likewise.
101 * constants.c: Likewise.
102 * decl.c: Likewise.
103 * expr.c: Likewise.
104 * java-tree.h: Likewise.
105 * jcf-parse.c: Likewise.
106 * resource.c: Likewise.
107 * verify-glue.c: Likewise.
108
3aac5aad
JH
1092012-11-15 Jan Hubicka <jh@suse.cz>
110
111 * builtins.c (define_builtin): Accept ECF flags and
112 use set_call_expr_flags.
113 (initialize_builtins): Update.
114
703c8606
LC
1152012-10-01 Lawrence Crowl <crowl@google.com>
116
117 * Make-lang.in (JAVA_OBJS): Add dependence on hash-table.o.
118 (JCFDUMP_OBJS): Add dependence on hash-table.o.
119 (jcf-io.o): Add dependence on hash-table.h.
120 * jcf-io.c (memoized_class_lookups): Change to use type-safe hash table.
121
9be0ac8c
LC
1222012-09-24 Lawrence Crowl <crowl@google.com>
123
124 * decl.c (java_init_decl_processing): Change to new double_int API.
125 * jcf-parse.c (get_constant): Likewise.
126 * boehm.c (mark_reference_fields): Likewise.
127 (get_boehm_type_descriptor): Likewise.
128
c0fd3497
LB
1292012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com>
130
131 * jcf.h (CPool): Use the "atomic" GTY option for the tags field.
132 (bootstrap_method): Likewise for the bootstrap_arguments field.
133
7ee2468b
SB
1342012-07-16 Steven Bosscher <steven@gcc.gnu.org>
135
d7b6661b 136 * java-gimplify.c: Include dumpfile.h instead of tree-dump.h
7ee2468b
SB
137 * Make-lang.in: Fix dependencies.
138
53cd1f80
SB
1392012-07-11 Steven Bosscher <steven@gcc.gnu.org>
140
141 * java-tree.h (force_evaluation_order): Remove prototype.
142 * expr.c (force_evaluation_order): Remove unused function.
143
6bdf3519
SB
1442012-07-11 Steven Bosscher <steven@gcc.gnu.org>
145
146 * decl.c: Do not include libfuncs.h.
147 * class.c: Do not include defaults.h.
148 * jvgenmain.c: Likewise.
149 * magnle.c: Likewise.
150 * Make-lang.in (decl.o): Fix dependencies.
151
79bdca32
SB
1522012-07-08 Steven Bosscher <steven@gcc.gnu.org>
153
154 * verify.h: Do not include system.h and coretypes.h here.
155 * verify-impl.c: Include them here instead.
156
4b68f9ee
UB
1572012-07-05 Uros Bizjak <ubizjak@gmail.com>
158
159 * jcf-io.c (read_zip_member): Initialize d_stream.
160
be7a421e
SB
1612012-05-31 Steven Bosscher <steven@gcc.gnu.org>
162
163 * resource.c: Do not include output.h.
164
bbe9ae51
JDA
1652012-05-21 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
166
167 PR java/52815
168 * class.c (emit_register_classes_in_jcr_section): Revise placement
169 of #ifdef JCR_SECTION_NAME.
170
66058468
JH
1712012-04-22 Jan Hubicka <jh@suse.cz>
172
173 * class.c (build_utf8_ref): Do not mark varpool node as needed.
174
ead84f73
JH
1752012-04-20 Jan Hubicka <jh@suse.cz>
176
177 * class.c (make_local_function_alias): Do not mark symbol referenced.
178
3dee4905
RO
1792012-04-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
180
181 * jcf-dump.c (print_constant): Cast JPOOL_USHORT2, JPOOL_USHORT1
182 results to long to match formats.
183
e9184c9e
AH
1842012-04-11 Andrew Haley <aph@redhat.com>
185
186 * jcf-reader.c (jcf_parse_bootstrap_methods): Add
187 ATTRIBUTE_UNUSED.
188
cca4dd59
AH
1892012-04-11 Andrew Haley <aph@redhat.com>
190
191 * jcf.h (bootstrap_method): New.
192 (BootstrapMethods): New.
193 (JCF): Add BootstrapMethods.
194 (enum cpool_tag): Add MethodHandle, MethodType, and InvokeDynamic.
195 * jcf-reader.c (jcf_parse_bootstrap_methods): New.
196 (jcf_parse_constant_pool): Handlers for MethodHandle, MethodType,
197 and InvokeDynamic.
198 (jcf_parse_bootstrap_methods): New.
199 * javaop.def (invokedynamic): New opcode.
200 * jcf-parse.c (get_constant): An unknown constant type should not
201 be an internal error, but a fatal one. Make it so.
202 * jcf-dump.c (HANDLE_BOOTSTRAP_METHODS_ATTRIBUTE): New.
203 (HANDLE_END_BOOTSTRAP_METHODS): New.
204 (print_constant): Handlers for MethodHandle, MethodType, and
205 InvokeDynamic.
206
64f07b66
RO
2072012-04-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
208
209 * class.c (emit_register_classes_in_jcr_section): Set DECL_USER_ALIGN.
210 Clear TREE_READONLY.
211
63737e7a
SB
2122012-03-29 Steven Bosscher <steven@gcc.gnu.org>
213
214 PR java/52730
215 * class.c (emit_register_classes_in_jcr_section): New function.
216 (emit_Jv_RegisterClass_calls): New function, split out from ...
217 (emit_register_classes): ... here. Reorganize. Do not call
218 output_constant.
219
ff06e6b1
AS
2202012-01-23 Andreas Schwab <schwab@linux-m68k.org>
221
222 * lang.c (java_init_options_struct): Set
223 frontend_set_flag_trapping_math.
224
66f1b195
JJ
2252012-01-01 Jakub Jelinek <jakub@redhat.com>
226
227 * jcf-dump.c (version): Update copyright notice dates.
228
50ada590
MK
2292011-12-03 Matthias Klose <doko@ubuntu.com>
230
231 * expr.c (SPECIAL_WIDE): Fix typo in message.
232
810fb8f1
JL
2332011-11-23 Jeffrey A Law (law@cygnus.com)
234
235 * lang.c (java_init_options_struct): Disable optimizations
236 which assume a NULL pointer dereference will cause a fault.
237
cedb4a1a
RH
2382011-11-07 Richard Henderson <rth@redhat.com>
239
240 * builtins.c (compareAndSwapInt_builtin): Use can_compare_and_swap_p.
241 (compareAndSwapLong_builtin): Likewise.
242 (compareAndSwapObject_builtin): Likewise.
243 (VMSupportsCS8_builtin): Likewise.
244
b040f2be
RO
2452011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
246
247 * Make-lang.in (jvspec.o): Pass SHLIB instead of SHLIB_LINK.
248
46427374
TT
2492011-10-15 Tom Tromey <tromey@redhat.com>
250 Dodji Seketeli <dodji@redhat.com>
251
252 * jcf-parse.c (set_source_filename): Adjust to the new map API.
253
e79983f4
MM
2542011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
255
256 * class.c (build_static_field_ref): Delete old interface with two
257 parallel arrays to hold standard builtin declarations, and replace
258 it with a function based interface that can support creating
259 builtins on the fly in the future. Change all uses, and poison
260 the old names. Make sure 0 is not a legitimate builtin index.
261 * decl.c (java_init_decl_processing): Ditto.
262 * except.c (compareAndSwapLong_builtin): Ditto.
263 (compareAndSwapObject_builtin): Ditto.
264 (putVolatile_builtin): Ditto.
265 (define_builtin): Ditto.
266 (check_for_builtin): Ditto.
267 * expr.c (rewrite_arglist_getcaller): Ditto.
268 (expand_java_field_op): Ditto.
269
c5bc3df6
JM
2702011-08-24 Joseph Myers <joseph@codesourcery.com>
271
272 * Make-lang.in (CFLAGS-java/jcf-io.o, CFLAGS-java/jcf-path.o):
273 New.
274 (java/jcf-io.o, java/jcf-path.o): Remove explicit compilation
275 rules.
276
901ebcdf
PC
2772011-08-18 Peter Collingbourne <peter@pcc.me.uk>
278
279 * expr.c (expand_invoke) Use the type of the method rewrite
280 target.
281
693ed633
RO
2822011-08-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
283
284 * jcf-dump.c (print_constant): Cast first frexp arg.
285
e3b3fa45
RO
2862011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
287
288 * Make-lang.in ($(XGCJ)$(exeext)): Add $(EXTRA_GCC_LIBS).
289
5d49b6a7
RG
2902011-07-19 Richard Guenther <rguenther@suse.de>
291
292 * builtins.c (static): Use fold_build_pointer_plus.
293 * class.c (make_class_data): Likewise.
294 (build_symbol_entry): Likewise.
295 * except.c (build_exception_object_ref): Likewise.
296 * expr.c (build_java_arrayaccess): Likewise.
297 (build_field_ref): Likewise.
298 (build_known_method_ref): Likewise.
299 (build_invokevirtual): Likewise.
300
1a072294
RG
3012011-07-06 Richard Guenther <rguenther@suse.de>
302
303 * decl.c (java_init_decl_processing):
304 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
305
e0a8ecf2
AM
3062011-06-21 Andrew MacLeod <amacleod@redhat.com>
307
308 * builtins.c: Add sync_ or SYNC__ to builtin names.
309 * expr.c: Add sync_ or SYNC__ to builtin names.
310
c3c79fc5
RG
3112011-06-07 Richard Guenther <rguenther@suse.de>
312
313 * decl.c (java_init_decl_processing): Call build_common_nodes,
314 build_common_nodes_2 at the beginning. Remove then duplicate
315 initializations.
316
009db074
RG
3172011-06-07 Richard Guenther <rguenther@suse.de>
318
319 * decl.c (java_init_decl_processing): Properly initialize
320 size_type_node.
321
c87765d6
JR
3222011-05-30 Joern Rennecke <joern.rennecke@embecosm.com>
323
324 PR middle-end/46500
325 * expr.c: Include "tm.h" .
326
92e948a8
NF
3272011-05-26 Nathan Froyd <froydnj@codesourcery.com>
328
329 * decl.c (poplevel): Don't access TREE_TYPE of BLOCKs.
330 * expr.c (build_jni_stub): Likewise.
331
1ed1641d
JM
3322011-05-24 Joseph Myers <joseph@codesourcery.com>
333
334 * Make-lang.in ($(XGCJ)$(exeext)): Use libcommon-target.a instead
335 of prefix.o.
336
2691e6d7
JM
3372011-05-20 Joseph Myers <joseph@codesourcery.com>
338
339 * Make-lang.in ($(XGCJ)$(exeext)): Don't explicitly use intl.o and
340 version.o.
341 (JCFDUMP_OBJS): Remove errors.o, version.o and intl.o.
342 (JVGENMAIN_OBJS): Remove errors.o and intl.o.
343 (java/jcf-dump.o, java/jvgenmain.o): Depend in $(DIAGNOSTIC_H).
344 * jcf-dump.c: Include diagnostic.h.
345 (main): Initialize diagnostics.
346 * jvgenmain.c: Include diagnostic.h.
347 (main): Initialize diagnostics.
348
51545682
NF
3492011-05-11 Nathan Froyd <froydnj@codesourcery.com>
350
351 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL.
352
c99c0026
EB
3532011-05-07 Eric Botcazou <ebotcazou@adacore.com>
354
355 * java-tree.h (global_bindings_p): Adjust prototype.
356 * decl.c (global_bindings_p): Return bool.
357
3d528853
NF
3582011-05-05 Nathan Froyd <froydnj@codesourcery.com>
359
360 * expr.c (expand_java_switch): Call build_case_label.
361 (expand_java_add_case): Likewise.
362
fdf390e6
RG
3632011-04-29 Richard Guenther <rguenther@suse.de>
364
365 PR middle-end/48819
366 * constants.c (build_constants_constructor): Use ptr_type_node for
367 temp.
368
04695783
JM
3692011-04-20 Jim Meyering <meyering@redhat.com>
370
371 * jcf-parse.c (java_parse_file): Remove useless if-before-free.
372
cff41484
JM
3732011-04-18 Jim Meyering <meyering@redhat.com>
374
375 * jcf-parse.c: Fix typo in comment.
376
61e46a7d
NF
3772011-04-14 Nathan Froyd <froydnj@codesourcery.com>
378
379 * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon.
380
81f653d6
NF
3812011-04-12 Nathan Froyd <froydnj@codesourcery.com>
382
383 * java-tree.h (union lang_tree_node): Check for TS_COMMON before
384 calling TREE_CHAIN.
385
9f9ebcdf
MJ
3862011-04-11 Martin Jambor <mjambor@suse.cz>
387
388 * decl.c (java_mark_decl_local): Call cgraph_get_node instead of
389 cgraph_node and handle returned NULL.
390
ba78087b
KT
3912011-03-25 Kai Tietz <ktietz@redhat.com>
392
393 * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
394 instead of strcmp.
395 (set_source_filename): Likewise.
396 * win32-host.c (jcf_open_exact_case): Likewise.
397
62d784f7
KT
3982011-03-21 Kai Tietz <ktietz@redhat.com>
399
400 PR target/12171
401 * lang.c (java_attribute_table): Adjust table.
402
4b79050f
JM
4032011-02-13 Joseph Myers <joseph@codesourcery.com>
404
405 * jvspec.c (jvgenmain_spec): Remove %{a*}.
406
1dd584a2
KT
4072011-01-21 Kai Tietz <kai.tietz@onevision.com>
408
409 PR bootstrap/47215
410 * decl.c (java_init_decl_processing): Remove
411 va_list_type_node related type initializations.
412
d504eedc
KT
4132011-01-11 Kai Tietz <kai.tietz@onevision.com>
414
415 PR bootstrap/47215
416 * decl.c (java_init_decl_processing): Initialize
417 long_integer_type_node.
418
dc1b62ea
KT
4192011-01-07 Kai Tietz <kai.tietz@onevision.com>
420
421 PR bootstrap/47215
ff06e6b1 422 * decl.c (java_init_decl_processing): Initialize unsigned_type_node.
dc1b62ea 423
d6bcbb40
KT
4242011-01-07 Kai Tietz <kai.tietz@onevision.com>
425
426 * decl.c (java_init_decl_processing): Setup va_list_type_node.
427
9f8e43c0
JJ
4282011-01-03 Jakub Jelinek <jakub@redhat.com>
429
430 * jcf-dump.c (version): Update copyright notice dates.
431
9dd22dd8
DK
4322010-12-15 Dave Korn <dave.korn.cygwin@gmail.com>
433
434 * decl.c (java_init_decl_processing): Initialise integer_three_node.
435 * lang.c (put_decl_node): Handle nested function decls.
436
819bfe0e
JM
4372010-12-07 Joseph Myers <joseph@codesourcery.com>
438
439 * jcf-parse.c: Don't include assert.h.
440 (java_parse_file): Use gcc_assert.
441
dd9f93dc
JM
4422010-12-03 Joseph Myers <joseph@codesourcery.com>
443
444 * lang.opt (static-libgcj): New option.
445
a803773f
JM
4462010-12-01 Joseph Myers <joseph@codesourcery.com>
447
448 * jcf-parse.c: Don't include toplev.h.
449 * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
450
c59ffc41
JM
4512010-11-30 Joseph Myers <joseph@codesourcery.com>
452
453 * boehm.c: Don't include toplev.h.
454 * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
455
7c475d11
JM
4562010-11-30 Joseph Myers <joseph@codesourcery.com>
457
458 * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
459 verify-glue.c: Don't include toplev.h.
460 * Make-lang.in: Dependencies for above files changed to remove
461 toplev.h.
462
71f3e391
JM
4632010-11-29 Joseph Myers <joseph@codesourcery.com>
464
465 * boehm.c: Include "config.h" instead of <config.h>.
466 * builtins.c: Don't include <stdarg.h>.
467 * class.c: Don't include "stdio.h".
468 (O_BINARY): Don't define here.
469 * jcf-depend.c: Don't include <assert.h>.
470 (jcf_dependency_set_dep_file, jcf_dependency_init,
471 jcf_dependency_write): Use gcc_assert.
472 * jcf-io.c (O_BINARY): Don't define here.
473 * jcf-path.c: Don't include "tm.h".
474 (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
475 * resource.c: Don't include "stdio.h".
476 (O_BINARY): Don't define here.
477 * verify-impl.c: Don't include <stdio.h>.
478
b37421c6
JM
4792010-11-17 Joseph Myers <joseph@codesourcery.com>
480
481 * jcf-parse.c (java_parse_file): Take no arguments.
482 * java-tree.h (java_parse_file): Update prototype.
483
2b129627
JR
4842010-11-09 Joern Rennecke <amylaar@spamcop.net>
485 Andrew Haley <aph@redhat.com>
486
487 PR java/46386
488 * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
489
a4d8c676
JM
4902010-11-12 Joseph Myers <joseph@codesourcery.com>
491
492 * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
493 * lang.c (java_handle_option): Take location_t parameter.
494
d8a07487
JM
4952010-11-10 Joseph Myers <joseph@codesourcery.com>
496
497 * expr.c (expand_java_field_op): Use %' in diagnostic.
498 * jcf-parse.c (java_parse_file): Use %' in diagnostics.
499 * jvspec.c (lang_specific_driver): Use %' in diagnostic.
500 * lang.c (java_post_options): Use %' in diagnostics.
501
4ee3b013
JR
5022010-11-06 Joern Rennecke <amylaar@spamcop.net>
503
504 PR middle-end/46314
505 * class.c: Include target.h.
506 (make_local_function_alias):
507 Use targetm.asm_out.generate_internal_label.
508 * expr.c (lookup_label, generate_name): Likewise.
509
2e681adf
JR
5102010-11-03 Joern Rennecke <joern.rennecke@embecosm.com>
511
512 PR bootstrap/44335
513 * jfc-parse.c (target.h): Include.
514 (handle_constant): Use targetm.words_big_endian and
515 targetm.float_words_big_endian.
516 (get_constant): Use targetm.float_words_big_endian.
517
bde8a146
RH
5182010-10-13 Richard Henderson <rth@redhat.com>
519
520 * lang.c (java_eh_personality): Update call to
521 build_personality_function.
522
f938f60c
JM
5232010-10-12 Joseph Myers <joseph@codesourcery.com>
524
525 * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
526 options.h.
527
9dc1704f
NF
5282010-10-11 Nathan Froyd <froydnj@codesourcery.com>
529
530 * decl.c (java_init_decl_processing): Use build_function_type_list
531 instead of build_function_type.
532 * jcf-parse.c (java_emit_static_constructor): Likewise.
533 * builtins.c (initialize_builtins): Likewise.
534
a75bfaa6
JM
5352010-10-08 Joseph Myers <joseph@codesourcery.com>
536
537 * lang.c (java_init_options_struct): New. Split out from
538 java_init_options.
539 (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
540
a90163e9
AK
5412010-10-04 Andi Kleen <ak@linux.intel.com>
542
543 * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
ff06e6b1 544 Add + to build rule.
a90163e9 545
f0036cca
JM
5462010-09-29 Joseph Myers <joseph@codesourcery.com>
547
548 * lang.opt: Don't use VarExists.
549
e3339d0f
JM
5502010-09-29 Joseph Myers <joseph@codesourcery.com>
551
552 * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
553 flag_force_classes_archive_check, flag_redundant, flag_newer,
554 flag_use_divide_subroutine, flag_use_atomic_builtins,
555 flag_use_boehm_gc, flag_hash_synchronization,
556 flag_check_references, flag_optimize_sci, flag_indirect_classes,
557 flag_indirect_dispatch, flag_store_check,
558 flag_reduced_reflection): Remove.
559 * jcf-dump.c (flag_newer): Remove.
560 * jcf.h (quiet_flag): Remove.
561 * parse.h (quiet_flag): Remove.
562
f0a0390e
RH
5632010-09-28 Richard Henderson <rth@redhat.com>
564
565 * lang.c: Include "target.h".
566 (java_eh_personality): Use targetm.except_unwind_info.
567 * Make-lang.in (lang.o): Update deps.
568
06f1db4b
AH
5692010-09-27 Andrew Haley <aph@redhat.com>
570
571 PR java/45773
572 * jvgenmain.c (main): Fix arg processing.
573
e200444e
JM
5742010-09-22 Joseph Myers <joseph@codesourcery.com>
575
576 * jvspec.c (lang_specific_driver): Handle OPT__help instead of
577 OPT_fhelp.
578 * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
579 -dependencies, -encoding, -extdirs, -include-directory,
580 -include-directory=, -output-class-directory,
581 -output-class-directory=, -resource, -resource=,
582 -user-dependencies): New.
583
6be14c0e
RG
5842010-09-16 Richard Guenther <rguenther@suse.de>
585
586 * jcf-parse.c (current_file_list): Remove.
587 (java_parse_file): Use build_translation_unit_decl. Adjust.
588
d1583032
JM
5892010-09-03 Joseph Myers <joseph@codesourcery.com>
590
591 * lang.opt (d): New.
592
efe13e0f
L
5932010-09-03 H.J. Lu <hongjiu.lu@intel.com>
594
595 PR java/45504
596 * jvgenmain.c (main): Check "-D XXX=YYY".
597
e196cc8d
JM
5982010-09-02 Joseph Myers <joseph@codesourcery.com>
599
600 * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
601
5de8299c
JM
6022010-09-02 Joseph Myers <joseph@codesourcery.com>
603
604 * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
605 fCLASSPATH=): Mark as Java options and as aliases.
606 * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
607 (lang_specific_driver): Don't handle options marked as aliases.
608 * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
609
d9d16a19
JM
6102010-08-22 Joseph Myers <joseph@codesourcery.com>
611
612 * Make-lang.in (jvspec.o): Update dependencies.
613 * jvspec.c: Include opts.h.
614 (PARAM_ARG): Remove.
615 (find_spec_file): Do not add leading -specs=.
616 (lang_specific_driver): Use cl_decoded_option structures.
617 * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
618 extdirs, fmain=, s-bc-abi): New options.
619
ac47786e
NF
6202010-08-20 Nathan Froyd <froydnj@codesourcery.com>
621
622 * class.c: Use FOR_EACH_VEC_ELT.
623 * expr.c: Likewise.
624 * jcf-parse.c: Likewise.
625 * resource.c: Likewise.
626
603349bf
JM
6272010-08-16 Joseph Myers <joseph@codesourcery.com>
628
629 * lang.opt (MD_, MMD_, version): Mark RejectDriver.
630
8909ccf5
DD
6312010-08-05 David Daney <ddaney@caviumnetworks.com>
632
633 * class.c (build_utf8_ref): Fix code formatting from previous commit.
634
5ff474fc
DD
6352010-08-05 David Daney <ddaney@caviumnetworks.com>
636
637 * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
638
5f20c657
JM
6392010-07-27 Joseph Myers <joseph@codesourcery.com>
640
641 * lang.c (java_handle_option): Update prototype and return value
642 type.
643
7a9bf9a4
JM
6442010-07-27 Joseph Myers <joseph@codesourcery.com>
645
646 * lang.c (java_option_lang_mask): New.
647 (java_init_options): Update prototype.
648 (LANG_HOOKS_OPTION_LANG_MASK): Define.
649
910ad8de
NF
6502010-07-15 Nathan Froyd <froydnj@codesourcery.com>
651
652 * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
653 * boehm.c: Likewise.
654 * class.c: Likewise.
655 * decl.c: Likewise.
656 * expr.c: Likewise.
657 * jcf-parse.c: Likewise.
658 * typeck.c: Likewise.
659 * verify-glue.c: Likewise.
660
718f9c0f
MLI
6612010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
662
663 * boehm.c: Include diagnostic-core.h in every file that includes
664 toplev.h.
665 * class.c: Likewise.
666 * constants.c: Likewise.
667 * decl.c: Likewise.
668 * except.c: Likewise.
669 * expr.c: Likewise.
670 * jcf-parse.c: Likewise.
671 * mangle.c: Likewise.
672 * mangle_name.c: Likewise.
673 * resource.c: Likewise.
674 * typeck.c: Likewise.
675 * verify-glue.c: Likewise.
676
77641ca3
NF
6772010-07-05 Nathan Froyd <froydnj@codesourcery.com>
678
679 PR bootstrap/44825
680 * class.c (make_class_data): Cast result of VEC_length calls to int.
681
5c144a5f
NF
6822010-07-05 Nathan Froyd <froydnj@codesourcery.com>
683
684 * constants.c (build_constants_constructor): Use build_constructor
685 instead of build_constructor_from_list.
686 * class.c (make_method_value): Likewise.
687 (get_dispatch_table): Likewise.
688 (make_class_data): Likewise.
689 (emit_indirect_register_classes): Likewise.
690 (emit_symbol_table): Likewise.
691 (add_assertion_table_entry): Likewise.
692 (emit_assertion_table): Likewise.
693 (make_field_value): Use build_constructor_single instead of
694 build_constructor_from_list.
695
9062f848
NF
6962010-06-28 Nathan Froyd <froydnj@codesourcery.com>
697
698 * java-tree.h (struct lang_type) [catch_classes]: Change type to a
699 VEC.
700 * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
701 instead of tree_cons.
702 * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
703 (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
704
3b06d379
SB
7052010-06-28 Steven Bosscher <steven@gcc.gnu.org>
706
707 * lang.c: Do not include except.h
708 * except.c: Likewise.
709 (doing_eh): New, moved from except.c (in gcc/) but removed the
710 do_warning flag.
711 (maybe_start_try): Update doing_eh call.
712 * Make-lang.in: Update dependencies.
713
c7d08869
AS
7142010-06-23 Anatoly Sokolov <aesok@post.ru>
715
716 * decl.c (java_init_decl_processing): Use double_int_to_tree instead
717 of build_int_cst_wide.
718 * boehm.c (set_bit): Remove.
719 (mark_reference_fields): Use double_int type for 'mask' argument.
720 Use double_int_setbit instead of set_bit.
721 (get_boehm_type_descriptor): Use double_int_setbit instead of
722 set_bit. Use double_int_to_tree instead of build_int_cst_wide.
723
07a67d6a
GP
7242010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
725
726 * gcj.texi: Move to GFDL version 1.3. Fix copyright years.
727
a9429e29
LB
7282010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
729
730 * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
731
732 * jcf-parse.c (java_parse_file): Likewise.
733 (process_zip_dir): Likewise.
734
735 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
736 (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
737
738 * expr.c (add_type_assertion): Likewise.
739
740 * decl.c (make_binding_level): Likewise.
741 (java_dup_lang_specific_decl): Likewise.
742
743 * constants.c (set_constant_entry): Likewise.
744 (cpool_for_class): Likewise.
745
746 * class.c (add_method_1): Likewise.
747 (java_treetreehash_new): Likewise.
748
749 * java-tree.h (struct lang_type): Add variable_size GTY option.
750 (struct lang_decl): Likewise.
751
752 * jch.h (struct cpool_entry): Likewise.
753
754 * java-tree.h (java_treetreehash_create): Remove parameter ggc.
755
756 * except.c (prepare_eh_table_type): Update
757 java_treetreehash_create call.
758
759 * class.c (add_method_1): Update java_treetreehash_create call.
760 (java_treetreehash_create): Remove parameter gc. Use
761 htab_create_ggc.
762
bdc6b402
JM
7632010-06-04 Joseph Myers <joseph@codesourcery.com>
764
765 * jvspec.c (lang_specific_driver): Use GCC-specific formats in
766 diagnostics.
767
72b0a7bb
SB
7682010-05-30 Steven Bosscher <steven@gcc.gnu.org>
769
770 * except.c: Include tm.h.
771
2dec80c7
JM
7722010-05-28 Joseph Myers <joseph@codesourcery.com>
773
774 * jvspec.c (lang_specific_driver): Use fatal_error instead of
775 fatal. Use warning instead of error for warnings.
776
7325b1b3
NF
7772010-05-28 Nathan Froyd <froydnj@codesourcery.com>
778
779 * expr.c (get_symbol_table_index): Add spaces in expression.
780
aa6d7c81
NF
7812010-05-28 Nathan Froyd <froydnj@codesourcery.com>
782
783 * java-tree.h (method_entry): Declare. Declare VECs containing it.
784 (struct lang_type): Change type of otable_methods, atable_methods, and
785 itable_methods to VECs. Fix comment for atable_methods.
786 (emit_symbol_table): Take a VEC instead of a tree.
787 (get_symbol_table_index): Take a VEC * instead of a tree *.
788 * class.c (add_table_and_syms): Take a VEC instead of a tree.
789 (emit_symbol_table): Update for changed parameter type.
790 * expr.c (get_symbol_table_index): Likewise.
791
7a3b4887
SB
7922010-05-27 Steven Bosscher <steven@gcc.gnu.org>
793
794 * buildings.c: Pretend to be a backend file by undefining
795 IN_GCC_FRONTEND (still need rtl.h here).
796
6484716c
NF
7972010-05-26 Nathan Froyd <froydnj@codesourcery.com>
798
799 * java-tree.h (struct lang_decl_func): Change type of throws_list
800 field to a VEC.
801 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
802 of DECL_FUNCTION_THROWS.
803 * class.c (make_method_value): Likewise.
804
cf484e91
NF
8052010-05-26 Nathan Froyd <froydnj@codesourcery.com>
806
807 * class.c (utf8_decl_list): Delete.
808 (build_utf8_ref): Remove references to it.
809 * java-tree.h (all_class_list): Delete.
810 (predef_filenames): Delete.
811 (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
812 Delete.
813 * jcf-parse.c (parse_roots): Decrease size to 2.
814 (current_file_list): Convert to a VEC.
815 (all_class_list): Declare.
816 (jcf_parse): Adjust for new type of all_class_list.
817 (java_layout_seen_class_methods): Likewise.
818 (predefined_filenames): Declare.
819 (add_predefined_file): Use it.
820 (predefined_filename_p): Likewise.
4b68f9ee 821 (java_parse_file): Adjust for new type of current_file_list.
cf484e91 822
6bb0a66a
JJ
8232010-05-25 Jakub Jelinek <jakub@redhat.com>
824
1a17651b
JJ
825 * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
826 for interfaces.
827
6bb0a66a
JJ
828 PR debug/43260
829 * java-tree.h (pending_static_fields): New extern declaration.
830 (java_write_globals): New prototype.
831 * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
832 * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
833 of a static field push it into pending_static_fields vector.
834 * class.c (pending_static_fields): New variable.
835 (add_field): If static field is not DECL_EXTERNAL, push it into
836 pending_static_fields vector.
837 (java_write_globals): New function.
838
00f93def
NF
8392010-05-24 Nathan Froyd <froydnj@codesourcery.com>
840
841 * expr.c (quick_stack): Change type to a VEC. Update comment.
842 (tree_list_free_list): Delete.
843 (flush_quick_stack): Update for quick_stack type change.
844 (push_value): Likewise.
845 (pop_value): Likewise.
846
f67cc87d
SB
8472010-05-23 Steven Bosscher <steven@gcc.gnu.org>
848
849 * java-gimplify.c: Do not include tm.h, toplev.h.
850 * typeck.c: Do not include tm.h.
851 * mangle_name.c: Do not include tm.h.
852 * jcf-dump.c: Do not include tm.h, ggc.h.
853 * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
854 * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
855 and timevar.h.
856 * jcf-parse.c: Do not include tm.h and tm_p.h.
857 * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
858 target.h, and expr.h.
859 * except.c: Do not include tm.h, rtl.h, function.h.
860 * builtins.c: Do not include convert.h. Explain why RTL headers
861 have to be included here.
862 * verify-glue.c: Do not include tm.h.
863 * jcf-depend.c: Do not include tm.h.
864 * jcf-reader.c: Include ggc.h.
865 * jcf-io.c: Do not include tm.h, toplev.h.
866 * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
867 gimple.h.
868 * lang.c: Do not include rtl.h, expr.h.
869 * Make-lang.in: Update dependencies.
870
62a00d08 8712010-05-23 Steven Bosscher <steven@gcc.gnu.org>
40013784 872
62a00d08
SB
873 * jcf-parse.c: Include bitmap.h.
874 * Make-lang.in: Update dependencies.
40013784 875
8961e01e
JJ
8762010-05-20 Jakub Jelinek <jakub@redhat.com>
877
878 PR debug/43521
879 * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
880 PARM_DECL.
881
1961ffb8
AS
8822010-05-19 Anatoly Sokolov <aesok@post.ru>
883
884 * jcf-parse.c (get_constant): Use double_int_to_tree instead of
885 build_int_cst_wide_type.
886
8abd2cbe
NF
8872010-05-18 Nathan Froyd <froydnj@codesourcery.com>
888
889 * expr.c (pop_arguments): Fix use of undeclared variable.
890
3fcb9d1b
NF
8912010-05-18 Nathan Froyd <froydnj@codesourcery.com>
892
893 * expr.c (expand_java_multianewarray): Use build_call_vec instead of
894 build_call_list.
895 (pop_arguments): Return a VEC instead of a tree. Take a method type
896 rather than a list of argument types.
897 (rewrite_rule): Change signature. of rewrite_arglist member.
898 (rewrite_arglist_getcaller): Update signature.
899 (rewrite_arglist_getclass): Likewise.
900 (maybe_rewrite_invocation): Update for rewrite_arglist change.
901 (build_known_method_ref): Take a VEC instead of a tree.
902 (invoke_build_dtable): Likewise.
903 (expand_invoke): Update calls to pop_arguments. Use build_call_vec
904 instead of build_call_list.
905 (build_jni_stub): Use build_call_vec instead of build_call_list.
906 * java-tree.h (maybe_rewrite_invocation): Update declaration.
907 (build_known_method_ref): Likewise.
908 (invoke_build_dtable): Likewise.
909
c4e64f39
NF
9102010-05-14 Nathan Froyd <froydnj@codesourcery.com>
911
912 PR 44103
913 * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
914 vector. Move call to build_constructor...
915 (FINISH_RECORD_CONSTRUCTOR): ...here. Add necessary arguments. Clear
916 TREE_CONSTANT on the constructor.
917 (PUSH_SUPER_VALUE): Change first argument to a vector.
918 (PUSH_FIELD_VALUE): Likewise.
919 * resource.c (compile_resource_data): Update calls to above macros.
920 * constants.c (build_constants_constructor): Likewise.
921 * class.c (build_utf8_ref): Likewise.
922 (make_field_value): Likewise.
923 (make_method_value): Likewise.
924 (add_table_and_syms): New function.
925 (make_class_data): Call it. Update calls to above macros.
926 (build_symbol_table_entry): New function.
927 (build_symbol_entry): Call it. Update calls to above macros.
928 (emit_symbol_table): Likewise.
929 (make_catch_class_record): Update calls to above macros.
930 (build_assertion_table_entry): New function.
931 (add_assertion_table_entry): Call it.
932 (emit_assertion_table): Likewise.
933
3734d960
MLI
9342010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
935
936 PR 40989
937 * lang.c (java_handle_option): Add argument kind.
938
3b9e5d95
EB
9392010-04-18 Eric Botcazou <ebotcazou@adacore.com>
940
941 * decl.c (java_init_decl_processing): Remove argument in call to
942 initialize_sizetypes
943
60d3aec4
JJ
9442010-04-07 Jakub Jelinek <jakub@redhat.com>
945
946 * exception.cc (_Jv_Throw): Avoid set but not used warning.
947 * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
948 sizeof to avoid set but not used warnings.
949
c24ea667
JR
9502010-01-20 Joern Rennecke <amylaar@spamcop.net>
951
952 * lang.c (java_post_options): Constify variable "dot".
953
74f24290
JR
954 * jcf-parse.c (set_source_filename): Constify variable "dot".
955 (load_class): Constify variable "separator".
956 Use get_identifier_with_length.
957
21a942d2
JR
958 * jvspec.c (lang_specific_driver): Constify two variables named "p".
959
bd5c3aa5
JJ
9602010-01-09 Jakub Jelinek <jakub@redhat.com>
961
962 * jcf-dump.c (version): Update copyright notice dates.
963
c750c208
JJ
9642009-11-28 Jakub Jelinek <jakub@redhat.com>
965
966 * jvspec.c (lang_specific_driver): Remove unused
967 saw_verbose_flag variable.
968 * jcf-dump.c (main): Remove unused general_purpose_bits
969 variable.
970 * builtins.c (initialize_builtins): Remove unused float_ftype_float
971 variable.
972 * expr.c (java_stack_pop): Remove unused val variable.
973 (build_jni_stub): Remove unused res_type variable.
974 * verify-impl.c (check_field_constant): Remove unused len variable.
975
5a3a8eb1
JD
9762009-10-20 Joel Dice <dicej@mailsnare.net>
977
978 PR java/28474
979 * mangle_name.c (append_unicode_mangled_name): Fix mangling
980 of names with multiple underscores and "U".
981 (unicode_mangling_length): Likewise.
982
d7f09764
DN
9832009-10-03 Simon Baldwin <simonb@google.com>
984
985 * config-lang.in (lang_dirs): Remove zlib.
986
384c400a
RH
9872009-09-28 Richard Henderson <rth@redhat.com>
988
989 * builtins.c (initialize_builtins): Update call to
990 build_common_builtin_nodes.
991 * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
992
1d65f45c
RH
9932009-09-14 Richard Henderson <rth@redhat.com>
994
995 * builtins.c (initialize_builtins): Update call to
996 build_common_builtin_nodes.
997 * decl.c (java_init_decl_processing): Don't call
998 default_init_unwind_resume_libfunc.
999 * except.c: Include tree-iterator.h.
1000 (build_exception_object_var): New.
1001 (build_exception_object_ref): Use it.
1002 (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
1003 Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
1004 * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
1005
f9417da1
RG
10062009-09-13 Richard Guenther <rguenther@suse.de>
1007 Rafael Avila de Espindola <espindola@google.com>
1008
1009 * decl.c (do_nothing): Remove.
1010 (java_init_decl_processing): Do not set lang_eh_runtime_type.
1011 * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
1012 * lang.c (java_eh_personality): New.
1013 (java_eh_personality_decl): Likewise.
1014 (LANG_HOOKS_EH_PERSONALITY): Define.
1015
4537ec0c
DN
10162009-09-03 Diego Novillo <dnovillo@google.com>
1017
1018 * lang.c (lang_hooks): Remove const qualifier.
1019
437926c0
JJ
10202009-09-01 Jakub Jelinek <jakub@redhat.com>
1021
1022 * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
1023 type.
1024
58f986ca
RG
10252009-09-01 Richard Guenther <rguenther@suse.de>
1026
1027 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
1028 * java-tree.h (java_mark_addressable): Likewise.
1029 * typeck.c (java_mark_addressable): Likewise.
1030
df15255a
RW
10312009-08-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1032
1033 * Make-lang.in (java.install-pdf): Install gcj.pdf in
1034 $(pdfdir)/gcc, alongside the other manuals.
1035
4b462d77
AH
10362009-08-12 Andrew Haley <aph@redhat.com>
1037
1038 * builtins.c (compareAndSwapInt_builtin): Use
1039 flag_use_atomic_builtins.
1040 (compareAndSwapLong_builtin): Likewise.
1041 (compareAndSwapObject_builtin): Likewise.
1042 * jvspec.c: Add flag_use_atomic_builtins.
1043 * gcj.texi: Likewise.
1044 * java-tree.h: Likewise.
1045 * lang.opt: Likewise.
1046
df4aca79
DS
10472009-08-11 Dodji Seketeli <dodji@redhat.com>
1048
1049 PR debug/40990
1050 * lang.c (put_decl_node): Outputs different level of information
1051 depending on the verbosity level.
1052
239bca9d
AH
10532009-07-31 Andrew Haley <aph@redhat.com>
1054
1055 PR java/40867
1056 * decl.c (java_replace_references): Set EXPR_LOCATION on all
1057 generated expressions.
1058 (binding_level.loc): new field.
1059 (clear_binding_level): Initialize loc.
1060 (set_input_location): New function.
1061 (pushlevel): Set new binding_level.loc.
1062 (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
1063 (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
1064 (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
1065
a406865a
RG
10662009-07-17 Richard Guenther <rguenther@suse.de>
1067
1068 PR c/40401
1069 * java-gimplify.c (java_genericize): Do not gimplify here.
1070 But replace all local references.
1071 (java_gimplify_expr): Do not replace local references here.
1072 (java_gimplify_modify_expr): Likewise.
1073 * jcf-parse.c (java_parse_file): Do not finalize the CU or
1074 optimize the cgraph here.
1075 * decl.c (java_replace_reference): Make static.
1076 (java_replace_references): New function.
1077 (end_java_method): Clear base_decl_map.
1078 * java-tree.h (java_replace_references): Declare.
1079 (java_replace_reference): Remove.
1080
2a4c0366
TG
10812009-07-14 Taras Glek <tglek@mozilla.com>
1082 Rafael Espindola <espindola@google.com>
1083
1084 * Make-lang.in (java.install-plugin): New target for
1085 installing plugin headers.
1086
c5d75364
MLI
10872009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1088
1089 * class.c: Replace %J by an explicit location. Update all calls.
ff06e6b1 1090
fab922b1
MLI
10912009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
1092
1093 * jcf-parse.c: Replace %H by an explicit location. Update all calls.
1094
3ad1aba1
AH
10952009-06-29 Andrew Haley <aph@redhat.com>
1096
1097 PR java/40590
1098 * java-tree.h (cxx_keyword_p): New declaration.
1099 * mangle_name.c (utf8_cmp): Move here from mangle.c.
1100 (cxx_keywords): Likewise.
1101 (cxx_keyword_p): Likewise.
1102 (MANGLE_CXX_KEYWORDS): New macro.
1103 (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
1104 (append_gpp_mangled_name): Likewise.
ff06e6b1 1105 * mangle.c: Move code to mangle_name.c.
3ad1aba1
AH
1106 (mangle_member_name): Don't call cxx_keyword_p.
1107
c2255bc4
AH
11082009-06-12 Aldy Hernandez <aldyh@redhat.com>
1109
1110 * java-gimplify.c (java_gimplify_block): New argument to
1111 build_empty_stmt.
1112 * expr.c (force_evaluation_order): Same.
1113 * typeck.c: Add location to build_decl or PUSH_FIELD calls.
1114 * class.c: Same.
1115 * decl.c: Same.
1116 * jcf-parse.c: Same.
1117 * constants.c: Same.
1118 * resource.c: Same.
1119 * except.c: Same.
1120 * builtins.c: Same.
1121 * expr.c: Same.
1122 * java-tree.h (PUSH_FIELD): Add location field.
ff06e6b1 1123
b0cde35b
ILT
11242009-06-09 Ian Lance Taylor <iant@google.com>
1125
1126 * verify.h: Remove extern "C".
1127
cdb88468
ILT
11282009-06-07 Ian Lance Taylor <iant@google.com>
1129
1130 * jcf-parse.c (handle_constant): Change local variable 'kind' to
1131 unsigned int.
1132
67165eb3
ILT
11332009-06-01 Ian Lance Taylor <iant@google.com>
1134
1135 * jcf-io.c (find_class): Use CONST_CAST.
1136
c607156f
ILT
11372009-05-27 Ian Lance Taylor <iant@google.com>
1138
1139 * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
1140 $(LINKER).
1141 (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
1142
7980bfb8
ILT
11432009-05-26 Ian Lance Taylor <iant@google.com>
1144
1145 * Make-lang.in (jvspec.o): Use $(COMPILER).
1146 ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
1147 (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
1148
4a4a4e99
AO
11492009-05-12 Alexandre Oliva <aoliva@redhat.com>
1150
1151 * Make-lang.in (GCJ): Renamed to...
1152 (XGCJ): ... this.
1153
81f40b79
ILT
11542009-04-27 Ian Lance Taylor <iant@google.com>
1155
1156 * builtins.c (java_builtins): Add casts to enum type.
1157 * verify-impl.c (check_class_constant): Add cast to enum type.
1158 (check_constant, check_wide_constant): Likewise.
1159
211ca15c
RG
11602009-04-27 Richard Guenther <rguenther@suse.de>
1161
1162 PR java/38374
1163 * constants.c (build_constants_constructor): Retain the old
1164 pointer type as valid TYPE_POINTER_TO after patching the
1165 type of the constant pool decl.
1166
32e8bb8e
ILT
11672009-04-24 Ian Lance Taylor <iant@google.com>
1168
1169 * jcf-parse.c (handle_constant): Add cast to enum type.
1170
d1b38208
TG
11712009-04-21 Taras Glek <tglek@mozilla.com>
1172
1173 * builtins.c: Update GTY annotations to new syntax
1174 * decl.c: Likewise
1175 * java-tree.h: Likewise
1176 * jcf.h: Likewise
1177 * lang.c: Likewise
1178
ad41bd84
JM
11792009-04-21 Joseph Myers <joseph@codesourcery.com>
1180
1181 * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
1182 license notices.
1183
d9d3eaab
ILT
11842009-04-18 Ian Lance Taylor <iant@google.com>
1185
1186 * verify-impl.c (verify_instructions_0): Add cast to enum type.
1187
4a77c72b
PB
11882009-04-09 Paolo Bonzini <bonzini@gnu.org>
1189
ff06e6b1
AS
1190 * builtins.c (compareAndSwapLong_builtin,
1191 compareAndSwapInt_builtin, compareAndSwapObject_builtin,
1192 VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
4a77c72b 1193
ba4d8f9d
RG
11942009-03-31 Richard Guenther <rguenther@suse.de>
1195
1196 * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
1197 the first operand of binary and comaprison expressions.
1198
8ce94e44
JM
11992009-03-30 Joseph Myers <joseph@codesourcery.com>
1200
1201 PR rtl-optimization/323
1202 * lang.c (java_post_options): Set flag_excess_precision_cmdline.
1203 Give an error for -fexcess-precision=standard for processors where
1204 the option is significant.
1205
9a0f3e86
RW
12062009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1207
1208 * lang.opt: Unify help text for -Wdeprecated.
1209
d4f4bc84
JJ
12102009-02-03 Jakub Jelinek <jakub@redhat.com>
1211
1212 * jcf-dump.c (version): Update copyright notice dates.
1213
786ce82d
RG
12142009-01-16 Richard Guenther <rguenther@suse.de>
1215
1216 PR tree-optimization/38835
1217 PR middle-end/36227
1218 * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
1219
9ff4a9da 12202008-12-05 Sebastian Pop <sebastian.pop@amd.com>
250d2fb5
JJ
1221
1222 PR bootstrap/38262
1223 * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
1224
08906bf8
AH
12252008-11-04 Andrew Haley <aph@redhat.com>
1226
1227 PR java/37068
1228 * jcf-parse.c (java_emit_static_constructor): Don't call
1229 cgraph_build_static_cdtor. Rewrite.
1230
7134e605
JJ
12312008-10-24 Jakub Jelinek <jakub@redhat.com>
1232
1233 * Make-lang.in (check-java-subtargets): New target.
1234
5773a50f
DE
12352008-10-16 David Edelsohn <edelsohn@gnu.org>
1236
1237 PR target/35483
1238 * Make-lang.in (class.o): Depend on $(TM_P_H).
1239 (expr.o): Same.
1240 * class.c: Include tm_p.h.
1241 * expr.c: Include tm_p.h.
1242
307233c2
AH
12432008-10-14 Andrew Haley <aph@redhat.com>
1244
1245 * constants.c (build_constant_data_ref): Make sure we only build
1246 one copy of the decl for the constant pool.
1247
8cf08dad
AH
12482008-09-22 Andrew Haley <aph@redhat.com>
1249
1250 * expr.c (rules): Add new rule for
1251 gnu.java.lang.VMCPStringBuilder.toString.
1252 (rewrite_rule.new_classname): New field.
1253 (maybe_rewrite_invocation): Use new_classname field instead of
1254 DECL_CONTEXT (*method_p).
1255 Allow rewrite_arglist to be NULL.
1256
2700cb86
AP
12572008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
1258
1259 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
1260 (java_get_callee_fndecl): Kill.
1261
0494626a
JH
12622008-09-17 Jan Hubicka <jh@suse.cz>
1263
1264 PR c++/18071
1265 * class.c (add_method_1): Do not initialize DECL_INLINE.
1266 (make_local_function_alias): Likewise.
1267 * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
1268 * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
1269
3fb1916b
RG
12702008-09-09 Richard Guenther <rguenther@suse.de>
1271
1272 * decl.c (build_result_decl): Remove no longer applicable
1273 promotion.
1274
bbdcb943
DD
12752008-09-05 David Daney <ddaney@avtrex.com>
1276
1277 * gcj.texi (-freduced-reflection): Clarify option's restrictions.
1278
c7c63407
DD
12792008-08-21 David Daney <ddaney@avtrex.com>
1280
1281 * class.c (make_class_data): Don't add field_index when
1282 flag_reduced_reflection set.
1283
b8972354
UW
12842008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
1285
1286 * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
1287
e73f7547
MLI
12882008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1289
1290 PR 28875
1291 * lang.c (java_handle_option): Replace set_Wunused with
1292 warn_unused.
1293
70b1e376
RW
12942008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1295
1296 * gcj.texi: Update copyright years. Do not list GPL as
1297 Invariant Section.
1298
ef5b0e6e
JJ
12992008-07-29 Jakub Jelinek <jakub@redhat.com>
1300
8452fee7
JJ
1301 * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
1302 from ctype's sizes.
1303
ef5b0e6e
JJ
1304 * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
1305 alignment.
1306
e90acd93
JH
13072008-07-29 Jan Hubicka <jh@suse.cz>
1308
1309 * lang.c (java_post_options): Remove handling of flag_no_inline.
1310
726a989a
RB
13112008-07-28 Richard Guenther <rguenther@suse.de>
1312
1313 Merge from gimple-tuples-branch.
1314
1315 2008-07-18 Richard Guenther <rguenther@suse.de>
1316
1317 * expr.c: Include tree-iterator.h.
1318 * Make-lang.in (expr.o): Add tree-iterator.h dependency.
1319
1320 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1321
1322 * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
1323 * expr.c: Same.
1324
1325 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1326
1327 * java-gimplify.c (java_gimplify_expr): Same.
1328 (java_gimplify_modify_expr): Same.
1329 * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
1330
1331 2008-05-02 Diego Novillo <dnovillo@google.com>
1332
1333 * expr.c (build_java_throw_out_of_bounds_exception): Fix
1334 mixed declarations and code.
1335
1336 2008-05-02 Doug Kwan <dougkwan@google.com>
ff06e6b1 1337
726a989a
RB
1338 * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
1339 _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
1340
1341 2008-02-19 Diego Novillo <dnovillo@google.com>
1342
1343 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1344
1345 * java-gimplify.c (java_gimplify_self_mod_expr): Change
1346 gimple_seq arguments to gimple_seq *. Update all users.
1347
1348 2007-11-26 Aldy Hernandez <aldyh@redhat.com>
1349
1350 * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
1351 sequences.
ff06e6b1
AS
1352 (java_gimplify_self_mod_expr): Same.
1353 * java-tree.h (java_gimplify_expr): Make pre_p and post_p
726a989a
RB
1354 sequences.
1355
7e8b322a
JH
13562008-07-24 Jan Hubicka <jh@suse.cz>
1357
1358 * java/decl.c: Include cgraph.h
1359 (end_java_method): Remove non-unit-at-a-time code.
1360 (java_mark_decl_local): Likewise; sanity check that we don't touch
1361 finalized nodes.
1362
f73c3e7c
JH
13632008-07-15 Jan Hubicka <jh@suse.cz>
1364
1365 * lang.c (java_init_options): Enable unit-at-a-time by default.
1366
e63ea00c
RW
13672008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1368
1369 * Make-lang.in (jvspec.o): Fix dependencies.
1370
73fd898b
TT
13712008-07-06 Tom Tromey <tromey@redhat.com>
1372
1373 * Make-lang.in (java/parse.o-warn): Remove.
1374 (java/jcf-io.o-warn): Remove.
1375
dcef3dac
TT
13762008-07-05 Tom Tromey <tromey@redhat.com>
1377
1378 * jcf-io.c: Don't include fnmatch.h. Don't use JCF_USE_SCANDIR.
1379 (compare_path): Remove.
1380 (java_or_class_file): Likewise.
1381 (memoized_dirlist_entry): Likewise.
1382 (memoized_dirlist_hash): Likewise.
1383 (memoized_dirlist_lookup_eq): Likewise.
1384 (memoized_dirlists): Likewise.
1385 (caching_stat): Likewise.
1386 (find_class): Use stat.
1387 * jcf.h (JCF_USE_SCANDIR): Remove.
1388
c9db365d
JS
13892008-06-30 Joshua Sumali <jsumali@redhat.com>
1390
1391 * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
1392 doc/rebuild-gcj-db.1
1393 (java.uninstall): Likewise.
1394 (java.maintainer-clean): Likewise.
1395 (aot-compile.pod): New rule.
1396 (rebuild-gcj-db.pod): New rule.
1397 (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
1398 * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
1399
572e5ae3
KG
14002008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1401
1402 * Make-lang.in (java/jcf-io.o-warn): New.
1403
f02a84d9
TT
14042008-06-24 Tom Tromey <tromey@redhat.com>
1405
1406 * jcf-path.c (jcf_path_init): Don't name variable 'try'.
1407 * expr.c (add_type_assertion): Rename argument.
1408 (build_java_arrayaccess): Don't name variable 'throw'.
1409 (ARRAY_NEW_MULTI): Don't name variable 'class'.
1410 * jcf-io.c (find_class): Don't name variable 'class'.
1411 * mangle.c (compression_table_add): Don't name variable 'new'.
1412 * constants.c (cpool_for_class): Rename argument.
1413 (alloc_constant_fieldref): Likewise.
1414 * jcf-parse.c (handle_innerclass_attribute): Don't name variable
1415 'class'.
1416 (read_class): Likewise.
1417 (parse_zip_file_entries): Likewise.
1418 (process_zip_dir): Likewise.
1419 * decl.c (java_mark_class_local): Rename argument.
1420 * class.c (GEN_TABLE): Use type_name, not typename.
1421 (gen_indirect_dispatch_tables): Likewise.
1422 (add_field): Rename argument.
1423 (is_compiled_class): Likewise.
1424 (safe_layout_class): Likewise.
1425 (emit_assertion_table): Likewise.
1426 * typeck.c (has_method): Rename argument.
1427
e1e4cdc4
KG
14282008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1429
1430 * class.c (ident_subst, mangled_classname, unmangle_classname,
1431 gen_indirect_dispatch_tables, add_method_1,
1432 build_fieldref_cache_entry, make_local_function_alias,
1433 layout_class, java_treetreehash_find, java_treetreehash_new,
1434 split_qualified_name): Fix for -Wc++-compat.
1435 * constants.c (set_constant_entry, cpool_for_class): Likewise.
1436 * decl.c (make_binding_level, java_dup_lang_specific_decl,
1437 start_java_method): Likewise.
1438 * except.c (prepare_eh_table_type): Likewise.
1439 * expr.c (type_assertion_hash, note_instructions): Likewise.
1440 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1441 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1442 * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1443 Likewise.
1444 * jcf-parse.c (reverse, java_read_sourcefilenames,
1445 annotation_grow, rewrite_reflection_indexes, java_parse_file,
1446 process_zip_dir): Likewise.
1447 * jcf-path.c (add_entry, add_path, jcf_path_init,
1448 jcf_path_extdirs_arg): Likewise.
1449 * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1450 * jvgenmain.c (do_mangle_classname): Likewise.
1451 * lang.c (put_decl_string): Likewise.
1452 * verify-impl.c (make_state_copy, make_state, add_new_state):
1453 Likewise.
1454
6ccde948
RW
14552008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1456
1457 * gcj.texi: Expand TABs, remove whitespace from blank lines.
1458
25e8b6ce
TT
14592008-06-14 Tom Tromey <tromey@redhat.com>
1460
1461 PR java/36247:
1462 * class.c (build_class_ref): Initialize this_classdollar when
1463 needed.
1464
163792bc
AH
14652008-05-23 Andrew Haley <aph@redhat.com>
1466
1467 * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1468 pathname of source file.
1469
8beaca66
AL
14702008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1471
1472 * jcf-dump.c (print_constant): Use
1473 HOST_LONG_LONG_FORMAT.
1474
becfd6e5
KZ
14752008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1476
1477 * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1478 DECL_PURE_P.
1479
51eed280
PB
14802008-04-23 Paolo Bonzini <bonzini@gnu.org>
1481
1482 * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1483 (build_classdollar_field): Don't set TREE_INVARIANT.
1484 (get_dispatch_table): Don't set TREE_INVARIANT.
1485 (make_class_data): Don't set TREE_INVARIANT.
1486 (build_symbol_entry): Don't set TREE_INVARIANT.
1487 (emit_symbol_table): Don't set TREE_INVARIANT.
1488 * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1489 (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1490 * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1491 * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1492
6cba282a
TT
14932008-04-03 Tom Tromey <tromey@redhat.com>
1494
1495 * Make-lang.in (java_OBJS): New variable.
1496
9ff420f1
PB
14972008-04-03 Paolo Bonzini <bonzini@gnu.org>
1498
ff06e6b1
AS
1499 * java-tree.h (insert_block): Kill.
1500 * decl.c (insert_block): Kill.
1501
7f9766e4
JM
15022008-04-01 Joseph Myers <joseph@codesourcery.com>
1503
1504 * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1505 * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1506 gpl.texi.
1507
e980df8e
TT
15082008-03-27 Tom Tromey <tromey@redhat.com>
1509
1510 * Make-lang.in: Revert automatic dependency patch.
1511
2fe3178b
TT
15122008-03-25 Tom Tromey <tromey@redhat.com>
1513
1514 * Make-lang.in: Removed most explicit .o targets.
1515 (java/jvspec.o): Reduce to variable setting. Moved to java/.
1516 ($(GCJ)$(exeext)): Update.
1517 (JAVA_OBJS): New variable.
1518 (JCFDUMP_OBJS): Reformat.
1519 (java_OBJS): New variable.
1520 (java/jvspec.o-warn): Update.
1521 (java/parse.o-warn): Remove.
1522 (JAVA_TREE_H): Remove.
1523 (java/jcf-io.o): Reduce to variable setting.
1524 (ALL_CPPFLAGS): Likewise.
1525
4b700ab0
PB
15262008-03-12 Paolo Bonzini <bonzini@gnu.org>
1527
1528 * mangle.c (java_mangle_decl): Remove dead check.
1529
30e257e5
PB
15302008-03-11 Paolo Bonzini <bonzini@gnu.org>
1531
ff06e6b1
AS
1532 * jcf-parse.c (java_parse_file): Assert binding levels are
1533 left in order.
1534 * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1535 Delete.
30e257e5 1536
0e5997c0
JJ
15372008-03-02 Jakub Jelinek <jakub@redhat.com>
1538
1539 * jcf-dump.c (version): Update copyright notice dates.
1540
0a5fe110
TT
15412008-02-29 Tom Tromey <tromey@redhat.com>
1542
1543 * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1544 method.
1545 * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1546
2d593c86
TT
15472008-02-26 Tom Tromey <tromey@redhat.com>
1548
1549 * lang.c (java_post_options): Remove conditional.
1550 * expr.c (expand_byte_code): Remove old location code.
1551 * jcf-parse.c (set_source_filename): Remove old location code.
1552 (give_name_to_class): Likewise.
1553 (jcf_parse): Likewise.
1554 (duplicate_class_warning): Likewise.
1555 (parse_class_file): Likewise.
1556 (java_parse_file): Likewise.
1557 * decl.c (finish_method): Remove old location code.
1558 * class.c (push_class): Remove old location code.
1559
72fb133f
KG
15602008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1561
1562 PR other/35107
1563 * Make-lang.in (jc1): Add $(GMPLIBS).
1564
3e603aef
DD
15652008-01-23 David Daney <ddaney@avtrex.com>
1566
1567 * class.c (hide) Rename to...
1568 (java_hide_decl) ... this throughout, and make public.
1569 * resource.c (Jr_count): Remove.
1570 (compile_resource_data): Call java_mangle_resource_name to generate
1571 decl name. Make resource decl public and hidden.
1572 * mangle.c (java_mangle_resource_name): New function.
1573 * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1574 functions.
1575
578c21cb
AH
15762008-01-04 Andrew Haley <aph@redhat.com>
1577
1578 PR java/17779
1579 * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1580 C90.
1581
5e96e6c0
AH
15822008-01-03 Andrew Haley <aph@redhat.com>
1583
1584 PR java/17779
1585 * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1586 we're about to re-layout the type.
1587
ef833d3d
AO
15882007-12-20 Alexandre Oliva <aoliva@redhat.com>
1589
1590 * lang.c (java_classify_record): Don't return
1591 RECORD_IS_INTERFACE for now.
1592
0741e2af
AH
15932007-12-18 Andrew Haley <aph@redhat.com>
1594
1595 PR java/27643
1596 * jcf-parse.c (java_parse_file): Remove call to
1597 java_mark_class_local.
1598 (parse_class_file): Reinstate call to java_mark_class_local here.
1599 * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1600 already set, call java_mangle_decl() and make_decl_rtl() to
1601 rewrite its name as a hidden alias.
1602
394d9fe7
AO
16032007-12-15 Alexandre Oliva <aoliva@redhat.com>
1604
1605 PR debug/7081
1606 * lang.c (java_classify_record): New.
1607 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1608
182e0d71
AK
16092007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1610
1611 PR 34081/C++
1612 * decl.c (finish_method): Pass 'false' for the new
1613 allocate_struct_function parameter.
1614
6e0b7c70
AO
16152007-11-26 Alexandre Oliva <aoliva@redhat.com>
1616
1617 * expr.c (build_jni_stub): Use the computed jni func type for
1618 variable meth.
1619
0ab57536
AO
16202007-11-26 Alexandre Oliva <aoliva@redhat.com>
1621
1622 * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1623
3bb839da
AO
16242007-11-26 Alexandre Oliva <aoliva@redhat.com>
1625
1626 * expr.c (type_assertion_hash): Hash type uids rather than
1627 tree pointers.
1628
af246415
DD
16292007-11-17 David Daney <ddaney@avtrex.com>
1630 Andrew Haley <aph@redhat.com>
1631
1632 * constants.c (build_constants_constructor): Use POINTER_SIZE
1633 insead of BITS_PER_WORD in big-endian work around.
1634
4a54716a
TT
16352007-11-07 Tom Tromey <tromey@redhat.com>
1636
1637 PR java/34019:
1638 * gcj.texi (Input Options): Add missing noun.
1639
7c4b32bc
TT
16402007-11-02 Tom Tromey <tromey@redhat.com>
1641
1642 PR java/33765:
1643 * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1644 * zipfile.h (ZIPEMPTYMAGIC): New define.
1645
cff75efa
TT
16462007-11-01 Tom Tromey <tromey@redhat.com>
1647
1648 * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1649 (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1650 (java/jcf-io.o): Depend on zipfile.h.
1651
13d71644
RG
16522007-10-17 Richard Guenther <rguenther@suse.de>
1653
1654 * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1655 dependencies.
1656
6d2c26de
AH
16572007-10-03 Andrew Haley <aph@redhat.com>
1658
1659 PR java/33639
1660 * class.c (mangled_classname): Detect and replace illegal
1661 characters in assembly language symbols.
1662 (gen_indirect_dispatch_tables): Call mangled_classname() on
1663 the type.
1664
c94ed7a1
JJ
16652007-09-27 Jakub Jelinek <jakub@redhat.com>
1666
1667 * lang.c (java_print_error_function): Add third argument.
1668
8a0c568f
TT
16692007-09-15 Tom Tromey <tromey@redhat.com>
1670
1671 * java-tree.h (struct lang_decl_func) <function_decl_body>:
1672 Remove.
1673 <init_final>: Likewise.
1674 * lang.c (java_dump_tree): Update.
1675 * java-tree.h (DECL_FUNCTION_BODY): Remove.
1676
e89d6010
JH
16772007-09-11 Jan Hubicka <jh@suse.cz>
1678
1679 * decl.c (java_expand_body): Kill.
1680 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1681
ae582cbf
TT
16822007-09-06 Tom Tromey <tromey@redhat.com>
1683
1684 * jcf-parse.c (parse_class_file): Re-enter the current file.
1685
bdeb2c96
RZ
16862007-09-07 Roman Zippel <zippel@linux-m68k.org>
1687
af246415 1688 * boehm.c (mark_reference_fields): Move misaligned pointer check
bdeb2c96
RZ
1689 after JREFERENCE_TYPE_P test
1690
dbc293c8
RZ
16912007-09-06 Roman Zippel <zippel@linux-m68k.org>
1692
901ddd17
MK
1693 * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1694 if pointer is misaligned.
dbc293c8 1695
5ffeb913
TT
16962007-09-06 Tom Tromey <tromey@redhat.com>
1697
1698 * lang.c (java_post_options): Update.
1699 * jcf-parse.c (set_source_filename): Update.
1700 (give_name_to_class): Update.
1701 (jcf_parse): Update.
1702 (duplicate_class_warning): Update.
1703 (parse_class_file): Update.
1704 (java_parse_file): Update.
1705 * expr.c (expand_byte_code): Update.
1706
db2960f4
SL
17072007-09-05 Sandra Loosemore <sandra@codesourcery.com>
1708
1709 * decl.c (finish_method): Use set_cfun.
1710
29741d6a
AH
17112007-09-04 Andrew Haley <aph@redhat.com>
1712
1713 * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1714 when using the ARM EABI.
1715
72c65674
DJ
17162007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
1717
1718 * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1719
b1d5455a
KG
17202007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1721
1722 * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1723 CONST_CAST.
1724 * jcf.h (JCF_FINISH): Likewise.
1725
e1c2b159
TT
17262007-08-28 Tom Tromey <tromey@redhat.com>
1727
1728 * Make-lang.in (java.tags): Don't tag '*.y' files.
1729
58f9752a
KG
17302007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1731
1732 * lang.c (java_decl_ok_for_sibcall): Likewise.
1733
2f41c1d6
PB
17342007-08-21 Paul Brook <paul@codesourcery.com>
1735 Nathan Sidwell <nathan@codesourcery.com>
1736 Mark Mitchell <mark@codesourcery.com>
1737 Joseph Myers <joseph@codesourcery.com>
1738
1739 * jcf-dump.c (version): Use pkgversion_string. Update copyright
1740 date.
1741
14588106
RG
17422007-08-20 Richard Guenther <rguenther@suse.de>
1743
1744 * lang.c (java_tree_inlining_walk_subtrees): Remove.
1745 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1746
279e32c9
TT
17472007-08-17 Tom Tromey <tromey@redhat.com>
1748
1749 * typeck.c (find_method_in_interfaces): Update.
1750 * jcf-parse.c (load_class): Update.
1751 * java-gimplify.c (java_gimplify_component_ref): Removed.
1752 (java_gimplify_modify_expr): Update. Removed pre_p and post_p
1753 arguments.
1754 (java_gimplify_expr): Update.
1755 * decl.c (java_init_decl_processing): Update.
1756 * class.c (set_constant_value): Update.
1757 (make_class_data): Update.
1758 (finish_class): Update.
1759 (build_static_field_ref): Update.
1760 (is_compiled_class): Update.
1761 (maybe_layout_super_class): Update.
1762 (layout_class): Update.
1763 (layout_class_method): Update.
1764 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1765 (lang_decl_var) <am, final_iud, cif>: Removed fields.
1766 (lang_decl_func) <init_calls_this>: Removed field.
1767 (lang_type) <dot_class, verify_method>: Removed fields.
1768 (FIELD_NESTED_ACCESS): Removed.
1769 (FIELD_NESTED_ACCESS_P): Removed.
1770 (DECL_FIELD_FINAL_IUD): Removed.
1771 (DECL_LOCAL_FINAL_IUD): Removed
1772 (LOCAL_FINAL_P): Removed.
1773 (FINAL_VARIABLE_P): Removed.
1774 (CLASS_FINAL_VARIABLE_P): Removed.
1775 (DECL_BIT_INDEX): Removed.
1776 (DECL_INIT_CALLS_THIS): Removed.
1777 (FIELD_LOCAL_ALIAS): Removed.
1778 (FIELD_LOCAL_ALIAS_USED): Removed.
1779 (FIELD_THISN): Removed.
1780 (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1781 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1782 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1783 (TYPE_DOT_CLASS): Removed.
1784 (TYPE_VERIFY_METHOD): Removed.
1785 (ID_CLASSDOLLAR_P): Removed.
1786 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1787 Removed.
1788 (classdollar_identifier_node): Removed.
1789 (TYPE_UNKNOWN): Removed.
1790 (CLASS_FROM_SOURCE_P): Removed.
1791 * expr.c (build_jni_stub): Update.
1792 (force_evaluation_order): Update.
1793 (build_java_empty_stmt): Update.
1794 (build_class_init): Update.
1795 (java_stack_swap): Update.
1796 (build_jni_stub): Update.
1797
3d4e2766
TT
17982007-08-17 Tom Tromey <tromey@redhat.com>
1799
1800 * java-tree.h (LABEL_TYPE_STATE): Removed.
1801 (load_type_state): Removed.
1802 (LABEL_PC): Removed.
1803 (LABEL_VERIFIED): Removed.
1804 (type_states): Declare.
1805 * expr.c (type_states): New global.
1806 (load_type_state): Now static. Use type_states. Changed
1807 argument.
1808 (lookup_label): Don't set LABEL_PC.
1809 (expand_byte_code): Don't use LABEL_VERIFIED.
1810 (note_instructions): Initialize type_states.
1811 * verify-glue.c (vfy_note_stack_depth): Rewrote.
1812 (vfy_note_stack_type): Use type_states.
1813 (vfy_note_local_type): Likewise.
1814
68a57691
KG
18152007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1816
1817 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1818 * jcf.h (JCF_FINISH): Likewise.
1819
8328d52a
NC
18202007-07-31 Nick Clifton <nickc@redhat.com>
1821
1822 * java-gimplify.c: Change copyright header to refer to version 3
1823 of the GNU General Public License and to point readers at the
1824 COPYING3 file and the FSF's license web page.
1825 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1826 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1827 resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1828 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1829 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1830 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1831 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1832
4f588890
KG
18332007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1834
1835 * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1836
fa233e34
KG
18372007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1838
1839 * lang.c (java_get_callee_fndecl): Constify.
1840
0b740634
KG
18412007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1842
1843 * mangle.c (set_type_package_list): Constify.
1844 * verify-glue.c (vfy_make_string): Delete.
1845 * verify.h (vfy_make_string): Likewise.
1846
41f701ba
TT
18472007-07-26 Tom Tromey <tromey@redhat.com>
1848
1849 * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1850 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
1851 EXIT_BLOCK_LABELED_BLOCK): Likewise.
1852 * lang.c (java_tree_inlining_walk_subtrees): Update.
1853 (java_dump_tree): Likewise.
1854 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
1855 Remove.
1856 * decl.c (push_labeled_block, pop_labeled_block): Remove.
1857 * java-gimplify.c (java_gimplify_labeled_block_expr,
1858 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
1859 (java_gimplify_expr): Update.
1860
741ac903
KG
18612007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1862
1863 * class.c (java_treetreehash_hash, java_treetreehash_compare):
ff06e6b1 1864 Constify.
741ac903
KG
1865 * expr.c (type_assertion_eq): Likewise.
1866 * jcf-io.c (compare_path): Likewise.
1867 * jcf-parse.c (cmpstringp): Likewise.
1868 * verify-impl.c (get_one_type, compute_argument_types,
ff06e6b1 1869 compute_return_type): Likewise.
741ac903 1870
c1331fd4
RO
18712007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1872
1873 PR target/32462
1874 PR libgcj/32465
1875 * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
1876
176be57b
RG
18772007-07-12 Richard Guenther <rguenther@suse.de>
1878
1879 * expr.c (expand_java_return): RETURN_EXPR has void type.
1880 (build_jni_stub): Likewise. Use a comparison against zero
1881 for null-pointer test in COND_EXPR.
1882 (build_field_ref): Build POINTER_PLUS_EXPR with correct
1883 type. Convert result instead.
1884 (build_invokevirtual): Likewise.
1885
837edd5f
GK
18862007-07-09 Geoffrey Keating <geoffk@apple.com>
1887
1888 PR 32617
1889 * lang.c (java_init): Remove setting of force_align_functions_log.
1890 * class.c (add_method_1): Set DECL_ALIGN of non-static method
1891 to cope with ptrmemfunc_vbit_in_pfn.
1892
e980a729
DD
18932007-07-03 David Daney <ddaney@avtrex.com>
1894
ff06e6b1 1895 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
e980a729
DD
1896 include path.
1897 (doc/gcj.dvi): Same.
1898 (doc/gcj.pdf): Same.
1899 (java/index.html): Same.
1900
5be014d5
AP
19012007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1902
1903 * class.c (make_class_data): Build the index in sizetype.
1904 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
1905 adding to a pointer type.
1906 (build_symbol_entry): Likewise.
1907 * expr.c (build_java_arrayaccess): Likewise.
1908 (build_field_ref): Likewise.
1909 (build_known_method_ref): Likewise.
1910 (build_invokevirtual): Likewise.
1911 * except.c (build_exception_object_ref): Do a
1912 NEGATIVE and then a POINTER_PLUS_EXPR instead
1913 of a MINUS_EXPR.
1914
719bb4e3 19152007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
b0464c88
RE
1916
1917 * typeck.c (java_signed_type): Remove.
1918 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1919 * java-tree.h (java_signed_type): Remove.
1920
8d5b1b67
GK
19212007-05-18 Geoffrey Keating <geoffk@apple.com>
1922
1923 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
1924 (print_constant): Likewise.
1925
719bb4e3 19262007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
ca5ba2a3
RAE
1927
1928 * expr.c (build_java_binop): Use unsigned_type_for instead of
1929 java_unsigned_type.
1930 * java-tree.h (java_unsigned_type): Remove.
1931 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1932 * typeck.c (java_unsigned_type): Remove.
1933
3d95caa4
AP
19342007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
1935
1936 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
1937 instead of checking GIMPLE_STMT_P in chain_next.
1938
b00d7439
CW
19392007-04-06 Colin Walters <walters@redhat.com>
1940
1941 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
1942 * jcf-io.c (open_class): Copy 'filename'.
1943
696fbee7
AH
19442007-04-03 Andrew Haley <aph@redhat.com>
1945
ff06e6b1
AS
1946 * jvgenmain.c (main): Change main to use class$, not class$$.
1947 (do_mangle_classname): Likewise.
1948 * class.c (hide): New function.
1949 (add_field): Hide everything that shouldn't be visible outside a
1950 DSO.
1951 (build_static_class_ref): Likewise.
1952 (build_classdollar_field): Likewise.
1953 (make_class_data): Likewise.
1954 (layout_class_method): Likewise.
1955 * expr.c (special_method_p): New function.
696fbee7
AH
1956
1957 * class.c (push_class): Don't bogusly guess the source filename.
1958 * jcf-parse.c (give_name_to_class): Don't set input_location from
1959 DECL_ARTIFICIAL decls.
1960
719bb4e3 19612007-03-30 Rafael Ávila de Espíndola <espindola@google.com>
47ecd38d
RAE
1962
1963 * typeck.c (java_signed_or_unsigned_type): Removed.
1964 (java_signed_type): use get_signed_or_unsigned_type instead of
1965 java_signed_or_unsigned_type.
1966 (java_unsigned_type): Ditto.
1967 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
1968 * java-tree.h (java_signed_or_unsigned_type): Removed.
1969
d2bbc952
TT
19702007-03-26 Tom Tromey <tromey@redhat.com>
1971
1972 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
1973 (java.maintainer-clean): Likewise.
1974 (java.install-man): Likewise.
1975 (.INTERMEDIATE): Removed grmiregistry.pod.
1976 (grmiregistry.pod): Removed.
1977 * gcj.texi (Invoking gcjh): Removed.
1978 (Invoking gjnih): Likewise.
1979 (Invoking grmiregistry): Likewise.
1980 (direntry): Updated.
1981 (Top): Likewise.
1982 (which-gcj): Removed.
1983
ba3e26e8
BM
19842007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
1985
1986 * Make-lang.in: Add install-pdf target as copied from
1987 automake v1.10 rules.
1988
a62f2020
BM
19892007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
1990
1991 * gcj.texi: Standardize title page.
1992
165a0dc3
KH
19932007-02-18 Kazu Hirata <kazu@codesourcery.com>
1994
1995 * class.c: Fix a comment typo.
1996
5039610b
SL
19972007-02-15 Sandra Loosemore <sandra@codesourcery.com>
1998 Brooks Moses <brooks.moses@codesourcery.com>
1999 Lee Millward <lee.millward@codesourcery.com>
2000
2001 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
2002 of build3.
2003 (BUILD_MONITOR_EXIT): Likewise.
2004
2005 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
2006 (java_gimplify_modify_expr): Likewise.
2007
2008 * class.c (cache_this_class_ref): Use build_call_expr.
2009 (build_static_field_ref): Likewise.
2010 (emit_indirect_register_classes): Likewise.
2011 (emit_register_classes): Likewise.
2012
2013 * resource.c (write_resource_constructor): Use build_call_expr.
2014
2015 * builtins.c (builtin_creator_function): Change interpretation of
2016 the second parameter to be the whole CALL_EXPR instead of the arglist.
2017 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
2018 (min_builtin): Likewise.
2019 (abs_builtin): Likewise.
2020 (java_build_function_call_expr): Likewise.
2021 (convert_real): Likewise.
2022 (UNMARSHAL3): Likewise.
2023 (UNMARSHAL4): Likewise.
2024 (UNMARSHAL5): Likewise.
2025 (build_arglist_for_builtin): Delete. Fix callers to use
2026 build_call_expr instead.
2027 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
2028 accessors.
2029 (compareAndSwapInt_builtin): Likewise.
2030 (compareAndSwapLong_builtin): Likewise.
2031 (compareAndSwapObject_builtin): Likewise.
2032 (putVolatile_builtin): Likewise.
2033 (getVolatile_builtin): Likewise.
2034 (VMSupportsCS8_builtin): Likewise.
2035 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
2036 instead of arglist.
2037
2038 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
2039 (build_java_throw_out_of_bounds_exception): Likewise.
2040 (java_check_reference): Likewise.
2041 (build_java_arraystore_check): Likewise.
2042 (build_newarray): Likewise.
2043 (build_anewarray): Likewise.
2044 (expand_java_multinewarray): Use build_call_list instead of build3.
2045 (build_java_monitor): Use build_call_nary instead of build3.
2046 (java_create_object): Likewise.
2047 (expand_java_NEW): Likewise.
2048 (build_instanceof): Likewise.
2049 (expand_java_CHECKCAST): Likewise.
2050 (build_java_soft_divmod): Likewise.
2051 (build_java_binop): Likewise.
2052 (build_field_ref): Likewise.
2053 (build_class_init): Likewise.
2054 (rewrite_arglist_getcaller): Use build_call_expr.
2055 (build_invokeinterface): Use build_call_nary instead of build3.
2056 (expand_invoke): Use build_call_list instead of build3.
2057 (build_jni_stub): Use build_call_nary, build_call_list, or
2058 build_call_expr instead of build3.
2059 (expand_java_field_op): Use build_call_expr instead of build3.
2060 (force_evaluation_order): Use new CALL_EXPR accessors.
2061
2062 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
2063
7f40378f
DD
20642007-02-15 David Daney <ddaney@avtrex.com>
2065
2066 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
2067 (java.maintainer-clean):Add gc-analyze.1.
2068 (.INTERMEDIATE): Add gc-analyze.pod.
2069 (gc-analyze.pod): New rule.
2070 (java.install-man): Install gc-analyze.1
2071 * gcj.texi: Add new section for the gc-analyze program.
2072
56c9f04b
AH
20732007-02-07 Andrew Haley <aph@redhat.com>
2074
2075 * class.c (uncache_this_class_ref): New.
2076 * expr.c (build_jni_stub): Initialize the class.
2077 (expand_byte_code): Call uncache_this_class_ref after generating
2078 code.
2079
ca20820e
TT
20802007-02-06 Tom Tromey <tromey@redhat.com>
2081
2082 PR java/30714:
2083 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
2084
5041541e
KH
20852007-02-03 Kazu Hirata <kazu@codesourcery.com>
2086
2087 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
2088
b4e18eee
AH
20892007-02-02 Andrew Haley <aph@redhat.com>
2090
2091 * expr.c (expand_byte_code): Call cache_this_class_ref() and
2092 cache_cpool_data_ref().
2093 Set TYPE_CPOOL_DATA_REF.
2094 (cache_cpool_data_ref): New function.
2095 * constants.c (build_ref_from_constant_pool): Remove special-case
2096 code for flag_indirect_classes.
2097 (build_constant_data_ref): Move special-case code for
2098 flag_indirect_classes here from build_ref_from_constant_pool.
2099 * decl.c (finish_method): Move class initialization from here to
2100 cache_this_class_ref.
2101 * class.c (cache_this_class_ref): New function.
2102 (build_class_ref): Use this_classdollar for the ouput class.
2103
4969f3ea
DD
21042007-02-02 David Daney <ddaney@avtrex.com>
2105
2106 * class.c (is_compiled_class): Move check to avoid reloading
2107 current class.
2108 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
2109 already set.
2110
2a97d6b2
AH
21112007-02-01 Andrew Haley <aph@redhat.com>
2112
2113 PR java/30641
2114 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
2115
61a89891
KH
21162007-01-31 Kazu Hirata <kazu@codesourcery.com>
2117
2118 * class.c, jcf-parse.c: Fix comment typos.
2119
e4cf973d
TT
21202007-01-30 Tom Tromey <tromey@redhat.com>
2121
2122 * gcj.texi (Strings): Fix documentation for JvNewString.
2123
13a89f0a
RW
21242007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2125
2126 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
2127 typos.
2128
a661f85e
BE
21292007-01-30 Ben Elliston <bje@au.ibm.com>
2130
2131 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
2132
a1c06277
TT
21332007-01-29 Tom Tromey <tromey@redhat.com>
2134
2135 PR java/30607:
2136 * jvspec.c (lang_specific_driver): Handle separate -I argument.
2137 * lang.opt (-I): Add 'Separate'.
2138
2631dfdd
AH
21392007-01-29 Andrew Haley <aph@redhat.com>
2140
2141 * class.c (add_method_1): Mark fndecl as external unless we are
2142 compiling it into this object file.
2143
c863b570
AH
21442007-01-24 Andrew Haley <aph@redhat.com>
2145
2146 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
2147 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
2148
21492007-01-22 Andrew Haley <aph@redhat.com>
2150
2151 * builtins.c (VMSupportsCS8_builtin): New function.
2152
a5abc980
AP
21532007-01-23 Andrew Pinski <pinskia@gmail.com>
2154
2155 PR java/30454
2156 * jcf-io.c (opendir_in_zip): Close the file
2157 and free zipf before returning after an error.
2158
80a3dc41
TT
21592007-01-16 Tom Tromey <tromey@redhat.com>
2160
2161 * java-tree.def: Added copyright header.
2162
b7e89938
TT
21632007-01-15 Tom Tromey <tromey@redhat.com>
2164
2165 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
2166 case.
2167 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
2168 Removed case.
2169 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
2170 (EXPR_WFL_NODE): Likewise.
2171 (EXPR_WFL_LINECOL): Likewise.
2172 (EXPR_WFL_FILENAME): Likewise.
2173 (EXPR_WFL_LINENO): Likewise.
2174 (build_expr_wfl, expr_add_location): Don't declare.
2175 (build_unknown_wfl): Removed.
2176 (EXPR_WFL_FILENAME_NODE): Removed.
2177 (EXPR_WFL_COLNO): Removed.
2178 (EXPR_WFL_SET_LINECOL): Removed.
2179 (DECL_FUNCTION_WFL): Removed.
2180 (DECL_FIELD_FINAL_WFL): Removed.
2181 (struct lang_decl_func) <wfl>: Removed field.
2182 <called_constructor>: Likewise.
2183 <inner_access>: Likewise.
2184 (struct lang_decl_var) <wfl>: Removed field.
2185 (DECL_CONSTRUCTOR_CALLS): Removed.
2186 (DECL_FUNCTION_ACCESS_DECL): Likewise.
2187 (DECL_FUNCTION_INNER_ACCESS): Likewise.
2188 (DECL_SPECIFIC_COUNT): Likewise.
2189 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
2190 * expr.c (build_expr_wfl): Removed.
2191 (expr_add_location): Likewise.
2192
6ef795d2
TT
21932007-01-12 Tom Tromey <tromey@redhat.com>
2194
2195 * jcf-dump.c (main): Updated call to find_class.
2196 * lang.c (java_init): Removed dead code.
2197 * jcf-parse.c (read_class): Don't use java_source field. Removed
2198 dead code.
2199 (parse_zip_file_entries): Don't use java_source field.
2200 (process_zip_dir): Likewise.
2201 (jcf_parse): Removed dead code.
2202 (java_parse_file): Likewise.
2203 (read_class): Updated call to find_class.
2204 * jcf-io.c (find_class): Don't use java_source field. Removed
2205 'source_ok' argument, .java logic.
2206 * jcf.h (JCF) <java_source>: Removed field.
2207 (JCF_ZERO): Updated. (find_class): Updated.
2208 * decl.c: Removed dead code.
2209 * class.c: Removed dead code.
2210
6e63e240
TT
22112007-01-11 Tom Tromey <tromey@redhat.com>
2212
2213 * typeck.c (convert): Don't use flag_emit_class_files.
2214 * lang.c (java_post_options): Don't use flag_emit_class_files.
2215 (java_handle_option): Don't use flag_extraneous_semicolon or
2216 flag_redundant.
2217 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
2218 flag_emit_class_files.
2219 (load_class): Likewise.
2220 * java-tree.h (flag_emit_class_files): Don't declare.
2221 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
2222 (flag_extraneous_semicolon): Don't declare.
2223 (flag_not_overriding): Likewise.
2224 (flag_static_local_jdk1_1): Likewise.
2225 (flag_redundant): Likewise.
2226 * expr.c (build_newarray): Don't use flag_emit_class_files.
2227 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
2228 flag_emit_class_files.
2229 (build_class_ref): Likewise.
2230 * builtins.c (check_for_builtin): Don't use
2231 flag_emit_class_files.
2232
08f0e79e
TT
22332007-01-10 Tom Tromey <tromey@redhat.com>
2234
2235 * lang.c (java_can_use_bit_fields_p): Removed.
2236 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
2237
97b8365c
TT
22382007-01-09 Andrew Haley <aph@redhat.com>
2239
2240 * expr.c (build_java_arrayaccess): Rewrite to generate array
2241 access in canonical form.
2242 (expand_java_arraystore): Use build_fold_addr_expr() on address of
2243 array access.
2244
22452007-01-03 Andrew Haley <aph@redhat.com>
2246
2247 PR java/28754
2248 * expr.c (expand_java_field_op): If we're initializing a field's
2249 declaring interface we should not also initialize the class
2250 context in which it was referenced.
2251
22522007-01-02 Tom Tromey <tromey@redhat.com>
2253
2254 * java-tree.h (compiling_from_source, current_encoding,
2255 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
2256 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
2257 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
2258 JTI_WFL_OPERATOR): Removed
2259 (finit_identifier_node, instinit_identifier_node,
2260 length_identifier_node, super_identifier_node,
2261 continue_identifier_node, access0_identifier_node, wfl_operator):
2262 Removed.
2263 (cyclic_inheritance_report,
2264 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
2265 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
2266 DECL_FIXED_CONSTRUCTOR_P): Removed.
2267 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
2268 Removed.
2269 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
2270 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
2271 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
2272 import_list, import_demand_list>: Removed.
2273 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
2274 cxx_keyword_p): Removed.
2275 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
2276 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
2277 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
2278 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
2279 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
2280 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
2281 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
2282 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
2283 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
2284 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
2285 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
2286 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
2287 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
2288 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
2289 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
2290 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
2291 java_parse_abort_on_error, extract_field_decl): Removed.
2292 (finput): Declare.
2293 * lang.c: (compiling_from_source, current_encoding): Removed.
2294 (java_handle_option): Ignore -fencoding.
2295 * parse.h: Don't include lex.h.
2296 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
2297 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
2298 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
2299 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
2300 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
2301 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
2302 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
2303 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
2304 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
2305 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
2306 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
2307 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
2308 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
2309 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
2310 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
2311 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
2312 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
2313 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
2314 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
2315 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
2316 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
2317 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
2318 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
2319 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
2320 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
2321 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
2322 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
2323 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
2324 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
2325 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
2326 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
2327 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
2328 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
2329 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
2330 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
2331 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
2332 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
2333 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
2334 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
2335 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
2336 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
2337 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
2338 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
2339 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
2340 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
2341 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
2342 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
2343 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
2344 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
2345 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
2346 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
2347 SET_CPC_STATIC_INITIALIZER_STMT,
2348 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
2349 java_complete_class, java_check_circular_reference,
2350 java_fix_constructors, java_layout_classes, java_reorder_fields,
2351 java_method_add_stmt, java_get_line_col, reset_report,
2352 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
2353 java_finish_classes, ctxp, ctxp_for_generation,
2354 ctxp_for_generation_last): Removed.
2355 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
2356 * mangle.c (utf8_cmp): New function.
2357 (cxx_keywords): New global.
2358 (cxx_keyword_p): New function.
2359 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
2360 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
2361 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
2362 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
2363 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
2364 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
2365 * Make-lang.in (java.srcextra): Do nothing.
2366 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
2367 (JAVA_OBJS): Don't mention deleted files.
2368 (java.mostlyclean): Likewise.
2369 (java.clean): Likewise.
2370 (JAVA_LEX_C): Removed.
2371 (buffer.o, check-init.o, parse.o): Remove unused targets.
2372 (typeck.o): Updated.
2373 * jcf-parse.c (read_class): Comment out unused code.
2374 (java_layout_seen_class_methods): New function.
2375 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
2376 Removed.
2377 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
2378 (init_jcf_parse): Removed.
2379 * config-lang.in (gtfiles): Remove deleted files.
2380 * decl.c (java_init_decl_processing): Don't initialize
2381 finit_identifier_node, instinit_identifier_node,
2382 length_identifier_node, super_identifier_node,
2383 continue_identifier_node, access0_identifier_node. Don't call
2384 init_jcf_parse.
2385 * class.c (cyclic_inheritance_report): New global.
2386 (add_method_1): Don't use
2387 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
2388 (maybe_layout_super_class): Comment out code.
2389 (safe_layout_class): New function.
2390 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
2391 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
2392 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
2393 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
2394 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
2395 (java_gimplify_case_expr): Removed.
2396 (java_gimplify_default_expr): Likewise.
2397 (java_gimplify_new_array_init): Likewise.
2398 * parse.y: Removed.
2399 * keyword.gperf, keyword.h: Removed.
2400 * chartables.h: Removed.
2401 * check-init.c: Removed.
2402 * buffer.c, buffer.h: Removed.
2403 * convert.h: Removed.
2404 * gen-table.pl: Removed.
2405 * lex.c, lex.h: Removed.
2406
24072007-01-02 Andrew Haley <aph@redhat.com>
2408
2409 * expr.c (expand_java_arraystore): Make sure we perform a bounds
2410 check at runtime before we perform a type check.
2411
24122006-12-19 Andrew Haley <aph@redhat.com>
2413
2414 * decl.c: Bump minor BC ABI version.
2415
24162006-12-13 Gary Benson <gbenson@redhat.com>
2417
2418 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
2419
24202006-12-12 Tom Tromey <tromey@redhat.com>
2421
2422 * lang-specs.h: Pass -M options to jc1.
2423 * jcf-depend.c (jcf_dependency_add_file): Don't emit
2424 dependencies.
2425
24262006-12-07 Mohan Embar <gnustuff@thisiscool.com>
2427
2428 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
2429
24302006-12-06 Mohan Embar <gnustuff@thisiscool.com>
2431
2432 * lang-specs.h: Pass '%U'-based options as separate arguments.
2433
24342006-12-05 Tom Tromey <tromey@redhat.com>
2435
2436 PR java/29495:
2437 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
2438 classes as well.
2439 * class.c (add_field): Handle ACC_SYNTHETIC.
2440 (add_method_1): Likewise. Handle bridge and varargs.
2441 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2442 annotation.
2443 (set_class_decl_access_flags): Handle synthetic and annotation.
2444 * java-tree.h (METHOD_BRIDGE): New macro.
2445 (METHOD_VARARGS): Likewise.
2446 (TYPE_SYNTHETIC): Likewise.
2447 (TYPE_ANNOTATION): Likewise.
2448 (lang_type): New fields 'synthetic' and 'annotation'.
2449 (lang_decl_func): New fields 'varargs' and 'bridge'.
2450
24512006-12-04 Andrew Haley <aph@redhat.com>
2452
2453 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2454 there's no map.
2455
24562006-11-29 Gary Benson <gbenson@redhat.com>
2457
2458 * expr.c (rewrite_arglist_getcaller): Reorder.
2459
24602006-11-29 Andrew Haley <aph@redhat.com>
2461
2462 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2463 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2464
24652006-11-23 Andrew Haley <aph@redhat.com>
2466
2467 * expr.c (rewrite_arglist_getcaller): New.
2468 (rewrite_arglist_getclass): Fix indentation.
ff06e6b1 2469 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
97b8365c
TT
2470 gnu.classpath.VMStackWalker.getCallingClassLoader().
2471 * builtins.c (initialize_builtins): Remove duplicate def'n of
2472 __sync_synchronize.
2473 Add __builtin_return_address.
2474
24752006-11-22 Andrew Haley <aph@redhat.com>
2476
2477 * jcf-reader.c (get_attribute): Mark attr_type unused.
2478
2479 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2480
2ac7cbb5
RG
24812007-01-08 Richard Guenther <rguenther@suse.de>
2482
2483 * lex.c (do_java_lex): Use build_int_cst_wide_type.
2484 * jcf-parse.c (get_constant): Likewise.
2485
8a4a83ed
JH
24862006-11-12 Jan Hubicka <jh@suse.cz>
2487
2488 * resource.c (compile_resource_data): Update for new varpool names.
2489 * java/class.c (build_utf8_ref): Likewise.
2490
8a492e2c
DD
24912006-11-12 David Daney <ddaney@avtrex.com>
2492
2493 PR java/29805
2494 * typeck.c (build_java_array_type): Increase buffer sizes.
2495
f9f770a8
RG
24962006-11-11 Richard Guenther <rguenther@suse.de>
2497
2498 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2499 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2500
97b8365c
TT
25012006-11-06 Andrew Haley <aph@redhat.com>
2502
2503 * java-tree.h (CONSTANT_LazyFlag): New.
2504 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2505 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2506 reflection_data.
2507 (handle_constant): Return 0 for dummy cpool entries.
2508 Handle constants of kind Class.
2509 Handle constants of kind NameAndType.
2510 (handle_enclosingmethod_attribute): New.
2511 (handle_signature_attribute): New.
2512 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2513 (HANDLE_SIGNATURE_ATTRIBUTE): New.
2514 (handle_constant): Use unmangle_classname()rather than calling
2515 identifier_subst() directly.
2516
25172006-11-02 Andrew Haley <aph@redhat.com>
2518
2519 * java-tree.h (FIELD_ENUM): New.
2520 (lang_decl_var.field_enum): New.
2521 (lang_type.enum_class): New.
2522 (CLASS_ENUM): New.
2523 * class.c (set_class_decl_access_flags): Handle enum types.
2524 (add_field): Handle enum fields.
2525 (get_access_flags_from_decl): Likewise.
2526
2527 * class.c (make_class_data): Put reflection_data into rodata.
2528
25292006-11-01 Andrew Haley <aph@redhat.com>
2530
2531 * jcf-parse.c (field_offsets, bit_obstack): New variables.
2532 (jcf_parse): Write end marker to annotation_data.
2533 (java_parse_file): Create field_offsets bitmap. Destroy it.
ff06e6b1
AS
2534 (annotation_grow, annotation_rewrite_byte)
2535 (annotation_rewrite_short, annotation_rewrite_int)
2536 (annotation_read_short, annotation_write_byte)
2537 (annotation_write_short, annotation_write_int)
2538 (handle_long_constant, handle_constant, handle_element_value)
2539 (handle_annotation, handle_annotations)
2540 (handle_annotation_attribute, rewrite_reflection_indexes)
2541 (handle_member_annotations, handle_parameter_annotations)
97b8365c 2542 (handle_default_annotation): New functions.
ff06e6b1
AS
2543 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
2544 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
2545 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
2546 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
97b8365c 2547 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
ff06e6b1 2548 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
97b8365c
TT
2549 (TYPE_REFLECTION_DATA): New.
2550 (TYPE_REFLECTION_DATASIZE): New.
2551 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2552 an enum.
2553 * jcf-reader.c (get_attribute): Pass field/method index and
2554 attribute type to get_attribute().
2555 * constants.c (find_class_or_string_constant): Make nonstatic.
2556 (cpool_for_class): Likewise.
2557 (build_constants_constructor): Separate string and scalar types.
2558 * class.c (make_class_data): Generate field_indexes permutation.
2559 Pass it to rewrite_reflection_indexes().
2560 (make_class_data): Generate constructor for reflection_data field.
2561
25622006-10-20 Tom Tromey <tromey@redhat.com>
2563
2564 * gcj.texi (Top): Don't mention jv-scan.
2565 (Invoking gcj): Likewise.
2566 (Invoking gcjh): Likewise.
2567 (Invoking gjnih): Likewise.
2568 (Invoking gij): Likewise.
2569 (Invoking gcj-dbtool): Likewise.
2570 (Invoking jv-scan): Removed.
2571 * parse-scan.y: Removed.
2572 * jv-scan.c: Removed.
2573 * config-lang.in (stagestuff): Don't mention jv-scan.
2574 * Make-lang.in (java): Removed jv-scan.
2575 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2576 (JVSCAN_OBJS): Removed.
2577 (jv-scan$(exeext)): Likewise.
2578 (JAVA_MANFILES): Removed jv-scan.1.
2579 (java.uninstall): Don't mention jv-scan.
2580 (java.mostlyclean): Likewise.
2581 (java.maintainer-clean): Likewise.
2582 (.INTERMEDIATE): Likewise.
2583 (java/jv-scan.o): Removed.
2584 (jv-scan.pod): Likewise.
2585 (java.srcextra): Don't mention parse-scan.c.
2586 (java.mostlyclean): Likewise.
2587 (java/parse-scan.c): Removed.
2588 (java/parse-scan.o-warn): Removed.
2589 (java/parse-scan.o): Removed.
2590
25912006-10-20 Tom Tromey <tromey@redhat.com>
2592
2593 * lang.c (java_handle_option): Don't use
2594 jcf_write_base_directory.
2595 * jcf.h (jcf_write_base_directory): Removed.
2596 * parse.y (java_expand_classes): Don't call write_classfile.
2597 * config-lang.in (gtfiles): Removed jcf-write.c.
2598 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2599 (java/jcf-write.o): Removed.
2600 * jcf-parse.c (parse_class_file): Don't call write_classfile.
2601 * java-tree.h (write_classfile): Removed declaration.
2602 * jcf-write.c: Removed.
2603
26042006-10-20 Tom Tromey <tromey@redhat.com>
2605
2606 * Make-lang.in (java): Removed gjnih, gcjh.
2607 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2608 (GCJH_OBJS): Removed.
2609 (GJNIH_OBJS): Likewise.
2610 (gjnih$(exeext)): Likewise.
2611 (gcjh$(exeext)): Likewise.
2612 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2613 (java.install-common): Don't special case gcjh.
2614 (java.uninstall): Don't mention gcjh, gjnih.
2615 (java.mostlyclean): Likewise.
2616 (java.maintainer-clean): Likewise.
2617 (.INTERMEDIATE): Likewise.
2618 (gcjh.pod): Removed.
2619 (gjnih.pod): Likewise.
2620 (GCJH_TARGET_INSTALL_NAME): Removed.
2621 (java/gjavah-jni.o): Removed.
2622 (java/gjavah.o): Likewise.
2623 * config-lang.in (stagestuff): Removed gjnih, gcjh.
2624 * gjavah.c: Removed.
2625
26262006-10-17 Tom Tromey <tromey@redhat.com>
2627
2628 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2629 "string" case.
2630
26312006-10-17 Tom Tromey <tromey@redhat.com>
2632
2633 * jvgenmain.c (main): Handle -findirect-dispatch.
2634 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2635 jvgenmain.
2636
26372006-10-06 Andrew Haley <aph@redhat.com>
2638
2639 * builtins.c (compareAndSwapInt_builtin): Check that we really do
2640 have a compare_and_swap builtin.
2641 (compareAndSwapLong_builtin): Likewise.
2642 (compareAndSwapObject_builtin): Likewise.
2643
26442006-10-04 Andrew Haley <aph@redhat.com>
2645
2646 * builtins.c (java_builtins): Add compareAndSwapInt,
2647 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2648 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2649 putObjectVolatile, getObjectVolatile, getIntVolatile,
2650 getLongVolatile, getLong.
2651 (UNMARSHAL3): New macro.
2652 (UNMARSHAL4): Likewise.
2653 (UNMARSHAL5): Likewise.
2654 (build_arglist_for_builtin): New function.
2655 (build_addr_sum, build_check_this): New functions.
2656 (putObject_builtin. compareAndSwapInt_builtin,
2657 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2658 putVolatile_builtin, getVolatile_builtin): New builtins.
2659
26602006-06-08 Andrew Haley <aph@redhat.com>
ff06e6b1 2661
97b8365c
TT
2662 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2663 get_symbol_table_index().
2664 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2665 private method.
2666 (build_known_method_ref): New arg: special. Pass it to
2667 get_symbol_table_index.
2668 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2669 the method list.
2670 (build_invokevirtual): New arg: special. Pass it to
2671 get_symbol_table_index.
2672 (expand_invoke): New variable: special.
2673 Pass it to maybe_rewrite_invocation().
2674 Pass it to build_known_method_ref().
2675 * class.c (build_symbol_entry): Add new arg: special. Use it to
2676 build the symbol table conbstructor.
2677 (emit_symbol_table): Extract SPECIAL from the method list and pass
2678 it to build_symbol_entry().
2679 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2680 special accordingly.
ff06e6b1 2681
97b8365c
TT
26822006-09-08 Andrew Haley <aph@redhat.com>
2683
2684 * class.c (layout_class_method): Use build_java_signature, not
2685 build_java_argument_signature. Use lookup_java_method, not
2686 lookup_argument_method.
2687
26882006-08-16 Jakub Jelinek <jakub@redhat.com>
2689 Bryce McKinlay <bryce@mckinlay.net.nz>
2690
2691 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2692
26932006-07-18 Tom Tromey <tromey@redhat.com>
2694
2695 * lang.opt: Added missing -W options.
2696
26972006-07-12 Tom Tromey <tromey@redhat.com>
2698
2699 PR java/28329:
2700 * lang-specs.h: Pass '%U'-based options as separate arguments.
2701 Use -faux-classpath.
2702 * lang.c (java_handle_option): Handle OPT_faux_classpath.
2703 * lang.opt (faux-classpath): New option.
2704
27052006-07-07 Tom Tromey <tromey@redhat.com>
2706
2707 * class.c (make_class_data): Set value for reflection_data field.
2708 * decl.c (java_init_decl_processing): Add reflection_data field.
2709
27102006-07-07 Tom Tromey <tromey@redhat.com>
2711
2712 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2713 earlier.
2714 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2715
27162006-07-07 Andrew Haley <aph@redhat.com>
2717
ff06e6b1 2718 * jcf-parse.c (set_source_filename): Don't check for
97b8365c 2719 CLASS_FROM_CURRENTLY_COMPILED_P.
ff06e6b1 2720 Remove // comments.
97b8365c
TT
2721
27222006-07-07 Andrew Haley <aph@redhat.com>
2723
2724 * java-tree.h (java_read_sourcefilenames): Declare.
2725 * lang.c (java_handle_option): Call java_read_sourcefilenames().
2726 * lang.opt (fsource-filename): New opt.
2727 * lang-specs.h: Add -fsource-filename.
2728 * jcf-parse.c (num_files, filenames): New variables.
2729 (reverse, cmpstringp, java_read_sourcefilenames,
2730 find_sourcefile): New.
2731 (set_source_filename): Call find_sourcefile to find the real name
2732 of a source file.
2733
27342006-06-27 Tom Tromey <tromey@redhat.com>
2735
2736 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2737 Signature, LocalVariableTypeTable, annotation attributes.
2738 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2739 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2740 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2741 (HANDLE_METHOD): Likewise.
2742 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2743 (print_annotation): New function.
2744 (print_element_value): Likewise.
2745 (indent): Likewise.
2746 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2747 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2748 (print_parameter_annotations): New function.
2749 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2750 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2751 Likewise.
2752 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2753 (print_annotations): New function.
2754
27552006-06-23 Tom Tromey <tromey@redhat.com>
2756
2757 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
2758 emitting class files, always use 1.5.
2759 * gcj.texi (Input Options): Document -fsource.
2760 (Code Generation): Document -ftarget.
2761
27622006-06-21 Tom Tromey <tromey@redhat.com>
2763
2764 PR java/28089:
2765 * expr.c (expand_java_field_op): Initialize field's declaring
2766 class.
2767
27682006-06-20 Tom Tromey <tromey@redhat.com>
2769
2770 * expr.c (push_value): Always flush quick stack.
2771
27722006-06-19 Tom Tromey <tromey@redhat.com>
2773
2774 * expr.c (push_value): Also flush quick stack if value is a
2775 component_ref.
2776
27772006-06-19 Tom Tromey <tromey@redhat.com>
2778
2779 * expr.c (push_value): Flush quick stack if value has side
2780 effects.
2781
27822006-06-13 Tom Tromey <tromey@redhat.com>
2783
2784 * class.c (is_compiled_class): Explicitly check for current
2785 class.
2786
27872006-06-09 Tom Tromey <tromey@redhat.com>
2788
2789 * gjavah.c (decompile_method): Don't decompile a static field
2790 accessor method.
2791
27922006-06-06 Tom Tromey <tromey@redhat.com>
2793
2794 * lang-specs.h <jc1>: Add .jar file to command line if
2795 -fsaw-java-file. Also, remove -ffilelist-file in this case.
2796
27972006-06-05 Tom Tromey <tromey@redhat.com>
2798
2799 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2800 synthetic, enum, annotation.
2801 * jcf.h (ACC_BRIDGE): New macro.
2802 (ACC_VARARGS): Likewise.
2803 (ACC_SYNTHETIC): Likewise.
2804 (ACC_ENUM): Likewise.
2805 (ACC_ANNOTATION): Likewise.
2806
28072006-06-04 Tom Tromey <tromey@redhat.com>
2808
2809 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2810 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2811 and -ftarget.
2812 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
2813 when needed. Handle classpath-setting.
2814 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2815 * lang-specs.h: Rewrote.
2816
28172006-06-04 Tom Tromey <tromey@redhat.com>
2818
2819 * jcf-io.c (find_class): Set source_ok to 0.
2820 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2821 (parse_class_file): Don't call java_mark_class_local.
2822 (java_parse_file): Skip .java files. Call java_mark_class_local
2823 before lowering any code.
2824 (parse_zip_file_entries): Don't call duplicate_class_warning
2825 here.
2826 (process_zip_dir): ... call it here.
2827 * class.c (add_field): Don't mark field external if it is being
2828 compiled into this object.
2829 (make_class_data): Handle situation where class_dtable_decl is
2830 created before Class is compiled.
2831 (is_compiled_class): Don't assume files in zip are compiled into
2832 this object.
2833 (layout_class_method): Don't mark method external if it is being
2834 compiled into this object.
2835
28362006-06-04 Tom Tromey <tromey@redhat.com>
2837
2838 * jcf-path.c (jcf_path_compute): New function.
2839 * jcf.h (jcf_path_compute): Declare.
2840
719bb4e3 28412006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
c79efc4d
RÁE
2842
2843 * decl.c: Include langhooks.h.
2844 (builtin_function): Remove.
2845 (java_init_decl_processing): Replace calls to builtin_function
2846 with add_builtin_function.
2847 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2848 (java/decl.o): Depend on langhooks.h.
2849 * java-tree.h (builtin_function): Remove.
2850
b5422ad7
BM
28512006-10-10 Brooks Moses <bmoses@stanford.edu>
2852
2853 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
2854
ff682191
TT
28552006-09-12 Tom Tromey <tromey@redhat.com>
2856
2857 * expr.c (push_value): Always flush quick stack.
2858
f8248aaa
TT
28592006-09-12 Tom Tromey <tromey@redhat.com>
2860
2861 PR java/29013:
2862 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
2863 the push of the called method's return result.
2864
ed08fcf6
TT
28652006-09-12 Tom Tromey <tromey@redhat.com>
2866
2867 * jvspec.c (lang_specific_driver): Read spec file even if
2868 -fsyntax-only.
2869
4b943588
TT
28702006-09-12 Tom Tromey <tromey@redhat.com>
2871
2872 PR java/28754:
2873 * expr.c (expand_java_field_op): Initialize field's declaring
2874 interface if necessary.
2875
91da2e7c
TT
28762006-09-12 Tom Tromey <tromey@redhat.com>
2877
2878 PR java/28892:
2879 * expr.c (expand_java_field_op): No error for assignments not in
2880 class initializer or constructor.
2881
182ee260
AH
28822006-08-22 Andrew Haley <aph@redhat.com>
2883
2884 * decl.c (java_add_stmt): Give the statement list a type.
2885
97c074fd
JJ
28862006-08-16 Jakub Jelinek <jakub@redhat.com>
2887 Bryce McKinlay <bryce@mckinlay.net.nz>
2888
2889 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2890
b576b3a7
SM
28912006-08-10 Simon Martin <simartin@users.sourceforge.net>
2892
2893 PR java/8923
2894 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
2895 or '--' is used with a constant operand.
2896 (java_complete_lhs): When processing a '++' or '--' expression,
2897 don't call java_complete_tree but java_complete_lhs, so that a
2898 static final variable operand is never replaced by its value. This
2899 avoids an ICE later on.
2900 (patch_unaryop): Fixed typo in comment.
2901
48779194
VR
29022006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2903
2904 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2905
0ed431d4
BM
29062006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2907
2908 * builtins.c (check_for_builtin): If a builtin could result in a
2909 direct call being generated, don't use it if flag_indirect_dispatch
2910 is set.
2911
29122006-07-12 Bryce McKinlay <mckinlay@redhat.com>
2913
2914 * gcj.texi (Invocation): Corrections for Invocation API example.
2915
8a71d22b
AH
29162006-07-04 Andrew Haley <aph@redhat.com>
2917
2918 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
2919 entry.
2920
6de5f432
AH
29212006-06-21 Andrew Haley <aph@redhat.com>
2922
2923 * java-tree.h (update_aliases): Remove
2924 * expr.c (expand_iinc): Remove call to update_aliases().
2925 (STORE_INTERNAL): Likewise.
ff06e6b1 2926 * decl.c (update_aliases, initialize_local_variable)
6de5f432
AH
2927 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
2928
fe4e7c65
AH
29292006-06-19 Andrew Haley <aph@redhat.com>
2930
5f86874e
AP
2931 PR java/1305
2932 PR java/27908
fe4e7c65
AH
2933 * expr.c (java_modify_addr_for_volatile): New function.
2934 (expand_java_field_op): Handle volatile fields.
2935 * java-gimplify.c (java_gimplify_component_ref): Call
2936 java_modify_addr_for_volatile to give the field_ref the correct
2937 volatile type.
2938 (java_gimplify_modify_expr): Likewise.
2939 * java-tree.h (java_modify_addr_for_volatile): New decl.
2940
7348b1fd
KB
29412006-06-17 Karl Berry <karl@gnu.org>
2942
2943 * gcj.texi (@dircategory): Use "Software development" instead
2944 of "Programming", following the Free Software Directory.
2945
e046c56e
AH
29462006-06-16 Andrew Haley <aph@redhat.com>
2947
2948 * class.c (make_class_data): When using flag_indirect_classes,
2949 don't initialize the vtable of Class instances.
2950
572f9e47
AH
29512006-06-09 Andrew Haley <aph@redhat.com>
2952
2953 PR java/1305
2954 PR java/27908
2955 * builtins.c (initialize_builtins): Add __sync_synchronize().
2956 * class.c (add_field): Mark volatile fields.
2957 * java-gimplify.c (java_gimplify_expr): Call new functions to
2958 handle self-modifying exprs and COMPONENT_REFs.
2959 (java_gimplify_component_ref): New.
2960 (java_gimplify_modify_expr): Add handling for volatiles.
2961
be9a52f8
TT
29622006-06-08 Tom Tromey <tromey@redhat.com>
2963
2964 * gcj.texi (libgcj Runtime Properties): Document
2965 gnu.gcj.user.realname.
2966
313ab5ee
AH
29672006-06-08 Andrew Haley <aph@redhat.com>
2968
2969 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2970 get_symbol_table_index().
2971 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2972 private method.
2973 (build_known_method_ref): New arg: special. Pass it to
2974 get_symbol_table_index.
2975 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2976 the method list.
2977 (build_invokevirtual): New arg: special. Pass it to
2978 get_symbol_table_index.
2979 (expand_invoke): New variable: special.
2980 Pass it to maybe_rewrite_invocation().
2981 Pass it to build_known_method_ref().
2982 * class.c (build_symbol_entry): Add new arg: special. Use it to
2983 build the symbol table conbstructor.
2984 (emit_symbol_table): Extract SPECIAL from the method list and pass
2985 it to build_symbol_entry().
2986 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2987 special accordingly.
2988
696dad4b
DD
29892006-06-06 David Daney <ddaney@avtrex.com>
2990
2991 * gcj.texi (libgcj Runtime Properties): Document
2992 gnu.gcj.runtime.NameFinder.show_raw and
2993 gnu.gcj.runtime.NameFinder.remove_unknown.
2994
c02174ab
TT
29952006-06-06 Tom Tromey <tromey@redhat.com>
2996
2997 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2998 synthetic, enum, annotation.
2999 * jcf.h (ACC_BRIDGE): New macro.
3000 (ACC_VARARGS): Likewise.
3001 (ACC_SYNTHETIC): Likewise.
3002 (ACC_ENUM): Likewise.
3003 (ACC_ANNOTATION): Likewise.
3004
22482f74
MS
30052006-06-06 Mike Stump <mrs@apple.com>
3006
3007 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
3008 installing during build.
3009
99d2ea7e
TF
30102006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
3011
3012 * gcj.texi (Extensions): Document the new gcj-dbtool-based
3013 classname-to-library resolution mechanism.
3014 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
3015 mechanism deprecated.
3016 (libgcj Runtime Properties): Document
3017 gnu.gcj.runtime.VMClassLoader.library_control's new default.
3018
a6404080
JJ
30192006-05-29 Jakub Jelinek <jakub@redhat.com>
3020
3021 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
3022 bit wide type.
3023 (jword): Define to uint64 on 64-bit arches.
3024 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
3025
375277f6
KH
30262006-05-28 Kazu Hirata <kazu@codesourcery.com>
3027
3028 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
3029 typos.
3030
153d08d5
TT
30312006-05-26 Tom Tromey <tromey@redhat.com>
3032
3033 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
3034 * verify-glue.c (vfy_class_type): New function.
3035 * verify-impl.c (check_constant): Allow 'ldc class'.
3036 * verify.h (vfy_class_type): Declare.
3037
b713aa3a
AH
30382006-05-25 Andrew Haley <aph@redhat.com>
3039
3040 PR java/27756
3041 * decl.c (maybe_pushlevels): When variable ranges are non-nested
3042 update all lifetimes, not just the first one.
3043
740dfbde
TT
30442006-05-24 Tom Tromey <tromey@redhat.com>
3045
3046 * java-tree.h: Fixed flag documentation.
3047
5aca4c41
TT
30482006-05-24 Tom Tromey <tromey@redhat.com>
3049
3050 PR libgcj/27729:
3051 * jcf.h (ACC_INVISIBLE): Changed value.
3052
5eecfc4d
AH
30532006-05-24 Andrew Haley <aph@redhat.com>
3054
cc07b2db 3055 PR java/27754
5eecfc4d
AH
3056 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
3057 COMPOUND_EXPR.
3058
8dc3f290
L
30592006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3060
3061 * lang.opt (femit-class-file): Remove VarExists.
3062
6420fb77
TT
30632006-05-16 Tom Tromey <tromey@redhat.com>
3064
3065 * verify-impl.c (verify_instructions_0) <op_return>: Special case
3066 for Object.<init>.
3067
14c7833c
L
30682006-05-16 H.J. Lu <hongjiu.lu@intel.com>
3069
3070 PR driver/26885
3071 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
3072 $(GCC_OBJS).
3073
05b44921
L
30742006-05-14 H.J. Lu <hongjiu.lu@intel.com>
3075
3076 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
3077 (java/expr.o): Replace target.h with $(TARGET_H).
3078 (java/parse.o): Likewise.
3079
e080b30b
AH
30802006-05-10 Andrew Haley <aph@redhat.com>
3081
3082 * class.c (emit_indirect_register_classes): Fix comment.
3083
b1138221
TT
30842006-05-04 Tom Tromey <tromey@redhat.com>
3085
3086 * java-tree.h (uses_jv_markobj_p): Declare.
3087 * class.c (uses_jv_markobj_p): Removed.
3088 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
3089 (get_boehm_type_descriptor): Use it.
3090 (uses_jv_markobj_p): Moved from class.c. Return bool.
3091
532f41fa
TT
30922006-05-04 Tom Tromey <tromey@redhat.com>
3093
3094 * java-tree.def (THIS_EXPR): Now a tcc_expression.
3095
b2ed63b4
AH
30962006-05-04 Andrew Haley <aph@redhat.com>
3097
3098 * class.c (make_field_value): Always build_address_of fdecl if
3099 there is an initializer.
3100
31012006-05-03 Andrew Haley <aph@redhat.com>
3102
3103 PR libgcj/27352
3104 * expr.c (maybe_rewrite_invocation): New function.
3105 (rewrite_arglist_getclass): Likewise.
3106 (rules): New.
3107 (expand_invoke): Call maybe_rewrite_invocation.
3108 * parse.y (patch_invoke): Likewise.
3109 * java-tree.h: (maybe_rewrite_invocation): New function.
3110
621ae65d
AH
31112006-04-21 Andrew Haley <aph@redhat.com>
3112
3113 * lang.c (java_init): Handle flag_indirect_classes.
3114 * jvgenmain.c: Use "class$$" instead of "class$".
3115 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
3116 DECLs.
3117 (mangle_class_field): Special case "class$$" as well as "class$".
3118 * constants.c (build_ref_from_constant_pool): If
3119 flag_indirect_classes, generate a ref into the heap.
3120 * decl.c (constants_field_decl_node,
3121 constants_data_field_decl_node): New.
3122 * class.c (build_static_class_ref): New.
3123 (build_classdollar_field): Factor out from build_class_ref().
3124 (make_field_value): Handle static fields in heap.
3125 (make_class_data): Make sure we get a static ref to class.
3126 Make class initializer const if flag_indirect_classes.
3127 (register_class): Build a class_ref for initialization if
3128 flag_indirect_classes.
3129 (emit_indirect_register_classes): New.
3130
f48c58e8
KH
31312006-04-08 Kazu Hirata <kazu@codesourcery.com>
3132
3133 * expr.c, gjavah.c: Fix comment typos.
3134
e4724785
AH
31352006-04-03 Andrew Haley <aph@redhat.com>
3136
3137 PR java/26858
3138 * expr.c (build_field_ref): Don't check the field offset if
3139 flag_syntax_only.
3140
e6b7893e
AH
31412006-03-30 Andrew Haley <aph@redhat.com>
3142
3143 PR java/26858
3144 * lang.c (java_attribute_table): New.
3145 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
3146 * expr.c (build_field_ref): Add a null pointer check for all
3147 fields of offset > 4k. Don't do so for accesses via the this
3148 pointer, which we know can never be null.
3149 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
3150 methods nonnull.
3151
ad3a7ce3
CD
31522006-03-30 Carlos O'Donell <carlos@codesourcery.com>
3153
3154 * Make-lang.in: Rename docdir to gcc_docdir.
3155
1549c4e5
TT
31562006-03-30 Tom Tromey <tromey@redhat.com>
3157
3158 PR java/26042:
3159 * parse.y (java_reorder_fields): Reset superclass field's size as
3160 well.
3161
531e214a
TT
31622006-03-28 Tom Tromey <tromey@redhat.com>
3163
3164 PR java/26390:
3165 * parse.y (find_most_specific_methods_list): Added 'class'
3166 argument.
3167 (lookup_method_invoke): Updated.
3168
b32d6f93
TT
31692006-03-15 Tom Tromey <tromey@redhat.com>
3170
3171 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
3172 non-static method calls.
3173
a9e317ed
DD
31742006-03-15 David Daney <ddaney@avtrex.com>
3175
3176 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
3177 declaration.
3178
dba370a8
DD
31792006-03-15 David Daney <ddaney@avtrex.com>
3180
3181 * lang.opt (-freduced-reflection): New option.
3182 * lang.c (java_post_options): Generate an error if
3183 -freduced-reflection used with -fjni or -findirect-dispatch.
3184 * java-tree.h (flag_reduced_reflection): Declare new variable.
3185 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
3186 if bitmap overflows and flag_reduced_reflection set.
3187 * class.c (uses_jv_markobj_p): New function.
3188 (make_class_data): Moved generation of vtable to before
3189 reflection data, generate less reflection data if
3190 flag_reduced_reflection set.
3191 * gcj.texi: Document -freduced-reflection.
3192
88200a8d
TT
31932006-03-15 Tom Tromey <tromey@redhat.com>
3194
492edb3a 3195 PR java/26638:
88200a8d
TT
3196 * class.c (get_interface_method_index): Don't put <clinit> into
3197 interface table.
3198
2afd35b3
TT
31992006-03-15 Tom Tromey <tromey@redhat.com>
3200
3201 * parse.y (analyze_clinit_body): Ignore empty statements.
3202
d6c122f7
DD
32032006-03-08 David Daney <ddaney@avtrex.com>
3204
3205 * gcj.texi: Document -static-libgcj option.
3206
b9e6e588
AH
32072006-02-20 Andrew Haley <aph@redhat.com>
3208
3209 * jcf-parse.c (parse_class_file): Set input_location from
3210 current_class.
3211
517f4918
AH
32122006-02-15 Andrew Haley <aph@redhat.com>
3213
3214 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
3215 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
3216 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
3217
58e0c554
AH
32182006-02-09 Andrew Haley <aph@redhat.com>
3219
3220 PR java/26192
3221 * expr.c (expand_invoke): Allow methods in arrays to be resolved
3222 in their superclass.
3223
3224 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
3225 array types.
ff06e6b1 3226
855dd2bc
TT
32272006-02-08 Tom Tromey <tromey@redhat.com>
3228
3229 PR java/22578:
3230 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
3231 * builtins.c (convert_real): New function.
3232 (java_builtins): Handle Float.intBitsToFloat,
3233 Float.floatToRawIntBits, Double.longBitsToDouble,
3234 Double.doubleToRawLongBits.
3235
0920886f
AH
32362006-02-07 Andrew Haley <aph@redhat.com>
3237
3238 * expr.c (expand_invoke): (BC mode.) If we find a method in a
3239 class other than the one in which we expected to find it, ignore
3240 the result.
3241
3242 PR java/25535
3243 * constants.c (build_constants_constructor): move initializer into
7135d758 3244 first halfword on a 64-bit big-endian machine.
5f86874e 3245
05d8200d
TT
32462006-02-04 Tom Tromey <tromey@redhat.com>
3247
3248 PR java/25676:
3249 * builtins.c (max_builtin): Skip floating point 'max'.
3250 (min_builtin): Skip floating point 'min'.
3251 (check_for_builtin): Never return NULL_TREE.
3252
fb579387
TT
32532006-02-04 Tom Tromey <tromey@redhat.com>
3254
3255 PR java/26097:
3256 * expr.c (push_type): Avoid side effect in gcc_assert.
3257
5460aa9c
RS
32582006-02-04 Roger Sayle <roger@eyesopen.com>
3259
3260 * decl.c (java_init_decl_processing): Create char_type_node as a
3261 regular INTEGER_TYPE node.
3262 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
3263 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
3264 test for char_type_node and promoted_char_type_node as special
3265 instances of INTEGER_TYPE tree codes.
3266 (promote_type,build_java_signature): Likewise.
3267 * jcf-write.c (adjust_typed_op): Likewise.
3268 * mangle.c (mangle_type): Likewise.
3269 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
3270 * parse.h (JINTEGRAL_TYPE_P): Likewise.
3271
74a88f62
AT
32722006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
3273
3274 * expr.c (java_stack_swap): Revert gcc_assert patch.
3275
ab184b2a
BE
32762006-02-03 Ben Elliston <bje@au.ibm.com>
3277
3278 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
3279 * typeck.c: Likewise.
3280 * verify-impl.c: Likewise.
3281 * class.c: Likewise.
3282 * decl.c: Likewise.
3283 * jcf-parse.c: Likewise.
3284 * constants.c: Likewise.
3285 * check-init.c: Likewise.
3286 * jcf-write.c: Likewise.
3287 * verify-glue.c: Likewise.
3288 * mangle.c: Likewise.
3289 * expr.c: Likewise.
3290 * lang.c: Likewise.
3291 * boehm.c: Likewise.
3292
46fd0f8c
JH
32932006-02-01 Jan Hubicka <jh@suse.cz>
3294
3295 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
3296 * lang.c (java_init_options): Set no_unit_at_a_time_default.
3297
6bb862cc
AH
32982006-01-30 Andrew Haley <aph@redhat.com>
3299
3300 PR java/21428
3301 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
3302
a6d6c2c0
JM
33032006-01-21 Joseph S. Myers <joseph@codesourcery.com>
3304
3305 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
3306 Update copyright notice dates.
3307
719bb4e3 33082006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
4c360e1f 3309
874be9d3 3310 * jvspec.c (lang_specific_spec_functions): Remove.
4c360e1f 3311
facb553f
TT
33122006-01-06 Tom Tromey <tromey@redhat.com>
3313
3314 * gcj.texi (Arrays): Added more documentation for
3315 JvNewObjectArray.
3316 (Primitive types): Correct information about primitive classes.
3317 (Reference types): New node.
3318 (Index): New node.
3319
2eefc773
AO
33202005-12-16 Alexandre Oliva <aoliva@redhat.com>
3321
3322 * jcf-parse.c (set_source_filename): Set the decl source location
3323 even when returning early.
3324
86bcd3a2
TT
33252005-12-15 Tom Tromey <tromey@redhat.com>
3326 Andrew Haley <aph@redhat.com>
3327
3328 PR java/25429
3329 * parse.y (resolve_expression_name): Don't generate accessor
3330 methods for constant fields.
3331
65260edb
AH
33322005-12-13 Andrew Haley <aph@redhat.com>
3333
3334 PR java/25366
3335 PR java/25368
3336 * class.c (maybe_layout_super_class): Update current_class before
3337 calling do_resolve_class.
3338
74daec8c
L
33392005-12-12 H.J. Lu <hongjiu.lu@intel.com>
3340
3341 PR java/25330
3342 * jcf-write.c (write_classfile): Use PID in temporary class
3343 file. Save/restore errno when reporting error.
3344
92aed1cb
TL
33452005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
3346
3347 PR java/9861
3348 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
3349 to bare_function_type and including the return type
3350 * builtins.c (initialize_builtins) : Change builtin mangled name
3351 constants to conform to new mangling scheme
3352
e0038845
AH
33532005-12-08 Andrew Haley <aph@redhat.com>
3354
ccd83be5 3355 PR libgcj/25265
e0038845
AH
3356 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
3357 (soft_abstractmethod_node): New.
3358 * expr.c (build_field_ref): Add in-line check for missing field.
3359 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
3360
719bb4e3 33612005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
bd97af06
RÁE
3362
3363 * Make-lang.in (java.all.build, java.install-normal): Remove.
3364
719bb4e3 33652005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2f4d2d18
AM
3366
3367 * Make-lang.in: Remove all dependencies on s-gtype, except for
3368 gt-java-parse.h.
3369
d6b5193b
RS
33702005-12-07 Richard Sandiford <richard@codesourcery.com>
3371
3372 * class.c (build_utf8_ref, emit_register_classes): Use
3373 switch_to_section and get_section.
3374
53bbb42e
TT
33752005-12-06 Tom Tromey <tromey@redhat.com>
3376
3377 PR java/25283:
3378 * parse.y (patch_new_array_init): Revert previous patch.
3379 (lookup_method_invoke): Use size-less array type when creating an
3380 anonymous constructor.
3381
45c76dbb
TT
33822005-12-05 Tom Tromey <tromey@redhat.com>
3383
3384 * parse.y (patch_new_array_init): Don't set length on array.
3385
1c00c223
RG
33862005-12-02 Richard Guenther <rguenther@suse.de>
3387
3388 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
3389 buildN instead of build.
3390 * class.c (finish_class): Likewise.
3391 * expr.c (java_create_object): Likewise.
3392
3141ed0f
TT
33932005-11-28 Tom Tromey <tromey@redhat.com>
3394
3395 PR java/18278:
3396 * expr.c (build_jni_stub): Unwrap the return value.
3397 * java-tree.h (soft_unwrapjni_node): New define.
3398 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
3399 * decl.c (java_init_decl_processing): Initialize
3400 soft_unwrapjni_node.
3401
409f11d5
BM
34022005-11-24 Bryce McKinlay <mckinlay@redhat.com>
3403
5f86874e 3404 * gcj.texi (gij options): Add -Xss documentation.
409f11d5 3405
1c57e876
WM
34062005-11-08 Wil Mahan <wmahan@gmail.com>
3407
3408 PR java/23617
3409 * zextract.c (read_zip_archive): Fix out of memory error when
3410 reading jar files with zip-style comments.
3411
e263bc93
TL
34122005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
3413
3414 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
3415 formats.
3416 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
3417
a93770ef
NS
34182005-10-12 Nathan Sidwell <nathan@codesourcery.com>
3419 Wil Mahan <wmahan@gmail.com>
3420
3421 PR java/23620
3422 * class.c (make_class): Create empty binfo here.
3423 (set_super_info): Only create binfo if we have superclasses.
3424
9f1dfd16
RM
34252005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
3426
3427 PR java/24127
3428 * parse.y (method_header): Make the result of the rule a NULL_TREE
3429 when a parsing error occurs.
3430
07f08799
TT
34312005-09-29 Tom Tromey <tromey@redhat.com>
3432
3433 PR java/24120:
3434 * jcf-io.c (memoized_dirlist_hash): New function.
3435 (caching_stat): Use it.
3436
1b70949a
RM
34372005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
3438
3439 PR java/21418
3440 * class.c (inherits_from_p): Try to lay out super class
3441 if it is not already laid out.
3442 (maybe_layout_super_class): Handle the case where SUPER_CLASS
3443 is a NULL_TREE.
3444
c298ec4e
JM
34452005-09-18 James A. Morrison <phython@gcc.gnu.org>
3446
3447 * builtins.c (max_builtin, min_builtin, abs_builtin,
3448 java_build_function_call_expr): Use fold_buildN.
3449 * class.c (layout_class_method): Likewise.
3450 * expr.c (java_truthvalue_conversion, build_java_jsr,
3451 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3452 build_java_binop, build_field_ref, expand_compare,
3453 build_known_method_ref, build_invokevirtual,
3454 process_jvm_instruction): Likewise.
3455 * parse.y (patch_binop, patch_exit_expr): Likewise.
3456 * typeck.c (convert_ieee_real_to_integer): Likewise.
3457 (convert): Don't call fold after convert_ieee_real_to_integer.
3458
c629e611
BM
34592005-09-14 Bryce McKinlay <mckinlay@redhat.com>
3460
3461 PR java/23891
3462 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3463 the newly created type. Set import lists here, not in create_class.
3464 (jdep_resolve_class): Set current_class.
ff06e6b1 3465 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
c629e611
BM
3466 the current package context, not ctxp->package.
3467 (cicp_cache): Removed.
3468 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3469 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3470 * java-tree.h (TYPE_PACKAGE): New macro.
3471 (struct lang_type): New member 'package'.
3472
8f096083
AH
34732005-09-09 Andrew Haley <aph@redhat.com>
3474
ff06e6b1 3475 PR libgcj/23182
8f096083
AH
3476 * expr.c (pop_type_0): If the expected type is object or ptr
3477 (i.e. void*), return the type of the object we just popped from
3478 the stack.
3479
3e248b83
AP
34802005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
3481
3482 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3483 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3484
cd64dc98
KH
34852005-09-06 Kazu Hirata <kazu@codesourcery.com>
3486
3487 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3488 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3489 typos. Follow spelling conventions.
3490
75d1a485
RM
34912005-09-05 Ranjit Mathew <rmathew@hotmail.com>
3492
3493 PR java/23431
3494 * typeck.c (lookup_do): Look up interfaces for the original class,
3495 not the base class.
3496 * parse.y (java_check_regular_methods): Fix diagnostic message for
3497 more restrictive overriding of a method from an interface.
3498
97b51fd0
TT
34992005-08-16 Tom Tromey <tromey@redhat.com>
3500
3501 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3502 class' initial state.
3503
17b45622
RM
35042005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3505
3506 PR java/22113
3507 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3508 `literal_token' for large numeric input tokens.
3509
3881a11b
RM
35102005-08-16 Ranjit Mathew <rmathew@hotmail.com>
3511
3512 PR java/19870
3513 * parse.y (nested_field_access_p): Rename to nested_member_access_p
3514 and expand to handle method accesses across nested classes.
3515 (build_outer_method_access_method): Rename to
3516 build_nested_method_access_method. Minor adjustments to comments.
3517 (resolve_expression_name): Use the newly-renamed
3518 nested_member_access_p method.
3519 (resolve_qualified_expression_name): Likewise.
3520 (patch_method_invocation): Also consider static methods for access
3521 method generation. Minor adjustments to comments.
3522 (maybe_use_access_method): Use the more general
3523 nested_memeber_access_p to determine access across nested class
3524 boundaries. Allow THIS_ARG to be NULL (for static methods).
3525
33173fd4
TT
35262005-08-15 Tom Tromey <tromey@redhat.com>
3527
3528 PR java/23300.
3529 * expr.c (build_field_ref): Don't generate otable reference when
3530 DECL_FIELD_OFFSET is 0.
3531 * class.c (maybe_layout_super_class): Pass outer class to
3532 do_resolve_class.
3533
4e5c1f10
TT
35342005-08-15 Tom Tromey <tromey@redhat.com>
3535
3536 * java-tree.h (LABEL_IN_SUBR): Removed.
3537 (LABEL_IN_SUBR): Likewise.
3538 (LABEL_IS_SUBR_START): Likewise.
3539 (LABEL_SUBR_START): Likewise.
3540 (LABEL_SUBR_CONTEXT): Likewise.
3541 (LABEL_CHANGED): Likewise.
3542 (LABEL_RETURN_LABEL): Likewise.
3543 (LABEL_RETURN_TYPE_STATE): Likewise.
3544 (LABEL_RETURN_LABELS): Likewise.
3545 (RETURN_MAP_ADJUSTED): Likewise.
3546 (LABEL_PENDING_CHAIN): Likewise.
3547
65e8066b
TT
35482005-08-15 Tom Tromey <tromey@redhat.com>
3549
3550 * Make-lang.in (JAVA_OBJS): Removed verify.o
3551 (java/verify.o): Removed.
3552 * verify.c: Removed.
3553 * lang.c (flag_new_verifier): Removed.
3554 (java_post_options): Updated.
3555 * java-tree.h (flag_new_verifier): Removed.
3556 (verify_jvm_instructions): Removed.
3557 * expr.c (pop_type_0): Assume flag_new_verifier is true.
3558 (build_java_check_indexed_type): Likewise.
3559 (expand_java_arraystore): Likewise.
3560 (expand_java_arrayload): Likewise.
3561 (pop_arguments): Likewise.
3562 (expand_byte_code): Likewise.
3563 (process_jvm_instruction): Likewise.
3564
74b002ba
AH
35652005-08-10 Andrew Haley <aph@redhat.com>
3566
3567 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3568 type mismatches to make legal GIMPLE.
3569
35702005-08-10 Robin Green <greenrd@greenrd.org>
3571
3572 PR java/23230:
3573 * parse.y (maybe_use_access_method): Generalize check from
3574 java.lang.Object to any superclass of current_class
3575
063fb392
NS
35762005-08-08 Nathan Sidwell <nathan@codesourcery.com>
3577
3578 * class.c (build_class_ref): Wrap the primary class type in a
3579 NOP_EXPR.
3580 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3581 primary class type from the NOP_EXPR in which it was placed.
3582
baa92306
DN
35832005-07-28 Diego Novillo <dnovillo@redhat.com>
3584
3585 * expr.c (expand_load_internal): Fix missing parens in
3586 predicate.
3587
0d9f15f1 35882005-07-28 Andrew Haley <aph@redhat.com>
c6e5d1af
AH
3589
3590 * expr.c (expand_load_internal): Convert to destination type.
3591
32cafd73
MH
35922005-07-22 Manfred Hollstein <mh@suse.com>
3593
3594 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3595 (check_constant): Likewise.
3596 (check_wide_constant): Likewise.
3597
4038c495
GB
35982005-07-20 Giovanni Bajo <giovannibajo@libero.it>
3599
3600 Make CONSTRUCTOR use VEC to store initializers.
3601 * check-init.c (check_init): Update to cope with VEC in
3602 CONSTRUCTOR_ELTS.
3603 * class.c (make_field_value, make_method_value, get_dispatch_table,
3604 make_class_data, emit_symbol_table, emit_catch_table,
3605 emit_assertion_table): Use build_constructor_from_list instead of
3606 build_constructor.
3607 * constants.c (build_constants_constructor): Likewise.
3608 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3609 VEC in CONSTRUCTOR_ELTS.
3610 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3611 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3612 of a TREE_LIST.
3613 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3614 CONSTRUCTOR_ELTS.
3615 * parse.y (build_new_array_init): Use build_constructor_from_list
3616 instead of build_constructor.
3617 (patch_new_array_init): Update to cope with VEC in
3618 CONSTRUCTOR_ELTS.
3619 (array_constructor_check_entry): Likewise.
3620
de227b23
TT
36212005-07-12 Tom Tromey <tromey@redhat.com>
3622
3623 * jvspec.c (lang_specific_driver): Put filelist_filename first on
3624 command line.
3625
309ca98d
TT
36262005-07-12 Tom Tromey <tromey@redhat.com>
3627
3628 PR java/19674:
3629 * parse-scan.y (interface_member_declaration): Added
3630 empty_statement.
3631
820cc88f 36322005-07-08 Daniel Berlin <dberlin@dberlin.org>
ff06e6b1 3633
820cc88f
DB
3634 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3635 (LABEL_PENDING_CHAIN): Ditto.
3636 (LABEL_PC): Ditto.
ff06e6b1 3637 (DECL_BIT_INDEX): Ditto.
820cc88f 3638
cb14ee6a
BM
36392005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3640
3641 PR java/18119
3642 * parse.y (inner_class_accessible): New function. Logic moved from
3643 check_inner_class_access.
3644 (check_inner_class_access): Use inner_class_accessible.
3645 (resolve_inner_class): Simplify arguments. Create circularity hash
ff06e6b1 3646 here. Keep looking for classes if we found one that was inaccessible.
cb14ee6a
BM
3647 Return the inaccessible class only if there is no other match.
3648 (do_resolve_class): Update for new resolve_inner_class arguments.
3649 Don't create circularity_hash here.
3650
ca12deb4
BM
36512005-07-07 Bryce McKinlay <mckinlay@redhat.com>
3652
5f86874e 3653 PR java/21045
ca12deb4
BM
3654 * parse.y (add_exception_to_throws): New function.
3655 (purge_unchecked_exceptions): Removed.
3656 (get_constructor_super): Renamed from verify_constructor_super. Now
3657 returns the super constructor after verification.
3658 (java_complete_expand_method): Don't use purge_unchecked_exceptions
3659 or save/restore the exception list.
3660 (check_thrown_exceptions): Add uncaught exceptions in anonymous
ff06e6b1 3661 class initializers and constructors to the throws clause of the method.
ca12deb4 3662
b226520a
BM
36632005-07-05 Bryce McKinlay <mckinlay@redhat.com>
3664
5f86874e
AP
3665 PR java/19674
3666 * parse.y (interface_member_declaration): Allow empty statements in
3667 interface declarations.
b226520a 3668
ef330312
PB
36692005-07-05 Paolo Bonzini <bonzini@gnu.org>
3670
3671 * Makefile.in (parse.o): Adjust dependencies.
3672 * parse.y: Include tree-dump.h.
3673
dee15844
JM
36742005-07-02 Joseph S. Myers <joseph@codesourcery.com>
3675
3676 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
3677 flag for quoting.
3678
200bbdce
AP
36792005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
3680
3681 * parse.y (issue_warning_error_from_context): Call
3682 pp_output_formatted_text to be able to get the buffer.
3683
36842005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
8ce2456a
AP
3685
3686 * parse.y (issue_warning_error_from_context): Update for the
3687 renaming of pp_format_text to pp_format.
3688
617a1b71
PB
36892005-06-28 Paul Brook <paul@codesourcery.com>
3690
3691 * decl.c (java_init_decl_processing): Call
3692 default_init_unwind_resume_libfunc.
3693
4ebe7d93
TT
36942005-06-27 Tom Tromey <tromey@redhat.com>
3695
3696 PR java/21540, PR java/13788:
3697 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3698 fold_constant_for_init.
3699 (patch_binop): Added 'folding' argument. Updated all callers.
3700 (patch_unaryop) <NOP_EXPR>: New case.
3701 (fold_constant_for_init) <NOP_EXPR>: Likewise.
3702 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3703
6e0fbdd9
JH
37042005-06-25 Jan Hubicka <jh@suse.cz>
3705
3706 * builtins.c (define_builtin): Accept new flags parameter.
3707 (initialize_builtins): Mark the builtins const and nothrow accordingly.
3708
f12c30a8
KC
37092005-06-25 Kelley Cook <kcook@gcc.gnu.org>
3710
3711 * all files: Update FSF address in copyright headers.
3712
aca02b7e
TT
37132005-06-24 Tom Tromey <tromey@redhat.com>
3714
3715 * verify-impl.c (verify_instructions_0): Correctly handle
3716 situation where PC falls off end.
3717
c0f6dc94
BM
37182005-06-23 Bryce McKinlay <mckinlay@redhat.com>
3719
3720 PR java/20697
3721 * parse.y (find_most_specific_methods_list): Remove special case for
3722 inner classes.
3723
fbb4c46b
TT
37242005-06-15 Tom Tromey <tromey@redhat.com>
3725
3726 PR libgcj/21906:
3727 * class.c (make_method_value): Use soft_abstractmethod_node for
3728 abstract method.
3729 * java-tree.h (soft_abstractmethod_node): New define.
3730 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3731 * decl.c (java_init_decl_processing): Initialize
3732 soft_abstractmethod_node.
3733
7bfb5ccc
GK
37342005-06-13 Geoffrey Keating <geoffk@apple.com>
3735
3736 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3737
885beb81
PB
37382005-06-13 Per Bothner <per@bothner.com>
3739
3740 * expr.c (int highest_label_pc_this_method,
3741 start_label_pc_this_method): New globals.
3742 (lookup_label): Add start_label_pc_this_method to pc for label, and
3743 update highest_label_pc_this_method. This prevents conflicts between
3744 labels from different methods.
3745 * java-tree.h: Declare new globals.
3746 * jcf-parse.c (parse_class_file): If needed bump
3747 start_label_pc_this_method and reset highest_label_pc_this_method.
3748
924b2450
TT
37492005-06-13 Tom Tromey <tromey@redhat.com>
3750
3751 PR java/21844:
3752 * parse.y (nested_field_access_p): Handle case where outer field
3753 is inherited by enclosing class.
3754
d35310e3
PB
37552005-06-12 Per Bothner <per@bothner.com>
3756
3757 * class.c (inherits_from_p): Do load_class if needed.
3758
74118f15
KG
37592005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3760
3761 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3762 * java-tree.h (parse_error_context): Move...
3763 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3764 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3765 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3766
77462a3c
RS
37672005-06-08 Roger Sayle <roger@eyesopen.com>
3768
3769 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3770
4b794eaf
JJ
37712005-06-06 Jakub Jelinek <jakub@redhat.com>
3772
3773 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3774 msgid for argument name.
3775 * gjavah.c (error): Likewise.
3776 * java-tree.h (parse_error_context): Likewise.
3777 * parse.y (parse_error_context, parse_warning_context,
3778 issue_warning_error_from_context): Likewise.
3779
4267db98
TT
37802005-06-01 Tom Tromey <tromey@redhat.com>
3781
3782 PR java/21722:
3783 * class.c (build_static_field_ref): Don't fold constant fields if
3784 current class is from a .class file and we're using indirect
3785 dispatch.
3786
4c714dd4
KG
37872005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3788
3789 * java/verify-glue.c: Don't include errors.h and include toplev.h.
3790 * java/Make-lang.in: Updates dependencies.
3791
38c9d142
RM
37922005-05-26 Ranjit Mathew <rmathew@hotmail.com>
3793
3794 PR java/19870.
3795 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3796 NESTED_FIELD_ACCESS_IDENTIFIER_P.
3797 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3798 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3799 * jcf-write.c (generate_classfile): Use
3800 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3801 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3802 * parse.y (build_outer_field_access): Rename to
3803 build_nested_field_access. Support static fields and outer-to-inner
3804 class accesses.
3805 (outer_field_access_p): Rename to nested_field_access_p. Support
3806 static fields and generalise to outer-to-inner class and sibling
3807 inner class accesses.
3808 (outer_field_expanded_access_p): Rename to
3809 nested_field_expanded_access_p and support static fields.
3810 (outer_field_access_fix): Rename to nested_field_access_fix and
3811 support static fields.
3812 (build_outer_field_access_expr): Rename to
3813 build_nested_field_access_expr and support static fields.
3814 (build_outer_field_access_methods): Rename to
3815 build_nested_field_access_methods and support static fields. For
3816 static fields, generate accessors without class instance parameters.
3817 (build_outer_field_access_method): Rename to
3818 build_nested_field_access_method and support static fields.
3819 (build_outer_method_access_method): Use
3820 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3821 OUTER_FIELD_ACCESS_IDENTIFIER_P.
3822 (resolve_expression_name): Consider static field accesses across
3823 nested classes.
3824 (resolve_qualified_expression_name): Likewise.
3825 (java_complete_lhs): Use nested_field_access_fix instead of
3826 outer_field_access_fix.
3827 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3828 Use nested_field_expanded_access_p instead of
3829 outer_field_expanded_access_p. Use nested_field_access_fix instead
3830 of outer_field_access_fix.
3831 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3832 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3833
a04323f4
BM
38342005-05-26 Bryce McKinlay <mckinlay@redhat.com>
3835
ff06e6b1 3836 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
a04323f4
BM
3837 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3838 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3839 MINOR_BINARYCOMPAT_ABI_VERSION): New.
3840 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3841 (parse_version): Calculate version ID using new method. Use bit-flags
3842 for flag_indirect_dispatch and flag_bootstrap_classes.
3843
6de33afa
RH
38442005-05-25 Richard Henderson <rth@redhat.com>
3845
3846 PR libgcj/21692
3847 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3848 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3849 DECL_CONTEXT; avoid pushdecl_top_level.
3850 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
3851 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
3852 (layout_class_method): Likewise.
3853 * decl.c (java_mark_cni_decl_local): New.
3854 (java_mark_class_local): Use it.
3855 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
3856 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
3857 (struct lang_decl_func): Add local_cni;
3858 (struct lang_decl_var): Add class_field, vtable.
3859 (java_mangle_decl): Declare.
3860 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
3861 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
3862 (mangle_obstack_1): New.
3863 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
3864 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
3865 lhd_set_decl_assembler_name for things that don't need mangling.
3866 (mangle_class_field): Rename from java_mangle_class_field, make
3867 static, don't call init_mangling or finish_mangling.
3868 (mangle_vtable): Similarly.
3869 (mangle_local_cni_method_decl): New.
3870 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
3871 gcc_assert, and MANGLE_RAW_STRING.
3872 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
3873
5c498b10
DD
38742005-05-25 DJ Delorie <dj@redhat.com>
3875
3876 * class.c (set_constant_value): Move warning control from if() to
3877 warning(OPT_*).
3878
e0f391dd
RH
38792005-05-24 Richard Henderson <rth@redhat.com>
3880
3881 * builtins.c (define_builtin): Don't call make_decl_rtl.
3882 * constants.c (build_constant_data_ref): Likewise.
3883 * class.c (build_utf8_ref): Likewise.
3884 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
3885 (get_dispatch_table, layout_class_method): Likewise.
3886 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
3887 by hand.
3888 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
3889 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
3890 to determine if we need a non-zero address.
3891 * decl.c (builtin_function): Don't call make_decl_rtl.
3892 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
3893 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
3894 * resource.c (compile_resource_data): Likewise.
3895 * parse.y (resolve_field_access): Re-word comment to avoid
3896 building DECL_RTL.
3897
8cfb12bf
RH
38982005-05-24 Richard Henderson <rth@redhat.com>
3899
3900 * class.c (registered_class): Take it out of class_roots; turn into
3901 a vec of trees.
3902 (register_class): Make static. Don't duplicate decl node. Use
3903 VEC_safe_push.
3904 (emit_register_classes): Use VEC_iterate. Use output_constant
3905 instead of assemble_integer. Don't call mark_decl_referenced
3906 directly.
3907 * java-tree.h (register_class): Remove decl.
3908
6fb09909
PB
39092005-05-19 Paolo Bonzini <bonzini@gnu.org>
3910
3911 PR java/17845
3912
3913 * parse.y (register_package, package_list): Remove.
3914 (package_declaration): Do not call register_package.
3915 (do_resolve_class): Do not use package_list.
3916
d7f35e48
GP
39172005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
3918
3919 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
3920 unused variable.
3921
b4220f64
TT
39222005-05-15 Tom Tromey <tromey@redhat.com>
3923
3924 PR java/21519:
3925 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
3926 NOTE_PUSH.
3927
f5ea88a3
BM
39282005-05-12 Aaron Luchko <aluchko@redhat.com>
3929
8cfb12bf 3930 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
f5ea88a3 3931
cca1655e
TT
39322005-05-11 Tom Tromey <tromey@redhat.com>
3933
3934 * gcj.texi (Code Generation): Document -fbootstrap-classes.
3935 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
3936 (parse_version): Use it.
3937 * lang.opt (-fbootstrap-classes): New option.
3938
27e928ed
PB
39392005-05-10 Paolo Bonzini <bonzini@gnu.org>
3940
3941 PR java/21436
3942 * class.c (maybe_layout_super_class): Look for imports in this_class.
3943 * parse.h (ctxp_for_generation_last): New.
3944 (do_resolve_class): Add a parameter.
3945 * parse.y (ctxp_for_generation_last): New.
3946 (java_pop_parser_context): Add at end of list.
3947 (find_in_imports, find_in_imports_on_demand): Look in ctxp
3948 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
3949 the given type are NULL.
3950 (do_resolve_class): Look into the imports of the new second parameter.
3951 Adjust recursive calls.
3952 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
3953 calls to do_resolve_class.
3954 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
3955 (java_complete_class): Do not do that here.
3956
d8be0aab
TF
39572005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
3958
3959 PR java/20309
3960 * Make-lang.in (java): Add gjnih.
3961 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
3962 (GJNIH_OBJS): New variable.
3963 (gjnih$(exeext)): New target.
3964 (JAVA_MANFILES): Add gjnih.1.
3965 (java.uninstall): Add gjnih.1.
3966 (java.mostlyclean): Add gjnih.
3967 (java.maintainer-clean): Add gjnih.1.
3968 (java/gjavah-jni.o): New target.
3969 (.INTERMEDIATE): Add gjnih.pod.
3970 (gjnih.pod): New target.
3971 * config-lang.in (stagestuff): Add gjnih.
3972 * gcj.texi (Top): Add gjnih node.
3973 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
3974 -bootclasspath options.
3975 (Invoking gjnih): New node.
3976 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
3977 (TOOLNAME): New macro.
3978 (error): Replace hard-coded gcjh with TOOLNAME.
3979 (process_file): Likewise.
3980 (usage): Likewise.
3981 (version): Likewise.
3982 (help): Likewise. Add help output for -force, -old, -trace and -J
3983 options.
3984 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
3985 (options): Add force, old, trace and J fields.
3986 (main): Handle -force, -old, -trace and -J options.
3987
a67aa338
TT
39882005-05-03 Tom Tromey <tromey@redhat.com>
3989
3990 PR java/21245:
3991 * gjavah.c (main): Unlink output file on error.
3992
f384d658
KH
39932005-05-03 Kazu Hirata <kazu@cs.umass.edu>
3994
3995 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
3996 copyright.
3997
22e8617b
TT
39982005-04-29 Tom Tromey <tromey@redhat.com>
3999
4000 * expr.c (build_jni_stub): Updated for change to build_block.
4001
5e4b794a
AP
40022005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
4003
4004 * expr.c (force_evaluation_order): Declare 'saved' earlier.
4005
2c80f015
AH
40062005-04-28 Andrew Haley <aph@redhat.com>
4007
4008 PR java/19285
4009 * java-tree.h (soft_resolvepoolentry_node): New.
4010 (alloc_constant_fieldref): Declare.
4011 * expr.c (expand_java_field_op): Don't call class_init for
4012 accesses to static fields with indirect dispatch.
4013 * builtins.c (initialize_builtins): Add "__builtin_expect".
4014 * decl.c (soft_resolvepoolentry_node): New variable.
4015 (java_init_decl_processing): Create a decl for
4016 "_Jv_ResolvePoolEntry".
4017 * class.c (build_fieldref_cache_entry): New function.
4018 (build_static_field_ref): Rewrite for indirect dispatch.
4019 * constants.c (find_name_and_type_constant_tree): New function.
4020 (alloc_constant_fieldref): Likewise.
4021 (build_constants_constructor): Handle CONSTANT_Fieldref and
4022 CONSTANT_NameAndType.
4023
4024 PR java/21115
4025 * expr.c (force_evaluation_order): Convert outgoing args smaller
4026 than integer.
4027
b40c360d
BM
40282005-04-27 Bryce McKinlay <mckinlay@redhat.com>
4029
4030 * gcj.texi (libgcj Runtime Properties): Remove obsolete
ff06e6b1 4031 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
b40c360d
BM
4032 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
4033
2653bb0c
KG
40342005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4035
4036 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
4037 to `unlock_stream' with `unlock_std_streams'.
4038
58a690ae
JJ
40392005-04-25 Jakub Jelinek <jakub@redhat.com>
4040
4041 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
4042 instead of just expr.h.
4043
98a3dad4
KG
40442005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4045
4046 * gjavah.c (main): Unlock the stdio streams.
4047 * jcf-dump.c (main): Likewise.
4048 * jv-scan.c (main): Likewise.
4049 * jvgenmain.c (main): Likewise.
4050
d4ee4d25
DD
40512005-04-23 DJ Delorie <dj@redhat.com>
4052
4053 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
4054 parse.y: Adjust warning() callers.
4055
55f96367
BM
40562005-04-21 Bryce McKinlay <mckinlay@redhat.com>
4057
4058 * gcj.texi (Object fields): Change "Integer" to "Int" in example
4059 contructor.
4060
fcda2002
BM
40612005-04-20 Bryce McKinlay <mckinlay@redhat.com>
4062
4063 * gcj.texi: Fix typos and bogus example.
4064
9be3f9b1
KH
40652005-04-19 Kazu Hirata <kazu@cs.umass.edu>
4066
4067 * except.c: Fix a comment typo.
4068
61e72330
JB
40692005-04-19 Julian Brown <julian@codesourcery.com>
4070
4071 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
4072 indirect dispatch with PIC.
4073
d393cb72
AH
40742005-04-18 Andrew Haley <aph@redhat.com>
4075
4076 * java-except.h (struct eh_range.handler): Remove unused field.
4077 (handle_nested_ranges): Remove function declaration.
ff06e6b1 4078 (sanity_check_exception_range): Add function declaration.
d393cb72
AH
4079 * verify.c (verify_jvm_instructions): Remove call to
4080 handle_nested_ranges.
4081 * verify-glue.c (verify_jvm_instructions_new): Call
4082 sanity_check_exception_range.
4083 * except.c (link_handler, eh_range_freelist, link_handler,
4084 handle_nested_ranges): Remove.
4085 (add_handler): Rewrite.
4086 (sanity_check_exception_range): New function.
4087 (print_ranges): New function.
4088
e22a7bcf
JB
40892005-04-13 Julian Brown <julian@codesourcery.com>
4090
4091 * decl.c (finish_method): Give methods once-only linkage.
4092
0b026622
RS
40932005-04-11 Richard Sandiford <rsandifo@redhat.com>
4094
4095 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
4096
d502f210
KG
40972005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4098
4099 * java-tree.h: Don't use PARAMS().
4100
e87047c6
PB
41012005-04-07 Per Bothner <per@bothner.com>
4102
4103 * class.c (push_class): By default, suppress debug output.
4104 (finish_class): Enable debug output for classes we're emitting.
4105
53b42091
AH
41062005-04-07 Andrew Haley <aph@redhat.com>
4107
4108 * gcj.texi: Correct gcj-dbtool instructions.
4109
df044388
KH
41102005-04-04 Kazu Hirata <kazu@cs.umass.edu>
4111
4112 * gcj.texi: Fix a typo.
4113 * lang.c: Fix a comment typo.
4114
b6121641
TF
41152005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
4116
4117 * gcj.texi (Invoking gij): Add descriptions of new -X options.
4118 Mention recognized-and-ignored compatibility options.
4119 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
4120 JvFree.
4121 (About CNI): Add Memory allocation section.
4122
77c10b31
TT
41232005-04-01 Tom Tromey <tromey@redhat.com>
4124
4125 * decl.c (java_init_decl_processing): Fix types of
4126 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
4127 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
4128 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
4129
cd9c7bd2
JH
41302005-03-31 Jan Hubicka <jh@suse.cz>
4131
4132 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
4133 * class.c: Include cgraph.h
4134 (make_local_functoin_alias): Mark aslias as needed.
4135 * resource.c: Include cgraph.h
4136 (compile_resource_data): Go via cgraph interface.
4137
15f188a4
ILT
41382005-03-30 Ian Lance Taylor <ian@airs.com>
4139
4140 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
4141
2d47d84c
TT
41422005-03-30 Tom Tromey <tromey@redhat.com>
4143
4144 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
4145 inner_class_info_index==0 or outer_class_info_index==0.
4146
dc0a6205
TT
41472005-03-29 Tom Tromey <tromey@redhat.com>
4148
4149 * gcj.texi (libgcj Runtime Properties): Document
4150 gnu.gcj.runtime.endorsed.dirs.
4151
206318ea
AG
41522005-03-24 Anthony Green <green@redhat.com>
4153
4154 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
4155 'gcj-dbtool -p'.
4156
85c4f26a
TT
41572005-03-23 Tom Tromey <tromey@redhat.com>
4158
4159 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
4160 (parse_version): Use it.
4161
d101034c
JM
41622005-03-23 Joseph S. Myers <joseph@codesourcery.com>
4163
4164 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
4165
6726a1f5
AH
41662005-03-18 Andrew Haley <aph@redhat.com>
4167
4168 PR java/20522
4169 * decl.c (update_aliases): Don't update variables that are about
4170 to die.
4171 (maybe_poplevels): Add comment.
4172
3af57c70
BM
41732005-03-17 Bryce McKinlay <mckinlay@redhat.com>
4174
4175 PR java/20502
4176 * jcf-parse.c (duplicate_class_warning): New function.
ff06e6b1 4177 (java_parse_file): Call duplicate_class_warning if
3af57c70
BM
4178 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
4179 (parse_zip_file_entries): Likewise. Also set
4180 CLASS_FROM_CURRENTLY_COMPILED_P.
4181
d8e97847
AH
41822005-03-16 Andrew Haley <aph@redhat.com>
4183
4184 * expr.c (expand_java_arrayload): Don't generate a
4185 NullPointerException based on the type of the node.
4186 (build_java_array_length_access): Likewise.
4187
a1286ef5
ZW
41882005-03-15 Zack Weinberg <zack@codesourcery.com>
4189
4190 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
4191
558b8548
TT
41922005-03-11 Tom Tromey <tromey@redhat.com>
4193
4194 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
4195 (libgcj Runtime Properties): Document the default .db.
4196
2743ba1c
RM
41972005-03-10 Ranjit Mathew <rmathew@hotmail.com>
4198
4199 PR java/20312
4200 * parse.y (checks_throws_clauses): Check exceptions list even when
4201 the base class does not come from a source file being compiled.
4202 (java_complete_lhs): Remove unused variable 'wfl'.
4203
9e1af876
RM
42042005-03-09 Ranjit Mathew <rmathew@hotmail.com>
4205
4206 PR java/20338
a1286ef5 4207 * decl.c (finish_method): Emit _Jv_InitClass for private static
9e1af876 4208 methods inside inner classes as well.
2a6464a6 4209
9e1af876 42102005-03-08 Julian Brown <julian@codesourcery.com>
2a6464a6
JB
4211 * Revert patch from 2005-03-08 for causing bootstrap failure on
4212 ppc-darwin.
4213
9148ab01
JB
42142005-03-08 Julian Brown <julian@codesourcery.com>
4215
4216 * decl.c (finish_method): Give methods once-only linkage.
4217
b1e11d1e
BM
42182005-03-07 Ranjit Mathew <rmathew@hotmail.com>
4219
a1286ef5 4220 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
b1e11d1e 4221
a2da2c9a
BM
42222005-03-07 Bryce McKinlay <mckinlay@redhat.com>
4223
4224 * verify-glue.c (vfy_is_assignable_from): Perform static check using
4225 can_widen_reference_to if the C++ ABI is in use.
4226 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
4227 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
4228 type_isresolved, init_state, set_pc, state_get_pc,
4229 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
4230 (verify_fail): Report the current PC from the verifier context.
4231 (free_state): Remove #if 0 block to enable this function.
4232 (free_verifier_context): Call free_state on state_list iterator
4233 values before freeing them.
4234 * expr.c (pop_type_0): Pop correct type for error message when stack
4235 contains a multi-word type.
4236
42372005-03-07 Ranjit Mathew <rmathew@hotmail.com>
4238
4239 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
4240 for known NULL array length access.
4241
7f8b151b
TT
42422005-03-07 Tom Tromey <tromey@redhat.com>
4243
4244 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
4245
1ddc0328
KH
42462005-03-06 Kazu Hirata <kazu@cs.umass.edu>
4247
4248 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
4249 typeck.c: Update copyright.
4250
ecf71365
RM
42512005-03-06 Ranjit Mathew <rmathew@hotmail.com>
4252
4253 Remove xref code.
4254 * xref.c, xref.h: Remove file.
4255 * Make-lang.in (java/xref.o): Remove.
4256 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
4257 * lang.c (flag_emit_xref): Remove definition.
4258 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
4259 * typeck.c (convert): Remove use of do_not_fold.
4260 * parse.y (do_not_fold): Remove definition.
4261 (parser grammar): Remove xref code.
4262 (maybe_create_class_interface_decl, create_class): Likewise.
4263 (register_fields, method_header, finish_method_declaration): Likewise.
4264 (declare_local_variables, source_end_java_method): Likewise.
4265 (java_complete_expand_classes): Do not set do_not_fold.
4266 (java_complete_expand_method): Remove xref code.
4267 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
4268 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
4269 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
4270 (patch_synchronized_statement, patch_throw_statement): Likewise.
4271 (maybe_build_class_init_for_field): Likewise.
4272
3f724eb8
KH
42732005-03-05 Kazu Hirata <kazu@cs.umass.edu>
4274
4275 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
4276 instead of IS_NON_TYPE_CODE_CLASS.
4277
7235c300
AH
42782005-03-04 Andrew Haley <aph@redhat.com>
4279
a1286ef5
ZW
4280 PR java/18362
4281 * class.c (set_method_index): Don't set method_index if it is
4282 NULL_TREE.
4283 (layout_class_method): Don't complain about "non-static method foo
4284 overrides static method" in the case of indirect dispatch.
7235c300 4285
cea91480
KG
42862005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4287
4288 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
4289 warning.
4290 * Make-lang.in: Don't elide warnings in jcf-io.c.
4291
7cea62b4
PB
42922005-03-01 Per Bothner <per@bothner.com>
4293
4294 PR java/8608
4295 * check-init.c (wfl): Remove static.
4296 (final_assign_error, check_init): Replace calls to parse_error_context
4297 by plain error.
4298 (check_init): Save, set, and restore input_location for each exp.
4299
837491bc
PB
43002005-03-01 Per Bothner <per@bothner.com>
4301
4302 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
4303 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
4304 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
4305
027b7c36
PB
43062005-03-01 Per Bothner <per@bothner.com>
4307
4308 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
4309
bc71e4a2
TF
43102005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
4311
4312 PR libgcj/16923
4313 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
4314 JvVMOption.
4315
84b6a4d2
TT
43162005-02-22 Tom Tromey <tromey@redhat.com>
4317
4318 PR java/20056:
4319 * verify-impl.c (EITHER): New define.
4320 (types_compatible): Handle it.
4321 (check_field_constant): Use it.
4322
1870a43b
TT
43232005-02-18 Tom Tromey <tromey@redhat.com>
4324
e022a6cb
TT
4325 PR java/20056:
4326 * verify-impl.c (types_equal): Fixed test.
4327
1870a43b
TT
4328 PR java/20056:
4329 * verify-glue.c (vfy_class_has_field): New function.
4330 * verify.h (vfy_class_has_field): Declare.
4331 * verify-impl.c (check_field_constant): Added 'putfield'
4332 argument.
4333 (verify_instructions_0): Updated.
4334 (types_equal): New function.
4335
adfec6a6
TT
43362005-02-14 Tom Tromey <tromey@redhat.com>
4337
4338 PR java/19921:
4339 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
4340 stack effect of multianewarray.
4341
891df09c
AH
43422005-02-14 Andrew Haley <aph@redhat.com>
4343
4344 PR java/19907
4345 * expr.c (expand_byte_code): Call promote_arguments().
4346 (promote_arguments): New function.
7235c300 4347 * decl.c (check_local_unnamed_variable): Remove special case for
891df09c
AH
4348 new verifier.
4349 (find_local_variable): Promote all boolean types to int
4350 when searching for local variable decls.
a1286ef5 4351
537677ba
KH
43522005-02-12 Kazu Hirata <kazu@cs.umass.edu>
4353
4354 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
4355 parse-scan.y: Update copyright.
4356
7b45aab4
PB
43572005-02-11 Per Bothner <per@bothner.com>
4358
4359 PR java/15543
4360 * parse-scan.y (input_location): Remove variable.
4361 (main_input_filename): New - replaces input_filename, which isn't
4362 settable if USE_MAPPED_LOCATION.
4363 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
4364 so we don't reference input_location or wfl_operator in that case.
4365 * jv-scan.c (expand_location): Remove - no longer used.
4366 (main): Set main_input_filename rather than input_filename.
4367
c6a912da
RH
43682005-02-09 Richard Henderson <rth@redhat.com>
4369
4370 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
4371 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
4372
86641a95
MD
43732005-02-08 Marcin Dalecki <martin@dalecki.de>
4374
4375 * expr.c (add_type_assertion): Use the proper enumeration type,
4376 since this is what htab_find_slot() is expecting.
4377
706bb773
JM
43782005-02-06 Joseph S. Myers <joseph@codesourcery.com>
4379
4380 * gcj.texi: Update copyright dates.
4381
f8845935
TT
43822005-02-02 Tom Tromey <tromey@redhat.com>
4383
4384 * gcj.texi (libgcj Runtime Properties): Default library_control
4385 to 'cache'.
4386
55967ba2
RM
43872005-02-02 Ranjit Mathew <rmathew@hotmail.com>
4388
4389 PR java/15543
4390 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
4391 (modifiers) when square brackets are present in a declaration for
4392 a final paramter.
4393 * jv-scan.c (main): Set input_filename and input_line.
4394
3d4da704
TT
43952005-02-01 Tom Tromey <tromey@redhat.com>
4396
4397 PR java/19742:
4398 * gjavah.c (get_field_name): Don't override name for JNI header.
4399
8ddd633a
RS
44002005-02-01 Roger Sayle <roger@eyesopen.com>
4401
4402 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
4403 of unsigned types using iushr and lushr JVM bytecodes.
4404
55967ba2 44052005-02-01 Ranjit Mathew <rmathew@hotmail.com>
f619dcab
RM
4406
4407 PR java/19738
4408 * gjavah.c (jni_print_float): Do not emit floating-point
4409 initialiser for a static final field.
4410 (jni_print_double): Likewise.
4411
22f8a068
MM
44122005-02-01 Mark Mitchell <mark@codesourcery.com>
4413
4414 Revert:
4415 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4416 * gjavah.c (print_field_info): Mark static data members of
4417 floating-point type with "__extension__".
4418
8c94c75a
MM
44192005-01-31 Mark Mitchell <mark@codesourcery.com>
4420
4421 * gjavah.c (print_field_info): Mark static data members of
4422 floating-point type with "__extension__".
4423
7f75bb83
RM
44242005-02-01 Ranjit Mathew <rmathew@hotmail.com>
4425
4426 PR java/9157
4427 * parse.y (build_string_concatenation): Remove redundant if.
4428 (patch_conditional_expr): Attempt to patch_string() the condition
4429 of a ?: as well, in addition to its other operands.
4430
60b5ee6b
TT
44312005-01-25 Tom Tromey <tromey@redhat.com>
4432
4433 * Make-lang.in (java/java-tree-inline.o): Removed.
4434
c5e72f51 44352005-01-25 Ranjit Mathew <rmathew@hotmail.com>
31fc696c
RM
4436
4437 PR java/19070
4438 * parse.y (patch_binop): Allow comparisons against NULL only
4439 if the other operand is of a reference type.
4440
2a4d0626
TT
44412005-01-24 Tom Tromey <tromey@redhat.com>
4442
4443 * java-tree.h (gcj_abi_version): Declare.
4444 * class.c (make_class_data): Push gcj_abi_version into "next"
4445 field. Renamed field.
4446 * decl.c (gcj_abi_version): New global.
4447 (parse_version): New function.
4448 (java_init_decl_processing): Call it. Renamed 'next' field.
4449 Include version.h.
4450 (GCJ_BINARYCOMPAT_ADDITION): New define.
4451
d5f62555
RS
44522005-01-24 Roger Sayle <roger@eyesopen.com>
4453
4454 PR java/19295
4455 * jcf-write.c (generate_bytecode_insns): Conversions between
4456 integer types of the same precision shouldn't generate widening
4457 or narrowing conversion bytecodes.
4458
6aa9e91a
KH
44592005-01-22 Kazu Hirata <kazu@cs.umass.edu>
4460
4461 * java-except.h, java-tree.h: Remove unused prototypes.
4462
155d49d7
AP
44632005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
4464
4465 PR java/18091:
4466 * jcf-write.c (perform_relocations): Don't call memcpy if source
4467 and destination are the same.
4468
6db1446e
TT
44692005-01-17 Tom Tromey <tromey@redhat.com>
4470
4471 * verify-impl.c (get_short): Sign extend.
4472 (get_int): Likewise.
4473
88910b6a
RM
44742005-01-12 Ranjit Mathew <rmathew@hotmail.com>
4475
4476 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4477 with TYPE_SIZE.
4478
2b816e14
RM
44792005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4480
4481 * verify.c: Revert to the version before the BC-ABI merge.
4482
5bf8aebc
RM
44832005-01-10 Ranjit Mathew <rmathew@hotmail.com>
4484
4485 PR java/19277
4486 * check-init.c (check_init): Take care of references that do not
4487 have an explicit final variable declaration (e.g. array length
4488 access) for pre/post in/de-crement operators.
4489
b927d3a4
MW
44902005-01-08 Mark Wielaard <mark@klomp.org>
4491
4492 * parse.y (process_imports): Allocate (and free) original_name only
4493 when not already defined.
4494 * jcf-parse.c (read_class): Free results of find_class() and
4495 lrealpath().
4496 (java_parse_file): Keep pointer to head of file_list and free when
4497 done. Free result of lrealpath().
4498
b4a49222
TT
44992005-01-05 Tom Tromey <tromey@redhat.com>
4500
4501 * gcj.texi (Standard Properties): java.ext.dirs is now used.
4502
521fce52
AH
45032004-12-20 Andrew Haley <aph@redhat.com>
4504
4505 * typeck.c: Use fold_convert for ints and booleans.
4506
cd5fcd33
AH
45072004-12-17 Andrew Haley <aph@redhat.com>
4508
4509 PR java/18931
4510 * typeck.c (convert): Use a CONVERT_EXPR when converting to
4511 BOOLEAN_TYPE or CHAR_TYPE.
4512 (convert_to_boolean, convert_to_char) : Remove.
4513 * convert.h (convert_to_boolean, convert_to_char) : Remove.
4514 * expr.c (expand_load_internal): Do type conversion if type is not
4515 as required.
a1286ef5 4516
e50e6b88
DS
45172004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
4518
eb536e6b 4519 PR target/18459
e50e6b88
DS
4520 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4521 Update comment.
4522
477c6c35
AH
45232004-12-07 Andrew Haley <aph@redhat.com>
4524
9e6a1ba9 4525 PR java/18811:
477c6c35
AH
4526 * jcf-parse.c (load_class): Remove sanity test for missing inner
4527 class file.
a1286ef5 4528
6e07ee6d
TT
45292004-12-06 Tom Tromey <tromey@redhat.com>
4530
4531 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4532 (java.uninstall): Likewise.
4533 (java.maintainer-clean): Likewise.
4534 (.INTERMEDIATE): Likewise.
4535 (java.install-man): Likewise.
4536 (gcj-dbtool.pod): New target.
4537 * gcj.texi (Code Generation): Document -findirect-dispatch.
4538 (libgcj Runtime Properties): Document
4539 gnu.gcj.precompiled.db.path.
4540 (Top): Link to "Invoking gcj-dbtool".
4541
a58d7453
TT
45422004-12-06 Tom Tromey <tromey@redhat.com>
4543
4544 PR java/14853:
4545 * java-tree.h (extract_field_decl): Declare.
4546 * parse.y (extract_field_decl): Renamed from
4547 strip_out_static_field_access_decl. No longer static.
4548 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4549
c56c2878
TT
45502004-12-03 Tom Tromey <tromey@redhat.com>
4551
4552 * lang.c (flag_new_verifier): Define.
4553 (java_post_options): Set flag_new_verifier if indirect dispatch
4554 is being used.
4555 * lang.opt (fnew-verifier): Removed.
4556
8b45a0d3
TT
45572004-12-03 Tom Tromey <tromey@redhat.com>
4558
4559 PR bootstrap/14614:
4560 * Make-lang.in (java.install-common): Only install transformed
4561 gcjh if gcj-cross exists.
4562
2360c81b
AH
45632004-12-03 Andrew Haley <aph@redhat.com>
4564
4565 PR java/18812
4566 * except.c (link_handler): Patch 'outer' field of siblings of the
4567 range we're demoting.
4568
3381c28f 45692004-12-03 Andrew Haley <aph@redhat.com>
a1286ef5
ZW
4570
4571 PR java/18697
3381c28f
AH
4572 * class.c (layout_class_method): Don't fail to override a method
4573 simply because it has DECL_ARTIFICIAL set.
4574
5c5d79d2
TT
45752004-12-02 Tom Tromey <tromey@redhat.com>
4576
4577 PR java/16675:
4578 * parse.y (craft_constructor): Special case null_pointer_node.
4579
ea7b59ba
TT
45802004-12-02 Tom Tromey <tromey@redhat.com>
4581
4582 PR java/18741:
4583 * java-gimplify.c (java_gimplify_expr): Don't call
4584 SET_EXPR_LOCATION unless wrapped tree is an expression.
4585
ca6b9955
PB
45862004-11-27 Per Bothner <per@bothner.com>
4587
4588 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
4589 Fix fencepost error in 'i', which got executed one too many times.
4590 Also, fold memcpy into explicit loop, as originally intended.
4591 Also, free temporary 'buf' which otherwise leaks.
4592
ad500466
PB
45932004-11-27 Per Bothner <per@bothner.com>
4594
4595 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4596 local static variables if not USE_MAPPED_LOCATION.
4597
0b1214ef
KH
45982004-11-27 Kazu Hirata <kazu@cs.umass.edu>
4599
4600 * class.c, decl.c, expr.c: Fix comment typos.
4601
532815a7
AP
46022004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
4603
4604 PR java/18305
4605 * decl.c (end_java_method): Call
4606 attach_init_test_initialization_flags on all the init_decls.
4607 * parse.y (attach_init_test_initialization_flags): Move to ...
4608 * expr.c (attach_init_test_initialization_flags): here and
4609 support BIND_EXPR also.
4610 * java-tree.h (attach_init_test_initialization_flags): Prototype.
4611 * jcf-parse.c (parse_class_file): Don't disable class init
4612 optimization.
4613
597cdf4f
JM
46142004-11-25 Joseph S. Myers <joseph@codesourcery.com>
4615
4616 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4617 in diagnostics.
4618
eb9744a7
RH
46192004-11-24 Richard Henderson <rth@redhat.com>
4620
4621 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4622 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4623
36739040
TT
46242004-11-24 Tom Tromey <tromey@redhat.com>
4625
6a4877c4
TT
4626 * verify.c (defer_merging): Don't use C++-style comment.
4627 * verify.h (java_opcode): Added java_opcode_end.
4628 * class.c (build_class_ref): Remove C++ comment and old FIXME.
4629
528d9c63
TT
4630 * verify-impl.c (vfy_push_type): Removed bogus "return".
4631 (initialize_stack): Use vfy_alloc and vfy_free.
4632 (verify_instructions_0): Likewise.
4633
36739040
TT
4634 * Merged gcj-abi-2-dev-branch to trunk.
4635
46362004-11-24 Andrew Haley <aph@redhat.com>
4637
4638 * jcf-parse.c (parse_class_file): Set file_start_location.
4639
46402004-11-10 Tom Tromey <tromey@redhat.com>
4641
4642 * class.c (make_field_value): Don't call build_static_field_ref.
4643 (build_static_field_ref): Don't emit direct references when using
4644 indirect dispatch.
4645
4646 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
4647 -verbose:class into man page synopsis.
4648
46492004-11-09 Tom Tromey <tromey@redhat.com>
4650
4651 * expr.c (build_java_arraystore_check): Still generate check if
4652 element type is itself an array.
4653
46542004-11-08 Tom Tromey <tromey@redhat.com>
4655
4656 * java-tree.h (soft_check_assignment_node): Removed.
4657 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4658 * decl.c (java_init_decl_processing): Don't initialize
4659 soft_check_assignment_node.
4660
46612004-11-05 Tom Tromey <tromey@redhat.com>
4662
4663 * class.c (layout_class_methods): Don't add Miranda methods when
4664 using indirect dispatch.
4665
46662004-11-05 Bryce McKinlay <mckinlay@redhat.com>
4667
4668 * class.c (make_class_data): Call emit_assertion_table to set the
4669 'assertion_table' field.
4670 (build_signature_for_libgcj): Move here from expr.c.
4671 (add_assertion_table_entry): New function. Callback for assertion
4672 hashtable traversal.
a1286ef5 4673 (emit_assertion_table): New. Take class argument, and generate
36739040
TT
4674 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4675 * decl.c (init_decl_processing): Define assertion_entry_type record.
4676 Push 'assertion_table' class field instead of 'verify'.
4677 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4678 (type_assertion_hash): Include 'assertion_code' in hash.
4679 (add_type_assertion): Rewritten. Take class and assertion_code
4680 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4681 (can_widen_reference_to): Use new add_type_assertion() arguments.
a1286ef5 4682 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
36739040
TT
4683 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4684 (verify_identifier_node): Removed.
4685 (assertion_entry_type, assertion_table_type): New.
4686 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4687 assertion code definitions.
4688 (struct type_assertion): Add assertion_code. Rename 'source_type' and
4689 'target_type' to 'op1' and 'op2'.
4690 (add_type_assertion): Declare.
4691 (lang_printable_name_wls): Remove unused definition.
4692 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4693 to emit runtime assertion.
4694 (vfy_note_stack_type): Clean up non-C90 declarations.
4695 (vfy_note_local_type): Likewise.
4696 * verify.h (vfy_is_assignable_from): Declare.
4697 * verify-impl.c (is_assignable_from_slow): Remove unused function.
a1286ef5 4698 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
36739040
TT
4699 instead of is_assignable_from_slow().
4700 (types_compatible): Reinstate ref_compatible() call.
4701
47022004-11-04 Tom Tromey <tromey@redhat.com>
4703
4704 * class.c (build_static_field_ref): Reverted previous patch.
4705
4706 * class.c (build_static_field_ref): Don't emit direct references
4707 when using indirect dispatch.
4708
47092004-11-03 Tom Tromey <tromey@redhat.com>
4710
4711 * expr.c (expand_java_arrayload): Set lhs_type_node.
4712 (expand_java_arraystore): Set rhs_type_node.
4713
47142004-11-02 Tom Tromey <tromey@redhat.com>
4715
4716 * jcf-parse.c (compute_class_name): Use filename length from zip
4717 directory, not strlen.
4718
4719 * expr.c (expand_invoke): Mark new interface methods as abstract.
4720
47212004-11-01 Tom Tromey <tromey@redhat.com>
4722
4723 * verify-impl.c (push_jump): Removed check for uninitialized
4724 objects.
4725 (push_exception_jump): Likewise.
4726 (handle_ret_insn): Likewise.
4727 (handle_jsr_insn): Likewise.
4728 (state_check_no_uninitialized_objects): Removed.
4729
4730 * decl.c (check_local_unnamed_variable): Recognize
4731 promoted-to-int parameters when using the new verifier.
4732 * expr.c (expand_java_arraystore): Explicitly request array type
4733 when using new verifier.
4734 (expand_java_arrayload): Likewise.
4735 (invoke_build_dtable): Don't pass object_type_node as
4736 expression argument to build_java_indirect_ref.
4737 (build_java_check_indexed_type): Do nothing.
4738 (build_java_arraystore_check): Handle case where array doesn't
4739 have array type.
4740 (build_java_array_length_access): Likewise.
4741 (expand_invoke): Handle case where interface overrides a method
4742 from Object.
4743 (pop_type_0): Always succeed for reference types.
4744 (process_jvm_instruction): Don't pop a value in a dead
4745 exception handler.
4746 (pop_arguments): Convert arguments to correct types.
4747
47482004-10-29 Andrew Haley <aph@redhat.com>
4749
4750 * jcf-parse.c (give_name_to_class): Remove line that was
4751 incorrectly merged.
4752
47532004-10-29 Andrew Haley <aph@redhat.com>
4754
4755 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4756
47572004-10-20 Andrew Haley <aph@redhat.com>
4758
4759 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4760
47612004-10-26 Tom Tromey <tromey@redhat.com>
4762
4763 * verify.h (vfy_notify_verified): Removed.
4764 * verify-glue.c (vfy_notify_verified): Removed.
4765
47662004-10-26 Tom Tromey <tromey@redhat.com>
4767
4768 * verify-impl.c (debug_print_state): Declare `i' before code.
4769 (merge_types): Modify `t' when it is null_type.
4770
47712004-10-26 Tom Tromey <tromey@redhat.com>
4772
4773 * verify-impl.c (type_print): Renamed from print. Now static and
4774 takes an argument.
4775 (debug_print_state): Use type_print.
4776
47772004-10-25 Tom Tromey <tromey@redhat.com>
4778
4779 * expr.c (build_invokeinterface): Compute correct offset for
4780 index into interface methods.
4781
47822004-10-20 Tom Tromey <tromey@redhat.com>
4783
4784 * java-tree.h (verify_jvm_instructions_new): Declare.
4785
4786 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4787 command line.
4788
4789 * verify-impl.c (verify_instructions): Correctly handle wide
4790 types on the stack.
4791 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4792 (vfy_get_component_type): Strip pointer types.
4793 (vfy_find_class): Use get_type_from_signature. Strip pointer
4794 types.
4795 Include java-except.h.
4796
47972004-10-20 Bryce McKinlay <mckinlay@redhat.com>
4798
a1286ef5 4799 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
36739040
TT
4800 vfy_push_type_t, set_variable, add_new_state, merge_into,
4801 handle_jsr_insn, branch_prepass, check_class_constant,
a1286ef5 4802 check_wide_constant, get_one_type, compute_static_types,
36739040
TT
4803 verify_instructions_0): Clean up C99 declarations after statements.
4804
48052004-10-20 Tom Tromey <tromey@redhat.com>
4806
4807 * verify-impl.c (merge_refs): Compare reference against iterator,
4808 not ref2.
4809
4810 * verify-glue.c (vfy_tag): Mask off resolved flag.
4811
48122004-10-19 Tom Tromey <tromey@redhat.com>
4813
4814 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4815 (init_state_with_stack): Initialize `this_type' in state.
4816 (verify_method): Use debug_print.
4817 * verify-glue.c (vfy_is_primitive): Removed debugging print.
4818 (vfy_note_stack_depth): Reverted last patch.
4819 (vfy_note_stack_type): Note pointer to Object, not Object.
4820 (vfy_note_local_type): Likewise.
4821
4822 * verify.h (vfy_note_instruction_seen): Declare.
4823 * verify-glue.c (verify_jvm_instructions_new): Set
4824 BCODE_EXCEPTION_TARGET on target instruction.
4825 (vfy_note_instruction_seen): New function.
4826 * verify-impl.c (FLAG_INSN_SEEN): New define.
4827 (verify_instructions_0): Set flag on instruction. Save state for
4828 PC=0 later.
4829 (verify_instructions): Call vfy_note_instruction_seen.
4830
4831 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4832 (verify_jvm_instructions_new): Call method_init_exceptions,
4833 add_handler, and handle_nested_ranges.
4834 * verify-impl.c (verify_method): Return 1 on success.
4835 (verify_instructions_0): Save the state at PC=0.
4836
4837 * verify-impl.c (init_type_from_class): Set is_resolved and
4838 ref_next on new ref_intersection.
4839 (init_type_from_string): Likewise.
4840
48412004-10-15 Bryce McKinlay <mckinlay@redhat.com>
4842
4843 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4844 if flag_new_verifier is set.
4845 * java-tree.h (flag_new_verifier): Declare.
4846 * lang.opt (fnew-verifier): New option.
a1286ef5 4847 * verify-impl.c: Work around namespace pollution by undef'ing
36739040
TT
4848 'current_class'.
4849 (struct verifier_context): Make 'bytecode' const.
4850 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
4851 (types_compatible): For the BC-ABI, always consider reference types
4852 compatible.
4853 (check_class_constant): Use vfr->current_class.
4854 (check_constant): Likewise.
4855 (check_wide_constant): Likewise.
4856 (check_field_constant): Check for 'L' at start of type name.
4857 (get_one_type): Return pointer instead of type. Set type result in
4858 caller via passed type pointer.
4859 (compute_argument_types): Update to use new get_one_type arguments.
4860 (compute_return_type): Likewise.
4861 (make_verifier_context): New. Allocate and initialize 'vfr'.
4862 (free_verifier_context): New. Free 'vfr' and its contents.
4863 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
4864 and free_verifier_context.
4865
48662004-10-15 Tom Tromey <tromey@redhat.com>
4867
4868 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
4869 * verify.h (vfy_fail): Fixed formatting.
4870
4871 * verify-impl.c (vfr): Fixed comment formatting.
4872 (collapse_type): New function.
4873 (verify_instructions): Notify compiler about type map.
4874 * verify.h (vfy_note_stack_depth): Updated.
4875 (vfy_note_stack_type): Likewise.
4876 (vfy_note_local_type): Likewise.
4877 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
4878 Declare.
4879 * verify-glue.c (vfy_note_stack_depth): Correctly size type
4880 state. Added `method' argument.
4881 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
4882 argument.
4883 (vfy_note_local_type): New function.
4884 (vfy_unsuitable_type): Likewise.
4885 (vfy_return_address_type): Likewise.
4886 (vfy_null_type): Likewise.
4887
4888 * verify.h (VFY_IN_GCC): Removed.
4889 (VFY_WANT_TYPEMAP): Removed.
4890 * verify-impl.c (verify_instructions_0): Removed useless "\".
4891 (struct state) <next>: Uncomment.
4892
48932004-10-13 Bryce McKinlay <mckinlay@redhat.com>
4894
a1286ef5 4895 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
36739040
TT
4896 C-style.
4897
48982004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4899
4900 * Make-lang.in (verify.o): Re-enabled this target.
4901 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
4902 (vfy_get_interface): Likewise.
4903 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
4904 * verify.h (verify_jvm_instructions_new): Declare.
4905 * verify-impl.c (free_state): Temporarily comment out unused
4906 function.
4907
49082004-10-06 Tom Tromey <tromey@redhat.com>
4909
4910 * java-tree.h (JV_STATE_READ): New enum value.
4911
49122004-10-06 Bryce McKinlay <mckinlay@redhat.com>
4913
4914 * verify.h: New file.
4915
49162004-10-05 Bryce McKinlay <mckinlay@redhat.com>
4917
4918 * verify-impl.c, verify-glue.c, verify.h: New files.
4919 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
4920
49212004-09-24 Andrew Haley <aph@redhat.com>
4922
4923 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
4924 for a slot if it's of pointer type.
4925
49262004-09-14 Tom Tromey <tromey@redhat.com>
4927
4928 * class.c (make_class_data): Correctly initialize "state" field.
4929 Initialize "engine" field.
4930 * decl.c (java_init_decl_processing): Add "engine" field.
4931
49322004-09-10 Andrew Haley <aph@redhat.com>
4933
4934 PR java/12760
4935 * expr.c (build_invokeinterface): Use fast method for interface
4936 dispatch.
4937 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
4938 JTI_ITABLE_PTR_TYPE.
4939 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
4940 (emit_symbol_table): Add new arg, element_size.
4941 * decl.c (java_init_decl_processing): Initialize Class.itable.
4942 * class.c (GEN_TABLE): New macro.
4943 (gen_indirect_dispatch_tables): Use it. Add itable.
4944 (make_class_data): Add new arg for emit_symbol_table().
4945 Emit itable.
4946 (add_miranda_methods): Make sure search_class has been parsed.
4947 (emit_symbol_table): Add new arg, element_size.
4948
49492004-09-06 Andrew Haley <aph@redhat.com>
4950
4951 * verify.c (merge_types): Return Object for all merges of
4952 interfaces.
4953 * expr.c (add_type_assertion): Don't generate assertions when
4954 source type is array of Object.
a1286ef5 4955
36739040
TT
49562004-09-03 Andrew Haley <aph@redhat.com>
4957
4958 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
4959
4960 * lang.c (java_post_options): Force flag_verify_invocations if
4961 we're not using indirect dispatch.
4962
4963 * expr.c (pop_type_0): Move test for interfaces before call to
4964 can_widen_reference_to().
4965 (build_signature_for_libgcj): Remove generation of canonical array
4966 type.
4967 (add_type_assertion): Canonicalize both arrays.
4968 Don't assert that type X can be assigned to Object.
4969 Don't assert that type X an be assigned to type X.
4970 Don't assert that Object can be assigned to type X.
4971 (can_widen_reference_to): Warn whenever we generate an assertion.
4972 (process_jvm_instruction): Use throwable_type_node for the type of
4973 an exception class.
4974
49752004-09-01 Andrew Haley <aph@redhat.com>
4976
4977 * decl.c (java_init_decl_processing): Change
4978 verify_identifier_node to "__verify".
4979 * expr.c (add_type_assertion): Use verify_identifier_node for name.
4980 * java-tree.h (verify_identifier_node): Change to "__verify".
4981
4982 * expr.c (build_signature_for_libgcj): New function.
4983 (add_type_assertion): Use it to construct signatures for
4984 source_type and target_type.
4985
49862004-08-27 Andrew Haley <aph@redhat.com>
4987
4988 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
4989 (verify_identifier_node): New.
4990 (TYPE_VERIFY_METHOD): New.
4991 (struct type_assertion): New type.
4992 * expr.c (type_assertion_eq): New function.
4993 (type_assertion_hash): New function.
4994 (add_type_assertion): New function.
4995 (can_widen_reference_to): Call add_type_assertion().
4996 * decl.c (java_init_decl_processing): Add verify_identifier_node.
4997 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
4998 (finish_class): Output TYPE_VERIFY_METHOD (type).
4999
5000 * decl.c (end_java_method): Nullify unused fields.
5001
50022004-08-17 Andrew Haley <aph@redhat.com>
5003
5004 * verify.c (defer_merging): Quieten.
5005 * jcf-parse.c (load_class): Only try to open a class file if it's
5006 java.lang.Object or if it's part of the current compilation.
5007 Check that the class we just tried to load is the class we just
5008 loaded. Quieten.
5009 (java_parse_file): Set flag_verify_invocations off if we're
5010 compiling from .class.
5011 (parse_zip_file_entries): Abort if we try to read a dummy class.
5012 * expr.c (can_widen_reference_to): Quieten.
5013 (build_invokevirtual): Abort if we try to invokevirtual an
5014 interface.
5015 (expand_invoke): Don't build a non-interface call to an interface.
5016 (build_instanceof): Don't do premature optimization if
5017 flag_verify_invocations is not set.
5018 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
5019 from superclass.
5020 (build_static_field_ref): Add correct type conversion for
5021 field_address.
5022 (add_miranda_methods): Disable generation of Miranda methods for
5023 dummy classes.
5024 (layout_class_method): Don't complain about non-static method
5025 overrides static method with dummy classes.
5026
50272004-08-13 Tom Tromey <tromey@redhat.com>
5028
5029 * class.c (build_static_field_ref): Re-enable atable lookups for
5030 static fields.
5031
5032 * parse.y (strip_out_static_field_access_decl): Indentation fix.
5033
50342004-08-11 Tom Tromey <tromey@redhat.com>
5035
5036 * gcj.texi (libgcj Runtime Properties): Document new properties.
5037
50382004-08-06 Andrew Haley <aph@redhat.com>
5039
5040 * jcf-parse.c (load_class): Check that we really have loaded the
5041 class we're looking for.
5042
50432004-07-19 Andrew Haley <aph@redhat.com>
5044
5045 * verify.c (verify_jvm_instructions): Comment change only.
5046
5047 * typeck.c (build_java_array_type): Add size field to array name.
5048
5049 * java-tree.h (LOCAL_SLOT_P): New.
5050 (update_aliases): Add PC argument.
5051 (pushdecl_function_level): New function.
5052
5053 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5054 MODIFY_EXPR, and SAVE_EXPR.
5055 (java_gimplify_modify_expr): New function.
5056
5057 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5058 (expand_iinc): Pass PC to update_aliases().
5059 (STORE_INTERNAL): Likewise.
5060 (process_jvm_instruction): Likewise.
5061
5062 * decl.c (base_decl_map): New variable.
5063 (uniq): New variable.
5064 (update_aliases): Rewrite with more thorough checking.
5065 (debug_variable_p): New function.
5066 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
5067 (check_local_named_variable): Delete whole function.
5068 (initialize_local_variable): New function.
5069 (check_local_unnamed_variable): Add checks and comments.
5070 (find_local_variable): Rewrite.
5071 (java_replace_reference): New function.
5072 (function_binding_level): New variable.
5073 (pushdecl_function_level): New function.
5074 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5075 (maybe_pushlevels): Call pushdecl() on each of the new decls.
5076 (start_java_method): Reset uniq. Create base_decl_map. Set
5077 function_binding_level.
5078 (end_java_method): Null unused fields to save memory.
5079
50802004-06-29 Andrew Haley <aph@redhat.com>
5081
5082 * except.c (expand_start_java_handler): Push a new binding level.
5083 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
5084 register_exception_range() to register where we'll do it.
5085 (expand_end_java_handler): Remove old bogus code. Replace with
5086 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5087 the top of the expression we're curently building.
5088 (maybe_end_try): Delete.
5089 * decl.c (binding_level.exception_range): New field.
5090 (clear_binding_level): Add field exception_range. Reformat.
5091 (poplevel): Call expand_end_java_handler().
5092 (poplevel): Call java_add_stmt only if functionbody is false.
5093 (maybe_poplevels): Don't call maybe_end_try() from here.
5094 (end_java_method): Clear no longer used trees in function decl.
5095 (register_exception_range): New function.
5096 * java-tree.h (register_exception_range, struct eh_range): Declare.
5097
50982004-06-22 Andrew Haley <aph@redhat.com>
5099
5100 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
5101 the otable.
5102 * check-init.c (get_variable_decl): Teach check-init about
5103 FIELD_DECLs addressed via the otable.
5104 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
5105 CLASS_PARSED_P.
5106
51072004-05-28 Andrew Haley <aph@redhat.com>
5108
5109 * jcf-parse.c (load_class): Don't try to read a class that we've
5110 already read.
5111
5112 * expr.c (build_invokeinterface): Use the old-fashioned way of
5113 doing indirect dispatch: look up interfaces by name.
5114 * java-tree.h (enum java_tree_index): Add
5115 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
5116 * decl.c (java_init_decl_processing): Add
5117 soft_lookupinterfacemethodbyname_node.
5118
5119 * gjavah.c (print_method_info): Final methods have vtable entries,
a1286ef5 5120 so gjavah needs to output them.
36739040
TT
5121 * class.c (layout_class_method): Generate vtable entries for final
5122 methods.
5123 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
5124 dispatch, even if a method is final.
5125
51262004-05-25 Andrew Haley <aph@redhat.com>
5127
5128 * class.c (build_symbol_entry): Convert the names of constructors
5129 to init_identifier_node when generating an entry for the indirect
5130 dispatch table.
a1286ef5 5131
36739040
TT
5132 * expr.c (build_known_method_ref): Generate indirect calls for
5133 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
5134
51352004-05-24 Andrew Haley <aph@redhat.com>
5136
a1286ef5
ZW
5137 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
5138 atable element is of the right type.
36739040 5139
a1286ef5
ZW
5140 * class.c (build_static_field_ref): Cast pointer to correct type
5141 for field.
36739040
TT
5142
51432004-04-20 Bryce McKinlay <mckinlay@redhat.com>
5144
5145 * Merged with HEAD as of 20040514. Diff against
5146 gcj-abi-2-merge-20040514.
5147
51482004-04-16 Andrew Haley <aph@redhat.com>
5149
5150 * verify.c (check_pending_block): Disable subroutine checks.
5151 (defer_merging): New function.
5152 (merge_types): If types are dummy, use defer_merging to combine them.
5153 (verify_jvm_instructions): If invocation is invokeinterface and
5154 target is dummy, assume target really is an interface.
5155
5156 * parse.y (patch_invoke): Break out call to java_create_object.
5157
5158 * lang.c (flag_verify_invocations): New.
5159
5160 * jcf-parse.c (load_class): If we've already failed to load a
5161 class, don't try again.
5162 (load_class): If we can't find a .class file, don't fail, but emit
5163 a warning.
5164 (parse_class_file): Don't act on dummy methods.
5165
5166 * java-tree.h (flag_verify_invocations): New.
5167 (TYPE_DUMMY): New.
5168 (lang_type.dummy_class): New field.
5169 (java_create_object): New function.
5170 (METHOD_DUMMY): New.
5171
5172 * expr.c (build_field_ref): Widen field offset.
5173 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
5174 that each of its elements is compatible with the one we're
5175 popping.
5176 (pop_type_0): Issue a warning to say that we need to generate a
5177 runtime check.
5178 (java_create_object): New function.
5179 (build_field_ref): Only generate hard refs if we're not using
5180 indirect dispatch.
5181 (expand_java_field_op): If we're using !verify_invocations and we
5182 see a missing field, generate a decl for it.
5183
5184 (expand_invoke): If a class doesn't have the method we seek and
5185 we're using !flag_verify_invocations, generate a decl for the
5186 method now.
5187
5188 (build_known_method_ref): Always use indirect dispatch via the
5189 atable for static methods.
5190
a1286ef5 5191 (expand_java_NEW): Break out object creation into new function,
36739040
TT
5192 java_create_object.
5193
5194 (can_widen_reference_to): Issue a warning to say that we need to
5195 generate a runtime check.
5196
5197 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
5198 (make_method_value): Also use index for interfaces.
5199 (make_class_data): Skip dummy field for inherited data.
5200 Don't build method array for dummy methods.
5201 Set size_in_byte to -1 when using inirect dispatch
5202 Don't build a hard class ref if we don't have a hard ref to our
5203 superclass, or if we're using inirect dispatch.
5204 Null out dispatch tables.
5205
5206 (layout_class_method): Don't complain about non-static method
5207 overrides static method is method is artificial.
5208
5209 (build_static_field_ref): Disable atable references to static
5210 fields for the time being.
5211
5212 (layout_class_methods): Check for CLASS_INTERFACE as
5213 well as CLASS_ABSTRACT.
5214
39afeb1a
SB
52152004-11-24 Steven Bosscher <stevenb@suse.de>
5216
5217 * class.c (make_class_data): Don't check flag_inline_functions.
5218 * lang.c (flag_really_inline): Remove unused flag.
5219 (java_handle_option): Don't set it here. Remove special handling
5220 of flag_inline_functions for Java.
5221 (java_init): Don't set flag_inline_trees here. Already done...
5222 (java_post_options): ...here. Don't clear flag_inline_functions.
5223
16df8078
SB
52242004-11-24 Steven Bosscher <stevenb@suse.de>
5225
5226 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
5227 (java_gimplify_exit_block_expr): New function.
5228 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
5229 LABELED_BLOCK_EXPR.
5230 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
5231 (EXIT_BLOCK_EXPR): Likewise.
5232 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
5233 (LABELED_BLOCK_BODY): Likewise.
5234 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
5235 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
5236 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
5237 TREE_OPERAND.
5238 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
5239 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
5240 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
5241 second operand of EXIT_BLOCK_EXPR.
5242 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
5243 TREE_OPERAND.
5244 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
5245
37cd02de
BE
52462004-11-23 Ben Elliston <bje@au.ibm.com>
5247
5248 * xref.h (xref_flag_value): Remove.
5249 (xref_set_data, xref_get_data): Likewise.
5250 (xref_set_current_fp): Likewise.
5251 (XREF_NONE): Likewise.
5252 (XREF_GET_DATA): Likewise.
5253 * xref.c (xref_flag_value): Remove.
5254 (xref_set_data, xref_get_data): Likewise.
5255 (xref_set_current_fp): Likewise.
5256
82698cde
BE
52572004-11-23 Ben Elliston <bje@au.ibm.com>
5258
5259 * gjavah.c (output_directory): Make static.
5260 (temp_directory): Likewise.
a1286ef5 5261
35d7f8f4
TT
52622004-11-15 Tom Tromey <tromey@redhat.com>
5263
5264 * decl.c (instn_ptr_type_node): Removed.
5265 (lineNumbers_ptr_type_node): Removed.
5266 (jint_type): Removed.
5267 (jint_ptr_type): Removed.
5268
6571838f
AP
52692004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
5270
5271 PR java/15576
5272 * check-init.c (check_init): Ignore DECL_EXPR.
5273 * expr.c (always_initialize_class_p): Reenable.
5274 (build_class_init): Use a variable to store the decl. Also use
5275 boolean_false_node instead of integer_zero_node.
5276 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
5277 to the block.
5278
5e74a4eb
TT
52792004-11-08 Tom Tromey <tromey@redhat.com>
5280
5281 PR java/16843:
5282 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
5283 generating a JNI header.
5284 (print_field_info): Handle JNI headers.
5285 (jni_print_float): Likewise.
5286 (jni_print_double): Likewise.
5287
517f199e
AP
52882004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
5289
5290 * decl.c (end_java_method): Remove duplicated code.
5291
d08bf5fa 52922004-11-06 Zack Weinberg <zack@codesourcery.com>
a1286ef5 5293 Gerald Pfeifer <gerald@pfeifer.com>
d08bf5fa
ZW
5294
5295 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
5296 as well.
5297
65e9700c
BM
52982004-11-02 Bryce McKinlay <mckinlay@redhat.com>
5299
5300 PR java/17265
a1286ef5 5301 * class.c: Reinstate 2004-08-18 patch.
65e9700c
BM
5302 (make_local_function_alias): Don't create an alias for extern (native)
5303 functions.
5304
e063dbf8
EB
53052004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
5306
5307 PR java/17265
5308 * class.c (make_local_function_alias): Revert 2004-08-18 change.
5309 (make_method_value): Likewise.
5310
d600a3a4
AH
53112004-10-21 Andrew Haley <aph@redhat.com>
5312
5313 PR java/18091:
5314 * jcf-parse.c (set_source_filename): Add code to build new sfname.
5315
53162004-10-20 Andrew Haley <aph@redhat.com>
5317
5318 * decl.c (end_java_method): Don't expand if flag_syntax_only.
5319 Remove duplicated code block.
5320
7e698b2c
SB
53212004-10-18 Steven Bosscher <stevenb@suse.de>
5322
5323 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
5324 New rules to work around old Bison warnings.
5325
7cefa0c1
SB
53262004-10-17 Steven Bosscher <stevenb@suse.de>
5327
5328 * class.c (ident_subst): Always alloca buffer.
5329 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
5330 opcode after including javaop.def.
5331 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
5332 conditional expression that exits, to avoid warnings.
5333 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
5334 a user of an extension.
5335 * win32-host.c: Move check down to have non-empty file when
5336 WIN32 is not defined.
5337
5338 * Make-lang.in (java-warn): Add STRICT_WARN.
5339 (java/jcf-io.o-warn): Don't have Werror for this file.
5340 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
5341
e86d9e4b
HPN
53422004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
5343
5344 * expr.c (expr_add_location): Move declaration to before all
5345 statements.
5346 * parse.y (java_expand_classes): Ditto.
5347 * lex.c (java_peek_unicode): Ditto.
5348
a1402da3
RM
53492004-10-16 Ranjit Mathew <rmathew@hotmail.com>
5350
5351 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
5352 if possible, else convert `foo' to 'foo'.
5353 * class.c: Likewise.
5354 * decl.c: Likewise.
5355 * expr.c: Likewise.
5356 * jcf-io.c: Likewise.
5357 * jcf-parse.c: Likewise.
5358 * lang.c: Likewise.
5359 * lex.c: Likewise.
5360 * parse.h: Likewise.
5361
53622004-10-16 Ranjit Mathew <rmathew@hotmail.com>
5363
5364 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
5365 rename parameter 'msg' to 'msgid' in function declaration.
5366 (issue_warning_error_from_context): Likewise.
5367 (yyerror): Rename parameter 'msg' to 'msgid'.
5368 (all over): Use new quoting style for diagnostics.
5369
10a35159
KH
53702004-10-15 Kazu Hirata <kazu@cs.umass.edu>
5371
5372 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
5373 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
5374 Update copyright.
5375
0c58f841
MA
53762004-10-14 Matt Austern <austern@apple.com>
5377
5378 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
5379 pointer_set_t* now.
a1286ef5 5380
38467a0d
TT
53812004-10-13 Tom Tromey <tromey@redhat.com>
5382
5383 PR java/15578:
5384 * lang.opt (--extdirs): Document.
5385 * jvspec.c (lang_specific_driver): Recognize -encoding and
5386 -extdirs.
5387
5a6aa19c
UW
53882004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
5389
5390 * parse.y (issue_warning_error_from_context): Use va_list *
5391 instead of va_list parameter.
5392 (parse_error_context): Update call.
5393 (parse_warning_context): Likewise.
5394
d5706a1e
ZW
53952004-10-05 Zack Weinberg <zack@codesourcery.com>
5396
5397 * parse.y, parse-scan.y: Add list of diagnostic messages to
5398 insulate translation template from version of yacc/bison used
5399 to compile the grammar.
5400
5544148e
RM
54012004-10-05 Ranjit Mathew <rmathew@hotmail.com>
5402
5403 Prepare for %q, %< and %> in diagnostic message strings.
5404 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
5405 Name second parameter 'msgid'.
5406 * parse.y: Additionally include pretty-print.h and diagnostic.h.
5407 (issue_warning_error_from_context): Use pretty-printer functions
5408 instead of vsprintf for constructing formatted messages. Rename
5409 parameter 'msg' to 'msgid'.
5410 (parse_error_context): Rename parameter 'msg' to 'msgid'.
5411 (parse_warning_context): Likewise.
5412
5789147f
AH
54132004-10-05 Andrew Haley <aph@redhat.com>
5414
5415 PR java/17779
5416 * jcf-parse.c (parse_zip_file_entries): If a class has a
5417 superclass and a TYPE_SIZE of zero, lay it out.
5418
54192004-09-30 Andrew Haley <aph@redhat.com>
5420
5421 PR java/17733
5422 * jcf-parse.c (compute_class_name): Rewrite.
5423
0f0377f6
JH
54242004-10-01 Jan Hubicka <jh@suse.cz>
5425
5426 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
5427
5f90fc47
KH
54282004-10-01 Kazu Hirata <kazu@cs.umass.edu>
5429
5430 * lex.c: Fix a comment typo.
5431
0690a9f4
KH
54322004-10-01 Kazu Hirata <kazu@cs.umass.edu>
5433
5434 * java-tree.h: Fix a comment typo.
5435
9ec819d4
PB
54362004-09-30 Per Bothner <per@bothner.com>
5437
5438 Simplify lexer. Implement --enable-mapped-location support.
5439 * jcf-parse.c (parse_class_file): Use linemap_line_start.
5440 (parse_source_file_1): Pass filename as extra parameter, so we can call
5441 linemap_add and set input_location here, rather than in both callers.
5442 (read_class): Pass copied filename to parse_source_file_1.
5443 Don't initialize wfl_operator - only needed for source compilation.
5444 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
5445 * lex.h: Remove a bunch of debugging macros.
5446 * lex.h (struct_java_line, struct java_error): Remove types.
5447 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
5448 (struct java_lc_s): Remove prev_col field.
5449 (struct java_lexer): New fields next_unicode, next_columns, and
5450 avail_unicode. New position field, and maybe token_start field.
5451 Don't need hit_eof field - use next_unicode == -1 instead.
5452 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
5453 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
5454 * parse.h: Various changes for USE_MAPPED_LOCATION.
5455 (EXPR_WFL_EMIT_LINE_NOTE): XXX
5456 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5457 (struct parser_ctxt): New file_start_location field.
5458 Remove p_line, c_line fields since we no longer save lines.
5459 Remove elc, lineno, and current_jcf fields - no longer used.
5460 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
5461 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5462 source_location and is probably not needed anymore anyway.
5463 Use new expr_add_Location function.
5464 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
5465 (java_pop_parser_context): Minor cleanup.
5466 (java_parser_context_save_global, java_parser_context_restore_global,
5467 java_pop_parser_context): Save/restore input_location as a unit.
5468 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
5469 a source_location instead of a wfl context node.
5470 (check_class_interface_creation): input_filename is not addressable.
5471 (create_artificial_method): Calling java_parser_context_save_global
5472 and java_parser_context_restore_global is overkill. Instead,
5473 temporarily set input_location from class decl.
5474 (java_layout_seen_class_methods): Set input_location from method decl.
5475 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5476 (finish_loop_body): Likewise.
5477 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
5478 (java_sprint_unicode): Take a character, not index in line.
5479 (java_sneak_uncode): Replaced by java_peek_unicode.
5480 (java_unget_unicode): No longer used.
5481 (java_allocate_new_line. java_store_unicode): Removed, since we
5482 no longer remember "lines".
5483 (java_new_lexer): Update for new data structures.
5484 (java_read_char): Move unget_value checking to java_read_unicode.
5485 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5486 efficient functions that are used directly when lexing.
5487 (java_read_unicode_collapsing_terminators): No longer needed.
5488 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5489 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5490 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
5491 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
5492 combine switch branches, and test for common token kinds earlier.
5493 (java_lex_error): Rewrite.
5494 * jv-scan.c (expand_location): New function, copied from tree.c.
5495 (main): Set ctxp->filename instead of setting input_filename directly.
5496
6744f400
PB
54972004-09-30 Per Bothner <per@bothner.com>
5498
5499 More cleanup for --enable-mapped-location.
5500 * class.c (push_class): If USE_MAPPED_LOCATION don't set
5501 input_location here. Instead do it in give_name_to_class.
5502 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5503 * expr.c (expand_byte_code): Call linemap_line_start.
5504 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
5505 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
5506 (expr_add_location): New function, if USE_MAPPED_LOCATION.
5507 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
5508 to USE_MAPPED_LOCATION case.
5509
cb3a1430
PB
5510 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
5511 * jcf-parse.c (java_parse_file): Don't set input_filename.
5512 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5513 Create a list of TRANSLATION_UNIT_DECL.
5514 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
5515 reason is so we can set a DECL_SOURCE_LOCATION for each file.
5516 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5517 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5518 (file_start_location): New static.
5519 (set_source_filename): Avoid extra access to input_filename macro.
5520 Concatenate new name with class's package prefix.
5521 (set_source_filename, give_name_to_class): Update.
5522 (give_name_to_class): Set class's "line 0" input_location here.
5523 (parse_class_file): Set input_location as a unit.
5524
5525 * jcf-parse.c (load_class): Sanity test if missing inner class file.
5526
d68acc04
PB
55272004-09-29 Per Bothner <per@bothner.com>
5528
9ec819d4 5529 * java-tree.h: Redefine some macros and add some declaration
d68acc04
PB
5530 to handle the USE_MAPPED_LOCATION case.
5531 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
5532 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
5533 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5534 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5535
de399303
PB
5536 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5537 * decl.c (finish_method, java_add_stmt): Likewise.
5538 * java-gimplify.c (java-gimplify.c): Likewise.
5539 * jcf-write.c (generate_bytecode_insns): Likewise.
5540 * lang.c (java_post_options): Likewise - call linemap_add.
5541
eab3f38f
AH
55422004-09-29 Andrew Haley <aph@redhat.com>
5543
5544 PR java/17007
5545 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5546 result of TRUNC_MOD_EXPR.
5547 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5548 * decl.c (java_init_decl_processing): Mark
5549 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5550
346c5b01
TT
55512004-09-28 Tom Tromey <tromey@redhat.com>
5552
5553 PR java/15710:
5554 * class.c (add_miranda_methods): Load superinterface if not
5555 already loaded.
5556
1679340f
AH
55572004-09-28 Andrew Haley <aph@redhat.com>
5558
5559 PR java/17586
5560 * jcf-parse.c (load_class): Don't try to read a class that we've
5561 already read.
5562
46d82a27
AH
55632004-09-28 Andrew Haley <aph@redhat.com>
5564
5565 * jcf-parse.c (load_class): Back out previous broken patch.
5566
03ec093d
AH
55672004-09-28 Andrew Haley <aph@redhat.com>
5568
5569 PR java/17586
5570 * jcf-parse.c (load_class): Don't try to read a class that we've
5571 already read.
5572 Check that we really did read the right class.
5573
c1f042f8
TT
55742004-09-25 Tom Tromey <tromey@redhat.com>
5575
5576 PR java/17500:
5577 * parse.y (create_artificial_method): Use add_method_1.
5578
4dd4c751
KH
55792004-09-25 Kazu Hirata <kazu@cs.umass.edu>
5580
5581 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5582 comment typos.
5583 * gcj.texi: Fix typos.
5584
8d481c2e
TT
55852004-09-24 Tom Tromey <tromey@redhat.com>
5586
5587 PR java/15656:
5588 * parse.y (class_instance_creation_expression): Set `$$' to NULL
5589 in error parts of rule.
5590 (unary_expression): Don't call error_if_numeric_overflow when $1
5591 is NULL.
5592
90424847
TT
55932004-09-24 Tom Tromey <tromey@redhat.com>
5594
5595 PR java/16789:
5596 * parse.y (resolve_qualified_expression_name): Set
5597 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5598 * expr.c (force_evaluation_order): Check for empty argument list
5599 after stripping COMPOUND_EXPR.
5600
c5466b25
AH
56012004-09-23 Andrew Haley <aph@redhat.com>
5602
5603 PR java/16927:
5604 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5605 COND_EXPRs.
5606
fd5f23d3
TT
56072004-09-23 Tom Tromey <tromey@redhat.com>
5608
5609 PR java/17329:
5610 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5611 where operand is null.
5612
2fc8ee77
TT
56132004-09-23 Tom Tromey <tromey@redhat.com>
5614
5615 PR java/17380:
5616 * parse.y (not_accessible_p): Allow access to protected members
5617 even when class is not static.
5618
3b620440
KC
56192004-09-22 Kelley Cook <kcook@gcc.gnu.org>
5620
5621 * Make-lang.in: Revert the gcc-none.o change.
5622
0e64e323
NS
56232004-09-22 Nathan Sidwell <nathan@codesourcery.com>
5624
5625 * parse.y (patch_anonymous_class): VEC_space returns true if there
5626 is space.
5627
e72222ac
MA
56282004-09-21 Matt Austern <austern@apple.com>
5629
5630 Fix bootstrap.
5631 * gjavah.c (free_method_name_list): Fix function definition so
5632 it's a proper C prototype.
d5706a1e 5633
b8b639c9
TT
56342004-09-21 Tom Tromey <tromey@redhat.com>
5635
5636 PR java/17575:
5637 * gjavah.c (free_method_name_list): New method.
5638 (main): Call it.
5639
6615c446
JO
56402004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
5641 Zack Weinberg <zack@codesourcery.com>
5642
5643 * java-tree.def: Use tree_code_class enumeration constants
5644 instead of code letters.
5645 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5646 new tree-class enumeration constants.
5647
4a2dd6fe
TT
56482004-09-13 Tom Tromey <tromey@redhat.com>
5649
5650 PR java/17216:
5651 * class.c (layout_class_method): Put synthetic methods into the
5652 vtable.
5653
68a97276
AP
56542004-09-11 Andrew Pinski <apinski@apple.com>
5655
5656 * Make-lang.in (java/ggc-none.c): Change dependency
5657 for ggc.h into $(GGC_H).
5658
af8f35b8
ME
56592004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5660
5661 * Make-lang.in (java/win32-host.o): Add dependency on
5662 coretypes.h.
5663 * win32-host.c: Add includes for coretypes.h, jcf.h
5664
55545aed
ME
56652004-09-11 Mohan Embar <gnustuff@thisiscool.com>
5666
5667 * Make-lang.in (GCJH_OBJS): Change dependency from
5668 ggc-none.o to java/ggc-none.o
5669 (JCFDUMP_OBJS): Likewise.
5670 (java/ggc-none.o): New target.
5671
7d60be94
NS
56722004-08-25 Nathan Sidwell <nathan@codesourcery.com>
5673
5674 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
5675 * class.c (build_utf8_ref, build_static_field_ref,
5676 make_field_value, make_method_value, get_dispatch_table,
5677 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5678 * constants.c (get_tag_node, build_ref_from_constant_pool,
5679 build_constants_constructor): Likewise.
5680 * decl.c (java_init_decl_processing): Likewise.
5681 * expr.c (build_java_array_length_access, build_newarray,
5682 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5683 build_java_binop, build_field_ref, expand_java_add_case,
5684 expand_java_call, build_known_method_ref, build_invokevirtual,
5685 build_invokeinterface, build_jni_stub): Likewise.
5686 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5687 * jcf-parse.c (get_constant): Likewise.
5688 * lex.c (do_java_lex): Likewise.
5689 * parse.y (patch_binop, patch_unaryop, patch_cast,
5690 build_newarray_node, patch_newarray): Likewise.
5691 * resource.c (compile_resource_data): Likewise.
5692 * typeck.c (build_prim_array_type): Likewise.
5693
8c1d6d62
NS
56942004-08-24 Nathan Sidwell <nathan@codesourcery.com>
5695
7d60be94 5696 * decl.c (java_init_decl_processing): Adjust
8c1d6d62
NS
5697 initialize_sizetypes call.
5698
b3d1f5b4
NS
56992004-08-23 Nathan Sidwell <nathan@codesourcery.com>
5700
5701 * jv-scan.c (fancy_abort): Add.
5702
07c6ee1b
NS
57032004-08-20 Nathan Sidwell <nathan@codesourcery.com>
5704
5705 * expr.c (build_java_arrayaccess): Use convert to change
5706 len's type.
5707
97d68565
BM
57082004-08-19 Bryce McKinlay <mckinlay@redhat.com>
5709
5710 * class.c (make_local_function_alias): Allocate extra space for 'L'
5711 in name buffer. Reported by Thomas Neumann.
5712
89b0433e
NS
57132004-08-19 Nathan Sidwell <nathan@codesourcery.com>
5714
5715 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5716 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
5717 * lex.c (do_java_lex): Adjust.
5718 (error_if_numeric_overflow): Likewise.
5719
ecc75a19
AP
57202004-08-18 Andrew Pinski <apinski@apple.com>
5721
89b0433e
NS
5722 * class.c (make_local_function_alias): Only make a new decl if we
5723 support alias attribute on all decls.
ecc75a19 5724
260ba9ce
BM
57252004-08-18 Bryce McKinlay <mckinlay@redhat.com>
5726
5727 * class.c (make_local_function_alias): New function. Create local
5728 alias for public method DECL.
5729 (make_method_value): Use make_local_function_alias.
5730 * parse.y (craft_constructor): Don't special-case anonymous classes.
5731 Always set ctor_name to init_identifier_node.
5732 (lookup_method_invoke): Call layout_class_method when creating
5733 anonymous class constructor.
5734
17ad5b5e
RH
57352004-08-18 Richard Henderson <rth@redhat.com>
5736
5737 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5738 default case. Treat '<' similarly. Update for
5739 is_gimple_formal_tmp_var name change.
5740
1b9deeb4
AH
57412004-08-17 Andrew Haley <aph@redhat.com>
5742
5743 * lang.c (lang_printable_name): Obey verbose flag.
5744 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5745 lang_printable_name().
5746 (verify_constructor_circularity, get_printable_method_name,
5747 check_abstract_method_definitions, java_check_regular_methods,
5748 java_check_abstract_methods, check_inner_class_access,
5749 fix_constructors, patch_method_invocation, patch_return):
5750 Likewise.
5751 * expr.c (pop_type_0): Likewise.
5752
5753 * java-tree.h (lang_printable_name_wls): Delete.
5754
16d85b63
TT
57552004-08-16 Tom Tromey <tromey@redhat.com>
5756
5757 PR java/8473:
5758 * parse.y (primary): Changed for initialized and uninitialized
5759 array creations.
5760 (array_access): Handle array_creation_initialized.
5761 (array_creation_expression): Split into
5762 array_creation_initialized and array_creation_uninitialized.
5763
a20f4d83
AH
57642004-08-16 Andrew Haley <aph@redhat.com>
5765
5766 * jcf-write.c (find_constant_index): Canonicalize NaNs when
5767 generating bytecode.
5768
f699e454
EL
57692004-08-16 Elliot Lee <sopwith@redhat.com>
5770
5771 PR java/9677
5772 * jcf-parse.c (java_parse_file): Handle filenames with embedded
5773 spaces, and quoted filelists.
5774
4a90aeeb
NS
57752004-08-15 Nathan Sidwell <nathan@codesourcery.com>
5776
5777 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5778 * class.c (build_utf8_ref, build_static_field_ref,
5779 make_field_value, make_method_value, get_dispatch_table,
5780 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
6615c446 5781 * constants.c (get_tag_node, build_ref_from_constant_pool,
4a90aeeb
NS
5782 build_constants_constructor): Likewise.
5783 * decl.c (java_init_decl_processing): Likewise.
5784 * expr.c (build_java_array_length_access, build_newarray,
5785 expand_java_multianewarray, expand_java_pushc, expand_iinc,
5786 build_java_binop, build_field_ref, expand_java_add_case,
5787 expand_java_call, build_known_method_ref, build_invokevirtual,
5788 build_invokeinterface, build_jni_stub): Likewise.
5789 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5790 * jcf-parse.c (get_constant): Likewise.
5791 * lex.c (do_java_lex): Likewise.
5792 * parse.y (patch_binop, patch_unaryop, patch_cast,
5793 build_null_of_type, patch_newarray): Likewise.
5794 * resource.c (compile_resource_data): Likewise.
5795 * typeck.c (build_prim_array_type): Likewise.
5796
f97b53df
BM
57972004-08-10 Bryce McKinlay <mckinlay@redhat.com>
5798
5799 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5800 Don't create BLOCK here or call java_gimplify_block.
5801
bbefea96
L
58022004-08-09 H.J. Lu <hongjiu.lu@intel.com>
5803
5804 * java-tree.h (flag_deprecated): Removed.
5805 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5806 * parse.y (check_deprecation): Check warn_deprecated instead of
5807 flag_deprecated.
5808
9ddfe26e
KC
58092004-08-06 Kelley Cook <kcook@gcc.gnu.org>
5810
5811 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5812 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5813 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5814 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5815 flag_force_classes_archive_check, flag_optimize_sci,
5816 flag_indirect_dispatch): Remove explicit declarations.
5817 * lang.opt: Add implicit declare/define/assign. Remove obsolete
5818 final comment.
5819
c34f5b33
MC
58202004-08-05 Michael Chastain <mec.gnu@mindspring.com>
5821
5822 PR bootstrap/14893
5823 * Make-lang.in (java.install-man): Install from either build
5824 tree or source tree, whichever has the file first.
5825
ca7a3bd7
NS
58262004-08-05 Nathan Sidwell <nathan@codesourcery.com>
5827
5828 * jcf-parse.c (get_constant): Adjust force_fit_type call.
5829 * lex.h (SET_LVAL_NODE_TYPE): Remove.
5830 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5831 (do_java_lex): Likewise. Adjust force_fit_type call.
5832
545eacdb
RS
58332004-08-04 Roger Sayle <roger@eyesopen.com>
5834 Andrew Haley <aph@redhat.com>
5835
5836 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5837 checking trees as they're being built.
5838 (convert): Call convert_ieee_real_to_integer if we're
5839 converting a constant, even if we're writing a class file.
5840
899deeca
BM
58412004-08-02 Bryce McKinlay <mckinlay@redhat.com>
5842
5843 PR java/16701
5844 * parse.y (fold_constant_for_init): Call resolve_field_access with
5845 correct current_class context.
5846
dc6d7095
RS
58472004-08-01 Roger Sayle <roger@eyesopen.com>
5848
5849 * decl.c (update_aliases, initialize_local_variable): Replace calls
5850 to build with calls to buildN.
5851 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
5852 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
5853 * parse.h (BUILD_THROW): Likewise.
5854 * parse.y (switch_expression, synchronized_statement,
5855 catch_clause_parameter, array_creation_expression,
5856 conditional_expression, make_qualified_name,
5857 resolve_qualified_expression_name, patch_method_invocation,
5858 patch_invoke, build_method_invocation, build_new_invocation,
5859 build_assignment, patch_assignment, build_binop, patch_binop,
5860 build_string_concatenation, build_incdec, patch_unaryop,
5861 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
5862 patch_return, build_if_else_statement, build_labeled_block,
5863 build_new_loop, build_loop_body, build_bc_statement,
5864 build_assertion, encapsulate_with_try_catch, build_try_statement,
5865 build_try_finally_statement, patch_synchronized_statement,
5866 emit_test_initialization): Likewise, replace build with buildN.
5867
9f63daea
EC
58682004-07-28 Eric Christopher <echristo@redhat.com>
5869
5870 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
5871 (java_unsafe_for_reeval): Ditto.
5872
6fd876ac
HPN
58732004-07-26 <hp@bitrange.com>
5874
5875 * parse.y (build_super_invocation): Adjust declaration order to
5876 avoid declaration after statement.
5877
381166d4
BI
58782004-07-25 Bernardo Innocenti <bernie@develer.com>
5879
5880 * decl.c: Rename all identifiers named `class' to `cl'.
5881
b785f485
RH
58822004-07-25 Richard Henderson <rth@redhat.com>
5883
5884 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
5885
0e7d217a
MS
58862004-07-23 Mike Stump <mrs@apple.com>
5887
5888 * boehm.c (set_bit): Improve type safety wrt unsignedness.
5889 * gjavah.c (throwable_p, decode_signature_piece,
5890 print_full_cxx_name, print_include, add_namelet, add_class_decl,
5891 process_file): Likewise.
5892 * jcf-dump.c (main): Likewise.
5893 * jcf-io.c (read_zip_member): Likewise.
5894 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
5895 give_name_to_class, get_class_constant): Likewise.
5896 * jcf-write.c (find_constant_wide, push_long_const,
5897 generate_classfile): Likewise.
5898 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
5899 * parse.y (read_import_dir): Likewise.
5900 * typeck.c (parse_signature_type): Likewise.
5901 * verify.c (verify_jvm_instructions): Likewise.
5902 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
5903
ef05818b
TF
59042004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
5905
5906 * Make-lang.in: Replace rmic and rmiregistry references with
5907 grmic and grmiregistry.
5908 * gcj.texi: Likewise.
5909
00150bf9
AH
59102004-07-20 Andrew Haley <aph@redhat.com>
5911
4de69546 5912 PR java/16431.
00150bf9
AH
5913 * verify.c (verify_jvm_instructions): Comment change only.
5914
5915 * typeck.c (build_java_array_type): Add size field to array name.
5916
5917 * java-tree.h (LOCAL_SLOT_P): New.
5918 (update_aliases): Add PC argument.
5919 (pushdecl_function_level): New function.
5920
5921 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5922 MODIFY_EXPR, and SAVE_EXPR.
5923 (java_gimplify_modify_expr): New function.
5924
5925 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5926 (expand_iinc): Pass PC to update_aliases().
5927 (STORE_INTERNAL): Likewise.
5928 (process_jvm_instruction): Likewise.
5929
5930 * decl.c (base_decl_map): New variable.
5931 (uniq): New variable.
5932 (update_aliases): Rewrite with more thorough checking.
5933 (debug_variable_p): New function.
5934 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
5935 (check_local_named_variable): Delete whole function.
5936 (initialize_local_variable): New function.
5937 (check_local_unnamed_variable): Add checks and comments.
5938 (find_local_variable): Rewrite.
5939 (java_replace_reference): New function.
5940 (function_binding_level): New variable.
5941 (pushdecl_function_level): New function.
5942 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5943 (maybe_pushlevels): Call pushdecl() on each of the new decls.
5944 (start_java_method): Reset uniq. Create base_decl_map. Set
5945 function_binding_level.
5946 (end_java_method): Null unused fields to save memory.
9f63daea 5947
fa743e8c
NS
59482004-07-20 Nathan Sidwell <nathan@codesourcery.com>
5949
5950 * class.c (add_interface_do): Remove.
5951 (set_super_info, interface_of_p, maybe_add_interface,
5952 add_interface, make_class_data, layout_class,
5953 add_miranda_methods): Adjust BINFO accessors and addition.
5954 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
5955 accessors.
5956 * jcf-write.c (generate_classfile): Likewise.
5957 * parse.y (patch_anonymous_class, check_inner_circular_reference,
5958 check_circular_reference, java_complete_class,
5959 check_abstract_method_definitions,
5960 java_check_abstract_method_definitions,
5961 check_interface_throws_clauses, java_check_abstract_methods,
5962 lookup_java_interface_method2,
5963 find_applicable_accessible_methods_list): Adjust BINFO accessors
5964 and addition.
5965 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
5966
94cdeb1a
RS
59672004-07-18 Roger Sayle <roger@eyesopen.com>
5968
5969 * builtins.c (max_builtin, min_builtin,
5970 java_build_function_call_expr): Replace calls to build with buildN.
5971 * class.c (build_class_ref, build_static_field_ref,
5972 get_dispatch_table, make_class_data, layout_class_method): Likewise.
5973 * constants.c (build_ref_from_constant_pool): Likewise.
5974 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
5975 add_stmt_to_compound): Likewise.
5976 * except.c (build_exception_object_ref, expand_end_java_handler):
5977 Likewise.
5978 * java-gimplify.c (java_gimplify_case_expr,
5979 java_gimplify_default_expr, java_gimplify_block,
5980 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
5981 * jcf-write.c (generate_bytecode_insns): Likewise.
5982 * typeck.c (convert_ieee_real_to_integer): Likewise.
5983
6e34d3a3
JM
59842004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
5985
5986 * java-tree.h (builtin_function): Declare.
5987
165b54c3
SB
59882004-07-16 Steven Bosscher <stevenb@suse.de>
5989
5990 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
5991 abuse restore_line_number_status.
5992
35b6fdcf
FCE
59932004-07-15 Frank Ch. Eigler <fche@redhat.com>
5994
5995 g++/15861
5996 * jcf-parse.c (java_emit_static_constructor): Specify default
5997 priority.
5998
1cb6d0da
PB
59992004-07-13 Per Bothner <per@bothner.com>
6000
6001 * java-tree.h (all_class_filename): Remove useless macro.
6002 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
6003 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
6004 * parse.y (java_parser_context_restore_global): Replace
6005 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
6006 * jcf-parse.c (read_class, java_parse_file): Likewise.
6007
dd4e1500
BM
60082004-07-12 Bryce McKinlay <mckinlay@redhat.com>
6009
6010 PR java/16474
6011 gjavah.c (print_field_info): Emit constant only if field is static.
6012
247fec6e
RS
60132004-07-11 Roger Sayle <roger@eyesopen.com>
6014
6015 * expr.c (java_truthvalue_conversion, flush_quick_stack,
6016 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
6017 build_java_ret, build_java_throw_out_of_bounds_exception,
6018 build_java_array_length_access, java_check_reference,
6019 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
6020 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
6021 expand_java_arrayload, build_java_monitor, expand_java_return,
6022 expand_load_internal, expand_java_NEW, build_get_class,
6023 build_instanceof, expand_java_CHECKCAST, expand_iinc,
6024 build_java_soft_divmod, build_java_binop, build_field_ref,
6025 expand_compare, expand_java_goto, expand_java_switch,
6026 expand_java_add_case, build_class_init, build_known_method_ref,
6027 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
6028 expand_invoke, build_jni_stub, expand_java_field_op,
6029 java_expand_expr, expand_byte_code, STORE_INTERNAL,
6030 force_evaluation_order, emit_init_test_initialization): Convert
6031 calls to "build" into calls to the prefered "buildN" functions.
6032
9dcf6e73
JM
60332004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
6034
6035 * java-tree.h (set_block): Remove.
6036 * lang.c (java_clear_binding_stack): New.
6037 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
6038 * decl.c (struct binding_level): Remove this_block.
6039 (clear_binding_level): Likewise.
6040 (poplevel): Don't handle this_block.
6041 (set_block): Remove.
6042
9ee226ef
BM
60432004-07-10 Bryce McKinlay <mckinlay@redhat.com>
6044
6045 * class.c (common_enclosing_context_p): Remove statement with no
6046 side-effects.
6047
d3ecb597
BM
60482004-07-09 Bryce McKinlay <mckinlay@redhat.com>
6049
6050 PR java/8618
6051 * parse.y (create_anonymous_class): Remove 'location' argument. Use
6052 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
6053 (craft_constructor): Inherit access flags for implicit constructor
6054 from the enclosing class.
6055 (create_class): Fix comment typo.
6056 (resolve_qualified_expression_name): Pass type of qualifier to
6057 not_accessible_p, not the type in which target field was found.
9f63daea
EC
6058 (not_accessible_p): Handle inner classes. Expand protected
6059 qualifier-subtype check to enclosing instances, but don't apply this
d3ecb597
BM
6060 check to static members. Allow protected access to inner classes
6061 of a subtype. Allow private access within common enclosing context.
6062 (build_super_invocation): Get WFL line number info from current
6063 class decl.
6064 (build_incomplete_class_ref): Update for new create_anonymous_class
6065 signature.
6066 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
6067 common_enclosing_instance_p.
6068 * class.c (common_enclosing_context_p): New. Determine if types
6069 share a common enclosing context, even across static contexts.
9f63daea 6070 (common_enclosing_instance_p): Renamed from
d3ecb597
BM
6071 common_enclosing_context_p. Determines if types share a common
6072 non-static enclosing instance.
6073 * java-tree.h (common_enclosing_instance_p): Declare.
6074 * jcf-write.c (get_method_access_flags): New. Surpress private flag
6075 for inner class constructors.
6076 (generate_classfile): Use get_method_access_flags.
6077
968d62b5
BM
60782004-07-09 Bryce McKinlay <mckinlay@redhat.com>
6079
6080 * class.c (interface_of_p): Check for null TYPE_BINFO.
6081
85fd2947
NS
60822004-07-09 Nathan Sidwell <nathan@codesourcery.com>
6083
6084 * class.c (make_class): Do not create binfo here.
6085 (set_super_info): Create it here.
6086 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
6087
ac45df5d
RH
60882004-07-08 Richard Henderson <rth@redhat.com>
6089
6090 * expr.c (case_identity, get_primitive_array_vtable,
6091 java_expand_expr, emit_init_test_initialization): Remove.
6092 * java-tree.h (java_expand_expr): Remove.
6093 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
6094
e0d3408c
PB
60952004-07-07 Per Bothner <per@bothner.com>
6096
5c121a1b
PB
6097 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
6098 get internal error due to mismatched types.
6099
e0d3408c
PB
6100 * gcj.texi (Invoking gij): Document new -verbose:class flag.
6101
45fdd405
PB
6102 * gcj.texi (Linking): New node. Document -lgij usage.
6103
604a3205
NS
61042004-07-07 Nathan Sidwell <nathan@codesourcery.com>
6105
6106 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
6107 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
6108 * java/class.c (set_super_info, class_depth, interface_of_p,
6109 maybe_add_interface, add_interface, make_class_data,
6110 layout_class, add_miranda_methods): Adjust BINFO macros.
6111 * expr.c (can_widen_reference_to, lookup_field): Likewise.
6112 * jcf-write.c (generate_classfile): Likewise.
6113 * parse.y (patch_anonymous_class,
6114 check_inner_circular_reference, check_circular_reference,
6115 java_complete_class, check_abstract_method_definitions,
6116 java_check_abstract_method_definitions,
6117 check_interface_throws_clauses, java_check_abstract_methods,
6118 lookup_java_interface_method2,
6119 find_applicable_accessible_methods_list): Likewise.
6120 * typeck.c (find_method_in_interface): Likewise.
6121 * verify.c (merge_types): Likewise.
6122
809e3e7f
NS
61232004-07-06 Nathan Sidwell <nathan@codesourcery.com>
6124
6125 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
6126 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
6127
95b4aca6
NS
61282004-07-05 Nathan Sidwell <nathan@codesourcery.com>
6129
6130 * class.c (make_class): Use make_tree_binfo.
6131 (set_super_info, add_interface_do): Likewise.
6132 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
6133
dafa622b
RM
61342004-07-04 Ranjit Mathew <rmathew@hotmail.com>
6135
6136 * verify.c: Correct array element access formatting thinko.
6137
c516c1ff
RM
61382004-07-04 Ranjit Mathew <rmathew@hotmail.com>
6139
6140 * verify.c: Insert a short blurb at the start referring to the JVMS.
6141 (merge_type_state): Remove redundant nested if statement.
6142 (verify_jvm_instructions): Ensure current_subr is initialised to
6143 NULL_TREE.
6144 Minor formatting fixes all over the place.
6145
82c82743
RH
61462004-07-02 Richard Henderson <rth@redhat.com>
6147
6148 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
6149
c9b9aa64
RH
61502004-07-01 Richard Henderson <rth@redhat.com>
6151
6152 * class.c (registerClass_libfunc): Remove.
6153 (init_class_processing): Don't set it.
6154 (emit_register_classes): Take list_p parameter. Fill it in
6155 with _Jv_RegisterClass calls.
6156 * decl.c (java_init_decl_processing): Don't call
6157 init_resource_processing.
6158 * jcf-parse.c (java_emit_static_constructor): New.
6159 (java_parse_file): Call it.
6160 * resource.c (registerResource_libfunc): Remove.
6161 (init_resource_processing): Remove.
6162 (write_resource_constructor): Take list_p parameter. Fill it in
6163 with _Jv_RegisterResource calls.
6164 * java-tree.h: Update prototypes.
6165
9c5fdae6
BM
61662004-06-29 Bryce McKinlay <mckinlay@redhat.com>
6167
6168 PR java/1262
6169 * class.c (layout_class_method): Do not override package-private
6170 method if its in a different package.
6171 (split_qualified_name): Move here from parse.y. Rename from
6172 breakdown_qualified. Add comment.
6173 (in_same_package): Move here from parse.y. Add comment.
6174 * java-tree.h (break_down_qualified, in_same_package): Declare.
6175 (in_same_package): Likewise.
6176 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
6177 Callers updated.
6178
ba60e475
AH
61792004-06-29 Andrew Haley <aph@redhat.com>
6180
6181 * except.c (expand_start_java_handler): Push a new binding level.
6182 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
6183 register_exception_range() to register where we'll do it.
6184 (expand_end_java_handler): Remove old bogus code. Replace with
6185 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
6186 the top of the expression we're curently building.
6187 (maybe_end_try): Delete.
6188 * decl.c (binding_level.exception_range): New field.
6189 (clear_binding_level): Add field exception_range. Reformat.
6190 (poplevel): Call expand_end_java_handler().
6191 (poplevel): Call java_add_stmt only if functionbody is false.
6192 (maybe_poplevels): Don't call maybe_end_try() from here.
6193 (end_java_method): Clear no longer used trees in function decl.
6194 (register_exception_range): New function.
6195 * java-tree.h (register_exception_range, struct eh_range): Declare.
6196
a0cc19cb
BM
61972004-06-28 Bryce McKinlay <mckinlay@redhat.com>
6198
6199 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
6200
fe0b9fb5
RM
62012004-06-27 Ranjit Mathew <rmathew@hotmail.com>
6202
6203 Formatting fixes.
6204 * expr.c (class_has_finalize_method): Fix method name indentation.
6205 (expand_java_call): Remove K&R style parameter declaration.
6206 (expand_invoke): Fix statement indentation.
6207 (expand_java_field_op): Likewise.
6208 * parse-scan.y: Fix typo.
6209 (reset_report): Fix method name indentation.
6210 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
6211 line. Fix typos.
6212 * verify.c (verify_jvm_instructions): Document parameters, insert
6213 page break.
6214 * lang.c (lang_init_source): Fix method name indentation.
6215 * class.c (common_enclosing_context_p): Likewise.
6216 (emit_symbol_table): Fix parameter list indentation.
6217 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
6218 parameter declaration.
6219 * constants.c: Fix copyright notice indentation.
6220 * typeck.c (find_method_in_superclasses): Fix parameter list
6221 indentation.
6222 (find_method_in_interfaces): Likewise.
6223 * zextract.c (makelong): Fix method name indentation.
6224
0f6cd83f
BM
62252004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6226
6227 PR java/15715.
6228 * parse.y (create_interface): Set correct access modifiers for
6229 interfaces.
6230 * jcf-write.c (get_classfile_modifiers): New function.
9f63daea 6231 (generate_classfile): Use get_classfile_modifiers, not
0f6cd83f
BM
6232 get_access_flags.
6233
62342004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6235
6236 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
6237 dependency to current parser context, not NULL_TREE, for top-level
6238 classes.
6239 (jdep_resolve_class): Enable member access check for all inner
6240 class dependencies.
6241
808fd801
BM
62422004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6243
9f63daea 6244 * parse.y (qualify_and_find): Pass type decl, not identifier, to
808fd801
BM
6245 load_class.
6246
6573a104
BM
62472004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6248
6249 PR java/15734
6250 * expr.c (expand_java_field_op): Ensure that target class for static
6251 field access has been loaded.
6252
ed7f2369
BM
62532004-06-26 Bryce McKinlay <mckinlay@redhat.com>
6254 Ranjit Mathew <rmathew@hotmail.com>
6255
6256 PR java/1207, java/16178
6257 * jcf-parse.c (load_class): Return immediately if passed a type decl
6258 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
6259 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
6260 before calling load_class.
6261 (qualify_and_find): Likewise.
6262 (find_in_imports_on_demand): Likewise.
6263 (find_applicable_accessible_methods_list): Likewise.
6264
62652004-06-24 Bryce McKinlay <mckinlay@redhat.com>
6266
6267 * parse.y (java_layout_seen_class_methods): Don't call load_class
6268 on class defined by source parser.
6269
d01a8ee0
BM
62702004-06-23 Bryce McKinlay <mckinlay@redhat.com>
6271
6272 * parse.y (set_nested_class_simple_name_value): Removed.
6273 (java_complete_expand_class): Remove calls to
6274 set_nested_class_simple_name_value.
6275
56c5197b 62762004-06-22 Andrew Haley <aph@redhat.com>
6615c446 6277 Ranjit Mathew <rmathew@hotmail.com>
9f63daea 6278
56c5197b
AH
6279 Fixes PR java/16113.
6280 * decl.c (force_poplevels): Remove call to expand_end_bindings.
6281
815c5191
RM
62822004-06-22 Ranjit Mathew <rmathew@hotmail.com>
6283
6284 * parse.y (create_class): Correct diagnostic message about
6285 java.lang.Object extending anything else.
6286
44de5aeb
RK
62872004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6288
6289 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
6290 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
6291 * constants.c (build_ref_from_constant_pool): Likewise.
6292 * expr.c (build_java_array_length_access): Likewise.
6293 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
6294 (invoke_build_dtable, build_invokevirtual): Likewise.
6295 (build_invokeinterface, java_expand_expr): Likewise.
6296 (emit_init_test_initialization): Likewise.
6297 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
6298 * parse.y (make_qualifed_name, build_array_ref): Likewise.
9f63daea 6299
979bf9a1
AH
63002004-06-21 Andrew Haley <aph@redhat.com>
6301
6302 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
6303 block.
6304
b40410b9
JM
63052004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
6306
6307 * jcf.h (struct JCF): Change java_source, right_zip and finished
6308 to unsigned int.
6309 * lex.h (struct java_lexer): Change hit_eof, read_anything,
6310 byte_swap and use_fallback to unsigned int.
6311 * parse.h (struct _jdep): Change flag0 to unsigned int.
6312
cfb6b4b8
RM
63132004-06-17 Ranjit Mathew <rmathew@hotmail.com>
6314
6315 Fixes PR java/13948
6316 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
6317 before trying to lay out its methods.
6318 * jcf-parse.c (read_class): Track parsed files using canonical paths
6319 obtained via lrealpath from libiberty.
6320 (java_parse_file): Likewise.
6321 (parse_source_file_1): Rename formal parameter to reflect its
6322 modified purpose. Minor formatting fix.
6323
096f22f4
PB
63242004-06-15 Paolo Bonzini <bonzini@gnu.org>
6325
6326 * class.c (emit_register_classes): Make the function uninlinable,
6327 do not set current_function_cannot_inline.
6328 * resource.c (write_resource_constructor): Do not reset
6329 flag_inline_functions around rest_of_compilation.
9f63daea 6330
c1b69e3c
AP
63312004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
6332
6333 PR java/15769
6334 * expr.c (java_truthvalue_conversion): Handle
6335 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
6336 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
6337 i.e. return the expression.
6338
a757585a
MA
63392004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
6340
6341 * gjavah.c: Include version.h
6342
1aae9cdc
BM
63432004-05-31 Bryce McKinlay <mckinlay@redhat.com>
6344
6345 * jcf-write.c (generate_bytecode_conditional): Correct handling
6346 of unordered conditionals. Add comment.
6347
edf74484 63482004-05-29 Ranjit Mathew <rmathew@hotmail.com>
6615c446 6349 Per Bothner <per@bothner.com>
edf74484
RM
6350
6351 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
6352 local variable was initialised upon declaration.
6353 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
6354 variable was final and initialised upon declaration.
6355 * check-init.c (check_final_reassigned): Give error only if a blank
6356 final is not definitely unassigned or if an initialised final is
6357 reassigned.
6358 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
6359 assignment expressions. Remove case MODIFY_EXPR, label do_default.
6360 (check_init): Perform initialised-variable-removing-optimisation
6361 only on non-final local variables.
6362
138c4fd4
BM
63632004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6364
9f63daea
EC
6365 * jcf-write.c (generate_bytecode_conditional): Handle binops
6366 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
70c39ccb 6367 and LTGT_EXPR.
138c4fd4
BM
6368 (generate_bytecode_insns): Likewise.
6369
711e3187
BM
63702004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6371
6372 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
5f86874e 6373 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
711e3187 6374
ca60dce2
BM
63752004-05-28 Bryce McKinlay <mckinlay@redhat.com>
6376
6377 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
6378 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
6379
062583ea
BM
63802004-05-26 Bryce McKinlay <mckinlay@redhat.com>
6381
6382 * decl.c (struct binding_level): Add GTY marker. Compile
6383 binding_depth unconditionally.
6384 (current_binding_level, free_binding_level, global_binding_level):
6385 Likewise.
6386 (clear_binding_level): Unconditionally set binding_depth.
6387 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
6388
b9d861bc
BM
63892004-05-26 Bryce McKinlay <mckinlay@redhat.com>
6390
6391 * lex.c (java_new_lexer): Set 'encoding'.
6392 (java_read_char): Improve error message for unrecognized characters.
6393 * lex.h (struct java_lexer): New field 'encoding'.
6394
4f4e53dd
PB
63952004-05-23 Paolo Bonzini <bonzini@gnu.org>
6396
6397 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
6398
f1865cde
MW
63992004-05-21 Mark Wielaard <mark@klomp.org>
6400
6401 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
6402 extern.
6403
20cb64fd
PB
64042004-05-19 Paolo Bonzini <bonzini@gnu.org>
6405
6406 * typeck.c: Remove non-printable character 160.
6407
66ba7273
RM
64082004-05-17 Ranjit Mathew <rmathew@hotmail.com>
6409
6410 * check-init.c: Correct minor typos.
6411
eadf906f
DN
64122004-05-13 Diego Novillo <dnovillo@redhat.com>
6413
6414 * Make-lang.in, expr.c, java-gimplify.c: Rename
6415 tree-simple.[ch] to tree-gimple.[ch].
6416
c9ecc336
RM
64172004-05-14 Ranjit Mathew <rmathew@hotmail.com>
6418
6419 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
6420
6de9cd9a
DN
64212004-05-13 Diego Novillo <dnovillo@redhat.com>
6422
6423 Merge from tree-ssa-20020619-branch. See
6424 ChangeLog.tree-ssa for details.
6425
6426 * Make-lang.in, builtins.c, check-init.c, class.c,
6427 constants.c, decl.c, except.c, expr.c, java-except.h,
6428 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
6429 lang.c, lang.opt, parse.y, resource.c: Merged.
6430 * java-gimplify.c: New file.
6431
af434fa7
AH
64322004-05-10 Andrew Haley <aph@redhat.com>
6433
6434 * parse.y (create_class): Set TYPE_VFIELD.
6435 * decl.c (java_init_decl_processing): Likewise.
6436
6437 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
6438 * class.c (make_method_value): Replace DECL_VINDEX with call to
6439 get_method_index().
6440 (get_dispatch_vector): Likewise.
6441 (layout_class_method): Likewise.
6442 Replace set of DECL_VINDEX with call to set_method_index().
6443 (set_method_index): New function.
6444 (get_method_index): New function.
6445 * java-tree.h (set_method_index): New function decl.
6446 (get_method_index): New function decl.
6447
7cef5027
AP
64482004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
6449
6450 * parse.y (check_pkg_class_access): Add new argument
6451 and use it when cl is NULL to call lookup_cl on it.
6452 (parser_check_super_interface): Do not call lookup_cl.
6453 Pass this_decl to check_pkg_class_access and NULL
6454 instead of lookup_cl.
6455 (parser_check_super): Update for change in
6456 check_pkg_class_access.
6457 (do_resolve_class): Likewise.
6458 (process_imports): Likewise.
6459 (find_in_imports_on_demand): Likewise.
6460 (resolve_qualified_expression_name): Likewise.
6461
8ae6595c
RM
64622004-05-06 Ranjit Mathew <rmathew@hotmail.com>
6463
6464 Fixes PR java/9685, PR java/15073
6465 * parse.y (accessibility_string): New method.
6466 (not_accessible_field_error): Use accessibility_string()
6467 instead of java_accstring_lookup().
6468 (resolve_qualified_expression_name): Check with
6469 check_pkg_class_access() before allowing access using
6470 qualified names.
6471 Fix comment typo.
6472 Use check_pkg_class_access() instead of not_accessible_p()
6473 for unqualified types.
9f63daea 6474 (not_accessible_p): Use DECL_CONTEXT (member) instead of
8ae6595c
RM
6475 REFERENCE for package-private access checking.
6476 (patch_method_invocation): Use accessibility_string() instead
6477 of java_accstring_lookup().
6478
3fb577a5
RM
64792004-04-30 Ranjit Mathew <rmathew@hotmail.com>
6480
6481 Fixes PR java/15133
6482 * gjavah.c (struct method_name): Add member is_native.
6483 (overloaded_jni_method_exists_p): Match candidate method only if
6484 it is native.
6485 (print_method_info): Initialise is_native flag from the method's
6486 access flags.
6487
2d99c042
RS
64882004-04-30 Roger Sayle <roger@eyesopen.com>
6489
6490 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6491 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6492
a95cd5a0
RS
64932004-04-22 Roger Sayle <roger@eyesopen.com>
6494
6495 * resource.c (write_resource_constructor): Guard call to possibly
6496 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6497
f5310108
BM
64982004-04-19 Bryce McKinlay <mckinlay@redhat.com>
6499
6500 * class.c (make_class_data): Add new field aux_info.
9f63daea 6501 * decl.c (java_init_decl_processing): Push type and decl for
f5310108
BM
6502 `aux_info'.
6503
245c3c04
BM
65042004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6505
9f63daea 6506 * expr.c (expand_java_NEW): Don't use size argument for
245c3c04
BM
6507 _Jv_AllocObject calls.
6508 * parse.y (patch_invoke): Likewise.
6509
aeb95628
BM
65102004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6511
6512 * expr.c (build_invokeinterface): Remove unused variables to
6513 fix warnings.
6514
d7afe286
BM
65152004-04-12 Bryce McKinlay <mckinlay@redhat.com>
6516
9f63daea 6517 * class.c (get_interface_method_index): New function. Return dispatch
d7afe286
BM
6518 index for interface method.
6519 (make_method_value): For interface methods, set index field to
6520 iface dispatch index, not DECL_VINDEX.
6521 * expr.c (build_invokeinterface): Use get_interface_method_index.
6522
8df83eae
RK
65232004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6524
6525 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6526
31023ac5
AH
65272004-03-31 Andrew Haley <aph@redhat.com>
6528
6529 PR java/14104
6530 * jcf-io.c (opendir_in_zip): Tidy up error handling.
6531
1431042e
ZW
65322004-03-30 Zack Weinberg <zack@codesourcery.com>
6533
6534 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6535 form of GTY markers.
6536
f6e9619a
MM
65372004-03-25 Marcus Meissner <meissner@suse.de>
6538
6539 PR java/14689:
6540 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6541
986dc4e5
TT
65422004-03-23 Tom Tromey <tromey@redhat.com>
6543
6544 PR java/14315:
6545 * jcf-write.c (make_class_file_name): Don't report if mkdir
6546 failed with EEXIST.
6547
37214c41
TT
65482004-03-23 Tom Tromey <tromey@redhat.com>
6549
6550 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6551
c048d56d
KH
65522004-03-20 Kazu Hirata <kazu@cs.umass.edu>
6553
6554 * class.c, gjavah.c, lang.c: Fix comment typos.
6555 * gcj.texi: Fix typos.
6556
24d82bce
PB
65572004-03-19 Per Bothner <per@bothner.com>
6558
678fccd5
PB
6559 * gcj.texi (Code Generation): Document new flags and assert defaults.
6560
24d82bce
PB
6561 * class.c (assume_compiled_node_struct): Rename type to
6562 class_flag_node_struct, as it is now also used for enable_assertions.
6563 Rename assume_compiled_node typedef. Rename excludep field to value.
6564 (find_assume_compiled_node): Rename function to find_class_flag_node.
6565 Minor optimization - avoid needless strlen.
6566 (add_assume_compiled): Some tweaking and optimization.
6567 Rename and generalize to add_class_flag takem an extra parameter.
6568 (add_assume_compled): New just calls add_class_flag.
6569 (add_enable_assert, enable_assertions): New functions.
6570 (enable_assert_tree): New static.
6571 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6572 * lang.opt (fenable-assertions, fenable-assertions=,
6573 fdisable-assertions, fdisable-assertions=): New options.
6574 * lang.c (java_handle_option): Handle new options.
6575 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
6576 class in an interface - create helper class nested in outer interface.
1431042e 6577 (build_assertion): Short-circuit if enable_assertions is false.
24d82bce 6578
eb34af89
RK
65792004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6580
6581 * java-tree.h: Changes throughout to add checking to macros
6582 and numerous whitespace changes.
6583 (VAR_OR_FIELD_CHECK): New macro.
6584 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6585 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6586
e4b27b12
PB
65872004-03-16 Per Bothner <per@bothner.com>
6588
c4cef86b
PB
6589 * jcf-jump.c (options): New --print-constants option.
6590 * gcj.texi (Invoking jcf-dump): Document --print-constants.
6591
e4b27b12
PB
6592 * jcf-dump.c (flag_print_constant_pool): Default to off.
6593 (print_constant_terse_with_index): New helper function.
6594 (various places): Check flag_print_constant_pool where missing.
6595 (main): If verbose set flag_print_constant_pool.
6596 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
6597
bfb7b172
AH
65982004-03-15 Andrew Haley <aph@redhat.com>
6599
6600 PR java/14581
6601 * parse.y (java_complete_lhs): Check that final variable has an
6602 initializer.
6603
0bb1600a
AH
66042004-03-12 Andrew Haley <aph@redhat.com>
6605
6606 PR java/14551
6607 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6608 conversion.
6609
083474cc
RS
66102004-02-29 Roger Sayle <roger@eyesopen.com>
6611
6612 * jcf-parse.c (java_parse_file): Handle the case that input_filename
6613 is NULL.
6614
202167e7
PB
66152004-02-27 Per Bothner <per@bothner.com>
6616
6617 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
6618 suggestion: Use build_incomplete_class_ref.
6bd5c787 6619 This fixes PR java/13508, java/11714.
202167e7 6620
88462c42
KH
66212004-02-27 Kazu Hirata <kazu@cs.umass.edu>
6622
6623 * java/parse.h: Update copyright.
6624
bddefd4f
AH
66252004-02-26 Andrew Haley <aph@redhat.com>
6626
6627 PR java/14231:
6628 * parse.y (check_interface_throws_clauses): Check for
6629 !METHOD_INVISIBLE (iface_method).
6630 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6631 well as CLASS_ABSTRACT.
1431042e 6632
9980cc4b
PB
66332004-02-25 Per Bothner <per@bothner.com>
6634
6635 * parse.y (build_assertion): If we're in an inner class, create the
6636 class$ helper routine in the outer class.
6637
4221057e
RH
66382004-02-19 Richard Henderson <rth@redhat.com>
6639
6640 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6641
fd1146d4
GK
66422004-02-16 Geoffrey Keating <geoffk@apple.com>
6643
6644 * Make-lang.in (java.install-man): Add extra dependencies.
6645
c7dad005
GK
66462004-02-13 Geoffrey Keating <geoffk@apple.com>
6647
6648 * Make-lang.in: Install man pages under the same names
6649 (possibly transformed) as the program they document.
6650
0237b2dc
JM
66512004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
6652
6653 * gjavah.c: Include "intl.h".
6654 (error): New function.
6655 (main): Call gcc_init_libintl.
6656 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6657 print_stub_or_jni, process_file, main): Use error rather than
6658 fprintf.
6659 (print_method_info, usage, help, version, main): Mark strings for
6660 translation with _. Avoid splitting up sentences. Send
6661 information messages to stdout.
6662 * jcf-dump.c: Include "intl.h".
6663 (main): Call gcc_init_libintl.
6664 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6665 Mark error, usage and version messages for translation with _.
6666 Avoid splitting up sentences.
6667 * jv-scan.c: Include "intl.h".
6668 (fatal_error, warning): Change parameter s to msgid. Translate
6669 messages.
6670 (main): Call gcc_init_libintl.
6671 (usage, help, version): Mark error, usage and version messages for
6672 translation with _. Avoid splitting up sentences.
6673 * jvgenmain.c: Include "intl.h".
6674 (main): Call gcc_init_libintl.
6675 (usage, main): Mark error messages for translation with _.
6676 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6677 JVGENMAIN_OBJS): Add intl.o.
6678 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6679 java/jvgenmain.o): Update dependencies.
6680
e333a618
PB
66812004-02-08 Per Bothner <per@bothner.com>
6682
6683 * parse.y (resolve_qualified_expression_name): In case of inaccessible
6684 class don't use not_accessible_field_error, which can get confused.
6685
02ba6b22
KC
66862004-02-05 Kelley Cook <kcook@gcc.gnu.org>
6687
6688 Make-lang.in (po-generated): Delete.
6689
136e64db
KH
66902004-02-05 Kazu Hirata <kazu@cs.umass.edu>
6691
6692 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6693 Depend on target.h.
6694 * decl.c: Include target.h.
6695 (start_java_method): Replace PROMOTE_PROTOTYPES with
6696 targetm.calls.promote_prototypes.
6697 * expr.c: Include target.h.
6698 (pop_arguments): Replace PROMOTE_PROTOTYPES with
6699 targetm.calls.promote_prototypes.
6700 * parse.y: Include target.h.
6701 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6702 with targetm.calls.promote_prototypes.
6703
e146f815
KH
67042004-02-04 Kazu Hirata <kazu@cs.umass.edu>
6705
6706 * typeck.c: Update copyright.
6707
4e0e4a49
TT
67082004-02-02 Tom Tromey <tromey@redhat.com>
6709
6710 * decl.c (java_init_decl_processing): Remove duplicate
6711 gnu/gcj/RawData.
6712
71cbe2c1
KC
67132004-01-30 Kelley Cook <kcook@gcc.gnu.org>
6714
1431042e 6715 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
71cbe2c1 6716
ae8f0c17
AP
67172004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
6718
6719 * expr.c (build_field_ref): Move variable
6720 definition up.
6721
6d23f07f
AH
67222004-01-28 Andrew Haley <aph@redhat.com>
6723
6724 * expr.c (build_field_ref): Widen field offset.
6725
ea095e9a
AH
67262004-01-27 Andrew Haley <aph@redhat.com>
6727
6728 java/13273
6729 * parse.y (check_interface_throws_clauses): Make sure class_decl
6730 has been loaded.
6731
5238574f
JS
67322004-01-22 Jeff Sturm <jsturm@one-point.com>
6733
6734 PR java/13733
6735 * parse.y (patch_assignment): Don't modify lhs_type for
6736 reference assignments.
6737
a541f69d
KC
67382004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6739
6740 * Make-lang.in: Replace $(docdir) with doc.
6741 (java.info, java.srcinfo, java.man, java.srcman): New rules.
6742 (java.install-man): Revamp rule.
1431042e 6743
e165d61b
KC
67442004-01-20 Kelley Cook <kcook@gcc.gnu.org>
6745
1431042e
ZW
6746 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6747 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
e165d61b
KC
6748 instead of deferred backquote.
6749
cf5da2b9
AP
67502004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
6751
6752 * typeck.c (find_method_in_interfaces): Move variable
6753 definition up.
6754
e081a9c4
AH
67552004-01-16 Andrew Haley <aph@redhat.com>
6756
6757 PR java/13273:
6758 * typeck.c (shallow_find_method): New.
6759 (find_method_in_superclasses): New.
6760 (find_method_in_interfaces): New.
6761 (lookup_do): Rewrite.
6762 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6763
6764 * jcf-parse.c (read_class): Save and restore output_class.
6765 * decl.c (java_expand_body): Set output_class from fndecl.
6766
71e68384
MC
67672004-01-15 Michael Chastain <mec.gnu@mindspring.com>
6768
6769 * class.c (gen_indirect_dispatch_tables): Fix string length
6770 calculations.
6771
03787dfd
KC
67722004-01-15 Kelley Cook <kcook@gcc.gnu.org>
6773
6774 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6775 (java.srcextra): Copy above back to source directory if requested.
6776 (po-generated): Delete reference to $(parsedir).
6777 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6778 Use implicit rule.
6779
4b589eab
JH
67802004-01-14 Jan Hubicka <jh@suse.cz>
6781
6782 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6783 estimation.
6784
0fab64a3
MM
67852004-01-09 Mark Mitchell <mark@codesourcery.com>
6786
6787 * java-tree.h (java_expand_expr): Change prototype.
6788 * expr.c (java_expand_expr): Add alt_rtl parameter.
6789
85194ee9
AH
67902004-01-09 Andrew Haley <aph@redhat.com>
6791
6792 PR java/12755:
6793 * parse.y (java_fix_constructors): Set output_class.
6794 (java_reorder_fields): Likewise.
6795 (java_layout_classes): Likewise.
6796 (java_expand_classes): Generate indirect dispatch tables.
6797 (java_expand_classes): Set output_class.
6798 (java_finish_classes): Likewise.
6799 * lang.c (java_init): Turn on always_initialize_class_p if we're
6800 using indirect dis[atch.
6801 (java_decl_ok_for_sibcall): Use output_class, not current_class.
6802 (java_get_callee_fndecl): Use class local atable.
1431042e 6803 * jcf-parse.c
85194ee9
AH
6804 (always_initialize_class_p): Decl moved to java-tree.h.
6805 (HANDLE_CLASS_INFO): Set output_class.
6806 (read_class): Likewise.
6807 (parse_class_file): Call gen_indirect_dispatch_tables.
6808 (parse_zip_file_entries): Set output_class.
6809 (java_parse_file): Set output_class. Don't emit symbol tables.
6810 * java-tree.h (output_class): New.
6811 Remove global declarations for otable, atable, and ctable.
6812 (always_initialize_class_p): moved here from decl.c.
6813 (DECL_OWNER): New.
6814 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6815 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6816 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6817 (struct lang_type): Add otable_methods, otable_decl,
6818 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6819 ctable_decl, catch_classes, type_to_runtime_map.
6820 * expr.c (build_field_ref): Make otable, atable, and ctable class
6821 local rather than global.
6822 (build_known_method_ref): Likewise.
6823 (build_invokeinterface): Likewise.
6824 (java_expand_expr): Pass runtime type (rather than actual type) to
6825 expand_start_catch.
6826 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6827 this class. Look up each class in that map to delete duplicates.
6828 (expand_end_java_handler): Pass runtime type (rather than actual
6829 type) to expand_start_catch.
6830 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6831 (do_nothing): New.
6832 (java_init_decl_processing): Rearrange things. Remove global
6833 declarations of otable, atable, and ctable.
6834 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6835 (java_expand_body): Set output_class.
6836 * constants.c (build_constant_data_ref): Use output_class, not
6837 current_class.
6838 (alloc_name_constant): Likewise.
6839 * class.c (gen_indirect_dispatch_tables): New.
6840 (build_class_ref): Generate hard reference to superclass, even if
6841 using indirect dispatch.
6842 (build_static_field_ref): Use class local atable.
6843 (make_class_data): Generate hard reference to superclass, even if
6844 using indirect dispatch.
6845 Generate symbolic references to interfaces when using indirect
6846 dispatch.
6847 (make_class_data): Emit otable, atable, and ctable.
6848 Make otable, atable, and ctable class local rather than global.
6849 (emit_catch_table): Make otable, atable, and ctable class local
6850 rather than global.
1431042e 6851
df9fe6e5
AP
68522003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
6853
19a4e5b7
AP
6854 * parse.y (catch_clause_parameter): Fix typo.
6855
df9fe6e5 6856 PR java/13404
1431042e 6857 * parse.y: (catch_clause_parameter): Return early if $3, aka
df9fe6e5
AP
6858 formal_parameter, is null.
6859
3a976c72
KH
68602003-12-20 Kazu Hirata <kazu@cs.umass.edu>
6861
6862 * class.c: Remove uses of "register" specifier in
6863 declarations of arguments and local variables.
6864 * decl.c: Likewise.
6865 * expr.c: Likewise.
6866 * gjavah.c: Likewise.
6867 * jcf-dump.c: Likewise.
6868 * jcf-io.c: Likewise.
6869 * jcf-parse.c: Likewise.
6870 * jcf-write.c: Likewise.
6871 * keyword.h: Likewise.
6872 * parse.y: Likewise.
6873 * typeck.c: Likewise.
6874 * verify.c: Likewise.
6875
439020ec
KC
68762003-12-06 Kelley Cook <kcook@gcc.gnu.org>
6877
6878 * Make-lang.in (GCJ_CROSS_NAME): Delete.
6879 (java.install_common, java.install-man): Adjust for above.
6880 (java.uninstall): Likewise.
6881
02972627
MK
68822003-12-03 Michael Koch <konqueror@gmx.de>
6883
6884 * class.c (make_class_data):
6885 Push field value to 'hack_signers' instead of 'signers'.
6886 * decl.c (java_init_decl_processing):
6887 Push field 'hack_signers' instead of 'signers'.
6888
eb158727
ZW
68892003-12-03 Zack Weinberg <zack@codesourcery.com>
6890
6891 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
6892 including iconv.h.
6893
c6a25d3a
RL
68942003-12-03 Ralph Loader <rcl@ihug.co.nz>
6895
6896 PR java/12374:
6897 * parse.y (qualify_ambiguous_name): Remove lots of broken
6898 field access processing - there's no need to do that here,
6899 because we have resolve_field_access. Remove
6900 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
6901 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
6902 used.
eb158727 6903
50abb28b
JS
69042003-12-01 Jeff Sturm <jsturm@one-point.com>
6905
6906 Fix PR java/13237
6907 * parse.y (java_complete_lhs): Save location prior to patching
6908 CALL_EXPR.
6909
8bc7a740
ME
69102003-11-25 Mohan Embar <gnustuff@thisiscool.com>
6911
50abb28b
JS
6912 PR java/12548
6913 * resource.c (write_resource_constructor): Append
6914 "_resource" to constructor identifier name.
8bc7a740 6915
75182467
JS
69162003-11-25 Jeff Sturm <jsturm@one-point.com>
6917
6918 Fix PR java/13183.
6919 * constants.c (cpool_for_class): New function.
6920 (outgoing_cpool): Remove global variable.
6921 (alloc_name_constant): Use cpool_for_class.
6922 (build_constants_constructor): Likewise.
6923 * decl.c (java_expand_body): Set current_class.
6924 * java-tree.h (outgoing_cpool) Remove declaration.
6925 (init_outgoing_cpool): Likewise.
6926 * jcf-parse.c (init_outgoing_cpool): Remove function.
6927 (parse_class_file): Don't call init_outgoing_cpool.
6928 * parse.y (java_complete_expand_methods): Don't call
6929 init_outgoing_cpool. Don't save outgoing_cpool.
6930 (java_expand_classes): Don't restore outgoing_cpool.
6931 (java_finish_classes): Likewise.
6932
33fe4596
ME
69332003-11-24 Mohan Embar <gnustuff@thisiscool.com>
6934
6935 * Make-lang.in: (java.install-common) Add
6936 symlink for $(target_noncanonical)-gcjh for
6937 native builds.
6938
a03ad584
JM
69392003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
6940
6941 * Make-lang.in (java.extraclean): Delete.
6942
49a41726
JM
69432003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
6944
6945 * Make-lang.in (check-java): Add.
6946
c2a141a0
JS
69472003-11-19 Jeff Sturm <jsturm@one-point.com>
6948
6949 Fix PR java/13024.
6950 * except.c (prepare_eh_table_type): Allocate variable-sized
6951 buffer `buf' with alloca.
6952
b8ca854a
JS
69532003-11-17 Jeff Sturm <jsturm@one-point.com>
6954
6955 Fix PR java/12857.
6956
6957 decl.c (java_init_decl_processing): Don't initialize
6958 class_not_found_type_node, no_class_def_found_type_node.
6959
6960 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
6961 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
6962 (class_not_found_type_node, no_class_def_found_type_node):
6963 Don't define.
6964
6965 parse.y (build_dot_class_method_invocation): Add this_class
6966 argument. Qualify method invocations to a different class.
6967 (create_new_parser_context): Initialize saved_data_ctx to 0.
6968 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
6969 (build_dot_class_method): Don't load classes. Register
6970 incomplete types.
6971 (build_incomplete_class_ref): Special cases for interfaces
6972 and inner classes. Move build_dot_class_method call to here...
6973 (patch_incomplete_class_ref): ...from here. Pass current_class
6974 to build_dot_class_method_invocation.
6975 (build_assertion): Pass class_type to
6976 build_dot_class_method_invocation.
6977 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
6978
a78e4fa7
JS
69792003-11-17 Jeff Sturm <jsturm@one-point.com>
6980
6981 Fix PR java/12739.
6982 * java-tree.h (BLOCK_EMPTY_P): Define.
6983 * parse.y (java_complete_lhs): Check for empty blocks
6984 in TRY_FINALLY_EXPR case.
6985
69862003-11-17 Andrew Haley <aph@redhat.com>
6bbb4ad3
AH
6987
6988 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
eb158727 6989 (struct lang_decl_var:freed): New variable.
6bbb4ad3
AH
6990 * decl.c (poplevel): Mark local vars that have gone out of scope.
6991 (push_jvm_slot): Don't use the RTL of a var that has gone out of
6992 scope.
6993
7d60db05
JM
69942003-11-16 Jason Merrill <jason@redhat.com>
6995
6996 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
6997 and TAGS files that include them for each front end.
6998
45c00e22
TT
69992003-11-15 Tom Tromey <tromey@redhat.com>
7000
7001 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
7002
1b2b8ee7
JM
70032003-11-12 Jason Merrill <jason@redhat.com>
7004
7005 PR optimization/12547
7006 * lang.c (java_tree_inlining_walk_subtrees): Just walk
7007 BLOCK_EXPR_BODY directly.
7008
7304c6cf
AH
70092003-11-12 Andrew Haley <aph@redhat.com>
7010
0adaa7e4
AH
7011 PR java/11045
7012 * parse.y (fold_constant_for_init): Check that we really do have a
7013 constant.
7014
7304c6cf
AH
7015 PR java/11533
7016 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
7017 init_test_decls being inlined.
7018
7019 PR java/12890:
7020 * parse.y (do_resolve_class): Check return value from
7021 breakdown_qualified().
7022
5b84be73
TT
70232003-11-11 Tom Tromey <tromey@redhat.com>
7024
7025 PR java/12915:
7026 * parse.y (merge_string_cste): Handle case where we have a
7027 pointer that happens to be zero, not null_pointer_node.
7028
87a9cbf9
TT
70292003-11-10 Tom Tromey <tromey@redhat.com>
7030
7031 * jcf-parse.c (classify_zip_file): Correctly compare
7032 filename_length against length of manifest file's name.
7033
b9bc3665
TT
70342003-11-08 Tom Tromey <tromey@redhat.com>
7035
7036 PR java/12894:
7037 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
7038
4b886873
AH
70392003-11-06 Andrew Haley <aph@redhat.com>
7040
7041 * expr.c (java_stack_swap): Make sure destination stack slots are
7042 of the correct type.
7043
63069342
KC
70442003-11-03 Kelley Cook <kcook@gcc.gnu.org>
7045
7046 * Make-lang.in (dvi): Move targets to $(docobjdir).
7047 (gcj.dvi): Simplify rule and adjust target.
7048 (gcj.info): Simplify rule.
7049 (gcj.pod): New intermediate rule.
7050 (gcjh.pod): Likewise.
7051 (jv-scan.pod): Likewise.
7052 (jcf-dump.pod): Likewise.
7053 (gij.pod): Likewise.
7054 (jv-convert.pod): Likewise.
7055 (rmic.pod): Likewise.
7056 (rmiregistry.pod): Likewise.
7057 (gcj.1): Delete.
7058 (gcjh.1): Delete.
7059 (jv-scan.1): Delete.
7060 (jcf-dump.1): Delete.
7061 (gij.1): Delete.
7062 (jv-convert.1): Delete.
7063 (rmic.1): Delete.
7064 (rmiregistry.1): Delete.
7065
9bcdf735
JS
70662003-11-02 Jeff Sturm <jsturm@one-point.com>
7067
7068 Fixes PR java/12866.
7069 * parse.y (resolve_qualified_expression_name): Move test
7070 for outer field access methods from here...
7071 (check_thrown_exceptions) ...to here.
7072
d6665c33
KC
70732003-11-01 Kelley Cook <kcook@gcc.gnu.org>
7074
7075 * .cvsignore: Delete.
7076
ab212c24
FCE
70772003-10-28 Frank Ch. Eigler <fche@redhat.com>
7078
7079 * verify.c (verify_jvm_instructions): Don't warn about legal
7080 eh binding regions generated for example by jdk 1.4.1.
7081
7b8af2b5
DM
70822003-10-24 David S. Miller <davem@redhat.com>
7083
7084 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
7085
90471585
AH
70862003-10-22 Andrew Haley <aph@redhat.com>
7087
7088 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
7089 (java_get_callee_fndecl): New.
7090
7091 * jcf-parse.c (java_parse_file): Call emit_catch_table().
7092
7093 * java-tree.h (ctable_decl): New.
7094 (catch_classes): New.
7095 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
7096
7097 * decl.c (java_init_decl_processing): Add catch_class_type.
7098 Add ctable_decl.
7099 Add catch_classes field.
7100
7101 * class.c (build_indirect_class_ref): Break out from
7102 build_class_ref.
7103 (make_field_value): Check flag_indirect_dispatch.
7104 (make_class_data): Ditto.
7105 Tidy uses of PUSH_FIELD_VALUE.
7106 Add field catch_classes.
7107 (make_catch_class_record): New.
7108
7109 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
7110
ed2f11fa
KH
71112003-10-22 Kazu Hirata <kazu@cs.umass.edu>
7112
7113 * jcf-write.c: Follow spelling conventions.
7114 * parse.y: Likewise.
7115
67264b4f
KH
71162003-10-22 Kazu Hirata <kazu@cs.umass.edu>
7117
7118 * ChangeLog: Fix typos.
7119 * expr.c: Fix comment typos.
7120 * jcf-write.c: Likewise.
7121 * lang.c: Likewise.
7122 * lex.c: Likewise.
7123 * mangle.c: Likewise.
7124 * parse-scan.y: Likewise.
7125 * parse.y: Likewise.
7126
36ae3d8e
TT
71272003-10-22 Tom Tromey <tromey@redhat.com>
7128
7129 * expr.c (expand_byte_code): Only warn about dead bytecode when
7130 extra_warnings is set.
7131
ed2506a4
BM
71322003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
7133
7134 Fix for PR java/12586.
7135 * mangle.c (find_compression_record_match): Don't iterate through
7136 package namespace elements unless they all match compression_table
7137 entries.
7138
036a75ac
KC
71392003-10-20 Kelley Cook <kcook@gcc.gnu.org>
7140
7141 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
7142 (generate-manpages): Likewise.
7143 (java.maintainer-clean): Likewise.
7144 (gcj.info): Likewise.
7145 (gcj.1): Likewise.
7146 (gcjh.1): Likewise.
7147 (jv-scan.1): Likewise.
7148 (jcf-dump.1): Likewise.
7149 (gij.1): Likewise.
7150 (jv-convert.1): Likewise.
7151 (rmic.1): Likewise.
7152 (rmiregistry.1): Likewise.
7153 (java.install-man): Likewise.
7154 (parse-scan.o): Move and define complete compile line.
7155 (parse.o): Likewise.
7156 (jcf-tree-inline.o): Move.
7157
97ae108d
MM
71582003-10-20 Mark Mitchell <mark@codesourcery.com>
7159
7160 * Make-lang.in (info): Update dependencies.
7161 (java.install-info): Remove.
7162 ($(srcdir)/java/gcj.info): Replace with ...
7163 ($(docobjdir)/gcj.info): ... this.
7164
43aba518
NN
71652003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
7166
7167 * Make-lang.in: Replace uses of $(target_alias) with
7168 $(target_noncanonical).
7169
ae125b17
TT
71702003-10-09 Tom Tromey <tromey@redhat.com>
7171
7172 * decl.c (java_init_decl_processing): Declare signers field.
7173 * class.c (make_class_data): Set signers field.
7174
1456deaf
JM
71752003-10-09 Jason Merrill <jason@redhat.com>
7176
7177 * parse.y (patch_assignment): Use make_node to create a BLOCK.
7178 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
7179 POINTER_TYPE.
7180
62b81e45
MM
71812003-10-06 Mark Mitchell <mark@codesourcery.com>
7182
7183 * Make-lang.in (java.info): Replace with ...
7184 (info): ... this.
7185 (java.dvi): Replace with ...
7186 (dvi): ... this.
7187 (java.generated-manpages): Replace with ...
7188
35222de2
KC
71892003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
7190
7191 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
7192
9dfc2ec2
AH
71932003-10-01 Andrew Haley <aph@redhat.com>
7194
7195 * jcf-parse.c (java_parse_file): Write otable and atable.
7196 * java-tree.h (atable_methods): New.
7197 (atable_decl): New.
7198 (atable_syms_decl): New.
7199 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
7200 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
eb158727 7201 (symbol_*type): Rename method_symbol* to symbol*type.
9dfc2ec2
AH
7202 (emit_offset_symbol_table): Delete.
7203 (emit_symbol_table): New.
7204 (get_symbol_table_index): New.
7205 (atable_type): New.
7206 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
7207 (build_known_method_ref): Likewise.
7208 (get_symbol_table_index): Rename from get_offset_table_index.
7209 Parameterize to allow re-use by differing types of symbol table.
7210 (build_invokevirtual): Pass table to get_offset_table_index.
7211 * decl.c (java_init_decl_processing): Push types and decls for
7212 atable and atable_syyms.
7213 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
7214 (make_class_data): Add new fields atable and atable_syms.
7215 (emit_symbol_table): Rename from emit_offset_symbol_table.
7216 Parameterize to allow re-use by different types of symbol table.
7217 (build_symbol_entry): Renamed from build_method_symbols_entry.
eb158727 7218
d186e676
RS
72192003-09-30 Roger Sayle <roger@eyesopen.com>
7220
7221 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
7222 semantics for SAVE_EXPR, by caching the result in a temporary.
7223
436fac17
RH
72242003-09-28 Richard Henderson <rth@redhat.com>
7225
7226 * check-init.c (check_init): Save and restore input_location
7227 instead of file and line separately.
7228 * decl.c (java_expand_body): Likewise.
7229 * jcf-write.c (generate_bytecode_insns): Likewise.
7230 * parse.y (safe_layout_class): Likewise.
7231 * jcf-parse.c (read_class, parse_class_file): Likewise.
7232 (java_parse_file): Use %H for warning locator.
7233
37e2180d
RS
72342003-09-28 Roger Sayle <roger@eyesopen.com>
7235
7236 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
7237 with void-type branches instead of using a COMPOUND_EXPR.
7238
9220b1ba
JS
72392003-09-28 Jeff Sturm <jsturm@one-point.com>
7240
7241 * decl.c (java_optimize_inline, dump_function): Remove.
7242 * java-tree.h (java_optimize_inline): Remove declaration.
7243 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
7244 * parse.y (source_end_java_method, java_expand_classes):
7245 Likewise. Remove dead code.
7246
c67e6e14
RS
72472003-09-27 Roger Sayle <roger@eyesopen.com>
7248
7249 * lang.c (java_init_options): Set flag_evaluation_order.
7250 * expr.c (force_evaluation_order): Don't attempt to force
7251 evaluation order of binary operations using save_expr.
7252 * parse.y (java_complete_lhs): No longer need to call
7253 force_evaluation_order when constructing binary operators.
7254
cd11bdcc
APB
72552003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
7256 Bryce McKinlay <bryce@mckinlay.net.nz>
7257
7258 PR java/1333:
7259 * parse.y (not_accessible_field_error): New function.
7260 (resolve_expression_name): Check field access permissions.
7261 (resolve_qualified_expression_name): Use
7262 not_accessible_field_error.
7263 (resolve_qualified_expression_name): Likewise.
7264
eb9ec0d4
RO
72652003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7266
7267 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
7268
87750fef
RS
72692003-09-23 Roger Sayle <roger@eyesopen.com>
7270
7271 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
7272 with equal operands without side-effects.
7273
92f6e625
JS
72742003-09-22 Jeff Sturm <jsturm@one-point.com>
7275
7276 * decl.c (java_init_decl_processing): Don't emit otable decls
7277 if flag_indirect_dispatch is not set.
7278
f31686a3
RH
72792003-09-21 Richard Henderson <rth@redhat.com>
7280
eb158727 7281 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
f31686a3
RH
7282 resource.c: Revert.
7283
7e2af53a
RH
72842003-09-21 Richard Henderson <rth@redhat.com>
7285
eb158727 7286 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7e2af53a
RH
7287 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
7288
ddd2d57e
RH
72892003-09-20 Richard Henderson <rth@redhat.com>
7290
eb158727 7291 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
ddd2d57e 7292
96123432
RS
72932003-09-18 Roger Sayle <roger@eyesopen.com>
7294
7295 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
7296 * check-init.c (check_init): Likewise.
7297
a490d1be
RS
72982003-09-18 Roger Sayle <roger@eyesopen.com>
7299
7300 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
7301
1319e88e
AH
73022003-09-16 Andrew Haley <aph@redhat.com>
7303
7304 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
7305
bdc225df
RM
73062003-09-17 Ranjit Mathew <rmathew@hotmail.com>
7307
7308 Fixes PR java/9577
7309 * mangle.c (find_compression_record_match): Skip
7310 over a "6JArray" (the array template mangled string)
7311 IDENTIFIER_NODE.
7312 (mangle_array_type): Correct minor typo.
7313 (atms): Move definition to the beginning.
7314
93634679
BM
73152003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
7316
eb158727 7317 * class.c (add_miranda_methods): Ensure super-interfaces are laid
93634679
BM
7318 out. Fix for PR java/12254.
7319
6b00c969
RH
73202003-09-11 Richard Henderson <rth@redhat.com>
7321
eb158727
ZW
7322 * parse.y (source_end_java_method): Update for new
7323 cgraph_finalize_function argument.
6b00c969 7324
39adabaf
RH
73252003-09-09 Richard Henderson <rth@redhat.com>
7326
eb158727
ZW
7327 * parse.y (source_end_java_method): Update call to
7328 cgraph_finalize_function.
39adabaf 7329
916b57ce
JS
73302003-09-03 Jeff Sturm <jsturm@one-point.com>
7331
7332 * decl.c (java_expand_body): New function.
7333 * expr.c (build_class_init): Set DECL_IGNORED_P.
7334 * java-tree.h (start_complete_expand_method,
7335 java_expand_body): Declare.
7336 * jcf-parse.c (cgraph.h): Include.
7337 (java_parse_file): Handle flag_unit_at_a_time.
7338 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
7339 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
7340 (java_estimate_num_insns): Use walk_tree_without_duplicates.
7341 (java_start_inlining): New function.
7342 * parse.h (java_finish_classes): Declare.
7343 * parse.y: Include cgraph.h.
7344 (block): Don't special-case empty block production.
7345 (craft_constructor): Set DECL_INLINE.
7346 (source_end_java_method): Handle flag_unit_at_a_time.
7347 Replace inline code with call to java_expand_body.
7348 (start_complete_expand_method): Remove static modifier.
7349 (java_expand_method_bodies): Patch function tree for
7350 class initialization and/or synchronization as needed.
7351 Don't begin RTL expansion yet.
7352 (java_expand_classes): Check flag_unit_at_a_time before
7353 calling finish_class.
7354 (java_finish_classes): New function.
7355 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
7356 (patch_assignment): Set DECL_CONTEXT on temporary variable.
7357 (emit_test_initialization): Set DECL_IGNORED_P.
7358
e71d3aae
RS
73592003-09-03 Roger Sayle <roger@eyesopen.com>
7360
7361 * builtins.c (enum builtin_type): Delete unused enumeration.
7362 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
7363
ff2865f2
TT
73642003-08-28 Tom Tromey <tromey@redhat.com>
7365
7366 * gcj.texi (Extensions): Document gcjlib URLs.
7367
b7d6f12a
TT
73682003-08-20 Tom Tromey <tromey@redhat.com>
7369
7370 * gcj.texi (Extensions): Added xref.
7371 (libgcj Runtime Properties): Document
7372 gnu.gcj.runtime.VMClassLoader.library_control.
7373
ec00bfc0
AH
73742003-08-20 Andrew Haley <aph@redhat.com>
7375
eb158727
ZW
7376 * except.c (prepare_eh_table_type): Use new encoding for exception
7377 handlers when using -fno-assume-compiled.
ec00bfc0 7378
7f8b4704
TT
73792003-08-13 Tom Tromey <tromey@redhat.com>
7380
7381 * gcj.texi (Invoking gij): Document -X and -?.
7382
d0cf60cc
ME
73832003-08-13 Mohan Embar <gnustuff@thisiscool.com>
7384
7385 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
7386 GCJH_OBJS, JCFDUMP_OBJS
7387 * win32-host.c: Removed the unnecessary and broken dependency
7388 on jcf.h
7389
aecf4109
TT
73902003-08-11 Tom Tromey <tromey@redhat.com>
7391
7392 * parse.y (java_check_regular_methods): Typo fixes. Call
7393 check_interface_throws_clauses. Use
7394 check_concrete_throws_clauses.
7395 (check_interface_throws_clauses): New function.
7396 (check_concrete_throws_clauses): New function.
7397 (hack_is_accessible_p): New function.
7398 (find_most_specific_methods_list): Added FIXME.
7399 * typeck.c (lookup_do): Use `flags' argument to decide what to
7400 do. Reimplemented.
7401 (lookup_argument_method_generic): New function.
7402 (lookup_argument_method2): Removed.
7403 * jcf.h (ACC_INVISIBLE): New define.
7404 * jcf-write.c (generate_classfile): Skip invisible methods.
7405 * class.c (add_miranda_methods): New function.
7406 (layout_class_methods): Use it.
7407 (get_access_flags_from_decl): Use ACC_INVISIBLE.
7408 * java-tree.h (METHOD_INVISIBLE): New define.
7409 (lang_decl_func) [invisible]: New field.
7410 (lookup_argument_method_generic): Declare.
7411 (SEARCH_INTERFACE): New define.
7412 (SEARCH_SUPER): Likewise.
7413 (SEARCH_ONLY_INTERFACE): Likewise.
7414 (SEARCH_VISIBLE): Likewise.
7415 (lookup_argument_method2): Removed declaration.
7416
90281aec
TT
74172003-08-05 Tom Tromey <tromey@redhat.com>
7418
7419 Fix for PR java/11600:
7420 * parse.y (java_complete_lhs): See whether we're calling a method
7421 on an array.
7422 (check_thrown_exceptions): Added `is_array_call' argument;
7423 fixed `clone' checking; updated all callers.
7424
b3c3af2f
SB
74252003-08-05 Steven Bosscher <steven@gcc.gnu.org>
7426
7427 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
7428
0e046453
TT
74292003-08-03 Tom Tromey <tromey@redhat.com>
7430
7431 * java-tree.h (METHOD_TRANSIENT): Removed.
7432 * decl.c (pushdecl): Removed some dead code.
7433 * class.c (get_access_flags_from_decl): Can't have transient
7434 method.
7435 (add_method_1): Can't have a transient method.
7436
8376cf3d
AJ
74372003-07-28 Andreas Jaeger <aj@suse.de>
7438
7439 * jvspec.c: Convert to ISO C90 prototypes.
7440
b8bae365
NS
74412003-07-25 Nathan Sidwell <nathan@codesourcery.com>
7442
7443 * decl.c (force_poplevels): Fix warning call.
7444
cd475805
GDR
74452003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7446
7447 * expr.c (expand_java_field_op): Don't use xxx_with_decl
7448 (expand_java_field_op): Likewise.
7449 * class.c (layout_class_method): Likewise
7450 (emit_register_classes): Likewise.
7451 * decl.c (pushdecl): Likewise.
7452 (poplevel): Likewise.
7453 (force_poplevels): Likewise.
7454 (give_name_to_locals): Likewise.
7455 * check-init.c (check_for_initialization): Likewise.
7456
de7df9eb
JM
74572003-07-24 Jason Merrill <jason@redhat.com>
7458
7459 * java-tree.h: Move boolean_type_node et al to the back end.
7460
c68b0a84
KG
74612003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7462
7463 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7464 casts.
7465
2cc98056
NB
74662003-07-19 Neil Booth <neil@daikokuya.co.uk>
7467
7468 * lang.opt: Don't show -MD_ and -MDD_.
7469
b2e608ca
NB
74702003-07-18 Neil Booth <neil@daikokuya.co.uk>
7471
7472 * lang-options.h: Remove.
7473 * lang.opt: Add help text.
7474
683b1112
KH
74752003-07-15 Kazu Hirata <kazu@cs.umass.edu>
7476
7477 * expr.c: Remove the last argument to expand_assignment().
7478
602a82f3 74792003-07-09 Jan Hubicka <jh@suse.cz>
084c1779
JH
7480
7481 * java-tree.h (DECL_NUM_STMTS): Rename to...
7482 (DECL_ESTIMATED_INSNS): ... this.
7483 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7484 New static functions.
7485 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7486 * parser.y (add_stmt_to_compound): Do not account statements.
7487
671d6ee7
MW
74882003-07-08 Mark Wielaard <mark@klomp.org>
7489
7490 * gcj.texi: CNI now expands to Compiled Native Interface.
7491
c5ffd36c
RO
74922003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7493
7494 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7495
0cea056b
NS
74962003-07-07 Nathan Sidwell <nathan@codesourcery.com>
7497
7498 * expr.c (expand_byte_code): Adjist emit_line_note call.
7499
cb66e385
NB
75002003-07-06 Neil Booth <neil@daikokuya.co.uk>
7501
7502 * lang.c (java_handle_option): Don't handle filenames.
7503
3dce1408
ZW
75042003-07-02 Zack Weinberg <zack@codesourcery.com>
7505
7506 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7507 DIR_SEPARATOR.
7508 Use FILENAME_CMP.
7509 * jcf-write.c: Don't default-define DIR_SEPARATOR.
7510 * jcf.h: Delete COMPARE_FILENAMES definition.
7511
b86f6cd9
NB
75122003-07-02 Neil Booth <neil@daikokuya.co.uk>
7513
7514 * lang.c (java_init_options): Update prototype.
7515
5b030314
NS
75162003-07-01 Nathan Sidwell <nathan@codesourcery.com>
7517
7518 * decl.c (poplevel): Adjust define_label call.
7519
8ce33230
ZW
75202003-06-27 Zack Weinberg <zack@codesourcery.com>
7521
a6d682a0
ZW
7522 * gjavah.c (flag_jni): Make non-static.
7523 * parse-scan.y (ctxp): Make non-static.
7524
8ce33230
ZW
7525 * class.c (build_method_symbols_entry)
7526 * expr.c (get_offset_table_index)
7527 * jcf-parse.c (jcf_parse):
7528 Mark the definition static, matching the forward declaration.
7529
9eee5e72
NB
75302003-06-26 Neil Booth <neil@daikokuya.co.uk>
7531
7532 * lang.c (java_handle_option): Don't check for missing arguments.
7533
1f9cc6db
NS
75342003-06-20 Nathan Sidwell <nathan@codesourcery.com>
7535
7536 * class.c (push_class): Use a location_t to save place.
7537 (emit_register_classes): Set input_location. Adjust
7538 expand_function_end call.
7539 * resource.c (write_resource_constructor): Likewise.
7540 * decl.c (end_java_method): Adjust expand_function_end call.
7541 * parse.y (source_end_java_method): Likewise.
7542
f3f735eb
RA
75432003-06-17 Robert Abeles <rabeles@archaelogic.com>
7544
7545 * lang.c (java_handle_option): Likewise.
7546
7b086b11
NB
75472003-06-16 Neil Booth <neil@daikokuya.co.uk>
7548
7549 * lang.c (java_handle_option): Special-casing of optional
7550 joined arguments no longer needed.
7551 * lang.opt: Update switches that take optional argument.
7552
be43ab4e
NB
75532003-06-15 Neil Booth <neil@daikokuya.co.uk>
7554
7555 * lang.opt: Declare Java.
7556 * lang.c (java_init_options): Update.
7557
d185d268
NB
75582003-06-15 Neil Booth <neil@daikokuya.co.uk>
7559
7560 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7561
cef67dce
NB
75622003-06-14 Neil Booth <neil@daikokuya.co.uk>
7563
7564 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7565 * lang.c (java_handle_option): -MD and -MMD have an underscore.
7566 * lang.opt: -MD and -MMD have an underscore.
7567
ee6b0296
NS
75682003-06-14 Nathan Sidwell <nathan@codesourcery.com>
7569
7570 * class.c (emit_register_classes): Adjust init_function_start
7571 call.
7572 * decl.c (complete_start_java_method): Likewise.
7573 * resource.c (write_resource_constructor): Likewise.
7574
d7b42618
NB
75752003-06-14 Neil Booth <neil@daikokuya.co.uk>
7576
7577 * Make-lang.in: Update to use options.c and options.h.
7578 * lang.c: Include options.h not j-options.h.
7579 (java_handle_option): Abort on unrecognized option.
7580 (java_init_options): Request Java switches.
7581
7fb26bb0
NB
75822003-06-11 Neil Booth <neil@daikokuya.co.uk>
7583
7584 * Make-lang.in: Handle mostlyclean.
7585
265411b6
TT
75862003-06-11 Tom Tromey <tromey@redhat.com>
7587
4a09cbac
TT
7588 * lang.c (java_handle_option): Update dependency_tracking for
7589 OPT_MF case.
7590
265411b6
TT
7591 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7592 empty argument.
7593
dc952677
AH
75942003-06-10 Andrew Haley <aph@redhat.com>
7595
7596 * resource.c (write_resource_constructor): Use expand_expr to
7597 generate the address of the label attached to a resource.
7598 * Make-lang.in (java/resource.o): Add expr.h
7599
e076f71a
AH
76002003-06-10 Andrew Haley <aph@redhat.com>
7601
7602 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7603 (java_decl_ok_for_sibcall): New.
7604
95ca6d8b
NB
76052003-06-09 Neil Booth <neil@daikokuya.co.uk>
7606
7607 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7608 (java/j-options.c, java/j-options.h): New.
7609 * java-tree.h (resource_name, compile_resource_file,
7610 compile_resource_data): Constify.
7611 * jcf-write.c (jcf_write_base_directory): Similarly.
7612 * jcf.h (jcf_write_base_directory): Similarly.
7613 * lang.c: Include j-options.h.
7614 (cl_options_count, cl_options, string_option, java_decode_option,
7615 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7616 process_option_with_no): Remove.
7617 (resource_name): Constify.
7618 (LANG_HOOKS_HANDLE_OPTION): Override.
7619 (java_handle_option): New.
7620 (java_init): Don't call jcf_path_init.
7621 (java_init_options): Call jcf_path_init.
7622 * lang.opt: New.
7623 * resource.c (compile_resource_data, compile_resource_file): Constify.
7624
36f04556
NS
76252003-06-09 Nathan Sidwell <nathan@codesourcery.com>
7626
7627 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7628 (struct lang_decl_func): Add last_line field.
7629 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7630 DECL_SOURCE_LINE_LAST): Remove.
7631 * parse.y (missing_return_error, finish_method_declaration,
7632 lookup_cl, start_artificial_method_body, source_end_java_method,
7633 start_complete_expand_method): Adjust.
7634
f751e9c2
TT
76352003-06-08 Tom Tromey <tromey@redhat.com>
7636
7637 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7638 fno-assume-compiled.
7639
5f158b44
RS
76402003-06-08 Roger Sayle <roger@eyesopen.com>
7641
7642 * builtins.c (define_builtin_type, builtin_types): Delete.
7643 (define_builtin): Rewritten to take just the built-in code,
7644 the function's name, type and fallback library function name.
7645 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7646 (initialize_builtins): Overhaul to define the GCC builtins
7647 used by gcj manually, providing the Java run-time's
7648 implementations as the fallback library function.
7649
f32c53c2
AG
76502003-06-08 Anthony Green <green@redhat.com>
7651
7652 * parse.y (patch_cast): Fix conversions from floating-point to
7653 integral types.
7654
c8b04b13
NB
76552003-06-08 Neil Booth <neil@daikokuya.co.uk>
7656
7657 * Make-lang.in: Update.
7658 * lang.c: Include opts.h. Define cl_options_count and cl_options.
7659
2772ef3e
NB
76602003-06-07 Neil Booth <neil@daikokuya.co.uk>
7661
7662 * lang.c (java_init_options): Update.
7663
602a82f3 76642003-06-05 Jan Hubicka <jh@suse.cz>
8f231b5d
JH
7665
7666 * Make-lang.in: Add support for stageprofile and stagefeedback
7667
4fa26a60
RS
76682003-05-31 Roger Sayle <roger@eyesopen.com>
7669
7670 * lang.c (java_init_options): Prescribe wrap-around two's
7671 complement arithmetic overflow by setting flag_wrapv.
7672
833e1a77
RS
76732003-05-29 Roger Sayle <roger@eyesopen.com>
7674
7675 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7676 (builtin_record): Add an additional builtin_code field to
7677 record which GCC built-in corresponds to the Java function.
7678 (java_builtins): Add new entries for atan, atan2, exp, log,
7679 pow and tan.
7680 (max_builtin, min_builtin, abs_builtin): Perform constant
7681 folding on the resulting tree.
7682 (java_build_function_call_expr): Likewise, perform constant
7683 folding on the resulting tree.
7684 (initialize_builtins): The NULL creators are now allowed in
7685 the java_builtins table, which is now terminated by an entry
7686 with builtin_code == END_BUILTINS.
7687 (check_for_builtin): Likewise. If the matching creator is
7688 NULL, construct the call using java_build_function_call_expr
7689 directly with the decl for the corresponding builtin_code.
7690
24bcc721
NN
76912003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
7692
7693 * win32-host.c: Normalize copyright boilerplate.
7694
90ff44cf
KG
76952003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7696
7697 * parse.y (print_int_node): Use string concatentation on
7698 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7699 function calls into one.
7700
fa6ef813
ZW
77012003-05-13 Zack Weinberg <zack@codesourcery.com>
7702
7703 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7704 fatal_io_error with calls to fatal_error; add ": %m" to the end of
7705 all the affected error messages.
7706
3bec3c0c
RH
77072003-05-13 Richard Henderson <rth@redhat.com>
7708
7709 * class.c (layout_class_method): Set DECL_EXTERNAL.
7710 * decl.c (java_mark_decl_local, java_mark_class_local): New.
7711 * java-tree.h (java_mark_class_local): Declare.
7712 * jcf-parse.c (parse_class_file): Use it.
7713 * parse.y (java_expand_classes): Likewise.
7714
d4b56320
NS
77152003-05-04 Nathan Sidwell <nathan@codesourcery.com>
7716
7717 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7718 * lex.h: #include input.h.
7719 * jv-scan.c (input_filename): Remove.
7720
73cb3b5a
TT
77212003-05-02 Tom Tromey <tromey@redhat.com>
7722
7723 PR java/10491:
7724 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7725 (handle_inner_classes): New function.
7726
fcc8cecb
TT
77272003-05-01 Tom Tromey <tromey@redhat.com>
7728
7729 PR java/10459:
7730 * parse.y (finish_for_loop): Do nothing if update expression is a
7731 EXPR_WFL_NODE wrapping nothing.
7732 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7733
6060edcb
NS
77342003-05-02 Nathan Sidwell <nathan@codesourcery.com>
7735
7736 * lex.h (input_lineno): Remove declaration.
7737 * parse-scan.y: #include input.h.
7738 (input_filename): Remove declaration.
7739 (input_location): Add definition.
7740 (input_line): Remove definition.
7741
3489e061
NS
77422003-05-01 Nathan Sidwell <nathan@codesourcery.com>
7743
7744 * lex.h (lineno): Rename to ...
7745 (input_line): ... here
7746 * parse-scan.y (lineno): Rename to ...
7747 (input_line): ... here.
7748 (reset_report): Rename lineno to input_line.
7749 * check-init.c (check_init): Likewise.
7750 * class.c (push_class): Likewise.
7751 * decl.c (complete_start_java_method, end_java_method): Likewise.
7752 * expr.c (expand_byte_code): Likewise.
7753 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7754 * jcf-write.c (generate_bytecode_insns): Likewise.
7755 * lex.c (java_init_lex, java_allocate_new_line,
7756 do_java_lex): Likewise.
7757 * parse.h (YYNOT_TWICE): Likewise.
7758 * parse.y (empty_statement, expression_statement,
7759 java_pop_parser_context, java_parser_context_save_global,
7760 yyerror, register_fields, method_header, safe_layout_class,
7761 find_in_imports_on_demand, create_artificial_method,
7762 source_end_java_method, start_complete_expand_method,
7763 build_thisn_assign, java_complete_lhs,
7764 maybe_absorb_scoping_block): Likewise.
7765
ef963bc8
ME
77662003-04-20 Mohan Embar <gnustuff@thisiscool.com>
7767
7768 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7769 '/' when computing java source filename
7770
e6311b9e
TT
77712003-04-13 Tom Tromey <tromey@redhat.com>
7772
7773 * gjavah.c (print_c_decl): Indentation fix.
7774
dcf92453
ZW
77752003-04-12 Zack Weinberg <zack@codesourcery.com>
7776
7777 * class.c (make_field_value, make_method_value, get_dispatch_table)
7778 (make_class_data, emit_offset_symbol_table)
7779 * constants.c (build_constants_constructor)
7780 * java-tree.h (START_RECORD_CONSTRUCTOR)
7781 * parse.y (maybe_build_array_element_wfl):
7782 Use build_constructor.
7783
04a0be36
EB
77842003-04-10 Eric Blake <ebb9@email.byu.edu>
7785
7786 PR java/10253:
7787 * parse.y (string_convert_int_cst): Always use at least one digit
7788 in string conversion. Remove ASCII dependence.
7789 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7790
72f339d2
AH
77912003-03-16 Mohan Embar <gnustuff@thisiscool.com>
7792
7793 * Make-lang.in: added win32-host.c
7794 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7795 resolves to open() on non-Win32 platforms and
7796 Win32-specific jcf_open_exact_case() on Win32
7797 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7798 when trying .java and .class files
7799 * win32-host.c: added to repository. Defines
7800 Win32-specific jcf_open_exact_case()
7801
78022003-04-10 Andrew Haley <aph@redhat.com>
7803
7804 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7805 (maybe_free_localvar): Renamed from localvar_free.
7806 Add new arg, really.
7807 (generate_bytecode_insns): Set new variable, jsrs.
7808 Only free local vars if no jsr insns have been emittted.
7809 Call maybe_free_localvar, not localvar_free.
7810
438f63a8
JM
78112003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
7812
7813 * gcj.texi: Remove @ at start of file.
7814
dcb0eee2
TT
78152003-03-25 Tom Tromey <tromey@redhat.com>
7816
7817 * parse.y (create_interface): Call CHECK_DEPRECATED.
7818
62c9aa5f
ZW
78192003-03-23 Zack Weinberg <zack@codesourcery.com>
7820
7821 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7822
649eaf9b
ZW
78232003-03-21 Zack Weinberg <zack@codesourcery.com>
7824
7825 * javaop.h (jfloat, jdouble): Make them structures mirroring
7826 the bit fields of IEEE float and double respectively.
7827 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7828 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7829 (union Word, union DWord): Delete.
7830 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7831
7832 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7833 D_NAN_MASK): Delete.
7834 (jni_print_float, jni_print_double): New. Generate
7835 hexadecimal floating constants.
7836 (print_field_info): Use jni_print_float/double.
7837
7838 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
7839 finite floating point numbers for output; special case
7840 non-finite floats.
7841
2bd3ecad
NN
78422003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
7843
7844 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7845 Replace 0 and 1 with true and false in return statements.
7846
b25a23bd
TT
78472003-03-19 Tom Tromey <tromey@redhat.com>
7848
7849 * lex.c (do_java_lex): Renamed from java_lex.
7850 (java_lex): New function.
7851 Include timevar.h.
7852
2f29e5e8
TT
78532003-03-13 Tom Tromey <tromey@redhat.com>
7854
7855 * parse.y (resolve_inner_class): Error if qualifier is a primitive
7856 type.
7857
68566610
AH
78582003-03-04 Andrew Haley <aph@redhat.com>
7859
649eaf9b
ZW
7860 * gjavah.c (is_first_data_member): New global variable.
7861 (print_c_decl): If it's the first data member, align it as the
7862 superclass.
7863 (process_file): Set is_first_data_member.
68566610 7864
8b8e6c64
TT
78652003-03-11 Tom Tromey <tromey@redhat.com>
7866
7867 * parse.y (resolve_field_access): Initialize class if field is
7868 found in another static field.
7869 * expr.c (build_class_init): Don't optimize out initialization of
7870 implemented interface.
7871
3d874dea
AH
78722003-03-11 Andrew Haley <aph@redhat.com>
7873
7874 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
7875 warning.
7876
630287af
RM
78772003-03-10 Ranjit Mathew <rmathew@hotmail.com>
7878
7879 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
7880 and DIR_SEPARATOR_2 for a target.
7881 Correct minor typos.
7882
7883 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
7884 and DIR_SEPARATOR_2 for a target into account.
7885
4bfec483
NB
78862003-03-08 Neil Booth <neil@daikokuya.co.uk>
7887
7888 * lang.c (java_init): Update prototype, move code to java_post_options.
7889 (java_post_options): Similarly.
7890
530d4230
RM
78912003-03-05 Ranjit Mathew <rmathew@hotmail.com>
7892
7893 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
7894 compare file name components depending on the case-sensitivity
7895 or otherwise of the host file system.
7896
7897 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
7898 "strcmp" to compare file name components.
7899 Use IS_DIR_SEPARATOR instead of comparing directly against
7900 DIR_SEPARATOR.
649eaf9b 7901 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
530d4230
RM
7902 comparing directly against DIR_SEPARATOR.
7903
5993642d
TT
79042003-03-04 Tom Tromey <tromey@redhat.com>
7905
7906 * Make-lang.in (java.tags): New target.
7907
08291658
RS
79082003-03-01 Roger Sayle <roger@eyesopen.com>
7909
7910 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
7911 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
7912
11522327
TT
79132003-03-01 Tom Tromey <tromey@redhat.com>
7914
7915 * parse.y (jdep_resolve_class): Only check deprecation if we found
7916 a decl.
7917
0ea05c0d
TT
79182003-02-28 Tom Tromey <tromey@redhat.com>
7919
7920 PR java/9695:
7921 * class.c (maybe_layout_super_class): Always pass a WFL to
7922 do_resolve_class.
7923 * parse.y (do_resolve_class): Updated comment to explain
7924 parameters.
7925
49b973cb
TT
79262003-02-26 Tom Tromey <tromey@redhat.com>
7927
7928 * jcf-write.c (generate_classfile): Check whether class is
7929 deprecated before writing attribute count.
7930
b052d8ee
RS
79312003-02-25 Roger Sayle <roger@eyesopen.com>
7932
7933 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
7934 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
649eaf9b 7935
f94ae540
TT
79362003-02-23 Tom Tromey <tromey@redhat.com>
7937
7938 * lang-options.h: Added -Wdeprecated.
7939 * gcj.texi (Warnings): Document -Wdeprecated.
7940 * java-tree.h (flag_deprecated): Declare.
7941 * lang.c (lang_W_options): Added deprecated.
7942 (flag_deprecated): New global.
7943 * chartables.h: Rebuilt.
7944 * gen-table.pl (process_one): Look at whitespace.
7945 (print_tables): Define LETTER_SPACE, LETTER_MASK.
7946 * parse.h (CLEAR_DEPRECATED): New macro.
7947 (CHECK_DEPRECATED_NO_RESET): New macro.
7948 * jcf-parse.c (handle_deprecated): New function.
7949 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
7950 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
7951 * parse.y (resolve_type_during_patch): Check deprecation.
7952 (jdep_resolve_class): Likewise.
7953 (process_imports): Likewise.
7954 (resolve_expression_name): Likewise.
7955 (check_deprecation): Strip arrays from decl. Check
7956 flag_deprecated.
7957 (patch_method_invocation): Also check the particular constructor
7958 for deprecation.
7959 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
7960 * jcf-write.c (append_deprecated_attribute): New function.
7961 (generate_classfile): Generate deprecated attribute when
7962 appropriate.
7963 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
7964 (java_lex) [case '*']: Simplify logic.
7965 (java_start_char_p): Use LETTER_MASK.
7966 (java_part_char_p): Likewise.
7967 (java_space_char_p): New function.
7968
dbbf88d1
NS
79692003-02-20 Nathan Sidwell <nathan@codesourcery.com>
7970
7971 Change base class access representation.
7972 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
7973 (add_interface_do): Likewise.
7974
697ec326
RM
79752003-02-12 Ranjit Mathew <rmathew@hotmail.com>
7976
649eaf9b 7977 * decl.c (java_init_decl_processing): Change
697ec326
RM
7978 soft_lookupjnimethod_node to reflect the change in
7979 signature of _Jv_LookupJNIMethod in libjava/jni.cc
7980 * expr.c (build_jni_stub): Calculate and pass the size
7981 on the stack of the arguments to a JNI function. Use
649eaf9b 7982 new target macro MODIFY_JNI_METHOD_CALL to allow a
697ec326
RM
7983 target to modify the call to a JNI method.
7984
afc432a9
RS
79852003-02-08 Roger Sayle <roger@eyesopen.com>
7986
7987 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
7988 instead of basename to avoid compiler warnings on Tru64.
7989
b3a8389d
JM
79902003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
7991
7992 * gcj.texi: Update to GFDL 1.2.
7993
2d7b3505
AH
79942003-01-31 Andrew Haley <aph@redhat.com>
7995
7996 * parse.y (java_expand_classes): Scan the whole class list looking
7997 for access methods that haven't yet been expanded.
7998
7d503466
AB
79992003-01-31 Adrian Bunk <bunk@fs.tum.de>
8000
8001 Fix for java/4269:
8002
8003 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
8004 to fix bootstrap on sparc-unknown-netbsdelf1.5.
8005 * jcf-parse.c: Likewise.
8006
36da0e78
MW
80072003-01-31 Mark Wielaard <mark@klomp.org>
8008
8009 * gjavah.c (throwable_p): Allocate 1 more byte for string.
8010
1824b90d
NS
80112003-01-31 Nathan Sidwell <nathan@codesourcery.com>
8012
8013 * class.c (make_class): Use BINFO_ELTS.
8014 (set_super_info): Likewse.
8015 (add_interface_do): Likewise.
8016
7e278bae
TT
80172003-01-30 Tom Tromey <tromey@redhat.com>
8018
8019 * jcf-parse.c (read_class): Update identifier's class value if it
8020 changed during parsing.
8021
65eb9b87
LR
80222003-01-30 Loren James Rittle <ljrittle@acm.org>
8023
8024 * Make-lang.in (po-generated): Find the targets in $(parsedir).
8025 Propagate change to all other rules as required.
8026 (java/parse-scan.o): Add explicit dependency on
8027 $(parsedir)/java/parse-scan.c .
8028
c78f2b91
TT
80292003-01-29 Tom Tromey <tromey@redhat.com>
8030
8031 * parse.y (patch_assignment): Only transform the rhs of an
8032 assignment when compiling to native.
8033
0d42c3c2
TT
80342003-01-28 Tom Tromey <tromey@redhat.com>
8035
8036 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
8037
82b22c42
TT
80382003-01-28 Tom Tromey <tromey@redhat.com>
8039
8040 * lex.c (java_lex): Don't include UEOF as part of token.
8041 (java_read_unicode): Error if \u sequence prematurely terminated.
8042
6a807d35
TT
80432003-01-27 Tom Tromey <tromey@redhat.com>
8044
8045 * parse.y (java_check_regular_methods): Check for construct after
8046 checking types in throws clause.
8047
c2c98445
TT
80482003-01-24 Tom Tromey <tromey@redhat.com>
8049
8050 * class.c (build_static_field_ref): Only a String or numeric field
8051 can fold to a constant.
8052
8bef0925
TT
80532003-01-23 Tom Tromey <tromey@redhat.com>
8054
8055 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
8056 file name in resource buffer.
8057
1f369e60
TT
80582003-01-23 Tom Tromey <tromey@redhat.com>
8059
8060 * expr.c (build_known_method_ref): Use method's context to find
8061 method table index.
8062
0f0ff6ec
TT
80632003-01-23 Tom Tromey <tromey@redhat.com>
8064
8065 * constants.c (set_constant_entry): Allocated cleared memory.
8066
850ccfae
TT
80672003-01-22 Tom Tromey <tromey@redhat.com>
8068
8069 * java-tree.h: Don't use PARAMS.
8070 * resource.c: Add prototypes for all functions.
8071 (write_resource_constructor): Use `const char *' to avoid
8072 warning.
8073
e00d2127
NN
80742003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
8075
8076 * jcf-parse.c (process_zip_dir): Remove unused variable.
8077
906c7c32
TT
80782003-01-22 Tom Tromey <tromey@redhat.com>
8079
8080 * expr.c (build_invokeinterface): Abort if method's context is not
8081 an interface.
8082
3e895978
TT
80832003-01-22 Tom Tromey <tromey@redhat.com>
8084
8085 * gcj.texi (Input and output files): Mention non-class entries.
8086 * decl.c (java_init_decl_processing): Call
8087 init_resource_processing.
8088 * java-tree.h (compile_resource_data, write_resource_constructor,
8089 compile_resource_file, init_resource_processing): Declare.
8090 * config-lang.in (gtfiles): Added resource.c.
8091 * Make-lang.in (gt-java-resource.h): New target.
8092 (JAVA_OBJS): Added resource.o.
8093 (java/resource.o): New target.
8094 * resource.c: New file.
8095 * class.c (compile_resource_file): Moved to resource.c.
8096 (registerResource_libfunc): Likewise.
8097 (utf8_decl_list): Mark with GTY; now static.
8098 * jcf-parse.c (classify_zip_file): New function.
8099 (parse_zip_file_entries): Use it; compile .properties files.
8100 (process_zip_dir): Use classify_zip_file and compute_class_name.
8101 Don't write class name into zip directory.
8102 (java_parse_file): Call write_resource_constructor.
8103 (compute_class_name): New function.
8104 * jcf-io.c (read_zip_member): Reindented.
8105
5c64ead4
TT
81062003-01-21 Tom Tromey <tromey@redhat.com>
8107
8108 * class.c (supers_all_compiled): New function.
8109 (make_class_data): Use it.
8110
9179646e
TT
81112003-01-21 Tom Tromey <tromey@redhat.com>
8112
8113 * parse.y (method_header): Native method can't be strictfp.
8114 No method can be transient or volatile.
8115
dd859b8a
KG
81162003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8117
8118 Make-lang.in (jvspec.o-warn): Add -Wno-error.
8119
634661fe
KH
81202003-01-18 Kazu Hirata <kazu@cs.umass.edu>
8121
8122 * check-init.c: Fix comment typos.
8123 * class.c: Likewise.
8124 * constants.c: Likewise.
8125 * decl.c: Likewise.
8126 * except.c: Likewise.
8127 * expr.c: Likewise.
8128 * java-except.h: Likewise.
8129 * java-tree.h: Likewise.
8130 * javaop.h: Likewise.
8131 * jcf-dump.c: Likewise.
8132 * jcf-io.c: Likewise.
8133 * jcf-parse.c: Likewise.
8134 * jcf-write.c: Likewise.
8135 * lang.c: Likewise.
8136 * mangle.c: Likewise.
8137 * typeck.c: Likewise.
8138 * verify.c: Likewise.
8139
a1fb4e91
KG
81402003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8141
8142 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
8143 * jcf-write.c: Include "tm_p.h".
8144
1faad0fc
KG
81452003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8146
8147 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
8148
fc555370
KG
81492003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8150
f981519d
KG
8151 * builtins.c (java_build_function_call_expr): Renamed from
8152 build_function_call_expr. All callers changed.
8153
0334ef47
KG
8154 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
8155 * jcf-parse.c: Include tm_p.h.
8156
fc555370
KG
8157 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
8158 warning.
8159
d9bbf3f7
TT
81602003-01-14 Tom Tromey <tromey@redhat.com>
8161
8162 * class.c (make_class_data): Check that super is compiled before
8163 building class reference to it.
8164
47411341
AH
81652003-01-14 Andrew Haley <aph@redhat.com>
8166
8167 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
649eaf9b 8168 varargs function -- correct.
47411341 8169
e5c9ced4
AH
81702003-01-14 Andrew Haley <aph@redhat.com>
8171
8172 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
8173
50cbc605
AH
81742003-01-14 Andrew Haley <aph@redhat.com>
8175
8176 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
8177 varargs function -- correct.
8178
8179 * parse.y (patch_assignment): Copy the rhs of an assignment into a
8180 temporary if the RHS is a reference.
8181
0a2f0c54
KG
81822003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8183
b3504bc1
KG
8184 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
8185 * keyword.h: Regenerated.
8186
0a2f0c54
KG
8187 * All Files: Convert to ISO C style function definitions.
8188
43a4a12b
NN
81892003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
8190
8191 * parse.y (check_pkg_class_access): ANSIfy definition.
8192
77d3109b
KG
81932003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8194
d12689d2
KG
8195 * decl.c, parse-scan.y, parse.y: Don't cast return value of
8196 xmalloc et al.
8197
77d3109b
KG
8198 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
8199
17211ab5
GK
82002003-01-09 Geoffrey Keating <geoffk@apple.com>
8201
8202 Merge from pch-branch:
8203
8204 2002-12-02 Geoffrey Keating <geoffk@apple.com>
8205
8206 * Make-lang.in (java/gjavah.o): Update dependencies.
8207 * gjavah.c: Include ggc.h.
8208
8209 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
8210
8211 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
8212 (JCFDUMP_OBJS): Add ggc-none.o.
8213 (java/jcf-dump.o): Depend on GGC_H.
8214 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
8215 CPool substructures.
8216 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
8217 * jcf-dump.c: Include ggc.h.
8218
8219 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
8220
8221 * jcf.h (union cpool_entry): New.
8222 (struct CPool): Use gengtype to mark. Change field 'data' to be
8223 an array of unions.
8224 (struct JCF): Use gengtype to mark.
8225 (CPOOL_UINT): Update for new cpool_entry type.
8226 (CPOOL_USHORT1): Likewise.
8227 (CPOOL_USHORT2): Likewise.
8228 (CPOOL_FINISH): Use GC to free cpool subfields.
8229 * parse.h (struct parser_ctxt): Mark field current_jcf.
8230 * lex.c (java_init_lex): Use GC to allocate struct JCF.
8231 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
8232 (main_jcf): Use gengtype to mark.
8233 (ggc_mark_jcf): Delete.
8234 (get_constant): Update for new cpool_entry type.
8235 (give_name_to_class): Likewise.
8236 (get_class_constant): Likewise.
8237 (init_outgoing_cpool): Use GGC to allocate struct CPool.
8238 (java_parse_file): Use GGC to allocate struct JCF.
8239 (init_jcf_parse): Don't call ggc_add_root.
8240 * jcf-reader.c (jcf_parse_constant_pool): Update for new
8241 cpool_entry type.
8242 * java-tree.h (current_jcf): Use gengtype to mark.
8243 (CPOOL_UTF): Update for new cpool_entry type.
8244 (outgoing_cpool): Use gengtype to mark.
8245 (struct lang_type): GC struct JCF and struct CPool.
8246 * config-lang.in (gtfiles): Add jcf.h.
8247 * constants.c (find_tree_constant): New.
8248 (set_constant_entry): Allocate cpool subfields using GGC. Update
8249 for new cpool_entry type.
8250 (find_constant1): Update for new cpool_entry type.
8251 (find_constant2): Likewise.
8252 (find_utf8_constant): Use find_tree_constant.
8253 (find_class_or_string_constant): Remove unnecessary cast to jword.
8254 Update for new cpool_entry type.
8255 (count_constant_pool_bytes): Update for new cpool_entry type.
8256 (write_constant_pool): Likewise.
8257 (alloc_name_constant): Use find_tree_constant.
8258 (build_constants_constructor): Update for new cpool_entry type.
8259
8260 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
8261
8262 * parse.y (mark_parser_ctxt): Delete.
8263 (goal): Don't use ggc_add_root.
8264 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
8265 (java_pop_parser_context): Let GC free parser_ctxt.
8266 (java_parser_context_resume): Likewise.
8267 * parse.h (struct parser_ctxt): Use gengtype to mark.
8268 (ctxp): Likewise.
8269 (ctxp_for_generation): Likewise.
8270 * lex.h (struct java_lc_s): Mark for gengtype.
8271 (java_lexer): Rearrange for gengtype.
8272 * config-lang.in (gtfiles): Add lex.h, parse.h.
8273
b3339cf7
KG
82742003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8275
d2097937
KG
8276 * All Files: Remove PARAMS macro.
8277
6ff2fe39
KG
8278 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
8279 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
8280 `__STDC__' macros.
8281
b3339cf7
KG
8282 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
8283 VA_CLOSE.
8284
8a4c5898
CC
82852003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
8286
8287 * Make-lang.in (java.install-common, java.uninstall,
8288 java.install-info, java.install-man): Prepend $(DESTDIR)
8289 to destination paths in all (un)installation commands.
8290 (java.install-common): Rewrite $(LN) command to support
8291 DESTDIR with "ln" as well as with "ln -s".
8292
2f23f5c1
NN
82932003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
8294
8295 * java-tree.h: Protect against multiple inclusion.
8296
b47ffb8f
TT
82972003-01-07 Tom Tromey <tromey@redhat.com>
8298
8299 * class.c (add_assume_compiled): Don't adjust parent if we're
8300 already at the root of tree.
8301
c7c50494
KG
83022003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8303
8304 * lang.c (dump_compound_expr): Prototype.
8305
f3ce4aba
TT
83062003-01-03 Tom Tromey <tromey@redhat.com>
8307
8308 Fix for PR java/8712:
8309 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
8310 when simply checking against `null'.
8311
60db58b2
TT
83122003-01-03 Tom Tromey <tromey@redhat.com>
8313
0320cac3
TT
8314 * gcj.texi (Standard Properties): Document http.proxyHost and
8315 http.proxyPort.
8316
60db58b2
TT
8317 * gcj.texi (GNU Classpath Properties): Document new properties.
8318
43c6a96a
SB
83192003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8320
8321 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
8322 java/lang-options.h, java/mangle.c, java/mangle_name.c,
8323 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
8324
f309ff0a
SB
83252003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
8326
8327 * Make-lang.in, boehm.c, buffer.c,
8328 buffer.h, builtins.c, class.c,
8329 config-lang.in, constants.c,
8330 convert.h, decl.c, except.c,
8331 expr.c, java-except.h,
8332 java-tree.h, javaop.def,
8333 jcf-parse.c, jcf-write.c,
8334 jv-scan.c, jvgenmain.c,
43c6a96a 8335 jvspec.c, keyword.gperf,
f309ff0a
SB
8336 keyword.h, lang-options.h,
8337 lang-specs.h, lang.c, lex.c,
8338 lex.h, mangle.c, mangle_name.c,
8339 parse-scan.y, parse.h, parse.y,
8340 typeck.c, verify.c, xref.c,
8341 xref.h: Replace "GNU CC" with
8342 "GCC" in the copyright header.
8343
8344 * check-init.c, gjavah.c, javaop.h,
8345 jcf-depend.c, jcf-dump.c, jcf-io.c,
8346 jcf-path.c, jcf-reader.c, jcf.h,
8347 zextract.c, zipfile.h: These files are
8348 "part of GCC". Also say "GCC" not "GNU CC".
8349
9a280a6e
DD
83502002-12-30 DJ Delorie <dj@redhat.com>
8351
e2f45c30 8352 * Make-lang.in: Protect against texi2pod/pod2man failing.
9a280a6e 8353
bdefb2ab
JM
83542002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
8355
8356 * gcj.texi: Use @copying.
8357
239b7dea
MM
83582002-12-27 Mark Mitchell <mark@codesourcery.com>
8359
8360 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
8361 print_cxx_classname.
8362 (print_cxx_classname): Add add_scope parameter.
8363 (print_class_decls): Do not emit a semicolon after the extern
8364 "Java" block.
43c6a96a 8365 (process_file): Adjust calls to print_cxx_classname.
239b7dea 8366
df82908a
JM
83672002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
8368
8369 * gcj.texi: Include Cover Texts in man page.
8370
d3ab697b
JS
83712002-12-23 Jeff Sturm <jsturm@one-point.com>
8372
8373 * class.c (build_static_field_ref): Check FIELD_FINAL.
8374
8375 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
8376 instead of current_constant_pool_data_ref.
8377 * java-tree.h (current_constant_pool_data_ref): Undefine.
8378 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
8379 * jcf-parse.c (init_outgoing_cpool): Don't initialize
8380 current_constant_pool_data_ref.
8381
8382 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
8383 not build_internal_class_name.
8384
8385 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
8386 Use it when class ref isn't certain to be compiled.
8387
46d40353
JM
83882002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
8389
8390 * gcj.texi: Include gcc-common.texi.
8391 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
8392 $(srcdir)/doc/include/gcc-common.texi.
8393
fba1caab
AG
83942002-12-22 Anthony Green <green@redhat.com>
8395
8396 * gcj.texi (Limitations): Add note about org.xml.sax and
8397 org.w3c.dom.
8398
913746e3
TT
83992002-12-20 Tom Tromey <tromey@redhat.com>
8400
8401 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
8402 where minimum case value is Integer.MIN_VALUE.
8403 Fixes PR java/8955.
8404
71d082af
AH
84052002-12-18 Andrew Haley <aph@redhat.com>
8406
8407 * parse.y (patch_invoke): Force evaluation order when `check' is
8408 set. For PR libgcj/8945.
8409
7a04c51b
MM
84102002-12-16 Mark Mitchell <mark@codesourcery.com>
8411
8412 * gcj.texi: Change version number to 3.4.
8413
0cc1565a 84142002-12-05 Ranjit Mathew <rmathew@hotmail.com>
649eaf9b 8415 Andrew Haley <aph@redhat.com>
0cc1565a
RM
8416
8417 * parse.y (source_end_java_method): Remove custom encoding of line
8418 numbers for a function decl before passing it to the back end.
8419
421f9e60
AH
84202002-12-03 Andrew Haley <aph@redhat.com>
8421
8422 * class.c (make_class_data): New field, "chain".
8423 * decl.c (java_init_decl_processing): Likewise.
8424
6b55b27f
TT
84252002-12-02 Tom Tromey <tromey@redhat.com>
8426
8427 For PR java/8740:
8428 * parse.y (do_resolve_class): Handle qualified name via
8429 recursion.
8430
4977bab6
ZW
84312002-11-30 Zack Weinberg <zack@codesourcery.com>
8432
8433 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
8434 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
8435 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
8436 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
8437 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
8438 Include coretypes.h and tm.h.
8439 * Make-lang.in: Update dependencies.
8440
d1aed877
KG
84412002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8442
8443 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8444
b4bbc8b7
DN
84452002-11-25 Diego Novillo <dnovillo@redhat.com>
8446
8447 * jcf-reader.c: Don't expand JCF_readu4 inside the
8448 expansion of JCF_SKIP.
8449
4977bab6
ZW
84502002-11-25 Diego Novillo <dnovillo@redhat.com>
8451
8452 * jcf-reader.c: Don't expand JCF_readu4 inside the
8453 expansion of JCF_SKIP.
8454
dd06be9e
TT
84552002-11-22 Tom Tromey <tromey@redhat.com>
8456
8457 * parse.y (patch_binop): Cast right hand side of shift expression
8458 to `int'. Fixes PR java/8676.
8459
34744d4e
RM
84602002-11-22 Ranjit Mathew <rmathew@hotmail.com>
8461 Andrew Haley <aph@redhat.com>
8462
8463 * gcc/java/jcf-write.c (write_classfile): Remove target
8464 class file, if it exists, before renaming the temporary
8465 class file to it.
8466
f3226a90
JT
84672002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
8468
8469 * jvspec.c (lang_specific_spec_functions): New.
8470
5602b49d
TT
84712002-11-18 Tom Tromey <tromey@redhat.com>
8472
8473 Fix for PR java/7912:
8474 * expr.c (can_widen_reference_to): Allow cast of array to
8475 Cloneable or Serializable.
8476 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8477 (java_io_serializable_identifier_node): Likewise.
8478 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8479 (valid_ref_assignconv_cast_p): Use new identifier nodes.
8480 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8481 java_io_serializable.
8482 * decl.c (java_init_decl_processing): Initialize
8483 java_lang_cloneable_identifier_node and
8484 java_io_serializable_identifier_node.
8485 (java_lang_cloneable_identifier_node): New global.
8486 (java_io_serializable_identifier_node): Likewise.
8487
a92cb0c3
JMH
84882002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
8489
8490 * buffer.c: Remove unnecessary casts.
8491 * check-init.c: Likewise.
8492 * class.c: Likewise.
8493 * constants.c: Likewise.
8494 * decl.c: Likewise.
8495 * except.c: Likewise.
8496 * gjavah.c: Likewise.
8497 * jcf-io.c: Likewise.
8498 * jcf-parse.c: Likewise.
8499 * jcf-path.c: Likewise.
8500 * jvspec.c: Likewise.
8501 * lang.c: Likewise.
8502 * lex.c: Likewise.
8503 * verify.c: Likewise.
8504
5bd717f1
TT
85052002-11-06 Tom Tromey <tromey@redhat.com>
8506
8507 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8508 a JNI header.
8509
c034b453
TT
85102002-11-05 Tom Tromey <tromey@redhat.com>
8511
8512 Fix for PR java/6388.
8513 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8514 * java-tree.h (enum java_tree_index): New values
8515 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8516 (decimal_int_max, decimal_long_max): New defines.
8517 * lex.c (yylex): Rewrote range checking. Sign extend literals.
8518 (error_if_numeric_overflow): Rewrote range checking.
8519 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8520 decimal_long_max.
8521
21140beb
TT
85222002-11-02 Tom Tromey <tromey@redhat.com>
8523
60b68525
TT
8524 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8525
21140beb
TT
8526 * class.c (make_method_value): Put class name, not signature, into
8527 `throws' field. For PR java/8415.
8528
3752ac08
TT
85292002-10-24 Tom Tromey <tromey@redhat.com>
8530
8531 * gcj.texi (Invoking gij): Document --showversion.
8532 (Standard Properties): java.library.path now set.
8533
0d3911c9
TT
85342002-10-23 Tom Tromey <tromey@redhat.com>
8535
8536 * gjavah.c (decode_signature_piece): In JNI mode, print
8537 `jobjectArray' when array depth is nonzero.
8538 Fixes PR java/8296.
8539
c1ddb5c8
AH
85402002-10-15 Andrew Haley <aph@redhat.com>
8541
8542 * parse.y (patch_invoke): Call force_evaluation_order on a static
8543 arg list.
8544 (resolve_qualified_expression_name): Call force_evaluation_order
8545 on a arg list that is part of a Qualified Expression Name.
8546
8547 * lang.c (dump_compound_expr): New.
8548 (java_dump_tree): New.
8549
63bb20d4
RM
85502002-10-20 Ranjit Mathew <rmathew@hotmail.com>
8551
8552 * gcj.texi: Added item describing the GCJ runtime property
8553 "gnu.gcj.progname".
8554
ba0bb02d
RH
85552002-10-15 Richard Henderson <rth@redhat.com>
8556
8557 * jcf-parse.c (get_constant): Fix type warning.
8558
dbd1e2d8
AH
85592002-10-15 Andrew Haley <aph@redhat.com>
8560
8561 * java-tree.h (java_inlining_merge_static_initializers): Declare.
8562 (java_inlining_map_static_initializers): Declare.
8563
3eb429b2
AH
85642002-10-14 Andrew Haley <aph@redhat.com>
8565
8566 * tree-inline.c (remap_block): All local class initialization
8567 flags go in the outermost scope.
8568 (expand_call_inline): Call java_inlining_map_static_initializers.
8569 (expand_call_inline): Call java_inlining_merge_static_initializers.
8570 * java/lang.c (merge_init_test_initialization): New.
8571 (java_inlining_merge_static_initializers): New.
8572 (inline_init_test_initialization): New.
8573 (java_inlining_map_static_initializers): New.
8574
37d2b7e2
MW
85752002-10-11 Mark Wielaard <mark@klomp.org>
8576
8577 * gcj.texi (Compatibility): Add Limitations and Extensions section.
8578
7bdfd72e
KG
85792002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8580
8581 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8582
c6449a1d
KG
85832002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8584
8585 * parse.y (merge_string_cste): Add parentheses around & within |.
8586
8f6d2e96
TT
85872002-10-08 Tom Tromey <tromey@redhat.com>
8588
8589 * parse.y (variable_declarator_id): Simplify error path for
8590 array declarator error. For PR java/8003.
8591
36624850
ZW
85922002-10-08 Zack Weinberg <zack@codesourcery.com>
8593
8594 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8595 bug_report_url.
8596
ce5bb293
AH
85972002-10-08 Andrew Haley <aph@redhat.com>
8598
8599 * parse.y (attach_init_test_initialization_flags): Check for
8600 error_mark_node.
8601
36624850 86022002-10-07 Anthony Green <green@redhat.com>
6a921942 8603
36624850 8604 * parse.y (merge_string_cste): Fix bug in string concatenation.
6a921942 8605
f42ee52f
MK
86062002-10-03 Michael Koch <konqueror@gmx.de>
8607
8608 * gcj.texi (Standard properties):
8609 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8610
f963b5d9
RS
86112002-10-02 Roger Sayle <roger@eyesopen.com>
8612
8613 PR optimization/6627
8614 * lang.c (java_init): If storing the vbit in function
8615 pointers, ensure that force_align_functions_log is atleast
8616 one to aid compatability with g++ vtables.
8617
6f7e9e94
NS
86182002-10-01 Nathan Sidwell <nathan@codesourcery.com>
8619
8620 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8621 foul of type-based aliasing.
8622
71dff728
AG
86232002-09-30 Anthony Green <green@redhat.com>
8624
8625 * gcj.texi (Invoking jv-scan): Fix texinfo.
8626
acc59b85
AG
86272002-09-28 Anthony Green <green@redhat.com>
8628
8629 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8630 (Code Generation): Add -fno-assert documentation.
8631 * jv-scan.c (flag_assert): New global.
8632 (options): Add assert option.
8633 (help): Add --no-assert documentation.
8634 * parse-scan.y (flag_assert): New global.
8635 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8636 (flag_assert): New global.
8637 * java-tree.h (flag_assert): New global.
8638 * lex.c (java_lex): Obey flag_assert.
8639 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8640 calling cc1.
8641
fc5295fa
AH
86422002-09-26 Andrew Haley <aph@redhat.com>
8643
8644 * expr.c (build_java_array_length_access): Check for null pointer.
8645 * expr.c (expand_java_arrayload): Likewise.
8646
aa2046c4
RH
86472002-09-21 Richard Henderson <rth@redhat.com>
8648
36624850 8649 * jcf-parse.c (get_constant): Decode from IEEE no matter
aa2046c4
RH
8650 what the target format.
8651
ee142fe7
KH
86522002-09-20 Kazu Hirata <kazu@cs.umass.edu>
8653
8654 * ChangeLog: Follow spelling conventions.
8655 * class.c: Likewise.
8656 * decl.c: Likewise.
8657 * expr.c: Likewise.
8658 * gjavah.c: Likewise.
8659 * java-tree.h: Likewise.
8660 * jcf-dump.c: Likewise.
8661 * jcf-parse.c: Likewise.
8662 * jvspec.c: Likewise.
8663 * lang.c: Likewise.
8664 * mangle.c: Likewise.
8665 * parse.y: Likewise.
8666
6a022513
TT
86672002-09-17 Tom Tromey <tromey@redhat.com>
8668
8669 * lex.c (java_read_unicode_collapsing_terminators): Handle case
8670 where \r appears at EOF. Fixes PR java/7950.
8671
4977bab6
ZW
86722002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
8673
8674 * jvspec.c (lang_specific_driver): Remove unused variable.
8675
36a5eadd
GK
86762002-09-16 Geoffrey Keating <geoffk@apple.com>
8677
8678 * java-tree.h (union lang_tree_node): Add chain_next option.
8679
efdc7e19
RH
86802002-09-16 Richard Henderson <rth@redhat.com>
8681
8682 * jcf-parse.c (get_constant): Runtime check for IEEE format;
8683 use new real.h interface.
8684 * jcf-write.c (find_constant_index): Use new real.h interface.
8685 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8686
6522685d
KH
86872002-09-15 Kazu Hirata <kazu@cs.umass.edu>
8688
25facd31 8689 * lang.c: Follow spelling conventions.
6522685d 8690
6e471ea7
PB
86912002-09-11 Per Bothner <per@bothner.com>
8692
8693 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
8694 constant to the type of the field.
8695 (java_complete_tree): Remove now-redundant code.
8696
8697 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
8698
23114b69
JR
86992002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
8700
8701 For PR java/5794:
8702 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8703 return label if a ret instruction for the jsr has been reached.
8704
f724acb8
RM
87052002-09-09 Ranjit Mathew <rmathew@hotmail.com>
8706
8707 * parse.y (DIR_SEPARATOR): Don't define.
8708 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8709
b139fcfd
AH
87102002-08-28 Andrew Haley <aph@redhat.com>
8711
8712 * verify.c (verify_jvm_instructions): Allow exception handler
8713 inside code that is being protected, but generate a warning.
8714 * except.c (link_handler): Initialize `expanded' in new eh_range.
8715 (binding_depth, is_class_level, current_pc): Declare extern.
8716
f60518c8
MW
87172002-09-01 Mark Wielaard <mark@klomp.org>
8718
8719 * gcj.texi: Add chapter about system properties.
8720 Fixed some typos.
8721
83dd5fae
TT
87222002-08-26 Tom Tromey <tromey@redhat.com>
8723
8724 * parse.y (try_builtin_assignconv): Allow narrowing primitive
8725 conversion if RHS_TYPE is byte, short, or char.
8726
00a8b314
TT
87272002-08-22 Tom Tromey <tromey@redhat.com>
8728
8729 * gcj.texi (Invoking gij): Document -cp and -classpath.
8730
0d811e1a
TT
87312002-08-21 Tom Tromey <tromey@redhat.com>
8732
79a3cb18
TT
8733 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8734 $(prefix)/share. For PR libgcj/7633.
8735
0d811e1a
TT
8736 For PR java/6005 and PR java/7611:
8737 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8738 (java_can_use_bit_fields_p): New function.
8739
ca75573a
TT
87402002-08-16 Tom Tromey <tromey@redhat.com>
8741
8742 * gcj.texi (Class Initialization): Mention class initialization of
8743 arrays.
8744
7149627b
AH
87452002-07-30 Andrew Haley <aph@cambridge.redhat.com>
8746
8747 * Make-lang.in (java-tree-inline.o): New.
8748 (JAVA_OBJS): Add java-tree-inline.o.
8749 * parse.y (source_end_java_method): Call java_optimize_inline.
8750 (java_expand_method_bodies): Save method's tree in
8751 DECL_SAVED_TREE.
8752 (add_stmt_to_compound): Keep track of the number of statments.
8753 * lang.c (java_init): Enable flag_inline_trees.
8754 (java_post_options): If flag_inline_functions is on, enable
8755 flag_inline_trees instread.
8756 (decl_constant_value): New.
8757 (java_tree_inlining_walk_subtrees): New.
8758 * java-tree.h (DECL_NUM_STMTS): New macro.
8759 (java_optimize_inline): Declare.
8760 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8761 Handle a LABEL_EXPR.
8762 * decl.c (build_result_decl): If we already have a DECL_RESULT
8763 don't make another.
8764 (dump_function): New.
8765 (java_optimize_inline): New.
8766 (dump_function): New.
8767
ee1884cb
JR
87682002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
8769
8770 For PR java/7483:
8771 * parse.y (build_assertion): Invert return from
8772 desiredAssertionStatus.
8773
097684ce
BM
87742002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8775
36624850 8776 * jcf-write.c (get_access_flags): Return correct access flags for
097684ce
BM
8777 private and protected inner classes.
8778
22aa533e
NS
87792002-08-08 Nathan Sidwell <nathan@codesourcery.com>
8780
8781 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8782
b3426eb9
GK
87832002-08-05 Geoffrey Keating <geoffk@redhat.com>
8784
8785 * mangle_name.c: Don't include obstack.h twice.
8786 * xref.c: Don't include obstack.h.
8787
6d9f628e
GK
87882002-08-04 Geoffrey Keating <geoffk@redhat.com>
8789
8790 * class.c: (permanent_obstack): Delete declaration.
8791 * constants.c: (permanent_obstack): Delete declaration.
8792 * except.c: (permanent_obstack): Delete declaration.
8793 * expr.c: (permanent_obstack): Delete declaration.
8794 * jcf-parse.c: (permanent_obstack): Delete declaration.
8795 (saveable_obstack): Delete declaration.
8796 * parse.h: (permanent_obstack): Delete declaration.
8797 * typeck.c: (permanent_obstack): Delete declaration.
8798
d500c5d7
JM
87992002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
8800
8801 * gcj.texi (version-gcc): Increase to 3.3.
8802
e75abdab
TT
88032002-07-22 Tom Tromey <tromey@redhat.com>
8804
8805 * lex.c (java_lex): Check for `e' or `E' after 0.
8806
8943a0b4
RH
88072002-07-21 Richard Henderson <rth@redhat.com>
8808
8809 * lang.c (java_unsafe_for_reeval): New.
8810 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8811
2f8dd115
NB
88122002-07-21 Neil Booth <neil@daikokuya.co.uk>
8813
8814 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8815 (jcf_path_init): Use GET_ENVIRONMENT.
8816
c5358a5d
RS
88172002-07-10 Roger Sayle <roger@eyesopen.com>
8818 Zack Weinberg <zack@codesourcery.com>
8819
8820 * builtins.c (initialize_builtins): Remove defines that
8821 handled C/C++ specific junk hereby removed from builtins.def.
8822
5351f1ca
NB
88232002-07-07 Neil Booth <neil@daikokuya.co.uk>
8824
8825 * lang.c (java_post_options): Update prototype.
8826
df061a43
RS
88272002-07-05 Roger Sayle <roger@eyesopen.com>
8828
c5358a5d 8829 * builtins.c (initialize_builtins): Ignore the additional
df061a43
RS
8830 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
8831 the builtins.def file.
8832
68a830fe
TT
88332002-07-01 Tom Tromey <tromey@redhat.com>
8834
8835 For PR libgcj/7073:
8836 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8837 specially.
8838
6a2dd09a
RS
88392002-07-01 Roger Sayle <roger@eyesopen.com>
8840
8841 * java/decl.c (builtin_function): Accept additional parameter.
8842 (java_init_decl_processing): Pass an additional NULL_TREE
8843 argument to builtin_function.
8844
32c4621e
M
88452002-06-29 T.J. Mather <tjmather@maxmind.com>
8846
8847 * gcj.texi: Fixed gcj invocation example so that it compiles.
8848
bd466c7b
KG
88492002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8850
57ddd19c
KG
8851 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
8852 * parse.y (mark_parser_ctxt): Likewise.
33780b45
KG
8853 (check_modifiers, declare_local_variables): Avoid incorrect
8854 hardcoded constant 10.
57ddd19c 8855
bd466c7b
KG
8856 * lex.c (java_read_char): Avoid "comparison is always true"
8857 warning.
8858
b6532e57
AS
88592002-06-25 Andreas Schwab <schwab@suse.de>
8860
8861 * expr.c (JSR): Avoid undefined operation on PC.
8862
eb6b51b9
KG
88632002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8864
8865 * decl.c (clear_binding_level): Const-ify.
8866
6d61f1bd
AD
88672002-06-13 Akim Demaille <akim@epita.fr>
8868
8869 * parse.y (class_declaration, interface_declaration): Make sure
8870 all their rules have an action, in order to avoid meaningless `$$
8871 = $1' and their type clashes.
8872
c6226a7e
TT
88732002-06-11 Tom Tromey <tromey@redhat.com>
8874
8875 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
8876 * parse-scan.y (statement_without_trailing_substatement): Added
8877 assert_statement.
8878 (assert_statement): New rule.
8879 * java-tree.h (struct lang_type) [assertions]: New field.
8880 (TYPE_USES_ASSERTIONS): New macro.
8881 (CLASS_USES_ASSERTIONS): Likewise.
8882 (FIELD_SYNTHETIC): New define.
8883 * lex.c (java_lval;): Added ASSERT_TK.
8884 * parse.y (ASSERT_TK): Added.
8885 (statement_without_trailing_substatement): Added assert_statement.
8886 (assert_statement): New rule.
8887 (build_assertion): New function.
8888 (maybe_generate_pre_expand_clinit): Create and initialize
8889 $assertionsDisabled.
8890 (lookup_package_type): Removed decl.
8891 * keyword.h: Rebuilt.
8892 * keyword.gperf (assert): New token.
8893
e35b68b0
AD
88942002-06-10 Akim Demaille <akim@epita.fr>
8895
8896 * parse.y (interface_type_list, class_member_declaration)
8897 (unary_expression_not_plus_minus): Remove duplicate %type.
8898 Whitespace changes.
8899
950ac1d3
TT
89002002-06-09 Tom Tromey <tromey@redhat.com>
8901
ac57655a
TT
8902 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
8903
950ac1d3
TT
8904 * parse.y (method_header): Give error message in all cases.
8905 Fixes PR java/6865.
8906
36d010ca
BM
89072002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8908
8909 Don't use RTL inlining. Fix for PR java/6820.
8910 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
8911 (flag_really_inline): New.
8912 (java_decode_option): Set flag_really_inline if -finline-functions
8913 is seen.
8914 (java_post_options): New function. Turn off inlining unless
8915 flag_really_inline is set.
8916
64e68197
BM
89172002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8918
36624850 8919 * gjavah.c (throwable_p): Accept argument as either a classname or
64e68197
BM
8920 signature fragment. Create null-terminated classname string for super
8921 when calling itself recursively.
36624850 8922 (decode_signature_piece): Skip first character from class name
64e68197
BM
8923 signature when calling throwable_p.
8924
c238d806
L
89252002-06-08 H.J. Lu (hjl@gnu.org)
8926
8927 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
8928
f06cafdf
TT
89292002-06-04 Tom Tromey <tromey@redhat.com>
8930
8931 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
8932
0bb5f0e4
MK
89332002-06-04 Michael Koch <konqueror@gmx.de>
8934
8935 * gcj.texi (Input Options): Fixed typo.
8936
c02ebb18
ZW
89372002-06-04 Zack Weinberg <zack@codesourcery.com>
8938
8939 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
8940 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
8941 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
8942 and all now-pointless local variables. Rename other local
8943 variables to reflect their not being handles.
8944
8945 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
8946 #if JCF_USE_STDIO blocks.
8947
8948 * parse.y: Add missing semicolon at end of rule.
8949
e2500fed
GK
89502002-06-03 Geoffrey Keating <geoffk@redhat.com>
8951
8952 * check-init.c (attach_initialized_static_class): Delete, unused.
8953 * parse.y: Use htab_t instead of struct hashtable, update
8954 all uses.
8955 * java-tree.h: Include hashtab.h instead of hash.h.
8956 (struct lang_decl_func): Use htab_t, set up for gengtype.
8957 (struct init_test_hash_entry): Delete.
8958 (struct treetreehash_entry): New.
c02ebb18 8959 (java_treetreehash_find): New
e2500fed
GK
8960 (java_treetreehash_new): New prototype.
8961 (java_treetreehash_create): New prototype.
8962 (java_mark_tree): Delete prototype.
8963 (java_hash_hash_tree_node): Delete prototype.
8964 (java_hash_compare_tree_node): Delete prototype.
8965 (attach_initialized_static_class): Delete prototype.
8966 * expr.c (build_class_init): Update to use java_treetreehash
8967 functions.
8968 (java_expand_expr): Update to use htab_t.
8969 (emit_init_test_initialization): Likewise.
8970 * decl.c (java_mark_tree): Delete.
8971 * class.c (init_test_hash_newfunc): Delete.
8972 (java_hash_hash_tree_node): Delete.
8973 (java_hash_compare_tree_node): Delete.
8974 (add_method_1): Update to use java_treetreehash functions.
8975 (JAVA_TREEHASHHASH_H): New macro.
8976 (java_treetreehash_hash): New function.
8977 (java_treetreehash_compare): New function.
8978 (java_treetreehash_find): New function.
8979 (java_treetreehash_new): New function.
8980 (java_treetreehash_create): New function.
8981 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
8982
8983 * Make-lang.in (java/parse.o): Depend on debug.h.
8984 * java-tree.h (struct lang_identifier): Use gengtype.
8985 (union lang_tree_node): New.
8986 (struct lang_decl_func): Use gengtype.
8987 (struct lang_decl_var): Likewise.
8988 (struct lang_decl): Likewise.
8989 * parse.y: Include debug.h.
8990 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
8991
8992 * lang.c (struct language_function): New dummy structure.
8993
8994 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
8995 descriminator for DECL_LANG_SPECIFIC.
8996 (struct lang_decl_func): Rename from struct lang_decl.
8997 (enum lang_decl_desc): New.
8998 (struct lang_decl): Make it a union. Update all the accessor macros.
8999 (struct lang_type): Use gengtype.
9000 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
9001 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
9002 are now the same size.
9003 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
9004 use discriminator to mark DECL_LANG_SPECIFIC.
9005
9006 * Make-lang.in (gt-java-builtins.h): New rule.
9007 (java/builtins.o): Add dependency on gt-<filename>.h.
9008 * builtins.c: Use gengtype for roots.
9009 (union string_or_tree): Use gengtype.
9010 (struct builtin_record): Use gengtype.
9011 * config-lang.in (gtfiles): Add builtins.c.
9012
9013 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
9014 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
9015 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
9016 gt-java-parse.h, gtype-java.h): Add rules to generate.
9017 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
9018 (class.o): Add dependency on gt-*.h.
9019 (constants.o): Likewise.
9020 (decl.o): Likewise.
9021 (expr.o): Likewise.
9022 (jcf-parse.o): Likewise.
9023 (jcf-write.o): Likewise.
9024 (lang.o): Likewise.
9025 * config-lang.in (gtfiles): New.
9026 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9027 * constants.c: Replace uses of ggc_add_* with GTY markers.
9028 Include gt-*.h.
9029 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9030 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9031 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
9032 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
9033 Include gt-*.h.
9034 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
9035 Include gt-*.h.
9036 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9037 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
9038 gt-*.h.
9039 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
9040 Include gtype-java.h.
9041
c442c002
TT
90422002-06-02 Tom Tromey <tromey@redhat.com>
9043
9044 Fix for PR java/5913:
9045 * parse.y (patch_binop): Call patch_string on op1.
9046
48711f4d
TT
90472002-06-02 Tom Tromey <tromey@redhat.com>
9048
9049 Fix for PR java/1343, PR java/6336:
9050 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
9051 formatting. Changed return type.
9052 (anonymous_class_counter): Moved to top of file.
9053 (maybe_make_nested_class_name): Append number to class name for
9054 function-local classes.
9055
11ad4784
ZW
90562002-05-28 Zack Weinberg <zack@codesourcery.com>
9057
9058 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
9059 * Make-lang.in: Update dependency lists.
9060
a15135c9
MM
90612002-05-18 Mark Mitchell <mark@codesourcery.com>
9062
9063 * gjavah.c (throwable_p): Do not free the name of the class after
9064 passing it to find_class.
9065 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
9066 * jcf-io.c (dirent.h): Include it.
9067 (fnmatch.h): Likewise.
9068 (compare_path): New function.
9069 (java_or_class_file): Likewise.
9070 (memoized_dirlist_entry): New type.
9071 (memoized_dirlist_lookup_eq): New function.
9072 (memoized_dirlists): New variable.
9073 (caching_stat): New function.
9074 (memoized_class_lookup_eq): New function.
9075 (memoized_class_lookups): Likewise.
9076 (find_class): Use memoized_class_lookups and caching_stat.
9077 * jcf.h (JCF_USE_SCANDIR): Define.
9078 * parse.y (java_expand_classes): Write the class files in reverse
9079 order.
c02ebb18 9080
1e6347d8
RO
90812002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9082
9083 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
9084
2f9a2cd7
MM
90852002-05-13 Mark Mitchell <mark@codesourcery.com>
9086
9087 * jcf-write.c (write_classfile): Unlink the temporary file if it
9088 cannot be renamed. Use concat to build up the name of the
9089 temporary file.
9090
281524f4
MM
90912002-05-08 Mark Mitchell <mark@codesourcery.com>
9092
c02ebb18 9093 * jcf-write.c (write_classfile): Write the file to a
281524f4
MM
9094 temporary file and then rename it.
9095
6b9b5de2
TT
90962002-05-07 Tom Tromey <tromey@redhat.com>
9097
5643bb97
TT
9098 * gjavah.c (throwable_p): Use xstrdup, not strdup.
9099
6b9b5de2
TT
9100 Fix for PR java/1200:
9101 * gjavah.c (throwable_p): New function.
9102 (decode_signature_piece): Use it. A `WeakReference' isn't the
9103 same as a `jweak'.
9104 Include hashtab.h.
9105 (gcjh_streq): New function.
9106
2c7e9098
AJ
91072002-05-07 Andreas Jaeger <aj@suse.de>
9108
c02ebb18 9109 * parse.y (finish_for_loop): Fix if statement.
2c7e9098 9110
486e8c0c
TT
91112002-05-06 Tom Tromey <tromey@redhat.com>
9112
9113 Fix for PR java/5941:
9114 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
9115 loop update expression.
9116 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
9117 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
9118
30b50f90
MW
91192002-05-04 Mark Wielaard <mark@klomp.org>
9120
9121 For PR java/6519:
9122 * parse.y (build_string_concatenation): Return just op1 only when op2
9123 is null and op1 is a STRING_CST, otherwise always construct a
9124 StringBuffer.
9125
0a32c5ea
TT
91262002-04-27 Tom Tromey <tromey@redhat.com>
9127
9128 For PR java/6382:
9129 * parse.y (string_convert_int_cst): New function.
9130 (merge_string_cste): Use it.
9131
ff45c01e
NB
91322002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
9133
9134 * java-tree.h (java_parse_file): Update.
9135 (java_set_yydebug): Remove.
9136 * jcf-parse.c (yydebug): Remove.
9137 (java_set_yydebug): Die.
9138 (java_parse_file): Update.
9139 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9140
9127b2da
TT
91412002-04-24 Tom Tromey <tromey@redhat.com>
9142
9143 For PR java/6425:
9144 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
9145 EXPR_WFL_QUALIFICATION of qual_wfl.
9146
67f0a6bf
PB
91472002-04-23 Per Bothner <per@bothner.com>
9148
9149 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
9150 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
9151 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
9152
3d3707c1
TT
91532002-04-23 Tom Tromey <tromey@redhat.com>
9154
9155 For PR java/6314:
9156 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
9157 recognize `-fcompile-resource='.
9158 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
9159 a bit.
9160
920f81e7
APB
91612002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
9162
9163 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
9164 paths. Fixes PR java/2791.
9165
a2761d68
AH
91662002-04-19 Andrew Haley <aph@redhat.com>
9167
c02ebb18
ZW
9168 * jcf-write.c (push_long_const): lo, hi: New variables.
9169 Use rshift_double to extract the high part of a 64-bit long.
9170 Use WORD_TO_INT to extract the low part.
a2761d68 9171
c02ebb18
ZW
9172 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
9173 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
9174 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
a2761d68 9175
7a228918
NB
91762002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
9177
9178 * typeck.c (incomplete_type_error): Remove.
9179
b798d8b6
BM
91802002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9181
9182 * class.c (make_class_data): Set DECL_ALIGN on static class data,
9183 for hash synchronization.
9184 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
9185 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
9186 class_type_node.
9187
1cde1d05
MW
91882002-04-16 Mark Wielaard <mark@klomp.org>
9189
9190 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
9191 negative zero.
9192
3020a7f5
BM
91932002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9194
9195 Fix for PR java/6294:
9196 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
9197 interfaces.
2c7e9098 9198
10aa83c7
BM
91992002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9200
9201 Fix for PR java/6085:
9202 * parse.y (patch_method_invocation): Always use build_access_to_thisn
9203 to get enclosing "this" argument for inner-class constructor
9204 invocation. Pass correct arguments to build_access_to_thisn.
9205
9fef1fe3
AG
92062002-04-10 Andreas Jaeger <aj@suse.de>
9207
9208 * gcj.texi (Input Options): Fix extdirs patch.
9209
92102002-04-10 Anthony Green <green@redhat.com>
9211
9212 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
9213
92142002-04-09 Anthony Green <green@redhat.com>
9215
9216 * gcj.texi (Input Options): Add --extdirs documentation.
9217 * jcf-dump.c (OPT_extdirs): New macro.
9218 (options): Add extdirs option.
9219 (help): Describe --extdirs.
9220 (main): Handle OPT_extdirs.
9221 * gjavah.c (OPT_extdirs): New macro.
9222 (options): Add extdirs option.
9223 (help): Describe --extdirs.
9224 (main): Handle OPT_extdirs.
9225 * jcf-path.c (jcf_path_init): Add extdirs support.
9226 (jcf_path_extdirs_arg): New function.
9227 (extensions): New variable to hold extensions path entries.
9228 * jvspec.c: Remove -fextdirs= when compiling main().
9229 * lang.c (java_decode_option): Handle -fextdirs=.
9230 * jcf.h (jcf_path_extdirs_arg): Declare new function.
9231 * Make-lang.in: Compile jcf-path with version info for use in
9232 identifying the appropriate libgcj.jar.
9233
66133721
TT
92342002-04-08 Tom Tromey <tromey@redhat.com>
9235
9236 For PR libgcj/5303:
9237 * .cvsignore: Added rmic.1 and rmiregistry.1.
9238 * gcj.texi (Top): Link to new nodes.
9239 (Invoking rmic): New node.
9240 (Invoking rmiregistry): Likewise.
9241 * Make-lang.in (java.generated-manpages): Added rmic.1 and
9242 rmiregistry.1.
9243 (java.maintainer-clean): Likewise.
9244 ($(srcdir)/java/rmic.1): New target.
9245 ($(srcdir)/java/rmiregistry.1): Likewise.
9246 (java.install-man): Handle rmic.1 and rmiregistry.1.
9247
00b224f8
BM
92482002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9249
9250 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
9251 Add note about handling uncaught exceptions. Add an exception handler
9252 to example.
9253
0b055ea1
BM
92542002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9255
9256 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
9257 after using it to patch CALL_EXPR.
9258
92c76eba
BM
92592002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9260
9261 * gcj.texi (Invocation): Document CNI invocation API.
9262
78ef5b89
NB
92632002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
9264
9265 * expr.c (truthvalue_conversion): Rename. Update.
9266 (expand_compare): Update.
9267 * java-tree.h (java_truthvalue_conversion): New.
9268 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9269
dffd7eb6
NB
92702002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9271
9272 * java-tree.h (java_mark_addressable): New.
9273 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9274 * typeck.c (mark_addressable): Rename, update.
9275
ceef8ce4
NB
92762002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
9277
9278 * expr.c (build_java_binop): Update.
9279 * java-tree.h (java_signed_type, java_unsigned_type,
9280 java_signed_or_unsigned_type): Update.
9281 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9282 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9283 * parse.y (patch_binop): Update.
9284 * typeck.c (signed_or_unsigned_type, unsigned_type,
9285 signed_type): Update.
9286
7cb32822
NB
92872002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
9288
9289 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9290 (java_dummy_print): Remove.
9291 (lang_print_error): Rename. Exit early if inhibiting output.
9292 (inhibit_error_printing_function): New.
9293 (java_init): Don't set hook.
9294 (lang_init_source): Use new boolean.
9295
5bebbee7
MK
92962002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
9297
9298 * parse.y (do_resolve_class): Fix infinite recursion.
9299
bce54832
TT
93002002-03-29 Tom Tromey <tromey@redhat.com>
9301
9302 * parse.y (check_inner_circular_reference): Ignore incomplete
9303 types.
9304
b0c48229
NB
93052002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
9306
9307 * Make-lang.in (builtins.o): Update.
9308 * boehm.c (get_boehm_type_descriptor): Update.
9309 * builtins.c: Include langhooks.h.
9310 * decl.c (java_init_decl_processing): Update.
9311 * java-tree.h (java_type_for_mode, java_type_for_size): New.
9312 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
9313 Redefine.
9314 * typeck.c (type_for_mode, type_for_size): Update.
9315
5843e870
MK
93162002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
9317
9318 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
9319
073681c5
TT
93202002-03-28 Tom Tromey <tromey@redhat.com>
9321
9322 * except.c (expand_end_java_handler): If the handler type is NULL,
9323 use java.lang.Throwable. Fixes PR java/5986.
9324
242747e5
APB
93252002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9326
9327 Fix for PR java/4715:
9328 * jcf-parse.c (parse_source_file_3): New function.
9329 (read_class): Call it.
9330 (java_parse_file): Likewise.
9331
62c9aa5f 93322002-03-28 Jan Hubicka <jh@suse.cz>
f5eb5fd0
JH
9333
9334 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
9335
c187b20e
BM
93362002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9337
9338 * parse.y (resolve_package): Initialize "decl".
9339 (lookup_package_type): Remove unused function.
9340
2f418289
BM
93412002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9342
9343 Fix for PR java/5993:
9344 * parse.y (resolve_package): Return the decl if resolution was
2c7e9098 9345 successful. Don't special case "java.lang" and "java.lang.reflect"
2f418289
BM
9346 packages. Set type_name to the merged identifier.
9347 (resolved_qualified_expression_name): Print error using "name" if
9348 resolve_package returns NULL_TREE.
9349
39bea374
TT
93502002-03-27 Tom Tromey <tromey@redhat.com>
9351
9352 * expr.c (expand_invoke): Don't generate null pointer check if
9353 we're calling <init>.
9354
c9d892a8
NB
93552002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
9356
9357 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
9358 fix prototype.
9359 * java-tree.h (java_lang_expand_expr): Similarly.
9360 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9361 (java_init): Don't set hook.
9362
05833095
BM
93632002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9364
9365 Fix for PR java/5850:
9366 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
9367 context if field was not found in the current scope.
9368 * expr.c (lookup_field): Don't look in enclosing contexts.
9369
c8c21a8c
TT
93702002-03-26 Tom Tromey <tromey@redhat.com>
9371
9372 Fix for PR java/5942:
9373 * parse.y (init_src_parse): Added sanity check.
9374 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
9375 elements, not 11.
9376
4f0ade92
NB
93772002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
9378
9379 * decl.c (lang_mark_tree): Rename java_mark_tree.
9380 * java-tree.h (java_mark_tree): New.
9381 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9382
15e5ad76
ZW
93832002-03-25 Zack Weinberg <zack@codesourcery.com>
9384
9385 * lex.c: Change java_perform_atof to take normal parameters
9386 instead of a pointer to a parameter block. Call it directly
9387 from java_lex.
9388
caaabaa1
MW
93892002-03-22 Mark Wielaard <mark@klomp.org>
9390
9391 Fix for PR java/5368:
9392 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
9393 when printing error message.
9394
c88770e9
NB
93952002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
9396
9397 * decl.c (maybe_build_cleanup): Remove.
9398
c58408bf
TT
93992002-03-22 Tom Tromey <tromey@redhat.com>
9400
9401 Andrew Haley <aph@cambridge.redhat.com>
9402
9403 * expr.c (build_field_ref): Don't build a check if the field is a
9404 member of `this'.
9405
6c18d181
EB
94062002-03-21 Eric Blake <ebb9@email.byu.edu>
9407
9408 Fix for PR java/6026:
9409 * lex.c (java_lex): Fix parsing of consecutive floats.
9410
a5778545
TT
94112002-03-21 Tom Tromey <tromey@redhat.com>
9412
9413 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
9414 class.
9415
43577e6b
NB
94162002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
9417
9418 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9419 insert_block, getdecls, kept_level_p, global_bindings_p): New.
9420
fe911510
NF
94212002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9422
2c7e9098 9423 * gcj.texi: @code{gcj} becomes @command{gcj}.
15e5ad76
ZW
9424 @code{gcc} becomes @command{gcc}.
9425 GcjRaw changed to gnu.gcc.RawData.
9426
7afff7cf
NB
94272002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
9428
9429 * decl.c (start_java_method): Use new hook.
9430 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9431 (java_init): Remove old hook.
9432
c2d8e20a
APB
94332002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
9434
9435 * builtins.c (define_builtin): Do nothing if `type' is null.
9436 Fixes PR java/5876.
9437
6befbee5
BM
94382002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9439
9440 * parse.y (parser_check_super_interface): Fix error message
9441 grammar/order.
9442
320c81a6
KG
94432002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9444
9445 * jcf-parse.c (get_constant): Delete unused variables.
9446
52dabb6c
NB
94472002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
9448
9449 * java-tree.h (java_parse_file): New.
9450 * jcf-parse.c (yyparse): Rename java_parse_file.
9451 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9452
568d1435
BM
94532002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9454
9455 * parse.y (craft_constructor): Return the constructor decl.
9456 (java_expand_classes): Update comments.
9457 (lookup_method_invoke): Call fix_constructors immediately for
9458 anonymous class. Fixes PR java/5935.
9459
8d39b447
AG
94602002-03-15 Anthony Green <green@redhat.com>
9461
9462 * jcf-parse.c (yyparse): Don't emit class registration
9463 constructor when compiling resource files.
9464
2f9834e8
KG
94652002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9466
9467 * lang.c (java_tree_code_type, java_tree_code_length,
9468 tree_code_name): Delete.
9469 (tree_code_type, tree_code_length, tree_code_name): Define.
9470 (java_init): Don't try to copy into the various tree_code
9471 arrays.
9472
f792bce5
TT
94732002-03-12 Tom Tromey <tromey@redhat.com>
9474
8a611251
TT
9475 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9476 UTF-8, not UCS-2. Fixes PR java/5923.
9477
f792bce5
TT
9478 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9479 a call_expr wrapped in a convert. Fixes PR java/5848.
9480
acf8bc25
BM
94812002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9482
9483 * jcf-write.c (write_classfile): Improve error strings.
9484
e0b1c206
EB
94852002-03-11 Eric Blake <ebb9@email.byu.edu>
9486
9487 * lex.c: Adjust comments to GNU standards.
9488
94892002-03-11 Eric Blake <ebb9@email.byu.edu>
9490
9491 Fix for PR java/5902:
9492 * lex.c (java_lex): Fix parsing of literals.
9493
884523df
BM
94942002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9495
9496 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9497 to prevent it getting evaluated twice in the store checking case.
9498 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9499 examining OBJECT.
9500
45597167
BM
95012002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9502
9503 * decl.c (java_init_decl_processing): Make sure class_type_node
9504 alignment is not less than 64 bits if hash synchronization is enabled.
9505
edcc88c1
PB
95062002-03-08 Per Bothner <per@bothner.com>
9507
9508 * parse.y (java_complete_lhs): Check if patch_assignment
9509 returned an error-mark.
9510
9511 * parse.y (try_builtin_assignconv): Don't special-case zero.
9512
5295f849
PB
95132002-03-08 Per Bothner <per@bothner.com>
9514
9515 Fix for PR java/5812.
9516 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
be3ac45e 9517 here instead of in JSR macro. Likewise with load_type_state call.
5295f849 9518 Do the latter on if the return_pc has been verified (the jsr returns).
be3ac45e 9519 (JSR): Now just call build_java_jsr.
5295f849 9520
d3e1c36d
JS
95212002-03-07 Jeff Sturm <jsturm@one-point.com>
9522
9523 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9524 (java.install-common): Link native driver to
9525 JAVA_TARGET_INSTALL_NAME.
9526
6d6b5cd7
DB
95272002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
9528
9529 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9530 * builtins.c(sin_builtin): Likewise
9531 * builtins.c(sqrt_builtin): Likewise
9532
ba31d94e
ZW
95332002-03-03 Zack Weinberg <zack@codesourcery.com>
9534
9535 * java/expr.c, java/jcf-parse.c, java/lex.c:
9536 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9537 REAL_ARITHMETIC blocks unconditional. Delete some further
9538 #ifdef blocks predicated on REAL_ARITHMETIC.
9539
ca7558fc
KG
95402002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9541
9542 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9543 explicit sizeof/sizeof.
9544 * decl.c (java_init_decl_processing): Likewise.
9545 * jcf-parse.c (init_jcf_parse): Likewise.
9546 * parse.y (init_src_parse): Likewise.
9547
2a85660d
PB
95482002-03-02 Per Bothner <per@bothner.com>
9549
9550 Make --CLASSPATH by a synonym for --classpath and -classpath.
9551 Implement --bootclasspath.
9552 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
9553 (classpath_l): Remove.
9554 (jcf_path_CLASSPATH_arg): Remove.
9555 (jcf_path_bootclasspath_arg): New function.
9556 (jcf_path_seal): Simplify accordingly.
9557
9558 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
9559 (jcf_path_CLASSPATH): Remove declaration.
9560 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
9561 (lang_specific_driver): Translate -bootclasspath.
9562 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
9563 * lang.c (decode_lang_options): Do jcf_path_init first.
9564 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
9565 * gjavah.c: Also handle --bootclasspath.
9566 Handle --CLASSPATH as a synonum for --classpath.
9567 * jcf-dump.c: Likewise.
9568
9569 "." is not part of system path, but is the default for --classpath.
9570 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
9571 (jcf_path_seal): Add "." if no CLASSPATH specified.
9572
9573 * gcj.texi: Document changes.
9574
2060fd4c
BM
95752002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9576
9577 * expr.c (build_java_arraystore_check): Fix formatting.
9578
4f647d52
APB
95792002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9580
9581 Fix for PR java/5758, java/5632:
9582 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9583 inner-class separator too.
9584 * parse.y (do_resolve_class): New local `decl_result.'
9585 Progressively build a name for what can have been loaded.
9586
022dcc46
BM
95872002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9588
9589 * expr.c (java_array_data_offset): Removed function.
9590 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9591 (build_java_array_length_access): Obtain "length" value using a
9592 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9593 (build_java_arrayaccess): Correct comment. Access "data" using a
9594 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9595 (build_java_arraystore_check): New function.
9596 (expand_java_arraystore): Use build_java_arraystore_check.
9597 * parse.y (patch_assignment): Simplify code to insert a store check
9598 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9599 * check-init.c (check_init): Update to reflect that an array length
9600 access is now a COMPONENT_REF.
9601 * gcj.texi (Code Generation): Improve documentation of
9602 -fno-bounds-check. Add documentation for -fno-store-check.
9603 * java-tree.h (flag_store_check): Declare.
9604 (build_java_arraystore_check): Declare.
9605 * lang.c (flag_store_check): Initialize to 1.
9606 (lang_f_options): Add store-check option.
9607 * jvspec.c: Don't pass store-check option to jvgenmain.
9608 * lang-options.h: Add help string for -fno-store-check.
9609
63e1b1c4
NB
96102002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
9611
9612 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9613 * java-tree.h (java_dup_lang_specific_decl): New.
9614 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9615
f458d1d5
ZW
96162002-02-27 Zack Weinberg <zack@codesourcery.com>
9617
9618 * builtins.c, decl.c: Delete traditional-mode-related code
9619 copied from the C front end but not used, or used only to
9620 permit the compiler to link.
9621
d2fb5329
TT
96222002-02-22 Tom Tromey <tromey@redhat.com>
9623
9624 Fix for PR java/2369:
9625 * jvspec.c (verify_class_name): New function.
9626 (lang_specific_driver): Call it.
9627 (JAVA_START_CHAR_P): New macro.
9628 (JAVA_PART_CHAR_P): Likewise.
9629
dcb36804
PB
96302002-02-22 Per Bothner <per@bothner.com>
9631
022dcc46 9632 * class.c: Change vtable to be more compatible with g++ v3 abi.
dcb36804
PB
9633 (get_dispatch_table): Prepend offset-to-top (always 0) and
9634 type_info pointer (currently unimplemented hence NULL) to vtable.
9635 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9636 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
9637 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9638 (build_dtable_decl): Add declarations for new fields.
9639
453c182f
PB
96402002-02-20 Per Bothner <per@bothner.com>
9641
9642 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9643 to finit$ (otherwise generate_bytecode_insns drops it). However, we
9644 don't need to set it on the COMPOUND_EXPR - the caller does that.
9645
3babb2e3
NF
96462002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9647
15e5ad76
ZW
9648 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9649 `--CLASSPATH' becomes `--classpath.'
9650 * gjavah.c: Likewise.
9651 * jcf-dump.c: Likewise.
9652 * lang-options.h: Likewise.
9653 * lang.c: Likewise.
9654 * jcf-path.c: Updated comment.
9655 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9656 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9657 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9658 (jcf_path_CLASSPATH_arg): Ditto.
9659 (classpath_u): Updated leading comment.
3babb2e3 9660
9fe2cc05
PB
96612002-02-20 Per Bothner <per@bothner.com>
9662
9663 * builtins.c (check_for_builtin): New function.
9664 (build_call_or_builtin): Remove.
9665 * java-tree.h: Update accordingly.
9666 * expr.c (expand_invoke): Use build + check_for_builtin instead
9667 of build_call_or_builtin.
9668 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
9669 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9670 flag (which had caused jcf-write to incorrectly emit invokevirtual).
9671
6b6294f1
TT
96722002-02-17 Tom Tromey <tromey@redhat.com>
9673
9674 * java-tree.h (TYPE_STRICTFP): New macro.
9675 (struct lang_type) [strictfp]: New field.
9676 (CLASS_STRICTFP): New macro.
9677 (METHOD_STRICTFP): New macro.
9678 (struct lang_decl) [strictfp]: New field.
9679 * parse.y (method_header): Disallow strictfp constructor or
9680 abstract method.
9681 (STRICT_TK): Move before MODIFIER_TK.
9682 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9683 (METHOD_MODIFIERS): Likewise.
9684 (INTERFACE_MODIFIERS): Likewise.
9685 * jcf-write.c (get_access_flags): Likewise.
9686 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9687 (add_method_1): Likewise.
9688 (get_access_flags_from_decl): Likewise.
9689 * jcf-dump.c (print_access_flags): Print in standard order. Also,
9690 recognize strictfp flag.
9691 * jcf.h (ACC_STRICT): New define.
9692
5667c33d
DB
96932002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
9694
9695 * class.c(build_utf8_ref): Move declaration of decl_size
9696
5d65aeb7
TT
96972002-02-07 Tom Tromey <tromey@redhat.com>
9698
9699 * gcj.texi (Input Options): --CLASSPATH does not suppress system
9700 path.
9701
10c45943
AG
97022002-02-04 Anthony Green <green@redhat.com>
9703
9704 * class.c (build_utf8_ref): Put UTF-8 constants into merged
9705 sections if available.
9706
14b71055
BM
97072002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9708
9709 * parse.y (java_expand_classes): Fix typo in static field loop.
9710
f0c75752
RH
97112002-02-02 Richard Henderson <rth@redhat.com>
9712
9713 * class.c (add_field): Mark static fields external.
9714 (build_class_ref): Remove redundant set.
9715 * parse.y (java_expand_classes): Mark static fields of classes
9716 to be compiled as local.
9717 * jcf-parse.c (parse_class_file): Likewise.
9718
d4ad1c90
NF
97192002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
9720
9721 * gcj.texi (About CNI): New node.
9722
58fae3f7
CR
97232002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
9724
9725 PR java/5080
9726 * jcf-parse.c : Check for HAVE_LOCALE_H before using
9727 setlocale() with LC_CTYPE as a parameter.
9728 * jv-scan.c: Same.
9729
8512bbd7
JM
97302002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
9731
9732 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9733 Follow GNU Coding Standards for --version.
9734
adc8cb5d
TT
97352002-01-28 Tom Tromey <tromey@redhat.com>
9736
9737 * expr.c (build_jni_stub): Ensure storage for `meth' is
9738 generated.
9739 * parse.y (java_complete_expand_methods): Set
9740 current_function_decl before building JNI stub.
9741
1d8478d7 97422002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
15e5ad76 9743
1d8478d7
AT
9744 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9745 BUILT_IN_SQRTF.
9746
fec763fc
TT
97472002-01-22 Tom Tromey <tromey@redhat.com>
9748
9749 * decl.c (java_init_decl_processing): Use add_predefined_file.
9750 Predefine RawData.java.
9751 (predef_filenames): Removed.
9752 (java_init_decl_processing): Don't register predef_filenames.
9753 * jcf-parse.c (add_predefined_file): New function.
9754 (predefined_filename_p): Rewrote.
9755 (predefined_filename_p): No longer static.
9756 * decl.c (java_init_decl_processing): Call initialize_builtins.
9757 * Make-lang.in (JAVA_OBJS): Added builtins.o.
9758 (java/builtins.o): New target.
9759 * builtins.c: New file.
9760 * parse.y (patch_invoke): Use build_call_or_builtin.
9761 * java-tree.h (build_call_or_builtin): Declare.
9762 (initialize_builtins): Declare.
9763 (java_set_exception_lang_code): Removed unused declaration.
9764 (PREDEF_FILENAMES_SIZE): Removed.
9765 (java_tree_index): Added JTI_PREDEF_FILENAMES.
9766 (predef_filenames): New define.
9767 (add_predefined_file): Declare.
9768 (predefined_filename_p): Declare.
9769 * expr.c (expand_invoke): Use build_call_or_builtin.
9770
cc586d70
KG
97712002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9772
9773 * parse.y (patch_switch_statement): Fix format specifier.
9774
0df29596
TT
97752002-01-16 Tom Tromey <tromey@redhat.com>
9776
9777 More for PR java/5365:
9778 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9779 default.
9780 (process_file): Generate include for
9781 java.lang.UnsupportedOperationExceptions.
9782
e1886ae0
AJ
97832002-01-15 Andreas Jaeger <aj@suse.de>
9784
9785 * .cvsignore: Add man pages.
9786
9c874875
TT
97872002-01-15 Tom Tromey <tromey@redhat.com>
9788
9789 Fix for PR java/5365:
9790 * gjavah.c (process_file): Turn class name into a file name.
9791
707635f9
MK
97922002-01-14 Matthias Klose <doko@debian.org>
9793
9794 * gcj.texi: Fix whitespace and formatting errors in the
9795 synopsis of the man pages. Update copyright.
9796
e6a5e462
TT
97972002-01-14 Tom Tromey <tromey@redhat.com>
9798
9799 For PR libgcj/5303:
9800 * Make-lang.in (java.install-man): Handle jv-convert man page.
9801 (java.generated-manpages): Added jv-convert.1.
9802 (java.uninstall): Remove jv-convert.1.
9803 (java.maintainer-clean): Likewise.
9804 ($(srcdir)/java/jv-convert.1): New target.
9805 * gcj.texi (Top): Link to jv-convert node.
9806 (Individual utilities): Likewise.
9807 (Invoking jv-convert): New node.
9808
0b0d4c5b 98092001-01-10 Jeff Sturm <jsturm@one-point.com>
f0c75752 9810 Martin Kahlert <martin.kahlert@infineon.com>
0b0d4c5b
JS
9811
9812 * jcf-parse.c (get_constant): Don't swap lo/hi for big
9813 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9814
c0b65ff1 98152002-01-03 Graham Stott <grahams@redhat.com>
79ab76fd 9816
f0c75752
RH
9817 * class.c (compile_resource_file): Update copyright date.
9818 Constify filename parameter.
9819 (java-tree.h): Update copyright date.
9820 (compile_resource_file): Constify filename parameter.
79ab76fd 9821
22e85ed4
GS
98222002-01-03 Graham Stott <grahams@redhat.com>
9823
f0c75752
RH
9824 * gcc/jcf-parse.c: Update copyright date.
9825 (yyparse): Constify resource_filename.
22e85ed4 9826
5e65297b
KG
98272002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9828
9829 * parse.y (src_parse_roots): Don't needlessly zero init.
9830
12cfb4fc
TT
98312001-12-31 Tom Tromey <tromey@redhat.com>
9832
9833 * parse.y (dump_java_tree): New function.
9834 (source_end_java_method): Call it.
9835 (end_class_declaration): Likewise.
9836 * lang.c (java_decode_option): Call dump_switch_p.
9837
dab722ee
TT
98382001-12-28 Tom Tromey <tromey@redhat.com>
9839
9840 * gen-table.pl: Don't process characters after \uffff. Added
9841 comment pointing to input file.
9842
7b0295ab
KG
98432001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9844
9845 * gen-table.pl: Const-ify output. Document the location of a
9846 suitable unicode input file.
9847
9848 * chartables.h: Regenerate.
9849
c083a819
KG
98502001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9851
9852 * chartables.h: Const-ify.
9853 * gjavah.c (options): Likewise.
9854 * jcf-dump.c (options): Likewise.
9855 * jv-scan.c (options): Likewise.
9856 * lex.c (java_start_char_p, java_part_char_p): Likewise.
9857 * parse.y (binop_lookup): Likewise.
9858
0b5826ac
KG
98592001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9860
9861 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
9862 the static arrays that are output.
9863 * jvspec.c (jvgenmain_spec): Make static.
9864 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
9865 * keyword.h: Regenerate.
9866 * lang.c (string_option, process_option_with_no, lang_f_options,
9867 lang_W_options): Const-ify.
9868 * lex.c (java_lex): Likewise.
9869
9a07cfaf
RH
98702001-12-21 Richard Henderson <rth@redhat.com>
9871
9872 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
9873 (get_boehm_type_descriptor): ... here. Arrange for the
9874 TREE_TYPE to get set properly.
9875
f44fefca
RH
98762001-12-21 Richard Henderson <rth@redhat.com>
9877
ef969525
RH
9878 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
9879 only if the target requires collect2.
9880
f44fefca
RH
9881 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
9882
84a944b3
TT
98832001-12-20 Tom Tromey <tromey@redhat.com>
9884
9885 For PR java/4509:
9886 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
9887 CAN_COMPLETE_NORMALLY for the node.
9888 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
9889 generate code for second branch if first branch can't complete
9890 normally.
9891 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
9892 the loop head if the loop body can't complete normally.
9893
2d93b924
TT
98942001-12-20 Tom Tromey <tromey@redhat.com>
9895
9896 For PR java/4766:
9897 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
9898 case where `finally' clause can't complete normally.
9899
f2af50db
TT
99002001-12-20 Tom Tromey <tromey@redhat.com>
9901
9902 Fixes PR java/5057:
9903 * parse.y (analyze_clinit_body): Added this_class parameter.
9904 Check for more cases where we must keep <clinit>.
9905 (maybe_yank_clinit): Cleaned up flow control.
9906
7899e8b9
BM
99072001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9908
e1886ae0 9909 * decl.c (java_init_decl_processing): Don't initialize
7899e8b9
BM
9910 finit_leg_identifier_node.
9911 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
9912 (finit_leg_identifier_node): Remove.
9913 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
9914
de4984af
BM
99152001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9916
e1886ae0 9917 * mangle.c (mangle_member_name): Don't special-case for
de4984af
BM
9918 NO_DOLLAR_IN_LABEL.
9919 * mangle_name.c (unicode_mangling_length): Likewise.
9920 (append_unicode_mangled_name): Likewise.
9921 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
9922 code.
9923
08514ae4
BM
99242001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9925
9926 * expr.c (build_java_array_length_access): Don't force null pointer
9927 check unless flag_check_references is set.
9928
56b8325e
TT
99292001-12-20 Tom Tromey <tromey@redhat.com>
9930
9931 Fix for PR java/3417:
9932 * parse.y (patch_assignment): Added special processing for
9933 `return'.
9934 (patch_return): Don't convert booleans to integers, and don't
9935 special-case `null'.
9936
38be19f6
JM
99372001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
9938
9939 * config-lang.in (diff_excludes): Remove.
9940
b11cc610
JM
99412001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
9942
9943 * gcj.texi: Update link to GCC manual.
9944
e97562f5
TT
99452001-12-17 Tom Tromey <tromey@redhat.com>
9946
9947 * parse.y (link_nested_class_to_enclosing): Removed useless
9948 statement.
9949
2c5187c5
TT
99502001-12-16 Tom Tromey <tromey@redhat.com>
9951
9952 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
9953 Fixes PR java/5088.
9954
a83f01f0
JM
99552001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
9956
9957 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
9958 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
9959 spelling errors.
9960
faf31866
KG
99612001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9962
9963 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
9964
9a8de998
BM
99652001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9966
9967 * decl.c (java_init_decl_processing): Build otable_type correctly.
9968 otable_decl is an otable_type.
9969
861ef928
BM
99702001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9971
9972 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
e1886ae0 9973 otable_type, otable_ptr_type, method_symbol_type,
861ef928
BM
9974 method_symbols_array_type, method_symbols_array_ptr_type): New
9975 field/global tree definitions.
9976 (flag_indirect_dispatch): New flag.
e1886ae0 9977 * decl.c (java_init_decl_processing): Initialize new otable and
861ef928
BM
9978 otable_syms type nodes and decls. Add new field "index" to
9979 method_type_node.
9980 * class.c (build_method_symbols_entry): New function.
9981 (make_method_value): Set "index" to to method's vtable index for
9982 virtual methods when indirect-dispatch is not used.
a83f01f0 9983 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
861ef928
BM
9984 and set vtable_method_count to -1. Set otable and otable_syms field
9985 if indirect-dispatch is used and there was something to put in them.
9986 (build_method_symbols_entry): New function.
9987 (emit_offset_symbol_table): New function.
9988 * expr.c (get_offset_table_index): New function.
e1886ae0 9989 (build_invokevirtual): Build array reference to otable at the index
861ef928
BM
9990 returned by get_offset_table_index, and use the result as the vtable
9991 offset.
9992 (build_invokeinterface): Similar.
e1886ae0
AJ
9993 * jcf-parse.c (yyparse): If indirect-dispatch, call
9994 emit_offset_symbol_table at the end of compilation, after all classes
861ef928
BM
9995 have been generated.
9996 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
9997 * lang.c (flag_indirect_dispatch): Define.
9998 (lang_f_options): Add indirect-dispatch flag.
9999
f1727481
MK
100002001-12-14 Matthias Klose <doko@debian.org>
10001
10002 * gcj.texi: Markup for man page generation. Document missing
10003 options printed by <tool> --help.
10004 Terminate description of gij's -ms option with a dot.
10005 * Make-lang.in ($(srcdir)/java/*.1): New targets.
10006 (java.generated-manpages java.install-man, java.uninstall,
10007 java-maintainer-clean) Updated.
10008
eec87542
HB
100092001-12-14 Hans Boehm <Hans_Boehm@hp.com>
10010
10011 * class.c (get_dispatch_table): Fix java vtable layout
10012 for TARGET_VTABLE_USES_DESCRIPTORS.
10013 * decl.c (java_init_decl_processing): Initialize
10014 alloc_no_finalizer_node, finalize_identifier_node.
10015 * expr.c (class_has_finalize_method): New function.
10016 (expand_java_NEW): Generate calls for finalizer-free allocation.
10017 (build_invokevirtual): Fix java vtable layout for
10018 TARGET_VTABLE_USES_DESCRIPTORS.
e1886ae0 10019 * java-tree.h (enum java_tree_index): New entries:
eec87542
HB
10020 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
10021 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
10022 (class_has_finalize_method): declare.
10023 (HAS_FINALIZER_P): New macro.
10024 * parse.y (patch_invoke): Generate calls for finalizer-free
10025 allocation.
10026
81deb0a3
MK
100272001-12-12 Matthias Klose <doko@debian.org>
10028
10029 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
10030 whitespace at end of line.
10031
34026199
TT
100322001-12-11 Tom Tromey <tromey@redhat.com>
10033
10034 * lex.c (java_init_lex): Define wfl_to_string as
10035 gnu.gcj.runtime.StringBuffer unless generating bytecode.
10036
a3bcfa67
JS
100372001-12-11 Jeff Sturm <jsturm@one-point.com>
10038
10039 * class.c (make_method_value): Use null_pointer_node to
10040 represent empty exception table.
10041
3afdfae8
TT
100422001-12-10 Tom Tromey <tromey@redhat.com>
10043
10044 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
10045
62c9aa5f 100462001-12-10 Douglas B. Rupp <rupp@gnat.com>
96a9c44f
DR
10047
10048 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
10049
a5cb134d
PB
100502001-12-09 Per Bothner <per@bothner.com>
10051
10052 * check-init.c (current_switch_has_default): New static field.
10053 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
10054 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
10055 DEFAULT_EXPR seen, simulate a default alternative that copies state.
10056
1aca9b81
TT
100572001-12-09 Tom Tromey <tromey@redhat.com>
10058
10059 * check-init.c (check_init): Don't allow pre- or post- increment
10060 or decrement of final variable.
10061 (final_assign_error): Minor error message rewording.
10062
4440ffc4
TT
100632001-12-08 Tom Tromey <tromey@redhat.com>
10064
0854b1c4
TT
10065 * java-tree.h: Fixed typo.
10066
5fcab235
TT
10067 * gjavah.c (decompile_method): Don't decompile to `return this'
10068 for static methods.
10069
7b35f6c9
TT
10070 * gjavah.c (cxx_keywords): Re-sorted.
10071 * lex.c (cxx_keywords): Re-sorted.
10072
897c9e66
TT
10073 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
10074 else.
10075
4440ffc4
TT
10076 * gjavah.c (print_namelet): Clear subnamelets.
10077 (HANDLE_METHOD): Set `method_printed' earlier.
10078
8f25dc28
TT
100792001-12-07 Tom Tromey <tromey@redhat.com>
10080
10081 * lang.c (lang_f_options): Added
10082 optimize-static-class-initialization.
10083 (java_decode_option): Removed special case.
10084
a9040c77
PB
100852001-12-07 Per Bothner <per@bothner.com>
10086
10087 * check-init.c (check_init): Fix typo freeing memory twice.
10088
5412ef6b
PB
100892001-12-05 Per Bothner <per@bothner.com>
10090
10091 Restore support for static class initialization optimization.
10092 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
10093 * check-init.c (check_int): At end of BLOCK handle initialization
10094 blocks, which used to be done in java_complete_expand_method but did
10095 not handle the case where check_for_initialization might allocate
10096 more than a word of bits.
10097 * decl.c (lang_make_tree): The smic field is now a tree.
10098 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
10099 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
10100
10101 * parse.y (emit_test_initialization): Combine hash_lookup calls.
10102
10103 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
10104 Change from a hash table to a list.
10105 (struct_lang_decl): Change field 'smic' to match.
10106 * class.c (add_method_1): Initialize
10107 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
10108 * parse.y (adjust_init_test_initialization): Removed - inlined into -
10109 (java_expand_method_bodies): -here, since 'smic' is now a list.
10110 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
10111
10112 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
10113
10114 * class.c (java_hash_compare_tree_node): Fix casts.
10115
4f88ccda
PB
101162001-12-04 Per Bothner <per@bothner.com>
10117
10118 * check-init.c: Handle definite unassignment to finals in addition
10119 to definite assignment.
10120 (loop_current_locals): New field.
10121 (num_current_locals, int start_current_locals, num_current_words):
10122 Make static.
10123 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
10124 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
10125 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
10126 (get_variable_decl, check_final_reassigned): New functions.
10127 (check_init, check_bool_init): Modify as needed for checking finals.
10128 (check_for_initialization): Take extra parameter and return void.
10129 Do extra start-up logic to check final fields for assignment.
10130 * parse.y (check_static_final_variable_assignment_flag,
10131 reset_static_final_variable_assignment_flag, check_final_assignment,
10132 check_final_variable_local_assignment_flag,
10133 reset_final_variable_indirect_assignment_flag,
10134 reset_final_variable_global_assignment_flag): Remove functions.
10135 (java_complete_expand_methods, outer_field_access_fix,
10136 patch_assignment): Remove no-longer used logic.
10137 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
10138 * parse.y (register_fields, java_complete_tree): Update accordingly.
10139
10140 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
10141 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
10142 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
10143
10144 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
10145
10146 * java-tree.h (DECL FINAL): New bit-field.
10147 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
10148 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
10149 (DECL_INIT_CALLS_THIS): New macro.
10150 (struct lang_decl): New bit-field init_calls_this.
10151 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
10152 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
10153 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
10154 use it for both local variables and final fields.
10155 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
10156 and local_final.
10157 (struct lang_type): Remove hfv bit-field.
10158 (check_for_initialization): Change to return void.
10159
10160 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
10161 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
10162 * check-init.c (final_assign_error): New helper function.
10163 (check_final_reassigned, check_init): Use it.
10164 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
e1886ae0 10165
4f88ccda
PB
10166 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
10167 bit-fields to unsigned.
10168
87d4ad08
PB
101692001-12-03 Per Bothner <per@bothner.com>
10170
10171 * parse.y (patch_binop): Minor constant folding.
10172
10173 * parse.y (build_current_thisn): Shorter 'buffer'.
10174
aedcdb65
PB
101752001-12-03 Per Bothner <per@bothner.com>
10176
10177 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
10178 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
10179 * jcf-write.c (generate_bytecode_insns): Remove support for
10180 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
10181 * check-init.c (check_init): Likewise.
10182
82ff672e
PB
101832001-12-03 Per Bothner <per@bothner.com>
10184
10185 * verify.c (subroutine_nesting): New function.
10186 (verify_jvm_instructions): Use it to fix logic for checking that
10187 we're done with the current subroutine.
10188
10189 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
10190 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
10191
98a63868
PB
101922001-12-03 Per Bothner <per@bothner.com>
10193
10194 * jcf.h: Fix obvious typo in comment.
10195 * typeck.c (build_null_signature): Add comment.
10196
c725bd79
NB
101972001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
10198
10199 * expr.c: Remove leading capital from diagnostic messages, as
10200 per GNU coding standards.
10201 * jcf-io.c: Similarly.
10202 * jcf-parse.c: Similarly.
10203 * jv-scan.c: Similarly.
10204 * jvspec.c: Similarly.
10205 * mangle.c: Similarly.
10206
b736dee6
TCH
102072001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
10208 Alexandre Petit-Bianco <apbianco@redhat.com>
10209
e1886ae0 10210 * expr.c (build_java_arrayaccess): Call save_expr on array for
7e5f4bee 10211 correct evaluation order, modified comment, fixed indentation.
b736dee6
TCH
10212 * parse.y: (patch_assignment): Correctly extract the array base
10213 from the tree generate by build_java_arrayaccess, added comments.
10214 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
10215 Fixes PR java/3096, PR java/3803, PR java/3965.
10216
357351e5
NB
102172001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
10218
10219 * expr.c (expand_byte_code): Remove trailing periods from messages.
10220 * jcf-parse.c (load_class, jcf_parse): Similarly.
10221 * jcf-write.c (generate_classfile): Similarly.
10222 * lex.c (java_lex): Similarly.
10223
a7c5337d
BM
102242001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10225
10226 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
10227
d3945f0a
JM
102282001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
10229
10230 * Make-lang.in (java.generated-manpages): New dummy target.
10231
b856c15d
RO
102322001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10233
10234 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10235 ASM_FINAL_SPEC.
10236 (lang_specific_pre_link): Use set_input to set input_filename.
10237 Append `main' here.
10238 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10239 (main): Fix definition.
10240 Strip `main' from classname.
10241 Fixes PR java/227.
10242
9c2fcf09
RS
102432001-11-18 Roger Sayle <roger@eyesopen.com>
10244
10245 * parse.h (java_expand_switch): Remove old prototype.
10246
8aeb42d0
TT
102472001-11-18 Tom Tromey <tromey@redhat.com>
10248
10249 Fix for PR java/1401:
10250 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
10251 arg0 is null.
10252 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
10253 correctly.
10254
22703ccc
NB
102552001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
10256
10257 * lang.c (finish_parse): Rename to java_finish.
10258 (LANG_HOOKS_FINISH, java_finish): New.
10259
f5e99456
NB
102602001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
10261
10262 * decl.c (init_decl_processing): Rename java_init_decl_processing.
10263 * java-tree.h: New prototype.
10264 * lang.c (java_init): Update prototype. Combine with old init_parse.
10265
150f086d
TT
102662001-11-13 Tom Tromey <tromey@redhat.com>
10267
10268 * gjavah.c (method_signature): New global.
10269 (HANDLE_METHOD): Set it.
10270 (decompile_return_statement): New function.
10271 (decompile_method): Use it.
10272 (print_method_info): Removed `synth' argument.
10273
5d69f816
NB
102742001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10275
10276 * java-tree.h (java_set_yydebug): New.
10277 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
10278 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
10279 (print_lang_decl, print_lang_type, print_lang_identifier,
10280 print_lang_statistics, lang_print_xnode): Remove.
10281
3ac88239
NB
102822001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
10283
10284 * jcf-parse.c (init_lex): Remove.
10285 * lang.c (language_string, lang_identify): Remove.
10286 (struct lang_hooks): Constify.
10287 (LANG_HOOKS_NAME): Override.
10288 (init_parse): Update.
10289
b21d216c
AF
102902001-11-08 Andreas Franck <afranck@gmx.de>
10291
e1886ae0 10292 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
b21d216c
AF
10293 program_transform_name the way suggested by autoconf.
10294 (java.install-common): Also transform auxiliary program names with
10295 program_transform_name.
10296
1fa73144
TT
102972001-11-08 Tom Tromey <tromey@cygnus.com>
10298
10299 * parse.y (trap_overflow_corner_case): New rule.
10300 (unary_expression): Use it.
10301 * lex.c (java_init_lex): Don't set minus_seen.
10302 (yylex): Don't use minus_seen. Communicate overflow to parser for
10303 it to handle.
10304 (error_if_numeric_overflow): New function.
10305 * parse.h (minus_seen): Removed field.
10306 (JAVA_RADIX10_FLAG): New define.
10307
5a21a051
TT
103082001-11-07 Tom Tromey <tromey@redhat.com>
10309
10310 Patch for PR java/1414:
10311 * parse.y (case_label_list): New global.
10312 (goal): Register case_label_list with GC.
10313 (java_complete_lhs): Save new case on case_label_list.
10314 (patch_switch_statement): Check for duplicate case labels.
10315
5573cb39
APB
103162001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
10317
10318 * parse.y (patch_assignment): Removed unused third argument.
10319 (java_complete_lhs): Removed unused third argument to patch_assignment.
10320
d23c55c2
NB
103212001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
10322
10323 * lang.c: Include langhooks-def.h.
10324 * Make-lang.in: Update.
10325
5b7874aa
ZW
103262001-10-31 Zack Weinberg <zack@codesourcery.com>
10327
10328 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10329
2b472f91
BM
103302001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10331
10332 * mangle.c (find_compression_record_match): Don't match compression
10333 records for package name elements unless they occur at the start of
10334 the name. Fix for PR java/4717.
10335
961b8e70
BM
103362001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10337
10338 * expr.c (expand_java_field_op): Don't special-case references to
10339 java.lang.PRIMTYPE.TYPE.
10340 (build_primtype_type_ref): Removed.
10341 * java-tree.h (build_primtype_type_ref): Remove prototype.
10342 * parse.y (maybe_build_primttype_type_ref): Removed.
10343 (complete_function_arguments): Don't special-case references to
10344 java.lang.PRIMTYPE.TYPE.
10345 (patch_assignment): Likewise.
10346 (array_constructor_check_entry): Likewise.
10347
98f705b9
APB
103482001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10349
10350 * mangle.c (static tree compression_table): Fixed leading comment.
10351 * parse.h (struct parser_ctxt): Fixed field comment.
10352 * parse.y (check_pkg_class_access): New prototype, fixed leading
10353 comment, new parameter used to emit error only if passed as true.
10354 (parse_check_super): Pass extra argument to check_pkg_class_access.
10355 (do_resolve_class): Likewise.
10356 (process_imports): Likewise.
10357 (read_import_dir): Fixed indentation.
10358 (find_in_imports_on_demand): New local class_type_name. Local
10359 node_to_use deleted. while loop changed into for loop. Report
10360 multiple definition only for accessible classes. Improved error
10361 message.
10362 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
10363 assigned to parameter list, fixed indentation. while loop changed
10364 into for loop, restore TREE_CHAIN on local `tem' before the next
10365 iteration.
10366
62c9aa5f 103672001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8ac61af7
RK
10368
10369 * lang.c (lang_get_alias_set): Deleted.
10370
0df6c2c7
KG
103712001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10372
299b5f9e
KG
10373 * gjavah.c (jni_print_char): Fix thinko in last change.
10374
0df6c2c7
KG
10375 * gjavah.c (jni_print_char, decode_signature_piece): Use
10376 safe-ctype macros and/or fold extra calls into fewer ones.
10377 * lex.c (java_read_unicode, java_lex): Likewise.
10378 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
10379 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
10380 * mangle_name.c (append_unicode_mangled_name,
10381 unicode_mangling_length): Likewise.
10382
17ed6335
RH
103832001-10-17 Richard Henderson <rth@redhat.com>
10384
10385 * Make-lang.in (java/lang.o): Depend on langhooks.h.
10386
c83303d8
APB
103872001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
10388
10389 * lang.c (langhooks.h): Included.
10390 (LANG_HOOKS_INIT): Redefined.
10391 (LANG_HOOKS_INIT_OPTIONS): Likewise.
10392 (LANG_HOOKS_DECODE_OPTION): Likewise.
10393 (struct lang_hooks lang_hooks): New initialization.
10394
be98560f
PB
103952001-10-11 Per Bothner <per@bothner.com>
10396
89b894e1
PB
10397 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
10398 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
10399 The former is simpler, and jcf-write.c handles it better.
10400 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
10401 or WITH_CLEANUP_EXPR.
10402 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
10403 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
10404
be98560f
PB
10405 * parse.y (patch_if_else_statement): If the condition is constant,
10406 optimize away the test.
10407
3fb5c0eb
APB
104082001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10409
10410 * parse.y (patch_cast): Call patch_string on the first operand of
c83303d8 10411 the incoming node, update it if necessary. Fixes PR java/4510.
3fb5c0eb 10412
908fecca
BM
104132001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10414
10415 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
10416 when name qualifier matches a package name.
10417
f3ca28bf
TT
104182001-10-08 Tom Tromey <tromey@redhat.com>
10419
10420 Fix for PR java/4489:
10421 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
10422 force a new label when computing `body_block'.
10423
8b60264b
KG
104242001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10425
10426 * jcf-io.c (format_uint): Const-ify.
10427 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
10428 * lex.c (java_get_line_col): Likewise.
10429 * parse.y (build_incdec): Likewise.
10430
3fb5c0eb
APB
104312001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10432
10433 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
c83303d8 10434 a NULL enclosing context if appropriate. Fixes PR java/4466.
3fb5c0eb 10435
7754e0a9
APB
104362001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
10437
10438 * parse.y (patch_assignment): Use lvalue's original TYPE when
10439 building the final COMPOUND_EXPR.
10440 (try_reference_assignconv): Fixed leading comment.
10441
e9546ca4
APB
104422001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
10443
10444 * parse.y (check_final_variable_indirect_assignment): For
10445 COMPOUND_EXPR, return only if finals were found initialized
10446 properly, if not, keep on checking.
10447 (check_final_variable_global_assignment_flag): New local
10448 error_found, set when appropriate and used to decide whether to
10449 report uninitialized finals. Fixed typo in comment.
10450
f6a67a81
APB
104512001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10452
10453 * decl.c (init_decl_processing): Fixed typo in predef_filenames
10454 last three initializations. Fixes PR java/4360.
10455
67231816
RH
104562001-09-21 Richard Henderson <rth@redhat.com>
10457
10458 * class.c (get_dispatch_table): Handle function descriptors.
10459 (build_dtable_decl): Likewise.
10460 * expr.c (build_invokevirtual): Likewise.
10461
870a5b8a
APB
104622001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10463
10464 * parse.y (patch_method_invocation): Build class initialization
10465 when static finals are used to qualify method invocation.
10466 Fixes PR java/4366.
10467
2e3b2d2c
APB
104682001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
10469
10470 * parse.h: (WFL_STRIP_BRACKET): Re-written using
10471 build_type_name_from_array_name.
10472 (STRING_STRIP_BRACKETS): New macro.
10473 * parse.y (build_type_name_from_array_name): New function.
10474 (array_creation_expression:): Accumulate []s instead of [s.
10475 (cast_expression:): Accumulate []s instead of [s after cast type
10476 name.
10477 (build_array_from_name): Local string deleted, use
10478 build_type_name_from_array_name.
10479 (build_unresolved_array_type): Accumulate []s instead of [s after
10480 type name.
10481 (register_fields): Fixed comment.
10482 (resolve_class): Local name, base deleted, new locals tname and
10483 array_dims. Use build_type_name_from_array_name. Use array_dims to
10484 build array type.
10485 (purify_type_name): Use STRING_STRIP_BRACKETS.
10486
e64c46ce
AJ
104872001-09-18 Andreas Jaeger <aj@suse.de>
10488
10489 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10490 * jv-scan.c: Likewise.
10491
3fb5c0eb
APB
104922001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10493
10494 * parse.y (patch_method_invocation): Inner class creation context
10495 check not enforced within constructors. Fixes PR java/1873.
10496
7a91449c
TT
104972001-09-16 Tom Tromey <tromey@redhat.com>
10498
10499 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10500 NOTE_PUSH for single-case push. Fixes PR java/4189.
10501
653d5d95
APB
105022001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10503
10504 * java-tree.h (TYPE_IMPORT_LIST): New macro.
10505 (TYPE_IMPORT_DEMAND_LIST): Likewise.
10506 (struct lang_type): New fields import_list and import_demand_list.
10507 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10508 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10509 (do_resolve_class): New local saved_enclosing_type, initialized,
10510 passed as parameter to find_in_imports and find_in_imports_on_demand.
10511 (find_in_imports): Added paramater enclosing_type, use its
10512 TYPE_IMPORT_LIST when applicable.
10513 (find_in_imports_on_demand): Added parameter enclosing_type, use
10514 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10515 declaration and initialization.
10516 (fold_constant_for_init): Switch/restore current_class to the
10517 appropriate context.
10518
6d334db8
MM
105192001-09-13 Mark Mitchell <mark@codesourcery.com>
10520
10521 * verify.c (verify_jvm_instructions): Fix typo.
10522
83182544
KG
105232001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10524
10525 * expr.c (expand_invoke): Const-ification.
10526 * parse.y (patch_method_invocation): Likewise.
10527
fd033052
KG
105282001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10529
10530 * gjavah.c (cxx_keywords): Const-ification.
10531 * keyword.gperf (java_keyword): Likewise.
10532 * lang.c (java_tree_code_name): Likewise.
10533 * lex.c (cxx_keywords): Likewise.
10534 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10535
fcbc317f
RH
105362001-09-11 Richard Henderson <rth@redhat.com>
10537
10538 * parse.h (ctxp_for_generation): Mark extern.
10539
c347e68d
RH
105402001-09-10 Richard Henderson <rth@redhat.com>
10541
10542 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10543
6a9f6727
MK
105442001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10545
10546 * typeck.c (java_array_type_length, build_prim_array_type):
10547 Represent empty arrays by NULL index.
10548
0ef02b2d
APB
105492001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
10550
10551 * java-tree.h (compile_resource_file): Grouped with other prototypes.
e64c46ce 10552 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
0ef02b2d 10553
f2767a67
AG
105542001-09-06 Anthony Green <green@redhat.com>
10555
10556 * class.c (O_BINARY): Define if necessary.
10557 (registerResource_libfunc): Declare.
10558 (init_class_processing): Initilize registerResource_libfunc.
10559 (compile_resource_file): New function.
10560 * java-tree.h (resource_name): Declare.
10561 (compile_resource_file): Declare.
10562 * jcf-parse.c (yyparse): Handle compiling java resource files.
10563 * lang.c (java_decode_option): Handle -fcompile-resource option.
10564 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10565 resource files.
10566 * gcj.texi (Code Generation): Add documentation for -R flag.
10567
731866ba
APB
105682001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10569
10570 * jcf-write.c (generate_classfile): Issue an error in case of
10571 field/initial value mismatch.
10572 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10573 being initialized and we're generating bytecode.
10574 (java_complete_lhs): In MODIFY_EXPR section: added comments,
10575 set DECL_INITIAL properly when appropriate.
10576 Fixes PR java/4230
10577 Fixes PR java/4204
10578
0286a91d
PB
105792001-09-01 Per Bothner <per@bothner.com>
10580
10581 * parse.y (maybe_yank_clinit): A field without an initializer is not
10582 relevant. All initializers except static final and constant require
10583 <clinit>, regardless of flag_emit_class_files.
10584
289b57ee
PB
105852001-08-31 Per Bothner <per@bothner.com>
10586
67264b4f 10587 * class.c (set_constant_value): When not emitting class files, then a
289b57ee
PB
10588 String ConstantValue is a utf8const_ptr_type.
10589
be0c7ff4
PB
105902001-08-30 Per Bothner <per@bothner.com>
10591
10592 * jcf-write.c (generate_classfile): Check that field is primitive
10593 or string before emitting ConstantValue attribute.
e64c46ce 10594
f0cdee96
PB
105952001-08-30 Per Bothner <per@bothner.com>
10596
10597 * parse.y (resolve_qualified_expression_name): If creating a
10598 COMPOUND_EXPR, set it's type correctly.
10599
bc8a5e56
PB
106002001-08-30 Per Bothner <per@bothner.com>
10601
10602 * jcf-io.c (open_class): Set filename field.
10603
10604 * jcf-parse,c (parse_class_file): Set current_function_decl
10605 for better error message when Code attribute is missing.
10606
10607 * lang.c (put_decl_node, lang_print_error): Re-arrange for
10608 better diagnostics, especially for constructors.
e64c46ce 10609
1b9ee723
PB
106102001-08-30 Per Bothner <per@bothner.com>
10611
10612 * jcf-write.c (generate_classfile): Don't write ConstantValue
10613 attribute if field is not final, for compatibility with jdk.
10614
10615 * jcf-write.c (generate_classfile): Convert ConstantValue values
10616 to correct type. Work-around for front-end bug.
10617 * class.c (set_constant_value): Error if constant has wrong type.
10618
6e4302ec
PB
106192001-08-30 Per Bothner <per@bothner.com>
10620
10621 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
10622 "Double" are printed at verbosity 1.
10623
10624 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
10625
10626 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
10627
3ed218d4
APB
106282001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10629
10630 * parse.y (patch_assignment): Don't verify final re-assignment here.
10631 (java_complete_lhs): Verify assignments to finals calling
10632 patch_assignment. Verify re-assignments to finals before calling
10633 patch_assignment.
10634
106352001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
10636
10637 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10638 Fixes PR java/1413
10639
106402001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
10641
10642 * lex.c (java_lex): new local found_hex_digits. Set and then used
10643 in test to reject invalid hexadecimal numbers.
10644 * parse.y (java_complete_tree): Prevent unwanted cast with
10645 initialized floating point finals.
10646 (patch_binop): Emit a warning when detecting a division by zero,
10647 mark result not constant, don't simplify non integer division.
10648
1a27eec1
PB
106492001-08-28 Per Bothner <per@bothner.com>
10650
10651 * jcf-write.c (generate_bytecode_insns): For increments and
9a07cfaf 10652 decrements just recurse to push constant. Improvement on Mark's patch.
1a27eec1 10653
06657dcd
MM
106542001-08-28 Mark Mitchell <mark@codesourcery.com>
10655
10656 * jcf-write.c (generate_bytecode_insns): Generate an integer to
10657 real conversion for increments and decrements of reals.
10658
1ca09b48
APB
106592001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
10660
10661 * parse.y (resolve_qualified_expression_name): Handle unresolved
10662 qualified expressions, prevent numerical qualifiers, fixed typo.
10663 Fixes PR java/4141
10664
7b02957e
APB
106652001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
10666
10667 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10668 don't report anything but deprecated class when marked so. Handle
10669 VAR_DECL.
10670 (patch_method_invocation): Check deprecation on methods and types.
10671 (patch_binop): code becomes an enum tree_code, added default: to
10672 switch to handle that. Detect division by zero, try to fold and
10673 return before using a subroutine.
10674
496849ba
APB
106752001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
10676
10677 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
e64c46ce 10678 file smaller than 4 bytes.
496849ba
APB
10679 * parse.y (check_inner_circular_reference): New function.
10680 (check_circular_reference): Likewise.
10681 (array_initializer:): Accept {,}.
10682 (java_check_circular_reference): Rewritten using
10683 check_circular_reference and check_inner_circular_reference.
10684 (java_complete_expand_method): Unconditionally save and restore
10685 the unpurged exception list.
10686 (build_dot_class_method_invocation): Unmangle signature parameter.
10687
66b461ce
TT
106882001-08-21 Tom Tromey <tromey@redhat.com>
10689
10690 * decl.c (init_decl_processing): Add `throws' field to method
10691 descriptor.
10692 * class.c (make_method_value): Compute `throws' field for method.
10693
df1c5346
APB
106942001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
10695
10696 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10697 circularity is detected.
10698 (ctors_unchecked_throws_clause_p): Fixed leading comment.
10699
c8af3574
RH
107002001-08-17 Richard Henderson <rth@redhat.com>
10701
10702 * class.c (emit_register_classes): Add align parameter to
10703 call to assemble_integer.
10704
17126208
APB
107052001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
10706
10707 * jcf-parse.c (load_class): New locals saved and class_loaded. If
10708 loading a class_or_name fails, try considering an innerclass name
10709 and load the enclosing context.
10710 * parse.y (resolve_inner_class): New function.
10711 (find_as_inner_class): Added leading comment.
10712 (register_incomplete_type): Keep the current context as enclosing
10713 context for JDEP_FIELD dependencies.
10714 (do_resolve_class): Locals new_class_decl and super initialized to
10715 NULL. Call resolve_inner_class, explore the enclosing context
10716 superclass if necessary.
10717 Fixes PR java/4007
10718
4266d0b2
TT
107192001-08-16 Tom Tromey <tromey@redhat.com>
10720
10721 * jcf-dump.c (main): Updated for change to jcf_path_seal.
10722 * gjavah.c (main): Updated for change to jcf_path_seal.
10723 * lang.c (version_flag): New global.
10724 (java_decode_option): Recognize `-version'.
10725 (java_init): Update for change to jcf_path_seal.
10726 * jcf.h (jcf_path_seal): Added `print' argument.
10727 * jcf-path.c (jcf_path_seal): Added `print' argument.
10728
e78d8e51
ZW
107292001-08-13 Zack Weinberg <zackw@panix.com>
10730
10731 * Make-lang.in (java/decl.o): Update dependencies.
10732 * decl.c: Include libfuncs.h, don't include toplev.h.
10733
17126208
APB
107342001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10735
10736 * decl.c (init_decl_processing): exception_type_node,
10737 class_not_found_type_node, and no_class_def_found_type_node
10738 initialized. predef_filenames augmented accordingly.
10739 instinit_identifier_node initialized.
10740 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10741 * java-tree.h (enum java_tree_index): New entries
10742 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10743 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10744 (exception_type_node): New macro.
10745 (class_not_found_type_node): Likewise.
10746 (no_class_def_found_type_node): Likewise.
10747 (instinit_identifier_node): Likewise.
10748 (PREDEF_FILENAMES_SIZE): Adjusted.
10749 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10750 (struct lang_type): Fixed typo in bitfield name.
10751 (DECL_INSTINIT_P): New macro.
10752 (ID_INSTINIT_P): Likewise.
10753 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10754 attribute.
10755 * parse.y (encapsulate_with_try_catch): New function.
10756 (generate_instinit): Likewise.
10757 (build_instinit_invocation): Likewise.
10758 (ctors_unchecked_throws_clause_p): Likewise.
10759 (add_instance_initializer): Deleted.
10760 (build_instance_initializer): Likewise.
10761 (in_instance_initializer): Likewise.
10762 (check_method_redefinition): instinit$ not to be verified.
10763 (java_complete_expand_methods): Generate instinit$, simplified code.
10764 (build_dot_class_method): Eliminated unnecessary locals. Use
10765 encapsulate_with_try_catch, removed unnecessary code.
10766 (fix_constructors): New local iii. Use build_instinit_invocation.
10767 (patch_method_invocation): Added comment.
10768 (maybe_use_access_method): Don't consider instinit$.
10769 (find_applicable_accessible_methods_list): Shorten the search for
10770 instinit$ too.
10771 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10772 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10773 (patch_throw_statement): Likewise. Fixed typo.
e64c46ce 10774
6ba57472
DE
107752001-08-12 David Edelsohn <edelsohn@gnu.org>
10776
10777 Revert:
10778 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10779 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10780 ASM_FINAL_SPEC.
10781 (lang_specific_pre_link): Use set_input to set input_filename.
10782 Append `main' here.
10783 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10784 (main): Fix definition.
10785 Strip `main' from classname.
10786 Fixes PR java/227.
10787
94aca342
ZW
107882001-08-11 Zack Weinberg <zackw@panix.com>
10789
10790 * lex.h: Don't include setjmp.h. Don't define
10791 SET_FLOAT_HANDLER or prototype set_float_handler.
10792
17126208
APB
107932001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10794
10795 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10796 `poplevel' in the right order.
10797
2cc07db4
RH
107982001-08-09 Richard Henderson <rth@redhat.com>
10799
10800 * Make-lang.in (class.o): Depend on TARGET_H.
10801 * class.c (emit_register_classes): Use target hooks instead of
10802 assemble_constructor and assemble_destructor.
10803
4009bb7d
APB
108042001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
10805
10806 * check-init.c (flags.h): Include
10807 (check_init): Don't report uninitialized static class
10808 initialization flags, don't free bit index when doing static class
10809 initialization optimization.
10810 (check_for_initialization): Return type changed to `unsigned int.'
10811 (attach_initialized_static_class): New function.
10812 * class.c (add_method_1): Create the initialized static class
10813 table if necessary.
10814 (finish_class): Always emit deferred inline methods.
10815 * decl.c (emit_init_test_initialization): Moved to expr.c
10816 (complete_start_java_method): Don't traverse
10817 DECL_FUNCTION_INIT_TEST_TABLE.
10818 (lang_mark_tree): Mark hash tables in function decls.
10819 * expr.c (emit_init_test_initialization): Moved from decl.c.
10820 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10821 initialization flag, set DECL_CONTEXT and
10822 LOCAL_CLASS_INITIALIZATION_FLAG.
10823 (java_lang_expand_expr): Emit initialization code for static class
10824 initialized flags when entering block, if necessary.
10825 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10826 * java-tree.h (flag_optimize_sci): New global variable declaration.
10827 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10828 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10829 (LOCAL_FINAL_P): Fixed typo in comment.
10830 (FINAL_VARIABLE_P): Likewise.
10831 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10832 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10833 (struct lang_decl): New fields `ict', `smic' and `cif.'
10834 (check_for_initialization): New returned value for global.
10835 (attach_initialized_static_class): New global function.
10836 (STATIC_CLASS_INIT_OPT_P): New macro.
10837 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10838 * lang.c (java_decode_option): Handle
10839 `-fno-optimize-static-class-initialization'
10840 * parse.y (start_complete_expand_method): New function.
10841 (java_expand_method_bodies): Likewise.
10842 (attach_init_test_initialization_flags): Likewise.
10843 (adjust_init_test_initialization): Likewise.
10844 (emit_test_initialization): Likewise.
10845 (java_complete_expand_methods): Nullify abstract and native method
10846 bodies.
10847 (java_complete_expand_method): New locals `fbody', `block_body'
10848 and `exception_copy.' Reorganized: directly return on empty method
10849 bodies, call `start_complete_expand_method', remember definitely
10850 initialized static class in function, don't expand method bodies.
10851 (java_expand_classes): Call `java_expand_method_bodies' before
10852 `finish_class' when compiling to native.
10853 (resolve_expression_name): Use `orig' after building outer class
10854 field access.
67264b4f 10855 (patch_invoke): Remember static method invocations.
4009bb7d 10856
47907859
RH
108572001-08-06 Richard Henderson <rth@redhat.com>
10858
9a07cfaf 10859 * class.c (emit_register_classes): Pass a symbol_ref and priority
47907859
RH
10860 to assemble_constructor.
10861
36e10d77
APB
108622001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
10863
10864 * java-tree.h (all_class_filename): New macro.
10865 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
10866 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
10867 newly created IDENTIFIER_NODE to `all_class_filename.'
10868
f2f25b6d
JS
108692001-08-01 Jeff Sturm <jsturm@one-point.com>
10870
9a07cfaf
RH
10871 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
10872 Use ggc_add_tree_root to register roots.
e64c46ce 10873
6ad7895a
APB
108742001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
10875
10876 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
10877 second operand calling check_init.
10878 * decl.c (complete_start_java_method): Swaped second and third
10879 arguments while creating WITH_CLEANUP_EXPR node.
10880 * jcf-write.c (generate_bytecode_insns): Use second operand
10881 instead of third when handling WITH_CLEANUP_EXPR.
10882 * parse.y (java_complete_lhs): Expand second operand of
10883 WITH_CLEANUP_EXPR nodes.
10884 (patch_synchronized_statement): Swaped second and third arguments
10885 while creating WITH_CLEANUP_EXPR node.
10886
9d7d8362
APB
108872001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
10888
10889 * parse.y (create_interface): Avoid cyclic inheritance report when
10890 syntax error encountered during class definition.
10891 Fixes PR java/2956
10892
578672a2
RO
108932001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10894
10895 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10896 ASM_FINAL_SPEC.
10897 (lang_specific_pre_link): Use set_input to set input_filename.
10898 Append `main' here.
10899 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10900 (main): Fix definition.
10901 Strip `main' from classname.
10902 Fixes PR java/227.
10903
6a65ea5b
TT
109042001-07-18 Tom Tromey <tromey@redhat.com>
10905
10906 For PR java/2812:
10907 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
10908 * lex.c (java_new_lexer): Use ICONV_CONST.
10909 (java_read_char): Likewise.
10910 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
10911 (jv-scan$(exeext)): Likewise.
10912
9d7d8362
APB
109132001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10914
10915 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
10916 * parse.y (check_class_interface_creation): Allow `private' if the
10917 enclosing is not an interface.
10918 (create_interface): Interface tagged public if the enclosing
10919 context is an interface.
10920 (create_class): Class tagged public if the enclosing context
10921 is an interface.
10922 Fixes PR java/2959
10923
109242001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
10925
10926 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
10927 Fixes PR java/2665
10928
e6290e74
TJ
109292001-07-14 Tim Josling <tej@melbpc.org.au>
10930
10931 * check-init.c (check_init): Remove references to EXPON_EXPR.
10932
9d7d8362
APB
109332001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10934
10935 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
10936 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
10937 Fixes PR java/3602
10938
4b2dc1b2
TT
109392001-07-13 Tom Tromey <tromey@redhat.com>
10940
10941 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
10942 invocation.
10943
b6e3e1ff
APB
109442001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10945
10946 * parse.y (patch_method_invocation): Don't override primary if one
10947 is already provided, but let this$<n> be built. Fixed comment.
10948
109492001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
10950
10951 * parse.y (empty_statement:): Report empty statement error only
10952 when found at class declaration level.
10953 Fixes PR java/3635
10954
a3cb5122
TT
109552001-07-12 Tom Tromey <tromey@redhat.com>
10956
10957 * expr.c (expand_load_internal): New function.
10958 (LOAD_INTERNAL): Use it.
10959
29fcdaae
APB
109602001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
10961
10962 * parse.y (verify_constructor_super): Compare anonymous class ctor
10963 args with `valid_method_invocation_conversion_p.'
10964 Fixes PR java/3285
10965
2df37a59
APB
109662001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10967
10968 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
10969 `-fsyntax-only.' Fixes PR java/3248
10970
109712001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10972
10973 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
10974
109752001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
10976
10977 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
10978 current function is static. Fixes PR java/1970
10979
109802001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10981
10982 * parse.y (patch_method_invocation): Add enclosing context to ctor
10983 calls if necessary. Fixes PR java/2953
10984
109852001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10986
10987 * parse.y (resolve_package): Abort if qualified expression member
10988 isn't right.
10989 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
10990 Fixes PR java/1391
10991
74d04dd1
ZW
109922001-07-07 Zack Weinberg <zackw@stanford.edu>
10993
10994 * verify.c: Don't use // comments.
10995
af418b8c
TT
109962001-07-05 Tom Tromey <tromey@redhat.com>
10997
10998 * lang.c (flag_assume_compiled): Removed.
10999 * java-tree.h (flag_assume_compiled): Removed.
11000 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
11001 -fhash-synchronization, -fuse-divide-subroutine,
11002 -fcheck-references, -femit-class-file, -femit-class-files,
11003 -fassume-compiled. Updated --encoding information. Changed
11004 -foutput-class-dir to `-d'.
11005
84a5b4f8
DB
110062001-07-04 Daniel Berlin <dan@cgsoftware.com>
11007
11008 * jcf-parse.c (parse_class_file): Add lineno parameter to
11009 debug_start_source_file call.
11010
0671eaf6
JM
110112001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
11012
11013 * gcj.texi: Use gpl.texi.
11014 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
11015 dependencies and use doc/include in search path.
11016
9be7529d
JS
110172001-07-03 Jeff Sturm <jsturm@one-point.com>
11018
11019 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
11020 `this'. If so, don't build instance initializers.
11021
51e23701
APB
110222001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
11023
11024 * parse.y (resolve_expression_name): Improved error message for
2df37a59 11025 inner class cases. Fixes PR java/1958
51e23701 11026
46f018e1
GDR
110272001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
11028
11029 * lang.c: #include diagnostic.h
11030 (lang_print_error): Add a `diagnostic_context *' parameter.
11031 (java_dummy_print): Likewise.
11032 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
11033
51e23701
APB
110342001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11035
11036 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
11037 * jcf.h (typedef struct JCF): New bitfield `finished.'
11038 (JCF_FINISH): Set `finished.'
11039 (JCF_ZERO): Reset `finished.'
11040 Fixes PR java/2633
11041
110422001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11043
11044 * parse.y (class_body_declaration:): Don't install empty instance
11045 initializers.
11046 Fixes PR java/1314
11047
4a70e37e
APB
110482001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
11049
11050 * class.c (set_super_info): Call `set_class_decl_access_flags.'
11051 (set_class_decl_access_flags): New function.
11052 * java-tree.h (set_class_decl_access_flags): New prototype.
11053 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
11054 (parse_class_file): New local `decl_max_locals.' Take wide types
11055 into account to compute DECL_MAX_LOCALS.
11056 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
11057 imports on demand.
11058
561a0365
JM
110592001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
11060
11061 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
11062
8e41c4f3
APB
110632001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11064
11065 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
11066 * parse.y (do_resolve_class): Moved comments out to leading comment
11067 section. Removed local `start', New local `_ht' and
11068 `circularity_hash.' Record `enclosing' in hash table and search
11069 it to detect circularity. Use `enclosing' as an argument to
11070 `lookup_cl.' Free the hash table when done.
11071
c01b7cdf
TT
110722001-06-19 Tom Tromey <tromey@redhat.com>
11073
11074 * lex.c (java_read_char): Disallow invalid and overlong
11075 sequences. Fixes PR java/2319.
11076
21a6bb3c
JS
110772001-06-05 Jeff Sturm <jsturm@one-point.com>
11078
11079 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
11080
0c90837b
APB
110812001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11082
11083 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
11084 arguments accordingly.
11085
1347cc4f
JM
110862001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
11087
11088 * gcj.texi: Move contents to just after title page.
11089
12e248d6
APB
110902001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
11091
11092 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
11093 builtin type.
11094 (patch_incomplete_class_ref): Build the class ref, build the class
11095 init if necessary, complete the tree.
11096 Fixes PR java/2605
11097
19559012
APB
110982001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
11099
11100 * parse.y (lookup_field_wrapper): Test `name' code.
11101 (resolve_qualified_expression_name): Test `qual_wfl' code.
11102 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
11103 handle `qual_wfl' by code.
11104 (maybe_build_primttype_type_ref): Test `wfl' code.
11105
eb153223
TP
111062001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11107
11108 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
11109 fdl.texi.
11110 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
11111 the dvi file in the java directory.
11112
88657302
RH
111132001-05-25 Sam TH <sam@uchicago.edu>
11114
11115 * gen-table.pl javaop.h jcf.h lex.h,
11116 parse.h: Fix header include guards.
11117
719f0fde
JM
111182001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
11119
11120 * jv-scan.c (version): Update copyright year.
11121
075516bc
PB
111222001-05-21 Per Bothner <per@bothner.com>
11123
11124 * jcf-parse.c (read_class): If class is from .class or .zip file
11125 and it's already been read, don't push/pop parser context.
11126
9d289604
PB
111272001-05-18 Per Bothner <per@bothner.com>
11128
11129 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
9a07cfaf 11130 command line so the jvgenmain-generated main program comes first.
9d289604 11131
48187504
TT
111322001-05-15 Tom Tromey <tromey@redhat.com>
11133
11134 * class.c (build_utf8_ref): Don't generate identifier based on
11135 utf8const contents.
11136
f17f1898
RH
111372001-05-12 Richard Henderson <rth@redhat.com>
11138
11139 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
11140 * expr.c (java_lang_expand_expr): Expand it.
11141 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
11142 calling build_exception_object_ref.
11143 * parse.y (catch_clause_parameter): Likewise.
11144 (build_dot_class_method): Likewise.
11145 (try_reference_assignconv): Likewise.
11146 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
11147 * jcf-write.c (generate_bytecode_insns): Likewise.
11148
352b3f3f
APB
111492001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
11150
11151 * parse.y (build_unresolved_array_type): Set
11152 EXPR_WFL_QUALIFICATION on the newly created wfl.
11153 Fixes PR java/2538. Fixes PR java/2535.
11154
41ee0877
APB
111552001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
11156
17126208 11157 * parse.y (fix_constructors): Removed unnecessary assignment to
41ee0877
APB
11158 local. Moved assignment to `this$<n>', fixed comments and
11159 indentation.
11160 (build_wfl_wrap): Fixed indentation.
11161 Fixes PR java/2598, java/2579 and java/2658.
11162
4def8930
MD
111632001-05-03 Mo DeJong <mdejong@redhat.com>
11164
9a07cfaf 11165 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
4def8930
MD
11166 check for byte swap.
11167
8fc6a63c
JS
111682000-05-02 Jeff Sturm <jsturm@one-point.com>
11169
11170 * expr.c (build_class_init): Move MODIFY_EXPR
11171 outside of COND_EXPR. Remove variable `call'.
11172
3e411c3f
KG
111732001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11174
11175 * decl.c: NULL_PTR -> NULL.
11176 * jcf-write.c: Likewise.
11177
0cd015ea
TT
111782001-05-01 Tom Tromey <tromey@redhat.com>
11179
11180 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
11181 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
11182 * gcj.texi: Updated copyright text. Include fdl.texi.
11183 (Top): Link to new node.
11184
6a117d00
PB
111852001-05-01 Per Bothner <per@bothner.com>
11186
11187 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
11188
063df563
PB
111892001-05-01 Per Bothner <per@bothner.com>
11190
11191 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
11192 import_list contains the name, not the TREE_PURPOSE.
11193
962584ea
KG
111942001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11195
11196 * jcf-io.c (read_zip_member): Cast to long in comparison with
11197 signed value.
11198
11199 * jvspec.c (lang_specific_driver): Initialize variables.
11200
11201 * mangle.c (find_compression_record_match): Likewise.
11202
11203 * typeck.c (build_null_signature): Provide static prototype. Mark
11204 parameter with ATTRIBUTE_UNUSED.
11205
11206 * verify.c (verify_jvm_instructions): Initialize variable.
11207
86d9e8d8
BM
112082001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11209
11210 * parse.y (do_resolve_class): Check for cyclic inheritance during
e64c46ce 11211 inner class resolution.
86d9e8d8 11212
9c491eb8
PB
112132001-04-27 Per Bothner <per@bothner.com>
11214
11215 * parse.y (java_expand_classes): Don't change ctxp_for_generation
11216 while iterating, since that could cause gc to lose stuff.
11217
56fe39c8
PB
112182001-04-26 Per Bothner <per@bothner.com>
11219
11220 Fix method search wrt scope of inner classes to match JLS2.
11221 * typeck.c (build_null_signature): New static function.
11222 (has_method): New function. Uses build_null_signature and lookup_do.
11223 * java-tree.h (has_method): New declaration.
11224 * parse.y (find_applicable_accessible_methods_list): Do not search
11225 context of inner classes here.
11226 (patch_method_invocation): Search scope, ie. current and outer clases,
11227 for method matching simple name, to find class.
11228
8789b9fa
PB
112292001-04-26 Per Bothner <per@bothner.com>
11230
11231 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
11232 Fix thinko: If a single case, use if_icmpeq, not ifeq.
11233
11234 * constants.c (find_methodref_with_class_index): New function.
11235 (find_methodref_index): Use find_methodref_with_class_index.
11236 * java-tree.h (find_methodref_with_class_index): New declaration.
11237 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
11238 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
11239 If context changed from interface to class, don't use invokeinterface.
11240
5acea42b
PB
112412001-04-25 Per Bothner <per@bothner.com>
11242
11243 * verify.c (verify_jvm_instructions): For field instructions,
11244 check that field index is valid. For invoke instructions, check that
11245 method index is valid.
11246
dd6f3662
AO
112472001-04-25 Alexandre Oliva <aoliva@redhat.com>
11248
11249 * config-lang.in (target_libs): Copy from $libgcj_saved.
11250
28f7d9d0
BM
112512001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
11252
11253 * decl.c (init_decl_processing): Add new class "protectionDomain"
11254 field.
11255 * class.c (make_class_data): Set initial value for "protectionDomain".
11256
d4c3ec27
KG
112572001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11258
11259 * jvspec.c (lang_specific_driver): Fix memory allocation
11260 deficit, by using concat in lieu of xmalloc/sprintf.
11261
3c0ce750
PB
112622001-04-20 Per Bothner <per@bothner.com>
11263
11264 Fixes to compile multiple .class files at once.
11265 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
11266 * java-tree.h (CLASS_PARSED_P): New macro.
11267 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
11268 * jcf-parse.c (jcf_parse_source): Inline into read_class.
11269 (read_class): Avoid some code duplication.
11270 Don't call JCF_FINISH for a .class file - might be needed later.
11271 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
11272 rather than CLASS_LOADED_P, since latter implies class laid out.
11273 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
11274 * parse.y: Don't need to set CLASS_LOADED_P for array types.
11275
d6684bc8
KG
112762001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11277
11278 * Make-lang.in (java/boehm.o): Depend on toplev.h.
11279
11280 * boehm.c: Include toplev.h.
11281
10e2af38
TT
112822001-04-06 Tom Tromey <tromey@redhat.com>
11283 Alexandre Petit-Bianco <apbianco@redhat.com>
11284
11285 Fix for PR gcj/1404 and PR gcj/2332:
11286 * parse.y (build_array_from_name): If we use the type_wfl then
11287 accumulate dimensions from the original type as well.
11288 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
11289
2d9fea5d
TT
112902001-04-06 Tom Tromey <tromey@redhat.com>
11291
11292 * parse.y (analyze_clinit_body): Return true if the second operand
11293 of a METHOD_EXPR is nonzero.
11294
613bb86e
TT
112952001-04-06 Tom Tromey <tromey@redhat.com>
11296
11297 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
11298 directory.
11299 ($(srcdir)/java/parse.c): Likewise.
11300
8b66cd8f
APB
113012001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
11302
11303 * gcj.texi: Use `which-gcj' instead of `which-g77.'
11304 (version-gcc): Initialized.
11305 (which-gcj): Likewise.
11306
73c299fc
APB
113072001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
11308
11309 * java-tree.h (struct lang_decl): New macro
11310 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
11311 * parse.y (build_instance_initializer): New function.
11312 (add_instance_initializer): Use it.
11313 (java_fix_constructors): Set `current_class' before fix pass.
11314 (fix_constructors): Just return if already fixed. Move `super()'
67264b4f 11315 invocation ahead. Use `build_instance_initializer.'
73c299fc
APB
11316 Fixes PR java/1315.
11317
93a6eb78 113182001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
e64c46ce 11319
93a6eb78
APB
11320 * parse.y (resolve_qualified_expression_name): Pass field's
11321 DECL_CONTEXT to `not_accessible_p.'
11322 (not_accessible_p): Changed parameters order in `inherits_from_p'
67264b4f 11323 invocation.
93a6eb78 11324
4956c16e
AH
113252001-03-27 Andrew Haley <aph@cambridge.redhat.com>
11326
11327 * lang-options.h: Add flag_check_references.
11328
3cc48399
PB
113292001-04-04 Per Bothner <per@bothner.com>
11330
11331 * java-tree.h (CONSTANT_VALUE_P): New macro.
11332 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
11333 * parse.y (maybe_build_class_init_for_field): New static function.
11334 (resolve_expression_name, resolve_field_access): Use
e64c46ce 11335 maybe_build_class_init_for_field instead of build_class_init
3cc48399
PB
11336 This does not do the init if the field is compile-time-constant.
11337 (resolve_field_access): Simplify.
11338
11339 * parse.y (fold_constant_for_init): Merge test into switch.
11340
d02af173
ZW
113412001-04-03 Zack Weinberg <zackw@stanford.edu>
11342
11343 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
11344 on gansidecl.h.
11345 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
11346
44a2150d
ZW
113472001-04-02 Zack Weinberg <zackw@stanford.edu>
11348
11349 * expr.c (pop_type_0): Save the result of the first
e64c46ce 11350 lang_printable_name call in a scratch buffer, so it
44a2150d
ZW
11351 won't be clobbered by the second call.
11352
de307574
APB
113532001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
11354
11355 * parse-scan.y (array_type:): Rewritten.
11356 (type_declaration:): `empty_statement' replaces `SC_TK.'
11357 (class_member_declaration:): `empty statement' added.
11358 (method_body:): Simplified.
11359 (static_initializer:): Likewise.
11360 (primary_no_new_array:): Use `type_literals.'
11361 (type_literals:): New rule.
11362 (dims:): Set and update `bracket_count.'
11363 Fixes PR java/1074. Fixes PR java/2412.
11364
2ff50199
APB
113652001-03-28 Hans Boehm <boehm@acm.org>
11366
11367 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
11368 (get_boehm_type_descriptor): Set type on returned value to be a
11369 pointer length integer.
11370
80122075
KG
113712001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11372
11373 * expr.c (pop_type_0): Call `concat' rather than building the
11374 string manually.
11375 (pop_type): Add format specifier in call to `error'.
11376
11377 * parse.y (patch_method_invocation): Avoid casting away
11378 const-ness.
11379
0f5c1ee4
JO
113802001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
11381
11382 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
11383
52a11cbf
RH
113842001-03-28 Richard Henderson <rth@redhat.com>
11385
11386 IA-64 ABI Exception Handling:
11387 * Make-lang.in (except.o): Don't depend on eh-common.h.
11388 * check-init.c (check_init): Handle EXC_PTR_EXPR.
11389 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
11390 [soft_exceptioninfo_call_node]: Remove.
11391 [eh_personality_libfunc, lang_eh_runtime_type]: New.
11392 (end_java_method): No emit_handlers.
11393 * except.c (java_set_exception_lang_code): Remove.
11394 (method_init_exceptions): Don't call it.
11395 (prepare_eh_table_type): No CATCH_ALL_TYPE.
11396 (build_exception_object_ref): New.
11397 (expand_end_java_handler): Update for except.h name changes.
11398 (emit_handlers, expand_resume_after_catch): Remove.
11399 * expr.c (java_lang_expand_expr): Update for except.h name changes.
11400 (process_jvm_instruction): Use build_exception_object_ref.
11401 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
11402 (soft_exceptioninfo_call_node): Remove.
11403 (build_exception_object_ref): Declare.
11404 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
11405 soft_exceptioninfo_call_node. Move processing ...
11406 [EXC_PTR_EXPR]: ... here.
11407 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
11408 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
11409 (source_end_java_method): No java_set_exception_lang_code or
11410 emit_handlers.
11411 (build_dot_class_method): Use build_exception_object_ref.
11412 (try_reference_assignconv): Check EXC_PTR_EXPR not
11413 soft_exceptioninfo_call_node.
11414
ce1c98ea
RH
114152001-03-28 Richard Henderson <rth@redhat.com>
11416
11417 * java-tree.h (throw_node): Define as a single member of
11418 java_global_trees instead of a separate array.
11419 (JTI_THROW_NODE): New.
11420 * decl.c (throw_node): Don't declare.
11421 (init_decl_processing): Init a scalar throw_node.
11422 Don't register it for gc.
11423 * check-init.c (check_init): Reference scalar throw_node.
11424 * expr.c (build_java_athrow): Likewise.
11425 * jcf-write.c (generate_bytecode_insns): Likewise.
11426 * parse.h (BUILD_THROW): Likewise.
11427
da7da8f9
RH
114282001-03-28 Richard Henderson <rth@redhat.com>
11429
11430 * decl.c (end_java_method): Do not save and restore
11431 flag_non_call_exceptions.
11432 * parse.y (source_end_java_method): Likewise.
11433 * lang.c (flag_exceptions): Don't declare.
11434 (java_init_options): Set flag_non_call_exceptions. Set
11435 flag_exceptions here ...
11436 (java_init): ... not here.
11437
531073e7
RH
114382001-03-27 Richard Henderson <rth@redhat.com>
11439
11440 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11441 exceptions_via_longjmp.
11442
461fc4de
RH
11443 * lang.c (flag_new_exceptions): Don't declare it.
11444 (java_init_options): Or set it.
11445
c1e9f663
RH
114462001-03-27 Richard Henderson <rth@redhat.com>
11447
11448 * decl.c (end_java_method): Rename asynchronous_exceptions to
11449 flag_non_call_exceptions.
979988f3 11450 * parse.y (source_end_java_method): Likewise.
c1e9f663 11451
911e6107
KG
114522001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11453
11454 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11455
b850de4f
MM
114562001-03-26 Mark Mitchell <mark@codesourcery.com>
11457
11458 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11459
ce06965e
APB
114602001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
11461
11462 * parse.y (find_as_inner_class): Follow current package
11463 indications not to mistakingly load an unrelated class.
11464
cb9b7a8c
KG
114652001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11466
11467 * constants.c (PUTN): Use memcpy, not bcopy.
11468
11469 * lex.c (java_read_char): Use memmove, not bcopy.
11470
11471 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11472
fa029f45
PB
114732001-03-23 Per Bothner <per@bothner.com>
11474
11475 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
11476 macro for better error pin-pointing.
11477 * java-tree.h: Fix typo in comment.
11478
11479 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
11480 Don't include jsr/goto in exception range.
11481 Check if start and end of exception range are the same (also TRY_EXPR).
11482 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11483 However, do emit the following goto even if try_block is empty.
11484 Defer freeing exception_decl until after the finalizer, to make
11485 sure the local isn't reused in the finalizer. Fixes PR java/1208.
11486
11487 * parse.y (java_complete_lhs): If the try-clause is empty, just
11488 return the finally-clause and vice versa.
11489
b124f72e
APB
114902001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
11491
11492 * gcj.texi (Input Options): documented the check for attribute
11493 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11494 * java-tree.h (flag_force_classes_archive_check): Declared extern.
11495 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11496 (jcf_parse): Check for the right classes archive if necessary.
11497 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11498 (jcf_parse_fields): Fixed indentation.
11499 * jcf-write.c (append_gcj_attribute): New function.
11500 (generate_classfile): Compute the attribute count, invoke
11501 `append_gcj_attribute'.
11502 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
ee142fe7 11503 turned into bit-fields. New bit-field `right_zip.'
b124f72e
APB
11504 (JCF_ZERO): Set `right_zip' to zero.
11505 * lang-options.h (-fforce-classes-archive-check): Added flag.
11506 * lang.c (flag_force_classes_archive_check): New flag.
11507 (lang_f_options): New entry `force-classes-archive-check.'
11508 Fixes PR java/1213.
11509
4ff17c6a
AH
115102001-02-07 Andrew Haley <aph@redhat.com>
11511
11512 * gcj.texi (Configure-time Options): Add -fcheck-references.
11513 * expr.c (build_java_indirect_ref): New function.
3e02b1c3 11514 (java_check_reference): New function.
4ff17c6a
AH
11515 (build_java_array_length_access): Use build_java_indirect_ref to
11516 check for null references.
11517 (build_java_arrayaccess): Likewise.
11518 (build_get_class): Likewise.
11519 (build_field_ref): Likewise.
11520 (invoke_build_dtable): Likewise.
11521 (build_invokeinterface): Likewise.
11522 * lang.c (lang_f_options): Add flag_check_references.
11523 * jvspec.c (jvgenmain_spec): Add flag_check_references.
11524 * java-tree.h (flag_check_references): New variable.
11525 * lang.c (flag_check_references): Likewise.
e64c46ce 11526 * parse.y (patch_invoke): Use java_check_reference.
3e02b1c3
AH
11527 (patch_assignment): Allow for extra nesting in
11528 _Jv_CheckArrayStore.
4ff17c6a 11529
f2a29271
BM
115302001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
11531
11532 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11533 * lex.c (cxx_keywords): Likewise.
11534
2ff50199
APB
115352001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11536
11537 * parse.y (qualify_ambiguous_name): Broaden `length'
11538 recognition. Help MODIFY_EXPR be resolved as expression names.
11539 Fixes PR java/2066. Fixes PR java/2400.
11540
60c87482
BM
115412001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
11542
e64c46ce 11543 * gjavah.c (process_file): Mark interface definitions with
60c87482
BM
11544 "__attribute__ ((java_interface))".
11545
96c6f628
APB
115462001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
11547
11548 * class.c (layout_class): Fixed push_super_field's second
11549 argument. Fixes PR java/2333.
11550 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11551 too early to lay innerclasses out.
11552
7abecd65
TT
115532001-03-20 Tom Tromey <tromey@redhat.com>
11554 Alexandre Petit-Bianco <apbianco@redhat.com>
11555
11556 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11557 inside an array reference. Insertion of the array store check
11558 rewritten. Fixes PR java/2299.
11559
4aed8938
TT
115602001-03-20 Tom Tromey <tromey@redhat.com>
11561
11562 * lex.c (java_read_unicode): Only accept leading `u's.
11563
ddd705d1
TT
115642001-03-20 Tom Tromey <tromey@redhat.com>
11565
11566 * jcf-parse.c (read_class): Initialize `class'.
11567
de83bf66
MK
115682001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11569
11570 * jcf_parse.c (jcf_parse): Eliminate unused variable.
11571
92643fea
MM
115722001-03-19 Mark Mitchell <mark@codesourcery.com>
11573
11574 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11575 (layout_class): Likewise.
11576 (layout_class_method): Likewise.
11577 (emit_register_classes): Likewise.
11578 * decl.c (builtin_function): Likewise.
11579 (give_name_to_locals): Likewise.
11580
54646811
PB
115812001-03-19 Per Bothner <per@bothner.com>
11582
80fc2e84
PB
11583 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
11584 before trying to load an inner class.
11585
54646811
PB
11586 Fixes to process to command-line .class files in two passes.
11587 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
11588 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
11589 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
11590 * class.c (is_compiled_class): Fix for renamed flag.
11591 * parse.y (maybe_create_class_interface_decl): Likewise.
11592 * jcf-parse.c (yyparse): Also set if compiling .class files.
11593 * jcf-parse.c (read_class); Read current_class.
11594 (jcf_parse): Make static.
11595 (load_inner_classes): New function, with code moved from jcf_parse,
11596 because we need to inner classes after the command-line files are read.
11597 (yyparse): Set finput to NULL when it doesn't need to be closed.
11598 Reduce use of main_jcf (basically only for archive) and
11599 use finput instead of main_jcf->read_state.
11600 Inline jcf_figure_file_type into yyparse.
11601 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11602 Defer load_inner_classes and parse_class_file to a second pass,
11603 after we've correctly mapped command-line .clas fiels to classes.
11604 (jcf_figure_file_type): Removed.
11605 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
11606 (JCF_ZERO): Also clear zipd field.
11607 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
11608
116092001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
11610
11611 * jcf-parse.c (yyparse): Change ch from char * to char.
11612
8b1edcee
PB
116132001-03-19 Per Bothner <per@bothner.com>
11614
11615 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
11616 Add constructed filelist-file at end, following -xjava. Thus any .o
11617 and library files are not affected by the -xjava. Also wrap
54646811 11618 explicit @FILE with -xjava and -xnone.
8b1edcee 11619
6bc5f6cb
AH
116202001-03-19 Andrew Haley <aph@cambridge.redhat.com>
11621
9a07cfaf
RH
11622 * class.c (build_static_field_ref): Call make_decl_rtl() after
11623 setting the DECL_EXTERNAL flag.
6bc5f6cb 11624
daaaf29f
PB
116252001-03-17 Per Bothner <per@bothner.com>
11626
90f59043
PB
11627 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
11628
478e7ed6
PB
11629 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
11630 when result is is needed (target is STACK_TARGET).
11631
daaaf29f 11632 * parse.h (JDEP_SOLV): Removed.
d148b6aa 11633 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
daaaf29f 11634
d148b6aa
PB
11635 * parse.y (incomplete_class_list): Removed.
11636 (obtain_incomplete_type): Don't use or set incomplete_class_list.
11637 It doesn't work if resolve_class changes the name of an array type
11638 that is on the list and then someone else looks for the modified name.
11639 Also, seems liable to break when compiling multiple source files at
11640 once. So the simplest is to just remove incomplete_class_list -
11641 it is only a minor space win and it is not even clear it saves time.
daaaf29f
PB
11642
11643 * parse.y (resolve_class): Remove unneeded promote_type.
11644
4763d38f
PB
116452001-03-15 Per Bothner <per@bothner.com>
11646
b16e8f08
PB
11647 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
11648 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
11649 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11650 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
8b1edcee 11651
3a2e5926
PB
11652 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
11653 * parse.y (java_expand_classes): Likewise.
8b1edcee 11654
47a50de9
PB
11655 * parse.y (expand_start_java_method): Was only called once and had a
11656 misleading name, so inline in caller java_complete_expand_method.
3a2e5926 11657 (enter_a_block): Likewise inline in enter_block and remove.
47a50de9 11658
4763d38f
PB
11659 Remove junk from when gcc/java was created (by copying from C/C++).
11660 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
11661 (struct binding_level): Remove fields keep, keep_if_subblocks,
11662 more_cleanups_ok, have_cleanups (which have never been used).
11663 (pushlevel, poplevel): Remove related useless code.
19f8e04b 11664
69ca5554
PB
11665 * class.c (make_class_data): The class_dtable_decl (i.e. the
11666 vtable for Class) should be external, except when compiling Class.
11667
7d32abcd
PB
11668 * jvspec.c (lang_specific_driver): Fix -C handling.
11669 Check -save-temps to see if temp @FILE should be deleted.
11670 Follow-up to/fix for February 16 patch.
11671
19f8e04b
PB
11672 * verify.c (verify_jvm_instructions): Better error msgs for dup.
11673 (type_stack_dup): Remove no-longer neded error check.
11674
551bf03c
BM
116752001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
11676
11677 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11678 to 'for_pointer'. If this type is for a pointer (argument) mangling,
e64c46ce 11679 don't surround the element with 'N..E' if the type name is
551bf03c
BM
11680 unqualified.
11681
19e7881c
MM
116822001-03-14 Mark Mitchell <mark@codesourcery.com>
11683
d1d61788
MM
11684 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11685 DECL_RTL_SET_P, etc.
19e7881c
MM
11686 (make_method_value): Likewise.
11687 (get_dispatch_table): Likewise.
11688
11689 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8b1edcee 11690
bcacc465
TT
116912001-03-07 Tom Tromey <tromey@redhat.com>
11692
11693 * config-lang.in (lang_requires): Define.
11694
de6c5979
BL
116952001-03-07 Brad Lucier <lucier@math.purdue.edu>
11696
11697 * typeck.c (convert): Check flag_unsafe_math_optimizations,
11698 not flag_fast_math.
11699
6d37cf2f
PB
117002001-03-05 Per Bothner <per@bothner.com>
11701
11702 Fix a problem where rest_of_decl_compilation applied to
11703 class_dtable_decl causes problems because it was done too early,
11704 before output file was opened.
11705 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
11706 * class.c (class_dtable_decl): Add macro - element of class_roots.
11707 (make_class_data): Define class_dtable_decl.
11708 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
11709
d6edb99e
ZW
117102001-03-01 Zack Weinberg <zackw@stanford.edu>
11711
11712 * java/class.c, java/decl.c, java/java-tree.h: Replace all
11713 uses of 'boolean' with 'bool'.
11714
f7143427
ZW
117152001-03-01 Zack Weinberg <zackw@stanford.edu>
11716
11717 * lang-specs.h: Add zero initializer for cpp_spec field to all
11718 array elements.
11719
fea2d5da
PB
117202001-02-16 Per Bothner <per@bothner.com>
11721
11722 Handle compiling multiple input files at once, and @FILE syntax.
e4087691 11723 * gcj.texi: Updated documentation to match.
fea2d5da
PB
11724 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
11725 * jcf-parse.c (parse_source_file): Split into ...
11726 (parse_source_file_1): New function - and:
11727 (parse_source_file_2): New function.
11728 (yyparse): On -ffilelist-file, open and scan named file.
11729 On first pass over files, only do parse_source_file_1.
11730 A new second pass calls parse_source_file_2 for each file to compile.
11731 (init_jcf_parse): Call init_src_parse.
11732 * jvspec.c (INDIRECT_FILE_ARG): New flag.
11733 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
11734 as multiple input file combined in one compilation.
11735 * lang-options.h: Add -ffilelist-file
11736 * lang.c (flag_filelist_file): New flag variable.
11737 (lang_f_options): Handle -ffilelist-file.
11738 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11739 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
11740 gclass_list - use global fields of src_parse_roots instead.
11741 * parse.y (src_parse_roots): New array.
11742 (incomplete_class_list, gclass_list): New macros.
11743 (push_parser_context, java_pop_parser_context,
11744 java_parser_context_resume): Don't fiddle with deleted fields.
11745 (various): Use incomplete_class gclass_list and global macros
11746 instead of parse_ctxt fields - the lists are global.
11747 (init_src_parse): New function.
11748
62c9aa5f 117492001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9b58f739
RK
11750
11751 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11752
064a552c
APB
117532001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
11754
11755 * parse.y (check_inner_class_access): Moved declaration of local
11756 `enclosing_decl_type' to the right location.
11757
a648f4e4
BM
117582001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
11759
e64c46ce 11760 * parse.y (parser_check_super_interface): Don't call
a648f4e4 11761 check_pkg_class_access for an inner interface.
e64c46ce 11762 (parser_check_super): Don't call check_pkg_class_access for inner
a648f4e4 11763 class.
e64c46ce 11764 (do_resolve_class): Simplify enclosing type loop. Don't call
a648f4e4
BM
11765 check_pkg_class_access if CL and DECL are not set.
11766 (find_in_imports_on_demand): Set DECL if class_type needed to be
11767 loaded. Don't call check_pkg_class_access for an inner class.
11768 (check_inner_class_access): Rewritten to implement member access
11769 rules as per spec 6.6.1.
11770 (check_pkg_class_access): Handle the empty package correctly.
11771 (in_same_package): New function. Determine if two classes are in the
11772 same package.
11773
35ab11f0
BM
117742001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
11775
11776 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11777 method into array types.
11778 * parse.y (patch_method_invocation): Bypass access check on clone call
11779 to array instance.
e64c46ce 11780
055adbaa
APB
117812001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
11782
11783 * expr.c (build_instanceof): Check for arrays when trying fold to
11784 false.
11785
e658449e
JM
117862001-02-15 Jim Meyering <meyering@lucent.com>
11787
fd48c9b5
DD
11788 * Make-lang.in (java.install-common): Depend on `installdirs'.
11789 (java.install-info): Likewise.
e658449e 11790
4238a754
BM
117912001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
11792
11793 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11794
e101152f 117952001-02-14 Tom Tromey <tromey@redhat.com>
9a07cfaf 11796 Alexandre Petit-Bianco <apbianco@cygnus.com>
e101152f 11797
055adbaa
APB
11798 Fix for PR java/1261.
11799 * typeck.c (build_java_array_type): Add public `clone' method to
11800 arrays.
11801 * parse.y (resolve_qualified_expression_name): Use current_class
e101152f 11802 when checking for inaccessibility.
055adbaa 11803 (patch_method_invocation): Fixed error message when accessibility
e101152f
APB
11804 denied. Added `from_super' argument.
11805
118062001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11807
11808 * parse.y (resolve_class): Don't build a fake decl. Use the one
11809 already built.
11810 * typeck.c (build_java_array_type): Build and assign decl to array
11811 type.
11812
118132001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
11814
11815 * parse.y (not_accessible_p): Changed leading comment. Added extra
11816 `where' argument. Use it to enforce protected access rules.
11817 (resolve_qualified_expression_name): Added extra argument to
11818 not_accessible_p.
11819 (patch_method_invocation): Use argument `primary' to provide
11820 not_accessible_p with an extra argument.
11821 (lookup_method_invoke): Added extra argument to not_accessible_p.
11822 (search_applicable_method_list): Likewise.
11823
863cd85a
APB
118242001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
11825
11826 * parse.y (resolve_qualified_expression_name): Try to resolve as
11827 an inner class access only if `decl' is a TYPE_DECL.
11828
94807d33
APB
118292001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11830
11831 * decl.c (classdollar_identifier_node): Initialize.
e64c46ce 11832 * java-tree.h (enum java_tree_index): New entry
94807d33
APB
11833 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11834 (classdollar_identifier_node): New macro.
11835 (ID_CLASSDOLLAR_P): Likewise.
11836 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11837 (build_dot_class_method_invocation): Likewise.
11838 (find_applicable_accessible_methods_list): `class$' can't be
11839 inherited.
11840
30f87f1a
APB
118412001-02-09 Raja R Harinath <harinath@cs.umn.edu>
11842
11843 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11844
118452001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11846
11847 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11848 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11849 gone.
11850
1e97aa40
APB
118512001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11852
11853 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
11854 outside of the `__U' sequence too.
11855 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
11856 sequence too.
11857
a395f5ab
APB
118582001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
11859
11860 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
11861
1b43b6be
APB
118622001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11863
11864 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
11865 (JVGENMAIN_OBJS): Likewise.
e64c46ce 11866 * java-tree.h (append_gpp_mangled_name): New prototype.
1b43b6be
APB
11867 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
11868 Removed cast calling `gcc_add_root.'
11869 * jvgenmain.c (mangle_obstack): New global, initialized.
11870 (main): Use it.
11871 (do_mangle_class): Constify local `ptr.'
11872 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
11873 append_gpp_mangle_name and update `count' if necessary.
11874 Use `mangle_obstack.'
11875 * mangle.c (append_unicode_mangled_name): Removed.
11876 (append_gpp_mangled_name): Likewise.
11877 (unicode_mangling_length): Likewise.
11878 (mangle_member_name): Return type set to `void.'
11879 (mangle_field_decl): Don't append `U' in escaped names.
11880 (mangle_method_decl): Likewise.
11881 (mangle_member_name): Just use `append_gpp_mangled_name.'
11882 * mangle_name.c: New file.
11883
4a83be51
PB
118842001-02-07 Per Bothner <per@bothner.com>
11885
11886 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
11887
11888 * check-init.c (check_init): Don't call done_alternative after
11889 processing loop code, as a LOOP_EXPR never terminates normally.
11890
7e5fd99f
JM
118912001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
11892
11893 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
11894
1456345e
APB
118952001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11896
11897 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
11898 DECLs.
11899
77aff9f9
TT
119002001-02-06 Tom Tromey <tromey@redhat.com>
11901
11902 * lex.c (java_new_lexer): Longer error message.
11903
c00dd14e
JS
119042001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
11905 Alexandre Petit-Bianco <apbianco@cygnus.com>
11906
11907 * typeck.c (build_prim_array_type): Added leading comment.
11908 (build_java_array_type): Moved locals out of
11909 block. Always create the `data' field, fixed alignment to match
11910 C++.
11911
6d091870
TT
119122001-02-04 Tom Tromey <tromey@redhat.com>
11913
11914 * expr.c (java_lang_expand_expr): Don't bother recomputing
11915 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
11916 Fixes PR java/1866.
11917
1ebb5e73
APB
119182001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11919
11920 * parse.y (process_imports): Save the original name of the import
11921 for better error report.
11922
ca5b1ff8
BM
119232001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
11924
11925 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
11926 of macros used when compiling jvspec.c.
11927 * jvspec.c (lang_specific_driver): Link with the shared
11928 libgcc by default.
11929
62c9aa5f 119302001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
400500c4
RK
11931
11932 * check-init.c (check_init): Call internal_error instead of fatal.
11933 * expr.c (java_lang_expand_expr): Likewise.
11934 * jcf-parse.c (get_constant): Likewise.
11935 * mangle.c (java_mangle_decl): Likewise.
11936 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
11937 (operator_string): Likewise.
11938 * check-init.c (check_init): Call abort instead of fatal.
11939 * class.c (build_class_ref): Likewise.
11940 * constants.c (write_constant_pool): Likewise.
11941 * decl.c (start_java_method): Likewise.
11942 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
11943 (java_stack_dup, encode_newarray_type): Likewise.
11944 (build_java_array_length_access): Likewise.
11945 (build_java_check_indexed_type, expand_java_pushc): Likewise.
11946 (build_java_soft_divmod, build_invokeinterface): Likewise.
11947 * java-tree.h (INNER_CLASS_P): Likewise.
11948 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
11949 (give_name_to_class, get_class_constant): Likewise.
11950 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
11951 (find_constant_index, generate_bytecode_conditional): Likewise.
11952 (generate_bytecode_insns, perform_relocations): Likewise.
11953 * lex.c (java_unget_unicode, java_lex): Likewise.
11954 * mangle.c (mangle_type, mangle_record_type): Likewise.
11955 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
11956 (finish_mangling): Likewise.
11957 * parse.h (MARK_FINAL_PARMS): Likewise.
11958 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
11959 (obtain_incomplete_type, java_complete_class): Likewise.
11960 (java_check_regular_methods, java_complete_expand_method): Likewise.
11961 (cut_identifier_in_qualified, check_deprecation): Likewise.
11962 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
11963 (java_complete_lhs, lookup_name_in_blocks): Likewise.
11964 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
11965 * typeck.c (set_local_type, parse_signature_type): Likewise.
11966 (parse_signature_string, build_java_signature): Likewise;
11967 (set_java_signature): Likewise.
11968 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
11969 * class.c (add_method): Call fatal_error instead of fatal.
11970 (build_static_field_ref): Likewise.
11971 * expr.c (build_known_method_ref, expand_invoke): Likewise.
11972 * jcf-parse.c (get_constant, jcf_parse): Likewise.
11973 * lex.c (java_new_new_lexer): Likewise.
11974 * jv-scan.c (main): Likewise.
11975 (fatal_error): Renamed from fatal.
11976 * jcf-parse.c (yyparse): Call fatal_io_error instead of
11977 pfatal_with_name.
11978 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
11979 (yyparse): Likewise.
11980 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
11981 * lex.c (java_get_line_col): Likewise.
11982 * jcf-parse.c (load_class): Make errors non-fatal.
11983 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
e64c46ce 11984
4bae4eb5
BM
119852001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
11986
11987 * jvgenmain.c (class_mangling_suffix): Remove unused string.
11988 (error): Remove unused function.
11989 (main): Don't use "__attribute__ alias" on generated class symbol.
11990
c0b00d37
APB
119912001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11992
11993 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
11994 argument.
11995 * parse.y (finish_method_declaration): Code accounting for WFLed
11996 method DECL_NAMEs deleted.
11997 (check_abstract_method_definitions): Likewise.
11998 (resolve_type_during_patch): Layout resolved type.
11999 * typeck.c (lookup_do): Removed unused local.
12000
4bae4eb5 120012001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
eb59e547
BM
12002
12003 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
12004 * decl.c (init_decl_processing): Use integer_minus_one_node, not
12005 integer_negative_one_node.
12006 * expr.c (build_java_binop): Likewise.
12007
4bae4eb5 120082001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
7be00c49
JS
12009
12010 * zextract.c (read_zip_archive): Read file_offset before writing
12011 zipd and consequently clobbering the header contents.
12012
c913b6f1
KG
120132001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12014
12015 * Make-lang.in: Remove all dependencies on defaults.h.
12016 * decl.c: Don't include defaults.h.
12017 * expr.c: Likewise.
12018 * parse.y: Likewise.
12019
c4faeb92
APB
120202001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12021
12022 * ChangeLog (2001-01-21): Fixed typo.
12023 * class.c (layout_class_method): Code accounting for WFLed
12024 method DECL_NAMEs deleted.
12025 * constant.c (find_methodref_index): Likewise.
12026 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
12027 * java-tree.h (DECL_FUNCTION_WFL): New macro.
12028 (struct lang_decl): New field `wfl'.
12029 (java_get_real_method_name): Prototype deleted.
12030 * mangle.c (mangle_method_decl): Code accounting for WFLed
12031 method DECL_NAMEs deleted.
12032 * parse.h (GET_METHOD_NAME): Macro deleted.
12033 * parse.y (reset_method_name): Deleted.
12034 (method_header): Set DECL_FUNCTION_WFL.
12035 (check_abstract_method_header): Code accounting for WFLed method
12036 DECL_NAMEs deleted.
12037 (java_get_real_method_name): Deleted.
12038 (check_method_redefinition): Code accounting for WFLed method
12039 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
12040 (java_check_regular_methods): Likewise.
12041 (java_check_abstract_methods): Likewise.
12042 (java_expand_classes): Don't call `reset_method_name.'
12043 (search_applicable_method_list): Use DECL_NAMEs instead of
12044 GET_METHOD_NAME.
12045 * typeck.c (lookup_do): Code accounting for WFLed method
12046 DECL_NAMEs deleted.
12047
97876d66
RE
120482001-01-25 Richard Earnshaw <rearnsha@arm.com>
12049
12050 * lex.c (java_read_char): Check for EOF from getc first.
12051
493d561d
APB
120522001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12053
12054 * class.c (layout_class): Don't lay the superclass out if it's
12055 already being laid out.
12056 * jcf-parse.c (handle_innerclass_attribute): New function.
12057 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
12058 handle_innerclasses_attribute.
12059 (jcf_parse): Don't load an innerclasses if it's already being
12060 laid out.
12061 * jcf-write.c (append_innerclass_attribute_entry): Static
12062 `anonymous_name' and its initialization deleted. `ocii' and `ini'
12063 to be zero for anonymous classes.
12064
120652001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12066
12067 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
12068 necessary.
12069 * jcf-parse.c (set_source_filename): Use
12070 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
12071
120722001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12073
12074 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
12075 gets a unique asm name.
12076
120772001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12078
12079 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
12080 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12081 if necessary.
12082 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
12083 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
12084 * parse.y (lookup_package_type_and_set_next): Deleted.
12085 (resolve_package): Removed unnecessary code.
12086 (find_applicable_accessible_methods_list): `finit$' can't be
e64c46ce 12087 inherited.
493d561d
APB
12088 * verify.c (pop_argument_types): Added missing prototype.
12089
7c01b2b5
BM
120902001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
12091
12092 * config-lang.in: Disable java by default.
12093
80261b56
TT
120942001-01-23 Tom Tromey <tromey@redhat.com>
12095
12096 * gcj.texi (Copying): New node.
12097 Added copyright information.
12098
a4796c80
PB
120992001-01-21 Per Bothner <per@bothner.com>
12100
12101 Various fixes to allow compiling a compressed .jar/.zip archive.
12102 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
12103 (struct ZipFile): Add fields name and next (from ZipFileCache).
12104 (struct ZipDirectory): New field zipf points to owning ZipFile.
12105 * jcf.h (struct ZipDirectory): Add forward declaration.
12106 (struct JCF): Declare zipd field to have type struct ZipDirectory.
12107 Remove seen_in_zip and zip_offset fields.
12108 (JCF_SEEN_IN_ZIP): New macro.
12109 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
12110 * jcf-io.c: Change all ZipFileCache to ZipFile.
12111 (read_zip_member): New function.
12112 (open_in_zip): Call read_zip_member.
12113 * jcf-parse.c (find_in_current_zip): Remove function.
12114 (read_class): Merge in find_in_current_zip functionality.
12115 Call read_zip_member if needed.
12116 (parse_zip_file_entries): Use read_zip_member.
12117 (process_zip_dir): Update for removed and added JCF fields.
12118 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
12119
b5c4fed9
PB
121202001-01-21 Per Bothner <per@bothner.com>
12121
12122 Minor optimization of static ggc roots.
12123 * jcf-parse.c (parse_roots): New static field.
12124 (current_field, current_method, current_file_list): Replace by macros
12125 naming fields of parse_roots.
12126 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
12127 * class.c (class_roots): New static field.
12128 (registered_class, fields_ident, info_ident, class_list):
12129 New macros naming fields of parse_roots.
12130 (build_static_field_ref): Don't register roots here.
12131 (layout_class): Static field list replaced by macro class_list.
12132 (init_class_processing): Call ggc_add_tree_root for 4 roots.
12133 Initialize fields_ident and info_ident here.
12134
3432b91b
PB
121352001-01-21 Per Bothner <per@bothner.com>
12136
12137 * jcf-parse.c (ggc_mark_jcf): New function.
12138 (init_jcf_parse): Register current_jcf as ggc root.
12139
2c36c7fd
PB
121402001-01-21 Per Bothner <per@bothner.com>
12141
12142 * lang.c (put_decl_node): Print method's name.
12143
9c0c88ac
PB
121442001-01-21 Per Bothner <per@bothner.com>
12145
12146 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
12147 (verify_jvm_instructions): Use it, for better error messages on loads.
12148
230cbd5f
PB
121492001-01-21 Per Bothner <per@bothner.com>
12150
c4faeb92 12151 * verify.c (merge_type_state): Still may have to merge even if
230cbd5f
PB
12152 LABEL_VERIFIED (label).
12153
e6b6db0d
PB
121542001-01-21 Per Bothner <per@bothner.com>
12155
12156 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
12157 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
12158
b57300bc
PB
121592001-01-19 Per Bothner <per@bothner.com>
12160
12161 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
12162 if expeting an interface type. Refines Tom's change of 2000-09-12.
12163
ee08d4cc
PB
121642001-01-18 Per Bothner <per@bothner.com>
12165
12166 * gcj.texi (Input Options): Mention .java files.
12167
b1117741
APB
121682001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12169
12170 * lang-options.h (-Wunsupported-jdk11): Removed.
12171 * lang.c (flag_not_overriding): Deleted.
12172 (flag_static_local_jdk1_1): Likewise.
12173 (lang_W_options): Removed "unsupported-jdk11" entry.
12174 * parse.y (java_check_methods): Removed dead code.
12175
2dc73168
TT
121762001-01-17 Tom Tromey <tromey@redhat.com>
12177
12178 Changes suggested by Per Bothner:
12179 * gcj.texi (Input Options): Don't mention input files.
12180 (Code Generation): Updated --main information.
12181 (Invoking jcf-dump): Mention that --javap is incomplete.
12182 From Alexandre Petit-Bianco:
12183 (Warnings): Don't mention -Wunsupported-jdk11.
12184 My stuff:
12185 (Compatibility): Mention JDK 1.2-ness of libraries.
12186 (Resources): Mention resources used when writing gcj.
12187
bc65b5ec
TT
121882001-01-17 Tom Tromey <tromey@redhat.com>
12189
12190 * gcj.texi: New file.
12191 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
12192 (java.info): Depend on gcj.info.
12193 (java/gcj.dvi): New target.
12194 (java.dvi): Depend on gcj.dvi.
12195 (java.install-info): Wrote.
12196
930f6690
JS
121972001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
12198
12199 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
12200 having called make_decl_rtl.
12201
00b4575d
PB
122022001-01-14 Per Bothner <per@bothner.com>
12203
984ad2c6
PB
12204 Various patches to emit better messages on verification errors.
12205 * expr.c (push_type_0): Return error indication on stack overflow,
12206 instead of callinfg fatal.
12207 (push_type): Now just call push_type_0 (nd fatal on overflow).
12208 (pop_type_0): Return detailed error message (in a char** argument).
12209 (pop_type): If pop_type_0 fails, print error message.
12210 (pop_argument_types): Moved to verify.c.
12211 * verify.c (pop_argument_types): Moved from expr.c.
12212 Return a (possible) error message, rather than void.
12213 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
12214 (verify_jvm_instruction): Use new macros, improving error messages.
12215 For case OPCODE_astore use object_ptr_type_node.
12216 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
12217 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
12218
00b4575d
PB
12219 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
12220 constant, return body without wrapper. (Improves constant folding.)
12221 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
12222
d9da31dd
PB
122232001-01-13 Per Bothner <per@bothner.com>
12224
12225 * expr.c (expand_java_field_op): Assigning to a final field outside
12226 an initializer does not violate JVM spec, so should be warning, not
12227 error. (Sun's verifier does not complain - though MicroSoft's does.)
e64c46ce 12228
a67a383a
JM
122292001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
12230
12231 * gjavah.c (version), jcf-dump.c (version): Update copyright year
12232 to 2001.
12233
7e1376a1
BM
122342001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
12235
12236 * parse.y (resolve_expression_name): Permit instance variables from
12237 enclosing context in super constructor call.
12238 (resolve_qualified_expression_name): Permit enclosing class's qualified
12239 "this" in super constructor call.
12240
6c418184
MM
122412001-01-10 Mark Mitchell <mark@codesourcery.com>
12242
12243 * class.c (build_utf8_ref): Remove last argument in call to
12244 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12245 (build_class_ref): Likewise.
12246 (build_static_field_ref): Likewise.
12247 (get_dispatch_table): Likewise.
12248 (layout_class_method): Likewise.
12249 (emit_register_classes): Likewise.
12250 * constants.c (build_constant_data_ref): Likewise.
12251 * decl.c (builtin_function): Likewise.
12252 (create_primitive_vtable): Likewise.
12253 * expr.c (build_known_method_def): Likewise.
12254 (build_jni_stub): Likewise.
12255 (java_lang_expand_expr): Likewise.
e64c46ce 12256
0adc3d8a
TT
122572001-01-10 Tom Tromey <tromey@redhat.com>
12258
12259 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
12260
761491c8
APB
122612001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12262
12263 * java-tree.h (lang_printable_name_wls): New prototype.
12264 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
12265 rather than `current_class' to print type name. Don't prepend type
12266 names when printing constructor names.
12267 (lang_printable_name_wls): New function.
12268 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
12269 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
12270 * parse.y (patch_method_invocation): Message tuned for constructors.
12271 (not_accessible_p): Grant `private' access from within
12272 enclosing contexts.
e64c46ce 12273
dc08e603
APB
122742001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12275
12276 All files with updated copyright when applicable.
12277 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
12278 * class.c (mangle_class_field): Function removed.
12279 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
12280 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
12281 (build_class_ref): Call `java_mangle_class_field' instead of
12282 `mangle_class_field.'
12283 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
e64c46ce 12284 (layout_class): Call `java_mangle_decl' instead of
dc08e603
APB
12285 `mangle_static_field.'
12286 (cxx_keywords): Initialized static array moved to `lex.c.'
12287 (layout_class_method): Changed leading comment. Simplified to
12288 call `java_mangle_decl.' Local `ptr' moved in for loop body.
12289 * decl.c (lang_mark_tree): Mark field `package_list.'
12290 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
12291 (struct lang_type): New field `package_list.'
12292 (unicode_mangling_length): Prototype removed.
12293 (append_gpp_mangled_name, append_gpp_mangled_classtype,
12294 emit_unicode_mangled_name): Likewise.
12295 (cxx_keyword_p): New prototype.
12296 (java_mangle_decl, java_mangle_class_field,
12297 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
12298 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
12299 `build_expr_wfl.'
12300 * jvgenmain.c (main_method_prefix): Global variable removed.
12301 (main_method_suffix): Likewise.
12302 (do_mangle_classname): New function.
a83f01f0 12303 (main): Call it. Format changed to accommodate new mangling scheme.
dc08e603
APB
12304 * lex.c: (utf8_cmp): Conditionally prototyped.
12305 (cxx_keywords): Moved from class.c, conditionally defined.
12306 (utf8_cmp, cxx_keyword_p): Likewise.
12307 * mangle.c (obstack.h, ggc.h): Included.
12308 (mangle_field_decl): New function.
12309 (mangle_method_decl, mangle_type, mangle_pointer_type,
12310 mangle_array_type, mangle_record_type,
12311 find_compression_pointer_match, find_compression_array_match,
12312 find_compression_record_match,
12313 find_compression_array_template_match, set_type_package_list,
12314 entry_match_pointer_p, emit_compression_string, init_mangling,
12315 finish_mangling, compression_table_add, mangle_member_name): Likewise.
12316 (mangle_obstack): New global.
12317 (MANGLE_RAW_STRING): New macro.
12318 (unicode_mangling_length): Turned static.
12319 (append_unicode_mangled_name): Renamed from
12320 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
12321 replaces `obstack', removed from the parameter list.
12322 (append_gpp_mangled_name): Turned static. `mangle_obstack'
e64c46ce 12323 replaces parameter `obstack', removed from the parameter list. Call
dc08e603
APB
12324 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
12325 (append_gpp_mangled_classtype): Removed.
12326 (compression_table, compression_next): New static variables.
12327 * parse.y (temporary_obstack): Extern declaration removed.
12328
761491c8
APB
123292001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12330
12331 * parse.y (patch_binop): Compute missing type in error situations.
12332
5bb11b2e
BM
123332001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
12334
12335 * class.c (make_class_data): Push initial value for "arrayclass".
12336 * decl.c (init_decl_processing): Add new class field "arrayclass".
12337
ac39dac0
BM
123382001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
12339
12340 From patha@softlab.ericsson.se:
e64c46ce 12341 * parse.y (switch_label): Use build, not build1, to construct
ac39dac0
BM
12342 DEFAULT_EXPR.
12343
a5a4ce3c
NB
123442001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
12345
12346 * lang.c (lang_decode_option): Change -MA to -MP.
12347 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
12348 Update to new prototype; do quote targets.
12349 (jcf_dependency_write): Update.
12350
d27fd99a
BM
123512000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
12352
12353 Shorten primitive array allocation path:
12354 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
12355 to create new primitive arrays.
e64c46ce 12356 * expr.c (build_newarray): If generating native code, call
d27fd99a
BM
12357 soft_newarray_node with a reference to the primitive TYPE identifier
12358 instead of type_value.
e64c46ce 12359
c1eacb70
BM
123602000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
12361
12362 Fix for PRs gcj/312 and gcj/253:
12363 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
12364 dest if they arn't already.
e64c46ce 12365 * class.c (layout_class): Call maybe_layout_super_class on
c1eacb70
BM
12366 superinterfaces also, but only if compiling from bytecode.
12367
6d003d5c
BM
12368 Fix for PR gcj/373:
12369 * parse.y (create_class): Set ACC_STATIC if class is declared in an
12370 interface.
12371
325de66c
TT
123722000-12-15 Tom Tromey <tromey@redhat.com>
12373
12374 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
12375 set.
12376
e35990c4
AH
123772000-12-14 Andrew Haley <aph@redhat.com>
12378
12379 * boehm.c (mark_reference_fields): Change test to correctly detect
12380 bitmap overflow.
12381
53714cda
AJ
123822000-12-15 Andreas Jaeger <aj@suse.de>
12383
12384 * config-lang.in (lang_dirs): Added.
12385
1e0cdc10
APB
123862000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12387
12388 * parse.y (end_artificial_method_body): Fixed undefined behavior.
12389 Credits go to rth for finding it.
12390
e9e42530
MS
123912000-12-13 Mike Stump <mrs@wrs.com>
12392
12393 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
12394
3f27e3f8
TT
123952000-11-07 Tom Tromey <tromey@cygnus.com>
12396
12397 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
12398 * lex.c (java_ignorable_control_p): Removed.
12399 (java_letter_or_digit_p): Removed.
12400 (java_start_char_p): New function.
12401 (java_read_char): Return `int', not `unicode_t'. Changed
12402 callers.
12403 (java_read_unicode): Likewise.
12404 (java_read_unicode_collapsing_terminators): Likewise.
12405 (java_get_unicode): Likewise.
12406 (java_new_lexer): Initialize hit_eof.
12407 (java_parse_end_comment): Take `int' argument.
12408 (java_parse_doc_section): Likewise.
12409 (java_parse_escape_sequence): Don't allow backlash-newline.
12410 Return `int'.
12411 * lex.h (JAVA_DIGIT_P): Removed.
12412 (_JAVA_LETTER_OR_DIGIT_P): Removed.
12413 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
12414 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
12415 (JAVA_PART_CHAR_P): New macro.
12416 (UEOF): Now -1.
12417 (JAVA_CHAR_ERROR): Now -2.
12418 (java_lexer): New field `hit_eof'.
12419 * chartables.h: New file.
12420 * gen-table.pl: new file.
12421
568aac9c 124222000-11-20 Tom Tromey <tromey@cygnus.com>
9a07cfaf 12423 Alexandre Petit-Bianco <apbianco@cygnus.com>
568aac9c
TT
12424
12425 * parse.y (java_complete_lhs): Only allow compound assignment of
12426 reference type if type is String.
12427
f34ff6d6
APB
124282000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12429
12430 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
12431 jcf-path.c: Likewise.
12432
6e5589e8
AG
124332000-12-09 Anthony Green <green@redhat.com>
12434
12435 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
12436 filestart and filename_length as int values.
12437
8000caee
MD
124382000-12-07 Mo DeJong <mdejong@redhat.com>
12439
12440 * jcf-io.c (find_class): Correct the logic that tests to see if a
12441 .java file is newer than its .class file. The compiler was
12442 incorrectly printing a warning when file mod times were equal.
12443
f6bbde28
ZW
124442000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
12445
12446 * jvgenmain.c: Use ISPRINT not isascii.
12447
46142b26
APB
124482000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12449
12450 * parse.y (end_artificial_method_body): Fixed typo.
12451
f8b93ea7
APB
124522000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
12453
12454 * parse.y (patch_method_invocation): Pick the correct enclosing
12455 context when creating inner class instances.
12456 Fixes gcj/332.
12457
45441c5b
JM
124582000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
12459
12460 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12461 Update copyright year to 2000.
12462
1510057a
AG
124632000-11-23 Anthony Green <green@redhat.com>
12464
12465 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12466 Move current_file_list out of yyparse and make it static.
12467
12468 * expr.c: Declare quick_stack and tree_list_free_list as static
12469 (init_expr_processing): Register quick_stack and
12470 tree_list_free_list roots.
12471
5e18f6d6
APB
124722000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12473
12474 * parse.y (build_outer_field_access): New local `decl_ctx', use
12475 it. Check for field's context and current class immediate outer
12476 context inheritance.
12477 (outer_field_access_p): Consider fields inherited from the last
12478 enclosing context.
12479 (build_access_to_thisn): Stop at the last enclosing context if
12480 necessary.
12481 Fixes gcj/367.
12482
62c9aa5f 124832000-11-23 J"orn Rennecke <amylaar@redhat.com>
9196ece5
R
12484
12485 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12486
c385cdf6
BM
124872000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
12488
12489 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12490 scratch buffer.
12491
1535cc88
TT
124922000-11-20 Tom Tromey <tromey@cygnus.com>
12493
12494 * jv-scan.c (help): Document --complexity.
12495 (options): Added --complexity.
12496 (flag_complexity): New global.
12497 (main): Call `report'.
12498 * parse-scan.y (complexity): New global.
12499 (if_then_statement, if_then_else_statement,
12500 if_then_else_statement_nsi, switch_block_statement_group,
12501 while_expression, do_statement, for_begin, continue_statement,
12502 throw_statement, catch_clause, finally, method_invocation,
12503 conditional_and_expression, conditional_or_expression,
12504 conditional_expression): Update complexity.
12505 (reset_report): Reset complexity.
12506 (report): New function.
12507
d828bc42
TT
125082000-11-20 Tom Tromey <tromey@cygnus.com>
12509
12510 * lex.c (yylex): Added STRICT_TK case.
12511 * parse.y (STRICT_TK): Added.
12512 * parse-scan.y (STRICT_TK): Added.
12513 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12514 `;'. Use 4, not 3, with -k option. Correctly rename resulting
12515 file.
12516 * keyword.h: Rebuilt.
12517 * keyword.gperf (strictfp): Added.
12518
4e7842a0
TT
125192000-11-20 Tom Tromey <tromey@cygnus.com>
12520
12521 * lex.c (yylex): Recognize floating point constants with leading
12522 0.
12523
7e9355c6
KG
125242000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12525
12526 * java-tree.h (cyclic_inheritance_report): Constify.
12527 * parse.y (cyclic_inheritance_report): Likewise.
12528
a8a05998
ZW
125292000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
12530
12531 * parse.y (goal): Remove call to ggc_add_string_root.
12532
520a57c8
ZW
125332000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
12534
12535 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12536 Create string in scratch buffer, then pass to build_string.
12537
88f3c477
JM
125382000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
12539
12540 * parse.y (issue_warning_error_from_context): Add
12541 ATTRIBUTE_PRINTF.
12542
ac51395d
AG
125432000-11-11 Anthony Green <green@redhat.com>
12544
12545 * jcf-parse.c (process_zip_dir): Add finput parameter.
12546 (jcf_figure_file_type): Call process_zip_dir with appropriate
12547 argument.
12548
4e135bdd
KG
125492000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12550
12551 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12552 * jcf-parse.c (jcf_figure_file_type): Likewise.
12553
2e09e75a
JM
125542000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
12555
12556 * parse.y (create_new_parser_context): Use memset () instead of
12557 bzero ().
12558
136c35df
TT
125592000-11-08 Tom Tromey <tromey@cygnus.com>
12560
12561 * gjavah.c (process_file): Only include gcj/cni.h when generating
12562 CNI stubs.
12563
961192e1
JM
125642000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
12565
12566 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12567 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12568 instead of bzero ().
12569
099a5150
TT
125702000-11-05 Tom Tromey <tromey@cygnus.com>
12571
12572 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12573 * lex.c (IS_ZERO): New define.
12574 (java_perform_atof): Error on floating point underflow.
12575
cbf53a1d
TT
125762000-11-04 Tom Tromey <tromey@cygnus.com>
12577
12578 * lex.c (java_parse_escape_sequence): Only read two octal
12579 characters if the first one is greater than 3. Don't allow
12580 "octal" numbers to include the digits 8 or 9.
12581
436a88a6
JM
125822000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
12583
12584 * Make-lang.in (java.distdir): Remove.
12585
747800ee
TT
125862000-11-03 Tom Tromey <tromey@cygnus.com>
12587
4e2c8d44
TT
12588 * Make-lang.in (java.dvi): New target.
12589 Partial fix for PR other/567.
12590
b7436b72
TT
12591 * lang-options.h: Mention -Wout-of-date.
12592 * jcf-dump.c (flag_newer): New global.
12593 * gjavah.c (flag_newer): New global.
12594 * jcf-io.c (find_class): Only warn when flag_newer set.
12595 * lang.c (flag_newer): New global.
12596 (struct string_option): New declaration.
12597 (lang_W_options): New global.
12598 (process_option_with_no): New function.
12599 (lang_decode_option): Use it.
12600
0160fbe1
TT
12601 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12602 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12603 `$'.
12604
747800ee
TT
12605 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12606 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12607 * lex.c (java_read_unicode): Removed `term_context' argument.
12608 Recognize any number of `u' in `\u'.
12609 (java_read_unicode_collapsing_terminators): New function.
12610 (java_get_unicode): Use it.
12611 (java_lineterminator): Removed.
12612 (yylex): Produce error if character literal is newline or single
12613 quote. Return if eof found in middle of `//' comment. EOF in
12614 `//' comment is only an error if pedantic.
12615 (java_ignorable_control_p): New function.
12616 (java_parse_end_comment): Return if eof found in middle of
12617 comment.
12618 Include flags.h.
12619 * jv-scan.c (pedantic): New global.
12620
ee5f86dc
APB
126212000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12622
12623 * parse.y (outer_field_access_p): Inherited fields aren't
12624 consider outer fields.
12625 (maybe_build_thisn_access_method): Use
12626 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12627 (resolve_expression_name): Trigger an error if a static field
12628 is being accessed as an outer field.
12629
7ccd2fc9 126302000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
f6bbde28 12631
7ccd2fc9
APB
12632 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12633 Fixes gcj/365.
12634
b8dad04b
ZW
126352000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
12636
12637 * Make-lang.in: Move all build rules here from Makefile.in,
12638 adapt to new context. Wrap all rules that change the current
12639 directory in parentheses. Expunge all references to $(P).
12640 When one command depends on another and they're run all at
12641 once, use && to separate them, not ;. Add OUTPUT_OPTION to
12642 all object-file generation rules. Delete obsolete variables.
12643
12644 * Makefile.in: Delete.
12645 * config-lang.in: Delete outputs= line.
12646
2cb3951d
APB
126472000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12648
12649 * parse.y (patch_method_invocation): NULLify this_arg when already
12650 inserted.
12651 (maybe_use_access_method): Handle call to methods unrelated to the
12652 current class. Fixed comment.
12653 Fixes gcj/361.
12654
ee5f86dc
APB
126552000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12656
5f86874e
AP
12657 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12658 scope.
ee5f86dc 12659
07b5e470
TT
126602000-10-24 Tom Tromey <tromey@cygnus.com>
12661
12662 * lex.c (java_new_lexer): Initialize new fields. Work around
12663 broken iconv() implementations.
12664 (java_read_char): Swap bytes if required. Use fallback decoder if
12665 required.
12666 (byteswap_init, need_byteswap): New globals.
12667 (java_destroy_lexer): Only close iconv handle if it is in use.
12668 * lex.h (java_lexer): New fields read_anything, byte_swap,
12669 use_fallback.
12670 Made out_buffer unsigned.
12671
8ac1de05
APB
126722000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12673
12674 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12675 where an enclosing context can be set on the jdep.
12676 (do_resolve_class): Fixed identation.
12677
80393943
KG
126782000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12679
12680 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
f6bbde28 12681
80393943
KG
12682 * jcf-reader.c (peek_attribute, skip_attribute): Only define
12683 when requested.
12684
12685 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12686
12687 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12688
c7303e41
APB
126892000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12690
12691 * jcf-write.c (OP1): Update `last_bc'.
12692 (struct jcf_block): Fixed indentation and typo in comments. New
12693 field `last_bc'.
12694 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12695 follows `monitorenter'.
12696 * parse.y (patch_synchronized_statement): New local `tmp'. Call
12697 `patch_string'.
12698 Fixes gcj/232.
12699
316a06a1
TT
127002000-10-16 Tom Tromey <tromey@cygnus.com>
12701
12702 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12703 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12704 * lang-options.h: Added -MA, -MT, -MF..
12705 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12706 (DEPEND_TARGET_SET): New macro.
12707 (DEPEND_FILE_ALREADY_SET): Likewise.
12708 (init_parse): Handle new flags.
12709 * jcf.h (jcf_dependency_print_dummies): Declare.
12710 * Make-lang.in (s-java): Added mkdeps.o.
12711 * Makefile.in (BACKEND): Added mkdeps.o.
12712 (../gcjh$(exeext)): Added mkdeps.o.
12713 (../jcf-dump$(exeext)): Added mkdeps.o.
12714 * jcf-depend.c: Include mkdeps.h.
12715 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12716 add_entry): Removed.
12717 (jcf_dependency_reset): Rewrote.
12718 (dependencies): New global.
12719 (jcf_dependency_set_target): Rewrote.
12720 (jcf_dependency_add_target): Likewise.
12721 (jcf_dependency_add_file): Likewise.
12722 (munge): Removed.
12723 (print_ents): Removed.
12724 (jcf_dependency_write): Rewrote.
12725 (print_dummies): New global.
12726 (jcf_dependency_print_dummies): New function
12727 (jcf_dependency_write): Call deps_dummy_targets if required.
12728
dba41d30
APB
127292000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12730
12731 * gjavah.c (add_class_decl): Removed unused variables `tname',
12732 `tlen' and `name_index'.
12733 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12734 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12735 in `wfl_operator' with value.
12736 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12737 (jcf_figure_file_type): Fixed identation.
12738 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12739 * parse.y (analyze_clinit_body): New function.
12740 (static_initializer:): Reset `current_static_block'.
12741 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12742 `wfl_operator' with new value.
12743 (lookup_cl): Use EXPR_WFL_FILENAME.
12744 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12745 analyze_clinit_body.
12746 (build_outer_field_access): Access to this$<n> built from
12747 current_class, not its outer context.
12748 (build_access_to_thisn): Fixed leading comment. Tidied things up.
f6bbde28 12749 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
dba41d30
APB
12750 (patch_method_invocation): Use `is_static_flag' when already
12751 initialized.
12752 (patch_newarray): Removed assignment in ternary operator.
12753
1a2ebe6d
APB
127542000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12755
dba41d30 12756 * except.c (free_eh_ranges): Don't free `whole_range'.
1a2ebe6d 12757
8e7ab3ff
AG
127582000-10-15 Anthony Green <green@redhat.com>
12759
12760 * decl.c (init_decl_processing): Call init_class_processing before
12761 anything else.
12762
c7303e41
APB
127632000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12764
12765 * check-init.c (check_init): Fixed leading comment. Use
12766 LOCAL_FINAL_P.
12767 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12768 (give_name_to_locals): Likewise.
12769 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12770 fields in lang_decl_var.
12771 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12772 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12773 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12774 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12775 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12776 (LOCAL_FINAL): Rewritten.
12777 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12778 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12779 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12780 `init_final' fields.
12781 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12782 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12783 (TYPE_HAS_FINAL_VARIABLE): New macro.
12784 (struct lang_type): Added `afv' field.
12785 * parse.y (check_static_final_variable_assignment_flag): New function.
12786 (reset_static_final_variable_assignment_flag): Likewise.
12787 (check_final_variable_local_assignment_flag): Likewise.
12788 (reset_final_variable_local_assignment_flag): Likewise.
12789 (check_final_variable_indirect_assignment): Likewise.
12790 (check_final_variable_global_assignment_flag): Likewise.
12791 (add_inner_class_fields): Use LOCAL_FINAL_P.
12792 (register_fields): Handle local finals and final variables.
12793 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12794 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12795 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12796 on local finals.
12797 (java_complete_expand_methods): Loop to set
12798 TYPE_HAS_FINAL_VARIABLE. Call
f6bbde28 12799 `reset_final_variable_local_assignment_flag' and
c7303e41
APB
12800 `check_final_variable_local_assignment_flag' accordingly before
12801 and after constructor expansion. Call
12802 `reset_static_final_variable_assignment_flag'
f6bbde28 12803 before expanding <clinit> and after call
c7303e41
APB
12804 `check_static_final_variable_assignment_flag' if the
12805 current_class isn't an interface. After all methods have been
12806 expanded, call `check_final_variable_global_assignment_flag' and
12807 `check_static_final_variable_assignment_flag' if the current class
f6bbde28 12808 is an interface.
c7303e41
APB
12809 (maybe_yank_clinit): Fixed typo in comment.
12810 (build_outer_field_access_methods): Removed old sanity check. Use
12811 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12812 Don't create access methods for finals.
12813 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12814 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
f6bbde28 12815 existing DECL_INIT has been processed.
c7303e41
APB
12816 (java_complete_lhs): Likewise.
12817 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12818 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12819 logic.
12820 (patch_assignment): Use LOCAL_FINAL_P.
12821 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12822 DECL_INITIAL is nullified.
12823 Fixes gcj/163.
12824
4b945402
KG
128252000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12826
12827 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
f6bbde28 12828
4b945402
KG
12829 * Makefile.in (parse.c, parse-scan.c): Likewise.
12830
1f8f4a0b
MM
128312000-10-12 Mark Mitchell <mark@codesourcery.com>
12832
12833 * class.c (temporary_obstack): Remove.
12834 (make_class): Don't mess with obstascks.
12835 (push_class): Likewise.
12836 (set_super_info): Likewise.
12837 (add_method_1): Likewise.
12838 (add_method): Likewise.
12839 (add_field): Likewise.
12840 (build_utf8_ref): Likewise.
12841 (build_class_ref): Likewise.
12842 (build_static_field_ref): Likewise.
12843 (finish_class): Likewise.
12844 (push_super_field): Likewise.
12845 (layout_class): Likewise.
12846 (layout_class_methods): Likewise.
12847 (init_class_processing): Likewise.
12848 * constants.c (get_tag_node): Likewise.
12849 (build_constant_data_ref): Likewise.
12850 * decl.c (ggc_p): Remove.
12851 (copy_lang_decl): Use ggc_alloc.
12852 (complete_start_java_method): Don't mess with obstacks.
12853 (start_java_method): Likewise.
12854 (end_java_method): Likewise.
12855 * except.c (link_handler): Use xmalloc.
12856 (free_eh_ranges): New function.
12857 (method_init_exceptions): Use it.
12858 (add_handler): Use xmalloc.
12859 (expand_start_java_handler): Don't mess with obstacks.
12860 (prepare_eh_table_type): Likewise.
12861 (expand_end_java_handler): Likewise.
12862 * expr.c (push_value): Likewise.
12863 (create_label_decl): Likewise.
12864 (build_jni_stub): Likewise.
12865 (java_lang_expand_expr): Likewise.
12866 (note_instructions): Use xrealloc.
12867 (java_push_constant_from_pool): Don't mess with obstacks.
12868 (process_jvm_instruction): Likewise.
12869 * java-tree.h (cyclic_inheritance_report): Remove duplicate
12870 declaration.
12871 * jcf-parse.c (get_constant): Don't mess with obstacks.
12872 (read_class): Likewise.
12873 (jcf_parse): Likewise.
a83f01f0 12874 * lex.c (expression_obstack): Remove.
1f8f4a0b
MM
12875 (java_lex): Don't use obstack_free.
12876 * parse.h (exit_java_complete_class): Don't mess with obstacks.
12877 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
12878 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
12879 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
12880 * parse.y (gaol): Add more GC roots.
12881 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
12882 (lookup_field_wrapper): Likewise.
12883 (obtain_incomplete_type): Don't mess with obstacks.
a83f01f0 12884 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
1f8f4a0b
MM
12885 macros.
12886 (craft_constructor): Don't mess with obstacks.
12887 (safe_layout_class): Likewise.
12888 (java_complete_class): Likewise.
12889 (source_end_java_method): Likewise.
12890 (build_outer_field_access_methods): Likewise.
12891 (build_outer_method_access_method): Likewise.
12892 (maybe_build_thisn_access_method): Likewise.
12893 (build_dot_class_method_invocation): Likewise.
12894 (java_complete_tree): Likewise.
12895 (java_complete_lhs): Likewise.
12896 (do_merge_string_cste): Likewise.
12897 (patch_string_cst): Likewise.
12898 (array_constructor_check_entry): Likewise.
12899 * typeck.c (build_java_array_type): Likewise.
12900 (parse_signature_string): Likewise.
12901 (build_java_signature): Likewise.
f6bbde28 12902
3c1d1e7b
TT
129032000-10-12 Tom Tromey <tromey@cygnus.com>
12904
12905 Fix for PR gcj/356:
12906 * gjavah.c (add_class_decl): Don't special-case inner classes.
12907 (add_namelet): Likewise.
12908
a93eddcf
APB
129092000-10-11 Rodney Brown <RodneyBrown@mynd.com>
12910
12911 * java-tree.h: Constify current_encoding.
12912 * lang.c: Constify current_encoding.
12913
129142000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
12915
12916 * jvgenmain.c (class_mangling_suffix): Omit `.'.
12917 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
12918
129192000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12920
12921 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
12922 patch. Fixes gcj/340.
12923
2e165c53
TT
129242000-10-10 Tom Tromey <tromey@cygnus.com>
12925
12926 * lex.c (java_new_lexer): Initialize out_first and out_last
12927 fields.
12928 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
12929
c7303e41
APB
129302000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12931
12932 * parse.y (pop_current_osb): New function.
12933 (array_type:): Use `dims:', changed actions
12934 accordingly. Suggested by Anthony Green.
12935 (array_creation_expression:): Used pop_current_osb.
12936 (cast_expression:): Likewise.
12937 (search_applicable_method_list): Fixed indentation.
12938
129392000-10-08 Anthony Green <green@redhat.com>
12940
12941 * parse.y (array_type_literal): Remove production.
12942 (type_literals): Refer to array_type, not array_type_literal.
12943
29f8b718
APB
129442000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12945
12946 Patch contributed by Corey Minyard.
12947 * decl.c (check_local_named_variable): New function.
12948 (tree check_local_unnamed_variable): Likewise.
12949 (find_local_variable): Splitted. Call check_local_{un}named_variable.
12950
7fd9a516
AG
129512000-10-07 Anthony Green <green@redhat.com>
12952
12953 * class.c (layout_class): Handle case where superclass can't be
12954 layed out yet.
12955
20d431c9
JM
129562000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
12957
12958 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
12959 gperf.
12960
e0a0c416
TT
129612000-10-05 Tom Tromey <tromey@cygnus.com>
12962
12963 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
12964 * jvgenmain.c (class_mangling_prefix): Removed.
12965 (class_mangling_suffix): New global.
12966 (main): Use it.
12967 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
12968 `$'.
12969 (print_method_info): Handle overrides for static and final
12970 methods.
12971 (process_file): Generate declaration for class object field.
12972 * class.c (cxx_keywords): New array.
12973 (utf8_cmp): New function.
12974 (cxx_keyword_p): New function.
12975 (layout_class_method): Mangle C++ keywords by appending `$'.
12976 (mangle_field): New function.
12977 (mangle_class_field): Use mangle_field. Mangle class name as
12978 `class$'.
12979 (mangle_static_field): Use mangle_field.
12980
62c9aa5f 129812000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
6e22695a
APB
12982
12983 * decl.c (find_local_variable): Removed uncessary type check and
12984 fixed range check typo. From Corey Minyard.
12985
62c9aa5f 129862000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
6e22695a
APB
12987
12988 * decl.c (give_name_to_locals): New local `code_offset'. Call
e64c46ce 12989 `maybe_adjust_start_pc'.
6e22695a
APB
12990 * expr.c (note_instructions): New function.
12991 (expand_byte_code): Don't collect insn starts here.
12992 (peek_opcode_at_pc): New function.
12993 (maybe_adjust_start_pc): Likewise.
12994 * java-tree.h (maybe_adjust_start_pc): Declare.
12995 (note_instructions): Likewise.
dba41d30 12996 * jcf-parse.c (parse_class_file): Call `note_instructions'.
6e22695a 12997
62c9aa5f 129982000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
6e22695a
APB
12999
13000 * parse.y (field_access:): Fixed indentation.
13001 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
13002
7e51098e
TT
130032000-09-07 Tom Tromey <tromey@cygnus.com>
13004
13005 Fix for PR gcj/307:
13006 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
13007 JPRIMITIVE_TYPE_P, for arithmetic operators.
13008 (patch_method_invocation): Indentation fix.
13009 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
13010 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
13011 (do_unary_numeric_promotion): Cleaned up code.
13012 (valid_cast_to_p): Handle boolean correctly.
13013
5beededc
TT
130142000-09-27 Tom Tromey <tromey@cygnus.com>
13015
13016 * lex.c (java_read_unicode): Reset bs_count when finished with
13017 `\u' sequence.
13018
f15b9af9
MM
130192000-10-01 Mark Mitchell <mark@codesourcery.com>
13020
13021 Convert to GC.
13022 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
13023 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
13024 (typeck.o): Depend on ggc.h.
13025 * class.c (add_method_1): Use GC functions for allocation.
13026 (init_class_processing): Register roots.
13027 * decl.c (ggc_p): Set to 1.
13028 (pending_local_decls): Make it static.
13029 (push_jvm_slot): Use GC functions for allocation.
13030 (init_decl_processing): Register roots.
13031 (give_name_to_locals): Use GC functions for allocation.
13032 (lang_mark_tree): New function.
13033 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
13034 functions for allocation.
13035 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
13036 * lex.c (java_lex): Use build_string, rather than replicating it
13037 inline.
13038 * parse.y (goal): Add more roots.
13039 (mark_parser_ctxt): New function.
13040 * typeck.c: Include ggc.h.
f6bbde28 13041
99eaf8d4
APB
130422000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13043
13044 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
13045 contains something else than MODIFY_EXPR.
13046
19e223db
MM
130472000-09-23 Mark Mitchell <mark@codesourcery.com>
13048
13049 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
13050 * Makefile.in (parse.o): Depend on ggc.h.
13051 (class.o): Likewise.
13052 (constants.o): Likewise.
13053 (decl.o): Likewise.
13054 (expr.o): Likewise.
13055 (jcf-parse.o): Likewise.
13056 (jcf-write.o): Likewise.
13057 (mangle.o): Likewise.
13058 * class.c: Include ggc.h.
13059 (build_static_field_ref): Register GC roots.
13060 (layout_class): Likewise.
13061 (init_class_processing): Likewise.
13062 * constants.c: Include ggc.h.
13063 (current_constant_pool_data_ref): Remove.
13064 (tag_nodes): Move it to ...
13065 (get_tag_node): ... here. Register GC roots.
13066 * decl.c: Include ggc.h. Remove many global tree definitions.
13067 (throw_node): Define.
13068 (java_global_trees): Likewise.
13069 (predef_filenames): Make the size a constant.
13070 (init_decl_processing): Adjust accordingly.
13071 (init_decl_processing): Call init_jcf_parse. Register GC roots.
13072 * expr.c: Include ggc.h.
13073 (init_expr_processing): Register GC roots.
13074 (build_invokeinterface): Likewise.
13075 * java-tree.h: Replace extern tree declarations with macros.
13076 (java_global_trees): New variable.
13077 (java_tree_index): New enumeration.
13078 (init_jcf_parse): Declare.
13079 * jcf-parse.c: Include ggc.h.
13080 (current_class): Remove declaration.
13081 (main_class): Likewise.
13082 (all_class_list): Likewise.
13083 (predefined_filename_p): Adjust for constant size of
13084 predef_filenames.
13085 (init_jcf_parse): New function.
13086 * jcf-write.c: Include ggc.h.
13087 (generate_classfile): Register GC roots.
13088 (append_synthetic_attribute): Likewise.
13089 (append_innerclass_attribute_entry): Likewise.
13090 * lang.c: Include ggc.h.
13091 (lang_print_error): Register GC roots.
13092 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
13093 with macros.
13094 * parse.y: Include ggc.h.
13095 (wfl_operator): Remove.
13096 (goal): Register GC roots.
13097 (java_pop_parser_context): Adjust for new field names.
13098 (java_parser_context_save_global): Likewse.
13099 (java_parser_context_restore_global): Likewise.
13100 (java_parser_context_suspend): Likewise.
13101 (java_parser_context_resume): Likewise.
13102 (verify_constructor_circularity): Register GC roots.
13103 (lookup_cl): Likewise.
13104 (java_reorder_fields): Likewise.
13105 (build_current_this): Likewise.
13106 (class_in_current_package): Likewise.
13107 (argument_types_convertible): Likewise.
13108 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
f6bbde28 13109
4c4b521a
TT
131102000-09-14 Tom Tromey <tromey@cygnus.com>
13111
13112 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
13113
6b8a24cd
TT
131142000-09-13 Tom Tromey <tromey@cygnus.com>
13115
13116 * jcf-parse.c: Include <locale.h>.
13117 * jv-scan.c: Include <locale.h>.
13118
86e4b1e4
TT
131192000-09-12 Tom Tromey <tromey@cygnus.com>
13120
13121 * expr.c (pop_type_0): Return `Object' if trying to merge two
13122 interface types.
13123 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
13124 interface types; `Object' is always a valid supertype.
13125
d19cbcb5
TT
131262000-09-12 Tom Tromey <tromey@cygnus.com>
13127
13128 Fix for PR gcj/33:
13129 * jv-scan.c (help): Document --encoding.
13130 (options): Added `encoding' entry.
13131 (OPT_ENCODING): New define.
13132 (main): Handle --encoding.
13133 Include <langinfo.h> if nl_langinfo exists.
13134 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
13135 --encoding.
13136 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
13137 (parse_source_file): Correctly call java_init_lex. Added `finput'
13138 argument. Use nl_langinfo to determine default encoding.
13139 * java-tree.h (current_encoding): Declare.
13140 * parse.y (java_parser_context_restore_global): Don't restore
13141 `finput'.
13142 (java_parser_context_save_global): Don't set `finput' field.
13143 (java_pop_parser_context): Don't restore `finput'. Free old lexer
13144 if required.
13145 * lang.c (current_encoding): New global.
13146 (lang_decode_option): Recognize `-fencoding='.
13147 (finish_parse): Don't close finput.
13148 * parse.h (struct parser_ctxt): Removed `finput' and
13149 `unget_utf8_value' fields. Added `lexer' field.
13150 (java_init_lex): Fixed declaration.
13151 * lex.c (java_new_lexer): New function.
13152 (java_destroy_lexer): Likewise.
13153 (java_read_char): Added `lex' argument. Handle iconv case.
13154 (java_read_unicode): Added `lex' argument. Count backslashes in
13155 lexer structure.
13156 (java_init_lex): Added `finput' and `encoding' arguments. Set
13157 `lexer' field in ctxp.
13158 (BAD_UTF8_VALUE): Removed.
13159 (java_lex): Handle seeing UEOF in the middle of a string literal.
13160 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
13161 (java_lexer): New structure.
13162 (UNGETC): Removed.
13163 (GETC): Removed.
13164 (DEFAULT_ENCODING): New define.
13165 (java_destroy_lexer): Declare.
13166
ee17a290
TT
131672000-09-12 Tom Tromey <tromey@cygnus.com>
13168
13169 Fix for PR gcj/343:
13170 * lex.c (java_init_lex): Initialize java_io_serializable.
13171 * parse.y (java_io_serializable): New global.
13172 (valid_ref_assignconv_cast_p): An array can be cast to
13173 serializable.
13174
d8ea8f28
ZW
131752000-09-10 Zack Weinberg <zack@wolery.cumb.org>
13176
13177 * decl.c, expr.c: Include defaults.h if not already included.
13178 Don't define the *_TYPE_SIZE macros.
13179
0caae6dd
GK
131802000-09-09 Geoffrey Keating <geoffk@cygnus.com>
13181
13182 * typeck.c (build_java_array_type): Correct first parameter
13183 in ADJUST_FIELD_ALIGN invocation.
13184
f0bee8b3
TT
131852000-09-06 Tom Tromey <tromey@cygnus.com>
13186
13187 * lang-specs.h: Also recognize `-femit-class-files'.
13188
3e99f50c
APB
131892000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13190
13191 * verify.c (merge_types): Load the types to merge if necessary.
13192
3ca8c9ae
AG
131932000-09-02 Anthony Green <green@redhat.com>
13194
13195 * jcf-io.c: Include zlib.h.
13196 (open_in_zip): Read compressed class file archives.
13197 * zipfile.h (ZipDirectory): Add uncompressed_size and
13198 compression_method fields.
13199 * zextract.c (read_zip_archive): Collect file compression info.
13200
e1d565ab
BM
132012000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
13202
f6bbde28 13203 * parse.y (do_resolve_class): Also explore superclasses of
e1d565ab
BM
13204 intermediate enclosing contexts when searching for inner classes.
13205
29f8b718
APB
132062000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13207
13208 * parse.y (variable_declarator_id:): Better error message.
13209 (expression_statement:): Use YYNOT_TWICE.
13210 (cast_expression:): Likewise.
13211 (assignment:): Likewise.
13212
354e99ce
APB
132132000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13214
13215 * parse.y (do_merge_string_cste): New locals. Create new
13216 STRING_CSTs each time, use memcpy. Fixes gcj/311.
13217
7c097ee9
HB
132182000-08-07 Hans Boehm <boehm@acm.org>
13219
13220 * boehm.c (mark_reference_fields): Set marking bits for all words in
13221 a multiple-word record.
13222 (get_boehm_type_descriptor): Use the procedure marking descriptor for
13223 java.lang.Class.
f6bbde28 13224
3d919a0e
MS
132252000-08-31 Mike Stump <mrs@wrs.com>
13226
13227 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
13228 jcf-dump$(exeext)): Make parallel safe.
13229
63ad61ed
ZW
132302000-08-29 Zack Weinberg <zack@wolery.cumb.org>
13231
13232 * jcf-parse.c (set_source_filename): Constify a char *.
13233 * jcf-write.c (append_innerclasses_attribute,
13234 make_class_file_name): Constify a char *. Don't recycle a
13235 variable for an unrelated purpose.
13236 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
13237 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
13238
c00f0fb2
APB
132392000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13240
13241 * expr.c (can_widen_reference_to): Fixed indentation.
13242 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
13243 * parse.y: `finit$' replaces `$finit$' in comments.
13244 (try_builtin_assignconv): Fixed leading comment.
13245
94574545
GM
132462000-08-25 Greg McGary <greg@mcgary.org>
13247
13248 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
13249
6e2aa220
GM
132502000-08-24 Greg McGary <greg@mcgary.org>
13251
13252 * lang.c (lang_decode_option): Use ARRAY_SIZE.
13253 * parse.y (BINOP_LOOKUP): Likewise.
13254
9b1ee05b
AH
132552000-08-22 Andrew Haley <aph@cygnus.com>
13256
13257 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
13258 sign extending. Fixes gcj/321.
13259 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
13260 combining to make a jlong. Fixes gcj/321.
13261
05a3d06e 132622000-08-21 Nix <nix@esperi.demon.co.uk>
f6bbde28 13263
05a3d06e
N
13264 * lang-specs.h: Do not process -o or run the assembler if
13265 -fsyntax-only.
13266
65f69237
AH
132672000-08-16 Andrew Haley <aph@cygnus.com>
13268
13269 * typeck.c (build_java_array_type): Rewrite code to do array
13270 alignment. Take into account back-end macros when aligning array
13271 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
13272 user to set alignment. Fixes gcj/252 and 160.
13273
2e0f0aff
TT
132742000-08-09 Tom Tromey <tromey@cygnus.com>
13275
1175b9b4
TT
13276 * parse.y (check_abstract_method_definitions): Now return `int'.
13277 Check implemented interfaces. Fixes PR gcj/305.
13278
2e0f0aff
TT
13279 * parse.y (patch_switch_statement): Disallow `long' in switch
13280 expressions. Fixes PR gcj/310.
13281
25bdcbc5
APB
132822000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13283
13284 * decl.c (finit_leg_identifier_node): New global.
13285 (init_decl_processing): Use `finit$' to initialize
13286 finit_identifier_node. Use `$finit$' to initialize
13287 finit_leg_identifier_node.
13288 * expr.c (expand_java_field_op): Use ID_FINIT_P.
13289 * java-tree.h (finit_identifier_node): Changed attached comment.
13290 (finit_leg_identifier_node): New declaration.
13291 (ID_FINIT_P): Take finit_identifier_node and
13292 finit_leg_identifier_node into account. This is a backward
13293 compatibility hack.
13294
81baa09a
APB
132952000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13296
13297 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
13298 Jan 6 2000 patch.
13299 (generate_bytecode_insns): Check `nargs' before emitting it.
13300 * verify.c (merge_type_state): Fixed typo.
13301 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
13302 generate_bytecode_{conditional,insns}.
13303
62c9aa5f 133042000-08-13 Anthony Green <green@redhat.com>
458530ee
AG
13305
13306 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
13307 for -pg builds).
13308
34d4df06
APB
133092000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13310
13311 * class.c (maybe_layout_super_class): Fixed indentation.
13312 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
13313 (java_check_methods): New function declaration.
13314 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
13315 instead of `str_ptr'.
13316 * jcf-write.c (generate_bytecode_insns): Emit number the of args
13317 of a `invokeinterface' at the right time.
13318 * parse.h (WFL_STRIP_BRACKET): New macro.
13319 (SET_TYPE_FOR_RESOLUTION): Use it.
dba41d30 13320 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
34d4df06
APB
13321 (check_class_interface_creation): Don't check for cross package
13322 innerclass name clashes.
dba41d30 13323 (method_header): Behave properly if MDECL is `error_mark_node'.
34d4df06
APB
13324 (method_declarator): Return `error_mark_node' if bogus current
13325 class.
13326 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
13327 (resolve_and_layout): New local `decl_type', set and used. Call
13328 java_check_methods.
13329 (java_check_methods): New method.
13330 (java_layout_classes): Use it.
13331 (resolve_qualified_expression_name): No EH check necessary in
13332 access$<n>.
13333 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
13334 `case' statement.
13335 (patch_assignment): Set DECL_INITIAL on integral final local.
13336
5f1c312a
APB
133372000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
13338
13339 * java-tree.h (flag_extraneous_semicolon): New extern.
13340 * lang-options.h: (-Wextraneous-semicolon): New option.
13341 * lang.c (flag_redundant): Fixed typo in leading comment.
13342 (flag_extraneous_semicolon): New global.
13343 (lang_decode_option): Set `flag_extraneous_semicolon' when
13344 -Wall. Decode `-Wextraneous-semicolon'.
13345 * parse.y (type_declaration:): Removed `SC_TK' hack, added
13346 `empty_statement' rule.
13347 (class_body_declaration): Likewise.
13348 (method_body:): Accept `;' as a method body.
13349 (static_initializer:): Removed `SC_TK' hack.
13350 (constructor_block_end:): Likewise.
13351 (empty_statement:): Report deprecated empty declaration. Fixes
13352 gcj/295
13353
25bdcbc5 133542000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
f0f3a777
APB
13355
13356 * parse.y (build_dot_class_method_invocation): Changed parameter
dba41d30 13357 name to `type'. Build signature from `type' and convert it to a
f0f3a777
APB
13358 STRING_CST if it's an array.
13359 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
13360 to use `ref_type' directly.
13361
62c9aa5f 133622000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
64c04091
OP
13363
13364 * lang-options.h: Added a comma after the last element to avoid
13365 syntax errors when other languages define additional options.
13366
a36556a8
ZW
133672000-08-04 Zack Weinberg <zack@wolery.cumb.org>
13368
13369 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
13370 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
13371 (jc1): Link with $(BACKEND).
13372 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
13373
50e60bc3
ZW
133742000-08-02 Zack Weinberg <zack@wolery.cumb.org>
13375
37620334
ZW
13376 * jvspec.c: Adjust type of second argument to
13377 lang_specific_driver, and update code as necessary.
13378
50e60bc3
ZW
13379 * class.c (build_dtable_decl): Initialize dummy.
13380
f0f3a777
APB
133812000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13382
13383 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
13384 method bodies not to rule out discarding `<clinit>'; don't use
13385 <clinit> to initialize static fields with constant initializers.
13386
133872000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13388
13389 * gjavah.c (print_method_info): Added `synth' parameter. Skip
13390 synthetic methods.
13391 (method_synthetic): New global.
13392 (HANDLE_METHOD): Recognize synthetic method and tell
13393 `print_method_info' about it.
13394 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
13395 processing a synthetic method.
13396 * jcf-reader.c (skip_attribute): New function.
13397 ( skip_attribute): Likewise.
13398
133992000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13400
13401 * parse.y (build_outer_field_access): Fixed comments.
13402 (fix_constructors): Emit the initialization of this$<n> before
13403 calling $finit$.
13404 (resolve_qualified_expression_name): Build an access to `decl' if
13405 necessary.
13406
134072000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13408
13409 * parse-scan.y (curent_class): Non longer const.
13410 (inner_qualifier, inner_qualifier_length): Deleted.
13411 (current_class_length): New global.
13412 (bracket_count): Fixed typo in leading comment.
13413 (anonymous_count): New global.
13414 (class_instance_creation_expression:): Handle anonymous classes.
13415 (anonymous_class_creation:): New rule.
13416 (push_class_context): Rewritten.
13417 (pop_class_context): Likewise.
13418 (INNER_QUALIFIER): Macro deleted.
13419 (report_class_declaration): call `push_class_context' when
13420 entering the function. `fprintf' format modified not to use
13421 INNER_QUALIFIER.
13422 (report_class_declaration): Assign `package_name' and
a83f01f0 13423 `current_class' to NULL separately.
f0f3a777
APB
13424
134252000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13426
13427 * expr.c (build_invokeinterface): Call layout_class_methods on
13428 target interface.
13429
13107ec0 134302000-07-27 Tom Tromey <tromey@cygnus.com>
f6bbde28 13431 Anthony Green <green@cygnus.com>
13107ec0
TT
13432 Alexandre Petit-Bianco <apbianco@cygnus.com>
13433
13434 * class.c (make_class_data): Create vtable for abstract classes.
13435 (get_dispatch_table): Changed to cope with abstract classes.
13436
da632f2c
APB
134372000-07-27 Tom Tromey <tromey@cygnus.com>
13438
13439 * parse.y (patch_method_invocation): Don't reverse the argument
13440 list when dealing with anonymous class constructors. Fixed typo in
13441 comment.
13442
134432000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13444
13445 * parse.y (build_alias_initializer_parameter_list): Reverse
13446 crafted list when building aliases for anonymous class
13447 constructors.
13448
1e12ab9b
APB
134492000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13450
13451 * parse.y (jdep_resolve_class): Don't bother checking potential
13452 innerclass access if `decl' is NULL.
13453 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13454 WFL.
13455
4c31fe99
APB
134562000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13457
13458 * parse.c: Remove (again.)
13459
1e12ab9b
APB
134602000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13461
13462 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13463 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13464 outside the `if' statement, alias to innerclass removed, `decl'
13465 used to mark the class complete.
13466
f4530f43
APB
134672000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13468
13469 * parse.y (simple_name:): Fixed typo in error message.
13470
e7c7bcef
APB
134712000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13472
13473 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13474 or its first operand can be error marks.
13475
134762000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13477
13478 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13479 * parse.y (method_header): Likewise.
13480
02ae6e2e
APB
134812000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13482
13483 * parse.y (process_imports): Consider that one might be trying to
13484 import an innerclass. Fixes gcj/254
13485
e7c7bcef
APB
134862000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13487
13488 * parse.y (find_as_inner_class): Handle the case where the
13489 enclosing context of an innerclass has been loaded as bytecode.
13490
4142b247
APB
134912000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13492
f6bbde28 13493 * parse.y (simple_name:): Reject `$' in type names.
4142b247
APB
13494 (resolve_type_during_patch): Use `type' as a second
13495 argument to resolve_no_layout. Fixes gcj/257.
13496
cab8e2bd
BM
134972000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
13498
f6bbde28 13499 * parse.y (find_most_specific_methods_list): Select the only
cab8e2bd
BM
13500 non-abstract method even if max has been set.
13501 Fixes gcj/285, gcj/298.
13502
ca2875c4
JS
135032000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
13504
13505 * lang-specs.h: Added %(jc1) to java compiler options.
13506
bfbbc080
ZW
135072000-07-14 Zack Weinberg <zack@wolery.cumb.org>
13508
13509 * .cvsignore: New file.
13510
11b26d72
APB
135112000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13512
13513 * parse.y (not_accessible_p): Access granted to innerclasses
13514 (indirectly) extending the reference type. Fixes gcj/249.
13515
135162000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13517
13518 * parse.y (patch_method_invocation): Fixed comment.
13519 (maybe_use_access_method): Build this$<n>s to the context of the
13520 target method, or a type that extends it. Fixes gcj/242.
13521
649c9142
MM
135222000-07-13 Mark Mitchell <mark@codesourcery.com>
13523
13524 * parse.c: Remove.
13525
ee97d354
APB
135262000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13527
13528 * parse.y (fold_constant_for_init): Avoid bullish conversion.
13529
44fadf1e
TT
135302000-07-13 Tom Tromey <tromey@cygnus.com>
13531
13532 * lang-specs.h: Added %{I*}.
13533
ea414c97
ZW
135342000-07-13 Zack Weinberg <zack@wolery.cumb.org>
13535
13536 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
13537
792abd35
MM
135382000-07-12 Mark Mitchell <mark@codesourcery.com>
13539
13540 * parse-scan.c: Remove.
13541
11b26d72
APB
135422000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13543
13544 * class.c (set_super_info): Handled protected inner classes.
13545 (common_enclosing_context_p): Bail early if arguments aren't both
13546 inner classes.
13547 (get_access_flags_from_decl): Handle private and protected inner
13548 classes.
13549 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13550 (CLASS_PROTECTED): Likewise.
dba41d30 13551 (struct lang_type): New bitfield `poic'.
11b26d72
APB
13552 * parse.y (jdep_resolve_class): Call check_inner_class_access on
13553 inner classes only.
13554 (check_inner_class_access): Renamed arguments, added
13555 comments. Handles protected inner classes (fixes gcj/225)
13556 (not_accessible_p): Fixed comments. Avoid handling inner classes.
13557
135582000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13559
13560 * parse.y (resolve_qualified_expression_name): Verify qualified
dba41d30 13561 access to `this'. Fixes gcj/239.
11b26d72 13562
e67eb1a0 135632000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
2f2bd00a 13564
e67eb1a0
APB
13565 * jcf-write.c (generate_classfile): Don't install ConstantValue
13566 for null pointers.
2f2bd00a 13567
11b26d72
APB
135682000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13569
13570 * parse.y (resolve_qualified_expression_name): Handle inner class
13571 access. Fixes gcj/256.
13572
629d4b4d
APB
135732000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13574
13575 * jcf-write.c (generate_classfile): Properly install the
13576 ConstantValue attribute and the initial value constant pool index
13577 on string constants.
13578 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13579 class files.
13580
0c2b8145
APB
135812000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13582
13583 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13584 construct.
13585 * parse.y (find_as_inner_class): Fixed typo.
13586 (do_resolve_class): Explore enclosing contexts when searching for
13587 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13588 (check_inner_class_access): Check `decl' which can be null in case
13589 of previous errors.
13590
135912000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13592
dba41d30 13593 * java-tree.h (java_debug_context): Declared `extern'.
0c2b8145
APB
13594 (safe_layout_class): Likewise.
13595 * parse.y (resolve_field_access): Field must be `static' in order
13596 to be replaced by its initial value. Added comments.
13597 (find_applicable_accessible_methods_list): Fixed typo.
13598 (find_most_specific_methods_list): Methods found in innerclasses
13599 take over methods founds in the enclosing contexts.
13600 (java_complete_tree): Loosen restrictions on the type of DECLs
13601 that can be replaced by their initialization values.
dba41d30 13602 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
0c2b8145 13603
0267da64
TT
136042000-07-05 Tom Tromey <tromey@cygnus.com>
13605
13606 * Make-lang.in (PARSE_DIR): New macro.
13607 (PARSE_RELDIR): Likewise.
13608 (PARSE_C): Likewise.
13609 (PARSE_SCAN_C): Likewise.
13610 ($(PARSE_C)): New target.
13611 ($(PARSE_SCAN_C)): Likewise.
13612 (SET_BISON): New macro.
13613 (BISONFLAGS): Likewise.
13614 (JAVABISONFLAGS): Likewise.
13615
1bbee75b
BM
136162000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
13617
f6bbde28
ZW
13618 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13619 argument on the first pass for CNI as well as JNI.
13620 (print_method_info): Set up method name on the first pass only.
13621
98a52c2c
APB
136222000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13623
13624 * parse.y (parser_qualified_classname): Removed parameter
13625 `is_static'.
13626 (create_interface): Removed first passed parameter to
13627 parser_qualified_classname.
13628 (create_class): Likewise. Don't install alias on static
13629 innerclasses. Fixes gcj/275.
13630
136312000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13632
13633 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13634 debugable statement with empty_stmt_node. Fixes gcj/272
13635
136362000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13637
13638 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13639 gcj/271.
13640
c1c8f8cc
APB
136412000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13642
13643 * jcf-write.c (push_long_const): Appropriately cast short negative
13644 constant to jword.
13645
cf1b2274
APB
136462000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13647
13648 * parse.y (verify_constructor_super): Use loop variable
13649 `m_arg_type' initialized with `mdecl_arg_type'.
13650
6eaeeb55
TT
136512000-06-29 Tom Tromey <tromey@cygnus.com>
13652
13653 * parse.y (resolve_field_access): Handle case where `type_found'
13654 is NULL.
13655
18ee3d5e
APB
136562000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13657
13658 * expr.c (lookup_field): The same field can be found through two
13659 different interface. Don't declare it ambiguous in that case.
13660
61d5c158
TT
136612000-06-27 Tom Tromey <tromey@cygnus.com>
13662
13663 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
13664 follows \r, then unget it at a lower level.
13665
70541f45
TT
136662000-06-26 Tom Tromey <tromey@cygnus.com>
13667
13668 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13669 java_complete_tree.
13670
774d2baf
TT
136712000-06-25 Tom Tromey <tromey@cygnus.com>
13672
13673 * parse.y (for_statement): Wrap expression in a WFL if it is a
13674 constant. For PR gcj/268.
13675
d6baf6f5
APB
136762000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
13677
13678 * parse.y (do_resolve_class): Minor optimiztion in the package
17126208 13679 list search. Removed unnecessary test and return statement.
d6baf6f5
APB
13680 (valid_ref_assignconv_cast_p): Order of arguments to
13681 enclosing_context_p fixed.
13682
120f0c10
TT
136832000-06-24 Tom Tromey <tromey@cygnus.com>
13684
ae4a4c88
TT
13685 * expr.c (lookup_field): Print error and return error_mark_node if
13686 field reference is ambiguous.
13687
120f0c10
TT
13688 * parse.y (check_abstract_method_definitions): Also check if
13689 `other_method' is abstract.
13690
cf1748bf
APB
136912000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13692
13693 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13694 classes.
13695 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
dba41d30 13696 (struct lang_type): New field `pic'.
cf1748bf
APB
13697 (CLASS_PRIVATE): New macro.
13698 * parse.y (check_inner_class_access): New function.
13699 (jdep_resolve_class): Call it.
13700
f1ff439a
TT
137012000-06-23 Tom Tromey <tromey@cygnus.com>
13702
13703 * parse.y (patch_incomplete_class_ref): Initialize the returned
13704 class. For PR gcj/260.
13705
9a7ab4b3
APB
137062000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13707
13708 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13709
137102000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13711
13712 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13713 Java specific checks.
13714 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13715 screened by DECL_P.
13716 * java-tree.def (CASE_EXPR): Marked 'e'.
13717 (DEFAULT_EXPR): Likewise.
13718 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13719 screened by DECL_P.
13720 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13721 Java specific checks.
13722 (generate_bytecode_insns): Test try_block for BLOCK before using
13723 BLOCK_EXPR_BODY.
13724 * parse.y (build_wfl_wrap): Added `location' argument. Set
13725 EXPR_WFL_LINECOL accordingly.
13726 (dim_expr:): Wrap constants with WFLs.
13727 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13728 (resolve_package): Check for `stmt' not being a BLOCK before
13729 building a debuggable statement with it.
13730 (make_qualified_primary): Added extra parameter to build_wfl_wrap
13731 invocation.
13732 (resolve_field_access): Make sure `decl' is a DECL before treating
13733 it as such.
13734 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13735 IDENTIFIER_NODE before treating it as such.
13736 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13737 treating it as such.
13738 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13739 to be applied only on non array types.
13740
137412000-06-16 Per Bothner <per@bothner.com>
13742
13743 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
13744 define in terms of DECL_RESULT, as that fails when --enable-checking.
f6bbde28 13745
ffb1f63d
KG
137462000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13747
13748 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
13749 types the same in comparison.
13750 (CHECK_OP): Add static prototype.
13751
11cf4d18
JJ
137522000-06-13 Jakub Jelinek <jakub@redhat.com>
13753
13754 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13755 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13756 * parse.c: Rebuilt.
13757
5ac9118e
KG
137582000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13759
13760 * decl.c (create_primitive_vtable): Prototype.
13761
13762 * jcf-write.c (generate_bytecode_insns): Initialize variable
13763 `saved_context'.
13764
13765 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13766
ad69b5b6
BM
137672000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13768
13769 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13770 to track searched classes, and do not search the same class more than
13771 once. Call find_applicable_accessible_methods_list on immediate
13772 superclass, instead of search_applicable_method_list on all ancestors.
13773 Fix for PR gcj/238.
13774
cf1748bf
APB
137752000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
13776
13777 * parse.y (register_fields): Permit static fields in inner classes
13778 if they are final. Fix for PR gcj/255.
13779
9a7ab4b3
APB
137802000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13781
13782 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13783 * parse.y (find_in_imports): Returned type changed to void,
13784 leading comment fixed.
13785 (register_package): New function.
13786 (qualify_and_find): Likewise.
13787 (package_declaration:): Use `register_package'.
13788 (single_type_import_declaration:): Removed local variable
13789 `node'. Added missing `;' for consistency.
13790 (type_import_on_demand_declaration:): Use `chainon' to link new
13791 entries.
13792 (lookup_field_wrapper): Lookup local variables defined in outer
13793 contexts first.
13794 (java_complete_class): Don't reverse the list of imported on demand.
13795 (do_resolve_class): Reorganized. Removed local variable
13796 `original_name'. Call `qualify_and_find' with the current package
13797 name, invoke `find_in_imports_on_demand' right after. Call
13798 `qualify_and_find' with the packages we've seen so far. Fixed
13799 operations numbering in comments.
13800 (java_expand_class): Don't reverse `package_list'.
13801 (find_most_specific_methods_list): New local variables `abstract'
13802 and `candidates'. Use them to pick the right method.
13803
62c9aa5f 138042000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
14d075d8
TT
13805
13806 * parse.y (check_modifiers_consistency): Don't subtract out
13807 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13808
603832a0
PT
138092000-06-04 Philipp Thomas <pthomas@suse.de>
13810
13811 * Makefile.in (INTLLIBS): New.
13812 (LIBS): Add above.
13813 (DEPLIBS): Ditto.
13814
62c9aa5f 138152000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
8f975c18
APB
13816
13817 * class.c (get_dispatch_table): Build the vtable dummy entry list
e64c46ce 13818 element with a null purpose. Fixed leading comment.
8f975c18 13819 (build_dtable_decl): Build an accurate dtable type when appropriate
e64c46ce 13820 and use it.
8f975c18 13821
2e761e49
RH
138222000-06-02 Richard Henderson <rth@cygnus.com>
13823
13824 * lang.c (lang_get_alias_set): New.
13825
0f145be8
APB
138262000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
13827
13828 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13829 before using it as the accessed field.
13830
2771fe54
TT
138312000-05-31 Tom Tromey <tromey@cygnus.com>
13832
13833 * java-tree.h (boolean_array_vtable, byte_array_vtable,
13834 char_array_vtable, short_array_vtable, int_array_vtable,
13835 long_array_vtable, float_array_vtable, double_array_vtable):
13836 Declare.
13837 * expr.c (get_primitive_array_vtable): New function.
13838 (create_primitive_vtable): New function.
13839 (java_lang_expand_expr): Enable code to statically generate
13840 arrays.
13841 * decl.c (init_decl_processing): Create primitive vtables.
13842 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13843 short_array_vtable, int_array_vtable, long_array_vtable,
13844 float_array_vtable, double_array_vtable): Define.
13845
30a3caef
ZW
138462000-05-26 Zack Weinberg <zack@wolery.cumb.org>
13847
13848 * java/parse.y (find_applicable_accessible_methods_list):
13849 Don't add an uninitialized value to the list.
13850
b8c5b1c6
TT
138512000-05-25 Tom Tromey <tromey@cygnus.com>
13852
40aaba2b
TT
13853 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
13854 when trying to see if field's class should be initialized. Always
13855 initialize field's declaring class, not qualified class.
13856 For PR gcj/162.
13857
b8c5b1c6
TT
13858 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
13859 `wfl_operator', to maybe_build_primttype_type_ref.
13860 Fixes PR gcj/235.
13861
6518c7b5
BM
138622000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
13863
5f86874e
AP
13864 * parse.y (patch_method_invocation): Don't try to lookup methods
13865 in primitive types.
6518c7b5 13866
611a4b87
APB
138672000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13868
13869 * parse.y (resolve_field_access): Call the appropriate <clinit>
13870 before accessing the length of a static array. Craft a decl for
13871 the field while its time. Fixes PR gcj/129.
f6bbde28 13872
6b48deee
APB
138732000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13874
13875 * parse.y (resolve_package): Correctly set `*next' (was off by
13876 one.)
13877 (resolve_qualified_expression_name): Fixed comment.
13878
62c9aa5f 138792000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
0ba154aa 13880
f6bbde28 13881 * jcf-parse.c (jcf_parse_source): Reset current_class and
e64c46ce 13882 current_function_decl to NULL before parsing a new file.
0ba154aa 13883
62c9aa5f 138842000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
c280e37a
APB
13885
13886 * parse.y (block_end:): If the collected block doesn't feature a
e64c46ce 13887 statement, insert an empty statement.
c280e37a 13888
92d83515
APB
138892000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13890
f6bbde28
ZW
13891 * parse.y (maybe_yank_clinit): New function.
13892 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
13893 end of the list of methods belonging to a class.
13894 (java_complete_expand_method): Check whether <clinit> is really
13895 necessary and expand it accordingly.
92d83515 13896
ec5bb3cf
APB
138972000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13898
13899 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
13900 processed by the method's switch statement.
13901
67db0ce7
TT
139022000-05-19 Tom Tromey <tromey@cygnus.com>
13903
13904 * java-tree.h: Added init state enum.
13905 * decl.c (emit_init_test_initialization): Initialize class
13906 initialization check variable by looking at class' state.
13907
43490bec
TT
139082000-05-19 Tom Tromey <tromey@cygnus.com>
13909
13910 * java-tree.h (build_instanceof): Declare.
13911 (build_get_class): Declare.
13912 * parse.y (patch_binop): Use build_instanceof.
13913 * expr.c (build_instanceof): New function. If class is final,
13914 don't make a function call.
13915 (expand_java_INSTANCEOF): Use it.
13916 (build_get_class): New function.
13917
062edaed
AO
139182000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
13919
13920 * jcf-write.c (generate_classfile): Scan the source_file for
13921 slashes with the right pointer variable.
13922
62c9aa5f 139232000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
078721e1
AC
13924
13925 * lang.c (lang_decode_option): Update -Wunused flags by calling
e64c46ce 13926 set_Wunused.
078721e1
AC
13927 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
13928
46543024 139292000-05-09 Zack Weinberg <zack@wolery.cumb.org>
3b304f5b
ZW
13930
13931 * check_init.c (check_init): Constify local char *.
13932 * class.c (push_class): Constify local char *.
13933 * java_tree.h: Update prototypes.
13934 * jcf-io.c (open_class): Constify filename parameter and
13935 return value.
13936 (find_class): Remove redundant string copy. Cast return from
13937 open_class.
13938 * jcf-parse.c (read_class, parse_class_file, yyparse):
13939 Constify local char *.
13940 * jcf-write.c (generate_bytecode_insns, generate_classfile):
13941 Constify local char *.
13942 * jcf.h (JCF): Constify filename and classname.
13943 (JCF_FINISH): Cast args to FREE to char * when appropriate.
13944 * lang.c (init_parse): Constify parameter and return value.
13945 * lex.c (java_get_line_col): Constify filename parameter.
13946 * parse.h: Constify parser_ctxt.filename. Update prototypes.
13947 * parse.y (java_parser_context_suspend,
13948 issue_warning_error_from_context, safe_layout_class): Constify
13949 local char *.
13950 * parse.c: Regenerate.
13951
4c6a8973
TT
139522000-05-08 Tom Tromey <tromey@cygnus.com>
13953
13954 * expr.c (build_jni_stub): Cache the result of
13955 _Jv_LookupJNIMethod.
13956
e117276e
APB
139572000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13958
13959 * decl.c (predef_filenames_size): Now 7.
13960 (predef_filenames): New seventh entry.
13961
652f2504
TT
139622000-05-04 Tom Tromey <tromey@cygnus.com>
13963
13964 * boehm.c (mark_reference_fields): Don't mark RawData fields.
13965 Keep track of when we've seen a reference field after a
13966 non-reference field.
13967 (get_boehm_type_descriptor): Handle case where we see
13968 non-reference fields but no trailing reference field.
13969 * decl.c (rawdata_ptr_type_node): Define.
13970 (init_decl_processing): Initialize rawdata_ptr_type_node.
13971 * java-tree.h (rawdata_ptr_type_node): Declare.
13972
ccedaff3
KG
139732000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13974
13975 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
13976 specifiers in calls to fprintf.
13977
dd5d6281
TT
139782000-05-03 Andrew Haley <aph@cygnus.com>
13979
13980 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
13981
13982 * javaop.h (WORD_TO_INT): New function.
13983 (IMMEDIATE_s4): Use WORD_TO_INT.
13984 * jcf.h (JPOOL_INT): Ditto.
13985
13986 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
13987 separator.
13988
dd5d6281 139892000-04-19 Tom Tromey <tromey@cygnus.com>
7145d9fe
TT
13990
13991 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
13992 on native function.
13993 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
13994 JNI methods.
13995 * expr.c (build_jni_stub): New function.
13996 * lang-specs.h: -fjni and -femit-class-file are incompatible.
13997 * parse.c: Rebuilt.
13998 * parse.y (java_complete_expand_methods): Expand a native method
13999 and call build_jni_stub if -fjni given.
14000 * lang-options.h: Document -fjni.
14001 * lang.c (flag_jni): New global.
14002 (lang_f_options): Added `jni' entry.
14003 * java-tree.h (soft_lookupjnimethod_node,
14004 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
14005 Declare.
14006 (flag_jni): Declare.
14007 (build_jni_stub): Declare.
14008 (struct lang_decl): Added `native' flag.
14009 (METHOD_NATIVE): Redefined to use `native' field of lang specific
14010 structure.
14011 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
14012 soft_jnipopsystemframe_node): New globals.
14013 (init_decl_processing): Set them. _Jv_InitClass only takes one
14014 argument.
14015
14016 * java-tree.def: Put into `C' mode.
14017
e815887f
TT
140182000-04-27 Tom Tromey <tromey@cygnus.com>
14019
14020 Fix for PR gcj/2:
14021 * expr.c (expand_invoke): Generate check to see if object pointer
14022 is null in nonvirtual invocation case.
14023 * java-tree.h (soft_nullpointer_node): Declare.
14024 * decl.c (soft_nullpointer_node): New global.
14025 (init_decl_processing): Initialize soft_nullpointer_node.
14026 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14027 or `private' methods.
14028 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14029
62c9aa5f 140302000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
ad81223c
APB
14031
14032 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
e64c46ce 14033 from <clinit>
ad81223c 14034
f1acc01e
TT
140352000-04-26 Tom Tromey <tromey@cygnus.com>
14036
14037 * zextract.c (find_zip_file_start): New function.
14038 (read_zip_archive): Use it.
14039
e803d3b2
APB
140402000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14041
14042 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
14043
152de068
APB
140442000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14045
14046 * class.c (common_enclosing_context_p): New function.
14047 * java-tree.h (common_enclosing_context_p): Added prototype.
14048 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
14049 classes sharing an outer context with the current instance.
14050 * parse.y (build_access_to_thisn): Fixed leading comment.
14051 (verify_constructor_super): New local `supper_inner'. Skip
14052 enclosing context argument in the case of inner class constructors.
14053 (patch_method_invocation): Insert proper context as second
14054 parameter to pure inner class constructor super invocations.
14055
62c9aa5f 140562000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
93220702
APB
14057
14058 * parse.y (end_class_declaration): Reset the interface number
e64c46ce 14059 counter.
93220702 14060
dfb99c83
APB
140612000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14062
17126208 14063 * parse.y (source_start_java_method): Deleted unnecessary code.
f6bbde28 14064 (patch_method_invocation): Fixed comment.
dfb99c83 14065
e60a8c26
RL
140662000-04-24 Robert Lipe <robertlipe@usa.net>
14067
14068 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
14069
3c8c10b8
TT
140702000-04-23 Tom Tromey <tromey@cygnus.com>
14071
14072 * boehm.c (mark_reference_fields): Use int_byte_position.
14073
8a008c41
TT
140742000-04-22 Tom Tromey <tromey@cygnus.com>
14075
14076 * boehm.c (mark_reference_fields): Only call byte_position on
14077 non-static fields.
14078
d5f76aba
TT
140792000-04-22 Tom Tromey <tromey@cygnus.com>
14080
14081 * boehm.c (mark_reference_fields): Added `last_view_index'
14082 argument. Use DECL_FIELD_OFFSET to determine field's offset.
14083
62c9aa5f 140842000-04-20 Mo DeJong <mdejong@cygnus.com>
a40d21da
APB
14085
14086 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
14087 * parse.y (check_class_interface_creation): Fixed comments. Select
e64c46ce
AJ
14088 permitted modifiers for (inner) interfaces. Changed error message
14089 to report rejected modifiers used with local classes.
a40d21da
APB
14090
140912000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14092
14093 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
14094 of directly inherited type considered in scope.
14095 * parse.y (do_resolve_class): Search inherited classes for inner
14096 classes.
14097
473e7b07
TT
140982000-04-20 Tom Tromey <tromey@cygnus.com>
14099
14100 * parse.y (not_accessible_p): Use member's class, not current
14101 class, when doing inheritance check for protected reference.
14102 Fixes PR gcj/124.
14103
62c9aa5f 141042000-04-20 Jason Schroeder <shrode@subnature.com>
c52fbf0f
JS
14105
14106 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
14107
f2760b27
APB
141082000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14109
14110 * parse.y (lookup_field_wrapper): Search for final local aliases.
14111 (resolve_expression_name): Let lookup_field_wrapper search for
14112 final local aliases. Force the value of `name' if one is found.
14113 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
14114 an expression name. Fixed comments.
14115
807bc1db
APB
141162000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14117
14118 * parse.y (yyerror): `msg' can be null, don't use it in that case.
14119
ecb36604
TT
141202000-04-19 Tom Tromey <tromey@cygnus.com>
14121
14122 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
14123
48a840d9
APB
141242000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14125
14126 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
14127
83c1f628
TT
141282000-04-18 Tom Tromey <tromey@cygnus.com>
14129
14130 PR gcj/211:
14131 * gjavah.c (utf8_cmp): Changed return value.
14132 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
14133 result.
14134 (cxx_keywords): New global.
14135 (get_field_name): Handle new result of cxx_keyword_subst.
14136 (print_method_info): Likewise.
14137
a7384840
BM
141382000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
14139
f6bbde28 14140 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
a7384840 14141 with a newline, for CNI.
f6bbde28 14142 (print_stub_or_jni): Print a space or newline before method name for
a7384840
BM
14143 CNI as well as JNI.
14144 (print_cxx_classname): Don't write leading "::" in CNI stub method.
f6bbde28 14145 (process_file): Include gcj/cni.h if generating CNI stubs.
a7384840 14146
3e0768f0
TT
141472000-04-16 Tom Tromey <tromey@cygnus.com>
14148
14149 * gjavah.c (decompile_method): Use print_field_name.
14150 Fixes PR gcj/205.
14151
48a840d9
APB
141522000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14153
14154 * parse.y (java_expand_classes): Reverse the package list once.
14155 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
14156 reduction.
14157 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
14158 the `==' and `!=' operators.
14159
cedea510
APB
141602000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14161
67264b4f 14162 * jcf-write.c (generate_bytecode_insns): At invocation time,
cedea510 14163 always relate an interface method to the type of its selector.
f6bbde28 14164
e803d3b2
APB
141652000-04-05 Tom Tromey <tromey@cygnus.com>
14166
14167 Fix for PR gcj/2:
14168 * expr.c (expand_invoke): Generate check to see if object pointer
14169 is null in nonvirtual invocation case.
14170 * java-tree.h (soft_nullpointer_node): Declare.
14171 * decl.c (soft_nullpointer_node): New global.
14172 (init_decl_processing): Initialize soft_nullpointer_node.
14173 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
14174 or `private' methods.
14175 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
14176
bc2874c9
TT
141772000-04-05 Tom Tromey <tromey@cygnus.com>
14178
14179 Fix for PR gcj/140:
14180 * parse.y (check_final_assignment): Recognize assignments to the
14181 `length' field of an array when generating class files.
14182
256172c4
APB
141832000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14184
14185 * class.c (decl_hash): Prototype removed.
14186 (decl_compare): Likewise.
14187
e0fc4118
TT
141882000-04-05 Tom Tromey <tromey@cygnus.com>
14189
14190 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
14191 * parse.y (check_modifiers_consistency): Check for final/volatile
14192 clash. Fixes PR gcj/164.
14193
e0422ed0
APB
141942000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
14195
14196 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
14197 made global.
14198 (java_hash_compare_tree_node): Renamed from `decl_compare, made
14199 global.
14200 (add_method_1): Use `java_hash_hash_tree_node' and
14201 `java_hash_compare_tree_node'.
14202 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
14203 (java_hash_compare_tree_node): Likewise.
14204 * parse.y (find_applicable_accessible_methods_list): Create,
14205 delete and use a hash table to remember already searched interfaces.
14206
4200941b
MW
142072000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
14208
14209 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
14210 with latest entry.
14211
c0b864fc
KG
142122000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14213
14214 * boehm.c (mark_reference_fields, set_bit): Prototype.
14215 (set_bit): Un-ANSI-fy definition.
14216
14217 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
14218 Prototype.
14219
14220 * decl.c (emit_init_test_initialization): Likewise.
14221
14222 * gjavah.c (jni_print_char): Likewise.
14223
14224 * parse.y (create_new_parser_context): Likewise.
14225
62c9aa5f 142262000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
64ea4a5e
APB
14227
14228 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
14229 patch missing hunk. Fixed indentation.
14230
05411ecf
TT
142312000-03-30 Tom Tromey <tromey@cygnus.com>
14232
14233 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
14234 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
14235
acbedd7c
APB
142362000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14237
14238 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14239 when negative *before* using it as an array index.
14240 * ChangeLog: Fixed typo.
14241
0981a859
APB
142422000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14243
14244 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
14245 to 0 when it reaches -1.
14246
142472000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14248
14249 * jcf-parse.c (get_constant): Properly cast `num' during the
acbedd7c 14250 invocation of `add_double'.
0981a859
APB
14251 * jcf-write.c (push_long_const): Properly cast `lo' before
14252 comparing it to short bounds.
14253 * parse-scan.y (interface_declaration:): Rule re-arrange so that
14254 `interface_body:' is reduced after the current interface is
14255 pushed.
14256
a843e0ce
TT
142572000-03-26 Tom Tromey <tromey@cygnus.com>
14258
14259 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
14260 Java-specific `-f' option.
14261
62c9aa5f 142622000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
ad41cc2a
RK
14263
14264 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
14265 Adjust order of making types.
14266 Make bitsize_*_node values.
14267
62c9aa5f 142682000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
770ae6cc
RK
14269
14270 * class.c (make_field_value): Use byte_position.
14271 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
14272 (java_array_data_offset): Likewise.
14273 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
14274 bzero call.
14275
165f37bc
APB
142762000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14277
14278 * parse.y (check_abstract_method_definitions): New local
14279 `end_type_reached'. Make sure we also consider `end_type'.
0981a859
APB
14280 (java_check_abstract_method_definitions): Make sure we eventually
14281 consider `java.lang.Object'.
14282 (maybe_use_access_method): Don't use access method if not in the
14283 context of a pure inner class or if the method's context is right.
14284 (find_applicable_accessible_methods_list): New static flag
165f37bc 14285 `object_done'. Don't search abstract classes as interfaces. Fixed
0981a859
APB
14286 indentation. Fixed the `java.lang.Object' only search. Search
14287 class interface(s) first, then fully search enclosing contexts.
14288 (find_most_specific_methods_list): Pick the closest candidate when
165f37bc
APB
14289 they're all abstract.
14290
62c9aa5f 142912000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
124906f9
APB
14292
14293 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
dba41d30 14294 properly initialize `finished_label'. Don't emit gotos for empty
124906f9
APB
14295 try statements.
14296
719bb4e3 142972000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
c14f7160
ML
14298
14299 * except.c (emit_handlers): Clear catch_clauses_last.
14300
165f37bc
APB
143012000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14302
14303 * parse.y (check_method_types_complete): New function.
14304 (create_class): Reset anonymous class counter only when seeing an
14305 non inner classe.
14306 (java_complete_class): JDEP_METHOD: Don't recompute signature
14307 if incomplete.
14308
143092000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14310
14311 * class.c (build_static_ref): Fixed indentation in comment.
14312 * java-tree.def (TRY_EXPR): Fixed typo in name.
14313 (CLASS_LITERAL): Likewise.
14314 * java-tree.h: (TYPE_DOT_CLASS): New macro.
14315 (struct lang_type): New field `dot_class'.
14316 * jcf-write.c (generate_bytecode_insns): Fixed error message.
14317 (generate_classfile): Method `class$' is synthetic.
14318 * parse.y (build_do_class_method): New function.
14319 (build_dot_class_method_invocation): Likewise.
14320 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
14321 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
14322 (qualify_ambiguous_name): Likewise.
14323 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
14324 (build_try_statement): Fixed leading comment.
14325
62c9aa5f 143262000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
665f2503
RK
14327
14328 * class.c (make_field_value): Properly handle sizes.
14329 (get_dispatch_vector): Use tree_low_cst and host_integerp.
14330 (layout_class_method): Count using trees.
14331 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
14332 * expr.c (java_array_data_offset): Use int_bit_position.
14333 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
14334 (build_invokevirtual): Use tree_low_cst and do computations with trees.
f6bbde28 14335
64aa33dd
TT
143362000-03-16 Tom Tromey <tromey@cygnus.com>
14337
14338 * lang.c (flag_hash_synchronization): New global.
14339 (lang_f_options): Added `hash-synchronization'.
14340 * lang-options.h: Mention -fhash-synchronization.
14341 * java-tree.h (flag_hash_synchronization): Declare.
14342 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
14343 hash table synchronization is disabled.
14344 * decl.c (init_decl_processing): Only push `sync_info' value when
14345 hash table synchronization is disabled.
14346 * class.c (make_class_data): Only push `sync_info' field when hash
14347 table synchronization is disabled. Removed dead code.
14348
ae23f3ed
TT
143492000-03-16 Tom Tromey <tromey@cygnus.com>
14350
14351 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
14352
165f37bc
APB
143532000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14354
14355 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
14356 classes.
14357 * parse.y (patch_method_invocation): Handle anonymous classes
14358 creation in static context.
14359
143602000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14361
14362 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
14363 * parse.y (resolve_qualified_expression_name): Use it.
14364 (patch_method_invocation): Likewise.
14365
143662000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14367
14368 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
14369 depending on the type of dependency which dictates what the
14370 current class is.
14371 (unresolved_type_p): Resolved types limited to the current class.
14372
2c6c322a
TT
143732000-03-15 Tom Tromey <tromey@cygnus.com>
14374
14375 * decl.c (init_decl_processing): Set type of `sync_info' to be
14376 pointer to Object.
14377
14378 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
14379 Correctly compute bit number for current slot. Zero `high' and
14380 `low' in DS_LENGTH case. Don't skip inherited fields. Use
14381 mark_reference_fields.
14382 (mark_reference_fields): New function.
14383
62c9aa5f 143842000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
324ed8fd
APB
14385
14386 * parse.y (register_incomplete_type): Fixed initialization of
14387 JDEP_ENCLOSING.
14388
0981a859
APB
143892000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14390
14391 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
14392 static globals.
14393 (push_class_context, pop_class_context): New function.
14394 (class_body:): Call pop_class_context.
14395 (interface_body:): Likewise.
14396 (INNER_QUALIFIER): New macro.
14397 (report_class_declaration): Changed output format and use
14398 INNER_QUALIFIER. Call push_class_context.
14399
d77a712d
AH
144002000-02-14 Andrew Haley <aph@cygnus.com>
14401
f6bbde28
ZW
14402 * check-init.c (check_init): Add new cases for unary and binary
14403 tree nodes.
d77a712d 14404
dde1da72
APB
144052000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14406
14407 * parse.y (resolve_package): Set `next' once a type name has been
14408 progressively discovered.
14409 (resolve_qualified_expression_name): Propagate resolution only if
14410 there are remaining qualifiers. Take into account `q' might have
14411 been cleared after re-qualification.
14412 * parse.y (patch_method_invocation): New local `resolved'.
e64c46ce
AJ
14413 Section dealing with qualified expression rewritten to use
14414 resolve_field_access.
dde1da72 14415
62c9aa5f 144162000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
14417
14418 * parse.h (PUSH_CPC): Fixed indentation.
14419 (DEBUG_CPC): New macro.
14420 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
e64c46ce 14421 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
c2952b01 14422 * parse.y (class_body_declaration:): Use
e64c46ce 14423 SET_CPC_INSTANCE_INITIALIZER_STMT.
c2952b01
APB
14424 (method_declaration:): Check for null current_function_decl.
14425 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
14426 (java_parser_context_pop_initialized_field): Better handling of
e64c46ce 14427 empty lists.
c2952b01 14428 (maybe_make_nested_class_name): Mark nested class name as
e64c46ce 14429 qualified when necessary.
c2952b01 14430 (end_class_declaration): Don't call java_parse_context_resume when
a83f01f0 14431 one or more error occurred.
c2952b01
APB
14432 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
14433 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
e64c46ce 14434 SET_CPC_INITIALIZER_STMT.
c2952b01
APB
14435 (method_header): Check for inner classes declaring static methods.
14436 (resolve_qualified_expression_name): Handle situation where `this'
e64c46ce 14437 is implied.
c2952b01 14438
62c9aa5f 144392000-03-13 Hans Boehm <boehm@acm.org>
46089b86
HB
14440
14441 * typeck.c (build_prim_array_type): Correctly set the high word too.
14442
c2952b01
APB
144432000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14444
14445 * parse.y (java_complete_expand_methods): Leave <clinit> out of
14446 ordinary methods.
14447 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14448 list of methods for interfaces.
14449
cd7c5840
APB
144502000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14451
14452 * parse.y (qualify_ambiguous_name): Properly handle expressions
14453 using `null'.
f6bbde28 14454
6632dcdd
APB
144552000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14456
14457 * parse.y (check_final_assignment): Extended to process
14458 COMPOUND_EXPR.
14459 (patch_assignment): Have check_final_assignment called only once.
14460
1729c265
APB
144612000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14462
14463 * java-tree.h (IS_INIT_CHECKED): New flag.
14464 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14465 * parse.y (patch_string): Call force_evaluation_order on the
14466 completed string concatenation tree.
14467 * expr.c (force_evaluation_order): Call force_evaluation_order on
f6bbde28 14468 function's arguments too.
1729c265 14469
62c9aa5f 144702000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
05bccae2
RK
14471
14472 * decl.c (emit_init_test_initialization): Mark KEY as unused.
14473 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14474 (build_anewarray): Likewise.
14475 * parse.y (patch_newarray): Likewise.
14476 * parse.c: Regenerated.
14477
173f556c
BM
144782000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14479
14480 * decl.c (init_decl_processing): Added new class fields `depth',
14481 `ancestors', and `idt' to class_type_node. Use
14482 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14483 * class.c (make_class_data): Push initial values for new fields.
14484 * java-tree.h: Updated prototype for `build_invokeinterface'.
14485 * expr.c (build_invokeinterface): Changed parameters to accept
14486 `method' tree. Calculate index of `method' in its declaring
14487 interface. Build call to _Jv_LookupInterfaceMethodIdx.
14488 (expand_invoke): Call `build_invokeinterface' with new parameters.
14489 * parse.y (patch_invoke): Call `build_invokeinterface' with new
14490 parameters.
14491
614eaae0
APB
144922000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
14493
14494 * typeck.c (lookup_do): Search superinterfaces first
14495 when looking up an interface method. From Godmar Back
14496 <gback@cs.utah.edu>
14497
c2952b01
APB
144982000-03-06 Tom Tromey <tromey@cygnus.com>
14499
14500 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14501
614eaae0
APB
145022000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14503
14504 * java-tree.h (lookup_argument_method2): Declared.
14505 (safe_layout_class): Prototype moved from parse.h.
14506 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14507 * parse.y (java_check_regular_methods): Local `super_class' gone.
14508 Call lookup_argument_method2 instead of lookup_argument_method.
14509 Perform modifier match for methods found declared in implemented
14510 interfaces. Fixed indentation problem. Overriding/hiding error
14511 report to take place only for methods found in classes.
14512 * typeck.c (lookup_argument_method): Changed leading
14513 comment. Re-written by calling lookup_do.
14514 (lookup_argument_method2): New function.
14515 (lookup_java_method): Re-written by calling lookup_do.
14516 (lookup_do): New function.
14517
62c9aa5f 145182000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
01447dce 14519
c2952b01 14520 * check-init.c (check_init): Removed dead code. Handle (blank)
e64c46ce 14521 final variables.
c2952b01 14522 * parse.y (declare_local_variables): New local `final_p', set it
e64c46ce 14523 and use it to initialize LOCAL_FINAL.
c2952b01 14524 (check_final_assignment): Only check FIELD_DECLs.
01447dce 14525
5830574a
TT
145262000-02-17 Tom Tromey <tromey@cygnus.com>
14527
14528 * Makefile.in (JAVA_OBJS): Added boehm.o.
14529 (boehm.o): New target.
14530 * Make-lang.in (JAVA_SRCS): Added boehm.c.
14531 * java-tree.h (flag_use_boehm_gc): Declare.
14532 (get_boehm_type_descriptor): Declare.
14533 * lang.c (lang_f_options): Added `use-boehm-gc'.
14534 (flag_use_boehm_gc): New global.
14535 * lang-options.h: Added -fuse-boehm-gc.
14536 * boehm.c: New file.
14537 * class.c (get_dispatch_table): If class uses a Boehm type
14538 descriptor, put it in the vtable.
14539 (make_class_data): Removed dead code.
14540
4a7f1935
PB
145412000-03-03 Per Bothner <per@bothner.com>
14542
14543 * decl.c (init_decl_processing): Initialize sizetype properly.
14544
c2952b01
APB
145452000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14546
14547 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14548 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
f6bbde28 14549 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
c2952b01
APB
14550 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14551 (jcf_parse): New local `current'. Load innerclasses seen in outer
14552 context being processed.
14553 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14554 * jcf-write.c (append_innerclasses_attribute): New function.
14555 (append_innerclasses_attribute_entry): Likewise.
14556 (get_access_flags): Handle static classes. Set anonymous and local
14557 classes to be private.
14558 (generate_classfile): Attribute count adjusted. Call
14559 append_innerclasses_attribute.
14560 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14561 PURE_INNER_CLASS_TYPE_P.
14562 * parse.y (parser_qualified_classname): New parameter `is_static',
14563 produce non qualified name accordingly.
14564 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14565 (create_interface): Added argument to parser_qualified_classname.
14566 (create_class): Added argument to parser_qualified_classname. Setup
14567 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14568 (add_inner_class_fields): Fixed indentation.
14569 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14570 (method_declarator): Fixed typo in comment.
14571 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14572 (build_current_thisn): Likewise.
14573 (patch_method_invocation): Likewise.
14574
719bb4e3 145752000-03-01 Martin von Löwis <loewis@informatik.hu-berlin.de>
00262c8a
ML
14576
14577 * decl.c (current_function_decl): Move to toplev.c.
14578
62c9aa5f 145792000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9df2c88c
RK
14580
14581 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14582 (DECL_BIT_INDEX): Use underlying representation.
14583 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14584
62c9aa5f 145852000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
fed3cef0
RK
14586
14587 * expr.c (build_java_ret): Pass proper type to size_binop.
14588
3ff9925c
AG
145892000-02-25 Anthony Green <green@cygnus.com>
14590
14591 * expr.c (build_class_init): Mark the decl to be ignored by
14592 check_init.
14593 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14594 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14595 * class.c (init_test_hash_newfunc): New function.
14596 (decl_hash): New function.
14597 (decl_compare): New function.
14598 * decl.c (emit_init_test_initialization): New function.
14599 (complete_start_java_method): Traverse the init test hashtable,
14600 calling emit_init_test_initialization.
14601 (always_initialize_class_p): Define.
14602 * expr.c (build_class_init): Use initialization tests when
14603 emitting class initialization code.
14604 (always_initialize_class_p): Declare.
14605 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14606 1.
14607 * java-tree.h: Include hash.h.
14608 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14609 (struct lang_decl): Add init_test_table field.
14610 (init_test_hash_entry): Define.
14611
62c9aa5f 146122000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
3c9ef127
APB
14613
14614 * gjavah.c (main): Avoid using `argi' to report unimplemented
14615 options.
14616
62c9aa5f 146172000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
0e9137bb
APB
14618
14619 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
e64c46ce 14620 initialize locals to avoid warnings. Local `exception_type' moved
0e9137bb
APB
14621 into if statement.
14622
62c9aa5f 146232000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
98f3c1db
APB
14624
14625 * parse.y (resolve_expression_name): Use `orig' as a second
e64c46ce 14626 argument to resolve_field_access.
17126208 14627 (resolve_field_access): Removed unnecessary code when dealing with
e64c46ce 14628 static fields.
98f3c1db 14629
62c9aa5f 146302000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
14631
14632 * class.c (push_super_field): Don't push the field twice.
14633 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14634 * parse.h (java_reorder_fields): Prototyped.
14635 * parse.y (java_reorder_fields): New function.
14636 (java_layout_class): Simplified not to worry about re-ordering.
14637
c45c5e09
TT
146382000-02-23 Tom Tromey <tromey@cygnus.com>
14639
14640 * gjavah.c (print_name): In JNI case, correctly quote string.
14641 (print_method_info): Don't handle overrides in JNI mode.
14642
99803cd4
APB
146432000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14644
14645 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14646 value type set to `boolean_type_node'.
14647
62c9aa5f 146482000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
c801c87c
JB
14649
14650 * jcf-dump.c (main): Test for correct condition after
14651 output file creation.
14652
7b227604
AG
146532000-02-19 Anthony Green <green@cygnus.com>
14654
14655 * jcf-depend.c (add_entry): Fix test for first list entry.
14656
62c9aa5f 146572000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
64e92991
RK
14658
14659 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14660 * constants.c (build_constants_constructor): Likewise.
14661
ccd4c273
AG
146622000-02-19 Anthony Green <green@cygnus.com>
14663
14664 * jcf-depend.c (add_entry): Add entries to the end of the list.
14665
62c9aa5f 146661999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
a0f4cca6
PN
14667
14668 * decl.c (INT_TYPE_SIZE): Define if necessary.
14669 (expand_java_return): Handle the case of a native integer smaller
e64c46ce 14670 than a JVM integer.
a0f4cca6 14671
719bb4e3 146722000-02-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
8b97e23b
ML
14673
14674 * gjavah.c (help): Use GCCBUGURL.
14675 * jv-scan.c (help): Likewise.
14676 * jcf-dump.c (help): Likewise.
14677
62c9aa5f 146782000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
2a1ed9c1
APB
14679
14680 * jcf-write.c (generate_bytecode_insns): Don't generate empty
e64c46ce 14681 `finally' clauses.
2a1ed9c1 14682
62c9aa5f 146832000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
2a1ed9c1
APB
14684
14685 * jcf-parse.c (load_class): Call `fatal' if no file containing
14686 the target class are found.
14687
33ae9bdf
ZW
146882000-02-16 Zack Weinberg <zack@wolery.cumb.org>
14689
14690 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
f6bbde28 14691 lex.c, lex.h, and PARSE_H to...
33ae9bdf
ZW
14692 (parse.o, parse-scan.o): ...here, respectively.
14693
14694 * lex.c: Split out code that may trigger SIGFPE from yylex()
14695 to its own function.
14696 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14697
4746ee26
KG
146982000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14699
14700 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14701
2323b28b
APB
147022000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
14703
c2952b01 14704 * parse.y (outer_field_access_p): Stop in time when outer contexts
e64c46ce 14705 are exhausted.
c2952b01 14706 (resolve_qualified_expression_name): Properly qualify *everything*
e64c46ce 14707 after a package.type to be resoled as expression names.
c2952b01 14708 (find_applicable_accessible_methods_list): Save/restore `class' to
e64c46ce 14709 isolate it from a possible outer context search.
2323b28b 14710
78de74be
TT
147112000-02-15 Tom Tromey <tromey@cygnus.com>
14712
14713 * gjavah.c (jni_print_char): New function.
14714 (print_full_cxx_name): Use it.
14715 (decode_signature_piece): Likewise.
14716 (print_cxx_classname): Likewise.
14717
9f8f4efe
KG
147182000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14719
14720 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14721 version.o.
14722 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14723
14724 * gjavah.c: Include version.h.
f6bbde28 14725
9f8f4efe
KG
14726 * jcf-dump.c: Likewise.
14727
14728 * jv-scan.c: Likewise.
14729
62c9aa5f 147302000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
14731
14732 * parse.y (outer_field_access_fix): First parameter now a tree
67264b4f 14733 node. Check for assignment to final. First argument to
a83f01f0 14734 build_outer_field_access_fix modified to accommodate prototype.
c2952b01
APB
14735 (build_outer_field_access): Don't check for assignment to final
14736 here.
14737 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14738 possibly returned by outer_field_access_fix. Changed
14739 outer_field_access_fix's first argument.
14740 (check_final_assignment): $finit$'s context is OK.
14741 (patch_unaryop): Use node instead of its line/column value when
14742 calling outer_field_access_fix.
14743
62c9aa5f 147442000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
14745
14746 * parse.y (interface_declaration:): No longer tagged
e64c46ce 14747 <node>. Re-installed default action.
c2952b01
APB
14748 (class_member_declaration:): Handle inner interfaces.
14749 (interface_member_declaration): Handle inner interfaces and
e64c46ce 14750 classes.
c2952b01 14751 (create_interface): Push error if one seen. Suspend parsing
e64c46ce 14752 context when processing an inner interface.
c2952b01 14753 (register_fields): Inner class static field limitations not to
e64c46ce 14754 apply to inner interfaces.
c2952b01 14755
62c9aa5f 147562000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
14757
14758 * jcf-parse.c (load_class): Update `java_error_count' when a
e64c46ce 14759 class' file can't be found.
c2952b01
APB
14760 (parse.y): Avoid (byte)code generation when errors seen.
14761
62c9aa5f 147622000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
14763
14764 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
e64c46ce 14765 decodes a valid node.
c2952b01
APB
14766 (patch_binop): Handle TRUNC_DIV_EXPR.
14767
62c9aa5f 147682000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01 14769
dba41d30 14770 * parse.y (resolve_package): New local `acc'. Try to progressively
e64c46ce 14771 build and guess a package and type name.
c2952b01 14772
62c9aa5f 147732000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
14774
14775 * parse.y (find_applicable_accessible_methods_list): Load and
e64c46ce 14776 layout the search class if necessary.
c2952b01 14777 (java_complete_tree): Keep to original type of the folded initial
e64c46ce 14778 value.
c2952b01
APB
14779
147802000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14781
f6bbde28
ZW
14782 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14783 Generate error message if circularity is detected. New static
14784 local `list'.
14785 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
14786 * jcf-write.c (generate_bytecode_insns): Very simply handle
14787 SAVE_EXPR.
14788 * parse.y (java_check_circular_reference): Use
14789 `cyclic_inheritance_report' during report, if necessary.
14790 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14791 walking NEW_ARRAY_INIT twice.
c2952b01
APB
14792
147932000-02-09 Tom Tromey <tromey@cygnus.com>
14794
f6bbde28
ZW
14795 * parse.y (check_class_interface_creation): Allow inner classes to
14796 be `private' or `protected', check modifiers' consistency. Prevent
14797 block local classes from bearing any modifiers.
c2952b01 14798
ae0a06c5
KG
147992000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14800
14801 * except.c (check_start_handlers): Re-add prototype lost in last
14802 patch.
ef86eabb 14803 (maybe_start_try): Remove excess argument to `check_start_handlers'.
ae0a06c5 14804
71600a4a
AH
148052000-02-09 Andrew Haley <aph@cygnus.com>
14806
14807 * decl.c (clear_binding_level): Remove excess initializer.
14808 (maybe_poplevels): Remove unused variable.
14809 (force_poplevels): Ditto.
14810 (struct binding_level): Add comment.
f6bbde28 14811
c2952b01
APB
148122000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14813
f6bbde28
ZW
14814 * jcf-write.c (generate_classfile): Don't consider
14815 pre-initialization with reference value (use <clinit> instead.)
14816 * parse.y (java_fix_constructors): No generated constructor for
14817 interfaces.
14818 (build_outer_field_access): Removed debug message.
14819 (outer_field_expanded_access_p): Adapted to bytecode generation.
14820 (build_outer_field_access_method): Use fix_method_argument_names.
14821 (build_outer_method_access_method): Fixed indentation. Added
14822 comment. Handle access method generation for static and also void
14823 methods.
14824 (build_access_to_thisn): Inserted debug message.
14825 (maybe_build_thisn_access_method): Use fix_method_argument_names.
14826 (resolve_qualified_expression_name): Fixed comment.
14827 (not_accessible_p): Adapted to bytecode generation. Added comment.
14828 (patch_method_invocation): Added comment.
14829 (maybe_use_access_method): Fixed leading comment. Handle static
14830 methods.
14831 (java_complete_lhs): Don't shortcut handling of initialized upon
14832 declaration String type static fields when generating bytecode.
14833 (patch_unaryop): Handle outer field access when generating
14834 bytecode.
c2952b01 14835
62c9aa5f 148362000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
14837
14838 * java-tree.h (FIELD_THISN): New macro.
14839 * jcf-write.c (append_synthetic_attribute): New function.
14840 (generate_classfile): Set "Synthetic" attribute on this$<n>,
e64c46ce 14841 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
c2952b01 14842 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
e64c46ce 14843 this$<n> fields.
c2952b01 14844 (build_outer_field_access): Turned on access functions usage and
e64c46ce 14845 generation when compiling to bytecode.
c2952b01
APB
14846 (maybe_use_access_method): Likewise.
14847
e8b22dd1
AH
148482000-01-25 Andrew Haley <aph@cygnus.com>
14849
f6bbde28
ZW
14850 * java-except.h (struct eh_range): Add `expanded' field.
14851 (maybe_start_try): Add end_pc arg.
14852 (maybe_end_try): Ditto.
e8b22dd1 14853 * java-tree.h (force_poplevels): new function.
f6bbde28
ZW
14854 * expr.c (expand_byte_code): Don't call maybe_start_try or
14855 maybe_end_try.
14856 * except.c (add_handler): Reset expanded.
14857 (expand_start_java_handler): Set expanded.
14858 (check_start_handlers): Don't expand a start handler that's
14859 already been expanded.
14860 (maybe_start_try): Add end_pc arg. Only expand a handler which
14861 ends after end_pc.
e8b22dd1
AH
14862 (expand_end_java_handler): call force_poplevels.
14863 (force_poplevels): new function.
f6bbde28
ZW
14864 * decl.c (binding_level): Add start_pc of binding level.
14865 (maybe_pushlevels): Call maybe_start_try when pushing binding
14866 levels.
14867 (maybe_poplevels): Call maybe_end_try when popping binding levels.
14868 (LARGEST_PC): Define.
14869 (clear_binding_level): Use LARGEST_PC.
e8b22dd1
AH
14870
14871 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
14872 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
14873 (binding_depth, is_class_level, current_pc): new variables.
f6bbde28 14874 (struct binding_level): ditto.
e8b22dd1
AH
14875 (indent): new function.
14876 (push_jvm_slot): add debugging info.
14877 (maybe_pushlevels): ditto.
14878 (maybe_poplevels): ditto.
14879 (pushlevel): ditto.
14880 (poplevel): ditto.
14881 (start_java_method): ditto.
14882 (give_name_to_locals): comment only.
f6bbde28 14883 * except.c (binding_depth, is_class_level, current_pc):
e8b22dd1
AH
14884 new variables.
14885 (expand_start_java_handler): add debugging info.
14886 (expand_end_java_handler): ditto.
f6bbde28 14887
5ca1627b
KG
148882000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14889
14890 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
14891 (print_name_for_stub_or_jni, process_file): Constify a char*.
14892
d8b6d4cf
TT
148932000-02-03 Tom Tromey <tromey@cygnus.com>
14894
14895 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
14896
2c2f0e54
SB
148972000-01-31 Scott Bambrough <scottb@netwinder.org>
14898
14899 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
14900 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
14901 defined to be 1.
14902
62c9aa5f 149032000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
14904
14905 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
14906 * java-tree.h (TYPE_II_STMT_LIST): New macro.
14907 (struct lang_type): New field `ii_block'.
14908 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
14909 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
14910 * parse.h (struct parser_ctxt): New field `instance_initializers'.
14911 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
14912 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
14913 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
14914 macros.
14915 * parse.y (add_instance_initializer): New function.
14916 (in_instance_initializer): New static global.
14917 (class_body_declaration:): Link instance initializer block.
14918 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
14919 (array_creation_expression:): Remove unused local.
14920 (java_parser_context_push_initialized_field): Fixed leading
14921 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
14922 CPC_INSTANCE_INITIALIZER_LIST.
14923 (java_parser_context_pop_initialized_field): Likewise.
14924 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
14925 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
14926 CPC_INITIALIZER_STMT.
14927 (fix_constructors): New local `class_type'. Use it. Call
14928 add_instance_initializer.
14929 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
14930 (patch_return): Forbid return in instance initializers.
14931 (patch_throw_statement): Enforce exception handling in the context
14932 of instance initializers.
f6bbde28 14933
ef2aac99
TT
149342000-02-03 Tom Tromey <tromey@cygnus.com>
14935
14936 * Make-lang.in (java.mostlyclean): Remove executables in
14937 `mostlyclean'.
14938
9b4a08f9
SB
149392000-01-31 Scott Bambrough <scottb@netwinder.org>
14940
14941 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
14942 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
14943 (java_float_finite): Convert to use union Word from javaop.h.
14944 (java_double_finite): Convert to use union DWord from javaop.h.
14945
de380723
TT
149462000-02-02 Tom Tromey <tromey@cygnus.com>
14947
14948 * gjavah.c (options): Added `jni' entry.
14949 (help): Document -jni.
14950 (flag_jni): New global.
14951 (process_file): Handle JNI output. Don't print text from
14952 -prepend, -add, etc, when generating stubs. Only remove `.class'
14953 suffix if it actually exists.
14954 (main): Create a `.c' file when run with `--jni --stubs'. Create
14955 correct output file name with `--jni'.
14956 (print_include): Mangle header name differently in JNI case.
14957 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
14958 method list.
14959 (print_method_info): Handle JNI case. Put signature info into
14960 method name. Handle case when STREAM is NULL.
14961 (print_name_for_stub_or_jni): New function.
14962 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
14963 (print_cxx_classname): Handle JNI.
14964 (print_full_cxx_name): Likewise.
14965 (decode_signature_piece): Likewise.
14966 (overloaded_jni_method_exists_p): New function.
14967 (struct method_name): Added `signature' and `sig_length' fields.
14968 (HANDLE_END_FIELD): Do nothing in JNI mode.
14969
c89c53eb
TT
149702000-02-02 Tom Tromey <tromey@cygnus.com>
14971
14972 * jv-scan.c: Include version.c, <getopt.h>.
14973 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
14974 (options): New array.
14975 (usage): New function.
14976 (version): New function.
14977 (main): Use getopt_long to parse command line.
14978 * jcf-dump.c: Include version.c, <getopt.h>.
14979 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
14980 OPT_JAVAP): New macros.
14981 (options): New array.
14982 (usage): Return `void'. Changed message.
14983 (help): New function.
14984 (version): New function.
14985 (main): Use getopt_long_only to parse command line.
14986 * gjavah.c: Include <getopt.h>.
14987 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
14988 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
14989 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
14990 (options): New array.
14991 (java_no_argument): Removed.
14992 (help): Updated with missing options.
14993 (main): Use getopt_long_only to parse command line.
14994 (usage): Changed message.
14995
62c9aa5f 149962000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
14997
14998 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
14999 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
15000 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
15001 * parse.y (array_creation_expression:): Handle anonymous arrays.
15002 (build_array_from_name): Don't set `ret_name' if null.
15003 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
15004 (qualify_ambiguous_name): Likewise.
15005 (java_complete_expand_class): Likewise.
15006
62c9aa5f 150072000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
15008
15009 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
15010 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
15011 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
15012 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
15013 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
15014 AIPL_FUNCTION_COMPLETED_INVOCATION.
f6bbde28 15015 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
c2952b01
APB
15016 AIPL_FUNCTION_INVOCATION_READY.
15017 (AIPL_FUNCTION_DECLARATION): New enum entry.
15018 * parse.y (reorder_static_initialized): New function.
15019 (java_parser_context_pop_initialized_field): Use it.
15020 (add_inner_class_fields): Use
15021 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
15022 augmented. Install marker after last alias initializer, if any.
15023 (generate_finit): Fixed typo. Don't try to retain only the used
15024 fields.
15025 (method_header): Compute and set DECL_FUNCTION_NAP.
15026 (method_declarator): Fixed comment. Insert alias initializer in
15027 parameter list.
15028 (build_alias_initializer_parameter_list): Fixed leading
15029 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
15030 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
15031 (java_complete_expand_class): Code to retain only used aliases
15032 removed.
15033 (java_complete_expand_methods): New local `first_decl'. Generate
15034 $finit$ first, then expand the constructors, regular methods and
15035 <clinit>.
15036 (java_complete_expand_method): Don't report error on missing
15037 return statement if previously detected bogus.
15038 (fix_constructors): Don't patch constructor parameters list.
15039 (patch_method_invocation): Use new AIPL enum values. Reverse
15040 alias initializer list for anonymous classes.
f6bbde28 15041
105a8d1c
AG
150422000-01-30 Anthony Green <green@redhat.com>
15043
15044 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
15045 determine how many stack slots to pop.
15046
f8989a66
APB
150472000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15048
15049 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
15050 error handling/recovery.
15051 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
15052
62c9aa5f 150532000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
15054
15055 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
e64c46ce 15056 FIELD_LOCAL_ALIAS_USED): New macros.
c2952b01
APB
15057 (DECL_FUNCTION_NAP): New macro.
15058 (struct lang_decl): New field `nap'.
15059 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
15060 (struct lang_type): New fields `finit_stmt_list' and
e64c46ce 15061 `clinit_stmt_list'.
c2952b01
APB
15062 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
15063 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
15064 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
e64c46ce 15065 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
c2952b01 15066 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
e64c46ce 15067 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
c2952b01
APB
15068 (BUILD_THROW): Macro line separator re-indented.
15069 * parse.y (end_class_declaration): New function.
15070 (maybe_generate_pre_expand_clinit): New name for
e64c46ce
AJ
15071 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
15072 pre-expand static fields.
c2952b01
APB
15073 (maybe_generate_clinit): Function deleted.
15074 (check_for_static_method_reference): Prototype's parameter list
e64c46ce 15075 indented.
c2952b01 15076 (generate_finit): New name for maybe_generate_finit. Changed
e64c46ce
AJ
15077 leading comment. Function rewritten to use
15078 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
c2952b01
APB
15079 (build_alias_initializer_parameter_list): New function.
15080 (java_parser_context_pop_initialized_field): Likewise.
15081 (add_inner_class_fields): Likewise.
15082 (type_declaration:): Call end_class_declaration.
15083 (class_member_declaration:): Likewise.
15084 (formal_parameter_list:): Fixed typos.
15085 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
e64c46ce 15086 element. Improved error handling.
c2952b01
APB
15087 (block_statement:): Call end_class_declaration.
15088 (anonymous_class_creation:): Likewise.
15089 (create_anonymous_class): Fixed comments.
15090 (create_class): Call add_inner_class_fields.
15091 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
15092 (method_header): Use MARK_FINAL_PARMS.
15093 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
15094 (method_declarator): Propagate final argument flag.
15095 (craft_constructor): New local `artificial'. Call
e64c46ce
AJ
15096 build_alias_initializer_parameter_list. Use
15097 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
c2952b01 15098 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
e64c46ce 15099 necessary.
c2952b01 15100 (complete_expand_class): Get rid of unused outer context local
e64c46ce 15101 alias fields.
c2952b01 15102 (java_complete_expand_methods): Fixed leading
e64c46ce
AJ
15103 comment. Generate/pre-expand <clinit> first. Changed method
15104 expansion order to regular, $finit$, constructors, <clinit>.
c2952b01
APB
15105 (java_complete_expand_method): Set current_function_decl.
15106 (fix_constructors): Fix constructor parameter list to account for
e64c46ce 15107 outer context local alias initializers.
c2952b01
APB
15108 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15109 (resolve_expression_name): Lookup outer context local aliases. New
e64c46ce 15110 local `access', use it.
c2952b01 15111 (patch_method_invocation): Patch inner class ctor invocation with
e64c46ce
AJ
15112 outer context local aliases initialization values. $finit$
15113 invocation patching now includes things generated with
15114 build_alias_initializer_parameter_list.
c2952b01
APB
15115 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
15116 (build_super_invocation): Likewise.
15117 (patch_assignment): Changed comment.
15118
f85cedde
AH
151192000-01-27 Andrew Haley <aph@cygnus.com>
15120
f6bbde28
ZW
15121 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
15122 (emit_if): Ditto.
15123 (emit_jsr): Ditto.
f85cedde 15124
2884c41e
KG
151252000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15126
15127 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
15128 concatenation.
15129 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
15130
15131 * parse.y (register_fields): Don't pass a format specifier to
15132 OBSOLETE_MODIFIER_WARNING.
15133 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
15134 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
15135 specifier.
15136 (check_modifiers): Change function into a macro.
15137 (check_class_interface_creation): Pass a literal format string.
15138
0a068841 151392000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
df32d2ce
KG
15140
15141 * buffer.h: PROTO -> PARAMS.
15142 * check-init.c: Likewise.
15143 * class.c: Likewise.
15144 * constants.c: Likewise.
15145 * convert.h: Likewise.
15146 * decl.c: Likewise.
15147 * except.c: Likewise.
15148 * expr.c: Likewise.
15149 * gjavah.c: Likewise.
15150 * java-except.h: Likewise.
15151 * java-tree.h: Likewise.
15152 * jcf-depend.c: Likewise.
15153 * jcf-dump.c: Likewise.
15154 * jcf-parse.c: Likewise.
15155 * jcf-path.c: Likewise.
15156 * jcf-reader.c: Likewise.
15157 * jcf-write.c: Likewise.
15158 * jcf.h: Likewise.
15159 * jv-scan.c: Likewise.
15160 * jvgenmain.c: Likewise.
15161 * jvspec.c: Likewise.
15162 * lang.c: Likewise.
15163 * lex.c: Likewise.
15164 * lex.h: Likewise.
15165 * parse-scan.y: Likewise.
15166 * parse.h: Likewise.
15167 * parse.y: Likewise.
15168 * typeck.c: Likewise.
15169 * verify.c: Likewise.
15170 * xref.c: Likewise.
15171 * xref.h: Likewise.
15172 * zextract.c: Likewise.
15173 * zipfile.h: Likewise.
f6bbde28 15174
c2952b01
APB
151752000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15176
15177 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15178 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
15179 * constants.c (build_constant_data_ref): Check for cached
15180 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
15181 in TYPE_CPOOL_DATE_REF.
15182 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
15183 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
15184 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
15185 (LOCAL_FINAL): New macro.
15186 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
15187 constant pool -- don't try to reuse.
15188 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
15189 TYPE_LANG_SPECIFIC.
15190 (find_in_current_zip): Use TYPE_JCF.
15191 * parse.h (java_check_final): Prototype removed.
15192 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
15193 (maybe_create_class_interface_decl,
15194 check_class_interface_creation): Likewise.
15195 (java_expand_finals): Function removed.
15196 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
15197 (block_statement:): Fixed comment.
15198 (anonymous_class_creation:): Likewise.
15199 (check_class_interface_creation): Reversed Jan 12, 2000 extra
15200 argument patch.
15201 (check_class_interface_creation): Loosened error report on (inner)
15202 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
15203 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
15204 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
15205 argument patch.
15206 (create_interface): Likewise.
15207 (anonymous_class_counter): New static global.
15208 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
15209 patch. Fixed comments.
15210 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
15211 anonymous_class_counter when declaring a toplevel class.
15212 (craft_constructor): Fixed constructor name when handling
15213 anonymous classes. Anonymous class constructors to feature hidden
15214 this$<n> parameter.
15215 (java_fix_constructors): Added comment.
15216 (java_check_final): Function removed.
15217 (java_complete_expand_methods): Fixed comment. Don't generate
15218 class data, save its outgoing constant pool instead.
15219 (verify_constructor_super): Skip anonymous class constructor
15220 hidden this$<n> parameter.
15221 (java_expand_classes): New local `saved_ctxp'. Removed call to
15222 java_expand_finals and java_check_final. Expand anonymous class
15223 constructors. Generate class data.
15224 (build_super_invocation): Skip anonymous class hidden this$<n>
15225 parameter.
15226 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
15227 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
15228 (set_java_signature): Likewise.
f6bbde28 15229
62c9aa5f 152302000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
a003f638
JB
15231
15232 * gjavah.c: Delete ACC_VISIBILITY define.
15233 * jcf.h: Add ACC_VISIBILITY define.
15234 * parse.y: final: rule tagged <value>.
15235 (java_check_regular_methods): Use ACC_VISIBILITY define for
15236 default package access check.
15237 (local_variable_declaration_statement): Use final: rule.
15238
62c9aa5f 152392000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
18990de5
JB
15240
15241 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
15242 (final:): New rule.
15243
9b4579b3
TT
152442000-01-17 Tom Tromey <tromey@cygnus.com>
15245
15246 * gjavah.c (print_field_info): Allow non-static final fields.
15247
62c9aa5f 152482000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
15249
15250 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
15251 * parse.y (patch_anonymous_class): New function.
15252 (create_anonymous_class): Register incomplete type when the
e64c46ce 15253 class/interface to extends/implement isn't known yet.
c2952b01
APB
15254 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
15255 (verify_constructor_super): Tuned error message.
15256
62c9aa5f 152572000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
15258
15259 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
15260 (ANONYMOUS_CLASS_P): New macro.
15261 (TYPE_SIGNATURE, TYPE_JCF): New macros.
15262 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
15263 * parse.y (create_class): Added leading argument.
15264 (maybe_create_class_interface_decl,
e64c46ce 15265 check_class_interface_creation): Likewise.
c2952b01
APB
15266 (craft_constructor): New function.
15267 (verify_constructor_super): Added argument in prototype.
15268 (class_declaration:): Inserted leading argument.
15269 (for_begin:): Use FOR_LOOP_P.
15270 (anonymous_class_creation): Create WFL of the anonymous class to
e64c46ce 15271 instantiate. Call build_new_invocation. Added comments.
c2952b01 15272 (check_class_interface_creation): Handle parameter `anonymous' in
e64c46ce 15273 verbose mode class creation announce.
c2952b01
APB
15274 (link_nested_class_to_enclosing): Exclude anonymous classes.
15275 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
e64c46ce
AJ
15276 anonymous class, even though they appear to have an enclosing
15277 context.
c2952b01 15278 (create_interface): Pass extra argument to
e64c46ce 15279 check_class_interface_creation.
c2952b01
APB
15280 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
15281 (create_class): Call check_class_interface_creation and
e64c46ce
AJ
15282 maybe_create_class_interface_decl with extra new argument. Don't
15283 add private this$<n> to anonymous classes.
c2952b01 15284 (method_declarator): Insert hidden this$<n> to anonymous class
e64c46ce 15285 constructors.
c2952b01 15286 (java_fix_constructors): Deleted code creating default
e64c46ce 15287 constructor. Call craft_constructor instead.
c2952b01 15288 (java_check_regular_methods): Set `saw_constructor' to 1 for
e64c46ce 15289 anonymous classes.
c2952b01
APB
15290 (fix_constructors): Pass extra argument to verify_constructor_super.
15291 (verify_constructor_super): New local `sdecl', use it. Search for
e64c46ce
AJ
15292 matching constructor (possibly featuring arguments) in super
15293 class.
c2952b01 15294 (lookup_method_invoke): Craft constructor according to arguments
e64c46ce 15295 list when dealing with anonymous class constructors.
c2952b01 15296 (build_super_invocation): Pass arguments to anonymous class super
e64c46ce 15297 constructors.
c2952b01
APB
15298 (search_loop): Use FOR_LOOP_P.
15299 (labeled_block_contains_loop_p): Likewise.
f6bbde28 15300
62c9aa5f 153012000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
15302
15303 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
15304 (enclosing_context_p): New function.
15305 (get_access_flags_from_decl): Handle CLASS_STATIC.
15306 (maybe_layout_super_class): Extra first argument passed to
e64c46ce 15307 do_resolve_class.
c2952b01 15308 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
e64c46ce 15309 ID_INIT_P.
c2952b01 15310 * decl.c (access0_identifier_node): New global.
f6bbde28 15311 (init_decl_processing): access0_identifier_node initialized.
c2952b01
APB
15312 (pushdecl): Set DECL_CONTEXT only on non type decls.
15313 * expr.c (lookup_field): Lookup inner class fields in enclosing
e64c46ce 15314 contexts.
c2952b01
APB
15315 (expand_invoke): Use ID_INIT_P.
15316 (expand_java_field_op): Use DECL_CLINIT_P.
15317 * java-tree.def (CLASS_LITERAL): New tree code.
15318 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
e64c46ce 15319 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
c2952b01
APB
15320 (struct lang_decl): New field `inner_access'.
15321 (enclosing_context_p): Prototyped.
15322 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
e64c46ce 15323 ID_CLINIT_P): New macros.
c2952b01
APB
15324 (CLASS_STATIC): New macro.
15325 (CLASS_ACCESS0_GENERATED_P): New macro.
15326 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
e64c46ce
AJ
15327 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
15328 INNER_CLASS_P): New macros.
c2952b01
APB
15329 (DECL_INNER_CLASS_LIST): New macro.
15330 * jcf-parse.c (yyparse): Avoid the use of ANSI string
e64c46ce 15331 concatenation.
c2952b01 15332 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
e64c46ce 15333 the shift value to int. Fixed typo in comment.
c2952b01
APB
15334 * lex.c (inst_id, wpv_id): Initialize.
15335 * mangle.c (unicode_mangling_length): Take `$' into account.
15336 * parse.h (DRECOVER, RECOVER): Terminate properly.
15337 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
15338 (typedef struct _jdep): New field `enclosing'.
15339 (JDEP_ENCLOSING): New macro.
15340 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
15341 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
15342 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
e64c46ce
AJ
15343 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
15344 GET_ENCLOSING_CPC_CONTEXT): New macros.
f6bbde28 15345 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
c2952b01
APB
15346 (do_resolve_class): Added extra argument in prototype.
15347 * parse.y (resolve_class): Added extra argument in prototype.
15348 (maybe_create_class_interface_decl): Likewise.
15349 (maybe_use_access_method, build_wfl_wrap): New functions.
15350 (java_complete_expand_classes, java_complete_expand_class):
e64c46ce 15351 Likewise.
c2952b01 15352 (java_parser_context_push_initialized_field,
e64c46ce
AJ
15353 java_parser_context_suspend, java_parser_context_resume):
15354 Likewise.
c2952b01 15355 (maybe_make_nested_class_name, make_nested_class_name,
e64c46ce
AJ
15356 set_nested_class_simple_name_value,
15357 link_nested_class_to_enclosing, find_as_inner_class,
15358 find_as_inner_class_do, check_inner_class_redefinition,
15359 build_thisn_assign, build_current_thisn, build_access_to_thisn,
15360 maybe_build_thisn_access_method, build_outer_field_access,
15361 build_outer_field_access_methods, build_outer_field_access_expr,
15362 build_outer_method_access_method, build_new_access_id,
15363 build_outer_field_access_method, outer_field_access_p,
15364 outer_field_expanded_access_p, outer_field_access_fix,
15365 build_incomplete_class_ref, patch_incomplete_class_ref,
15366 create_anonymous_class): Likewise.
c2952b01
APB
15367 (inst_id, wpv_id): New static global variables.
15368 (synchronized:): New rule, tagged <node>.
15369 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
e64c46ce 15370 rules.
c2952b01
APB
15371 (anonymous_class_creation:): New rule, tagged <node>.
15372 (NEW_TK): Tagged <node>.
15373 (type_literals, array_type_literal): New rules, tagged <node>.
15374 (class_declaration:): Removed action when reducing by class_body:
15375 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
e64c46ce 15376 using GET_CPC in sub-rules.
c2952b01
APB
15377 (class_member_declaration): Handle inner classes.
15378 (method_declaration): When reducing method_header:, reset
e64c46ce 15379 current_function_decl when appropriate.
c2952b01 15380 (method_declarator:): Set the number of formal parameter to 0 for
e64c46ce 15381 method declared without arguments.
c2952b01
APB
15382 (constructor_declarator:): Likewise.
15383 (static_initializer:): List of elements kept in a list.
15384 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
e64c46ce 15385 use of the keyword `static' for type declarations.
c2952b01
APB
15386 (block_statement:): Handle inner class declarations.
15387 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
e64c46ce 15388 type qualified `this'.
c2952b01
APB
15389 (class_instance_creation_expression): Use anonymous_class_creation:
15390 to handle inner class instances creation. Handle qualified `new'.
15391 (something_dot_new): Added appropriate actions.
15392 (create_new_parser_context): New function.
15393 (java_push_parser_context, java_parser_context_save_global,
e64c46ce 15394 java_parser_context_suspend): Use create_new_parser_context.
c2952b01
APB
15395 (check_modifiers): Changed leading comment.
15396 (check_class_interface_creation): Handle interclasses.
15397 (add_superinterfaces): Fixed comment.
15398 (create_interface): Build qualified name from the raw_name instead
e64c46ce
AJ
15399 of its matching WFL. Push the initialized fields list. raw_name added
15400 as an extra argument to maybe_create_class_interface_decl.
c2952b01 15401 (create_class): Build qualified name from the raw_name instead of
e64c46ce 15402 its matching WFL. Removed assignment to current_parsed_class_un.
c2952b01 15403 Call PUSH_ERROR before returning an error. Suspend the current
e64c46ce
AJ
15404 parser context when processing an inner class. Push the
15405 initialized fields list. raw_name added as an extra argument to
15406 maybe_create_class_interface_decl. Add the private this$<n>
15407 field.
c2952b01
APB
15408 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
15409 (register_fields): Get the class type from GET_CPC and handle
e64c46ce
AJ
15410 previous errors. Added code to handle the creation of static
15411 fields in inner classes. Initialized fields initialization
15412 statements kept in a list of lists.
c2952b01 15413 (maybe_generate_finit): Initialized fields initialization
e64c46ce 15414 statements kept in a list of lists. Use GET_CPC.
c2952b01
APB
15415 (maybe_generate_clinit): Likewise.
15416 (method_header): Use GET_CPC and GET_CPC_UN.
15417 (parser_qualified_classname): Handle inner classes.
15418 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
15419 (java_fix_constructors): Hide pointer to enclosing context
e64c46ce 15420 instance in constructor list when dealing with inner classes.
c2952b01 15421 (jdep_resolve_class): Call resolve_class with extra first argument
e64c46ce 15422 JDEP_ENCLOSING.
c2952b01 15423 (resolve_class): Add enclosing context as a first extra argument
e64c46ce 15424 to do_resolve_class.
c2952b01 15425 (do_resolve_class): Call find_as_inner_class. Handle WFLs
e64c46ce 15426 properly.
c2952b01 15427 (resolve_no_layout): Extra argument added to resolve_class
e64c46ce 15428 invocation.
c2952b01
APB
15429 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
15430 (java_get_real_method_name): Use GET_CPC_UN.
15431 (check_abstract_method_definitions): Use DECL_CLINIT_P.
15432 (java_check_abstract_methods): Handle static method declared in
e64c46ce 15433 inner classes by an error.
c2952b01
APB
15434 (java_check_regular_methods): Use DECL_CLINIT_P.
15435 (source_start_java_method): Also set DECL_MAX_LOCALS.
15436 (create_artificial_method): Call java_parser_context_save_global
e64c46ce
AJ
15437 and java_parser_context_restore_global instead of saving/restoring
15438 the context by hand.
c2952b01
APB
15439 (expand_start_java_method): Improved verbose mode message.
15440 (java_complete_expand_methods): Fixed leading comment. Use
e64c46ce 15441 DECL_CLINIT_P.
c2952b01
APB
15442 (fix_constructors): Added assignment to this$<n> if necessary.
15443 (java_expand_classes): Call java_complete_expand_classes instead
e64c46ce 15444 of java_complete_expand_methods.
c2952b01
APB
15445 (make_qualified_primary): Simplified.
15446 (merge_qualified_name): Optimized for missing left or right parts.
15447 (resolve_expression_name): Handle access to outer class fields from
e64c46ce 15448 interclasses.
c2952b01 15449 (resolve_qualified_expression_name): New macro
e64c46ce
AJ
15450 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15451 classes. Report error on non appropriate qualification of
15452 `new'. Handle qualified `this'.
c2952b01 15453 (not_accessible_p): Allow access to outer class private fields from
e64c46ce 15454 inner classes.
c2952b01 15455 (patch_method_invocation): Handle method invocations through
e64c46ce 15456 access methods and inner class constructor invocations.
c2952b01 15457 (find_applicable_accessible_methods_list): Search enclosing
e64c46ce 15458 contexts of an inner class.
c2952b01
APB
15459 (search_applicable_methods_list): Fixed typo.
15460 (argument_types_convertible): Handle inner class constructors'
e64c46ce 15461 hidden outer context reference argument.
c2952b01
APB
15462 (qualify_ambiguous_name): Handle qualified `this'.
15463 (java_complete_lhs): Handle use of field accessed through
e64c46ce
AJ
15464 artificial access methods in various cases of assignments. Handle
15465 CLASS_LITERAL node.
c2952b01
APB
15466 (check_final_assignment): Use DECL_CLINIT_P.
15467 (valid_ref_assignconv_cast_p): Handle the destination being an
e64c46ce 15468 enclosing context of the source.
c2952b01 15469 (patch_unaryop): Handle use of field accessed through artificial
e64c46ce 15470 access methods.
c2952b01
APB
15471 (patch_return): Use DECL_CLINIT_P.
15472 (patch_throw_statement): Use DECL_CLINIT_P.
15473 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15474 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
e64c46ce 15475 ID_INIT_P.
f6bbde28 15476
c52b5771
AG
154772000-01-16 Anthony Green <green@cygnus.com>
15478
15479 * parse.y (build_string_concatenation): Only use
15480 StringBuffer(String) shortcut if String arg is constant.
15481
62c9aa5f 154822000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
f8989a66
APB
15483
15484 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15485 the shift value to int. Fixed typo in comment.
15486
51149cc8
MK
154872000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
15488
15489 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15490 * jcf-write.c: Likewise.
15491 * parse.y: Likewise.
15492 * parse.c: Regenerate.
15493
2d54440c
AG
154942000-01-09 Anthony Green <green@cygnus.com>
15495
15496 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15497 bytecodes in the correct order.
15498
2cc60d16
KG
154992000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15500
15501 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15502
62c9aa5f 155032000-01-06 Anthony Green <green@cygnus.com>
f626e9fa
AG
15504
15505 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15506 before building constant array decl.
15507
62c9aa5f 155082000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
6b924cc5 15509
81baa09a 15510 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
6b924cc5 15511 method invocation and typo in conditional expression.
f6bbde28 15512 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
e64c46ce 15513 the appropriate NOTE_POP.
6b924cc5 15514 * parse.y (patch_binop): Shift value mask to feature the right
e64c46ce 15515 type.
6b924cc5 15516
c63b98cd
KG
155171999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15518
15519 * class.c (assume_compiled, assume_compiled_node): Add static
15520 prototype.
15521 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15522
15523 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15524
15525 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15526
15527 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15528 to `__modifier' to avoid stringifying it.
15529
15530 * parse.y (verify_constructor_circularity): Don't call a variadic
15531 function with a non-literal format string.
15532 (java_check_abstract_methods): Move unreachable code inside
15533 `continue' statement.
15534 (lookup_method_invoke): Call xstrdup, not strdup.
15535
15536 * expr.c (expand_java_field_op): Avoid the use of ANSI string
15537 concatenation.
15538
15539 * jcf-parse.c (yyparse): Likewise.
15540
15541 * jv-scan.c (main): Likewise.
f6bbde28 15542
781b0558
KG
155431999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15544
15545 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15546 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15547 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15548 concatenation.
15549
15550 * parse.y (synchronized, variable_redefinition_error,
15551 check_class_interface_creation, create_interface, create_class,
15552 method_header, finish_method_declaration,
15553 check_modifiers_consistency, method_declarator,
15554 complete_class_report_errors, check_abstract_method_definitions,
15555 java_check_regular_methods, check_throws_clauses,
15556 java_check_abstract_methods, read_import_dir,
15557 check_pkg_class_access, declare_local_variables, fix_constructors,
15558 cut_identifier_in_qualified, resolve_expression_name,
15559 resolve_qualified_expression_name, patch_method_invocation,
15560 java_complete_lhs, patch_assignment, try_builtin_assignconv,
15561 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15562 patch_exit_expr, patch_exit_expr, patch_switch_statement,
15563 patch_try_statement, patch_synchronized_statement,
15564 patch_throw_statement, check_thrown_exceptions,
15565 patch_conditional_expr): Likewise.
15566
62c9aa5f 155671999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
ee07f4f4
APB
15568
15569 * Makefile.in (LIBDEPS): Added gcc's errors.o
15570 (../jcf-dump$(exeext):): Link with gcc's errors.o
15571 (../gcjh$(exeext):): Likewise.
15572 * expr.c (expand_java_NEW): Layout the entire target type instead of
e64c46ce 15573 laying out its methods only.
ee07f4f4
APB
15574 (lookup_field): Layout the class after having loaded it.
15575 * java-tree.h (java_debug_context): Declared.
15576 * jcf-io.c (toplev.h): Included.
15577 (find_class): Removed assignment to jcf's outofsynch
e64c46ce
AJ
15578 field. Force source file to be read if newer than its matching
15579 class file. Tweaked debug messages.
ee07f4f4
APB
15580 * jcf-parse.c (jcf_out_of_synch): Deleted.
15581 (read_class): Call to jcf_out_of_synch removed.
15582 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15583 (jcf_out_of_synch): Prototype deleted.
15584 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
ee142fe7
KH
15585 `deprecated' and `class_err': integer turned into bit-fields.
15586 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
ee07f4f4
APB
15587 * parse.y (package_list): New global.
15588 (package_declaration:): Record newly parsed package name.
15589 (extra_ctxp_pushed_p): Static global deleted.
15590 (java_parser_context_save_global): Create buffer context for the
e64c46ce 15591 purpose of saving globals, if necessary.
ee07f4f4 15592 (java_parser_context_restore_global): Pop context pushed for the
e64c46ce 15593 purpose of saving globals, if necessary.
ee07f4f4
APB
15594 (java_debug_context_do): New prototype and function.
15595 (java_debug_context): Likewise.
15596 (do_resolve_class): Use already parsed package names to qualify
e64c46ce 15597 and lookup class candidate.
f6bbde28 15598 (java_pre_expand_clinit): Removed unnecessary local variable.
ee07f4f4 15599
6b924cc5
APB
156001999-12-17 Tom Tromey <tromey@cygnus.com>
15601
15602 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
15603 fixes PR gcj/119.
15604 (process_file): Use `\n\' at end of each line in string.
15605
62c9aa5f 156061999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
6bafd8b6
APB
15607
15608 * expr.c (expand_invoke): Layout the loaded class before
e64c46ce 15609 attempting to use it.
6bafd8b6 15610 (expand_java_field_op): Allow final field assignments to take
e64c46ce 15611 place in $finit$.
f6bbde28 15612 * typeck.c (convert): Return error_mark_node if expr is null.
6bafd8b6 15613
e920ebc9
APB
156141999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15615
15616 * class.c (class_depth): Return -1 if the class doesn't load
15617 properly.
15618 * expr.c (can_widen_reference_to): Check for errors during depth
15619 computation and return 0 accordingly.
15620 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15621 create default constructors and add an other error check.
15622 * parse.h (java_fix_constructors): Prototyped.
15623 * parse.y (java_pre_expand_clinit): Likewise.
15624 (build_super_invocation): Re-prototyped to feature one argument.
15625 (java_check_circular_reference): Directly use `current'.
15626 (java_fix_constructors): New function.
15627 (java_check_regular_methods): Don't create default constructors
15628 here, but abort if none were found.
15629 (java_complete_expand_methods): Pre-process <clinit> calling
15630 java_pre_expand_clinit.
15631 (java_pre_expand_clinit): New function.
15632 (fix_constructors): build_super_invocation invoked with the
15633 current method declaration as an argument.
15634 (build_super_invocation): Use the context of the processed method
15635 decl argument instead of current_class.
15636 * typeck.c (lookup_java_method): Take WFLs in method names into
15637 account.
f6bbde28 15638
62c9aa5f 156391999-12-14 Per Bothner <per@bothner.com>
cf69bfbf
PB
15640
15641 * class.c (make_class_data): flag_keep_inline_functions to keep
15642 private methods in the method array.
15643
38b58895
AG
156441999-12-15 Anthony Green <green@cygnus.com>
15645
15646 * check-init.c (check_init): Take into account both types of
f6bbde28 15647 `throw's when checking for uninitialized variables.
38b58895 15648
62c9aa5f 156491999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
3a1760ac 15650
67264b4f 15651 * parse.y (java_complete_lhs): Force conversion of array
f6bbde28 15652 dimensions to int_type_node, that's what runtime's ABI expects.
3a1760ac 15653
62c9aa5f 156541999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
6a50bd91
APB
15655
15656 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
e64c46ce
AJ
15657 operand of a WFL, until the Java front-end gets fixed with regard
15658 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
6a50bd91 15659
8bbb23b7
AH
156601999-12-10 Andrew Haley <aph@cygnus.com>
15661
15662 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15663 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15664 expr.c (build_java_athrow): Add support for sjlj-exceptions.
15665 java-tree.h: Ditto.
f6bbde28 15666 jcf-write.c: Ditto.
8bbb23b7 15667
62c9aa5f 156681999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
6f9c8716 15669
f6bbde28
ZW
15670 * expr.c (java_lang_expand_expr): Switch to permanent obstack
15671 before calling expand_eh_region_start and expand_start_all_catch.
15672 * except.c (expand_start_java_handler): Switch to permanent
15673 obstack before calling expand_eh_region_start.
15674 (expand_end_java_handler): Switch to permanent obstack before
15675 calling expand_start_all_catch.
6f9c8716 15676
1684f874
AG
156771999-12-5 Anthony Green <green@cygnus.com>
15678
15679 * decl.c (init_decl_processing): Mark throw_node as a noreturn
15680 function with side effects.
15681 (init_decl_processing): Mark all memory allocating DECLs with
15682 DECL_IS_MALLOC.
15683
62c9aa5f 156841999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
0974e9fe 15685
f6bbde28
ZW
15686 * except.c (expand_end_java_handler): Call
15687 expand_resume_after_catch and end_catch_handler.
0974e9fe 15688
62c9aa5f 156891999-11-30 Anthony Green <green@cygnus.com>
de1f429d 15690
f6bbde28 15691 * verify.c (verify_jvm_instructions): Create new return label
a83f01f0 15692 chain if non existent (don't rely on the verified state of the jsr
f6bbde28 15693 target.)
de1f429d 15694
62c9aa5f 156951999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
afc390b1 15696
f6bbde28
ZW
15697 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15698 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
afc390b1 15699
f6bbde28
ZW
15700 * parse.y (patch_assignment): Removed bogus final class test on
15701 lhs when checking on whether to emit an ArrayStoreException runtime
15702 check.
15703 * expr.c (expand_java_arraystore): Likewise.
afc390b1 15704
3fc61836
AG
157051999-11-28 Anthony Green <green@cygnus.com>
15706
15707 * decl.c (find_local_variable): Reuse single slot decls when
15708 appropriate.
15709
62c9aa5f 157101999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
1ba305b5 15711
f6bbde28
ZW
15712 * jcf-parse.c (saw_java_source): Global variable removed.
15713 (read_class): Don't use `saw_java_source'. Added extra braces.
15714 (yyparse): Code setting `saw_java_source' removed.
1ba305b5 15715
9a260e99
MM
157161999-11-24 Mark Mitchell <mark@codesourcery.com>
15717
15718 * except.c (emit_handlers): Zero catch_clauses after emitting them.
15719
62c9aa5f 157201999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
de1f429d 15721
f6bbde28
ZW
15722 * verify.c (merge_type_state): Non verified subroutines being
15723 considered more than once to trigger passive type merge.
de1f429d 15724
62c9aa5f 157251999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
97f30284
APB
15726
15727 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
e64c46ce 15728 in case of error. Error message tuned.
97f30284 15729
48aedbca
AG
157301999-11-21 Anthony Green <green@cygnus.com>
15731
15732 * constants.c (find_methodref_index): Unwrap method names before
15733 inserting them in the constant pool.
15734
15735 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15736
15737 * class.c (assume_compiled_node): New typedef.
15738 (assume_compiled_tree): New static data.
15739 (find_assume_compiled_node): New function.
15740 (add_assume_compiled): New function.
15741 (assume_compiled): New function.
15742 * class.c (make_class_data): Use assume_compiled.
15743 (is_compiled_class): Use assume_compiled.
15744
15745 * java-tree.h (add_assume_compiled): Declare.
15746
15747 * lang.c (lang_decode_option): Parse new options.
15748
62c9aa5f 157491999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
4832340c
APB
15750
15751 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
e64c46ce 15752 int_type_node: that's what `_Jv_AllocObject' expects.
4832340c 15753
62c9aa5f 157541999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
b5b8a0e7 15755
f6bbde28 15756 * parse.y (lookup_method_invoke): Use lang_printable_name to
e64c46ce 15757 reliably build the type name during error report. Fixes PR gcj/97.
b5b8a0e7 15758
71651d6c
TT
157591999-11-09 Tom Tromey <tromey@cygnus.com>
15760
15761 * jcf-path.c: Include <sys/stat.h>.
15762 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
15763 (DIR_UP): New macro.
15764
62c9aa5f 157651999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
8226320b
APB
15766
15767 * parse.y (source_end_java_method): Resume permanent allocation,
e64c46ce 15768 reversing Apr 27 1998 patch.
8226320b 15769 (patch_string_cst): Pop obstacks after having pushed the permanent
e64c46ce 15770 ones.
8226320b 15771
09e7d04a
TT
157721999-11-05 Tom Tromey <tromey@cygnus.com>
15773
15774 * class.c (finish_class): Emit inlined methods if any native
15775 methods exist in the class. Fixes PR gcj/85.
15776
62c9aa5f 157771999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
97f30284
APB
15778
15779 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15780 (qualify_ambiguous_name): Likewise.
f6bbde28 15781
62c9aa5f 157821999-11-03 Godmar Back <gback@cs.utah.edu>
7c2e3b9b
GB
15783
15784 * typeck.c: (lookup_java_method): search all inherited
15785 interfaces when looking up interface method.
15786
62c9aa5f 157871999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
efa0a23f
APB
15788
15789 * parse.y (method_header:): Issue error message for rule `type
e64c46ce 15790 error'.
efa0a23f 15791 (synchronized:): Error report when not using synchronized.
f6bbde28 15792
62c9aa5f 157931999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
f63991a8 15794
ffa669ea 15795 * parse.y (resolve_qualified_expression_name): Prevent `this' from
e64c46ce 15796 being used before the superclass constructor has been called.
ffa669ea 15797 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
e64c46ce 15798 instead of `CALL_THIS_CONSTRUCTOR_P'.
f63991a8 15799
62c9aa5f 158001999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
f6e8b583
TF
15801
15802 * check-init.c: Fix typo in comment.
15803
62c9aa5f 158041999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
ed598dde
APB
15805
15806 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
e64c46ce 15807 and final method.
ed598dde 15808
62c9aa5f 158091999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8119c720
APB
15810
15811 * parse.y (expression_statement:): Call function to report
e64c46ce 15812 improper invocation of a constructor.
8119c720
APB
15813 (parse_ctor_invocation_error): New function.
15814
2af0ac28
MM
158151999-10-26 Mark Mitchell <mark@codesourcery.com>
15816
15817 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15818 remember_end_note.
15819
2fca54be
TT
158201999-10-21 Tom Tromey <tromey@cygnus.com>
15821
15822 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15823 in generated `main'.
15824
62c9aa5f 158251999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
ac22f9cb
APB
15826
15827 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15828 (qualify_ambiguous_name): Likewise.
15829
62c9aa5f 158301999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
100f7cd8
APB
15831
15832 * parse.y (java_complete_tree): fold_constant_for_init to work on
e64c46ce 15833 permanent_obstack.
100f7cd8
APB
15834 (java_complete_lhs): Likewise.
15835 (array_constructor_check_entry): Complete an initializer element
e64c46ce 15836 on permanent_obstack.
100f7cd8 15837
51ae4071
TT
158381999-10-19 Tom Tromey <tromey@cygnus.com>
15839
15840 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15841 From Mike Moreton <mike@pillim.demon.co.uk>.
15842
13f9ac51
GM
158431999-10-15 Greg McGary <gkm@gnu.org>
15844
15845 * java-tree.h (flag_bounds_check): Remove extern decl.
15846 * lang.c (flag_bounds_check): Remove global variable.
15847 (lang_f_options): Remove "bounds-check" entry.
15848 (lang_init_options): Default flag_bounds_check to "on".
15849
8f426586
TT
158501999-10-14 Tom Tromey <tromey@cygnus.com>
15851
7cf41963
TT
15852 * jvgenmain.c (usage): New function.
15853 (main): Use it. Also, handle `-D' options.
15854 * jvspec.c (lang_specific_driver): Recognize -D.
15855 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
15856
8f426586
TT
15857 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
15858
1ebadc60
KG
158591999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15860
15861 * jcf-dump.c (print_constant, disassemble_method): Don't call a
15862 variadic function with a non-literal format string.
15863
15864 * parse-scan.y (report_main_declaration): Likewise.
15865
15866 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
15867
15868 * parse.y (read_import_dir, patch_assignment, patch_binop,
15869 patch_array_ref): Likewise.
15870
15871 * typeck.c (build_java_array_type): Likewise.
15872
15873 * verify.c (verify_jvm_instructions): Likewise.
15874
62c9aa5f 158751999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
b5edd133 15876
ce74b7d6 15877 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
b5edd133 15878
ab150fb1
AG
158791999-10-07 Anthony Green <green@cygnus.com>
15880
15881 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
15882 where CHECK_PUT may fail for valid reasons.
15883
15884 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
e64c46ce 15885 UNSAFE_PUTN): New macros.
ab150fb1 15886
05a3dfc7
TT
158871999-10-04 Tom Tromey <tromey@cygnus.com>
15888
15889 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
15890 well. Fixes Java PR gcj/59.
15891 * parse-scan.y (yyerror): Report errors.
15892
62c9aa5f 158931999-09-24 Glenn Chambers <GChambers@provsol.com>
ca6c7489 15894
d353a00c 15895 * decl.c (insert_block): Remove unconditional `abort'.
ca6c7489 15896
62c9aa5f 158971999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
26db82d8
BS
15898
15899 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
15900 FUNCTION_CODE now of type int. All callers changed.
15901 Set the builtin's DECL_BUILT_IN_CLASS.
15902
0cffaca3
TT
159031999-09-23 Tom Tromey <tromey@cygnus.com>
15904
15905 * jvspec.c (lang_specific_driver): Don't read spec file if
15906 -fsyntax-only given.
15907
bad1e2ac
TT
159081999-09-22 Tom Tromey <tromey@cygnus.com>
15909
ba020951
TT
15910 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
15911
bad1e2ac
TT
15912 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
15913 (WORDS_TO_LONG): Likewise.
15914 (WORDS_TO_DOUBLE): Likewise.
15915
62c9aa5f 159161999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
cacc154e 15917
ce74b7d6 15918 * jcf-write.c (RELOCATION_VALUE_0): New macro.
cacc154e
APB
15919 (RELOCATION_VALUE_1): Likewise.
15920 (emit_iinc, emit_reloc, push_constant1, push_constant2,
e64c46ce 15921 push_in_const, push_long_const): Prototyped.
cacc154e
APB
15922 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
15923 (push_constant2): Likewise.
15924 (push_int_const): Cast find_constant1's integer arguments to `jword'.
15925 (find_constant_wide): Cast find_constant2's integer arguments to
e64c46ce 15926 `jword'.
cacc154e 15927 (find_constant_index): Cast find_constant2's and find_constant2's
e64c46ce 15928 integer arguments to `jword'.
cacc154e
APB
15929 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
15930 (emit_switch_reloc): Use RELOCATION_VALUE_0.
15931 (emit_if): Use RELOCATION_VALUE_1.
15932 (emit_goto): Likewise.
15933 (emit_jsr): Likewise.
15934 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
e64c46ce 15935 argument to push_long_const to HOST_WIDE_INT.
cacc154e 15936
7161fcc7
AS
159371999-09-15 Andreas Schwab <schwab@suse.de>
15938
15939 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
15940
03d32d1a
NC
159411999-09-20 Nick Clifton <nickc@cygnus.com>
15942
15943 * lang.c (lang_decode_option): Extend comment.
15944
62c9aa5f 159451999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
b771925e
APB
15946
15947 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
e64c46ce 15948 instead of fndecl.
b771925e 15949
c2e3db92
KG
159501999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15951
15952 * gjavah.c (get_field_name, print_method_info, print_include,
15953 add_namelet): Use xmalloc, not malloc.
15954
15955 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
15956 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
15957 NULL pointer.
15958
15959 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
15960
15961 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
f6bbde28 15962
c2e3db92
KG
15963 * jcf-path.c (add_entry): Likewise.
15964
15965 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
15966
15967 * jv-scan.c (xmalloc): Remove definition.
15968
15969 * jvgenmain.c (xmalloc): Likewise.
15970
15971 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
15972
15973 * lex.c (java_store_unicode): Use xrealloc, not realloc.
15974
15975 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
15976 concat, not xmalloc/sprintf.
15977 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
15978 (xstrdup): Remove definition.
15979
15980 * parse.y (duplicate_declaration_error_p,
15981 constructor_circularity_msg, verify_constructor_circularity,
15982 check_abstract_method_definitions, java_check_regular_methods,
15983 java_check_abstract_methods, patch_method_invocation,
15984 check_for_static_method_reference, patch_assignment, patch_binop,
15985 patch_cast, array_constructor_check_entry, patch_return,
15986 patch_conditional_expr): Use xstrdup, not strdup.
15987
15988 * zextract.c (ALLOC): Use xmalloc, not malloc.
15989
62c9aa5f 159901999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9257393c
KG
15991
15992 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
15993
15994 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
15995 (do_spec, lang_specific_pre_link, lang_specific_driver,
15996 input_filename, input_filename_length): Don't declare.
15997 (main_class_name, jvgenmain_spec, lang_specific_driver):
15998 Constify a char*.
15999 (lang_specific_driver): All calls to the function pointer
f6bbde28 16000 parameter now explicitly call `fatal'.
9257393c 16001
62c9aa5f 160021999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
f4e16489
APB
16003
16004 * parse.y (find_applicable_accessible_methods_list): Search
e64c46ce 16005 abstract classes as interfaces.
f4e16489 16006
62c9aa5f 160071999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
fcf6eeb6
APB
16008
16009 * class.c (finish_class): We're now outside a valid method
e64c46ce 16010 declaration. Tell the rest of gcc so.
fcf6eeb6 16011
64e92991
RK
160121999-09-08 Bruce Korb autogen@linuxbox.com
16013
16014 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
16015
512d594b
TT
160161999-09-07 Tom Tromey <tromey@cygnus.com>
16017
16018 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
16019 java-array.h.
16020 (decode_signature_piece): Don't emit "::" in JArray<>.
16021 (print_namelet): Only print trailing `;' when printing a class.
16022
62c9aa5f 160231999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
81b3411c
BS
16024
16025 * java-tree.h: Delete declarations for all tree nodes now moved to
16026 global_trees.
16027 * decl.c: Delete their definitions.
16028
6308c574
MM
160291999-09-04 Mark Mitchell <mark@codesourcery.com>
16030
16031 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
16032 * Makefile.in (OBJS): Add ggc-callbacks.o.
16033 (OBJDEPS): Likewise.
16034
2f11d407
TT
160351999-09-03 Tom Tromey <tromey@cygnus.com>
16036
16037 * parse.y (strip_out_static_field_access_decl): Return operand if
16038 it satisfies JDECL_P.
16039
3a5395a3
TT
160401999-09-02 Tom Tromey <tromey@cygnus.com>
16041
16042 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
16043 Handle nested arrays, like `[[I'.
16044
d593dd8c
KG
160451999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16046
16047 * class.c (finish_class): Remove unused parameter, all callers
16048 changed.
16049
16050 * expr.c (build_java_athrow): Change return type to void.
16051 (java_lang_expand_expr): Make sure each case in switch returns a
16052 value.
16053
16054 * java-tree.h (finish_class): Fix prototype to take void args.
16055
16056 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
16057 (main): Issue return from main, not exit.
16058
16059 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
16060
16061 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
16062
16063 * jv-scan.c (main): Issue return from main, not exit.
16064
16065 * parse.y (check_abstract_method_definitions,
16066 java_check_abstract_method_definitions): Add static prototypes.
16067 (java_complete_expand_methods): Fix call to `finish_class'.
16068
16069 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
16070 and `prevpc'.
16071
f425a887
KG
160721999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16073
16074 * lang.c (language_string): Constify.
16075
00d30284
KG
160761999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16077
16078 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
16079 Remove hacks for stuff which comes from libiberty.
16080
16081 * Make-lang.in: Likewise.
16082
62c9aa5f 160831999-08-30 Hans-Peter Nilsson <hp@axis.se>
24c30b28
HPN
16084
16085 * Makefile.in (xref.o): Depend on xref.c explicitly.
16086
1b93a502
KG
160871999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16088
16089 * java-tree.h (lang_printable_name): Constify a char*.
16090
16091 * lang.c (lang_printable_name): Likewise.
16092
62c9aa5f 160931999-08-27 Jeffrey A Law (law@cygnus.com)
5f9ee695
JL
16094
16095 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
16096 comments in C code.
16097
12207a87
TT
160981999-08-26 Tom Tromey <tromey@cygnus.com>
16099
16100 * gjavah.c (print_cxx_classname): Print "::" before qualified
16101 name.
16102
62c9aa5f 161031999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
f441f671
APB
16104
16105 * parse.y (lookup_cl): Changed leading comment. Now does its best
e64c46ce 16106 to set the column number.
f441f671
APB
16107 (qualify_ambiguous_name): Take WFL wrappers into account.
16108
62c9aa5f 161091999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
ee5cd638
GT
16110
16111 * verify.c (verify_jvm_instructions): Don't check instruction
16112 validity beyond end of method.
16113
20c96b2a
TT
161141999-08-25 Tom Tromey <tromey@cygnus.com>
16115
16116 * jvspec.c (lang_specific_driver): Correctly handle --help again.
16117
be245ac0
KG
161181999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16119
16120 * gjavah.c (print_name, print_base_classname, utf8_cmp,
16121 cxx_keyword_subst, generate_access, name_is_method_p,
16122 get_field_name, print_field_name, super_class_name, print_include,
16123 decode_signature_piece, print_class_decls, usage, help,
16124 java_no_argument, version, add_namelet, print_namelet): Add static
16125 prototype.
16126 (print_base_classname, utf8_cmp, cxx_keyword_subst,
16127 name_is_method_p): Constify a char*.
16128 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
16129 Provide a final else clause in an if-else-if.
16130 (print_field_info): Add missing final arg in function call to
16131 `print_field_name'.
16132 (print_method_info, decompile_method, decode_signature_piece,
16133 print_c_decl, print_full_cxx_name, print_stub,
16134 print_mangled_classname, super_class_name, print_include,
16135 add_namelet, add_class_decl, print_class_decls, process_file,
16136 help): Constify a char*.
16137
16138 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
16139 push_int_const, find_constant_wide, find_constant_index,
16140 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
16141 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
16142 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
16143 emit_if, emit_goto, emit_jsr, call_cleanups,
16144 make_class_file_name): Add static prototypes.
16145 (generate_bytecode_return, generate_bytecode_insns): Pass a
16146 NULL_PTR, not a NULL_TREE.
16147
16148 * jv-scan.c: Include "jcf.h".
16149 (main): Declare using DEFUN macro.
16150
16151 * jvspec.c (find_spec_file, lang_specific_pre_link,
16152 lang_specific_driver): Add prototypes.
16153 (find_spec_file): Constify a char*.
16154
16155 * keyword.gperf (hash, java_keyword): Add prototypes.
16156
16157 * lang.c (lang_print_error): Add static prototype.
16158 (lang_init): Prefer memcpy over bcopy to avoid casts.
16159
16160 * lex.c (yylex): Add static prototype.
16161
16162 * parse-scan.y: Include "lex.c" earlier.
16163
16164 * parse.h: Remove redundant declaration for `yylex'.
16165
16166 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
16167 labeled_block_contains_loop_p): Add static prototypes.
16168 (not_accessible_p): Make static to match prototype.
16169
16170 * verify.c (start_pc_cmp): Don't needlessly cast away const.
16171
62c9aa5f 161721999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
d77613be
APB
16173
16174 * parse.y (check_method_redefinition): Changed leading comment.
16175 (check_abstract_method_definitions): New function.
16176 (java_check_abstract_method_definitions): New function.
16177 (java_check_regular_methods): Call it.
16178 (verify_constructor_super): Fixed indentation.
16179 (lookup_method_invoke): Likewise.
16180
62c9aa5f 161811999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
79d13333
APB
16182
16183 * parse.y (method_header): Return a null pointer if the current
e64c46ce 16184 class node is null.
79d13333 16185 (finish_method_declaration): Return if the current function decl
e64c46ce 16186 is null.
79d13333
APB
16187 (source_start_java_method): Likewise.
16188 (java_method_add_stmt): Likewise.
16189
62c9aa5f 161901999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
5cbdba64
APB
16191
16192 * class.c (emit_register_class): Removed unnecessary call to
e64c46ce 16193 start_sequence.
5cbdba64 16194 * parse.y (labeled_block_contains_loop_p): Removed unused local
e64c46ce 16195 variable.
5cbdba64 16196
62c9aa5f 161971999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
5cbdba64 16198
f6bbde28 16199 * parse.y (java_refold): Added prototype.
5cbdba64 16200
62c9aa5f 162011999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
5cbdba64 16202
f6bbde28
ZW
16203 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
16204 (java_stabilize_reference): Removed unnecessary `else'.
16205 (java_complete_lhs): Set flag to remember boolean. Call
16206 java_refold. Added comments.
16207 (java_decl_equiv): New function.
16208 (binop_compound_p): Likewise.
16209 (java_refold): Likewise.
16210 (patch_unaryop): Striped static field access assigned to decl and
16211 op. Changed promotion scheme for ++/-- operators.
16212 (search_loop): New function.
16213 (labeled_block_contains_loop_p): Likewise.
16214 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
16215 comment.
16216 (patch_bc_statement): Call search_loop. Fixed comment.
5cbdba64 16217
66e06429
AG
162181999-08-14 Anthony Green <green@cygnus.com>
16219
16220 * expr.c (java_lang_expand_expr): Mark static array data as
16221 referenced.
16222
62c9aa5f 162231999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9a816500
RO
16224
16225 * jvgenmain.c (main): NUL-terminate name_obstack.
16226
c8e7d2e6
KG
162271999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16228
16229 * check-init.c (check_bool2_init, done_alternative): Add static
16230 prototypes.
16231
16232 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
16233 (add_method, build_utf8_ref, build_class_ref,
16234 append_gpp_mangled_type, layout_class_method): Constify a char*.
16235
16236 * decl.c (push_promoted_type, make_binding_level): Add static
16237 prototypes.
16238 (push_promoted_type, pushdecl): Constify a char*.
16239
16240 * except.c (find_handler_in_range, link_handler,
16241 check_start_handlers): Add static prototypes.
16242
16243 * expr.c (process_jvm_instruction): Constify a char*.
16244
16245 * gjavah.c (main): Constify a char*.
16246
16247 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
16248 Constify a char*.
16249
16250 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
16251 static prototypes.
16252 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
16253 munge, print_ents): Constify a char*.
16254
16255 * jcf-dump.c (disassemble_method): Constify a char*.
16256 (print_constant_pool, print_exception_table): Add static prototypes.
16257 (print_constant, print_exception_table, main, disassemble_method):
16258 Constify a char*.
16259
16260 * jcf-io.c (find_classfile, find_class): Likewise.
16261
16262 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
16263 (set_source_filename, predefined_filename_p): Add static prototypes.
16264 (set_source_filename, get_constant, get_class_constant,
16265 find_in_current_zip): Constify a char*.
16266
16267 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
16268 static prototypes.
16269 (add_entry, add_path, jcf_path_classpath_arg,
16270 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16271
16272 * jcf-reader.c (get_attribute, jcf_parse_preamble,
16273 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
16274 jcf_parse_one_method, jcf_parse_methods,
16275 jcf_parse_final_attributes): Add static prototypes.
16276 (get_attribute): Constify a char*.
16277
16278 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
16279 jcf_dependency_add_target, jcf_path_classpath_arg,
16280 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
16281
16282 * jv-scan.c (main): Constify a char*.
16283 (gcc_obstack_init): Add prototype arguments.
16284
16285 * jvgenmain.c (gcc_obstack_init): Likewise.
16286 (main): Constify a char*.
16287
16288 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
16289 static prototypes.
16290 (put_decl_string, lang_print_error): Constify a char*.
16291 (lang_init): Remove redundant extern prototype.
f6bbde28 16292
c8e7d2e6
KG
16293 * mangle.c (emit_unicode_mangled_name): Constify a char*.
16294
16295 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
16296 Add static prototypes.
16297 (get_type_from_signature): Constify a char*.
16298
16299 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
16300 Add static prototypes.
16301 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
16302 (verify_jvm_instructions): Constify a char*.
16303
16304 * xref.c (xref_flag_value): Likewise.
f6bbde28 16305
c8e7d2e6
KG
16306 * xref.h (xref_flag_value): Likewise.
16307
16308 * zextract.c (makeword, makelong): Add static prototypes.
16309 (makeword, makelong): Constify a uch*.
16310
0070eeda
KG
163111999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16312
f6bbde28
ZW
16313 * lang.c (java_dummy_print): Constify a char*.
16314 (lang_print_error): Likewise.
16315 (lang_init): Remove redundant prototype for `print_error_function'.
16316 (lang_init_source): Likewise.
16317 (lang_identify): Constify a char*.
16318
63ac1f08
TT
163191999-08-09 Tom Tromey <tromey@cygnus.com>
16320
16321 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
16322 (WORDS_TO_LONG): Likewise.
16323 (WORDS_TO_DOUBLE): Likewise.
16324
49f48c71
KG
163251999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16326
16327 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
16328
16329 * expr.c (java_stack_pop, java_array_data_offset,
16330 build_java_throw_out_of_bounds_exception, case_identity,
16331 build_java_check_indexed_type): Add static prototypes.
16332 (linenumber_table, expand_invoke, expand_java_field_op,
16333 build_primtype_type_ref, expand_byte_code): Constify a char*.
16334
16335 * java-tree.h (build_primtype_type_ref, linenumber_table):
16336 Constify a char*.
16337 (java_lang_expand_expr): Add prototype.
16338
16339 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
16340 `java_lang_expand_expr'.
16341
16342 * lex.c (java_lex_error): Constify a char*.
16343 (java_get_unicode, java_read_char, java_allocate_new_line,
16344 java_unget_unicode, java_sneak_unicode): Prototype.
16345
16346 * parse-scan.y (current_class, package_name, method_declarator,
16347 report_class_declaration, yyerror): Constify a char*.
16348
16349 * parse.h (java_report_errors): Prototype.
16350 (yyerror): Constify a char*.
16351
16352 * parse.y (classitf_redefinition_error, check_modifiers,
16353 parse_jdk1_1_error, lookup_package_type,
16354 lookup_package_type_and_set_next, get_printable_method_name,
16355 purify_type_name): Constify a char*.
16356 (build_super_invocation, maybe_generate_finit,
16357 verify_constructor_super, parser_add_interface,
16358 add_superinterfaces, jdep_resolve_class, note_possible_classname,
16359 java_complete_expand_methods, java_expand_finals,
16360 cut_identifier_in_qualified, java_stabilize_reference,
16361 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
16362 merge_string_cste): Prototype.
16363 (single_type_import_declaration, yyerror,
16364 variable_redefinition_error, build_array_from_name,
16365 build_unresolved_array_type, check_class_interface_creation,
16366 resolve_class, complete_class_report_errors,
16367 note_possible_classname, read_import_dir,
16368 find_in_imports_on_demand, resolve_package, fix_constructors,
16369 check_deprecation, lookup_method_invoke,
16370 maybe_build_primttype_type_ref, array_constructor_check_entry):
16371 Constify a char*.
16372 (java_complete_expand_methods, java_expand_finals): Make static.
16373 (convert_narrow): Remove static prototype.
16374
62c9aa5f 163751999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
02edc62b
R
16376
16377 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
16378
0ae70c6a
RH
163791999-08-02 Richard Henderson <rth@cygnus.com>
16380
16381 * decl.c: Include defaults.h instead of expr.h.
16382 * parse.y: Likewise.
16383
e438e1b7
JJ
163841999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
16385
16386 * java/decl.c (start_java_method): Change all uses of
16387 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
16388 Ensure expr.h is included.
16389 * java/expr.c (pop_arguments): Ditto.
16390 * java/parse.y (expand_start_java_method): Ditto.
16391
9490b7d6
KG
163921999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16393
16394 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
16395
b384405b
BS
163961999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
16397
16398 * decl.c: Include "function.h".
16399 * except.c: Likewise.
16400 * parse.y: Likewise.
16401 * Makefile.in: Update dependencies.
16402
cd531a2e
KG
164031999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16404
16405 * expr.c (build_java_soft_divmod): Provide a default case in switch.
16406 (java_lang_expand_expr): Mark parameters `target', `tmode' and
16407 `modifier' with ATTRIBUTE_UNUSED.
16408
16409 * gjavah.c (process_file): Add braces around ambiguous `else'.
16410
16411 * jcf-dump.c (print_access_flags, localvar_free): Change return
16412 type to void.
16413
16414 * parse.y (java_complete_expand_method): Initialize variable
16415 `exception_copy'.
16416 (resolve_qualified_expression_name): Likewise for `field_decl'.
16417 (patch_method_invocation): Likewise for `class_to_search'.
16418 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
16419 (patch_assignment): Likewise for `lhs_type'.
16420
16421 * verify.c (verify_jvm_instructions): Remove unused variable
16422 `caller'.
16423
8824cf7e
RH
164241999-07-25 Richard Henderson <rth@cygnus.com>
16425
16426 * decl.c (va_list_type_node): New.
16427
6c9c5c1f
AG
164281999-07-25 Anthony Green <green@cygnus.com>
16429
16430 * gjavah.c (print_stub): New function.
16431 (METHOD_IS_NATIVE): New macro.
16432 (print_mangled_classname): Make static.
16433 (HANDLE_END_FIELD): Don't emit fields during stub generation.
16434 (process_file): Perform stub generation.
16435 (HANDLE_METHOD): Don't emit class decls during stub
16436 generation.
16437 (HANDLE_END_METHOD): Take into account stub generation.
16438 (print_method_info): Handle stub generation.
16439 (print_stub): New function.
16440 (print_cxx_classname): Make signature consistant with others.
16441 (help): Describe -stubs option.
16442 (main): Create stub file.
16443 (version): Use version.c.
16444 (print_full_cxx_name): New function.
16445 (print_c_decl): Use print_full_cxx_name.
16446
62c9aa5f 164471999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
ac1d97ce
APB
16448
16449 * check-init.c (check_init): Handle MAX_EXPR.
16450
aa4759c1
AH
164511999-07-15 Andrew Haley <aph@cygnus.com>
16452
f6bbde28
ZW
16453 * lang.c (flag_use_divide_subroutine): New variable.
16454 * typeck.c: (convert_ieee_real_to_integer): Bounds check
16455 fp-to-integer conversion.
16456 (convert): Call convert_ieee_real_to_integer when flag_fast_math
16457 is not set.
16458
16459 * expr.c (build_java_soft_divmod): New function.
16460 (build_java_binop): Call build_java_soft_divmod if
16461 flag_use_divide_subroutine is set.
16462 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16463 soft_lrem_node: new builtin functions.
16464 (init_decl_processing) Initialize the new builtins.
16465 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16466 soft_lrem_node: new builtin functions.
16467 (build_java_soft_divmod): New function.
16468 * parse.y: Call build_java_soft_divmod if
16469 flag_use_divide_subroutine is set.
16470 * parse.c: Rebuilt.
16471
16472 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16473 a --specs= arg) even if not linking.
16474 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16475 -fuse-divide-subroutine
0b094f65 16476
62c9aa5f 164771999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
7705e9db
APB
16478
16479 * parse.y (resolve_and_layout): Check methods only once.
16480 (resolve_qualified_expression_name): Verify thrown exceptions
e64c46ce 16481 compatibility.
7705e9db 16482 (check_thrown_exceptions): Reject exceptions thrown in
e64c46ce 16483 initializer. Error message tuned.
f6bbde28 16484
e533f648
AH
164851999-07-14 Andrew Haley <aph@cygnus.com>
16486
f6bbde28
ZW
16487 * expr.c (expand_expr): Do not return the last statement in a
16488 block as the block's value.
e533f648 16489
62c9aa5f 164901999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
1a6d4fb7
APB
16491
16492 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
e64c46ce 16493 CALL_EXPR, to avoid order of evaluation changes.
1a6d4fb7 16494
62c9aa5f 164951999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
1a6d4fb7
APB
16496
16497 * parse.y (qualify_ambiguous_name): Do not use
e64c46ce 16498 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
1a6d4fb7 16499
62c9aa5f 165001999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
1a6d4fb7
APB
16501
16502 * check-init.c (check_init): Handle MAX_EXPR.
16503 * expr.c (force_evaluation_order): Force method call arguments to
e64c46ce 16504 be evaluated in left-to-right order.
1a6d4fb7 16505 * parse.y (qualify_ambiguous_name): Loop again to qualify
e64c46ce 16506 NEW_ARRAY_EXPR properly.
1a6d4fb7 16507
62c9aa5f 165081999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
1a6d4fb7
APB
16509
16510 * parse.y (patch_invoke): Resolve unresolved invoked method
e64c46ce 16511 returned type.
1a6d4fb7 16512 (qualify_ambiguous_name): STRING_CST to qualify expression for
e64c46ce 16513 type name resolution.
1a6d4fb7 16514
ac8f5d48
AH
165151999-06-24 Andrew Haley <aph@cygnus.com>
16516
16517 * class.c (finish_class): Whenever a deferred method is
16518 output, rescan the list of methods to see if a new candidate for
16519 output can be found.
16520
4198d734
TT
165211999-06-28 Tom Tromey <tromey@cygnus.com>
16522
16523 * jvspec.c (lang_specific_driver): Recognize --help.
16524
62c9aa5f 165251999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
2c56429a
APB
16526
16527 * parse.y (resolve_package): Fixed bogus return statement.
16528 (patch_method_invocation): Resolve method invocation beginning with
e64c46ce 16529 a package name qualifier.
2c56429a 16530
58ec4285
KG
165311999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16532
16533 * Make-lang.in (java.stage1): Depend on stage1-start.
16534 (java.stage2): Likewise for stage2-start.
16535 (java.stage3): Likewise for stage3-start.
16536 (java.stage4): Likewise for stage4-start.
16537
62c9aa5f 165381999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
2c56429a
APB
16539
16540 * parse.y (java_complete_lhs): When doing cross referencing, don't
e64c46ce 16541 try to keep file location on a WFL expanded as a CALL_EXPR.
2c56429a 16542
62c9aa5f 165431999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2c56429a
APB
16544
16545 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
e64c46ce
AJ
16546 compiling to class file a void method with an empty method body.
16547 As a side effect, the bytecode backend will generate the
16548 appropriate `return' instruction.
f6bbde28 16549
62c9aa5f 165501999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
2c56429a
APB
16551
16552 * parse.y (lookup_package_type_and_set_next): New function prototype.
16553 (resolve_package): Search current and imported packages.
16554 (lookup_package_type_and_set_next): New function.
16555
45b0aa31
AH
165561999-06-22 Andrew Haley <aph@cygnus.com>
16557
16558 * verify.c (verify_jvm_instructions): Check for pending blocks
16559 before invalid PC test and opcode switch, not after.
16560
44d7502b
AH
165611999-06-21 Andrew Haley <aph@cygnus.com>
16562
f6bbde28
ZW
16563 * except.c (find_handler_in_range): The upper limit for exception
16564 ranges is exclusive, not inclusive: (start <= pc < end).
16565 (link_handler): find child pointer which points to outer by
16566 searching sibling list: previous code incorrectly assumed that
16567 outer->outer->first_child must point to outer.
16568 * verify.c (verify_jvm_instructions): FIXME added to code for
16569 `athrow'.
16570 (verify_jvm_instructions): Do not assume that the last block
16571 processed in a subroutine is a block which ends with a `ret'
16572 instruction. With some control flows it is possible that the last
16573 block ends with an `athrow'.
44d7502b 16574
62c9aa5f 165751999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
8576f094
APB
16576
16577 * parse.y (qualify_ambiguous_name): Reorganized the post
e64c46ce 16578 evaluation of non WFL leading expression nodes.
8576f094 16579
62c9aa5f 165801999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
8576f094
APB
16581
16582 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
e64c46ce 16583 CONVERT_EXPR.
8576f094 16584
62c9aa5f 165851999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8576f094
APB
16586
16587 * parse.y (qualify_ambiguous_name): Handle qualified expression
e64c46ce 16588 beginning with a STRING_CST.
8576f094 16589
62c9aa5f 165901999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8576f094
APB
16591
16592 * parse.y (register_fields): Set DECL_INITIAL on both
e64c46ce 16593 pre-initialized static and public fields.
8576f094 16594 (resolve_field_access): Static field access expressions to always
e64c46ce 16595 use pointer types.
8576f094 16596 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
e64c46ce 16597 qualification. CONVERT_EXPR to be resolved as an expression name.
8576f094 16598 (java_complete_lhs): Identify and access qualified final
e64c46ce 16599 initialized field in switch statement case expression.
8576f094 16600 (fold_constant_for_init): Pre-initialized field decl constant to
e64c46ce 16601 be folded.
8576f094 16602
62c9aa5f 166031999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
fe0e4d76
APB
16604
16605 * parse.y (note_possible_classname): Mark returned node with
e64c46ce 16606 QUALIFIED_P only if the original class name contained a '/'.
fe0e4d76 16607
62c9aa5f 166081999-06-05 Anthony Green <green@cygnus.com>
db1421c7
AG
16609
16610 * Make-lang.in (gcjh): More parallel build fixes.
16611
166121999-06-03 Mike Stump <mrs@wrs.com>
16613
16614 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16615
62c9aa5f 166161999-06-02 Anthony Green <green@cygnus.com>
99fd3aa5
AG
16617
16618 * except.c (link_handler): Chain exception handlers in order.
16619
62c9aa5f 166201999-06-02 Anthony Green <green@cygnus.com>
99fd3aa5
AG
16621
16622 * expr.c (expand_byte_code): Fill unreachable bytecode regions
e64c46ce
AJ
16623 with nops and process as usual in order to always set correct EH
16624 ranges. Emit detailed warnings about unreachable bytecodes.
99fd3aa5 16625
62c9aa5f 166261999-06-02 Anthony Green <green@cygnus.com>
99fd3aa5
AG
16627
16628 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
e64c46ce 16629 constant.
99fd3aa5 16630
62c9aa5f 166311999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
93024893 16632
f6bbde28
ZW
16633 * parse.y (lookup_field_wrapper): Unified returned value to NULL
16634 or the searched field decl.
16635
62c9aa5f 166361999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
93024893
APB
16637
16638 * parse.y (fold_constant_for_init): Convert numerical constant
e64c46ce 16639 values to the type of the assigned field.
93024893 16640
62c9aa5f 166411999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
93024893
APB
16642
16643 * expr.c (lookup_field): Relaxed the test on class loading error
e64c46ce 16644 detection.
93024893
APB
16645 * parse.y (fold_constant_for_init): Enabeled old code.
16646
62c9aa5f 166471999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
93024893
APB
16648
16649 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
e64c46ce
AJ
16650 decide the validity of the cast of a java.lang.Cloneable reference
16651 to an array.
93024893 16652 (patch_conditional_expr): Fixed first argument passed to
e64c46ce 16653 binary_numeric_promotion.
93024893 16654
62c9aa5f 166551999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
2ba1f15f
APB
16656
16657 * parse.y (qualify_ambiguous_name): Take into account that a
e64c46ce 16658 CONVERT_EXPR might specify a type as a WFL.
2ba1f15f 16659
62c9aa5f 166601999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
f6bbde28
ZW
16661
16662 * parse.y (patch_assignment): Save the rhs before using it as an
16663 argument to _Jv_CheckArrayStore.
16664
62c9aa5f 166651999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
dc4e6ccf
APB
16666
16667 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16668
62c9aa5f 166691999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
dc4e6ccf 16670
f6bbde28 16671 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
67264b4f 16672 floating point literal only when the exponent indicator has been
f6bbde28 16673 parsed.
dc4e6ccf 16674
62c9aa5f 166751999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
5256aa37
APB
16676
16677 * parse.y (formal_parameter:): Construct argument tree list
e64c46ce 16678 element even if a yet unsupported final parameter was encountered.
5256aa37 16679
62c9aa5f 166801999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
5256aa37
APB
16681
16682 * parse.y (finish_method_declaration): Issue errors for native or
e64c46ce
AJ
16683 abstract methods declared with a method body, as well as for non
16684 native or non abstract methods with no method body.
5256aa37 16685
ab3a6dd6
KG
166861999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16687
16688 * class.c (build_utf8_ref): Initialize variable `field'.
16689
16690 * decl.c (init_decl_processing): Initialize variable `field'.
16691
16692 * expr.c (build_known_method_ref): Mark parameters `method_type',
16693 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16694 (process_jvm_instruction): Likewise for parameter `length'.
16695
16696 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16697 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16698 ATTRIBUTE_UNUSED.
16699
16700 * parse.y (maybe_generate_clinit): Remove unused variable
16701 `has_non_primitive_fields'.
16702 (find_in_imports_on_demand): Initialize variables `node_to_use'
16703 and `cl'.
16704 (patch_binop): Likewise for variable `prom_type'.
16705 (patch_unaryop): Likewise for variable `prom_type'.
16706
16707 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16708
16709 * xref.c (xref_table): Add missing initializer.
16710
5a9e5c6f
TT
167111999-05-14 Tom Tromey <tromey@cygnus.com>
16712
16713 * java-except.h (struct eh_range): Removed unused `next' member.
16714 * verify.c (verify_jvm_instructions): Call check_nested_ranges
16715 after adding all exception handlers. Sort exception ranges in
16716 order of start PC.
16717 (struct pc_index): New structure.
16718 (start_pc_cmp): New function.
16719 * except.c (add_handler): Return `void'. Don't call link_handler;
16720 instead construct an ordinary linked list and do range
16721 coalescing.
16722 (check_nested_ranges): New function.
16723 (link_handler): Changed interface to allow merging of eh_ranges.
16724 Split overlapping ranges. Return `void'.
16725
62c9aa5f 167261999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
2e5eb5c5
APB
16727
16728 * parse.y (constructor_block_end:): New rule, tagged <node>.
16729 (constructor_body:): Use `constructor_block_end' instead of
e64c46ce 16730 `block_end'.
2e5eb5c5 16731
62c9aa5f 167321999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9dd939b2
APB
16733
16734 * parse.y (statement_nsi:): Pop `for' statement block.
2e5eb5c5 16735 (java_complete_lhs): Labeled blocks containing no statement are
e64c46ce 16736 marked as completing normally.
9dd939b2 16737
62c9aa5f 167381999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
af8b342a
APB
16739
16740 * xref.c (xref_set_current_fp): New function, defined.
16741 * xref.h (xref_set_current_fp): New function, prototyped.
16742
62c9aa5f 167431999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
af8b342a
APB
16744
16745 * check-init.c (check_init): Take into account that
e64c46ce 16746 LABELED_BLOCK_STMT can be empty.
af8b342a 16747
62c9aa5f 167481999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
1fb89a4d
APB
16749
16750 * parse.y (java_check_regular_methods): Warning check on not
e64c46ce
AJ
16751 overriding methods with default access in other packages does not
16752 apply to `<clinit>'.
1fb89a4d 16753 (java_complete_lhs): If block body is an empty_stmt_node, replace
e64c46ce
AJ
16754 it by NULL_TREE. This prevents gcc from generating an irrelevant
16755 warning.
1fb89a4d 16756
62c9aa5f 167571999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
ce6e9147
APB
16758
16759 * check-init.c (check_init): Removed code accepting to see things
16760 falling through default:, when doing xrefs.
16761 * java-tree.h (do_not_fold): New global variable, declared.
16762 * parse.y (do_not_fold): New global variable, defined.
16763 (java_complete_expand_method): Set `do_not_fold' to the value of
e64c46ce
AJ
16764 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16765 and reinstall them after them have been purged; do not check for
16766 initializations; do not issue missing return errors.
ce6e9147 16767 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
e64c46ce 16768 when doing xrefs.
ce6e9147
APB
16769 (patch_binop): Skip the fold part when doing xrefs.
16770 (build_string_concatenation): Skip the concatenation part when
e64c46ce 16771 doing xrefs.
ce6e9147 16772 (patch_synchronized_statement): Do not generate a try-finally when
e64c46ce 16773 doing xrefs.
ce6e9147 16774 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
e64c46ce 16775 and keep the location where the throw was seen.
ce6e9147 16776 * typeck.c (convert): When `do_not_fold' is set, do not attempt
e64c46ce
AJ
16777 any treatment on the converted node an simply return a NOP_EXPR of
16778 the targeted type.
ce6e9147
APB
16779 * xref.c (xref_get_data): New function, defined.
16780 * xref.h (xref_get_data): New function, declared.
16781 (XREF_GET_DATA): Use xref_get_data.
f6bbde28 16782
ab3a6dd6 167831999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1b01250d 16784
f6bbde28
ZW
16785 * gjavah.c (print_include): Cast the result of `strlen' to int
16786 when comparing against a signed value.
16787 (add_namelet): Likewise.
1b01250d 16788
ab3a6dd6 167891999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
34ba56fa 16790
b4b63e32
KG
16791 * expr.c (expand_invoke): Mark parameter `nargs' with
16792 ATTRIBUTE_UNUSED.
16793 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16794
16795 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16796 ATTRIBUTE_UNUSED.
16797
16798 * jcf-reader.c (get_attribute): Cast a value to long
16799 when comparing against a signed expression. Likewise.
16800
34ba56fa
KG
16801 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16802 HOST_BITS_PER_CHAR.
16803
138657ec
AH
168041999-05-11 Andrew Haley <aph@cygnus.com>
16805
f6bbde28
ZW
16806 * parse.y (source_end_java_method): If the current method contains
16807 any exception handlers, force asynchronous_exceptions: this is
16808 necessary because signal handlers in libjava may throw exceptions.
16809 * decl.c (end_java_method): Ditto.
138657ec 16810
6a09296d
TT
168111999-05-11 Tom Tromey <tromey@cygnus.com>
16812
16813 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16814 flags.
16815 * jvspec.c (THREAD_NAME): Removed.
16816 (GC_NAME): Likewise.
16817 (MATHLIB): Likewise.
16818 (WITHLIBC): Likewise.
16819 (GCLIB): Likewise.
16820 (THREADLIB): Likewise.
16821 (MATH_LIBRARY): Likewise.
16822 (lang_specific_driver): Don't add `-l' options to command line.
16823 Instead, add a single --specs option. Recognize `-L' options and
16824 use them to search for spec file.
16825 (find_spec_file): New function.
16826 (SPEC_FILE): New define.
16827
62c9aa5f 168281999-05-11 Dave Brolley <brolley@cygnus.com>
b8b8bc03
DB
16829
16830 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16831 cpplib-enabled build.
16832
c14cff58
PB
168331999-05-05 Per Bothner <bothner@cygnus.com>
16834
16835 * class.c (make_field_value): DECL_INITIAL may be a string literal;
16836 temporarily zero it while calling rest_of_decl_compilation.
16837
16838 * java-tree.h (string_ptr_type_node): Add declaration.
16839 * decl.c: Define and initialize string_ptr_type_node.
16840 * parse.y (patch_string_cst): Use string_ptr_type_node.
16841
16842 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
16843 * parse.y (for_statement): Now unconditionally exit_block.
16844 (finish_labeled_statement): No longer exit_block if for-loop.
16845 (patch_loop_statement): Check harder if the loop is already labeled.
16846
16847 * parse.y (patch_initialized_static_field): Removed function.
16848 (maybe_generate_clinit): Removed special handling for interfaces.
16849 (java_complete_expand_methods): Do a preliminary java_complete_tree
16850 on <clinit> to determine if it can be removed.
16851 (java_complete_expand_method): Remove special handling for <clinit>.
16852 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
16853 optimize if we get back empty_stmt_node.
16854 For MODIFY_EXPR, re-do checking of static initializers.
16855 (fold_constant_for_init): Don't return immediate if VAR_DECL.
16856 For VAR_DECL, pass correct context.
16857
16858 * verify.c (verify_jvm_instructions): Better error messages.
16859
a7f0ef91
TT
168601999-05-03 Tom Tromey <tromey@cygnus.com>
16861
16862 * parse-scan.y (interface_declaration): Call
16863 report_class_declaration for interfaces.
16864
b4c92efc
ZW
168651999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
16866
16867 * Makefile.in: Remove -v from bison command lines.
16868
62c9aa5f 168691999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
7f10c2e2
APB
16870
16871 * check-init.c (check_init): Exclude a case of error when doing
e64c46ce 16872 xrefs.
7f10c2e2 16873 * class.c (layout_class_method): Don't generate the error message
e64c46ce 16874 twice when compiling from source.
7f10c2e2
APB
16875 * lang-options.h: Added `-Wredundant-modifers' and
16876 `-Wunusupported-jdk11' flags and help text.
16877 * lang.c (lang_decode_option): Added support for
e64c46ce 16878 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
7f10c2e2
APB
16879 flag_static_local_jdk11 and flag_redundant set accordingly.
16880 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
16881 * parse.h (EXPR_WFL_ADD_COL): New macro.
16882 (DECL_END_SOURCE_LINE): Likewise.
16883 (DECL_INHERITED_SOURCE_LINE): Likewise.
16884 * parse.y (static_ref_err): New function, prototyped.
16885 (CCB_TK): Now tagged <operator>.
16886 (class_body:): Remember the location of the closing '}' of a class
e64c46ce 16887 definition when doing xrefs.
7f10c2e2
APB
16888 (block:): Likewise.
16889 (block_end:): Likewise.
16890 (create_class): Remember the location of the inherited class
e64c46ce 16891 identifier when doing xrefs.
7f10c2e2 16892 (register_fields): Added test on first operand of `init' before
e64c46ce 16893 testing it TREE_CODE.
7f10c2e2 16894 (method_header): Store the location of the class identifier in the
e64c46ce 16895 class decl when doing xrefs.
7f10c2e2 16896 (finish_method_declaration): Don't combine first/last method line
e64c46ce 16897 when doing xref.
7f10c2e2 16898 (java_check_regular_methods): Warning check on not overriding
e64c46ce
AJ
16899 methods with default access on other packages move before check on
16900 static methods. Initialization of `aflags' also moved up.
7f10c2e2
APB
16901 (resolve_expression_name): Call static_ref_err to report the error.
16902 (static_ref_err): New function, implemented.
16903 (resolve_field_access): Returned simplified static field access
e64c46ce 16904 when doing xrefs.
7f10c2e2 16905 (resolve_qualified_expression_name): Check for illegal use of
e64c46ce
AJ
16906 static fields in a non static context. Call static_ref_err to
16907 report error in various places.
ce6e9147 16908 (java_complete_tree): Do not fold initialized static fields when
e64c46ce 16909 doing xrefs.
7f10c2e2
APB
16910 (java_complete_lhs): Likewise.
16911
d2e0d40a
AG
169121999-04-29 Anthony Green <green@cygnus.com>
16913
16914 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
16915 create internal labels.
16916 (lookup_label): Ditto.
16917
62c9aa5f 169181999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
7f1d4866
APB
16919
16920 * class.c (layout_class_method): Generate <clinit>'s rtl for
e64c46ce 16921 interfaces.
7f1d4866 16922 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
e64c46ce 16923 for interfaces' <clinit>.
7f1d4866
APB
16924 * expr.c (lookup_field): Search for fields in interfaces.
16925 (expand_invoke): Fixed indentation.
16926 (expand_java_field_op): Likewise. Use IS_CLINIT.
16927 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
16928 (IS_CLINIT): New macro.
16929 * parse.y (type_declaration:): Call maybe_generate_clinit after an
e64c46ce 16930 interface was parsed.
7f1d4866 16931 (maybe_generate_clinit): Don't generate if the current class is an
e64c46ce 16932 interface with only fields of primitive types.
7f1d4866
APB
16933 (reset_method_name): Use IS_CLINIT.
16934 (java_complete_expand_method): Expand <clinit> when it exists for
e64c46ce 16935 interfaces. Use IS_CLINIT.
7f1d4866 16936 (resolve_expression_name): Use DECL_CONTEXT instead of
e64c46ce 16937 current_class to build static field references.
7f1d4866 16938 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
e64c46ce 16939 ARRAY_REF when doing xreferencing.
7f1d4866 16940 (check_final_assignment): Fixed typo in leading comment. Use
e64c46ce 16941 IS_CLINIT.
7f1d4866 16942 (patch_array_ref): Don't fully expand array references when
e64c46ce 16943 xreferencing.
7f1d4866
APB
16944 (patch_return): Use IS_CLINIT.
16945 (patch_throw_statement): Likewise.
16946
c9eb638e
TT
169471999-04-22 Tom Tromey <tromey@cygnus.com>
16948
16949 * Make-lang.in (JAVA_SRCS): Added check-init.c.
16950
62c9aa5f 169511999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
5423609c
APB
16952
16953 * decl.c (predef_filenames, predef_filenames_size): New globals
16954 (init_decl_processing): predef_filenames and predef_filenames_size
e64c46ce 16955 initialized.
5423609c 16956 * java-tree.h (predef_filenames, predef_filenames_size): Declared
e64c46ce 16957 extern.
5423609c
APB
16958 * jcf-parse.c (predefined_filename_p): New function.
16959 (yyparse): Check that files on the command line are specified only
e64c46ce 16960 once and issue a warning otherwise.
5423609c
APB
16961 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
16962 * parse.y (source_end_java_method): Nullify NOP method bodies, to
e64c46ce 16963 avoid a gcc warning with -W -Wall turned on.
5423609c
APB
16964 (java_expand_classes): Abort if errors were encountered.
16965 (java_complete_lhs): If the cross reference flag is set, wrap
e64c46ce 16966 field DECL node around a WFL when resolving expression name.
f6bbde28 16967
62c9aa5f 169681999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
e8fc7396
APB
16969
16970 * lang.c (lang_decode_option): Fixed returned value when parsing
e64c46ce 16971 `-fxref=...' and `-Wall'.
e8fc7396 16972 * parse.y (source_end_java_method): Do not generate code when
e64c46ce 16973 flag_emit_xref is set.
e8fc7396 16974 (resolve_expression_name): Do not build static field access when
e64c46ce 16975 flag_emit_xref is set.
5423609c 16976 (resolve_field_access): No special treatment on `length' when
e64c46ce
AJ
16977 flag_emit_xref is set. Do not build qualified static field access
16978 when flag_emit_xref is set.
e8fc7396 16979 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
e64c46ce 16980 when flag_emit_xref is set.
e8fc7396 16981 (patch_assignment): Do not generate array store runtime check when
e64c46ce 16982 flag_emit_xref is set.
e8fc7396 16983 * xref.c (xref_flag_value): Fixed function declaration
e64c46ce 16984 indentation.
e8fc7396
APB
16985 (xset_set_data): New function.
16986 * xref.h (xref_set_data): Added prototype for new function.
16987 (typedef struct xref_flag_table): New field data.
16988 (XREF_GET_DATA): New macro.
16989
a3f406ce
TT
169901999-04-19 Tom Tromey <tromey@cygnus.com>
16991
16992 * xref.h (enum): Removed trailing comma.
16993
16994 * parse.y (resolve_qualified_expression_name): Added missing
16995 `break'.
16996
62c9aa5f 169971999-04-15 Anthony Green <green@cygnus.com>
08967681
AG
16998
16999 * gjavah.c: New prototypes for java_float_finite and
17000 java_double_finite.
17001
62c9aa5f 170021999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
b3edebcf 17003
e8fc7396 17004 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
e64c46ce 17005 references.
b3edebcf 17006
62c9aa5f 170071999-04-06 Jeffrey A Law (law@cygnus.com)
0bb07950
JL
17008
17009 * Makefile.in (TREE_H): Add tree-check.h.
17010 (RTL_H): Add genrtl.h.
17011
62c9aa5f 170121999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
2622b947 17013
f6bbde28
ZW
17014 * parse.y (patch_assignment): Added ArrayStoreException runtime
17015 check.
2622b947 17016
b399dcd2
PB
170171999-04-06 Per Bothner <bothner@cygnus.com>
17018
ab45646c
PB
17019 * expr.c (pop_type_0): New function.
17020 (pop_type): Use pop_type_0.
17021 * java-tree.h (pop_type_0): New declaration.
17022 * verify.c (verify_jvm_instructions): Check return instructions.
17023
b399dcd2
PB
17024 * parse.y (patch_binop): Don't fold if non-constant and emiting
17025 class files.
17026
62c9aa5f 170271999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4f65832d
KG
17028
17029 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
17030
17031 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
17032 (main_jcf): Don't define.
17033 (process_file): Don't set `main_jcf'.
f6bbde28 17034
4f65832d
KG
17035 * java-tree.h (main_jcf): Don't declare.
17036
17037 * jcf-parse.c (main_jcf): Add static definition.
17038
17039 * lang.c (main_jcf): Don't define.
17040
62c9aa5f 170411999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4504ead1 17042
f6bbde28 17043 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
4504ead1 17044
f6bbde28 17045 * decl.c (copy_lang_decl): Likewise for `bcopy'.
4504ead1 17046
f6bbde28 17047 * jcf-depend.c: Include "config.h", not <config.h>.
4504ead1 17048
f6bbde28 17049 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
4504ead1
KG
17050 `bcopy' to PTR.
17051
f6bbde28 17052 * jcf-path.c: Include "config.h", not <config.h>.
4504ead1 17053
f6bbde28 17054 * lex.c: Don't include various system header files.
4504ead1
KG
17055 (java_init_lex): Cast the argument of `bzero' to PTR
17056
f6bbde28 17057 * parse-scan.y (java_push_parser_context): Likewise.
4504ead1 17058
f6bbde28 17059 * parse.y (java_push_parser_context): Likewise.
4504ead1
KG
17060 (patch_bc_statement): Match format specifier to variable argument.
17061
f6bbde28 17062 * xref.c: Don't include <stdio.h>.
4504ead1 17063
62c9aa5f 170641999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
d4370213
APB
17065
17066 * parse.y (struct parser_ctxt *ctxp): Now global.
17067 (declare_local_variables): Use WFL compound value for the
e64c46ce 17068 declaration source line value, when doing cross-referencing.
d4370213 17069
5877286e
TT
170701999-03-31 Tom Tromey <tromey@cygnus.com>
17071
17072 * gjavah.c (print_field_info): Allow constants of other types.
17073 (print_include): Generate include when new name is proper prefix
17074 of already printed name.
17075 (add_namelet): Likewise.
17076 (cxx_keyword_subst): New function.
17077 (print_method_info): Use it.
17078 (print_field_name): New function.
17079 (get_field_name): New function.
17080 (print_field_info): Use get_field_name and print_field_name.
17081
62c9aa5f 170821999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6a28cabc 17083
f6bbde28
ZW
17084 * Makefile.in (keyword.h): Generate using gperf language 'C', not
17085 'KR-C', so gperf uses the `const' keyword on strings.
6a28cabc 17086
f6bbde28 17087 * keyword.gperf (java_keyword): Const-ify a char*.
6a28cabc 17088
62c9aa5f 170891999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
1504b2b4
APB
17090
17091 * parse.y (patch_bc_statement): Fixed identation and a bogus
e64c46ce 17092 `printf' format.
1504b2b4 17093
62c9aa5f 170941999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
1504b2b4
APB
17095
17096 * parse.y (patch_assignment): Allow static variables in other
e64c46ce 17097 classes to be assigned.
1504b2b4 17098
62c9aa5f 170991999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
152f94fc
KG
17100
17101 * class.c (maybe_add_interface): Remove unused variable
17102 `interface_binfo'.
17103 (make_class_data): Use = for assignment, not ==. Likewise.
17104 (emit_register_classes): Remove unused variable `decl'.
17105
17106 * lex.c: Fix comment so as not to contain an embedded `/*'.
17107
17108 * verify.c (verify_jvm_instructions): Remove unused variable
f6bbde28 17109 `self_type'.
152f94fc 17110
62c9aa5f 171111999-03-27 Per Bothner <bothner@cygnus.com>
f1b0c0d8
PB
17112
17113 * parse.y (complete_loop_body): Rename to finish_loop_body.
e64c46ce 17114 (complete_labeled_statement): Rename to finish_labeled_statement.
f1b0c0d8
PB
17115 (complete_for_loop): Rename to finish_for_loop.
17116 (complete_method_declaration): Rename to finish_method_declaration.
17117
17118 * java-tree.h (continue_identifier_node): New global node.
17119 * decl.c: Define and initialize continue_identifier_node.
17120 * parse.y (generate_labeled_block): Remove - no longer needed.
17121 (build_loop_body): Use continue_identifier_node for continue block.
17122 (finish_labeled_statement): Also do pop_labeled_block actions.
17123 (java_complete_lhs): POP_LOOP even if error.
17124 (build_labeled_block): Special handling for continue_identifier_node.
17125 (patch_loop_statement): Re-organize.
17126 (patch_bc_statement): Re-write.
17127
62c9aa5f 171281999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
f099f336
APB
17129
17130 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
e64c46ce 17131 using a WFL compound value.
f099f336
APB
17132 * parse.y (xref.h): Include.
17133 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
e64c46ce 17134 WFL compound value.
f099f336 17135 (register_fields): Set WFL compound value to lineno if doing
e64c46ce 17136 xrefs.
f099f336 17137 (java_complete_expand_method): Call expand_xref if flag_emit_xref
e64c46ce 17138 is set.
f099f336
APB
17139 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
17140 * xref.h (expand_xref): Prototype renamed from xref_generate.
17141
62c9aa5f 171421999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
f099f336
APB
17143
17144 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
17145 (GET_CURRENT_BLOCK): New macro.
17146 * parse.y (current_static_block): New global variable.
17147 (method_body:): Define action.
17148 (complete_method_declaration): Set current_function_decl to NULL
e64c46ce 17149 when work on the current method is done.
f099f336
APB
17150 (declare_local_variables): Use GET_CURRENT_BLOCK.
17151 (java_method_add_stmt): Likewise.
17152 (java_complete_expand_method): Disable the use of `this' when
e64c46ce 17153 expanding <clinit>.
f099f336 17154 (enter_a_block): If no current method exist, use
e64c46ce 17155 current_static_block to link static initializer blocks.
f099f336 17156 (exit_block): Rewritten to use current_static_block when no current
e64c46ce 17157 method decl exists.
f099f336
APB
17158 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
17159 (patch_return): Forbid the use of `return' in static initializers.
17160 (patch_throw_statement): Fixed indentation. Issue specific error
e64c46ce
AJ
17161 for uncaught thrown checked exception in static initializer
17162 blocks. Removed FIXME.
f099f336 17163
08dc830e
ZW
171641999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
17165
17166 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
17167 Link gcj from gcc.o.
17168
62c9aa5f 171691999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
de0b553f
APB
17170
17171 * parse.y (find_applicable_accessible_methods_list): When dealing
e64c46ce
AJ
17172 with interface: ensure that a given interface or java.lang.Object
17173 are searched only once.
de0b553f 17174
62c9aa5f 171751999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9ee9b555
KG
17176
17177 * gjavah.c (print_c_decl): Remove unused argument `flags'.
17178
17179 * jcf-dump.c (print_access_flags): Add braces around if-else.
17180
17181 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
17182 COMBINE_INPUTS.
17183
17184 * lex.c (build_wfl_node): Add static prototype.
17185
17186 * lex.h (build_wfl_node): Remove static prototype.
17187
17188 * parse.y: Include lex.c early enough to declare everything needed.
17189 Ensure calls to `build_wfl_node' pass the proper arguments.
17190 (create_class): Remove unused variable `super_decl'.
17191 (get_printable_method_name): Initialize variable `name'.
f6bbde28 17192
62c9aa5f 171931999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
8af456c8
APB
17194
17195 * Changelog: Fixed 1999-03-22 typos.
17196 * lang.c (lang_decode_option): Fixed typo in error string in the
e64c46ce 17197 XARG section.
8af456c8 17198
235acd35
APB
171991999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17200
8af456c8 17201 * Makefile.in (JAVA_OBJS): Added entry xref.o.
235acd35
APB
17202 (xref.o): New rule.
17203 * java-tree.h (flag_emit_xref): Declared extern.
8af456c8 17204 * lang.c (xref.h): Included.
235acd35
APB
17205 (flag_emit_xref): New global variable.
17206 (lang_decode_option): Added support for -fxref.
17207 * xref.c: Created.
17208 * xref.h: Likewise.
17209
e541d2b1
MH
172101999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
17211
17212 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
17213 linked with.
17214
62c9aa5f 172151999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4bcde32e
KG
17216
17217 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
17218 $(srcdir)/../system.h and $(JAVA_TREE_H).
17219 (jcf-io.o): Depend on $(JAVA_TREE_H).
17220 (mangle.o): Likewise.
17221
17222 * check-init.c (check_cond_init): Add static prototype.
17223
17224 * class.c (build_java_method_type, hashUtf8String,
17225 make_field_value, get_dispatch_vector, get_dispatch_table,
17226 append_gpp_mangled_type, mangle_static_field): Likewise.
17227 (strLengthUtf8): Hide unused definition.
17228 (hashUtf8String): Const-ify.
17229 (make_field_value): Un-ANSI-fy.
17230
17231 * constants.c: Move inclusion of jcf.h above java-tree.h.
17232 (set_constant_entry, find_class_or_string_constant,
17233 find_name_and_type_constant, get_tag_node,
17234 build_constant_data_ref): Add static prototype.
17235
17236 * decl.c (push_jvm_slot, builtin_function,
17237 lookup_name_current_level): Likewise.
17238 (builtin_function): Const-ify.
17239
17240 * except.c (expand_start_java_handler, expand_end_java_handler):
17241 Add static prototype.
17242
17243 * expr.c (flush_quick_stack, push_value, pop_value,
17244 java_stack_swap, java_stack_dup, build_java_athrow,
17245 build_java_jsr, build_java_ret, expand_java_multianewarray,
17246 expand_java_arraystore, expand_java_arrayload,
17247 expand_java_array_length, build_java_monitor, expand_java_pushc,
17248 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
17249 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
17250 expand_compare, expand_test, expand_cond, expand_java_goto,
17251 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
17252 expand_java_field_op, java_push_constant_from_pool): Likewise.
17253
17254 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
17255 (build_java_arraynull_check): Mark parameters `node' and `type'
17256 with ATTRIBUTE_UNUSED.
17257 (note_label): Likewise for parameter `current_pc'.
17258 (expand_java_call, expand_java_ret): Hide unused definition.
17259
17260 * java-tree.h (make_class, build_constants_constructor,
17261 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
17262 init_outgoing_cpool, register_class, emit_register_classes,
17263 java_layout_seen_class_methods): Prototype.
17264 (unicode_mangling_length): Const-ify.
17265 (append_gpp_mangled_name, append_gpp_mangled_classtype,
17266 emit_unicode_mangled_name, format_int, format_uint,
17267 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
17268 jcf_print_utf8_replace, open_class): Prototype.
17269
17270 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
17271 <stdio.h>. Include tree.h/java-tree.h.
17272 (utf8_equal_string usage, process_class): Add static prototype.
17273 (open_class): Don't prototype this here.
17274 (utf8_equal_string): Match arguments to format specifiers.
17275 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
17276 TABLE_SWITCH, disassemble_method): Likewise.
17277
17278 * jcf-io.c: Include tree.h/java-tree.h.
17279 (open_class, find_classfile, jcf_print_utf8,
17280 jcf_print_utf8_replace): Const-ify.
17281
17282 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
17283 parse_class_file): Add static prototype.
17284 (find_in_current_zip): Match definition to existing static
17285 prototype.
f6bbde28 17286
4bcde32e
KG
17287 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
17288 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
17289 finish_jcf_block, define_jcf_label, get_jcf_label_here,
17290 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
17291 write_chunks, adjust_typed_op, generate_bytecode_conditional,
17292 generate_bytecode_return, perform_relocations, init_jcf_state,
17293 init_jcf_method, release_jcf_state, generate_classfile):
e64c46ce 17294 Add static prototype.
4bcde32e
KG
17295 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
17296 (make_class_file_name): Const-ify.
17297
17298 * jcf.h (find_classfile): Const-ify.
17299
17300 * jv-scan.c (reset_report): Remove prototype.
17301
17302 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
17303 (error): Rewrite to allow varargs.
17304
17305 * lang.c (lang_f_options): Const-ify.
17306
17307 * lex.c (java_parse_escape_sequence): Add static prototype.
e64c46ce
AJ
17308 (java_allocate_new_line): Match definition to existing static
17309 prototype.
f6bbde28 17310
4bcde32e
KG
17311 * mangle.c Include tree.h/java-tree.h.
17312 (unicode_mangling_length, emit_unicode_mangled_name,
17313 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
17314
17315 * parse.h (jdep_code): Remove trailing comma in enumeration.
17316 (java_get_line_col): Move prototype outside of !JC1_LITE test.
17317 (reset_report): Add prototype.
17318
17319 * verify.c (push_pending_label, merge_types): Add static
17320 prototypes.
17321
17322 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
f6bbde28 17323
1982388a
APB
173241999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17325
17326 * parse.y (find_applicable_accessible_methods_list): Extend the
17327 search to superinterfaces when relevant.
17328 (search_applicable_methods_list): New function.
17329
173301999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
17331
17332 * class.c (unmangle_classname): Implemented stricter testing
17333 before setting the QUALIFIED_P flag on an identifier.
17334
62c9aa5f 173351999-03-16 Per Bothner <bothner@cygnus.com>
8fe57f78
PB
17336
17337 * parse.y (java_complete_lhs): Call force_evaluation_order
17338 after patch_newarray.
17339 (patch_binop): Don't call fold if there are side effects.
17340
642f15d1
APB
173411999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
17342
17343 * parse.y (java_stabilize_reference): Use save_expr instead of
17344 building a SAVE_EXPR node.
17345 (java_complete_lhs): Patch the resulting string of the `+='
17346 operator (if necessary) and complete the RHS after having built
17347 the cast.
17348
62c9aa5f 173491999-03-15 Per Bothner <bothner@cygnus.com>
c52016e4
PB
17350
17351 * class.c (make_class): Don't set CLASS_P here (because
17352 this function is also called by build_java_array_type).
17353 (push_class): Set CLASS_P here instead.
17354 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
17355
17356 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
17357 context. If the context is class, perfer "super" over "synchronized".
17358 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
17359
17360 * parse.y (create_class): Don't call parser_check_super here;
17361 it is not robust. Always wait until later.
17362
17363 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
17364 match what JDK 1.2 does), but don't set ACC_PUBLIC.
17365
62c9aa5f 173661999-03-13 Per Bothner <bothner@cygnus.com>
b911df12
PB
17367
17368 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
17369 * lex.h (UNGETC): Change misleading macro.
17370
2aa11e97
APB
173711999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17372
17373 * parse.y (java_stabilize_reference): Return NODE when patching a
17374 COMPOUND_EXPR.
17375 (java_complete_lhs): Put parenthesis around truth values.
17376
173771999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17378
17379 * class.c (layout_class_method): Don't make rtl for interface
17380 methods.
17381 * parse.h (GET_TYPE_NAME): New macro.
17382 * parse.y (if_then_statement:): Fixed indentation.
17383 (if_then_else_statement:): Likewise.
17384 (for_statement:): Fixed spacing.
17385 (try_statement:): Fixed indentation.
17386 (create_interface): Don't force interfaces to be abstract.
17387 (method_header): Abstract methods are OK in interfaces.
17388 (declare_local_variables): Fixed typo in comment.
17389 (java_complete_expand_method): Fixed indentation.
17390 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
17391 non accessible fields.
17392 (java_stabilize_reference): New function.
17393 (java_complete_lhs): Fixed indentation. Use
67264b4f 17394 java_stabilize_reference in compound assignment. Insert the
2aa11e97
APB
17395 cast. If not processing `+' fix string constants before processing
17396 binop.
17397
62c9aa5f 173981999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7e21fe59
KG
17399
17400 * constants.c (find_class_or_string_constant): Cast variable `j'
e64c46ce 17401 to a `jword' when comparing against one.
7e21fe59
KG
17402
17403 * expr.c (java_lang_expand_expr): Remove unused variables
17404 `has_finally_p' and `op0'.
17405
17406 * gjavah.c (print_field_info): Cast a value to jint when comparing
17407 against one. Likewise for a jlong.
17408 (add_namelet): Likewise cast a `sizeof' to an int when comparing
17409 against a signed quantity.
f6bbde28 17410
7e21fe59
KG
17411 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
17412 (print_signature): Don't needlessly dereference variable `str'
17413
17414 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
17415 `max_locals' with ATTRIBUTE_UNUSED.
17416 (jcf_parse_class): Likewise for variable `index'.
17417
17418 * parse.h (reverse_jdep_list): Remove static prototype.
17419
17420 * parse.y (build_jump_to_finally): Remove prototype and definition.
17421 (reverse_jdep_list): Add static prototype.
17422
17423 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
17424 `assignment' and `expr_decl'.
17425
17426 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
17427
ecef190c
AH
174281999-03-12 Andrew Haley <aph@cygnus.com>
17429
17430 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
f6bbde28 17431 we'll need a directory separator and a null character.
ecef190c 17432
62c9aa5f 174331999-03-10 Per Bothner <bothner@cygnus.com>
2aee04d2
PB
17434
17435 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
17436
5f86874e 17437Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
f6bbde28 17438
e64c46ce
AJ
17439 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17440 interfaces.
f6bbde28 17441
62c9aa5f 174421999-03-05 Per Bothner <bothner@cygnus.com>
30ca27b4
PB
17443
17444 * lex.c (java_parse_end_comment): Take extra parameter (next char).
17445
17446 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
17447
17448 * class.c (layout_class_method): A static method in a base class
17449 is never overridden, so treat it like it doesn't exist.
17450 However, do complain about private non-static method overriding
17451 public static method.
17452
17453 * parse.y: Don't set unused INITIALIZED_P flag.
17454 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
17455
17456 * parse.y (find_expr_with_wfl): Optimize tail-calls.
17457 (build_array_from_name): Re-order &index[string] to &string[index].
17458
2aa11e97 17459 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
30ca27b4
PB
17460 error_mark (it might catch more errors, but it is more likely to lose).
17461
62c9aa5f 174621999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8e1f2d4c
KG
17463
17464 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17465 (parse-scan.o): Depend on toplev.h.
17466
17467 * class.c (make_method_value): Add prototype. Make it static.
e64c46ce 17468 Remove unused second argument, caller changed.
8e1f2d4c
KG
17469
17470 * expr.c (java_lang_expand_expr): Remove unused variable
17471 `return_label'.
17472
17473 * java-tree.h: Don't prototype find_in_current_zip.
17474 Add prototypes for verify_constant_pool, start_java_method,
17475 end_java_method, give_name_to_locals, expand_byte_code,
17476 open_in_zip, set_constant_value, find_constant1, find_constant2,
17477 find_utf8_constant, find_string_constant, find_class_constant,
17478 find_fieldref_index, find_methodref_index, write_constant_pool,
17479 count_constant_pool_bytes and encode_newarray_type.
17480
17481 * jcf-dump.c: Remove unused variable `LONG_temp'.
17482
17483 * jcf-parse.c: Include parse.h.
17484 (jcf_parse_source): Remove unused parameter, all callers changed.
17485 (jcf_figure_file_type): Add static prototype.
17486 (find_in_current_zip): Likewise. Also remove unused parameter,
17487 all callers changed.
17488 (read_class): Initialize variable `saved_pos'.
f6bbde28 17489
8e1f2d4c
KG
17490 * jcf-reader.c (jcf_parse_preamble): Mark variables
17491 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17492
17493 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17494 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17495 (java_parse_doc_section): Initialize variable `seen_star'.
17496 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17497 (java_lex_error): Mark parameters `msg' and `forward' with
17498 ATTRIBUTE_UNUSED.
17499 (java_get_line_col): Mark parameters `filename' and `line' with
17500 ATTRIBUTE_UNUSED.
17501
17502 * parse-scan.y: Include toplev.h.
17503 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17504
17505 * parse.h: use `struct JCF', not plain `JCF'.
17506 (java_parser_context_save_global, java_expand_classes
17507 java_parser_context_restore_global, java_parse): Add prototypes.
17508
17509 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17510 `node'.
17511
62c9aa5f 175121999-02-24 Per Bothner <bothner@deneb.cygnus.com>
afe81dd6
PB
17513
17514 * check-init.c (check_init): COPYN takes word count, not bit count.
17515
62c9aa5f 175161999-02-26 Per Bothner <bothner@cygnus.com>
2d9e5c79
PB
17517
17518 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
17519 explicit build_decl. (Avoids crash in reload when optimizing.)
17520
62c9aa5f 175211999-02-25 Per Bothner <bothner@cygnus.com>
2d9e5c79
PB
17522
17523 * decl.c (complete_start_java_method): Handle synchronized method
17524 even when compiling from bytecode.
17525
f3d50f42
TT
175261999-02-26 Tom Tromey <tromey@cygnus.com>
17527
686fb236
TT
17528 * gjavah.c (add_class_decl): Only generate `#include' if outer
17529 class is not the name of the class we are processing. Correctly
17530 append `.h' in #include.
17531 (process_file): Clean up newlines around generated `#include's.
17532 (decode_signature_piece): Correctly handle inner classes.
17533 (struct include): New structure.
17534 (all_includes): New global.
17535 (print_include): New function.
17536 (add_class_decl): Use it.
17537 (process_file): Likewise.
17538 (add_class_decl): Generate include for java-array.h if array
17539 seen.
17540 (process_file): Don't generate java-array.h include.
17541
f3d50f42
TT
17542 * gjavah.c (add_namelet): Check for standard package names here.
17543 (add_class_decl): Don't check for standard package names here.
17544
345137c7
TT
175451999-02-25 Tom Tromey <tromey@cygnus.com>
17546
17547 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17548 When reading a zip file, only use strncmp if both strings are
17549 bigger than the buffer length. Initialize `k' when looping
17550 through zip file.
17551
bdb59aec
TT
175521999-02-24 Tom Tromey <tromey@cygnus.com>
17553
17554 * gjavah.c (struct namelet): New structure.
17555 (add_namelet): New function.
17556 (print_namelet): New function.
17557 (print_class_decls): Use add_namelet and print_namelet to generate
17558 namespaces and not classes.
17559 (method_printed): New global.
17560 (HANDLE_END_METHOD): Examine method_printed.
17561 (print_method_info): Set method_printed when required. Print
17562 error if function to be ignored is marked virtual. Handle $finit$
17563 method.
17564 (METHOD_IS_FINAL): New macro.
17565 (print_field_info): Use it.
17566 (HANDLE_METHOD): Clear method_printed.
17567 (method_pass): New global.
17568 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17569 (process_file): Do two passes over both fields and methods.
17570 (HANDLE_METHOD): Examine method_pass.
17571 (root): New global.
17572 (add_class_decl): New function.
17573 (print_class_decls): Don't scan over entire constant pool.
17574
4e2e5821
TT
175751999-02-23 Tom Tromey <tromey@cygnus.com>
17576
17577 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17578 disable linking in that case.
17579
a3299934
TT
175801999-02-20 Tom Tromey <tromey@cygnus.com>
17581
17582 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17583 not 0x1f.
17584
62c9aa5f 175851999-02-21 Per Bothner <bothner@cygnus.com>
edd643a9 17586
92ada242
PB
17587 * decl.c (build_result_decl), java-tree.h: New method.
17588 (complete_start_java_method): Handle synchronized methods.
17589 Don't build DECL_RESULT here. (Ordering dependency problem.)
17590 (start_java_method): Call build_result_decl here instead ...
17591 * parse.y (java_complete_expand_method): ... and here.
17592 (expand_start_java_method): Don't call complete_start_java_method here.
17593 (java_complete_expand_method): Call it here instead.
17594 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
17595 * java-tree.h: ... here.
17596
17597 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
17598 * parse.y (java_complete_lhs): Don't call force_evaluation_order
17599 for ARRAY_REF - it doesn't work when array bounds are checked.
17600 (patch_array_ref): Handle it here instead.
17601
edd643a9
PB
17602 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
17603
62c9aa5f 176041999-02-19 Per Bothner <bothner@cygnus.com>
419ff8e1
PB
17605
17606 Force left-to-right evaluation of binary operations etc.
17607 * expr.c (force_evaluation_order), java-tree.h: New function.
17608 * parse.y (java_complete_lhs): Pass binary operations, procedure
17609 calls, and ARRAY_REFs to force_evaluation_order.
17610 (various): Set TREE_SIDE_EFFECTS more carefully.
17611
17612 Tolerate random (non-UTF8) encoding in comments without complaining.
17613 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
17614 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
17615
17616 * parse.y (resolve_qualified_expression_name): Handle error_mark.
17617 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
17618
17619 * parse.y (java_complete_lhs): Ignore an empty statement in a
17620 COMPOUND_EXPR. Don't complain about empty statement after return.
f6bbde28 17621
62c9aa5f 176221999-02-19 Per Bothner <bothner@cygnus.com>
04ed7a0c
PB
17623
17624 * parse.y (obtain_incomplete_type): Don't wrap unknown types
17625 in TREE_LIST - just chain the POINTER_TYPEs together.
17626 (resolve_class): If type already resolved, return decl.
17627 After resolving, update TREE_TYPE(class_type), and name (if array).
f6bbde28 17628 * parse.h (do_resolve_class), parse.y: Make non-static.
04ed7a0c
PB
17629 * class.c (maybe_layout_super_class): Take this_class argument.
17630 Do do_resolve_class if necessary.
17631 (layout_class, layout_class_methods): Adjust calls appropriately.
17632 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17633 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
17634 * typeck.c (build_java_array_type): Don't call layout_class.
17635
62c9aa5f 176361999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
fad22e3b
APB
17637
17638 * parse.y (check_pkg_class_access): Allow private class access
e64c46ce 17639 within the same package.
fad22e3b
APB
17640 (strip_out_static_field_access_decl): New function.
17641 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
e64c46ce 17642 operator argument before testing its nature.
fad22e3b 17643
62c9aa5f 176441999-02-03 Per Bothner <bothner@cygnus.com>
ececaeae
PB
17645
17646 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
17647 (TRY_EXPR): Simplify - it no longer has a finally clause.
17648 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
17649 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17650 * expr.c (java_lang_expand_expr): Likewise.
17651 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
17652 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
17653 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
17654 (build_try_statement): Remove finally parameter and handling.
17655 (build_try_finally_statement): New function.
17656 (patch_try_statement): No longer need to support finally clause.
17657 (try_statement): Update grammar action rules.
17658 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
17659 Simpler handling of TRY_EXPR, which no longer has a finally clause.
17660
43c5ec70
AH
176611998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
17662
17663 * jcf-parse.c (get_constant): Add braces around computation of 'd'
17664 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
17665
7e57923c
AH
176661999-02-17 Andrew Haley <aph@cygnus.com>
17667
17668 * class.c (build_utf8_ref): Back out broken patch which was
f6bbde28 17669 intended to to output signatures using '.' as a separator.
7e57923c 17670
f6bbde28
ZW
17671 * class.c (make_class_data): Output signatures using '.' as a
17672 separator, rather than '/'.
17673 (mangled_classname): Likewise.
17674 (make_field_value): Likewise.
17675 (make_method_value): Likewise.
17676 * constants.c (alloc_class_constant): Likewise.
17677 * expr.c (build_invokeinterface): Likewise.
7e57923c 17678
62c9aa5f 176791999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
f6bbde28 17680
e64c46ce
AJ
17681 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17682 of an ancient workaround.
e3884b71 17683
62c9aa5f 176841999-02-10 Jeffrey A Law (law@cygnus.com)
e860aea3
JL
17685
17686 * jvspec.c (xmalloc): Kill the prototype. It does not belong
17687 here anymore.
17688
fa2bb9fd 176891999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
f6bbde28 17690
fa2bb9fd
APB
17691 * lex.c (yylex): Encode \0 as UTF8.
17692
0ffe9eea
TT
176931999-02-10 Tom Tromey <tromey@cygnus.com>
17694
00368bdd
TT
17695 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17696 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17697 (libgcj_zip): Renamed.
17698 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17699 LIBJAVA_ZIP_FILE.
17700 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17701
0ffe9eea
TT
17702 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17703 (GC_NAME): Renamed -lgc to -lgcjgc.
17704
62c9aa5f 177051999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
09ed0f70
APB
17706
17707 * lex.c (java_lang_cloneable): Initialize.
17708 * parse.y (java_lang_cloneable): New static variable.
17709 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
e64c46ce 17710 doing one more qualification round.
09ed0f70 17711 (valid_ref_assignconv_cast_p): Reject null source or
e64c46ce 17712 destination. Allow an array to be cast into java.lang.Cloneable.
09ed0f70 17713 (patch_cast): Swapped two first arguments to first call to
e64c46ce 17714 valid_ref_assignconv_cast_p.
09ed0f70 17715
62c9aa5f 177161999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
34f4db93
APB
17717
17718 * parse.h: DECL_P renamed JDECL_P.
f6bbde28
ZW
17719 * parse.y: DECL_P replaced by JDECL_P.
17720 (build_array_from_name): Always use pointer's type.
17721 (patch_bc_statement): Extra code to search continue target in a
17722 for loop. Fixed comments. Continue target is current loop when
17723 unlabeled.
34f4db93 17724
93089423
AH
177251999-02-05 Andrew Haley <aph@cygnus.com>
17726
17727 * class.c (make_class_data): The superclass of an interface should
17728 be null, not class Object.
17729
17730 * lex.c (java_lex): Sign extend hex literals.
17731
954d8a5d
AH
177321999-02-04 Andrew Haley <aph@cygnus.com>
17733
17734 * class.c (build_utf8_ref): Output signatures using '.' as a
17735 separator, rather than '/'.
17736 (make_class_data): Likewise.
17737
62c9aa5f 177381999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
3204fae4 17739
f6bbde28
ZW
17740 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17741 mkstemp.o. Get them from libiberty now.
3204fae4 17742
62c9aa5f 177431999-02-02 Jeffrey A Law (law@cygnus.com)
6d6dbe51
JL
17744
17745 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17746
62c9aa5f 177471999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
b0f780c3
KG
17748
17749 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
e64c46ce 17750 from libiberty.h
b0f780c3 17751
62c9aa5f 177521999-02-02 Per Bothner <bothner@cygnus.com>
bb31662f
PB
17753
17754 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17755 * jcf-write.c (generate_bytecode_return): New function.
17756 (generate_bytecode_insns): Use it, for RETURN_EXPR.
17757
17758 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
17759 generate special [fd]const_[01] instructions.
f6bbde28 17760
bb31662f
PB
17761 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
17762
17763 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
17764 handling OPCODE_lookupswitch or OPCODE_tableswitch.
17765
62c9aa5f 177661999-02-01 Per Bothner <bothner@cygnus.com>
f044fba9
PB
17767
17768 * parse.y (patch_method_invocation): Handle calling static methods,
17769 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17770
17771 * parse.y (java_complete_lhs): Don't complain about unreachable
17772 exit condition in a do-while statement.
f6bbde28 17773
62c9aa5f 177741999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
acd663ee
APB
17775
17776 * lex.c (java_read_char): Fixed utf8 decoding.
17777 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
e64c46ce 17778 range.
acd663ee 17779 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
e64c46ce
AJ
17780 comments. Local variable `all_primitive' is gone. Broadened
17781 acceptance of `0' to floating point targets. `long' can now be
17782 widened to `double' or `float'.
acd663ee 17783 (valid_method_invocation_conversion_p): Added leading
e64c46ce 17784 comment. Fixed tabulation.
acd663ee 17785 (build_string_concatenation): Optimize out left or right empty
e64c46ce 17786 string constants.
f044fba9 17787
62c9aa5f 177881999-01-28 Per Bothner <bothner@cygnus.com>
36be4b99
PB
17789
17790 * jcf-write.c (localvar_alloc): Only emit entry for
17791 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17792 (generate_bytecode_insns): Only call put_linenumber if
17793 debug_info_level > DINFO_LEVEL_NONE.
17794 * jvspec.c (lang_specific_driver): If no -O* or -g* option
17795 is specified, add -g1 (for compatibility wih javac).
17796
62c9aa5f 177971999-01-28 Hans-Peter Nilsson <hp@axis.se>
9594b1b2
HPN
17798
17799 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17800 gjavah.o, check-init.o, jv-scan.o
17801
62c9aa5f 178021999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9caaf519
KG
17803
17804 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17805
17806 * gjavah.c: Include config.h and system.h.
17807
17808 * javaop.h (inline): Don't define, its handled by system.h.
17809 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17810 from `inline' to `static inline'.
17811
17812 * jcf.h (inline): Don't define, its handled by system.h.
17813
17814 * lex.c (inline): Likewise.
17815
62c9aa5f 178161999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
ba140e41
ZW
17817
17818 * lang-specs.h: Map -Qn to -fno-ident.
17819
62c9aa5f 178201999-01-29 Richard Henderson <rth@cygnus.com>
4c7f1c63
RH
17821
17822 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17823
061ac426
TT
178241999-01-29 Tom Tromey <tromey@cygnus.com>
17825
17826 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17827 then cast it to Object before calling `append' method.
17828
62c9aa5f 178291999-01-28 Per Bothner <bothner@cygnus.com>
f2693f2f
PB
17830
17831 * check-init.c (check_bool2_init, check_bool_init, check_init):
17832 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17833 * jcf-write.c (generate_bytecode_insns): Likewise.
17834
62c9aa5f 178351999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
0b4d333e
APB
17836
17837 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17838 * parse.y (patch_cast): Allow a boolean to be cast into a
e64c46ce 17839 boolean.
0b4d333e 17840
62c9aa5f 178411999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
0b4d333e
APB
17842
17843 * parse.y: (class_declaration:): Fixed indentation.
17844 (class_member_declaration:): Extra `;' after field declaration now
e64c46ce 17845 accepted.
0b4d333e
APB
17846 (interface_declaration:): Removed debug messages in error reports.
17847 (patch_binop): Nodes created and returned inherit the orignal
e64c46ce 17848 node's COMPOUND_ASSIGN_P flag value.
0b4d333e
APB
17849 (patch_cast): Fix cast from char to floating point.
17850
62c9aa5f 178511999-01-25 Andrew Haley <aph@cygnus.com>
1b18747f 17852
f6bbde28
ZW
17853 * except.c, java-except.h (expand_resume_after_catch): new
17854 function.
17855 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
17856 to branch back to main flow of control after a catch block.
1b18747f 17857
62c9aa5f 178581999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
d4476be2
KG
17859
17860 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
17861 $(srcdir)/../system.h.
17862 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
17863 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
17864 (jcf-write.o): Likewise.
17865 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17866 (mangle.o): Depend on $(srcdir)/../toplev.h.
17867 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17868 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17869
17870 * class.c: Include output.h and parse.h.
17871 (mangled_classname): Add the `const' keyword to a char*.
17872 (find_named_method): Hide unused function definition.
17873 (build_utf8_ref): Change type of variable `c' to unsigned char.
17874 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
17875 (build_class_ref): Add the `const' keyword to a char*.
17876 (layout_class_method): Remove unused variable `buf'.
17877
17878 * decl.c (find_local_variable): Remove unused variable `rtl'.
17879 (pushdecl): Likewise for variables `different_binding_level' and
17880 `oldglobal'.
17881 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
17882 (maybe_build_cleanup): Likewise for parameter `decl'.
17883
17884 * except.c (expand_start_java_handler): Mark parameter `range'
17885 with ATTRIBUTE_UNUSED.
17886
17887 * expr.c: Include except.h.
17888 (pop_type): Remove unused variable `i'.
17889 (pop_value): Likewise for variables `n_words' and `i'.
17890 (expand_java_arrayload): Likewise for variable `convert'.
17891 (java_lang_expand_expr): Likewise for variables `op0', `type',
17892 `mode', `unsignedp', `node' and `elements'.
17893 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
17894 `eh_ranges'.
17895 (process_jvm_instruction): Add a `const' qualifier to a char*.
17896
17897 * gjavah.c (output_directory): Add the `const' keyword to a char*.
17898 (temp_directory): Likewise.
17899 (print_c_decl): Likewise.
17900 (print_method_info): Likewise.
17901 (decode_signature_piece): Likewise.
17902 (print_mangled_classname): Likewise.
17903
17904 * java-except.h: Provide prototypes for maybe_start_try,
17905 maybe_end_try and add_handler.
17906
17907 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
17908 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
17909 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
17910 init_expr_processing, push_super_field, init_class_processing,
17911 can_widen_reference_to, class_depth, verify_jvm_instructions,
17912 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
17913 set_local_type, merge_type_state, push_type, load_type_state,
17914 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
17915 emit_unicode_mangled_name): Add prototypes.
17916
17917 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
17918 (print_signature_type): Use ISDIGIT, not isdigit.
17919 (print_signature): Remove unused variable `j'.
17920
17921 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
17922 int when comparing against one.
17923
17924 * jcf-parse.c: Include toplev.h.
17925
17926 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
17927 (localvar_free): Remove unused variable `i'.
17928 (generate_bytecode_conditional): Likewise for variable `kind'.
17929
17930 * jv-scan.c: Include config.h and system.h. Remove redundant
17931 OS header and gansidecl.h includes.
17932 (warning): Add the `const' keyword to a char*. Also add
17933 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
17934 __STDC__, when determining whether to use ANSI-isms.
17935 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
17936 (xmalloc): Don't redundantly prototype here.
17937 (main): Remove unused parameter `envp'. Also fix the arguments
17938 passed to function `fatal' to match the format specifier.
17939
17940 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
17941
17942 * mangle.c: Include toplev.h.
17943 (emit_unicode_mangled_name): Declare parameter `len'.
17944
17945 * parse.y (parse_warning_context): Add the `const' keyword to a
17946 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
17947 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
17948 (issue_warning_error_from_context): Add the `const' keyword to
17949 a char*.
17950 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
17951 not `__STDC__' for whether to use ANSI-isms.
17952
17953 * typeck.c (incomplete_type_error): Mark parameters `value' and
17954 `type' with ATTRIBUTE_UNUSED.
17955 (parse_signature_type): Use ISDIGIT, not isdigit.
17956
17957 * verify.c (check_pending_block): Add the `const' keyword to a char*.
17958 (verify_jvm_instructions): Likewise. Remove unused variables
17959 `field_name' and `default_val'.
f6bbde28 17960
d4476be2
KG
17961 * zextract.c: Include config.h and system.h. Remove redundant
17962 OS header includes.
f6bbde28 17963
d4476be2
KG
17964 * zipfile.h: Prototype `read_zip_archive'.
17965
62c9aa5f 179661999-01-21 Andrew Haley <aph@cygnus.com>
fff02f07
AH
17967
17968 * typeck.c (convert): Allow conversions to void type: some
e64c46ce 17969 optimizations in gcc do this.
fff02f07 17970
62c9aa5f 179711999-01-21 Andrew Haley <aph@cygnus.com>
fff02f07
AH
17972
17973 * typeck.c (convert_ieee_real_to_integer): New function.
17974 (convert): When not using fast-math and using hardware fp, convert
e64c46ce 17975 an IEEE NaN to zero.
f6bbde28 17976
73333a87
AH
179771999-01-18 Andrew Haley <aph@cygnus.com>
17978
17979 * parse.y (patch_binop): Do a type conversion from signed to
17980 unsigned and then back to signed when a ">>>" is found.
17981
62c9aa5f 179821999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
d8fccff5
APB
17983
17984 * java-tree.h: (check_for_initialization): Added prototype.
17985 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
17986 * parse.y (do_resolve_class): Removed unused locals.
17987 (read_import_dir): Likewise.
17988 (resolve_qualified_expression_name): Array creation
e64c46ce 17989 expressions are valid primary expressions.
d8fccff5
APB
17990 (qualify_ambiguous_name): Likewise.
17991 (patch_synchronized_statement): Removed unused local.
17992
62c9aa5f 179931999-01-17 Jeffrey A Law (law@cygnus.com)
82770562 17994
ef2b940d
JL
17995 * Makefile.in (zextract.o): Add dependencies.
17996
f6bbde28 17997 * Makefile.in: Do not put ^Ls at the start of a line.
82770562 17998
62c9aa5f 179991999-01-15 Per Bothner <bothner@cygnus.com>
2a4dc31b
PB
18000
18001 * expr.c (process_jvm_instruction): Coerce to correct Throwable
18002 sub-type the result of the call that gets the exception value.
18003
18004 * parse.y (java_complete_expand_methods): If flags_syntax_only,
18005 don't call finish_class.
18006
18007 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
18008 clear found before continuing.
18009
18010 * verify.c (verify_jvm_instructions): On an array load, allow
18011 and handle top of stack to be TYPE_NULL.
18012
18013 * gjavah.c (generate_access): Translate Java package private or
18014 protected access to C++ public, but with a comment.
18015
96847892
AH
180161999-01-13 Andrew Haley <aph@cygnus.com>
18017
18018 * expr.c (generate_name): Name prefix changed to avoid clashes
18019 with assembler temp labels.
18020
18021 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
67264b4f 18022 MODIFY_EXPR. Without this, code for the assignment may not be
96847892
AH
18023 generated at all and the synchronized statement will read an
18024 uninitialized variable.
f6bbde28 18025
62c9aa5f 180261999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
ba179f9f
APB
18027
18028 * class.c (maybe_layout_super_class): Fixed returned value.
18029 * lex.c: Added 1999 to the copyright.
18030 (java_init_lex): Initialize java_lang_imported.
18031 * lex.h: Added 1999 to the copyright.
18032 * parse.h: Added 1999 to the copyright.
18033 (REGISTER_IMPORT): Fixed typo in trailing macro.
18034 (CURRENT_OSB): New macro.
18035 (struct parser_ctxt): New fields osb_depth, osb_limit.
18036 * parse.y (java_lang_id): New global variable.
18037 (type_import_on_demand_declaration): Don't import java.lang.* twice.
18038 (array_creation_expression:): Use CURRENT_OSB.
18039 (dims:): Uses a stack to keep track of array dimensions.
18040 (cast_expression:): Use CURRENT_OSB.
18041 (find_expr_with_wfl): Return NULL if node found doesn't meet the
e64c46ce 18042 conditions.
ba179f9f
APB
18043 (register_fields): Fixed typos in comment.
18044 (check_method_redefinition): Fixed comment indentation.
18045 (java_check_regular_methods): Set saved found wfl to NULL after
e64c46ce 18046 having reinstalled it in the previously found DECL_NAME.
ba179f9f 18047
62c9aa5f 180481999-01-10 Richard Henderson <rth@cygnus.com>
b6186fe6
RH
18049
18050 * gjavah.c (java_float_finite): Use a union to do type punning.
18051 (java_double_finite): Likewise.
18052
62c9aa5f 180531999-01-09 Per Bothner <bothner@cygnus.com>
fe053cfc
PB
18054
18055 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
18056 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
18057 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
18058 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
18059 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
18060 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
18061
62c9aa5f 180621999-01-08 Per Bothner <bothner@cygnus.com>
b82daa87
PB
18063
18064 * check-init.c (check_init): If compiling to native, we don't
18065 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
18066
5c280133
TT
180671999-01-08 Tom Tromey <tromey@cygnus.com>
18068
18069 * parse-scan.y (variable_declarator_id): Set or increment
18070 bracket_count.
18071 (bracket_count): New global.
18072 (formal_parameter): Handle case where bracket pairs trail variable
18073 declarator id.
18074
5e1db167
AH
180751999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
18076
18077 * jcf-parse.c (yyparse): variable len changed from a char to an
18078 int to prevent overflow.
18079
62c9aa5f 180801999-01-06 Per Bothner <bothner@cygnus.com>
db84cc46
PB
18081
18082 * java-tree.h: Declare read_class.
18083 * jcf-parse.c (read_class): New function.
18084 (load_class): Now just call read_class.
18085
18086 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
18087 * jcf-parse.c (parse_source_file): Declare save_error_count,
18088 which is needed by java_parse_abort_on_error macro,
18089 * parse.y (java_layout_classes, java_expand_classes): Likewise.
18090
18091 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
18092 constructor, if initializing a static field.
18093 (patch_new_array_init): Set TREE_CONSTANT if it is.
18094 * expr.c (java_lang_expand_expr): For a static array constructor
18095 of primitive elements, allocate the array itself statically.
18096 Disabled until we can set the vtable field statically.
f6bbde28 18097
db84cc46
PB
18098 * check-init.c: New file. Checks for definite assignment.
18099 * Makefile.in (JAVA_OBJS): Add check-init.o.
18100 * parse.y (java_complete_expand_method): Call check_for_initialization.
18101 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
18102
62c9aa5f 181031999-01-06 Graham <grahams@rcp.co.uk>
8c4ea1fd
GS
18104
18105 * parse.y : include system.h instead of including
18106 standard headers directly with the exception of <dirent.h>.
18107
62c9aa5f 181081999-01-06 Per Bothner <bothner@cygnus.com>
0d34ccb7
PB
18109
18110 * lex.h: Moved static function declarations to lex.c,
18111 to shut up some -Wall warnings.
18112 * lex.c: Static function declarations moved here.
18113 * jcf-dump.c: Small fixes to shut up -Wall warnings.
18114
62c9aa5f 181151999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5b5d821c 18116
f6bbde28 18117 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
5b5d821c 18118
62c9aa5f 181191998-12-22 Per Bothner <bothner@cygnus.com>
e402ca98
PB
18120
18121 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
18122 * verify.c (verify_jvm_instructions): Fix off-by-one error.
18123
18124 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
18125 (localvar_alloc): Change return type to void,
18126 (emit_unop): Remove unused variable size.
f6bbde28 18127
e402ca98
PB
18128 * jcf-write.c (struct jcf_block): Add new union.
18129 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
18130 (call_cleanups): New functions.
18131 (struct jcf_partial): New fields num_finalizers and return_value_decl.
18132 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
18133 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
18134 * lang.c (lang_init): Call using_eh_for_cleanups.
18135 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
18136 completing operands to patch_synchronized_statement.
18137 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
18138 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
f6bbde28 18139 WITH_CLEANUP_EXPR instead of TRY_EXPR.
e402ca98 18140
62c9aa5f 181411998-12-20 John F. Carr <jfc@mit.edu>
62481348
JC
18142
18143 * Make-lang.in: Comment out control-Ls; they upset some makes.
18144
847fe791
TT
181451998-12-18 Tom Tromey <tromey@cygnus.com>
18146
18147 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
18148 consistently.
18149
d5ff227d
TT
181501998-12-17 Tom Tromey <tromey@cygnus.com>
18151
fa322ab5
TT
18152 * parse.y (DIR_SEPARATOR): New define.
18153 (check_class_interface_creation): Use it.
18154
d5ff227d
TT
18155 * parse-scan.y (report_main_declaration): Recognize
18156 `java.lang.String' in argument to main.
18157
62c9aa5f 181581998-12-16 Per Bothner <bothner@cygnus.com>
83a86272
PB
18159
18160 * parse.y (create_interface): Remove bogus test.
18161
62c9aa5f 181621998-12-16 Per Bothner <bothner@cygnus.com>
f868ca8f
PB
18163
18164 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
18165 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
18166
0252081c
TT
181671998-12-16 Tom Tromey <tromey@cygnus.com>
18168
18169 * parse-scan.y (qualified_name): Use correct sprintf format.
18170
06d84d69
TT
181711998-12-15 Tom Tromey <tromey@cygnus.com>
18172
18173 * gjavah.c (print_field_info): Changed how most negative number is
18174 printed.
18175
62c9aa5f 181761998-12-14 Per Bothner <bothner@cygnus.com>
659ad450
PB
18177
18178 * parse.y (fold_constant_for_init): New function.
18179 (resolve_expression_name): Don't replace static final
e64c46ce 18180 constant-initialized fields by its value.
659ad450
PB
18181 (java_complete_lhs): New. Same as java_complete_tree, except does
18182 not replace static final constant-initialized fields by their values.
18183 (register_fields): If there is an initializer, set DECL_INITIAL and
18184 MODIFY_EXPR_FROM_INITIALIZATION_P.
18185 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
18186 Only call patch_initialized_static_field if
18187 MODIFY_EXPR_FROM_INITIALIZATION_P.
18188 (patch_initialized_static_field): If not valid constant, clear
18189 DECL_INITIAL.
18190
18191 * parse.y (lookup_field_wrapper): Fix thinko.
18192
18193 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
18194 set and restore global lineno.
18195
11b89622
TT
181961998-12-14 Tom Tromey <tromey@cygnus.com>
18197
18198 * gjavah.c (print_field_info): If value to print is the smallest
18199 value of its size, then print as hex to avoid later warnings from
18200 C++ compiler.
18201
8c2dfb32
TT
182021998-12-14 Tom Tromey <tromey@cygnus.com>
18203
18204 * gjavah.c (decompile_method): Decompile `return null'.
18205 (process_file): Generate `#pragma interface'.
18206 (method_declared): New global.
18207 (print_method_info): Set it.
18208 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
18209 (print_method_info): Handle abstract methods.
18210
62c9aa5f 182111998-12-13 Per Bothner <bothner@cygnus.com>
ba02c53a
PB
18212
18213 * parse.y (patch_method_invocation): If class_decl is null
18214 (e.g. an array type), use original type.
18215
18216 * parse.y (check_thrown_exceptions): Temporary hack to suppress
18217 errors about uncaught exception from clone (of array, specifically).
18218
cb975f38
TT
182191998-12-13 Tom Tromey <tromey@cygnus.com>
18220
18221 * gjavah.c (decompile_method): Handle all types of `return'
18222 opcode. Decompile `return this' and `return'.
18223 (method_access): New global.
18224 (print_method_info): Set it.
18225 (decompile_method): Don't decompile a synchronized method.
18226
92c068d1
TT
182271998-12-13 Tom Tromey <tromey@cygnus.com>
18228
18229 * jcf-reader.c (jcf_parse_one_method): Recognize
18230 HANDLE_END_METHOD.
18231 * gjavah.c (HANDLE_END_METHOD): New macro.
18232 (HANDLE_CODE_ATTRIBUTE): New macro.
18233 (decompile_method): New function.
18234 (print_method_info): Don't print `;\n' at end of function decl.
18235 Include java-opcodes.h.
18236 (decompiled): New global.
18237
62c9aa5f 182381998-12-12 Per Bothner <bothner@cygnus.com>
0b245181
PB
18239
18240 * class.c (build_class_ref): Handle PRIMTYPE.class if
18241 flag_emit_class_files.
18242 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
18243 if flag_emit_class_files.
18244 * parse.y (java_complete_tree): Pre-liminary support for
18245 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
18246
18247 * parse.y (patch_synchronized_statement): Don't call monitorexit
e64c46ce 18248 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
0b245181
PB
18249
18250 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
18251
18252 * zipfile.h (opendir_in_zip): New declaration.
18253 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
18254 (opendir_in_zip): New function, using code from open_in_zip.
18255 (open_in_zip): Call opendir_in_zip.
18256 (find_class): Remove no-longer-used do_class_file parameter,
18257 but add source_ok parameter. Change logic so if we find a .java file,
18258 we don't look for .class in later classpath emtries.
18259 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
18260 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
18261 * gjavah.c: Update call to find_class.
18262 * jcf-dump.c: Likewise.
18263
18264 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
18265 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
18266 nothing if body is empty_stmt_node.
18267 Various little fixes so SP gets correctly adjusted.
18268 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
18269 For CALL_EXPR, test if static first.
18270 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
18271 such as the ones we create for Object and Class.
18272 Set and restore current_function_decl.
18273 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
18274 (note_possible_classname): New function.
18275 (read_import_entry): Removed. Merged with read_import_dir.
18276 (read_import_dir): Don't call find_class - that only gives us
18277 the first classpath entry having the needed package.
18278 Use the struct buffer data structure from buffer.h.
18279 (read_import_dir, find_in_imports_on_demand): The remembered
18280 class names now use '.' (not '/') as package separator.
18281
18282 * parse.y (java_complete_expand_methods): Call write_classfile
18283 here, and not in java_expand_classes (which only gets first class).
18284
62c9aa5f 182851998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
1287b91a
APB
18286
18287 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
18288 (register_fields): If a static fields has an initializer, just
18289 chain it on ctxp->static_initialized, and handle later.
18290 (java_complete_expand_methods): Force <clinit> first.
18291 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
18292 - it's already been completed.
18293 (patch_initialized_static_field): New function.
18294 (java_complete_field): Call it.
18295
62c9aa5f 182961998-12-12 Per Bothner <bothner@cygnus.com>
05f9acdc
PB
18297
18298 * expr.c (encode_newarray_type, build_new_array): New functions.
18299 * java-tree.h: Declare build_new_array.
18300 * jcf-write.c (patch_newarray): Use build_new_array.
18301
18302 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
18303 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
18304
18305 * parse.y (patch_new_array_init): Re-organize.
18306 Now is passed the actual array (pointer) type of the value.
18307 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
18308 (patch_array_constructor): Removed - merged into patch_new_array_init.
e64c46ce 18309 (java_complete_tree): Update patch_new_array_init.
05f9acdc
PB
18310
18311 * jcf-write.c (find_constant_index): New function.
18312 (generate_bytecode_insns): Use find_constant_index.
18313 (generate_classfile): Use find_constant_index for ConstantValue.
18314
78857b4e
TT
183151998-12-11 Tom Tromey <tromey@cygnus.com>
18316
18317 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
18318 * decl.c (init_decl_processing): Renamed dtable -> vtable.
18319 * class.c (make_class_data): Renamed dtable -> vtable, and
18320 dtable_method_count -> vtable_method_count.
18321
62c9aa5f 183221998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
4a5f66c3
APB
18323
18324 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
e64c46ce 18325 global variables, initialized.
4a5f66c3 18326 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
e64c46ce 18327 Declared new global variables.
4a5f66c3 18328 * lex.c (java_lex): Return long_zero_node, float_zero_node,
e64c46ce 18329 double_zero_node, integer_zero_node upon direct matching.
4a5f66c3
APB
18330 * parse.y (purify_type_name): Added function prototype.
18331 (duplicate_declaration_error_p): Consider new_type as potentially
e64c46ce 18332 being a incomplete type. Use purify_type_name on type string.
4a5f66c3 18333 (method_header): saved_type: unused variable removed. Don't figure
e64c46ce 18334 return type if method name is invalid.
4a5f66c3 18335 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
e64c46ce 18336 processed by patch_unaryop.
4a5f66c3 18337 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
e64c46ce
AJ
18338 increment/decrement node into its original type after binary
18339 numeric promotion on its operands.
4a5f66c3 18340
62c9aa5f 183411998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
1179ebc2
APB
18342
18343 * parse.y (array_initializer:): Array init operand is NULL_TREE
e64c46ce
AJ
18344 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
18345 now an error. Fixed indentation problems.
1179ebc2
APB
18346 (patch_string): Handle error_mark_node as an argument.
18347 (patch_new_array_init): Fixed indentation problems.
18348 (array_constructor_check_entry): Removed check on null wfl_value.
e64c46ce 18349 Return an error if wfl_value's walk returns an error.
1179ebc2 18350
62c9aa5f 183511998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
f8976021
APB
18352
18353 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
18354 * lex.c (java_lex): Remember column position before advancing one
e64c46ce 18355 token. Retain location information on OCB_TK.
f8976021
APB
18356 * lex.h (typedef struct java_lc): Added new field.
18357 * parse.h (GET_SKIP_TYPE): New macro.
18358 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
18359 * parse.y (build_new_array_init, patch_new_array_init,
e64c46ce
AJ
18360 patch_array_constructor, maybe_build_array_element_wfl,
18361 array_constructor_check_entry): New function prototypes.
f8976021
APB
18362 (switch_block:): Tagged <node>.
18363 (OCB_TK): Tagged <operator>.
18364 (array_initializer:): Installed actions.
18365 (variable_initializer): Build location information on element if
e64c46ce 18366 necessary.
f8976021
APB
18367 (switch_statement:): Fixed indentation typo.
18368 (switch_block:): Redefined default action.
18369 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
18370 (patch_assignment): Removed duplicate code.
18371 (maybe_build_array_element_wfl, build_new_array_init,
e64c46ce
AJ
18372 patch_new_array_init, patch_array_constructor,
18373 array_constructor_check_entry): New functions.
f8976021 18374
62c9aa5f 183751998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
ac825856
APB
18376
18377 * parse.y (array_initializer): Tagged <node>.
18378 (variable_initializer:): Use default rule.
18379 (array_initializer:): Defined actions.
18380 (variable_initializers:): Likewise.
18381 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
e64c46ce 18382 non-static field accesses.
ac825856
APB
18383 (patch_invoke): Fixed indentation typo.
18384 (java_complete_tree): Likewise.
18385 (build_labeled_block): Changed leading comment. Generate an error
e64c46ce 18386 in case of duplicate loop labels.
ac825856 18387 (patch_conditional_expr): Patch results of string concatenation
e64c46ce 18388 operations.
ac825856 18389
62c9aa5f 183901998-12-06 Per Bothner <bothner@cygnus.com>
2dfaf550
PB
18391
18392 * constants.c (find_methodref_index): When the class is an interface,
18393 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
18394
18395 * decl.c (finit_identifier_node): Use "$finit$", rather than
18396 "<finit>" (which Sun's verifier rejects).
18397 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
18398 (generate_field_initialization_code): Removed.
18399 (fix_constructors) Don't add call to $finit$ here (wrong order).
18400 (patch_method_invocation): Add $finit$ call here.
18401
18402 * java-tree.h (CALL_USING_SUPER): New macro.
18403 * parse.y (patch_invoke): Remove im local variable.
e64c46ce 18404 (patch_method_invocation, patch_invoke): Don't pass super parameter.
f6bbde28 18405 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
2dfaf550
PB
18406 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
18407
18408 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
18409
18410 * parse.y (java_complete_tree): Don't complain about unreachable
18411 statement if it is empty_stmt_node.
18412
18413 * jcf-write.c (find_constant_wide): New function.
18414 (push_long_const): Use find_constant_wide.
18415
18416 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
18417 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
18418 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
18419 Emit invokeinterface when calling an interface method.
18420 Emit invokespecial also when calling super or private methods.
18421
18422 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
18423
62c9aa5f 184241998-12-06 Per Bothner <bothner@cygnus.com>
0f0d3319
PB
18425
18426 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
18427
62c9aa5f 184281998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
1886c9d8
APB
18429
18430 * java-tree.h (java_layout_seen_class_methods): New function
e64c46ce 18431 prototype.
1886c9d8
APB
18432 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
18433 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
18434 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
18435 * parse.y (method_declarator:): Defined action.
18436 (issue_warning_error_from_context): input_filename saved, set to
e64c46ce 18437 the appropriate value and restored after java_error is called.
1886c9d8
APB
18438 (build_unresolved_array_type): Fixed comment.
18439 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
18440 (method_header): Deal with return type the same way type are
e64c46ce
AJ
18441 handled for fields and method's parameters and local variables
18442 types are handled.
1886c9d8
APB
18443 (check_method_redefinition): Removed extra CR.
18444 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18445 (java_layout_seen_class_methods): New function.
18446 (java_layout_classes): Call java_layout_seen_class_methods.
f6bbde28 18447
62c9aa5f 184481998-12-03 Per Bothner <bothner@cygnus.com>
52e01aa6
PB
18449
18450 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
18451
62c9aa5f 184521998-12-03 Per Bothner <bothner@cygnus.com>
66af84e4
PB
18453
18454 * jcf-dump.c (main): Fix error message.
18455 * jcf-path.c (add_entry): Style fix.
18456
62c9aa5f 184571998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
c3f2a476
APB
18458
18459 * class.c (layout_class_method): Call build_java_argument_signature
18460 on constructors too.
18461 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18462 (patch_method_invocation): Define a primary when resolving an
e64c46ce
AJ
18463 expression name. Augmented comment on code checking illegal `this'
18464 usage. Loosened it test by accepting NEW_CLASS_EXPR.
c3f2a476 18465
62c9aa5f 184661998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
82371d41
APB
18467
18468 * class.c (layout_class_method): Don't report error on non-static
e64c46ce 18469 overriding static if the method is private.
82371d41
APB
18470 * java-tree.h (finish_class): Prototype added.
18471 * lex.c (java_get_line_col): Handle col argument -2 value.
18472 * parse.h: All static method declarations moved to parse.y.
18473 * parse.y: Now contains all static method declarations previously
e64c46ce 18474 found in parse.h.
82371d41 18475 (find_expr_with_wfl, missing_return_error,
e64c46ce 18476 unreachable_stmt_error): New functions.
82371d41 18477 (java_get_real_method_name): Identify constructors bearing class
e64c46ce 18478 names in source code compiled classes only.
82371d41
APB
18479 (java_complete_expand_methods): Call missing_return_error.
18480 (invocation_mode): Private methods invoked as static methods.
18481 (java_complete_tree): Call unreachable_stmt_error.
18482
de80f416
TT
184831998-12-01 Tom Tromey <tromey@cygnus.com>
18484
18485 * Makefile.in (+target): Removed.
18486 (+xmake_file): Likewise.
18487 (+tmake_file): Likewise.
18488 (.NOEXPORT): Removed duplicate.
18489
62c9aa5f 184901998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
45254bf6
KG
18491
18492 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18493
18494 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
f6bbde28 18495
45254bf6
KG
18496 * jvgenmain.c: Remove the xmalloc prototype, we get it from
18497 libiberty.h. Provide an xmalloc definition.
18498
18499 * jvspec.c: Remove the xmalloc prototype.
18500
18501 * parse-scan.y: Include config.h and system.h. Don't include
18502 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
18503 Provide an xstrdup definition.
18504
62c9aa5f 185051998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
076b41ee 18506
ceff9b14
AO
18507 * jcf-path.c (add_entry): Recognize ".jar" too.
18508 * lang-specs.h: Likewise.
076b41ee 18509
62c9aa5f 185101998-11-26 Per Bothner <bothner@cygnus.com>
c5941a9f
PB
18511
18512 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
18513 soft_monitorenter_node, soft_monitorexit_node, throw_node.
18514
18515 * jcf-write.c (generate_bytecode_insns):
e64c46ce 18516 Handle pre/post-increment/decrement of long.
c5941a9f
PB
18517
18518 * jcf-write.c (generate_bytecode_insns):
18519 Handle missing exception handler (finally for synchronized).
18520
62c9aa5f 185211998-11-25 Per Bothner <bothner@cygnus.com>
00abfc00 18522
df8940cf
PB
18523 * java-tree.h (end_params_node): Declare global.
18524 * decl.c (end_params_node): New global.
18525 (init_decl_processing, start_java_method): Use end_params_node for
18526 end of list of parameter types. Follows correct gcc conventions.
18527 * expr.c (pop_argument_types, pop_arguments): Likewise.
18528 * lang.c (put_decl_node): Likewise.
18529 * typeck.c (various places): Likewise.
18530 * class.y (various places): Likewise.
18531 * parse.y (various places): Likewise.
18532
18533 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
18534 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
18535
18536 * class.c: Add #include flags.h, remove no-longer needed declaration.
18537
18538 * class.c (layout_class_method): Remove commented-out code, re-format.
18539 Don't add vtable entry (or index) for private methods.
18540 * expr.c (expand_invoke): A private method is implicitly final.
18541 * class.c (make_class_data): If inlining or optimizing,
18542 skip private methods.
18543
18544 * class.c (finish_class): New function. Calls existing methods,
18545 but alls emits deferred inline functions.
18546 * jcf-parse.c (parse_class_file): Call finish_class.
18547 * parse.y (java_complete_expand_methods): Likewise.
18548
18549 * expr.c (build_java_binop): Explicit default, to silence -Wall.
18550
00abfc00
PB
18551 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
18552
62c9aa5f 185531998-11-25 Marc Espie <espie@quatramaran.ens.fr>
de7b168e
ME
18554
18555 * jcf-write.c (generate_bytecode_conditional): Fix typo.
18556
62c9aa5f 185571998-11-24 Per Bothner <bothner@cygnus.com>
23a79c61
APB
18558
18559 * (generate_classfile): Always write class access flag with
e64c46ce 18560 ACC_SUPER set.
23a79c61 18561
62c9aa5f 185621998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
23a79c61
APB
18563
18564 * class.c (maybe_layout_super_class): New function.
18565 (layout_class): Reorganized. Loop on class methods dispatched into
e64c46ce 18566 a new function. Call maybe_layout_super_class.
23a79c61
APB
18567 (layout_class_methods, layout_class_method): New functions.
18568 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
e64c46ce 18569 class.
23a79c61
APB
18570 (expand_invoke): Likewise.
18571 * java-tree.h (all_class_list): New global variable declared.
18572 (layout_class_methods, layout_class_method): New function
e64c46ce 18573 prototypes.
23a79c61
APB
18574 (LAYOUT_SEEN_CLASS_METHODS): New macro.
18575 * jcf-parse.c (all_class_list): New global variable.
18576 (load_class): Extended what class_or_name can be. Use parser
e64c46ce 18577 context mechanism to save globals before calling jcf_parse.
23a79c61 18578 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
e64c46ce 18579 is set on the file name.
23a79c61 18580 (jcf_parse): Layout class methods when Object is loaded, otherwise
e64c46ce 18581 record class in all_class_list for delayed method layout.
23a79c61
APB
18582 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18583 * lang.c (put_decl_node): Decode <init> into the decl context
e64c46ce 18584 class name.
23a79c61
APB
18585 * lex.c (java_allocate_new_line): Use xmalloc.
18586 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
e64c46ce 18587 pointers, not TREE_LIST elements.
23a79c61 18588 (struct parser_ctxt): Fixed comment indentations, added comments
e64c46ce 18589 and reordered some fields.
23a79c61
APB
18590 (java_check_methods): Function prototype removed.
18591 * parse.y (java_push_parser_context): Use xmalloc.
18592 (java_parser_context_restore_global): Pop extra pushed ctxp only
e64c46ce 18593 when there's nothing next.
23a79c61 18594 (maybe_create_class_interface_decl): Fixed comment, add new
e64c46ce 18595 created class decl to all_class_list.
23a79c61
APB
18596 (method_header): Use GET_REAL_TYPE on argument's types.
18597 (method_declarator): Use GET_REAL_TYPE, change type to the real
e64c46ce
AJ
18598 type in TREE_LIST dependency node. Build argument list with the
18599 real type.
23a79c61
APB
18600 (create_jdep_list): Use xmalloc. Removed allocation error message.
18601 (obtain_incomplete_type): Fixed leading comment. Broadened
e64c46ce 18602 incoming argument meaning.
23a79c61 18603 (register_incomplete_type): Use xmalloc. Removed allocation error
e64c46ce 18604 message.
23a79c61
APB
18605 (safe_layout_class): Fixed leading comment.
18606 (jdep_resolve_class): Reversed if statement condition and switch
e64c46ce 18607 if and else bodies.
23a79c61 18608 (resolve_and_layout): Fixed leading comment. Broadened incoming
e64c46ce 18609 argument meaning.
23a79c61 18610 (complete_class_report_errors): New local variable name, for
e64c46ce 18611 clarity. purify_type_name used for all error cases.
23a79c61
APB
18612 (java_get_real_method_name): Stricter check on constructors.
18613 (java_check_regular_methods): Reverse methods list only if not
e64c46ce 18614 already laid out. Layout artificial constructor.
23a79c61
APB
18615 (java_check_methods): Deleted.
18616 (source_start_java_method): Obtain incomplete type for patchable
e64c46ce 18617 method arguments.
23a79c61 18618 (java_layout_classes): Fixed leading comment. Use
e64c46ce
AJ
18619 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18620 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18621 before returning. Fixed comments.
23a79c61
APB
18622 (java_expand_classes): Check for errors up front.
18623 (patch_method_invocation): Class to search is resolved and laid
e64c46ce 18624 out.
f6bbde28 18625
62c9aa5f 186261998-11-24 Per Bothner <bothner@cygnus.com>
818347b4
PB
18627
18628 * expr.c (java_lang_expand_expr): Add missing emit_queue.
18629
18630 * javaop.h (int8): Removed - not used.
18631 (jbyte): Redefine portably with correct signedness.
18632
18633 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
18634
18635 * jcf-write.c (generate_bytecode_insns): Fix typo
18636 OPCODE_getstatic to OPCODE_getfield.
18637
18638 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
18639 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
18640 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18641
62c9aa5f 186421998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
1c7f3673
APB
18643
18644 * jcf-parse.c (jcf_parse_source): Function returned type is
e64c46ce 18645 void. Added prototype.
1c7f3673
APB
18646 (jcf_parse): Function returned type is void.
18647 (yyparse): Remove call to fclose on the last parsed file.
18648
18649 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18650
62c9aa5f 186511998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
c877974e
APB
18652
18653 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18654 (layout_class): Cope with methods featuring WFL in decl names.
18655 * decl.c (unqualified_object_id_node): New global variable,
e64c46ce 18656 initialized.
c877974e
APB
18657 (build_decl_no_layout): Removed.
18658 * expr.c (build_primtype_type_ref): Handle Double.
18659 (java_lang_expand_expr): Fixed indentations.
18660 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18661 (flag_wall, flag_redundant, flag_not_overriding,
e64c46ce
AJ
18662 flag_static_local_jdk1_1, unqualified_object_id_node): Global
18663 variable declarations.
c877974e
APB
18664 (build_decl_no_layout): Removed prototype.
18665 (java_get_real_method_name): Added prototype.
18666 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18667 (java_parse_abort_on_error): Macro now just returns.
18668 * jcf-parse.c (jcf_parse_source): Check fclose returned
e64c46ce
AJ
18669 value. Call emit_register_classes if java_report_errors returns
18670 zero.
c877974e 18671 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
e64c46ce 18672 flag_static_local_jdk1_1): New integer flags.
c877974e
APB
18673 (lang_decode_option): New flags set here.
18674 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18675 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
e64c46ce 18676 the flag_redundant variable.
c877974e 18677 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
e64c46ce 18678 when parsing java.lang.Object class.
c877974e 18679 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
e64c46ce 18680 NULL_TREE to build.
c877974e
APB
18681 (resolve_qualified_expression_name): Fixed indentation.
18682 (patch_array_ref): Changed prototype.
18683 (not_initialized_as_it_should_p): Prototype removed.
18684 (java_report_errors): Added function prototype.
18685 * parse.y (formal_parameter:): Changed error message for not yet
e64c46ce 18686 supported final parameters.
c877974e 18687 (class_type_list:): Set both PURPOSE and VALUE of created
e64c46ce 18688 TREE_LIST to be class_type.
c877974e
APB
18689 (primary_no_new_array:): Handle class literals on primitive types.
18690 (parse_warning_context): Reinstalled correct force_error and
e64c46ce 18691 do_warning flags setups.
c877974e 18692 (java_report_errors): Changed prototype. Return java_error_count
e64c46ce 18693 value.
c877974e 18694 (variable_redefinition_error): Consider treating variable type as
e64c46ce 18695 a fake pointer.
c877974e 18696 (create_interface): Warn about redundant abstract modifier if
e64c46ce 18697 flag_redundant is set. Changed error message.
c877974e 18698 (lookup_field_wrapper): Save/restore globals before/after looking
e64c46ce 18699 up field.
c877974e 18700 (duplicate_declaration_error_p): Consider treating declaration
e64c46ce 18701 type as a fake pointer.
c877974e 18702 (register_fields): Extract real type from dependency node. Check
e64c46ce
AJ
18703 for duplicate field declaration after type adjustment. Use
18704 DECL_INITIAL to store static final initialized values.
c877974e
APB
18705 (method_header): Extract real function type from dependency node.
18706 (check_abstract_method_header): Use GET_METHOD_NAME.
18707 (obtain_incomplete_type): Layout fake pointer type.
18708 (safe_layout_class): Don't try to check for methods before layout.
18709 (java_complete_class): Don't check for correct throws clause
e64c46ce 18710 elements inheritance here.
c877974e
APB
18711 (resolve_and_layout): Broadened name parameter meaning.
18712 (reset_method_name): Use GET_METHOD_NAME.
18713 (java_get_real_method_name): New function.
18714 (java_check_regular_methods): Don't check methods in
e64c46ce
AJ
18715 java.lang.Object. Verify lineage of throws clause elements. Use
18716 flag_no_overriding in warning report.
c877974e 18717 (check_throws_clauses): Don't check if class was from
e64c46ce 18718 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
c877974e
APB
18719 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18720 (declare_local_variables): Use flag_static_local_jdk1_1 to report
e64c46ce
AJ
18721 warning on unsupported final local variables. Use build_decl
18722 instead of build_decl_no_layout. Get real local variable type from
18723 dependency node.
c877974e 18724 (source_start_java_method): Get real parameter type from
e64c46ce 18725 dependency node. Call build_decl instead of build_decl_no_layout.
c877974e 18726 (java_layout_classes): Reverse tree and layout type and class as
e64c46ce 18727 required. Mark class as loaded when done.
c877974e 18728 (resolve_field_access): Fixed indentation. Restricted condition
e64c46ce
AJ
18729 leading to static field access code generation. Set field_type
18730 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
c877974e 18731 (resolve_qualified_expression_name): Initialize type_found to
e64c46ce
AJ
18732 null. Handle static field resolved during qualification. Fixed
18733 layout on non primitive field decl types.
c877974e
APB
18734 (not_accessible_p): Fixed typo in comment.
18735 (patch_method_invocation): Resolve and layout class to search from
e64c46ce 18736 type.
c877974e 18737 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
e64c46ce
AJ
18738 layout non primitive type, if necessary. Make method node only to
18739 report errors.
c877974e 18740 (find_applicable_accessible_methods_list): Consider WFL'ed method
e64c46ce 18741 decl names. Fixed indentation.
c877974e 18742 (argument_types_convertible): Resolve and layout target type if
e64c46ce 18743 necessary.
c877974e 18744 (java_complete_tree): Fixed indentation problems. Rewrote
e64c46ce
AJ
18745 CALL_EXPR thrown exceptions check. Re-installed further processing
18746 of the assignment in certain cases.
c877974e 18747 (patch_assignment): Call maybe_build_primttype_type_ref to perform
e64c46ce 18748 inlining on class literals.
c877974e 18749 (valid_builtin_assignconv_identity_widening_p): Cope with constant
e64c46ce 18750 0 literal.
c877974e
APB
18751 (valid_method_invocation_conversion_p): Likewise.
18752 (patch_string): Temporary disable forbidden use of `this' in
e64c46ce
AJ
18753 explicit constructor invocations when doing string concatenation
18754 within their scope.
c877974e 18755 (patch_unaryop): Added comment. Reinstalled code to disable
e64c46ce 18756 further check on assignment operation with cast expression RHS.
c877974e
APB
18757 (patch_switch_statement): Fixed indentation.
18758 (build_try_statement): Call build_decl instead of
e64c46ce 18759 build_decl_no_layout.
c877974e
APB
18760 (patch_synchronized_statement): Likewise.
18761 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
e64c46ce 18762 IS_UNCHECKED_EXPRESSION_P.
c877974e 18763 (check_thrown_exceptions_do): Changed leading comment. Resolve and
e64c46ce 18764 layout argument exception type.
c877974e 18765 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
e64c46ce 18766 of IS_UNCHECKED_EXPRESSION_P.
f6bbde28 18767
62c9aa5f 187681998-11-18 Anthony Green <green@cygnus.com>
1c7f3673
APB
18769
18770 * jcf-parse.c (yyparse): Open class file in binary mode.
18771
62c9aa5f 187721998-11-15 Per Bothner <bothner@cygnus.com>
411efd21
PB
18773
18774 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
18775
18776 * jcf-write.c (perform_relocations): Move check out one loop.
18777
62c9aa5f 187781998-11-15 Anthony Green <green@hoser.cygnus.com>
8773d9d5
AG
18779
18780 * Make-lang.in: Fix reference to srcdir.
18781 * jv-scan.c: Add missing xmalloc prototype.
18782 * jvgenmain.c: Ditto.
18783
62c9aa5f 187841998-11-15 Per Bothner <bothner@cygnus.com>
9bbc7d9f
PB
18785
18786 * decl.c (error_mark_node), java-tree.h: New global.
18787 * parse.y: Use empty_stmt_node instead of size_zero_node.
18788 (build_if_else_statement): If missing else, use empty_stmt_node.
18789
18790 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
18791 (java_complete_expand_method): Complain if return is missing.
18792 (java_check_regular_methods): Comment out incorrect error check.
18793 (not_accessible_p): Fix incorrect handling of protected methods.
18794 (patch_method_invocation): Pass correct context to not_accessible_p.
18795 (find_applicable_accessible_methods_list): Likewise.
18796 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
18797 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
18798 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
18799 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
18800
18801 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
18802 (push_int_const): Remove reundant NOTE_PUSH.
18803 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
18804 (- case SWITCH_EXPR): Fix code generation bug.
18805 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
18806 (generate_classfile): More robust for abstract methods.
18807
62c9aa5f 188081998-11-15 Anthony Green <green@cygnus.com>
175135a6
AG
18809
18810 * Makefile.in: jv-scan and jvgenmain all require libiberty.
18811 * Make-lang.in: Ditto.
18812
18813 * jv-scan.c: Remove xmalloc and xstrdup definitions.
18814 * jvgenmain: Ditto.
18815
62c9aa5f 188161998-11-15 Per Bothner <bothner@cygnus.com>
0ef38928
PB
18817
18818 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
18819
18820 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
18821
62c9aa5f 188221998-11-14 Per Bothner <bothner@cygnus.com>
a2f44beb
PB
18823
18824 Allow uses of interface types to verify. This is not really
18825 type-safe, but it matches what Sun does, and is OK as long as
18826 there are appropriate run-time checks.
18827 * verify.c (merge_types): If merging two interface types,
18828 just set the result to java.lang.Object.
18829 * expr.c (pop_type): Any interface is matches by java.lang.Object.
18830
928962ae
TT
188311998-11-13 Tom Tromey <tromey@cygnus.com>
18832
df66b566
TT
18833 * gjavah.c (main): Handle --output-class-directory argument.
18834 * jvspec.c (lang_specific_driver): Translate `-d' into
18835 -foutput-class-dir.
18836 * jcf.h (jcf_write_base_directory): Declare.
18837 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18838 * lang-options.h: Mention -foutput-class-dir.
18839 * jcf-write.c (jcf_write_base_directory): New global.
18840 (make_class_file_name): Put generated .class file into `-d'
18841 directory, or into source directory if -d not given. Function now
18842 static.
18843 (write_classfile): Free class file name. Handle case where class
18844 file name is NULL.
18845 (DIR_SEPARATOR): New macro.
18846 Include <sys/stat.h>
18847
928962ae
TT
18848 * Makefile.in (prefix): New macro.
18849
62c9aa5f 188501998-11-12 Per Bothner <bothner@cygnus.com>
14dd5b38 18851
421fb085
PB
18852 * parse.y (patch_invoke): Do less if flag_emit_class_files.
18853 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
18854 here (done in patch_invoke instead).
18855 (case_identity): Moved here from parse.y.
18856
18857 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
18858 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
18859 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
18860 so they can be efficiently scanned without recursion.
18861 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
18862 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
18863 in BLOCK iteratively, rather than recursively.
18864
18865 * parse.y (do_unary_numeric_promotion): New function.
18866 (patch_unaryop, patch_binop, patch_array_ref): Use it.
18867
18868 * parse.y (patch_newarray): Various fixes.
18869
18870 Re-do handling of switch statements (for proper block scoping).
18871 * parse.y: Add just a single block for the enture switch block,
18872 but don't create any "case blocks".
18873 (group_of_labels): Rmeoved unneeded non-terminal.
18874 CASE_EXPR and DEFAULT_EXPR are added to current block.
18875 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
18876 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
18877 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
18878 * parse.y (wfl_operator, print_int_node): Make non-static.
18879 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
18880 as part of recursive scan of block.
18881 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
18882 (patch_switch_statement): Most tests move dinto java_complete_tree.
f6bbde28 18883
421fb085
PB
18884 * parse.y: Make various production be non-typed (void).
18885 * parse.y (parse_error): Merged into issue_warning_error_from_context.
18886 * parse.y (add_stmt_to_compound): Don't create/change extra node.
18887 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
18888
18889 * jcf-write.c (struct jcf_handler): New type.
18890 (struct jcf_switch_state): New type.
18891 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
18892 (alloc_handler, emit_unop, emit_reloc): New functions.
18893 (adjust_typed_op): Add extra parameter ("max type" offset).
18894 (emit_switch_reloc, emit_case-reloc): New function.
18895 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
18896 (generate_bytecode_insns): Support REAL_CST, switch statements,
18897 exception handling, method calls, object/array creation, and more.
f6bbde28 18898
14dd5b38
PB
18899 * class.c: Remove some unused variables.
18900 * constants.c (find_string_constant): New function.
18901 (count_constant_pool_bytes): Fix to correctly handle wide constants.
18902 * decl.c (complete_start_java_method): Don't _Jv_InitClass
18903 if flag_emit_class_files.
421fb085 18904
dfded5c3
TT
189051998-11-12 Tom Tromey <tromey@cygnus.com>
18906
733b3a87
TT
18907 * jcf-io.c (find_class): Added explanatory comment.
18908
18909 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
18910 trailing slash to `.zip' entries.
18911
dfded5c3
TT
18912 * jvspec.c (lang_specific_driver): Correctly handle case where
18913 GC_NAME not defined.
18914
aaff4ee4
TT
189151998-11-11 Tom Tromey <tromey@cygnus.com>
18916
18917 * jvspec.c (GC_NAME): New define.
18918 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
18919 if required.
18920 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
18921
62c9aa5f 189221998-11-11 Per Bothner <bothner@cygnus.com>
b62d42fe
PB
18923
18924 * jcf-dump.c (TABLE_SWITCH): Fix typos.
18925
233f10d3
TT
189261998-11-11 Tom Tromey <tromey@cygnus.com>
18927
18928 * jcf-dump.c (main): Correctly recognize `--'-style long options.
18929
62c9aa5f 189301998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
5e942c50
APB
18931
18932 * class.c (is_compiled_class): Call safe_layout_class for class
e64c46ce 18933 compiled from source.
5e942c50 18934 * conver.h (convert_to_integer, convert_to_real,
e64c46ce 18935 convert_to_pointer): Added prototypes.
5e942c50 18936 * decl.c (init_decl_processing): Non longer push the decls of
e64c46ce
AJ
18937 `methodtable', `constants', `Class', `Field', `dispatchTable'
18938 `jexception' and `Method'.
5e942c50
APB
18939 * expr.c (build_invokeinterface): New function.
18940 (expand_invoke): static variable CLASS_IDENT now in
e64c46ce 18941 build_invokeinterface. Use build_invokeinterface.
5e942c50 18942 (expand_java_field_op): Moved code to inline
e64c46ce 18943 java.lang.PRIMTYPE.TYPE into a function.
5e942c50
APB
18944 (build_primtype_type_ref): New function.
18945 * java-tree.def (INSTANCEOF_EXPR): New tree code.
18946 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
e64c46ce 18947 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
5e942c50
APB
18948 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
18949 (DECL_LOCAL_STATIC_VALUE): New macro.
18950 (build_invokeinterface, build_primtype_type_ref): New function
e64c46ce 18951 prototypes.
5e942c50
APB
18952 (java_parse_abort_on_error): Macro rewritten.
18953 * jcf-parse.c (current_method): Add comment to declaration.
18954 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
e64c46ce 18955 Function prototypes fixed.
5e942c50
APB
18956 (jcf_parse_source): push/pop parser context. save/restore global.
18957 (parse_source_file): Fixed leading comment. Now take a
e64c46ce
AJ
18958 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
18959 classes and pop the parser context anymore.
5e942c50 18960 (yyparse): Push parser context, save globals, parse the source
e64c46ce
AJ
18961 file, restore globals and pop the parser context when processing a
18962 source file.
5e942c50
APB
18963 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
18964 * lex.c (java_parse_doc_section): New function.
18965 (java_lex): Call java_parse_doc_section when appropriate. Build an
e64c46ce 18966 operator around INSTANCEOF_TK.
5e942c50 18967 * lex.h (java_lineterminator, java_sprint_unicode,
e64c46ce
AJ
18968 java_unicode_2_utf8, java_lex_error, java_store_unicode):
18969 Prototypes rewritten.
5e942c50 18970 (java_parse_escape_sequence, java_letter_or_digit_p,
e64c46ce
AJ
18971 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
18972 java_read_unicode, java_store_unicode, java_read_char,
18973 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
18974 Added function prototypes.
5e942c50 18975 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
e64c46ce 18976 define.
5e942c50 18977 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
e64c46ce 18978 New macros
5e942c50 18979 (struct parser_ctxt): New fields: deprecated,
e64c46ce 18980 current_parsed_class_un, gclass_list.
5e942c50 18981 (fix_method_argument_names, issue_warning_error_from_context,
e64c46ce 18982 resolve_package, lookup_package_type): New function prototypes.
5e942c50
APB
18983 (resolve_expression_name): Fixed function prototype.
18984 (find_applicable_accessible_methods_list): Fixed indentation, added
18985 extra argument in prototype.
18986 (check_final_assignment, build_null_of_type, check_deprecation,
e64c46ce
AJ
18987 check_method_redefinition, reset_method_name,
18988 java_check_regular_methods, java_check_abstract_methods,
18989 maybe_build_primttype_type_ref): New function prototype.
5e942c50
APB
18990 * parse.y (conver.h): Include.
18991 (INSTANCEOF_TK): Tagged <operator>.
18992 (single_type_import_declaration): Use REGISTER_IMPORT macro.
18993 (relational_expression:): Build binop for instanceof.
18994 (java_push_parser_context): Remember ctxp->gclass_list across
e64c46ce 18995 contexts.
5e942c50 18996 (java_pop_parser_context): Simply return if no context
e64c46ce 18997 exists. Remember gclass_list across contexts.
5e942c50
APB
18998 (issue_warning_error_from_context): New function.
18999 (parse_error_context): Don't setup ctxp->elc here. Call
e64c46ce 19000 issue_warning_error_from_context instead.
5e942c50
APB
19001 (parse_warning_context): Likewise.
19002 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
e64c46ce 19003 setup. Link new class/interface to ctxp->gclass_list.
5e942c50 19004 (add_superinterfaces): Register interface as incomplete if not
e64c46ce 19005 loaded.
5e942c50 19006 (create_class): Remember class unqualified name in
e64c46ce 19007 ctxp->current_parsed_class_un. Check class deprecation.
5e942c50 19008 (register_fields): Check field deprecation. Remember static final
e64c46ce
AJ
19009 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
19010 processing INIT.
5e942c50 19011 (method_header): New local variable ORIG_ARG. Use unqualified
e64c46ce
AJ
19012 current class name for check on constructor errors. Promote return
19013 type if of record type. Argument list fix moved in
19014 fix_method_argument_names, called here. Check method deprecation.
5e942c50
APB
19015 (fix_method_argument_names): New function.
19016 (method_declarator): Promote record typed arguments.
19017 (safe_layout_class): Check class methods before layout.
19018 (java_complete_class): Compute field layout when patched.
19019 (do_resolve_class): Try to load class after having it renamed
e64c46ce 19020 after the package name.
5e942c50
APB
19021 (get_printable_method_name): Use DECL_CONTEXT.
19022 (reset_method_name): New function.
19023 (check_method_redefinition): Use reset_method_name.
19024 (java_check_regular_methods): New local variable
e64c46ce
AJ
19025 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
19026 names for error report. Check for compile-time error when method
19027 found has default (package) access.
5e942c50 19028 (java_check_abstract_methods): Now takes an interface DECL node as
e64c46ce
AJ
19029 an argument. Also reinstall real name on unchecked
19030 overriding/hiding methods for error report.
5e942c50 19031 (java_check_methods): Fixed leading comment. Get classes to verify
e64c46ce
AJ
19032 from ctxp->gclass_list. Use CHECK_METHODS macro and set
19033 CLASS_METHOD_CHECKED_P on class verification.
5e942c50
APB
19034 (lookup_java_method2): Get real method name if necessary.
19035 (find_in_imports): Don't check package class access here.
19036 (resolve_package, lookup_package_type): New functions.
19037 (java_layout_classes): Fixed leading comment. Take classes to be
e64c46ce 19038 laid out from ctxp->gclass_list.
5e942c50 19039 (java_complete_expand_methods): Don't expand native and abstract
e64c46ce 19040 methods.
5e942c50
APB
19041 (java_expand_classes): New function.
19042 (resolve_expression_name): Use additional argument ORIG. Retrieve
e64c46ce 19043 values of static final field of primitive types.
5e942c50 19044 (resolve_field_access): Handles static final field of promotive
e64c46ce 19045 type.
5e942c50 19046 (resolve_qualified_expression_name): Handle STRING_CST as
e64c46ce
AJ
19047 primaries and package name resolution. Check deprecation on found
19048 decls. Set where_found and type_found on non static field resolved
19049 during qualification. Layout non primitive field decl types.
5e942c50
APB
19050 (check_deprecation): New function.
19051 (maybe_access_field): Simplified.
19052 (patch_method_invocation_stmt): Local variable CLASS_TYPE
e64c46ce
AJ
19053 removed. Reverse method's argument when primary is a type. Don't
19054 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
19055 instead. Include abstract class in the list of class searchable
19056 for constructors. Use DECL_CONTEXT of found method for access
19057 checks. Check method deprecation.
5e942c50 19058 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
e64c46ce 19059 converting arguments. Handle INVOKE_INTERFACE.
5e942c50 19060 (lookup_method_invoke): Search constructor using existing
e64c46ce 19061 infrastructure (don't rely on lookup_java_constructor anymore).
5e942c50 19062 (find_applicable_accessible_methods_list): Extra argument flag
e64c46ce 19063 LC. Now include constructor in the search.
5e942c50
APB
19064 (qualify_ambiguous_name): Conditional expression are primaries.
19065 (not_initialized_as_it_should_p): static final are always
e64c46ce 19066 initialized.
5e942c50 19067 (java_complete_tree): Pass extra NULL argument to
e64c46ce
AJ
19068 resolve_expression_name. Stricter test to carry on patching
19069 assignments. New case for INSTANCEOF_EXPR.
5e942c50
APB
19070 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
19071 (check_final_assignment, maybe_build_primttype_type_ref): New
e64c46ce 19072 functions.
5e942c50 19073 (patch_assignment): Detect resolved static finals and carry normal
e64c46ce 19074 assignment error check on them. Inline PRIMTYPE.TYPE read access.
5e942c50 19075 (try_builtin_assignconv): Access constant 0 on all primitive
e64c46ce 19076 types.
5e942c50 19077 (valid_builtin_assignconv_identity_widening_p): Accept identical
e64c46ce 19078 types. Accept all promoted type on int type.
5e942c50 19079 (valid_ref_assignconv_cast_p): Accept a null pointer to be
e64c46ce 19080 assigned to a reference.
5e942c50 19081 (valid_method_invocation_conversion_p): Accept to check null
e64c46ce 19082 pointers.
5e942c50 19083 (build_binop): Merge declaration and initialization of local
e64c46ce 19084 variable BINOP.
5e942c50 19085 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
e64c46ce
AJ
19086 numeric types. Improved validity test for qualify operators on
19087 references.
5e942c50 19088 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
e64c46ce
AJ
19089 and PREINCREMENT_EXPR. Also detect resolved static finals of a
19090 primitive type and issue the appropriate error message.
5e942c50
APB
19091 (resolve_type_during_patch): Mark class loaded when resolved.
19092 (patch_cast): Allow null to be cased to reference types.
19093 (build_null_of_type): New function.
19094 (patch_array_ref): Handle array on references correctly.
19095 (patch_return): Removed unused local variable MODIFY. Force
e64c46ce
AJ
19096 boolean to be returned as integers. Allows null to be returned by
19097 a function returning a reference.
5e942c50 19098 * typeck.c (convert_to_integer, convert_to_real,
e64c46ce 19099 convert_to_pointer): Prototypes moved to convert.h
5e942c50
APB
19100 (lookup_argument_method): Use method real name, if necessary.
19101
9cfceb60
TT
191021998-10-30 Tom Tromey <tromey@cygnus.com>
19103
66d88624
TT
19104 * class.c (build_class_ref): Changed name of primitive classes to
19105 start with `_Jv_'.
19106
9cfceb60
TT
19107 * class.c (make_class_data): Renamed fields: nmethods to
19108 method_count, method_count to dtable_method_count. Always set
19109 `state' field to 0.
19110 * decl.c (init_decl_processing): Likewise.
19111
62c9aa5f 191121998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
22eed1e6
APB
19113
19114 * class.c (layout_class): Don't mangle <finit>, produce
e64c46ce 19115 __finit<class> instead. Don't verify artificial methods.
22eed1e6
APB
19116 * decl.c (finit_identifier_node): New declared global.
19117 (init_decl_processing): finit_identifier_node initialized.
19118 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
19119 * java-tree.h (finit_identifier_node): Declared as extern.
19120 (struct lang_decl): New field called_constructor.
19121 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
19122 (CLASS_HAS_FINIT_P): New macro.
19123 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
e64c46ce 19124 explicit constructor invocation.
22eed1e6 19125 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
e64c46ce 19126 CALL_SUPER_CONSTRUCTOR_P): New macros.
22eed1e6
APB
19127 (write_classfile): Added prototype.
19128 * jcf-parse.c (jcf_parse_source): Parse and remember for
e64c46ce 19129 generation if the file was seen on the command line.
22eed1e6
APB
19130 (parse_source_file): Don't write the class file here.
19131 (yyparse): Loop on files rewritten. Set current_jcf.
19132 (parse_zip_file_entries): Parse class file only if it was found.
19133 * lang.c (init_parse): Don't open command line provided filename
e64c46ce 19134 here.
22eed1e6
APB
19135 (lang_parse): Don't set main_jcf anymore.
19136 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
19137 (JCONSTRUCTOR_CHECK): New macro.
19138 (JBSC_TYPE_P): New macro.
19139 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
19140 (COMPLETE_CHECK_OP_2): New macro.
19141 (struct parse_ctxt): New field explicit_constructor_p.
19142 (check_class_interface_creation): Fixed prototype indentation.
19143 (patch_method_invocation_stmt): Prototype reflects added argument.
19144 (patch_invoke): Likewise.
19145 (complete_method_declaration, build_super_invocation,
e64c46ce
AJ
19146 verify_constructor_circularity,
19147 build_this_super_qualified_invocation, get_printable_method_name,
19148 patch_conditional_expr, maybe_generate_finit, fix_constructors,
19149 verify_constructor_super, create_artificial_method,
19150 start_artificial_method_body, end_artificial_method_body,
19151 generate_field_initialization_code): New function prototypes.
22eed1e6
APB
19152 * parse.y: Fixed leading comment
19153 (constructor_header:, constructor_body:, block_end:): Rules tagged
e64c46ce 19154 <node>.
22eed1e6
APB
19155 (type_declaration:): Call maybe_generate_finit.
19156 (method_declaration:): Action for method_body: placed in new
e64c46ce 19157 function complete_method_declaration, called here.
22eed1e6 19158 (constructor_declaration:): Defined actions. Removed leading
e64c46ce 19159 FIXME.
22eed1e6
APB
19160 (constructor_header:): New rule with action.
19161 (constructor_body:): Rule rewritten using block_begin: and
e64c46ce 19162 block_end:. Defined actions.
22eed1e6 19163 (constructor_declarator:, explicit_constructor_invocation:):
e64c46ce 19164 Defined actions.
22eed1e6
APB
19165 (block:): Use new rules block_begin: block_end:.
19166 (block_begin:, block_end:): New rules and actions.
19167 (block_statements:): Fixed error message for explicit
e64c46ce 19168 constructors.
22eed1e6 19169 (method_invocation:): Call build_this_super_qualified_invocation
e64c46ce 19170 if primary is `this' or `super' was seen.
22eed1e6
APB
19171 (conditional_expression:): Action defined.
19172 (extra_ctxp_pushed_p): New static global flag.
19173 (java_parser_context_save_global): Create parser context if
e64c46ce 19174 necessary. Use extra_ctxp_pushed_p to remember it.
22eed1e6 19175 (java_parser_context_restore_global): Pop extra parser context if
e64c46ce 19176 one exists.
22eed1e6 19177 (build_array_from_name): Array on primitive types are marked
e64c46ce 19178 loaded.
22eed1e6 19179 (register_fields): Restore new name in field initializer
e64c46ce
AJ
19180 expression if type was altered. Non static fields initialized upon
19181 declaration marked initialized.
22eed1e6
APB
19182 (maybe_generate_finit): New function.
19183 (maybe_generate_clinit): Use create_artificial_method,
e64c46ce
AJ
19184 start_artificial_method_body, end_artificial_method_body. Generate
19185 debug info for enclosed initialization statements.
22eed1e6 19186 (method_header): Fixed leading comment. Check constructor
e64c46ce
AJ
19187 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
19188 accordingly.
22eed1e6 19189 (complete_method_declaration, constructor_circularity_msg,
e64c46ce 19190 verify_constructor_circularity): New functions.
22eed1e6
APB
19191 (get_printable_method_name): New function.
19192 (check_method_redefinition): Don't rename <finit> methods. Fix
e64c46ce
AJ
19193 declared constructor names. Error message for
19194 constructors modified.
22eed1e6 19195 (java_check_regular_methods): Local variable seen_constructor
e64c46ce
AJ
19196 renamed saw_constructor. Skip verification on constructors. Create
19197 default constructor with create_artificial_method.
22eed1e6
APB
19198 (java_check_methods): Removed unnecessary empty line.
19199 (create_artificial_method, start_artificial_method_body,
e64c46ce 19200 end_artificial_method_body): New functions.
22eed1e6 19201 (java_layout_classes): Changed leading comment. Reverse fields
e64c46ce
AJ
19202 list if necessary. Always layout java.lang.Object if being
19203 defined.
22eed1e6
APB
19204 (java_complete_expand_methods): Verify constructor circularity.
19205 (java_complete_expand_method): Call fix_constructor on
e64c46ce
AJ
19206 constructors. Local variable no_ac_found removed. Restore
19207 bindings if method body expansion failed.
22eed1e6 19208 (fix_constructors, verify_constructor_super,
e64c46ce 19209 generate_field_initialization_code): New function.
22eed1e6 19210 (java_expand_classes): Fixed leading comment. Write class file
e64c46ce 19211 here.
22eed1e6 19212 (resolve_expression_name): Check for illegal instance variable
e64c46ce
AJ
19213 usage within the argument scope of an explicit constructor
19214 invocation.
22eed1e6 19215 (resolve_qualified_expression_name): Pass extra from_super flag
e64c46ce
AJ
19216 when invoking patch_method_invocation_stmt. New case for
19217 conditional expression when used as a primary. Check for error
19218 when acquiring super.
22eed1e6 19219 (patch_method_invocation_stmt): Added extra argument super. New
e64c46ce
AJ
19220 local variable is_static_flag. Set class_to_search according to
19221 the nature of the constructor invocation. Don't add `this'
19222 argument when expanding NEW_CLASS_EXPR. Check for illegal method
19223 invocation within the argument scope of explicit constructor
19224 invocation. Set is_static according to is_static_flag. Provide
19225 extra `super' argument to patch_invoke invocation.
22eed1e6 19226 (patch_invoke): New argument from_super. Loop on arguments
e64c46ce
AJ
19227 indentation fixed. Pass from_super to invocation_mode. New switch
19228 case INVOKE_SUPER. Fixed error message in switch default case.
19229 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
19230 value.
22eed1e6
APB
19231 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
19232 (lookup_method_invoke): Fixed prototypes in candidates list. Error
e64c46ce 19233 message takes constructors into account.
22eed1e6
APB
19234 (find_applicable_accessible_methods_list): Fixed indentation.
19235 (qualify_ambiguous_name): Take explicit constructor invocation
e64c46ce
AJ
19236 into account. Deal with a conditional expression as a primary to
19237 a method call.
22eed1e6 19238 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
e64c46ce
AJ
19239 case. Added extra argument to patch_method_invocation_stmt.
19240 Register calls made to explicit constructor `this'. Don't call
19241 save_expr in ARRAY_REF case when emitting class files. Check for
19242 illegal use of this when expanding explicit constructor invocation
19243 arguments.
22eed1e6 19244 (complete_function_arguments): Set and reset parser context
e64c46ce 19245 explicit_constructor_p field value when appropriate.
22eed1e6 19246 (build_super_invocation, build_this_super_qualified_invocation):
e64c46ce 19247 New functions.
22eed1e6
APB
19248 (patch_assignment): Fixed typo.
19249 (patch_unaryop): Check on final fields occurs only when a decl
e64c46ce 19250 exits.
22eed1e6
APB
19251 (patch_return): Take constructors into account.
19252 (patch_conditional_expr): New function.
19253 * typeck.c (build_java_signature): Removed unnecessary empty line.
f6bbde28 19254
62c9aa5f 192551998-10-28 Jeffrey A Law (law@cygnus.com)
e626b840
JL
19256
19257 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
19258
571d54d5
TT
192591998-10-28 Tom Tromey <tromey@cygnus.com>
19260
19261 * decl.c (init_decl_processing): Renamed fields.
19262 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
19263 interface_len, msize fields.
19264
19265 * class.c (make_class_data): Removed subclass_head and
19266 subclass_next fields.
19267 * decl.c (init_decl_processing): Removed subclass_head and
19268 subclass_next fields.
19269
62c9aa5f 192701998-10-28 Jeffrey A Law (law@cygnus.com)
5ed948ce
JL
19271
19272 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
19273 * mangle.c (emit_unicode_mangled_name): Similarly.
571d54d5 19274
62c9aa5f 192751998-10-26 Nick Clifton <nickc@cygnus.com>
0d17a080
NC
19276
19277 * jcf-parse.c (get_constant): Place braces around code to compute
19278 'd' when REAL_ARITHMETIC is not defined.
19279
62c9aa5f 192801998-10-25 H.J. Lu (hjl@gnu.org)
937293e9
L
19281
19282 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
19283 dependency.
19284
45ae5597
TT
192851998-10-23 Tom Tromey <tromey@cygnus.com>
19286
19287 * lang-specs.h: `.zip' files are input to jc1.
19288
62c9aa5f 192891998-10-22 Per Bothner <bothner@cygnus.com>
172b2240
PB
19290
19291 * jvspecs.c: Add (but don't enable) support for combining multiple
19292 .class and .java input filenames to a single jc1 invocation.
19293 Add support for -C flag (copile to .class files).
19294 Translate -classpath and -CLASSPATH arguments.
19295 * lang-specs.h: Don't set %2 spec.
19296
8603f9c5
TT
192971998-10-22 Tom Tromey <tromey@cygnus.com>
19298
71f6a8e2
TT
19299 * jcf-path.c (add_entry): Don't add trailing separator if entry is
19300 a .zip file.
19301 (add_path): Don't add trailing separator to non-empty path
19302 elements.
19303
19304 * lang.c (lang_decode_option): Check for -fclasspath and
19305 -fCLASSPATH before examining other `-f' options.
19306
f7670760
TT
19307 * java-tree.h (finalize_identifier_node): Don't declare.
19308 * class.c (make_class_data): Don't push "final" field.
19309 * decl.c (init_decl_processing): Don't push "final" field.
19310 (finalize_identifier_node): Removed.
19311 (init_decl_processing): Don't set finalize_identifier_node.
19312
257fafbb
TT
19313 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
19314
62c9aa5f 193151998-10-11 Anthony Green <green@cygnus.com>
257fafbb
TT
19316
19317 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
19318 (JV_SCAN_SOURCES): New macro.
19319 (JCF_DUMP_SOURCES): Likewise.
19320 (jcf-dump$(exeext)): New target.
19321 (jv-scan$(exeext)): New target.
19322
193231998-10-22 Tom Tromey <tromey@cygnus.com>
19324
19325 * Makefile.in (LEX): Removed.
19326 (LEXFLAGS): Likewise.
19327 (SET_BISON): New macro.
19328 (BISON): Removed.
19329 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
19330 spurious diffs in parse.c.
19331 ($(PARSE_SCAN_C)): Likewise.
19332 (PARSE_DIR): New macro.
19333 (PARSE_C): Use it.
19334 (PARSE_SCAN_C): Likewise.
19335 (PARSE_RELDIR): New macro.
19336
19337 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
19338
8603f9c5
TT
19339 * jcf-io.c (find_class): Use saw_java_source to determine when to
19340 look for `.java' file.
19341 * jcf-parse.c (saw_java_source): New global.
19342 (yyparse): Set it if `.java' file seen.
19343
19344 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
19345 (GCJH_SOURCES): Likewise.
19346 * Makefile.in (datadir): New macro.
19347 (libjava_zip): Likewise.
19348 (JAVA_OBJS): Added jcf-path.o.
19349 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19350 (../gcjh$(exeext)): Likewise.
19351 (jcf-path.o): New target.
19352 * java-tree.h (fix_classpath): Removed decl.
19353 * jcf-parse.c (fix_classpath): Removed.
19354 (load_class): Don't call fix_classpath.
19355 * parse.y (read_import_dir): Don't call fix_classpath.
19356 * lex.h: Don't mention classpath.
19357 * lex.c (java_init_lex): Don't initialize classpath.
19358 * jcf-io.c (classpath): Removed global.
19359 (find_class): Use jcf_path iteration functions. Correctly search
19360 class path for .java file.
19361 (open_in_zip): New argument `is_system'.
19362 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
19363 classpath-related options.
19364 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
19365 and -I.
19366 (lang_init): Call jcf_path_init.
19367 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
19368 * lang-specs.h: Handle -I. Minor cleanup to -M options.
19369 Correctly put braces around second string in each entry.
19370 * gjavah.c (main): Call jcf_path_init. Recognize all the new
19371 classpath-related options.
19372 (help): Updated for new options.
19373 * jcf.h: Declare functions from jcf-path.c. Don't mention
19374 `classpath' global.
19375 * jcf-path.c: New file.
19376
19377 * jcf-depend.c: Include jcf.h.
19378
19379 * jcf-write.c (localvar_alloc): Returns `void'.
19380 (localvar_free): Removed unused variable.
19381
19382 * lang.c (OBJECT_SUFFIX): Define if not already defined.
19383 (init_parse): Use OBJECT_SUFFIX, not ".o".
19384
62c9aa5f 193851998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
866e9df8
APB
19386
19387 * class.c (emit_register_classes): Renamed from
e64c46ce 19388 emit_register_class.
866e9df8 19389 * java-tree.h (emit_register_classes): Prototype renamed from
e64c46ce 19390 emit_register_class.
866e9df8 19391 * jcf-parse.c (yyparse): Call emit_register_classes once before
e64c46ce 19392 returning.
866e9df8
APB
19393 * parse.y (java_expand_classes): No longer register classes.
19394
62c9aa5f 193951998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
b351b287
APB
19396
19397 * class.c (is_compiled_class): New local variable
e64c46ce
AJ
19398 seen_in_zip. Identify classes found in currently compiled source
19399 file(s).
b351b287
APB
19400 * decl.c (complete_start_java_method): Fixed typo.
19401 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
e64c46ce 19402 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
b351b287
APB
19403 (CLASS_P): Moved around.
19404 (java_parse_abort_on_error): Macro moved from jcf-parse.c
19405 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
27e928ed 19406 java-tree.h
b351b287 19407 (jcf_parse_source): Changed leading comment. Removed unnecessary
e64c46ce 19408 fclose and CLASS_FROM_SOURCE_P marking.
b351b287 19409 (parse_source_file): New local variables remember_for_generation
e64c46ce
AJ
19410 and filename. Mark parsed file name identifier node. Removed block
19411 executed when parse_only was null. Set remember_for_generation.
b351b287
APB
19412 Use it as an argument to java_pop_parser_context.
19413 (yyparse): New local variables several_files, list, next node and
e64c46ce
AJ
19414 current_file_list. Split ampersand separated file names into
19415 current_file_list. Iterate through the list and parse accordingly.
b351b287
APB
19416 * parse.h (java_pop_parser_context): New function prototype.
19417 * parse.y (ctxp_for_generation): New static global variable.
19418 (java_pop_parser_context): New argument generate. Link popped ctxp
e64c46ce 19419 to ctxp_for_generation list accordingly.
b351b287
APB
19420 (java_complete_expand_methods): Fixed indentation.
19421 (java_expand_classes): New function.
f6bbde28 19422
62c9aa5f 194231998-10-17 Per Bothner <bothner@cygnus.com>
f9d48c82
PB
19424
19425 * Makefile.in: Link with libiberty.a instead of memmove.o.
19426
62c9aa5f 194271998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
c583dd46
APB
19428
19429 * lex.c (setjmp.h): No longer included.
19430 * lex.h (setjmp.h): Included.
19431 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
19432 (duplicate_declaration_error_p): Renamed from
e64c46ce 19433 duplicate_declaration_error.
c583dd46
APB
19434 (build_array_from_name): New function prototype.
19435 * parse.y (setjmp.h): No longer included.
19436 (variable_declarator_id): Define action.
19437 (build_array_from_name): New function.
19438 (duplicate_declaration_error_p): Renamed from
e64c46ce 19439 duplicate_declaration_error. Fixed leading comment.
c583dd46 19440 (register_fields): Main `for' loop reorganized. Uses
e64c46ce 19441 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
c583dd46 19442 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
e64c46ce 19443 build_array_from_name.
c583dd46 19444 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
e64c46ce 19445 types.
c583dd46
APB
19446 (read_import_dir): Don't try to skip `.' and `..'.
19447 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
e64c46ce 19448 build_array_from_name. Main `for' loop reorganized.
c583dd46 19449 (resolve_qualified_expression_name): When building access to a
e64c46ce 19450 field, use the type where the field was found, not its own type.
c583dd46 19451 (maybe_access_field): Use field DECL_CONTEXT if the type where the
e64c46ce 19452 field was found is null.
c583dd46 19453 (qualify_ambiguous_name): Sweep through all successive array
e64c46ce 19454 dimensions.
f6bbde28 19455
62c9aa5f 194561998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
0a2138e2
APB
19457
19458 * java-tree.h (pop_labeled_block, lang_printable_name,
e64c46ce
AJ
19459 maybe_add_interface, set_super_info, get_access_flags_from_decl,
19460 interface_of_p, inherits_from_p, fix_classpath,
19461 complete_start_java_method, emit_handlers, init_outgoing_cpool,
19462 make_class_data, register_class, alloc_name_constant): New
19463 function prototypes.
0a2138e2 19464 * lang.c (lang_decode_option): Set argc argument unused. Fixed
e64c46ce 19465 indentation. Added cast to remove warning.
0a2138e2
APB
19466 (lang_printable_name): Set v argument unused.
19467 (lang_print_error): Added argument to lang_printable_name call.
19468 (java_dummy_print, print_lang_decl, print_lang_type,
e64c46ce
AJ
19469 print_lang_identifier, lang_print_xnode): All argument marked
19470 unused.
0a2138e2
APB
19471 * lex.c (java_unget_unicode): Removed unnecessary argument.
19472 (java_allocate_new_line): Unused local variable is gone.
19473 (java_read_char): Added parenthesis in expressions to remove
e64c46ce 19474 warnings. Added final return statement.
0a2138e2 19475 (java_read_unicode): Added parenthesis in expression to remove
e64c46ce 19476 warning.
0a2138e2
APB
19477 (java_parse_end_comment): Fixed java_unget_unicode invocation.
19478 (java_parse_escape_sequence): Likewise.
19479 (java_lex): Unused local variables are gone. Fixed
e64c46ce 19480 java_unget_unicode invocation.
0a2138e2 19481 * lex.h (set_float_handler): Prototype added when JC1_LITE not
e64c46ce 19482 defined.
0a2138e2 19483 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
e64c46ce 19484 lang_printable_name invocation in macro.
0a2138e2 19485 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
e64c46ce 19486 Likewise.
0a2138e2 19487 (duplicate_declaration_error): Suppressed unused argument in
e64c46ce 19488 prototype.
0a2138e2
APB
19489 (identical_subpath_p): Function declaration is gone.
19490 (patch_invoke): Suppressed unused argument in prototype.
19491 (patch_cast, build_labeled_block, check_thrown_exceptions):
e64c46ce 19492 Likewise.
0a2138e2
APB
19493 * parse.y (setjmp.h): Included
19494 (toplev.h): Likewise.
19495 (field_declaration:): Suppressed unused local
19496 (label_decl:): Fixed build_labeled_block invocation.
19497 (java_pop_parser_context): Put extra parenthesis around assignment
e64c46ce 19498 in if.
0a2138e2
APB
19499 (yyerror): Suppressed unused local variables.
19500 (variable_redefinition_error): Fixed lang_printable_name
e64c46ce 19501 invocation.
0a2138e2
APB
19502 (create_interface): Suppressed unused local variables.
19503 (create_class): Likewise.
19504 (duplicate_declaration_error): Suppressed unused argument. Fixed
e64c46ce 19505 lang_printable_name invocation.
0a2138e2 19506 (register_fields): Suppressed unused local variable. Fixed
e64c46ce 19507 duplicate_declaration_error invocation.
0a2138e2
APB
19508 (method_header): Suppressed unused local variable.
19509 (method_declarator, parser_check_super): Likewise.
19510 (java_complete_class): Suppressed unused local variable. Fixed
e64c46ce 19511 fatal error message.
0a2138e2
APB
19512 (complete_class_report_errors): Added default: in switch.
19513 (java_check_regular_methods): Fixed lang_printable_name
e64c46ce 19514 invocations.
0a2138e2
APB
19515 (check_throws_clauses): Likewise.
19516 (java_check_abstract_methods): Suppressed unused local
e64c46ce 19517 variable. Fixed lang_printable_name invocation.
0a2138e2
APB
19518 (read_import_entry): Added supplemental return statement.
19519 (read_import_dir): Suppressed unused local variables.
19520 (check_pkg_class_access, declare_local_variables): Likewise.
19521 (source_start_java_method): Suppressed unused extern variable
e64c46ce 19522 declarations
0a2138e2 19523 (expand_start_java_method): Suppressed unused extern and local
e64c46ce 19524 variable declarations.
0a2138e2
APB
19525 (java_complete_expand_methods): Likewise.
19526 (java_complete_expand_method): Suppressed unused local variables.
19527 (make_qualified_name): Likewise.
19528 (resolve_qualified_expression_name): Added default: in
e64c46ce 19529 switch. Fixed lang_printable_name invocation.
0a2138e2 19530 (class_instance_creation_expression): Added parenthesis around
e64c46ce 19531 expressions.
0a2138e2 19532 (patch_method_invocation_stmt): Fixed lang_printable_name and
e64c46ce 19533 patch_invoke invocations.
0a2138e2 19534 (check_for_static_method_reference): Fixed lang_printable_name
e64c46ce 19535 invocation.
0a2138e2
APB
19536 (patch_invoke): Suppressed unused arguments and local variables.
19537 (lookup_method_invoke): Suppressed unused local variables.
19538 (qualify_ambiguous_name): Added default: in switch.
19539 (identical_subpath_p): Function removed.
19540 (patch_assignment): Suppressed unused local variables. Suppressed
e64c46ce 19541 unnecessary if statement. Fixed lang_printable_name invocations.
0a2138e2
APB
19542 (try_builtin_assignconv): Fixed lang_printable_name invocations.
19543 (valid_ref_assignconv_cast_p): Parenthesis around
e64c46ce 19544 expression. Suppressed unused local variables.
0a2138e2 19545 (build_binop): Suppressed unused local variables. fixed
e64c46ce 19546 lang_printable_name invocations.
0a2138e2 19547 (string_constant_concatenation): Suppressed unused local
e64c46ce 19548 variables.
0a2138e2
APB
19549 (patch_unaryop): Fixed lang_printable_name invocation.
19550 (patch_cast): Suppressed unnecessary argument. Fixed
e64c46ce 19551 lang_printable_name invocation.
0a2138e2
APB
19552 (patch_array_ref): Fixed lang_printable_name invocation.
19553 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19554 (build_labeled_block): Suppressed unused argument.
19555 (generate_labeled_block): Fixed build_labeled_block invocation.
19556 (build_loop_body): Suppressed unused local variables.
19557 (patch_loop_statement): Likewise.
19558 (patch_exit): Fixed lang_printable_name invocation.
19559 (patch_switch_statement): Likewise.
19560 (case_identity): First argument marked unused.
19561 (patch_try_statement): Fixed lang_printable_name invocations.
19562 (patch_synchronized_statement, patch_throw_statement): Likewise.
19563 (check_thrown_exceptions): Fixed check_thrown_exceptions and
e64c46ce 19564 lang_printable_name invocations.
0a2138e2
APB
19565 (check_thrown_exceptions_do): Suppressed unused argument.
19566
fc45c7ef
TT
195671998-10-14 Tom Tromey <tromey@cygnus.com>
19568
19569 * jcf-write.c (write_classfile): Add output class file as target.
19570 * lang-options.h: Added -MD, -MMD, -M, and -MM.
19571 * jcf.h: Added declarations for dependency-tracking functions.
19572 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19573 * lang.c (lang_decode_option): Recognize -MD and -MMD.
19574 (finish_parse): Call jcf_dependency_write.
19575 (dependency_tracking): New global.
19576 (DEPEND_SET_FILE): New define.
19577 (DEPEND_ENABLE): New define.
19578 (init_parse): Enable dependency tracking if required.
19579 Include "flags.h".
19580 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19581 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19582 (../gcjh$(exeext)): Likewise.
19583 (jcf-depend.o): New target.
19584 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19585 (GCJH_SOURCES): Likewise.
19586 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
19587 dep_name argument.
19588 (find_classfile): Added dep_name argument.
19589 (find_class): Compute name of dependency.
19590 (open_in_zip): Call jcf_dependency_add_file.
19591 * gjavah.c (output_file): No longer global.
19592 (usage): Don't mention "gjavah".
19593 (help): Likewise.
19594 (java_no_argument): Likewise.
19595 (version): Likewise.
19596 (main): Recognize and handle -M family of options.
19597 (print_mangled_classname): Return is void.
19598 (process_file): Handle case where output is suppressed.
19599 (HANDLE_END_FIELD): Likewise.
19600 (HANDLE_METHOD): Likewise.
19601 * jcf-depend.c: New file.
19602
62c9aa5f 196031998-10-13 Jeffrey A Law (law@cygnus.com)
bcf6c7e3
JL
19604
19605 * java-tree.def: Add missing newline at EOF.
19606
0a65887a
TT
196071998-10-13 Tom Tromey <tromey@cygnus.com>
19608
19609 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19610 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
19611 function.
19612 Include <config.h> and "system.h".
19613 (disassemble_method): Undefine RET to avoid clash with
19614 config/i386/i386.h.
19615
62c9aa5f 196161998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
b9f7e36c
APB
19617
19618 * decl.c (runtime_exception_type_node, error_exception_type_node):
e64c46ce 19619 New global variables.
b9f7e36c
APB
19620 (init_decl_processing): Initialized.
19621 * expr.c (java_lang_expand_expr): Set caught exception type to
e64c46ce 19622 null if catch handler argument doesn't exit.
b9f7e36c 19623 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
e64c46ce 19624 tree codes.
b9f7e36c 19625 * java-tree.h (runtime_exception_type_node,
e64c46ce 19626 error_exception_type_node): Global variables declared.
b9f7e36c
APB
19627 (DECL_FUNCTION_THROWS): New macro.
19628 (DECL_FUNCTION_BODY): Modified comment.
19629 (DECL_SPECIFIC_COUNT): Likewise.
19630 (struct lang_decl): New field throws_list.
19631 (IS_UNCHECKED_EXPRESSION_P): New macro.
19632 * lex.c (java_lex): Generate location information for THROW_TK.
19633 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
e64c46ce 19634 EXCEPTIONS_P): New macros.
b9f7e36c
APB
19635 (enum jdep_code): New value JDEP_EXCEPTION.
19636 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
e64c46ce
AJ
19637 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19638 PATCH_METHOD_RETURN_ERROR): New macros.
b9f7e36c
APB
19639 (patch_method_invocation_stmt): Added new argument to prototype.
19640 (patch_synchronized_statement, patch_throw_statement,
e64c46ce
AJ
19641 check_thrown_exceptions, check_thrown_exceptions_do,
19642 purge_unchecked_exceptions, check_throws_clauses): New function
19643 prototypes.
b9f7e36c
APB
19644 * parse.y Fixed typo in keyword section.
19645 (throw:): Rule tagged <node>.
19646 (THROW_TK): Keyword tagged <operator>.
19647 (method_header:): Last argument to call to method_header passed
e64c46ce 19648 from throws: rule.
b9f7e36c 19649 (throws:, class_type_list:, throw_statement:,
e64c46ce 19650 synchronized_statement:, synchronized:): Defined actions.
b9f7e36c 19651 (method_header): New local variable current. Register exceptions
e64c46ce 19652 from throws clause.
b9f7e36c 19653 (java_complete_tree): Complete and verify exceptions from throws
e64c46ce 19654 clause.
b9f7e36c 19655 (complete_class_report_errors): Error message on exceptions not
e64c46ce 19656 found
b9f7e36c 19657 (java_check_regular_methods): Fixed typo. Shortcut on private
e64c46ce
AJ
19658 overriding methods. Changed error message on method
19659 redefinition. Check for throws clause compatibility.
b9f7e36c
APB
19660 (check_throws_clauses): New function.
19661 (java_check_abstract_methods): Use DECL_NAME for wfl or current
e64c46ce 19662 method. Changed error message on method redefinition.
b9f7e36c
APB
19663 (currently_caught_type_list): New static variable.
19664 (java_complete_expand_methods): Purge unchecked exceptions from
e64c46ce
AJ
19665 throws clause list. Call PUSH_EXCEPTIONS before walk and
19666 POP_EXCEPTIONS after.
b9f7e36c 19667 (resolve_qualified_expression_name): Pass new argument as NULL to
e64c46ce 19668 patch_method_invocation_stmt.
b9f7e36c 19669 (patch_method_invocation_stmt): New argument ref_decl. Invoke
e64c46ce
AJ
19670 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19671 argument list when appropriate. Use new argument if non null to
19672 store selected method decl.
b9f7e36c 19673 (patch_invoke): Convert if necessary args of builtin types before
e64c46ce 19674 forming CALL_EXPR. Argument list no longer reversed here.
b9f7e36c
APB
19675 (invocation_mode): Treat final methods as static methods.
19676 (java_complete_tree): New cases for THROW_EXPR: and
e64c46ce
AJ
19677 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19678 function call.
b9f7e36c 19679 (complete_function_arguments): No more RECORD_TYPE
e64c46ce 19680 conversion. Function parameter nodes no longer saved.
b9f7e36c
APB
19681 (valid_ref_assignconv_cast_p): Avoid handling null type.
19682 (patch_binop): Fixed null constant reference handling.
19683 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
e64c46ce 19684 BUILD_THROW macros.
b9f7e36c 19685 (patch_try_statement): Fixed comments. Record caught types in
e64c46ce 19686 list, push the list, expand try block and pop the list.
b9f7e36c 19687 (patch_synchronized_statement, patch_throw_statement,
e64c46ce
AJ
19688 check_thrown_exceptions, check_thrown_exceptions_do,
19689 purge_unchecked_exceptions): New functions.
b9f7e36c 19690 * typeck.c (lookup_argument_method): Allow WFL in place of method
e64c46ce 19691 DECL_NAME during method definition check
f6bbde28 19692
6d6044b0
PB
196931998-10-09 Tom Tromey <tromey@cygnus.com>
19694
19695 * gjavah.c (decode_signature_piece): New function.
19696 (print_c_decl): Use it. Added `name_override' argument.
19697 (print_method_info): Use name_override argument to print_c_decl.
19698 (seen_fields): Removed.
19699 (print_field_info): Don't update seen_fields.
19700 (struct method_name): New structure.
19701 (method_name_list): New global.
19702 (print_method_info): Add new method to list of methods.
19703 (name_is_method_p): New function.
19704 (print_field_info): If field name has same name as method, then
19705 change field name.
19706 (process_file): Parse methods before fields.
19707 (field_pass): New global.
19708 (HANDLE_END_FIELD): Take field_pass into account.
19709
62c9aa5f 197101998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13abbf47
KG
19711
19712 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19713 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19714
62c9aa5f 197151998-10-03 Anthony Green <green@cygnus.com>
6d6044b0
PB
19716
19717 * jvspec.c: Fix bug in jvgenmain_spec patch.
19718
62c9aa5f 197191998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
19720
19721 * Makefile.in (lang.o:): Install dependency on java-tree.def.
19722 * decl.c (soft_exceptioninfo_call_node): New global variable.
19723 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
e64c46ce
AJ
19724 takes extra integer argument. soft_exceptioninfo_call_node
19725 initialized.
6d6044b0
PB
19726 * except.c (java_set_exception_lang_code): New function
19727 (method_init_exceptions): Called here.
19728 (prepare_eh_table_type): New function.
19729 (expand_end_java_handler): Called here.
19730 * expr.c (build_java_throw_out_of_bounds_exception): Now features
e64c46ce
AJ
19731 one argument. Modified generation of call to
19732 soft_badarrayindex_node to use new argument.
6d6044b0 19733 (build_java_arrayaccess): Pass faulty index value to
e64c46ce 19734 build_java_throw_out_of_bounds_exception.
6d6044b0
PB
19735 (generate_name): New function.
19736 (java_lang_expand_expr): New local variables node, current,
e64c46ce 19737 has_finally_p. Expand TRY_EXPR node.
6d6044b0 19738 (process_jvm_instruction): Replace top of the stack with thrown
e64c46ce 19739 object reference when entering exception handler.
6d6044b0 19740 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
e64c46ce 19741 specific tree codes.
6d6044b0 19742 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
e64c46ce 19743 global.
6d6044b0
PB
19744 (DECL_SPECIFIC_COUNT): New macro.
19745 (prepare_eh_table_type, java_set_exception_lang_code,
e64c46ce 19746 generate_name): New function declarations.
6d6044b0
PB
19747 (match_java_method): Declaration deleted.
19748 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
e64c46ce 19749 macros.
6d6044b0
PB
19750 * lex.c (TRY_TK, CATCH_TK): Generate location information.
19751 * parse.h (redefinition_error, refine_accessible_methods_list,
e64c46ce 19752 can_cast_to_p): Function declaration removed.
6d6044b0 19753 (classitf_redefinition_error, variable_redefinition_error,
e64c46ce
AJ
19754 parse_jdk1_1_error, find_applicable_accessible_methods_list,
19755 find_most_specific_methods_list, argument_types_convertible,
19756 enter_a_block, valid_builtin_assignconv_identity_widening_p,
19757 valid_cast_to_p, valid_method_invocation_conversion_p,
19758 try_reference_assignconv, add_stmt_to_compound,
19759 build_jump_to_finally, build_tree_list, patch_try_statement,
19760 java_get_catch_block): New function declarations.
6d6044b0
PB
19761 * parse.y (string_buffer_type): Global variable deleted.
19762 (group_of_labels, catches, catch_clause, catch_clause_parameter,
e64c46ce 19763 finally): Rules tagged <node>.
6d6044b0
PB
19764 (TRY_TK, CATCH_TK): Token tagged <operator>.
19765 (class_body_declaration:, class_member_declaration:,
e64c46ce
AJ
19766 formal_parameter:, explicit_constructor_invocation:,
19767 interface_member_declaration:, constant_declaration:,
19768 primary_no_new_array:, class_instance_creation_expression:,
19769 array_creation_expression:): Issue error on unsuported JDK1.1
19770 features.
6d6044b0
PB
19771 (try_statement:, catches:, finally:): Define actions.
19772 (catch_clause_parameter): New rule.
19773 (catch_clause:): Use new rule catch_clause_parameter.
19774 (parse_jdk1_1_error): New function.
19775 (redefinition_error): Renamed classitf_redefinition_error.
19776 (variable_redefinition_error): New function.
19777 (check_class_interface_creation): Call
e64c46ce 19778 classitf_redefinition_error.
6d6044b0
PB
19779 (java_complete_tree): Added error message on JDEP_TYPE: case.
19780 (complete_class_report_errors): Fixed indentation.
19781 (declare_local_variables): Call variable_redefinition_error.
19782 (source_end_java_method): Call java_set_exception_lang_code and
e64c46ce 19783 emit_handlers where appropriate.
6d6044b0
PB
19784 (java_method_add_stmt): Call add_stmt_to_block.
19785 (add_stmt_to_block): New function.
19786 (lookup_method_invoke): Fixed outside comment. new local variable
e64c46ce
AJ
19787 candicates. Call find_applicable_accessible_methods_list and
19788 find_most_specific_methods_list when searching for a
19789 method. Modified error report to list possible candidates when
19790 applicable.
6d6044b0 19791 (find_applicable_accessible_methods_list,
e64c46ce
AJ
19792 find_most_specific_methods_list, argument_types_convertible): New
19793 function.
6d6044b0
PB
19794 (refine_accessible_methods_list): Function deleted.
19795 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
e64c46ce 19796 expr (if applicable) before calling patch_array_ref.
6d6044b0
PB
19797 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19798 (enter_block): Fixed comment.
19799 (enter_a_block): New function.
19800 (patch_assignment): Reorganized. Call try_reference_assignconv for
e64c46ce 19801 references. Call valid_cast_to_p instead of can_cast_to_p.
6d6044b0 19802 (try_reference_assignconv,
e64c46ce 19803 valid_builtin_assignconv_identity_widening_p): New functions.
6d6044b0
PB
19804 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19805 (valid_cast_to_p, valid_method_invocation_conversion_p): New
e64c46ce 19806 functions.
6d6044b0
PB
19807 (build_string_concatenation): Don't resolve StringBuffer.
19808 (patch_cast): Fixed inverted arguments.
19809 (patch_array_ref): Code to save array expr deleted. Call
e64c46ce 19810 valid_cast_to_p instead of can_cast_to_p.
6d6044b0
PB
19811 (generate_labeled_block): Call generate_name.
19812 (build_jump_to_finally, build_try_statement, java_get_catch_block,
e64c46ce 19813 patch_try_statement): New functions.
6d6044b0 19814 * typeck.c (match_java_method): Function deleted.
f6bbde28 19815
62c9aa5f 198161998-10-02 Anthony Green <green@cygnus.com>
6d6044b0
PB
19817
19818 * jvspec.c: jvgenmain_spec uses different temporary file names.
19819
62c9aa5f 198201998-10-02 Anthony Green <green@cygnus.com>
6d6044b0
PB
19821
19822 * jvspec.c (lang_specific_driver): Fail if user specifies
19823 --main= when not linking.
19824
62c9aa5f 198251998-09-28 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19826
19827 * class.c (make_class_data): Push value for `thread' field.
19828 * decl.c (init_decl_processing): Added `thread' field to class.
19829
19830 * class.c (add_field): Always make static fields externally
19831 visible.
19832
62c9aa5f 198331998-09-26 Anthony Green <green@cygnus.com>
6d6044b0
PB
19834
19835 * expr.c (build_java_athrow,
19836 build_java_throw_out_of_bounds_exception, expand_invoke,
19837 build_newarray, expand_java_multianewarray, build_java_monitor):
19838 Update comments to reflect _Jv_* function names.
19839
62c9aa5f 198401998-09-25 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19841
19842 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
19843 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
19844 * parse.y (expand_start_java_method): Likewise.
19845
62c9aa5f 198461998-09-24 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19847
19848 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
19849
19850 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
19851 (add_field): No longer need to convert from RECORD_TYPE to pointer,
19852 * expr.c: Remove no-longer-needed calls to promote_type.
19853 * decl.c (give_name_to_locals): Liekwise.
19854 * jcf-parse.c (get_class_constant): Compensate for new signatures.
19855 * parse.y: Add/remove promote_type calls as appropriate.
19856 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
19857 (parse_signature_string): Likewise.
e64c46ce 19858 (build_java_array_type): Fix for now signature convenions.
6d6044b0
PB
19859
19860 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
19861
62c9aa5f 198621998-09-23 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19863
19864 * class.c (init_class_processing): libjava function renamed to
19865 _Jv_RegisterClass.
19866
62c9aa5f 198671998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
19868
19869 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
19870 * java-tree.def: Fixed DEFTREECODE third argument.
19871 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
e64c46ce 19872 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
6d6044b0
PB
19873 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
19874 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
e64c46ce 19875 JAVA_THIS_EXPR): Now replaced by tree code definitions.
6d6044b0
PB
19876 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
19877 * lang.c (java_tree_code_type, java_tree_code_length,
e64c46ce 19878 java_tree_code_name): New arrays.
6d6044b0
PB
19879 (lang_init): Append Java tree node definitions to Gcc ones.
19880 * lex.c (expression_obstack): Declared as extern when JC1_LITE
e64c46ce 19881 defined.
6d6044b0 19882 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
e64c46ce 19883 wfl_to_string.
6d6044b0 19884 (java_lex): Allow declaration of empty string constants. Retain
e64c46ce 19885 location information on CASE_TK and DEFAULT_TK.
6d6044b0 19886 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
e64c46ce
AJ
19887 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
19888 Modified to be more robust.
6d6044b0
PB
19889 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
19890 (build_new_invocation, try_builtin_assignconv,
e64c46ce
AJ
19891 patch_switch_statement, string_constant_concatenation,
19892 build_string_concatenation, patch_string_cst, patch_string,
19893 java_expand_switch): New function declarations.
6d6044b0
PB
19894 * parse.y: Rules related to switch and EH tagged <node>.
19895 (label_id): Set to NULL_TREE
19896 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
e64c46ce 19897 tree nodes.
6d6044b0
PB
19898 (this_or_super:): Fixed indentation.
19899 (statement:, statement_nsi:, statement_without_trailing_substatement:,
e64c46ce 19900 statement_expression:): Removed call to RULE on all sub-rules.
6d6044b0
PB
19901 (switch_expression:, switch_labels:): New rules.
19902 (switch_statement:, switch_block:, switch_block_statement_groups:,
e64c46ce
AJ
19903 switch_block_statement_group:, switch_labels:, switch_label:):
19904 Defined actions.
6d6044b0 19905 (throw_statement:, synchronized_statement:, try_statement:):
e64c46ce 19906 Defined temporary actions.
6d6044b0 19907 (class_instance_creation_expression:): Call
e64c46ce 19908 build_new_invocation. Fixed indentation.
6d6044b0
PB
19909 (field_access): Fixed indentation.
19910 (method_invocation): Likewise.
19911 (make_qualified_primary): Use THIS_EXPR.
19912 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
e64c46ce 19913 resolving from SUPER, set *type_found.
6d6044b0
PB
19914 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
19915 (java_complete_tree): Removed unused local variable `location'. Case
e64c46ce
AJ
19916 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
19917 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
19918 on MODIFY_EXPR: and all binary operator tree code cases. Removed
19919 STRING_CST: case. default: checks for patchable strings.
6d6044b0 19920 (complete_function_arguments): Transform string constant or
e64c46ce 19921 crafted StringBuffer if necessary.
6d6044b0
PB
19922 (build_method_invocation): Fixed comments.
19923 (build_new_invocation): New function.
19924 (patch_assignment): Call try_builtin_assignconv to figure a valid
e64c46ce 19925 assignment conversion between builtin types.
6d6044b0
PB
19926 (try_builtin_assignconv): New function.
19927 (build_binop): Use URSHIFT_EXPR directly to call build.
19928 (operator_string): Use UNARY_PLUS_EXPR.
19929 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
e64c46ce 19930 operator.
6d6044b0 19931 (do_merge_string_cste, merge_string_cste,
e64c46ce
AJ
19932 string_constant_concatenation, build_string_concatenation,
19933 patch_string, patch_string_cst): New function.
6d6044b0
PB
19934 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
19935 (patch_unaryop): Likewise. New test of valid ++/-- operands.
19936 (build_newarray_node): Use NEW_ARRAY_EXPR.
19937 (build_this): Use THIS_EXPR.
19938 (build_return): Enable debug information on return statement.
19939 (build_if_else_statement): Likewise.
19940 (complete_labeled_statement): Fixed related comment.
19941 (build_loop_body): Fixed comment.
19942 (build_bc_statement): Enable debug information on break/continue
e64c46ce 19943 statements.
6d6044b0 19944 (patch_bc_statement): Fixed typos. Handle SWITCH statement
e64c46ce 19945 context.
6d6044b0 19946 (patch_switch_statement, case_identity, java_expand_switch): New
e64c46ce 19947 functions.
6d6044b0 19948
62c9aa5f 199491998-09-21 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19950
19951 * buffer.h (BUFFER_INIT): New macro.
19952 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
19953 Pass (struct jcf_partial *state) to most functions.
19954 (jcf_block, jcf_relocation): New types.
19955 Support labels, branches, conditionals, loops.
19956
62c9aa5f 199571998-09-21 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19958
19959 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
19960
62c9aa5f 199611998-09-21 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19962
19963 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
19964 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
19965 not integer_type_node (INT_TYPE_SIZ bits).
19966
19967 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
19968
19969 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
19970 * jcf-dump.c (print_exception_table): New function.
19971 (disassemble_method): Better handling of wide instructions.
19972 Make more robust for bad input.
19973
62c9aa5f 199741998-09-30 Jeffrey A Law (law@cygnus.com)
4f01de5c
JL
19975
19976 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
19977 FreeBSD.
19978
62c9aa5f 199791998-09-17 Jeffrey A Law (law@cygnus.com)
da4f7dc1
JL
19980
19981 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
19982
62c9aa5f 199831998-09-17 Tom Tromey <tromey@cygnus.com>
4a4a4682
TT
19984
19985 * Makefile.in ($(PARSE_H)): Removed target.
19986
62c9aa5f 199871998-09-17 Jeffrey A Law (law@cygnus.com)
e6a480d3
JL
19988
19989 * Makefile.in (JAVA_OBJS): Add memmove.o
19990 (memmove.o): New target & rules.
19991
62c9aa5f 199921998-09-15 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19993
19994 * expr.c (expand_invoke): Don't generate a call to the class init
19995 code.
19996
62c9aa5f 199971998-09-14 Jeffrey A Law (law@cygnus.com)
1f43f4b4
JL
19998
19999 * Makefile.in: Add many missing dependencies.
20000 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
20001 as appropriate.
20002 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
20003 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
20004
62c9aa5f 200051998-09-11 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20006
20007 * decl.c (complete_start_java_method): If method is static (and
20008 not private) call _Jv_InitClass.
20009 * expr.c (expand_invoke): Don't call build_class_init.
20010
20011 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
20012
62c9aa5f 200131998-09-10 Jeffrey A Law (law@cygnus.com)
76f42086
JL
20014
20015 * Make-lang.in (GCJ): Define before using.
20016
62c9aa5f 200171998-09-09 Jeffrey A Law (law@cygnus.com)
71d05349
JL
20018
20019 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
20020 losing due to namespace pollution in GNU getopt.h
20021
62c9aa5f 200221998-09-09 Tom Tromey <tromey@cygnus.com>
232e6c7c
TT
20023
20024 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
20025 (java.all.cross): Likewise.
20026 (java.rest.encap): Likewise.
20027
62c9aa5f 200281998-09-08 Jeffrey A Law (law@cygnus.com)
e742fecc
JL
20029
20030 * gjavah.c (print_class_decls): Fix thinko in arglist
20031 * jcv-io.c (find_classfile): Similarly.
20032
62c9aa5f 200331998-09-07 Jeffrey A Law (law@cygnus.com)
5db17173
JL
20034
20035 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
20036
62c9aa5f 200371998-09-05 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20038
20039 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
20040 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
20041 * Makefile.in (PARSE_C): New macro.
20042 (PARSE_H): Likewise.
20043 (PARSE_SCAN_C): Likewise.
20044 ($(PARSE_C)): Target renamed from parse.c.
20045 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
20046 (clean): Remove parse-scan.c as well.
20047 (parse.o): Depend on $(PARSE_C).
20048
62c9aa5f 200491998-09-05 Anthony Green <green@cygnus.com>
6d6044b0
PB
20050
20051 * README, license.terms: Removed.
20052
20053 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
20054 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
20055 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
20056 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
20057 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
20058 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
20059 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
20060 and Java trademark attribution.
20061
62c9aa5f 200621998-09-04 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20063
20064 * Makefile.in: Use gcjh, not gjavah.
20065 * config-lang.in (stagestuff): Use gcjh, not gjavah.
20066 * Make-lang.in: Changed gjavah to gcjh everywhere.
20067
62c9aa5f 200681998-09-03 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20069
20070 * gjavah.c: Support new -prepend -add -append flags.
f6bbde28 20071 (print_method_info): Method is not virtual if class is final.
6d6044b0 20072
62c9aa5f 200731998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20074
20075 * jv-scan.c: Fixed copyright assignment.
20076 * keyword.gperf: Likewise.
20077 * keyword.h: Likewise.
20078 * lex.c: Fixed copyright assignment.
20079 (java_lex): Push unicode back when parsing '<'.
20080 * lex.h: Fixed copyright assignment.
20081 * parse-scan.y: Likewise.
20082 * parse.h: Fixed copyright assignment.
20083 (build_debugable_stmt, complete_for_loop): New function prototypes.
20084 * parse.y: Fixed copyright assignment.
20085 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
e64c46ce 20086 size_zero_node when completing a loop with no exit condition.
6d6044b0
PB
20087 (for_statement_nsi:): Define action.
20088 (for_init:, for_update:): Return size_zero_node when empty.
20089 (declare_local_variables): Call build_debugable_stmt.
20090 (build_debugable_stmt): New function.
20091 (build_loop_body): Build debugable statement around loop
e64c46ce 20092 condition part.
6d6044b0
PB
20093 (complete_loop_body): Take into account the debugable statement
20094 around the EXIT_EXPR.
20095 (complete_loop_body): New function.
20096 (patch_exit_expr): Fixed condition inversion.
20097
62c9aa5f 200981998-09-02 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20099
20100 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
20101 name of thread define.
20102 * jvspec.c (THREAD_NAME): New macro.
20103 (GCLIB): Likewise.
20104 (THREADLIB): Likewise.
20105 (lang_specific_driver): Recognize attempt to link with thread
20106 library or gc library. Recognize -ljava on command line so it
20107 isn't linked against more than once.
20108
62c9aa5f 201091998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20110
20111 * parse-scan.y (report_main_declaration): Name of the class
e64c46ce 20112 containing `main' can be a qualified name.
6d6044b0 20113
62c9aa5f 201141998-08-31 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20115
20116 * config-lang.in: Changed gjavac to gjc everywhere.
20117 * Make-lang.in: Changed gjavac to gjc everywhere.
20118
62c9aa5f 201191998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20120
20121 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
20122 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
20123 and install the files.
20124 * Makefile.in (JAVA_OBJS_LITE): New variable.
20125 (compiler:): Now include jv-scan as a dependency.
20126 (../jv-scan$(exeext), parse-scan.c): New targets.
20127 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
20128 * config-lang.in (compilers): Removed gcj, gjavah from the list.
20129 * jcf-parse.c (parse_source_file): Call java_layout_classes and
e64c46ce 20130 check for errors even if parse_only.
6d6044b0 20131 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
e64c46ce 20132 defined.
6d6044b0
PB
20133 (yylex): New function. Uses java_lex body.
20134 (java_lex): Removed commented out statement. Remove local variable
e64c46ce
AJ
20135 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
20136 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
20137 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
20138 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
20139 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
20140 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
20141 where appropriate.
6d6044b0
PB
20142 (java_lex_error): Empty if JC1_LITE is defined.
20143 (java_get_line_col): Return 0 if JC1_LITE is defined.
20144 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
e64c46ce
AJ
20145 SET_MODIFIER_CTX): Moved into the section containing the macros
20146 conditionally defined by JC1_LITE.
6d6044b0 20147 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
e64c46ce 20148 argument if JC1_LITE is defined.
6d6044b0 20149 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
e64c46ce
AJ
20150 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
20151 is defined.
6d6044b0 20152 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
e64c46ce
AJ
20153 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
20154 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
20155 to different values according to JC1_LITE.
6d6044b0 20156 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
e64c46ce 20157 declared if JC1_LITE set.
6d6044b0 20158 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
e64c46ce 20159 defined if JC1_LITE not set.
6d6044b0 20160 (struct parser_ctx): Reorganized and skip the jc1 front end part
e64c46ce 20161 if JC1_LITE set.
6d6044b0
PB
20162 (java_layout_classes): New function definition.
20163 (java_push_parser_context, java_init_lex, yyparse, yylex,
e64c46ce
AJ
20164 yyerror): Prototype always declared. All other static function
20165 prototypes declared only if JC1_LITE is not set.
6d6044b0 20166 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
e64c46ce 20167 declared in parse.h.
6d6044b0 20168 (java_layout_classes): New function.
e64c46ce 20169 (java_complete_expand_methods): No longer layout the class here.
6d6044b0
PB
20170 * parse-scan.y: New file.
20171 * jv-scan.c: New file.
20172
62c9aa5f 201731998-08-25 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20174
20175 * gjavah.c (main): Handle -friend option.
20176 (friend_specs): New global.
20177 (generate_access): Handle friend_specs.
20178 (process_file): Likewise.
20179 (MAX_FRIENDS): New macro.
20180 (friend_count): New global.
20181 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
20182 Changed all callers.
20183
62c9aa5f 201841998-08-24 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20185
20186 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
20187 (main): Handle processing all the entries of a named .zip archive.
20188 * jcf-io.c (jcf_trim_old_input): New function.
20189 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
20190
62c9aa5f 201911998-08-24 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20192
20193 * lang.c (flag_assume_compiled): Make default be on.
20194
62c9aa5f 201951998-08-21 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20196
20197 * jcf-dump.c: Add bunches of flags to control output more.
20198 (process_class): New function; support printing more than one class.
20199 (main): Support new --print-main and --javap flags.
20200 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
20201 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
20202
62c9aa5f 202031998-08-20 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20204
20205 Change mangling of dispatch table to match C++ vtable (w/thunks).
20206 * class.c (build_dtable_decl), java-tree.h: New function.
20207 (make_class_data): Call it.
20208 * decl.c (init_decl_processing): Likewise.
20209
62c9aa5f 202101998-08-19 Warren Levy <warrenl@cygnus.com>
6d6044b0
PB
20211
20212 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
e64c46ce 20213 soft_anewarray; adjust args passed.
6d6044b0 20214 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
e64c46ce 20215 match _Jv_NewObjectArray.
f6bbde28 20216
62c9aa5f 202171998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20218
20219 * decl.c (push_labeled_block, pop_labeled_block): New functions.
20220 * expr.c (loopup_label): Call create_label_decl.
20221 (create_label_decl): New function.
20222 (java_lang_expand_expr): Call expand_start_bindings with argument
e64c46ce 20223 set to zero.
6d6044b0 20224 * java-tree.h Added space after PROTO in function declarations
e64c46ce 20225 when necessary.
6d6044b0
PB
20226 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
20227 (create_label_decl, push_labeled_block): New function
e64c46ce 20228 declarations.
6d6044b0
PB
20229 * lex.c (label_id): Initialize.
20230 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
e64c46ce 20231 switch.
6d6044b0 20232 * parse.h Added space after PROTO in function declarations when
e64c46ce 20233 necessary.
6d6044b0 20234 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
e64c46ce
AJ
20235 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
20236 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
20237 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
20238 macros.
6d6044b0 20239 (struct parser_ctxt): New fields current_loop,
e64c46ce 20240 current_labeled_block.
6d6044b0 20241 (build_if_else_statement, patch_if_else_statement,
e64c46ce
AJ
20242 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
20243 generate_labeled_block, complete_labeled_statement,
20244 build_bc_statement, patch_bc_statement, patch_loop_statement,
20245 build_new_loop, build_loop_body, complete_loop_body): New function
20246 declarations.
6d6044b0
PB
20247 * parse.y (java_warning_count): New global variable.
20248 (label_id): New static variable.
20249 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
20250 (block:): Return size_zero_node when block is empty.
20251 (empty_statement:): Return size_zero_node.
20252 (statement:): Implement supplemental action when for_statement: is
e64c46ce 20253 reduced.
6d6044b0
PB
20254 (label_decl:): New rule.
20255 (labeled_statement:): Rewritten using label_decl. Actions
e64c46ce 20256 implemented.
6d6044b0
PB
20257 (labeled_statement_nsi:): Likewise.
20258 (if_then_statement): Actions implemented.
20259 (while_expression): New rule.
20260 (while_statement:): Rewritten using while_expression. Actions
e64c46ce 20261 implemented.
6d6044b0
PB
20262 (while_statement_nsi:): Likewise.
20263 (do_statement_begin:): New rule.
20264 (do_statement:): Rewritten using do_statement_begin. Actions
e64c46ce 20265 implemented.
6d6044b0
PB
20266 (for_statement:): Rewritten using for_begin. Actions implemented.
20267 (for_statement_nsi:): Likewise.
20268 (for_header:, for_begin:): New rules.
20269 (for_init:): Actions implemented.
20270 (statement_expression_list:, break_statement:,
e64c46ce 20271 continue_statement:): Likewise.
6d6044b0
PB
20272 (yyerror): Count number of issued warning(s).
20273 (java_report_errors): Report error(s) and/or warning(s).
20274 (java_complete_class): Use build_java_argument_signature to
e64c46ce 20275 recompute completed method signature.
6d6044b0 20276 (java_check_regular_methods): New locals method_wfl and aflags.
e64c46ce
AJ
20277 Use method_wfl instead of lookup_cl during error reports. Fixed
20278 indentation and modified some error messages. Use
20279 lang_printable_name in method instead of the DECL_NAME. New code
20280 to issue warnings on methods not overriding corresponding methods
20281 private to a different package.
6d6044b0
PB
20282 (java_method_add_stmt): Call add_stmt_to_compound.
20283 (add_stmt_to_compound): New function.
20284 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
e64c46ce 20285 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
6d6044b0 20286 (build_if_else_statement, patch_if_else_statement,
e64c46ce
AJ
20287 build_labeled_block, generate_labeled_block,
20288 complete_labeled_statement, build_new_loop, build_loop_body,
20289 complete_loop_body, patch_loop_statement, build_bc_statement,
20290 patch_bc_statement, patch_exit_expr): New functions.
6d6044b0 20291 * typeck.c (build_java_signature): Build argument signature before
e64c46ce 20292 enclosing it in between parenthesis.
f6bbde28 20293
62c9aa5f 202941998-08-17 Warren Levy <warrenl@cygnus.com>
6d6044b0
PB
20295
20296 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
e64c46ce 20297 (JAVA_OBJS): Added reminder comment
6d6044b0 20298
62c9aa5f 202991998-08-13 Nick Clifton <nickc@cygnus.com>
6d6044b0
PB
20300
20301 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
20302 be interpreted as a long long.
20303
62c9aa5f 203041998-08-13 Warren Levy <warrenl@cygnus.com>
6d6044b0
PB
20305
20306 * decl.c (init_decl_processing): Use _Jv_InitClass, not
e64c46ce
AJ
20307 soft_initialise_class. Use _Jv_NewMultiArray, not
20308 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
20309 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
20310 _Jv_CheckArrayStore, not soft_checkarraystore. Use
20311 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
f6bbde28 20312
62c9aa5f 203131998-08-12 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20314
20315 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
20316 length_identifier_node): New global tree node constants.
20317 * parse.y (kw_super, kw_this, kw_length): Removed globals.
20318 Replace uses by super_identifier_node etc.
20319 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
20320
20321 * parse.y (resolve_field_access): Don't special-case ".length" if
20322 flag_emit_class_files.
20323 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
20324 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
20325 and ARRAY.length.
20326
62c9aa5f 203271998-08-11 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20328
20329 * decl.c (init_decl_processing): Remove unused method_type_node fields.
20330 * class.c (make_method_value): Remove init for removed fields.
20331
20332 * class.c (layout_class): Use build_java_argument_signature.
20333 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
20334
20335 * typeck.c (push_java_argument_signature): Removed. Merged into ...
20336 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
20337 (build_java_signature): Don't use push_java_argument_signature.
20338
20339 * typeck.c (lookup_argument_method): New function.
20340 * parse.y (java_check_regular_methods): Use lookup_argument_method
20341 instead of lookup_java_method2 followed by lookup_java_method.
f6bbde28 20342
6d6044b0 20343 * parse.y (check_method_redefinition): Minor optimization.
f6bbde28 20344
6d6044b0
PB
20345 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
20346 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
20347
62c9aa5f 203481998-08-10 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20349
20350 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
20351 c-pragma.o.
20352
20353 * gjavah.c (java_float_finite): Use K&R-style definition.
20354 (java_double_finite): Likewise.
20355 (generate_access): Now returns void. Changed all callers.
20356 (last_access_generated): Removed.
20357 (process_file): Only make a single pass over the .class file.
20358
62c9aa5f 203591998-07-29 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20360
20361 * class.c (get_dispatch_table): Add extra dummy vtable entry,
20362 for compatibility for G++ (with -fvtable-thunks).
20363 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
20364
20365 * gjavah.c (process_file): Use public inheritance for super-class.
20366
62c9aa5f 203671998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20368
20369 * lex.c (java_init_lex): Initialize ctxp->package.
20370 * parse.h (struct parser_ctxt): package and package_len replaced
e64c46ce
AJ
20371 by tree package, an identifier node. Field method_decl_list is
20372 gone. Fixed comments.
6d6044b0 20373 (lookup_field_wrapper, merge_qualified_name, not_accessible,
e64c46ce 20374 class_in_current_package): New function prototypes.
6d6044b0 20375 * parse.y (array_type:): Set class loaded flag on primitive type
e64c46ce 20376 arrays.
6d6044b0 20377 (package_declaration:): Assign ctxp->package to the
e64c46ce 20378 identifier node.
6d6044b0 20379 (method_invocation:): Handle invocation of method qualified by
e64c46ce 20380 `super'.
6d6044b0
PB
20381 (single_type_import_declaration:): Removed ambiguity check.
20382 (java_pop_parser_context): New local variable `next'. Reset and
e64c46ce
AJ
20383 set IMPORT_CLASSFILE_NAME flags on current and previous import
20384 list.
6d6044b0
PB
20385 (java_accstring_lookup): Use new local macro COPY_RETURN.
20386 (lookup_field_wrapper): New function.
20387 (parser_qualified_classname): Use merge_qualified_name.
20388 (parser_check_super_interface): Broaden error message.
20389 (do_resolve_class): Check for qualified class name in the current
e64c46ce 20390 compilation unit if appropriate.
6d6044b0
PB
20391 (process_imports): Check for already defined classes.
20392 (check_pkg_class_access): Got rid of call to
e64c46ce 20393 get_access_flags_from_decl.
6d6044b0 20394 (java_complete_expand_methods): Call safe_layout_class based on
e64c46ce 20395 the current class size.
6d6044b0 20396 (make_qualified_primary): Build a WFL qualification on primary if
e64c46ce 20397 none exists.
6d6044b0
PB
20398 (merge_qualified_name): New function.
20399 (make_qualified_name): Use merge_qualified_name.
20400 (resolve_expression_name): Use safe_lookup_field.
20401 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
20402 (resolve_qualified_expression_name): Likewise. Check on resolved
e64c46ce 20403 element accessibility.
6d6044b0
PB
20404 (not_accessible_p, class_in_current_package): New functions.
20405 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
20406 (patch_method_invocation_stmt): Merged common pieces. Check
e64c46ce 20407 accessibility of invoked method.
6d6044b0 20408 (check_for_static_method_reference): Add returned type in error
e64c46ce 20409 message.
6d6044b0
PB
20410 (invocation_mode): Get rid of bogus check on PRIVATE methods.
20411 (refine_accessible_methods_list): Merged two conditions in test.
20412 (java_complete_class): Sanity check on stabilize_ref gone.
20413 * zextract.c (read_zip_archive): Cast lseek second argument to long.
f6bbde28 20414
62c9aa5f 204151998-07-28 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20416
20417 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
20418
62c9aa5f 204191998-07-24 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20420
20421 * gjavah.c (F_NAN): Removed.
20422 (F_NAN_MASK): New macro.
20423 (F_POSITIVE_INFINITY): Removed.
20424 (F_NEGATIVE_INFINITY): Likewise.
20425 (java_float_finite): Rewrote.
20426 (D_NAN_MASK): Renamed.
20427 (java_double_finite): Rewrote.
20428 (D_POSITIVE_INFINITY): Removed.
20429 (D_NEGATIVE_INFINITY): Likewise.
20430
20431 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
20432 If verbose, print underlying representation of value in hex.
20433
62c9aa5f 204341998-07-24 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20435
20436 * buffer.h, buffer.c: New files.
20437 * Makefile.in (JAVA_OBJS): Add buffer.o.
20438
20439 Support locals variables and writing their debug entries to .class.
20440 * jcf-write.c: Simplify some by user new buffer type.
20441 (vode_buffer_grow): Removed.
20442 (struct localvar_info): New type.
20443 (localsvars, localvartable): New buffers.
20444 (localvar_alloc, localvar_free): New functions.
20445 (generate_bytecode_insns): Handle local variables.
20446 (generate_classfile): Write LocalVariableTable attribute.
20447
62c9aa5f 204481998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20449
20450 * jcf-io.c (open_in_zip): Check the zipfile magic number.
20451 * zipfile.h (ZIPMAGIC): New macro.
20452
62c9aa5f 204531998-07-24 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20454
20455 * Makefile.in (gjavah.o): Updated dependencies.
20456 (jcf-dump.o): Likewise.
20457 (all.indirect): Use ../gjavah.
20458 (../gjavah$(exeext)): Likewise.
20459 (clean): Don't remove gjavah.
20460 (clean): Remove parse.c, not java/parse.c.
20461 * Make-lang.in (java): Added gjavah.
20462 (gjavah$(exeext)): New target.
20463 (GJAVAH_SOURCES): New macro.
20464 (java.all.build): Added gjavah.
20465 (java.all.cross): Likewise.
20466 (java.rest.encap): Likewise.
20467 * config-lang.in (compilers, stagestuff): Added gjavah.
20468
62c9aa5f 204691998-07-23 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20470
20471 * gjavah.c (java_float_finite): New function.
20472 (java_double_finite): Likewise.
20473 (F_POSITIVE_INFINITY): New macro.
20474 (F_NEGATIVE_INFINITY): Likewise.
20475 (F_NAN): Likewise.
20476 (D_POSITIVE_INFINITY): Likewise.
20477 (D_NEGATIVE_INFINITY): Likewise.
20478 (D_NAN): Likewise.
20479 (print_field_info): Use java_float_finite and java_double_finite.
20480
62c9aa5f 204811998-07-23 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20482
20483 * parse.y (method_header): Name "this" implicit argument.
20484
62c9aa5f 204851998-07-22 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20486
20487 * jcf-write.c: Write out LineNumberTable attribute in .class file.
e64c46ce 20488 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
6d6044b0
PB
20489 (put_linenumber): New function.
20490 (generate_bytecode_insns, generate_classfile): Write line numbers.
20491
62c9aa5f 204921998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20493
20494 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20495 (lookup_name, build_known_method_ref, build_class_init,
e64c46ce
AJ
20496 build_invokevirtual, invoke_build_dtable, match_java_method,
20497 build_field_ref, pushdecl_force_head, build_java_binop,
20498 binary_numeric_promotion, build_decl_no_layout,
20499 build_java_arrayaccess, build_newarray, build_anewarray,
20500 build_java_array_length_access, build_java_arraynull_check): New
20501 extern function prototypes.
6d6044b0 20502 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
e64c46ce
AJ
20503 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20504 java-tree.h.
6d6044b0 20505 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
f6bbde28 20506 to NULL
6d6044b0
PB
20507 * jcf.h (jcf_out_of_synch): New extern function prototype.
20508 * parse.h: Static/global function implemented in parse.y
e64c46ce 20509 prototyped and declarations moved at the end of the file.
6d6044b0
PB
20510 (DECL_P): Check that the argument isn't null.
20511 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
e64c46ce 20512 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
6d6044b0
PB
20513 (QUAL_DECL_TYPE): New macro.
20514 (PARAMS): Macro definition removed.
20515 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20516 (return_statement:): Call build_return.
20517 (field_access:): Call make_qualified_primary in sub rule.
20518 (method_invocation:): Build method invocation and call
e64c46ce 20519 make_qualified_primary when processing primaries.
6d6044b0 20520 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
e64c46ce 20521 get_type_from_signature.
6d6044b0 20522 (java_check_regular_method): Extra integer 0 argument when calling
e64c46ce 20523 lookup_java_method2.
6d6044b0 20524 (lookup_java_interface_method2): Extra method DECL argument when
e64c46ce 20525 calling lookup_java_interface_method2.
6d6044b0 20526 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
e64c46ce 20527 COMPOUND_EXPR node.
6d6044b0 20528 (java_complete_expand_method): Layout current class iff not
e64c46ce 20529 already done. Don't process interface's methods.
6d6044b0 20530 (java_complete_expand_method): Use super class only if it
e64c46ce 20531 exists. Use current class otherwise.
6d6044b0
PB
20532 (make_qualified_primary): New function.
20533 (resolve_expression_name): Process qualified expression or
e64c46ce 20534 expression from primary the same way.
6d6044b0 20535 (resolve_expression_name): Two last arguments to
e64c46ce 20536 resolve_field_access are now NULL_TREEs.
6d6044b0 20537 (resolve_field_access): New variable is_static. Local field must
e64c46ce
AJ
20538 be DECLs. is_static computed on field DECLs only. Append code in
20539 where_found to the field access if necessary. Use QUAL_DECL_TYPE
20540 to initialize field_type.
6d6044b0 20541 (resolve_qualified_expression_name): New local variable,
e64c46ce
AJ
20542 previous_call_static and is_static. Handle primaries with function
20543 calls, casts, array references and `this'. `super' now handled as
20544 `(super_class)this'. Use is_static to clarify boolean expressions.
20545 Added code to handle case where a proper handle is required to
20546 access a field. Use QUAL_DECL_TYPE where applicable.
6d6044b0
PB
20547 (maybe_access_field): New function.
20548 (patch_method_invocation_stmt): New arguments primary, where,
e64c46ce
AJ
20549 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20550 deleted. Use `where' as a type to search from if specified. Check
20551 for static method reference where forbidden. Append primary or
20552 current_this to the argument list if not calling constructor nor
20553 static methods.
6d6044b0
PB
20554 (check_for_static_method_reference): New function.
20555 (patch_invoke): Layout the class on which new is done if
e64c46ce 20556 necessary.
6d6044b0 20557 (lookup_method_invoke): Changed format to report errors on
e64c46ce 20558 methods.
6d6044b0 20559 (qualify_ambiguous_name): New local variable this_found. Now
e64c46ce
AJ
20560 handle things from primaries. Method call are considered
20561 expression names.
6d6044b0 20562 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
e64c46ce 20563 changed into NULLs.
6d6044b0
PB
20564 (not_initialized_as_it_should_p): Comply with the new DECL_P.
20565 (java_complete_tree): New case fo RETURN_EXPR. Process function
e64c46ce 20566 call arguments in separate function.
6d6044b0
PB
20567 (complete_function_arguments): New function.
20568 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
e64c46ce 20569 anymore.
6d6044b0 20570 (patch_assignment): Take the return function slot into account as
e64c46ce 20571 a RHS. Distinguish assignment from a return.
6d6044b0 20572 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
e64c46ce 20573 when checking methods in interfaces.
6d6044b0 20574 (resolve_type_during_patch): NULL argument to unresolve_type_p
e64c46ce 20575 instead of NULL_TREE.
6d6044b0
PB
20576 (patch_newarray): Fixed typo in comment.
20577 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20578 (build_return, patch_return): New functions.
20579 * typeck.c (lookup_java_constructor): Fixed typo in comment.
f6bbde28 20580
62c9aa5f 205811998-07-21 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20582
20583 * constants.c (find_name_and_type_constant, find_fieldref_index,
20584 find_methodref_index): New methods.
20585 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
20586 just return given method. Also, rename to build_known_method_ref.
20587 (expand_invoke): Rename call to build_invoke_non_interface.
20588 * java-tree.h, parse.h: Update prototype.
20589 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
e64c46ce 20590 (such as expand_expr_stmt) if flag_emit_class_files.
6d6044b0
PB
20591 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20592 STACK_TARGET, IGNORE_TARGET): New macros.
e64c46ce 20593 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
6d6044b0
PB
20594 (generate_bytecode_insn): New function to generate method's bytecode.
20595 (generate_classfile): Node generate Code attribute for a method.
20596 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20597 push_long_const, field_op, adjust_typed_op, maybe_wide):
20598 New functions used by generate_bytecode_insn.
f6bbde28 20599
6d6044b0
PB
20600 * typeck.c (signature_include_return): Remove variable.
20601 (push_java_argument_signature, build_java_argument_signature): New.
20602 (build_java_signature): Use push_java_argument_signature.
20603 * parse.y: Use build_java_argument_signature instead of fiddling
20604 with signature_include_return.
20605
62c9aa5f 206061998-07-17 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20607
20608 * gjavah.c (print_c_decl): Always generate JArray<>* for array
20609 types.
20610
20611 * Makefile.in (all.indirect): Added gjavah$(exeext).
20612 (gjavah$(exeext)): Added $(exeext).
20613 (clean): Likewise.
20614
62c9aa5f 206151998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20616
20617 * class.c (layout_class): Call to java_layout_parsed_class replace
e64c46ce 20618 by safe_layout_class.
6d6044b0 20619 * expr.c (build_java_array_length_access): Removed static storage
e64c46ce 20620 class in the function definition.
f6bbde28 20621 (build_java_arraynull_check): Likewise.
6d6044b0
PB
20622 Also fixed typos in two comments.
20623 * lex.c (java_init_lex): Initialize static global kw_length.
20624 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20625 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
e64c46ce 20626 java_lex_error.
6d6044b0
PB
20627 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20628 * parse.h (resolve_no_layout): New static function declaration.
20629 (get_identifier_in_static): Declaration removed.
20630 (java_layout_parsed_class): Function name declaration changed to
e64c46ce 20631 safe_layout_class.
6d6044b0 20632 (build_newarray_node, patch_newarray, resolve_type_during_patch,
e64c46ce
AJ
20633 not_initialized_as_it_should_p, build_this): New static function
20634 declarations.
6d6044b0 20635 (pushdecl_force_head, build_java_binop, int_fits_type_p,
e64c46ce
AJ
20636 binary_numeric_promotion, stabilize_reference,
20637 build_decl_no_layout, build_java_arrayaccess): Extern function
20638 declarations moved into their own section.
6d6044b0 20639 (build_newarray, build_anewarray, build_java_array_length_access,
e64c46ce 20640 build_java_arraynull_check): New extern function declarations.
6d6044b0
PB
20641 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20642 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
e64c46ce 20643 fake tree codes.
6d6044b0
PB
20644 (CALL_CONSTRUCTOR_P): New macro.
20645 * parse.y (kw_length): New static global tree node.
20646 (return_statement): Tagged <node>.
20647 (RETURN_TK): Tagged <operator>.
20648 (variable_declarator_id:): Build variable declaration with an
e64c46ce
AJ
20649 empty initialization value if a syntax error was found in the
20650 initialization part of the variable declaration.
6d6044b0 20651 (statement_without_trailing_substatement:): return_statement: now
e64c46ce 20652 uses the default rule.
6d6044b0
PB
20653 (return_statement:): Temporarily fixed to return NULL_TREE.
20654 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20655 (class_instance_creation_expression:): Class creation rules now
e64c46ce 20656 call build_method_invocation upon reduction.
6d6044b0 20657 (array_creation_expression:): Rules call build_newarray_node upon
e64c46ce 20658 reduction.
6d6044b0
PB
20659 (dim_exprs:): Build a list of dimension expressions.
20660 (dim_expr:): Store location of the OSB_TK in the dimension
e64c46ce 20661 expression node.
6d6044b0
PB
20662 (method_invocation:): Added a new error rule.
20663 (build_unresolved_array_type): WFL argument may also be an array
e64c46ce 20664 on a primitive type. Name of the argument changed to reflect this.
6d6044b0 20665 (method_declarator): Insert argument type at the beginning of the
e64c46ce 20666 argument type list and later reverse the list.
6d6044b0 20667 (unresolved_type_p): Argument 'returned' may be optionally
e64c46ce 20668 NULL_TREE.
6d6044b0 20669 (java_layout_class_from_source): Function renamed
e64c46ce 20670 safe_layout_class.
6d6044b0 20671 (resolve_and_layout): Now call resolve_no_layout and
e64c46ce 20672 safe_layout_class.
6d6044b0
PB
20673 (resolve_no_layout): New function.
20674 (purify_type_name): New function.
20675 (complete_class_report_errors): Call purify_type_name during error
e64c46ce 20676 report on a type not found.
6d6044b0 20677 (process_imports): error_found local variable doesn't need to be
e64c46ce 20678 initialized to zero.
6d6044b0 20679 (declare_local_variables): New local type_wfl. Fixed typo in error
e64c46ce
AJ
20680 message. type_wfl assigned to unresolved type and used to register
20681 incomplete type. Build a WFL around the variable initialization
20682 statement so that debug info can be generated on it.
6d6044b0 20683 (source_start_java_method): Reverse argument list after they've
e64c46ce 20684 been processed.
6d6044b0
PB
20685 (current_this): New static global variable.
20686 (java_complete_expand_methods): Set current_this when appropriate.
20687 (resolve_expression_name): Build correct static and non static
e64c46ce 20688 field access bearing a simple name.
6d6044b0 20689 (resolve_field_access): Resolve the length field of arrays. Handle
e64c46ce 20690 f.m() cases.
6d6044b0 20691 (patch_method_invocation_stmt): Set the type of the method
e64c46ce
AJ
20692 invocation to error_mark_node. This value is later overridden by a
20693 valid type, if any. Don't handle qualified constructor invocation
20694 as qualified method invocation. Call lookup_method_invoke with its
20695 new flag. It's no longer necessary to access the selected method
20696 as the value of a tree list. Handle constructor invocation.
6d6044b0 20697 (patch_invoke): Reverse argument list when invoking non interface
e64c46ce
AJ
20698 methods. Insert call to new as the first argument of the
20699 constructor.
6d6044b0 20700 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
e64c46ce
AJ
20701 defined within a final class. Return INVOKE_STATIC if the invoked
20702 method is a constructor.
6d6044b0 20703 (lookup_method_invoke): New lc argument is a flag to indicate a
e64c46ce
AJ
20704 constructor lookup. Now handle constructor lookup. Choose the most
20705 specific method in case several were matching the invocation
20706 requirements. Return a method decl instead of a tree list featuring
20707 one single method decl element.
6d6044b0 20708 (refine_accessible_methods_list): New lc flag argument to
e64c46ce 20709 indicate that a constructor is being looked up.
6d6044b0
PB
20710 (not_initialized_as_it_should_p): New function.
20711 (java_complete_tree): Now process fake tree codes
e64c46ce
AJ
20712 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20713 save_expr on resolved function call arguments. Case on
20714 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
6d6044b0 20715 (patch_assignment): LHS can be a field access expression. When
e64c46ce
AJ
20716 dealing with reference, lhs_type is the promoted type of the
20717 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20718 applicable.
6d6044b0
PB
20719 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20720 (patch_binop): Use not_initialized_as_it_should_p where
e64c46ce 20721 applicable.
6d6044b0
PB
20722 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20723 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
e64c46ce 20724 where applicable.
6d6044b0
PB
20725 (resolve_type_during_patch): New function.
20726 (patch_cast): Call resolve_type_during_patch to resolve type and
e64c46ce 20727 report error accordingly.
6d6044b0 20728 (patch_array_ref): Use not_initialized_as_it_should_p where
e64c46ce
AJ
20729 applicable. Array base expression is saved before being
20730 used. Promote the type of an array elements if it contains non
20731 builtin types.
6d6044b0
PB
20732 (build_newarray_node, patch_newarray, build_this): New functions.
20733
62c9aa5f 207341998-07-16 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20735
20736 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20737 increment it in `for' statement.
20738 (print_field_info): If number is inf or nan, don't print it.
20739 (print_method_info): If method name is `delete', just ignore it.
20740 (print_c_decl): Special-case jstringArray.
20741
20742 * gjavah.c (help): New function.
20743 (no_argument): New function.
20744 (usage): Changed text.
20745 (main): Rewrote argument handling. Now handles -v, --help,
20746 --version.
20747 (version): New function.
20748 (found_error): New global.
20749 (main): Return found_error.
20750 (generate_access): Set found_error.
20751 (print_c_decl): Likewise.
20752
62c9aa5f 207531998-07-15 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20754
20755 * gjavah.c (print_c_decl): Don't print "," when examining field.
20756 Skip type name when looking at "[L" types.
20757 (process_file): Now static.
20758 (generate_access): Now returns int.
20759 (last_access_generated): New global.
20760 (process_file): Clear last_access_generated; make multiple passes
20761 over the class.
20762 (print_field_info): Just return if generate_access returns true.
20763 (print_method_info): Likewise. Also, allow <init> functions to
20764 pass through.
20765 (print_c_decl): Added is_init argument. Print constructors
20766 properly.
20767 (print_cxx_classname): Use UTF8_GET to extract characters from
20768 string.
20769 (print_base_classname): New function.
20770 (print_class_decls): New function.
20771 (process_file): Use it.
20772 (utf8_cmp): New function.
20773
62c9aa5f 207741998-07-13 Nick Clifton <nickc@cygnus.com>
6d6044b0
PB
20775
20776 * lang-options.h: Format changed to match changes in gcc/toplev.c
20777 to implement a --help option.
20778
207791998-07-10 Brendan Kehoe <brendan@cygnus.com>
20780
20781 * decl.c (init_decl_processing): Revert change to dtable_type.
20782
62c9aa5f 207831998-07-09 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20784
20785 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20786
207871998-07-08 Brendan Kehoe <brendan@cygnus.com>
20788
20789 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20790
20791 * lang.c (lang_init): Default flag_exceptions to 1, without
20792 checking to see if it's 2 first.
20793
62c9aa5f 207941998-07-08 Jeffrey A Law (law@cygnus.com)
6d6044b0
PB
20795
20796 * constants.c: Include "system.h".
20797 * decl.c: Likewise.
20798 * lang.c (flag_new_exceptions): Get via extern now.
20799 (lang_init_options): New functions. Turn on flag_new_exceptions.
f6bbde28 20800
62c9aa5f 208011998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20802
20803 * lex.c (java_lex): Return 0 when we see an invalid character in
e64c46ce 20804 the input.
6d6044b0
PB
20805
20806 * lex.c (java_read_char): Specify extra argument when calling
e64c46ce 20807 java_lex_error.
6d6044b0 20808 (java_read_unicode, java_parse_end_comment,
e64c46ce 20809 java_parse_escape_sequence): Likewise,
6d6044b0 20810 (java_lex): Specify extra argument when calling
e64c46ce
AJ
20811 java_lex_error. Test that IDs are beginning with a legal character
20812 for IDs. Handle invalid characters with an error message and a
20813 call to java_lex_error.
6d6044b0 20814 (java_lex_error): Adjust column position by new argument
e64c46ce
AJ
20815 `forward'. Issue an error even if in the middle of reporting an
20816 other error.
6d6044b0
PB
20817
208181998-07-07 Brendan Kehoe <brendan@cygnus.com>
20819
20820 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20821 we don't explicitly put a null pointer when we're copying it.
20822
62c9aa5f 208231998-07-07 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20824
20825 * gjavah.c (print_cxx_classname): New function.
20826 (super_class_name): Likewise.
20827 (print_super_fields): Removed.
20828 (in_super): Removed.
20829 (print_field_info): Never generate #defines.
20830 (print_c_decl): Changed generated types to match JNI. No longer
20831 print class name before method name.
20832 (print_method_info): Print "static" before static methods.
20833 Print "virtual" before non-final methods.
20834 (usage): Use exit(1), not exit(-1).
20835 (main): Likewise.
20836 (print_field_info): Use %.17g to print a double.
20837 (last_access): New globals.
20838 (process_file): Initialize last_access.
20839 (usage): Now static.
20840 (ACC_VISIBILITY): New define.
20841 (generate_access): New function.
20842 (print_field_info): Call it.
20843 (print_method_info): Likewise. Also, generate information for all
20844 methods, not just native methods. Return void.
20845 (print_c_decl): Return void.
20846 (print_field_info): Return void.
20847
62c9aa5f 208481998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20849
20850 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
e64c46ce
AJ
20851 processing the jc1 grammar file. Prefix bison functions and
20852 variables with java_.
6d6044b0
PB
20853 (parse.c): Dependencies on parse.h and lex.h
20854 * expr.c (build_java_arrayaccess): Function now global.
20855 * java-tree.h: Comment reorganized to carry on previous
e64c46ce 20856 classification effort.
6d6044b0 20857 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
e64c46ce 20858 RESOLVE_TYPE_NAME_P): New flags on WFLs.
6d6044b0 20859 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
e64c46ce 20860 java_parse (new prefix java_ generated by bison).
6d6044b0 20861 (java_layout_parsed_class, java_register_parsed_class): Function
e64c46ce 20862 call removed.
6d6044b0
PB
20863 (yyparse): Removed unnecessary call to init_outgoing_cpool.
20864 * lex.c (static tree wfl_op): Variable deleted.
20865 (java_init_lex): Initialize kw_super and kw_this. Initialize more
e64c46ce 20866 ctxp fields to NULL_TREE.
6d6044b0 20867 (java_lex): No longer create WFL for operators. Filename caching
e64c46ce
AJ
20868 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
20869 created as STRING_CST and later expanded. Removed extra argument
20870 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
20871 and SUPER.
6d6044b0
PB
20872 (build_wfl_node): Removed code in comments.
20873 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
e64c46ce 20874 store token and location data in the current bison token.
6d6044b0 20875 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
e64c46ce 20876 static/extern function declaration at the beginning of the file.
6d6044b0
PB
20877 (struct qualification): Data structure definition deleted.
20878 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
20879 (qualify_ambiguous_name): Function declaration modified. Function
e64c46ce 20880 now returns nothing.
6d6044b0 20881 (build_array_ref, patch_array_ref, make_qualified_name,
e64c46ce
AJ
20882 resolve_qualified_expression_name, maybe_generate_clinit,
20883 resolve_field_access): New static function declarations.
6d6044b0
PB
20884 (build_java_arrayaccess): New extern function declaration.
20885 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
20886 (CALL_EXPR_PRIMARY): Macro deleted.
20887 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
20888 (struct parser_ctxt): Field initialized_final
e64c46ce 20889 removed. non_static_initialized, static_initialized: New fields.
6d6044b0 20890 * parse.y (static tree kw_super, static tree kw_this): New global
e64c46ce 20891 static.
6d6044b0 20892 (%union): tree wfl field of operator member replaced by int
e64c46ce 20893 location. WFLs are non longer created for operators.
6d6044b0
PB
20894 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
20895 (qualified_name:): Now calls make_qualified_name to build the
e64c46ce 20896 identifier.
6d6044b0 20897 (type_declaration:): Consider generating <clinit> when class
e64c46ce 20898 parsing completed.
6d6044b0 20899 (variable_declarator:): Directly build an assignment node when the
e64c46ce 20900 variable is initialized when declared.
6d6044b0 20901 (this_or_super:): Build a WFL and set current location when THIS
e64c46ce 20902 or SUPER are parsed.
6d6044b0
PB
20903 (expression_statement:): Wrap statement around a WFL.
20904 (primary_no_new_array:): Fixed typo. Changed value returned by
e64c46ce 20905 THIS_TK because of its new type (temporary).
6d6044b0
PB
20906 (dim_exprs:): Temporary fix because of OSB_TK's new type.
20907 (field_access:): Build qualified name with SUPER.
20908 (method_invocation:): Fixed returned value because of SUPER's new
e64c46ce 20909 type.
6d6044b0
PB
20910 (array_access:): Use OSB_TK location information.
20911 (post_increment_expression:, post_decrement_expression:,
e64c46ce
AJ
20912 unary_expression:, pre_increment_expression:,
20913 pre_decrement_expression:, unary_expression_not_plus_minus:,
20914 cast_expression:, multiplicative_expression:,
20915 additive_expression:, shift_expression:, relational_expression:,
20916 equality_expression:, and_expression:, exclusive_or_expression:,
20917 inclusive_or_expression:, conditional_and_expression:,
20918 conditional_or_expression:, assignment:): Use new location/token
20919 information available on operators.
6d6044b0 20920 (create_class): Set super_decl_type to NULL_TREE when processing
e64c46ce 20921 java.lang.Object.
6d6044b0 20922 (register_fields): Field initialization is now a MODIFY_EXPR
e64c46ce 20923 node. Chain initialization code to the matching lists (according
fe0b9fb5 20924 to the field declaration modifiers).
6d6044b0
PB
20925 (maybe_generate_clinit): New function.
20926 (method_header): Don't set method's DECL_NAME to a WFL when adding
e64c46ce 20927 methods to java.lang.Object.
6d6044b0 20928 (resolve_and_layout): Now can return NULL_TREE if the type
e64c46ce
AJ
20929 resolution fails. Otherwise, return the class DECL instead of its
20930 TYPE.
6d6044b0 20931 (check_method_redefinition): Don't patch method DECL_NAME if it
e64c46ce 20932 belongs to java.lang.Object.
6d6044b0 20933 (process_imports): Simply assign error_found to the value returned
e64c46ce 20934 by check_pkg_class_access.
6d6044b0 20935 (declare_local_variables): Don't use their init statements (if
e64c46ce
AJ
20936 any) when parsing error were previously found. Reuse MODIFY_EXPR
20937 build during parsing as an init statement.
6d6044b0
PB
20938 (java_method_add_stmt): Now return the current method body.
20939 (java_layout_parsed_class, java_register_parsed_class): Functions
e64c46ce 20940 removed.
6d6044b0 20941 (java_complete_expand_methods): Initialize the constant pool on a
e64c46ce
AJ
20942 per class basis. Layout the classes before expanding their method
20943 bodies. Don't try expand artificial constructor code if error were
20944 found. Make the classes data and register them if no error were
20945 found.
6d6044b0 20946 (java_complete_expand_method): Retrieve an artificial constructor
e64c46ce
AJ
20947 argument list before entering its body. Assign the top block to
20948 the artificial constructor function body and set types of declared
20949 blocks and compound statements to void. Walk method body if not an
20950 artificial constructor.
6d6044b0
PB
20951 (make_qualified_name, cut_identifier_in_qualified): New functions.
20952 (resolve_expression_name): Fixed comments. Save/restore the
e64c46ce
AJ
20953 current class CLASS_LOADED_P flag value. Build non qualified
20954 static field access and handle qualified expression names.
6d6044b0 20955 (resolve_field_access, resolve_qualified_expression_name): New
e64c46ce 20956 functions.
6d6044b0 20957 (patch_method_invocation_stmt): Use the new expression resolution
e64c46ce
AJ
20958 scheme, calling resolve_field_access when the function call is
20959 resolved as an expression.
6d6044b0 20960 (qualify_ambiguous_name): Function rewritten to work on qualified
e64c46ce 20961 expression produced by make_qualified_name.
6d6044b0 20962 (java_complete_tree): Promote type when function's argument are
e64c46ce
AJ
20963 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
20964 the assignment to discover further errors if RHS is a expression
20965 name that fails to evaluate. Declare LHS initialized even though
20966 the assignment failed. Don't use the location variable and removed
20967 extra argument in patch function calls. Now handle the ARRAY_REF
20968 case and build internal string representation when STRING_CSTs are
20969 walked.
6d6044b0
PB
20970 (build_method_invocation): Don't wrap function call around a WFL.
20971 (build_assignment): Likewise. Use the operator location
e64c46ce 20972 information.
6d6044b0 20973 (patch_assignment): Handle array access LHSs. Handle error
e64c46ce 20974 provenance, resulting in a better error report.
6d6044b0 20975 (build_binop): Use op_location from operator as binop location
e64c46ce 20976 information.
6d6044b0
PB
20977 (build_unaryop, build_incdec, build_cast): Likewise.
20978 (patch_binop): Extract location information from the node. Fixed
e64c46ce 20979 typo in error message.
6d6044b0
PB
20980 (patch_unary_op): Extract location information from the node.
20981 (build_array_ref, patch_array_ref): New functions.
f6bbde28 20982
62c9aa5f 209831998-07-01 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20984
20985 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
20986 match _Jv_IsInstanceOf.
20987 * decl.c (init_decl_processing): Use _Jv_NewArray, not
20988 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
20989
62c9aa5f 209901998-06-30 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20991
20992 * decl.c (init_decl_processing): Functions are now named
20993 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
20994
62c9aa5f 209951998-06-29 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20996
20997 * java-tree.h (load_class): Add prototype.
e64c46ce 20998 * class.c (is_compiled_class): Add missing arg to load_class.
6d6044b0
PB
20999 * expr.c (expand_java_NEW): Call load_class.
21000 * parse.y (process_import): Removed bogus use of void return value.
21001
62c9aa5f 210021998-06-25 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21003
21004 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
21005 Function name is "_Jv_Throw" instead of "soft_athrow".
21006 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
21007 Function name is "_Jv_AllocObject" instead of "soft_new".
21008 Takes an extra parameter (object size).
21009 * expr.c: Update calls.
21010
62c9aa5f 210111998-06-24 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21012
21013 * lex.c (java_get_line_col): Handle end-of-file.
21014 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
21015
62c9aa5f 210161998-06-24 Andrew MacLeod <amacleod@cygnus.com>
6d6044b0
PB
21017
21018 * lang.c (lang_init): Make -fexceptions the default.
21019 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
21020 exception handling is not turned on.
21021
62c9aa5f 210221998-06-23 Andrew MacLeod <amacleod@cygnus.com>
6d6044b0
PB
21023
21024 * lang.c (flag_new_exceptions): Make this this default.
21025 * decl.c (end_java_method): Call emit_handlers.
21026 * except.c (method_init_exceptions): Set language code and version.
f6bbde28 21027 (expand_start_java_handler): Enable exception, and call
6d6044b0
PB
21028 expand_eh_region_start.
21029 (expand_end_java_handler): Enable exception, and set up catch blocks.
21030 (emit_handlers): New routine to generate the saved handlers.
21031 * java-except.h (emit_handlers): Add prototype.
21032
62c9aa5f 210331998-06-12 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21034
21035 We used to have three different representations of the constant pool:
21036 the CPool structure, the tree_constant_pool, and the constructures
21037 used to build the Class object (which may need class and string
21038 constants) in compiled code. None were appropriate for compiling
21039 to .class files, so I did a major overhaul.
21040
21041 First, the tree_constant_pool array was removed. Things were
21042 modified to the CPool structure in the JCF could be used.
21043 Second, a "capacity" field was added to the CPool, and functions
21044 written to search for a matching constant, adding one if not found.
21045 The code that generated the Class object was changed to use a CPool.
21046 The actual TREE_LISTs used to build the CONSTRUCTORs used for
21047 the static Class object are now only in build_constants_constructor.
21048 Finally, I wrote code which can generate a .class file (including its
21049 constant pool) from the RECORD_TYPE of a class. This is a big step
21050 on the way to compiling Java source into .class files.
f6bbde28 21051
6d6044b0
PB
21052 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
21053 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
21054
21055 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
21056 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
21057 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
21058 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
21059 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
21060 (lang_type): Removed constant_pool field.
21061 * jcf.h (CPool): Renamed size to count. Added field capacity.
21062 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
21063 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
21064 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
21065
21066 * constants.c (current_constant_pool_tags, current_constant_pool_data,
21067 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
21068 * constants.c (build_constants_constructor): Use new outgoing_cpool.
21069 (set_constant_entry, find_constant1, find_constant2,
21070 find_class_constant, count_constant_pool_bytes, write_constant_pool,
21071 find_utf8_constant, find_class_or_string_constant): New functions.
f6bbde28 21072
6d6044b0 21073 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
e64c46ce 21074 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
6d6044b0
PB
21075 (give_name_to_class, get_class_constant): Likewise.
21076 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
e64c46ce 21077 (get_name_and_type_constant, get_ref_constant): Removed.
6d6044b0
PB
21078 * parse.h (parser_ctxt): Remove field tree_constant_pool.
21079 * parse.y: Don't save/restore tree_constant_pool.
21080 * verify.c (verify_jvm_instructions): Update for new approach.
21081 * expr.c (expand_invoke, expand_java_field_op): Likewise.
21082
21083 * lang-options.h: Added -femit-class-file, -femit-class-files.
21084 * lang.c (flag_emit_class_files), java-tree.h: New flag.
21085 (lang_f_options): Added "emit-class-file(s)".
21086
21087 * expr.c (build_java_arrayaccess): Generate more efficient array
21088 bounds checking, by using unsigned compare.
21089
21090 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
21091
62c9aa5f 210921998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21093
21094 * parse.h: New comment on the handling of unresolved type
e64c46ce 21095 identifiers. JDEPs are now part of the jdep_code enum.
6d6044b0 21096 (typedef struct jdep): Now use enum jdep_code or int, depending on
e64c46ce 21097 availability. Both are narrowed down to an 8 bits bitfield.
6d6044b0
PB
21098 (CALL_EXPR_PRIMARY): Fixed comment.
21099
62c9aa5f 211001998-06-10 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
21101
21102 * Make-lang.in (java): Added gjavac and jvgenmain.
21103 (java.start.encap): Depend on gjavac.
21104 (java.rest.encap): Depend on jvgenmain.
21105
21106 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
21107 (JAVA_CROSS_NAME): Likewise.
21108 (java.all.build): Depend on jvgenmain and gjavac.
21109 (java.all.cross): Depend on jvgenmain and gjavac-cross.
21110 (jvgenmain$(exeext)): New target.
21111 (java.install-common): Wrote.
21112 * config-lang.in (compilers, stagestuff): Added gjavac and
21113 jvgenmain.
21114
62c9aa5f 211151998-06-10 Dave Brolley <brolley@cygnus.com>
6d6044b0
PB
21116
21117 * lang.c (lang_decode_option): New argc/argv interface.
21118
62c9aa5f 211191998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21120
21121 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
21122 * decl.c (build_decl_no_layout): New function.
21123 * expr.c (java_lang_expand_expr): Layout declarations found in
e64c46ce 21124 blocks before they're pushed.
6d6044b0 21125 * jcf-parse.c (load_class): Save current line when parsing class
e64c46ce 21126 file.
6d6044b0 21127 (parse_source_file): Register class before expanding their
e64c46ce 21128 methods.
6d6044b0 21129 * lang.c (put_decl_node): Produce `null' when `void *' is
e64c46ce 21130 processed.
6d6044b0 21131 * lex.c (static tree wfl_op): New static global, for error report
e64c46ce 21132 on casts.
6d6044b0 21133 (java_init_lex): wfl_operator and wfl_op initialized
e64c46ce
AJ
21134 here. Filename caching added for wfl_op. Return wfl_op when `(' is
21135 parsed.
6d6044b0 21136 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
e64c46ce
AJ
21137 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
21138 build_unresolved_array_type): New static function definitions.
6d6044b0
PB
21139 (build_decl_no_layout): New extern function declared.
21140 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
e64c46ce 21141 faulty modifier exists.
6d6044b0
PB
21142 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
21143 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
21144 (UNARY_PLUS_EXPR): New fake operator.
21145 (struct parser_ctxt): New field osb_number.
21146 * parse.y (static tree wfl_operator): New static WFL for operator
e64c46ce 21147 bound error messages.
6d6044b0
PB
21148 (DECR_TK, INCR_TK): Moved.
21149 (OP_TK): Tagged <operator>.
21150 (array_type:): Now call build_unresolved_array_type.
21151 (dim_expr:): Count the number of '[' seen.
21152 (post_increment_expression, post_decrement_expression,
e64c46ce
AJ
21153 pre_increment_expression, pre_decrement_expression,
21154 unary_expression_not_plus_minus, unary_expression:): Actions are
21155 now building the corresponding unary expressions.
6d6044b0
PB
21156 (cast_expression:): Actions are now building cast expressions.
21157 (build_unresolved_array_type): New function.
21158 (create_interface): Reset the number of declared interfaces.
21159 (create_class): Likewise.
21160 (method_header): Methods declared within the scope of an interface
e64c46ce 21161 are now implicitly set public and abstract.
6d6044b0 21162 (java_complete_class): Variable's and parameter's type are patched
e64c46ce 21163 with a promoted type.
6d6044b0 21164 (declare_local_variables): Resolved non builtin types are promoted
e64c46ce
AJ
21165 before being used to build a variable decl. Removed type patch
21166 posted on variable initialization statement.
6d6044b0 21167 (source_start_java_method): Use build_decl_no_layout to build the
e64c46ce 21168 decl of a parameter of incomplete type.
6d6044b0 21169 (java_register_parsed_class): Process interfaces too. Call
e64c46ce 21170 rest_of_decl_compilation on each processed class declarations.
6d6044b0 21171 (java_complete_expand_methods): Don't attempt to expand things in
e64c46ce 21172 interfaces.
6d6044b0 21173 (java_complete_tree): Process CONVERT_EXPR, even though it always
e64c46ce
AJ
21174 has a type. Propagate error_mark_node to node's type too. Promote
21175 method's call argument type and return error_mark_node if
21176 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
21177 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
21178 handle unary operator nodes.
6d6044b0
PB
21179 (build_assignment): Added comment.
21180 (print_int_node): New function.
21181 (patch_assignment): New second argument. New error handling. Use
e64c46ce
AJ
21182 print_int_node. Handle references. Use can_cast_to_p to issue
21183 different error message according to the context and check upon
21184 the initialization of the RHS.
6d6044b0
PB
21185 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
21186 (operator_string): Handle more operators.
21187 (patch_binop): No longer use a function static
e64c46ce 21188 wfl_operator. Improved error message on shift distance.
6d6044b0 21189 (build_unaryop, build_incdec, build_cast, patch_unaryop,
e64c46ce 21190 patch_cast): New functions.
f6bbde28 21191
62c9aa5f 211921998-06-05 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21193
21194 * jvspec.c: New file.
21195 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
21196
21197 * java-tree.h (identifier_subst): Add declaration.
21198
62c9aa5f 211991998-06-04 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
21200
21201 * jvgenmain.c (main): Generate call to JvRunMain.
21202
21203 * class.c (make_class_data): Push value for "sync_info" field.
21204 * decl.c (init_decl_processing): Push "sync_info" field.
21205
62c9aa5f 212061998-06-03 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21207
21208 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
21209 Java (source) name, not signature.
21210 Set TYPE_ALIGN to (at least) that of element_type.
21211
62c9aa5f 212121998-06-02 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21213
21214 * class.c: Moved classname-mangling-rekated code to ...
21215 * mangle.c: ... this new file.
21216 * jvgenmain.c: New program (needs mangle.c) to generate main program.
f6bbde28 21217 * Makefile.in: Update for above changes.
6d6044b0 21218
62c9aa5f 212191998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21220
21221 * expr.c (truthvalue_conversion): Convert integer and floating
e64c46ce 21222 point value to their truth value.
6d6044b0
PB
21223 * lex.c (java_lex): Handle the `null' literal.
21224 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
21225 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
e64c46ce
AJ
21226 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
21227 New macros.
6d6044b0
PB
21228
21229 * parse.y: Reorganization/documentation on token declaration.
21230 (binop_lookup[]): New added new tree codes.
21231 (relational_expression): Build corresponding binary operators.
21232 (equality_expression, conditional_and_expression,
e64c46ce 21233 conditional_or_expression): Likewise.
6d6044b0
PB
21234 (java_complete_class): Fix crash in debug message.
21235 (java_complete_tree): Check initialization of method call
e64c46ce
AJ
21236 arguments. Further bogus node evaluation to detect more error
21237 during assignments. Handles more binary operators.
6d6044b0
PB
21238 (patch_assignment): Use DECL_P.
21239 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
e64c46ce 21240 code.
6d6044b0
PB
21241 (operator_string): Handle more case. Compacted source.
21242 (patch_binop): Changed function comment. Checking for
e64c46ce
AJ
21243 uninitialized first operand takes the compound assignment into
21244 account and uses DECL_P. Checking for uninitialized second operand
21245 delayed to routine's end. Use macros to issue type bound error
21246 messages and issue messages on both operands if their types are
21247 different. Force fixed type into node. Handle all binary
21248 operators.
f6bbde28 21249
62c9aa5f 212501998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21251
21252 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
f6bbde28
ZW
21253 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
21254 build operator node and return tokens.
21255 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
6d6044b0
PB
21256 * parse.h (java_complete_tree): Changed returned type in prototype.
21257 (build_method_invocation, build_assignment, patch_assignment,
e64c46ce 21258 patch_binop): New static function declarations.
f6bbde28 21259 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
e64c46ce 21260 BUILD_EXPR_WFL): New macros.
6d6044b0 21261 * parse.y (enum tree_code binop_lookup[]): New static for token to
e64c46ce 21262 TREE_CODE lookup.
6d6044b0 21263 (%union): Parser union has new sub-structure `operator'.
f6bbde28
ZW
21264 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
21265 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
21266 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
21267 ASSIGN_ANY_TK): Tokens tagged `operator'.
6d6044b0 21268 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
e64c46ce
AJ
21269 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
21270 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
21271 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
f6bbde28 21272 (assignment_operator:): Rule tagged `operator'.
6d6044b0 21273 (expression_statement:): Re-installed default rule.
f6bbde28 21274 (method_invocation:): Sub rules call build_method_invocation.
6d6044b0 21275 (postfix_expression:): Don't attempt to resolve name here. Just
e64c46ce 21276 return an ID.
6d6044b0 21277 (multiplicative_expression:): Sub-rules build corresponding binop
e64c46ce 21278 expression node.
6d6044b0 21279 (additive_expression:, shift_expression:, and_expression:,
e64c46ce 21280 exclusive_or_expression:, inclusive_or_expression:): Likewise.
f6bbde28
ZW
21281 (assignment:): Sub rule invoke build_assignment.
21282 (assignment_operator:): Default rules on sub rules.
6d6044b0 21283 (force_error): Added documentation on this variable.
f6bbde28
ZW
21284 (declare_local_variables): Build initialization calling
21285 build_assignment.
21286 (expand_start_java_method): Removed unused rtx declaration. Mark
e64c46ce 21287 arguments as already initialized.
f6bbde28 21288 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
6d6044b0 21289 (java_complete_expand_methods): Don't process next method if
e64c46ce 21290 completion of the previous one triggered errors.
6d6044b0 21291 (java_complete_expand_method): Call source_end_java_method if no
e64c46ce 21292 error were found during completion.
6d6044b0 21293 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
e64c46ce
AJ
21294 locals declaratilon. Handle names found within a class. Return
21295 error_mark_node when things aren't found.
6d6044b0
PB
21296 (patch_method_invocation_stmt): Return error_mark_node on failures.
21297 (patch_invoke): Removed unused local. Return the correct node.
21298 (java_complete_tree): Now returns a value. The BLOCK section binds
e64c46ce
AJ
21299 local identifiers and the type of a BLOCK is now void. Assign the
21300 result of operand completion on COMPOUND_EXPR. Assign the
21301 encapsulated node of a WFL to the result of its completion, except
21302 when the node is an identifier. Now handle MODIFY_EXPR and several
21303 binary operators. Return error_mark_node on errors.
6d6044b0 21304 (build_method_invocation, build_assignment, patch_assignment,
e64c46ce 21305 build_binop, operator_string, patch_binop): New functions.
6d6044b0
PB
21306 * typeck.c (binary_numeric_promotion): New function.
21307
62c9aa5f 213081998-05-21 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21309
21310 * class.c (identifier_subst): New convenience wrapper for ident_subst.
21311 Replace most uses of ident_subst by identifier_subst.
21312
21313 * class.c (push_class_static_dummy_field): Removed function.
21314 (build_class_ref): Find Class object decl by looking up "CNAME.class",
21315 instead of looking got "class" static field. Create that decl here.
21316 (class_identifier_node): Removed; no longer needed.
21317 (init_class_processing): Don't init class_identifier_node.
21318 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
21319 Do nreverse 0 times (instead of twice) for Object and Class.
21320 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
21321
62c9aa5f 213221998-05-20 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21323
21324 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
21325 while initializing linenumber_count and linenumber_table.
21326 Do it before init_function_start (which calls emit_line_note).
21327 * expr.c (expand_byte_code): Don't need to clear lineno here.
21328
62c9aa5f 213291998-05-18 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
21330
21331 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
21332 then mangle number as _N_.
21333
21334 * class.c (mangle_class_field): New function.
21335 (build_class_ref): Set assembler name of class reference using
21336 mangle_class_field.
21337 (push_class_static_dummy_field): Likewise.
21338
62c9aa5f 213391998-05-17 Michael Tiemann <tiemann@cygnus.com>
6d6044b0
PB
21340
21341 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
21342 of assigning to TREE_CODE. The latter method exploits a feature
21343 of GCC that is not ANSI compliant.
21344
62c9aa5f 213451998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21346
21347 * decl.c (pushdecl_force_head): New function.
21348 (pushlevel): Removed conditional printf.
21349 (complete_start_java_method): Don't enter local variable scope if
e64c46ce 21350 function is compiled from source code.
6d6044b0
PB
21351 * expr.c: parse.h now included
21352 (java_lang_expand_expr): New function.
21353 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
e64c46ce 21354 printf. Terminate buffer when doing directories.
6d6044b0 21355 * jcf-parse.c (parse_source_file): Call lang_init_source before
e64c46ce 21356 parsing and before code generation.
6d6044b0 21357 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
e64c46ce 21358 use printf if the macro is defined.
6d6044b0 21359 * lang.c (lang_init): Install lang_expand_expr hook on
e64c46ce 21360 java_lang_expand_expr.
6d6044b0
PB
21361 (java_dummy_print): New function.
21362 (lang_init_source): New function.
21363 * lex.c (java_lex): Remember location of an opening brace at the
e64c46ce 21364 second nesting level.
6d6044b0
PB
21365 (java_is_eol): Unget character seen after a CR if it is EOF.
21366 * parse.h: Now includes lex.h
21367 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
e64c46ce 21368 printf if the macro is defined.
6d6044b0 21369 (expand_start_java_method, build_expr_block, enter_block,
e64c46ce
AJ
21370 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
21371 New static function declarations.
6d6044b0
PB
21372 (pushdecl_force_head): New extern function declaration.
21373 (INCOMPLETE_TYPE_P): New macro.
21374 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
21375 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
e64c46ce 21376 BLOCK_EXPR_ORIGIN): New macros.
6d6044b0 21377 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
e64c46ce 21378 DECL_SOURCE_LINE_LAST): New macros.
6d6044b0 21379 (struct parser_ctxt): Removed field current_method_decl, redundant
e64c46ce
AJ
21380 with the field current_function_decl. Added fields
21381 first_ccb_indent1 and pending_block.
6d6044b0 21382 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
e64c46ce
AJ
21383 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
21384 tagged <node>
6d6044b0
PB
21385 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
21386 (compilation_unit:): Cosmetic on sub rule.
21387 (type_declaration:): Cosmetic on sub rules. Added an error rule.
21388 (variable_initializer:): Installed default rule on expression:.
21389 (method_declaration:): method_header: starts a new
e64c46ce
AJ
21390 method. method_body: installs the function body, absorbs blocks
21391 emitted for temporary variable scopings, pops function's body block
21392 and merges function's last statement lineno in DECL_SOURCE_LINE.
6d6044b0
PB
21393 (method_body:): Installed default rules.
21394 (block:): Call enter_block when an opening brace is seen. Absorb
e64c46ce 21395 scoping blocks and call exit_block when a closing brace is seen.
6d6044b0
PB
21396 (block_statement:): Cosmetic changes.
21397 (method_invocation:): Create WFL around CALL_EXPR node.
21398 (patch_stage): Added comment around definition.
21399 (method_header): Try to use first_ccb_indent1 as the first line of
e64c46ce
AJ
21400 the method, so BP debug info are emitted at the first opening
21401 brace of the function. If the function has no body, use the
21402 location of the function's name. Override currently defined method
21403 name with the matching WFL so we can point redefinition errors
21404 using the location where the function's name was declared.
6d6044b0 21405 (check_abstract_method_header): Interprets DECL_NAME as an
e64c46ce 21406 identifier or as a WFL, accordingly.
6d6044b0
PB
21407 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
21408 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
e64c46ce
AJ
21409 location and name information out of it and reinstall DECL_NAME to
21410 its original identifier node value.
6d6044b0 21411 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
e64c46ce 21412 function's source code).
6d6044b0 21413 (read_import_dir): Test the value returned by find_class and issue
e64c46ce 21414 a fatal accordingly.
6d6044b0 21415 (declare_local_variables): Push a new block for the scope of the
e64c46ce
AJ
21416 new variable(s) if code has been already generated at that nesting
21417 level. Pinpoint redefinition errors using the variable id
21418 WFLs. Generate initialization code if necessary. If the variable
21419 type is incomplete, register a patch on its decl.
6d6044b0 21420 (source_start_java_method): Rewritten. Define a new block for the
e64c46ce
AJ
21421 function's parameters. Build parameter decl out of function's
21422 arguments and register them for a patch if their types are
21423 incomplete.
6d6044b0 21424 (expand_start_java_method): Includes the part of
e64c46ce
AJ
21425 source_start_java_method that was pushing the parameter decls and
21426 completing the method start code.
6d6044b0 21427 (source_end_java_method): Removed call the expand_end_bindings and
e64c46ce
AJ
21428 poplevel (already taken care of). Reinstall function's arguments
21429 and get function's last line of code before calling
21430 expand_function_end.
6d6044b0 21431 (java_method_add_stmt): New comment before the function's
e64c46ce
AJ
21432 code. Complement the second operand of the current COMPOUND_EXPR
21433 if necessary.
6d6044b0 21434 (java_complete_expand_methods): Don't generate debug info on line
e64c46ce 21435 zero when expanding a generated constructor.
6d6044b0 21436 (java_complete_expand_method): Set start and end line numbers for
e64c46ce
AJ
21437 a artificially generated constructor to one and manually call
21438 enter_block and exit_block when defining it. For all methods:
21439 expand function's start calling the new expand_start_java_method
21440 and invoke java_complete_tree on the effective method's body, if
21441 any.
6d6044b0 21442 (resolve_expression_name): Now use lookup_name_in_blocks to search
e64c46ce
AJ
21443 local variable decls and print out an error when variables are
21444 undefined.
6d6044b0 21445 (patch_method_invocation_stmt): Inserted comment before the
e64c46ce 21446 function's code.
6d6044b0 21447 (lookup_method_invoke): Chain method's arguments using chainon
e64c46ce
AJ
21448 with the current arg list as a second argument. Inserted missing
21449 IDENTIFIER_POINTER when reporting an error on methods not found.
6d6044b0
PB
21450 (refine_accessible_methods_list): Don't retain constructors.
21451 (patch_arguments): Function removed.
21452 (java_complete_tree): Inserted comment before the function's
e64c46ce
AJ
21453 code. New case for BLOCKs. Moved the WFL case a bit
21454 further. Complete function's arguments.
21455 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21456 maybe_absorb_scoping_blocks): New functions.
f6bbde28 21457
62c9aa5f 214581998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21459
21460 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
e64c46ce 21461 previously set.
6d6044b0 21462 * jcf-parse.c (parse_source_file, java_error_count): New forward
e64c46ce 21463 and extern declarations.
6d6044b0
PB
21464 (java_parse_abort_on_error): Macro moved.
21465 (jcf_parse_source): fatal called if fopen fails. Now calls
e64c46ce 21466 parse_source_file.
6d6044b0 21467 (parse_source_file): New parse_only parameter. Reflects the
e64c46ce 21468 elimination of the second pass.
6d6044b0
PB
21469 (yyparse): parse_source_file called with argument set to 0.
21470 * jcf.h (JCF_ZERO): Sets java_source to zero.
21471 * lex.c (java_init_lex): pass argument is gone. Function modified
e64c46ce 21472 to be called once during the analysis of a file.
6d6044b0
PB
21473 (java_unget_unicode): Fixed typo in fatal message.
21474 (java_get_line_col): Likewise.
21475 (java_lval): Likewise. String literals no longer built during
e64c46ce 21476 second pass.
6d6044b0 21477 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
e64c46ce 21478 account.
6d6044b0
PB
21479 * parse.h (MODIFIER_WFL): New macro.
21480 (parse_check_super, parser_check_super_interface): Now return int.
21481 (parser_chain_incomplete_item, not_builtin_p,
e64c46ce 21482 complete_method_decl): Declarations removed.
6d6044b0 21483 (build_method_invocation_stmt, build_invoke): Renamed using the
e64c46ce 21484 `patch' instead of `build'
6d6044b0 21485 (register-incomplete_type, obtain_incomplete_type,
e64c46ce
AJ
21486 java_complete_tree, java_complete_expand_method,
21487 unresolved_type_p, create_jdep_list): New function declarations.
6d6044b0 21488 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
e64c46ce 21489 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
6d6044b0
PB
21490 (jdep): New typedef on new struct _jdep.
21491 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
e64c46ce
AJ
21492 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21493 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21494 JDEP_RESOLVED_P): New macros.
6d6044b0 21495 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
e64c46ce
AJ
21496 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21497 JDEP_VARIABLE): New enum values and jdep kinds.
6d6044b0
PB
21498 (jdeplist): New typedef on struct _jdeplist.
21499 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
e64c46ce 21500 macros.
6d6044b0
PB
21501 (CALL_EXPR_PRIMARY): New macro.
21502 (struct parser_ctxt): Fields java_pass, current_method_decl,
e64c46ce 21503 method_decl_list deleted. New field jdeplist.
6d6044b0
PB
21504 (INCOMPLETE_P): Macro deleted.
21505 * parse.y (single_type_import_declaration:): Removed pass switch.
21506 (type_import_on_demand_declaration): Likewise.
21507 (field_declaration:): Removed pass switch on all sub rules.
21508 (class_declaration:): Call the complete_class_decl removed on
e64c46ce 21509 class_body rules.
6d6044b0 21510 (method_declaration:): Removed second pass switch. No longer chain
e64c46ce 21511 methods decl when method_header reduced.
6d6044b0
PB
21512 (method_header:): Sub rules no longer depend on pass switch.
21513 (method_declarator:): Likewise.
21514 (method_body:): Likewise.
21515 (abstract_method_declaration:): Likewise.
21516 (block_statement:): Likewise.
21517 (local_variable_declaration:): Likewise.
21518 (argument_list:): Likewise.
21519 (method_invocation:): Likewise. Call to build_method_invocation_stmt
21520 removed. Partial CLASS_EXPR tree node built instead.
21521 (postfix_expression:): Removed pass switch on all sub rules.
21522 (java_pop_parser_context): Free classd_list content.
21523 (yyerror): Call obstrack_grow0 to finalize error message.
21524 (check_class_interface_creation): Comment modified to reflect new
e64c46ce
AJ
21525 returned value meaning. Removed second pass switch. Return 1 if an
21526 error was found, 0 otherwise. Adjust pointer on filename if a
21527 leading path separator was found.
6d6044b0 21528 (maybe_create_class_interface_decl): Removed first pass switch
e64c46ce
AJ
21529 when linking the class decl to the class_list. Install a new
21530 jdep_list for the class.
6d6044b0 21531 (add_superinterfaces): List of unresolved interfaces is
e64c46ce
AJ
21532 gone. Unresolved interfaces are directly added to the current
21533 dependencies list.
f6bbde28 21534 (create_interface): Second pass shortcut removed.
6d6044b0
PB
21535 ctpx->modifier_ctx access through MODIFIER_WFL.
21536 (create_class): Second pass shortcut removed. Call to
e64c46ce
AJ
21537 register_incomplete_type replaces the call to
21538 parser_chain_incomplete_item.
6d6044b0
PB
21539 (complete_class_decl): Function removed.
21540 (duplicate_declaration_error): New way of retrieving redeclared
e64c46ce 21541 item type.
6d6044b0 21542 (register_fields): Call to lookup_modifier_cl replaced by
e64c46ce
AJ
21543 MODIFIER_WFL. New way of handling unresolved type, using
21544 unresolved_type_p and obtain_incomplete_type.
6d6044b0
PB
21545 register_incomplete_type replaces call to parser_chain_incomplete_item.
21546 (patch_stage): New static global variable.
21547 (method_header): New way of handling unresolved type, using
e64c46ce
AJ
21548 unresolved_type_p and obtain_incomplete_type. patch_stage used to
21549 indicates that the method decl needs to be patched.
6d6044b0 21550 (check_abstract_method_header): Call to lookup_modifier_cl
e64c46ce 21551 replaced by MODIFIER_WFL.
6d6044b0 21552 (method_declarator): Incomplete argument type are registered
e64c46ce
AJ
21553 calling register_incomplete_type. Patch on the declared method is
21554 issued in that case.
6d6044b0
PB
21555 (unresolved_type_p): New function.
21556 (parser_check_super_interface): New comment to reflect function's
e64c46ce
AJ
21557 modified returned type (int). Function and has a new argument
21558 this_wfl. Call to parse_error_context uses this_wfl instead of
21559 relying on lookup_cl.
6d6044b0 21560 (parser_check_super): Comment reflects function's new returned
ee142fe7 21561 type (int). Function returns nonzero value on error.
6d6044b0 21562 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
e64c46ce
AJ
21563 register_incomplete_type, jdep_resolve_class): New functions to
21564 handle incomplete types in declarations.
6d6044b0 21565 (java_complete_class): Rewritten to work with the new incomplete
e64c46ce 21566 type handling scheme.
6d6044b0
PB
21567 (complete_class_report_errors): Likewise.
21568 (complete_method_decl): Removed: it jobs is now handled by
e64c46ce 21569 java_complete_class.
6d6044b0 21570 (do_resolve_class): Class loaded in not already loaded and not
e64c46ce 21571 found in Java source code.
6d6044b0 21572 (java_check_regular_methods, java_check_abstract_methods): Don't
e64c46ce 21573 call complete_method_decl anymore.
6d6044b0
PB
21574 (lookup_modifier_cl, not_builtin_p): Functions deleted.
21575 (read_import_dir): Got rid of the pass number dependency.
21576 (declare_local_variables): New handling of unresolved types (patch
e64c46ce 21577 issued).
6d6044b0 21578 (source_start_java_method): New parameter level. Function called
e64c46ce
AJ
21579 with level set to 1 when argument types are potentially
21580 unresolved. Called to complete the job with level set to 2 once
21581 types are complete.
6d6044b0 21582 (source_end_java_method): Call to permanent_allocation
e64c46ce
AJ
21583 removed. Waiting to be replaced by a more suitable obstack
21584 management.
6d6044b0 21585 (java_complete_expand_methods, java_complete_expand_method,
e64c46ce 21586 java_expand_finals): New functions.
6d6044b0 21587 (build_method_invocation_stmt): Renamed
e64c46ce
AJ
21588 patch_method_invocation_stmt. Extracts function call expression
21589 (wfl) and arguments (args) from CALL_EXPR tree operands.
6d6044b0 21590 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
e64c46ce
AJ
21591 call. Patch the function and argument operand of the CALL_EXPR
21592 tree argument.
6d6044b0
PB
21593 (patch_argument, java_complete_tree): New functions.
21594
62c9aa5f 215951998-04-20 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21596
21597 Recover from missing fields and methods (i.e. error instead of fatal).
21598 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
21599 * expr.c (expand_invoke): Recover from missing method.
21600 (expand_java_field_op): Recover from missing field.
21601 Inline references to java.lang.{Integer,Char,...}.TYPE.
21602 * typeck.c (get_type_from_signature), java-tree.h: New function.
21603 * class.c (add_method): Use get_type_from_signature.
21604 (build_class_ref): Handle a class that was not found.
21605 * typeck.c (convert): Handle conversion to pointers (for convenience).
21606 * verify.c (verify_jvm_instructions): Use get_type_from_signature
21607 instead of lookup_field to handle missing fields.
f6bbde28 21608
6d6044b0
PB
21609 * jcf-parse.c (process_zip_dir): Set java_source.
21610
216111998-04-20 Brendan Kehoe <brendan@cygnus.com>
21612
21613 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21614
62c9aa5f 216151998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21616
21617 * jcf-parse.c (load_class): Don't change input_filename before
e64c46ce
AJ
21618 calling jcf_parse_source (but still do it before calling
21619 jcf_parse).
6d6044b0 21620 (jcf_parse_source): Assign input_filename after having saved the
e64c46ce 21621 parser context.
6d6044b0 21622 * lex.c (java_init_lex): Chain a WFL node to the import on demand
e64c46ce
AJ
21623 list. ctxp->modifier_ctx zeroed according to its new
21624 definition. ctxp->filename initialized. Removed
6d6044b0
PB
21625 JAVA_MODIFIER_CTX_UNMARK.
21626 (java_unget_unicode): Update the character based column position.
21627 (java_allocate_new_line): ref_count not used anymore. Always free
e64c46ce 21628 ctxp->p_line. Initialize c_line->char_col to 0.
f6bbde28 21629 (java_get_unicode): Update the character based column position.
6d6044b0 21630 (java_lex): Use ctxp->elc to store current position in source
e64c46ce
AJ
21631 file, at the beginning of the parsed token. Set modifier_ctx entry
21632 corresponding to the parse modifier to a WFL node. Return a WFL
21633 node when an identifier is parsed.
6d6044b0 21634 (java_lex_error): Now uses ctxp->elc to store current position in
e64c46ce 21635 source.
6d6044b0
PB
21636 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21637 * lex.h (build_wfl_node): New function definitions.
21638 (struct java_line): ref_count and next fields are gone. New field
e64c46ce 21639 char_col.
6d6044b0 21640 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
e64c46ce 21641 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
6d6044b0
PB
21642 (JAVA_COLUMN_DELTA): New macro.
21643 (java_lc): New typedef on new struct _java_lc.
21644 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21645 (parse_error_context, parse_warning_context): Changed prototypes.
21646 (java_get_line_col): Added as an available global function.
21647 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21648 (IC_DECL): Replaced by macro IC_TYPE
21649 (DEPEND_WFL): New macro.
21650 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21651 wrong modifier.
21652 (exit_java_complete_class): Removed a commented out statement.
21653 (struct parser_ctxt): Added comments on fields. modifier_ctx is
e64c46ce
AJ
21654 now an array of tree nodes. Deleted fields line_list and
21655 e_line. New field elc, to replace e_line.
f6bbde28 21656 * parse.y (array_type:): Build WFL node.
6d6044b0 21657 (qualified_name:): Build a single WFL node out of two. Retain
e64c46ce 21658 the location information of the first node in the resulting node.
f6bbde28 21659 (package_declaration:): Use package name as a WFL node
6d6044b0
PB
21660 (single_type_import_declaration:): Use imported name as a WFL node.
21661 (type_import_on_demand_declaration:): Use root of the imported
e64c46ce 21662 packages as a WFL node.
6d6044b0
PB
21663 (field_declaration:): Removed unused local variable cl.
21664 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21665 (yyerror): New static elc. Removed static error_line, error_pos.
e64c46ce
AJ
21666 New local code_from_source. Save ctxp->elc into elc at the first
21667 pass. Call java_get_line_col to get a string of the line where
a83f01f0 21668 the error occurred.
6d6044b0
PB
21669 (debug_line): Removed static function.
21670 (parse_error_context, parse_warning_context): Parameter cl is now
e64c46ce 21671 a WFL node. Use its value to initialize ctxp->elc.
6d6044b0
PB
21672 (redefinition_error): Parameter cl is now a WFL node.
21673 (parse_add_interface): New parameter wfl. No longer call
e64c46ce 21674 lookup_cl, use wfl instead.
6d6044b0
PB
21675 (check_class_interface_creation): Parameter cl is now a WFL node.
21676 (maybe_create_class_interface_decl): Likewise.
21677 (add_superinterfaces): New function.
21678 (create_interface): Removed local cl, node, super_decl,
e64c46ce
AJ
21679 super_decl_type. Function now uses id as a WFL node. Better
21680 warning/error report on obsolete or forbidden mix of
21681 modifiers. Now calls add_superinterfaces to register interfaces.
6d6044b0 21682 (create_class): Removed local cl, node. Local variable id is used
e64c46ce
AJ
21683 as a WFL node. Better error report on forbidden modifier
21684 mix. Uses add_superinterfaces to register interfaces.
6d6044b0 21685 (find_field): Argument cl is now a WFL node. Now store the WFL
e64c46ce
AJ
21686 node of a fields that needs to be checked for their
21687 initialization.
6d6044b0 21688 (method_header): Local variable node non longer used. Local
e64c46ce 21689 variable id replaces cl.
6d6044b0 21690 (check_modifiers_consistency): Local variable cl is now a WFL
e64c46ce 21691 node.
6d6044b0
PB
21692 (method_declarator): Local variable cl replaced by parameter id.
21693 (parser_qualified_name): Now uses parameter name as a WFL node.
21694 (parser_check_super_interface): New parameter wfl, for achieve
e64c46ce 21695 greater accuracy during error reports.
6d6044b0 21696 (parser_chain_incomplete_item): New parameter named location. Used,
e64c46ce 21697 along the decl, to construct the incomplete item node.
6d6044b0 21698 (java_complete_class): resolve_class now uses WFL node extracted
e64c46ce 21699 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
6d6044b0
PB
21700 where appropriate.
21701 (complete_method_decl): Unresolved function's argument types are WFL.
21702 (resolve_class): Parameter cl is now a WFL node.
21703 (resolve_and_layout): Likewise.
21704 (do_resolve_class): Likewise. Try first to use cl and then do the
e64c46ce 21705 lookup on the decl when calling check_pkg_class_access.
6d6044b0 21706 (complete_class_report_errors): Use IC_TYPE in place of
e64c46ce
AJ
21707 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21708 instead of doing a lookup over the decl.
6d6044b0
PB
21709 (java_check_final): Use WFL info from field tree list.
21710 (lookup_cl): Rewritten and returns a statically defined WFL node.
21711 (lookup_modifier_cl): Now uses information from WFL nodes.
21712 (process_imports): Likewise.
21713 (read_import_dir): name and cl arguments replaced by a single WFL
e64c46ce 21714 node. Function modified accordingly.
6d6044b0
PB
21715 (find_in_imports_on_demand): Now uses WFL node.
21716 (check_pkg_class_access): cl argument is now a WFL node.
21717 (declare_local_variables): Fixed to use WFL nodes.
21718 (resolve_expression_name): Likewise.
21719 (build_method_invocation_stmt): name_combo argument renamed
e64c46ce 21720 wfl. Function modified to use WFL nodes.
6d6044b0
PB
21721 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21722 (lookup_method_invoke): cl is now a WFL node. Added missing
e64c46ce 21723 IDENTIFIER_POINTER to class type decl name.
f6bbde28 21724
62c9aa5f 217251998-04-14 Dave Brolley <brolley@cygnus.com>
6d6044b0
PB
21726
21727 * lang.c (init_parse): Now returns char* containing the filename.
21728
62c9aa5f 217291998-04-10 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21730
21731 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
21732
21733 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
21734 * class.c (make_class_data): If flag_assume_compiled, initial class
21735 state is CSTATE_PREPARED; make superclass and interfaces direct
21736 references, rather than constant pool indexes.
21737
62c9aa5f 217381998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21739
21740 * parser.y: Include flags.h. Removed debug variable pl.
21741 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21742 (block:): Likewise.
21743 (labeled_statement_nsi:): Generate debug info when reducing
e64c46ce 21744 expression_statement:.
67264b4f 21745 (check_pkg_class_access): get_access_flags_from_decl invocation
e64c46ce 21746 fixed for new CLASS_* flags location.
6d6044b0 21747 (source_end_java_method): Save/restore parser context when
e64c46ce
AJ
21748 entering/leaving this routine. Restore lineno to its right value
21749 before calling expand_end_bindings.
6d6044b0 21750 (build_method_invocation_stmt): build_invoke called with the
e64c46ce 21751 current line information.
6d6044b0 21752 (build_invoke): New argument cl. Wrap the function call around a
e64c46ce 21753 wfl node.
6d6044b0 21754 (refine_accessible_methods_list): Changed comment, removed
e64c46ce 21755 unnecessary code.
6d6044b0
PB
21756 * parse.h: Fixed typo in comments.
21757 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21758 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21759 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
e64c46ce 21760 parser_ccb_indent.
6d6044b0 21761 * lex.c (java_lex): Record the last closing curly bracket of a
e64c46ce 21762 function.
6d6044b0 21763 * jcf-parse.c (jcf_parse_source): Now calls
e64c46ce 21764 java_check_methods. Clarified comment, fixed typo.
6d6044b0
PB
21765
217661998-04-09 Dave Brolley <brolley@cygnus.com>
21767
21768 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21769 (finish_parse): Expose for non USE_CPPLIB builds.
21770
62c9aa5f 217711998-04-08 Jeffrey A Law (law@cygnus.com)
6d6044b0
PB
21772
21773 * lang.c (lang_print_xnode): New function.
21774
62c9aa5f 217751998-04-03 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21776
21777 * decl.c (class_dtable_decl), java-tree.h: New tree node.
21778 * class.c (get_dispatch_vector, get_dispatch_table): New functions
21779 used to build a class's dispatch table.
21780 (make_class_data): Generate dispatch table if flag_assume_compiled.
21781 Set dtable of class object to address of class_dtable_decl.
21782
21783 * decl.c (int_decl_processing): Make soft_badarrayindex_node
21784 be volatile and have side effects - generates better code.
21785
21786 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
21787 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21788
21789 * expr.c (expand_invoke): If class is final, method is
21790 effectively final, so can call it directly.
21791
21792 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
21793
21794 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
21795
62c9aa5f 217961998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21797
21798 * parse.y (build_method_invocation_stmt): Removed extra argument
e64c46ce 21799 to build_invoke.
6d6044b0 21800
62c9aa5f 218011998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21802
21803 * expr.c (dtable_indent): Now static global.
21804 (expand_invoke): Now call invoke_build_dtable and
e64c46ce 21805 build_invokevirtual.
6d6044b0
PB
21806 (invoke_build_dtable, build_invokevirtual): New functions.
21807 * jcf-io.c (find_class): Defer issuing a warning by setting
e64c46ce 21808 jcf->outofsynch to 1.
6d6044b0
PB
21809 * jcf-parse.c (jcf_out_of_synch): New function.
21810 (load_class): Test this_jcf.outofsynch flag and call
e64c46ce 21811 jcf_out_of_synch accordingly.
6d6044b0 21812 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
e64c46ce 21813 comment indentation.
6d6044b0
PB
21814 * lex.c (java_get_unicode): Fixed code indentation.
21815 (java_lex): Create string literal. Fixed typo. Removed several
e64c46ce 21816 premature obstack_free.
6d6044b0
PB
21817 * parse.h: New enums for name resolution and invocation mode.
21818 (struct qualification): New data structure.
21819 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21820 (do_resolve_class, build_method_invocation_stmt,
e64c46ce
AJ
21821 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21822 debug_line, identical_subpath_p, invocation_mode,
21823 refine_accessible_methods_list, build_invoke,
21824 lookup_method_invoke): New functions declared.
6d6044b0 21825 (build_invokevirtual, invoke_build_dtable, match_java_method,
e64c46ce
AJ
21826 build_field_ref, jcf_out_of_synch): New references to external
21827 functions.
6d6044b0
PB
21828 (struct parse_ctxt): Removed artificial_constructor field.
21829 * parse.y: (array_type:): Type defined for this rule.
21830 (class_type:): Installed default rule for interface_type:.
21831 (array_type:): Now build Java array type.
21832 (qualified_name:): Now use obstack_grow0.
21833 (method_declaration:): Skip the artificial constructor added to
e64c46ce 21834 the list, if any.
6d6044b0
PB
21835 (abstract_method_declaration:): Execute the code only during pass 1.
21836 (block:): Installed default rule in block_statements:.
21837 (block_statement:): Add the statement to the method during pass 2.
21838 (statement_expression): Installed default rule for
e64c46ce 21839 method_invocation:.
6d6044b0 21840 (argument_list:): Added code to build the argument list.
e64c46ce
AJ
21841 (method_invocation:): Added call to create the method invocation
21842 node.
6d6044b0
PB
21843 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21844 (debug_line): New function for debug.
21845 (complete_class_decl): No longer do something during pass 1.
21846 (method_header): Use BUILD_PTR_FROM_NAME.
21847 (parser_qualified_classname): Use obstack_grow0. Removed bogus
e64c46ce 21848 obstack_free.
6d6044b0 21849 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
e64c46ce 21850 function's main comment.
6d6044b0 21851 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
e64c46ce 21852 classes.
6d6044b0
PB
21853 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
21854 (resolve_class): Now works with arrays.
21855 (do_resolve_class, resolve_and_layout): New functions.
21856 (java_check_regular_methods): Reverse method list before and after
e64c46ce 21857 having processed it. No longer set ctxp->artificial_constructor.
6d6044b0 21858 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
e64c46ce
AJ
21859 accordingly. Fixed typo in issued error message. Now use
21860 obstack_grow0.
6d6044b0
PB
21861 (find_in_imports_on_demand): Now use obstack_grow0.
21862 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
21863 (source_end_java_method): Call expand_expr_stmt instead of
e64c46ce 21864 expand_expr. Calls it before calling expand_function_end.
6d6044b0 21865 (java_method_add_stmt): Do nothing if errors were found during
e64c46ce 21866 parsing.
6d6044b0
PB
21867 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
21868 (build_method_invocation_stmt, build_invoke, invocation_mode,
e64c46ce
AJ
21869 lookup_method_invoke, refine_accessible_methods_list,
21870 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
21871 New functions.
6d6044b0 21872 * typeck.c (build_java_signature): Properly end method signature
e64c46ce 21873 if return type skipped.
f6bbde28
ZW
21874 (match_java_method): New function.
21875
62c9aa5f 218761998-03-16 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21877
21878 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
21879
62c9aa5f 218801998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21881
21882 * expr.c (build_invoke_non_interface): New function.
21883 (methods_ident, ncode_ident): Now static globals.
21884 (expand_invoke): Use build_invoke_non_interface.
21885 * java-tree.h (struct lang_decl): New field function_decl_body.
21886 (DECL_FUNCTION_BODY): New macro.
21887 * jcf-parse.c (jcf_parse_source): Deeper check before setting
e64c46ce 21888 CLASS_FROM_SOURCE_P.
6d6044b0
PB
21889 (parse_source_file): Fixed typos. Call java_layout_parsed_class
21890 before starting pass 2. Call to java_generate_parsed_class replaced
21891 by java_register_parsed_class.
21892 * lex.c: Fixed typo in header. Some line width related formating.
21893 * lex.h: Some line width related formating.
21894 * parse.h (source_end_java_method, resolve_expression_name,
e64c46ce
AJ
21895 complete_class_decl, maybe_create_class_interface_decl,
21896 check_class_interface_creation): New static function declarations.
6d6044b0 21897 (java_layout_parsed_class, java_method_add_stmt): New function
e64c46ce 21898 declarations.
6d6044b0 21899 (struct parser_ctxt): Field mark_class_generate removed. New
e64c46ce 21900 fields class_list and artificial_constructor.
6d6044b0
PB
21901 * parse.y: Fixed typo in header.
21902 (class_declaration:): Call complete_class_decl when class body
e64c46ce 21903 parsed.
6d6044b0
PB
21904 (method_declaration:): Call source_end_java_method in pass 2 when
21905 the method body is defined.
21906 (postfix_expression:): Do expression name resolution on sub-rule
e64c46ce 21907 name during pass 2.
6d6044b0 21908 (create_class, create_interface): Merged common pieces.
e64c46ce 21909 (check_class_interface_creation, maybe_create_class_interface_decl):
6d6044b0
PB
21910 New functions.
21911 (complete_class_decl): New function.
21912 (register_fields): Fixed line width related typo.
21913 (method_header): Correctly skip first argument when fixing
e64c46ce 21914 argument line. Changed the loop.
6d6044b0
PB
21915 (java_check_circular_reference): Now use ctxp->class_list.
21916 (java_complete_class): Removed start/stop marking.
21917 (java_check_regular_methods): Now takes a class decl as an
e64c46ce 21918 argument. Add default constructor if none were encountered.
6d6044b0 21919 (java_check_methods): Now use ctxp->class_list. Changed call to
e64c46ce 21920 java_check_regular_methods.
6d6044b0 21921 (source_start_java_method): Set DECL_ARG_TYPE for each function
e64c46ce 21922 arguments.
6d6044b0
PB
21923 (source_end_java_method, java_method_add_stmt): New functions.
21924 (java_generate_parsed_class): No longer exists.
e64c46ce 21925 (java_layout_parsed_class, java_register_parsed_class): New functions.
f6bbde28 21926 (resolve_expression_name): New function.
6d6044b0 21927
62c9aa5f 219281998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21929
21930 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
21931 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
e64c46ce
AJ
21932 until pass initializations are done. Call read_import_dir with
21933 pass set to 0.
6d6044b0
PB
21934 * parse.h: (lookup_modifier_cl): New function declared.
21935 (INTERFACE_FIELD_MODIFIERS): New macro.
21936 (OBSOLETE_MODIFIER_WARNING): New macro.
21937 * parse.y: (register_fields): Class type and current field name in
e64c46ce 21938 local variables. Check modifier(s) if adding field(s) to an interface.
6d6044b0 21939 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
e64c46ce 21940 and report errors using the faulty modifier line context.
6d6044b0
PB
21941 (lookup_modifier_cl): New function.
21942 (read_import_dir): Detect and report default import processing
e64c46ce 21943 failure.
6d6044b0
PB
21944
219451998-02-11 Brendan Kehoe <brendan@cygnus.com>
21946
21947 Add a pair of -fassume-compiled/-fno-assume-compiled options.
21948 * class.c (is_compiled_class): Return 1 after making sure it
21949 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
21950 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
21951 * java-tree.h (flag_assume_compiled): Add decl.
21952 * lang.c (lang_f_options): Add the flag.
21953 (flag_assume_compiled): Add decl, default to 0.
21954
62c9aa5f 219551998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21956
21957 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
21958 (is_compiled_class): Likewise.
21959 (layout_class): Likewise.
21960 (layout_class): Detect and lay out classes defined in source code.
21961 (interface_of_p, add_interface_do, may_add_interface): New
e64c46ce 21962 function.
6d6044b0
PB
21963 (add_interface): Now use add_interface_do.
21964 (add_method_1): New function.
21965 (add_method): Now use add_method_1.
21966 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
21967 (complete_start_java_method): New function.
21968 (start_java_mehod): Now call complete_start_java_method.
21969 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
21970 (expand_invoke): Likewise and fixed typo.
21971 *gjava.c: (print_super_field): Use new argument to find_class
e64c46ce 21972 DO_CLASS_FILE.
6d6044b0
PB
21973 (main): Likewise.
21974 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
e64c46ce
AJ
21975 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
21976 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
21977 IDENTIFIER_NODE.
21978 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
6d6044b0
PB
21979 (add_method_1, push_class): New prototypes.
21980 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
21981 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
e64c46ce 21982 directory where the class was found.
6d6044b0 21983 (find_class): New argument DO_CLASS_FILE. Function find_class
e64c46ce 21984 modified accordingly.
6d6044b0
PB
21985 *jcf-parse.c: (fix_class_path): New function.
21986 (load_class): Use new VERBOSE argument. load_class now finds and
e64c46ce 21987 loads/parses .class/.java files. Save read_state of current_jcf
6d6044b0
PB
21988 if necessary.
21989 (java_parser_abort_on_error): New macro.
21990 (jcf_parse_source, parse_source_file): New function.
21991 (jcf_parse): Fixed typo.
21992 (yyparse): Call parse_source_file () only.
21993 (process_zip_dir): Fixed typo, fix zdir->filename_length when
e64c46ce 21994 writing the real class name back in the zip directory entry.
6d6044b0
PB
21995 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
21996 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
21997 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
21998 (find_class): Prototype fixed.
21999 *lex.c: Added 1998 time stamp.
22000 Removed all static global variables, moved into the parser
e64c46ce
AJ
22001 context data structure.. Now include unistd.h if SEEK_SET not
22002 defined.
6d6044b0
PB
22003 (java_init_lex): Rewritten.
22004 (java_sneak_unicode): Modified current unicode access in current line.
22005 (java_unget_unicode): Likewise.
22006 (java_allocate_new_line): New allocation management.
22007 (java_read_char): Modified access and storage of unget_utf8_value.
22008 New way of processing current unicode.
22009 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
22010 (java_get_unicode): Now use the parser context.
22011 (java_lineterminator): Likewise.
22012 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
e64c46ce
AJ
22013 of the reentrant parser implementation. Function now use the
22014 parser context data structure and java_lval. Fixed production of
22015 the float and double constant "out of range" error message. Fixed
22016 obstack use. Return integer value when hitting a modifier. Now
22017 return type for TRUE, FALSE and other predefined types. Return
22018 identifier as a TREE_LIST list containing the current line context
22019 as the TREE_VALUE sub-node.
6d6044b0
PB
22020 (java_unicode_2_utf8): Fixed typo in declaration.
22021 (java_lex_error): Now use the parser context data structure.
22022 *lex.h: Added 1998 time stamp.
22023 (struct java_line): New fields ref_count and next.
22024 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
e64c46ce 22025 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
6d6044b0
PB
22026 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
22027 *parse.h: Added 1998 time stamp.
22028 (java_parse_source_file): Renamed from parse_source_file.
22029 (YYERROR_NOW, YYNOT_TWICE): Fixed.
22030 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
e64c46ce
AJ
22031 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
22032 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
22033 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
22034 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
22035 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
6d6044b0
PB
22036 (struct parser_ctxt): New data structure to keep the parser context.
22037 *parse.y: Added 1998 time stamp, got rid of static global variables.
22038 (java_error_count, ctxp): New global variables.
22039 (%union): New value field.
22040 (numeric_type, integral_type): Rules removed.
22041 (primitive_type): Rule defined to handle integral, float, double and
e64c46ce 22042 boolean types.
6d6044b0 22043 (qualified_name, package_declaration,
e64c46ce
AJ
22044 single_type_import_declaration, type_import_on_demand_declaration,
22045 modifiers, class_declaration, super, interfaces,
22046 interface_type_list, class_body, field_declaration,
22047 field_declaration, variable_declarators, variable_declarator,
22048 variable_declarator_id, method_declaration, method_header,
22049 formal_parameter_list, formal_parameter, method_body, block,
22050 static, interface_declaration, extends_interfaces,
22051 abstract_method_declaration, local_variable_declarators): Rules now
22052 define actions.
6d6044b0
PB
22053 (force_error, do_warning): New global statics.
22054 (push_parser_context, parser_context_save_global,
e64c46ce 22055 parser_context_restore_global, pop_parser_context): New functions.
6d6044b0
PB
22056 (yyerror): Now uses the global parser context. Fixed use of obstack.
22057 (parse_error, parse_error_context, parse_warning_context,
e64c46ce
AJ
22058 java_accstring_lookup, redefinition_error, check_modifiers,
22059 parser_add_interface, create_interface, create_class, find_field,
22060 duplicate_declaration_error, register_fields, method_header,
22061 check_modifiers_consistency, check_abstract_method_header,
22062 method_declarator, parser_qualified_classname,
22063 parser_check_super_interface, parser_check_super,
22064 parser_chain_incomplete_item, java_check_circular_reference,
22065 layout_class_from_source, java_complete_class,
22066 complete_method_decl, resolve_class, complete_class_report_errors,
22067 java_check_final, check_method_redefinition,
22068 java_check_regular_methods, java_check_abstract_methods,
22069 java_check_methods, lookup_java_interface_method2,
22070 lookup_java_method2, lookup_cl, find_name_in_single_imports,
22071 process_imports, find_in_imports, read_import_entry,
22072 read_import_dir, find_in_imports_on_demand,
22073 check_pkg_class_access, not_builtin_p, declare_local_variables,
22074 source_start_java_method, java_generate_parsed_class): New
22075 functions.
6d6044b0
PB
22076 *typeck.c: (signature_include_return): New global variable.
22077 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
e64c46ce 22078 to add the function returned type in the signature.
6d6044b0
PB
22079
220801998-02-09 Brendan Kehoe <brendan@cygnus.com>
22081
22082 * jcf-io.c (open_in_zip): Use strncmp and LEN.
22083
62c9aa5f 220841998-01-29 Dave Brolley <brolley@cygnus.com>
6d6044b0
PB
22085
22086 * Make-lang.in (java.info): Added.
22087 (java.install-info): Added
22088
220891998-01-27 Brendan Kehoe <brendan@cygnus.com>
22090
22091 * Makefile.in (clean): Also remove java/parse.c.
22092
220931998-01-26 Brendan Kehoe <brendan@cygnus.com>
22094
22095 Add a pair of -fbounds-check/-fno-bounds-check options.
22096 * lang.c (lang_decode_option): Add code to grok arguments.
22097 (flag_bounds_check): Add decl.
22098 (lang_f_options): New array w/ the option in it.
22099 * java-tree.h (flag_bounds_check): Add decl.
22100 * lang-options.h: New file.
22101 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
22102 of a static macro value.
22103 (JAVA_ARRAY_EXCEPTION): Delete macro.
22104
62c9aa5f 221051998-01-23 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22106
22107 * typeck.c (build_java_array_type): Fix two bugs in previous change.
22108 * expr.c (build_anewarray): Add missing promote_type.
22109
62c9aa5f 221101998-01-22 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22111
22112 Add array types with known length to optimize bounds checking.
22113 * typeck.c (build_java_array_type): Take length parameter.
22114 (java_array_type_length, build_prim_array_type): New functions.
22115 * java-tree.h: Update for new functions.
22116 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
22117 * class.c: Use build_prim_array_type.
22118 * expr.c (can_widen_reference_to): Handle known-length array types.
22119 (verify_jvm_instructions): Keep track of integer push instructions
22120 followed by newarray/anewarray, so we can build known-length arrays.
22121 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
22122 (java_array_data_offset): New function.
22123 (build_java_array_length_access): New function. Optimize if constant.
22124 (build_java_arrayaccess): Constant fold bounds check.
22125 (expand_java_newarray, expand_java_anewarray): Replaced by ...
22126 (build_newarray, build_anewarray): New functions.
22127 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
22128 * verify.c (merge_types): Handle known-lengh array types.
22129
62c9aa5f 221301998-01-19 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22131
22132 * expr.c (expand_byte_code): Fix performace bug, which caused
22133 searching linenumber_table to be linear rather than constant.
22134
62c9aa5f 221351997-12-12 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22136
22137 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
22138
22139 * decl.c, java-tree.h (soft_fmod_node): New global.
22140 * decl.c (init_decl_processing): Define __builtin_fmod.
22141 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
22142 using __builtin_fmod.
22143
62c9aa5f 221441997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
22145
22146 * keyword.h: New file, output of keyword.gperf as processed by
e64c46ce 22147 gperf.
6d6044b0
PB
22148 * lex.c (java_lex_init): Initialize java_error_flag.
22149 * parse.c (YYERROR_NOW): Uses java_error_flag.
22150 * parse.y: New static java_error_flag. Useless definition of
e64c46ce 22151 buffer_error gone.
6d6044b0 22152 * parse.y (java_error): Portable error recovery using
e64c46ce 22153 java_error_flag (not yet completely tuned).
6d6044b0
PB
22154
221551997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
22156
22157 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
22158
62c9aa5f 221591997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
22160
22161 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
22162 (parse.c, lex.c, keyword.h): New rules for Java source code
e64c46ce 22163 front-end.
6d6044b0
PB
22164 * parse.c: Renamed into jcf-parse.c.
22165 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
22166 * keyword.gperf: New file, Java keywords.
22167 * parse.y: New file, Java language grammar.
22168 * parse.h: New file, Java language grammar definitions.
22169 * lex.c: New file, Java language lexer.
22170 * lex.h: New file, Java language lexer definitions.
22171
62c9aa5f 221721997-12-03 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22173
22174 * decl.c (clinit_identifier_node), java-tree.h: New global.
22175 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
22176 * verify.c (verify_jvm_instructions): Inline use of removed macros.
22177 * expr.c (expand_java_field_op): Check for invalid assignment
22178 to final field.
22179
22180 * jcf-reader.c (get_attribute): Test for wrong attribute length.
22181
62c9aa5f 221821997-10-27 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22183
22184 * verify.c (verify_jvm_instructions): When processing a handler,
22185 attempt to set the current_subr to the right value.
22186 (More complicated code combines Sep 17 and Oct 22 versions.)
22187
62c9aa5f 221881997-10-24 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22189
22190 * class.c (push_class): Figure out (guess) name of source file.
22191 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
22192 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
22193 (parse_class_file): Change return type from int to void.
22194 Call debug_start_source_file/debug_end_source_file.
22195
22196 * expr.c (build_java_binop): Fix masking 2nd operand.
22197 * decl.c (init_decl_processing): Set sizetype first.
22198
62c9aa5f 221991997-10-22 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22200
22201 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
22202 (Revert Sep 17 change.)
22203
62c9aa5f 222041997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
22205
22206 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
e64c46ce
AJ
22207 .class extension in their name and fix thing so we don't process
22208 them parse_zip_file_entries().
6d6044b0
PB
22209 (parse_zip_file_entries): Cleaned unused local variables.
22210
62c9aa5f 222111997-10-20 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22212
22213 * expr.c (can_widen_reference_to): Allows equal array element types.
22214 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
22215 * jcf-dump.c (RET): Get (and print) index.
22216
22217 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
22218 Promote element type to POINTER_TYPE.
22219
62c9aa5f 222201997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
22221
22222 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
e64c46ce
AJ
22223 find_in_current_zip, jcf_figure_file_type): Moved from
22224 jcf-reader.c to parse.c.
6d6044b0
PB
22225 * zextract.c: (read_zip_archive): takes file_comment_length possible
22226 field into account.
22227
62c9aa5f 222281997-10-20 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22229
22230 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
22231
22232 * verify.c (merge_types): Handle array types even better ...
22233
62c9aa5f 222341997-10-17 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22235
22236 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
22237
22238 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
22239 * class.c (make_class_data): Don't build fields_decl if no fields.
a83f01f0 22240 When building fields_decl, skip if DECL_ARTIFICIAL.
6d6044b0
PB
22241
22242 * expr.c (java_stack_swap): Update stack_type_map.
22243 * verify.c (merge_types): Handle array types better.
22244
62c9aa5f 222451997-10-15 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22246
22247 * class.c (add_field): Don't promote short integral fields to
22248 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
22249 * expr.c (push_value): Promote and convert short integral values.
22250
22251 * decl.c, java-tree.h (integer_two_node): New constant node.
22252 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
22253
62c9aa5f 222541997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
22255
22256 * class.c (append_gpp_mangled_type): Use function argument
e64c46ce 22257 unpromoted type to generate mangled name.
6d6044b0 22258
62c9aa5f 222591997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
22260
22261 * constants.c (build_constant_data_ref): Now uses current_class
e64c46ce 22262 instead of main_class.
6d6044b0 22263 (build_constants_constructor): Now uses current_class instead of
e64c46ce 22264 main_class.
6d6044b0 22265 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
e64c46ce 22266 of the global variable SeepZipFiles done here.
6d6044b0 22267 * zextract.c (read_zip_archive): extra_field optional field taken
e64c46ce
AJ
22268 into account while computing the position of the class file in the
22269 archive.
6d6044b0 22270 * verify.c (verify_jvm_instructions): Use current_jcf to search
e64c46ce 22271 the constant pool.
6d6044b0 22272 * parse.c (load_class): First search for the class to load in the
e64c46ce
AJ
22273 current zip file. Saves current_jcf (restored before returning
22274 from that function). Don't call JCF_FINISH in the class was found
22275 in the current ZIP file.
6d6044b0 22276 (jcf_parse): If the class was found in the current ZIP file, save
e64c46ce 22277 its tree_constant_pool (for later reuse).
6d6044b0 22278 (parse_class_file): New function. Process each method defined in
e64c46ce 22279 the current class and record the class as to be later registered.
6d6044b0
PB
22280 (yyparse): Rewritten. Figure the type of the current file and switch
22281 accordingly.
22282 * lang.c: New global variable current_jcf.
22283 (lang_init): Removed compiling_from_source test (done later, in
e64c46ce 22284 yyparse). Removed call the jcf_parse ().
6d6044b0
PB
22285 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
22286 (typedef struct JCF): New fields seen_in_zip (to mark a class found
22287 in the current ZIP file) and zip_offset (offset to the class data in
22288 the current zip file).
22289 * jcf-reader.c: zipfile.h included.
22290 localToFile: New ZipFileCache static global variable
22291 (parse_zip_file_entries): New function. Browse the current ZIP
e64c46ce 22292 file directory and process each class found.
6d6044b0 22293 (process_zip_dir): New function. Register each class found in the
e64c46ce
AJ
22294 ZIP file directory. The class aren't parsed but a valid JCF is
22295 link to each of them.
6d6044b0 22296 (find_in_current_zip): New function. Search for a class in the
e64c46ce
AJ
22297 current ZIP file directory. If found, prepare the class so that it
22298 can be loaded.
6d6044b0 22299 (jcf_figure_file_type): New function. Examine the file structure
e64c46ce
AJ
22300 to figure a class file, a ZIP file. If none of these categories are
22301 matched, a source file is assumed.
6d6044b0 22302 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
e64c46ce 22303 SeenZipFile: New global variable.
6d6044b0 22304 (open_in_zip): Use zipmember's length to accelerate the search for
e64c46ce
AJ
22305 a member. If zipmember was NULL and zip file successfully read,
22306 return 0.
6d6044b0 22307 * java-tree.h: New global variable current_jcf declared. Added
e64c46ce 22308 declaration for current_constant_pool_tags, current_constant_pool_data,
6d6044b0
PB
22309 current_constant_pool_length, current_constant_pool_data_ref.
22310 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
e64c46ce 22311 store the JCF of classes seen in a zip file) and tree *constant_pool
6d6044b0
PB
22312 (to save a loaded class constant pool). current_class declared here.
22313 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
e64c46ce 22314 retrieve method_ref_constant.
6d6044b0
PB
22315 (PUSHC): java_push_constant_from_pool now uses current_jcf.
22316 (OBJECT): get_class_constant now uses current_jcf.
22317 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
22318 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
22319 (expand_invoke): Now uses current_class instead of main_class
22320 (build_class_init): Now uses current_class instead of main_class
22321 * class.c: New static global variable registered_class.
22322 (register_class): New function.
22323 (emit_register_class): Modified to use registered_class instead of
e64c46ce 22324 main_class
6d6044b0
PB
22325 (is_compiled_class): Now take into account class seen in the archive.
22326
62c9aa5f 223271997-10-06 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22328
22329 * except.h: Renamed to: java-except.h.
22330 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
22331 * except.c: Add semi-working (commented out) implementation.
22332
22333 * expr.c (expand_iinc): Add needed flush_quick_stack.
22334 * parse.c (set_source_filename): New function.
22335 (give_name_to_class): Set input_filename from package.classname.java.
22336
22337 * jcf-io.c (find_class): Don't look first in ".".
22338
62c9aa5f 223391997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
22340
22341 * zextract.c (read_zip_archive): Now takes into account the
e64c46ce 22342 extra_field field.
6d6044b0 22343 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
f6bbde28 22344
62c9aa5f 223451997-09-20 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22346
22347 * constants.c, java-tree.h (build_internal_class_name): New function.
22348 (alloc_class_constant): Re-implement using build_internal_class_name.
22349 * class.c (make_class_data): Likewise.
22350 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
22351
62c9aa5f 223521997-09-17 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22353
22354 * verify.c (verify_jvm_instructions): Temporarily set current_subr
22355 to NULL before pushing an exception handler target.
22356
22357 * expr.c (flush_quick_stack): Save from low stack indexes to high.
22358 (java_stack_swap, java_stack_dup): Re-write to be safe from
22359 clobbering registers.
22360 (build_class_init): New function.
22361
62c9aa5f 223621997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
22363
22364 * typeck.c (build_java_array_type): Temporary use
e64c46ce 22365 permanent_obstack to create the array 'length' field.
6d6044b0 22366 * expr.c (lookup_label): Temporay use permanent_obstack to create
e64c46ce 22367 label if not found.
6d6044b0
PB
22368 * class.c (push_super_field): Tempory use permanent_obstack.
22369
62c9aa5f 223701997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
22371
22372 * typeck.c (type_for_mode): Now handles double_type_node and
e64c46ce 22373 float_type_node.
6d6044b0 22374 * verify.c (verify_jvm_instructions): The instruction following
e64c46ce
AJ
22375 the wide bytecode is checked. OPCODE_ret added to the list of
22376 wide.
6d6044b0 22377
62c9aa5f 223781997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
22379
22380 * class.c (make_class): Temporary use permanent_obstack. Set the
e64c46ce 22381 class CLASS_P field to 1.
6d6044b0
PB
22382 (push_class): Temporary use permanent_obstack.
22383 (set_super_info): Temporary use permanent_obstack.
22384 (add_method): Temporary use permanent_obstack, set
e64c46ce 22385 METHOD_TRANSIENT().
6d6044b0 22386 (add_field): Temporary use permanent_obstack. Sets
e64c46ce 22387 FIELD_VOLATILE() and FIELD_TRANSIENT().
6d6044b0 22388 (build_class_ref): Temporary use permanent_obstack if the class
e64c46ce 22389 isn't compiled.
6d6044b0 22390 (build_static_field_ref): Temporary use permanent_obstack when
e64c46ce 22391 creating field's rtl.
6d6044b0 22392 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
e64c46ce 22393 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
6d6044b0
PB
22394 and fields. Function finalized, as far as flag handling.
22395 (push_class_static_dummy_field): Temporary use permanent_obstack.
22396 (emit_register_class): Force generation of class registration at
e64c46ce 22397 -O3 or deeper.
6d6044b0
PB
22398 * decl.c (end_java_method): Call permanent_allocation() before
22399 returning.
22400 * expr.c (can_widen_reference_to): Added comment to interface
22401 handling, fixed typo.
22402 (lookup_field): Now uses CLASS_P() to correct FIXME
f6bbde28 22403 (expand_invoke): Verification on public && !static &&
6d6044b0
PB
22404 !abstract moved into soft_lookupinterfacemethod (kaffe).
22405 Use Object class dtable if objectref is an array when expanding
22406 invokeinterface.
22407 (java_push_constant_from_pool): Temporary use permanent_obstack
22408 for CONSTANT_string
22409 * parse.c (get_ref_constant): Temporary use permanent_obstack to
e64c46ce 22410 create constant references.
6d6044b0
PB
22411 (get_constant): Temporary use permanent_obstack to create constant.
22412 (load_class): Temporary use permanent_obstack to load class.
22413 (jcf_parse): Temporary use permanent_obstack to perform class
22414 layout.
22415 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
22416 (build_java_signature): Temporary use permanent_obstack.
17126208 22417 * verify.c: (verify_jvm_instruction): removed unnecessary verification
6d6044b0
PB
22418 on ACC_SUPER flag.
22419 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
22420 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
22421 (CLASS_P): Defined
22422
62c9aa5f 224231997-09-11 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22424
22425 * class.c (append_gpp_mangled_type): Fix typo.
22426 (emit_register_class): Use main_class to get class object, rather
22427 than looking for no-longer-existing static decl starting with _CL.
22428 * typeck.c (parse_signature_type): Promote array element type
22429 if it is a RECORD_TYPE.
f6bbde28 22430
62c9aa5f 224311997-09-10 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22432
22433 * class.c (push_class_static_dummy_field): New function.
22434 (mangle_static_field): New. Do G++-style mangling of static fields.
22435 (layout_class): Mandle static fields here, not in add_field.
22436 (build_class_ref): The class object is now a dummy static field.
22437 * decl.c (find_local_variable): Look for best, instead of first match.
22438 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
22439 (build_java_athrow): Don't check here if exception is Throwable.
22440 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
22441 (TYPE_USED): Removed. No longer used ...
22442 * parse.c (jcf_parse): Call push_class_static_dummy_field.
22443 * verify.c (push_pending_label): New function.
22444 (push_pending_block): Renamed to check_pending_block.
22445 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
22446 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
22447 re-checking possible handlers) after a store (less wasted work).
e64c46ce 22448 Check for null handler (finally) before calling add_handler.
6d6044b0
PB
22449 Various changes to (finally?) correctly handle try/finally.
22450
224511997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
22452
22453 * class.c: Include stdio.h.
22454
62c9aa5f 224551997-09-04 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22456
22457 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22458 to make sure class is initialized before static/special invoke.
22459
22460 * verify.c (verify_jvm_instructions): On a store instruction,
22461 call find_local_variable to force pre-allocation of decl and rtx.
22462 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
22463
62c9aa5f 224641997-09-03 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22465
22466 * class.c (build_class_ref): Strip off "promoted_" if need be.
22467 (make_field_value): Call build_java_signature when needed.
22468 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
22469 * expr.c (build_java_athrow): Don't push_value of exception.
22470 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22471 match specification of [fd]cmp[lg] for NaNs.
22472 (expand_byte_code): Add support for exception handler ranges.
22473 * except.c: Add skeleton for EH code-generation.
22474 * verify.c (merge_types): Treat all promoted integral types as equal.
22475 * constants.c (build_constants_constructor): To force creation of
e64c46ce 22476 current_constant_pool_data_ref, call build_constant_data_ref.
f6bbde28 22477
6d6044b0
PB
22478 * javaop.def (lload): Fix typo.
22479 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
f6bbde28 22480
62c9aa5f 224811997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
6d6044b0
PB
22482
22483 * parse.c: Don't include function.h.
22484
62c9aa5f 224851997-08-27 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22486
22487 * except.[ch]: New files.
22488 * Makefile.in (JAVA_OBJS): Add except.o
22489 * expr.c: Temporary warning about unimplemented exceptions.
22490 * verify.c: Verify exception handlers.
f6bbde28 22491
6d6044b0
PB
22492 * jcf-dump.c (disassemble_method): Print exception table.
22493
62c9aa5f 224941997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
22495
22496 * expr.c (verify_jvm_instructions): Started a thorough
e64c46ce 22497 verification of invoke* bytecodes.
6d6044b0 22498 (expand_byte_code): flush quick stack if PC is the target of a
e64c46ce 22499 branch. and undef RET (conflicting with config/i386/i386.h).
6d6044b0 22500 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
e64c46ce 22501 used.
6d6044b0 22502 (expand_invoke): Now handles invokeinterface and do more
e64c46ce 22503 verification according to the bytecode.
6d6044b0 22504 (lookup_field): Don't try to load the class if processing
e64c46ce 22505 dtable_type.
6d6044b0
PB
22506 (can_widen_reference_to): Now handles interfaces.
22507 * decl.c (init_decl_processing): New global variable
e64c46ce 22508 soft_lookupinterfacemethod_node, declared in java-tree.h.
6d6044b0
PB
22509 Call set_super_info on string_type_node.
22510 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22511 defined.
22512 * class.c (set_super_info): Fills the CLASS_* flags according to
22513 access_flags.
22514 (get_access_flags_from_decl): Handles all class flags.
22515
62c9aa5f 225161997-08-26 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22517
22518 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
22519 * parse.c (yyparse): Check for abstract method, and missing code.
22520 * expr.c (expand_byte_code): Change interface.
22521 * lang.c (put_decl_node): Print promoted types prettier.
22522 * verify.c (verify_jvm_instruction): Change interface.
22523 Partial support for scanning exception table.
22524 For load instructions, handle promoted integral types.
22525
62c9aa5f 225261997-08-21 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22527
22528 * verify.c: New file, with contents moved from expr.c.
22529 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
22530 * typeck.c (is_array_type_p): Moved here from expr.c.
22531 * java-tree.h: Add some now-needed function declarations.
22532 * Makefile.in (JAVA_OBJS): Added verify.o.
22533
62c9aa5f 225341997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
22535
22536 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22537 METHOD_ABSTRACT flag.
22538
22539 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22540 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22541 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22542
22543 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22544 variables.
22545 (start_java_method): Hook for SYNCHRONIZED methods.
22546
22547 * expr.c (build_java_jsr, build_java_ret): New functions
22548 (JSR,PRE): New macros
22549 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
f6bbde28 22550 (verify_jvm_instructions): tableswitch, lookupswitch,
6d6044b0
PB
22551 monitorenter, monitorexit, goto_w: verified.
22552 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22553 (build_java_monitor): New function.
22554 (MONITOR_OPERATION): Modified to call build_java_monitor()
f6bbde28 22555 (verify_jvm_instructions): Started a thorough verification of
6d6044b0
PB
22556 invoke* bytecodes.
22557
62c9aa5f 225581997-08-19 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22559
22560 Support verification of jsr/ret subroutines (used for try/finally).
22561 * decl.c (return_address_type_node): New type node.
22562 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22563 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22564 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
22565 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22566 TYPE_USED): New macros for special types in type_map.
22567
22568 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
22569 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
22570 BCODE_JUMP_TARGET.
22571 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
22572
22573 * expr.c (can_widen_reference_to): New function.
22574 (pop_type): Use it.
22575 (merge_type_state): Support handling start of subroutine.
22576 (push_pending_block): Return char* error message, instead of calling
22577 fatal on an error. Also handle subroutines.
22578 (verify_jvm_instructions): Handle errors from push_poending_block.
22579 Support jsr and ret instructions.
f6bbde28 22580
62c9aa5f 225811997-08-19 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22582
22583 * jcf-io.c (find_classfile): Fix thinko.
22584 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
22585
62c9aa5f 225861997-08-12 Jason Merrill <jason@yorick.cygnus.com>
6d6044b0
PB
22587
22588 * Makefile.in (BISON): Remove.
22589
62c9aa5f 225901997-08-07 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22591
22592 * Makefile.in: Convert to autoconf.
22593 * config-lang.in (outputs): Added java/Makefile.
22594
22595 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22596 Rename cc1java to jc1.
22597
22598 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
22599 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
22600
22601 * class.c (class_depth): Do load_class if needed.
22602
22603 Mostly better verification.
22604 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
22605 (init_decl_processing): Change return type of soft_checkcast.
22606 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
22607 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22608 lang_print_error): New functions.
22609 (lang_init): Set global hook print_error_function to lang_print_error.
22610 * expr.c: In the type_map ptr_type_node is only used for null now.
22611 (pop_type, merge_types): Hence ptr_type_node matches any reference.
22612 (merge_types): Dererence pointer to record types before comparing.
22613 (decode_newarray_type, merge_types): On error just return NULL.
22614 (build_java_binop): Add preliminary implementation (with warning)
22615 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22616 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
22617 (expand_compare, expand_java_goto, expand_java_call): Don't
22618 push_pending_block, since that only makes sense when verifying.
22619 (merge_type_state): Different return codes.
22620 (push_pending_block): A block may need to be verified more than once.
22621 (expand_byte_code): Warn about unused code at code generation time.
22622 (verify_jvm_instruction): Changed logic, since code may need to be
22623 re-verified if type-state has changed. Also, better error handling.
22624 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22625 Improve newarray, anewarray, ?aload, athrow,
22626 * java-tree.h (LABEL_CHANGED): New macro.
f6bbde28 22627
62c9aa5f 226281997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
22629
22630 * decl.c (soft_athrow_node): New global variable initialized.
22631 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22632 * typeck.c (convert): Added support for REAL_TYPE.
22633 (convert_to_char): New function.
22634 (convert): Handle CHAR_TYPE.
22635 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22636 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22637 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22638 promoted type.
22639 (verify_jvm_instructions): Added break a the end of bogus unop: label.
22640 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22641 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22642 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22643 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22644 to Use The Right Things.
22645 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
e64c46ce 22646 compatible with INT. BOOLEAN is made equivalent to BYTE.
f6bbde28 22647 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
6d6044b0
PB
22648 OPCODE_ifnonnull): Now supported.
22649 (build_java_athrow): New function.
22650
62c9aa5f 226511997-08-04 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22652
22653 Rename method name <init> to match G++ (and fix mangling).
22654 * class.c (layout_class): Replace method name of <init> by class name.
22655 (make_method_value): Do inverse renaming of constructor from <init>.
22656 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
22657 * typeck.c (lookup_java_constructor): New function.
22658 * expr.c (expand_invoke): If method_name is <init>, call
22659 lookup_java_constructor to find constructor.
22660
22661 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
22662
62c9aa5f 226631997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
22664
22665 * parse.c (get_class_constant): Modified to handle array "classes"
22666 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22667 wide type.
22668 (convert): Modified to handle real type.
22669 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22670 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22671 variables declared.
22672 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22673 soft_multianewarray, soft_newarray_node, soft_throw_node): New
22674 global variables initialized.
22675 (find_local_variable): Handles the case of a pointer
22676 (end_java_method): Restore the use of one more scope
22677 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22678 build_java_array_length_access, expand_java_arrayload,
22679 expand_java_arraystore, expand_java_array_length,
f6bbde28 22680 expand_java_multianewarray, expand_java_anewarray,
6d6044b0
PB
22681 build_java_check_indexed_type, is_array_type_p,
22682 build_java_throw_out_of_bound_exception): New functions.
22683 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22684 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22685 OPCODE_<t>aload): Implemented code for verification.
22686 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22687 ARRAY_NEW_MULTI): Macro defined.
22688 (CONVERT): Modified to invoke convert().
22689 (case OPCODE_aload2): Fixed index typo from 2 to 1.
22690
62c9aa5f 226911997-07-31 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22692
22693 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
22694 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
22695 (make_class_data): Field name needs '/' as package prefix.
22696 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
22697
62c9aa5f 226981997-07-25 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22699
22700 Implement debug information for local variables.
22701 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22702 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22703 DECL_LOCAL_SLOT_CHAIN): New macros.
22704 (struct lang_decl_var): New type.
22705 * parse.c (give_name_to_locals): Move to decl.c.
22706 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
22707 (start_java_method): Re-write parameter handling.
22708 (pending_local_decls): New global variable.
22709 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
22710 (find_local_variable): Accept pc so we can skips decls not in range.
22711 (struct binding_level): Add end_pc field.
22712 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22713 (various): Change so current pc gets passed to find_local_variable.
22714
22715 * decl.c (init_decl_processing): Re-arrange fields in
22716 class_type_node and and method_type_node to match kaffe 0.9.1.
22717 * class.c (make_method_value, make_class_data): Update
22718 initializations to match.
f6bbde28 22719
62c9aa5f 227201997-07-16 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22721
22722 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22723 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
22724 (push_super_field): New function.
22725 (make_class_data): Handle inheritance of class static initializer.
22726 (layout_class): New name mangling.
22727 * constants.c (build_constant_data_ref): Init type of data array
22728 to a one-element array.
22729 (build_constants_constructor): Set DECL_SIZE from complete array type.
22730 * decl.c: Rename class_type, object_type etc to class_type_node,
f6bbde28 22731 object_type_node etc. Make former inherit from latter.
6d6044b0
PB
22732 * expr.c (expand_invoke): Add cast of function address.
22733 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
22734 * parse.c (yyparse): Don't call layout_class here.
22735 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
22736
62c9aa5f 227371997-06-14 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22738
22739 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
22740 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
22741 (alloc_class_constant): New.
22742 * expr.c (expand_invoke): Make sure method's class is initialized.
22743 * class.c (interits_from_p, emit_register_class): New functions.
22744 * parse.c (yyparse): Call emit_register_class.
22745
62c9aa5f 227461997-06-09 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22747
22748 * constants.c: New file, to handle constant pool.
22749 * Makefile.in (JAVA_OBJS): Add constants.o.
22750 * decl.c (init_decl_processing): Update, fix, finish various structs.
22751 (pushdecl_top_level): New.
22752 * parse.c (layout_class): Moved to class.c.
22753 * expr.c (java_push_constant_from_pool): New function.
22754 * class.c (build_class_ref): Make work fully
22755 (make_class_data): Emit super-class, constant pool, interface vector.
22756
62c9aa5f 227571997-06-03 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
22758
22759 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
22760 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
22761 * class.c (class_depth): New function.
22762 (lookup_named_class): Replaced by new function lookup_class.
22763 * decl.c (object_type_node, string_type_node): New.
22764 Remove various types that we no longer need.
22765 * expr.c (verify_jvm_instructions): New separate verifier pass.
22766 (push_type, pop_type): New functions for verifier.
22767 (type_stack_dup, pop_argument_types, merge_types): Likewise.
22768 (expand_byte_code): Simplify, since we assume already verified.
22769 (expand_invoke): Now mostly works.
22770 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22771 * lang.c (main_class): Move to parse.c. Don't make_class yet.
22772 * parse.c: Wait to allocate class object until we know its name.
22773 (layout_class): Calculate DECL_VINDEX for each virtual method.
22774 * typeck.c (get_array_type): Rename to ...
22775 (build_java_array_type): ... and provide working implementation.
22776 (build_java_signature): New function - build Java signature of type.
22777 (set_java_signature): New function - cache signature with type.
22778 (lookup_java_method): New function.
f6bbde28 22779
62c9aa5f 227801997-05-06 Per Bothner <bothner@deneb.cygnus.com>
6d6044b0
PB
22781
22782 * class.c (ident_subst): Take extra SUFFIX parameter.
22783 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
22784 (set_constant_value, build_static_field_ref, is_compiled_class): New.
22785 (build_class_ref): Actually implement.
22786 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
22787 * decl.c (builtin_function): New.
22788 (init_decl_processing): Update for current Kaffe. Declare some
22789 builtin Kaffe functions.
22790 * expr.c (build_address_of): New.
22791 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22792 Renamed (from expand_java_new etc), and added working implementations.
22793 (build_field_ref): Now also handle static fields.
22794 (expand_invoke): Implement invokestatic, and start implement rest.
22795 * java-opcodes.h: Use javaop.def to avoid duplicated list.
22796 * javaop.def: Rename invokevirt -> invokevirtual.
22797 * lang.c (use_handles): Removed.
a83f01f0 22798 * parse.c: Add support for ConstantValue attribute.
6d6044b0
PB
22799 Handle nested loading of a class. (JPOOL_UTF): New.
22800
62c9aa5f 228011997-03-11 Per Bothner <bothner@deneb.cygnus.com>
6d6044b0
PB
22802
22803 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
22804
62c9aa5f 228051997-02-27 Per Bothner <bothner@deneb.cygnus.com>
6d6044b0
PB
22806
22807 * Make-lang.in (java.install-man): New empty rule.
22808 * typeck.c (set_local_type): New function.
22809 * expr.c (STORE_INTERNAL): Call find_local_variable,
22810 not find_stack_slot. Call set_local_type.
22811
62c9aa5f 228121997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
6d6044b0
PB
22813
22814 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
22815 and building RECORD_TYPE CONSTRUCTORs.
22816 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22817
22818 * lang.c (use_handles): Change the default to 0.
22819 * decl.c: Define and build class_type, field_type, utf8const_type.
22820 * class.c (make_class_data, make_field_value,
22821 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22822 hashUtf8String, strLengthUtf8, mangled_classname:
22823 Functions to build reflective data structures.
22824 * parse.c (yyparse): Call make_class_data.
22825
22826 * jcf-io.c (open_class, find_classfile): New functions.
22827 * jcf-dump.c: Support reading classfile from explicitly-named
22828 class file (without CLASSPATH searching).
22829
62c9aa5f 228301996-10-24 Per Bothner <bothner@deneb.cygnus.com>
6d6044b0
PB
22831
22832 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
22833 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22834 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22835 (get_constant): Now trivial for CONSTANT_Utf8.
22836
22837 * jcf.h: Make NEW_CPOOL the default.
22838 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
f6bbde28 22839
62c9aa5f 228401996-10-24 Per Bothner <bothner@deneb.cygnus.com>
6d6044b0
PB
22841
22842 New directory.
ad41bd84
JM
22843
22844\f
d1e082c2 22845Copyright (C) 1996-2013 Free Software Foundation, Inc.
ad41bd84
JM
22846
22847Copying and distribution of this file, with or without modification,
22848are permitted in any medium without royalty provided the copyright
22849notice and this notice are preserved.