]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/java/ChangeLog
Index: ChangeLog
[thirdparty/gcc.git] / gcc / java / ChangeLog
CommitLineData
6d9f628e
GK
12002-08-04 Geoffrey Keating <geoffk@redhat.com>
2
3 * class.c: (permanent_obstack): Delete declaration.
4 * constants.c: (permanent_obstack): Delete declaration.
5 * except.c: (permanent_obstack): Delete declaration.
6 * expr.c: (permanent_obstack): Delete declaration.
7 * jcf-parse.c: (permanent_obstack): Delete declaration.
8 (saveable_obstack): Delete declaration.
9 * parse.h: (permanent_obstack): Delete declaration.
10 * typeck.c: (permanent_obstack): Delete declaration.
11
d500c5d7
JM
122002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
13
14 * gcj.texi (version-gcc): Increase to 3.3.
15
e75abdab
TT
162002-07-22 Tom Tromey <tromey@redhat.com>
17
18 * lex.c (java_lex): Check for `e' or `E' after 0.
19
8943a0b4
RH
202002-07-21 Richard Henderson <rth@redhat.com>
21
22 * lang.c (java_unsafe_for_reeval): New.
23 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
24
2f8dd115
NB
252002-07-21 Neil Booth <neil@daikokuya.co.uk>
26
27 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
28 (jcf_path_init): Use GET_ENVIRONMENT.
29
c5358a5d
RS
302002-07-10 Roger Sayle <roger@eyesopen.com>
31 Zack Weinberg <zack@codesourcery.com>
32
33 * builtins.c (initialize_builtins): Remove defines that
34 handled C/C++ specific junk hereby removed from builtins.def.
35
5351f1ca
NB
362002-07-07 Neil Booth <neil@daikokuya.co.uk>
37
38 * lang.c (java_post_options): Update prototype.
39
df061a43
RS
402002-07-05 Roger Sayle <roger@eyesopen.com>
41
c5358a5d 42 * builtins.c (initialize_builtins): Ignore the additional
df061a43
RS
43 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
44 the builtins.def file.
45
68a830fe
TT
462002-07-01 Tom Tromey <tromey@redhat.com>
47
48 For PR libgcj/7073:
49 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
50 specially.
51
6a2dd09a
RS
522002-07-01 Roger Sayle <roger@eyesopen.com>
53
54 * java/decl.c (builtin_function): Accept additional parameter.
55 (java_init_decl_processing): Pass an additional NULL_TREE
56 argument to builtin_function.
57
32c4621e
M
582002-06-29 T.J. Mather <tjmather@maxmind.com>
59
60 * gcj.texi: Fixed gcj invocation example so that it compiles.
61
bd466c7b
KG
622002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
63
57ddd19c
KG
64 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
65 * parse.y (mark_parser_ctxt): Likewise.
33780b45
KG
66 (check_modifiers, declare_local_variables): Avoid incorrect
67 hardcoded constant 10.
57ddd19c 68
bd466c7b
KG
69 * lex.c (java_read_char): Avoid "comparison is always true"
70 warning.
71
b6532e57
AS
722002-06-25 Andreas Schwab <schwab@suse.de>
73
74 * expr.c (JSR): Avoid undefined operation on PC.
75
eb6b51b9
KG
762002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
77
78 * decl.c (clear_binding_level): Const-ify.
79
6d61f1bd
AD
802002-06-13 Akim Demaille <akim@epita.fr>
81
82 * parse.y (class_declaration, interface_declaration): Make sure
83 all their rules have an action, in order to avoid meaningless `$$
84 = $1' and their type clashes.
85
c6226a7e
TT
862002-06-11 Tom Tromey <tromey@redhat.com>
87
88 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
89 * parse-scan.y (statement_without_trailing_substatement): Added
90 assert_statement.
91 (assert_statement): New rule.
92 * java-tree.h (struct lang_type) [assertions]: New field.
93 (TYPE_USES_ASSERTIONS): New macro.
94 (CLASS_USES_ASSERTIONS): Likewise.
95 (FIELD_SYNTHETIC): New define.
96 * lex.c (java_lval;): Added ASSERT_TK.
97 * parse.y (ASSERT_TK): Added.
98 (statement_without_trailing_substatement): Added assert_statement.
99 (assert_statement): New rule.
100 (build_assertion): New function.
101 (maybe_generate_pre_expand_clinit): Create and initialize
102 $assertionsDisabled.
103 (lookup_package_type): Removed decl.
104 * keyword.h: Rebuilt.
105 * keyword.gperf (assert): New token.
106
e35b68b0
AD
1072002-06-10 Akim Demaille <akim@epita.fr>
108
109 * parse.y (interface_type_list, class_member_declaration)
110 (unary_expression_not_plus_minus): Remove duplicate %type.
111 Whitespace changes.
112
950ac1d3
TT
1132002-06-09 Tom Tromey <tromey@redhat.com>
114
ac57655a
TT
115 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
116
950ac1d3
TT
117 * parse.y (method_header): Give error message in all cases.
118 Fixes PR java/6865.
119
36d010ca
BM
1202002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
121
122 Don't use RTL inlining. Fix for PR java/6820.
123 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
124 (flag_really_inline): New.
125 (java_decode_option): Set flag_really_inline if -finline-functions
126 is seen.
127 (java_post_options): New function. Turn off inlining unless
128 flag_really_inline is set.
129
64e68197
BM
1302002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
131
132 * gjavah.c (throwable_p): Accept argument as either a classname or
133 signature fragment. Create null-terminated classname string for super
134 when calling itself recursively.
135 (decode_signature_piece): Skip first character from class name
136 signature when calling throwable_p.
137
c238d806
L
1382002-06-08 H.J. Lu (hjl@gnu.org)
139
140 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
141
f06cafdf
TT
1422002-06-04 Tom Tromey <tromey@redhat.com>
143
144 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
145
0bb5f0e4
MK
1462002-06-04 Michael Koch <konqueror@gmx.de>
147
148 * gcj.texi (Input Options): Fixed typo.
149
c02ebb18
ZW
1502002-06-04 Zack Weinberg <zack@codesourcery.com>
151
152 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
153 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
154 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
155 and all now-pointless local variables. Rename other local
156 variables to reflect their not being handles.
157
158 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
159 #if JCF_USE_STDIO blocks.
160
161 * parse.y: Add missing semicolon at end of rule.
162
e2500fed
GK
1632002-06-03 Geoffrey Keating <geoffk@redhat.com>
164
165 * check-init.c (attach_initialized_static_class): Delete, unused.
166 * parse.y: Use htab_t instead of struct hashtable, update
167 all uses.
168 * java-tree.h: Include hashtab.h instead of hash.h.
169 (struct lang_decl_func): Use htab_t, set up for gengtype.
170 (struct init_test_hash_entry): Delete.
171 (struct treetreehash_entry): New.
c02ebb18 172 (java_treetreehash_find): New
e2500fed
GK
173 (java_treetreehash_new): New prototype.
174 (java_treetreehash_create): New prototype.
175 (java_mark_tree): Delete prototype.
176 (java_hash_hash_tree_node): Delete prototype.
177 (java_hash_compare_tree_node): Delete prototype.
178 (attach_initialized_static_class): Delete prototype.
179 * expr.c (build_class_init): Update to use java_treetreehash
180 functions.
181 (java_expand_expr): Update to use htab_t.
182 (emit_init_test_initialization): Likewise.
183 * decl.c (java_mark_tree): Delete.
184 * class.c (init_test_hash_newfunc): Delete.
185 (java_hash_hash_tree_node): Delete.
186 (java_hash_compare_tree_node): Delete.
187 (add_method_1): Update to use java_treetreehash functions.
188 (JAVA_TREEHASHHASH_H): New macro.
189 (java_treetreehash_hash): New function.
190 (java_treetreehash_compare): New function.
191 (java_treetreehash_find): New function.
192 (java_treetreehash_new): New function.
193 (java_treetreehash_create): New function.
194 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
195
196 * Make-lang.in (java/parse.o): Depend on debug.h.
197 * java-tree.h (struct lang_identifier): Use gengtype.
198 (union lang_tree_node): New.
199 (struct lang_decl_func): Use gengtype.
200 (struct lang_decl_var): Likewise.
201 (struct lang_decl): Likewise.
202 * parse.y: Include debug.h.
203 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
204
205 * lang.c (struct language_function): New dummy structure.
206
207 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
208 descriminator for DECL_LANG_SPECIFIC.
209 (struct lang_decl_func): Rename from struct lang_decl.
210 (enum lang_decl_desc): New.
211 (struct lang_decl): Make it a union. Update all the accessor macros.
212 (struct lang_type): Use gengtype.
213 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
214 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
215 are now the same size.
216 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
217 use discriminator to mark DECL_LANG_SPECIFIC.
218
219 * Make-lang.in (gt-java-builtins.h): New rule.
220 (java/builtins.o): Add dependency on gt-<filename>.h.
221 * builtins.c: Use gengtype for roots.
222 (union string_or_tree): Use gengtype.
223 (struct builtin_record): Use gengtype.
224 * config-lang.in (gtfiles): Add builtins.c.
225
226 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
227 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
228 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
229 gt-java-parse.h, gtype-java.h): Add rules to generate.
230 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
231 (class.o): Add dependency on gt-*.h.
232 (constants.o): Likewise.
233 (decl.o): Likewise.
234 (expr.o): Likewise.
235 (jcf-parse.o): Likewise.
236 (jcf-write.o): Likewise.
237 (lang.o): Likewise.
238 * config-lang.in (gtfiles): New.
239 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
240 * constants.c: Replace uses of ggc_add_* with GTY markers.
241 Include gt-*.h.
242 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
243 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
244 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
245 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
246 Include gt-*.h.
247 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
248 Include gt-*.h.
249 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
250 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
251 gt-*.h.
252 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
253 Include gtype-java.h.
254
c442c002
TT
2552002-06-02 Tom Tromey <tromey@redhat.com>
256
257 Fix for PR java/5913:
258 * parse.y (patch_binop): Call patch_string on op1.
259
48711f4d
TT
2602002-06-02 Tom Tromey <tromey@redhat.com>
261
262 Fix for PR java/1343, PR java/6336:
263 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
264 formatting. Changed return type.
265 (anonymous_class_counter): Moved to top of file.
266 (maybe_make_nested_class_name): Append number to class name for
267 function-local classes.
268
11ad4784
ZW
2692002-05-28 Zack Weinberg <zack@codesourcery.com>
270
271 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
272 * Make-lang.in: Update dependency lists.
273
a15135c9
MM
2742002-05-18 Mark Mitchell <mark@codesourcery.com>
275
276 * gjavah.c (throwable_p): Do not free the name of the class after
277 passing it to find_class.
278 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
279 * jcf-io.c (dirent.h): Include it.
280 (fnmatch.h): Likewise.
281 (compare_path): New function.
282 (java_or_class_file): Likewise.
283 (memoized_dirlist_entry): New type.
284 (memoized_dirlist_lookup_eq): New function.
285 (memoized_dirlists): New variable.
286 (caching_stat): New function.
287 (memoized_class_lookup_eq): New function.
288 (memoized_class_lookups): Likewise.
289 (find_class): Use memoized_class_lookups and caching_stat.
290 * jcf.h (JCF_USE_SCANDIR): Define.
291 * parse.y (java_expand_classes): Write the class files in reverse
292 order.
c02ebb18 293
1e6347d8
RO
2942002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
295
296 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
297
2f9a2cd7
MM
2982002-05-13 Mark Mitchell <mark@codesourcery.com>
299
300 * jcf-write.c (write_classfile): Unlink the temporary file if it
301 cannot be renamed. Use concat to build up the name of the
302 temporary file.
303
281524f4
MM
3042002-05-08 Mark Mitchell <mark@codesourcery.com>
305
c02ebb18 306 * jcf-write.c (write_classfile): Write the file to a
281524f4
MM
307 temporary file and then rename it.
308
6b9b5de2
TT
3092002-05-07 Tom Tromey <tromey@redhat.com>
310
5643bb97
TT
311 * gjavah.c (throwable_p): Use xstrdup, not strdup.
312
6b9b5de2
TT
313 Fix for PR java/1200:
314 * gjavah.c (throwable_p): New function.
315 (decode_signature_piece): Use it. A `WeakReference' isn't the
316 same as a `jweak'.
317 Include hashtab.h.
318 (gcjh_streq): New function.
319
2c7e9098
AJ
3202002-05-07 Andreas Jaeger <aj@suse.de>
321
c02ebb18 322 * parse.y (finish_for_loop): Fix if statement.
2c7e9098 323
486e8c0c
TT
3242002-05-06 Tom Tromey <tromey@redhat.com>
325
326 Fix for PR java/5941:
327 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
328 loop update expression.
329 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
330 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
331
30b50f90
MW
3322002-05-04 Mark Wielaard <mark@klomp.org>
333
334 For PR java/6519:
335 * parse.y (build_string_concatenation): Return just op1 only when op2
336 is null and op1 is a STRING_CST, otherwise always construct a
337 StringBuffer.
338
0a32c5ea
TT
3392002-04-27 Tom Tromey <tromey@redhat.com>
340
341 For PR java/6382:
342 * parse.y (string_convert_int_cst): New function.
343 (merge_string_cste): Use it.
344
ff45c01e
NB
3452002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
346
347 * java-tree.h (java_parse_file): Update.
348 (java_set_yydebug): Remove.
349 * jcf-parse.c (yydebug): Remove.
350 (java_set_yydebug): Die.
351 (java_parse_file): Update.
352 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
353
9127b2da
TT
3542002-04-24 Tom Tromey <tromey@redhat.com>
355
356 For PR java/6425:
357 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
358 EXPR_WFL_QUALIFICATION of qual_wfl.
359
67f0a6bf
PB
3602002-04-23 Per Bothner <per@bothner.com>
361
362 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
363 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
364 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
365
3d3707c1
TT
3662002-04-23 Tom Tromey <tromey@redhat.com>
367
368 For PR java/6314:
369 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
370 recognize `-fcompile-resource='.
371 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
372 a bit.
373
920f81e7
APB
3742002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
375
376 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
377 paths. Fixes PR java/2791.
378
a2761d68
AH
3792002-04-19 Andrew Haley <aph@redhat.com>
380
c02ebb18
ZW
381 * jcf-write.c (push_long_const): lo, hi: New variables.
382 Use rshift_double to extract the high part of a 64-bit long.
383 Use WORD_TO_INT to extract the low part.
a2761d68 384
c02ebb18
ZW
385 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
386 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
387 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
a2761d68 388
7a228918
NB
3892002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
390
391 * typeck.c (incomplete_type_error): Remove.
392
b798d8b6
BM
3932002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
394
395 * class.c (make_class_data): Set DECL_ALIGN on static class data,
396 for hash synchronization.
397 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
398 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
399 class_type_node.
400
1cde1d05
MW
4012002-04-16 Mark Wielaard <mark@klomp.org>
402
403 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
404 negative zero.
405
3020a7f5
BM
4062002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
407
408 Fix for PR java/6294:
409 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
410 interfaces.
2c7e9098 411
10aa83c7
BM
4122002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
413
414 Fix for PR java/6085:
415 * parse.y (patch_method_invocation): Always use build_access_to_thisn
416 to get enclosing "this" argument for inner-class constructor
417 invocation. Pass correct arguments to build_access_to_thisn.
418
9fef1fe3
AG
4192002-04-10 Andreas Jaeger <aj@suse.de>
420
421 * gcj.texi (Input Options): Fix extdirs patch.
422
4232002-04-10 Anthony Green <green@redhat.com>
424
425 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
426
4272002-04-09 Anthony Green <green@redhat.com>
428
429 * gcj.texi (Input Options): Add --extdirs documentation.
430 * jcf-dump.c (OPT_extdirs): New macro.
431 (options): Add extdirs option.
432 (help): Describe --extdirs.
433 (main): Handle OPT_extdirs.
434 * gjavah.c (OPT_extdirs): New macro.
435 (options): Add extdirs option.
436 (help): Describe --extdirs.
437 (main): Handle OPT_extdirs.
438 * jcf-path.c (jcf_path_init): Add extdirs support.
439 (jcf_path_extdirs_arg): New function.
440 (extensions): New variable to hold extensions path entries.
441 * jvspec.c: Remove -fextdirs= when compiling main().
442 * lang.c (java_decode_option): Handle -fextdirs=.
443 * jcf.h (jcf_path_extdirs_arg): Declare new function.
444 * Make-lang.in: Compile jcf-path with version info for use in
445 identifying the appropriate libgcj.jar.
446
66133721
TT
4472002-04-08 Tom Tromey <tromey@redhat.com>
448
449 For PR libgcj/5303:
450 * .cvsignore: Added rmic.1 and rmiregistry.1.
451 * gcj.texi (Top): Link to new nodes.
452 (Invoking rmic): New node.
453 (Invoking rmiregistry): Likewise.
454 * Make-lang.in (java.generated-manpages): Added rmic.1 and
455 rmiregistry.1.
456 (java.maintainer-clean): Likewise.
457 ($(srcdir)/java/rmic.1): New target.
458 ($(srcdir)/java/rmiregistry.1): Likewise.
459 (java.install-man): Handle rmic.1 and rmiregistry.1.
460
00b224f8
BM
4612002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
462
463 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
464 Add note about handling uncaught exceptions. Add an exception handler
465 to example.
466
0b055ea1
BM
4672002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
468
469 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
470 after using it to patch CALL_EXPR.
471
92c76eba
BM
4722002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
473
474 * gcj.texi (Invocation): Document CNI invocation API.
475
78ef5b89
NB
4762002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
477
478 * expr.c (truthvalue_conversion): Rename. Update.
479 (expand_compare): Update.
480 * java-tree.h (java_truthvalue_conversion): New.
481 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
482
dffd7eb6
NB
4832002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
484
485 * java-tree.h (java_mark_addressable): New.
486 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
487 * typeck.c (mark_addressable): Rename, update.
488
ceef8ce4
NB
4892002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
490
491 * expr.c (build_java_binop): Update.
492 * java-tree.h (java_signed_type, java_unsigned_type,
493 java_signed_or_unsigned_type): Update.
494 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
495 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
496 * parse.y (patch_binop): Update.
497 * typeck.c (signed_or_unsigned_type, unsigned_type,
498 signed_type): Update.
499
7cb32822
NB
5002002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
501
502 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
503 (java_dummy_print): Remove.
504 (lang_print_error): Rename. Exit early if inhibiting output.
505 (inhibit_error_printing_function): New.
506 (java_init): Don't set hook.
507 (lang_init_source): Use new boolean.
508
5bebbee7
MK
5092002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
510
511 * parse.y (do_resolve_class): Fix infinite recursion.
512
bce54832
TT
5132002-03-29 Tom Tromey <tromey@redhat.com>
514
515 * parse.y (check_inner_circular_reference): Ignore incomplete
516 types.
517
b0c48229
NB
5182002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
519
520 * Make-lang.in (builtins.o): Update.
521 * boehm.c (get_boehm_type_descriptor): Update.
522 * builtins.c: Include langhooks.h.
523 * decl.c (java_init_decl_processing): Update.
524 * java-tree.h (java_type_for_mode, java_type_for_size): New.
525 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
526 Redefine.
527 * typeck.c (type_for_mode, type_for_size): Update.
528
5843e870
MK
5292002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
530
531 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
532
073681c5
TT
5332002-03-28 Tom Tromey <tromey@redhat.com>
534
535 * except.c (expand_end_java_handler): If the handler type is NULL,
536 use java.lang.Throwable. Fixes PR java/5986.
537
242747e5
APB
5382002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
539
540 Fix for PR java/4715:
541 * jcf-parse.c (parse_source_file_3): New function.
542 (read_class): Call it.
543 (java_parse_file): Likewise.
544
f5eb5fd0
JH
545Thu Mar 28 13:22:22 CET 2002 Jan Hubicka <jh@suse.cz>
546
547 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
548
c187b20e
BM
5492002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
550
551 * parse.y (resolve_package): Initialize "decl".
552 (lookup_package_type): Remove unused function.
553
2f418289
BM
5542002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
555
556 Fix for PR java/5993:
557 * parse.y (resolve_package): Return the decl if resolution was
2c7e9098 558 successful. Don't special case "java.lang" and "java.lang.reflect"
2f418289
BM
559 packages. Set type_name to the merged identifier.
560 (resolved_qualified_expression_name): Print error using "name" if
561 resolve_package returns NULL_TREE.
562
39bea374
TT
5632002-03-27 Tom Tromey <tromey@redhat.com>
564
565 * expr.c (expand_invoke): Don't generate null pointer check if
566 we're calling <init>.
567
c9d892a8
NB
5682002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
569
570 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
571 fix prototype.
572 * java-tree.h (java_lang_expand_expr): Similarly.
573 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
574 (java_init): Don't set hook.
575
05833095
BM
5762002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
577
578 Fix for PR java/5850:
579 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
580 context if field was not found in the current scope.
581 * expr.c (lookup_field): Don't look in enclosing contexts.
582
c8c21a8c
TT
5832002-03-26 Tom Tromey <tromey@redhat.com>
584
585 Fix for PR java/5942:
586 * parse.y (init_src_parse): Added sanity check.
587 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
588 elements, not 11.
589
4f0ade92
NB
5902002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
591
592 * decl.c (lang_mark_tree): Rename java_mark_tree.
593 * java-tree.h (java_mark_tree): New.
594 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
595
15e5ad76
ZW
5962002-03-25 Zack Weinberg <zack@codesourcery.com>
597
598 * lex.c: Change java_perform_atof to take normal parameters
599 instead of a pointer to a parameter block. Call it directly
600 from java_lex.
601
caaabaa1
MW
6022002-03-22 Mark Wielaard <mark@klomp.org>
603
604 Fix for PR java/5368:
605 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
606 when printing error message.
607
c88770e9
NB
6082002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
609
610 * decl.c (maybe_build_cleanup): Remove.
611
c58408bf
TT
6122002-03-22 Tom Tromey <tromey@redhat.com>
613
614 Andrew Haley <aph@cambridge.redhat.com>
615
616 * expr.c (build_field_ref): Don't build a check if the field is a
617 member of `this'.
618
6c18d181
EB
6192002-03-21 Eric Blake <ebb9@email.byu.edu>
620
621 Fix for PR java/6026:
622 * lex.c (java_lex): Fix parsing of consecutive floats.
623
a5778545
TT
6242002-03-21 Tom Tromey <tromey@redhat.com>
625
626 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
627 class.
628
43577e6b
NB
6292002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
630
631 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
632 insert_block, getdecls, kept_level_p, global_bindings_p): New.
633
fe911510
NF
6342002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
635
2c7e9098 636 * gcj.texi: @code{gcj} becomes @command{gcj}.
15e5ad76
ZW
637 @code{gcc} becomes @command{gcc}.
638 GcjRaw changed to gnu.gcc.RawData.
639
7afff7cf
NB
6402002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
641
642 * decl.c (start_java_method): Use new hook.
643 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
644 (java_init): Remove old hook.
645
c2d8e20a
APB
6462002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
647
648 * builtins.c (define_builtin): Do nothing if `type' is null.
649 Fixes PR java/5876.
650
6befbee5
BM
6512002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
652
653 * parse.y (parser_check_super_interface): Fix error message
654 grammar/order.
655
320c81a6
KG
6562002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
657
658 * jcf-parse.c (get_constant): Delete unused variables.
659
52dabb6c
NB
6602002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
661
662 * java-tree.h (java_parse_file): New.
663 * jcf-parse.c (yyparse): Rename java_parse_file.
664 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
665
568d1435
BM
6662002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
667
668 * parse.y (craft_constructor): Return the constructor decl.
669 (java_expand_classes): Update comments.
670 (lookup_method_invoke): Call fix_constructors immediately for
671 anonymous class. Fixes PR java/5935.
672
8d39b447
AG
6732002-03-15 Anthony Green <green@redhat.com>
674
675 * jcf-parse.c (yyparse): Don't emit class registration
676 constructor when compiling resource files.
677
2f9834e8
KG
6782002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
679
680 * lang.c (java_tree_code_type, java_tree_code_length,
681 tree_code_name): Delete.
682 (tree_code_type, tree_code_length, tree_code_name): Define.
683 (java_init): Don't try to copy into the various tree_code
684 arrays.
685
f792bce5
TT
6862002-03-12 Tom Tromey <tromey@redhat.com>
687
8a611251
TT
688 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
689 UTF-8, not UCS-2. Fixes PR java/5923.
690
f792bce5
TT
691 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
692 a call_expr wrapped in a convert. Fixes PR java/5848.
693
acf8bc25
BM
6942002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
695
696 * jcf-write.c (write_classfile): Improve error strings.
697
e0b1c206
EB
6982002-03-11 Eric Blake <ebb9@email.byu.edu>
699
700 * lex.c: Adjust comments to GNU standards.
701
7022002-03-11 Eric Blake <ebb9@email.byu.edu>
703
704 Fix for PR java/5902:
705 * lex.c (java_lex): Fix parsing of literals.
706
884523df
BM
7072002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
708
709 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
710 to prevent it getting evaluated twice in the store checking case.
711 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
712 examining OBJECT.
713
45597167
BM
7142002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
715
716 * decl.c (java_init_decl_processing): Make sure class_type_node
717 alignment is not less than 64 bits if hash synchronization is enabled.
718
edcc88c1
PB
7192002-03-08 Per Bothner <per@bothner.com>
720
721 * parse.y (java_complete_lhs): Check if patch_assignment
722 returned an error-mark.
723
724 * parse.y (try_builtin_assignconv): Don't special-case zero.
725
5295f849
PB
7262002-03-08 Per Bothner <per@bothner.com>
727
728 Fix for PR java/5812.
729 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
be3ac45e 730 here instead of in JSR macro. Likewise with load_type_state call.
5295f849 731 Do the latter on if the return_pc has been verified (the jsr returns).
be3ac45e 732 (JSR): Now just call build_java_jsr.
5295f849 733
d3e1c36d
JS
7342002-03-07 Jeff Sturm <jsturm@one-point.com>
735
736 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
737 (java.install-common): Link native driver to
738 JAVA_TARGET_INSTALL_NAME.
739
6d6b5cd7
DB
7402002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
741
742 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
743 * builtins.c(sin_builtin): Likewise
744 * builtins.c(sqrt_builtin): Likewise
745
ba31d94e
ZW
7462002-03-03 Zack Weinberg <zack@codesourcery.com>
747
748 * java/expr.c, java/jcf-parse.c, java/lex.c:
749 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
750 REAL_ARITHMETIC blocks unconditional. Delete some further
751 #ifdef blocks predicated on REAL_ARITHMETIC.
752
ca7558fc
KG
7532002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
754
755 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
756 explicit sizeof/sizeof.
757 * decl.c (java_init_decl_processing): Likewise.
758 * jcf-parse.c (init_jcf_parse): Likewise.
759 * parse.y (init_src_parse): Likewise.
760
2a85660d
PB
7612002-03-02 Per Bothner <per@bothner.com>
762
763 Make --CLASSPATH by a synonym for --classpath and -classpath.
764 Implement --bootclasspath.
765 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
766 (classpath_l): Remove.
767 (jcf_path_CLASSPATH_arg): Remove.
768 (jcf_path_bootclasspath_arg): New function.
769 (jcf_path_seal): Simplify accordingly.
770
771 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
772 (jcf_path_CLASSPATH): Remove declaration.
773 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
774 (lang_specific_driver): Translate -bootclasspath.
775 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
776 * lang.c (decode_lang_options): Do jcf_path_init first.
777 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
778 * gjavah.c: Also handle --bootclasspath.
779 Handle --CLASSPATH as a synonum for --classpath.
780 * jcf-dump.c: Likewise.
781
782 "." is not part of system path, but is the default for --classpath.
783 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
784 (jcf_path_seal): Add "." if no CLASSPATH specified.
785
786 * gcj.texi: Document changes.
787
2060fd4c
BM
7882002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
789
790 * expr.c (build_java_arraystore_check): Fix formatting.
791
4f647d52
APB
7922002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
793
794 Fix for PR java/5758, java/5632:
795 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
796 inner-class separator too.
797 * parse.y (do_resolve_class): New local `decl_result.'
798 Progressively build a name for what can have been loaded.
799
022dcc46
BM
8002002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
801
802 * expr.c (java_array_data_offset): Removed function.
803 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
804 (build_java_array_length_access): Obtain "length" value using a
805 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
806 (build_java_arrayaccess): Correct comment. Access "data" using a
807 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
808 (build_java_arraystore_check): New function.
809 (expand_java_arraystore): Use build_java_arraystore_check.
810 * parse.y (patch_assignment): Simplify code to insert a store check
811 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
812 * check-init.c (check_init): Update to reflect that an array length
813 access is now a COMPONENT_REF.
814 * gcj.texi (Code Generation): Improve documentation of
815 -fno-bounds-check. Add documentation for -fno-store-check.
816 * java-tree.h (flag_store_check): Declare.
817 (build_java_arraystore_check): Declare.
818 * lang.c (flag_store_check): Initialize to 1.
819 (lang_f_options): Add store-check option.
820 * jvspec.c: Don't pass store-check option to jvgenmain.
821 * lang-options.h: Add help string for -fno-store-check.
822
63e1b1c4
NB
8232002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
824
825 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
826 * java-tree.h (java_dup_lang_specific_decl): New.
827 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
828
f458d1d5
ZW
8292002-02-27 Zack Weinberg <zack@codesourcery.com>
830
831 * builtins.c, decl.c: Delete traditional-mode-related code
832 copied from the C front end but not used, or used only to
833 permit the compiler to link.
834
d2fb5329
TT
8352002-02-22 Tom Tromey <tromey@redhat.com>
836
837 Fix for PR java/2369:
838 * jvspec.c (verify_class_name): New function.
839 (lang_specific_driver): Call it.
840 (JAVA_START_CHAR_P): New macro.
841 (JAVA_PART_CHAR_P): Likewise.
842
dcb36804
PB
8432002-02-22 Per Bothner <per@bothner.com>
844
022dcc46 845 * class.c: Change vtable to be more compatible with g++ v3 abi.
dcb36804
PB
846 (get_dispatch_table): Prepend offset-to-top (always 0) and
847 type_info pointer (currently unimplemented hence NULL) to vtable.
848 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
849 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
850 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
851 (build_dtable_decl): Add declarations for new fields.
852
453c182f
PB
8532002-02-20 Per Bothner <per@bothner.com>
854
855 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
856 to finit$ (otherwise generate_bytecode_insns drops it). However, we
857 don't need to set it on the COMPOUND_EXPR - the caller does that.
858
3babb2e3
NF
8592002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
860
15e5ad76
ZW
861 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
862 `--CLASSPATH' becomes `--classpath.'
863 * gjavah.c: Likewise.
864 * jcf-dump.c: Likewise.
865 * lang-options.h: Likewise.
866 * lang.c: Likewise.
867 * jcf-path.c: Updated comment.
868 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
869 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
870 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
871 (jcf_path_CLASSPATH_arg): Ditto.
872 (classpath_u): Updated leading comment.
3babb2e3 873
9fe2cc05
PB
8742002-02-20 Per Bothner <per@bothner.com>
875
876 * builtins.c (check_for_builtin): New function.
877 (build_call_or_builtin): Remove.
878 * java-tree.h: Update accordingly.
879 * expr.c (expand_invoke): Use build + check_for_builtin instead
880 of build_call_or_builtin.
881 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
882 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
883 flag (which had caused jcf-write to incorrectly emit invokevirtual).
884
6b6294f1
TT
8852002-02-17 Tom Tromey <tromey@redhat.com>
886
887 * java-tree.h (TYPE_STRICTFP): New macro.
888 (struct lang_type) [strictfp]: New field.
889 (CLASS_STRICTFP): New macro.
890 (METHOD_STRICTFP): New macro.
891 (struct lang_decl) [strictfp]: New field.
892 * parse.y (method_header): Disallow strictfp constructor or
893 abstract method.
894 (STRICT_TK): Move before MODIFIER_TK.
895 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
896 (METHOD_MODIFIERS): Likewise.
897 (INTERFACE_MODIFIERS): Likewise.
898 * jcf-write.c (get_access_flags): Likewise.
899 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
900 (add_method_1): Likewise.
901 (get_access_flags_from_decl): Likewise.
902 * jcf-dump.c (print_access_flags): Print in standard order. Also,
903 recognize strictfp flag.
904 * jcf.h (ACC_STRICT): New define.
905
5667c33d
DB
9062002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
907
908 * class.c(build_utf8_ref): Move declaration of decl_size
909
5d65aeb7
TT
9102002-02-07 Tom Tromey <tromey@redhat.com>
911
912 * gcj.texi (Input Options): --CLASSPATH does not suppress system
913 path.
914
10c45943
AG
9152002-02-04 Anthony Green <green@redhat.com>
916
917 * class.c (build_utf8_ref): Put UTF-8 constants into merged
918 sections if available.
919
14b71055
BM
9202002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
921
922 * parse.y (java_expand_classes): Fix typo in static field loop.
923
f0c75752
RH
9242002-02-02 Richard Henderson <rth@redhat.com>
925
926 * class.c (add_field): Mark static fields external.
927 (build_class_ref): Remove redundant set.
928 * parse.y (java_expand_classes): Mark static fields of classes
929 to be compiled as local.
930 * jcf-parse.c (parse_class_file): Likewise.
931
d4ad1c90
NF
9322002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
933
934 * gcj.texi (About CNI): New node.
935
58fae3f7
CR
9362002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
937
938 PR java/5080
939 * jcf-parse.c : Check for HAVE_LOCALE_H before using
940 setlocale() with LC_CTYPE as a parameter.
941 * jv-scan.c: Same.
942
8512bbd7
JM
9432002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
944
945 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
946 Follow GNU Coding Standards for --version.
947
adc8cb5d
TT
9482002-01-28 Tom Tromey <tromey@redhat.com>
949
950 * expr.c (build_jni_stub): Ensure storage for `meth' is
951 generated.
952 * parse.y (java_complete_expand_methods): Set
953 current_function_decl before building JNI stub.
954
1d8478d7 9552002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
15e5ad76 956
1d8478d7
AT
957 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
958 BUILT_IN_SQRTF.
959
fec763fc
TT
9602002-01-22 Tom Tromey <tromey@redhat.com>
961
962 * decl.c (java_init_decl_processing): Use add_predefined_file.
963 Predefine RawData.java.
964 (predef_filenames): Removed.
965 (java_init_decl_processing): Don't register predef_filenames.
966 * jcf-parse.c (add_predefined_file): New function.
967 (predefined_filename_p): Rewrote.
968 (predefined_filename_p): No longer static.
969 * decl.c (java_init_decl_processing): Call initialize_builtins.
970 * Make-lang.in (JAVA_OBJS): Added builtins.o.
971 (java/builtins.o): New target.
972 * builtins.c: New file.
973 * parse.y (patch_invoke): Use build_call_or_builtin.
974 * java-tree.h (build_call_or_builtin): Declare.
975 (initialize_builtins): Declare.
976 (java_set_exception_lang_code): Removed unused declaration.
977 (PREDEF_FILENAMES_SIZE): Removed.
978 (java_tree_index): Added JTI_PREDEF_FILENAMES.
979 (predef_filenames): New define.
980 (add_predefined_file): Declare.
981 (predefined_filename_p): Declare.
982 * expr.c (expand_invoke): Use build_call_or_builtin.
983
cc586d70
KG
9842002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
985
986 * parse.y (patch_switch_statement): Fix format specifier.
987
0df29596
TT
9882002-01-16 Tom Tromey <tromey@redhat.com>
989
990 More for PR java/5365:
991 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
992 default.
993 (process_file): Generate include for
994 java.lang.UnsupportedOperationExceptions.
995
e1886ae0
AJ
9962002-01-15 Andreas Jaeger <aj@suse.de>
997
998 * .cvsignore: Add man pages.
999
9c874875
TT
10002002-01-15 Tom Tromey <tromey@redhat.com>
1001
1002 Fix for PR java/5365:
1003 * gjavah.c (process_file): Turn class name into a file name.
1004
707635f9
MK
10052002-01-14 Matthias Klose <doko@debian.org>
1006
1007 * gcj.texi: Fix whitespace and formatting errors in the
1008 synopsis of the man pages. Update copyright.
1009
e6a5e462
TT
10102002-01-14 Tom Tromey <tromey@redhat.com>
1011
1012 For PR libgcj/5303:
1013 * Make-lang.in (java.install-man): Handle jv-convert man page.
1014 (java.generated-manpages): Added jv-convert.1.
1015 (java.uninstall): Remove jv-convert.1.
1016 (java.maintainer-clean): Likewise.
1017 ($(srcdir)/java/jv-convert.1): New target.
1018 * gcj.texi (Top): Link to jv-convert node.
1019 (Individual utilities): Likewise.
1020 (Invoking jv-convert): New node.
1021
0b0d4c5b 10222001-01-10 Jeff Sturm <jsturm@one-point.com>
f0c75752 1023 Martin Kahlert <martin.kahlert@infineon.com>
0b0d4c5b
JS
1024
1025 * jcf-parse.c (get_constant): Don't swap lo/hi for big
1026 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
1027
c0b65ff1 10282002-01-03 Graham Stott <grahams@redhat.com>
79ab76fd 1029
f0c75752
RH
1030 * class.c (compile_resource_file): Update copyright date.
1031 Constify filename parameter.
1032 (java-tree.h): Update copyright date.
1033 (compile_resource_file): Constify filename parameter.
79ab76fd 1034
22e85ed4
GS
10352002-01-03 Graham Stott <grahams@redhat.com>
1036
f0c75752
RH
1037 * gcc/jcf-parse.c: Update copyright date.
1038 (yyparse): Constify resource_filename.
22e85ed4 1039
5e65297b
KG
10402002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1041
1042 * parse.y (src_parse_roots): Don't needlessly zero init.
1043
12cfb4fc
TT
10442001-12-31 Tom Tromey <tromey@redhat.com>
1045
1046 * parse.y (dump_java_tree): New function.
1047 (source_end_java_method): Call it.
1048 (end_class_declaration): Likewise.
1049 * lang.c (java_decode_option): Call dump_switch_p.
1050
dab722ee
TT
10512001-12-28 Tom Tromey <tromey@redhat.com>
1052
1053 * gen-table.pl: Don't process characters after \uffff. Added
1054 comment pointing to input file.
1055
7b0295ab
KG
10562001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1057
1058 * gen-table.pl: Const-ify output. Document the location of a
1059 suitable unicode input file.
1060
1061 * chartables.h: Regenerate.
1062
c083a819
KG
10632001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1064
1065 * chartables.h: Const-ify.
1066 * gjavah.c (options): Likewise.
1067 * jcf-dump.c (options): Likewise.
1068 * jv-scan.c (options): Likewise.
1069 * lex.c (java_start_char_p, java_part_char_p): Likewise.
1070 * parse.y (binop_lookup): Likewise.
1071
0b5826ac
KG
10722001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1073
1074 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
1075 the static arrays that are output.
1076 * jvspec.c (jvgenmain_spec): Make static.
1077 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
1078 * keyword.h: Regenerate.
1079 * lang.c (string_option, process_option_with_no, lang_f_options,
1080 lang_W_options): Const-ify.
1081 * lex.c (java_lex): Likewise.
1082
9a07cfaf
RH
10832001-12-21 Richard Henderson <rth@redhat.com>
1084
1085 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
1086 (get_boehm_type_descriptor): ... here. Arrange for the
1087 TREE_TYPE to get set properly.
1088
f44fefca
RH
10892001-12-21 Richard Henderson <rth@redhat.com>
1090
ef969525
RH
1091 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
1092 only if the target requires collect2.
1093
f44fefca
RH
1094 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
1095
84a944b3
TT
10962001-12-20 Tom Tromey <tromey@redhat.com>
1097
1098 For PR java/4509:
1099 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
1100 CAN_COMPLETE_NORMALLY for the node.
1101 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
1102 generate code for second branch if first branch can't complete
1103 normally.
1104 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
1105 the loop head if the loop body can't complete normally.
1106
2d93b924
TT
11072001-12-20 Tom Tromey <tromey@redhat.com>
1108
1109 For PR java/4766:
1110 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
1111 case where `finally' clause can't complete normally.
1112
f2af50db
TT
11132001-12-20 Tom Tromey <tromey@redhat.com>
1114
1115 Fixes PR java/5057:
1116 * parse.y (analyze_clinit_body): Added this_class parameter.
1117 Check for more cases where we must keep <clinit>.
1118 (maybe_yank_clinit): Cleaned up flow control.
1119
7899e8b9
BM
11202001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1121
e1886ae0 1122 * decl.c (java_init_decl_processing): Don't initialize
7899e8b9
BM
1123 finit_leg_identifier_node.
1124 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
1125 (finit_leg_identifier_node): Remove.
1126 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
1127
de4984af
BM
11282001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1129
e1886ae0 1130 * mangle.c (mangle_member_name): Don't special-case for
de4984af
BM
1131 NO_DOLLAR_IN_LABEL.
1132 * mangle_name.c (unicode_mangling_length): Likewise.
1133 (append_unicode_mangled_name): Likewise.
1134 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
1135 code.
1136
08514ae4
BM
11372001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1138
1139 * expr.c (build_java_array_length_access): Don't force null pointer
1140 check unless flag_check_references is set.
1141
56b8325e
TT
11422001-12-20 Tom Tromey <tromey@redhat.com>
1143
1144 Fix for PR java/3417:
1145 * parse.y (patch_assignment): Added special processing for
1146 `return'.
1147 (patch_return): Don't convert booleans to integers, and don't
1148 special-case `null'.
1149
38be19f6
JM
11502001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
1151
1152 * config-lang.in (diff_excludes): Remove.
1153
b11cc610
JM
11542001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
1155
1156 * gcj.texi: Update link to GCC manual.
1157
e97562f5
TT
11582001-12-17 Tom Tromey <tromey@redhat.com>
1159
1160 * parse.y (link_nested_class_to_enclosing): Removed useless
1161 statement.
1162
2c5187c5
TT
11632001-12-16 Tom Tromey <tromey@redhat.com>
1164
1165 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
1166 Fixes PR java/5088.
1167
a83f01f0
JM
11682001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
1169
1170 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
1171 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
1172 spelling errors.
1173
faf31866
KG
11742001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1175
1176 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
1177
9a8de998
BM
11782001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1179
1180 * decl.c (java_init_decl_processing): Build otable_type correctly.
1181 otable_decl is an otable_type.
1182
861ef928
BM
11832001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1184
1185 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
e1886ae0 1186 otable_type, otable_ptr_type, method_symbol_type,
861ef928
BM
1187 method_symbols_array_type, method_symbols_array_ptr_type): New
1188 field/global tree definitions.
1189 (flag_indirect_dispatch): New flag.
e1886ae0 1190 * decl.c (java_init_decl_processing): Initialize new otable and
861ef928
BM
1191 otable_syms type nodes and decls. Add new field "index" to
1192 method_type_node.
1193 * class.c (build_method_symbols_entry): New function.
1194 (make_method_value): Set "index" to to method's vtable index for
1195 virtual methods when indirect-dispatch is not used.
a83f01f0 1196 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
861ef928
BM
1197 and set vtable_method_count to -1. Set otable and otable_syms field
1198 if indirect-dispatch is used and there was something to put in them.
1199 (build_method_symbols_entry): New function.
1200 (emit_offset_symbol_table): New function.
1201 * expr.c (get_offset_table_index): New function.
e1886ae0 1202 (build_invokevirtual): Build array reference to otable at the index
861ef928
BM
1203 returned by get_offset_table_index, and use the result as the vtable
1204 offset.
1205 (build_invokeinterface): Similar.
e1886ae0
AJ
1206 * jcf-parse.c (yyparse): If indirect-dispatch, call
1207 emit_offset_symbol_table at the end of compilation, after all classes
861ef928
BM
1208 have been generated.
1209 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
1210 * lang.c (flag_indirect_dispatch): Define.
1211 (lang_f_options): Add indirect-dispatch flag.
1212
f1727481
MK
12132001-12-14 Matthias Klose <doko@debian.org>
1214
1215 * gcj.texi: Markup for man page generation. Document missing
1216 options printed by <tool> --help.
1217 Terminate description of gij's -ms option with a dot.
1218 * Make-lang.in ($(srcdir)/java/*.1): New targets.
1219 (java.generated-manpages java.install-man, java.uninstall,
1220 java-maintainer-clean) Updated.
1221
eec87542
HB
12222001-12-14 Hans Boehm <Hans_Boehm@hp.com>
1223
1224 * class.c (get_dispatch_table): Fix java vtable layout
1225 for TARGET_VTABLE_USES_DESCRIPTORS.
1226 * decl.c (java_init_decl_processing): Initialize
1227 alloc_no_finalizer_node, finalize_identifier_node.
1228 * expr.c (class_has_finalize_method): New function.
1229 (expand_java_NEW): Generate calls for finalizer-free allocation.
1230 (build_invokevirtual): Fix java vtable layout for
1231 TARGET_VTABLE_USES_DESCRIPTORS.
e1886ae0 1232 * java-tree.h (enum java_tree_index): New entries:
eec87542
HB
1233 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
1234 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
1235 (class_has_finalize_method): declare.
1236 (HAS_FINALIZER_P): New macro.
1237 * parse.y (patch_invoke): Generate calls for finalizer-free
1238 allocation.
1239
81deb0a3
MK
12402001-12-12 Matthias Klose <doko@debian.org>
1241
1242 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
1243 whitespace at end of line.
1244
34026199
TT
12452001-12-11 Tom Tromey <tromey@redhat.com>
1246
1247 * lex.c (java_init_lex): Define wfl_to_string as
1248 gnu.gcj.runtime.StringBuffer unless generating bytecode.
1249
a3bcfa67
JS
12502001-12-11 Jeff Sturm <jsturm@one-point.com>
1251
1252 * class.c (make_method_value): Use null_pointer_node to
1253 represent empty exception table.
1254
3afdfae8
TT
12552001-12-10 Tom Tromey <tromey@redhat.com>
1256
1257 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
1258
96a9c44f
DR
1259Mon Dec 10 06:09:57 2001 Douglas B. Rupp <rupp@gnat.com>
1260
1261 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
1262
a5cb134d
PB
12632001-12-09 Per Bothner <per@bothner.com>
1264
1265 * check-init.c (current_switch_has_default): New static field.
1266 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
1267 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
1268 DEFAULT_EXPR seen, simulate a default alternative that copies state.
1269
1aca9b81
TT
12702001-12-09 Tom Tromey <tromey@redhat.com>
1271
1272 * check-init.c (check_init): Don't allow pre- or post- increment
1273 or decrement of final variable.
1274 (final_assign_error): Minor error message rewording.
1275
4440ffc4
TT
12762001-12-08 Tom Tromey <tromey@redhat.com>
1277
0854b1c4
TT
1278 * java-tree.h: Fixed typo.
1279
5fcab235
TT
1280 * gjavah.c (decompile_method): Don't decompile to `return this'
1281 for static methods.
1282
7b35f6c9
TT
1283 * gjavah.c (cxx_keywords): Re-sorted.
1284 * lex.c (cxx_keywords): Re-sorted.
1285
897c9e66
TT
1286 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
1287 else.
1288
4440ffc4
TT
1289 * gjavah.c (print_namelet): Clear subnamelets.
1290 (HANDLE_METHOD): Set `method_printed' earlier.
1291
8f25dc28
TT
12922001-12-07 Tom Tromey <tromey@redhat.com>
1293
1294 * lang.c (lang_f_options): Added
1295 optimize-static-class-initialization.
1296 (java_decode_option): Removed special case.
1297
a9040c77
PB
12982001-12-07 Per Bothner <per@bothner.com>
1299
1300 * check-init.c (check_init): Fix typo freeing memory twice.
1301
5412ef6b
PB
13022001-12-05 Per Bothner <per@bothner.com>
1303
1304 Restore support for static class initialization optimization.
1305 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
1306 * check-init.c (check_int): At end of BLOCK handle initialization
1307 blocks, which used to be done in java_complete_expand_method but did
1308 not handle the case where check_for_initialization might allocate
1309 more than a word of bits.
1310 * decl.c (lang_make_tree): The smic field is now a tree.
1311 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
1312 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
1313
1314 * parse.y (emit_test_initialization): Combine hash_lookup calls.
1315
1316 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
1317 Change from a hash table to a list.
1318 (struct_lang_decl): Change field 'smic' to match.
1319 * class.c (add_method_1): Initialize
1320 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
1321 * parse.y (adjust_init_test_initialization): Removed - inlined into -
1322 (java_expand_method_bodies): -here, since 'smic' is now a list.
1323 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
1324
1325 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
1326
1327 * class.c (java_hash_compare_tree_node): Fix casts.
1328
4f88ccda
PB
13292001-12-04 Per Bothner <per@bothner.com>
1330
1331 * check-init.c: Handle definite unassignment to finals in addition
1332 to definite assignment.
1333 (loop_current_locals): New field.
1334 (num_current_locals, int start_current_locals, num_current_words):
1335 Make static.
1336 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
1337 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
1338 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
1339 (get_variable_decl, check_final_reassigned): New functions.
1340 (check_init, check_bool_init): Modify as needed for checking finals.
1341 (check_for_initialization): Take extra parameter and return void.
1342 Do extra start-up logic to check final fields for assignment.
1343 * parse.y (check_static_final_variable_assignment_flag,
1344 reset_static_final_variable_assignment_flag, check_final_assignment,
1345 check_final_variable_local_assignment_flag,
1346 reset_final_variable_indirect_assignment_flag,
1347 reset_final_variable_global_assignment_flag): Remove functions.
1348 (java_complete_expand_methods, outer_field_access_fix,
1349 patch_assignment): Remove no-longer used logic.
1350 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
1351 * parse.y (register_fields, java_complete_tree): Update accordingly.
1352
1353 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
1354 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
1355 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
1356
1357 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
1358
1359 * java-tree.h (DECL FINAL): New bit-field.
1360 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
1361 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
1362 (DECL_INIT_CALLS_THIS): New macro.
1363 (struct lang_decl): New bit-field init_calls_this.
1364 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
1365 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
1366 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
1367 use it for both local variables and final fields.
1368 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
1369 and local_final.
1370 (struct lang_type): Remove hfv bit-field.
1371 (check_for_initialization): Change to return void.
1372
1373 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
1374 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
1375 * check-init.c (final_assign_error): New helper function.
1376 (check_final_reassigned, check_init): Use it.
1377 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
e1886ae0 1378
4f88ccda
PB
1379 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
1380 bit-fields to unsigned.
1381
87d4ad08
PB
13822001-12-03 Per Bothner <per@bothner.com>
1383
1384 * parse.y (patch_binop): Minor constant folding.
1385
1386 * parse.y (build_current_thisn): Shorter 'buffer'.
1387
aedcdb65
PB
13882001-12-03 Per Bothner <per@bothner.com>
1389
1390 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
1391 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
1392 * jcf-write.c (generate_bytecode_insns): Remove support for
1393 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
1394 * check-init.c (check_init): Likewise.
1395
82ff672e
PB
13962001-12-03 Per Bothner <per@bothner.com>
1397
1398 * verify.c (subroutine_nesting): New function.
1399 (verify_jvm_instructions): Use it to fix logic for checking that
1400 we're done with the current subroutine.
1401
1402 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
1403 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
1404
98a63868
PB
14052001-12-03 Per Bothner <per@bothner.com>
1406
1407 * jcf.h: Fix obvious typo in comment.
1408 * typeck.c (build_null_signature): Add comment.
1409
c725bd79
NB
14102001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
1411
1412 * expr.c: Remove leading capital from diagnostic messages, as
1413 per GNU coding standards.
1414 * jcf-io.c: Similarly.
1415 * jcf-parse.c: Similarly.
1416 * jv-scan.c: Similarly.
1417 * jvspec.c: Similarly.
1418 * mangle.c: Similarly.
1419
b736dee6
TCH
14202001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
1421 Alexandre Petit-Bianco <apbianco@redhat.com>
1422
e1886ae0 1423 * expr.c (build_java_arrayaccess): Call save_expr on array for
7e5f4bee 1424 correct evaluation order, modified comment, fixed indentation.
b736dee6
TCH
1425 * parse.y: (patch_assignment): Correctly extract the array base
1426 from the tree generate by build_java_arrayaccess, added comments.
1427 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
1428 Fixes PR java/3096, PR java/3803, PR java/3965.
1429
357351e5
NB
14302001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
1431
1432 * expr.c (expand_byte_code): Remove trailing periods from messages.
1433 * jcf-parse.c (load_class, jcf_parse): Similarly.
1434 * jcf-write.c (generate_classfile): Similarly.
1435 * lex.c (java_lex): Similarly.
1436
a7c5337d
BM
14372001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1438
1439 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
1440
d3945f0a
JM
14412001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
1442
1443 * Make-lang.in (java.generated-manpages): New dummy target.
1444
b856c15d
RO
14452001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1446
1447 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
1448 ASM_FINAL_SPEC.
1449 (lang_specific_pre_link): Use set_input to set input_filename.
1450 Append `main' here.
1451 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
1452 (main): Fix definition.
1453 Strip `main' from classname.
1454 Fixes PR java/227.
1455
9c2fcf09
RS
14562001-11-18 Roger Sayle <roger@eyesopen.com>
1457
1458 * parse.h (java_expand_switch): Remove old prototype.
1459
8aeb42d0
TT
14602001-11-18 Tom Tromey <tromey@redhat.com>
1461
1462 Fix for PR java/1401:
1463 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
1464 arg0 is null.
1465 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
1466 correctly.
1467
22703ccc
NB
14682001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
1469
1470 * lang.c (finish_parse): Rename to java_finish.
1471 (LANG_HOOKS_FINISH, java_finish): New.
1472
f5e99456
NB
14732001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
1474
1475 * decl.c (init_decl_processing): Rename java_init_decl_processing.
1476 * java-tree.h: New prototype.
1477 * lang.c (java_init): Update prototype. Combine with old init_parse.
1478
150f086d
TT
14792001-11-13 Tom Tromey <tromey@redhat.com>
1480
1481 * gjavah.c (method_signature): New global.
1482 (HANDLE_METHOD): Set it.
1483 (decompile_return_statement): New function.
1484 (decompile_method): Use it.
1485 (print_method_info): Removed `synth' argument.
1486
5d69f816
NB
14872001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
1488
1489 * java-tree.h (java_set_yydebug): New.
1490 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
1491 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
1492 (print_lang_decl, print_lang_type, print_lang_identifier,
1493 print_lang_statistics, lang_print_xnode): Remove.
1494
3ac88239
NB
14952001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
1496
1497 * jcf-parse.c (init_lex): Remove.
1498 * lang.c (language_string, lang_identify): Remove.
1499 (struct lang_hooks): Constify.
1500 (LANG_HOOKS_NAME): Override.
1501 (init_parse): Update.
1502
b21d216c
AF
15032001-11-08 Andreas Franck <afranck@gmx.de>
1504
e1886ae0 1505 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
b21d216c
AF
1506 program_transform_name the way suggested by autoconf.
1507 (java.install-common): Also transform auxiliary program names with
1508 program_transform_name.
1509
1fa73144
TT
15102001-11-08 Tom Tromey <tromey@cygnus.com>
1511
1512 * parse.y (trap_overflow_corner_case): New rule.
1513 (unary_expression): Use it.
1514 * lex.c (java_init_lex): Don't set minus_seen.
1515 (yylex): Don't use minus_seen. Communicate overflow to parser for
1516 it to handle.
1517 (error_if_numeric_overflow): New function.
1518 * parse.h (minus_seen): Removed field.
1519 (JAVA_RADIX10_FLAG): New define.
1520
5a21a051
TT
15212001-11-07 Tom Tromey <tromey@redhat.com>
1522
1523 Patch for PR java/1414:
1524 * parse.y (case_label_list): New global.
1525 (goal): Register case_label_list with GC.
1526 (java_complete_lhs): Save new case on case_label_list.
1527 (patch_switch_statement): Check for duplicate case labels.
1528
5573cb39
APB
15292001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
1530
1531 * parse.y (patch_assignment): Removed unused third argument.
1532 (java_complete_lhs): Removed unused third argument to patch_assignment.
1533
d23c55c2
NB
15342001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
1535
1536 * lang.c: Include langhooks-def.h.
1537 * Make-lang.in: Update.
1538
5b7874aa
ZW
15392001-10-31 Zack Weinberg <zack@codesourcery.com>
1540
1541 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
1542
2b472f91
BM
15432001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1544
1545 * mangle.c (find_compression_record_match): Don't match compression
1546 records for package name elements unless they occur at the start of
1547 the name. Fix for PR java/4717.
1548
961b8e70
BM
15492001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1550
1551 * expr.c (expand_java_field_op): Don't special-case references to
1552 java.lang.PRIMTYPE.TYPE.
1553 (build_primtype_type_ref): Removed.
1554 * java-tree.h (build_primtype_type_ref): Remove prototype.
1555 * parse.y (maybe_build_primttype_type_ref): Removed.
1556 (complete_function_arguments): Don't special-case references to
1557 java.lang.PRIMTYPE.TYPE.
1558 (patch_assignment): Likewise.
1559 (array_constructor_check_entry): Likewise.
1560
98f705b9
APB
15612001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
1562
1563 * mangle.c (static tree compression_table): Fixed leading comment.
1564 * parse.h (struct parser_ctxt): Fixed field comment.
1565 * parse.y (check_pkg_class_access): New prototype, fixed leading
1566 comment, new parameter used to emit error only if passed as true.
1567 (parse_check_super): Pass extra argument to check_pkg_class_access.
1568 (do_resolve_class): Likewise.
1569 (process_imports): Likewise.
1570 (read_import_dir): Fixed indentation.
1571 (find_in_imports_on_demand): New local class_type_name. Local
1572 node_to_use deleted. while loop changed into for loop. Report
1573 multiple definition only for accessible classes. Improved error
1574 message.
1575 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
1576 assigned to parameter list, fixed indentation. while loop changed
1577 into for loop, restore TREE_CHAIN on local `tem' before the next
1578 iteration.
1579
8ac61af7
RK
1580Tue Oct 23 14:02:17 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1581
1582 * lang.c (lang_get_alias_set): Deleted.
1583
0df6c2c7
KG
15842001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1585
299b5f9e
KG
1586 * gjavah.c (jni_print_char): Fix thinko in last change.
1587
0df6c2c7
KG
1588 * gjavah.c (jni_print_char, decode_signature_piece): Use
1589 safe-ctype macros and/or fold extra calls into fewer ones.
1590 * lex.c (java_read_unicode, java_lex): Likewise.
1591 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
1592 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
1593 * mangle_name.c (append_unicode_mangled_name,
1594 unicode_mangling_length): Likewise.
1595
17ed6335
RH
15962001-10-17 Richard Henderson <rth@redhat.com>
1597
1598 * Make-lang.in (java/lang.o): Depend on langhooks.h.
1599
c83303d8
APB
16002001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
1601
1602 * lang.c (langhooks.h): Included.
1603 (LANG_HOOKS_INIT): Redefined.
1604 (LANG_HOOKS_INIT_OPTIONS): Likewise.
1605 (LANG_HOOKS_DECODE_OPTION): Likewise.
1606 (struct lang_hooks lang_hooks): New initialization.
1607
be98560f
PB
16082001-10-11 Per Bothner <per@bothner.com>
1609
89b894e1
PB
1610 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
1611 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
1612 The former is simpler, and jcf-write.c handles it better.
1613 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
1614 or WITH_CLEANUP_EXPR.
1615 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
1616 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
1617
be98560f
PB
1618 * parse.y (patch_if_else_statement): If the condition is constant,
1619 optimize away the test.
1620
3fb5c0eb
APB
16212001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
1622
1623 * parse.y (patch_cast): Call patch_string on the first operand of
c83303d8 1624 the incoming node, update it if necessary. Fixes PR java/4510.
3fb5c0eb 1625
908fecca
BM
16262001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1627
1628 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
1629 when name qualifier matches a package name.
1630
f3ca28bf
TT
16312001-10-08 Tom Tromey <tromey@redhat.com>
1632
1633 Fix for PR java/4489:
1634 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
1635 force a new label when computing `body_block'.
1636
8b60264b
KG
16372001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1638
1639 * jcf-io.c (format_uint): Const-ify.
1640 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
1641 * lex.c (java_get_line_col): Likewise.
1642 * parse.y (build_incdec): Likewise.
1643
3fb5c0eb
APB
16442001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
1645
1646 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
c83303d8 1647 a NULL enclosing context if appropriate. Fixes PR java/4466.
3fb5c0eb 1648
7754e0a9
APB
16492001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
1650
1651 * parse.y (patch_assignment): Use lvalue's original TYPE when
1652 building the final COMPOUND_EXPR.
1653 (try_reference_assignconv): Fixed leading comment.
1654
e9546ca4
APB
16552001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
1656
1657 * parse.y (check_final_variable_indirect_assignment): For
1658 COMPOUND_EXPR, return only if finals were found initialized
1659 properly, if not, keep on checking.
1660 (check_final_variable_global_assignment_flag): New local
1661 error_found, set when appropriate and used to decide whether to
1662 report uninitialized finals. Fixed typo in comment.
1663
f6a67a81
APB
16642001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
1665
1666 * decl.c (init_decl_processing): Fixed typo in predef_filenames
1667 last three initializations. Fixes PR java/4360.
1668
67231816
RH
16692001-09-21 Richard Henderson <rth@redhat.com>
1670
1671 * class.c (get_dispatch_table): Handle function descriptors.
1672 (build_dtable_decl): Likewise.
1673 * expr.c (build_invokevirtual): Likewise.
1674
870a5b8a
APB
16752001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
1676
1677 * parse.y (patch_method_invocation): Build class initialization
1678 when static finals are used to qualify method invocation.
1679 Fixes PR java/4366.
1680
2e3b2d2c
APB
16812001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
1682
1683 * parse.h: (WFL_STRIP_BRACKET): Re-written using
1684 build_type_name_from_array_name.
1685 (STRING_STRIP_BRACKETS): New macro.
1686 * parse.y (build_type_name_from_array_name): New function.
1687 (array_creation_expression:): Accumulate []s instead of [s.
1688 (cast_expression:): Accumulate []s instead of [s after cast type
1689 name.
1690 (build_array_from_name): Local string deleted, use
1691 build_type_name_from_array_name.
1692 (build_unresolved_array_type): Accumulate []s instead of [s after
1693 type name.
1694 (register_fields): Fixed comment.
1695 (resolve_class): Local name, base deleted, new locals tname and
1696 array_dims. Use build_type_name_from_array_name. Use array_dims to
1697 build array type.
1698 (purify_type_name): Use STRING_STRIP_BRACKETS.
1699
e64c46ce
AJ
17002001-09-18 Andreas Jaeger <aj@suse.de>
1701
1702 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
1703 * jv-scan.c: Likewise.
1704
3fb5c0eb
APB
17052001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
1706
1707 * parse.y (patch_method_invocation): Inner class creation context
1708 check not enforced within constructors. Fixes PR java/1873.
1709
7a91449c
TT
17102001-09-16 Tom Tromey <tromey@redhat.com>
1711
1712 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
1713 NOTE_PUSH for single-case push. Fixes PR java/4189.
1714
653d5d95
APB
17152001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
1716
1717 * java-tree.h (TYPE_IMPORT_LIST): New macro.
1718 (TYPE_IMPORT_DEMAND_LIST): Likewise.
1719 (struct lang_type): New fields import_list and import_demand_list.
1720 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
1721 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
1722 (do_resolve_class): New local saved_enclosing_type, initialized,
1723 passed as parameter to find_in_imports and find_in_imports_on_demand.
1724 (find_in_imports): Added paramater enclosing_type, use its
1725 TYPE_IMPORT_LIST when applicable.
1726 (find_in_imports_on_demand): Added parameter enclosing_type, use
1727 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
1728 declaration and initialization.
1729 (fold_constant_for_init): Switch/restore current_class to the
1730 appropriate context.
1731
6d334db8
MM
17322001-09-13 Mark Mitchell <mark@codesourcery.com>
1733
1734 * verify.c (verify_jvm_instructions): Fix typo.
1735
83182544
KG
17362001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1737
1738 * expr.c (expand_invoke): Const-ification.
1739 * parse.y (patch_method_invocation): Likewise.
1740
fd033052
KG
17412001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1742
1743 * gjavah.c (cxx_keywords): Const-ification.
1744 * keyword.gperf (java_keyword): Likewise.
1745 * lang.c (java_tree_code_name): Likewise.
1746 * lex.c (cxx_keywords): Likewise.
1747 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
1748
fcbc317f
RH
17492001-09-11 Richard Henderson <rth@redhat.com>
1750
1751 * parse.h (ctxp_for_generation): Mark extern.
1752
c347e68d
RH
17532001-09-10 Richard Henderson <rth@redhat.com>
1754
1755 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
1756
6a9f6727
MK
17572001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
1758
1759 * typeck.c (java_array_type_length, build_prim_array_type):
1760 Represent empty arrays by NULL index.
1761
0ef02b2d
APB
17622001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
1763
1764 * java-tree.h (compile_resource_file): Grouped with other prototypes.
e64c46ce 1765 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
0ef02b2d 1766
f2767a67
AG
17672001-09-06 Anthony Green <green@redhat.com>
1768
1769 * class.c (O_BINARY): Define if necessary.
1770 (registerResource_libfunc): Declare.
1771 (init_class_processing): Initilize registerResource_libfunc.
1772 (compile_resource_file): New function.
1773 * java-tree.h (resource_name): Declare.
1774 (compile_resource_file): Declare.
1775 * jcf-parse.c (yyparse): Handle compiling java resource files.
1776 * lang.c (java_decode_option): Handle -fcompile-resource option.
1777 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
1778 resource files.
1779 * gcj.texi (Code Generation): Add documentation for -R flag.
1780
731866ba
APB
17812001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
1782
1783 * jcf-write.c (generate_classfile): Issue an error in case of
1784 field/initial value mismatch.
1785 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
1786 being initialized and we're generating bytecode.
1787 (java_complete_lhs): In MODIFY_EXPR section: added comments,
1788 set DECL_INITIAL properly when appropriate.
1789 Fixes PR java/4230
1790 Fixes PR java/4204
1791
0286a91d
PB
17922001-09-01 Per Bothner <per@bothner.com>
1793
1794 * parse.y (maybe_yank_clinit): A field without an initializer is not
1795 relevant. All initializers except static final and constant require
1796 <clinit>, regardless of flag_emit_class_files.
1797
289b57ee
PB
17982001-08-31 Per Bothner <per@bothner.com>
1799
1800 * class.c (set_constant_value): When not emiting class files, then a
1801 String ConstantValue is a utf8const_ptr_type.
1802
be0c7ff4
PB
18032001-08-30 Per Bothner <per@bothner.com>
1804
1805 * jcf-write.c (generate_classfile): Check that field is primitive
1806 or string before emitting ConstantValue attribute.
e64c46ce 1807
f0cdee96
PB
18082001-08-30 Per Bothner <per@bothner.com>
1809
1810 * parse.y (resolve_qualified_expression_name): If creating a
1811 COMPOUND_EXPR, set it's type correctly.
1812
bc8a5e56
PB
18132001-08-30 Per Bothner <per@bothner.com>
1814
1815 * jcf-io.c (open_class): Set filename field.
1816
1817 * jcf-parse,c (parse_class_file): Set current_function_decl
1818 for better error message when Code attribute is missing.
1819
1820 * lang.c (put_decl_node, lang_print_error): Re-arrange for
1821 better diagnostics, especially for constructors.
e64c46ce 1822
1b9ee723
PB
18232001-08-30 Per Bothner <per@bothner.com>
1824
1825 * jcf-write.c (generate_classfile): Don't write ConstantValue
1826 attribute if field is not final, for compatibility with jdk.
1827
1828 * jcf-write.c (generate_classfile): Convert ConstantValue values
1829 to correct type. Work-around for front-end bug.
1830 * class.c (set_constant_value): Error if constant has wrong type.
1831
6e4302ec
PB
18322001-08-30 Per Bothner <per@bothner.com>
1833
1834 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
1835 "Double" are printed at verbosity 1.
1836
1837 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
1838
1839 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
1840
3ed218d4
APB
18412001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
1842
1843 * parse.y (patch_assignment): Don't verify final re-assignment here.
1844 (java_complete_lhs): Verify assignments to finals calling
1845 patch_assignment. Verify re-assignments to finals before calling
1846 patch_assignment.
1847
18482001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
1849
1850 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
1851 Fixes PR java/1413
1852
18532001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
1854
1855 * lex.c (java_lex): new local found_hex_digits. Set and then used
1856 in test to reject invalid hexadecimal numbers.
1857 * parse.y (java_complete_tree): Prevent unwanted cast with
1858 initialized floating point finals.
1859 (patch_binop): Emit a warning when detecting a division by zero,
1860 mark result not constant, don't simplify non integer division.
1861
1a27eec1
PB
18622001-08-28 Per Bothner <per@bothner.com>
1863
1864 * jcf-write.c (generate_bytecode_insns): For increments and
9a07cfaf 1865 decrements just recurse to push constant. Improvement on Mark's patch.
1a27eec1 1866
06657dcd
MM
18672001-08-28 Mark Mitchell <mark@codesourcery.com>
1868
1869 * jcf-write.c (generate_bytecode_insns): Generate an integer to
1870 real conversion for increments and decrements of reals.
1871
1ca09b48
APB
18722001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1873
1874 * parse.y (resolve_qualified_expression_name): Handle unresolved
1875 qualified expressions, prevent numerical qualifiers, fixed typo.
1876 Fixes PR java/4141
1877
7b02957e
APB
18782001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
1879
1880 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
1881 don't report anything but deprecated class when marked so. Handle
1882 VAR_DECL.
1883 (patch_method_invocation): Check deprecation on methods and types.
1884 (patch_binop): code becomes an enum tree_code, added default: to
1885 switch to handle that. Detect division by zero, try to fold and
1886 return before using a subroutine.
1887
496849ba
APB
18882001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
1889
1890 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
e64c46ce 1891 file smaller than 4 bytes.
496849ba
APB
1892 * parse.y (check_inner_circular_reference): New function.
1893 (check_circular_reference): Likewise.
1894 (array_initializer:): Accept {,}.
1895 (java_check_circular_reference): Rewritten using
1896 check_circular_reference and check_inner_circular_reference.
1897 (java_complete_expand_method): Unconditionally save and restore
1898 the unpurged exception list.
1899 (build_dot_class_method_invocation): Unmangle signature parameter.
1900
66b461ce
TT
19012001-08-21 Tom Tromey <tromey@redhat.com>
1902
1903 * decl.c (init_decl_processing): Add `throws' field to method
1904 descriptor.
1905 * class.c (make_method_value): Compute `throws' field for method.
1906
df1c5346
APB
19072001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
1908
1909 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
1910 circularity is detected.
1911 (ctors_unchecked_throws_clause_p): Fixed leading comment.
1912
c8af3574
RH
19132001-08-17 Richard Henderson <rth@redhat.com>
1914
1915 * class.c (emit_register_classes): Add align parameter to
1916 call to assemble_integer.
1917
17126208
APB
19182001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
1919
1920 * jcf-parse.c (load_class): New locals saved and class_loaded. If
1921 loading a class_or_name fails, try considering an innerclass name
1922 and load the enclosing context.
1923 * parse.y (resolve_inner_class): New function.
1924 (find_as_inner_class): Added leading comment.
1925 (register_incomplete_type): Keep the current context as enclosing
1926 context for JDEP_FIELD dependencies.
1927 (do_resolve_class): Locals new_class_decl and super initialized to
1928 NULL. Call resolve_inner_class, explore the enclosing context
1929 superclass if necessary.
1930 Fixes PR java/4007
1931
4266d0b2
TT
19322001-08-16 Tom Tromey <tromey@redhat.com>
1933
1934 * jcf-dump.c (main): Updated for change to jcf_path_seal.
1935 * gjavah.c (main): Updated for change to jcf_path_seal.
1936 * lang.c (version_flag): New global.
1937 (java_decode_option): Recognize `-version'.
1938 (java_init): Update for change to jcf_path_seal.
1939 * jcf.h (jcf_path_seal): Added `print' argument.
1940 * jcf-path.c (jcf_path_seal): Added `print' argument.
1941
e78d8e51
ZW
19422001-08-13 Zack Weinberg <zackw@panix.com>
1943
1944 * Make-lang.in (java/decl.o): Update dependencies.
1945 * decl.c: Include libfuncs.h, don't include toplev.h.
1946
17126208
APB
19472001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
1948
1949 * decl.c (init_decl_processing): exception_type_node,
1950 class_not_found_type_node, and no_class_def_found_type_node
1951 initialized. predef_filenames augmented accordingly.
1952 instinit_identifier_node initialized.
1953 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
1954 * java-tree.h (enum java_tree_index): New entries
1955 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
1956 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
1957 (exception_type_node): New macro.
1958 (class_not_found_type_node): Likewise.
1959 (no_class_def_found_type_node): Likewise.
1960 (instinit_identifier_node): Likewise.
1961 (PREDEF_FILENAMES_SIZE): Adjusted.
1962 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
1963 (struct lang_type): Fixed typo in bitfield name.
1964 (DECL_INSTINIT_P): New macro.
1965 (ID_INSTINIT_P): Likewise.
1966 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
1967 attribute.
1968 * parse.y (encapsulate_with_try_catch): New function.
1969 (generate_instinit): Likewise.
1970 (build_instinit_invocation): Likewise.
1971 (ctors_unchecked_throws_clause_p): Likewise.
1972 (add_instance_initializer): Deleted.
1973 (build_instance_initializer): Likewise.
1974 (in_instance_initializer): Likewise.
1975 (check_method_redefinition): instinit$ not to be verified.
1976 (java_complete_expand_methods): Generate instinit$, simplified code.
1977 (build_dot_class_method): Eliminated unnecessary locals. Use
1978 encapsulate_with_try_catch, removed unnecessary code.
1979 (fix_constructors): New local iii. Use build_instinit_invocation.
1980 (patch_method_invocation): Added comment.
1981 (maybe_use_access_method): Don't consider instinit$.
1982 (find_applicable_accessible_methods_list): Shorten the search for
1983 instinit$ too.
1984 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
1985 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
1986 (patch_throw_statement): Likewise. Fixed typo.
e64c46ce 1987
6ba57472
DE
19882001-08-12 David Edelsohn <edelsohn@gnu.org>
1989
1990 Revert:
1991 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1992 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
1993 ASM_FINAL_SPEC.
1994 (lang_specific_pre_link): Use set_input to set input_filename.
1995 Append `main' here.
1996 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
1997 (main): Fix definition.
1998 Strip `main' from classname.
1999 Fixes PR java/227.
2000
94aca342
ZW
20012001-08-11 Zack Weinberg <zackw@panix.com>
2002
2003 * lex.h: Don't include setjmp.h. Don't define
2004 SET_FLOAT_HANDLER or prototype set_float_handler.
2005
17126208
APB
20062001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
2007
2008 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
2009 `poplevel' in the right order.
2010
2cc07db4
RH
20112001-08-09 Richard Henderson <rth@redhat.com>
2012
2013 * Make-lang.in (class.o): Depend on TARGET_H.
2014 * class.c (emit_register_classes): Use target hooks instead of
2015 assemble_constructor and assemble_destructor.
2016
4009bb7d
APB
20172001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
2018
2019 * check-init.c (flags.h): Include
2020 (check_init): Don't report uninitialized static class
2021 initialization flags, don't free bit index when doing static class
2022 initialization optimization.
2023 (check_for_initialization): Return type changed to `unsigned int.'
2024 (attach_initialized_static_class): New function.
2025 * class.c (add_method_1): Create the initialized static class
2026 table if necessary.
2027 (finish_class): Always emit deferred inline methods.
2028 * decl.c (emit_init_test_initialization): Moved to expr.c
2029 (complete_start_java_method): Don't traverse
2030 DECL_FUNCTION_INIT_TEST_TABLE.
2031 (lang_mark_tree): Mark hash tables in function decls.
2032 * expr.c (emit_init_test_initialization): Moved from decl.c.
2033 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
2034 initialization flag, set DECL_CONTEXT and
2035 LOCAL_CLASS_INITIALIZATION_FLAG.
2036 (java_lang_expand_expr): Emit initialization code for static class
2037 initialized flags when entering block, if necessary.
2038 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
2039 * java-tree.h (flag_optimize_sci): New global variable declaration.
2040 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
2041 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
2042 (LOCAL_FINAL_P): Fixed typo in comment.
2043 (FINAL_VARIABLE_P): Likewise.
2044 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
2045 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
2046 (struct lang_decl): New fields `ict', `smic' and `cif.'
2047 (check_for_initialization): New returned value for global.
2048 (attach_initialized_static_class): New global function.
2049 (STATIC_CLASS_INIT_OPT_P): New macro.
2050 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
2051 * lang.c (java_decode_option): Handle
2052 `-fno-optimize-static-class-initialization'
2053 * parse.y (start_complete_expand_method): New function.
2054 (java_expand_method_bodies): Likewise.
2055 (attach_init_test_initialization_flags): Likewise.
2056 (adjust_init_test_initialization): Likewise.
2057 (emit_test_initialization): Likewise.
2058 (java_complete_expand_methods): Nullify abstract and native method
2059 bodies.
2060 (java_complete_expand_method): New locals `fbody', `block_body'
2061 and `exception_copy.' Reorganized: directly return on empty method
2062 bodies, call `start_complete_expand_method', remember definitely
2063 initialized static class in function, don't expand method bodies.
2064 (java_expand_classes): Call `java_expand_method_bodies' before
2065 `finish_class' when compiling to native.
2066 (resolve_expression_name): Use `orig' after building outer class
2067 field access.
2068 (patch_invoke): Remember static method invokations.
2069
47907859
RH
20702001-08-06 Richard Henderson <rth@redhat.com>
2071
9a07cfaf 2072 * class.c (emit_register_classes): Pass a symbol_ref and priority
47907859
RH
2073 to assemble_constructor.
2074
36e10d77
APB
20752001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
2076
2077 * java-tree.h (all_class_filename): New macro.
2078 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
2079 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
2080 newly created IDENTIFIER_NODE to `all_class_filename.'
2081
f2f25b6d
JS
20822001-08-01 Jeff Sturm <jsturm@one-point.com>
2083
9a07cfaf
RH
2084 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
2085 Use ggc_add_tree_root to register roots.
e64c46ce 2086
6ad7895a
APB
20872001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
2088
2089 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
2090 second operand calling check_init.
2091 * decl.c (complete_start_java_method): Swaped second and third
2092 arguments while creating WITH_CLEANUP_EXPR node.
2093 * jcf-write.c (generate_bytecode_insns): Use second operand
2094 instead of third when handling WITH_CLEANUP_EXPR.
2095 * parse.y (java_complete_lhs): Expand second operand of
2096 WITH_CLEANUP_EXPR nodes.
2097 (patch_synchronized_statement): Swaped second and third arguments
2098 while creating WITH_CLEANUP_EXPR node.
2099
9d7d8362
APB
21002001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
2101
2102 * parse.y (create_interface): Avoid cyclic inheritance report when
2103 syntax error encountered during class definition.
2104 Fixes PR java/2956
2105
578672a2
RO
21062001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2107
2108 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
2109 ASM_FINAL_SPEC.
2110 (lang_specific_pre_link): Use set_input to set input_filename.
2111 Append `main' here.
2112 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
2113 (main): Fix definition.
2114 Strip `main' from classname.
2115 Fixes PR java/227.
2116
6a65ea5b
TT
21172001-07-18 Tom Tromey <tromey@redhat.com>
2118
2119 For PR java/2812:
2120 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
2121 * lex.c (java_new_lexer): Use ICONV_CONST.
2122 (java_read_char): Likewise.
2123 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
2124 (jv-scan$(exeext)): Likewise.
2125
9d7d8362
APB
21262001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
2127
2128 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
2129 * parse.y (check_class_interface_creation): Allow `private' if the
2130 enclosing is not an interface.
2131 (create_interface): Interface tagged public if the enclosing
2132 context is an interface.
2133 (create_class): Class tagged public if the enclosing context
2134 is an interface.
2135 Fixes PR java/2959
2136
21372001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
2138
2139 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
2140 Fixes PR java/2665
2141
e6290e74
TJ
21422001-07-14 Tim Josling <tej@melbpc.org.au>
2143
2144 * check-init.c (check_init): Remove references to EXPON_EXPR.
2145
9d7d8362
APB
21462001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
2147
2148 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
2149 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
2150 Fixes PR java/3602
2151
4b2dc1b2
TT
21522001-07-13 Tom Tromey <tromey@redhat.com>
2153
2154 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
2155 invocation.
2156
b6e3e1ff
APB
21572001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
2158
2159 * parse.y (patch_method_invocation): Don't override primary if one
2160 is already provided, but let this$<n> be built. Fixed comment.
2161
21622001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
2163
2164 * parse.y (empty_statement:): Report empty statement error only
2165 when found at class declaration level.
2166 Fixes PR java/3635
2167
a3cb5122
TT
21682001-07-12 Tom Tromey <tromey@redhat.com>
2169
2170 * expr.c (expand_load_internal): New function.
2171 (LOAD_INTERNAL): Use it.
2172
29fcdaae
APB
21732001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
2174
2175 * parse.y (verify_constructor_super): Compare anonymous class ctor
2176 args with `valid_method_invocation_conversion_p.'
2177 Fixes PR java/3285
2178
2df37a59
APB
21792001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
2180
2181 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
2182 `-fsyntax-only.' Fixes PR java/3248
2183
21842001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
2185
2186 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
2187
21882001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
2189
2190 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
2191 current function is static. Fixes PR java/1970
2192
21932001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
2194
2195 * parse.y (patch_method_invocation): Add enclosing context to ctor
2196 calls if necessary. Fixes PR java/2953
2197
21982001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
2199
2200 * parse.y (resolve_package): Abort if qualified expression member
2201 isn't right.
2202 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
2203 Fixes PR java/1391
2204
74d04dd1
ZW
22052001-07-07 Zack Weinberg <zackw@stanford.edu>
2206
2207 * verify.c: Don't use // comments.
2208
af418b8c
TT
22092001-07-05 Tom Tromey <tromey@redhat.com>
2210
2211 * lang.c (flag_assume_compiled): Removed.
2212 * java-tree.h (flag_assume_compiled): Removed.
2213 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
2214 -fhash-synchronization, -fuse-divide-subroutine,
2215 -fcheck-references, -femit-class-file, -femit-class-files,
2216 -fassume-compiled. Updated --encoding information. Changed
2217 -foutput-class-dir to `-d'.
2218
84a5b4f8
DB
22192001-07-04 Daniel Berlin <dan@cgsoftware.com>
2220
2221 * jcf-parse.c (parse_class_file): Add lineno parameter to
2222 debug_start_source_file call.
2223
0671eaf6
JM
22242001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
2225
2226 * gcj.texi: Use gpl.texi.
2227 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
2228 dependencies and use doc/include in search path.
2229
9be7529d
JS
22302001-07-03 Jeff Sturm <jsturm@one-point.com>
2231
2232 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
2233 `this'. If so, don't build instance initializers.
2234
51e23701
APB
22352001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
2236
2237 * parse.y (resolve_expression_name): Improved error message for
2df37a59 2238 inner class cases. Fixes PR java/1958
51e23701 2239
46f018e1
GDR
22402001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
2241
2242 * lang.c: #include diagnostic.h
2243 (lang_print_error): Add a `diagnostic_context *' parameter.
2244 (java_dummy_print): Likewise.
2245 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
2246
51e23701
APB
22472001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
2248
2249 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
2250 * jcf.h (typedef struct JCF): New bitfield `finished.'
2251 (JCF_FINISH): Set `finished.'
2252 (JCF_ZERO): Reset `finished.'
2253 Fixes PR java/2633
2254
22552001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
2256
2257 * parse.y (class_body_declaration:): Don't install empty instance
2258 initializers.
2259 Fixes PR java/1314
2260
4a70e37e
APB
22612001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
2262
2263 * class.c (set_super_info): Call `set_class_decl_access_flags.'
2264 (set_class_decl_access_flags): New function.
2265 * java-tree.h (set_class_decl_access_flags): New prototype.
2266 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
2267 (parse_class_file): New local `decl_max_locals.' Take wide types
2268 into account to compute DECL_MAX_LOCALS.
2269 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
2270 imports on demand.
2271
561a0365
JM
22722001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
2273
2274 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
2275
8e41c4f3
APB
22762001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
2277
2278 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
2279 * parse.y (do_resolve_class): Moved comments out to leading comment
2280 section. Removed local `start', New local `_ht' and
2281 `circularity_hash.' Record `enclosing' in hash table and search
2282 it to detect circularity. Use `enclosing' as an argument to
2283 `lookup_cl.' Free the hash table when done.
2284
c01b7cdf
TT
22852001-06-19 Tom Tromey <tromey@redhat.com>
2286
2287 * lex.c (java_read_char): Disallow invalid and overlong
2288 sequences. Fixes PR java/2319.
2289
21a6bb3c
JS
22902001-06-05 Jeff Sturm <jsturm@one-point.com>
2291
2292 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
2293
0c90837b
APB
22942001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
2295
2296 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
2297 arguments accordingly.
2298
1347cc4f
JM
22992001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
2300
2301 * gcj.texi: Move contents to just after title page.
2302
12e248d6
APB
23032001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
2304
2305 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
2306 builtin type.
2307 (patch_incomplete_class_ref): Build the class ref, build the class
2308 init if necessary, complete the tree.
2309 Fixes PR java/2605
2310
19559012
APB
23112001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
2312
2313 * parse.y (lookup_field_wrapper): Test `name' code.
2314 (resolve_qualified_expression_name): Test `qual_wfl' code.
2315 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
2316 handle `qual_wfl' by code.
2317 (maybe_build_primttype_type_ref): Test `wfl' code.
2318
eb153223
TP
23192001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2320
2321 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
2322 fdl.texi.
2323 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
2324 the dvi file in the java directory.
2325
88657302
RH
23262001-05-25 Sam TH <sam@uchicago.edu>
2327
2328 * gen-table.pl javaop.h jcf.h lex.h,
2329 parse.h: Fix header include guards.
2330
719f0fde
JM
23312001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
2332
2333 * jv-scan.c (version): Update copyright year.
2334
075516bc
PB
23352001-05-21 Per Bothner <per@bothner.com>
2336
2337 * jcf-parse.c (read_class): If class is from .class or .zip file
2338 and it's already been read, don't push/pop parser context.
2339
9d289604
PB
23402001-05-18 Per Bothner <per@bothner.com>
2341
2342 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
9a07cfaf 2343 command line so the jvgenmain-generated main program comes first.
9d289604 2344
48187504
TT
23452001-05-15 Tom Tromey <tromey@redhat.com>
2346
2347 * class.c (build_utf8_ref): Don't generate identifier based on
2348 utf8const contents.
2349
f17f1898
RH
23502001-05-12 Richard Henderson <rth@redhat.com>
2351
2352 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
2353 * expr.c (java_lang_expand_expr): Expand it.
2354 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
2355 calling build_exception_object_ref.
2356 * parse.y (catch_clause_parameter): Likewise.
2357 (build_dot_class_method): Likewise.
2358 (try_reference_assignconv): Likewise.
2359 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
2360 * jcf-write.c (generate_bytecode_insns): Likewise.
2361
352b3f3f
APB
23622001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
2363
2364 * parse.y (build_unresolved_array_type): Set
2365 EXPR_WFL_QUALIFICATION on the newly created wfl.
2366 Fixes PR java/2538. Fixes PR java/2535.
2367
41ee0877
APB
23682001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
2369
17126208 2370 * parse.y (fix_constructors): Removed unnecessary assignment to
41ee0877
APB
2371 local. Moved assignment to `this$<n>', fixed comments and
2372 indentation.
2373 (build_wfl_wrap): Fixed indentation.
2374 Fixes PR java/2598, java/2579 and java/2658.
2375
4def8930
MD
23762001-05-03 Mo DeJong <mdejong@redhat.com>
2377
9a07cfaf 2378 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
4def8930
MD
2379 check for byte swap.
2380
8fc6a63c
JS
23812000-05-02 Jeff Sturm <jsturm@one-point.com>
2382
2383 * expr.c (build_class_init): Move MODIFY_EXPR
2384 outside of COND_EXPR. Remove variable `call'.
2385
3e411c3f
KG
23862001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2387
2388 * decl.c: NULL_PTR -> NULL.
2389 * jcf-write.c: Likewise.
2390
0cd015ea
TT
23912001-05-01 Tom Tromey <tromey@redhat.com>
2392
2393 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
2394 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
2395 * gcj.texi: Updated copyright text. Include fdl.texi.
2396 (Top): Link to new node.
2397
6a117d00
PB
23982001-05-01 Per Bothner <per@bothner.com>
2399
2400 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
2401
063df563
PB
24022001-05-01 Per Bothner <per@bothner.com>
2403
2404 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
2405 import_list contains the name, not the TREE_PURPOSE.
2406
962584ea
KG
24072001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2408
2409 * jcf-io.c (read_zip_member): Cast to long in comparison with
2410 signed value.
2411
2412 * jvspec.c (lang_specific_driver): Initialize variables.
2413
2414 * mangle.c (find_compression_record_match): Likewise.
2415
2416 * typeck.c (build_null_signature): Provide static prototype. Mark
2417 parameter with ATTRIBUTE_UNUSED.
2418
2419 * verify.c (verify_jvm_instructions): Initialize variable.
2420
86d9e8d8
BM
24212001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2422
2423 * parse.y (do_resolve_class): Check for cyclic inheritance during
e64c46ce 2424 inner class resolution.
86d9e8d8 2425
9c491eb8
PB
24262001-04-27 Per Bothner <per@bothner.com>
2427
2428 * parse.y (java_expand_classes): Don't change ctxp_for_generation
2429 while iterating, since that could cause gc to lose stuff.
2430
56fe39c8
PB
24312001-04-26 Per Bothner <per@bothner.com>
2432
2433 Fix method search wrt scope of inner classes to match JLS2.
2434 * typeck.c (build_null_signature): New static function.
2435 (has_method): New function. Uses build_null_signature and lookup_do.
2436 * java-tree.h (has_method): New declaration.
2437 * parse.y (find_applicable_accessible_methods_list): Do not search
2438 context of inner classes here.
2439 (patch_method_invocation): Search scope, ie. current and outer clases,
2440 for method matching simple name, to find class.
2441
8789b9fa
PB
24422001-04-26 Per Bothner <per@bothner.com>
2443
2444 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
2445 Fix thinko: If a single case, use if_icmpeq, not ifeq.
2446
2447 * constants.c (find_methodref_with_class_index): New function.
2448 (find_methodref_index): Use find_methodref_with_class_index.
2449 * java-tree.h (find_methodref_with_class_index): New declaration.
2450 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
2451 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
2452 If context changed from interface to class, don't use invokeinterface.
2453
5acea42b
PB
24542001-04-25 Per Bothner <per@bothner.com>
2455
2456 * verify.c (verify_jvm_instructions): For field instructions,
2457 check that field index is valid. For invoke instructions, check that
2458 method index is valid.
2459
dd6f3662
AO
24602001-04-25 Alexandre Oliva <aoliva@redhat.com>
2461
2462 * config-lang.in (target_libs): Copy from $libgcj_saved.
2463
28f7d9d0
BM
24642001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2465
2466 * decl.c (init_decl_processing): Add new class "protectionDomain"
2467 field.
2468 * class.c (make_class_data): Set initial value for "protectionDomain".
2469
d4c3ec27
KG
24702001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2471
2472 * jvspec.c (lang_specific_driver): Fix memory allocation
2473 deficit, by using concat in lieu of xmalloc/sprintf.
2474
3c0ce750
PB
24752001-04-20 Per Bothner <per@bothner.com>
2476
2477 Fixes to compile multiple .class files at once.
2478 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
2479 * java-tree.h (CLASS_PARSED_P): New macro.
2480 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
2481 * jcf-parse.c (jcf_parse_source): Inline into read_class.
2482 (read_class): Avoid some code duplication.
2483 Don't call JCF_FINISH for a .class file - might be needed later.
2484 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
2485 rather than CLASS_LOADED_P, since latter implies class laid out.
2486 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
2487 * parse.y: Don't need to set CLASS_LOADED_P for array types.
2488
d6684bc8
KG
24892001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2490
2491 * Make-lang.in (java/boehm.o): Depend on toplev.h.
2492
2493 * boehm.c: Include toplev.h.
2494
10e2af38
TT
24952001-04-06 Tom Tromey <tromey@redhat.com>
2496 Alexandre Petit-Bianco <apbianco@redhat.com>
2497
2498 Fix for PR gcj/1404 and PR gcj/2332:
2499 * parse.y (build_array_from_name): If we use the type_wfl then
2500 accumulate dimensions from the original type as well.
2501 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
2502
2d9fea5d
TT
25032001-04-06 Tom Tromey <tromey@redhat.com>
2504
2505 * parse.y (analyze_clinit_body): Return true if the second operand
2506 of a METHOD_EXPR is nonzero.
2507
613bb86e
TT
25082001-04-06 Tom Tromey <tromey@redhat.com>
2509
2510 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
2511 directory.
2512 ($(srcdir)/java/parse.c): Likewise.
2513
8b66cd8f
APB
25142001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
2515
2516 * gcj.texi: Use `which-gcj' instead of `which-g77.'
2517 (version-gcc): Initialized.
2518 (which-gcj): Likewise.
2519
73c299fc
APB
25202001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
2521
2522 * java-tree.h (struct lang_decl): New macro
2523 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
2524 * parse.y (build_instance_initializer): New function.
2525 (add_instance_initializer): Use it.
2526 (java_fix_constructors): Set `current_class' before fix pass.
2527 (fix_constructors): Just return if already fixed. Move `super()'
2528 invokation ahead. Use `build_instance_initializer.'
2529 Fixes PR java/1315.
2530
93a6eb78 25312001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
e64c46ce 2532
93a6eb78
APB
2533 * parse.y (resolve_qualified_expression_name): Pass field's
2534 DECL_CONTEXT to `not_accessible_p.'
2535 (not_accessible_p): Changed parameters order in `inherits_from_p'
2536 invokation.
2537
4956c16e
AH
25382001-03-27 Andrew Haley <aph@cambridge.redhat.com>
2539
2540 * lang-options.h: Add flag_check_references.
2541
3cc48399
PB
25422001-04-04 Per Bothner <per@bothner.com>
2543
2544 * java-tree.h (CONSTANT_VALUE_P): New macro.
2545 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
2546 * parse.y (maybe_build_class_init_for_field): New static function.
2547 (resolve_expression_name, resolve_field_access): Use
e64c46ce 2548 maybe_build_class_init_for_field instead of build_class_init
3cc48399
PB
2549 This does not do the init if the field is compile-time-constant.
2550 (resolve_field_access): Simplify.
2551
2552 * parse.y (fold_constant_for_init): Merge test into switch.
2553
d02af173
ZW
25542001-04-03 Zack Weinberg <zackw@stanford.edu>
2555
2556 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
2557 on gansidecl.h.
2558 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
2559
44a2150d
ZW
25602001-04-02 Zack Weinberg <zackw@stanford.edu>
2561
2562 * expr.c (pop_type_0): Save the result of the first
e64c46ce 2563 lang_printable_name call in a scratch buffer, so it
44a2150d
ZW
2564 won't be clobbered by the second call.
2565
de307574
APB
25662001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
2567
2568 * parse-scan.y (array_type:): Rewritten.
2569 (type_declaration:): `empty_statement' replaces `SC_TK.'
2570 (class_member_declaration:): `empty statement' added.
2571 (method_body:): Simplified.
2572 (static_initializer:): Likewise.
2573 (primary_no_new_array:): Use `type_literals.'
2574 (type_literals:): New rule.
2575 (dims:): Set and update `bracket_count.'
2576 Fixes PR java/1074. Fixes PR java/2412.
2577
2ff50199
APB
25782001-03-28 Hans Boehm <boehm@acm.org>
2579
2580 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
2581 (get_boehm_type_descriptor): Set type on returned value to be a
2582 pointer length integer.
2583
80122075
KG
25842001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2585
2586 * expr.c (pop_type_0): Call `concat' rather than building the
2587 string manually.
2588 (pop_type): Add format specifier in call to `error'.
2589
2590 * parse.y (patch_method_invocation): Avoid casting away
2591 const-ness.
2592
0f5c1ee4
JO
25932001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
2594
2595 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
2596
52a11cbf
RH
25972001-03-28 Richard Henderson <rth@redhat.com>
2598
2599 IA-64 ABI Exception Handling:
2600 * Make-lang.in (except.o): Don't depend on eh-common.h.
2601 * check-init.c (check_init): Handle EXC_PTR_EXPR.
2602 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
2603 [soft_exceptioninfo_call_node]: Remove.
2604 [eh_personality_libfunc, lang_eh_runtime_type]: New.
2605 (end_java_method): No emit_handlers.
2606 * except.c (java_set_exception_lang_code): Remove.
2607 (method_init_exceptions): Don't call it.
2608 (prepare_eh_table_type): No CATCH_ALL_TYPE.
2609 (build_exception_object_ref): New.
2610 (expand_end_java_handler): Update for except.h name changes.
2611 (emit_handlers, expand_resume_after_catch): Remove.
2612 * expr.c (java_lang_expand_expr): Update for except.h name changes.
2613 (process_jvm_instruction): Use build_exception_object_ref.
2614 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
2615 (soft_exceptioninfo_call_node): Remove.
2616 (build_exception_object_ref): Declare.
2617 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
2618 soft_exceptioninfo_call_node. Move processing ...
2619 [EXC_PTR_EXPR]: ... here.
2620 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
2621 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
2622 (source_end_java_method): No java_set_exception_lang_code or
2623 emit_handlers.
2624 (build_dot_class_method): Use build_exception_object_ref.
2625 (try_reference_assignconv): Check EXC_PTR_EXPR not
2626 soft_exceptioninfo_call_node.
2627
ce1c98ea
RH
26282001-03-28 Richard Henderson <rth@redhat.com>
2629
2630 * java-tree.h (throw_node): Define as a single member of
2631 java_global_trees instead of a separate array.
2632 (JTI_THROW_NODE): New.
2633 * decl.c (throw_node): Don't declare.
2634 (init_decl_processing): Init a scalar throw_node.
2635 Don't register it for gc.
2636 * check-init.c (check_init): Reference scalar throw_node.
2637 * expr.c (build_java_athrow): Likewise.
2638 * jcf-write.c (generate_bytecode_insns): Likewise.
2639 * parse.h (BUILD_THROW): Likewise.
2640
da7da8f9
RH
26412001-03-28 Richard Henderson <rth@redhat.com>
2642
2643 * decl.c (end_java_method): Do not save and restore
2644 flag_non_call_exceptions.
2645 * parse.y (source_end_java_method): Likewise.
2646 * lang.c (flag_exceptions): Don't declare.
2647 (java_init_options): Set flag_non_call_exceptions. Set
2648 flag_exceptions here ...
2649 (java_init): ... not here.
2650
531073e7
RH
26512001-03-27 Richard Henderson <rth@redhat.com>
2652
2653 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
2654 exceptions_via_longjmp.
2655
461fc4de
RH
2656 * lang.c (flag_new_exceptions): Don't declare it.
2657 (java_init_options): Or set it.
2658
c1e9f663
RH
26592001-03-27 Richard Henderson <rth@redhat.com>
2660
2661 * decl.c (end_java_method): Rename asynchronous_exceptions to
2662 flag_non_call_exceptions.
979988f3 2663 * parse.y (source_end_java_method): Likewise.
c1e9f663 2664
911e6107
KG
26652001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2666
2667 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
2668
b850de4f
MM
26692001-03-26 Mark Mitchell <mark@codesourcery.com>
2670
2671 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
2672
ce06965e
APB
26732001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
2674
2675 * parse.y (find_as_inner_class): Follow current package
2676 indications not to mistakingly load an unrelated class.
2677
cb9b7a8c
KG
26782001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2679
2680 * constants.c (PUTN): Use memcpy, not bcopy.
2681
2682 * lex.c (java_read_char): Use memmove, not bcopy.
2683
2684 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
2685
fa029f45
PB
26862001-03-23 Per Bothner <per@bothner.com>
2687
2688 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
2689 macro for better error pin-pointing.
2690 * java-tree.h: Fix typo in comment.
2691
2692 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
2693 Don't include jsr/goto in exception range.
2694 Check if start and end of exception range are the same (also TRY_EXPR).
2695 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
2696 However, do emit the following goto even if try_block is empty.
2697 Defer freeing exception_decl until after the finalizer, to make
2698 sure the local isn't reused in the finalizer. Fixes PR java/1208.
2699
2700 * parse.y (java_complete_lhs): If the try-clause is empty, just
2701 return the finally-clause and vice versa.
2702
b124f72e
APB
27032001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
2704
2705 * gcj.texi (Input Options): documented the check for attribute
2706 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
2707 * java-tree.h (flag_force_classes_archive_check): Declared extern.
2708 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
2709 (jcf_parse): Check for the right classes archive if necessary.
2710 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
2711 (jcf_parse_fields): Fixed indentation.
2712 * jcf-write.c (append_gcj_attribute): New function.
2713 (generate_classfile): Compute the attribute count, invoke
2714 `append_gcj_attribute'.
2715 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
2716 turned into bit fields. New bit field `right_zip.'
2717 (JCF_ZERO): Set `right_zip' to zero.
2718 * lang-options.h (-fforce-classes-archive-check): Added flag.
2719 * lang.c (flag_force_classes_archive_check): New flag.
2720 (lang_f_options): New entry `force-classes-archive-check.'
2721 Fixes PR java/1213.
2722
4ff17c6a
AH
27232001-02-07 Andrew Haley <aph@redhat.com>
2724
2725 * gcj.texi (Configure-time Options): Add -fcheck-references.
2726 * expr.c (build_java_indirect_ref): New function.
3e02b1c3 2727 (java_check_reference): New function.
4ff17c6a
AH
2728 (build_java_array_length_access): Use build_java_indirect_ref to
2729 check for null references.
2730 (build_java_arrayaccess): Likewise.
2731 (build_get_class): Likewise.
2732 (build_field_ref): Likewise.
2733 (invoke_build_dtable): Likewise.
2734 (build_invokeinterface): Likewise.
2735 * lang.c (lang_f_options): Add flag_check_references.
2736 * jvspec.c (jvgenmain_spec): Add flag_check_references.
2737 * java-tree.h (flag_check_references): New variable.
2738 * lang.c (flag_check_references): Likewise.
e64c46ce 2739 * parse.y (patch_invoke): Use java_check_reference.
3e02b1c3
AH
2740 (patch_assignment): Allow for extra nesting in
2741 _Jv_CheckArrayStore.
4ff17c6a 2742
f2a29271
BM
27432001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
2744
2745 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
2746 * lex.c (cxx_keywords): Likewise.
2747
2ff50199
APB
27482001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
2749
2750 * parse.y (qualify_ambiguous_name): Broaden `length'
2751 recognition. Help MODIFY_EXPR be resolved as expression names.
2752 Fixes PR java/2066. Fixes PR java/2400.
2753
60c87482
BM
27542001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
2755
e64c46ce 2756 * gjavah.c (process_file): Mark interface definitions with
60c87482
BM
2757 "__attribute__ ((java_interface))".
2758
96c6f628
APB
27592001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
2760
2761 * class.c (layout_class): Fixed push_super_field's second
2762 argument. Fixes PR java/2333.
2763 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
2764 too early to lay innerclasses out.
2765
7abecd65
TT
27662001-03-20 Tom Tromey <tromey@redhat.com>
2767 Alexandre Petit-Bianco <apbianco@redhat.com>
2768
2769 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
2770 inside an array reference. Insertion of the array store check
2771 rewritten. Fixes PR java/2299.
2772
4aed8938
TT
27732001-03-20 Tom Tromey <tromey@redhat.com>
2774
2775 * lex.c (java_read_unicode): Only accept leading `u's.
2776
ddd705d1
TT
27772001-03-20 Tom Tromey <tromey@redhat.com>
2778
2779 * jcf-parse.c (read_class): Initialize `class'.
2780
de83bf66
MK
27812001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
2782
2783 * jcf_parse.c (jcf_parse): Eliminate unused variable.
2784
92643fea
MM
27852001-03-19 Mark Mitchell <mark@codesourcery.com>
2786
2787 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
2788 (layout_class): Likewise.
2789 (layout_class_method): Likewise.
2790 (emit_register_classes): Likewise.
2791 * decl.c (builtin_function): Likewise.
2792 (give_name_to_locals): Likewise.
2793
54646811
PB
27942001-03-19 Per Bothner <per@bothner.com>
2795
80fc2e84
PB
2796 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
2797 before trying to load an inner class.
2798
54646811
PB
2799 Fixes to process to command-line .class files in two passes.
2800 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
2801 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
2802 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
2803 * class.c (is_compiled_class): Fix for renamed flag.
2804 * parse.y (maybe_create_class_interface_decl): Likewise.
2805 * jcf-parse.c (yyparse): Also set if compiling .class files.
2806 * jcf-parse.c (read_class); Read current_class.
2807 (jcf_parse): Make static.
2808 (load_inner_classes): New function, with code moved from jcf_parse,
2809 because we need to inner classes after the command-line files are read.
2810 (yyparse): Set finput to NULL when it doesn't need to be closed.
2811 Reduce use of main_jcf (basically only for archive) and
2812 use finput instead of main_jcf->read_state.
2813 Inline jcf_figure_file_type into yyparse.
2814 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
2815 Defer load_inner_classes and parse_class_file to a second pass,
2816 after we've correctly mapped command-line .clas fiels to classes.
2817 (jcf_figure_file_type): Removed.
2818 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
2819 (JCF_ZERO): Also clear zipd field.
2820 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
2821
28222001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
2823
2824 * jcf-parse.c (yyparse): Change ch from char * to char.
2825
8b1edcee
PB
28262001-03-19 Per Bothner <per@bothner.com>
2827
2828 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
2829 Add constructed filelist-file at end, following -xjava. Thus any .o
2830 and library files are not affected by the -xjava. Also wrap
54646811 2831 explicit @FILE with -xjava and -xnone.
8b1edcee 2832
6bc5f6cb
AH
28332001-03-19 Andrew Haley <aph@cambridge.redhat.com>
2834
9a07cfaf
RH
2835 * class.c (build_static_field_ref): Call make_decl_rtl() after
2836 setting the DECL_EXTERNAL flag.
6bc5f6cb 2837
daaaf29f
PB
28382001-03-17 Per Bothner <per@bothner.com>
2839
90f59043
PB
2840 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
2841
478e7ed6
PB
2842 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
2843 when result is is needed (target is STACK_TARGET).
2844
daaaf29f 2845 * parse.h (JDEP_SOLV): Removed.
d148b6aa 2846 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
daaaf29f 2847
d148b6aa
PB
2848 * parse.y (incomplete_class_list): Removed.
2849 (obtain_incomplete_type): Don't use or set incomplete_class_list.
2850 It doesn't work if resolve_class changes the name of an array type
2851 that is on the list and then someone else looks for the modified name.
2852 Also, seems liable to break when compiling multiple source files at
2853 once. So the simplest is to just remove incomplete_class_list -
2854 it is only a minor space win and it is not even clear it saves time.
daaaf29f
PB
2855
2856 * parse.y (resolve_class): Remove unneeded promote_type.
2857
4763d38f
PB
28582001-03-15 Per Bothner <per@bothner.com>
2859
b16e8f08
PB
2860 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
2861 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
2862 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
2863 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
8b1edcee 2864
3a2e5926
PB
2865 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
2866 * parse.y (java_expand_classes): Likewise.
8b1edcee 2867
47a50de9
PB
2868 * parse.y (expand_start_java_method): Was only called once and had a
2869 misleading name, so inline in caller java_complete_expand_method.
3a2e5926 2870 (enter_a_block): Likewise inline in enter_block and remove.
47a50de9 2871
4763d38f
PB
2872 Remove junk from when gcc/java was created (by copying from C/C++).
2873 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
2874 (struct binding_level): Remove fields keep, keep_if_subblocks,
2875 more_cleanups_ok, have_cleanups (which have never been used).
2876 (pushlevel, poplevel): Remove related useless code.
19f8e04b 2877
69ca5554
PB
2878 * class.c (make_class_data): The class_dtable_decl (i.e. the
2879 vtable for Class) should be external, except when compiling Class.
2880
7d32abcd
PB
2881 * jvspec.c (lang_specific_driver): Fix -C handling.
2882 Check -save-temps to see if temp @FILE should be deleted.
2883 Follow-up to/fix for February 16 patch.
2884
19f8e04b
PB
2885 * verify.c (verify_jvm_instructions): Better error msgs for dup.
2886 (type_stack_dup): Remove no-longer neded error check.
2887
551bf03c
BM
28882001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
2889
2890 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
2891 to 'for_pointer'. If this type is for a pointer (argument) mangling,
e64c46ce 2892 don't surround the element with 'N..E' if the type name is
551bf03c
BM
2893 unqualified.
2894
19e7881c
MM
28952001-03-14 Mark Mitchell <mark@codesourcery.com>
2896
d1d61788
MM
2897 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
2898 DECL_RTL_SET_P, etc.
19e7881c
MM
2899 (make_method_value): Likewise.
2900 (get_dispatch_table): Likewise.
2901
2902 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8b1edcee 2903
bcacc465
TT
29042001-03-07 Tom Tromey <tromey@redhat.com>
2905
2906 * config-lang.in (lang_requires): Define.
2907
de6c5979
BL
29082001-03-07 Brad Lucier <lucier@math.purdue.edu>
2909
2910 * typeck.c (convert): Check flag_unsafe_math_optimizations,
2911 not flag_fast_math.
2912
6d37cf2f
PB
29132001-03-05 Per Bothner <per@bothner.com>
2914
2915 Fix a problem where rest_of_decl_compilation applied to
2916 class_dtable_decl causes problems because it was done too early,
2917 before output file was opened.
2918 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
2919 * class.c (class_dtable_decl): Add macro - element of class_roots.
2920 (make_class_data): Define class_dtable_decl.
2921 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
2922
d6edb99e
ZW
29232001-03-01 Zack Weinberg <zackw@stanford.edu>
2924
2925 * java/class.c, java/decl.c, java/java-tree.h: Replace all
2926 uses of 'boolean' with 'bool'.
2927
f7143427
ZW
29282001-03-01 Zack Weinberg <zackw@stanford.edu>
2929
2930 * lang-specs.h: Add zero initializer for cpp_spec field to all
2931 array elements.
2932
fea2d5da
PB
29332001-02-16 Per Bothner <per@bothner.com>
2934
2935 Handle compiling multiple input files at once, and @FILE syntax.
e4087691 2936 * gcj.texi: Updated documentation to match.
fea2d5da
PB
2937 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
2938 * jcf-parse.c (parse_source_file): Split into ...
2939 (parse_source_file_1): New function - and:
2940 (parse_source_file_2): New function.
2941 (yyparse): On -ffilelist-file, open and scan named file.
2942 On first pass over files, only do parse_source_file_1.
2943 A new second pass calls parse_source_file_2 for each file to compile.
2944 (init_jcf_parse): Call init_src_parse.
2945 * jvspec.c (INDIRECT_FILE_ARG): New flag.
2946 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
2947 as multiple input file combined in one compilation.
2948 * lang-options.h: Add -ffilelist-file
2949 * lang.c (flag_filelist_file): New flag variable.
2950 (lang_f_options): Handle -ffilelist-file.
2951 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
2952 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
2953 gclass_list - use global fields of src_parse_roots instead.
2954 * parse.y (src_parse_roots): New array.
2955 (incomplete_class_list, gclass_list): New macros.
2956 (push_parser_context, java_pop_parser_context,
2957 java_parser_context_resume): Don't fiddle with deleted fields.
2958 (various): Use incomplete_class gclass_list and global macros
2959 instead of parse_ctxt fields - the lists are global.
2960 (init_src_parse): New function.
2961
9b58f739
RK
2962Fri Feb 23 15:28:39 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2963
2964 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
2965
064a552c
APB
29662001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
2967
2968 * parse.y (check_inner_class_access): Moved declaration of local
2969 `enclosing_decl_type' to the right location.
2970
a648f4e4
BM
29712001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
2972
e64c46ce 2973 * parse.y (parser_check_super_interface): Don't call
a648f4e4 2974 check_pkg_class_access for an inner interface.
e64c46ce 2975 (parser_check_super): Don't call check_pkg_class_access for inner
a648f4e4 2976 class.
e64c46ce 2977 (do_resolve_class): Simplify enclosing type loop. Don't call
a648f4e4
BM
2978 check_pkg_class_access if CL and DECL are not set.
2979 (find_in_imports_on_demand): Set DECL if class_type needed to be
2980 loaded. Don't call check_pkg_class_access for an inner class.
2981 (check_inner_class_access): Rewritten to implement member access
2982 rules as per spec 6.6.1.
2983 (check_pkg_class_access): Handle the empty package correctly.
2984 (in_same_package): New function. Determine if two classes are in the
2985 same package.
2986
35ab11f0
BM
29872001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
2988
2989 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
2990 method into array types.
2991 * parse.y (patch_method_invocation): Bypass access check on clone call
2992 to array instance.
e64c46ce 2993
055adbaa
APB
29942001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
2995
2996 * expr.c (build_instanceof): Check for arrays when trying fold to
2997 false.
2998
e658449e
JM
29992001-02-15 Jim Meyering <meyering@lucent.com>
3000
fd48c9b5
DD
3001 * Make-lang.in (java.install-common): Depend on `installdirs'.
3002 (java.install-info): Likewise.
e658449e 3003
4238a754
BM
30042001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
3005
3006 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
3007
e101152f 30082001-02-14 Tom Tromey <tromey@redhat.com>
9a07cfaf 3009 Alexandre Petit-Bianco <apbianco@cygnus.com>
e101152f 3010
055adbaa
APB
3011 Fix for PR java/1261.
3012 * typeck.c (build_java_array_type): Add public `clone' method to
3013 arrays.
3014 * parse.y (resolve_qualified_expression_name): Use current_class
e101152f 3015 when checking for inaccessibility.
055adbaa 3016 (patch_method_invocation): Fixed error message when accessibility
e101152f
APB
3017 denied. Added `from_super' argument.
3018
30192001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
3020
3021 * parse.y (resolve_class): Don't build a fake decl. Use the one
3022 already built.
3023 * typeck.c (build_java_array_type): Build and assign decl to array
3024 type.
3025
30262001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
3027
3028 * parse.y (not_accessible_p): Changed leading comment. Added extra
3029 `where' argument. Use it to enforce protected access rules.
3030 (resolve_qualified_expression_name): Added extra argument to
3031 not_accessible_p.
3032 (patch_method_invocation): Use argument `primary' to provide
3033 not_accessible_p with an extra argument.
3034 (lookup_method_invoke): Added extra argument to not_accessible_p.
3035 (search_applicable_method_list): Likewise.
3036
863cd85a
APB
30372001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
3038
3039 * parse.y (resolve_qualified_expression_name): Try to resolve as
3040 an inner class access only if `decl' is a TYPE_DECL.
3041
94807d33
APB
30422001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
3043
3044 * decl.c (classdollar_identifier_node): Initialize.
e64c46ce 3045 * java-tree.h (enum java_tree_index): New entry
94807d33
APB
3046 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
3047 (classdollar_identifier_node): New macro.
3048 (ID_CLASSDOLLAR_P): Likewise.
3049 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
3050 (build_dot_class_method_invocation): Likewise.
3051 (find_applicable_accessible_methods_list): `class$' can't be
3052 inherited.
3053
30f87f1a
APB
30542001-02-09 Raja R Harinath <harinath@cs.umn.edu>
3055
3056 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
3057
30582001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
3059
3060 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
3061 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
3062 gone.
3063
1e97aa40
APB
30642001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
3065
3066 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
3067 outside of the `__U' sequence too.
3068 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
3069 sequence too.
3070
a395f5ab
APB
30712001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
3072
3073 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
3074
1b43b6be
APB
30752001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
3076
3077 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
3078 (JVGENMAIN_OBJS): Likewise.
e64c46ce 3079 * java-tree.h (append_gpp_mangled_name): New prototype.
1b43b6be
APB
3080 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
3081 Removed cast calling `gcc_add_root.'
3082 * jvgenmain.c (mangle_obstack): New global, initialized.
3083 (main): Use it.
3084 (do_mangle_class): Constify local `ptr.'
3085 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
3086 append_gpp_mangle_name and update `count' if necessary.
3087 Use `mangle_obstack.'
3088 * mangle.c (append_unicode_mangled_name): Removed.
3089 (append_gpp_mangled_name): Likewise.
3090 (unicode_mangling_length): Likewise.
3091 (mangle_member_name): Return type set to `void.'
3092 (mangle_field_decl): Don't append `U' in escaped names.
3093 (mangle_method_decl): Likewise.
3094 (mangle_member_name): Just use `append_gpp_mangled_name.'
3095 * mangle_name.c: New file.
3096
4a83be51
PB
30972001-02-07 Per Bothner <per@bothner.com>
3098
3099 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
3100
3101 * check-init.c (check_init): Don't call done_alternative after
3102 processing loop code, as a LOOP_EXPR never terminates normally.
3103
7e5fd99f
JM
31042001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
3105
3106 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
3107
1456345e
APB
31082001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
3109
3110 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
3111 DECLs.
3112
77aff9f9
TT
31132001-02-06 Tom Tromey <tromey@redhat.com>
3114
3115 * lex.c (java_new_lexer): Longer error message.
3116
c00dd14e
JS
31172001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
3118 Alexandre Petit-Bianco <apbianco@cygnus.com>
3119
3120 * typeck.c (build_prim_array_type): Added leading comment.
3121 (build_java_array_type): Moved locals out of
3122 block. Always create the `data' field, fixed alignment to match
3123 C++.
3124
6d091870
TT
31252001-02-04 Tom Tromey <tromey@redhat.com>
3126
3127 * expr.c (java_lang_expand_expr): Don't bother recomputing
3128 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
3129 Fixes PR java/1866.
3130
1ebb5e73
APB
31312001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
3132
3133 * parse.y (process_imports): Save the original name of the import
3134 for better error report.
3135
ca5b1ff8
BM
31362001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
3137
3138 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
3139 of macros used when compiling jvspec.c.
3140 * jvspec.c (lang_specific_driver): Link with the shared
3141 libgcc by default.
3142
400500c4
RK
3143Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3144
3145 * check-init.c (check_init): Call internal_error instead of fatal.
3146 * expr.c (java_lang_expand_expr): Likewise.
3147 * jcf-parse.c (get_constant): Likewise.
3148 * mangle.c (java_mangle_decl): Likewise.
3149 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
3150 (operator_string): Likewise.
3151 * check-init.c (check_init): Call abort instead of fatal.
3152 * class.c (build_class_ref): Likewise.
3153 * constants.c (write_constant_pool): Likewise.
3154 * decl.c (start_java_method): Likewise.
3155 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
3156 (java_stack_dup, encode_newarray_type): Likewise.
3157 (build_java_array_length_access): Likewise.
3158 (build_java_check_indexed_type, expand_java_pushc): Likewise.
3159 (build_java_soft_divmod, build_invokeinterface): Likewise.
3160 * java-tree.h (INNER_CLASS_P): Likewise.
3161 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
3162 (give_name_to_class, get_class_constant): Likewise.
3163 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
3164 (find_constant_index, generate_bytecode_conditional): Likewise.
3165 (generate_bytecode_insns, perform_relocations): Likewise.
3166 * lex.c (java_unget_unicode, java_lex): Likewise.
3167 * mangle.c (mangle_type, mangle_record_type): Likewise.
3168 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
3169 (finish_mangling): Likewise.
3170 * parse.h (MARK_FINAL_PARMS): Likewise.
3171 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
3172 (obtain_incomplete_type, java_complete_class): Likewise.
3173 (java_check_regular_methods, java_complete_expand_method): Likewise.
3174 (cut_identifier_in_qualified, check_deprecation): Likewise.
3175 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
3176 (java_complete_lhs, lookup_name_in_blocks): Likewise.
3177 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
3178 * typeck.c (set_local_type, parse_signature_type): Likewise.
3179 (parse_signature_string, build_java_signature): Likewise;
3180 (set_java_signature): Likewise.
3181 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
3182 * class.c (add_method): Call fatal_error instead of fatal.
3183 (build_static_field_ref): Likewise.
3184 * expr.c (build_known_method_ref, expand_invoke): Likewise.
3185 * jcf-parse.c (get_constant, jcf_parse): Likewise.
3186 * lex.c (java_new_new_lexer): Likewise.
3187 * jv-scan.c (main): Likewise.
3188 (fatal_error): Renamed from fatal.
3189 * jcf-parse.c (yyparse): Call fatal_io_error instead of
3190 pfatal_with_name.
3191 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
3192 (yyparse): Likewise.
3193 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
3194 * lex.c (java_get_line_col): Likewise.
3195 * jcf-parse.c (load_class): Make errors non-fatal.
3196 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
e64c46ce 3197
4bae4eb5
BM
31982001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
3199
3200 * jvgenmain.c (class_mangling_suffix): Remove unused string.
3201 (error): Remove unused function.
3202 (main): Don't use "__attribute__ alias" on generated class symbol.
3203
c0b00d37
APB
32042001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
3205
3206 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
3207 argument.
3208 * parse.y (finish_method_declaration): Code accounting for WFLed
3209 method DECL_NAMEs deleted.
3210 (check_abstract_method_definitions): Likewise.
3211 (resolve_type_during_patch): Layout resolved type.
3212 * typeck.c (lookup_do): Removed unused local.
3213
4bae4eb5 32142001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
eb59e547
BM
3215
3216 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
3217 * decl.c (init_decl_processing): Use integer_minus_one_node, not
3218 integer_negative_one_node.
3219 * expr.c (build_java_binop): Likewise.
3220
4bae4eb5 32212001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
7be00c49
JS
3222
3223 * zextract.c (read_zip_archive): Read file_offset before writing
3224 zipd and consequently clobbering the header contents.
3225
c913b6f1
KG
32262001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3227
3228 * Make-lang.in: Remove all dependencies on defaults.h.
3229 * decl.c: Don't include defaults.h.
3230 * expr.c: Likewise.
3231 * parse.y: Likewise.
3232
c4faeb92
APB
32332001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
3234
3235 * ChangeLog (2001-01-21): Fixed typo.
3236 * class.c (layout_class_method): Code accounting for WFLed
3237 method DECL_NAMEs deleted.
3238 * constant.c (find_methodref_index): Likewise.
3239 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
3240 * java-tree.h (DECL_FUNCTION_WFL): New macro.
3241 (struct lang_decl): New field `wfl'.
3242 (java_get_real_method_name): Prototype deleted.
3243 * mangle.c (mangle_method_decl): Code accounting for WFLed
3244 method DECL_NAMEs deleted.
3245 * parse.h (GET_METHOD_NAME): Macro deleted.
3246 * parse.y (reset_method_name): Deleted.
3247 (method_header): Set DECL_FUNCTION_WFL.
3248 (check_abstract_method_header): Code accounting for WFLed method
3249 DECL_NAMEs deleted.
3250 (java_get_real_method_name): Deleted.
3251 (check_method_redefinition): Code accounting for WFLed method
3252 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
3253 (java_check_regular_methods): Likewise.
3254 (java_check_abstract_methods): Likewise.
3255 (java_expand_classes): Don't call `reset_method_name.'
3256 (search_applicable_method_list): Use DECL_NAMEs instead of
3257 GET_METHOD_NAME.
3258 * typeck.c (lookup_do): Code accounting for WFLed method
3259 DECL_NAMEs deleted.
3260
97876d66
RE
32612001-01-25 Richard Earnshaw <rearnsha@arm.com>
3262
3263 * lex.c (java_read_char): Check for EOF from getc first.
3264
493d561d
APB
32652001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
3266
3267 * class.c (layout_class): Don't lay the superclass out if it's
3268 already being laid out.
3269 * jcf-parse.c (handle_innerclass_attribute): New function.
3270 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
3271 handle_innerclasses_attribute.
3272 (jcf_parse): Don't load an innerclasses if it's already being
3273 laid out.
3274 * jcf-write.c (append_innerclass_attribute_entry): Static
3275 `anonymous_name' and its initialization deleted. `ocii' and `ini'
3276 to be zero for anonymous classes.
3277
32782001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
3279
3280 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
3281 necessary.
3282 * jcf-parse.c (set_source_filename): Use
3283 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
3284
32852001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
3286
3287 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
3288 gets a unique asm name.
3289
32902001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
3291
3292 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
3293 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
3294 if necessary.
3295 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
3296 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
3297 * parse.y (lookup_package_type_and_set_next): Deleted.
3298 (resolve_package): Removed unnecessary code.
3299 (find_applicable_accessible_methods_list): `finit$' can't be
e64c46ce 3300 inherited.
493d561d
APB
3301 * verify.c (pop_argument_types): Added missing prototype.
3302
7c01b2b5
BM
33032001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
3304
3305 * config-lang.in: Disable java by default.
3306
80261b56
TT
33072001-01-23 Tom Tromey <tromey@redhat.com>
3308
3309 * gcj.texi (Copying): New node.
3310 Added copyright information.
3311
a4796c80
PB
33122001-01-21 Per Bothner <per@bothner.com>
3313
3314 Various fixes to allow compiling a compressed .jar/.zip archive.
3315 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
3316 (struct ZipFile): Add fields name and next (from ZipFileCache).
3317 (struct ZipDirectory): New field zipf points to owning ZipFile.
3318 * jcf.h (struct ZipDirectory): Add forward declaration.
3319 (struct JCF): Declare zipd field to have type struct ZipDirectory.
3320 Remove seen_in_zip and zip_offset fields.
3321 (JCF_SEEN_IN_ZIP): New macro.
3322 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
3323 * jcf-io.c: Change all ZipFileCache to ZipFile.
3324 (read_zip_member): New function.
3325 (open_in_zip): Call read_zip_member.
3326 * jcf-parse.c (find_in_current_zip): Remove function.
3327 (read_class): Merge in find_in_current_zip functionality.
3328 Call read_zip_member if needed.
3329 (parse_zip_file_entries): Use read_zip_member.
3330 (process_zip_dir): Update for removed and added JCF fields.
3331 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
3332
b5c4fed9
PB
33332001-01-21 Per Bothner <per@bothner.com>
3334
3335 Minor optimization of static ggc roots.
3336 * jcf-parse.c (parse_roots): New static field.
3337 (current_field, current_method, current_file_list): Replace by macros
3338 naming fields of parse_roots.
3339 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
3340 * class.c (class_roots): New static field.
3341 (registered_class, fields_ident, info_ident, class_list):
3342 New macros naming fields of parse_roots.
3343 (build_static_field_ref): Don't register roots here.
3344 (layout_class): Static field list replaced by macro class_list.
3345 (init_class_processing): Call ggc_add_tree_root for 4 roots.
3346 Initialize fields_ident and info_ident here.
3347
3432b91b
PB
33482001-01-21 Per Bothner <per@bothner.com>
3349
3350 * jcf-parse.c (ggc_mark_jcf): New function.
3351 (init_jcf_parse): Register current_jcf as ggc root.
3352
2c36c7fd
PB
33532001-01-21 Per Bothner <per@bothner.com>
3354
3355 * lang.c (put_decl_node): Print method's name.
3356
9c0c88ac
PB
33572001-01-21 Per Bothner <per@bothner.com>
3358
3359 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
3360 (verify_jvm_instructions): Use it, for better error messages on loads.
3361
230cbd5f
PB
33622001-01-21 Per Bothner <per@bothner.com>
3363
c4faeb92 3364 * verify.c (merge_type_state): Still may have to merge even if
230cbd5f
PB
3365 LABEL_VERIFIED (label).
3366
e6b6db0d
PB
33672001-01-21 Per Bothner <per@bothner.com>
3368
3369 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
3370 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
3371
b57300bc
PB
33722001-01-19 Per Bothner <per@bothner.com>
3373
3374 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
3375 if expeting an interface type. Refines Tom's change of 2000-09-12.
3376
ee08d4cc
PB
33772001-01-18 Per Bothner <per@bothner.com>
3378
3379 * gcj.texi (Input Options): Mention .java files.
3380
b1117741
APB
33812001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
3382
3383 * lang-options.h (-Wunsupported-jdk11): Removed.
3384 * lang.c (flag_not_overriding): Deleted.
3385 (flag_static_local_jdk1_1): Likewise.
3386 (lang_W_options): Removed "unsupported-jdk11" entry.
3387 * parse.y (java_check_methods): Removed dead code.
3388
2dc73168
TT
33892001-01-17 Tom Tromey <tromey@redhat.com>
3390
3391 Changes suggested by Per Bothner:
3392 * gcj.texi (Input Options): Don't mention input files.
3393 (Code Generation): Updated --main information.
3394 (Invoking jcf-dump): Mention that --javap is incomplete.
3395 From Alexandre Petit-Bianco:
3396 (Warnings): Don't mention -Wunsupported-jdk11.
3397 My stuff:
3398 (Compatibility): Mention JDK 1.2-ness of libraries.
3399 (Resources): Mention resources used when writing gcj.
3400
bc65b5ec
TT
34012001-01-17 Tom Tromey <tromey@redhat.com>
3402
3403 * gcj.texi: New file.
3404 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
3405 (java.info): Depend on gcj.info.
3406 (java/gcj.dvi): New target.
3407 (java.dvi): Depend on gcj.dvi.
3408 (java.install-info): Wrote.
3409
930f6690
JS
34102001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
3411
3412 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
3413 having called make_decl_rtl.
3414
00b4575d
PB
34152001-01-14 Per Bothner <per@bothner.com>
3416
984ad2c6
PB
3417 Various patches to emit better messages on verification errors.
3418 * expr.c (push_type_0): Return error indication on stack overflow,
3419 instead of callinfg fatal.
3420 (push_type): Now just call push_type_0 (nd fatal on overflow).
3421 (pop_type_0): Return detailed error message (in a char** argument).
3422 (pop_type): If pop_type_0 fails, print error message.
3423 (pop_argument_types): Moved to verify.c.
3424 * verify.c (pop_argument_types): Moved from expr.c.
3425 Return a (possible) error message, rather than void.
3426 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
3427 (verify_jvm_instruction): Use new macros, improving error messages.
3428 For case OPCODE_astore use object_ptr_type_node.
3429 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
3430 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
3431
00b4575d
PB
3432 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
3433 constant, return body without wrapper. (Improves constant folding.)
3434 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
3435
d9da31dd
PB
34362001-01-13 Per Bothner <per@bothner.com>
3437
3438 * expr.c (expand_java_field_op): Assigning to a final field outside
3439 an initializer does not violate JVM spec, so should be warning, not
3440 error. (Sun's verifier does not complain - though MicroSoft's does.)
e64c46ce 3441
a67a383a
JM
34422001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
3443
3444 * gjavah.c (version), jcf-dump.c (version): Update copyright year
3445 to 2001.
3446
7e1376a1
BM
34472001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
3448
3449 * parse.y (resolve_expression_name): Permit instance variables from
3450 enclosing context in super constructor call.
3451 (resolve_qualified_expression_name): Permit enclosing class's qualified
3452 "this" in super constructor call.
3453
6c418184
MM
34542001-01-10 Mark Mitchell <mark@codesourcery.com>
3455
3456 * class.c (build_utf8_ref): Remove last argument in call to
3457 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
3458 (build_class_ref): Likewise.
3459 (build_static_field_ref): Likewise.
3460 (get_dispatch_table): Likewise.
3461 (layout_class_method): Likewise.
3462 (emit_register_classes): Likewise.
3463 * constants.c (build_constant_data_ref): Likewise.
3464 * decl.c (builtin_function): Likewise.
3465 (create_primitive_vtable): Likewise.
3466 * expr.c (build_known_method_def): Likewise.
3467 (build_jni_stub): Likewise.
3468 (java_lang_expand_expr): Likewise.
e64c46ce 3469
0adc3d8a
TT
34702001-01-10 Tom Tromey <tromey@redhat.com>
3471
3472 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
3473
761491c8
APB
34742001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
3475
3476 * java-tree.h (lang_printable_name_wls): New prototype.
3477 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
3478 rather than `current_class' to print type name. Don't prepend type
3479 names when printing constructor names.
3480 (lang_printable_name_wls): New function.
3481 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
3482 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
3483 * parse.y (patch_method_invocation): Message tuned for constructors.
3484 (not_accessible_p): Grant `private' access from within
3485 enclosing contexts.
e64c46ce 3486
dc08e603
APB
34872001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
3488
3489 All files with updated copyright when applicable.
3490 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
3491 * class.c (mangle_class_field): Function removed.
3492 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
3493 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
3494 (build_class_ref): Call `java_mangle_class_field' instead of
3495 `mangle_class_field.'
3496 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
e64c46ce 3497 (layout_class): Call `java_mangle_decl' instead of
dc08e603
APB
3498 `mangle_static_field.'
3499 (cxx_keywords): Initialized static array moved to `lex.c.'
3500 (layout_class_method): Changed leading comment. Simplified to
3501 call `java_mangle_decl.' Local `ptr' moved in for loop body.
3502 * decl.c (lang_mark_tree): Mark field `package_list.'
3503 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
3504 (struct lang_type): New field `package_list.'
3505 (unicode_mangling_length): Prototype removed.
3506 (append_gpp_mangled_name, append_gpp_mangled_classtype,
3507 emit_unicode_mangled_name): Likewise.
3508 (cxx_keyword_p): New prototype.
3509 (java_mangle_decl, java_mangle_class_field,
3510 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
3511 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
3512 `build_expr_wfl.'
3513 * jvgenmain.c (main_method_prefix): Global variable removed.
3514 (main_method_suffix): Likewise.
3515 (do_mangle_classname): New function.
a83f01f0 3516 (main): Call it. Format changed to accommodate new mangling scheme.
dc08e603
APB
3517 * lex.c: (utf8_cmp): Conditionally prototyped.
3518 (cxx_keywords): Moved from class.c, conditionally defined.
3519 (utf8_cmp, cxx_keyword_p): Likewise.
3520 * mangle.c (obstack.h, ggc.h): Included.
3521 (mangle_field_decl): New function.
3522 (mangle_method_decl, mangle_type, mangle_pointer_type,
3523 mangle_array_type, mangle_record_type,
3524 find_compression_pointer_match, find_compression_array_match,
3525 find_compression_record_match,
3526 find_compression_array_template_match, set_type_package_list,
3527 entry_match_pointer_p, emit_compression_string, init_mangling,
3528 finish_mangling, compression_table_add, mangle_member_name): Likewise.
3529 (mangle_obstack): New global.
3530 (MANGLE_RAW_STRING): New macro.
3531 (unicode_mangling_length): Turned static.
3532 (append_unicode_mangled_name): Renamed from
3533 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
3534 replaces `obstack', removed from the parameter list.
3535 (append_gpp_mangled_name): Turned static. `mangle_obstack'
e64c46ce 3536 replaces parameter `obstack', removed from the parameter list. Call
dc08e603
APB
3537 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
3538 (append_gpp_mangled_classtype): Removed.
3539 (compression_table, compression_next): New static variables.
3540 * parse.y (temporary_obstack): Extern declaration removed.
3541
761491c8
APB
35422001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
3543
3544 * parse.y (patch_binop): Compute missing type in error situations.
3545
5bb11b2e
BM
35462001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
3547
3548 * class.c (make_class_data): Push initial value for "arrayclass".
3549 * decl.c (init_decl_processing): Add new class field "arrayclass".
3550
ac39dac0
BM
35512001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
3552
3553 From patha@softlab.ericsson.se:
e64c46ce 3554 * parse.y (switch_label): Use build, not build1, to construct
ac39dac0
BM
3555 DEFAULT_EXPR.
3556
a5a4ce3c
NB
35572001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
3558
3559 * lang.c (lang_decode_option): Change -MA to -MP.
3560 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
3561 Update to new prototype; do quote targets.
3562 (jcf_dependency_write): Update.
3563
d27fd99a
BM
35642000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
3565
3566 Shorten primitive array allocation path:
3567 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
3568 to create new primitive arrays.
e64c46ce 3569 * expr.c (build_newarray): If generating native code, call
d27fd99a
BM
3570 soft_newarray_node with a reference to the primitive TYPE identifier
3571 instead of type_value.
e64c46ce 3572
c1eacb70
BM
35732000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
3574
3575 Fix for PRs gcj/312 and gcj/253:
3576 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
3577 dest if they arn't already.
e64c46ce 3578 * class.c (layout_class): Call maybe_layout_super_class on
c1eacb70
BM
3579 superinterfaces also, but only if compiling from bytecode.
3580
6d003d5c
BM
3581 Fix for PR gcj/373:
3582 * parse.y (create_class): Set ACC_STATIC if class is declared in an
3583 interface.
3584
325de66c
TT
35852000-12-15 Tom Tromey <tromey@redhat.com>
3586
3587 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
3588 set.
3589
e35990c4
AH
35902000-12-14 Andrew Haley <aph@redhat.com>
3591
3592 * boehm.c (mark_reference_fields): Change test to correctly detect
3593 bitmap overflow.
3594
53714cda
AJ
35952000-12-15 Andreas Jaeger <aj@suse.de>
3596
3597 * config-lang.in (lang_dirs): Added.
3598
1e0cdc10
APB
35992000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
3600
3601 * parse.y (end_artificial_method_body): Fixed undefined behavior.
3602 Credits go to rth for finding it.
3603
e9e42530
MS
36042000-12-13 Mike Stump <mrs@wrs.com>
3605
3606 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
3607
3f27e3f8
TT
36082000-11-07 Tom Tromey <tromey@cygnus.com>
3609
3610 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
3611 * lex.c (java_ignorable_control_p): Removed.
3612 (java_letter_or_digit_p): Removed.
3613 (java_start_char_p): New function.
3614 (java_read_char): Return `int', not `unicode_t'. Changed
3615 callers.
3616 (java_read_unicode): Likewise.
3617 (java_read_unicode_collapsing_terminators): Likewise.
3618 (java_get_unicode): Likewise.
3619 (java_new_lexer): Initialize hit_eof.
3620 (java_parse_end_comment): Take `int' argument.
3621 (java_parse_doc_section): Likewise.
3622 (java_parse_escape_sequence): Don't allow backlash-newline.
3623 Return `int'.
3624 * lex.h (JAVA_DIGIT_P): Removed.
3625 (_JAVA_LETTER_OR_DIGIT_P): Removed.
3626 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
3627 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
3628 (JAVA_PART_CHAR_P): New macro.
3629 (UEOF): Now -1.
3630 (JAVA_CHAR_ERROR): Now -2.
3631 (java_lexer): New field `hit_eof'.
3632 * chartables.h: New file.
3633 * gen-table.pl: new file.
3634
568aac9c 36352000-11-20 Tom Tromey <tromey@cygnus.com>
9a07cfaf 3636 Alexandre Petit-Bianco <apbianco@cygnus.com>
568aac9c
TT
3637
3638 * parse.y (java_complete_lhs): Only allow compound assignment of
3639 reference type if type is String.
3640
f34ff6d6
APB
36412000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
3642
3643 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
3644 jcf-path.c: Likewise.
3645
6e5589e8
AG
36462000-12-09 Anthony Green <green@redhat.com>
3647
3648 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
3649 filestart and filename_length as int values.
3650
8000caee
MD
36512000-12-07 Mo DeJong <mdejong@redhat.com>
3652
3653 * jcf-io.c (find_class): Correct the logic that tests to see if a
3654 .java file is newer than its .class file. The compiler was
3655 incorrectly printing a warning when file mod times were equal.
3656
f6bbde28
ZW
36572000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
3658
3659 * jvgenmain.c: Use ISPRINT not isascii.
3660
46142b26
APB
36612000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
3662
3663 * parse.y (end_artificial_method_body): Fixed typo.
3664
f8b93ea7
APB
36652000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
3666
3667 * parse.y (patch_method_invocation): Pick the correct enclosing
3668 context when creating inner class instances.
3669 Fixes gcj/332.
3670
45441c5b
JM
36712000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
3672
3673 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
3674 Update copyright year to 2000.
3675
1510057a
AG
36762000-11-23 Anthony Green <green@redhat.com>
3677
3678 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
3679 Move current_file_list out of yyparse and make it static.
3680
3681 * expr.c: Declare quick_stack and tree_list_free_list as static
3682 (init_expr_processing): Register quick_stack and
3683 tree_list_free_list roots.
3684
5e18f6d6
APB
36852000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
3686
3687 * parse.y (build_outer_field_access): New local `decl_ctx', use
3688 it. Check for field's context and current class immediate outer
3689 context inheritance.
3690 (outer_field_access_p): Consider fields inherited from the last
3691 enclosing context.
3692 (build_access_to_thisn): Stop at the last enclosing context if
3693 necessary.
3694 Fixes gcj/367.
3695
9196ece5
R
3696Thu Nov 23 02:19:14 2000 J"orn Rennecke <amylaar@redhat.com>
3697
3698 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
3699
c385cdf6
BM
37002000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
3701
3702 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
3703 scratch buffer.
3704
1535cc88
TT
37052000-11-20 Tom Tromey <tromey@cygnus.com>
3706
3707 * jv-scan.c (help): Document --complexity.
3708 (options): Added --complexity.
3709 (flag_complexity): New global.
3710 (main): Call `report'.
3711 * parse-scan.y (complexity): New global.
3712 (if_then_statement, if_then_else_statement,
3713 if_then_else_statement_nsi, switch_block_statement_group,
3714 while_expression, do_statement, for_begin, continue_statement,
3715 throw_statement, catch_clause, finally, method_invocation,
3716 conditional_and_expression, conditional_or_expression,
3717 conditional_expression): Update complexity.
3718 (reset_report): Reset complexity.
3719 (report): New function.
3720
d828bc42
TT
37212000-11-20 Tom Tromey <tromey@cygnus.com>
3722
3723 * lex.c (yylex): Added STRICT_TK case.
3724 * parse.y (STRICT_TK): Added.
3725 * parse-scan.y (STRICT_TK): Added.
3726 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
3727 `;'. Use 4, not 3, with -k option. Correctly rename resulting
3728 file.
3729 * keyword.h: Rebuilt.
3730 * keyword.gperf (strictfp): Added.
3731
4e7842a0
TT
37322000-11-20 Tom Tromey <tromey@cygnus.com>
3733
3734 * lex.c (yylex): Recognize floating point constants with leading
3735 0.
3736
7e9355c6
KG
37372000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3738
3739 * java-tree.h (cyclic_inheritance_report): Constify.
3740 * parse.y (cyclic_inheritance_report): Likewise.
3741
a8a05998
ZW
37422000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
3743
3744 * parse.y (goal): Remove call to ggc_add_string_root.
3745
520a57c8
ZW
37462000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
3747
3748 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
3749 Create string in scratch buffer, then pass to build_string.
3750
88f3c477
JM
37512000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
3752
3753 * parse.y (issue_warning_error_from_context): Add
3754 ATTRIBUTE_PRINTF.
3755
ac51395d
AG
37562000-11-11 Anthony Green <green@redhat.com>
3757
3758 * jcf-parse.c (process_zip_dir): Add finput parameter.
3759 (jcf_figure_file_type): Call process_zip_dir with appropriate
3760 argument.
3761
4e135bdd
KG
37622000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3763
3764 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
3765 * jcf-parse.c (jcf_figure_file_type): Likewise.
3766
2e09e75a
JM
37672000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
3768
3769 * parse.y (create_new_parser_context): Use memset () instead of
3770 bzero ().
3771
136c35df
TT
37722000-11-08 Tom Tromey <tromey@cygnus.com>
3773
3774 * gjavah.c (process_file): Only include gcj/cni.h when generating
3775 CNI stubs.
3776
961192e1
JM
37772000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
3778
3779 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
3780 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
3781 instead of bzero ().
3782
099a5150
TT
37832000-11-05 Tom Tromey <tromey@cygnus.com>
3784
3785 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
3786 * lex.c (IS_ZERO): New define.
3787 (java_perform_atof): Error on floating point underflow.
3788
cbf53a1d
TT
37892000-11-04 Tom Tromey <tromey@cygnus.com>
3790
3791 * lex.c (java_parse_escape_sequence): Only read two octal
3792 characters if the first one is greater than 3. Don't allow
3793 "octal" numbers to include the digits 8 or 9.
3794
436a88a6
JM
37952000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
3796
3797 * Make-lang.in (java.distdir): Remove.
3798
747800ee
TT
37992000-11-03 Tom Tromey <tromey@cygnus.com>
3800
4e2c8d44
TT
3801 * Make-lang.in (java.dvi): New target.
3802 Partial fix for PR other/567.
3803
b7436b72
TT
3804 * lang-options.h: Mention -Wout-of-date.
3805 * jcf-dump.c (flag_newer): New global.
3806 * gjavah.c (flag_newer): New global.
3807 * jcf-io.c (find_class): Only warn when flag_newer set.
3808 * lang.c (flag_newer): New global.
3809 (struct string_option): New declaration.
3810 (lang_W_options): New global.
3811 (process_option_with_no): New function.
3812 (lang_decode_option): Use it.
3813
0160fbe1
TT
3814 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
3815 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
3816 `$'.
3817
747800ee
TT
3818 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
3819 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
3820 * lex.c (java_read_unicode): Removed `term_context' argument.
3821 Recognize any number of `u' in `\u'.
3822 (java_read_unicode_collapsing_terminators): New function.
3823 (java_get_unicode): Use it.
3824 (java_lineterminator): Removed.
3825 (yylex): Produce error if character literal is newline or single
3826 quote. Return if eof found in middle of `//' comment. EOF in
3827 `//' comment is only an error if pedantic.
3828 (java_ignorable_control_p): New function.
3829 (java_parse_end_comment): Return if eof found in middle of
3830 comment.
3831 Include flags.h.
3832 * jv-scan.c (pedantic): New global.
3833
ee5f86dc
APB
38342000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
3835
3836 * parse.y (outer_field_access_p): Inherited fields aren't
3837 consider outer fields.
3838 (maybe_build_thisn_access_method): Use
3839 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
3840 (resolve_expression_name): Trigger an error if a static field
3841 is being accessed as an outer field.
3842
7ccd2fc9 38432000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
f6bbde28 3844
7ccd2fc9
APB
3845 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
3846 Fixes gcj/365.
3847
b8dad04b
ZW
38482000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
3849
3850 * Make-lang.in: Move all build rules here from Makefile.in,
3851 adapt to new context. Wrap all rules that change the current
3852 directory in parentheses. Expunge all references to $(P).
3853 When one command depends on another and they're run all at
3854 once, use && to separate them, not ;. Add OUTPUT_OPTION to
3855 all object-file generation rules. Delete obsolete variables.
3856
3857 * Makefile.in: Delete.
3858 * config-lang.in: Delete outputs= line.
3859
2cb3951d
APB
38602000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
3861
3862 * parse.y (patch_method_invocation): NULLify this_arg when already
3863 inserted.
3864 (maybe_use_access_method): Handle call to methods unrelated to the
3865 current class. Fixed comment.
3866 Fixes gcj/361.
3867
ee5f86dc
APB
38682000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
3869
3870 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
3871 scope.
3872
07b5e470
TT
38732000-10-24 Tom Tromey <tromey@cygnus.com>
3874
3875 * lex.c (java_new_lexer): Initialize new fields. Work around
3876 broken iconv() implementations.
3877 (java_read_char): Swap bytes if required. Use fallback decoder if
3878 required.
3879 (byteswap_init, need_byteswap): New globals.
3880 (java_destroy_lexer): Only close iconv handle if it is in use.
3881 * lex.h (java_lexer): New fields read_anything, byte_swap,
3882 use_fallback.
3883 Made out_buffer unsigned.
3884
8ac1de05
APB
38852000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
3886
3887 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
3888 where an enclosing context can be set on the jdep.
3889 (do_resolve_class): Fixed identation.
3890
80393943
KG
38912000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3892
3893 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
f6bbde28 3894
80393943
KG
3895 * jcf-reader.c (peek_attribute, skip_attribute): Only define
3896 when requested.
3897
3898 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
3899
3900 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
3901
c7303e41
APB
39022000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
3903
3904 * jcf-write.c (OP1): Update `last_bc'.
3905 (struct jcf_block): Fixed indentation and typo in comments. New
3906 field `last_bc'.
3907 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
3908 follows `monitorenter'.
3909 * parse.y (patch_synchronized_statement): New local `tmp'. Call
3910 `patch_string'.
3911 Fixes gcj/232.
3912
316a06a1
TT
39132000-10-16 Tom Tromey <tromey@cygnus.com>
3914
3915 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
3916 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
3917 * lang-options.h: Added -MA, -MT, -MF..
3918 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
3919 (DEPEND_TARGET_SET): New macro.
3920 (DEPEND_FILE_ALREADY_SET): Likewise.
3921 (init_parse): Handle new flags.
3922 * jcf.h (jcf_dependency_print_dummies): Declare.
3923 * Make-lang.in (s-java): Added mkdeps.o.
3924 * Makefile.in (BACKEND): Added mkdeps.o.
3925 (../gcjh$(exeext)): Added mkdeps.o.
3926 (../jcf-dump$(exeext)): Added mkdeps.o.
3927 * jcf-depend.c: Include mkdeps.h.
3928 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
3929 add_entry): Removed.
3930 (jcf_dependency_reset): Rewrote.
3931 (dependencies): New global.
3932 (jcf_dependency_set_target): Rewrote.
3933 (jcf_dependency_add_target): Likewise.
3934 (jcf_dependency_add_file): Likewise.
3935 (munge): Removed.
3936 (print_ents): Removed.
3937 (jcf_dependency_write): Rewrote.
3938 (print_dummies): New global.
3939 (jcf_dependency_print_dummies): New function
3940 (jcf_dependency_write): Call deps_dummy_targets if required.
3941
dba41d30
APB
39422000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
3943
3944 * gjavah.c (add_class_decl): Removed unused variables `tname',
3945 `tlen' and `name_index'.
3946 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
3947 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
3948 in `wfl_operator' with value.
3949 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
3950 (jcf_figure_file_type): Fixed identation.
3951 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
3952 * parse.y (analyze_clinit_body): New function.
3953 (static_initializer:): Reset `current_static_block'.
3954 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
3955 `wfl_operator' with new value.
3956 (lookup_cl): Use EXPR_WFL_FILENAME.
3957 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
3958 analyze_clinit_body.
3959 (build_outer_field_access): Access to this$<n> built from
3960 current_class, not its outer context.
3961 (build_access_to_thisn): Fixed leading comment. Tidied things up.
f6bbde28 3962 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
dba41d30
APB
3963 (patch_method_invocation): Use `is_static_flag' when already
3964 initialized.
3965 (patch_newarray): Removed assignment in ternary operator.
3966
1a2ebe6d
APB
39672000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
3968
dba41d30 3969 * except.c (free_eh_ranges): Don't free `whole_range'.
1a2ebe6d 3970
8e7ab3ff
AG
39712000-10-15 Anthony Green <green@redhat.com>
3972
3973 * decl.c (init_decl_processing): Call init_class_processing before
3974 anything else.
3975
c7303e41
APB
39762000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
3977
3978 * check-init.c (check_init): Fixed leading comment. Use
3979 LOCAL_FINAL_P.
3980 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
3981 (give_name_to_locals): Likewise.
3982 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
3983 fields in lang_decl_var.
3984 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
3985 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
3986 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
3987 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
3988 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
3989 (LOCAL_FINAL): Rewritten.
3990 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
3991 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
3992 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
3993 `init_final' fields.
3994 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
3995 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
3996 (TYPE_HAS_FINAL_VARIABLE): New macro.
3997 (struct lang_type): Added `afv' field.
3998 * parse.y (check_static_final_variable_assignment_flag): New function.
3999 (reset_static_final_variable_assignment_flag): Likewise.
4000 (check_final_variable_local_assignment_flag): Likewise.
4001 (reset_final_variable_local_assignment_flag): Likewise.
4002 (check_final_variable_indirect_assignment): Likewise.
4003 (check_final_variable_global_assignment_flag): Likewise.
4004 (add_inner_class_fields): Use LOCAL_FINAL_P.
4005 (register_fields): Handle local finals and final variables.
4006 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
4007 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
4008 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
4009 on local finals.
4010 (java_complete_expand_methods): Loop to set
4011 TYPE_HAS_FINAL_VARIABLE. Call
f6bbde28 4012 `reset_final_variable_local_assignment_flag' and
c7303e41
APB
4013 `check_final_variable_local_assignment_flag' accordingly before
4014 and after constructor expansion. Call
4015 `reset_static_final_variable_assignment_flag'
f6bbde28 4016 before expanding <clinit> and after call
c7303e41
APB
4017 `check_static_final_variable_assignment_flag' if the
4018 current_class isn't an interface. After all methods have been
4019 expanded, call `check_final_variable_global_assignment_flag' and
4020 `check_static_final_variable_assignment_flag' if the current class
f6bbde28 4021 is an interface.
c7303e41
APB
4022 (maybe_yank_clinit): Fixed typo in comment.
4023 (build_outer_field_access_methods): Removed old sanity check. Use
4024 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
4025 Don't create access methods for finals.
4026 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
4027 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
f6bbde28 4028 existing DECL_INIT has been processed.
c7303e41
APB
4029 (java_complete_lhs): Likewise.
4030 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
4031 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
4032 logic.
4033 (patch_assignment): Use LOCAL_FINAL_P.
4034 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
4035 DECL_INITIAL is nullified.
4036 Fixes gcj/163.
4037
4b945402
KG
40382000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4039
4040 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
f6bbde28 4041
4b945402
KG
4042 * Makefile.in (parse.c, parse-scan.c): Likewise.
4043
1f8f4a0b
MM
40442000-10-12 Mark Mitchell <mark@codesourcery.com>
4045
4046 * class.c (temporary_obstack): Remove.
4047 (make_class): Don't mess with obstascks.
4048 (push_class): Likewise.
4049 (set_super_info): Likewise.
4050 (add_method_1): Likewise.
4051 (add_method): Likewise.
4052 (add_field): Likewise.
4053 (build_utf8_ref): Likewise.
4054 (build_class_ref): Likewise.
4055 (build_static_field_ref): Likewise.
4056 (finish_class): Likewise.
4057 (push_super_field): Likewise.
4058 (layout_class): Likewise.
4059 (layout_class_methods): Likewise.
4060 (init_class_processing): Likewise.
4061 * constants.c (get_tag_node): Likewise.
4062 (build_constant_data_ref): Likewise.
4063 * decl.c (ggc_p): Remove.
4064 (copy_lang_decl): Use ggc_alloc.
4065 (complete_start_java_method): Don't mess with obstacks.
4066 (start_java_method): Likewise.
4067 (end_java_method): Likewise.
4068 * except.c (link_handler): Use xmalloc.
4069 (free_eh_ranges): New function.
4070 (method_init_exceptions): Use it.
4071 (add_handler): Use xmalloc.
4072 (expand_start_java_handler): Don't mess with obstacks.
4073 (prepare_eh_table_type): Likewise.
4074 (expand_end_java_handler): Likewise.
4075 * expr.c (push_value): Likewise.
4076 (create_label_decl): Likewise.
4077 (build_jni_stub): Likewise.
4078 (java_lang_expand_expr): Likewise.
4079 (note_instructions): Use xrealloc.
4080 (java_push_constant_from_pool): Don't mess with obstacks.
4081 (process_jvm_instruction): Likewise.
4082 * java-tree.h (cyclic_inheritance_report): Remove duplicate
4083 declaration.
4084 * jcf-parse.c (get_constant): Don't mess with obstacks.
4085 (read_class): Likewise.
4086 (jcf_parse): Likewise.
a83f01f0 4087 * lex.c (expression_obstack): Remove.
1f8f4a0b
MM
4088 (java_lex): Don't use obstack_free.
4089 * parse.h (exit_java_complete_class): Don't mess with obstacks.
4090 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
4091 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
4092 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
4093 * parse.y (gaol): Add more GC roots.
4094 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
4095 (lookup_field_wrapper): Likewise.
4096 (obtain_incomplete_type): Don't mess with obstacks.
a83f01f0 4097 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
1f8f4a0b
MM
4098 macros.
4099 (craft_constructor): Don't mess with obstacks.
4100 (safe_layout_class): Likewise.
4101 (java_complete_class): Likewise.
4102 (source_end_java_method): Likewise.
4103 (build_outer_field_access_methods): Likewise.
4104 (build_outer_method_access_method): Likewise.
4105 (maybe_build_thisn_access_method): Likewise.
4106 (build_dot_class_method_invocation): Likewise.
4107 (java_complete_tree): Likewise.
4108 (java_complete_lhs): Likewise.
4109 (do_merge_string_cste): Likewise.
4110 (patch_string_cst): Likewise.
4111 (array_constructor_check_entry): Likewise.
4112 * typeck.c (build_java_array_type): Likewise.
4113 (parse_signature_string): Likewise.
4114 (build_java_signature): Likewise.
f6bbde28 4115
3c1d1e7b
TT
41162000-10-12 Tom Tromey <tromey@cygnus.com>
4117
4118 Fix for PR gcj/356:
4119 * gjavah.c (add_class_decl): Don't special-case inner classes.
4120 (add_namelet): Likewise.
4121
a93eddcf
APB
41222000-10-11 Rodney Brown <RodneyBrown@mynd.com>
4123
4124 * java-tree.h: Constify current_encoding.
4125 * lang.c: Constify current_encoding.
4126
41272000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
4128
4129 * jvgenmain.c (class_mangling_suffix): Omit `.'.
4130 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
4131
41322000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
4133
4134 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
4135 patch. Fixes gcj/340.
4136
2e165c53
TT
41372000-10-10 Tom Tromey <tromey@cygnus.com>
4138
4139 * lex.c (java_new_lexer): Initialize out_first and out_last
4140 fields.
4141 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
4142
c7303e41
APB
41432000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
4144
4145 * parse.y (pop_current_osb): New function.
4146 (array_type:): Use `dims:', changed actions
4147 accordingly. Suggested by Anthony Green.
4148 (array_creation_expression:): Used pop_current_osb.
4149 (cast_expression:): Likewise.
4150 (search_applicable_method_list): Fixed indentation.
4151
41522000-10-08 Anthony Green <green@redhat.com>
4153
4154 * parse.y (array_type_literal): Remove production.
4155 (type_literals): Refer to array_type, not array_type_literal.
4156
29f8b718
APB
41572000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
4158
4159 Patch contributed by Corey Minyard.
4160 * decl.c (check_local_named_variable): New function.
4161 (tree check_local_unnamed_variable): Likewise.
4162 (find_local_variable): Splitted. Call check_local_{un}named_variable.
4163
7fd9a516
AG
41642000-10-07 Anthony Green <green@redhat.com>
4165
4166 * class.c (layout_class): Handle case where superclass can't be
4167 layed out yet.
4168
20d431c9
JM
41692000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
4170
4171 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
4172 gperf.
4173
e0a0c416
TT
41742000-10-05 Tom Tromey <tromey@cygnus.com>
4175
4176 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
4177 * jvgenmain.c (class_mangling_prefix): Removed.
4178 (class_mangling_suffix): New global.
4179 (main): Use it.
4180 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
4181 `$'.
4182 (print_method_info): Handle overrides for static and final
4183 methods.
4184 (process_file): Generate declaration for class object field.
4185 * class.c (cxx_keywords): New array.
4186 (utf8_cmp): New function.
4187 (cxx_keyword_p): New function.
4188 (layout_class_method): Mangle C++ keywords by appending `$'.
4189 (mangle_field): New function.
4190 (mangle_class_field): Use mangle_field. Mangle class name as
4191 `class$'.
4192 (mangle_static_field): Use mangle_field.
4193
6e22695a
APB
4194Tue Oct 3 13:44:37 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
4195
4196 * decl.c (find_local_variable): Removed uncessary type check and
4197 fixed range check typo. From Corey Minyard.
4198
4199Wed Sep 13 16:06:52 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
4200
4201 * decl.c (give_name_to_locals): New local `code_offset'. Call
e64c46ce 4202 `maybe_adjust_start_pc'.
6e22695a
APB
4203 * expr.c (note_instructions): New function.
4204 (expand_byte_code): Don't collect insn starts here.
4205 (peek_opcode_at_pc): New function.
4206 (maybe_adjust_start_pc): Likewise.
4207 * java-tree.h (maybe_adjust_start_pc): Declare.
4208 (note_instructions): Likewise.
dba41d30 4209 * jcf-parse.c (parse_class_file): Call `note_instructions'.
6e22695a
APB
4210
4211Wed Sep 13 11:50:35 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
4212
4213 * parse.y (field_access:): Fixed indentation.
4214 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
4215
7e51098e
TT
42162000-09-07 Tom Tromey <tromey@cygnus.com>
4217
4218 Fix for PR gcj/307:
4219 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
4220 JPRIMITIVE_TYPE_P, for arithmetic operators.
4221 (patch_method_invocation): Indentation fix.
4222 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
4223 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
4224 (do_unary_numeric_promotion): Cleaned up code.
4225 (valid_cast_to_p): Handle boolean correctly.
4226
5beededc
TT
42272000-09-27 Tom Tromey <tromey@cygnus.com>
4228
4229 * lex.c (java_read_unicode): Reset bs_count when finished with
4230 `\u' sequence.
4231
f15b9af9
MM
42322000-10-01 Mark Mitchell <mark@codesourcery.com>
4233
4234 Convert to GC.
4235 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
4236 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
4237 (typeck.o): Depend on ggc.h.
4238 * class.c (add_method_1): Use GC functions for allocation.
4239 (init_class_processing): Register roots.
4240 * decl.c (ggc_p): Set to 1.
4241 (pending_local_decls): Make it static.
4242 (push_jvm_slot): Use GC functions for allocation.
4243 (init_decl_processing): Register roots.
4244 (give_name_to_locals): Use GC functions for allocation.
4245 (lang_mark_tree): New function.
4246 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
4247 functions for allocation.
4248 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
4249 * lex.c (java_lex): Use build_string, rather than replicating it
4250 inline.
4251 * parse.y (goal): Add more roots.
4252 (mark_parser_ctxt): New function.
4253 * typeck.c: Include ggc.h.
f6bbde28 4254
99eaf8d4
APB
42552000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
4256
4257 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
4258 contains something else than MODIFY_EXPR.
4259
19e223db
MM
42602000-09-23 Mark Mitchell <mark@codesourcery.com>
4261
4262 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
4263 * Makefile.in (parse.o): Depend on ggc.h.
4264 (class.o): Likewise.
4265 (constants.o): Likewise.
4266 (decl.o): Likewise.
4267 (expr.o): Likewise.
4268 (jcf-parse.o): Likewise.
4269 (jcf-write.o): Likewise.
4270 (mangle.o): Likewise.
4271 * class.c: Include ggc.h.
4272 (build_static_field_ref): Register GC roots.
4273 (layout_class): Likewise.
4274 (init_class_processing): Likewise.
4275 * constants.c: Include ggc.h.
4276 (current_constant_pool_data_ref): Remove.
4277 (tag_nodes): Move it to ...
4278 (get_tag_node): ... here. Register GC roots.
4279 * decl.c: Include ggc.h. Remove many global tree definitions.
4280 (throw_node): Define.
4281 (java_global_trees): Likewise.
4282 (predef_filenames): Make the size a constant.
4283 (init_decl_processing): Adjust accordingly.
4284 (init_decl_processing): Call init_jcf_parse. Register GC roots.
4285 * expr.c: Include ggc.h.
4286 (init_expr_processing): Register GC roots.
4287 (build_invokeinterface): Likewise.
4288 * java-tree.h: Replace extern tree declarations with macros.
4289 (java_global_trees): New variable.
4290 (java_tree_index): New enumeration.
4291 (init_jcf_parse): Declare.
4292 * jcf-parse.c: Include ggc.h.
4293 (current_class): Remove declaration.
4294 (main_class): Likewise.
4295 (all_class_list): Likewise.
4296 (predefined_filename_p): Adjust for constant size of
4297 predef_filenames.
4298 (init_jcf_parse): New function.
4299 * jcf-write.c: Include ggc.h.
4300 (generate_classfile): Register GC roots.
4301 (append_synthetic_attribute): Likewise.
4302 (append_innerclass_attribute_entry): Likewise.
4303 * lang.c: Include ggc.h.
4304 (lang_print_error): Register GC roots.
4305 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
4306 with macros.
4307 * parse.y: Include ggc.h.
4308 (wfl_operator): Remove.
4309 (goal): Register GC roots.
4310 (java_pop_parser_context): Adjust for new field names.
4311 (java_parser_context_save_global): Likewse.
4312 (java_parser_context_restore_global): Likewise.
4313 (java_parser_context_suspend): Likewise.
4314 (java_parser_context_resume): Likewise.
4315 (verify_constructor_circularity): Register GC roots.
4316 (lookup_cl): Likewise.
4317 (java_reorder_fields): Likewise.
4318 (build_current_this): Likewise.
4319 (class_in_current_package): Likewise.
4320 (argument_types_convertible): Likewise.
4321 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
f6bbde28 4322
4c4b521a
TT
43232000-09-14 Tom Tromey <tromey@cygnus.com>
4324
4325 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
4326
6b8a24cd
TT
43272000-09-13 Tom Tromey <tromey@cygnus.com>
4328
4329 * jcf-parse.c: Include <locale.h>.
4330 * jv-scan.c: Include <locale.h>.
4331
86e4b1e4
TT
43322000-09-12 Tom Tromey <tromey@cygnus.com>
4333
4334 * expr.c (pop_type_0): Return `Object' if trying to merge two
4335 interface types.
4336 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
4337 interface types; `Object' is always a valid supertype.
4338
d19cbcb5
TT
43392000-09-12 Tom Tromey <tromey@cygnus.com>
4340
4341 Fix for PR gcj/33:
4342 * jv-scan.c (help): Document --encoding.
4343 (options): Added `encoding' entry.
4344 (OPT_ENCODING): New define.
4345 (main): Handle --encoding.
4346 Include <langinfo.h> if nl_langinfo exists.
4347 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
4348 --encoding.
4349 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
4350 (parse_source_file): Correctly call java_init_lex. Added `finput'
4351 argument. Use nl_langinfo to determine default encoding.
4352 * java-tree.h (current_encoding): Declare.
4353 * parse.y (java_parser_context_restore_global): Don't restore
4354 `finput'.
4355 (java_parser_context_save_global): Don't set `finput' field.
4356 (java_pop_parser_context): Don't restore `finput'. Free old lexer
4357 if required.
4358 * lang.c (current_encoding): New global.
4359 (lang_decode_option): Recognize `-fencoding='.
4360 (finish_parse): Don't close finput.
4361 * parse.h (struct parser_ctxt): Removed `finput' and
4362 `unget_utf8_value' fields. Added `lexer' field.
4363 (java_init_lex): Fixed declaration.
4364 * lex.c (java_new_lexer): New function.
4365 (java_destroy_lexer): Likewise.
4366 (java_read_char): Added `lex' argument. Handle iconv case.
4367 (java_read_unicode): Added `lex' argument. Count backslashes in
4368 lexer structure.
4369 (java_init_lex): Added `finput' and `encoding' arguments. Set
4370 `lexer' field in ctxp.
4371 (BAD_UTF8_VALUE): Removed.
4372 (java_lex): Handle seeing UEOF in the middle of a string literal.
4373 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
4374 (java_lexer): New structure.
4375 (UNGETC): Removed.
4376 (GETC): Removed.
4377 (DEFAULT_ENCODING): New define.
4378 (java_destroy_lexer): Declare.
4379
ee17a290
TT
43802000-09-12 Tom Tromey <tromey@cygnus.com>
4381
4382 Fix for PR gcj/343:
4383 * lex.c (java_init_lex): Initialize java_io_serializable.
4384 * parse.y (java_io_serializable): New global.
4385 (valid_ref_assignconv_cast_p): An array can be cast to
4386 serializable.
4387
d8ea8f28
ZW
43882000-09-10 Zack Weinberg <zack@wolery.cumb.org>
4389
4390 * decl.c, expr.c: Include defaults.h if not already included.
4391 Don't define the *_TYPE_SIZE macros.
4392
0caae6dd
GK
43932000-09-09 Geoffrey Keating <geoffk@cygnus.com>
4394
4395 * typeck.c (build_java_array_type): Correct first parameter
4396 in ADJUST_FIELD_ALIGN invocation.
4397
f0bee8b3
TT
43982000-09-06 Tom Tromey <tromey@cygnus.com>
4399
4400 * lang-specs.h: Also recognize `-femit-class-files'.
4401
3e99f50c
APB
44022000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
4403
4404 * verify.c (merge_types): Load the types to merge if necessary.
4405
3ca8c9ae
AG
44062000-09-02 Anthony Green <green@redhat.com>
4407
4408 * jcf-io.c: Include zlib.h.
4409 (open_in_zip): Read compressed class file archives.
4410 * zipfile.h (ZipDirectory): Add uncompressed_size and
4411 compression_method fields.
4412 * zextract.c (read_zip_archive): Collect file compression info.
4413
e1d565ab
BM
44142000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
4415
f6bbde28 4416 * parse.y (do_resolve_class): Also explore superclasses of
e1d565ab
BM
4417 intermediate enclosing contexts when searching for inner classes.
4418
29f8b718
APB
44192000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
4420
4421 * parse.y (variable_declarator_id:): Better error message.
4422 (expression_statement:): Use YYNOT_TWICE.
4423 (cast_expression:): Likewise.
4424 (assignment:): Likewise.
4425
354e99ce
APB
44262000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
4427
4428 * parse.y (do_merge_string_cste): New locals. Create new
4429 STRING_CSTs each time, use memcpy. Fixes gcj/311.
4430
7c097ee9
HB
44312000-08-07 Hans Boehm <boehm@acm.org>
4432
4433 * boehm.c (mark_reference_fields): Set marking bits for all words in
4434 a multiple-word record.
4435 (get_boehm_type_descriptor): Use the procedure marking descriptor for
4436 java.lang.Class.
f6bbde28 4437
3d919a0e
MS
44382000-08-31 Mike Stump <mrs@wrs.com>
4439
4440 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
4441 jcf-dump$(exeext)): Make parallel safe.
4442
63ad61ed
ZW
44432000-08-29 Zack Weinberg <zack@wolery.cumb.org>
4444
4445 * jcf-parse.c (set_source_filename): Constify a char *.
4446 * jcf-write.c (append_innerclasses_attribute,
4447 make_class_file_name): Constify a char *. Don't recycle a
4448 variable for an unrelated purpose.
4449 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
4450 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
4451
c00f0fb2
APB
44522000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
4453
4454 * expr.c (can_widen_reference_to): Fixed indentation.
4455 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
4456 * parse.y: `finit$' replaces `$finit$' in comments.
4457 (try_builtin_assignconv): Fixed leading comment.
4458
94574545
GM
44592000-08-25 Greg McGary <greg@mcgary.org>
4460
4461 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
4462
6e2aa220
GM
44632000-08-24 Greg McGary <greg@mcgary.org>
4464
4465 * lang.c (lang_decode_option): Use ARRAY_SIZE.
4466 * parse.y (BINOP_LOOKUP): Likewise.
4467
9b1ee05b
AH
44682000-08-22 Andrew Haley <aph@cygnus.com>
4469
4470 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
4471 sign extending. Fixes gcj/321.
4472 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
4473 combining to make a jlong. Fixes gcj/321.
4474
05a3d06e 44752000-08-21 Nix <nix@esperi.demon.co.uk>
f6bbde28 4476
05a3d06e
N
4477 * lang-specs.h: Do not process -o or run the assembler if
4478 -fsyntax-only.
4479
65f69237
AH
44802000-08-16 Andrew Haley <aph@cygnus.com>
4481
4482 * typeck.c (build_java_array_type): Rewrite code to do array
4483 alignment. Take into account back-end macros when aligning array
4484 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
4485 user to set alignment. Fixes gcj/252 and 160.
4486
2e0f0aff
TT
44872000-08-09 Tom Tromey <tromey@cygnus.com>
4488
1175b9b4
TT
4489 * parse.y (check_abstract_method_definitions): Now return `int'.
4490 Check implemented interfaces. Fixes PR gcj/305.
4491
2e0f0aff
TT
4492 * parse.y (patch_switch_statement): Disallow `long' in switch
4493 expressions. Fixes PR gcj/310.
4494
25bdcbc5
APB
44952000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
4496
4497 * decl.c (finit_leg_identifier_node): New global.
4498 (init_decl_processing): Use `finit$' to initialize
4499 finit_identifier_node. Use `$finit$' to initialize
4500 finit_leg_identifier_node.
4501 * expr.c (expand_java_field_op): Use ID_FINIT_P.
4502 * java-tree.h (finit_identifier_node): Changed attached comment.
4503 (finit_leg_identifier_node): New declaration.
4504 (ID_FINIT_P): Take finit_identifier_node and
4505 finit_leg_identifier_node into account. This is a backward
4506 compatibility hack.
4507
81baa09a
APB
45082000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
4509
4510 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
4511 Jan 6 2000 patch.
4512 (generate_bytecode_insns): Check `nargs' before emitting it.
4513 * verify.c (merge_type_state): Fixed typo.
4514 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
4515 generate_bytecode_{conditional,insns}.
4516
458530ee
AG
4517Sun Aug 13 09:41:49 2000 Anthony Green <green@redhat.com>
4518
4519 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
4520 for -pg builds).
4521
34d4df06
APB
45222000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
4523
4524 * class.c (maybe_layout_super_class): Fixed indentation.
4525 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
4526 (java_check_methods): New function declaration.
4527 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
4528 instead of `str_ptr'.
4529 * jcf-write.c (generate_bytecode_insns): Emit number the of args
4530 of a `invokeinterface' at the right time.
4531 * parse.h (WFL_STRIP_BRACKET): New macro.
4532 (SET_TYPE_FOR_RESOLUTION): Use it.
dba41d30 4533 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
34d4df06
APB
4534 (check_class_interface_creation): Don't check for cross package
4535 innerclass name clashes.
dba41d30 4536 (method_header): Behave properly if MDECL is `error_mark_node'.
34d4df06
APB
4537 (method_declarator): Return `error_mark_node' if bogus current
4538 class.
4539 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
4540 (resolve_and_layout): New local `decl_type', set and used. Call
4541 java_check_methods.
4542 (java_check_methods): New method.
4543 (java_layout_classes): Use it.
4544 (resolve_qualified_expression_name): No EH check necessary in
4545 access$<n>.
4546 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
4547 `case' statement.
4548 (patch_assignment): Set DECL_INITIAL on integral final local.
4549
5f1c312a
APB
45502000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
4551
4552 * java-tree.h (flag_extraneous_semicolon): New extern.
4553 * lang-options.h: (-Wextraneous-semicolon): New option.
4554 * lang.c (flag_redundant): Fixed typo in leading comment.
4555 (flag_extraneous_semicolon): New global.
4556 (lang_decode_option): Set `flag_extraneous_semicolon' when
4557 -Wall. Decode `-Wextraneous-semicolon'.
4558 * parse.y (type_declaration:): Removed `SC_TK' hack, added
4559 `empty_statement' rule.
4560 (class_body_declaration): Likewise.
4561 (method_body:): Accept `;' as a method body.
4562 (static_initializer:): Removed `SC_TK' hack.
4563 (constructor_block_end:): Likewise.
4564 (empty_statement:): Report deprecated empty declaration. Fixes
4565 gcj/295
4566
25bdcbc5 45672000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
f0f3a777
APB
4568
4569 * parse.y (build_dot_class_method_invocation): Changed parameter
dba41d30 4570 name to `type'. Build signature from `type' and convert it to a
f0f3a777
APB
4571 STRING_CST if it's an array.
4572 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
4573 to use `ref_type' directly.
4574
64c04091
OP
4575Sun Aug 6 00:47:24 2000 Ovidiu Predescu <ovidiu@cup.hp.com>
4576
4577 * lang-options.h: Added a comma after the last element to avoid
4578 syntax errors when other languages define additional options.
4579
a36556a8
ZW
45802000-08-04 Zack Weinberg <zack@wolery.cumb.org>
4581
4582 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
4583 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
4584 (jc1): Link with $(BACKEND).
4585 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
4586
50e60bc3
ZW
45872000-08-02 Zack Weinberg <zack@wolery.cumb.org>
4588
37620334
ZW
4589 * jvspec.c: Adjust type of second argument to
4590 lang_specific_driver, and update code as necessary.
4591
50e60bc3
ZW
4592 * class.c (build_dtable_decl): Initialize dummy.
4593
f0f3a777
APB
45942000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4595
4596 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
4597 method bodies not to rule out discarding `<clinit>'; don't use
4598 <clinit> to initialize static fields with constant initializers.
4599
46002000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4601
4602 * gjavah.c (print_method_info): Added `synth' parameter. Skip
4603 synthetic methods.
4604 (method_synthetic): New global.
4605 (HANDLE_METHOD): Recognize synthetic method and tell
4606 `print_method_info' about it.
4607 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
4608 processing a synthetic method.
4609 * jcf-reader.c (skip_attribute): New function.
4610 ( skip_attribute): Likewise.
4611
46122000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4613
4614 * parse.y (build_outer_field_access): Fixed comments.
4615 (fix_constructors): Emit the initialization of this$<n> before
4616 calling $finit$.
4617 (resolve_qualified_expression_name): Build an access to `decl' if
4618 necessary.
4619
46202000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
4621
4622 * parse-scan.y (curent_class): Non longer const.
4623 (inner_qualifier, inner_qualifier_length): Deleted.
4624 (current_class_length): New global.
4625 (bracket_count): Fixed typo in leading comment.
4626 (anonymous_count): New global.
4627 (class_instance_creation_expression:): Handle anonymous classes.
4628 (anonymous_class_creation:): New rule.
4629 (push_class_context): Rewritten.
4630 (pop_class_context): Likewise.
4631 (INNER_QUALIFIER): Macro deleted.
4632 (report_class_declaration): call `push_class_context' when
4633 entering the function. `fprintf' format modified not to use
4634 INNER_QUALIFIER.
4635 (report_class_declaration): Assign `package_name' and
a83f01f0 4636 `current_class' to NULL separately.
f0f3a777
APB
4637
46382000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
4639
4640 * expr.c (build_invokeinterface): Call layout_class_methods on
4641 target interface.
4642
13107ec0 46432000-07-27 Tom Tromey <tromey@cygnus.com>
f6bbde28 4644 Anthony Green <green@cygnus.com>
13107ec0
TT
4645 Alexandre Petit-Bianco <apbianco@cygnus.com>
4646
4647 * class.c (make_class_data): Create vtable for abstract classes.
4648 (get_dispatch_table): Changed to cope with abstract classes.
4649
da632f2c
APB
46502000-07-27 Tom Tromey <tromey@cygnus.com>
4651
4652 * parse.y (patch_method_invocation): Don't reverse the argument
4653 list when dealing with anonymous class constructors. Fixed typo in
4654 comment.
4655
46562000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
4657
4658 * parse.y (build_alias_initializer_parameter_list): Reverse
4659 crafted list when building aliases for anonymous class
4660 constructors.
4661
1e12ab9b
APB
46622000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
4663
4664 * parse.y (jdep_resolve_class): Don't bother checking potential
4665 innerclass access if `decl' is NULL.
4666 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
4667 WFL.
4668
4c31fe99
APB
46692000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
4670
4671 * parse.c: Remove (again.)
4672
1e12ab9b
APB
46732000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
4674
4675 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
4676 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
4677 outside the `if' statement, alias to innerclass removed, `decl'
4678 used to mark the class complete.
4679
f4530f43
APB
46802000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
4681
4682 * parse.y (simple_name:): Fixed typo in error message.
4683
e7c7bcef
APB
46842000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
4685
4686 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
4687 or its first operand can be error marks.
4688
46892000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
4690
4691 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
4692 * parse.y (method_header): Likewise.
4693
02ae6e2e
APB
46942000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
4695
4696 * parse.y (process_imports): Consider that one might be trying to
4697 import an innerclass. Fixes gcj/254
4698
e7c7bcef
APB
46992000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
4700
4701 * parse.y (find_as_inner_class): Handle the case where the
4702 enclosing context of an innerclass has been loaded as bytecode.
4703
4142b247
APB
47042000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
4705
f6bbde28 4706 * parse.y (simple_name:): Reject `$' in type names.
4142b247
APB
4707 (resolve_type_during_patch): Use `type' as a second
4708 argument to resolve_no_layout. Fixes gcj/257.
4709
cab8e2bd
BM
47102000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
4711
f6bbde28 4712 * parse.y (find_most_specific_methods_list): Select the only
cab8e2bd
BM
4713 non-abstract method even if max has been set.
4714 Fixes gcj/285, gcj/298.
4715
ca2875c4
JS
47162000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
4717
4718 * lang-specs.h: Added %(jc1) to java compiler options.
4719
bfbbc080
ZW
47202000-07-14 Zack Weinberg <zack@wolery.cumb.org>
4721
4722 * .cvsignore: New file.
4723
11b26d72
APB
47242000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
4725
4726 * parse.y (not_accessible_p): Access granted to innerclasses
4727 (indirectly) extending the reference type. Fixes gcj/249.
4728
47292000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
4730
4731 * parse.y (patch_method_invocation): Fixed comment.
4732 (maybe_use_access_method): Build this$<n>s to the context of the
4733 target method, or a type that extends it. Fixes gcj/242.
4734
649c9142
MM
47352000-07-13 Mark Mitchell <mark@codesourcery.com>
4736
4737 * parse.c: Remove.
4738
ee97d354
APB
47392000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
4740
4741 * parse.y (fold_constant_for_init): Avoid bullish conversion.
4742
44fadf1e
TT
47432000-07-13 Tom Tromey <tromey@cygnus.com>
4744
4745 * lang-specs.h: Added %{I*}.
4746
ea414c97
ZW
47472000-07-13 Zack Weinberg <zack@wolery.cumb.org>
4748
4749 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
4750
792abd35
MM
47512000-07-12 Mark Mitchell <mark@codesourcery.com>
4752
4753 * parse-scan.c: Remove.
4754
11b26d72
APB
47552000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
4756
4757 * class.c (set_super_info): Handled protected inner classes.
4758 (common_enclosing_context_p): Bail early if arguments aren't both
4759 inner classes.
4760 (get_access_flags_from_decl): Handle private and protected inner
4761 classes.
4762 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
4763 (CLASS_PROTECTED): Likewise.
dba41d30 4764 (struct lang_type): New bitfield `poic'.
11b26d72
APB
4765 * parse.y (jdep_resolve_class): Call check_inner_class_access on
4766 inner classes only.
4767 (check_inner_class_access): Renamed arguments, added
4768 comments. Handles protected inner classes (fixes gcj/225)
4769 (not_accessible_p): Fixed comments. Avoid handling inner classes.
4770
47712000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
4772
4773 * parse.y (resolve_qualified_expression_name): Verify qualified
dba41d30 4774 access to `this'. Fixes gcj/239.
11b26d72 4775
e67eb1a0 47762000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
2f2bd00a 4777
e67eb1a0
APB
4778 * jcf-write.c (generate_classfile): Don't install ConstantValue
4779 for null pointers.
2f2bd00a 4780
11b26d72
APB
47812000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
4782
4783 * parse.y (resolve_qualified_expression_name): Handle inner class
4784 access. Fixes gcj/256.
4785
629d4b4d
APB
47862000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
4787
4788 * jcf-write.c (generate_classfile): Properly install the
4789 ConstantValue attribute and the initial value constant pool index
4790 on string constants.
4791 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
4792 class files.
4793
0c2b8145
APB
47942000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
4795
4796 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
4797 construct.
4798 * parse.y (find_as_inner_class): Fixed typo.
4799 (do_resolve_class): Explore enclosing contexts when searching for
4800 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
4801 (check_inner_class_access): Check `decl' which can be null in case
4802 of previous errors.
4803
48042000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
4805
dba41d30 4806 * java-tree.h (java_debug_context): Declared `extern'.
0c2b8145
APB
4807 (safe_layout_class): Likewise.
4808 * parse.y (resolve_field_access): Field must be `static' in order
4809 to be replaced by its initial value. Added comments.
4810 (find_applicable_accessible_methods_list): Fixed typo.
4811 (find_most_specific_methods_list): Methods found in innerclasses
4812 take over methods founds in the enclosing contexts.
4813 (java_complete_tree): Loosen restrictions on the type of DECLs
4814 that can be replaced by their initialization values.
dba41d30 4815 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
0c2b8145 4816
0267da64
TT
48172000-07-05 Tom Tromey <tromey@cygnus.com>
4818
4819 * Make-lang.in (PARSE_DIR): New macro.
4820 (PARSE_RELDIR): Likewise.
4821 (PARSE_C): Likewise.
4822 (PARSE_SCAN_C): Likewise.
4823 ($(PARSE_C)): New target.
4824 ($(PARSE_SCAN_C)): Likewise.
4825 (SET_BISON): New macro.
4826 (BISONFLAGS): Likewise.
4827 (JAVABISONFLAGS): Likewise.
4828
1bbee75b
BM
48292000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
4830
f6bbde28
ZW
4831 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
4832 argument on the first pass for CNI as well as JNI.
4833 (print_method_info): Set up method name on the first pass only.
4834
98a52c2c
APB
48352000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4836
4837 * parse.y (parser_qualified_classname): Removed parameter
4838 `is_static'.
4839 (create_interface): Removed first passed parameter to
4840 parser_qualified_classname.
4841 (create_class): Likewise. Don't install alias on static
4842 innerclasses. Fixes gcj/275.
4843
48442000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4845
4846 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
4847 debugable statement with empty_stmt_node. Fixes gcj/272
4848
48492000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4850
4851 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
4852 gcj/271.
4853
c1c8f8cc
APB
48542000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
4855
4856 * jcf-write.c (push_long_const): Appropriately cast short negative
4857 constant to jword.
4858
cf1b2274
APB
48592000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
4860
4861 * parse.y (verify_constructor_super): Use loop variable
4862 `m_arg_type' initialized with `mdecl_arg_type'.
4863
6eaeeb55
TT
48642000-06-29 Tom Tromey <tromey@cygnus.com>
4865
4866 * parse.y (resolve_field_access): Handle case where `type_found'
4867 is NULL.
4868
18ee3d5e
APB
48692000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
4870
4871 * expr.c (lookup_field): The same field can be found through two
4872 different interface. Don't declare it ambiguous in that case.
4873
61d5c158
TT
48742000-06-27 Tom Tromey <tromey@cygnus.com>
4875
4876 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
4877 follows \r, then unget it at a lower level.
4878
70541f45
TT
48792000-06-26 Tom Tromey <tromey@cygnus.com>
4880
4881 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
4882 java_complete_tree.
4883
774d2baf
TT
48842000-06-25 Tom Tromey <tromey@cygnus.com>
4885
4886 * parse.y (for_statement): Wrap expression in a WFL if it is a
4887 constant. For PR gcj/268.
4888
d6baf6f5
APB
48892000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
4890
4891 * parse.y (do_resolve_class): Minor optimiztion in the package
17126208 4892 list search. Removed unnecessary test and return statement.
d6baf6f5
APB
4893 (valid_ref_assignconv_cast_p): Order of arguments to
4894 enclosing_context_p fixed.
4895
120f0c10
TT
48962000-06-24 Tom Tromey <tromey@cygnus.com>
4897
ae4a4c88
TT
4898 * expr.c (lookup_field): Print error and return error_mark_node if
4899 field reference is ambiguous.
4900
120f0c10
TT
4901 * parse.y (check_abstract_method_definitions): Also check if
4902 `other_method' is abstract.
4903
cf1748bf
APB
49042000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
4905
4906 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
4907 classes.
4908 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
dba41d30 4909 (struct lang_type): New field `pic'.
cf1748bf
APB
4910 (CLASS_PRIVATE): New macro.
4911 * parse.y (check_inner_class_access): New function.
4912 (jdep_resolve_class): Call it.
4913
f1ff439a
TT
49142000-06-23 Tom Tromey <tromey@cygnus.com>
4915
4916 * parse.y (patch_incomplete_class_ref): Initialize the returned
4917 class. For PR gcj/260.
4918
9a7ab4b3
APB
49192000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
4920
4921 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
4922
49232000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
4924
4925 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
4926 Java specific checks.
4927 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
4928 screened by DECL_P.
4929 * java-tree.def (CASE_EXPR): Marked 'e'.
4930 (DEFAULT_EXPR): Likewise.
4931 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
4932 screened by DECL_P.
4933 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
4934 Java specific checks.
4935 (generate_bytecode_insns): Test try_block for BLOCK before using
4936 BLOCK_EXPR_BODY.
4937 * parse.y (build_wfl_wrap): Added `location' argument. Set
4938 EXPR_WFL_LINECOL accordingly.
4939 (dim_expr:): Wrap constants with WFLs.
4940 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
4941 (resolve_package): Check for `stmt' not being a BLOCK before
4942 building a debuggable statement with it.
4943 (make_qualified_primary): Added extra parameter to build_wfl_wrap
4944 invocation.
4945 (resolve_field_access): Make sure `decl' is a DECL before treating
4946 it as such.
4947 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
4948 IDENTIFIER_NODE before treating it as such.
4949 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
4950 treating it as such.
4951 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
4952 to be applied only on non array types.
4953
49542000-06-16 Per Bothner <per@bothner.com>
4955
4956 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
4957 define in terms of DECL_RESULT, as that fails when --enable-checking.
f6bbde28 4958
ffb1f63d
KG
49592000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4960
4961 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
4962 types the same in comparison.
4963 (CHECK_OP): Add static prototype.
4964
11cf4d18
JJ
49652000-06-13 Jakub Jelinek <jakub@redhat.com>
4966
4967 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
4968 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
4969 * parse.c: Rebuilt.
4970
5ac9118e
KG
49712000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4972
4973 * decl.c (create_primitive_vtable): Prototype.
4974
4975 * jcf-write.c (generate_bytecode_insns): Initialize variable
4976 `saved_context'.
4977
4978 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
4979
ad69b5b6
BM
49802000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
4981
4982 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
4983 to track searched classes, and do not search the same class more than
4984 once. Call find_applicable_accessible_methods_list on immediate
4985 superclass, instead of search_applicable_method_list on all ancestors.
4986 Fix for PR gcj/238.
4987
cf1748bf
APB
49882000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
4989
4990 * parse.y (register_fields): Permit static fields in inner classes
4991 if they are final. Fix for PR gcj/255.
4992
9a7ab4b3
APB
49932000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
4994
4995 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
4996 * parse.y (find_in_imports): Returned type changed to void,
4997 leading comment fixed.
4998 (register_package): New function.
4999 (qualify_and_find): Likewise.
5000 (package_declaration:): Use `register_package'.
5001 (single_type_import_declaration:): Removed local variable
5002 `node'. Added missing `;' for consistency.
5003 (type_import_on_demand_declaration:): Use `chainon' to link new
5004 entries.
5005 (lookup_field_wrapper): Lookup local variables defined in outer
5006 contexts first.
5007 (java_complete_class): Don't reverse the list of imported on demand.
5008 (do_resolve_class): Reorganized. Removed local variable
5009 `original_name'. Call `qualify_and_find' with the current package
5010 name, invoke `find_in_imports_on_demand' right after. Call
5011 `qualify_and_find' with the packages we've seen so far. Fixed
5012 operations numbering in comments.
5013 (java_expand_class): Don't reverse `package_list'.
5014 (find_most_specific_methods_list): New local variables `abstract'
5015 and `candidates'. Use them to pick the right method.
5016
14d075d8
TT
5017Tue Jun 6 11:39:05 2000 Tom Tromey <tromey@ferrule.cygnus.com>
5018
5019 * parse.y (check_modifiers_consistency): Don't subtract out
5020 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
5021
603832a0
PT
50222000-06-04 Philipp Thomas <pthomas@suse.de>
5023
5024 * Makefile.in (INTLLIBS): New.
5025 (LIBS): Add above.
5026 (DEPLIBS): Ditto.
5027
8f975c18
APB
5028Fri Jun 2 16:48:55 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
5029
5030 * class.c (get_dispatch_table): Build the vtable dummy entry list
e64c46ce 5031 element with a null purpose. Fixed leading comment.
8f975c18 5032 (build_dtable_decl): Build an accurate dtable type when appropriate
e64c46ce 5033 and use it.
8f975c18 5034
2e761e49
RH
50352000-06-02 Richard Henderson <rth@cygnus.com>
5036
5037 * lang.c (lang_get_alias_set): New.
5038
0f145be8
APB
50392000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
5040
5041 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
5042 before using it as the accessed field.
5043
2771fe54
TT
50442000-05-31 Tom Tromey <tromey@cygnus.com>
5045
5046 * java-tree.h (boolean_array_vtable, byte_array_vtable,
5047 char_array_vtable, short_array_vtable, int_array_vtable,
5048 long_array_vtable, float_array_vtable, double_array_vtable):
5049 Declare.
5050 * expr.c (get_primitive_array_vtable): New function.
5051 (create_primitive_vtable): New function.
5052 (java_lang_expand_expr): Enable code to statically generate
5053 arrays.
5054 * decl.c (init_decl_processing): Create primitive vtables.
5055 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
5056 short_array_vtable, int_array_vtable, long_array_vtable,
5057 float_array_vtable, double_array_vtable): Define.
5058
30a3caef
ZW
50592000-05-26 Zack Weinberg <zack@wolery.cumb.org>
5060
5061 * java/parse.y (find_applicable_accessible_methods_list):
5062 Don't add an uninitialized value to the list.
5063
b8c5b1c6
TT
50642000-05-25 Tom Tromey <tromey@cygnus.com>
5065
40aaba2b
TT
5066 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
5067 when trying to see if field's class should be initialized. Always
5068 initialize field's declaring class, not qualified class.
5069 For PR gcj/162.
5070
b8c5b1c6
TT
5071 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
5072 `wfl_operator', to maybe_build_primttype_type_ref.
5073 Fixes PR gcj/235.
5074
6518c7b5
BM
50752000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
5076
5077 * parse.y (patch_method_invocation): Don't try to lookup methods
5078 in primitive types.
5079
611a4b87
APB
50802000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
5081
5082 * parse.y (resolve_field_access): Call the appropriate <clinit>
5083 before accessing the length of a static array. Craft a decl for
5084 the field while its time. Fixes PR gcj/129.
f6bbde28 5085
6b48deee
APB
50862000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
5087
5088 * parse.y (resolve_package): Correctly set `*next' (was off by
5089 one.)
5090 (resolve_qualified_expression_name): Fixed comment.
5091
0ba154aa
APB
5092Thu Apr 27 17:47:34 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
5093
f6bbde28 5094 * jcf-parse.c (jcf_parse_source): Reset current_class and
e64c46ce 5095 current_function_decl to NULL before parsing a new file.
0ba154aa 5096
c280e37a
APB
5097Thu Apr 27 17:25:33 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
5098
5099 * parse.y (block_end:): If the collected block doesn't feature a
e64c46ce 5100 statement, insert an empty statement.
c280e37a 5101
92d83515
APB
51022000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
5103
f6bbde28
ZW
5104 * parse.y (maybe_yank_clinit): New function.
5105 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
5106 end of the list of methods belonging to a class.
5107 (java_complete_expand_method): Check whether <clinit> is really
5108 necessary and expand it accordingly.
92d83515 5109
ec5bb3cf
APB
51102000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
5111
5112 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
5113 processed by the method's switch statement.
5114
67db0ce7
TT
51152000-05-19 Tom Tromey <tromey@cygnus.com>
5116
5117 * java-tree.h: Added init state enum.
5118 * decl.c (emit_init_test_initialization): Initialize class
5119 initialization check variable by looking at class' state.
5120
43490bec
TT
51212000-05-19 Tom Tromey <tromey@cygnus.com>
5122
5123 * java-tree.h (build_instanceof): Declare.
5124 (build_get_class): Declare.
5125 * parse.y (patch_binop): Use build_instanceof.
5126 * expr.c (build_instanceof): New function. If class is final,
5127 don't make a function call.
5128 (expand_java_INSTANCEOF): Use it.
5129 (build_get_class): New function.
5130
062edaed
AO
51312000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
5132
5133 * jcf-write.c (generate_classfile): Scan the source_file for
5134 slashes with the right pointer variable.
5135
078721e1
AC
5136Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
5137
5138 * lang.c (lang_decode_option): Update -Wunused flags by calling
e64c46ce 5139 set_Wunused.
078721e1
AC
5140 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
5141
46543024 51422000-05-09 Zack Weinberg <zack@wolery.cumb.org>
3b304f5b
ZW
5143
5144 * check_init.c (check_init): Constify local char *.
5145 * class.c (push_class): Constify local char *.
5146 * java_tree.h: Update prototypes.
5147 * jcf-io.c (open_class): Constify filename parameter and
5148 return value.
5149 (find_class): Remove redundant string copy. Cast return from
5150 open_class.
5151 * jcf-parse.c (read_class, parse_class_file, yyparse):
5152 Constify local char *.
5153 * jcf-write.c (generate_bytecode_insns, generate_classfile):
5154 Constify local char *.
5155 * jcf.h (JCF): Constify filename and classname.
5156 (JCF_FINISH): Cast args to FREE to char * when appropriate.
5157 * lang.c (init_parse): Constify parameter and return value.
5158 * lex.c (java_get_line_col): Constify filename parameter.
5159 * parse.h: Constify parser_ctxt.filename. Update prototypes.
5160 * parse.y (java_parser_context_suspend,
5161 issue_warning_error_from_context, safe_layout_class): Constify
5162 local char *.
5163 * parse.c: Regenerate.
5164
4c6a8973
TT
51652000-05-08 Tom Tromey <tromey@cygnus.com>
5166
5167 * expr.c (build_jni_stub): Cache the result of
5168 _Jv_LookupJNIMethod.
5169
e117276e
APB
51702000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
5171
5172 * decl.c (predef_filenames_size): Now 7.
5173 (predef_filenames): New seventh entry.
5174
652f2504
TT
51752000-05-04 Tom Tromey <tromey@cygnus.com>
5176
5177 * boehm.c (mark_reference_fields): Don't mark RawData fields.
5178 Keep track of when we've seen a reference field after a
5179 non-reference field.
5180 (get_boehm_type_descriptor): Handle case where we see
5181 non-reference fields but no trailing reference field.
5182 * decl.c (rawdata_ptr_type_node): Define.
5183 (init_decl_processing): Initialize rawdata_ptr_type_node.
5184 * java-tree.h (rawdata_ptr_type_node): Declare.
5185
ccedaff3
KG
51862000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5187
5188 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
5189 specifiers in calls to fprintf.
5190
dd5d6281
TT
51912000-05-03 Andrew Haley <aph@cygnus.com>
5192
5193 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
5194
5195 * javaop.h (WORD_TO_INT): New function.
5196 (IMMEDIATE_s4): Use WORD_TO_INT.
5197 * jcf.h (JPOOL_INT): Ditto.
5198
5199 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
5200 separator.
5201
dd5d6281 52022000-04-19 Tom Tromey <tromey@cygnus.com>
7145d9fe
TT
5203
5204 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
5205 on native function.
5206 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
5207 JNI methods.
5208 * expr.c (build_jni_stub): New function.
5209 * lang-specs.h: -fjni and -femit-class-file are incompatible.
5210 * parse.c: Rebuilt.
5211 * parse.y (java_complete_expand_methods): Expand a native method
5212 and call build_jni_stub if -fjni given.
5213 * lang-options.h: Document -fjni.
5214 * lang.c (flag_jni): New global.
5215 (lang_f_options): Added `jni' entry.
5216 * java-tree.h (soft_lookupjnimethod_node,
5217 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
5218 Declare.
5219 (flag_jni): Declare.
5220 (build_jni_stub): Declare.
5221 (struct lang_decl): Added `native' flag.
5222 (METHOD_NATIVE): Redefined to use `native' field of lang specific
5223 structure.
5224 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
5225 soft_jnipopsystemframe_node): New globals.
5226 (init_decl_processing): Set them. _Jv_InitClass only takes one
5227 argument.
5228
5229 * java-tree.def: Put into `C' mode.
5230
e815887f
TT
52312000-04-27 Tom Tromey <tromey@cygnus.com>
5232
5233 Fix for PR gcj/2:
5234 * expr.c (expand_invoke): Generate check to see if object pointer
5235 is null in nonvirtual invocation case.
5236 * java-tree.h (soft_nullpointer_node): Declare.
5237 * decl.c (soft_nullpointer_node): New global.
5238 (init_decl_processing): Initialize soft_nullpointer_node.
5239 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
5240 or `private' methods.
5241 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
5242
ad81223c
APB
5243Wed Apr 26 14:29:33 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
5244
5245 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
e64c46ce 5246 from <clinit>
ad81223c 5247
f1acc01e
TT
52482000-04-26 Tom Tromey <tromey@cygnus.com>
5249
5250 * zextract.c (find_zip_file_start): New function.
5251 (read_zip_archive): Use it.
5252
e803d3b2
APB
52532000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
5254
5255 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
5256
152de068
APB
52572000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
5258
5259 * class.c (common_enclosing_context_p): New function.
5260 * java-tree.h (common_enclosing_context_p): Added prototype.
5261 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
5262 classes sharing an outer context with the current instance.
5263 * parse.y (build_access_to_thisn): Fixed leading comment.
5264 (verify_constructor_super): New local `supper_inner'. Skip
5265 enclosing context argument in the case of inner class constructors.
5266 (patch_method_invocation): Insert proper context as second
5267 parameter to pure inner class constructor super invocations.
5268
93220702
APB
5269Mon Apr 24 14:59:36 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
5270
5271 * parse.y (end_class_declaration): Reset the interface number
e64c46ce 5272 counter.
93220702 5273
dfb99c83
APB
52742000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
5275
17126208 5276 * parse.y (source_start_java_method): Deleted unnecessary code.
f6bbde28 5277 (patch_method_invocation): Fixed comment.
dfb99c83 5278
e60a8c26
RL
52792000-04-24 Robert Lipe <robertlipe@usa.net>
5280
5281 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
5282
3c8c10b8
TT
52832000-04-23 Tom Tromey <tromey@cygnus.com>
5284
5285 * boehm.c (mark_reference_fields): Use int_byte_position.
5286
8a008c41
TT
52872000-04-22 Tom Tromey <tromey@cygnus.com>
5288
5289 * boehm.c (mark_reference_fields): Only call byte_position on
5290 non-static fields.
5291
d5f76aba
TT
52922000-04-22 Tom Tromey <tromey@cygnus.com>
5293
5294 * boehm.c (mark_reference_fields): Added `last_view_index'
5295 argument. Use DECL_FIELD_OFFSET to determine field's offset.
5296
a40d21da
APB
5297Thu Apr 20 17:41:28 2000 Mo DeJong <mdejong@cygnus.com>
5298
5299 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
5300 * parse.y (check_class_interface_creation): Fixed comments. Select
e64c46ce
AJ
5301 permitted modifiers for (inner) interfaces. Changed error message
5302 to report rejected modifiers used with local classes.
a40d21da
APB
5303
53042000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
5305
5306 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
5307 of directly inherited type considered in scope.
5308 * parse.y (do_resolve_class): Search inherited classes for inner
5309 classes.
5310
473e7b07
TT
53112000-04-20 Tom Tromey <tromey@cygnus.com>
5312
5313 * parse.y (not_accessible_p): Use member's class, not current
5314 class, when doing inheritance check for protected reference.
5315 Fixes PR gcj/124.
5316
c52fbf0f
JS
5317Thu Apr 20 18:20:58 2000 Jason Schroeder <shrode@subnature.com>
5318
5319 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
5320
f2760b27
APB
53212000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
5322
5323 * parse.y (lookup_field_wrapper): Search for final local aliases.
5324 (resolve_expression_name): Let lookup_field_wrapper search for
5325 final local aliases. Force the value of `name' if one is found.
5326 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
5327 an expression name. Fixed comments.
5328
807bc1db
APB
53292000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
5330
5331 * parse.y (yyerror): `msg' can be null, don't use it in that case.
5332
ecb36604
TT
53332000-04-19 Tom Tromey <tromey@cygnus.com>
5334
5335 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
5336
48a840d9
APB
53372000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
5338
5339 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
5340
83c1f628
TT
53412000-04-18 Tom Tromey <tromey@cygnus.com>
5342
5343 PR gcj/211:
5344 * gjavah.c (utf8_cmp): Changed return value.
5345 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
5346 result.
5347 (cxx_keywords): New global.
5348 (get_field_name): Handle new result of cxx_keyword_subst.
5349 (print_method_info): Likewise.
5350
a7384840
BM
53512000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
5352
f6bbde28 5353 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
a7384840 5354 with a newline, for CNI.
f6bbde28 5355 (print_stub_or_jni): Print a space or newline before method name for
a7384840
BM
5356 CNI as well as JNI.
5357 (print_cxx_classname): Don't write leading "::" in CNI stub method.
f6bbde28 5358 (process_file): Include gcj/cni.h if generating CNI stubs.
a7384840 5359
3e0768f0
TT
53602000-04-16 Tom Tromey <tromey@cygnus.com>
5361
5362 * gjavah.c (decompile_method): Use print_field_name.
5363 Fixes PR gcj/205.
5364
48a840d9
APB
53652000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
5366
5367 * parse.y (java_expand_classes): Reverse the package list once.
5368 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
5369 reduction.
5370 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
5371 the `==' and `!=' operators.
5372
cedea510
APB
53732000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
5374
5375 * jcf-write.c (generate_bytecode_insns): At invokation time,
5376 always relate an interface method to the type of its selector.
f6bbde28 5377
e803d3b2
APB
53782000-04-05 Tom Tromey <tromey@cygnus.com>
5379
5380 Fix for PR gcj/2:
5381 * expr.c (expand_invoke): Generate check to see if object pointer
5382 is null in nonvirtual invocation case.
5383 * java-tree.h (soft_nullpointer_node): Declare.
5384 * decl.c (soft_nullpointer_node): New global.
5385 (init_decl_processing): Initialize soft_nullpointer_node.
5386 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
5387 or `private' methods.
5388 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
5389
bc2874c9
TT
53902000-04-05 Tom Tromey <tromey@cygnus.com>
5391
5392 Fix for PR gcj/140:
5393 * parse.y (check_final_assignment): Recognize assignments to the
5394 `length' field of an array when generating class files.
5395
256172c4
APB
53962000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
5397
5398 * class.c (decl_hash): Prototype removed.
5399 (decl_compare): Likewise.
5400
e0fc4118
TT
54012000-04-05 Tom Tromey <tromey@cygnus.com>
5402
5403 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
5404 * parse.y (check_modifiers_consistency): Check for final/volatile
5405 clash. Fixes PR gcj/164.
5406
e0422ed0
APB
54072000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
5408
5409 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
5410 made global.
5411 (java_hash_compare_tree_node): Renamed from `decl_compare, made
5412 global.
5413 (add_method_1): Use `java_hash_hash_tree_node' and
5414 `java_hash_compare_tree_node'.
5415 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
5416 (java_hash_compare_tree_node): Likewise.
5417 * parse.y (find_applicable_accessible_methods_list): Create,
5418 delete and use a hash table to remember already searched interfaces.
5419
4200941b
MW
54202000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
5421
5422 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
5423 with latest entry.
5424
c0b864fc
KG
54252000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5426
5427 * boehm.c (mark_reference_fields, set_bit): Prototype.
5428 (set_bit): Un-ANSI-fy definition.
5429
5430 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
5431 Prototype.
5432
5433 * decl.c (emit_init_test_initialization): Likewise.
5434
5435 * gjavah.c (jni_print_char): Likewise.
5436
5437 * parse.y (create_new_parser_context): Likewise.
5438
7a678b64 5439Thu Mar 30 15:26:56 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
64ea4a5e
APB
5440
5441 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
5442 patch missing hunk. Fixed indentation.
5443
05411ecf
TT
54442000-03-30 Tom Tromey <tromey@cygnus.com>
5445
5446 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
5447 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
5448
acbedd7c
APB
54492000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
5450
5451 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
5452 when negative *before* using it as an array index.
5453 * ChangeLog: Fixed typo.
5454
0981a859
APB
54552000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
5456
5457 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
5458 to 0 when it reaches -1.
5459
54602000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
5461
5462 * jcf-parse.c (get_constant): Properly cast `num' during the
acbedd7c 5463 invocation of `add_double'.
0981a859
APB
5464 * jcf-write.c (push_long_const): Properly cast `lo' before
5465 comparing it to short bounds.
5466 * parse-scan.y (interface_declaration:): Rule re-arrange so that
5467 `interface_body:' is reduced after the current interface is
5468 pushed.
5469
a843e0ce
TT
54702000-03-26 Tom Tromey <tromey@cygnus.com>
5471
5472 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
5473 Java-specific `-f' option.
5474
ad41cc2a
RK
5475Sun Mar 26 11:37:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5476
5477 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
5478 Adjust order of making types.
5479 Make bitsize_*_node values.
5480
770ae6cc
RK
5481Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5482
5483 * class.c (make_field_value): Use byte_position.
5484 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
5485 (java_array_data_offset): Likewise.
5486 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
5487 bzero call.
5488
165f37bc
APB
54892000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
5490
5491 * parse.y (check_abstract_method_definitions): New local
5492 `end_type_reached'. Make sure we also consider `end_type'.
0981a859
APB
5493 (java_check_abstract_method_definitions): Make sure we eventually
5494 consider `java.lang.Object'.
5495 (maybe_use_access_method): Don't use access method if not in the
5496 context of a pure inner class or if the method's context is right.
5497 (find_applicable_accessible_methods_list): New static flag
165f37bc 5498 `object_done'. Don't search abstract classes as interfaces. Fixed
0981a859
APB
5499 indentation. Fixed the `java.lang.Object' only search. Search
5500 class interface(s) first, then fully search enclosing contexts.
5501 (find_most_specific_methods_list): Pick the closest candidate when
165f37bc
APB
5502 they're all abstract.
5503
124906f9
APB
5504Mon Mar 20 08:58:51 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
5505
5506 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
dba41d30 5507 properly initialize `finished_label'. Don't emit gotos for empty
124906f9
APB
5508 try statements.
5509
c14f7160
ML
5510