]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/java/ChangeLog
Makefile.in (integrate.o): Update.
[thirdparty/gcc.git] / gcc / java / ChangeLog
CommitLineData
63e1b1c4
NB
12002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
2
3 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
4 * java-tree.h (java_dup_lang_specific_decl): New.
5 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6
f458d1d5
ZW
72002-02-27 Zack Weinberg <zack@codesourcery.com>
8
9 * builtins.c, decl.c: Delete traditional-mode-related code
10 copied from the C front end but not used, or used only to
11 permit the compiler to link.
12
d2fb5329
TT
132002-02-22 Tom Tromey <tromey@redhat.com>
14
15 Fix for PR java/2369:
16 * jvspec.c (verify_class_name): New function.
17 (lang_specific_driver): Call it.
18 (JAVA_START_CHAR_P): New macro.
19 (JAVA_PART_CHAR_P): Likewise.
20
dcb36804
PB
212002-02-22 Per Bothner <per@bothner.com>
22
23 * class.c: Change vtable to be more compatible with g++ v3 abi.
24 (get_dispatch_table): Prepend offset-to-top (always 0) and
25 type_info pointer (currently unimplemented hence NULL) to vtable.
26 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
27 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
28 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
29 (build_dtable_decl): Add declarations for new fields.
30
453c182f
PB
312002-02-20 Per Bothner <per@bothner.com>
32
33 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
34 to finit$ (otherwise generate_bytecode_insns drops it). However, we
35 don't need to set it on the COMPOUND_EXPR - the caller does that.
36
3babb2e3
NF
372002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
38
39 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
40 `--CLASSPATH' becomes `--classpath.'
41 * gjavah.c: Likewise.
42 * jcf-dump.c: Likewise.
43 * lang-options.h: Likewise.
44 * lang.c: Likewise.
45 * jcf-path.c: Updated comment.
46 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
47 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
48 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
49 (jcf_path_CLASSPATH_arg): Ditto.
50 (classpath_u): Updated leading comment.
51
9fe2cc05
PB
522002-02-20 Per Bothner <per@bothner.com>
53
54 * builtins.c (check_for_builtin): New function.
55 (build_call_or_builtin): Remove.
56 * java-tree.h: Update accordingly.
57 * expr.c (expand_invoke): Use build + check_for_builtin instead
58 of build_call_or_builtin.
59 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
60 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
61 flag (which had caused jcf-write to incorrectly emit invokevirtual).
62
6b6294f1
TT
632002-02-17 Tom Tromey <tromey@redhat.com>
64
65 * java-tree.h (TYPE_STRICTFP): New macro.
66 (struct lang_type) [strictfp]: New field.
67 (CLASS_STRICTFP): New macro.
68 (METHOD_STRICTFP): New macro.
69 (struct lang_decl) [strictfp]: New field.
70 * parse.y (method_header): Disallow strictfp constructor or
71 abstract method.
72 (STRICT_TK): Move before MODIFIER_TK.
73 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
74 (METHOD_MODIFIERS): Likewise.
75 (INTERFACE_MODIFIERS): Likewise.
76 * jcf-write.c (get_access_flags): Likewise.
77 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
78 (add_method_1): Likewise.
79 (get_access_flags_from_decl): Likewise.
80 * jcf-dump.c (print_access_flags): Print in standard order. Also,
81 recognize strictfp flag.
82 * jcf.h (ACC_STRICT): New define.
83
5667c33d
DB
842002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
85
86 * class.c(build_utf8_ref): Move declaration of decl_size
87
5d65aeb7
TT
882002-02-07 Tom Tromey <tromey@redhat.com>
89
90 * gcj.texi (Input Options): --CLASSPATH does not suppress system
91 path.
92
10c45943
AG
932002-02-04 Anthony Green <green@redhat.com>
94
95 * class.c (build_utf8_ref): Put UTF-8 constants into merged
96 sections if available.
97
14b71055
BM
982002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
99
100 * parse.y (java_expand_classes): Fix typo in static field loop.
101
f0c75752
RH
1022002-02-02 Richard Henderson <rth@redhat.com>
103
104 * class.c (add_field): Mark static fields external.
105 (build_class_ref): Remove redundant set.
106 * parse.y (java_expand_classes): Mark static fields of classes
107 to be compiled as local.
108 * jcf-parse.c (parse_class_file): Likewise.
109
d4ad1c90
NF
1102002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
111
112 * gcj.texi (About CNI): New node.
113
58fae3f7
CR
1142002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
115
116 PR java/5080
117 * jcf-parse.c : Check for HAVE_LOCALE_H before using
118 setlocale() with LC_CTYPE as a parameter.
119 * jv-scan.c: Same.
120
8512bbd7
JM
1212002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
122
123 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
124 Follow GNU Coding Standards for --version.
125
adc8cb5d
TT
1262002-01-28 Tom Tromey <tromey@redhat.com>
127
128 * expr.c (build_jni_stub): Ensure storage for `meth' is
129 generated.
130 * parse.y (java_complete_expand_methods): Set
131 current_function_decl before building JNI stub.
132
1d8478d7
AT
1332002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
134
135 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
136 BUILT_IN_SQRTF.
137
fec763fc
TT
1382002-01-22 Tom Tromey <tromey@redhat.com>
139
140 * decl.c (java_init_decl_processing): Use add_predefined_file.
141 Predefine RawData.java.
142 (predef_filenames): Removed.
143 (java_init_decl_processing): Don't register predef_filenames.
144 * jcf-parse.c (add_predefined_file): New function.
145 (predefined_filename_p): Rewrote.
146 (predefined_filename_p): No longer static.
147 * decl.c (java_init_decl_processing): Call initialize_builtins.
148 * Make-lang.in (JAVA_OBJS): Added builtins.o.
149 (java/builtins.o): New target.
150 * builtins.c: New file.
151 * parse.y (patch_invoke): Use build_call_or_builtin.
152 * java-tree.h (build_call_or_builtin): Declare.
153 (initialize_builtins): Declare.
154 (java_set_exception_lang_code): Removed unused declaration.
155 (PREDEF_FILENAMES_SIZE): Removed.
156 (java_tree_index): Added JTI_PREDEF_FILENAMES.
157 (predef_filenames): New define.
158 (add_predefined_file): Declare.
159 (predefined_filename_p): Declare.
160 * expr.c (expand_invoke): Use build_call_or_builtin.
161
cc586d70
KG
1622002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
163
164 * parse.y (patch_switch_statement): Fix format specifier.
165
0df29596
TT
1662002-01-16 Tom Tromey <tromey@redhat.com>
167
168 More for PR java/5365:
169 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
170 default.
171 (process_file): Generate include for
172 java.lang.UnsupportedOperationExceptions.
173
e1886ae0
AJ
1742002-01-15 Andreas Jaeger <aj@suse.de>
175
176 * .cvsignore: Add man pages.
177
9c874875
TT
1782002-01-15 Tom Tromey <tromey@redhat.com>
179
180 Fix for PR java/5365:
181 * gjavah.c (process_file): Turn class name into a file name.
182
707635f9
MK
1832002-01-14 Matthias Klose <doko@debian.org>
184
185 * gcj.texi: Fix whitespace and formatting errors in the
186 synopsis of the man pages. Update copyright.
187
e6a5e462
TT
1882002-01-14 Tom Tromey <tromey@redhat.com>
189
190 For PR libgcj/5303:
191 * Make-lang.in (java.install-man): Handle jv-convert man page.
192 (java.generated-manpages): Added jv-convert.1.
193 (java.uninstall): Remove jv-convert.1.
194 (java.maintainer-clean): Likewise.
195 ($(srcdir)/java/jv-convert.1): New target.
196 * gcj.texi (Top): Link to jv-convert node.
197 (Individual utilities): Likewise.
198 (Invoking jv-convert): New node.
199
0b0d4c5b 2002001-01-10 Jeff Sturm <jsturm@one-point.com>
f0c75752 201 Martin Kahlert <martin.kahlert@infineon.com>
0b0d4c5b
JS
202
203 * jcf-parse.c (get_constant): Don't swap lo/hi for big
204 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
205
c0b65ff1 2062002-01-03 Graham Stott <grahams@redhat.com>
79ab76fd 207
f0c75752
RH
208 * class.c (compile_resource_file): Update copyright date.
209 Constify filename parameter.
210 (java-tree.h): Update copyright date.
211 (compile_resource_file): Constify filename parameter.
79ab76fd 212
22e85ed4
GS
2132002-01-03 Graham Stott <grahams@redhat.com>
214
f0c75752
RH
215 * gcc/jcf-parse.c: Update copyright date.
216 (yyparse): Constify resource_filename.
22e85ed4 217
5e65297b
KG
2182002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
219
220 * parse.y (src_parse_roots): Don't needlessly zero init.
221
12cfb4fc
TT
2222001-12-31 Tom Tromey <tromey@redhat.com>
223
224 * parse.y (dump_java_tree): New function.
225 (source_end_java_method): Call it.
226 (end_class_declaration): Likewise.
227 * lang.c (java_decode_option): Call dump_switch_p.
228
dab722ee
TT
2292001-12-28 Tom Tromey <tromey@redhat.com>
230
231 * gen-table.pl: Don't process characters after \uffff. Added
232 comment pointing to input file.
233
7b0295ab
KG
2342001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
235
236 * gen-table.pl: Const-ify output. Document the location of a
237 suitable unicode input file.
238
239 * chartables.h: Regenerate.
240
c083a819
KG
2412001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
242
243 * chartables.h: Const-ify.
244 * gjavah.c (options): Likewise.
245 * jcf-dump.c (options): Likewise.
246 * jv-scan.c (options): Likewise.
247 * lex.c (java_start_char_p, java_part_char_p): Likewise.
248 * parse.y (binop_lookup): Likewise.
249
0b5826ac
KG
2502001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
251
252 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
253 the static arrays that are output.
254 * jvspec.c (jvgenmain_spec): Make static.
255 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
256 * keyword.h: Regenerate.
257 * lang.c (string_option, process_option_with_no, lang_f_options,
258 lang_W_options): Const-ify.
259 * lex.c (java_lex): Likewise.
260
9a07cfaf
RH
2612001-12-21 Richard Henderson <rth@redhat.com>
262
263 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
264 (get_boehm_type_descriptor): ... here. Arrange for the
265 TREE_TYPE to get set properly.
266
f44fefca
RH
2672001-12-21 Richard Henderson <rth@redhat.com>
268
ef969525
RH
269 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
270 only if the target requires collect2.
271
f44fefca
RH
272 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
273
84a944b3
TT
2742001-12-20 Tom Tromey <tromey@redhat.com>
275
276 For PR java/4509:
277 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
278 CAN_COMPLETE_NORMALLY for the node.
279 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
280 generate code for second branch if first branch can't complete
281 normally.
282 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
283 the loop head if the loop body can't complete normally.
284
2d93b924
TT
2852001-12-20 Tom Tromey <tromey@redhat.com>
286
287 For PR java/4766:
288 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
289 case where `finally' clause can't complete normally.
290
f2af50db
TT
2912001-12-20 Tom Tromey <tromey@redhat.com>
292
293 Fixes PR java/5057:
294 * parse.y (analyze_clinit_body): Added this_class parameter.
295 Check for more cases where we must keep <clinit>.
296 (maybe_yank_clinit): Cleaned up flow control.
297
7899e8b9
BM
2982001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
299
e1886ae0 300 * decl.c (java_init_decl_processing): Don't initialize
7899e8b9
BM
301 finit_leg_identifier_node.
302 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
303 (finit_leg_identifier_node): Remove.
304 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
305
de4984af
BM
3062001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
307
e1886ae0 308 * mangle.c (mangle_member_name): Don't special-case for
de4984af
BM
309 NO_DOLLAR_IN_LABEL.
310 * mangle_name.c (unicode_mangling_length): Likewise.
311 (append_unicode_mangled_name): Likewise.
312 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
313 code.
314
08514ae4
BM
3152001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
316
317 * expr.c (build_java_array_length_access): Don't force null pointer
318 check unless flag_check_references is set.
319
56b8325e
TT
3202001-12-20 Tom Tromey <tromey@redhat.com>
321
322 Fix for PR java/3417:
323 * parse.y (patch_assignment): Added special processing for
324 `return'.
325 (patch_return): Don't convert booleans to integers, and don't
326 special-case `null'.
327
38be19f6
JM
3282001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
329
330 * config-lang.in (diff_excludes): Remove.
331
b11cc610
JM
3322001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
333
334 * gcj.texi: Update link to GCC manual.
335
e97562f5
TT
3362001-12-17 Tom Tromey <tromey@redhat.com>
337
338 * parse.y (link_nested_class_to_enclosing): Removed useless
339 statement.
340
2c5187c5
TT
3412001-12-16 Tom Tromey <tromey@redhat.com>
342
343 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
344 Fixes PR java/5088.
345
a83f01f0
JM
3462001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
347
348 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
349 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
350 spelling errors.
351
faf31866
KG
3522001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
353
354 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
355
9a8de998
BM
3562001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
357
358 * decl.c (java_init_decl_processing): Build otable_type correctly.
359 otable_decl is an otable_type.
360
861ef928
BM
3612001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
362
363 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
e1886ae0 364 otable_type, otable_ptr_type, method_symbol_type,
861ef928
BM
365 method_symbols_array_type, method_symbols_array_ptr_type): New
366 field/global tree definitions.
367 (flag_indirect_dispatch): New flag.
e1886ae0 368 * decl.c (java_init_decl_processing): Initialize new otable and
861ef928
BM
369 otable_syms type nodes and decls. Add new field "index" to
370 method_type_node.
371 * class.c (build_method_symbols_entry): New function.
372 (make_method_value): Set "index" to to method's vtable index for
373 virtual methods when indirect-dispatch is not used.
a83f01f0 374 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
861ef928
BM
375 and set vtable_method_count to -1. Set otable and otable_syms field
376 if indirect-dispatch is used and there was something to put in them.
377 (build_method_symbols_entry): New function.
378 (emit_offset_symbol_table): New function.
379 * expr.c (get_offset_table_index): New function.
e1886ae0 380 (build_invokevirtual): Build array reference to otable at the index
861ef928
BM
381 returned by get_offset_table_index, and use the result as the vtable
382 offset.
383 (build_invokeinterface): Similar.
e1886ae0
AJ
384 * jcf-parse.c (yyparse): If indirect-dispatch, call
385 emit_offset_symbol_table at the end of compilation, after all classes
861ef928
BM
386 have been generated.
387 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
388 * lang.c (flag_indirect_dispatch): Define.
389 (lang_f_options): Add indirect-dispatch flag.
390
f1727481
MK
3912001-12-14 Matthias Klose <doko@debian.org>
392
393 * gcj.texi: Markup for man page generation. Document missing
394 options printed by <tool> --help.
395 Terminate description of gij's -ms option with a dot.
396 * Make-lang.in ($(srcdir)/java/*.1): New targets.
397 (java.generated-manpages java.install-man, java.uninstall,
398 java-maintainer-clean) Updated.
399
eec87542
HB
4002001-12-14 Hans Boehm <Hans_Boehm@hp.com>
401
402 * class.c (get_dispatch_table): Fix java vtable layout
403 for TARGET_VTABLE_USES_DESCRIPTORS.
404 * decl.c (java_init_decl_processing): Initialize
405 alloc_no_finalizer_node, finalize_identifier_node.
406 * expr.c (class_has_finalize_method): New function.
407 (expand_java_NEW): Generate calls for finalizer-free allocation.
408 (build_invokevirtual): Fix java vtable layout for
409 TARGET_VTABLE_USES_DESCRIPTORS.
e1886ae0 410 * java-tree.h (enum java_tree_index): New entries:
eec87542
HB
411 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
412 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
413 (class_has_finalize_method): declare.
414 (HAS_FINALIZER_P): New macro.
415 * parse.y (patch_invoke): Generate calls for finalizer-free
416 allocation.
417
81deb0a3
MK
4182001-12-12 Matthias Klose <doko@debian.org>
419
420 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
421 whitespace at end of line.
422
34026199
TT
4232001-12-11 Tom Tromey <tromey@redhat.com>
424
425 * lex.c (java_init_lex): Define wfl_to_string as
426 gnu.gcj.runtime.StringBuffer unless generating bytecode.
427
a3bcfa67
JS
4282001-12-11 Jeff Sturm <jsturm@one-point.com>
429
430 * class.c (make_method_value): Use null_pointer_node to
431 represent empty exception table.
432
3afdfae8
TT
4332001-12-10 Tom Tromey <tromey@redhat.com>
434
435 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
436
96a9c44f
DR
437Mon Dec 10 06:09:57 2001 Douglas B. Rupp <rupp@gnat.com>
438
439 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
440
a5cb134d
PB
4412001-12-09 Per Bothner <per@bothner.com>
442
443 * check-init.c (current_switch_has_default): New static field.
444 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
445 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
446 DEFAULT_EXPR seen, simulate a default alternative that copies state.
447
1aca9b81
TT
4482001-12-09 Tom Tromey <tromey@redhat.com>
449
450 * check-init.c (check_init): Don't allow pre- or post- increment
451 or decrement of final variable.
452 (final_assign_error): Minor error message rewording.
453
4440ffc4
TT
4542001-12-08 Tom Tromey <tromey@redhat.com>
455
0854b1c4
TT
456 * java-tree.h: Fixed typo.
457
5fcab235
TT
458 * gjavah.c (decompile_method): Don't decompile to `return this'
459 for static methods.
460
7b35f6c9
TT
461 * gjavah.c (cxx_keywords): Re-sorted.
462 * lex.c (cxx_keywords): Re-sorted.
463
897c9e66
TT
464 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
465 else.
466
4440ffc4
TT
467 * gjavah.c (print_namelet): Clear subnamelets.
468 (HANDLE_METHOD): Set `method_printed' earlier.
469
8f25dc28
TT
4702001-12-07 Tom Tromey <tromey@redhat.com>
471
472 * lang.c (lang_f_options): Added
473 optimize-static-class-initialization.
474 (java_decode_option): Removed special case.
475
a9040c77
PB
4762001-12-07 Per Bothner <per@bothner.com>
477
478 * check-init.c (check_init): Fix typo freeing memory twice.
479
5412ef6b
PB
4802001-12-05 Per Bothner <per@bothner.com>
481
482 Restore support for static class initialization optimization.
483 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
484 * check-init.c (check_int): At end of BLOCK handle initialization
485 blocks, which used to be done in java_complete_expand_method but did
486 not handle the case where check_for_initialization might allocate
487 more than a word of bits.
488 * decl.c (lang_make_tree): The smic field is now a tree.
489 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
490 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
491
492 * parse.y (emit_test_initialization): Combine hash_lookup calls.
493
494 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
495 Change from a hash table to a list.
496 (struct_lang_decl): Change field 'smic' to match.
497 * class.c (add_method_1): Initialize
498 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
499 * parse.y (adjust_init_test_initialization): Removed - inlined into -
500 (java_expand_method_bodies): -here, since 'smic' is now a list.
501 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
502
503 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
504
505 * class.c (java_hash_compare_tree_node): Fix casts.
506
4f88ccda
PB
5072001-12-04 Per Bothner <per@bothner.com>
508
509 * check-init.c: Handle definite unassignment to finals in addition
510 to definite assignment.
511 (loop_current_locals): New field.
512 (num_current_locals, int start_current_locals, num_current_words):
513 Make static.
514 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
515 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
516 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
517 (get_variable_decl, check_final_reassigned): New functions.
518 (check_init, check_bool_init): Modify as needed for checking finals.
519 (check_for_initialization): Take extra parameter and return void.
520 Do extra start-up logic to check final fields for assignment.
521 * parse.y (check_static_final_variable_assignment_flag,
522 reset_static_final_variable_assignment_flag, check_final_assignment,
523 check_final_variable_local_assignment_flag,
524 reset_final_variable_indirect_assignment_flag,
525 reset_final_variable_global_assignment_flag): Remove functions.
526 (java_complete_expand_methods, outer_field_access_fix,
527 patch_assignment): Remove no-longer used logic.
528 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
529 * parse.y (register_fields, java_complete_tree): Update accordingly.
530
531 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
532 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
533 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
534
535 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
536
537 * java-tree.h (DECL FINAL): New bit-field.
538 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
539 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
540 (DECL_INIT_CALLS_THIS): New macro.
541 (struct lang_decl): New bit-field init_calls_this.
542 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
543 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
544 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
545 use it for both local variables and final fields.
546 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
547 and local_final.
548 (struct lang_type): Remove hfv bit-field.
549 (check_for_initialization): Change to return void.
550
551 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
552 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
553 * check-init.c (final_assign_error): New helper function.
554 (check_final_reassigned, check_init): Use it.
555 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
e1886ae0 556
4f88ccda
PB
557 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
558 bit-fields to unsigned.
559
87d4ad08
PB
5602001-12-03 Per Bothner <per@bothner.com>
561
562 * parse.y (patch_binop): Minor constant folding.
563
564 * parse.y (build_current_thisn): Shorter 'buffer'.
565
aedcdb65
PB
5662001-12-03 Per Bothner <per@bothner.com>
567
568 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
569 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
570 * jcf-write.c (generate_bytecode_insns): Remove support for
571 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
572 * check-init.c (check_init): Likewise.
573
82ff672e
PB
5742001-12-03 Per Bothner <per@bothner.com>
575
576 * verify.c (subroutine_nesting): New function.
577 (verify_jvm_instructions): Use it to fix logic for checking that
578 we're done with the current subroutine.
579
580 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
581 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
582
98a63868
PB
5832001-12-03 Per Bothner <per@bothner.com>
584
585 * jcf.h: Fix obvious typo in comment.
586 * typeck.c (build_null_signature): Add comment.
587
c725bd79
NB
5882001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
589
590 * expr.c: Remove leading capital from diagnostic messages, as
591 per GNU coding standards.
592 * jcf-io.c: Similarly.
593 * jcf-parse.c: Similarly.
594 * jv-scan.c: Similarly.
595 * jvspec.c: Similarly.
596 * mangle.c: Similarly.
597
b736dee6
TCH
5982001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
599 Alexandre Petit-Bianco <apbianco@redhat.com>
600
e1886ae0 601 * expr.c (build_java_arrayaccess): Call save_expr on array for
7e5f4bee 602 correct evaluation order, modified comment, fixed indentation.
b736dee6
TCH
603 * parse.y: (patch_assignment): Correctly extract the array base
604 from the tree generate by build_java_arrayaccess, added comments.
605 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
606 Fixes PR java/3096, PR java/3803, PR java/3965.
607
357351e5
NB
6082001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
609
610 * expr.c (expand_byte_code): Remove trailing periods from messages.
611 * jcf-parse.c (load_class, jcf_parse): Similarly.
612 * jcf-write.c (generate_classfile): Similarly.
613 * lex.c (java_lex): Similarly.
614
a7c5337d
BM
6152001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
616
617 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
618
d3945f0a
JM
6192001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
620
621 * Make-lang.in (java.generated-manpages): New dummy target.
622
b856c15d
RO
6232001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
624
625 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
626 ASM_FINAL_SPEC.
627 (lang_specific_pre_link): Use set_input to set input_filename.
628 Append `main' here.
629 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
630 (main): Fix definition.
631 Strip `main' from classname.
632 Fixes PR java/227.
633
9c2fcf09
RS
6342001-11-18 Roger Sayle <roger@eyesopen.com>
635
636 * parse.h (java_expand_switch): Remove old prototype.
637
8aeb42d0
TT
6382001-11-18 Tom Tromey <tromey@redhat.com>
639
640 Fix for PR java/1401:
641 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
642 arg0 is null.
643 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
644 correctly.
645
22703ccc
NB
6462001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
647
648 * lang.c (finish_parse): Rename to java_finish.
649 (LANG_HOOKS_FINISH, java_finish): New.
650
f5e99456
NB
6512001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
652
653 * decl.c (init_decl_processing): Rename java_init_decl_processing.
654 * java-tree.h: New prototype.
655 * lang.c (java_init): Update prototype. Combine with old init_parse.
656
150f086d
TT
6572001-11-13 Tom Tromey <tromey@redhat.com>
658
659 * gjavah.c (method_signature): New global.
660 (HANDLE_METHOD): Set it.
661 (decompile_return_statement): New function.
662 (decompile_method): Use it.
663 (print_method_info): Removed `synth' argument.
664
5d69f816
NB
6652001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
666
667 * java-tree.h (java_set_yydebug): New.
668 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
669 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
670 (print_lang_decl, print_lang_type, print_lang_identifier,
671 print_lang_statistics, lang_print_xnode): Remove.
672
3ac88239
NB
6732001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
674
675 * jcf-parse.c (init_lex): Remove.
676 * lang.c (language_string, lang_identify): Remove.
677 (struct lang_hooks): Constify.
678 (LANG_HOOKS_NAME): Override.
679 (init_parse): Update.
680
b21d216c
AF
6812001-11-08 Andreas Franck <afranck@gmx.de>
682
e1886ae0 683 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
b21d216c
AF
684 program_transform_name the way suggested by autoconf.
685 (java.install-common): Also transform auxiliary program names with
686 program_transform_name.
687
1fa73144
TT
6882001-11-08 Tom Tromey <tromey@cygnus.com>
689
690 * parse.y (trap_overflow_corner_case): New rule.
691 (unary_expression): Use it.
692 * lex.c (java_init_lex): Don't set minus_seen.
693 (yylex): Don't use minus_seen. Communicate overflow to parser for
694 it to handle.
695 (error_if_numeric_overflow): New function.
696 * parse.h (minus_seen): Removed field.
697 (JAVA_RADIX10_FLAG): New define.
698
5a21a051
TT
6992001-11-07 Tom Tromey <tromey@redhat.com>
700
701 Patch for PR java/1414:
702 * parse.y (case_label_list): New global.
703 (goal): Register case_label_list with GC.
704 (java_complete_lhs): Save new case on case_label_list.
705 (patch_switch_statement): Check for duplicate case labels.
706
5573cb39
APB
7072001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
708
709 * parse.y (patch_assignment): Removed unused third argument.
710 (java_complete_lhs): Removed unused third argument to patch_assignment.
711
d23c55c2
NB
7122001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
713
714 * lang.c: Include langhooks-def.h.
715 * Make-lang.in: Update.
716
5b7874aa
ZW
7172001-10-31 Zack Weinberg <zack@codesourcery.com>
718
719 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
720
2b472f91
BM
7212001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
722
723 * mangle.c (find_compression_record_match): Don't match compression
724 records for package name elements unless they occur at the start of
725 the name. Fix for PR java/4717.
726
961b8e70
BM
7272001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
728
729 * expr.c (expand_java_field_op): Don't special-case references to
730 java.lang.PRIMTYPE.TYPE.
731 (build_primtype_type_ref): Removed.
732 * java-tree.h (build_primtype_type_ref): Remove prototype.
733 * parse.y (maybe_build_primttype_type_ref): Removed.
734 (complete_function_arguments): Don't special-case references to
735 java.lang.PRIMTYPE.TYPE.
736 (patch_assignment): Likewise.
737 (array_constructor_check_entry): Likewise.
738
98f705b9
APB
7392001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
740
741 * mangle.c (static tree compression_table): Fixed leading comment.
742 * parse.h (struct parser_ctxt): Fixed field comment.
743 * parse.y (check_pkg_class_access): New prototype, fixed leading
744 comment, new parameter used to emit error only if passed as true.
745 (parse_check_super): Pass extra argument to check_pkg_class_access.
746 (do_resolve_class): Likewise.
747 (process_imports): Likewise.
748 (read_import_dir): Fixed indentation.
749 (find_in_imports_on_demand): New local class_type_name. Local
750 node_to_use deleted. while loop changed into for loop. Report
751 multiple definition only for accessible classes. Improved error
752 message.
753 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
754 assigned to parameter list, fixed indentation. while loop changed
755 into for loop, restore TREE_CHAIN on local `tem' before the next
756 iteration.
757
8ac61af7
RK
758Tue Oct 23 14:02:17 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
759
760 * lang.c (lang_get_alias_set): Deleted.
761
0df6c2c7
KG
7622001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
763
299b5f9e
KG
764 * gjavah.c (jni_print_char): Fix thinko in last change.
765
0df6c2c7
KG
766 * gjavah.c (jni_print_char, decode_signature_piece): Use
767 safe-ctype macros and/or fold extra calls into fewer ones.
768 * lex.c (java_read_unicode, java_lex): Likewise.
769 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
770 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
771 * mangle_name.c (append_unicode_mangled_name,
772 unicode_mangling_length): Likewise.
773
17ed6335
RH
7742001-10-17 Richard Henderson <rth@redhat.com>
775
776 * Make-lang.in (java/lang.o): Depend on langhooks.h.
777
c83303d8
APB
7782001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
779
780 * lang.c (langhooks.h): Included.
781 (LANG_HOOKS_INIT): Redefined.
782 (LANG_HOOKS_INIT_OPTIONS): Likewise.
783 (LANG_HOOKS_DECODE_OPTION): Likewise.
784 (struct lang_hooks lang_hooks): New initialization.
785
be98560f
PB
7862001-10-11 Per Bothner <per@bothner.com>
787
89b894e1
PB
788 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
789 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
790 The former is simpler, and jcf-write.c handles it better.
791 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
792 or WITH_CLEANUP_EXPR.
793 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
794 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
795
be98560f
PB
796 * parse.y (patch_if_else_statement): If the condition is constant,
797 optimize away the test.
798
3fb5c0eb
APB
7992001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
800
801 * parse.y (patch_cast): Call patch_string on the first operand of
c83303d8 802 the incoming node, update it if necessary. Fixes PR java/4510.
3fb5c0eb 803
908fecca
BM
8042001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
805
806 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
807 when name qualifier matches a package name.
808
f3ca28bf
TT
8092001-10-08 Tom Tromey <tromey@redhat.com>
810
811 Fix for PR java/4489:
812 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
813 force a new label when computing `body_block'.
814
8b60264b
KG
8152001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
816
817 * jcf-io.c (format_uint): Const-ify.
818 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
819 * lex.c (java_get_line_col): Likewise.
820 * parse.y (build_incdec): Likewise.
821
3fb5c0eb
APB
8222001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
823
824 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
c83303d8 825 a NULL enclosing context if appropriate. Fixes PR java/4466.
3fb5c0eb 826
7754e0a9
APB
8272001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
828
829 * parse.y (patch_assignment): Use lvalue's original TYPE when
830 building the final COMPOUND_EXPR.
831 (try_reference_assignconv): Fixed leading comment.
832
e9546ca4
APB
8332001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
834
835 * parse.y (check_final_variable_indirect_assignment): For
836 COMPOUND_EXPR, return only if finals were found initialized
837 properly, if not, keep on checking.
838 (check_final_variable_global_assignment_flag): New local
839 error_found, set when appropriate and used to decide whether to
840 report uninitialized finals. Fixed typo in comment.
841
f6a67a81
APB
8422001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
843
844 * decl.c (init_decl_processing): Fixed typo in predef_filenames
845 last three initializations. Fixes PR java/4360.
846
67231816
RH
8472001-09-21 Richard Henderson <rth@redhat.com>
848
849 * class.c (get_dispatch_table): Handle function descriptors.
850 (build_dtable_decl): Likewise.
851 * expr.c (build_invokevirtual): Likewise.
852
870a5b8a
APB
8532001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
854
855 * parse.y (patch_method_invocation): Build class initialization
856 when static finals are used to qualify method invocation.
857 Fixes PR java/4366.
858
2e3b2d2c
APB
8592001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
860
861 * parse.h: (WFL_STRIP_BRACKET): Re-written using
862 build_type_name_from_array_name.
863 (STRING_STRIP_BRACKETS): New macro.
864 * parse.y (build_type_name_from_array_name): New function.
865 (array_creation_expression:): Accumulate []s instead of [s.
866 (cast_expression:): Accumulate []s instead of [s after cast type
867 name.
868 (build_array_from_name): Local string deleted, use
869 build_type_name_from_array_name.
870 (build_unresolved_array_type): Accumulate []s instead of [s after
871 type name.
872 (register_fields): Fixed comment.
873 (resolve_class): Local name, base deleted, new locals tname and
874 array_dims. Use build_type_name_from_array_name. Use array_dims to
875 build array type.
876 (purify_type_name): Use STRING_STRIP_BRACKETS.
877
e64c46ce
AJ
8782001-09-18 Andreas Jaeger <aj@suse.de>
879
880 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
881 * jv-scan.c: Likewise.
882
3fb5c0eb
APB
8832001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
884
885 * parse.y (patch_method_invocation): Inner class creation context
886 check not enforced within constructors. Fixes PR java/1873.
887
7a91449c
TT
8882001-09-16 Tom Tromey <tromey@redhat.com>
889
890 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
891 NOTE_PUSH for single-case push. Fixes PR java/4189.
892
653d5d95
APB
8932001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
894
895 * java-tree.h (TYPE_IMPORT_LIST): New macro.
896 (TYPE_IMPORT_DEMAND_LIST): Likewise.
897 (struct lang_type): New fields import_list and import_demand_list.
898 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
899 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
900 (do_resolve_class): New local saved_enclosing_type, initialized,
901 passed as parameter to find_in_imports and find_in_imports_on_demand.
902 (find_in_imports): Added paramater enclosing_type, use its
903 TYPE_IMPORT_LIST when applicable.
904 (find_in_imports_on_demand): Added parameter enclosing_type, use
905 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
906 declaration and initialization.
907 (fold_constant_for_init): Switch/restore current_class to the
908 appropriate context.
909
6d334db8
MM
9102001-09-13 Mark Mitchell <mark@codesourcery.com>
911
912 * verify.c (verify_jvm_instructions): Fix typo.
913
83182544
KG
9142001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
915
916 * expr.c (expand_invoke): Const-ification.
917 * parse.y (patch_method_invocation): Likewise.
918
fd033052
KG
9192001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
920
921 * gjavah.c (cxx_keywords): Const-ification.
922 * keyword.gperf (java_keyword): Likewise.
923 * lang.c (java_tree_code_name): Likewise.
924 * lex.c (cxx_keywords): Likewise.
925 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
926
fcbc317f
RH
9272001-09-11 Richard Henderson <rth@redhat.com>
928
929 * parse.h (ctxp_for_generation): Mark extern.
930
c347e68d
RH
9312001-09-10 Richard Henderson <rth@redhat.com>
932
933 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
934
6a9f6727
MK
9352001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
936
937 * typeck.c (java_array_type_length, build_prim_array_type):
938 Represent empty arrays by NULL index.
939
0ef02b2d
APB
9402001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
941
942 * java-tree.h (compile_resource_file): Grouped with other prototypes.
e64c46ce 943 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
0ef02b2d 944
f2767a67
AG
9452001-09-06 Anthony Green <green@redhat.com>
946
947 * class.c (O_BINARY): Define if necessary.
948 (registerResource_libfunc): Declare.
949 (init_class_processing): Initilize registerResource_libfunc.
950 (compile_resource_file): New function.
951 * java-tree.h (resource_name): Declare.
952 (compile_resource_file): Declare.
953 * jcf-parse.c (yyparse): Handle compiling java resource files.
954 * lang.c (java_decode_option): Handle -fcompile-resource option.
955 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
956 resource files.
957 * gcj.texi (Code Generation): Add documentation for -R flag.
958
731866ba
APB
9592001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
960
961 * jcf-write.c (generate_classfile): Issue an error in case of
962 field/initial value mismatch.
963 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
964 being initialized and we're generating bytecode.
965 (java_complete_lhs): In MODIFY_EXPR section: added comments,
966 set DECL_INITIAL properly when appropriate.
967 Fixes PR java/4230
968 Fixes PR java/4204
969
0286a91d
PB
9702001-09-01 Per Bothner <per@bothner.com>
971
972 * parse.y (maybe_yank_clinit): A field without an initializer is not
973 relevant. All initializers except static final and constant require
974 <clinit>, regardless of flag_emit_class_files.
975
289b57ee
PB
9762001-08-31 Per Bothner <per@bothner.com>
977
978 * class.c (set_constant_value): When not emiting class files, then a
979 String ConstantValue is a utf8const_ptr_type.
980
be0c7ff4
PB
9812001-08-30 Per Bothner <per@bothner.com>
982
983 * jcf-write.c (generate_classfile): Check that field is primitive
984 or string before emitting ConstantValue attribute.
e64c46ce 985
f0cdee96
PB
9862001-08-30 Per Bothner <per@bothner.com>
987
988 * parse.y (resolve_qualified_expression_name): If creating a
989 COMPOUND_EXPR, set it's type correctly.
990
bc8a5e56
PB
9912001-08-30 Per Bothner <per@bothner.com>
992
993 * jcf-io.c (open_class): Set filename field.
994
995 * jcf-parse,c (parse_class_file): Set current_function_decl
996 for better error message when Code attribute is missing.
997
998 * lang.c (put_decl_node, lang_print_error): Re-arrange for
999 better diagnostics, especially for constructors.
e64c46ce 1000
1b9ee723
PB
10012001-08-30 Per Bothner <per@bothner.com>
1002
1003 * jcf-write.c (generate_classfile): Don't write ConstantValue
1004 attribute if field is not final, for compatibility with jdk.
1005
1006 * jcf-write.c (generate_classfile): Convert ConstantValue values
1007 to correct type. Work-around for front-end bug.
1008 * class.c (set_constant_value): Error if constant has wrong type.
1009
6e4302ec
PB
10102001-08-30 Per Bothner <per@bothner.com>
1011
1012 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
1013 "Double" are printed at verbosity 1.
1014
1015 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
1016
1017 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
1018
3ed218d4
APB
10192001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
1020
1021 * parse.y (patch_assignment): Don't verify final re-assignment here.
1022 (java_complete_lhs): Verify assignments to finals calling
1023 patch_assignment. Verify re-assignments to finals before calling
1024 patch_assignment.
1025
10262001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
1027
1028 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
1029 Fixes PR java/1413
1030
10312001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
1032
1033 * lex.c (java_lex): new local found_hex_digits. Set and then used
1034 in test to reject invalid hexadecimal numbers.
1035 * parse.y (java_complete_tree): Prevent unwanted cast with
1036 initialized floating point finals.
1037 (patch_binop): Emit a warning when detecting a division by zero,
1038 mark result not constant, don't simplify non integer division.
1039
1a27eec1
PB
10402001-08-28 Per Bothner <per@bothner.com>
1041
1042 * jcf-write.c (generate_bytecode_insns): For increments and
9a07cfaf 1043 decrements just recurse to push constant. Improvement on Mark's patch.
1a27eec1 1044
06657dcd
MM
10452001-08-28 Mark Mitchell <mark@codesourcery.com>
1046
1047 * jcf-write.c (generate_bytecode_insns): Generate an integer to
1048 real conversion for increments and decrements of reals.
1049
1ca09b48
APB
10502001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1051
1052 * parse.y (resolve_qualified_expression_name): Handle unresolved
1053 qualified expressions, prevent numerical qualifiers, fixed typo.
1054 Fixes PR java/4141
1055
7b02957e
APB
10562001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
1057
1058 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
1059 don't report anything but deprecated class when marked so. Handle
1060 VAR_DECL.
1061 (patch_method_invocation): Check deprecation on methods and types.
1062 (patch_binop): code becomes an enum tree_code, added default: to
1063 switch to handle that. Detect division by zero, try to fold and
1064 return before using a subroutine.
1065
496849ba
APB
10662001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
1067
1068 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
e64c46ce 1069 file smaller than 4 bytes.
496849ba
APB
1070 * parse.y (check_inner_circular_reference): New function.
1071 (check_circular_reference): Likewise.
1072 (array_initializer:): Accept {,}.
1073 (java_check_circular_reference): Rewritten using
1074 check_circular_reference and check_inner_circular_reference.
1075 (java_complete_expand_method): Unconditionally save and restore
1076 the unpurged exception list.
1077 (build_dot_class_method_invocation): Unmangle signature parameter.
1078
66b461ce
TT
10792001-08-21 Tom Tromey <tromey@redhat.com>
1080
1081 * decl.c (init_decl_processing): Add `throws' field to method
1082 descriptor.
1083 * class.c (make_method_value): Compute `throws' field for method.
1084
df1c5346
APB
10852001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
1086
1087 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
1088 circularity is detected.
1089 (ctors_unchecked_throws_clause_p): Fixed leading comment.
1090
c8af3574
RH
10912001-08-17 Richard Henderson <rth@redhat.com>
1092
1093 * class.c (emit_register_classes): Add align parameter to
1094 call to assemble_integer.
1095
17126208
APB
10962001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
1097
1098 * jcf-parse.c (load_class): New locals saved and class_loaded. If
1099 loading a class_or_name fails, try considering an innerclass name
1100 and load the enclosing context.
1101 * parse.y (resolve_inner_class): New function.
1102 (find_as_inner_class): Added leading comment.
1103 (register_incomplete_type): Keep the current context as enclosing
1104 context for JDEP_FIELD dependencies.
1105 (do_resolve_class): Locals new_class_decl and super initialized to
1106 NULL. Call resolve_inner_class, explore the enclosing context
1107 superclass if necessary.
1108 Fixes PR java/4007
1109
4266d0b2
TT
11102001-08-16 Tom Tromey <tromey@redhat.com>
1111
1112 * jcf-dump.c (main): Updated for change to jcf_path_seal.
1113 * gjavah.c (main): Updated for change to jcf_path_seal.
1114 * lang.c (version_flag): New global.
1115 (java_decode_option): Recognize `-version'.
1116 (java_init): Update for change to jcf_path_seal.
1117 * jcf.h (jcf_path_seal): Added `print' argument.
1118 * jcf-path.c (jcf_path_seal): Added `print' argument.
1119
e78d8e51
ZW
11202001-08-13 Zack Weinberg <zackw@panix.com>
1121
1122 * Make-lang.in (java/decl.o): Update dependencies.
1123 * decl.c: Include libfuncs.h, don't include toplev.h.
1124
17126208
APB
11252001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
1126
1127 * decl.c (init_decl_processing): exception_type_node,
1128 class_not_found_type_node, and no_class_def_found_type_node
1129 initialized. predef_filenames augmented accordingly.
1130 instinit_identifier_node initialized.
1131 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
1132 * java-tree.h (enum java_tree_index): New entries
1133 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
1134 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
1135 (exception_type_node): New macro.
1136 (class_not_found_type_node): Likewise.
1137 (no_class_def_found_type_node): Likewise.
1138 (instinit_identifier_node): Likewise.
1139 (PREDEF_FILENAMES_SIZE): Adjusted.
1140 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
1141 (struct lang_type): Fixed typo in bitfield name.
1142 (DECL_INSTINIT_P): New macro.
1143 (ID_INSTINIT_P): Likewise.
1144 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
1145 attribute.
1146 * parse.y (encapsulate_with_try_catch): New function.
1147 (generate_instinit): Likewise.
1148 (build_instinit_invocation): Likewise.
1149 (ctors_unchecked_throws_clause_p): Likewise.
1150 (add_instance_initializer): Deleted.
1151 (build_instance_initializer): Likewise.
1152 (in_instance_initializer): Likewise.
1153 (check_method_redefinition): instinit$ not to be verified.
1154 (java_complete_expand_methods): Generate instinit$, simplified code.
1155 (build_dot_class_method): Eliminated unnecessary locals. Use
1156 encapsulate_with_try_catch, removed unnecessary code.
1157 (fix_constructors): New local iii. Use build_instinit_invocation.
1158 (patch_method_invocation): Added comment.
1159 (maybe_use_access_method): Don't consider instinit$.
1160 (find_applicable_accessible_methods_list): Shorten the search for
1161 instinit$ too.
1162 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
1163 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
1164 (patch_throw_statement): Likewise. Fixed typo.
e64c46ce 1165
6ba57472
DE
11662001-08-12 David Edelsohn <edelsohn@gnu.org>
1167
1168 Revert:
1169 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1170 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
1171 ASM_FINAL_SPEC.
1172 (lang_specific_pre_link): Use set_input to set input_filename.
1173 Append `main' here.
1174 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
1175 (main): Fix definition.
1176 Strip `main' from classname.
1177 Fixes PR java/227.
1178
94aca342
ZW
11792001-08-11 Zack Weinberg <zackw@panix.com>
1180
1181 * lex.h: Don't include setjmp.h. Don't define
1182 SET_FLOAT_HANDLER or prototype set_float_handler.
1183
17126208
APB
11842001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
1185
1186 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
1187 `poplevel' in the right order.
1188
2cc07db4
RH
11892001-08-09 Richard Henderson <rth@redhat.com>
1190
1191 * Make-lang.in (class.o): Depend on TARGET_H.
1192 * class.c (emit_register_classes): Use target hooks instead of
1193 assemble_constructor and assemble_destructor.
1194
4009bb7d
APB
11952001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
1196
1197 * check-init.c (flags.h): Include
1198 (check_init): Don't report uninitialized static class
1199 initialization flags, don't free bit index when doing static class
1200 initialization optimization.
1201 (check_for_initialization): Return type changed to `unsigned int.'
1202 (attach_initialized_static_class): New function.
1203 * class.c (add_method_1): Create the initialized static class
1204 table if necessary.
1205 (finish_class): Always emit deferred inline methods.
1206 * decl.c (emit_init_test_initialization): Moved to expr.c
1207 (complete_start_java_method): Don't traverse
1208 DECL_FUNCTION_INIT_TEST_TABLE.
1209 (lang_mark_tree): Mark hash tables in function decls.
1210 * expr.c (emit_init_test_initialization): Moved from decl.c.
1211 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
1212 initialization flag, set DECL_CONTEXT and
1213 LOCAL_CLASS_INITIALIZATION_FLAG.
1214 (java_lang_expand_expr): Emit initialization code for static class
1215 initialized flags when entering block, if necessary.
1216 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
1217 * java-tree.h (flag_optimize_sci): New global variable declaration.
1218 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
1219 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
1220 (LOCAL_FINAL_P): Fixed typo in comment.
1221 (FINAL_VARIABLE_P): Likewise.
1222 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
1223 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
1224 (struct lang_decl): New fields `ict', `smic' and `cif.'
1225 (check_for_initialization): New returned value for global.
1226 (attach_initialized_static_class): New global function.
1227 (STATIC_CLASS_INIT_OPT_P): New macro.
1228 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
1229 * lang.c (java_decode_option): Handle
1230 `-fno-optimize-static-class-initialization'
1231 * parse.y (start_complete_expand_method): New function.
1232 (java_expand_method_bodies): Likewise.
1233 (attach_init_test_initialization_flags): Likewise.
1234 (adjust_init_test_initialization): Likewise.
1235 (emit_test_initialization): Likewise.
1236 (java_complete_expand_methods): Nullify abstract and native method
1237 bodies.
1238 (java_complete_expand_method): New locals `fbody', `block_body'
1239 and `exception_copy.' Reorganized: directly return on empty method
1240 bodies, call `start_complete_expand_method', remember definitely
1241 initialized static class in function, don't expand method bodies.
1242 (java_expand_classes): Call `java_expand_method_bodies' before
1243 `finish_class' when compiling to native.
1244 (resolve_expression_name): Use `orig' after building outer class
1245 field access.
1246 (patch_invoke): Remember static method invokations.
1247
47907859
RH
12482001-08-06 Richard Henderson <rth@redhat.com>
1249
9a07cfaf 1250 * class.c (emit_register_classes): Pass a symbol_ref and priority
47907859
RH
1251 to assemble_constructor.
1252
36e10d77
APB
12532001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
1254
1255 * java-tree.h (all_class_filename): New macro.
1256 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
1257 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
1258 newly created IDENTIFIER_NODE to `all_class_filename.'
1259
f2f25b6d
JS
12602001-08-01 Jeff Sturm <jsturm@one-point.com>
1261
9a07cfaf
RH
1262 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
1263 Use ggc_add_tree_root to register roots.
e64c46ce 1264
6ad7895a
APB
12652001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
1266
1267 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
1268 second operand calling check_init.
1269 * decl.c (complete_start_java_method): Swaped second and third
1270 arguments while creating WITH_CLEANUP_EXPR node.
1271 * jcf-write.c (generate_bytecode_insns): Use second operand
1272 instead of third when handling WITH_CLEANUP_EXPR.
1273 * parse.y (java_complete_lhs): Expand second operand of
1274 WITH_CLEANUP_EXPR nodes.
1275 (patch_synchronized_statement): Swaped second and third arguments
1276 while creating WITH_CLEANUP_EXPR node.
1277
9d7d8362
APB
12782001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
1279
1280 * parse.y (create_interface): Avoid cyclic inheritance report when
1281 syntax error encountered during class definition.
1282 Fixes PR java/2956
1283
578672a2
RO
12842001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1285
1286 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
1287 ASM_FINAL_SPEC.
1288 (lang_specific_pre_link): Use set_input to set input_filename.
1289 Append `main' here.
1290 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
1291 (main): Fix definition.
1292 Strip `main' from classname.
1293 Fixes PR java/227.
1294
6a65ea5b
TT
12952001-07-18 Tom Tromey <tromey@redhat.com>
1296
1297 For PR java/2812:
1298 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
1299 * lex.c (java_new_lexer): Use ICONV_CONST.
1300 (java_read_char): Likewise.
1301 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
1302 (jv-scan$(exeext)): Likewise.
1303
9d7d8362
APB
13042001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
1305
1306 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
1307 * parse.y (check_class_interface_creation): Allow `private' if the
1308 enclosing is not an interface.
1309 (create_interface): Interface tagged public if the enclosing
1310 context is an interface.
1311 (create_class): Class tagged public if the enclosing context
1312 is an interface.
1313 Fixes PR java/2959
1314
13152001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
1316
1317 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
1318 Fixes PR java/2665
1319
e6290e74
TJ
13202001-07-14 Tim Josling <tej@melbpc.org.au>
1321
1322 * check-init.c (check_init): Remove references to EXPON_EXPR.
1323
9d7d8362
APB
13242001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
1325
1326 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
1327 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
1328 Fixes PR java/3602
1329
4b2dc1b2
TT
13302001-07-13 Tom Tromey <tromey@redhat.com>
1331
1332 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
1333 invocation.
1334
b6e3e1ff
APB
13352001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
1336
1337 * parse.y (patch_method_invocation): Don't override primary if one
1338 is already provided, but let this$<n> be built. Fixed comment.
1339
13402001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
1341
1342 * parse.y (empty_statement:): Report empty statement error only
1343 when found at class declaration level.
1344 Fixes PR java/3635
1345
a3cb5122
TT
13462001-07-12 Tom Tromey <tromey@redhat.com>
1347
1348 * expr.c (expand_load_internal): New function.
1349 (LOAD_INTERNAL): Use it.
1350
29fcdaae
APB
13512001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
1352
1353 * parse.y (verify_constructor_super): Compare anonymous class ctor
1354 args with `valid_method_invocation_conversion_p.'
1355 Fixes PR java/3285
1356
2df37a59
APB
13572001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
1358
1359 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
1360 `-fsyntax-only.' Fixes PR java/3248
1361
13622001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
1363
1364 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
1365
13662001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
1367
1368 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
1369 current function is static. Fixes PR java/1970
1370
13712001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
1372
1373 * parse.y (patch_method_invocation): Add enclosing context to ctor
1374 calls if necessary. Fixes PR java/2953
1375
13762001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
1377
1378 * parse.y (resolve_package): Abort if qualified expression member
1379 isn't right.
1380 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
1381 Fixes PR java/1391
1382
74d04dd1
ZW
13832001-07-07 Zack Weinberg <zackw@stanford.edu>
1384
1385 * verify.c: Don't use // comments.
1386
af418b8c
TT
13872001-07-05 Tom Tromey <tromey@redhat.com>
1388
1389 * lang.c (flag_assume_compiled): Removed.
1390 * java-tree.h (flag_assume_compiled): Removed.
1391 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
1392 -fhash-synchronization, -fuse-divide-subroutine,
1393 -fcheck-references, -femit-class-file, -femit-class-files,
1394 -fassume-compiled. Updated --encoding information. Changed
1395 -foutput-class-dir to `-d'.
1396
84a5b4f8
DB
13972001-07-04 Daniel Berlin <dan@cgsoftware.com>
1398
1399 * jcf-parse.c (parse_class_file): Add lineno parameter to
1400 debug_start_source_file call.
1401
0671eaf6
JM
14022001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
1403
1404 * gcj.texi: Use gpl.texi.
1405 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
1406 dependencies and use doc/include in search path.
1407
9be7529d
JS
14082001-07-03 Jeff Sturm <jsturm@one-point.com>
1409
1410 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
1411 `this'. If so, don't build instance initializers.
1412
51e23701
APB
14132001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
1414
1415 * parse.y (resolve_expression_name): Improved error message for
2df37a59 1416 inner class cases. Fixes PR java/1958
51e23701 1417
46f018e1
GDR
14182001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
1419
1420 * lang.c: #include diagnostic.h
1421 (lang_print_error): Add a `diagnostic_context *' parameter.
1422 (java_dummy_print): Likewise.
1423 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
1424
51e23701
APB
14252001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1426
1427 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
1428 * jcf.h (typedef struct JCF): New bitfield `finished.'
1429 (JCF_FINISH): Set `finished.'
1430 (JCF_ZERO): Reset `finished.'
1431 Fixes PR java/2633
1432
14332001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1434
1435 * parse.y (class_body_declaration:): Don't install empty instance
1436 initializers.
1437 Fixes PR java/1314
1438
4a70e37e
APB
14392001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1440
1441 * class.c (set_super_info): Call `set_class_decl_access_flags.'
1442 (set_class_decl_access_flags): New function.
1443 * java-tree.h (set_class_decl_access_flags): New prototype.
1444 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
1445 (parse_class_file): New local `decl_max_locals.' Take wide types
1446 into account to compute DECL_MAX_LOCALS.
1447 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
1448 imports on demand.
1449
561a0365
JM
14502001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
1451
1452 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
1453
8e41c4f3
APB
14542001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
1455
1456 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
1457 * parse.y (do_resolve_class): Moved comments out to leading comment
1458 section. Removed local `start', New local `_ht' and
1459 `circularity_hash.' Record `enclosing' in hash table and search
1460 it to detect circularity. Use `enclosing' as an argument to
1461 `lookup_cl.' Free the hash table when done.
1462
c01b7cdf
TT
14632001-06-19 Tom Tromey <tromey@redhat.com>
1464
1465 * lex.c (java_read_char): Disallow invalid and overlong
1466 sequences. Fixes PR java/2319.
1467
21a6bb3c
JS
14682001-06-05 Jeff Sturm <jsturm@one-point.com>
1469
1470 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
1471
0c90837b
APB
14722001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
1473
1474 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
1475 arguments accordingly.
1476
1347cc4f
JM
14772001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
1478
1479 * gcj.texi: Move contents to just after title page.
1480
12e248d6
APB
14812001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
1482
1483 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
1484 builtin type.
1485 (patch_incomplete_class_ref): Build the class ref, build the class
1486 init if necessary, complete the tree.
1487 Fixes PR java/2605
1488
19559012
APB
14892001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
1490
1491 * parse.y (lookup_field_wrapper): Test `name' code.
1492 (resolve_qualified_expression_name): Test `qual_wfl' code.
1493 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
1494 handle `qual_wfl' by code.
1495 (maybe_build_primttype_type_ref): Test `wfl' code.
1496
eb153223
TP
14972001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1498
1499 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
1500 fdl.texi.
1501 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
1502 the dvi file in the java directory.
1503
88657302
RH
15042001-05-25 Sam TH <sam@uchicago.edu>
1505
1506 * gen-table.pl javaop.h jcf.h lex.h,
1507 parse.h: Fix header include guards.
1508
719f0fde
JM
15092001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
1510
1511 * jv-scan.c (version): Update copyright year.
1512
075516bc
PB
15132001-05-21 Per Bothner <per@bothner.com>
1514
1515 * jcf-parse.c (read_class): If class is from .class or .zip file
1516 and it's already been read, don't push/pop parser context.
1517
9d289604
PB
15182001-05-18 Per Bothner <per@bothner.com>
1519
1520 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
9a07cfaf 1521 command line so the jvgenmain-generated main program comes first.
9d289604 1522
48187504
TT
15232001-05-15 Tom Tromey <tromey@redhat.com>
1524
1525 * class.c (build_utf8_ref): Don't generate identifier based on
1526 utf8const contents.
1527
f17f1898
RH
15282001-05-12 Richard Henderson <rth@redhat.com>
1529
1530 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
1531 * expr.c (java_lang_expand_expr): Expand it.
1532 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
1533 calling build_exception_object_ref.
1534 * parse.y (catch_clause_parameter): Likewise.
1535 (build_dot_class_method): Likewise.
1536 (try_reference_assignconv): Likewise.
1537 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
1538 * jcf-write.c (generate_bytecode_insns): Likewise.
1539
352b3f3f
APB
15402001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
1541
1542 * parse.y (build_unresolved_array_type): Set
1543 EXPR_WFL_QUALIFICATION on the newly created wfl.
1544 Fixes PR java/2538. Fixes PR java/2535.
1545
41ee0877
APB
15462001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
1547
17126208 1548 * parse.y (fix_constructors): Removed unnecessary assignment to
41ee0877
APB
1549 local. Moved assignment to `this$<n>', fixed comments and
1550 indentation.
1551 (build_wfl_wrap): Fixed indentation.
1552 Fixes PR java/2598, java/2579 and java/2658.
1553
4def8930
MD
15542001-05-03 Mo DeJong <mdejong@redhat.com>
1555
9a07cfaf 1556 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
4def8930
MD
1557 check for byte swap.
1558
8fc6a63c
JS
15592000-05-02 Jeff Sturm <jsturm@one-point.com>
1560
1561 * expr.c (build_class_init): Move MODIFY_EXPR
1562 outside of COND_EXPR. Remove variable `call'.
1563
3e411c3f
KG
15642001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1565
1566 * decl.c: NULL_PTR -> NULL.
1567 * jcf-write.c: Likewise.
1568
0cd015ea
TT
15692001-05-01 Tom Tromey <tromey@redhat.com>
1570
1571 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
1572 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
1573 * gcj.texi: Updated copyright text. Include fdl.texi.
1574 (Top): Link to new node.
1575
6a117d00
PB
15762001-05-01 Per Bothner <per@bothner.com>
1577
1578 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
1579
063df563
PB
15802001-05-01 Per Bothner <per@bothner.com>
1581
1582 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
1583 import_list contains the name, not the TREE_PURPOSE.
1584
962584ea
KG
15852001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1586
1587 * jcf-io.c (read_zip_member): Cast to long in comparison with
1588 signed value.
1589
1590 * jvspec.c (lang_specific_driver): Initialize variables.
1591
1592 * mangle.c (find_compression_record_match): Likewise.
1593
1594 * typeck.c (build_null_signature): Provide static prototype. Mark
1595 parameter with ATTRIBUTE_UNUSED.
1596
1597 * verify.c (verify_jvm_instructions): Initialize variable.
1598
86d9e8d8
BM
15992001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1600
1601 * parse.y (do_resolve_class): Check for cyclic inheritance during
e64c46ce 1602 inner class resolution.
86d9e8d8 1603
9c491eb8
PB
16042001-04-27 Per Bothner <per@bothner.com>
1605
1606 * parse.y (java_expand_classes): Don't change ctxp_for_generation
1607 while iterating, since that could cause gc to lose stuff.
1608
56fe39c8
PB
16092001-04-26 Per Bothner <per@bothner.com>
1610
1611 Fix method search wrt scope of inner classes to match JLS2.
1612 * typeck.c (build_null_signature): New static function.
1613 (has_method): New function. Uses build_null_signature and lookup_do.
1614 * java-tree.h (has_method): New declaration.
1615 * parse.y (find_applicable_accessible_methods_list): Do not search
1616 context of inner classes here.
1617 (patch_method_invocation): Search scope, ie. current and outer clases,
1618 for method matching simple name, to find class.
1619
8789b9fa
PB
16202001-04-26 Per Bothner <per@bothner.com>
1621
1622 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
1623 Fix thinko: If a single case, use if_icmpeq, not ifeq.
1624
1625 * constants.c (find_methodref_with_class_index): New function.
1626 (find_methodref_index): Use find_methodref_with_class_index.
1627 * java-tree.h (find_methodref_with_class_index): New declaration.
1628 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
1629 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
1630 If context changed from interface to class, don't use invokeinterface.
1631
5acea42b
PB
16322001-04-25 Per Bothner <per@bothner.com>
1633
1634 * verify.c (verify_jvm_instructions): For field instructions,
1635 check that field index is valid. For invoke instructions, check that
1636 method index is valid.
1637
dd6f3662
AO
16382001-04-25 Alexandre Oliva <aoliva@redhat.com>
1639
1640 * config-lang.in (target_libs): Copy from $libgcj_saved.
1641
28f7d9d0
BM
16422001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1643
1644 * decl.c (init_decl_processing): Add new class "protectionDomain"
1645 field.
1646 * class.c (make_class_data): Set initial value for "protectionDomain".
1647
d4c3ec27
KG
16482001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1649
1650 * jvspec.c (lang_specific_driver): Fix memory allocation
1651 deficit, by using concat in lieu of xmalloc/sprintf.
1652
3c0ce750
PB
16532001-04-20 Per Bothner <per@bothner.com>
1654
1655 Fixes to compile multiple .class files at once.
1656 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
1657 * java-tree.h (CLASS_PARSED_P): New macro.
1658 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
1659 * jcf-parse.c (jcf_parse_source): Inline into read_class.
1660 (read_class): Avoid some code duplication.
1661 Don't call JCF_FINISH for a .class file - might be needed later.
1662 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
1663 rather than CLASS_LOADED_P, since latter implies class laid out.
1664 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
1665 * parse.y: Don't need to set CLASS_LOADED_P for array types.
1666
d6684bc8
KG
16672001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1668
1669 * Make-lang.in (java/boehm.o): Depend on toplev.h.
1670
1671 * boehm.c: Include toplev.h.
1672
10e2af38
TT
16732001-04-06 Tom Tromey <tromey@redhat.com>
1674 Alexandre Petit-Bianco <apbianco@redhat.com>
1675
1676 Fix for PR gcj/1404 and PR gcj/2332:
1677 * parse.y (build_array_from_name): If we use the type_wfl then
1678 accumulate dimensions from the original type as well.
1679 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
1680
2d9fea5d
TT
16812001-04-06 Tom Tromey <tromey@redhat.com>
1682
1683 * parse.y (analyze_clinit_body): Return true if the second operand
1684 of a METHOD_EXPR is nonzero.
1685
613bb86e
TT
16862001-04-06 Tom Tromey <tromey@redhat.com>
1687
1688 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
1689 directory.
1690 ($(srcdir)/java/parse.c): Likewise.
1691
8b66cd8f
APB
16922001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
1693
1694 * gcj.texi: Use `which-gcj' instead of `which-g77.'
1695 (version-gcc): Initialized.
1696 (which-gcj): Likewise.
1697
73c299fc
APB
16982001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
1699
1700 * java-tree.h (struct lang_decl): New macro
1701 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
1702 * parse.y (build_instance_initializer): New function.
1703 (add_instance_initializer): Use it.
1704 (java_fix_constructors): Set `current_class' before fix pass.
1705 (fix_constructors): Just return if already fixed. Move `super()'
1706 invokation ahead. Use `build_instance_initializer.'
1707 Fixes PR java/1315.
1708
93a6eb78 17092001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
e64c46ce 1710
93a6eb78
APB
1711 * parse.y (resolve_qualified_expression_name): Pass field's
1712 DECL_CONTEXT to `not_accessible_p.'
1713 (not_accessible_p): Changed parameters order in `inherits_from_p'
1714 invokation.
1715
4956c16e
AH
17162001-03-27 Andrew Haley <aph@cambridge.redhat.com>
1717
1718 * lang-options.h: Add flag_check_references.
1719
3cc48399
PB
17202001-04-04 Per Bothner <per@bothner.com>
1721
1722 * java-tree.h (CONSTANT_VALUE_P): New macro.
1723 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
1724 * parse.y (maybe_build_class_init_for_field): New static function.
1725 (resolve_expression_name, resolve_field_access): Use
e64c46ce 1726 maybe_build_class_init_for_field instead of build_class_init
3cc48399
PB
1727 This does not do the init if the field is compile-time-constant.
1728 (resolve_field_access): Simplify.
1729
1730 * parse.y (fold_constant_for_init): Merge test into switch.
1731
d02af173
ZW
17322001-04-03 Zack Weinberg <zackw@stanford.edu>
1733
1734 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
1735 on gansidecl.h.
1736 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
1737
44a2150d
ZW
17382001-04-02 Zack Weinberg <zackw@stanford.edu>
1739
1740 * expr.c (pop_type_0): Save the result of the first
e64c46ce 1741 lang_printable_name call in a scratch buffer, so it
44a2150d
ZW
1742 won't be clobbered by the second call.
1743
de307574
APB
17442001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
1745
1746 * parse-scan.y (array_type:): Rewritten.
1747 (type_declaration:): `empty_statement' replaces `SC_TK.'
1748 (class_member_declaration:): `empty statement' added.
1749 (method_body:): Simplified.
1750 (static_initializer:): Likewise.
1751 (primary_no_new_array:): Use `type_literals.'
1752 (type_literals:): New rule.
1753 (dims:): Set and update `bracket_count.'
1754 Fixes PR java/1074. Fixes PR java/2412.
1755
2ff50199
APB
17562001-03-28 Hans Boehm <boehm@acm.org>
1757
1758 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
1759 (get_boehm_type_descriptor): Set type on returned value to be a
1760 pointer length integer.
1761
80122075
KG
17622001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1763
1764 * expr.c (pop_type_0): Call `concat' rather than building the
1765 string manually.
1766 (pop_type): Add format specifier in call to `error'.
1767
1768 * parse.y (patch_method_invocation): Avoid casting away
1769 const-ness.
1770
0f5c1ee4
JO
17712001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
1772
1773 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
1774
52a11cbf
RH
17752001-03-28 Richard Henderson <rth@redhat.com>
1776
1777 IA-64 ABI Exception Handling:
1778 * Make-lang.in (except.o): Don't depend on eh-common.h.
1779 * check-init.c (check_init): Handle EXC_PTR_EXPR.
1780 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
1781 [soft_exceptioninfo_call_node]: Remove.
1782 [eh_personality_libfunc, lang_eh_runtime_type]: New.
1783 (end_java_method): No emit_handlers.
1784 * except.c (java_set_exception_lang_code): Remove.
1785 (method_init_exceptions): Don't call it.
1786 (prepare_eh_table_type): No CATCH_ALL_TYPE.
1787 (build_exception_object_ref): New.
1788 (expand_end_java_handler): Update for except.h name changes.
1789 (emit_handlers, expand_resume_after_catch): Remove.
1790 * expr.c (java_lang_expand_expr): Update for except.h name changes.
1791 (process_jvm_instruction): Use build_exception_object_ref.
1792 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
1793 (soft_exceptioninfo_call_node): Remove.
1794 (build_exception_object_ref): Declare.
1795 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
1796 soft_exceptioninfo_call_node. Move processing ...
1797 [EXC_PTR_EXPR]: ... here.
1798 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
1799 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
1800 (source_end_java_method): No java_set_exception_lang_code or
1801 emit_handlers.
1802 (build_dot_class_method): Use build_exception_object_ref.
1803 (try_reference_assignconv): Check EXC_PTR_EXPR not
1804 soft_exceptioninfo_call_node.
1805
ce1c98ea
RH
18062001-03-28 Richard Henderson <rth@redhat.com>
1807
1808 * java-tree.h (throw_node): Define as a single member of
1809 java_global_trees instead of a separate array.
1810 (JTI_THROW_NODE): New.
1811 * decl.c (throw_node): Don't declare.
1812 (init_decl_processing): Init a scalar throw_node.
1813 Don't register it for gc.
1814 * check-init.c (check_init): Reference scalar throw_node.
1815 * expr.c (build_java_athrow): Likewise.
1816 * jcf-write.c (generate_bytecode_insns): Likewise.
1817 * parse.h (BUILD_THROW): Likewise.
1818
da7da8f9
RH
18192001-03-28 Richard Henderson <rth@redhat.com>
1820
1821 * decl.c (end_java_method): Do not save and restore
1822 flag_non_call_exceptions.
1823 * parse.y (source_end_java_method): Likewise.
1824 * lang.c (flag_exceptions): Don't declare.
1825 (java_init_options): Set flag_non_call_exceptions. Set
1826 flag_exceptions here ...
1827 (java_init): ... not here.
1828
531073e7
RH
18292001-03-27 Richard Henderson <rth@redhat.com>
1830
1831 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
1832 exceptions_via_longjmp.
1833
461fc4de
RH
1834 * lang.c (flag_new_exceptions): Don't declare it.
1835 (java_init_options): Or set it.
1836
c1e9f663
RH
18372001-03-27 Richard Henderson <rth@redhat.com>
1838
1839 * decl.c (end_java_method): Rename asynchronous_exceptions to
1840 flag_non_call_exceptions.
979988f3 1841 * parse.y (source_end_java_method): Likewise.
c1e9f663 1842
911e6107
KG
18432001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1844
1845 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
1846
b850de4f
MM
18472001-03-26 Mark Mitchell <mark@codesourcery.com>
1848
1849 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
1850
ce06965e
APB
18512001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
1852
1853 * parse.y (find_as_inner_class): Follow current package
1854 indications not to mistakingly load an unrelated class.
1855
cb9b7a8c
KG
18562001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1857
1858 * constants.c (PUTN): Use memcpy, not bcopy.
1859
1860 * lex.c (java_read_char): Use memmove, not bcopy.
1861
1862 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
1863
fa029f45
PB
18642001-03-23 Per Bothner <per@bothner.com>
1865
1866 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
1867 macro for better error pin-pointing.
1868 * java-tree.h: Fix typo in comment.
1869
1870 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
1871 Don't include jsr/goto in exception range.
1872 Check if start and end of exception range are the same (also TRY_EXPR).
1873 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
1874 However, do emit the following goto even if try_block is empty.
1875 Defer freeing exception_decl until after the finalizer, to make
1876 sure the local isn't reused in the finalizer. Fixes PR java/1208.
1877
1878 * parse.y (java_complete_lhs): If the try-clause is empty, just
1879 return the finally-clause and vice versa.
1880
b124f72e
APB
18812001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
1882
1883 * gcj.texi (Input Options): documented the check for attribute
1884 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
1885 * java-tree.h (flag_force_classes_archive_check): Declared extern.
1886 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
1887 (jcf_parse): Check for the right classes archive if necessary.
1888 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
1889 (jcf_parse_fields): Fixed indentation.
1890 * jcf-write.c (append_gcj_attribute): New function.
1891 (generate_classfile): Compute the attribute count, invoke
1892 `append_gcj_attribute'.
1893 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
1894 turned into bit fields. New bit field `right_zip.'
1895 (JCF_ZERO): Set `right_zip' to zero.
1896 * lang-options.h (-fforce-classes-archive-check): Added flag.
1897 * lang.c (flag_force_classes_archive_check): New flag.
1898 (lang_f_options): New entry `force-classes-archive-check.'
1899 Fixes PR java/1213.
1900
4ff17c6a
AH
19012001-02-07 Andrew Haley <aph@redhat.com>
1902
1903 * gcj.texi (Configure-time Options): Add -fcheck-references.
1904 * expr.c (build_java_indirect_ref): New function.
3e02b1c3 1905 (java_check_reference): New function.
4ff17c6a
AH
1906 (build_java_array_length_access): Use build_java_indirect_ref to
1907 check for null references.
1908 (build_java_arrayaccess): Likewise.
1909 (build_get_class): Likewise.
1910 (build_field_ref): Likewise.
1911 (invoke_build_dtable): Likewise.
1912 (build_invokeinterface): Likewise.
1913 * lang.c (lang_f_options): Add flag_check_references.
1914 * jvspec.c (jvgenmain_spec): Add flag_check_references.
1915 * java-tree.h (flag_check_references): New variable.
1916 * lang.c (flag_check_references): Likewise.
e64c46ce 1917 * parse.y (patch_invoke): Use java_check_reference.
3e02b1c3
AH
1918 (patch_assignment): Allow for extra nesting in
1919 _Jv_CheckArrayStore.
4ff17c6a 1920
f2a29271
BM
19212001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
1922
1923 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
1924 * lex.c (cxx_keywords): Likewise.
1925
2ff50199
APB
19262001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
1927
1928 * parse.y (qualify_ambiguous_name): Broaden `length'
1929 recognition. Help MODIFY_EXPR be resolved as expression names.
1930 Fixes PR java/2066. Fixes PR java/2400.
1931
60c87482
BM
19322001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
1933
e64c46ce 1934 * gjavah.c (process_file): Mark interface definitions with
60c87482
BM
1935 "__attribute__ ((java_interface))".
1936
96c6f628
APB
19372001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
1938
1939 * class.c (layout_class): Fixed push_super_field's second
1940 argument. Fixes PR java/2333.
1941 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
1942 too early to lay innerclasses out.
1943
7abecd65
TT
19442001-03-20 Tom Tromey <tromey@redhat.com>
1945 Alexandre Petit-Bianco <apbianco@redhat.com>
1946
1947 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
1948 inside an array reference. Insertion of the array store check
1949 rewritten. Fixes PR java/2299.
1950
4aed8938
TT
19512001-03-20 Tom Tromey <tromey@redhat.com>
1952
1953 * lex.c (java_read_unicode): Only accept leading `u's.
1954
ddd705d1
TT
19552001-03-20 Tom Tromey <tromey@redhat.com>
1956
1957 * jcf-parse.c (read_class): Initialize `class'.
1958
de83bf66
MK
19592001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
1960
1961 * jcf_parse.c (jcf_parse): Eliminate unused variable.
1962
92643fea
MM
19632001-03-19 Mark Mitchell <mark@codesourcery.com>
1964
1965 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
1966 (layout_class): Likewise.
1967 (layout_class_method): Likewise.
1968 (emit_register_classes): Likewise.
1969 * decl.c (builtin_function): Likewise.
1970 (give_name_to_locals): Likewise.
1971
54646811
PB
19722001-03-19 Per Bothner <per@bothner.com>
1973
80fc2e84
PB
1974 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
1975 before trying to load an inner class.
1976
54646811
PB
1977 Fixes to process to command-line .class files in two passes.
1978 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
1979 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
1980 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
1981 * class.c (is_compiled_class): Fix for renamed flag.
1982 * parse.y (maybe_create_class_interface_decl): Likewise.
1983 * jcf-parse.c (yyparse): Also set if compiling .class files.
1984 * jcf-parse.c (read_class); Read current_class.
1985 (jcf_parse): Make static.
1986 (load_inner_classes): New function, with code moved from jcf_parse,
1987 because we need to inner classes after the command-line files are read.
1988 (yyparse): Set finput to NULL when it doesn't need to be closed.
1989 Reduce use of main_jcf (basically only for archive) and
1990 use finput instead of main_jcf->read_state.
1991 Inline jcf_figure_file_type into yyparse.
1992 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
1993 Defer load_inner_classes and parse_class_file to a second pass,
1994 after we've correctly mapped command-line .clas fiels to classes.
1995 (jcf_figure_file_type): Removed.
1996 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
1997 (JCF_ZERO): Also clear zipd field.
1998 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
1999
20002001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
2001
2002 * jcf-parse.c (yyparse): Change ch from char * to char.
2003
8b1edcee
PB
20042001-03-19 Per Bothner <per@bothner.com>
2005
2006 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
2007 Add constructed filelist-file at end, following -xjava. Thus any .o
2008 and library files are not affected by the -xjava. Also wrap
54646811 2009 explicit @FILE with -xjava and -xnone.
8b1edcee 2010
6bc5f6cb
AH
20112001-03-19 Andrew Haley <aph@cambridge.redhat.com>
2012
9a07cfaf
RH
2013 * class.c (build_static_field_ref): Call make_decl_rtl() after
2014 setting the DECL_EXTERNAL flag.
6bc5f6cb 2015
daaaf29f
PB
20162001-03-17 Per Bothner <per@bothner.com>
2017
90f59043
PB
2018 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
2019
478e7ed6
PB
2020 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
2021 when result is is needed (target is STACK_TARGET).
2022
daaaf29f 2023 * parse.h (JDEP_SOLV): Removed.
d148b6aa 2024 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
daaaf29f 2025
d148b6aa
PB
2026 * parse.y (incomplete_class_list): Removed.
2027 (obtain_incomplete_type): Don't use or set incomplete_class_list.
2028 It doesn't work if resolve_class changes the name of an array type
2029 that is on the list and then someone else looks for the modified name.
2030 Also, seems liable to break when compiling multiple source files at
2031 once. So the simplest is to just remove incomplete_class_list -
2032 it is only a minor space win and it is not even clear it saves time.
daaaf29f
PB
2033
2034 * parse.y (resolve_class): Remove unneeded promote_type.
2035
4763d38f
PB
20362001-03-15 Per Bothner <per@bothner.com>
2037
b16e8f08
PB
2038 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
2039 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
2040 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
2041 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
8b1edcee 2042
3a2e5926
PB
2043 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
2044 * parse.y (java_expand_classes): Likewise.
8b1edcee 2045
47a50de9
PB
2046 * parse.y (expand_start_java_method): Was only called once and had a
2047 misleading name, so inline in caller java_complete_expand_method.
3a2e5926 2048 (enter_a_block): Likewise inline in enter_block and remove.
47a50de9 2049
4763d38f
PB
2050 Remove junk from when gcc/java was created (by copying from C/C++).
2051 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
2052 (struct binding_level): Remove fields keep, keep_if_subblocks,
2053 more_cleanups_ok, have_cleanups (which have never been used).
2054 (pushlevel, poplevel): Remove related useless code.
19f8e04b 2055
69ca5554
PB
2056 * class.c (make_class_data): The class_dtable_decl (i.e. the
2057 vtable for Class) should be external, except when compiling Class.
2058
7d32abcd
PB
2059 * jvspec.c (lang_specific_driver): Fix -C handling.
2060 Check -save-temps to see if temp @FILE should be deleted.
2061 Follow-up to/fix for February 16 patch.
2062
19f8e04b
PB
2063 * verify.c (verify_jvm_instructions): Better error msgs for dup.
2064 (type_stack_dup): Remove no-longer neded error check.
2065
551bf03c
BM
20662001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
2067
2068 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
2069 to 'for_pointer'. If this type is for a pointer (argument) mangling,
e64c46ce 2070 don't surround the element with 'N..E' if the type name is
551bf03c
BM
2071 unqualified.
2072
19e7881c
MM
20732001-03-14 Mark Mitchell <mark@codesourcery.com>
2074
d1d61788
MM
2075 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
2076 DECL_RTL_SET_P, etc.
19e7881c
MM
2077 (make_method_value): Likewise.
2078 (get_dispatch_table): Likewise.
2079
2080 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8b1edcee 2081
bcacc465
TT
20822001-03-07 Tom Tromey <tromey@redhat.com>
2083
2084 * config-lang.in (lang_requires): Define.
2085
de6c5979
BL
20862001-03-07 Brad Lucier <lucier@math.purdue.edu>
2087
2088 * typeck.c (convert): Check flag_unsafe_math_optimizations,
2089 not flag_fast_math.
2090
6d37cf2f
PB
20912001-03-05 Per Bothner <per@bothner.com>
2092
2093 Fix a problem where rest_of_decl_compilation applied to
2094 class_dtable_decl causes problems because it was done too early,
2095 before output file was opened.
2096 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
2097 * class.c (class_dtable_decl): Add macro - element of class_roots.
2098 (make_class_data): Define class_dtable_decl.
2099 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
2100
d6edb99e
ZW
21012001-03-01 Zack Weinberg <zackw@stanford.edu>
2102
2103 * java/class.c, java/decl.c, java/java-tree.h: Replace all
2104 uses of 'boolean' with 'bool'.
2105
f7143427
ZW
21062001-03-01 Zack Weinberg <zackw@stanford.edu>
2107
2108 * lang-specs.h: Add zero initializer for cpp_spec field to all
2109 array elements.
2110
fea2d5da
PB
21112001-02-16 Per Bothner <per@bothner.com>
2112
2113 Handle compiling multiple input files at once, and @FILE syntax.
e4087691 2114 * gcj.texi: Updated documentation to match.
fea2d5da
PB
2115 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
2116 * jcf-parse.c (parse_source_file): Split into ...
2117 (parse_source_file_1): New function - and:
2118 (parse_source_file_2): New function.
2119 (yyparse): On -ffilelist-file, open and scan named file.
2120 On first pass over files, only do parse_source_file_1.
2121 A new second pass calls parse_source_file_2 for each file to compile.
2122 (init_jcf_parse): Call init_src_parse.
2123 * jvspec.c (INDIRECT_FILE_ARG): New flag.
2124 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
2125 as multiple input file combined in one compilation.
2126 * lang-options.h: Add -ffilelist-file
2127 * lang.c (flag_filelist_file): New flag variable.
2128 (lang_f_options): Handle -ffilelist-file.
2129 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
2130 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
2131 gclass_list - use global fields of src_parse_roots instead.
2132 * parse.y (src_parse_roots): New array.
2133 (incomplete_class_list, gclass_list): New macros.
2134 (push_parser_context, java_pop_parser_context,
2135 java_parser_context_resume): Don't fiddle with deleted fields.
2136 (various): Use incomplete_class gclass_list and global macros
2137 instead of parse_ctxt fields - the lists are global.
2138 (init_src_parse): New function.
2139
9b58f739
RK
2140Fri Feb 23 15:28:39 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2141
2142 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
2143
064a552c
APB
21442001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
2145
2146 * parse.y (check_inner_class_access): Moved declaration of local
2147 `enclosing_decl_type' to the right location.
2148
a648f4e4
BM
21492001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
2150
e64c46ce 2151 * parse.y (parser_check_super_interface): Don't call
a648f4e4 2152 check_pkg_class_access for an inner interface.
e64c46ce 2153 (parser_check_super): Don't call check_pkg_class_access for inner
a648f4e4 2154 class.
e64c46ce 2155 (do_resolve_class): Simplify enclosing type loop. Don't call
a648f4e4
BM
2156 check_pkg_class_access if CL and DECL are not set.
2157 (find_in_imports_on_demand): Set DECL if class_type needed to be
2158 loaded. Don't call check_pkg_class_access for an inner class.
2159 (check_inner_class_access): Rewritten to implement member access
2160 rules as per spec 6.6.1.
2161 (check_pkg_class_access): Handle the empty package correctly.
2162 (in_same_package): New function. Determine if two classes are in the
2163 same package.
2164
35ab11f0
BM
21652001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
2166
2167 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
2168 method into array types.
2169 * parse.y (patch_method_invocation): Bypass access check on clone call
2170 to array instance.
e64c46ce 2171
055adbaa
APB
21722001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
2173
2174 * expr.c (build_instanceof): Check for arrays when trying fold to
2175 false.
2176
e658449e
JM
21772001-02-15 Jim Meyering <meyering@lucent.com>
2178
fd48c9b5
DD
2179 * Make-lang.in (java.install-common): Depend on `installdirs'.
2180 (java.install-info): Likewise.
e658449e 2181
4238a754
BM
21822001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
2183
2184 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
2185
e101152f 21862001-02-14 Tom Tromey <tromey@redhat.com>
9a07cfaf 2187 Alexandre Petit-Bianco <apbianco@cygnus.com>
e101152f 2188
055adbaa
APB
2189 Fix for PR java/1261.
2190 * typeck.c (build_java_array_type): Add public `clone' method to
2191 arrays.
2192 * parse.y (resolve_qualified_expression_name): Use current_class
e101152f 2193 when checking for inaccessibility.
055adbaa 2194 (patch_method_invocation): Fixed error message when accessibility
e101152f
APB
2195 denied. Added `from_super' argument.
2196
21972001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
2198
2199 * parse.y (resolve_class): Don't build a fake decl. Use the one
2200 already built.
2201 * typeck.c (build_java_array_type): Build and assign decl to array
2202 type.
2203
22042001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
2205
2206 * parse.y (not_accessible_p): Changed leading comment. Added extra
2207 `where' argument. Use it to enforce protected access rules.
2208 (resolve_qualified_expression_name): Added extra argument to
2209 not_accessible_p.
2210 (patch_method_invocation): Use argument `primary' to provide
2211 not_accessible_p with an extra argument.
2212 (lookup_method_invoke): Added extra argument to not_accessible_p.
2213 (search_applicable_method_list): Likewise.
2214
863cd85a
APB
22152001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
2216
2217 * parse.y (resolve_qualified_expression_name): Try to resolve as
2218 an inner class access only if `decl' is a TYPE_DECL.
2219
94807d33
APB
22202001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
2221
2222 * decl.c (classdollar_identifier_node): Initialize.
e64c46ce 2223 * java-tree.h (enum java_tree_index): New entry
94807d33
APB
2224 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
2225 (classdollar_identifier_node): New macro.
2226 (ID_CLASSDOLLAR_P): Likewise.
2227 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
2228 (build_dot_class_method_invocation): Likewise.
2229 (find_applicable_accessible_methods_list): `class$' can't be
2230 inherited.
2231
30f87f1a
APB
22322001-02-09 Raja R Harinath <harinath@cs.umn.edu>
2233
2234 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
2235
22362001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
2237
2238 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
2239 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
2240 gone.
2241
1e97aa40
APB
22422001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
2243
2244 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
2245 outside of the `__U' sequence too.
2246 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
2247 sequence too.
2248
a395f5ab
APB
22492001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
2250
2251 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
2252
1b43b6be
APB
22532001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
2254
2255 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
2256 (JVGENMAIN_OBJS): Likewise.
e64c46ce 2257 * java-tree.h (append_gpp_mangled_name): New prototype.
1b43b6be
APB
2258 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
2259 Removed cast calling `gcc_add_root.'
2260 * jvgenmain.c (mangle_obstack): New global, initialized.
2261 (main): Use it.
2262 (do_mangle_class): Constify local `ptr.'
2263 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
2264 append_gpp_mangle_name and update `count' if necessary.
2265 Use `mangle_obstack.'
2266 * mangle.c (append_unicode_mangled_name): Removed.
2267 (append_gpp_mangled_name): Likewise.
2268 (unicode_mangling_length): Likewise.
2269 (mangle_member_name): Return type set to `void.'
2270 (mangle_field_decl): Don't append `U' in escaped names.
2271 (mangle_method_decl): Likewise.
2272 (mangle_member_name): Just use `append_gpp_mangled_name.'
2273 * mangle_name.c: New file.
2274
4a83be51
PB
22752001-02-07 Per Bothner <per@bothner.com>
2276
2277 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
2278
2279 * check-init.c (check_init): Don't call done_alternative after
2280 processing loop code, as a LOOP_EXPR never terminates normally.
2281
7e5fd99f
JM
22822001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
2283
2284 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
2285
1456345e
APB
22862001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
2287
2288 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
2289 DECLs.
2290
77aff9f9
TT
22912001-02-06 Tom Tromey <tromey@redhat.com>
2292
2293 * lex.c (java_new_lexer): Longer error message.
2294
c00dd14e
JS
22952001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
2296 Alexandre Petit-Bianco <apbianco@cygnus.com>
2297
2298 * typeck.c (build_prim_array_type): Added leading comment.
2299 (build_java_array_type): Moved locals out of
2300 block. Always create the `data' field, fixed alignment to match
2301 C++.
2302
6d091870
TT
23032001-02-04 Tom Tromey <tromey@redhat.com>
2304
2305 * expr.c (java_lang_expand_expr): Don't bother recomputing
2306 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
2307 Fixes PR java/1866.
2308
1ebb5e73
APB
23092001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
2310
2311 * parse.y (process_imports): Save the original name of the import
2312 for better error report.
2313
ca5b1ff8
BM
23142001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
2315
2316 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
2317 of macros used when compiling jvspec.c.
2318 * jvspec.c (lang_specific_driver): Link with the shared
2319 libgcc by default.
2320
400500c4
RK
2321Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2322
2323 * check-init.c (check_init): Call internal_error instead of fatal.
2324 * expr.c (java_lang_expand_expr): Likewise.
2325 * jcf-parse.c (get_constant): Likewise.
2326 * mangle.c (java_mangle_decl): Likewise.
2327 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
2328 (operator_string): Likewise.
2329 * check-init.c (check_init): Call abort instead of fatal.
2330 * class.c (build_class_ref): Likewise.
2331 * constants.c (write_constant_pool): Likewise.
2332 * decl.c (start_java_method): Likewise.
2333 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
2334 (java_stack_dup, encode_newarray_type): Likewise.
2335 (build_java_array_length_access): Likewise.
2336 (build_java_check_indexed_type, expand_java_pushc): Likewise.
2337 (build_java_soft_divmod, build_invokeinterface): Likewise.
2338 * java-tree.h (INNER_CLASS_P): Likewise.
2339 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
2340 (give_name_to_class, get_class_constant): Likewise.
2341 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
2342 (find_constant_index, generate_bytecode_conditional): Likewise.
2343 (generate_bytecode_insns, perform_relocations): Likewise.
2344 * lex.c (java_unget_unicode, java_lex): Likewise.
2345 * mangle.c (mangle_type, mangle_record_type): Likewise.
2346 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
2347 (finish_mangling): Likewise.
2348 * parse.h (MARK_FINAL_PARMS): Likewise.
2349 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
2350 (obtain_incomplete_type, java_complete_class): Likewise.
2351 (java_check_regular_methods, java_complete_expand_method): Likewise.
2352 (cut_identifier_in_qualified, check_deprecation): Likewise.
2353 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
2354 (java_complete_lhs, lookup_name_in_blocks): Likewise.
2355 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
2356 * typeck.c (set_local_type, parse_signature_type): Likewise.
2357 (parse_signature_string, build_java_signature): Likewise;
2358 (set_java_signature): Likewise.
2359 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
2360 * class.c (add_method): Call fatal_error instead of fatal.
2361 (build_static_field_ref): Likewise.
2362 * expr.c (build_known_method_ref, expand_invoke): Likewise.
2363 * jcf-parse.c (get_constant, jcf_parse): Likewise.
2364 * lex.c (java_new_new_lexer): Likewise.
2365 * jv-scan.c (main): Likewise.
2366 (fatal_error): Renamed from fatal.
2367 * jcf-parse.c (yyparse): Call fatal_io_error instead of
2368 pfatal_with_name.
2369 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
2370 (yyparse): Likewise.
2371 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
2372 * lex.c (java_get_line_col): Likewise.
2373 * jcf-parse.c (load_class): Make errors non-fatal.
2374 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
e64c46ce 2375
4bae4eb5
BM
23762001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
2377
2378 * jvgenmain.c (class_mangling_suffix): Remove unused string.
2379 (error): Remove unused function.
2380 (main): Don't use "__attribute__ alias" on generated class symbol.
2381
c0b00d37
APB
23822001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
2383
2384 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
2385 argument.
2386 * parse.y (finish_method_declaration): Code accounting for WFLed
2387 method DECL_NAMEs deleted.
2388 (check_abstract_method_definitions): Likewise.
2389 (resolve_type_during_patch): Layout resolved type.
2390 * typeck.c (lookup_do): Removed unused local.
2391
4bae4eb5 23922001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
eb59e547
BM
2393
2394 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
2395 * decl.c (init_decl_processing): Use integer_minus_one_node, not
2396 integer_negative_one_node.
2397 * expr.c (build_java_binop): Likewise.
2398
4bae4eb5 23992001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
7be00c49
JS
2400
2401 * zextract.c (read_zip_archive): Read file_offset before writing
2402 zipd and consequently clobbering the header contents.
2403
c913b6f1
KG
24042001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2405
2406 * Make-lang.in: Remove all dependencies on defaults.h.
2407 * decl.c: Don't include defaults.h.
2408 * expr.c: Likewise.
2409 * parse.y: Likewise.
2410
c4faeb92
APB
24112001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
2412
2413 * ChangeLog (2001-01-21): Fixed typo.
2414 * class.c (layout_class_method): Code accounting for WFLed
2415 method DECL_NAMEs deleted.
2416 * constant.c (find_methodref_index): Likewise.
2417 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
2418 * java-tree.h (DECL_FUNCTION_WFL): New macro.
2419 (struct lang_decl): New field `wfl'.
2420 (java_get_real_method_name): Prototype deleted.
2421 * mangle.c (mangle_method_decl): Code accounting for WFLed
2422 method DECL_NAMEs deleted.
2423 * parse.h (GET_METHOD_NAME): Macro deleted.
2424 * parse.y (reset_method_name): Deleted.
2425 (method_header): Set DECL_FUNCTION_WFL.
2426 (check_abstract_method_header): Code accounting for WFLed method
2427 DECL_NAMEs deleted.
2428 (java_get_real_method_name): Deleted.
2429 (check_method_redefinition): Code accounting for WFLed method
2430 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
2431 (java_check_regular_methods): Likewise.
2432 (java_check_abstract_methods): Likewise.
2433 (java_expand_classes): Don't call `reset_method_name.'
2434 (search_applicable_method_list): Use DECL_NAMEs instead of
2435 GET_METHOD_NAME.
2436 * typeck.c (lookup_do): Code accounting for WFLed method
2437 DECL_NAMEs deleted.
2438
97876d66
RE
24392001-01-25 Richard Earnshaw <rearnsha@arm.com>
2440
2441 * lex.c (java_read_char): Check for EOF from getc first.
2442
493d561d
APB
24432001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2444
2445 * class.c (layout_class): Don't lay the superclass out if it's
2446 already being laid out.
2447 * jcf-parse.c (handle_innerclass_attribute): New function.
2448 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
2449 handle_innerclasses_attribute.
2450 (jcf_parse): Don't load an innerclasses if it's already being
2451 laid out.
2452 * jcf-write.c (append_innerclass_attribute_entry): Static
2453 `anonymous_name' and its initialization deleted. `ocii' and `ini'
2454 to be zero for anonymous classes.
2455
24562001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2457
2458 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
2459 necessary.
2460 * jcf-parse.c (set_source_filename): Use
2461 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
2462
24632001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2464
2465 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
2466 gets a unique asm name.
2467
24682001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2469
2470 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
2471 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
2472 if necessary.
2473 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
2474 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
2475 * parse.y (lookup_package_type_and_set_next): Deleted.
2476 (resolve_package): Removed unnecessary code.
2477 (find_applicable_accessible_methods_list): `finit$' can't be
e64c46ce 2478 inherited.
493d561d
APB
2479 * verify.c (pop_argument_types): Added missing prototype.
2480
7c01b2b5
BM
24812001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
2482
2483 * config-lang.in: Disable java by default.
2484
80261b56
TT
24852001-01-23 Tom Tromey <tromey@redhat.com>
2486
2487 * gcj.texi (Copying): New node.
2488 Added copyright information.
2489
a4796c80
PB
24902001-01-21 Per Bothner <per@bothner.com>
2491
2492 Various fixes to allow compiling a compressed .jar/.zip archive.
2493 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
2494 (struct ZipFile): Add fields name and next (from ZipFileCache).
2495 (struct ZipDirectory): New field zipf points to owning ZipFile.
2496 * jcf.h (struct ZipDirectory): Add forward declaration.
2497 (struct JCF): Declare zipd field to have type struct ZipDirectory.
2498 Remove seen_in_zip and zip_offset fields.
2499 (JCF_SEEN_IN_ZIP): New macro.
2500 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
2501 * jcf-io.c: Change all ZipFileCache to ZipFile.
2502 (read_zip_member): New function.
2503 (open_in_zip): Call read_zip_member.
2504 * jcf-parse.c (find_in_current_zip): Remove function.
2505 (read_class): Merge in find_in_current_zip functionality.
2506 Call read_zip_member if needed.
2507 (parse_zip_file_entries): Use read_zip_member.
2508 (process_zip_dir): Update for removed and added JCF fields.
2509 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
2510
b5c4fed9
PB
25112001-01-21 Per Bothner <per@bothner.com>
2512
2513 Minor optimization of static ggc roots.
2514 * jcf-parse.c (parse_roots): New static field.
2515 (current_field, current_method, current_file_list): Replace by macros
2516 naming fields of parse_roots.
2517 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
2518 * class.c (class_roots): New static field.
2519 (registered_class, fields_ident, info_ident, class_list):
2520 New macros naming fields of parse_roots.
2521 (build_static_field_ref): Don't register roots here.
2522 (layout_class): Static field list replaced by macro class_list.
2523 (init_class_processing): Call ggc_add_tree_root for 4 roots.
2524 Initialize fields_ident and info_ident here.
2525
3432b91b
PB
25262001-01-21 Per Bothner <per@bothner.com>
2527
2528 * jcf-parse.c (ggc_mark_jcf): New function.
2529 (init_jcf_parse): Register current_jcf as ggc root.
2530
2c36c7fd
PB
25312001-01-21 Per Bothner <per@bothner.com>
2532
2533 * lang.c (put_decl_node): Print method's name.
2534
9c0c88ac
PB
25352001-01-21 Per Bothner <per@bothner.com>
2536
2537 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
2538 (verify_jvm_instructions): Use it, for better error messages on loads.
2539
230cbd5f
PB
25402001-01-21 Per Bothner <per@bothner.com>
2541
c4faeb92 2542 * verify.c (merge_type_state): Still may have to merge even if
230cbd5f
PB
2543 LABEL_VERIFIED (label).
2544
e6b6db0d
PB
25452001-01-21 Per Bothner <per@bothner.com>
2546
2547 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
2548 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
2549
b57300bc
PB
25502001-01-19 Per Bothner <per@bothner.com>
2551
2552 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
2553 if expeting an interface type. Refines Tom's change of 2000-09-12.
2554
ee08d4cc
PB
25552001-01-18 Per Bothner <per@bothner.com>
2556
2557 * gcj.texi (Input Options): Mention .java files.
2558
b1117741
APB
25592001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
2560
2561 * lang-options.h (-Wunsupported-jdk11): Removed.
2562 * lang.c (flag_not_overriding): Deleted.
2563 (flag_static_local_jdk1_1): Likewise.
2564 (lang_W_options): Removed "unsupported-jdk11" entry.
2565 * parse.y (java_check_methods): Removed dead code.
2566
2dc73168
TT
25672001-01-17 Tom Tromey <tromey@redhat.com>
2568
2569 Changes suggested by Per Bothner:
2570 * gcj.texi (Input Options): Don't mention input files.
2571 (Code Generation): Updated --main information.
2572 (Invoking jcf-dump): Mention that --javap is incomplete.
2573 From Alexandre Petit-Bianco:
2574 (Warnings): Don't mention -Wunsupported-jdk11.
2575 My stuff:
2576 (Compatibility): Mention JDK 1.2-ness of libraries.
2577 (Resources): Mention resources used when writing gcj.
2578
bc65b5ec
TT
25792001-01-17 Tom Tromey <tromey@redhat.com>
2580
2581 * gcj.texi: New file.
2582 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
2583 (java.info): Depend on gcj.info.
2584 (java/gcj.dvi): New target.
2585 (java.dvi): Depend on gcj.dvi.
2586 (java.install-info): Wrote.
2587
930f6690
JS
25882001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
2589
2590 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
2591 having called make_decl_rtl.
2592
00b4575d
PB
25932001-01-14 Per Bothner <per@bothner.com>
2594
984ad2c6
PB
2595 Various patches to emit better messages on verification errors.
2596 * expr.c (push_type_0): Return error indication on stack overflow,
2597 instead of callinfg fatal.
2598 (push_type): Now just call push_type_0 (nd fatal on overflow).
2599 (pop_type_0): Return detailed error message (in a char** argument).
2600 (pop_type): If pop_type_0 fails, print error message.
2601 (pop_argument_types): Moved to verify.c.
2602 * verify.c (pop_argument_types): Moved from expr.c.
2603 Return a (possible) error message, rather than void.
2604 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
2605 (verify_jvm_instruction): Use new macros, improving error messages.
2606 For case OPCODE_astore use object_ptr_type_node.
2607 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
2608 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
2609
00b4575d
PB
2610 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
2611 constant, return body without wrapper. (Improves constant folding.)
2612 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
2613
d9da31dd
PB
26142001-01-13 Per Bothner <per@bothner.com>
2615
2616 * expr.c (expand_java_field_op): Assigning to a final field outside
2617 an initializer does not violate JVM spec, so should be warning, not
2618 error. (Sun's verifier does not complain - though MicroSoft's does.)
e64c46ce 2619
a67a383a
JM
26202001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
2621
2622 * gjavah.c (version), jcf-dump.c (version): Update copyright year
2623 to 2001.
2624
7e1376a1
BM
26252001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
2626
2627 * parse.y (resolve_expression_name): Permit instance variables from
2628 enclosing context in super constructor call.
2629 (resolve_qualified_expression_name): Permit enclosing class's qualified
2630 "this" in super constructor call.
2631
6c418184
MM
26322001-01-10 Mark Mitchell <mark@codesourcery.com>
2633
2634 * class.c (build_utf8_ref): Remove last argument in call to
2635 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
2636 (build_class_ref): Likewise.
2637 (build_static_field_ref): Likewise.
2638 (get_dispatch_table): Likewise.
2639 (layout_class_method): Likewise.
2640 (emit_register_classes): Likewise.
2641 * constants.c (build_constant_data_ref): Likewise.
2642 * decl.c (builtin_function): Likewise.
2643 (create_primitive_vtable): Likewise.
2644 * expr.c (build_known_method_def): Likewise.
2645 (build_jni_stub): Likewise.
2646 (java_lang_expand_expr): Likewise.
e64c46ce 2647
0adc3d8a
TT
26482001-01-10 Tom Tromey <tromey@redhat.com>
2649
2650 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
2651
761491c8
APB
26522001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
2653
2654 * java-tree.h (lang_printable_name_wls): New prototype.
2655 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
2656 rather than `current_class' to print type name. Don't prepend type
2657 names when printing constructor names.
2658 (lang_printable_name_wls): New function.
2659 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
2660 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
2661 * parse.y (patch_method_invocation): Message tuned for constructors.
2662 (not_accessible_p): Grant `private' access from within
2663 enclosing contexts.
e64c46ce 2664
dc08e603
APB
26652001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
2666
2667 All files with updated copyright when applicable.
2668 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
2669 * class.c (mangle_class_field): Function removed.
2670 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
2671 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
2672 (build_class_ref): Call `java_mangle_class_field' instead of
2673 `mangle_class_field.'
2674 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
e64c46ce 2675 (layout_class): Call `java_mangle_decl' instead of
dc08e603
APB
2676 `mangle_static_field.'
2677 (cxx_keywords): Initialized static array moved to `lex.c.'
2678 (layout_class_method): Changed leading comment. Simplified to
2679 call `java_mangle_decl.' Local `ptr' moved in for loop body.
2680 * decl.c (lang_mark_tree): Mark field `package_list.'
2681 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
2682 (struct lang_type): New field `package_list.'
2683 (unicode_mangling_length): Prototype removed.
2684 (append_gpp_mangled_name, append_gpp_mangled_classtype,
2685 emit_unicode_mangled_name): Likewise.
2686 (cxx_keyword_p): New prototype.
2687 (java_mangle_decl, java_mangle_class_field,
2688 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
2689 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
2690 `build_expr_wfl.'
2691 * jvgenmain.c (main_method_prefix): Global variable removed.
2692 (main_method_suffix): Likewise.
2693 (do_mangle_classname): New function.
a83f01f0 2694 (main): Call it. Format changed to accommodate new mangling scheme.
dc08e603
APB
2695 * lex.c: (utf8_cmp): Conditionally prototyped.
2696 (cxx_keywords): Moved from class.c, conditionally defined.
2697 (utf8_cmp, cxx_keyword_p): Likewise.
2698 * mangle.c (obstack.h, ggc.h): Included.
2699 (mangle_field_decl): New function.
2700 (mangle_method_decl, mangle_type, mangle_pointer_type,
2701 mangle_array_type, mangle_record_type,
2702 find_compression_pointer_match, find_compression_array_match,
2703 find_compression_record_match,
2704 find_compression_array_template_match, set_type_package_list,
2705 entry_match_pointer_p, emit_compression_string, init_mangling,
2706 finish_mangling, compression_table_add, mangle_member_name): Likewise.
2707 (mangle_obstack): New global.
2708 (MANGLE_RAW_STRING): New macro.
2709 (unicode_mangling_length): Turned static.
2710 (append_unicode_mangled_name): Renamed from
2711 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
2712 replaces `obstack', removed from the parameter list.
2713 (append_gpp_mangled_name): Turned static. `mangle_obstack'
e64c46ce 2714 replaces parameter `obstack', removed from the parameter list. Call
dc08e603
APB
2715 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
2716 (append_gpp_mangled_classtype): Removed.
2717 (compression_table, compression_next): New static variables.
2718 * parse.y (temporary_obstack): Extern declaration removed.
2719
761491c8
APB
27202001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
2721
2722 * parse.y (patch_binop): Compute missing type in error situations.
2723
5bb11b2e
BM
27242001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
2725
2726 * class.c (make_class_data): Push initial value for "arrayclass".
2727 * decl.c (init_decl_processing): Add new class field "arrayclass".
2728
ac39dac0
BM
27292001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
2730
2731 From patha@softlab.ericsson.se:
e64c46ce 2732 * parse.y (switch_label): Use build, not build1, to construct
ac39dac0
BM
2733 DEFAULT_EXPR.
2734
a5a4ce3c
NB
27352001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
2736
2737 * lang.c (lang_decode_option): Change -MA to -MP.
2738 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
2739 Update to new prototype; do quote targets.
2740 (jcf_dependency_write): Update.
2741
d27fd99a
BM
27422000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
2743
2744 Shorten primitive array allocation path:
2745 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
2746 to create new primitive arrays.
e64c46ce 2747 * expr.c (build_newarray): If generating native code, call
d27fd99a
BM
2748 soft_newarray_node with a reference to the primitive TYPE identifier
2749 instead of type_value.
e64c46ce 2750
c1eacb70
BM
27512000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
2752
2753 Fix for PRs gcj/312 and gcj/253:
2754 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
2755 dest if they arn't already.
e64c46ce 2756 * class.c (layout_class): Call maybe_layout_super_class on
c1eacb70
BM
2757 superinterfaces also, but only if compiling from bytecode.
2758
6d003d5c
BM
2759 Fix for PR gcj/373:
2760 * parse.y (create_class): Set ACC_STATIC if class is declared in an
2761 interface.
2762
325de66c
TT
27632000-12-15 Tom Tromey <tromey@redhat.com>
2764
2765 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
2766 set.
2767
e35990c4
AH
27682000-12-14 Andrew Haley <aph@redhat.com>
2769
2770 * boehm.c (mark_reference_fields): Change test to correctly detect
2771 bitmap overflow.
2772
53714cda
AJ
27732000-12-15 Andreas Jaeger <aj@suse.de>
2774
2775 * config-lang.in (lang_dirs): Added.
2776
1e0cdc10
APB
27772000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
2778
2779 * parse.y (end_artificial_method_body): Fixed undefined behavior.
2780 Credits go to rth for finding it.
2781
e9e42530
MS
27822000-12-13 Mike Stump <mrs@wrs.com>
2783
2784 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
2785
3f27e3f8
TT
27862000-11-07 Tom Tromey <tromey@cygnus.com>
2787
2788 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
2789 * lex.c (java_ignorable_control_p): Removed.
2790 (java_letter_or_digit_p): Removed.
2791 (java_start_char_p): New function.
2792 (java_read_char): Return `int', not `unicode_t'. Changed
2793 callers.
2794 (java_read_unicode): Likewise.
2795 (java_read_unicode_collapsing_terminators): Likewise.
2796 (java_get_unicode): Likewise.
2797 (java_new_lexer): Initialize hit_eof.
2798 (java_parse_end_comment): Take `int' argument.
2799 (java_parse_doc_section): Likewise.
2800 (java_parse_escape_sequence): Don't allow backlash-newline.
2801 Return `int'.
2802 * lex.h (JAVA_DIGIT_P): Removed.
2803 (_JAVA_LETTER_OR_DIGIT_P): Removed.
2804 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
2805 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
2806 (JAVA_PART_CHAR_P): New macro.
2807 (UEOF): Now -1.
2808 (JAVA_CHAR_ERROR): Now -2.
2809 (java_lexer): New field `hit_eof'.
2810 * chartables.h: New file.
2811 * gen-table.pl: new file.
2812
568aac9c 28132000-11-20 Tom Tromey <tromey@cygnus.com>
9a07cfaf 2814 Alexandre Petit-Bianco <apbianco@cygnus.com>
568aac9c
TT
2815
2816 * parse.y (java_complete_lhs): Only allow compound assignment of
2817 reference type if type is String.
2818
f34ff6d6
APB
28192000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
2820
2821 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
2822 jcf-path.c: Likewise.
2823
6e5589e8
AG
28242000-12-09 Anthony Green <green@redhat.com>
2825
2826 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
2827 filestart and filename_length as int values.
2828
8000caee
MD
28292000-12-07 Mo DeJong <mdejong@redhat.com>
2830
2831 * jcf-io.c (find_class): Correct the logic that tests to see if a
2832 .java file is newer than its .class file. The compiler was
2833 incorrectly printing a warning when file mod times were equal.
2834
f6bbde28
ZW
28352000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
2836
2837 * jvgenmain.c: Use ISPRINT not isascii.
2838
46142b26
APB
28392000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
2840
2841 * parse.y (end_artificial_method_body): Fixed typo.
2842
f8b93ea7
APB
28432000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
2844
2845 * parse.y (patch_method_invocation): Pick the correct enclosing
2846 context when creating inner class instances.
2847 Fixes gcj/332.
2848
45441c5b
JM
28492000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
2850
2851 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
2852 Update copyright year to 2000.
2853
1510057a
AG
28542000-11-23 Anthony Green <green@redhat.com>
2855
2856 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
2857 Move current_file_list out of yyparse and make it static.
2858
2859 * expr.c: Declare quick_stack and tree_list_free_list as static
2860 (init_expr_processing): Register quick_stack and
2861 tree_list_free_list roots.
2862
5e18f6d6
APB
28632000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
2864
2865 * parse.y (build_outer_field_access): New local `decl_ctx', use
2866 it. Check for field's context and current class immediate outer
2867 context inheritance.
2868 (outer_field_access_p): Consider fields inherited from the last
2869 enclosing context.
2870 (build_access_to_thisn): Stop at the last enclosing context if
2871 necessary.
2872 Fixes gcj/367.
2873
9196ece5
R
2874Thu Nov 23 02:19:14 2000 J"orn Rennecke <amylaar@redhat.com>
2875
2876 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
2877
c385cdf6
BM
28782000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
2879
2880 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
2881 scratch buffer.
2882
1535cc88
TT
28832000-11-20 Tom Tromey <tromey@cygnus.com>
2884
2885 * jv-scan.c (help): Document --complexity.
2886 (options): Added --complexity.
2887 (flag_complexity): New global.
2888 (main): Call `report'.
2889 * parse-scan.y (complexity): New global.
2890 (if_then_statement, if_then_else_statement,
2891 if_then_else_statement_nsi, switch_block_statement_group,
2892 while_expression, do_statement, for_begin, continue_statement,
2893 throw_statement, catch_clause, finally, method_invocation,
2894 conditional_and_expression, conditional_or_expression,
2895 conditional_expression): Update complexity.
2896 (reset_report): Reset complexity.
2897 (report): New function.
2898
d828bc42
TT
28992000-11-20 Tom Tromey <tromey@cygnus.com>
2900
2901 * lex.c (yylex): Added STRICT_TK case.
2902 * parse.y (STRICT_TK): Added.
2903 * parse-scan.y (STRICT_TK): Added.
2904 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
2905 `;'. Use 4, not 3, with -k option. Correctly rename resulting
2906 file.
2907 * keyword.h: Rebuilt.
2908 * keyword.gperf (strictfp): Added.
2909
4e7842a0
TT
29102000-11-20 Tom Tromey <tromey@cygnus.com>
2911
2912 * lex.c (yylex): Recognize floating point constants with leading
2913 0.
2914
7e9355c6
KG
29152000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2916
2917 * java-tree.h (cyclic_inheritance_report): Constify.
2918 * parse.y (cyclic_inheritance_report): Likewise.
2919
a8a05998
ZW
29202000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
2921
2922 * parse.y (goal): Remove call to ggc_add_string_root.
2923
520a57c8
ZW
29242000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
2925
2926 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
2927 Create string in scratch buffer, then pass to build_string.
2928
88f3c477
JM
29292000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
2930
2931 * parse.y (issue_warning_error_from_context): Add
2932 ATTRIBUTE_PRINTF.
2933
ac51395d
AG
29342000-11-11 Anthony Green <green@redhat.com>
2935
2936 * jcf-parse.c (process_zip_dir): Add finput parameter.
2937 (jcf_figure_file_type): Call process_zip_dir with appropriate
2938 argument.
2939
4e135bdd
KG
29402000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2941
2942 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
2943 * jcf-parse.c (jcf_figure_file_type): Likewise.
2944
2e09e75a
JM
29452000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
2946
2947 * parse.y (create_new_parser_context): Use memset () instead of
2948 bzero ().
2949
136c35df
TT
29502000-11-08 Tom Tromey <tromey@cygnus.com>
2951
2952 * gjavah.c (process_file): Only include gcj/cni.h when generating
2953 CNI stubs.
2954
961192e1
JM
29552000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
2956
2957 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
2958 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
2959 instead of bzero ().
2960
099a5150
TT
29612000-11-05 Tom Tromey <tromey@cygnus.com>
2962
2963 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
2964 * lex.c (IS_ZERO): New define.
2965 (java_perform_atof): Error on floating point underflow.
2966
cbf53a1d
TT
29672000-11-04 Tom Tromey <tromey@cygnus.com>
2968
2969 * lex.c (java_parse_escape_sequence): Only read two octal
2970 characters if the first one is greater than 3. Don't allow
2971 "octal" numbers to include the digits 8 or 9.
2972
436a88a6
JM
29732000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
2974
2975 * Make-lang.in (java.distdir): Remove.
2976
747800ee
TT
29772000-11-03 Tom Tromey <tromey@cygnus.com>
2978
4e2c8d44
TT
2979 * Make-lang.in (java.dvi): New target.
2980 Partial fix for PR other/567.
2981
b7436b72
TT
2982 * lang-options.h: Mention -Wout-of-date.
2983 * jcf-dump.c (flag_newer): New global.
2984 * gjavah.c (flag_newer): New global.
2985 * jcf-io.c (find_class): Only warn when flag_newer set.
2986 * lang.c (flag_newer): New global.
2987 (struct string_option): New declaration.
2988 (lang_W_options): New global.
2989 (process_option_with_no): New function.
2990 (lang_decode_option): Use it.
2991
0160fbe1
TT
2992 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
2993 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
2994 `$'.
2995
747800ee
TT
2996 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
2997 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
2998 * lex.c (java_read_unicode): Removed `term_context' argument.
2999 Recognize any number of `u' in `\u'.
3000 (java_read_unicode_collapsing_terminators): New function.
3001 (java_get_unicode): Use it.
3002 (java_lineterminator): Removed.
3003 (yylex): Produce error if character literal is newline or single
3004 quote. Return if eof found in middle of `//' comment. EOF in
3005 `//' comment is only an error if pedantic.
3006 (java_ignorable_control_p): New function.
3007 (java_parse_end_comment): Return if eof found in middle of
3008 comment.
3009 Include flags.h.
3010 * jv-scan.c (pedantic): New global.
3011
ee5f86dc
APB
30122000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
3013
3014 * parse.y (outer_field_access_p): Inherited fields aren't
3015 consider outer fields.
3016 (maybe_build_thisn_access_method): Use
3017 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
3018 (resolve_expression_name): Trigger an error if a static field
3019 is being accessed as an outer field.
3020
7ccd2fc9 30212000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
f6bbde28 3022
7ccd2fc9
APB
3023 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
3024 Fixes gcj/365.
3025
b8dad04b
ZW
30262000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
3027
3028 * Make-lang.in: Move all build rules here from Makefile.in,
3029 adapt to new context. Wrap all rules that change the current
3030 directory in parentheses. Expunge all references to $(P).
3031 When one command depends on another and they're run all at
3032 once, use && to separate them, not ;. Add OUTPUT_OPTION to
3033 all object-file generation rules. Delete obsolete variables.
3034
3035 * Makefile.in: Delete.
3036 * config-lang.in: Delete outputs= line.
3037
2cb3951d
APB
30382000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
3039
3040 * parse.y (patch_method_invocation): NULLify this_arg when already
3041 inserted.
3042 (maybe_use_access_method): Handle call to methods unrelated to the
3043 current class. Fixed comment.
3044 Fixes gcj/361.
3045
ee5f86dc
APB
30462000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
3047
3048 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
3049 scope.
3050
07b5e470
TT
30512000-10-24 Tom Tromey <tromey@cygnus.com>
3052
3053 * lex.c (java_new_lexer): Initialize new fields. Work around
3054 broken iconv() implementations.
3055 (java_read_char): Swap bytes if required. Use fallback decoder if
3056 required.
3057 (byteswap_init, need_byteswap): New globals.
3058 (java_destroy_lexer): Only close iconv handle if it is in use.
3059 * lex.h (java_lexer): New fields read_anything, byte_swap,
3060 use_fallback.
3061 Made out_buffer unsigned.
3062
8ac1de05
APB
30632000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
3064
3065 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
3066 where an enclosing context can be set on the jdep.
3067 (do_resolve_class): Fixed identation.
3068
80393943
KG
30692000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3070
3071 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
f6bbde28 3072
80393943
KG
3073 * jcf-reader.c (peek_attribute, skip_attribute): Only define
3074 when requested.
3075
3076 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
3077
3078 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
3079
c7303e41
APB
30802000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
3081
3082 * jcf-write.c (OP1): Update `last_bc'.
3083 (struct jcf_block): Fixed indentation and typo in comments. New
3084 field `last_bc'.
3085 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
3086 follows `monitorenter'.
3087 * parse.y (patch_synchronized_statement): New local `tmp'. Call
3088 `patch_string'.
3089 Fixes gcj/232.
3090
316a06a1
TT
30912000-10-16 Tom Tromey <tromey@cygnus.com>
3092
3093 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
3094 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
3095 * lang-options.h: Added -MA, -MT, -MF..
3096 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
3097 (DEPEND_TARGET_SET): New macro.
3098 (DEPEND_FILE_ALREADY_SET): Likewise.
3099 (init_parse): Handle new flags.
3100 * jcf.h (jcf_dependency_print_dummies): Declare.
3101 * Make-lang.in (s-java): Added mkdeps.o.
3102 * Makefile.in (BACKEND): Added mkdeps.o.
3103 (../gcjh$(exeext)): Added mkdeps.o.
3104 (../jcf-dump$(exeext)): Added mkdeps.o.
3105 * jcf-depend.c: Include mkdeps.h.
3106 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
3107 add_entry): Removed.
3108 (jcf_dependency_reset): Rewrote.
3109 (dependencies): New global.
3110 (jcf_dependency_set_target): Rewrote.
3111 (jcf_dependency_add_target): Likewise.
3112 (jcf_dependency_add_file): Likewise.
3113 (munge): Removed.
3114 (print_ents): Removed.
3115 (jcf_dependency_write): Rewrote.
3116 (print_dummies): New global.
3117 (jcf_dependency_print_dummies): New function
3118 (jcf_dependency_write): Call deps_dummy_targets if required.
3119
dba41d30
APB
31202000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
3121
3122 * gjavah.c (add_class_decl): Removed unused variables `tname',
3123 `tlen' and `name_index'.
3124 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
3125 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
3126 in `wfl_operator' with value.
3127 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
3128 (jcf_figure_file_type): Fixed identation.
3129 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
3130 * parse.y (analyze_clinit_body): New function.
3131 (static_initializer:): Reset `current_static_block'.
3132 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
3133 `wfl_operator' with new value.
3134 (lookup_cl): Use EXPR_WFL_FILENAME.
3135 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
3136 analyze_clinit_body.
3137 (build_outer_field_access): Access to this$<n> built from
3138 current_class, not its outer context.
3139 (build_access_to_thisn): Fixed leading comment. Tidied things up.
f6bbde28 3140 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
dba41d30
APB
3141 (patch_method_invocation): Use `is_static_flag' when already
3142 initialized.
3143 (patch_newarray): Removed assignment in ternary operator.
3144
1a2ebe6d
APB
31452000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
3146
dba41d30 3147 * except.c (free_eh_ranges): Don't free `whole_range'.
1a2ebe6d 3148
8e7ab3ff
AG
31492000-10-15 Anthony Green <green@redhat.com>
3150
3151 * decl.c (init_decl_processing): Call init_class_processing before
3152 anything else.
3153
c7303e41
APB
31542000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
3155
3156 * check-init.c (check_init): Fixed leading comment. Use
3157 LOCAL_FINAL_P.
3158 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
3159 (give_name_to_locals): Likewise.
3160 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
3161 fields in lang_decl_var.
3162 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
3163 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
3164 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
3165 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
3166 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
3167 (LOCAL_FINAL): Rewritten.
3168 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
3169 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
3170 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
3171 `init_final' fields.
3172 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
3173 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
3174 (TYPE_HAS_FINAL_VARIABLE): New macro.
3175 (struct lang_type): Added `afv' field.
3176 * parse.y (check_static_final_variable_assignment_flag): New function.
3177 (reset_static_final_variable_assignment_flag): Likewise.
3178 (check_final_variable_local_assignment_flag): Likewise.
3179 (reset_final_variable_local_assignment_flag): Likewise.
3180 (check_final_variable_indirect_assignment): Likewise.
3181 (check_final_variable_global_assignment_flag): Likewise.
3182 (add_inner_class_fields): Use LOCAL_FINAL_P.
3183 (register_fields): Handle local finals and final variables.
3184 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
3185 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
3186 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
3187 on local finals.
3188 (java_complete_expand_methods): Loop to set
3189 TYPE_HAS_FINAL_VARIABLE. Call
f6bbde28 3190 `reset_final_variable_local_assignment_flag' and
c7303e41
APB
3191 `check_final_variable_local_assignment_flag' accordingly before
3192 and after constructor expansion. Call
3193 `reset_static_final_variable_assignment_flag'
f6bbde28 3194 before expanding <clinit> and after call
c7303e41
APB
3195 `check_static_final_variable_assignment_flag' if the
3196 current_class isn't an interface. After all methods have been
3197 expanded, call `check_final_variable_global_assignment_flag' and
3198 `check_static_final_variable_assignment_flag' if the current class
f6bbde28 3199 is an interface.
c7303e41
APB
3200 (maybe_yank_clinit): Fixed typo in comment.
3201 (build_outer_field_access_methods): Removed old sanity check. Use
3202 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
3203 Don't create access methods for finals.
3204 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
3205 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
f6bbde28 3206 existing DECL_INIT has been processed.
c7303e41
APB
3207 (java_complete_lhs): Likewise.
3208 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
3209 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
3210 logic.
3211 (patch_assignment): Use LOCAL_FINAL_P.
3212 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
3213 DECL_INITIAL is nullified.
3214 Fixes gcj/163.
3215
4b945402
KG
32162000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3217
3218 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
f6bbde28 3219
4b945402
KG
3220 * Makefile.in (parse.c, parse-scan.c): Likewise.
3221
1f8f4a0b
MM
32222000-10-12 Mark Mitchell <mark@codesourcery.com>
3223
3224 * class.c (temporary_obstack): Remove.
3225 (make_class): Don't mess with obstascks.
3226 (push_class): Likewise.
3227 (set_super_info): Likewise.
3228 (add_method_1): Likewise.
3229 (add_method): Likewise.
3230 (add_field): Likewise.
3231 (build_utf8_ref): Likewise.
3232 (build_class_ref): Likewise.
3233 (build_static_field_ref): Likewise.
3234 (finish_class): Likewise.
3235 (push_super_field): Likewise.
3236 (layout_class): Likewise.
3237 (layout_class_methods): Likewise.
3238 (init_class_processing): Likewise.
3239 * constants.c (get_tag_node): Likewise.
3240 (build_constant_data_ref): Likewise.
3241 * decl.c (ggc_p): Remove.
3242 (copy_lang_decl): Use ggc_alloc.
3243 (complete_start_java_method): Don't mess with obstacks.
3244 (start_java_method): Likewise.
3245 (end_java_method): Likewise.
3246 * except.c (link_handler): Use xmalloc.
3247 (free_eh_ranges): New function.
3248 (method_init_exceptions): Use it.
3249 (add_handler): Use xmalloc.
3250 (expand_start_java_handler): Don't mess with obstacks.
3251 (prepare_eh_table_type): Likewise.
3252 (expand_end_java_handler): Likewise.
3253 * expr.c (push_value): Likewise.
3254 (create_label_decl): Likewise.
3255 (build_jni_stub): Likewise.
3256 (java_lang_expand_expr): Likewise.
3257 (note_instructions): Use xrealloc.
3258 (java_push_constant_from_pool): Don't mess with obstacks.
3259 (process_jvm_instruction): Likewise.
3260 * java-tree.h (cyclic_inheritance_report): Remove duplicate
3261 declaration.
3262 * jcf-parse.c (get_constant): Don't mess with obstacks.
3263 (read_class): Likewise.
3264 (jcf_parse): Likewise.
a83f01f0 3265 * lex.c (expression_obstack): Remove.
1f8f4a0b
MM
3266 (java_lex): Don't use obstack_free.
3267 * parse.h (exit_java_complete_class): Don't mess with obstacks.
3268 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
3269 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
3270 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
3271 * parse.y (gaol): Add more GC roots.
3272 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
3273 (lookup_field_wrapper): Likewise.
3274 (obtain_incomplete_type): Don't mess with obstacks.
a83f01f0 3275 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
1f8f4a0b
MM
3276 macros.
3277 (craft_constructor): Don't mess with obstacks.
3278 (safe_layout_class): Likewise.
3279 (java_complete_class): Likewise.
3280 (source_end_java_method): Likewise.
3281 (build_outer_field_access_methods): Likewise.
3282 (build_outer_method_access_method): Likewise.
3283 (maybe_build_thisn_access_method): Likewise.
3284 (build_dot_class_method_invocation): Likewise.
3285 (java_complete_tree): Likewise.
3286 (java_complete_lhs): Likewise.
3287 (do_merge_string_cste): Likewise.
3288 (patch_string_cst): Likewise.
3289 (array_constructor_check_entry): Likewise.
3290 * typeck.c (build_java_array_type): Likewise.
3291 (parse_signature_string): Likewise.
3292 (build_java_signature): Likewise.
f6bbde28 3293
3c1d1e7b
TT
32942000-10-12 Tom Tromey <tromey@cygnus.com>
3295
3296 Fix for PR gcj/356:
3297 * gjavah.c (add_class_decl): Don't special-case inner classes.
3298 (add_namelet): Likewise.
3299
a93eddcf
APB
33002000-10-11 Rodney Brown <RodneyBrown@mynd.com>
3301
3302 * java-tree.h: Constify current_encoding.
3303 * lang.c: Constify current_encoding.
3304
33052000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
3306
3307 * jvgenmain.c (class_mangling_suffix): Omit `.'.
3308 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
3309
33102000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
3311
3312 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
3313 patch. Fixes gcj/340.
3314
2e165c53
TT
33152000-10-10 Tom Tromey <tromey@cygnus.com>
3316
3317 * lex.c (java_new_lexer): Initialize out_first and out_last
3318 fields.
3319 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
3320
c7303e41
APB
33212000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
3322
3323 * parse.y (pop_current_osb): New function.
3324 (array_type:): Use `dims:', changed actions
3325 accordingly. Suggested by Anthony Green.
3326 (array_creation_expression:): Used pop_current_osb.
3327 (cast_expression:): Likewise.
3328 (search_applicable_method_list): Fixed indentation.
3329
33302000-10-08 Anthony Green <green@redhat.com>
3331
3332 * parse.y (array_type_literal): Remove production.
3333 (type_literals): Refer to array_type, not array_type_literal.
3334
29f8b718
APB
33352000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
3336
3337 Patch contributed by Corey Minyard.
3338 * decl.c (check_local_named_variable): New function.
3339 (tree check_local_unnamed_variable): Likewise.
3340 (find_local_variable): Splitted. Call check_local_{un}named_variable.
3341
7fd9a516
AG
33422000-10-07 Anthony Green <green@redhat.com>
3343
3344 * class.c (layout_class): Handle case where superclass can't be
3345 layed out yet.
3346
20d431c9
JM
33472000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
3348
3349 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
3350 gperf.
3351
e0a0c416
TT
33522000-10-05 Tom Tromey <tromey@cygnus.com>
3353
3354 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
3355 * jvgenmain.c (class_mangling_prefix): Removed.
3356 (class_mangling_suffix): New global.
3357 (main): Use it.
3358 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
3359 `$'.
3360 (print_method_info): Handle overrides for static and final
3361 methods.
3362 (process_file): Generate declaration for class object field.
3363 * class.c (cxx_keywords): New array.
3364 (utf8_cmp): New function.
3365 (cxx_keyword_p): New function.
3366 (layout_class_method): Mangle C++ keywords by appending `$'.
3367 (mangle_field): New function.
3368 (mangle_class_field): Use mangle_field. Mangle class name as
3369 `class$'.
3370 (mangle_static_field): Use mangle_field.
3371
6e22695a
APB
3372Tue Oct 3 13:44:37 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
3373
3374 * decl.c (find_local_variable): Removed uncessary type check and
3375 fixed range check typo. From Corey Minyard.
3376
3377Wed Sep 13 16:06:52 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
3378
3379 * decl.c (give_name_to_locals): New local `code_offset'. Call
e64c46ce 3380 `maybe_adjust_start_pc'.
6e22695a
APB
3381 * expr.c (note_instructions): New function.
3382 (expand_byte_code): Don't collect insn starts here.
3383 (peek_opcode_at_pc): New function.
3384 (maybe_adjust_start_pc): Likewise.
3385 * java-tree.h (maybe_adjust_start_pc): Declare.
3386 (note_instructions): Likewise.
dba41d30 3387 * jcf-parse.c (parse_class_file): Call `note_instructions'.
6e22695a
APB
3388
3389Wed Sep 13 11:50:35 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
3390
3391 * parse.y (field_access:): Fixed indentation.
3392 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
3393
7e51098e
TT
33942000-09-07 Tom Tromey <tromey@cygnus.com>
3395
3396 Fix for PR gcj/307:
3397 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
3398 JPRIMITIVE_TYPE_P, for arithmetic operators.
3399 (patch_method_invocation): Indentation fix.
3400 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
3401 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
3402 (do_unary_numeric_promotion): Cleaned up code.
3403 (valid_cast_to_p): Handle boolean correctly.
3404
5beededc
TT
34052000-09-27 Tom Tromey <tromey@cygnus.com>
3406
3407 * lex.c (java_read_unicode): Reset bs_count when finished with
3408 `\u' sequence.
3409
f15b9af9
MM
34102000-10-01 Mark Mitchell <mark@codesourcery.com>
3411
3412 Convert to GC.
3413 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
3414 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
3415 (typeck.o): Depend on ggc.h.
3416 * class.c (add_method_1): Use GC functions for allocation.
3417 (init_class_processing): Register roots.
3418 * decl.c (ggc_p): Set to 1.
3419 (pending_local_decls): Make it static.
3420 (push_jvm_slot): Use GC functions for allocation.
3421 (init_decl_processing): Register roots.
3422 (give_name_to_locals): Use GC functions for allocation.
3423 (lang_mark_tree): New function.
3424 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
3425 functions for allocation.
3426 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
3427 * lex.c (java_lex): Use build_string, rather than replicating it
3428 inline.
3429 * parse.y (goal): Add more roots.
3430 (mark_parser_ctxt): New function.
3431 * typeck.c: Include ggc.h.
f6bbde28 3432
99eaf8d4
APB
34332000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
3434
3435 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
3436 contains something else than MODIFY_EXPR.
3437
19e223db
MM
34382000-09-23 Mark Mitchell <mark@codesourcery.com>
3439
3440 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
3441 * Makefile.in (parse.o): Depend on ggc.h.
3442 (class.o): Likewise.
3443 (constants.o): Likewise.
3444 (decl.o): Likewise.
3445 (expr.o): Likewise.
3446 (jcf-parse.o): Likewise.
3447 (jcf-write.o): Likewise.
3448 (mangle.o): Likewise.
3449 * class.c: Include ggc.h.
3450 (build_static_field_ref): Register GC roots.
3451 (layout_class): Likewise.
3452 (init_class_processing): Likewise.
3453 * constants.c: Include ggc.h.
3454 (current_constant_pool_data_ref): Remove.
3455 (tag_nodes): Move it to ...
3456 (get_tag_node): ... here. Register GC roots.
3457 * decl.c: Include ggc.h. Remove many global tree definitions.
3458 (throw_node): Define.
3459 (java_global_trees): Likewise.
3460 (predef_filenames): Make the size a constant.
3461 (init_decl_processing): Adjust accordingly.
3462 (init_decl_processing): Call init_jcf_parse. Register GC roots.
3463 * expr.c: Include ggc.h.
3464 (init_expr_processing): Register GC roots.
3465 (build_invokeinterface): Likewise.
3466 * java-tree.h: Replace extern tree declarations with macros.
3467 (java_global_trees): New variable.
3468 (java_tree_index): New enumeration.
3469 (init_jcf_parse): Declare.
3470 * jcf-parse.c: Include ggc.h.
3471 (current_class): Remove declaration.
3472 (main_class): Likewise.
3473 (all_class_list): Likewise.
3474 (predefined_filename_p): Adjust for constant size of
3475 predef_filenames.
3476 (init_jcf_parse): New function.
3477 * jcf-write.c: Include ggc.h.
3478 (generate_classfile): Register GC roots.
3479 (append_synthetic_attribute): Likewise.
3480 (append_innerclass_attribute_entry): Likewise.
3481 * lang.c: Include ggc.h.
3482 (lang_print_error): Register GC roots.
3483 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
3484 with macros.
3485 * parse.y: Include ggc.h.
3486 (wfl_operator): Remove.
3487 (goal): Register GC roots.
3488 (java_pop_parser_context): Adjust for new field names.
3489 (java_parser_context_save_global): Likewse.
3490 (java_parser_context_restore_global): Likewise.
3491 (java_parser_context_suspend): Likewise.
3492 (java_parser_context_resume): Likewise.
3493 (verify_constructor_circularity): Register GC roots.
3494 (lookup_cl): Likewise.
3495 (java_reorder_fields): Likewise.
3496 (build_current_this): Likewise.
3497 (class_in_current_package): Likewise.
3498 (argument_types_convertible): Likewise.
3499 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
f6bbde28 3500
4c4b521a
TT
35012000-09-14 Tom Tromey <tromey@cygnus.com>
3502
3503 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
3504
6b8a24cd
TT
35052000-09-13 Tom Tromey <tromey@cygnus.com>
3506
3507 * jcf-parse.c: Include <locale.h>.
3508 * jv-scan.c: Include <locale.h>.
3509
86e4b1e4
TT
35102000-09-12 Tom Tromey <tromey@cygnus.com>
3511
3512 * expr.c (pop_type_0): Return `Object' if trying to merge two
3513 interface types.
3514 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
3515 interface types; `Object' is always a valid supertype.
3516
d19cbcb5
TT
35172000-09-12 Tom Tromey <tromey@cygnus.com>
3518
3519 Fix for PR gcj/33:
3520 * jv-scan.c (help): Document --encoding.
3521 (options): Added `encoding' entry.
3522 (OPT_ENCODING): New define.
3523 (main): Handle --encoding.
3524 Include <langinfo.h> if nl_langinfo exists.
3525 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
3526 --encoding.
3527 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
3528 (parse_source_file): Correctly call java_init_lex. Added `finput'
3529 argument. Use nl_langinfo to determine default encoding.
3530 * java-tree.h (current_encoding): Declare.
3531 * parse.y (java_parser_context_restore_global): Don't restore
3532 `finput'.
3533 (java_parser_context_save_global): Don't set `finput' field.
3534 (java_pop_parser_context): Don't restore `finput'. Free old lexer
3535 if required.
3536 * lang.c (current_encoding): New global.
3537 (lang_decode_option): Recognize `-fencoding='.
3538 (finish_parse): Don't close finput.
3539 * parse.h (struct parser_ctxt): Removed `finput' and
3540 `unget_utf8_value' fields. Added `lexer' field.
3541 (java_init_lex): Fixed declaration.
3542 * lex.c (java_new_lexer): New function.
3543 (java_destroy_lexer): Likewise.
3544 (java_read_char): Added `lex' argument. Handle iconv case.
3545 (java_read_unicode): Added `lex' argument. Count backslashes in
3546 lexer structure.
3547 (java_init_lex): Added `finput' and `encoding' arguments. Set
3548 `lexer' field in ctxp.
3549 (BAD_UTF8_VALUE): Removed.
3550 (java_lex): Handle seeing UEOF in the middle of a string literal.
3551 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
3552 (java_lexer): New structure.
3553 (UNGETC): Removed.
3554 (GETC): Removed.
3555 (DEFAULT_ENCODING): New define.
3556 (java_destroy_lexer): Declare.
3557
ee17a290
TT
35582000-09-12 Tom Tromey <tromey@cygnus.com>
3559
3560 Fix for PR gcj/343:
3561 * lex.c (java_init_lex): Initialize java_io_serializable.
3562 * parse.y (java_io_serializable): New global.
3563 (valid_ref_assignconv_cast_p): An array can be cast to
3564 serializable.
3565
d8ea8f28
ZW
35662000-09-10 Zack Weinberg <zack@wolery.cumb.org>
3567
3568 * decl.c, expr.c: Include defaults.h if not already included.
3569 Don't define the *_TYPE_SIZE macros.
3570
0caae6dd
GK
35712000-09-09 Geoffrey Keating <geoffk@cygnus.com>
3572
3573 * typeck.c (build_java_array_type): Correct first parameter
3574 in ADJUST_FIELD_ALIGN invocation.
3575
f0bee8b3
TT
35762000-09-06 Tom Tromey <tromey@cygnus.com>
3577
3578 * lang-specs.h: Also recognize `-femit-class-files'.
3579
3e99f50c
APB
35802000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
3581
3582 * verify.c (merge_types): Load the types to merge if necessary.
3583
3ca8c9ae
AG
35842000-09-02 Anthony Green <green@redhat.com>
3585
3586 * jcf-io.c: Include zlib.h.
3587 (open_in_zip): Read compressed class file archives.
3588 * zipfile.h (ZipDirectory): Add uncompressed_size and
3589 compression_method fields.
3590 * zextract.c (read_zip_archive): Collect file compression info.
3591
e1d565ab
BM
35922000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
3593
f6bbde28 3594 * parse.y (do_resolve_class): Also explore superclasses of
e1d565ab
BM
3595 intermediate enclosing contexts when searching for inner classes.
3596
29f8b718
APB
35972000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
3598
3599 * parse.y (variable_declarator_id:): Better error message.
3600 (expression_statement:): Use YYNOT_TWICE.
3601 (cast_expression:): Likewise.
3602 (assignment:): Likewise.
3603
354e99ce
APB
36042000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
3605
3606 * parse.y (do_merge_string_cste): New locals. Create new
3607 STRING_CSTs each time, use memcpy. Fixes gcj/311.
3608
7c097ee9
HB
36092000-08-07 Hans Boehm <boehm@acm.org>
3610
3611 * boehm.c (mark_reference_fields): Set marking bits for all words in
3612 a multiple-word record.
3613 (get_boehm_type_descriptor): Use the procedure marking descriptor for
3614 java.lang.Class.
f6bbde28 3615
3d919a0e
MS
36162000-08-31 Mike Stump <mrs@wrs.com>
3617
3618 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
3619 jcf-dump$(exeext)): Make parallel safe.
3620
63ad61ed
ZW
36212000-08-29 Zack Weinberg <zack@wolery.cumb.org>
3622
3623 * jcf-parse.c (set_source_filename): Constify a char *.
3624 * jcf-write.c (append_innerclasses_attribute,
3625 make_class_file_name): Constify a char *. Don't recycle a
3626 variable for an unrelated purpose.
3627 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
3628 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
3629
c00f0fb2
APB
36302000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
3631
3632 * expr.c (can_widen_reference_to): Fixed indentation.
3633 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
3634 * parse.y: `finit$' replaces `$finit$' in comments.
3635 (try_builtin_assignconv): Fixed leading comment.
3636
94574545
GM
36372000-08-25 Greg McGary <greg@mcgary.org>
3638
3639 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
3640
6e2aa220
GM
36412000-08-24 Greg McGary <greg@mcgary.org>
3642
3643 * lang.c (lang_decode_option): Use ARRAY_SIZE.
3644 * parse.y (BINOP_LOOKUP): Likewise.
3645
9b1ee05b
AH
36462000-08-22 Andrew Haley <aph@cygnus.com>
3647
3648 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
3649 sign extending. Fixes gcj/321.
3650 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
3651 combining to make a jlong. Fixes gcj/321.
3652
05a3d06e 36532000-08-21 Nix <nix@esperi.demon.co.uk>
f6bbde28 3654
05a3d06e
N
3655 * lang-specs.h: Do not process -o or run the assembler if
3656 -fsyntax-only.
3657
65f69237
AH
36582000-08-16 Andrew Haley <aph@cygnus.com>
3659
3660 * typeck.c (build_java_array_type): Rewrite code to do array
3661 alignment. Take into account back-end macros when aligning array
3662 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
3663 user to set alignment. Fixes gcj/252 and 160.
3664
2e0f0aff
TT
36652000-08-09 Tom Tromey <tromey@cygnus.com>
3666
1175b9b4
TT
3667 * parse.y (check_abstract_method_definitions): Now return `int'.
3668 Check implemented interfaces. Fixes PR gcj/305.
3669
2e0f0aff
TT
3670 * parse.y (patch_switch_statement): Disallow `long' in switch
3671 expressions. Fixes PR gcj/310.
3672
25bdcbc5
APB
36732000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
3674
3675 * decl.c (finit_leg_identifier_node): New global.
3676 (init_decl_processing): Use `finit$' to initialize
3677 finit_identifier_node. Use `$finit$' to initialize
3678 finit_leg_identifier_node.
3679 * expr.c (expand_java_field_op): Use ID_FINIT_P.
3680 * java-tree.h (finit_identifier_node): Changed attached comment.
3681 (finit_leg_identifier_node): New declaration.
3682 (ID_FINIT_P): Take finit_identifier_node and
3683 finit_leg_identifier_node into account. This is a backward
3684 compatibility hack.
3685
81baa09a
APB
36862000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
3687
3688 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
3689 Jan 6 2000 patch.
3690 (generate_bytecode_insns): Check `nargs' before emitting it.
3691 * verify.c (merge_type_state): Fixed typo.
3692 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
3693 generate_bytecode_{conditional,insns}.
3694
458530ee
AG
3695Sun Aug 13 09:41:49 2000 Anthony Green <green@redhat.com>
3696
3697 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
3698 for -pg builds).
3699
34d4df06
APB
37002000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
3701
3702 * class.c (maybe_layout_super_class): Fixed indentation.
3703 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
3704 (java_check_methods): New function declaration.
3705 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
3706 instead of `str_ptr'.
3707 * jcf-write.c (generate_bytecode_insns): Emit number the of args
3708 of a `invokeinterface' at the right time.
3709 * parse.h (WFL_STRIP_BRACKET): New macro.
3710 (SET_TYPE_FOR_RESOLUTION): Use it.
dba41d30 3711 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
34d4df06
APB
3712 (check_class_interface_creation): Don't check for cross package
3713 innerclass name clashes.
dba41d30 3714 (method_header): Behave properly if MDECL is `error_mark_node'.
34d4df06
APB
3715 (method_declarator): Return `error_mark_node' if bogus current
3716 class.
3717 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
3718 (resolve_and_layout): New local `decl_type', set and used. Call
3719 java_check_methods.
3720 (java_check_methods): New method.
3721 (java_layout_classes): Use it.
3722 (resolve_qualified_expression_name): No EH check necessary in
3723 access$<n>.
3724 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
3725 `case' statement.
3726 (patch_assignment): Set DECL_INITIAL on integral final local.
3727
5f1c312a
APB
37282000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
3729
3730 * java-tree.h (flag_extraneous_semicolon): New extern.
3731 * lang-options.h: (-Wextraneous-semicolon): New option.
3732 * lang.c (flag_redundant): Fixed typo in leading comment.
3733 (flag_extraneous_semicolon): New global.
3734 (lang_decode_option): Set `flag_extraneous_semicolon' when
3735 -Wall. Decode `-Wextraneous-semicolon'.
3736 * parse.y (type_declaration:): Removed `SC_TK' hack, added
3737 `empty_statement' rule.
3738 (class_body_declaration): Likewise.
3739 (method_body:): Accept `;' as a method body.
3740 (static_initializer:): Removed `SC_TK' hack.
3741 (constructor_block_end:): Likewise.
3742 (empty_statement:): Report deprecated empty declaration. Fixes
3743 gcj/295
3744
25bdcbc5 37452000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
f0f3a777
APB
3746
3747 * parse.y (build_dot_class_method_invocation): Changed parameter
dba41d30 3748 name to `type'. Build signature from `type' and convert it to a
f0f3a777
APB
3749 STRING_CST if it's an array.
3750 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
3751 to use `ref_type' directly.
3752
64c04091
OP
3753Sun Aug 6 00:47:24 2000 Ovidiu Predescu <ovidiu@cup.hp.com>
3754
3755 * lang-options.h: Added a comma after the last element to avoid
3756 syntax errors when other languages define additional options.
3757
a36556a8
ZW
37582000-08-04 Zack Weinberg <zack@wolery.cumb.org>
3759
3760 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
3761 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
3762 (jc1): Link with $(BACKEND).
3763 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
3764
50e60bc3
ZW
37652000-08-02 Zack Weinberg <zack@wolery.cumb.org>
3766
37620334
ZW
3767 * jvspec.c: Adjust type of second argument to
3768 lang_specific_driver, and update code as necessary.
3769
50e60bc3
ZW
3770 * class.c (build_dtable_decl): Initialize dummy.
3771
f0f3a777
APB
37722000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
3773
3774 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
3775 method bodies not to rule out discarding `<clinit>'; don't use
3776 <clinit> to initialize static fields with constant initializers.
3777
37782000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
3779
3780 * gjavah.c (print_method_info): Added `synth' parameter. Skip
3781 synthetic methods.
3782 (method_synthetic): New global.
3783 (HANDLE_METHOD): Recognize synthetic method and tell
3784 `print_method_info' about it.
3785 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
3786 processing a synthetic method.
3787 * jcf-reader.c (skip_attribute): New function.
3788 ( skip_attribute): Likewise.
3789
37902000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
3791
3792 * parse.y (build_outer_field_access): Fixed comments.
3793 (fix_constructors): Emit the initialization of this$<n> before
3794 calling $finit$.
3795 (resolve_qualified_expression_name): Build an access to `decl' if
3796 necessary.
3797
37982000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
3799
3800 * parse-scan.y (curent_class): Non longer const.
3801 (inner_qualifier, inner_qualifier_length): Deleted.
3802 (current_class_length): New global.
3803 (bracket_count): Fixed typo in leading comment.
3804 (anonymous_count): New global.
3805 (class_instance_creation_expression:): Handle anonymous classes.
3806 (anonymous_class_creation:): New rule.
3807 (push_class_context): Rewritten.
3808 (pop_class_context): Likewise.
3809 (INNER_QUALIFIER): Macro deleted.
3810 (report_class_declaration): call `push_class_context' when
3811 entering the function. `fprintf' format modified not to use
3812 INNER_QUALIFIER.
3813 (report_class_declaration): Assign `package_name' and
a83f01f0 3814 `current_class' to NULL separately.
f0f3a777
APB
3815
38162000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
3817
3818 * expr.c (build_invokeinterface): Call layout_class_methods on
3819 target interface.
3820
13107ec0 38212000-07-27 Tom Tromey <tromey@cygnus.com>
f6bbde28 3822 Anthony Green <green@cygnus.com>
13107ec0
TT
3823 Alexandre Petit-Bianco <apbianco@cygnus.com>
3824
3825 * class.c (make_class_data): Create vtable for abstract classes.
3826 (get_dispatch_table): Changed to cope with abstract classes.
3827
da632f2c
APB
38282000-07-27 Tom Tromey <tromey@cygnus.com>
3829
3830 * parse.y (patch_method_invocation): Don't reverse the argument
3831 list when dealing with anonymous class constructors. Fixed typo in
3832 comment.
3833
38342000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
3835
3836 * parse.y (build_alias_initializer_parameter_list): Reverse
3837 crafted list when building aliases for anonymous class
3838 constructors.
3839
1e12ab9b
APB
38402000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
3841
3842 * parse.y (jdep_resolve_class): Don't bother checking potential
3843 innerclass access if `decl' is NULL.
3844 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
3845 WFL.
3846
4c31fe99
APB
38472000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
3848
3849 * parse.c: Remove (again.)
3850
1e12ab9b
APB
38512000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
3852
3853 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
3854 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
3855 outside the `if' statement, alias to innerclass removed, `decl'
3856 used to mark the class complete.
3857
f4530f43
APB
38582000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
3859
3860 * parse.y (simple_name:): Fixed typo in error message.
3861
e7c7bcef
APB
38622000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
3863
3864 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
3865 or its first operand can be error marks.
3866
38672000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
3868
3869 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
3870 * parse.y (method_header): Likewise.
3871
02ae6e2e
APB
38722000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
3873
3874 * parse.y (process_imports): Consider that one might be trying to
3875 import an innerclass. Fixes gcj/254
3876
e7c7bcef
APB
38772000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
3878
3879 * parse.y (find_as_inner_class): Handle the case where the
3880 enclosing context of an innerclass has been loaded as bytecode.
3881
4142b247
APB
38822000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
3883
f6bbde28 3884 * parse.y (simple_name:): Reject `$' in type names.
4142b247
APB
3885 (resolve_type_during_patch): Use `type' as a second
3886 argument to resolve_no_layout. Fixes gcj/257.
3887
cab8e2bd
BM
38882000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
3889
f6bbde28 3890 * parse.y (find_most_specific_methods_list): Select the only
cab8e2bd
BM
3891 non-abstract method even if max has been set.
3892 Fixes gcj/285, gcj/298.
3893
ca2875c4
JS
38942000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
3895
3896 * lang-specs.h: Added %(jc1) to java compiler options.
3897
bfbbc080
ZW
38982000-07-14 Zack Weinberg <zack@wolery.cumb.org>
3899
3900 * .cvsignore: New file.
3901
11b26d72
APB
39022000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
3903
3904 * parse.y (not_accessible_p): Access granted to innerclasses
3905 (indirectly) extending the reference type. Fixes gcj/249.
3906
39072000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
3908
3909 * parse.y (patch_method_invocation): Fixed comment.
3910 (maybe_use_access_method): Build this$<n>s to the context of the
3911 target method, or a type that extends it. Fixes gcj/242.
3912
649c9142
MM
39132000-07-13 Mark Mitchell <mark@codesourcery.com>
3914
3915 * parse.c: Remove.
3916
ee97d354
APB
39172000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
3918
3919 * parse.y (fold_constant_for_init): Avoid bullish conversion.
3920
44fadf1e
TT
39212000-07-13 Tom Tromey <tromey@cygnus.com>
3922
3923 * lang-specs.h: Added %{I*}.
3924
ea414c97
ZW
39252000-07-13 Zack Weinberg <zack@wolery.cumb.org>
3926
3927 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
3928
792abd35
MM
39292000-07-12 Mark Mitchell <mark@codesourcery.com>
3930
3931 * parse-scan.c: Remove.
3932
11b26d72
APB
39332000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
3934
3935 * class.c (set_super_info): Handled protected inner classes.
3936 (common_enclosing_context_p): Bail early if arguments aren't both
3937 inner classes.
3938 (get_access_flags_from_decl): Handle private and protected inner
3939 classes.
3940 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
3941 (CLASS_PROTECTED): Likewise.
dba41d30 3942 (struct lang_type): New bitfield `poic'.
11b26d72
APB
3943 * parse.y (jdep_resolve_class): Call check_inner_class_access on
3944 inner classes only.
3945 (check_inner_class_access): Renamed arguments, added
3946 comments. Handles protected inner classes (fixes gcj/225)
3947 (not_accessible_p): Fixed comments. Avoid handling inner classes.
3948
39492000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
3950
3951 * parse.y (resolve_qualified_expression_name): Verify qualified
dba41d30 3952 access to `this'. Fixes gcj/239.
11b26d72 3953
e67eb1a0 39542000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
2f2bd00a 3955
e67eb1a0
APB
3956 * jcf-write.c (generate_classfile): Don't install ConstantValue
3957 for null pointers.
2f2bd00a 3958
11b26d72
APB
39592000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
3960
3961 * parse.y (resolve_qualified_expression_name): Handle inner class
3962 access. Fixes gcj/256.
3963
629d4b4d
APB
39642000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
3965
3966 * jcf-write.c (generate_classfile): Properly install the
3967 ConstantValue attribute and the initial value constant pool index
3968 on string constants.
3969 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
3970 class files.
3971
0c2b8145
APB
39722000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
3973
3974 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
3975 construct.
3976 * parse.y (find_as_inner_class): Fixed typo.
3977 (do_resolve_class): Explore enclosing contexts when searching for
3978 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
3979 (check_inner_class_access): Check `decl' which can be null in case
3980 of previous errors.
3981
39822000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
3983
dba41d30 3984 * java-tree.h (java_debug_context): Declared `extern'.
0c2b8145
APB
3985 (safe_layout_class): Likewise.
3986 * parse.y (resolve_field_access): Field must be `static' in order
3987 to be replaced by its initial value. Added comments.
3988 (find_applicable_accessible_methods_list): Fixed typo.
3989 (find_most_specific_methods_list): Methods found in innerclasses
3990 take over methods founds in the enclosing contexts.
3991 (java_complete_tree): Loosen restrictions on the type of DECLs
3992 that can be replaced by their initialization values.
dba41d30 3993 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
0c2b8145 3994
0267da64
TT
39952000-07-05 Tom Tromey <tromey@cygnus.com>
3996
3997 * Make-lang.in (PARSE_DIR): New macro.
3998 (PARSE_RELDIR): Likewise.
3999 (PARSE_C): Likewise.
4000 (PARSE_SCAN_C): Likewise.
4001 ($(PARSE_C)): New target.
4002 ($(PARSE_SCAN_C)): Likewise.
4003 (SET_BISON): New macro.
4004 (BISONFLAGS): Likewise.
4005 (JAVABISONFLAGS): Likewise.
4006
1bbee75b
BM
40072000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
4008
f6bbde28
ZW
4009 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
4010 argument on the first pass for CNI as well as JNI.
4011 (print_method_info): Set up method name on the first pass only.
4012
98a52c2c
APB
40132000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4014
4015 * parse.y (parser_qualified_classname): Removed parameter
4016 `is_static'.
4017 (create_interface): Removed first passed parameter to
4018 parser_qualified_classname.
4019 (create_class): Likewise. Don't install alias on static
4020 innerclasses. Fixes gcj/275.
4021
40222000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4023
4024 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
4025 debugable statement with empty_stmt_node. Fixes gcj/272
4026
40272000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4028
4029 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
4030 gcj/271.
4031
c1c8f8cc
APB
40322000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
4033
4034 * jcf-write.c (push_long_const): Appropriately cast short negative
4035 constant to jword.
4036
cf1b2274
APB
40372000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
4038
4039 * parse.y (verify_constructor_super): Use loop variable
4040 `m_arg_type' initialized with `mdecl_arg_type'.
4041
6eaeeb55
TT
40422000-06-29 Tom Tromey <tromey@cygnus.com>
4043
4044 * parse.y (resolve_field_access): Handle case where `type_found'
4045 is NULL.
4046
18ee3d5e
APB
40472000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
4048
4049 * expr.c (lookup_field): The same field can be found through two
4050 different interface. Don't declare it ambiguous in that case.
4051
61d5c158
TT
40522000-06-27 Tom Tromey <tromey@cygnus.com>
4053
4054 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
4055 follows \r, then unget it at a lower level.
4056
70541f45
TT
40572000-06-26 Tom Tromey <tromey@cygnus.com>
4058
4059 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
4060 java_complete_tree.
4061
774d2baf
TT
40622000-06-25 Tom Tromey <tromey@cygnus.com>
4063
4064 * parse.y (for_statement): Wrap expression in a WFL if it is a
4065 constant. For PR gcj/268.
4066
d6baf6f5
APB
40672000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
4068
4069 * parse.y (do_resolve_class): Minor optimiztion in the package
17126208 4070 list search. Removed unnecessary test and return statement.
d6baf6f5
APB
4071 (valid_ref_assignconv_cast_p): Order of arguments to
4072 enclosing_context_p fixed.
4073
120f0c10
TT
40742000-06-24 Tom Tromey <tromey@cygnus.com>
4075
ae4a4c88
TT
4076 * expr.c (lookup_field): Print error and return error_mark_node if
4077 field reference is ambiguous.
4078
120f0c10
TT
4079 * parse.y (check_abstract_method_definitions): Also check if
4080 `other_method' is abstract.
4081
cf1748bf
APB
40822000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
4083
4084 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
4085 classes.
4086 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
dba41d30 4087 (struct lang_type): New field `pic'.
cf1748bf
APB
4088 (CLASS_PRIVATE): New macro.
4089 * parse.y (check_inner_class_access): New function.
4090 (jdep_resolve_class): Call it.
4091
f1ff439a
TT
40922000-06-23 Tom Tromey <tromey@cygnus.com>
4093
4094 * parse.y (patch_incomplete_class_ref): Initialize the returned
4095 class. For PR gcj/260.
4096
9a7ab4b3
APB
40972000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
4098
4099 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
4100
41012000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
4102
4103 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
4104 Java specific checks.
4105 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
4106 screened by DECL_P.
4107 * java-tree.def (CASE_EXPR): Marked 'e'.
4108 (DEFAULT_EXPR): Likewise.
4109 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
4110 screened by DECL_P.
4111 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
4112 Java specific checks.
4113 (generate_bytecode_insns): Test try_block for BLOCK before using
4114 BLOCK_EXPR_BODY.
4115 * parse.y (build_wfl_wrap): Added `location' argument. Set
4116 EXPR_WFL_LINECOL accordingly.
4117 (dim_expr:): Wrap constants with WFLs.
4118 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
4119 (resolve_package): Check for `stmt' not being a BLOCK before
4120 building a debuggable statement with it.
4121 (make_qualified_primary): Added extra parameter to build_wfl_wrap
4122 invocation.
4123 (resolve_field_access): Make sure `decl' is a DECL before treating
4124 it as such.
4125 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
4126 IDENTIFIER_NODE before treating it as such.
4127 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
4128 treating it as such.
4129 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
4130 to be applied only on non array types.
4131
41322000-06-16 Per Bothner <per@bothner.com>
4133
4134 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
4135 define in terms of DECL_RESULT, as that fails when --enable-checking.
f6bbde28 4136
ffb1f63d
KG
41372000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4138
4139 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
4140 types the same in comparison.
4141 (CHECK_OP): Add static prototype.
4142
11cf4d18
JJ
41432000-06-13 Jakub Jelinek <jakub@redhat.com>
4144
4145 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
4146 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
4147 * parse.c: Rebuilt.
4148
5ac9118e
KG
41492000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4150
4151 * decl.c (create_primitive_vtable): Prototype.
4152
4153 * jcf-write.c (generate_bytecode_insns): Initialize variable
4154 `saved_context'.
4155
4156 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
4157
ad69b5b6
BM
41582000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
4159
4160 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
4161 to track searched classes, and do not search the same class more than
4162 once. Call find_applicable_accessible_methods_list on immediate
4163 superclass, instead of search_applicable_method_list on all ancestors.
4164 Fix for PR gcj/238.
4165
cf1748bf
APB
41662000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
4167
4168 * parse.y (register_fields): Permit static fields in inner classes
4169 if they are final. Fix for PR gcj/255.
4170
9a7ab4b3
APB
41712000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
4172
4173 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
4174 * parse.y (find_in_imports): Returned type changed to void,
4175 leading comment fixed.
4176 (register_package): New function.
4177 (qualify_and_find): Likewise.
4178 (package_declaration:): Use `register_package'.
4179 (single_type_import_declaration:): Removed local variable
4180 `node'. Added missing `;' for consistency.
4181 (type_import_on_demand_declaration:): Use `chainon' to link new
4182 entries.
4183 (lookup_field_wrapper): Lookup local variables defined in outer
4184 contexts first.
4185 (java_complete_class): Don't reverse the list of imported on demand.
4186 (do_resolve_class): Reorganized. Removed local variable
4187 `original_name'. Call `qualify_and_find' with the current package
4188 name, invoke `find_in_imports_on_demand' right after. Call
4189 `qualify_and_find' with the packages we've seen so far. Fixed
4190 operations numbering in comments.
4191 (java_expand_class): Don't reverse `package_list'.
4192 (find_most_specific_methods_list): New local variables `abstract'
4193 and `candidates'. Use them to pick the right method.
4194
14d075d8
TT
4195Tue Jun 6 11:39:05 2000 Tom Tromey <tromey@ferrule.cygnus.com>
4196
4197 * parse.y (check_modifiers_consistency): Don't subtract out
4198 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
4199
603832a0
PT
42002000-06-04 Philipp Thomas <pthomas@suse.de>
4201
4202 * Makefile.in (INTLLIBS): New.
4203 (LIBS): Add above.
4204 (DEPLIBS): Ditto.
4205
8f975c18
APB
4206Fri Jun 2 16:48:55 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
4207
4208 * class.c (get_dispatch_table): Build the vtable dummy entry list
e64c46ce 4209 element with a null purpose. Fixed leading comment.
8f975c18 4210 (build_dtable_decl): Build an accurate dtable type when appropriate
e64c46ce 4211 and use it.
8f975c18 4212
2e761e49
RH
42132000-06-02 Richard Henderson <rth@cygnus.com>
4214
4215 * lang.c (lang_get_alias_set): New.
4216
0f145be8
APB
42172000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
4218
4219 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
4220 before using it as the accessed field.
4221
2771fe54
TT
42222000-05-31 Tom Tromey <tromey@cygnus.com>
4223
4224 * java-tree.h (boolean_array_vtable, byte_array_vtable,
4225 char_array_vtable, short_array_vtable, int_array_vtable,
4226 long_array_vtable, float_array_vtable, double_array_vtable):
4227 Declare.
4228 * expr.c (get_primitive_array_vtable): New function.
4229 (create_primitive_vtable): New function.
4230 (java_lang_expand_expr): Enable code to statically generate
4231 arrays.
4232 * decl.c (init_decl_processing): Create primitive vtables.
4233 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
4234 short_array_vtable, int_array_vtable, long_array_vtable,
4235 float_array_vtable, double_array_vtable): Define.
4236
30a3caef
ZW
42372000-05-26 Zack Weinberg <zack@wolery.cumb.org>
4238
4239 * java/parse.y (find_applicable_accessible_methods_list):
4240 Don't add an uninitialized value to the list.
4241
b8c5b1c6
TT
42422000-05-25 Tom Tromey <tromey@cygnus.com>
4243
40aaba2b
TT
4244 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
4245 when trying to see if field's class should be initialized. Always
4246 initialize field's declaring class, not qualified class.
4247 For PR gcj/162.
4248
b8c5b1c6
TT
4249 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
4250 `wfl_operator', to maybe_build_primttype_type_ref.
4251 Fixes PR gcj/235.
4252
6518c7b5
BM
42532000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
4254
4255 * parse.y (patch_method_invocation): Don't try to lookup methods
4256 in primitive types.
4257
611a4b87
APB
42582000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
4259
4260 * parse.y (resolve_field_access): Call the appropriate <clinit>
4261 before accessing the length of a static array. Craft a decl for
4262 the field while its time. Fixes PR gcj/129.
f6bbde28 4263
6b48deee
APB
42642000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4265
4266 * parse.y (resolve_package): Correctly set `*next' (was off by
4267 one.)
4268 (resolve_qualified_expression_name): Fixed comment.
4269
0ba154aa
APB
4270Thu Apr 27 17:47:34 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
4271
f6bbde28 4272 * jcf-parse.c (jcf_parse_source): Reset current_class and
e64c46ce 4273 current_function_decl to NULL before parsing a new file.
0ba154aa 4274
c280e37a
APB
4275Thu Apr 27 17:25:33 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
4276
4277 * parse.y (block_end:): If the collected block doesn't feature a
e64c46ce 4278 statement, insert an empty statement.
c280e37a 4279
92d83515
APB
42802000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
4281
f6bbde28
ZW
4282 * parse.y (maybe_yank_clinit): New function.
4283 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
4284 end of the list of methods belonging to a class.
4285 (java_complete_expand_method): Check whether <clinit> is really
4286 necessary and expand it accordingly.
92d83515 4287
ec5bb3cf
APB
42882000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
4289
4290 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
4291 processed by the method's switch statement.
4292
67db0ce7
TT
42932000-05-19 Tom Tromey <tromey@cygnus.com>
4294
4295 * java-tree.h: Added init state enum.
4296 * decl.c (emit_init_test_initialization): Initialize class
4297 initialization check variable by looking at class' state.
4298
43490bec
TT
42992000-05-19 Tom Tromey <tromey@cygnus.com>
4300
4301 * java-tree.h (build_instanceof): Declare.
4302 (build_get_class): Declare.
4303 * parse.y (patch_binop): Use build_instanceof.
4304 * expr.c (build_instanceof): New function. If class is final,
4305 don't make a function call.
4306 (expand_java_INSTANCEOF): Use it.
4307 (build_get_class): New function.
4308
062edaed
AO
43092000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
4310
4311 * jcf-write.c (generate_classfile): Scan the source_file for
4312 slashes with the right pointer variable.
4313
078721e1
AC
4314Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
4315
4316 * lang.c (lang_decode_option): Update -Wunused flags by calling
e64c46ce 4317 set_Wunused.
078721e1
AC
4318 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
4319
46543024 43202000-05-09 Zack Weinberg <zack@wolery.cumb.org>
3b304f5b
ZW
4321
4322 * check_init.c (check_init): Constify local char *.
4323 * class.c (push_class): Constify local char *.
4324 * java_tree.h: Update prototypes.
4325 * jcf-io.c (open_class): Constify filename parameter and
4326 return value.
4327 (find_class): Remove redundant string copy. Cast return from
4328 open_class.
4329 * jcf-parse.c (read_class, parse_class_file, yyparse):
4330 Constify local char *.
4331 * jcf-write.c (generate_bytecode_insns, generate_classfile):
4332 Constify local char *.
4333 * jcf.h (JCF): Constify filename and classname.
4334 (JCF_FINISH): Cast args to FREE to char * when appropriate.
4335 * lang.c (init_parse): Constify parameter and return value.
4336 * lex.c (java_get_line_col): Constify filename parameter.
4337 * parse.h: Constify parser_ctxt.filename. Update prototypes.
4338 * parse.y (java_parser_context_suspend,
4339 issue_warning_error_from_context, safe_layout_class): Constify
4340 local char *.
4341 * parse.c: Regenerate.
4342
4c6a8973
TT
43432000-05-08 Tom Tromey <tromey@cygnus.com>
4344
4345 * expr.c (build_jni_stub): Cache the result of
4346 _Jv_LookupJNIMethod.
4347
e117276e
APB
43482000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
4349
4350 * decl.c (predef_filenames_size): Now 7.
4351 (predef_filenames): New seventh entry.
4352
652f2504
TT
43532000-05-04 Tom Tromey <tromey@cygnus.com>
4354
4355 * boehm.c (mark_reference_fields): Don't mark RawData fields.
4356 Keep track of when we've seen a reference field after a
4357 non-reference field.
4358 (get_boehm_type_descriptor): Handle case where we see
4359 non-reference fields but no trailing reference field.
4360 * decl.c (rawdata_ptr_type_node): Define.
4361 (init_decl_processing): Initialize rawdata_ptr_type_node.
4362 * java-tree.h (rawdata_ptr_type_node): Declare.
4363
ccedaff3
KG
43642000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4365
4366 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
4367 specifiers in calls to fprintf.
4368
dd5d6281
TT
43692000-05-03 Andrew Haley <aph@cygnus.com>
4370
4371 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
4372
4373 * javaop.h (WORD_TO_INT): New function.
4374 (IMMEDIATE_s4): Use WORD_TO_INT.
4375 * jcf.h (JPOOL_INT): Ditto.
4376
4377 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
4378 separator.
4379
dd5d6281 43802000-04-19 Tom Tromey <tromey@cygnus.com>
7145d9fe
TT
4381
4382 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
4383 on native function.
4384 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
4385 JNI methods.
4386 * expr.c (build_jni_stub): New function.
4387 * lang-specs.h: -fjni and -femit-class-file are incompatible.
4388 * parse.c: Rebuilt.
4389 * parse.y (java_complete_expand_methods): Expand a native method
4390 and call build_jni_stub if -fjni given.
4391 * lang-options.h: Document -fjni.
4392 * lang.c (flag_jni): New global.
4393 (lang_f_options): Added `jni' entry.
4394 * java-tree.h (soft_lookupjnimethod_node,
4395 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
4396 Declare.
4397 (flag_jni): Declare.
4398 (build_jni_stub): Declare.
4399 (struct lang_decl): Added `native' flag.
4400 (METHOD_NATIVE): Redefined to use `native' field of lang specific
4401 structure.
4402 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
4403 soft_jnipopsystemframe_node): New globals.
4404 (init_decl_processing): Set them. _Jv_InitClass only takes one
4405 argument.
4406
4407 * java-tree.def: Put into `C' mode.
4408
e815887f
TT
44092000-04-27 Tom Tromey <tromey@cygnus.com>
4410
4411 Fix for PR gcj/2:
4412 * expr.c (expand_invoke): Generate check to see if object pointer
4413 is null in nonvirtual invocation case.
4414 * java-tree.h (soft_nullpointer_node): Declare.
4415 * decl.c (soft_nullpointer_node): New global.
4416 (init_decl_processing): Initialize soft_nullpointer_node.
4417 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
4418 or `private' methods.
4419 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
4420
ad81223c
APB
4421Wed Apr 26 14:29:33 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
4422
4423 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
e64c46ce 4424 from <clinit>
ad81223c 4425
f1acc01e
TT
44262000-04-26 Tom Tromey <tromey@cygnus.com>
4427
4428 * zextract.c (find_zip_file_start): New function.
4429 (read_zip_archive): Use it.
4430
e803d3b2
APB
44312000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
4432
4433 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
4434
152de068
APB
44352000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
4436
4437 * class.c (common_enclosing_context_p): New function.
4438 * java-tree.h (common_enclosing_context_p): Added prototype.
4439 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
4440 classes sharing an outer context with the current instance.
4441 * parse.y (build_access_to_thisn): Fixed leading comment.
4442 (verify_constructor_super): New local `supper_inner'. Skip
4443 enclosing context argument in the case of inner class constructors.
4444 (patch_method_invocation): Insert proper context as second
4445 parameter to pure inner class constructor super invocations.
4446
93220702
APB
4447Mon Apr 24 14:59:36 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
4448
4449 * parse.y (end_class_declaration): Reset the interface number
e64c46ce 4450 counter.
93220702 4451
dfb99c83
APB
44522000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
4453
17126208 4454 * parse.y (source_start_java_method): Deleted unnecessary code.
f6bbde28 4455 (patch_method_invocation): Fixed comment.
dfb99c83 4456
e60a8c26
RL
44572000-04-24 Robert Lipe <robertlipe@usa.net>
4458
4459 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
4460
3c8c10b8
TT
44612000-04-23 Tom Tromey <tromey@cygnus.com>
4462
4463 * boehm.c (mark_reference_fields): Use int_byte_position.
4464
8a008c41
TT
44652000-04-22 Tom Tromey <tromey@cygnus.com>
4466
4467 * boehm.c (mark_reference_fields): Only call byte_position on
4468 non-static fields.
4469
d5f76aba
TT
44702000-04-22 Tom Tromey <tromey@cygnus.com>
4471
4472 * boehm.c (mark_reference_fields): Added `last_view_index'
4473 argument. Use DECL_FIELD_OFFSET to determine field's offset.
4474
a40d21da
APB
4475Thu Apr 20 17:41:28 2000 Mo DeJong <mdejong@cygnus.com>
4476
4477 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
4478 * parse.y (check_class_interface_creation): Fixed comments. Select
e64c46ce
AJ
4479 permitted modifiers for (inner) interfaces. Changed error message
4480 to report rejected modifiers used with local classes.
a40d21da
APB
4481
44822000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
4483
4484 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
4485 of directly inherited type considered in scope.
4486 * parse.y (do_resolve_class): Search inherited classes for inner
4487 classes.
4488
473e7b07
TT
44892000-04-20 Tom Tromey <tromey@cygnus.com>
4490
4491 * parse.y (not_accessible_p): Use member's class, not current
4492 class, when doing inheritance check for protected reference.
4493 Fixes PR gcj/124.
4494
c52fbf0f
JS
4495Thu Apr 20 18:20:58 2000 Jason Schroeder <shrode@subnature.com>
4496
4497 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
4498
f2760b27
APB
44992000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
4500
4501 * parse.y (lookup_field_wrapper): Search for final local aliases.
4502 (resolve_expression_name): Let lookup_field_wrapper search for
4503 final local aliases. Force the value of `name' if one is found.
4504 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
4505 an expression name. Fixed comments.
4506
807bc1db
APB
45072000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
4508
4509 * parse.y (yyerror): `msg' can be null, don't use it in that case.
4510
ecb36604
TT
45112000-04-19 Tom Tromey <tromey@cygnus.com>
4512
4513 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
4514
48a840d9
APB
45152000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
4516
4517 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
4518
83c1f628
TT
45192000-04-18 Tom Tromey <tromey@cygnus.com>
4520
4521 PR gcj/211:
4522 * gjavah.c (utf8_cmp): Changed return value.
4523 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
4524 result.
4525 (cxx_keywords): New global.
4526 (get_field_name): Handle new result of cxx_keyword_subst.
4527 (print_method_info): Likewise.
4528
a7384840
BM
45292000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
4530
f6bbde28 4531 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
a7384840 4532 with a newline, for CNI.
f6bbde28 4533 (print_stub_or_jni): Print a space or newline before method name for
a7384840
BM
4534 CNI as well as JNI.
4535 (print_cxx_classname): Don't write leading "::" in CNI stub method.
f6bbde28 4536 (process_file): Include gcj/cni.h if generating CNI stubs.
a7384840 4537
3e0768f0
TT
45382000-04-16 Tom Tromey <tromey@cygnus.com>
4539
4540 * gjavah.c (decompile_method): Use print_field_name.
4541 Fixes PR gcj/205.
4542
48a840d9
APB
45432000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
4544
4545 * parse.y (java_expand_classes): Reverse the package list once.
4546 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
4547 reduction.
4548 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
4549 the `==' and `!=' operators.
4550
cedea510
APB
45512000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
4552
4553 * jcf-write.c (generate_bytecode_insns): At invokation time,
4554 always relate an interface method to the type of its selector.
f6bbde28 4555
e803d3b2
APB
45562000-04-05 Tom Tromey <tromey@cygnus.com>
4557
4558 Fix for PR gcj/2:
4559 * expr.c (expand_invoke): Generate check to see if object pointer
4560 is null in nonvirtual invocation case.
4561 * java-tree.h (soft_nullpointer_node): Declare.
4562 * decl.c (soft_nullpointer_node): New global.
4563 (init_decl_processing): Initialize soft_nullpointer_node.
4564 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
4565 or `private' methods.
4566 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
4567
bc2874c9
TT
45682000-04-05 Tom Tromey <tromey@cygnus.com>
4569
4570 Fix for PR gcj/140:
4571 * parse.y (check_final_assignment): Recognize assignments to the
4572 `length' field of an array when generating class files.
4573
256172c4
APB
45742000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
4575
4576 * class.c (decl_hash): Prototype removed.
4577 (decl_compare): Likewise.
4578
e0fc4118
TT
45792000-04-05 Tom Tromey <tromey@cygnus.com>
4580
4581 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
4582 * parse.y (check_modifiers_consistency): Check for final/volatile
4583 clash. Fixes PR gcj/164.
4584
e0422ed0
APB
45852000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
4586
4587 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
4588 made global.
4589 (java_hash_compare_tree_node): Renamed from `decl_compare, made
4590 global.
4591 (add_method_1): Use `java_hash_hash_tree_node' and
4592 `java_hash_compare_tree_node'.
4593 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
4594 (java_hash_compare_tree_node): Likewise.
4595 * parse.y (find_applicable_accessible_methods_list): Create,
4596 delete and use a hash table to remember already searched interfaces.
4597
4200941b
MW
45982000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
4599
4600 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
4601 with latest entry.
4602
c0b864fc
KG
46032000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4604
4605 * boehm.c (mark_reference_fields, set_bit): Prototype.
4606 (set_bit): Un-ANSI-fy definition.
4607
4608 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
4609 Prototype.
4610
4611 * decl.c (emit_init_test_initialization): Likewise.
4612
4613 * gjavah.c (jni_print_char): Likewise.
4614
4615 * parse.y (create_new_parser_context): Likewise.
4616
7a678b64 4617Thu Mar 30 15:26:56 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
64ea4a5e
APB
4618
4619 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
4620 patch missing hunk. Fixed indentation.
4621
05411ecf
TT
46222000-03-30 Tom Tromey <tromey@cygnus.com>
4623
4624 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
4625 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
4626
acbedd7c
APB
46272000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
4628
4629 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
4630 when negative *before* using it as an array index.
4631 * ChangeLog: Fixed typo.
4632
0981a859
APB
46332000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
4634
4635 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
4636 to 0 when it reaches -1.
4637
46382000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
4639
4640 * jcf-parse.c (get_constant): Properly cast `num' during the
acbedd7c 4641 invocation of `add_double'.
0981a859
APB
4642 * jcf-write.c (push_long_const): Properly cast `lo' before
4643 comparing it to short bounds.
4644 * parse-scan.y (interface_declaration:): Rule re-arrange so that
4645 `interface_body:' is reduced after the current interface is
4646 pushed.
4647
a843e0ce
TT
46482000-03-26 Tom Tromey <tromey@cygnus.com>
4649
4650 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
4651 Java-specific `-f' option.
4652
ad41cc2a
RK
4653Sun Mar 26 11:37:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4654
4655 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
4656 Adjust order of making types.
4657 Make bitsize_*_node values.
4658
770ae6cc
RK
4659Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4660
4661 * class.c (make_field_value): Use byte_position.
4662 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
4663 (java_array_data_offset): Likewise.
4664 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
4665 bzero call.
4666
165f37bc
APB
46672000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
4668
4669 * parse.y (check_abstract_method_definitions): New local
4670 `end_type_reached'. Make sure we also consider `end_type'.
0981a859
APB
4671 (java_check_abstract_method_definitions): Make sure we eventually
4672 consider `java.lang.Object'.
4673 (maybe_use_access_method): Don't use access method if not in the
4674 context of a pure inner class or if the method's context is right.
4675 (find_applicable_accessible_methods_list): New static flag
165f37bc 4676 `object_done'. Don't search abstract classes as interfaces. Fixed
0981a859
APB
4677 indentation. Fixed the `java.lang.Object' only search. Search
4678 class interface(s) first, then fully search enclosing contexts.
4679 (find_most_specific_methods_list): Pick the closest candidate when
165f37bc
APB
4680 they're all abstract.
4681
124906f9
APB
4682Mon Mar 20 08:58:51 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
4683
4684 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
dba41d30 4685 properly initialize `finished_label'. Don't emit gotos for empty
124906f9
APB
4686 try statements.
4687
c14f7160
ML
4688