]> gcc.gnu.org Git - gcc.git/blame - gcc/java/ChangeLog
re PR libstdc++/4150 (catastrophic performance decrease in C++ code)
[gcc.git] / gcc / java / ChangeLog
CommitLineData
a2761d68
AH
12002-04-19 Andrew Haley <aph@redhat.com>
2
3 * jcf-write.c (push_long_const): lo, hi: New variables.
4 Use rshift_double to extract the high part of a 64-bit long.
5 Use WORD_TO_INT to extract the low part.
6
7 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
8 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
9 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
10
7a228918
NB
112002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
12
13 * typeck.c (incomplete_type_error): Remove.
14
b798d8b6
BM
152002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
16
17 * class.c (make_class_data): Set DECL_ALIGN on static class data,
18 for hash synchronization.
19 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
20 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
21 class_type_node.
22
1cde1d05
MW
232002-04-16 Mark Wielaard <mark@klomp.org>
24
25 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
26 negative zero.
27
3020a7f5
BM
282002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
29
30 Fix for PR java/6294:
31 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
32 interfaces.
33
10aa83c7
BM
342002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
35
36 Fix for PR java/6085:
37 * parse.y (patch_method_invocation): Always use build_access_to_thisn
38 to get enclosing "this" argument for inner-class constructor
39 invocation. Pass correct arguments to build_access_to_thisn.
40
9fef1fe3
AG
412002-04-10 Andreas Jaeger <aj@suse.de>
42
43 * gcj.texi (Input Options): Fix extdirs patch.
44
452002-04-10 Anthony Green <green@redhat.com>
46
47 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
48
492002-04-09 Anthony Green <green@redhat.com>
50
51 * gcj.texi (Input Options): Add --extdirs documentation.
52 * jcf-dump.c (OPT_extdirs): New macro.
53 (options): Add extdirs option.
54 (help): Describe --extdirs.
55 (main): Handle OPT_extdirs.
56 * gjavah.c (OPT_extdirs): New macro.
57 (options): Add extdirs option.
58 (help): Describe --extdirs.
59 (main): Handle OPT_extdirs.
60 * jcf-path.c (jcf_path_init): Add extdirs support.
61 (jcf_path_extdirs_arg): New function.
62 (extensions): New variable to hold extensions path entries.
63 * jvspec.c: Remove -fextdirs= when compiling main().
64 * lang.c (java_decode_option): Handle -fextdirs=.
65 * jcf.h (jcf_path_extdirs_arg): Declare new function.
66 * Make-lang.in: Compile jcf-path with version info for use in
67 identifying the appropriate libgcj.jar.
68
66133721
TT
692002-04-08 Tom Tromey <tromey@redhat.com>
70
71 For PR libgcj/5303:
72 * .cvsignore: Added rmic.1 and rmiregistry.1.
73 * gcj.texi (Top): Link to new nodes.
74 (Invoking rmic): New node.
75 (Invoking rmiregistry): Likewise.
76 * Make-lang.in (java.generated-manpages): Added rmic.1 and
77 rmiregistry.1.
78 (java.maintainer-clean): Likewise.
79 ($(srcdir)/java/rmic.1): New target.
80 ($(srcdir)/java/rmiregistry.1): Likewise.
81 (java.install-man): Handle rmic.1 and rmiregistry.1.
82
00b224f8
BM
832002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
84
85 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
86 Add note about handling uncaught exceptions. Add an exception handler
87 to example.
88
0b055ea1
BM
892002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
90
91 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
92 after using it to patch CALL_EXPR.
93
92c76eba
BM
942002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
95
96 * gcj.texi (Invocation): Document CNI invocation API.
97
78ef5b89
NB
982002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
99
100 * expr.c (truthvalue_conversion): Rename. Update.
101 (expand_compare): Update.
102 * java-tree.h (java_truthvalue_conversion): New.
103 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
104
dffd7eb6
NB
1052002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
106
107 * java-tree.h (java_mark_addressable): New.
108 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
109 * typeck.c (mark_addressable): Rename, update.
110
ceef8ce4
NB
1112002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
112
113 * expr.c (build_java_binop): Update.
114 * java-tree.h (java_signed_type, java_unsigned_type,
115 java_signed_or_unsigned_type): Update.
116 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
117 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
118 * parse.y (patch_binop): Update.
119 * typeck.c (signed_or_unsigned_type, unsigned_type,
120 signed_type): Update.
121
7cb32822
NB
1222002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
123
124 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
125 (java_dummy_print): Remove.
126 (lang_print_error): Rename. Exit early if inhibiting output.
127 (inhibit_error_printing_function): New.
128 (java_init): Don't set hook.
129 (lang_init_source): Use new boolean.
130
5bebbee7
MK
1312002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
132
133 * parse.y (do_resolve_class): Fix infinite recursion.
134
bce54832
TT
1352002-03-29 Tom Tromey <tromey@redhat.com>
136
137 * parse.y (check_inner_circular_reference): Ignore incomplete
138 types.
139
b0c48229
NB
1402002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
141
142 * Make-lang.in (builtins.o): Update.
143 * boehm.c (get_boehm_type_descriptor): Update.
144 * builtins.c: Include langhooks.h.
145 * decl.c (java_init_decl_processing): Update.
146 * java-tree.h (java_type_for_mode, java_type_for_size): New.
147 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
148 Redefine.
149 * typeck.c (type_for_mode, type_for_size): Update.
150
5843e870
MK
1512002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
152
153 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
154
073681c5
TT
1552002-03-28 Tom Tromey <tromey@redhat.com>
156
157 * except.c (expand_end_java_handler): If the handler type is NULL,
158 use java.lang.Throwable. Fixes PR java/5986.
159
242747e5
APB
1602002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
161
162 Fix for PR java/4715:
163 * jcf-parse.c (parse_source_file_3): New function.
164 (read_class): Call it.
165 (java_parse_file): Likewise.
166
f5eb5fd0
JH
167Thu Mar 28 13:22:22 CET 2002 Jan Hubicka <jh@suse.cz>
168
169 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
170
c187b20e
BM
1712002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
172
173 * parse.y (resolve_package): Initialize "decl".
174 (lookup_package_type): Remove unused function.
175
2f418289
BM
1762002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
177
178 Fix for PR java/5993:
179 * parse.y (resolve_package): Return the decl if resolution was
180 successful. Don't special case "java.lang" and "java.lang.reflect"
181 packages. Set type_name to the merged identifier.
182 (resolved_qualified_expression_name): Print error using "name" if
183 resolve_package returns NULL_TREE.
184
39bea374
TT
1852002-03-27 Tom Tromey <tromey@redhat.com>
186
187 * expr.c (expand_invoke): Don't generate null pointer check if
188 we're calling <init>.
189
c9d892a8
NB
1902002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
191
192 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
193 fix prototype.
194 * java-tree.h (java_lang_expand_expr): Similarly.
195 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
196 (java_init): Don't set hook.
197
05833095
BM
1982002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
199
200 Fix for PR java/5850:
201 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
202 context if field was not found in the current scope.
203 * expr.c (lookup_field): Don't look in enclosing contexts.
204
c8c21a8c
TT
2052002-03-26 Tom Tromey <tromey@redhat.com>
206
207 Fix for PR java/5942:
208 * parse.y (init_src_parse): Added sanity check.
209 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
210 elements, not 11.
211
4f0ade92
NB
2122002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
213
214 * decl.c (lang_mark_tree): Rename java_mark_tree.
215 * java-tree.h (java_mark_tree): New.
216 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
217
15e5ad76
ZW
2182002-03-25 Zack Weinberg <zack@codesourcery.com>
219
220 * lex.c: Change java_perform_atof to take normal parameters
221 instead of a pointer to a parameter block. Call it directly
222 from java_lex.
223
caaabaa1
MW
2242002-03-22 Mark Wielaard <mark@klomp.org>
225
226 Fix for PR java/5368:
227 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
228 when printing error message.
229
c88770e9
NB
2302002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
231
232 * decl.c (maybe_build_cleanup): Remove.
233
c58408bf
TT
2342002-03-22 Tom Tromey <tromey@redhat.com>
235
236 Andrew Haley <aph@cambridge.redhat.com>
237
238 * expr.c (build_field_ref): Don't build a check if the field is a
239 member of `this'.
240
6c18d181
EB
2412002-03-21 Eric Blake <ebb9@email.byu.edu>
242
243 Fix for PR java/6026:
244 * lex.c (java_lex): Fix parsing of consecutive floats.
245
a5778545
TT
2462002-03-21 Tom Tromey <tromey@redhat.com>
247
248 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
249 class.
250
43577e6b
NB
2512002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
252
253 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
254 insert_block, getdecls, kept_level_p, global_bindings_p): New.
255
fe911510
NF
2562002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
257
15e5ad76
ZW
258 * gcj.texi: @code{gcj} becomes @command{gcj}.
259 @code{gcc} becomes @command{gcc}.
260 GcjRaw changed to gnu.gcc.RawData.
261
7afff7cf
NB
2622002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
263
264 * decl.c (start_java_method): Use new hook.
265 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
266 (java_init): Remove old hook.
267
c2d8e20a
APB
2682002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
269
270 * builtins.c (define_builtin): Do nothing if `type' is null.
271 Fixes PR java/5876.
272
6befbee5
BM
2732002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
274
275 * parse.y (parser_check_super_interface): Fix error message
276 grammar/order.
277
320c81a6
KG
2782002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
279
280 * jcf-parse.c (get_constant): Delete unused variables.
281
52dabb6c
NB
2822002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
283
284 * java-tree.h (java_parse_file): New.
285 * jcf-parse.c (yyparse): Rename java_parse_file.
286 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
287
568d1435
BM
2882002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
289
290 * parse.y (craft_constructor): Return the constructor decl.
291 (java_expand_classes): Update comments.
292 (lookup_method_invoke): Call fix_constructors immediately for
293 anonymous class. Fixes PR java/5935.
294
8d39b447
AG
2952002-03-15 Anthony Green <green@redhat.com>
296
297 * jcf-parse.c (yyparse): Don't emit class registration
298 constructor when compiling resource files.
299
2f9834e8
KG
3002002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
301
302 * lang.c (java_tree_code_type, java_tree_code_length,
303 tree_code_name): Delete.
304 (tree_code_type, tree_code_length, tree_code_name): Define.
305 (java_init): Don't try to copy into the various tree_code
306 arrays.
307
f792bce5
TT
3082002-03-12 Tom Tromey <tromey@redhat.com>
309
8a611251
TT
310 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
311 UTF-8, not UCS-2. Fixes PR java/5923.
312
f792bce5
TT
313 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
314 a call_expr wrapped in a convert. Fixes PR java/5848.
315
acf8bc25
BM
3162002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
317
318 * jcf-write.c (write_classfile): Improve error strings.
319
e0b1c206
EB
3202002-03-11 Eric Blake <ebb9@email.byu.edu>
321
322 * lex.c: Adjust comments to GNU standards.
323
3242002-03-11 Eric Blake <ebb9@email.byu.edu>
325
326 Fix for PR java/5902:
327 * lex.c (java_lex): Fix parsing of literals.
328
884523df
BM
3292002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
330
331 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
332 to prevent it getting evaluated twice in the store checking case.
333 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
334 examining OBJECT.
335
45597167
BM
3362002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
337
338 * decl.c (java_init_decl_processing): Make sure class_type_node
339 alignment is not less than 64 bits if hash synchronization is enabled.
340
edcc88c1
PB
3412002-03-08 Per Bothner <per@bothner.com>
342
343 * parse.y (java_complete_lhs): Check if patch_assignment
344 returned an error-mark.
345
346 * parse.y (try_builtin_assignconv): Don't special-case zero.
347
5295f849
PB
3482002-03-08 Per Bothner <per@bothner.com>
349
350 Fix for PR java/5812.
351 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
352 gere instead of in JSR macro. Likewise with load_type_state call.
353 Do the latter on if the return_pc has been verified (the jsr returns).
354 (JSR): No just call build_java_jsr.
355
d3e1c36d
JS
3562002-03-07 Jeff Sturm <jsturm@one-point.com>
357
358 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
359 (java.install-common): Link native driver to
360 JAVA_TARGET_INSTALL_NAME.
361
6d6b5cd7
DB
3622002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
363
364 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
365 * builtins.c(sin_builtin): Likewise
366 * builtins.c(sqrt_builtin): Likewise
367
ba31d94e
ZW
3682002-03-03 Zack Weinberg <zack@codesourcery.com>
369
370 * java/expr.c, java/jcf-parse.c, java/lex.c:
371 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
372 REAL_ARITHMETIC blocks unconditional. Delete some further
373 #ifdef blocks predicated on REAL_ARITHMETIC.
374
ca7558fc
KG
3752002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
376
377 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
378 explicit sizeof/sizeof.
379 * decl.c (java_init_decl_processing): Likewise.
380 * jcf-parse.c (init_jcf_parse): Likewise.
381 * parse.y (init_src_parse): Likewise.
382
2a85660d
PB
3832002-03-02 Per Bothner <per@bothner.com>
384
385 Make --CLASSPATH by a synonym for --classpath and -classpath.
386 Implement --bootclasspath.
387 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
388 (classpath_l): Remove.
389 (jcf_path_CLASSPATH_arg): Remove.
390 (jcf_path_bootclasspath_arg): New function.
391 (jcf_path_seal): Simplify accordingly.
392
393 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
394 (jcf_path_CLASSPATH): Remove declaration.
395 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
396 (lang_specific_driver): Translate -bootclasspath.
397 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
398 * lang.c (decode_lang_options): Do jcf_path_init first.
399 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
400 * gjavah.c: Also handle --bootclasspath.
401 Handle --CLASSPATH as a synonum for --classpath.
402 * jcf-dump.c: Likewise.
403
404 "." is not part of system path, but is the default for --classpath.
405 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
406 (jcf_path_seal): Add "." if no CLASSPATH specified.
407
408 * gcj.texi: Document changes.
409
2060fd4c
BM
4102002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
411
412 * expr.c (build_java_arraystore_check): Fix formatting.
413
4f647d52
APB
4142002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
415
416 Fix for PR java/5758, java/5632:
417 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
418 inner-class separator too.
419 * parse.y (do_resolve_class): New local `decl_result.'
420 Progressively build a name for what can have been loaded.
421
022dcc46
BM
4222002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
423
424 * expr.c (java_array_data_offset): Removed function.
425 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
426 (build_java_array_length_access): Obtain "length" value using a
427 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
428 (build_java_arrayaccess): Correct comment. Access "data" using a
429 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
430 (build_java_arraystore_check): New function.
431 (expand_java_arraystore): Use build_java_arraystore_check.
432 * parse.y (patch_assignment): Simplify code to insert a store check
433 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
434 * check-init.c (check_init): Update to reflect that an array length
435 access is now a COMPONENT_REF.
436 * gcj.texi (Code Generation): Improve documentation of
437 -fno-bounds-check. Add documentation for -fno-store-check.
438 * java-tree.h (flag_store_check): Declare.
439 (build_java_arraystore_check): Declare.
440 * lang.c (flag_store_check): Initialize to 1.
441 (lang_f_options): Add store-check option.
442 * jvspec.c: Don't pass store-check option to jvgenmain.
443 * lang-options.h: Add help string for -fno-store-check.
444
63e1b1c4
NB
4452002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
446
447 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
448 * java-tree.h (java_dup_lang_specific_decl): New.
449 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
450
f458d1d5
ZW
4512002-02-27 Zack Weinberg <zack@codesourcery.com>
452
453 * builtins.c, decl.c: Delete traditional-mode-related code
454 copied from the C front end but not used, or used only to
455 permit the compiler to link.
456
d2fb5329
TT
4572002-02-22 Tom Tromey <tromey@redhat.com>
458
459 Fix for PR java/2369:
460 * jvspec.c (verify_class_name): New function.
461 (lang_specific_driver): Call it.
462 (JAVA_START_CHAR_P): New macro.
463 (JAVA_PART_CHAR_P): Likewise.
464
dcb36804
PB
4652002-02-22 Per Bothner <per@bothner.com>
466
022dcc46 467 * class.c: Change vtable to be more compatible with g++ v3 abi.
dcb36804
PB
468 (get_dispatch_table): Prepend offset-to-top (always 0) and
469 type_info pointer (currently unimplemented hence NULL) to vtable.
470 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
471 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
472 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
473 (build_dtable_decl): Add declarations for new fields.
474
453c182f
PB
4752002-02-20 Per Bothner <per@bothner.com>
476
477 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
478 to finit$ (otherwise generate_bytecode_insns drops it). However, we
479 don't need to set it on the COMPOUND_EXPR - the caller does that.
480
3babb2e3
NF
4812002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
482
15e5ad76
ZW
483 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
484 `--CLASSPATH' becomes `--classpath.'
485 * gjavah.c: Likewise.
486 * jcf-dump.c: Likewise.
487 * lang-options.h: Likewise.
488 * lang.c: Likewise.
489 * jcf-path.c: Updated comment.
490 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
491 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
492 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
493 (jcf_path_CLASSPATH_arg): Ditto.
494 (classpath_u): Updated leading comment.
3babb2e3 495
9fe2cc05
PB
4962002-02-20 Per Bothner <per@bothner.com>
497
498 * builtins.c (check_for_builtin): New function.
499 (build_call_or_builtin): Remove.
500 * java-tree.h: Update accordingly.
501 * expr.c (expand_invoke): Use build + check_for_builtin instead
502 of build_call_or_builtin.
503 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
504 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
505 flag (which had caused jcf-write to incorrectly emit invokevirtual).
506
6b6294f1
TT
5072002-02-17 Tom Tromey <tromey@redhat.com>
508
509 * java-tree.h (TYPE_STRICTFP): New macro.
510 (struct lang_type) [strictfp]: New field.
511 (CLASS_STRICTFP): New macro.
512 (METHOD_STRICTFP): New macro.
513 (struct lang_decl) [strictfp]: New field.
514 * parse.y (method_header): Disallow strictfp constructor or
515 abstract method.
516 (STRICT_TK): Move before MODIFIER_TK.
517 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
518 (METHOD_MODIFIERS): Likewise.
519 (INTERFACE_MODIFIERS): Likewise.
520 * jcf-write.c (get_access_flags): Likewise.
521 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
522 (add_method_1): Likewise.
523 (get_access_flags_from_decl): Likewise.
524 * jcf-dump.c (print_access_flags): Print in standard order. Also,
525 recognize strictfp flag.
526 * jcf.h (ACC_STRICT): New define.
527
5667c33d
DB
5282002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
529
530 * class.c(build_utf8_ref): Move declaration of decl_size
531
5d65aeb7
TT
5322002-02-07 Tom Tromey <tromey@redhat.com>
533
534 * gcj.texi (Input Options): --CLASSPATH does not suppress system
535 path.
536
10c45943
AG
5372002-02-04 Anthony Green <green@redhat.com>
538
539 * class.c (build_utf8_ref): Put UTF-8 constants into merged
540 sections if available.
541
14b71055
BM
5422002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
543
544 * parse.y (java_expand_classes): Fix typo in static field loop.
545
f0c75752
RH
5462002-02-02 Richard Henderson <rth@redhat.com>
547
548 * class.c (add_field): Mark static fields external.
549 (build_class_ref): Remove redundant set.
550 * parse.y (java_expand_classes): Mark static fields of classes
551 to be compiled as local.
552 * jcf-parse.c (parse_class_file): Likewise.
553
d4ad1c90
NF
5542002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
555
556 * gcj.texi (About CNI): New node.
557
58fae3f7
CR
5582002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
559
560 PR java/5080
561 * jcf-parse.c : Check for HAVE_LOCALE_H before using
562 setlocale() with LC_CTYPE as a parameter.
563 * jv-scan.c: Same.
564
8512bbd7
JM
5652002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
566
567 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
568 Follow GNU Coding Standards for --version.
569
adc8cb5d
TT
5702002-01-28 Tom Tromey <tromey@redhat.com>
571
572 * expr.c (build_jni_stub): Ensure storage for `meth' is
573 generated.
574 * parse.y (java_complete_expand_methods): Set
575 current_function_decl before building JNI stub.
576
1d8478d7 5772002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
15e5ad76 578
1d8478d7
AT
579 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
580 BUILT_IN_SQRTF.
581
fec763fc
TT
5822002-01-22 Tom Tromey <tromey@redhat.com>
583
584 * decl.c (java_init_decl_processing): Use add_predefined_file.
585 Predefine RawData.java.
586 (predef_filenames): Removed.
587 (java_init_decl_processing): Don't register predef_filenames.
588 * jcf-parse.c (add_predefined_file): New function.
589 (predefined_filename_p): Rewrote.
590 (predefined_filename_p): No longer static.
591 * decl.c (java_init_decl_processing): Call initialize_builtins.
592 * Make-lang.in (JAVA_OBJS): Added builtins.o.
593 (java/builtins.o): New target.
594 * builtins.c: New file.
595 * parse.y (patch_invoke): Use build_call_or_builtin.
596 * java-tree.h (build_call_or_builtin): Declare.
597 (initialize_builtins): Declare.
598 (java_set_exception_lang_code): Removed unused declaration.
599 (PREDEF_FILENAMES_SIZE): Removed.
600 (java_tree_index): Added JTI_PREDEF_FILENAMES.
601 (predef_filenames): New define.
602 (add_predefined_file): Declare.
603 (predefined_filename_p): Declare.
604 * expr.c (expand_invoke): Use build_call_or_builtin.
605
cc586d70
KG
6062002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
607
608 * parse.y (patch_switch_statement): Fix format specifier.
609
0df29596
TT
6102002-01-16 Tom Tromey <tromey@redhat.com>
611
612 More for PR java/5365:
613 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
614 default.
615 (process_file): Generate include for
616 java.lang.UnsupportedOperationExceptions.
617
e1886ae0
AJ
6182002-01-15 Andreas Jaeger <aj@suse.de>
619
620 * .cvsignore: Add man pages.
621
9c874875
TT
6222002-01-15 Tom Tromey <tromey@redhat.com>
623
624 Fix for PR java/5365:
625 * gjavah.c (process_file): Turn class name into a file name.
626
707635f9
MK
6272002-01-14 Matthias Klose <doko@debian.org>
628
629 * gcj.texi: Fix whitespace and formatting errors in the
630 synopsis of the man pages. Update copyright.
631
e6a5e462
TT
6322002-01-14 Tom Tromey <tromey@redhat.com>
633
634 For PR libgcj/5303:
635 * Make-lang.in (java.install-man): Handle jv-convert man page.
636 (java.generated-manpages): Added jv-convert.1.
637 (java.uninstall): Remove jv-convert.1.
638 (java.maintainer-clean): Likewise.
639 ($(srcdir)/java/jv-convert.1): New target.
640 * gcj.texi (Top): Link to jv-convert node.
641 (Individual utilities): Likewise.
642 (Invoking jv-convert): New node.
643
0b0d4c5b 6442001-01-10 Jeff Sturm <jsturm@one-point.com>
f0c75752 645 Martin Kahlert <martin.kahlert@infineon.com>
0b0d4c5b
JS
646
647 * jcf-parse.c (get_constant): Don't swap lo/hi for big
648 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
649
c0b65ff1 6502002-01-03 Graham Stott <grahams@redhat.com>
79ab76fd 651
f0c75752
RH
652 * class.c (compile_resource_file): Update copyright date.
653 Constify filename parameter.
654 (java-tree.h): Update copyright date.
655 (compile_resource_file): Constify filename parameter.
79ab76fd 656
22e85ed4
GS
6572002-01-03 Graham Stott <grahams@redhat.com>
658
f0c75752
RH
659 * gcc/jcf-parse.c: Update copyright date.
660 (yyparse): Constify resource_filename.
22e85ed4 661
5e65297b
KG
6622002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
663
664 * parse.y (src_parse_roots): Don't needlessly zero init.
665
12cfb4fc
TT
6662001-12-31 Tom Tromey <tromey@redhat.com>
667
668 * parse.y (dump_java_tree): New function.
669 (source_end_java_method): Call it.
670 (end_class_declaration): Likewise.
671 * lang.c (java_decode_option): Call dump_switch_p.
672
dab722ee
TT
6732001-12-28 Tom Tromey <tromey@redhat.com>
674
675 * gen-table.pl: Don't process characters after \uffff. Added
676 comment pointing to input file.
677
7b0295ab
KG
6782001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
679
680 * gen-table.pl: Const-ify output. Document the location of a
681 suitable unicode input file.
682
683 * chartables.h: Regenerate.
684
c083a819
KG
6852001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
686
687 * chartables.h: Const-ify.
688 * gjavah.c (options): Likewise.
689 * jcf-dump.c (options): Likewise.
690 * jv-scan.c (options): Likewise.
691 * lex.c (java_start_char_p, java_part_char_p): Likewise.
692 * parse.y (binop_lookup): Likewise.
693
0b5826ac
KG
6942001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
695
696 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
697 the static arrays that are output.
698 * jvspec.c (jvgenmain_spec): Make static.
699 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
700 * keyword.h: Regenerate.
701 * lang.c (string_option, process_option_with_no, lang_f_options,
702 lang_W_options): Const-ify.
703 * lex.c (java_lex): Likewise.
704
9a07cfaf
RH
7052001-12-21 Richard Henderson <rth@redhat.com>
706
707 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
708 (get_boehm_type_descriptor): ... here. Arrange for the
709 TREE_TYPE to get set properly.
710
f44fefca
RH
7112001-12-21 Richard Henderson <rth@redhat.com>
712
ef969525
RH
713 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
714 only if the target requires collect2.
715
f44fefca
RH
716 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
717
84a944b3
TT
7182001-12-20 Tom Tromey <tromey@redhat.com>
719
720 For PR java/4509:
721 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
722 CAN_COMPLETE_NORMALLY for the node.
723 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
724 generate code for second branch if first branch can't complete
725 normally.
726 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
727 the loop head if the loop body can't complete normally.
728
2d93b924
TT
7292001-12-20 Tom Tromey <tromey@redhat.com>
730
731 For PR java/4766:
732 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
733 case where `finally' clause can't complete normally.
734
f2af50db
TT
7352001-12-20 Tom Tromey <tromey@redhat.com>
736
737 Fixes PR java/5057:
738 * parse.y (analyze_clinit_body): Added this_class parameter.
739 Check for more cases where we must keep <clinit>.
740 (maybe_yank_clinit): Cleaned up flow control.
741
7899e8b9
BM
7422001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
743
e1886ae0 744 * decl.c (java_init_decl_processing): Don't initialize
7899e8b9
BM
745 finit_leg_identifier_node.
746 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
747 (finit_leg_identifier_node): Remove.
748 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
749
de4984af
BM
7502001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
751
e1886ae0 752 * mangle.c (mangle_member_name): Don't special-case for
de4984af
BM
753 NO_DOLLAR_IN_LABEL.
754 * mangle_name.c (unicode_mangling_length): Likewise.
755 (append_unicode_mangled_name): Likewise.
756 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
757 code.
758
08514ae4
BM
7592001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
760
761 * expr.c (build_java_array_length_access): Don't force null pointer
762 check unless flag_check_references is set.
763
56b8325e
TT
7642001-12-20 Tom Tromey <tromey@redhat.com>
765
766 Fix for PR java/3417:
767 * parse.y (patch_assignment): Added special processing for
768 `return'.
769 (patch_return): Don't convert booleans to integers, and don't
770 special-case `null'.
771
38be19f6
JM
7722001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
773
774 * config-lang.in (diff_excludes): Remove.
775
b11cc610
JM
7762001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
777
778 * gcj.texi: Update link to GCC manual.
779
e97562f5
TT
7802001-12-17 Tom Tromey <tromey@redhat.com>
781
782 * parse.y (link_nested_class_to_enclosing): Removed useless
783 statement.
784
2c5187c5
TT
7852001-12-16 Tom Tromey <tromey@redhat.com>
786
787 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
788 Fixes PR java/5088.
789
a83f01f0
JM
7902001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
791
792 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
793 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
794 spelling errors.
795
faf31866
KG
7962001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
797
798 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
799
9a8de998
BM
8002001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
801
802 * decl.c (java_init_decl_processing): Build otable_type correctly.
803 otable_decl is an otable_type.
804
861ef928
BM
8052001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
806
807 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
e1886ae0 808 otable_type, otable_ptr_type, method_symbol_type,
861ef928
BM
809 method_symbols_array_type, method_symbols_array_ptr_type): New
810 field/global tree definitions.
811 (flag_indirect_dispatch): New flag.
e1886ae0 812 * decl.c (java_init_decl_processing): Initialize new otable and
861ef928
BM
813 otable_syms type nodes and decls. Add new field "index" to
814 method_type_node.
815 * class.c (build_method_symbols_entry): New function.
816 (make_method_value): Set "index" to to method's vtable index for
817 virtual methods when indirect-dispatch is not used.
a83f01f0 818 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
861ef928
BM
819 and set vtable_method_count to -1. Set otable and otable_syms field
820 if indirect-dispatch is used and there was something to put in them.
821 (build_method_symbols_entry): New function.
822 (emit_offset_symbol_table): New function.
823 * expr.c (get_offset_table_index): New function.
e1886ae0 824 (build_invokevirtual): Build array reference to otable at the index
861ef928
BM
825 returned by get_offset_table_index, and use the result as the vtable
826 offset.
827 (build_invokeinterface): Similar.
e1886ae0
AJ
828 * jcf-parse.c (yyparse): If indirect-dispatch, call
829 emit_offset_symbol_table at the end of compilation, after all classes
861ef928
BM
830 have been generated.
831 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
832 * lang.c (flag_indirect_dispatch): Define.
833 (lang_f_options): Add indirect-dispatch flag.
834
f1727481
MK
8352001-12-14 Matthias Klose <doko@debian.org>
836
837 * gcj.texi: Markup for man page generation. Document missing
838 options printed by <tool> --help.
839 Terminate description of gij's -ms option with a dot.
840 * Make-lang.in ($(srcdir)/java/*.1): New targets.
841 (java.generated-manpages java.install-man, java.uninstall,
842 java-maintainer-clean) Updated.
843
eec87542
HB
8442001-12-14 Hans Boehm <Hans_Boehm@hp.com>
845
846 * class.c (get_dispatch_table): Fix java vtable layout
847 for TARGET_VTABLE_USES_DESCRIPTORS.
848 * decl.c (java_init_decl_processing): Initialize
849 alloc_no_finalizer_node, finalize_identifier_node.
850 * expr.c (class_has_finalize_method): New function.
851 (expand_java_NEW): Generate calls for finalizer-free allocation.
852 (build_invokevirtual): Fix java vtable layout for
853 TARGET_VTABLE_USES_DESCRIPTORS.
e1886ae0 854 * java-tree.h (enum java_tree_index): New entries:
eec87542
HB
855 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
856 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
857 (class_has_finalize_method): declare.
858 (HAS_FINALIZER_P): New macro.
859 * parse.y (patch_invoke): Generate calls for finalizer-free
860 allocation.
861
81deb0a3
MK
8622001-12-12 Matthias Klose <doko@debian.org>
863
864 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
865 whitespace at end of line.
866
34026199
TT
8672001-12-11 Tom Tromey <tromey@redhat.com>
868
869 * lex.c (java_init_lex): Define wfl_to_string as
870 gnu.gcj.runtime.StringBuffer unless generating bytecode.
871
a3bcfa67
JS
8722001-12-11 Jeff Sturm <jsturm@one-point.com>
873
874 * class.c (make_method_value): Use null_pointer_node to
875 represent empty exception table.
876
3afdfae8
TT
8772001-12-10 Tom Tromey <tromey@redhat.com>
878
879 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
880
96a9c44f
DR
881Mon Dec 10 06:09:57 2001 Douglas B. Rupp <rupp@gnat.com>
882
883 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
884
a5cb134d
PB
8852001-12-09 Per Bothner <per@bothner.com>
886
887 * check-init.c (current_switch_has_default): New static field.
888 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
889 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
890 DEFAULT_EXPR seen, simulate a default alternative that copies state.
891
1aca9b81
TT
8922001-12-09 Tom Tromey <tromey@redhat.com>
893
894 * check-init.c (check_init): Don't allow pre- or post- increment
895 or decrement of final variable.
896 (final_assign_error): Minor error message rewording.
897
4440ffc4
TT
8982001-12-08 Tom Tromey <tromey@redhat.com>
899
0854b1c4
TT
900 * java-tree.h: Fixed typo.
901
5fcab235
TT
902 * gjavah.c (decompile_method): Don't decompile to `return this'
903 for static methods.
904
7b35f6c9
TT
905 * gjavah.c (cxx_keywords): Re-sorted.
906 * lex.c (cxx_keywords): Re-sorted.
907
897c9e66
TT
908 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
909 else.
910
4440ffc4
TT
911 * gjavah.c (print_namelet): Clear subnamelets.
912 (HANDLE_METHOD): Set `method_printed' earlier.
913
8f25dc28
TT
9142001-12-07 Tom Tromey <tromey@redhat.com>
915
916 * lang.c (lang_f_options): Added
917 optimize-static-class-initialization.
918 (java_decode_option): Removed special case.
919
a9040c77
PB
9202001-12-07 Per Bothner <per@bothner.com>
921
922 * check-init.c (check_init): Fix typo freeing memory twice.
923
5412ef6b
PB
9242001-12-05 Per Bothner <per@bothner.com>
925
926 Restore support for static class initialization optimization.
927 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
928 * check-init.c (check_int): At end of BLOCK handle initialization
929 blocks, which used to be done in java_complete_expand_method but did
930 not handle the case where check_for_initialization might allocate
931 more than a word of bits.
932 * decl.c (lang_make_tree): The smic field is now a tree.
933 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
934 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
935
936 * parse.y (emit_test_initialization): Combine hash_lookup calls.
937
938 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
939 Change from a hash table to a list.
940 (struct_lang_decl): Change field 'smic' to match.
941 * class.c (add_method_1): Initialize
942 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
943 * parse.y (adjust_init_test_initialization): Removed - inlined into -
944 (java_expand_method_bodies): -here, since 'smic' is now a list.
945 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
946
947 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
948
949 * class.c (java_hash_compare_tree_node): Fix casts.
950
4f88ccda
PB
9512001-12-04 Per Bothner <per@bothner.com>
952
953 * check-init.c: Handle definite unassignment to finals in addition
954 to definite assignment.
955 (loop_current_locals): New field.
956 (num_current_locals, int start_current_locals, num_current_words):
957 Make static.
958 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
959 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
960 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
961 (get_variable_decl, check_final_reassigned): New functions.
962 (check_init, check_bool_init): Modify as needed for checking finals.
963 (check_for_initialization): Take extra parameter and return void.
964 Do extra start-up logic to check final fields for assignment.
965 * parse.y (check_static_final_variable_assignment_flag,
966 reset_static_final_variable_assignment_flag, check_final_assignment,
967 check_final_variable_local_assignment_flag,
968 reset_final_variable_indirect_assignment_flag,
969 reset_final_variable_global_assignment_flag): Remove functions.
970 (java_complete_expand_methods, outer_field_access_fix,
971 patch_assignment): Remove no-longer used logic.
972 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
973 * parse.y (register_fields, java_complete_tree): Update accordingly.
974
975 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
976 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
977 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
978
979 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
980
981 * java-tree.h (DECL FINAL): New bit-field.
982 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
983 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
984 (DECL_INIT_CALLS_THIS): New macro.
985 (struct lang_decl): New bit-field init_calls_this.
986 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
987 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
988 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
989 use it for both local variables and final fields.
990 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
991 and local_final.
992 (struct lang_type): Remove hfv bit-field.
993 (check_for_initialization): Change to return void.
994
995 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
996 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
997 * check-init.c (final_assign_error): New helper function.
998 (check_final_reassigned, check_init): Use it.
999 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
e1886ae0 1000
4f88ccda
PB
1001 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
1002 bit-fields to unsigned.
1003
87d4ad08
PB
10042001-12-03 Per Bothner <per@bothner.com>
1005
1006 * parse.y (patch_binop): Minor constant folding.
1007
1008 * parse.y (build_current_thisn): Shorter 'buffer'.
1009
aedcdb65
PB
10102001-12-03 Per Bothner <per@bothner.com>
1011
1012 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
1013 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
1014 * jcf-write.c (generate_bytecode_insns): Remove support for
1015 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
1016 * check-init.c (check_init): Likewise.
1017
82ff672e
PB
10182001-12-03 Per Bothner <per@bothner.com>
1019
1020 * verify.c (subroutine_nesting): New function.
1021 (verify_jvm_instructions): Use it to fix logic for checking that
1022 we're done with the current subroutine.
1023
1024 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
1025 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
1026
98a63868
PB
10272001-12-03 Per Bothner <per@bothner.com>
1028
1029 * jcf.h: Fix obvious typo in comment.
1030 * typeck.c (build_null_signature): Add comment.
1031
c725bd79
NB
10322001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
1033
1034 * expr.c: Remove leading capital from diagnostic messages, as
1035 per GNU coding standards.
1036 * jcf-io.c: Similarly.
1037 * jcf-parse.c: Similarly.
1038 * jv-scan.c: Similarly.
1039 * jvspec.c: Similarly.
1040 * mangle.c: Similarly.
1041
b736dee6
TCH
10422001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
1043 Alexandre Petit-Bianco <apbianco@redhat.com>
1044
e1886ae0 1045 * expr.c (build_java_arrayaccess): Call save_expr on array for
7e5f4bee 1046 correct evaluation order, modified comment, fixed indentation.
b736dee6
TCH
1047 * parse.y: (patch_assignment): Correctly extract the array base
1048 from the tree generate by build_java_arrayaccess, added comments.
1049 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
1050 Fixes PR java/3096, PR java/3803, PR java/3965.
1051
357351e5
NB
10522001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
1053
1054 * expr.c (expand_byte_code): Remove trailing periods from messages.
1055 * jcf-parse.c (load_class, jcf_parse): Similarly.
1056 * jcf-write.c (generate_classfile): Similarly.
1057 * lex.c (java_lex): Similarly.
1058
a7c5337d
BM
10592001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1060
1061 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
1062
d3945f0a
JM
10632001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
1064
1065 * Make-lang.in (java.generated-manpages): New dummy target.
1066
b856c15d
RO
10672001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1068
1069 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
1070 ASM_FINAL_SPEC.
1071 (lang_specific_pre_link): Use set_input to set input_filename.
1072 Append `main' here.
1073 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
1074 (main): Fix definition.
1075 Strip `main' from classname.
1076 Fixes PR java/227.
1077
9c2fcf09
RS
10782001-11-18 Roger Sayle <roger@eyesopen.com>
1079
1080 * parse.h (java_expand_switch): Remove old prototype.
1081
8aeb42d0
TT
10822001-11-18 Tom Tromey <tromey@redhat.com>
1083
1084 Fix for PR java/1401:
1085 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
1086 arg0 is null.
1087 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
1088 correctly.
1089
22703ccc
NB
10902001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
1091
1092 * lang.c (finish_parse): Rename to java_finish.
1093 (LANG_HOOKS_FINISH, java_finish): New.
1094
f5e99456
NB
10952001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
1096
1097 * decl.c (init_decl_processing): Rename java_init_decl_processing.
1098 * java-tree.h: New prototype.
1099 * lang.c (java_init): Update prototype. Combine with old init_parse.
1100
150f086d
TT
11012001-11-13 Tom Tromey <tromey@redhat.com>
1102
1103 * gjavah.c (method_signature): New global.
1104 (HANDLE_METHOD): Set it.
1105 (decompile_return_statement): New function.
1106 (decompile_method): Use it.
1107 (print_method_info): Removed `synth' argument.
1108
5d69f816
NB
11092001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
1110
1111 * java-tree.h (java_set_yydebug): New.
1112 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
1113 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
1114 (print_lang_decl, print_lang_type, print_lang_identifier,
1115 print_lang_statistics, lang_print_xnode): Remove.
1116
3ac88239
NB
11172001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
1118
1119 * jcf-parse.c (init_lex): Remove.
1120 * lang.c (language_string, lang_identify): Remove.
1121 (struct lang_hooks): Constify.
1122 (LANG_HOOKS_NAME): Override.
1123 (init_parse): Update.
1124
b21d216c
AF
11252001-11-08 Andreas Franck <afranck@gmx.de>
1126
e1886ae0 1127 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
b21d216c
AF
1128 program_transform_name the way suggested by autoconf.
1129 (java.install-common): Also transform auxiliary program names with
1130 program_transform_name.
1131
1fa73144
TT
11322001-11-08 Tom Tromey <tromey@cygnus.com>
1133
1134 * parse.y (trap_overflow_corner_case): New rule.
1135 (unary_expression): Use it.
1136 * lex.c (java_init_lex): Don't set minus_seen.
1137 (yylex): Don't use minus_seen. Communicate overflow to parser for
1138 it to handle.
1139 (error_if_numeric_overflow): New function.
1140 * parse.h (minus_seen): Removed field.
1141 (JAVA_RADIX10_FLAG): New define.
1142
5a21a051
TT
11432001-11-07 Tom Tromey <tromey@redhat.com>
1144
1145 Patch for PR java/1414:
1146 * parse.y (case_label_list): New global.
1147 (goal): Register case_label_list with GC.
1148 (java_complete_lhs): Save new case on case_label_list.
1149 (patch_switch_statement): Check for duplicate case labels.
1150
5573cb39
APB
11512001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
1152
1153 * parse.y (patch_assignment): Removed unused third argument.
1154 (java_complete_lhs): Removed unused third argument to patch_assignment.
1155
d23c55c2
NB
11562001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
1157
1158 * lang.c: Include langhooks-def.h.
1159 * Make-lang.in: Update.
1160
5b7874aa
ZW
11612001-10-31 Zack Weinberg <zack@codesourcery.com>
1162
1163 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
1164
2b472f91
BM
11652001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1166
1167 * mangle.c (find_compression_record_match): Don't match compression
1168 records for package name elements unless they occur at the start of
1169 the name. Fix for PR java/4717.
1170
961b8e70
BM
11712001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1172
1173 * expr.c (expand_java_field_op): Don't special-case references to
1174 java.lang.PRIMTYPE.TYPE.
1175 (build_primtype_type_ref): Removed.
1176 * java-tree.h (build_primtype_type_ref): Remove prototype.
1177 * parse.y (maybe_build_primttype_type_ref): Removed.
1178 (complete_function_arguments): Don't special-case references to
1179 java.lang.PRIMTYPE.TYPE.
1180 (patch_assignment): Likewise.
1181 (array_constructor_check_entry): Likewise.
1182
98f705b9
APB
11832001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
1184
1185 * mangle.c (static tree compression_table): Fixed leading comment.
1186 * parse.h (struct parser_ctxt): Fixed field comment.
1187 * parse.y (check_pkg_class_access): New prototype, fixed leading
1188 comment, new parameter used to emit error only if passed as true.
1189 (parse_check_super): Pass extra argument to check_pkg_class_access.
1190 (do_resolve_class): Likewise.
1191 (process_imports): Likewise.
1192 (read_import_dir): Fixed indentation.
1193 (find_in_imports_on_demand): New local class_type_name. Local
1194 node_to_use deleted. while loop changed into for loop. Report
1195 multiple definition only for accessible classes. Improved error
1196 message.
1197 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
1198 assigned to parameter list, fixed indentation. while loop changed
1199 into for loop, restore TREE_CHAIN on local `tem' before the next
1200 iteration.
1201
8ac61af7
RK
1202Tue Oct 23 14:02:17 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1203
1204 * lang.c (lang_get_alias_set): Deleted.
1205
0df6c2c7
KG
12062001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1207
299b5f9e
KG
1208 * gjavah.c (jni_print_char): Fix thinko in last change.
1209
0df6c2c7
KG
1210 * gjavah.c (jni_print_char, decode_signature_piece): Use
1211 safe-ctype macros and/or fold extra calls into fewer ones.
1212 * lex.c (java_read_unicode, java_lex): Likewise.
1213 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
1214 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
1215 * mangle_name.c (append_unicode_mangled_name,
1216 unicode_mangling_length): Likewise.
1217
17ed6335
RH
12182001-10-17 Richard Henderson <rth@redhat.com>
1219
1220 * Make-lang.in (java/lang.o): Depend on langhooks.h.
1221
c83303d8
APB
12222001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
1223
1224 * lang.c (langhooks.h): Included.
1225 (LANG_HOOKS_INIT): Redefined.
1226 (LANG_HOOKS_INIT_OPTIONS): Likewise.
1227 (LANG_HOOKS_DECODE_OPTION): Likewise.
1228 (struct lang_hooks lang_hooks): New initialization.
1229
be98560f
PB
12302001-10-11 Per Bothner <per@bothner.com>
1231
89b894e1
PB
1232 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
1233 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
1234 The former is simpler, and jcf-write.c handles it better.
1235 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
1236 or WITH_CLEANUP_EXPR.
1237 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
1238 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
1239
be98560f
PB
1240 * parse.y (patch_if_else_statement): If the condition is constant,
1241 optimize away the test.
1242
3fb5c0eb
APB
12432001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
1244
1245 * parse.y (patch_cast): Call patch_string on the first operand of
c83303d8 1246 the incoming node, update it if necessary. Fixes PR java/4510.
3fb5c0eb 1247
908fecca
BM
12482001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1249
1250 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
1251 when name qualifier matches a package name.
1252
f3ca28bf
TT
12532001-10-08 Tom Tromey <tromey@redhat.com>
1254
1255 Fix for PR java/4489:
1256 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
1257 force a new label when computing `body_block'.
1258
8b60264b
KG
12592001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1260
1261 * jcf-io.c (format_uint): Const-ify.
1262 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
1263 * lex.c (java_get_line_col): Likewise.
1264 * parse.y (build_incdec): Likewise.
1265
3fb5c0eb
APB
12662001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
1267
1268 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
c83303d8 1269 a NULL enclosing context if appropriate. Fixes PR java/4466.
3fb5c0eb 1270
7754e0a9
APB
12712001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
1272
1273 * parse.y (patch_assignment): Use lvalue's original TYPE when
1274 building the final COMPOUND_EXPR.
1275 (try_reference_assignconv): Fixed leading comment.
1276
e9546ca4
APB
12772001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
1278
1279 * parse.y (check_final_variable_indirect_assignment): For
1280 COMPOUND_EXPR, return only if finals were found initialized
1281 properly, if not, keep on checking.
1282 (check_final_variable_global_assignment_flag): New local
1283 error_found, set when appropriate and used to decide whether to
1284 report uninitialized finals. Fixed typo in comment.
1285
f6a67a81
APB
12862001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
1287
1288 * decl.c (init_decl_processing): Fixed typo in predef_filenames
1289 last three initializations. Fixes PR java/4360.
1290
67231816
RH
12912001-09-21 Richard Henderson <rth@redhat.com>
1292
1293 * class.c (get_dispatch_table): Handle function descriptors.
1294 (build_dtable_decl): Likewise.
1295 * expr.c (build_invokevirtual): Likewise.
1296
870a5b8a
APB
12972001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
1298
1299 * parse.y (patch_method_invocation): Build class initialization
1300 when static finals are used to qualify method invocation.
1301 Fixes PR java/4366.
1302
2e3b2d2c
APB
13032001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
1304
1305 * parse.h: (WFL_STRIP_BRACKET): Re-written using
1306 build_type_name_from_array_name.
1307 (STRING_STRIP_BRACKETS): New macro.
1308 * parse.y (build_type_name_from_array_name): New function.
1309 (array_creation_expression:): Accumulate []s instead of [s.
1310 (cast_expression:): Accumulate []s instead of [s after cast type
1311 name.
1312 (build_array_from_name): Local string deleted, use
1313 build_type_name_from_array_name.
1314 (build_unresolved_array_type): Accumulate []s instead of [s after
1315 type name.
1316 (register_fields): Fixed comment.
1317 (resolve_class): Local name, base deleted, new locals tname and
1318 array_dims. Use build_type_name_from_array_name. Use array_dims to
1319 build array type.
1320 (purify_type_name): Use STRING_STRIP_BRACKETS.
1321
e64c46ce
AJ
13222001-09-18 Andreas Jaeger <aj@suse.de>
1323
1324 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
1325 * jv-scan.c: Likewise.
1326
3fb5c0eb
APB
13272001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
1328
1329 * parse.y (patch_method_invocation): Inner class creation context
1330 check not enforced within constructors. Fixes PR java/1873.
1331
7a91449c
TT
13322001-09-16 Tom Tromey <tromey@redhat.com>
1333
1334 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
1335 NOTE_PUSH for single-case push. Fixes PR java/4189.
1336
653d5d95
APB
13372001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
1338
1339 * java-tree.h (TYPE_IMPORT_LIST): New macro.
1340 (TYPE_IMPORT_DEMAND_LIST): Likewise.
1341 (struct lang_type): New fields import_list and import_demand_list.
1342 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
1343 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
1344 (do_resolve_class): New local saved_enclosing_type, initialized,
1345 passed as parameter to find_in_imports and find_in_imports_on_demand.
1346 (find_in_imports): Added paramater enclosing_type, use its
1347 TYPE_IMPORT_LIST when applicable.
1348 (find_in_imports_on_demand): Added parameter enclosing_type, use
1349 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
1350 declaration and initialization.
1351 (fold_constant_for_init): Switch/restore current_class to the
1352 appropriate context.
1353
6d334db8
MM
13542001-09-13 Mark Mitchell <mark@codesourcery.com>
1355
1356 * verify.c (verify_jvm_instructions): Fix typo.
1357
83182544
KG
13582001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1359
1360 * expr.c (expand_invoke): Const-ification.
1361 * parse.y (patch_method_invocation): Likewise.
1362
fd033052
KG
13632001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1364
1365 * gjavah.c (cxx_keywords): Const-ification.
1366 * keyword.gperf (java_keyword): Likewise.
1367 * lang.c (java_tree_code_name): Likewise.
1368 * lex.c (cxx_keywords): Likewise.
1369 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
1370
fcbc317f
RH
13712001-09-11 Richard Henderson <rth@redhat.com>
1372
1373 * parse.h (ctxp_for_generation): Mark extern.
1374
c347e68d
RH
13752001-09-10 Richard Henderson <rth@redhat.com>
1376
1377 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
1378
6a9f6727
MK
13792001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
1380
1381 * typeck.c (java_array_type_length, build_prim_array_type):
1382 Represent empty arrays by NULL index.
1383
0ef02b2d
APB
13842001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
1385
1386 * java-tree.h (compile_resource_file): Grouped with other prototypes.
e64c46ce 1387 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
0ef02b2d 1388
f2767a67
AG
13892001-09-06 Anthony Green <green@redhat.com>
1390
1391 * class.c (O_BINARY): Define if necessary.
1392 (registerResource_libfunc): Declare.
1393 (init_class_processing): Initilize registerResource_libfunc.
1394 (compile_resource_file): New function.
1395 * java-tree.h (resource_name): Declare.
1396 (compile_resource_file): Declare.
1397 * jcf-parse.c (yyparse): Handle compiling java resource files.
1398 * lang.c (java_decode_option): Handle -fcompile-resource option.
1399 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
1400 resource files.
1401 * gcj.texi (Code Generation): Add documentation for -R flag.
1402
731866ba
APB
14032001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
1404
1405 * jcf-write.c (generate_classfile): Issue an error in case of
1406 field/initial value mismatch.
1407 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
1408 being initialized and we're generating bytecode.
1409 (java_complete_lhs): In MODIFY_EXPR section: added comments,
1410 set DECL_INITIAL properly when appropriate.
1411 Fixes PR java/4230
1412 Fixes PR java/4204
1413
0286a91d
PB
14142001-09-01 Per Bothner <per@bothner.com>
1415
1416 * parse.y (maybe_yank_clinit): A field without an initializer is not
1417 relevant. All initializers except static final and constant require
1418 <clinit>, regardless of flag_emit_class_files.
1419
289b57ee
PB
14202001-08-31 Per Bothner <per@bothner.com>
1421
1422 * class.c (set_constant_value): When not emiting class files, then a
1423 String ConstantValue is a utf8const_ptr_type.
1424
be0c7ff4
PB
14252001-08-30 Per Bothner <per@bothner.com>
1426
1427 * jcf-write.c (generate_classfile): Check that field is primitive
1428 or string before emitting ConstantValue attribute.
e64c46ce 1429
f0cdee96
PB
14302001-08-30 Per Bothner <per@bothner.com>
1431
1432 * parse.y (resolve_qualified_expression_name): If creating a
1433 COMPOUND_EXPR, set it's type correctly.
1434
bc8a5e56
PB
14352001-08-30 Per Bothner <per@bothner.com>
1436
1437 * jcf-io.c (open_class): Set filename field.
1438
1439 * jcf-parse,c (parse_class_file): Set current_function_decl
1440 for better error message when Code attribute is missing.
1441
1442 * lang.c (put_decl_node, lang_print_error): Re-arrange for
1443 better diagnostics, especially for constructors.
e64c46ce 1444
1b9ee723
PB
14452001-08-30 Per Bothner <per@bothner.com>
1446
1447 * jcf-write.c (generate_classfile): Don't write ConstantValue
1448 attribute if field is not final, for compatibility with jdk.
1449
1450 * jcf-write.c (generate_classfile): Convert ConstantValue values
1451 to correct type. Work-around for front-end bug.
1452 * class.c (set_constant_value): Error if constant has wrong type.
1453
6e4302ec
PB
14542001-08-30 Per Bothner <per@bothner.com>
1455
1456 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
1457 "Double" are printed at verbosity 1.
1458
1459 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
1460
1461 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
1462
3ed218d4
APB
14632001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
1464
1465 * parse.y (patch_assignment): Don't verify final re-assignment here.
1466 (java_complete_lhs): Verify assignments to finals calling
1467 patch_assignment. Verify re-assignments to finals before calling
1468 patch_assignment.
1469
14702001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
1471
1472 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
1473 Fixes PR java/1413
1474
14752001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
1476
1477 * lex.c (java_lex): new local found_hex_digits. Set and then used
1478 in test to reject invalid hexadecimal numbers.
1479 * parse.y (java_complete_tree): Prevent unwanted cast with
1480 initialized floating point finals.
1481 (patch_binop): Emit a warning when detecting a division by zero,
1482 mark result not constant, don't simplify non integer division.
1483
1a27eec1
PB
14842001-08-28 Per Bothner <per@bothner.com>
1485
1486 * jcf-write.c (generate_bytecode_insns): For increments and
9a07cfaf 1487 decrements just recurse to push constant. Improvement on Mark's patch.
1a27eec1 1488
06657dcd
MM
14892001-08-28 Mark Mitchell <mark@codesourcery.com>
1490
1491 * jcf-write.c (generate_bytecode_insns): Generate an integer to
1492 real conversion for increments and decrements of reals.
1493
1ca09b48
APB
14942001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1495
1496 * parse.y (resolve_qualified_expression_name): Handle unresolved
1497 qualified expressions, prevent numerical qualifiers, fixed typo.
1498 Fixes PR java/4141
1499
7b02957e
APB
15002001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
1501
1502 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
1503 don't report anything but deprecated class when marked so. Handle
1504 VAR_DECL.
1505 (patch_method_invocation): Check deprecation on methods and types.
1506 (patch_binop): code becomes an enum tree_code, added default: to
1507 switch to handle that. Detect division by zero, try to fold and
1508 return before using a subroutine.
1509
496849ba
APB
15102001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
1511
1512 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
e64c46ce 1513 file smaller than 4 bytes.
496849ba
APB
1514 * parse.y (check_inner_circular_reference): New function.
1515 (check_circular_reference): Likewise.
1516 (array_initializer:): Accept {,}.
1517 (java_check_circular_reference): Rewritten using
1518 check_circular_reference and check_inner_circular_reference.
1519 (java_complete_expand_method): Unconditionally save and restore
1520 the unpurged exception list.
1521 (build_dot_class_method_invocation): Unmangle signature parameter.
1522
66b461ce
TT
15232001-08-21 Tom Tromey <tromey@redhat.com>
1524
1525 * decl.c (init_decl_processing): Add `throws' field to method
1526 descriptor.
1527 * class.c (make_method_value): Compute `throws' field for method.
1528
df1c5346
APB
15292001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
1530
1531 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
1532 circularity is detected.
1533 (ctors_unchecked_throws_clause_p): Fixed leading comment.
1534
c8af3574
RH
15352001-08-17 Richard Henderson <rth@redhat.com>
1536
1537 * class.c (emit_register_classes): Add align parameter to
1538 call to assemble_integer.
1539
17126208
APB
15402001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
1541
1542 * jcf-parse.c (load_class): New locals saved and class_loaded. If
1543 loading a class_or_name fails, try considering an innerclass name
1544 and load the enclosing context.
1545 * parse.y (resolve_inner_class): New function.
1546 (find_as_inner_class): Added leading comment.
1547 (register_incomplete_type): Keep the current context as enclosing
1548 context for JDEP_FIELD dependencies.
1549 (do_resolve_class): Locals new_class_decl and super initialized to
1550 NULL. Call resolve_inner_class, explore the enclosing context
1551 superclass if necessary.
1552 Fixes PR java/4007
1553
4266d0b2
TT
15542001-08-16 Tom Tromey <tromey@redhat.com>
1555
1556 * jcf-dump.c (main): Updated for change to jcf_path_seal.
1557 * gjavah.c (main): Updated for change to jcf_path_seal.
1558 * lang.c (version_flag): New global.
1559 (java_decode_option): Recognize `-version'.
1560 (java_init): Update for change to jcf_path_seal.
1561 * jcf.h (jcf_path_seal): Added `print' argument.
1562 * jcf-path.c (jcf_path_seal): Added `print' argument.
1563
e78d8e51
ZW
15642001-08-13 Zack Weinberg <zackw@panix.com>
1565
1566 * Make-lang.in (java/decl.o): Update dependencies.
1567 * decl.c: Include libfuncs.h, don't include toplev.h.
1568
17126208
APB
15692001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
1570
1571 * decl.c (init_decl_processing): exception_type_node,
1572 class_not_found_type_node, and no_class_def_found_type_node
1573 initialized. predef_filenames augmented accordingly.
1574 instinit_identifier_node initialized.
1575 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
1576 * java-tree.h (enum java_tree_index): New entries
1577 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
1578 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
1579 (exception_type_node): New macro.
1580 (class_not_found_type_node): Likewise.
1581 (no_class_def_found_type_node): Likewise.
1582 (instinit_identifier_node): Likewise.
1583 (PREDEF_FILENAMES_SIZE): Adjusted.
1584 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
1585 (struct lang_type): Fixed typo in bitfield name.
1586 (DECL_INSTINIT_P): New macro.
1587 (ID_INSTINIT_P): Likewise.
1588 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
1589 attribute.
1590 * parse.y (encapsulate_with_try_catch): New function.
1591 (generate_instinit): Likewise.
1592 (build_instinit_invocation): Likewise.
1593 (ctors_unchecked_throws_clause_p): Likewise.
1594 (add_instance_initializer): Deleted.
1595 (build_instance_initializer): Likewise.
1596 (in_instance_initializer): Likewise.
1597 (check_method_redefinition): instinit$ not to be verified.
1598 (java_complete_expand_methods): Generate instinit$, simplified code.
1599 (build_dot_class_method): Eliminated unnecessary locals. Use
1600 encapsulate_with_try_catch, removed unnecessary code.
1601 (fix_constructors): New local iii. Use build_instinit_invocation.
1602 (patch_method_invocation): Added comment.
1603 (maybe_use_access_method): Don't consider instinit$.
1604 (find_applicable_accessible_methods_list): Shorten the search for
1605 instinit$ too.
1606 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
1607 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
1608 (patch_throw_statement): Likewise. Fixed typo.
e64c46ce 1609
6ba57472
DE
16102001-08-12 David Edelsohn <edelsohn@gnu.org>
1611
1612 Revert:
1613 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1614 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
1615 ASM_FINAL_SPEC.
1616 (lang_specific_pre_link): Use set_input to set input_filename.
1617 Append `main' here.
1618 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
1619 (main): Fix definition.
1620 Strip `main' from classname.
1621 Fixes PR java/227.
1622
94aca342
ZW
16232001-08-11 Zack Weinberg <zackw@panix.com>
1624
1625 * lex.h: Don't include setjmp.h. Don't define
1626 SET_FLOAT_HANDLER or prototype set_float_handler.
1627
17126208
APB
16282001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
1629
1630 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
1631 `poplevel' in the right order.
1632
2cc07db4
RH
16332001-08-09 Richard Henderson <rth@redhat.com>
1634
1635 * Make-lang.in (class.o): Depend on TARGET_H.
1636 * class.c (emit_register_classes): Use target hooks instead of
1637 assemble_constructor and assemble_destructor.
1638
4009bb7d
APB
16392001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
1640
1641 * check-init.c (flags.h): Include
1642 (check_init): Don't report uninitialized static class
1643 initialization flags, don't free bit index when doing static class
1644 initialization optimization.
1645 (check_for_initialization): Return type changed to `unsigned int.'
1646 (attach_initialized_static_class): New function.
1647 * class.c (add_method_1): Create the initialized static class
1648 table if necessary.
1649 (finish_class): Always emit deferred inline methods.
1650 * decl.c (emit_init_test_initialization): Moved to expr.c
1651 (complete_start_java_method): Don't traverse
1652 DECL_FUNCTION_INIT_TEST_TABLE.
1653 (lang_mark_tree): Mark hash tables in function decls.
1654 * expr.c (emit_init_test_initialization): Moved from decl.c.
1655 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
1656 initialization flag, set DECL_CONTEXT and
1657 LOCAL_CLASS_INITIALIZATION_FLAG.
1658 (java_lang_expand_expr): Emit initialization code for static class
1659 initialized flags when entering block, if necessary.
1660 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
1661 * java-tree.h (flag_optimize_sci): New global variable declaration.
1662 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
1663 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
1664 (LOCAL_FINAL_P): Fixed typo in comment.
1665 (FINAL_VARIABLE_P): Likewise.
1666 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
1667 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
1668 (struct lang_decl): New fields `ict', `smic' and `cif.'
1669 (check_for_initialization): New returned value for global.
1670 (attach_initialized_static_class): New global function.
1671 (STATIC_CLASS_INIT_OPT_P): New macro.
1672 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
1673 * lang.c (java_decode_option): Handle
1674 `-fno-optimize-static-class-initialization'
1675 * parse.y (start_complete_expand_method): New function.
1676 (java_expand_method_bodies): Likewise.
1677 (attach_init_test_initialization_flags): Likewise.
1678 (adjust_init_test_initialization): Likewise.
1679 (emit_test_initialization): Likewise.
1680 (java_complete_expand_methods): Nullify abstract and native method
1681 bodies.
1682 (java_complete_expand_method): New locals `fbody', `block_body'
1683 and `exception_copy.' Reorganized: directly return on empty method
1684 bodies, call `start_complete_expand_method', remember definitely
1685 initialized static class in function, don't expand method bodies.
1686 (java_expand_classes): Call `java_expand_method_bodies' before
1687 `finish_class' when compiling to native.
1688 (resolve_expression_name): Use `orig' after building outer class
1689 field access.
1690 (patch_invoke): Remember static method invokations.
1691
47907859
RH
16922001-08-06 Richard Henderson <rth@redhat.com>
1693
9a07cfaf 1694 * class.c (emit_register_classes): Pass a symbol_ref and priority
47907859
RH
1695 to assemble_constructor.
1696
36e10d77
APB
16972001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
1698
1699 * java-tree.h (all_class_filename): New macro.
1700 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
1701 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
1702 newly created IDENTIFIER_NODE to `all_class_filename.'
1703
f2f25b6d
JS
17042001-08-01 Jeff Sturm <jsturm@one-point.com>
1705
9a07cfaf
RH
1706 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
1707 Use ggc_add_tree_root to register roots.
e64c46ce 1708
6ad7895a
APB
17092001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
1710
1711 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
1712 second operand calling check_init.
1713 * decl.c (complete_start_java_method): Swaped second and third
1714 arguments while creating WITH_CLEANUP_EXPR node.
1715 * jcf-write.c (generate_bytecode_insns): Use second operand
1716 instead of third when handling WITH_CLEANUP_EXPR.
1717 * parse.y (java_complete_lhs): Expand second operand of
1718 WITH_CLEANUP_EXPR nodes.
1719 (patch_synchronized_statement): Swaped second and third arguments
1720 while creating WITH_CLEANUP_EXPR node.
1721
9d7d8362
APB
17222001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
1723
1724 * parse.y (create_interface): Avoid cyclic inheritance report when
1725 syntax error encountered during class definition.
1726 Fixes PR java/2956
1727
578672a2
RO
17282001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1729
1730 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
1731 ASM_FINAL_SPEC.
1732 (lang_specific_pre_link): Use set_input to set input_filename.
1733 Append `main' here.
1734 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
1735 (main): Fix definition.
1736 Strip `main' from classname.
1737 Fixes PR java/227.
1738
6a65ea5b
TT
17392001-07-18 Tom Tromey <tromey@redhat.com>
1740
1741 For PR java/2812:
1742 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
1743 * lex.c (java_new_lexer): Use ICONV_CONST.
1744 (java_read_char): Likewise.
1745 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
1746 (jv-scan$(exeext)): Likewise.
1747
9d7d8362
APB
17482001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
1749
1750 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
1751 * parse.y (check_class_interface_creation): Allow `private' if the
1752 enclosing is not an interface.
1753 (create_interface): Interface tagged public if the enclosing
1754 context is an interface.
1755 (create_class): Class tagged public if the enclosing context
1756 is an interface.
1757 Fixes PR java/2959
1758
17592001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
1760
1761 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
1762 Fixes PR java/2665
1763
e6290e74
TJ
17642001-07-14 Tim Josling <tej@melbpc.org.au>
1765
1766 * check-init.c (check_init): Remove references to EXPON_EXPR.
1767
9d7d8362
APB
17682001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
1769
1770 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
1771 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
1772 Fixes PR java/3602
1773
4b2dc1b2
TT
17742001-07-13 Tom Tromey <tromey@redhat.com>
1775
1776 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
1777 invocation.
1778
b6e3e1ff
APB
17792001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
1780
1781 * parse.y (patch_method_invocation): Don't override primary if one
1782 is already provided, but let this$<n> be built. Fixed comment.
1783
17842001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
1785
1786 * parse.y (empty_statement:): Report empty statement error only
1787 when found at class declaration level.
1788 Fixes PR java/3635
1789
a3cb5122
TT
17902001-07-12 Tom Tromey <tromey@redhat.com>
1791
1792 * expr.c (expand_load_internal): New function.
1793 (LOAD_INTERNAL): Use it.
1794
29fcdaae
APB
17952001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
1796
1797 * parse.y (verify_constructor_super): Compare anonymous class ctor
1798 args with `valid_method_invocation_conversion_p.'
1799 Fixes PR java/3285
1800
2df37a59
APB
18012001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
1802
1803 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
1804 `-fsyntax-only.' Fixes PR java/3248
1805
18062001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
1807
1808 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
1809
18102001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
1811
1812 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
1813 current function is static. Fixes PR java/1970
1814
18152001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
1816
1817 * parse.y (patch_method_invocation): Add enclosing context to ctor
1818 calls if necessary. Fixes PR java/2953
1819
18202001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
1821
1822 * parse.y (resolve_package): Abort if qualified expression member
1823 isn't right.
1824 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
1825 Fixes PR java/1391
1826
74d04dd1
ZW
18272001-07-07 Zack Weinberg <zackw@stanford.edu>
1828
1829 * verify.c: Don't use // comments.
1830
af418b8c
TT
18312001-07-05 Tom Tromey <tromey@redhat.com>
1832
1833 * lang.c (flag_assume_compiled): Removed.
1834 * java-tree.h (flag_assume_compiled): Removed.
1835 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
1836 -fhash-synchronization, -fuse-divide-subroutine,
1837 -fcheck-references, -femit-class-file, -femit-class-files,
1838 -fassume-compiled. Updated --encoding information. Changed
1839 -foutput-class-dir to `-d'.
1840
84a5b4f8
DB
18412001-07-04 Daniel Berlin <dan@cgsoftware.com>
1842
1843 * jcf-parse.c (parse_class_file): Add lineno parameter to
1844 debug_start_source_file call.
1845
0671eaf6
JM
18462001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
1847
1848 * gcj.texi: Use gpl.texi.
1849 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
1850 dependencies and use doc/include in search path.
1851
9be7529d
JS
18522001-07-03 Jeff Sturm <jsturm@one-point.com>
1853
1854 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
1855 `this'. If so, don't build instance initializers.
1856
51e23701
APB
18572001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
1858
1859 * parse.y (resolve_expression_name): Improved error message for
2df37a59 1860 inner class cases. Fixes PR java/1958
51e23701 1861
46f018e1
GDR
18622001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
1863
1864 * lang.c: #include diagnostic.h
1865 (lang_print_error): Add a `diagnostic_context *' parameter.
1866 (java_dummy_print): Likewise.
1867 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
1868
51e23701
APB
18692001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1870
1871 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
1872 * jcf.h (typedef struct JCF): New bitfield `finished.'
1873 (JCF_FINISH): Set `finished.'
1874 (JCF_ZERO): Reset `finished.'
1875 Fixes PR java/2633
1876
18772001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1878
1879 * parse.y (class_body_declaration:): Don't install empty instance
1880 initializers.
1881 Fixes PR java/1314
1882
4a70e37e
APB
18832001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1884
1885 * class.c (set_super_info): Call `set_class_decl_access_flags.'
1886 (set_class_decl_access_flags): New function.
1887 * java-tree.h (set_class_decl_access_flags): New prototype.
1888 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
1889 (parse_class_file): New local `decl_max_locals.' Take wide types
1890 into account to compute DECL_MAX_LOCALS.
1891 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
1892 imports on demand.
1893
561a0365
JM
18942001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
1895
1896 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
1897
8e41c4f3
APB
18982001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
1899
1900 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
1901 * parse.y (do_resolve_class): Moved comments out to leading comment
1902 section. Removed local `start', New local `_ht' and
1903 `circularity_hash.' Record `enclosing' in hash table and search
1904 it to detect circularity. Use `enclosing' as an argument to
1905 `lookup_cl.' Free the hash table when done.
1906
c01b7cdf
TT
19072001-06-19 Tom Tromey <tromey@redhat.com>
1908
1909 * lex.c (java_read_char): Disallow invalid and overlong
1910 sequences. Fixes PR java/2319.
1911
21a6bb3c
JS
19122001-06-05 Jeff Sturm <jsturm@one-point.com>
1913
1914 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
1915
0c90837b
APB
19162001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
1917
1918 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
1919 arguments accordingly.
1920
1347cc4f
JM
19212001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
1922
1923 * gcj.texi: Move contents to just after title page.
1924
12e248d6
APB
19252001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
1926
1927 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
1928 builtin type.
1929 (patch_incomplete_class_ref): Build the class ref, build the class
1930 init if necessary, complete the tree.
1931 Fixes PR java/2605
1932
19559012
APB
19332001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
1934
1935 * parse.y (lookup_field_wrapper): Test `name' code.
1936 (resolve_qualified_expression_name): Test `qual_wfl' code.
1937 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
1938 handle `qual_wfl' by code.
1939 (maybe_build_primttype_type_ref): Test `wfl' code.
1940
eb153223
TP
19412001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1942
1943 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
1944 fdl.texi.
1945 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
1946 the dvi file in the java directory.
1947
88657302
RH
19482001-05-25 Sam TH <sam@uchicago.edu>
1949
1950 * gen-table.pl javaop.h jcf.h lex.h,
1951 parse.h: Fix header include guards.
1952
719f0fde
JM
19532001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
1954
1955 * jv-scan.c (version): Update copyright year.
1956
075516bc
PB
19572001-05-21 Per Bothner <per@bothner.com>
1958
1959 * jcf-parse.c (read_class): If class is from .class or .zip file
1960 and it's already been read, don't push/pop parser context.
1961
9d289604
PB
19622001-05-18 Per Bothner <per@bothner.com>
1963
1964 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
9a07cfaf 1965 command line so the jvgenmain-generated main program comes first.
9d289604 1966
48187504
TT
19672001-05-15 Tom Tromey <tromey@redhat.com>
1968
1969 * class.c (build_utf8_ref): Don't generate identifier based on
1970 utf8const contents.
1971
f17f1898
RH
19722001-05-12 Richard Henderson <rth@redhat.com>
1973
1974 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
1975 * expr.c (java_lang_expand_expr): Expand it.
1976 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
1977 calling build_exception_object_ref.
1978 * parse.y (catch_clause_parameter): Likewise.
1979 (build_dot_class_method): Likewise.
1980 (try_reference_assignconv): Likewise.
1981 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
1982 * jcf-write.c (generate_bytecode_insns): Likewise.
1983
352b3f3f
APB
19842001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
1985
1986 * parse.y (build_unresolved_array_type): Set
1987 EXPR_WFL_QUALIFICATION on the newly created wfl.
1988 Fixes PR java/2538. Fixes PR java/2535.
1989
41ee0877
APB
19902001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
1991
17126208 1992 * parse.y (fix_constructors): Removed unnecessary assignment to
41ee0877
APB
1993 local. Moved assignment to `this$<n>', fixed comments and
1994 indentation.
1995 (build_wfl_wrap): Fixed indentation.
1996 Fixes PR java/2598, java/2579 and java/2658.
1997
4def8930
MD
19982001-05-03 Mo DeJong <mdejong@redhat.com>
1999
9a07cfaf 2000 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
4def8930
MD
2001 check for byte swap.
2002
8fc6a63c
JS
20032000-05-02 Jeff Sturm <jsturm@one-point.com>
2004
2005 * expr.c (build_class_init): Move MODIFY_EXPR
2006 outside of COND_EXPR. Remove variable `call'.
2007
3e411c3f
KG
20082001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2009
2010 * decl.c: NULL_PTR -> NULL.
2011 * jcf-write.c: Likewise.
2012
0cd015ea
TT
20132001-05-01 Tom Tromey <tromey@redhat.com>
2014
2015 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
2016 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
2017 * gcj.texi: Updated copyright text. Include fdl.texi.
2018 (Top): Link to new node.
2019
6a117d00
PB
20202001-05-01 Per Bothner <per@bothner.com>
2021
2022 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
2023
063df563
PB
20242001-05-01 Per Bothner <per@bothner.com>
2025
2026 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
2027 import_list contains the name, not the TREE_PURPOSE.
2028
962584ea
KG
20292001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2030
2031 * jcf-io.c (read_zip_member): Cast to long in comparison with
2032 signed value.
2033
2034 * jvspec.c (lang_specific_driver): Initialize variables.
2035
2036 * mangle.c (find_compression_record_match): Likewise.
2037
2038 * typeck.c (build_null_signature): Provide static prototype. Mark
2039 parameter with ATTRIBUTE_UNUSED.
2040
2041 * verify.c (verify_jvm_instructions): Initialize variable.
2042
86d9e8d8
BM
20432001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2044
2045 * parse.y (do_resolve_class): Check for cyclic inheritance during
e64c46ce 2046 inner class resolution.
86d9e8d8 2047
9c491eb8
PB
20482001-04-27 Per Bothner <per@bothner.com>
2049
2050 * parse.y (java_expand_classes): Don't change ctxp_for_generation
2051 while iterating, since that could cause gc to lose stuff.
2052
56fe39c8
PB
20532001-04-26 Per Bothner <per@bothner.com>
2054
2055 Fix method search wrt scope of inner classes to match JLS2.
2056 * typeck.c (build_null_signature): New static function.
2057 (has_method): New function. Uses build_null_signature and lookup_do.
2058 * java-tree.h (has_method): New declaration.
2059 * parse.y (find_applicable_accessible_methods_list): Do not search
2060 context of inner classes here.
2061 (patch_method_invocation): Search scope, ie. current and outer clases,
2062 for method matching simple name, to find class.
2063
8789b9fa
PB
20642001-04-26 Per Bothner <per@bothner.com>
2065
2066 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
2067 Fix thinko: If a single case, use if_icmpeq, not ifeq.
2068
2069 * constants.c (find_methodref_with_class_index): New function.
2070 (find_methodref_index): Use find_methodref_with_class_index.
2071 * java-tree.h (find_methodref_with_class_index): New declaration.
2072 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
2073 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
2074 If context changed from interface to class, don't use invokeinterface.
2075
5acea42b
PB
20762001-04-25 Per Bothner <per@bothner.com>
2077
2078 * verify.c (verify_jvm_instructions): For field instructions,
2079 check that field index is valid. For invoke instructions, check that
2080 method index is valid.
2081
dd6f3662
AO
20822001-04-25 Alexandre Oliva <aoliva@redhat.com>
2083
2084 * config-lang.in (target_libs): Copy from $libgcj_saved.
2085
28f7d9d0
BM
20862001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2087
2088 * decl.c (init_decl_processing): Add new class "protectionDomain"
2089 field.
2090 * class.c (make_class_data): Set initial value for "protectionDomain".
2091
d4c3ec27
KG
20922001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2093
2094 * jvspec.c (lang_specific_driver): Fix memory allocation
2095 deficit, by using concat in lieu of xmalloc/sprintf.
2096
3c0ce750
PB
20972001-04-20 Per Bothner <per@bothner.com>
2098
2099 Fixes to compile multiple .class files at once.
2100 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
2101 * java-tree.h (CLASS_PARSED_P): New macro.
2102 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
2103 * jcf-parse.c (jcf_parse_source): Inline into read_class.
2104 (read_class): Avoid some code duplication.
2105 Don't call JCF_FINISH for a .class file - might be needed later.
2106 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
2107 rather than CLASS_LOADED_P, since latter implies class laid out.
2108 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
2109 * parse.y: Don't need to set CLASS_LOADED_P for array types.
2110
d6684bc8
KG
21112001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2112
2113 * Make-lang.in (java/boehm.o): Depend on toplev.h.
2114
2115 * boehm.c: Include toplev.h.
2116
10e2af38
TT
21172001-04-06 Tom Tromey <tromey@redhat.com>
2118 Alexandre Petit-Bianco <apbianco@redhat.com>
2119
2120 Fix for PR gcj/1404 and PR gcj/2332:
2121 * parse.y (build_array_from_name): If we use the type_wfl then
2122 accumulate dimensions from the original type as well.
2123 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
2124
2d9fea5d
TT
21252001-04-06 Tom Tromey <tromey@redhat.com>
2126
2127 * parse.y (analyze_clinit_body): Return true if the second operand
2128 of a METHOD_EXPR is nonzero.
2129
613bb86e
TT
21302001-04-06 Tom Tromey <tromey@redhat.com>
2131
2132 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
2133 directory.
2134 ($(srcdir)/java/parse.c): Likewise.
2135
8b66cd8f
APB
21362001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
2137
2138 * gcj.texi: Use `which-gcj' instead of `which-g77.'
2139 (version-gcc): Initialized.
2140 (which-gcj): Likewise.
2141
73c299fc
APB
21422001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
2143
2144 * java-tree.h (struct lang_decl): New macro
2145 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
2146 * parse.y (build_instance_initializer): New function.
2147 (add_instance_initializer): Use it.
2148 (java_fix_constructors): Set `current_class' before fix pass.
2149 (fix_constructors): Just return if already fixed. Move `super()'
2150 invokation ahead. Use `build_instance_initializer.'
2151 Fixes PR java/1315.
2152
93a6eb78 21532001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
e64c46ce 2154
93a6eb78
APB
2155 * parse.y (resolve_qualified_expression_name): Pass field's
2156 DECL_CONTEXT to `not_accessible_p.'
2157 (not_accessible_p): Changed parameters order in `inherits_from_p'
2158 invokation.
2159
4956c16e
AH
21602001-03-27 Andrew Haley <aph@cambridge.redhat.com>
2161
2162 * lang-options.h: Add flag_check_references.
2163
3cc48399
PB
21642001-04-04 Per Bothner <per@bothner.com>
2165
2166 * java-tree.h (CONSTANT_VALUE_P): New macro.
2167 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
2168 * parse.y (maybe_build_class_init_for_field): New static function.
2169 (resolve_expression_name, resolve_field_access): Use
e64c46ce 2170 maybe_build_class_init_for_field instead of build_class_init
3cc48399
PB
2171 This does not do the init if the field is compile-time-constant.
2172 (resolve_field_access): Simplify.
2173
2174 * parse.y (fold_constant_for_init): Merge test into switch.
2175
d02af173
ZW
21762001-04-03 Zack Weinberg <zackw@stanford.edu>
2177
2178 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
2179 on gansidecl.h.
2180 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
2181
44a2150d
ZW
21822001-04-02 Zack Weinberg <zackw@stanford.edu>
2183
2184 * expr.c (pop_type_0): Save the result of the first
e64c46ce 2185 lang_printable_name call in a scratch buffer, so it
44a2150d
ZW
2186 won't be clobbered by the second call.
2187
de307574
APB
21882001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
2189
2190 * parse-scan.y (array_type:): Rewritten.
2191 (type_declaration:): `empty_statement' replaces `SC_TK.'
2192 (class_member_declaration:): `empty statement' added.
2193 (method_body:): Simplified.
2194 (static_initializer:): Likewise.
2195 (primary_no_new_array:): Use `type_literals.'
2196 (type_literals:): New rule.
2197 (dims:): Set and update `bracket_count.'
2198 Fixes PR java/1074. Fixes PR java/2412.
2199
2ff50199
APB
22002001-03-28 Hans Boehm <boehm@acm.org>
2201
2202 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
2203 (get_boehm_type_descriptor): Set type on returned value to be a
2204 pointer length integer.
2205
80122075
KG
22062001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2207
2208 * expr.c (pop_type_0): Call `concat' rather than building the
2209 string manually.
2210 (pop_type): Add format specifier in call to `error'.
2211
2212 * parse.y (patch_method_invocation): Avoid casting away
2213 const-ness.
2214
0f5c1ee4
JO
22152001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
2216
2217 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
2218
52a11cbf
RH
22192001-03-28 Richard Henderson <rth@redhat.com>
2220
2221 IA-64 ABI Exception Handling:
2222 * Make-lang.in (except.o): Don't depend on eh-common.h.
2223 * check-init.c (check_init): Handle EXC_PTR_EXPR.
2224 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
2225 [soft_exceptioninfo_call_node]: Remove.
2226 [eh_personality_libfunc, lang_eh_runtime_type]: New.
2227 (end_java_method): No emit_handlers.
2228 * except.c (java_set_exception_lang_code): Remove.
2229 (method_init_exceptions): Don't call it.
2230 (prepare_eh_table_type): No CATCH_ALL_TYPE.
2231 (build_exception_object_ref): New.
2232 (expand_end_java_handler): Update for except.h name changes.
2233 (emit_handlers, expand_resume_after_catch): Remove.
2234 * expr.c (java_lang_expand_expr): Update for except.h name changes.
2235 (process_jvm_instruction): Use build_exception_object_ref.
2236 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
2237 (soft_exceptioninfo_call_node): Remove.
2238 (build_exception_object_ref): Declare.
2239 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
2240 soft_exceptioninfo_call_node. Move processing ...
2241 [EXC_PTR_EXPR]: ... here.
2242 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
2243 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
2244 (source_end_java_method): No java_set_exception_lang_code or
2245 emit_handlers.
2246 (build_dot_class_method): Use build_exception_object_ref.
2247 (try_reference_assignconv): Check EXC_PTR_EXPR not
2248 soft_exceptioninfo_call_node.
2249
ce1c98ea
RH
22502001-03-28 Richard Henderson <rth@redhat.com>
2251
2252 * java-tree.h (throw_node): Define as a single member of
2253 java_global_trees instead of a separate array.
2254 (JTI_THROW_NODE): New.
2255 * decl.c (throw_node): Don't declare.
2256 (init_decl_processing): Init a scalar throw_node.
2257 Don't register it for gc.
2258 * check-init.c (check_init): Reference scalar throw_node.
2259 * expr.c (build_java_athrow): Likewise.
2260 * jcf-write.c (generate_bytecode_insns): Likewise.
2261 * parse.h (BUILD_THROW): Likewise.
2262
da7da8f9
RH
22632001-03-28 Richard Henderson <rth@redhat.com>
2264
2265 * decl.c (end_java_method): Do not save and restore
2266 flag_non_call_exceptions.
2267 * parse.y (source_end_java_method): Likewise.
2268 * lang.c (flag_exceptions): Don't declare.
2269 (java_init_options): Set flag_non_call_exceptions. Set
2270 flag_exceptions here ...
2271 (java_init): ... not here.
2272
531073e7
RH
22732001-03-27 Richard Henderson <rth@redhat.com>
2274
2275 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
2276 exceptions_via_longjmp.
2277
461fc4de
RH
2278 * lang.c (flag_new_exceptions): Don't declare it.
2279 (java_init_options): Or set it.
2280
c1e9f663
RH
22812001-03-27 Richard Henderson <rth@redhat.com>
2282
2283 * decl.c (end_java_method): Rename asynchronous_exceptions to
2284 flag_non_call_exceptions.
979988f3 2285 * parse.y (source_end_java_method): Likewise.
c1e9f663 2286
911e6107
KG
22872001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2288
2289 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
2290
b850de4f
MM
22912001-03-26 Mark Mitchell <mark@codesourcery.com>
2292
2293 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
2294
ce06965e
APB
22952001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
2296
2297 * parse.y (find_as_inner_class): Follow current package
2298 indications not to mistakingly load an unrelated class.
2299
cb9b7a8c
KG
23002001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2301
2302 * constants.c (PUTN): Use memcpy, not bcopy.
2303
2304 * lex.c (java_read_char): Use memmove, not bcopy.
2305
2306 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
2307
fa029f45
PB
23082001-03-23 Per Bothner <per@bothner.com>
2309
2310 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
2311 macro for better error pin-pointing.
2312 * java-tree.h: Fix typo in comment.
2313
2314 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
2315 Don't include jsr/goto in exception range.
2316 Check if start and end of exception range are the same (also TRY_EXPR).
2317 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
2318 However, do emit the following goto even if try_block is empty.
2319 Defer freeing exception_decl until after the finalizer, to make
2320 sure the local isn't reused in the finalizer. Fixes PR java/1208.
2321
2322 * parse.y (java_complete_lhs): If the try-clause is empty, just
2323 return the finally-clause and vice versa.
2324
b124f72e
APB
23252001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
2326
2327 * gcj.texi (Input Options): documented the check for attribute
2328 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
2329 * java-tree.h (flag_force_classes_archive_check): Declared extern.
2330 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
2331 (jcf_parse): Check for the right classes archive if necessary.
2332 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
2333 (jcf_parse_fields): Fixed indentation.
2334 * jcf-write.c (append_gcj_attribute): New function.
2335 (generate_classfile): Compute the attribute count, invoke
2336 `append_gcj_attribute'.
2337 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
2338 turned into bit fields. New bit field `right_zip.'
2339 (JCF_ZERO): Set `right_zip' to zero.
2340 * lang-options.h (-fforce-classes-archive-check): Added flag.
2341 * lang.c (flag_force_classes_archive_check): New flag.
2342 (lang_f_options): New entry `force-classes-archive-check.'
2343 Fixes PR java/1213.
2344
4ff17c6a
AH
23452001-02-07 Andrew Haley <aph@redhat.com>
2346
2347 * gcj.texi (Configure-time Options): Add -fcheck-references.
2348 * expr.c (build_java_indirect_ref): New function.
3e02b1c3 2349 (java_check_reference): New function.
4ff17c6a
AH
2350 (build_java_array_length_access): Use build_java_indirect_ref to
2351 check for null references.
2352 (build_java_arrayaccess): Likewise.
2353 (build_get_class): Likewise.
2354 (build_field_ref): Likewise.
2355 (invoke_build_dtable): Likewise.
2356 (build_invokeinterface): Likewise.
2357 * lang.c (lang_f_options): Add flag_check_references.
2358 * jvspec.c (jvgenmain_spec): Add flag_check_references.
2359 * java-tree.h (flag_check_references): New variable.
2360 * lang.c (flag_check_references): Likewise.
e64c46ce 2361 * parse.y (patch_invoke): Use java_check_reference.
3e02b1c3
AH
2362 (patch_assignment): Allow for extra nesting in
2363 _Jv_CheckArrayStore.
4ff17c6a 2364
f2a29271
BM
23652001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
2366
2367 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
2368 * lex.c (cxx_keywords): Likewise.
2369
2ff50199
APB
23702001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
2371
2372 * parse.y (qualify_ambiguous_name): Broaden `length'
2373 recognition. Help MODIFY_EXPR be resolved as expression names.
2374 Fixes PR java/2066. Fixes PR java/2400.
2375
60c87482
BM
23762001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
2377
e64c46ce 2378 * gjavah.c (process_file): Mark interface definitions with
60c87482
BM
2379 "__attribute__ ((java_interface))".
2380
96c6f628
APB
23812001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
2382
2383 * class.c (layout_class): Fixed push_super_field's second
2384 argument. Fixes PR java/2333.
2385 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
2386 too early to lay innerclasses out.
2387
7abecd65
TT
23882001-03-20 Tom Tromey <tromey@redhat.com>
2389 Alexandre Petit-Bianco <apbianco@redhat.com>
2390
2391 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
2392 inside an array reference. Insertion of the array store check
2393 rewritten. Fixes PR java/2299.
2394
4aed8938
TT
23952001-03-20 Tom Tromey <tromey@redhat.com>
2396
2397 * lex.c (java_read_unicode): Only accept leading `u's.
2398
ddd705d1
TT
23992001-03-20 Tom Tromey <tromey@redhat.com>
2400
2401 * jcf-parse.c (read_class): Initialize `class'.
2402
de83bf66
MK
24032001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
2404
2405 * jcf_parse.c (jcf_parse): Eliminate unused variable.
2406
92643fea
MM
24072001-03-19 Mark Mitchell <mark@codesourcery.com>
2408
2409 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
2410 (layout_class): Likewise.
2411 (layout_class_method): Likewise.
2412 (emit_register_classes): Likewise.
2413 * decl.c (builtin_function): Likewise.
2414 (give_name_to_locals): Likewise.
2415
54646811
PB
24162001-03-19 Per Bothner <per@bothner.com>
2417
80fc2e84
PB
2418 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
2419 before trying to load an inner class.
2420
54646811
PB
2421 Fixes to process to command-line .class files in two passes.
2422 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
2423 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
2424 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
2425 * class.c (is_compiled_class): Fix for renamed flag.
2426 * parse.y (maybe_create_class_interface_decl): Likewise.
2427 * jcf-parse.c (yyparse): Also set if compiling .class files.
2428 * jcf-parse.c (read_class); Read current_class.
2429 (jcf_parse): Make static.
2430 (load_inner_classes): New function, with code moved from jcf_parse,
2431 because we need to inner classes after the command-line files are read.
2432 (yyparse): Set finput to NULL when it doesn't need to be closed.
2433 Reduce use of main_jcf (basically only for archive) and
2434 use finput instead of main_jcf->read_state.
2435 Inline jcf_figure_file_type into yyparse.
2436 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
2437 Defer load_inner_classes and parse_class_file to a second pass,
2438 after we've correctly mapped command-line .clas fiels to classes.
2439 (jcf_figure_file_type): Removed.
2440 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
2441 (JCF_ZERO): Also clear zipd field.
2442 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
2443
24442001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
2445
2446 * jcf-parse.c (yyparse): Change ch from char * to char.
2447
8b1edcee
PB
24482001-03-19 Per Bothner <per@bothner.com>
2449
2450 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
2451 Add constructed filelist-file at end, following -xjava. Thus any .o
2452 and library files are not affected by the -xjava. Also wrap
54646811 2453 explicit @FILE with -xjava and -xnone.
8b1edcee 2454
6bc5f6cb
AH
24552001-03-19 Andrew Haley <aph@cambridge.redhat.com>
2456
9a07cfaf
RH
2457 * class.c (build_static_field_ref): Call make_decl_rtl() after
2458 setting the DECL_EXTERNAL flag.
6bc5f6cb 2459
daaaf29f
PB
24602001-03-17 Per Bothner <per@bothner.com>
2461
90f59043
PB
2462 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
2463
478e7ed6
PB
2464 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
2465 when result is is needed (target is STACK_TARGET).
2466
daaaf29f 2467 * parse.h (JDEP_SOLV): Removed.
d148b6aa 2468 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
daaaf29f 2469
d148b6aa
PB
2470 * parse.y (incomplete_class_list): Removed.
2471 (obtain_incomplete_type): Don't use or set incomplete_class_list.
2472 It doesn't work if resolve_class changes the name of an array type
2473 that is on the list and then someone else looks for the modified name.
2474 Also, seems liable to break when compiling multiple source files at
2475 once. So the simplest is to just remove incomplete_class_list -
2476 it is only a minor space win and it is not even clear it saves time.
daaaf29f
PB
2477
2478 * parse.y (resolve_class): Remove unneeded promote_type.
2479
4763d38f
PB
24802001-03-15 Per Bothner <per@bothner.com>
2481
b16e8f08
PB
2482 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
2483 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
2484 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
2485 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
8b1edcee 2486
3a2e5926
PB
2487 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
2488 * parse.y (java_expand_classes): Likewise.
8b1edcee 2489
47a50de9
PB
2490 * parse.y (expand_start_java_method): Was only called once and had a
2491 misleading name, so inline in caller java_complete_expand_method.
3a2e5926 2492 (enter_a_block): Likewise inline in enter_block and remove.
47a50de9 2493
4763d38f
PB
2494 Remove junk from when gcc/java was created (by copying from C/C++).
2495 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
2496 (struct binding_level): Remove fields keep, keep_if_subblocks,
2497 more_cleanups_ok, have_cleanups (which have never been used).
2498 (pushlevel, poplevel): Remove related useless code.
19f8e04b 2499
69ca5554
PB
2500 * class.c (make_class_data): The class_dtable_decl (i.e. the
2501 vtable for Class) should be external, except when compiling Class.
2502
7d32abcd
PB
2503 * jvspec.c (lang_specific_driver): Fix -C handling.
2504 Check -save-temps to see if temp @FILE should be deleted.
2505 Follow-up to/fix for February 16 patch.
2506
19f8e04b
PB
2507 * verify.c (verify_jvm_instructions): Better error msgs for dup.
2508 (type_stack_dup): Remove no-longer neded error check.
2509
551bf03c
BM
25102001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
2511
2512 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
2513 to 'for_pointer'. If this type is for a pointer (argument) mangling,
e64c46ce 2514 don't surround the element with 'N..E' if the type name is
551bf03c
BM
2515 unqualified.
2516
19e7881c
MM
25172001-03-14 Mark Mitchell <mark@codesourcery.com>
2518
d1d61788
MM
2519 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
2520 DECL_RTL_SET_P, etc.
19e7881c
MM
2521 (make_method_value): Likewise.
2522 (get_dispatch_table): Likewise.
2523
2524 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8b1edcee 2525
bcacc465
TT
25262001-03-07 Tom Tromey <tromey@redhat.com>
2527
2528 * config-lang.in (lang_requires): Define.
2529
de6c5979
BL
25302001-03-07 Brad Lucier <lucier@math.purdue.edu>
2531
2532 * typeck.c (convert): Check flag_unsafe_math_optimizations,
2533 not flag_fast_math.
2534
6d37cf2f
PB
25352001-03-05 Per Bothner <per@bothner.com>
2536
2537 Fix a problem where rest_of_decl_compilation applied to
2538 class_dtable_decl causes problems because it was done too early,
2539 before output file was opened.
2540 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
2541 * class.c (class_dtable_decl): Add macro - element of class_roots.
2542 (make_class_data): Define class_dtable_decl.
2543 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
2544
d6edb99e
ZW
25452001-03-01 Zack Weinberg <zackw@stanford.edu>
2546
2547 * java/class.c, java/decl.c, java/java-tree.h: Replace all
2548 uses of 'boolean' with 'bool'.
2549
f7143427
ZW
25502001-03-01 Zack Weinberg <zackw@stanford.edu>
2551
2552 * lang-specs.h: Add zero initializer for cpp_spec field to all
2553 array elements.
2554
fea2d5da
PB
25552001-02-16 Per Bothner <per@bothner.com>
2556
2557 Handle compiling multiple input files at once, and @FILE syntax.
e4087691 2558 * gcj.texi: Updated documentation to match.
fea2d5da
PB
2559 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
2560 * jcf-parse.c (parse_source_file): Split into ...
2561 (parse_source_file_1): New function - and:
2562 (parse_source_file_2): New function.
2563 (yyparse): On -ffilelist-file, open and scan named file.
2564 On first pass over files, only do parse_source_file_1.
2565 A new second pass calls parse_source_file_2 for each file to compile.
2566 (init_jcf_parse): Call init_src_parse.
2567 * jvspec.c (INDIRECT_FILE_ARG): New flag.
2568 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
2569 as multiple input file combined in one compilation.
2570 * lang-options.h: Add -ffilelist-file
2571 * lang.c (flag_filelist_file): New flag variable.
2572 (lang_f_options): Handle -ffilelist-file.
2573 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
2574 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
2575 gclass_list - use global fields of src_parse_roots instead.
2576 * parse.y (src_parse_roots): New array.
2577 (incomplete_class_list, gclass_list): New macros.
2578 (push_parser_context, java_pop_parser_context,
2579 java_parser_context_resume): Don't fiddle with deleted fields.
2580 (various): Use incomplete_class gclass_list and global macros
2581 instead of parse_ctxt fields - the lists are global.
2582 (init_src_parse): New function.
2583
9b58f739
RK
2584Fri Feb 23 15:28:39 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2585
2586 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
2587
064a552c
APB
25882001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
2589
2590 * parse.y (check_inner_class_access): Moved declaration of local
2591 `enclosing_decl_type' to the right location.
2592
a648f4e4
BM
25932001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
2594
e64c46ce 2595 * parse.y (parser_check_super_interface): Don't call
a648f4e4 2596 check_pkg_class_access for an inner interface.
e64c46ce 2597 (parser_check_super): Don't call check_pkg_class_access for inner
a648f4e4 2598 class.
e64c46ce 2599 (do_resolve_class): Simplify enclosing type loop. Don't call
a648f4e4
BM
2600 check_pkg_class_access if CL and DECL are not set.
2601 (find_in_imports_on_demand): Set DECL if class_type needed to be
2602 loaded. Don't call check_pkg_class_access for an inner class.
2603 (check_inner_class_access): Rewritten to implement member access
2604 rules as per spec 6.6.1.
2605 (check_pkg_class_access): Handle the empty package correctly.
2606 (in_same_package): New function. Determine if two classes are in the
2607 same package.
2608
35ab11f0
BM
26092001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
2610
2611 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
2612 method into array types.
2613 * parse.y (patch_method_invocation): Bypass access check on clone call
2614 to array instance.
e64c46ce 2615
055adbaa
APB
26162001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
2617
2618 * expr.c (build_instanceof): Check for arrays when trying fold to
2619 false.
2620
e658449e
JM
26212001-02-15 Jim Meyering <meyering@lucent.com>
2622
fd48c9b5
DD
2623 * Make-lang.in (java.install-common): Depend on `installdirs'.
2624 (java.install-info): Likewise.
e658449e 2625
4238a754
BM
26262001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
2627
2628 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
2629
e101152f 26302001-02-14 Tom Tromey <tromey@redhat.com>
9a07cfaf 2631 Alexandre Petit-Bianco <apbianco@cygnus.com>
e101152f 2632
055adbaa
APB
2633 Fix for PR java/1261.
2634 * typeck.c (build_java_array_type): Add public `clone' method to
2635 arrays.
2636 * parse.y (resolve_qualified_expression_name): Use current_class
e101152f 2637 when checking for inaccessibility.
055adbaa 2638 (patch_method_invocation): Fixed error message when accessibility
e101152f
APB
2639 denied. Added `from_super' argument.
2640
26412001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
2642
2643 * parse.y (resolve_class): Don't build a fake decl. Use the one
2644 already built.
2645 * typeck.c (build_java_array_type): Build and assign decl to array
2646 type.
2647
26482001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
2649
2650 * parse.y (not_accessible_p): Changed leading comment. Added extra
2651 `where' argument. Use it to enforce protected access rules.
2652 (resolve_qualified_expression_name): Added extra argument to
2653 not_accessible_p.
2654 (patch_method_invocation): Use argument `primary' to provide
2655 not_accessible_p with an extra argument.
2656 (lookup_method_invoke): Added extra argument to not_accessible_p.
2657 (search_applicable_method_list): Likewise.
2658
863cd85a
APB
26592001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
2660
2661 * parse.y (resolve_qualified_expression_name): Try to resolve as
2662 an inner class access only if `decl' is a TYPE_DECL.
2663
94807d33
APB
26642001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
2665
2666 * decl.c (classdollar_identifier_node): Initialize.
e64c46ce 2667 * java-tree.h (enum java_tree_index): New entry
94807d33
APB
2668 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
2669 (classdollar_identifier_node): New macro.
2670 (ID_CLASSDOLLAR_P): Likewise.
2671 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
2672 (build_dot_class_method_invocation): Likewise.
2673 (find_applicable_accessible_methods_list): `class$' can't be
2674 inherited.
2675
30f87f1a
APB
26762001-02-09 Raja R Harinath <harinath@cs.umn.edu>
2677
2678 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
2679
26802001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
2681
2682 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
2683 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
2684 gone.
2685
1e97aa40
APB
26862001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
2687
2688 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
2689 outside of the `__U' sequence too.
2690 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
2691 sequence too.
2692
a395f5ab
APB
26932001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
2694
2695 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
2696
1b43b6be
APB
26972001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
2698
2699 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
2700 (JVGENMAIN_OBJS): Likewise.
e64c46ce 2701 * java-tree.h (append_gpp_mangled_name): New prototype.
1b43b6be
APB
2702 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
2703 Removed cast calling `gcc_add_root.'
2704 * jvgenmain.c (mangle_obstack): New global, initialized.
2705 (main): Use it.
2706 (do_mangle_class): Constify local `ptr.'
2707 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
2708 append_gpp_mangle_name and update `count' if necessary.
2709 Use `mangle_obstack.'
2710 * mangle.c (append_unicode_mangled_name): Removed.
2711 (append_gpp_mangled_name): Likewise.
2712 (unicode_mangling_length): Likewise.
2713 (mangle_member_name): Return type set to `void.'
2714 (mangle_field_decl): Don't append `U' in escaped names.
2715 (mangle_method_decl): Likewise.
2716 (mangle_member_name): Just use `append_gpp_mangled_name.'
2717 * mangle_name.c: New file.
2718
4a83be51
PB
27192001-02-07 Per Bothner <per@bothner.com>
2720
2721 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
2722
2723 * check-init.c (check_init): Don't call done_alternative after
2724 processing loop code, as a LOOP_EXPR never terminates normally.
2725
7e5fd99f
JM
27262001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
2727
2728 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
2729
1456345e
APB
27302001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
2731
2732 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
2733 DECLs.
2734
77aff9f9
TT
27352001-02-06 Tom Tromey <tromey@redhat.com>
2736
2737 * lex.c (java_new_lexer): Longer error message.
2738
c00dd14e
JS
27392001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
2740 Alexandre Petit-Bianco <apbianco@cygnus.com>
2741
2742 * typeck.c (build_prim_array_type): Added leading comment.
2743 (build_java_array_type): Moved locals out of
2744 block. Always create the `data' field, fixed alignment to match
2745 C++.
2746
6d091870
TT
27472001-02-04 Tom Tromey <tromey@redhat.com>
2748
2749 * expr.c (java_lang_expand_expr): Don't bother recomputing
2750 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
2751 Fixes PR java/1866.
2752
1ebb5e73
APB
27532001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
2754
2755 * parse.y (process_imports): Save the original name of the import
2756 for better error report.
2757
ca5b1ff8
BM
27582001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
2759
2760 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
2761 of macros used when compiling jvspec.c.
2762 * jvspec.c (lang_specific_driver): Link with the shared
2763 libgcc by default.
2764
400500c4
RK
2765Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2766
2767 * check-init.c (check_init): Call internal_error instead of fatal.
2768 * expr.c (java_lang_expand_expr): Likewise.
2769 * jcf-parse.c (get_constant): Likewise.
2770 * mangle.c (java_mangle_decl): Likewise.
2771 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
2772 (operator_string): Likewise.
2773 * check-init.c (check_init): Call abort instead of fatal.
2774 * class.c (build_class_ref): Likewise.
2775 * constants.c (write_constant_pool): Likewise.
2776 * decl.c (start_java_method): Likewise.
2777 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
2778 (java_stack_dup, encode_newarray_type): Likewise.
2779 (build_java_array_length_access): Likewise.
2780 (build_java_check_indexed_type, expand_java_pushc): Likewise.
2781 (build_java_soft_divmod, build_invokeinterface): Likewise.
2782 * java-tree.h (INNER_CLASS_P): Likewise.
2783 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
2784 (give_name_to_class, get_class_constant): Likewise.
2785 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
2786 (find_constant_index, generate_bytecode_conditional): Likewise.
2787 (generate_bytecode_insns, perform_relocations): Likewise.
2788 * lex.c (java_unget_unicode, java_lex): Likewise.
2789 * mangle.c (mangle_type, mangle_record_type): Likewise.
2790 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
2791 (finish_mangling): Likewise.
2792 * parse.h (MARK_FINAL_PARMS): Likewise.
2793 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
2794 (obtain_incomplete_type, java_complete_class): Likewise.
2795 (java_check_regular_methods, java_complete_expand_method): Likewise.
2796 (cut_identifier_in_qualified, check_deprecation): Likewise.
2797 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
2798 (java_complete_lhs, lookup_name_in_blocks): Likewise.
2799 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
2800 * typeck.c (set_local_type, parse_signature_type): Likewise.
2801 (parse_signature_string, build_java_signature): Likewise;
2802 (set_java_signature): Likewise.
2803 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
2804 * class.c (add_method): Call fatal_error instead of fatal.
2805 (build_static_field_ref): Likewise.
2806 * expr.c (build_known_method_ref, expand_invoke): Likewise.
2807 * jcf-parse.c (get_constant, jcf_parse): Likewise.
2808 * lex.c (java_new_new_lexer): Likewise.
2809 * jv-scan.c (main): Likewise.
2810 (fatal_error): Renamed from fatal.
2811 * jcf-parse.c (yyparse): Call fatal_io_error instead of
2812 pfatal_with_name.
2813 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
2814 (yyparse): Likewise.
2815 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
2816 * lex.c (java_get_line_col): Likewise.
2817 * jcf-parse.c (load_class): Make errors non-fatal.
2818 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
e64c46ce 2819
4bae4eb5
BM
28202001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
2821
2822 * jvgenmain.c (class_mangling_suffix): Remove unused string.
2823 (error): Remove unused function.
2824 (main): Don't use "__attribute__ alias" on generated class symbol.
2825
c0b00d37
APB
28262001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
2827
2828 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
2829 argument.
2830 * parse.y (finish_method_declaration): Code accounting for WFLed
2831 method DECL_NAMEs deleted.
2832 (check_abstract_method_definitions): Likewise.
2833 (resolve_type_during_patch): Layout resolved type.
2834 * typeck.c (lookup_do): Removed unused local.
2835
4bae4eb5 28362001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
eb59e547
BM
2837
2838 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
2839 * decl.c (init_decl_processing): Use integer_minus_one_node, not
2840 integer_negative_one_node.
2841 * expr.c (build_java_binop): Likewise.
2842
4bae4eb5 28432001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
7be00c49
JS
2844
2845 * zextract.c (read_zip_archive): Read file_offset before writing
2846 zipd and consequently clobbering the header contents.
2847
c913b6f1
KG
28482001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2849
2850 * Make-lang.in: Remove all dependencies on defaults.h.
2851 * decl.c: Don't include defaults.h.
2852 * expr.c: Likewise.
2853 * parse.y: Likewise.
2854
c4faeb92
APB
28552001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
2856
2857 * ChangeLog (2001-01-21): Fixed typo.
2858 * class.c (layout_class_method): Code accounting for WFLed
2859 method DECL_NAMEs deleted.
2860 * constant.c (find_methodref_index): Likewise.
2861 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
2862 * java-tree.h (DECL_FUNCTION_WFL): New macro.
2863 (struct lang_decl): New field `wfl'.
2864 (java_get_real_method_name): Prototype deleted.
2865 * mangle.c (mangle_method_decl): Code accounting for WFLed
2866 method DECL_NAMEs deleted.
2867 * parse.h (GET_METHOD_NAME): Macro deleted.
2868 * parse.y (reset_method_name): Deleted.
2869 (method_header): Set DECL_FUNCTION_WFL.
2870 (check_abstract_method_header): Code accounting for WFLed method
2871 DECL_NAMEs deleted.
2872 (java_get_real_method_name): Deleted.
2873 (check_method_redefinition): Code accounting for WFLed method
2874 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
2875 (java_check_regular_methods): Likewise.
2876 (java_check_abstract_methods): Likewise.
2877 (java_expand_classes): Don't call `reset_method_name.'
2878 (search_applicable_method_list): Use DECL_NAMEs instead of
2879 GET_METHOD_NAME.
2880 * typeck.c (lookup_do): Code accounting for WFLed method
2881 DECL_NAMEs deleted.
2882
97876d66
RE
28832001-01-25 Richard Earnshaw <rearnsha@arm.com>
2884
2885 * lex.c (java_read_char): Check for EOF from getc first.
2886
493d561d
APB
28872001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2888
2889 * class.c (layout_class): Don't lay the superclass out if it's
2890 already being laid out.
2891 * jcf-parse.c (handle_innerclass_attribute): New function.
2892 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
2893 handle_innerclasses_attribute.
2894 (jcf_parse): Don't load an innerclasses if it's already being
2895 laid out.
2896 * jcf-write.c (append_innerclass_attribute_entry): Static
2897 `anonymous_name' and its initialization deleted. `ocii' and `ini'
2898 to be zero for anonymous classes.
2899
29002001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2901
2902 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
2903 necessary.
2904 * jcf-parse.c (set_source_filename): Use
2905 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
2906
29072001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2908
2909 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
2910 gets a unique asm name.
2911
29122001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2913
2914 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
2915 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
2916 if necessary.
2917 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
2918 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
2919 * parse.y (lookup_package_type_and_set_next): Deleted.
2920 (resolve_package): Removed unnecessary code.
2921 (find_applicable_accessible_methods_list): `finit$' can't be
e64c46ce 2922 inherited.
493d561d
APB
2923 * verify.c (pop_argument_types): Added missing prototype.
2924
7c01b2b5
BM
29252001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
2926
2927 * config-lang.in: Disable java by default.
2928
80261b56
TT
29292001-01-23 Tom Tromey <tromey@redhat.com>
2930
2931 * gcj.texi (Copying): New node.
2932 Added copyright information.
2933
a4796c80
PB
29342001-01-21 Per Bothner <per@bothner.com>
2935
2936 Various fixes to allow compiling a compressed .jar/.zip archive.
2937 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
2938 (struct ZipFile): Add fields name and next (from ZipFileCache).
2939 (struct ZipDirectory): New field zipf points to owning ZipFile.
2940 * jcf.h (struct ZipDirectory): Add forward declaration.
2941 (struct JCF): Declare zipd field to have type struct ZipDirectory.
2942 Remove seen_in_zip and zip_offset fields.
2943 (JCF_SEEN_IN_ZIP): New macro.
2944 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
2945 * jcf-io.c: Change all ZipFileCache to ZipFile.
2946 (read_zip_member): New function.
2947 (open_in_zip): Call read_zip_member.
2948 * jcf-parse.c (find_in_current_zip): Remove function.
2949 (read_class): Merge in find_in_current_zip functionality.
2950 Call read_zip_member if needed.
2951 (parse_zip_file_entries): Use read_zip_member.
2952 (process_zip_dir): Update for removed and added JCF fields.
2953 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
2954
b5c4fed9
PB
29552001-01-21 Per Bothner <per@bothner.com>
2956
2957 Minor optimization of static ggc roots.
2958 * jcf-parse.c (parse_roots): New static field.
2959 (current_field, current_method, current_file_list): Replace by macros
2960 naming fields of parse_roots.
2961 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
2962 * class.c (class_roots): New static field.
2963 (registered_class, fields_ident, info_ident, class_list):
2964 New macros naming fields of parse_roots.
2965 (build_static_field_ref): Don't register roots here.
2966 (layout_class): Static field list replaced by macro class_list.
2967 (init_class_processing): Call ggc_add_tree_root for 4 roots.
2968 Initialize fields_ident and info_ident here.
2969
3432b91b
PB
29702001-01-21 Per Bothner <per@bothner.com>
2971
2972 * jcf-parse.c (ggc_mark_jcf): New function.
2973 (init_jcf_parse): Register current_jcf as ggc root.
2974
2c36c7fd
PB
29752001-01-21 Per Bothner <per@bothner.com>
2976
2977 * lang.c (put_decl_node): Print method's name.
2978
9c0c88ac
PB
29792001-01-21 Per Bothner <per@bothner.com>
2980
2981 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
2982 (verify_jvm_instructions): Use it, for better error messages on loads.
2983
230cbd5f
PB
29842001-01-21 Per Bothner <per@bothner.com>
2985
c4faeb92 2986 * verify.c (merge_type_state): Still may have to merge even if
230cbd5f
PB
2987 LABEL_VERIFIED (label).
2988
e6b6db0d
PB
29892001-01-21 Per Bothner <per@bothner.com>
2990
2991 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
2992 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
2993
b57300bc
PB
29942001-01-19 Per Bothner <per@bothner.com>
2995
2996 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
2997 if expeting an interface type. Refines Tom's change of 2000-09-12.
2998
ee08d4cc
PB
29992001-01-18 Per Bothner <per@bothner.com>
3000
3001 * gcj.texi (Input Options): Mention .java files.
3002
b1117741
APB
30032001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
3004
3005 * lang-options.h (-Wunsupported-jdk11): Removed.
3006 * lang.c (flag_not_overriding): Deleted.
3007 (flag_static_local_jdk1_1): Likewise.
3008 (lang_W_options): Removed "unsupported-jdk11" entry.
3009 * parse.y (java_check_methods): Removed dead code.
3010
2dc73168
TT
30112001-01-17 Tom Tromey <tromey@redhat.com>
3012
3013 Changes suggested by Per Bothner:
3014 * gcj.texi (Input Options): Don't mention input files.
3015 (Code Generation): Updated --main information.
3016 (Invoking jcf-dump): Mention that --javap is incomplete.
3017 From Alexandre Petit-Bianco:
3018 (Warnings): Don't mention -Wunsupported-jdk11.
3019 My stuff:
3020 (Compatibility): Mention JDK 1.2-ness of libraries.
3021 (Resources): Mention resources used when writing gcj.
3022
bc65b5ec
TT
30232001-01-17 Tom Tromey <tromey@redhat.com>
3024
3025 * gcj.texi: New file.
3026 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
3027 (java.info): Depend on gcj.info.
3028 (java/gcj.dvi): New target.
3029 (java.dvi): Depend on gcj.dvi.
3030 (java.install-info): Wrote.
3031
930f6690
JS
30322001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
3033
3034 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
3035 having called make_decl_rtl.
3036
00b4575d
PB
30372001-01-14 Per Bothner <per@bothner.com>
3038
984ad2c6
PB
3039 Various patches to emit better messages on verification errors.
3040 * expr.c (push_type_0): Return error indication on stack overflow,
3041 instead of callinfg fatal.
3042 (push_type): Now just call push_type_0 (nd fatal on overflow).
3043 (pop_type_0): Return detailed error message (in a char** argument).
3044 (pop_type): If pop_type_0 fails, print error message.
3045 (pop_argument_types): Moved to verify.c.
3046 * verify.c (pop_argument_types): Moved from expr.c.
3047 Return a (possible) error message, rather than void.
3048 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
3049 (verify_jvm_instruction): Use new macros, improving error messages.
3050 For case OPCODE_astore use object_ptr_type_node.
3051 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
3052 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
3053
00b4575d
PB
3054 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
3055 constant, return body without wrapper. (Improves constant folding.)
3056 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
3057
d9da31dd
PB
30582001-01-13 Per Bothner <per@bothner.com>
3059
3060 * expr.c (expand_java_field_op): Assigning to a final field outside
3061 an initializer does not violate JVM spec, so should be warning, not
3062 error. (Sun's verifier does not complain - though MicroSoft's does.)
e64c46ce 3063
a67a383a
JM
30642001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
3065
3066 * gjavah.c (version), jcf-dump.c (version): Update copyright year
3067 to 2001.
3068
7e1376a1
BM
30692001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
3070
3071 * parse.y (resolve_expression_name): Permit instance variables from
3072 enclosing context in super constructor call.
3073 (resolve_qualified_expression_name): Permit enclosing class's qualified
3074 "this" in super constructor call.
3075
6c418184
MM
30762001-01-10 Mark Mitchell <mark@codesourcery.com>
3077
3078 * class.c (build_utf8_ref): Remove last argument in call to
3079 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
3080 (build_class_ref): Likewise.
3081 (build_static_field_ref): Likewise.
3082 (get_dispatch_table): Likewise.
3083 (layout_class_method): Likewise.
3084 (emit_register_classes): Likewise.
3085 * constants.c (build_constant_data_ref): Likewise.
3086 * decl.c (builtin_function): Likewise.
3087 (create_primitive_vtable): Likewise.
3088 * expr.c (build_known_method_def): Likewise.
3089 (build_jni_stub): Likewise.
3090 (java_lang_expand_expr): Likewise.
e64c46ce 3091
0adc3d8a
TT
30922001-01-10 Tom Tromey <tromey@redhat.com>
3093
3094 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
3095
761491c8
APB
30962001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
3097
3098 * java-tree.h (lang_printable_name_wls): New prototype.
3099 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
3100 rather than `current_class' to print type name. Don't prepend type
3101 names when printing constructor names.
3102 (lang_printable_name_wls): New function.
3103 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
3104 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
3105 * parse.y (patch_method_invocation): Message tuned for constructors.
3106 (not_accessible_p): Grant `private' access from within
3107 enclosing contexts.
e64c46ce 3108
dc08e603
APB
31092001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
3110
3111 All files with updated copyright when applicable.
3112 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
3113 * class.c (mangle_class_field): Function removed.
3114 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
3115 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
3116 (build_class_ref): Call `java_mangle_class_field' instead of
3117 `mangle_class_field.'
3118 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
e64c46ce 3119 (layout_class): Call `java_mangle_decl' instead of
dc08e603
APB
3120 `mangle_static_field.'
3121 (cxx_keywords): Initialized static array moved to `lex.c.'
3122 (layout_class_method): Changed leading comment. Simplified to
3123 call `java_mangle_decl.' Local `ptr' moved in for loop body.
3124 * decl.c (lang_mark_tree): Mark field `package_list.'
3125 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
3126 (struct lang_type): New field `package_list.'
3127 (unicode_mangling_length): Prototype removed.
3128 (append_gpp_mangled_name, append_gpp_mangled_classtype,
3129 emit_unicode_mangled_name): Likewise.
3130 (cxx_keyword_p): New prototype.
3131 (java_mangle_decl, java_mangle_class_field,
3132 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
3133 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
3134 `build_expr_wfl.'
3135 * jvgenmain.c (main_method_prefix): Global variable removed.
3136 (main_method_suffix): Likewise.
3137 (do_mangle_classname): New function.
a83f01f0 3138 (main): Call it. Format changed to accommodate new mangling scheme.
dc08e603
APB
3139 * lex.c: (utf8_cmp): Conditionally prototyped.
3140 (cxx_keywords): Moved from class.c, conditionally defined.
3141 (utf8_cmp, cxx_keyword_p): Likewise.
3142 * mangle.c (obstack.h, ggc.h): Included.
3143 (mangle_field_decl): New function.
3144 (mangle_method_decl, mangle_type, mangle_pointer_type,
3145 mangle_array_type, mangle_record_type,
3146 find_compression_pointer_match, find_compression_array_match,
3147 find_compression_record_match,
3148 find_compression_array_template_match, set_type_package_list,
3149 entry_match_pointer_p, emit_compression_string, init_mangling,
3150 finish_mangling, compression_table_add, mangle_member_name): Likewise.
3151 (mangle_obstack): New global.
3152 (MANGLE_RAW_STRING): New macro.
3153 (unicode_mangling_length): Turned static.
3154 (append_unicode_mangled_name): Renamed from
3155 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
3156 replaces `obstack', removed from the parameter list.
3157 (append_gpp_mangled_name): Turned static. `mangle_obstack'
e64c46ce 3158 replaces parameter `obstack', removed from the parameter list. Call
dc08e603
APB
3159 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
3160 (append_gpp_mangled_classtype): Removed.
3161 (compression_table, compression_next): New static variables.
3162 * parse.y (temporary_obstack): Extern declaration removed.
3163
761491c8
APB
31642001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
3165
3166 * parse.y (patch_binop): Compute missing type in error situations.
3167
5bb11b2e
BM
31682001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
3169
3170 * class.c (make_class_data): Push initial value for "arrayclass".
3171 * decl.c (init_decl_processing): Add new class field "arrayclass".
3172
ac39dac0
BM
31732001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
3174
3175 From patha@softlab.ericsson.se:
e64c46ce 3176 * parse.y (switch_label): Use build, not build1, to construct
ac39dac0
BM
3177 DEFAULT_EXPR.
3178
a5a4ce3c
NB
31792001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
3180
3181 * lang.c (lang_decode_option): Change -MA to -MP.
3182 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
3183 Update to new prototype; do quote targets.
3184 (jcf_dependency_write): Update.
3185
d27fd99a
BM
31862000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
3187
3188 Shorten primitive array allocation path:
3189 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
3190 to create new primitive arrays.
e64c46ce 3191 * expr.c (build_newarray): If generating native code, call
d27fd99a
BM
3192 soft_newarray_node with a reference to the primitive TYPE identifier
3193 instead of type_value.
e64c46ce 3194
c1eacb70
BM
31952000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
3196
3197 Fix for PRs gcj/312 and gcj/253:
3198 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
3199 dest if they arn't already.
e64c46ce 3200 * class.c (layout_class): Call maybe_layout_super_class on
c1eacb70
BM
3201 superinterfaces also, but only if compiling from bytecode.
3202
6d003d5c
BM
3203 Fix for PR gcj/373:
3204 * parse.y (create_class): Set ACC_STATIC if class is declared in an
3205 interface.
3206
325de66c
TT
32072000-12-15 Tom Tromey <tromey@redhat.com>
3208
3209 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
3210 set.
3211
e35990c4
AH
32122000-12-14 Andrew Haley <aph@redhat.com>
3213
3214 * boehm.c (mark_reference_fields): Change test to correctly detect
3215 bitmap overflow.
3216
53714cda
AJ
32172000-12-15 Andreas Jaeger <aj@suse.de>
3218
3219 * config-lang.in (lang_dirs): Added.
3220
1e0cdc10
APB
32212000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
3222
3223 * parse.y (end_artificial_method_body): Fixed undefined behavior.
3224 Credits go to rth for finding it.
3225
e9e42530
MS
32262000-12-13 Mike Stump <mrs@wrs.com>
3227
3228 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
3229
3f27e3f8
TT
32302000-11-07 Tom Tromey <tromey@cygnus.com>
3231
3232 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
3233 * lex.c (java_ignorable_control_p): Removed.
3234 (java_letter_or_digit_p): Removed.
3235 (java_start_char_p): New function.
3236 (java_read_char): Return `int', not `unicode_t'. Changed
3237 callers.
3238 (java_read_unicode): Likewise.
3239 (java_read_unicode_collapsing_terminators): Likewise.
3240 (java_get_unicode): Likewise.
3241 (java_new_lexer): Initialize hit_eof.
3242 (java_parse_end_comment): Take `int' argument.
3243 (java_parse_doc_section): Likewise.
3244 (java_parse_escape_sequence): Don't allow backlash-newline.
3245 Return `int'.
3246 * lex.h (JAVA_DIGIT_P): Removed.
3247 (_JAVA_LETTER_OR_DIGIT_P): Removed.
3248 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
3249 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
3250 (JAVA_PART_CHAR_P): New macro.
3251 (UEOF): Now -1.
3252 (JAVA_CHAR_ERROR): Now -2.
3253 (java_lexer): New field `hit_eof'.
3254 * chartables.h: New file.
3255 * gen-table.pl: new file.
3256
568aac9c 32572000-11-20 Tom Tromey <tromey@cygnus.com>
9a07cfaf 3258 Alexandre Petit-Bianco <apbianco@cygnus.com>
568aac9c
TT
3259
3260 * parse.y (java_complete_lhs): Only allow compound assignment of
3261 reference type if type is String.
3262
f34ff6d6
APB
32632000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
3264
3265 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
3266 jcf-path.c: Likewise.
3267
6e5589e8
AG
32682000-12-09 Anthony Green <green@redhat.com>
3269
3270 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
3271 filestart and filename_length as int values.
3272
8000caee
MD
32732000-12-07 Mo DeJong <mdejong@redhat.com>
3274
3275 * jcf-io.c (find_class): Correct the logic that tests to see if a
3276 .java file is newer than its .class file. The compiler was
3277 incorrectly printing a warning when file mod times were equal.
3278
f6bbde28
ZW
32792000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
3280
3281 * jvgenmain.c: Use ISPRINT not isascii.
3282
46142b26
APB
32832000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
3284
3285 * parse.y (end_artificial_method_body): Fixed typo.
3286
f8b93ea7
APB
32872000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
3288
3289 * parse.y (patch_method_invocation): Pick the correct enclosing
3290 context when creating inner class instances.
3291 Fixes gcj/332.
3292
45441c5b
JM
32932000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
3294
3295 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
3296 Update copyright year to 2000.
3297
1510057a
AG
32982000-11-23 Anthony Green <green@redhat.com>
3299
3300 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
3301 Move current_file_list out of yyparse and make it static.
3302
3303 * expr.c: Declare quick_stack and tree_list_free_list as static
3304 (init_expr_processing): Register quick_stack and
3305 tree_list_free_list roots.
3306
5e18f6d6
APB
33072000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
3308
3309 * parse.y (build_outer_field_access): New local `decl_ctx', use
3310 it. Check for field's context and current class immediate outer
3311 context inheritance.
3312 (outer_field_access_p): Consider fields inherited from the last
3313 enclosing context.
3314 (build_access_to_thisn): Stop at the last enclosing context if
3315 necessary.
3316 Fixes gcj/367.
3317
9196ece5
R
3318Thu Nov 23 02:19:14 2000 J"orn Rennecke <amylaar@redhat.com>
3319
3320 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
3321
c385cdf6
BM
33222000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
3323
3324 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
3325 scratch buffer.
3326
1535cc88
TT
33272000-11-20 Tom Tromey <tromey@cygnus.com>
3328
3329 * jv-scan.c (help): Document --complexity.
3330 (options): Added --complexity.
3331 (flag_complexity): New global.
3332 (main): Call `report'.
3333 * parse-scan.y (complexity): New global.
3334 (if_then_statement, if_then_else_statement,
3335 if_then_else_statement_nsi, switch_block_statement_group,
3336 while_expression, do_statement, for_begin, continue_statement,
3337 throw_statement, catch_clause, finally, method_invocation,
3338 conditional_and_expression, conditional_or_expression,
3339 conditional_expression): Update complexity.
3340 (reset_report): Reset complexity.
3341 (report): New function.
3342
d828bc42
TT
33432000-11-20 Tom Tromey <tromey@cygnus.com>
3344
3345 * lex.c (yylex): Added STRICT_TK case.
3346 * parse.y (STRICT_TK): Added.
3347 * parse-scan.y (STRICT_TK): Added.
3348 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
3349 `;'. Use 4, not 3, with -k option. Correctly rename resulting
3350 file.
3351 * keyword.h: Rebuilt.
3352 * keyword.gperf (strictfp): Added.
3353
4e7842a0
TT
33542000-11-20 Tom Tromey <tromey@cygnus.com>
3355
3356 * lex.c (yylex): Recognize floating point constants with leading
3357 0.
3358
7e9355c6
KG
33592000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3360
3361 * java-tree.h (cyclic_inheritance_report): Constify.
3362 * parse.y (cyclic_inheritance_report): Likewise.
3363
a8a05998
ZW
33642000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
3365
3366 * parse.y (goal): Remove call to ggc_add_string_root.
3367
520a57c8
ZW
33682000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
3369
3370 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
3371 Create string in scratch buffer, then pass to build_string.
3372
88f3c477
JM
33732000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
3374
3375 * parse.y (issue_warning_error_from_context): Add
3376 ATTRIBUTE_PRINTF.
3377
ac51395d
AG
33782000-11-11 Anthony Green <green@redhat.com>
3379
3380 * jcf-parse.c (process_zip_dir): Add finput parameter.
3381 (jcf_figure_file_type): Call process_zip_dir with appropriate
3382 argument.
3383
4e135bdd
KG
33842000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3385
3386 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
3387 * jcf-parse.c (jcf_figure_file_type): Likewise.
3388
2e09e75a
JM
33892000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
3390
3391 * parse.y (create_new_parser_context): Use memset () instead of
3392 bzero ().
3393
136c35df
TT
33942000-11-08 Tom Tromey <tromey@cygnus.com>
3395
3396 * gjavah.c (process_file): Only include gcj/cni.h when generating
3397 CNI stubs.
3398
961192e1
JM
33992000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
3400
3401 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
3402 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
3403 instead of bzero ().
3404
099a5150
TT
34052000-11-05 Tom Tromey <tromey@cygnus.com>
3406
3407 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
3408 * lex.c (IS_ZERO): New define.
3409 (java_perform_atof): Error on floating point underflow.
3410
cbf53a1d
TT
34112000-11-04 Tom Tromey <tromey@cygnus.com>
3412
3413 * lex.c (java_parse_escape_sequence): Only read two octal
3414 characters if the first one is greater than 3. Don't allow
3415 "octal" numbers to include the digits 8 or 9.
3416
436a88a6
JM
34172000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
3418
3419 * Make-lang.in (java.distdir): Remove.
3420
747800ee
TT
34212000-11-03 Tom Tromey <tromey@cygnus.com>
3422
4e2c8d44
TT
3423 * Make-lang.in (java.dvi): New target.
3424 Partial fix for PR other/567.
3425
b7436b72
TT
3426 * lang-options.h: Mention -Wout-of-date.
3427 * jcf-dump.c (flag_newer): New global.
3428 * gjavah.c (flag_newer): New global.
3429 * jcf-io.c (find_class): Only warn when flag_newer set.
3430 * lang.c (flag_newer): New global.
3431 (struct string_option): New declaration.
3432 (lang_W_options): New global.
3433 (process_option_with_no): New function.
3434 (lang_decode_option): Use it.
3435
0160fbe1
TT
3436 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
3437 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
3438 `$'.
3439
747800ee
TT
3440 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
3441 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
3442 * lex.c (java_read_unicode): Removed `term_context' argument.
3443 Recognize any number of `u' in `\u'.
3444 (java_read_unicode_collapsing_terminators): New function.
3445 (java_get_unicode): Use it.
3446 (java_lineterminator): Removed.
3447 (yylex): Produce error if character literal is newline or single
3448 quote. Return if eof found in middle of `//' comment. EOF in
3449 `//' comment is only an error if pedantic.
3450 (java_ignorable_control_p): New function.
3451 (java_parse_end_comment): Return if eof found in middle of
3452 comment.
3453 Include flags.h.
3454 * jv-scan.c (pedantic): New global.
3455
ee5f86dc
APB
34562000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
3457
3458 * parse.y (outer_field_access_p): Inherited fields aren't
3459 consider outer fields.
3460 (maybe_build_thisn_access_method): Use
3461 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
3462 (resolve_expression_name): Trigger an error if a static field
3463 is being accessed as an outer field.
3464
7ccd2fc9 34652000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
f6bbde28 3466
7ccd2fc9
APB
3467 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
3468 Fixes gcj/365.
3469
b8dad04b
ZW
34702000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
3471
3472 * Make-lang.in: Move all build rules here from Makefile.in,
3473 adapt to new context. Wrap all rules that change the current
3474 directory in parentheses. Expunge all references to $(P).
3475 When one command depends on another and they're run all at
3476 once, use && to separate them, not ;. Add OUTPUT_OPTION to
3477 all object-file generation rules. Delete obsolete variables.
3478
3479 * Makefile.in: Delete.
3480 * config-lang.in: Delete outputs= line.
3481
2cb3951d
APB
34822000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
3483
3484 * parse.y (patch_method_invocation): NULLify this_arg when already
3485 inserted.
3486 (maybe_use_access_method): Handle call to methods unrelated to the
3487 current class. Fixed comment.
3488 Fixes gcj/361.
3489
ee5f86dc
APB
34902000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
3491
3492 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
3493 scope.
3494
07b5e470
TT
34952000-10-24 Tom Tromey <tromey@cygnus.com>
3496
3497 * lex.c (java_new_lexer): Initialize new fields. Work around
3498 broken iconv() implementations.
3499 (java_read_char): Swap bytes if required. Use fallback decoder if
3500 required.
3501 (byteswap_init, need_byteswap): New globals.
3502 (java_destroy_lexer): Only close iconv handle if it is in use.
3503 * lex.h (java_lexer): New fields read_anything, byte_swap,
3504 use_fallback.
3505 Made out_buffer unsigned.
3506
8ac1de05
APB
35072000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
3508
3509 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
3510 where an enclosing context can be set on the jdep.
3511 (do_resolve_class): Fixed identation.
3512
80393943
KG
35132000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3514
3515 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
f6bbde28 3516
80393943
KG
3517 * jcf-reader.c (peek_attribute, skip_attribute): Only define
3518 when requested.
3519
3520 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
3521
3522 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
3523
c7303e41
APB
35242000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
3525
3526 * jcf-write.c (OP1): Update `last_bc'.
3527 (struct jcf_block): Fixed indentation and typo in comments. New
3528 field `last_bc'.
3529 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
3530 follows `monitorenter'.
3531 * parse.y (patch_synchronized_statement): New local `tmp'. Call
3532 `patch_string'.
3533 Fixes gcj/232.
3534
316a06a1
TT
35352000-10-16 Tom Tromey <tromey@cygnus.com>
3536
3537 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
3538 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
3539 * lang-options.h: Added -MA, -MT, -MF..
3540 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
3541 (DEPEND_TARGET_SET): New macro.
3542 (DEPEND_FILE_ALREADY_SET): Likewise.
3543 (init_parse): Handle new flags.
3544 * jcf.h (jcf_dependency_print_dummies): Declare.
3545 * Make-lang.in (s-java): Added mkdeps.o.
3546 * Makefile.in (BACKEND): Added mkdeps.o.
3547 (../gcjh$(exeext)): Added mkdeps.o.
3548 (../jcf-dump$(exeext)): Added mkdeps.o.
3549 * jcf-depend.c: Include mkdeps.h.
3550 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
3551 add_entry): Removed.
3552 (jcf_dependency_reset): Rewrote.
3553 (dependencies): New global.
3554 (jcf_dependency_set_target): Rewrote.
3555 (jcf_dependency_add_target): Likewise.
3556 (jcf_dependency_add_file): Likewise.
3557 (munge): Removed.
3558 (print_ents): Removed.
3559 (jcf_dependency_write): Rewrote.
3560 (print_dummies): New global.
3561 (jcf_dependency_print_dummies): New function
3562 (jcf_dependency_write): Call deps_dummy_targets if required.
3563
dba41d30
APB
35642000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
3565
3566 * gjavah.c (add_class_decl): Removed unused variables `tname',
3567 `tlen' and `name_index'.
3568 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
3569 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
3570 in `wfl_operator' with value.
3571 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
3572 (jcf_figure_file_type): Fixed identation.
3573 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
3574 * parse.y (analyze_clinit_body): New function.
3575 (static_initializer:): Reset `current_static_block'.
3576 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
3577 `wfl_operator' with new value.
3578 (lookup_cl): Use EXPR_WFL_FILENAME.
3579 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
3580 analyze_clinit_body.
3581 (build_outer_field_access): Access to this$<n> built from
3582 current_class, not its outer context.
3583 (build_access_to_thisn): Fixed leading comment. Tidied things up.
f6bbde28 3584 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
dba41d30
APB
3585 (patch_method_invocation): Use `is_static_flag' when already
3586 initialized.
3587 (patch_newarray): Removed assignment in ternary operator.
3588
1a2ebe6d
APB
35892000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
3590
dba41d30 3591 * except.c (free_eh_ranges): Don't free `whole_range'.
1a2ebe6d 3592
8e7ab3ff
AG
35932000-10-15 Anthony Green <green@redhat.com>
3594
3595 * decl.c (init_decl_processing): Call init_class_processing before
3596 anything else.
3597
c7303e41
APB
35982000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
3599
3600 * check-init.c (check_init): Fixed leading comment. Use
3601 LOCAL_FINAL_P.
3602 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
3603 (give_name_to_locals): Likewise.
3604 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
3605 fields in lang_decl_var.
3606 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
3607 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
3608 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
3609 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
3610 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
3611 (LOCAL_FINAL): Rewritten.
3612 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
3613 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
3614 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
3615 `init_final' fields.
3616 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
3617 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
3618 (TYPE_HAS_FINAL_VARIABLE): New macro.
3619 (struct lang_type): Added `afv' field.
3620 * parse.y (check_static_final_variable_assignment_flag): New function.
3621 (reset_static_final_variable_assignment_flag): Likewise.
3622 (check_final_variable_local_assignment_flag): Likewise.
3623 (reset_final_variable_local_assignment_flag): Likewise.
3624 (check_final_variable_indirect_assignment): Likewise.
3625 (check_final_variable_global_assignment_flag): Likewise.
3626 (add_inner_class_fields): Use LOCAL_FINAL_P.
3627 (register_fields): Handle local finals and final variables.
3628 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
3629 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
3630 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
3631 on local finals.
3632 (java_complete_expand_methods): Loop to set
3633 TYPE_HAS_FINAL_VARIABLE. Call
f6bbde28 3634 `reset_final_variable_local_assignment_flag' and
c7303e41
APB
3635 `check_final_variable_local_assignment_flag' accordingly before
3636 and after constructor expansion. Call
3637 `reset_static_final_variable_assignment_flag'
f6bbde28 3638 before expanding <clinit> and after call
c7303e41
APB
3639 `check_static_final_variable_assignment_flag' if the
3640 current_class isn't an interface. After all methods have been
3641 expanded, call `check_final_variable_global_assignment_flag' and
3642 `check_static_final_variable_assignment_flag' if the current class
f6bbde28 3643 is an interface.
c7303e41
APB
3644 (maybe_yank_clinit): Fixed typo in comment.
3645 (build_outer_field_access_methods): Removed old sanity check. Use
3646 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
3647 Don't create access methods for finals.
3648 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
3649 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
f6bbde28 3650 existing DECL_INIT has been processed.
c7303e41
APB
3651 (java_complete_lhs): Likewise.
3652 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
3653 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
3654 logic.
3655 (patch_assignment): Use LOCAL_FINAL_P.
3656 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
3657 DECL_INITIAL is nullified.
3658 Fixes gcj/163.
3659
4b945402
KG
36602000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3661
3662 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
f6bbde28 3663
4b945402
KG
3664 * Makefile.in (parse.c, parse-scan.c): Likewise.
3665
1f8f4a0b
MM
36662000-10-12 Mark Mitchell <mark@codesourcery.com>
3667
3668 * class.c (temporary_obstack): Remove.
3669 (make_class): Don't mess with obstascks.
3670 (push_class): Likewise.
3671 (set_super_info): Likewise.
3672 (add_method_1): Likewise.
3673 (add_method): Likewise.
3674 (add_field): Likewise.
3675 (build_utf8_ref): Likewise.
3676 (build_class_ref): Likewise.
3677 (build_static_field_ref): Likewise.
3678 (finish_class): Likewise.
3679 (push_super_field): Likewise.
3680 (layout_class): Likewise.
3681 (layout_class_methods): Likewise.
3682 (init_class_processing): Likewise.
3683 * constants.c (get_tag_node): Likewise.
3684 (build_constant_data_ref): Likewise.
3685 * decl.c (ggc_p): Remove.
3686 (copy_lang_decl): Use ggc_alloc.
3687 (complete_start_java_method): Don't mess with obstacks.
3688 (start_java_method): Likewise.
3689 (end_java_method): Likewise.
3690 * except.c (link_handler): Use xmalloc.
3691 (free_eh_ranges): New function.
3692 (method_init_exceptions): Use it.
3693 (add_handler): Use xmalloc.
3694 (expand_start_java_handler): Don't mess with obstacks.
3695 (prepare_eh_table_type): Likewise.
3696 (expand_end_java_handler): Likewise.
3697 * expr.c (push_value): Likewise.
3698 (create_label_decl): Likewise.
3699 (build_jni_stub): Likewise.
3700 (java_lang_expand_expr): Likewise.
3701 (note_instructions): Use xrealloc.
3702 (java_push_constant_from_pool): Don't mess with obstacks.
3703 (process_jvm_instruction): Likewise.
3704 * java-tree.h (cyclic_inheritance_report): Remove duplicate
3705 declaration.
3706 * jcf-parse.c (get_constant): Don't mess with obstacks.
3707 (read_class): Likewise.
3708 (jcf_parse): Likewise.
a83f01f0 3709 * lex.c (expression_obstack): Remove.
1f8f4a0b
MM
3710 (java_lex): Don't use obstack_free.
3711 * parse.h (exit_java_complete_class): Don't mess with obstacks.
3712 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
3713 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
3714 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
3715 * parse.y (gaol): Add more GC roots.
3716 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
3717 (lookup_field_wrapper): Likewise.
3718 (obtain_incomplete_type): Don't mess with obstacks.
a83f01f0 3719 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
1f8f4a0b
MM
3720 macros.
3721 (craft_constructor): Don't mess with obstacks.
3722 (safe_layout_class): Likewise.
3723 (java_complete_class): Likewise.
3724 (source_end_java_method): Likewise.
3725 (build_outer_field_access_methods): Likewise.
3726 (build_outer_method_access_method): Likewise.
3727 (maybe_build_thisn_access_method): Likewise.
3728 (build_dot_class_method_invocation): Likewise.
3729 (java_complete_tree): Likewise.
3730 (java_complete_lhs): Likewise.
3731 (do_merge_string_cste): Likewise.
3732 (patch_string_cst): Likewise.
3733 (array_constructor_check_entry): Likewise.
3734 * typeck.c (build_java_array_type): Likewise.
3735 (parse_signature_string): Likewise.
3736 (build_java_signature): Likewise.
f6bbde28 3737
3c1d1e7b
TT
37382000-10-12 Tom Tromey <tromey@cygnus.com>
3739
3740 Fix for PR gcj/356:
3741 * gjavah.c (add_class_decl): Don't special-case inner classes.
3742 (add_namelet): Likewise.
3743
a93eddcf
APB
37442000-10-11 Rodney Brown <RodneyBrown@mynd.com>
3745
3746 * java-tree.h: Constify current_encoding.
3747 * lang.c: Constify current_encoding.
3748
37492000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
3750
3751 * jvgenmain.c (class_mangling_suffix): Omit `.'.
3752 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
3753
37542000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
3755
3756 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
3757 patch. Fixes gcj/340.
3758
2e165c53
TT
37592000-10-10 Tom Tromey <tromey@cygnus.com>
3760
3761 * lex.c (java_new_lexer): Initialize out_first and out_last
3762 fields.
3763 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
3764
c7303e41
APB
37652000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
3766
3767 * parse.y (pop_current_osb): New function.
3768 (array_type:): Use `dims:', changed actions
3769 accordingly. Suggested by Anthony Green.
3770 (array_creation_expression:): Used pop_current_osb.
3771 (cast_expression:): Likewise.
3772 (search_applicable_method_list): Fixed indentation.
3773
37742000-10-08 Anthony Green <green@redhat.com>
3775
3776 * parse.y (array_type_literal): Remove production.
3777 (type_literals): Refer to array_type, not array_type_literal.
3778
29f8b718
APB
37792000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
3780
3781 Patch contributed by Corey Minyard.
3782 * decl.c (check_local_named_variable): New function.
3783 (tree check_local_unnamed_variable): Likewise.
3784 (find_local_variable): Splitted. Call check_local_{un}named_variable.
3785
7fd9a516
AG
37862000-10-07 Anthony Green <green@redhat.com>
3787
3788 * class.c (layout_class): Handle case where superclass can't be
3789 layed out yet.
3790
20d431c9
JM
37912000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
3792
3793 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
3794 gperf.
3795
e0a0c416
TT
37962000-10-05 Tom Tromey <tromey@cygnus.com>
3797
3798 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
3799 * jvgenmain.c (class_mangling_prefix): Removed.
3800 (class_mangling_suffix): New global.
3801 (main): Use it.
3802 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
3803 `$'.
3804 (print_method_info): Handle overrides for static and final
3805 methods.
3806 (process_file): Generate declaration for class object field.
3807 * class.c (cxx_keywords): New array.
3808 (utf8_cmp): New function.
3809 (cxx_keyword_p): New function.
3810 (layout_class_method): Mangle C++ keywords by appending `$'.
3811 (mangle_field): New function.
3812 (mangle_class_field): Use mangle_field. Mangle class name as
3813 `class$'.
3814 (mangle_static_field): Use mangle_field.
3815
6e22695a
APB
3816Tue Oct 3 13:44:37 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
3817
3818 * decl.c (find_local_variable): Removed uncessary type check and
3819 fixed range check typo. From Corey Minyard.
3820
3821Wed Sep 13 16:06:52 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
3822
3823 * decl.c (give_name_to_locals): New local `code_offset'. Call
e64c46ce 3824 `maybe_adjust_start_pc'.
6e22695a
APB
3825 * expr.c (note_instructions): New function.
3826 (expand_byte_code): Don't collect insn starts here.
3827 (peek_opcode_at_pc): New function.
3828 (maybe_adjust_start_pc): Likewise.
3829 * java-tree.h (maybe_adjust_start_pc): Declare.
3830 (note_instructions): Likewise.
dba41d30 3831 * jcf-parse.c (parse_class_file): Call `note_instructions'.
6e22695a
APB
3832
3833Wed Sep 13 11:50:35 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
3834
3835 * parse.y (field_access:): Fixed indentation.
3836 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
3837
7e51098e
TT
38382000-09-07 Tom Tromey <tromey@cygnus.com>
3839
3840 Fix for PR gcj/307:
3841 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
3842 JPRIMITIVE_TYPE_P, for arithmetic operators.
3843 (patch_method_invocation): Indentation fix.
3844 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
3845 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
3846 (do_unary_numeric_promotion): Cleaned up code.
3847 (valid_cast_to_p): Handle boolean correctly.
3848
5beededc
TT
38492000-09-27 Tom Tromey <tromey@cygnus.com>
3850
3851 * lex.c (java_read_unicode): Reset bs_count when finished with
3852 `\u' sequence.
3853
f15b9af9
MM
38542000-10-01 Mark Mitchell <mark@codesourcery.com>
3855
3856 Convert to GC.
3857 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
3858 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
3859 (typeck.o): Depend on ggc.h.
3860 * class.c (add_method_1): Use GC functions for allocation.
3861 (init_class_processing): Register roots.
3862 * decl.c (ggc_p): Set to 1.
3863 (pending_local_decls): Make it static.
3864 (push_jvm_slot): Use GC functions for allocation.
3865 (init_decl_processing): Register roots.
3866 (give_name_to_locals): Use GC functions for allocation.
3867 (lang_mark_tree): New function.
3868 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
3869 functions for allocation.
3870 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
3871 * lex.c (java_lex): Use build_string, rather than replicating it
3872 inline.
3873 * parse.y (goal): Add more roots.
3874 (mark_parser_ctxt): New function.
3875 * typeck.c: Include ggc.h.
f6bbde28 3876
99eaf8d4
APB
38772000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
3878
3879 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
3880 contains something else than MODIFY_EXPR.
3881
19e223db
MM
38822000-09-23 Mark Mitchell <mark@codesourcery.com>
3883
3884 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
3885 * Makefile.in (parse.o): Depend on ggc.h.
3886 (class.o): Likewise.
3887 (constants.o): Likewise.
3888 (decl.o): Likewise.
3889 (expr.o): Likewise.
3890 (jcf-parse.o): Likewise.
3891 (jcf-write.o): Likewise.
3892 (mangle.o): Likewise.
3893 * class.c: Include ggc.h.
3894 (build_static_field_ref): Register GC roots.
3895 (layout_class): Likewise.
3896 (init_class_processing): Likewise.
3897 * constants.c: Include ggc.h.
3898 (current_constant_pool_data_ref): Remove.
3899 (tag_nodes): Move it to ...
3900 (get_tag_node): ... here. Register GC roots.
3901 * decl.c: Include ggc.h. Remove many global tree definitions.
3902 (throw_node): Define.
3903 (java_global_trees): Likewise.
3904 (predef_filenames): Make the size a constant.
3905 (init_decl_processing): Adjust accordingly.
3906 (init_decl_processing): Call init_jcf_parse. Register GC roots.
3907 * expr.c: Include ggc.h.
3908 (init_expr_processing): Register GC roots.
3909 (build_invokeinterface): Likewise.
3910 * java-tree.h: Replace extern tree declarations with macros.
3911 (java_global_trees): New variable.
3912 (java_tree_index): New enumeration.
3913 (init_jcf_parse): Declare.
3914 * jcf-parse.c: Include ggc.h.
3915 (current_class): Remove declaration.
3916 (main_class): Likewise.
3917 (all_class_list): Likewise.
3918 (predefined_filename_p): Adjust for constant size of
3919 predef_filenames.
3920 (init_jcf_parse): New function.
3921 * jcf-write.c: Include ggc.h.
3922 (generate_classfile): Register GC roots.
3923 (append_synthetic_attribute): Likewise.
3924 (append_innerclass_attribute_entry): Likewise.
3925 * lang.c: Include ggc.h.
3926 (lang_print_error): Register GC roots.
3927 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
3928 with macros.
3929 * parse.y: Include ggc.h.
3930 (wfl_operator): Remove.
3931 (goal): Register GC roots.
3932 (java_pop_parser_context): Adjust for new field names.
3933 (java_parser_context_save_global): Likewse.
3934 (java_parser_context_restore_global): Likewise.
3935 (java_parser_context_suspend): Likewise.
3936 (java_parser_context_resume): Likewise.
3937 (verify_constructor_circularity): Register GC roots.
3938 (lookup_cl): Likewise.
3939 (java_reorder_fields): Likewise.
3940 (build_current_this): Likewise.
3941 (class_in_current_package): Likewise.
3942 (argument_types_convertible): Likewise.
3943 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
f6bbde28 3944
4c4b521a
TT
39452000-09-14 Tom Tromey <tromey@cygnus.com>
3946
3947 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
3948
6b8a24cd
TT
39492000-09-13 Tom Tromey <tromey@cygnus.com>
3950
3951 * jcf-parse.c: Include <locale.h>.
3952 * jv-scan.c: Include <locale.h>.
3953
86e4b1e4
TT
39542000-09-12 Tom Tromey <tromey@cygnus.com>
3955
3956 * expr.c (pop_type_0): Return `Object' if trying to merge two
3957 interface types.
3958 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
3959 interface types; `Object' is always a valid supertype.
3960
d19cbcb5
TT
39612000-09-12 Tom Tromey <tromey@cygnus.com>
3962
3963 Fix for PR gcj/33:
3964 * jv-scan.c (help): Document --encoding.
3965 (options): Added `encoding' entry.
3966 (OPT_ENCODING): New define.
3967 (main): Handle --encoding.
3968 Include <langinfo.h> if nl_langinfo exists.
3969 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
3970 --encoding.
3971 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
3972 (parse_source_file): Correctly call java_init_lex. Added `finput'
3973 argument. Use nl_langinfo to determine default encoding.
3974 * java-tree.h (current_encoding): Declare.
3975 * parse.y (java_parser_context_restore_global): Don't restore
3976 `finput'.
3977 (java_parser_context_save_global): Don't set `finput' field.
3978 (java_pop_parser_context): Don't restore `finput'. Free old lexer
3979 if required.
3980 * lang.c (current_encoding): New global.
3981 (lang_decode_option): Recognize `-fencoding='.
3982 (finish_parse): Don't close finput.
3983 * parse.h (struct parser_ctxt): Removed `finput' and
3984 `unget_utf8_value' fields. Added `lexer' field.
3985 (java_init_lex): Fixed declaration.
3986 * lex.c (java_new_lexer): New function.
3987 (java_destroy_lexer): Likewise.
3988 (java_read_char): Added `lex' argument. Handle iconv case.
3989 (java_read_unicode): Added `lex' argument. Count backslashes in
3990 lexer structure.
3991 (java_init_lex): Added `finput' and `encoding' arguments. Set
3992 `lexer' field in ctxp.
3993 (BAD_UTF8_VALUE): Removed.
3994 (java_lex): Handle seeing UEOF in the middle of a string literal.
3995 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
3996 (java_lexer): New structure.
3997 (UNGETC): Removed.
3998 (GETC): Removed.
3999 (DEFAULT_ENCODING): New define.
4000 (java_destroy_lexer): Declare.
4001
ee17a290
TT
40022000-09-12 Tom Tromey <tromey@cygnus.com>
4003
4004 Fix for PR gcj/343:
4005 * lex.c (java_init_lex): Initialize java_io_serializable.
4006 * parse.y (java_io_serializable): New global.
4007 (valid_ref_assignconv_cast_p): An array can be cast to
4008 serializable.
4009
d8ea8f28
ZW
40102000-09-10 Zack Weinberg <zack@wolery.cumb.org>
4011
4012 * decl.c, expr.c: Include defaults.h if not already included.
4013 Don't define the *_TYPE_SIZE macros.
4014
0caae6dd
GK
40152000-09-09 Geoffrey Keating <geoffk@cygnus.com>
4016
4017 * typeck.c (build_java_array_type): Correct first parameter
4018 in ADJUST_FIELD_ALIGN invocation.
4019
f0bee8b3
TT
40202000-09-06 Tom Tromey <tromey@cygnus.com>
4021
4022 * lang-specs.h: Also recognize `-femit-class-files'.
4023
3e99f50c
APB
40242000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
4025
4026 * verify.c (merge_types): Load the types to merge if necessary.
4027
3ca8c9ae
AG
40282000-09-02 Anthony Green <green@redhat.com>
4029
4030 * jcf-io.c: Include zlib.h.
4031 (open_in_zip): Read compressed class file archives.
4032 * zipfile.h (ZipDirectory): Add uncompressed_size and
4033 compression_method fields.
4034 * zextract.c (read_zip_archive): Collect file compression info.
4035
e1d565ab
BM
40362000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
4037
f6bbde28 4038 * parse.y (do_resolve_class): Also explore superclasses of
e1d565ab
BM
4039 intermediate enclosing contexts when searching for inner classes.
4040
29f8b718
APB
40412000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
4042
4043 * parse.y (variable_declarator_id:): Better error message.
4044 (expression_statement:): Use YYNOT_TWICE.
4045 (cast_expression:): Likewise.
4046 (assignment:): Likewise.
4047
354e99ce
APB
40482000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
4049
4050 * parse.y (do_merge_string_cste): New locals. Create new
4051 STRING_CSTs each time, use memcpy. Fixes gcj/311.
4052
7c097ee9
HB
40532000-08-07 Hans Boehm <boehm@acm.org>
4054
4055 * boehm.c (mark_reference_fields): Set marking bits for all words in
4056 a multiple-word record.
4057 (get_boehm_type_descriptor): Use the procedure marking descriptor for
4058 java.lang.Class.
f6bbde28 4059
3d919a0e
MS
40602000-08-31 Mike Stump <mrs@wrs.com>
4061
4062 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
4063 jcf-dump$(exeext)): Make parallel safe.
4064
63ad61ed
ZW
40652000-08-29 Zack Weinberg <zack@wolery.cumb.org>
4066
4067 * jcf-parse.c (set_source_filename): Constify a char *.
4068 * jcf-write.c (append_innerclasses_attribute,
4069 make_class_file_name): Constify a char *. Don't recycle a
4070 variable for an unrelated purpose.
4071 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
4072 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
4073
c00f0fb2
APB
40742000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
4075
4076 * expr.c (can_widen_reference_to): Fixed indentation.
4077 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
4078 * parse.y: `finit$' replaces `$finit$' in comments.
4079 (try_builtin_assignconv): Fixed leading comment.
4080
94574545
GM
40812000-08-25 Greg McGary <greg@mcgary.org>
4082
4083 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
4084
6e2aa220
GM
40852000-08-24 Greg McGary <greg@mcgary.org>
4086
4087 * lang.c (lang_decode_option): Use ARRAY_SIZE.
4088 * parse.y (BINOP_LOOKUP): Likewise.
4089
9b1ee05b
AH
40902000-08-22 Andrew Haley <aph@cygnus.com>
4091
4092 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
4093 sign extending. Fixes gcj/321.
4094 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
4095 combining to make a jlong. Fixes gcj/321.
4096
05a3d06e 40972000-08-21 Nix <nix@esperi.demon.co.uk>
f6bbde28 4098
05a3d06e
N
4099 * lang-specs.h: Do not process -o or run the assembler if
4100 -fsyntax-only.
4101
65f69237
AH
41022000-08-16 Andrew Haley <aph@cygnus.com>
4103
4104 * typeck.c (build_java_array_type): Rewrite code to do array
4105 alignment. Take into account back-end macros when aligning array
4106 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
4107 user to set alignment. Fixes gcj/252 and 160.
4108
2e0f0aff
TT
41092000-08-09 Tom Tromey <tromey@cygnus.com>
4110
1175b9b4
TT
4111 * parse.y (check_abstract_method_definitions): Now return `int'.
4112 Check implemented interfaces. Fixes PR gcj/305.
4113
2e0f0aff
TT
4114 * parse.y (patch_switch_statement): Disallow `long' in switch
4115 expressions. Fixes PR gcj/310.
4116
25bdcbc5
APB
41172000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
4118
4119 * decl.c (finit_leg_identifier_node): New global.
4120 (init_decl_processing): Use `finit$' to initialize
4121 finit_identifier_node. Use `$finit$' to initialize
4122 finit_leg_identifier_node.
4123 * expr.c (expand_java_field_op): Use ID_FINIT_P.
4124 * java-tree.h (finit_identifier_node): Changed attached comment.
4125 (finit_leg_identifier_node): New declaration.
4126 (ID_FINIT_P): Take finit_identifier_node and
4127 finit_leg_identifier_node into account. This is a backward
4128 compatibility hack.
4129
81baa09a
APB
41302000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
4131
4132 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
4133 Jan 6 2000 patch.
4134 (generate_bytecode_insns): Check `nargs' before emitting it.
4135 * verify.c (merge_type_state): Fixed typo.
4136 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
4137 generate_bytecode_{conditional,insns}.
4138
458530ee
AG
4139Sun Aug 13 09:41:49 2000 Anthony Green <green@redhat.com>
4140
4141 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
4142 for -pg builds).
4143
34d4df06
APB
41442000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
4145
4146 * class.c (maybe_layout_super_class): Fixed indentation.
4147 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
4148 (java_check_methods): New function declaration.
4149 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
4150 instead of `str_ptr'.
4151 * jcf-write.c (generate_bytecode_insns): Emit number the of args
4152 of a `invokeinterface' at the right time.
4153 * parse.h (WFL_STRIP_BRACKET): New macro.
4154 (SET_TYPE_FOR_RESOLUTION): Use it.
dba41d30 4155 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
34d4df06
APB
4156 (check_class_interface_creation): Don't check for cross package
4157 innerclass name clashes.
dba41d30 4158 (method_header): Behave properly if MDECL is `error_mark_node'.
34d4df06
APB
4159 (method_declarator): Return `error_mark_node' if bogus current
4160 class.
4161 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
4162 (resolve_and_layout): New local `decl_type', set and used. Call
4163 java_check_methods.
4164 (java_check_methods): New method.
4165 (java_layout_classes): Use it.
4166 (resolve_qualified_expression_name): No EH check necessary in
4167 access$<n>.
4168 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
4169 `case' statement.
4170 (patch_assignment): Set DECL_INITIAL on integral final local.
4171
5f1c312a
APB
41722000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
4173
4174 * java-tree.h (flag_extraneous_semicolon): New extern.
4175 * lang-options.h: (-Wextraneous-semicolon): New option.
4176 * lang.c (flag_redundant): Fixed typo in leading comment.
4177 (flag_extraneous_semicolon): New global.
4178 (lang_decode_option): Set `flag_extraneous_semicolon' when
4179 -Wall. Decode `-Wextraneous-semicolon'.
4180 * parse.y (type_declaration:): Removed `SC_TK' hack, added
4181 `empty_statement' rule.
4182 (class_body_declaration): Likewise.
4183 (method_body:): Accept `;' as a method body.
4184 (static_initializer:): Removed `SC_TK' hack.
4185 (constructor_block_end:): Likewise.
4186 (empty_statement:): Report deprecated empty declaration. Fixes
4187 gcj/295
4188
25bdcbc5 41892000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
f0f3a777
APB
4190
4191 * parse.y (build_dot_class_method_invocation): Changed parameter
dba41d30 4192 name to `type'. Build signature from `type' and convert it to a
f0f3a777
APB
4193 STRING_CST if it's an array.
4194 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
4195 to use `ref_type' directly.
4196
64c04091
OP
4197Sun Aug 6 00:47:24 2000 Ovidiu Predescu <ovidiu@cup.hp.com>
4198
4199 * lang-options.h: Added a comma after the last element to avoid
4200 syntax errors when other languages define additional options.
4201
a36556a8
ZW
42022000-08-04 Zack Weinberg <zack@wolery.cumb.org>
4203
4204 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
4205 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
4206 (jc1): Link with $(BACKEND).
4207 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
4208
50e60bc3
ZW
42092000-08-02 Zack Weinberg <zack@wolery.cumb.org>
4210
37620334
ZW
4211 * jvspec.c: Adjust type of second argument to
4212 lang_specific_driver, and update code as necessary.
4213
50e60bc3
ZW
4214 * class.c (build_dtable_decl): Initialize dummy.
4215
f0f3a777
APB
42162000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4217
4218 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
4219 method bodies not to rule out discarding `<clinit>'; don't use
4220 <clinit> to initialize static fields with constant initializers.
4221
42222000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4223
4224 * gjavah.c (print_method_info): Added `synth' parameter. Skip
4225 synthetic methods.
4226 (method_synthetic): New global.
4227 (HANDLE_METHOD): Recognize synthetic method and tell
4228 `print_method_info' about it.
4229 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
4230 processing a synthetic method.
4231 * jcf-reader.c (skip_attribute): New function.
4232 ( skip_attribute): Likewise.
4233
42342000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4235
4236 * parse.y (build_outer_field_access): Fixed comments.
4237 (fix_constructors): Emit the initialization of this$<n> before
4238 calling $finit$.
4239 (resolve_qualified_expression_name): Build an access to `decl' if
4240 necessary.
4241
42422000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
4243
4244 * parse-scan.y (curent_class): Non longer const.
4245 (inner_qualifier, inner_qualifier_length): Deleted.
4246 (current_class_length): New global.
4247 (bracket_count): Fixed typo in leading comment.
4248 (anonymous_count): New global.
4249 (class_instance_creation_expression:): Handle anonymous classes.
4250 (anonymous_class_creation:): New rule.
4251 (push_class_context): Rewritten.
4252 (pop_class_context): Likewise.
4253 (INNER_QUALIFIER): Macro deleted.
4254 (report_class_declaration): call `push_class_context' when
4255 entering the function. `fprintf' format modified not to use
4256 INNER_QUALIFIER.
4257 (report_class_declaration): Assign `package_name' and
a83f01f0 4258 `current_class' to NULL separately.
f0f3a777
APB
4259
42602000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
4261
4262 * expr.c (build_invokeinterface): Call layout_class_methods on
4263 target interface.
4264
13107ec0 42652000-07-27 Tom Tromey <tromey@cygnus.com>
f6bbde28 4266 Anthony Green <green@cygnus.com>
13107ec0
TT
4267 Alexandre Petit-Bianco <apbianco@cygnus.com>
4268
4269 * class.c (make_class_data): Create vtable for abstract classes.
4270 (get_dispatch_table): Changed to cope with abstract classes.
4271
da632f2c
APB
42722000-07-27 Tom Tromey <tromey@cygnus.com>
4273
4274 * parse.y (patch_method_invocation): Don't reverse the argument
4275 list when dealing with anonymous class constructors. Fixed typo in
4276 comment.
4277
42782000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
4279
4280 * parse.y (build_alias_initializer_parameter_list): Reverse
4281 crafted list when building aliases for anonymous class
4282 constructors.
4283
1e12ab9b
APB
42842000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
4285
4286 * parse.y (jdep_resolve_class): Don't bother checking potential
4287 innerclass access if `decl' is NULL.
4288 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
4289 WFL.
4290
4c31fe99
APB
42912000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
4292
4293 * parse.c: Remove (again.)
4294
1e12ab9b
APB
42952000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
4296
4297 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
4298 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
4299 outside the `if' statement, alias to innerclass removed, `decl'
4300 used to mark the class complete.
4301
f4530f43
APB
43022000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
4303
4304 * parse.y (simple_name:): Fixed typo in error message.
4305
e7c7bcef
APB
43062000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
4307
4308 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
4309 or its first operand can be error marks.
4310
43112000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
4312
4313 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
4314 * parse.y (method_header): Likewise.
4315
02ae6e2e
APB
43162000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
4317
4318 * parse.y (process_imports): Consider that one might be trying to
4319 import an innerclass. Fixes gcj/254
4320
e7c7bcef
APB
43212000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
4322
4323 * parse.y (find_as_inner_class): Handle the case where the
4324 enclosing context of an innerclass has been loaded as bytecode.
4325
4142b247
APB
43262000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
4327
f6bbde28 4328 * parse.y (simple_name:): Reject `$' in type names.
4142b247
APB
4329 (resolve_type_during_patch): Use `type' as a second
4330 argument to resolve_no_layout. Fixes gcj/257.
4331
cab8e2bd
BM
43322000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
4333
f6bbde28 4334 * parse.y (find_most_specific_methods_list): Select the only
cab8e2bd
BM
4335 non-abstract method even if max has been set.
4336 Fixes gcj/285, gcj/298.
4337
ca2875c4
JS
43382000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
4339
4340 * lang-specs.h: Added %(jc1) to java compiler options.
4341
bfbbc080
ZW
43422000-07-14 Zack Weinberg <zack@wolery.cumb.org>
4343
4344 * .cvsignore: New file.
4345
11b26d72
APB
43462000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
4347
4348 * parse.y (not_accessible_p): Access granted to innerclasses
4349 (indirectly) extending the reference type. Fixes gcj/249.
4350
43512000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
4352
4353 * parse.y (patch_method_invocation): Fixed comment.
4354 (maybe_use_access_method): Build this$<n>s to the context of the
4355 target method, or a type that extends it. Fixes gcj/242.
4356
649c9142
MM
43572000-07-13 Mark Mitchell <mark@codesourcery.com>
4358
4359 * parse.c: Remove.
4360
ee97d354
APB
43612000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
4362
4363 * parse.y (fold_constant_for_init): Avoid bullish conversion.
4364
44fadf1e
TT
43652000-07-13 Tom Tromey <tromey@cygnus.com>
4366
4367 * lang-specs.h: Added %{I*}.
4368
ea414c97
ZW
43692000-07-13 Zack Weinberg <zack@wolery.cumb.org>
4370
4371 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
4372
792abd35
MM
43732000-07-12 Mark Mitchell <mark@codesourcery.com>
4374
4375 * parse-scan.c: Remove.
4376
11b26d72
APB
43772000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
4378
4379 * class.c (set_super_info): Handled protected inner classes.
4380 (common_enclosing_context_p): Bail early if arguments aren't both
4381 inner classes.
4382 (get_access_flags_from_decl): Handle private and protected inner
4383 classes.
4384 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
4385 (CLASS_PROTECTED): Likewise.
dba41d30 4386 (struct lang_type): New bitfield `poic'.
11b26d72
APB
4387 * parse.y (jdep_resolve_class): Call check_inner_class_access on
4388 inner classes only.
4389 (check_inner_class_access): Renamed arguments, added
4390 comments. Handles protected inner classes (fixes gcj/225)
4391 (not_accessible_p): Fixed comments. Avoid handling inner classes.
4392
43932000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
4394
4395 * parse.y (resolve_qualified_expression_name): Verify qualified
dba41d30 4396 access to `this'. Fixes gcj/239.
11b26d72 4397
e67eb1a0 43982000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
2f2bd00a 4399
e67eb1a0
APB
4400 * jcf-write.c (generate_classfile): Don't install ConstantValue
4401 for null pointers.
2f2bd00a 4402
11b26d72
APB
44032000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
4404
4405 * parse.y (resolve_qualified_expression_name): Handle inner class
4406 access. Fixes gcj/256.
4407
629d4b4d
APB
44082000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
4409
4410 * jcf-write.c (generate_classfile): Properly install the
4411 ConstantValue attribute and the initial value constant pool index
4412 on string constants.
4413 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
4414 class files.
4415
0c2b8145
APB
44162000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
4417
4418 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
4419 construct.
4420 * parse.y (find_as_inner_class): Fixed typo.
4421 (do_resolve_class): Explore enclosing contexts when searching for
4422 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
4423 (check_inner_class_access): Check `decl' which can be null in case
4424 of previous errors.
4425
44262000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
4427
dba41d30 4428 * java-tree.h (java_debug_context): Declared `extern'.
0c2b8145
APB
4429 (safe_layout_class): Likewise.
4430 * parse.y (resolve_field_access): Field must be `static' in order
4431 to be replaced by its initial value. Added comments.
4432 (find_applicable_accessible_methods_list): Fixed typo.
4433 (find_most_specific_methods_list): Methods found in innerclasses
4434 take over methods founds in the enclosing contexts.
4435 (java_complete_tree): Loosen restrictions on the type of DECLs
4436 that can be replaced by their initialization values.
dba41d30 4437 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
0c2b8145 4438
0267da64
TT
44392000-07-05 Tom Tromey <tromey@cygnus.com>
4440
4441 * Make-lang.in (PARSE_DIR): New macro.
4442 (PARSE_RELDIR): Likewise.
4443 (PARSE_C): Likewise.
4444 (PARSE_SCAN_C): Likewise.
4445 ($(PARSE_C)): New target.
4446 ($(PARSE_SCAN_C)): Likewise.
4447 (SET_BISON): New macro.
4448 (BISONFLAGS): Likewise.
4449 (JAVABISONFLAGS): Likewise.
4450
1bbee75b
BM
44512000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
4452
f6bbde28
ZW
4453 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
4454 argument on the first pass for CNI as well as JNI.
4455 (print_method_info): Set up method name on the first pass only.
4456
98a52c2c
APB
44572000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4458
4459 * parse.y (parser_qualified_classname): Removed parameter
4460 `is_static'.
4461 (create_interface): Removed first passed parameter to
4462 parser_qualified_classname.
4463 (create_class): Likewise. Don't install alias on static
4464 innerclasses. Fixes gcj/275.
4465
44662000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4467
4468 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
4469 debugable statement with empty_stmt_node. Fixes gcj/272
4470
44712000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4472
4473 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
4474 gcj/271.
4475
c1c8f8cc
APB
44762000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
4477
4478 * jcf-write.c (push_long_const): Appropriately cast short negative
4479 constant to jword.
4480
cf1b2274
APB
44812000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
4482
4483 * parse.y (verify_constructor_super): Use loop variable
4484 `m_arg_type' initialized with `mdecl_arg_type'.
4485
6eaeeb55
TT
44862000-06-29 Tom Tromey <tromey@cygnus.com>
4487
4488 * parse.y (resolve_field_access): Handle case where `type_found'
4489 is NULL.
4490
18ee3d5e
APB
44912000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
4492
4493 * expr.c (lookup_field): The same field can be found through two
4494 different interface. Don't declare it ambiguous in that case.
4495
61d5c158
TT
44962000-06-27 Tom Tromey <tromey@cygnus.com>
4497
4498 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
4499 follows \r, then unget it at a lower level.
4500
70541f45
TT
45012000-06-26 Tom Tromey <tromey@cygnus.com>
4502
4503 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
4504 java_complete_tree.
4505
774d2baf
TT
45062000-06-25 Tom Tromey <tromey@cygnus.com>
4507
4508 * parse.y (for_statement): Wrap expression in a WFL if it is a
4509 constant. For PR gcj/268.
4510
d6baf6f5
APB
45112000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
4512
4513 * parse.y (do_resolve_class): Minor optimiztion in the package
17126208 4514 list search. Removed unnecessary test and return statement.
d6baf6f5
APB
4515 (valid_ref_assignconv_cast_p): Order of arguments to
4516 enclosing_context_p fixed.
4517
120f0c10
TT
45182000-06-24 Tom Tromey <tromey@cygnus.com>
4519
ae4a4c88
TT
4520 * expr.c (lookup_field): Print error and return error_mark_node if
4521 field reference is ambiguous.
4522
120f0c10
TT
4523 * parse.y (check_abstract_method_definitions): Also check if
4524 `other_method' is abstract.
4525
cf1748bf
APB
45262000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
4527
4528 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
4529 classes.
4530 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
dba41d30 4531 (struct lang_type): New field `pic'.
cf1748bf
APB
4532 (CLASS_PRIVATE): New macro.
4533 * parse.y (check_inner_class_access): New function.
4534 (jdep_resolve_class): Call it.
4535
f1ff439a
TT
45362000-06-23 Tom Tromey <tromey@cygnus.com>
4537
4538 * parse.y (patch_incomplete_class_ref): Initialize the returned
4539 class. For PR gcj/260.
4540
9a7ab4b3
APB
45412000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
4542
4543 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
4544
45452000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
4546
4547 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
4548 Java specific checks.
4549 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
4550 screened by DECL_P.
4551 * java-tree.def (CASE_EXPR): Marked 'e'.
4552 (DEFAULT_EXPR): Likewise.
4553 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
4554 screened by DECL_P.
4555 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
4556 Java specific checks.
4557 (generate_bytecode_insns): Test try_block for BLOCK before using
4558 BLOCK_EXPR_BODY.
4559 * parse.y (build_wfl_wrap): Added `location' argument. Set
4560 EXPR_WFL_LINECOL accordingly.
4561 (dim_expr:): Wrap constants with WFLs.
4562 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
4563 (resolve_package): Check for `stmt' not being a BLOCK before
4564 building a debuggable statement with it.
4565 (make_qualified_primary): Added extra parameter to build_wfl_wrap
4566 invocation.
4567 (resolve_field_access): Make sure `decl' is a DECL before treating
4568 it as such.
4569 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
4570 IDENTIFIER_NODE before treating it as such.
4571 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
4572 treating it as such.
4573 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
4574 to be applied only on non array types.
4575
45762000-06-16 Per Bothner <per@bothner.com>
4577
4578 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
4579 define in terms of DECL_RESULT, as that fails when --enable-checking.
f6bbde28 4580
ffb1f63d
KG
45812000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4582
4583 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
4584 types the same in comparison.
4585 (CHECK_OP): Add static prototype.
4586
11cf4d18
JJ
45872000-06-13 Jakub Jelinek <jakub@redhat.com>
4588
4589 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
4590 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
4591 * parse.c: Rebuilt.
4592
5ac9118e
KG
45932000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4594
4595 * decl.c (create_primitive_vtable): Prototype.
4596
4597 * jcf-write.c (generate_bytecode_insns): Initialize variable
4598 `saved_context'.
4599
4600 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
4601
ad69b5b6
BM
46022000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
4603
4604 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
4605 to track searched classes, and do not search the same class more than
4606 once. Call find_applicable_accessible_methods_list on immediate
4607 superclass, instead of search_applicable_method_list on all ancestors.
4608 Fix for PR gcj/238.
4609
cf1748bf
APB
46102000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
4611
4612 * parse.y (register_fields): Permit static fields in inner classes
4613 if they are final. Fix for PR gcj/255.
4614
9a7ab4b3
APB
46152000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
4616
4617 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
4618 * parse.y (find_in_imports): Returned type changed to void,
4619 leading comment fixed.
4620 (register_package): New function.
4621 (qualify_and_find): Likewise.
4622 (package_declaration:): Use `register_package'.
4623 (single_type_import_declaration:): Removed local variable
4624 `node'. Added missing `;' for consistency.
4625 (type_import_on_demand_declaration:): Use `chainon' to link new
4626 entries.
4627 (lookup_field_wrapper): Lookup local variables defined in outer
4628 contexts first.
4629 (java_complete_class): Don't reverse the list of imported on demand.
4630 (do_resolve_class): Reorganized. Removed local variable
4631 `original_name'. Call `qualify_and_find' with the current package
4632 name, invoke `find_in_imports_on_demand' right after. Call
4633 `qualify_and_find' with the packages we've seen so far. Fixed
4634 operations numbering in comments.
4635 (java_expand_class): Don't reverse `package_list'.
4636 (find_most_specific_methods_list): New local variables `abstract'
4637 and `candidates'. Use them to pick the right method.
4638
14d075d8
TT
4639Tue Jun 6 11:39:05 2000 Tom Tromey <tromey@ferrule.cygnus.com>
4640
4641 * parse.y (check_modifiers_consistency): Don't subtract out
4642 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
4643
603832a0
PT
46442000-06-04 Philipp Thomas <pthomas@suse.de>
4645
4646 * Makefile.in (INTLLIBS): New.
4647 (LIBS): Add above.
4648 (DEPLIBS): Ditto.
4649
8f975c18
APB
4650Fri Jun 2 16:48:55 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
4651
4652 * class.c (get_dispatch_table): Build the vtable dummy entry list
e64c46ce 4653 element with a null purpose. Fixed leading comment.
8f975c18 4654 (build_dtable_decl): Build an accurate dtable type when appropriate
e64c46ce 4655 and use it.
8f975c18 4656
2e761e49
RH
46572000-06-02 Richard Henderson <rth@cygnus.com>
4658
4659 * lang.c (lang_get_alias_set): New.
4660
0f145be8
APB
46612000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
4662
4663 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
4664 before using it as the accessed field.
4665
2771fe54
TT
46662000-05-31 Tom Tromey <tromey@cygnus.com>
4667
4668 * java-tree.h (boolean_array_vtable, byte_array_vtable,
4669 char_array_vtable, short_array_vtable, int_array_vtable,
4670 long_array_vtable, float_array_vtable, double_array_vtable):
4671 Declare.
4672 * expr.c (get_primitive_array_vtable): New function.
4673 (create_primitive_vtable): New function.
4674 (java_lang_expand_expr): Enable code to statically generate
4675 arrays.
4676 * decl.c (init_decl_processing): Create primitive vtables.
4677 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
4678 short_array_vtable, int_array_vtable, long_array_vtable,
4679 float_array_vtable, double_array_vtable): Define.
4680
30a3caef
ZW
46812000-05-26 Zack Weinberg <zack@wolery.cumb.org>
4682
4683 * java/parse.y (find_applicable_accessible_methods_list):
4684 Don't add an uninitialized value to the list.
4685
b8c5b1c6
TT
46862000-05-25 Tom Tromey <tromey@cygnus.com>
4687
40aaba2b
TT
4688 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
4689 when trying to see if field's class should be initialized. Always
4690 initialize field's declaring class, not qualified class.
4691 For PR gcj/162.
4692
b8c5b1c6
TT
4693 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
4694 `wfl_operator', to maybe_build_primttype_type_ref.
4695 Fixes PR gcj/235.
4696
6518c7b5
BM
46972000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
4698
4699 * parse.y (patch_method_invocation): Don't try to lookup methods
4700 in primitive types.
4701
611a4b87
APB
47022000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
4703
4704 * parse.y (resolve_field_access): Call the appropriate <clinit>
4705 before accessing the length of a static array. Craft a decl for
4706 the field while its time. Fixes PR gcj/129.
f6bbde28 4707
6b48deee
APB
47082000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
4709
4710 * parse.y (resolve_package): Correctly set `*next' (was off by
4711 one.)
4712 (resolve_qualified_expression_name): Fixed comment.
4713
0ba154aa
APB
4714Thu Apr 27 17:47:34 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
4715
f6bbde28 4716 * jcf-parse.c (jcf_parse_source): Reset current_class and
e64c46ce 4717 current_function_decl to NULL before parsing a new file.
0ba154aa 4718
c280e37a
APB
4719Thu Apr 27 17:25:33 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
4720
4721 * parse.y (block_end:): If the collected block doesn't feature a
e64c46ce 4722 statement, insert an empty statement.
c280e37a 4723
92d83515
APB
47242000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
4725
f6bbde28
ZW
4726 * parse.y (maybe_yank_clinit): New function.
4727 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
4728 end of the list of methods belonging to a class.
4729 (java_complete_expand_method): Check whether <clinit> is really
4730 necessary and expand it accordingly.
92d83515 4731
ec5bb3cf
APB
47322000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
4733
4734 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
4735 processed by the method's switch statement.
4736
67db0ce7
TT
47372000-05-19 Tom Tromey <tromey@cygnus.com>
4738
4739 * java-tree.h: Added init state enum.
4740 * decl.c (emit_init_test_initialization): Initialize class
4741 initialization check variable by looking at class' state.
4742
43490bec
TT
47432000-05-19 Tom Tromey <tromey@cygnus.com>
4744
4745 * java-tree.h (build_instanceof): Declare.
4746 (build_get_class): Declare.
4747 * parse.y (patch_binop): Use build_instanceof.
4748 * expr.c (build_instanceof): New function. If class is final,
4749 don't make a function call.
4750 (expand_java_INSTANCEOF): Use it.
4751 (build_get_class): New function.
4752
062edaed
AO
47532000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
4754
4755 * jcf-write.c (generate_classfile): Scan the source_file for
4756 slashes with the right pointer variable.
4757
078721e1
AC
4758Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
4759
4760 * lang.c (lang_decode_option): Update -Wunused flags by calling
e64c46ce 4761 set_Wunused.
078721e1
AC
4762 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
4763
46543024 47642000-05-09 Zack Weinberg <zack@wolery.cumb.org>
3b304f5b
ZW
4765
4766 * check_init.c (check_init): Constify local char *.
4767 * class.c (push_class): Constify local char *.
4768 * java_tree.h: Update prototypes.
4769 * jcf-io.c (open_class): Constify filename parameter and
4770 return value.
4771 (find_class): Remove redundant string copy. Cast return from
4772 open_class.
4773 * jcf-parse.c (read_class, parse_class_file, yyparse):
4774 Constify local char *.
4775 * jcf-write.c (generate_bytecode_insns, generate_classfile):
4776 Constify local char *.
4777 * jcf.h (JCF): Constify filename and classname.
4778 (JCF_FINISH): Cast args to FREE to char * when appropriate.
4779 * lang.c (init_parse): Constify parameter and return value.
4780 * lex.c (java_get_line_col): Constify filename parameter.
4781 * parse.h: Constify parser_ctxt.filename. Update prototypes.
4782 * parse.y (java_parser_context_suspend,
4783 issue_warning_error_from_context, safe_layout_class): Constify
4784 local char *.
4785 * parse.c: Regenerate.
4786
4c6a8973
TT
47872000-05-08 Tom Tromey <tromey@cygnus.com>
4788
4789 * expr.c (build_jni_stub): Cache the result of
4790 _Jv_LookupJNIMethod.
4791
e117276e
APB
47922000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
4793
4794 * decl.c (predef_filenames_size): Now 7.
4795 (predef_filenames): New seventh entry.
4796
652f2504
TT
47972000-05-04 Tom Tromey <tromey@cygnus.com>
4798
4799 * boehm.c (mark_reference_fields): Don't mark RawData fields.
4800 Keep track of when we've seen a reference field after a
4801 non-reference field.
4802 (get_boehm_type_descriptor): Handle case where we see
4803 non-reference fields but no trailing reference field.
4804 * decl.c (rawdata_ptr_type_node): Define.
4805 (init_decl_processing): Initialize rawdata_ptr_type_node.
4806 * java-tree.h (rawdata_ptr_type_node): Declare.
4807
ccedaff3
KG
48082000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4809
4810 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
4811 specifiers in calls to fprintf.
4812
dd5d6281
TT
48132000-05-03 Andrew Haley <aph@cygnus.com>
4814
4815 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
4816
4817 * javaop.h (WORD_TO_INT): New function.
4818 (IMMEDIATE_s4): Use WORD_TO_INT.
4819 * jcf.h (JPOOL_INT): Ditto.
4820
4821 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
4822 separator.
4823
dd5d6281 48242000-04-19 Tom Tromey <tromey@cygnus.com>
7145d9fe
TT
4825
4826 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
4827 on native function.
4828 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
4829 JNI methods.
4830 * expr.c (build_jni_stub): New function.
4831 * lang-specs.h: -fjni and -femit-class-file are incompatible.
4832 * parse.c: Rebuilt.
4833 * parse.y (java_complete_expand_methods): Expand a native method
4834 and call build_jni_stub if -fjni given.
4835 * lang-options.h: Document -fjni.
4836 * lang.c (flag_jni): New global.
4837 (lang_f_options): Added `jni' entry.
4838 * java-tree.h (soft_lookupjnimethod_node,
4839 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
4840 Declare.
4841 (flag_jni): Declare.
4842 (build_jni_stub): Declare.
4843 (struct lang_decl): Added `native' flag.
4844 (METHOD_NATIVE): Redefined to use `native' field of lang specific
4845 structure.
4846 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
4847 soft_jnipopsystemframe_node): New globals.
4848 (init_decl_processing): Set them. _Jv_InitClass only takes one
4849 argument.
4850
4851 * java-tree.def: Put into `C' mode.
4852
e815887f
TT
48532000-04-27 Tom Tromey <tromey@cygnus.com>
4854
4855 Fix for PR gcj/2:
4856 * expr.c (expand_invoke): Generate check to see if object pointer
4857 is null in nonvirtual invocation case.
4858 * java-tree.h (soft_nullpointer_node): Declare.
4859 * decl.c (soft_nullpointer_node): New global.
4860 (init_decl_processing): Initialize soft_nullpointer_node.
4861 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
4862 or `private' methods.
4863 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
4864
ad81223c
APB
4865Wed Apr 26 14:29:33 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
4866
4867 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
e64c46ce 4868 from <clinit>
ad81223c 4869
f1acc01e
TT
48702000-04-26 Tom Tromey <tromey@cygnus.com>
4871
4872 * zextract.c (find_zip_file_start): New function.
4873 (read_zip_archive): Use it.
4874
e803d3b2
APB
48752000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
4876
4877 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
4878
152de068
APB
48792000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
4880
4881 * class.c (common_enclosing_context_p): New function.
4882 * java-tree.h (common_enclosing_context_p): Added prototype.
4883 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
4884 classes sharing an outer context with the current instance.
4885 * parse.y (build_access_to_thisn): Fixed leading comment.
4886 (verify_constructor_super): New local `supper_inner'. Skip
4887 enclosing context argument in the case of inner class constructors.
4888 (patch_method_invocation): Insert proper context as second
4889 parameter to pure inner class constructor super invocations.
4890
93220702
APB
4891Mon Apr 24 14:59:36 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
4892
4893 * parse.y (end_class_declaration): Reset the interface number
e64c46ce 4894 counter.
93220702 4895
dfb99c83
APB
48962000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
4897
17126208 4898 * parse.y (source_start_java_method): Deleted unnecessary code.
f6bbde28 4899 (patch_method_invocation): Fixed comment.
dfb99c83 4900
e60a8c26
RL
49012000-04-24 Robert Lipe <robertlipe@usa.net>
4902
4903 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
4904
3c8c10b8
TT
49052000-04-23 Tom Tromey <tromey@cygnus.com>
4906
4907 * boehm.c (mark_reference_fields): Use int_byte_position.
4908
8a008c41
TT
49092000-04-22 Tom Tromey <tromey@cygnus.com>
4910
4911 * boehm.c (mark_reference_fields): Only call byte_position on
4912 non-static fields.
4913
d5f76aba
TT
49142000-04-22 Tom Tromey <tromey@cygnus.com>
4915
4916 * boehm.c (mark_reference_fields): Added `last_view_index'
4917 argument. Use DECL_FIELD_OFFSET to determine field's offset.
4918
a40d21da
APB
4919Thu Apr 20 17:41:28 2000 Mo DeJong <mdejong@cygnus.com>
4920
4921 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
4922 * parse.y (check_class_interface_creation): Fixed comments. Select
e64c46ce
AJ
4923 permitted modifiers for (inner) interfaces. Changed error message
4924 to report rejected modifiers used with local classes.
a40d21da
APB
4925
49262000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
4927
4928 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
4929 of directly inherited type considered in scope.
4930 * parse.y (do_resolve_class): Search inherited classes for inner
4931 classes.
4932
473e7b07
TT
49332000-04-20 Tom Tromey <tromey@cygnus.com>
4934
4935 * parse.y (not_accessible_p): Use member's class, not current
4936 class, when doing inheritance check for protected reference.
4937 Fixes PR gcj/124.
4938
c52fbf0f
JS
4939Thu Apr 20 18:20:58 2000 Jason Schroeder <shrode@subnature.com>
4940
4941 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
4942
f2760b27
APB
49432000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
4944
4945 * parse.y (lookup_field_wrapper): Search for final local aliases.
4946 (resolve_expression_name): Let lookup_field_wrapper search for
4947 final local aliases. Force the value of `name' if one is found.
4948 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
4949 an expression name. Fixed comments.
4950
807bc1db
APB
49512000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
4952
4953 * parse.y (yyerror): `msg' can be null, don't use it in that case.
4954
ecb36604
TT
49552000-04-19 Tom Tromey <tromey@cygnus.com>
4956
4957 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
4958
48a840d9
APB
49592000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
4960
4961 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
4962
83c1f628
TT
49632000-04-18 Tom Tromey <tromey@cygnus.com>
4964
4965 PR gcj/211:
4966 * gjavah.c (utf8_cmp): Changed return value.
4967 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
4968 result.
4969 (cxx_keywords): New global.
4970 (get_field_name): Handle new result of cxx_keyword_subst.
4971 (print_method_info): Likewise.
4972
a7384840
BM
49732000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
4974
f6bbde28 4975 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
a7384840 4976 with a newline, for CNI.
f6bbde28 4977 (print_stub_or_jni): Print a space or newline before method name for
a7384840
BM
4978 CNI as well as JNI.
4979 (print_cxx_classname): Don't write leading "::" in CNI stub method.
f6bbde28 4980 (process_file): Include gcj/cni.h if generating CNI stubs.
a7384840 4981
3e0768f0
TT
49822000-04-16 Tom Tromey <tromey@cygnus.com>
4983
4984 * gjavah.c (decompile_method): Use print_field_name.
4985 Fixes PR gcj/205.
4986
48a840d9
APB
49872000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
4988
4989 * parse.y (java_expand_classes): Reverse the package list once.
4990 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
4991 reduction.
4992 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
4993 the `==' and `!=' operators.
4994
cedea510
APB
49952000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
4996
4997 * jcf-write.c (generate_bytecode_insns): At invokation time,
4998 always relate an interface method to the type of its selector.
f6bbde28 4999
e803d3b2
APB
50002000-04-05 Tom Tromey <tromey@cygnus.com>
5001
5002 Fix for PR gcj/2:
5003 * expr.c (expand_invoke): Generate check to see if object pointer
5004 is null in nonvirtual invocation case.
5005 * java-tree.h (soft_nullpointer_node): Declare.
5006 * decl.c (soft_nullpointer_node): New global.
5007 (init_decl_processing): Initialize soft_nullpointer_node.
5008 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
5009 or `private' methods.
5010 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
5011
bc2874c9
TT
50122000-04-05 Tom Tromey <tromey@cygnus.com>
5013
5014 Fix for PR gcj/140:
5015 * parse.y (check_final_assignment): Recognize assignments to the
5016 `length' field of an array when generating class files.
5017
256172c4
APB
50182000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
5019
5020 * class.c (decl_hash): Prototype removed.
5021 (decl_compare): Likewise.
5022
e0fc4118
TT
50232000-04-05 Tom Tromey <tromey@cygnus.com>
5024
5025 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
5026 * parse.y (check_modifiers_consistency): Check for final/volatile
5027 clash. Fixes PR gcj/164.
5028
e0422ed0
APB
50292000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
5030
5031 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
5032 made global.
5033 (java_hash_compare_tree_node): Renamed from `decl_compare, made
5034 global.
5035 (add_method_1): Use `java_hash_hash_tree_node' and
5036 `java_hash_compare_tree_node'.
5037 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
5038 (java_hash_compare_tree_node): Likewise.
5039 * parse.y (find_applicable_accessible_methods_list): Create,
5040 delete and use a hash table to remember already searched interfaces.
5041
4200941b
MW
50422000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
5043
5044 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
5045 with latest entry.
5046
c0b864fc
KG
50472000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5048
5049 * boehm.c (mark_reference_fields, set_bit): Prototype.
5050 (set_bit): Un-ANSI-fy definition.
5051
5052 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
5053 Prototype.
5054
5055 * decl.c (emit_init_test_initialization): Likewise.
5056
5057 * gjavah.c (jni_print_char): Likewise.
5058
5059 * parse.y (create_new_parser_context): Likewise.
5060
7a678b64 5061Thu Mar 30 15:26:56 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
64ea4a5e
APB
5062
5063 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
5064 patch missing hunk. Fixed indentation.
5065
05411ecf
TT
50662000-03-30 Tom Tromey <tromey@cygnus.com>
5067
5068 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
5069 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
5070
acbedd7c
APB
50712000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
5072
5073 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
5074 when negative *before* using it as an array index.
5075 * ChangeLog: Fixed typo.
5076
0981a859
APB
50772000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
5078
5079 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
5080 to 0 when it reaches -1.
5081
50822000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
5083
5084 * jcf-parse.c (get_constant): Properly cast `num' during the
acbedd7c 5085 invocation of `add_double'.
0981a859
APB
5086 * jcf-write.c (push_long_const): Properly cast `lo' before
5087 comparing it to short bounds.
5088 * parse-scan.y (interface_declaration:): Rule re-arrange so that
5089 `interface_body:' is reduced after the current interface is
5090 pushed.
5091
a843e0ce
TT
50922000-03-26 Tom Tromey <tromey@cygnus.com>
5093
5094 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
5095 Java-specific `-f' option.
5096
ad41cc2a
RK
5097Sun Mar 26 11:37:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5098
5099 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
5100 Adjust order of making types.
5101 Make bitsize_*_node values.
5102
770ae6cc
RK
5103Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5104
5105 * class.c (make_field_value): Use byte_position.
5106 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
5107 (java_array_data_offset): Likewise.
5108 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
5109 bzero call.
5110
165f37bc
APB
51112000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
5112
5113 * parse.y (check_abstract_method_definitions): New local
5114 `end_type_reached'. Make sure we also consider `end_type'.
0981a859
APB
5115 (java_check_abstract_method_definitions): Make sure we eventually
5116 consider `java.lang.Object'.
5117 (maybe_use_access_method): Don't use access method if not in the
5118 context of a pure inner class or if the method's context is right.
5119 (find_applicable_accessible_methods_list): New static flag
165f37bc 5120 `object_done'. Don't search abstract classes as interfaces. Fixed
0981a859
APB
5121 indentation. Fixed the `java.lang.Object' only search. Search
5122 class interface(s) first, then fully search enclosing contexts.
5123 (find_most_specific_methods_list): Pick the closest candidate when
165f37bc
APB
5124 they're all abstract.
5125
124906f9
APB
5126Mon Mar 20 08:58:51 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
5127
5128 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
dba41d30 5129 properly initialize `finished_label'. Don't emit gotos for empty
124906f9
APB
5130 try statements.
5131
c14f7160
ML
5132