]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/java/ChangeLog
configure.ac: Add --with-pkgversion and --with-bugurl.
[thirdparty/gcc.git] / gcc / java / ChangeLog
1 2007-08-21 Paul Brook <paul@codesourcery.com>
2 Nathan Sidwell <nathan@codesourcery.com>
3 Mark Mitchell <mark@codesourcery.com>
4 Joseph Myers <joseph@codesourcery.com>
5
6 * jcf-dump.c (version): Use pkgversion_string. Update copyright
7 date.
8
9 2007-08-20 Richard Guenther <rguenther@suse.de>
10
11 * lang.c (java_tree_inlining_walk_subtrees): Remove.
12 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
13
14 2007-08-17 Tom Tromey <tromey@redhat.com>
15
16 * typeck.c (find_method_in_interfaces): Update.
17 * jcf-parse.c (load_class): Update.
18 * java-gimplify.c (java_gimplify_component_ref): Removed.
19 (java_gimplify_modify_expr): Update. Removed pre_p and post_p
20 arguments.
21 (java_gimplify_expr): Update.
22 * decl.c (java_init_decl_processing): Update.
23 * class.c (set_constant_value): Update.
24 (make_class_data): Update.
25 (finish_class): Update.
26 (build_static_field_ref): Update.
27 (is_compiled_class): Update.
28 (maybe_layout_super_class): Update.
29 (layout_class): Update.
30 (layout_class_method): Update.
31 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
32 (lang_decl_var) <am, final_iud, cif>: Removed fields.
33 (lang_decl_func) <init_calls_this>: Removed field.
34 (lang_type) <dot_class, verify_method>: Removed fields.
35 (FIELD_NESTED_ACCESS): Removed.
36 (FIELD_NESTED_ACCESS_P): Removed.
37 (DECL_FIELD_FINAL_IUD): Removed.
38 (DECL_LOCAL_FINAL_IUD): Removed
39 (LOCAL_FINAL_P): Removed.
40 (FINAL_VARIABLE_P): Removed.
41 (CLASS_FINAL_VARIABLE_P): Removed.
42 (DECL_BIT_INDEX): Removed.
43 (DECL_INIT_CALLS_THIS): Removed.
44 (FIELD_LOCAL_ALIAS): Removed.
45 (FIELD_LOCAL_ALIAS_USED): Removed.
46 (FIELD_THISN): Removed.
47 (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
48 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
49 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
50 (TYPE_DOT_CLASS): Removed.
51 (TYPE_VERIFY_METHOD): Removed.
52 (ID_CLASSDOLLAR_P): Removed.
53 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
54 Removed.
55 (classdollar_identifier_node): Removed.
56 (TYPE_UNKNOWN): Removed.
57 (CLASS_FROM_SOURCE_P): Removed.
58 * expr.c (build_jni_stub): Update.
59 (force_evaluation_order): Update.
60 (build_java_empty_stmt): Update.
61 (build_class_init): Update.
62 (java_stack_swap): Update.
63 (build_jni_stub): Update.
64
65 2007-08-17 Tom Tromey <tromey@redhat.com>
66
67 * java-tree.h (LABEL_TYPE_STATE): Removed.
68 (load_type_state): Removed.
69 (LABEL_PC): Removed.
70 (LABEL_VERIFIED): Removed.
71 (type_states): Declare.
72 * expr.c (type_states): New global.
73 (load_type_state): Now static. Use type_states. Changed
74 argument.
75 (lookup_label): Don't set LABEL_PC.
76 (expand_byte_code): Don't use LABEL_VERIFIED.
77 (note_instructions): Initialize type_states.
78 * verify-glue.c (vfy_note_stack_depth): Rewrote.
79 (vfy_note_stack_type): Use type_states.
80 (vfy_note_local_type): Likewise.
81
82 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
83
84 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
85 * jcf.h (JCF_FINISH): Likewise.
86
87 2007-07-31 Nick Clifton <nickc@redhat.com>
88
89 * java-gimplify.c: Change copyright header to refer to version 3
90 of the GNU General Public License and to point readers at the
91 COPYING3 file and the FSF's license web page.
92 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
93 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
94 resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
95 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
96 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
97 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
98 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
99
100 2007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
101
102 * jcf-io.c (find_class): Fix -Wcast-qual warnings.
103
104 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
105
106 * lang.c (java_get_callee_fndecl): Constify.
107
108 2007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
109
110 * mangle.c (set_type_package_list): Constify.
111 * verify-glue.c (vfy_make_string): Delete.
112 * verify.h (vfy_make_string): Likewise.
113
114 2007-07-26 Tom Tromey <tromey@redhat.com>
115
116 * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
117 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
118 EXIT_BLOCK_LABELED_BLOCK): Likewise.
119 * lang.c (java_tree_inlining_walk_subtrees): Update.
120 (java_dump_tree): Likewise.
121 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
122 Remove.
123 * decl.c (push_labeled_block, pop_labeled_block): Remove.
124 * java-gimplify.c (java_gimplify_labeled_block_expr,
125 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
126 (java_gimplify_expr): Update.
127
128 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
129
130 * class.c (java_treetreehash_hash, java_treetreehash_compare):
131 Constify.
132 * expr.c (type_assertion_eq): Likewise.
133 * jcf-io.c (compare_path): Likewise.
134 * jcf-parse.c (cmpstringp): Likewise.
135 * verify-impl.c (get_one_type, compute_argument_types,
136 compute_return_type): Likewise.
137
138 2007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
139
140 PR target/32462
141 PR libgcj/32465
142 * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
143
144 2007-07-12 Richard Guenther <rguenther@suse.de>
145
146 * expr.c (expand_java_return): RETURN_EXPR has void type.
147 (build_jni_stub): Likewise. Use a comparison against zero
148 for null-pointer test in COND_EXPR.
149 (build_field_ref): Build POINTER_PLUS_EXPR with correct
150 type. Convert result instead.
151 (build_invokevirtual): Likewise.
152
153 2007-07-09 Geoffrey Keating <geoffk@apple.com>
154
155 PR 32617
156 * lang.c (java_init): Remove setting of force_align_functions_log.
157 * class.c (add_method_1): Set DECL_ALIGN of non-static method
158 to cope with ptrmemfunc_vbit_in_pfn.
159
160 2007-07-03 David Daney <ddaney@avtrex.com>
161
162 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
163 include path.
164 (doc/gcj.dvi): Same.
165 (doc/gcj.pdf): Same.
166 (java/index.html): Same.
167
168 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
169
170 * class.c (make_class_data): Build the index in sizetype.
171 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
172 adding to a pointer type.
173 (build_symbol_entry): Likewise.
174 * expr.c (build_java_arrayaccess): Likewise.
175 (build_field_ref): Likewise.
176 (build_known_method_ref): Likewise.
177 (build_invokevirtual): Likewise.
178 * except.c (build_exception_object_ref): Do a
179 NEGATIVE and then a POINTER_PLUS_EXPR instead
180 of a MINUS_EXPR.
181
182 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
183
184 * typeck.c (java_signed_type): Remove.
185 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
186 * java-tree.h (java_signed_type): Remove.
187
188 2007-05-18 Geoffrey Keating <geoffk@apple.com>
189
190 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
191 (print_constant): Likewise.
192
193 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
194
195 * expr.c (build_java_binop): Use unsigned_type_for instead of
196 java_unsigned_type.
197 * java-tree.h (java_unsigned_type): Remove.
198 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
199 * typeck.c (java_unsigned_type): Remove.
200
201 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
202
203 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
204 instead of checking GIMPLE_STMT_P in chain_next.
205
206 2007-04-06 Colin Walters <walters@redhat.com>
207
208 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
209 * jcf-io.c (open_class): Copy 'filename'.
210
211 2007-04-03 Andrew Haley <aph@redhat.com>
212
213 * jvgenmain.c (main): Change main to use class$, not class$$.
214 (do_mangle_classname): Likewise.
215 * class.c (hide): New function.
216 (add_field): Hide everything that shouldn't be visible outside a
217 DSO.
218 (build_static_class_ref): Likewise.
219 (build_classdollar_field): Likewise.
220 (make_class_data): Likewise.
221 (layout_class_method): Likewise.
222 * expr.c (special_method_p): New function.
223
224 * class.c (push_class): Don't bogusly guess the source filename.
225 * jcf-parse.c (give_name_to_class): Don't set input_location from
226 DECL_ARTIFICIAL decls.
227
228 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
229
230 * typeck.c (java_signed_or_unsigned_type): Removed.
231 (java_signed_type): use get_signed_or_unsigned_type instead of
232 java_signed_or_unsigned_type.
233 (java_unsigned_type): Ditto.
234 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
235 * java-tree.h (java_signed_or_unsigned_type): Removed.
236
237 2007-03-26 Tom Tromey <tromey@redhat.com>
238
239 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
240 (java.maintainer-clean): Likewise.
241 (java.install-man): Likewise.
242 (.INTERMEDIATE): Removed grmiregistry.pod.
243 (grmiregistry.pod): Removed.
244 * gcj.texi (Invoking gcjh): Removed.
245 (Invoking gjnih): Likewise.
246 (Invoking grmiregistry): Likewise.
247 (direntry): Updated.
248 (Top): Likewise.
249 (which-gcj): Removed.
250
251 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
252
253 * Make-lang.in: Add install-pdf target as copied from
254 automake v1.10 rules.
255
256 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
257
258 * gcj.texi: Standardize title page.
259
260 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
261
262 * class.c: Fix a comment typo.
263
264 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
265 Brooks Moses <brooks.moses@codesourcery.com>
266 Lee Millward <lee.millward@codesourcery.com>
267
268 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
269 of build3.
270 (BUILD_MONITOR_EXIT): Likewise.
271
272 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
273 (java_gimplify_modify_expr): Likewise.
274
275 * class.c (cache_this_class_ref): Use build_call_expr.
276 (build_static_field_ref): Likewise.
277 (emit_indirect_register_classes): Likewise.
278 (emit_register_classes): Likewise.
279
280 * resource.c (write_resource_constructor): Use build_call_expr.
281
282 * builtins.c (builtin_creator_function): Change interpretation of
283 the second parameter to be the whole CALL_EXPR instead of the arglist.
284 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
285 (min_builtin): Likewise.
286 (abs_builtin): Likewise.
287 (java_build_function_call_expr): Likewise.
288 (convert_real): Likewise.
289 (UNMARSHAL3): Likewise.
290 (UNMARSHAL4): Likewise.
291 (UNMARSHAL5): Likewise.
292 (build_arglist_for_builtin): Delete. Fix callers to use
293 build_call_expr instead.
294 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
295 accessors.
296 (compareAndSwapInt_builtin): Likewise.
297 (compareAndSwapLong_builtin): Likewise.
298 (compareAndSwapObject_builtin): Likewise.
299 (putVolatile_builtin): Likewise.
300 (getVolatile_builtin): Likewise.
301 (VMSupportsCS8_builtin): Likewise.
302 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
303 instead of arglist.
304
305 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
306 (build_java_throw_out_of_bounds_exception): Likewise.
307 (java_check_reference): Likewise.
308 (build_java_arraystore_check): Likewise.
309 (build_newarray): Likewise.
310 (build_anewarray): Likewise.
311 (expand_java_multinewarray): Use build_call_list instead of build3.
312 (build_java_monitor): Use build_call_nary instead of build3.
313 (java_create_object): Likewise.
314 (expand_java_NEW): Likewise.
315 (build_instanceof): Likewise.
316 (expand_java_CHECKCAST): Likewise.
317 (build_java_soft_divmod): Likewise.
318 (build_java_binop): Likewise.
319 (build_field_ref): Likewise.
320 (build_class_init): Likewise.
321 (rewrite_arglist_getcaller): Use build_call_expr.
322 (build_invokeinterface): Use build_call_nary instead of build3.
323 (expand_invoke): Use build_call_list instead of build3.
324 (build_jni_stub): Use build_call_nary, build_call_list, or
325 build_call_expr instead of build3.
326 (expand_java_field_op): Use build_call_expr instead of build3.
327 (force_evaluation_order): Use new CALL_EXPR accessors.
328
329 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
330
331 2007-02-15 David Daney <ddaney@avtrex.com>
332
333 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
334 (java.maintainer-clean):Add gc-analyze.1.
335 (.INTERMEDIATE): Add gc-analyze.pod.
336 (gc-analyze.pod): New rule.
337 (java.install-man): Install gc-analyze.1
338 * gcj.texi: Add new section for the gc-analyze program.
339
340 2007-02-07 Andrew Haley <aph@redhat.com>
341
342 * class.c (uncache_this_class_ref): New.
343 * expr.c (build_jni_stub): Initialize the class.
344 (expand_byte_code): Call uncache_this_class_ref after generating
345 code.
346
347 2007-02-06 Tom Tromey <tromey@redhat.com>
348
349 PR java/30714:
350 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
351
352 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
353
354 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
355
356 2007-02-02 Andrew Haley <aph@redhat.com>
357
358 * expr.c (expand_byte_code): Call cache_this_class_ref() and
359 cache_cpool_data_ref().
360 Set TYPE_CPOOL_DATA_REF.
361 (cache_cpool_data_ref): New function.
362 * constants.c (build_ref_from_constant_pool): Remove special-case
363 code for flag_indirect_classes.
364 (build_constant_data_ref): Move special-case code for
365 flag_indirect_classes here from build_ref_from_constant_pool.
366 * decl.c (finish_method): Move class initialization from here to
367 cache_this_class_ref.
368 * class.c (cache_this_class_ref): New function.
369 (build_class_ref): Use this_classdollar for the ouput class.
370
371 2007-02-02 David Daney <ddaney@avtrex.com>
372
373 * class.c (is_compiled_class): Move check to avoid reloading
374 current class.
375 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
376 already set.
377
378 2007-02-01 Andrew Haley <aph@redhat.com>
379
380 PR java/30641
381 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
382
383 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
384
385 * class.c, jcf-parse.c: Fix comment typos.
386
387 2007-01-30 Tom Tromey <tromey@redhat.com>
388
389 * gcj.texi (Strings): Fix documentation for JvNewString.
390
391 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
392
393 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
394 typos.
395
396 2007-01-30 Ben Elliston <bje@au.ibm.com>
397
398 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
399
400 2007-01-29 Tom Tromey <tromey@redhat.com>
401
402 PR java/30607:
403 * jvspec.c (lang_specific_driver): Handle separate -I argument.
404 * lang.opt (-I): Add 'Separate'.
405
406 2007-01-29 Andrew Haley <aph@redhat.com>
407
408 * class.c (add_method_1): Mark fndecl as external unless we are
409 compiling it into this object file.
410
411 2007-01-24 Andrew Haley <aph@redhat.com>
412
413 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
414 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
415
416 2007-01-22 Andrew Haley <aph@redhat.com>
417
418 * builtins.c (VMSupportsCS8_builtin): New function.
419
420 2007-01-23 Andrew Pinski <pinskia@gmail.com>
421
422 PR java/30454
423 * jcf-io.c (opendir_in_zip): Close the file
424 and free zipf before returning after an error.
425
426 2007-01-16 Tom Tromey <tromey@redhat.com>
427
428 * java-tree.def: Added copyright header.
429
430 2007-01-15 Tom Tromey <tromey@redhat.com>
431
432 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
433 case.
434 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
435 Removed case.
436 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
437 (EXPR_WFL_NODE): Likewise.
438 (EXPR_WFL_LINECOL): Likewise.
439 (EXPR_WFL_FILENAME): Likewise.
440 (EXPR_WFL_LINENO): Likewise.
441 (build_expr_wfl, expr_add_location): Don't declare.
442 (build_unknown_wfl): Removed.
443 (EXPR_WFL_FILENAME_NODE): Removed.
444 (EXPR_WFL_COLNO): Removed.
445 (EXPR_WFL_SET_LINECOL): Removed.
446 (DECL_FUNCTION_WFL): Removed.
447 (DECL_FIELD_FINAL_WFL): Removed.
448 (struct lang_decl_func) <wfl>: Removed field.
449 <called_constructor>: Likewise.
450 <inner_access>: Likewise.
451 (struct lang_decl_var) <wfl>: Removed field.
452 (DECL_CONSTRUCTOR_CALLS): Removed.
453 (DECL_FUNCTION_ACCESS_DECL): Likewise.
454 (DECL_FUNCTION_INNER_ACCESS): Likewise.
455 (DECL_SPECIFIC_COUNT): Likewise.
456 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
457 * expr.c (build_expr_wfl): Removed.
458 (expr_add_location): Likewise.
459
460 2007-01-12 Tom Tromey <tromey@redhat.com>
461
462 * jcf-dump.c (main): Updated call to find_class.
463 * lang.c (java_init): Removed dead code.
464 * jcf-parse.c (read_class): Don't use java_source field. Removed
465 dead code.
466 (parse_zip_file_entries): Don't use java_source field.
467 (process_zip_dir): Likewise.
468 (jcf_parse): Removed dead code.
469 (java_parse_file): Likewise.
470 (read_class): Updated call to find_class.
471 * jcf-io.c (find_class): Don't use java_source field. Removed
472 'source_ok' argument, .java logic.
473 * jcf.h (JCF) <java_source>: Removed field.
474 (JCF_ZERO): Updated. (find_class): Updated.
475 * decl.c: Removed dead code.
476 * class.c: Removed dead code.
477
478 2007-01-11 Tom Tromey <tromey@redhat.com>
479
480 * typeck.c (convert): Don't use flag_emit_class_files.
481 * lang.c (java_post_options): Don't use flag_emit_class_files.
482 (java_handle_option): Don't use flag_extraneous_semicolon or
483 flag_redundant.
484 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
485 flag_emit_class_files.
486 (load_class): Likewise.
487 * java-tree.h (flag_emit_class_files): Don't declare.
488 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
489 (flag_extraneous_semicolon): Don't declare.
490 (flag_not_overriding): Likewise.
491 (flag_static_local_jdk1_1): Likewise.
492 (flag_redundant): Likewise.
493 * expr.c (build_newarray): Don't use flag_emit_class_files.
494 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
495 flag_emit_class_files.
496 (build_class_ref): Likewise.
497 * builtins.c (check_for_builtin): Don't use
498 flag_emit_class_files.
499
500 2007-01-10 Tom Tromey <tromey@redhat.com>
501
502 * lang.c (java_can_use_bit_fields_p): Removed.
503 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
504
505 2007-01-09 Andrew Haley <aph@redhat.com>
506
507 * expr.c (build_java_arrayaccess): Rewrite to generate array
508 access in canonical form.
509 (expand_java_arraystore): Use build_fold_addr_expr() on address of
510 array access.
511
512 2007-01-03 Andrew Haley <aph@redhat.com>
513
514 PR java/28754
515 * expr.c (expand_java_field_op): If we're initializing a field's
516 declaring interface we should not also initialize the class
517 context in which it was referenced.
518
519 2007-01-02 Tom Tromey <tromey@redhat.com>
520
521 * java-tree.h (compiling_from_source, current_encoding,
522 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
523 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
524 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
525 JTI_WFL_OPERATOR): Removed
526 (finit_identifier_node, instinit_identifier_node,
527 length_identifier_node, super_identifier_node,
528 continue_identifier_node, access0_identifier_node, wfl_operator):
529 Removed.
530 (cyclic_inheritance_report,
531 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
532 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
533 DECL_FIXED_CONSTRUCTOR_P): Removed.
534 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
535 Removed.
536 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
537 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
538 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
539 import_list, import_demand_list>: Removed.
540 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
541 cxx_keyword_p): Removed.
542 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
543 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
544 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
545 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
546 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
547 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
548 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
549 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
550 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
551 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
552 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
553 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
554 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
555 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
556 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
557 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
558 java_parse_abort_on_error, extract_field_decl): Removed.
559 (finput): Declare.
560 * lang.c: (compiling_from_source, current_encoding): Removed.
561 (java_handle_option): Ignore -fencoding.
562 * parse.h: Don't include lex.h.
563 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
564 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
565 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
566 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
567 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
568 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
569 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
570 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
571 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
572 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
573 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
574 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
575 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
576 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
577 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
578 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
579 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
580 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
581 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
582 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
583 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
584 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
585 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
586 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
587 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
588 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
589 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
590 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
591 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
592 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
593 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
594 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
595 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
596 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
597 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
598 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
599 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
600 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
601 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
602 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
603 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
604 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
605 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
606 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
607 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
608 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
609 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
610 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
611 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
612 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
613 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
614 SET_CPC_STATIC_INITIALIZER_STMT,
615 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
616 java_complete_class, java_check_circular_reference,
617 java_fix_constructors, java_layout_classes, java_reorder_fields,
618 java_method_add_stmt, java_get_line_col, reset_report,
619 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
620 java_finish_classes, ctxp, ctxp_for_generation,
621 ctxp_for_generation_last): Removed.
622 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
623 * mangle.c (utf8_cmp): New function.
624 (cxx_keywords): New global.
625 (cxx_keyword_p): New function.
626 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
627 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
628 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
629 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
630 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
631 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
632 * Make-lang.in (java.srcextra): Do nothing.
633 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
634 (JAVA_OBJS): Don't mention deleted files.
635 (java.mostlyclean): Likewise.
636 (java.clean): Likewise.
637 (JAVA_LEX_C): Removed.
638 (buffer.o, check-init.o, parse.o): Remove unused targets.
639 (typeck.o): Updated.
640 * jcf-parse.c (read_class): Comment out unused code.
641 (java_layout_seen_class_methods): New function.
642 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
643 Removed.
644 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
645 (init_jcf_parse): Removed.
646 * config-lang.in (gtfiles): Remove deleted files.
647 * decl.c (java_init_decl_processing): Don't initialize
648 finit_identifier_node, instinit_identifier_node,
649 length_identifier_node, super_identifier_node,
650 continue_identifier_node, access0_identifier_node. Don't call
651 init_jcf_parse.
652 * class.c (cyclic_inheritance_report): New global.
653 (add_method_1): Don't use
654 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
655 (maybe_layout_super_class): Comment out code.
656 (safe_layout_class): New function.
657 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
658 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
659 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
660 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
661 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
662 (java_gimplify_case_expr): Removed.
663 (java_gimplify_default_expr): Likewise.
664 (java_gimplify_new_array_init): Likewise.
665 * parse.y: Removed.
666 * keyword.gperf, keyword.h: Removed.
667 * chartables.h: Removed.
668 * check-init.c: Removed.
669 * buffer.c, buffer.h: Removed.
670 * convert.h: Removed.
671 * gen-table.pl: Removed.
672 * lex.c, lex.h: Removed.
673
674 2007-01-02 Andrew Haley <aph@redhat.com>
675
676 * expr.c (expand_java_arraystore): Make sure we perform a bounds
677 check at runtime before we perform a type check.
678
679 2006-12-19 Andrew Haley <aph@redhat.com>
680
681 * decl.c: Bump minor BC ABI version.
682
683 2006-12-13 Gary Benson <gbenson@redhat.com>
684
685 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
686
687 2006-12-12 Tom Tromey <tromey@redhat.com>
688
689 * lang-specs.h: Pass -M options to jc1.
690 * jcf-depend.c (jcf_dependency_add_file): Don't emit
691 dependencies.
692
693 2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
694
695 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
696
697 2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
698
699 * lang-specs.h: Pass '%U'-based options as separate arguments.
700
701 2006-12-05 Tom Tromey <tromey@redhat.com>
702
703 PR java/29495:
704 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
705 classes as well.
706 * class.c (add_field): Handle ACC_SYNTHETIC.
707 (add_method_1): Likewise. Handle bridge and varargs.
708 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
709 annotation.
710 (set_class_decl_access_flags): Handle synthetic and annotation.
711 * java-tree.h (METHOD_BRIDGE): New macro.
712 (METHOD_VARARGS): Likewise.
713 (TYPE_SYNTHETIC): Likewise.
714 (TYPE_ANNOTATION): Likewise.
715 (lang_type): New fields 'synthetic' and 'annotation'.
716 (lang_decl_func): New fields 'varargs' and 'bridge'.
717
718 2006-12-04 Andrew Haley <aph@redhat.com>
719
720 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
721 there's no map.
722
723 2006-11-29 Gary Benson <gbenson@redhat.com>
724
725 * expr.c (rewrite_arglist_getcaller): Reorder.
726
727 2006-11-29 Andrew Haley <aph@redhat.com>
728
729 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
730 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
731
732 2006-11-23 Andrew Haley <aph@redhat.com>
733
734 * expr.c (rewrite_arglist_getcaller): New.
735 (rewrite_arglist_getclass): Fix indentation.
736 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
737 gnu.classpath.VMStackWalker.getCallingClassLoader().
738 * builtins.c (initialize_builtins): Remove duplicate def'n of
739 __sync_synchronize.
740 Add __builtin_return_address.
741
742 2006-11-22 Andrew Haley <aph@redhat.com>
743
744 * jcf-reader.c (get_attribute): Mark attr_type unused.
745
746 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
747
748 2007-01-08 Richard Guenther <rguenther@suse.de>
749
750 * lex.c (do_java_lex): Use build_int_cst_wide_type.
751 * jcf-parse.c (get_constant): Likewise.
752
753 2006-11-12 Jan Hubicka <jh@suse.cz>
754
755 * resource.c (compile_resource_data): Update for new varpool names.
756 * java/class.c (build_utf8_ref): Likewise.
757
758 2006-11-12 David Daney <ddaney@avtrex.com>
759
760 PR java/29805
761 * typeck.c (build_java_array_type): Increase buffer sizes.
762
763 2006-11-11 Richard Guenther <rguenther@suse.de>
764
765 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
766 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
767
768 2006-11-06 Andrew Haley <aph@redhat.com>
769
770 * java-tree.h (CONSTANT_LazyFlag): New.
771 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
772 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
773 reflection_data.
774 (handle_constant): Return 0 for dummy cpool entries.
775 Handle constants of kind Class.
776 Handle constants of kind NameAndType.
777 (handle_enclosingmethod_attribute): New.
778 (handle_signature_attribute): New.
779 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
780 (HANDLE_SIGNATURE_ATTRIBUTE): New.
781 (handle_constant): Use unmangle_classname()rather than calling
782 identifier_subst() directly.
783
784 2006-11-02 Andrew Haley <aph@redhat.com>
785
786 * java-tree.h (FIELD_ENUM): New.
787 (lang_decl_var.field_enum): New.
788 (lang_type.enum_class): New.
789 (CLASS_ENUM): New.
790 * class.c (set_class_decl_access_flags): Handle enum types.
791 (add_field): Handle enum fields.
792 (get_access_flags_from_decl): Likewise.
793
794 * class.c (make_class_data): Put reflection_data into rodata.
795
796 2006-11-01 Andrew Haley <aph@redhat.com>
797
798 * jcf-parse.c (field_offsets, bit_obstack): New variables.
799 (jcf_parse): Write end marker to annotation_data.
800 (java_parse_file): Create field_offsets bitmap. Destroy it.
801 (annotation_grow, annotation_rewrite_byte)
802 (annotation_rewrite_short, annotation_rewrite_int)
803 (annotation_read_short, annotation_write_byte)
804 (annotation_write_short, annotation_write_int)
805 (handle_long_constant, handle_constant, handle_element_value)
806 (handle_annotation, handle_annotations)
807 (handle_annotation_attribute, rewrite_reflection_indexes)
808 (handle_member_annotations, handle_parameter_annotations)
809 (handle_default_annotation): New functions.
810 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
811 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
812 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
813 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
814 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
815 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
816 (TYPE_REFLECTION_DATA): New.
817 (TYPE_REFLECTION_DATASIZE): New.
818 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
819 an enum.
820 * jcf-reader.c (get_attribute): Pass field/method index and
821 attribute type to get_attribute().
822 * constants.c (find_class_or_string_constant): Make nonstatic.
823 (cpool_for_class): Likewise.
824 (build_constants_constructor): Separate string and scalar types.
825 * class.c (make_class_data): Generate field_indexes permutation.
826 Pass it to rewrite_reflection_indexes().
827 (make_class_data): Generate constructor for reflection_data field.
828
829 2006-10-20 Tom Tromey <tromey@redhat.com>
830
831 * gcj.texi (Top): Don't mention jv-scan.
832 (Invoking gcj): Likewise.
833 (Invoking gcjh): Likewise.
834 (Invoking gjnih): Likewise.
835 (Invoking gij): Likewise.
836 (Invoking gcj-dbtool): Likewise.
837 (Invoking jv-scan): Removed.
838 * parse-scan.y: Removed.
839 * jv-scan.c: Removed.
840 * config-lang.in (stagestuff): Don't mention jv-scan.
841 * Make-lang.in (java): Removed jv-scan.
842 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
843 (JVSCAN_OBJS): Removed.
844 (jv-scan$(exeext)): Likewise.
845 (JAVA_MANFILES): Removed jv-scan.1.
846 (java.uninstall): Don't mention jv-scan.
847 (java.mostlyclean): Likewise.
848 (java.maintainer-clean): Likewise.
849 (.INTERMEDIATE): Likewise.
850 (java/jv-scan.o): Removed.
851 (jv-scan.pod): Likewise.
852 (java.srcextra): Don't mention parse-scan.c.
853 (java.mostlyclean): Likewise.
854 (java/parse-scan.c): Removed.
855 (java/parse-scan.o-warn): Removed.
856 (java/parse-scan.o): Removed.
857
858 2006-10-20 Tom Tromey <tromey@redhat.com>
859
860 * lang.c (java_handle_option): Don't use
861 jcf_write_base_directory.
862 * jcf.h (jcf_write_base_directory): Removed.
863 * parse.y (java_expand_classes): Don't call write_classfile.
864 * config-lang.in (gtfiles): Removed jcf-write.c.
865 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
866 (java/jcf-write.o): Removed.
867 * jcf-parse.c (parse_class_file): Don't call write_classfile.
868 * java-tree.h (write_classfile): Removed declaration.
869 * jcf-write.c: Removed.
870
871 2006-10-20 Tom Tromey <tromey@redhat.com>
872
873 * Make-lang.in (java): Removed gjnih, gcjh.
874 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
875 (GCJH_OBJS): Removed.
876 (GJNIH_OBJS): Likewise.
877 (gjnih$(exeext)): Likewise.
878 (gcjh$(exeext)): Likewise.
879 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
880 (java.install-common): Don't special case gcjh.
881 (java.uninstall): Don't mention gcjh, gjnih.
882 (java.mostlyclean): Likewise.
883 (java.maintainer-clean): Likewise.
884 (.INTERMEDIATE): Likewise.
885 (gcjh.pod): Removed.
886 (gjnih.pod): Likewise.
887 (GCJH_TARGET_INSTALL_NAME): Removed.
888 (java/gjavah-jni.o): Removed.
889 (java/gjavah.o): Likewise.
890 * config-lang.in (stagestuff): Removed gjnih, gcjh.
891 * gjavah.c: Removed.
892
893 2006-10-17 Tom Tromey <tromey@redhat.com>
894
895 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
896 "string" case.
897
898 2006-10-17 Tom Tromey <tromey@redhat.com>
899
900 * jvgenmain.c (main): Handle -findirect-dispatch.
901 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
902 jvgenmain.
903
904 2006-10-06 Andrew Haley <aph@redhat.com>
905
906 * builtins.c (compareAndSwapInt_builtin): Check that we really do
907 have a compare_and_swap builtin.
908 (compareAndSwapLong_builtin): Likewise.
909 (compareAndSwapObject_builtin): Likewise.
910
911 2006-10-04 Andrew Haley <aph@redhat.com>
912
913 * builtins.c (java_builtins): Add compareAndSwapInt,
914 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
915 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
916 putObjectVolatile, getObjectVolatile, getIntVolatile,
917 getLongVolatile, getLong.
918 (UNMARSHAL3): New macro.
919 (UNMARSHAL4): Likewise.
920 (UNMARSHAL5): Likewise.
921 (build_arglist_for_builtin): New function.
922 (build_addr_sum, build_check_this): New functions.
923 (putObject_builtin. compareAndSwapInt_builtin,
924 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
925 putVolatile_builtin, getVolatile_builtin): New builtins.
926
927 2006-06-08 Andrew Haley <aph@redhat.com>
928
929 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
930 get_symbol_table_index().
931 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
932 private method.
933 (build_known_method_ref): New arg: special. Pass it to
934 get_symbol_table_index.
935 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
936 the method list.
937 (build_invokevirtual): New arg: special. Pass it to
938 get_symbol_table_index.
939 (expand_invoke): New variable: special.
940 Pass it to maybe_rewrite_invocation().
941 Pass it to build_known_method_ref().
942 * class.c (build_symbol_entry): Add new arg: special. Use it to
943 build the symbol table conbstructor.
944 (emit_symbol_table): Extract SPECIAL from the method list and pass
945 it to build_symbol_entry().
946 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
947 special accordingly.
948
949 2006-09-08 Andrew Haley <aph@redhat.com>
950
951 * class.c (layout_class_method): Use build_java_signature, not
952 build_java_argument_signature. Use lookup_java_method, not
953 lookup_argument_method.
954
955 2006-08-16 Jakub Jelinek <jakub@redhat.com>
956 Bryce McKinlay <bryce@mckinlay.net.nz>
957
958 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
959
960 2006-07-18 Tom Tromey <tromey@redhat.com>
961
962 * lang.opt: Added missing -W options.
963
964 2006-07-12 Tom Tromey <tromey@redhat.com>
965
966 PR java/28329:
967 * lang-specs.h: Pass '%U'-based options as separate arguments.
968 Use -faux-classpath.
969 * lang.c (java_handle_option): Handle OPT_faux_classpath.
970 * lang.opt (faux-classpath): New option.
971
972 2006-07-07 Tom Tromey <tromey@redhat.com>
973
974 * class.c (make_class_data): Set value for reflection_data field.
975 * decl.c (java_init_decl_processing): Add reflection_data field.
976
977 2006-07-07 Tom Tromey <tromey@redhat.com>
978
979 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
980 earlier.
981 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
982
983 2006-07-07 Andrew Haley <aph@redhat.com>
984
985 * jcf-parse.c (set_source_filename): Don't check for
986 CLASS_FROM_CURRENTLY_COMPILED_P.
987 Remove // comments.
988
989 2006-07-07 Andrew Haley <aph@redhat.com>
990
991 * java-tree.h (java_read_sourcefilenames): Declare.
992 * lang.c (java_handle_option): Call java_read_sourcefilenames().
993 * lang.opt (fsource-filename): New opt.
994 * lang-specs.h: Add -fsource-filename.
995 * jcf-parse.c (num_files, filenames): New variables.
996 (reverse, cmpstringp, java_read_sourcefilenames,
997 find_sourcefile): New.
998 (set_source_filename): Call find_sourcefile to find the real name
999 of a source file.
1000
1001 2006-06-27 Tom Tromey <tromey@redhat.com>
1002
1003 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
1004 Signature, LocalVariableTypeTable, annotation attributes.
1005 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
1006 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1007 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
1008 (HANDLE_METHOD): Likewise.
1009 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
1010 (print_annotation): New function.
1011 (print_element_value): Likewise.
1012 (indent): Likewise.
1013 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
1014 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
1015 (print_parameter_annotations): New function.
1016 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
1017 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
1018 Likewise.
1019 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
1020 (print_annotations): New function.
1021
1022 2006-06-23 Tom Tromey <tromey@redhat.com>
1023
1024 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
1025 emitting class files, always use 1.5.
1026 * gcj.texi (Input Options): Document -fsource.
1027 (Code Generation): Document -ftarget.
1028
1029 2006-06-21 Tom Tromey <tromey@redhat.com>
1030
1031 PR java/28089:
1032 * expr.c (expand_java_field_op): Initialize field's declaring
1033 class.
1034
1035 2006-06-20 Tom Tromey <tromey@redhat.com>
1036
1037 * expr.c (push_value): Always flush quick stack.
1038
1039 2006-06-19 Tom Tromey <tromey@redhat.com>
1040
1041 * expr.c (push_value): Also flush quick stack if value is a
1042 component_ref.
1043
1044 2006-06-19 Tom Tromey <tromey@redhat.com>
1045
1046 * expr.c (push_value): Flush quick stack if value has side
1047 effects.
1048
1049 2006-06-13 Tom Tromey <tromey@redhat.com>
1050
1051 * class.c (is_compiled_class): Explicitly check for current
1052 class.
1053
1054 2006-06-09 Tom Tromey <tromey@redhat.com>
1055
1056 * gjavah.c (decompile_method): Don't decompile a static field
1057 accessor method.
1058
1059 2006-06-06 Tom Tromey <tromey@redhat.com>
1060
1061 * lang-specs.h <jc1>: Add .jar file to command line if
1062 -fsaw-java-file. Also, remove -ffilelist-file in this case.
1063
1064 2006-06-05 Tom Tromey <tromey@redhat.com>
1065
1066 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1067 synthetic, enum, annotation.
1068 * jcf.h (ACC_BRIDGE): New macro.
1069 (ACC_VARARGS): Likewise.
1070 (ACC_SYNTHETIC): Likewise.
1071 (ACC_ENUM): Likewise.
1072 (ACC_ANNOTATION): Likewise.
1073
1074 2006-06-04 Tom Tromey <tromey@redhat.com>
1075
1076 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
1077 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
1078 and -ftarget.
1079 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
1080 when needed. Handle classpath-setting.
1081 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
1082 * lang-specs.h: Rewrote.
1083
1084 2006-06-04 Tom Tromey <tromey@redhat.com>
1085
1086 * jcf-io.c (find_class): Set source_ok to 0.
1087 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
1088 (parse_class_file): Don't call java_mark_class_local.
1089 (java_parse_file): Skip .java files. Call java_mark_class_local
1090 before lowering any code.
1091 (parse_zip_file_entries): Don't call duplicate_class_warning
1092 here.
1093 (process_zip_dir): ... call it here.
1094 * class.c (add_field): Don't mark field external if it is being
1095 compiled into this object.
1096 (make_class_data): Handle situation where class_dtable_decl is
1097 created before Class is compiled.
1098 (is_compiled_class): Don't assume files in zip are compiled into
1099 this object.
1100 (layout_class_method): Don't mark method external if it is being
1101 compiled into this object.
1102
1103 2006-06-04 Tom Tromey <tromey@redhat.com>
1104
1105 * jcf-path.c (jcf_path_compute): New function.
1106 * jcf.h (jcf_path_compute): Declare.
1107
1108 2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
1109
1110 * decl.c: Include langhooks.h.
1111 (builtin_function): Remove.
1112 (java_init_decl_processing): Replace calls to builtin_function
1113 with add_builtin_function.
1114 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
1115 (java/decl.o): Depend on langhooks.h.
1116 * java-tree.h (builtin_function): Remove.
1117
1118 2006-10-10 Brooks Moses <bmoses@stanford.edu>
1119
1120 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
1121
1122 2006-09-12 Tom Tromey <tromey@redhat.com>
1123
1124 * expr.c (push_value): Always flush quick stack.
1125
1126 2006-09-12 Tom Tromey <tromey@redhat.com>
1127
1128 PR java/29013:
1129 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
1130 the push of the called method's return result.
1131
1132 2006-09-12 Tom Tromey <tromey@redhat.com>
1133
1134 * jvspec.c (lang_specific_driver): Read spec file even if
1135 -fsyntax-only.
1136
1137 2006-09-12 Tom Tromey <tromey@redhat.com>
1138
1139 PR java/28754:
1140 * expr.c (expand_java_field_op): Initialize field's declaring
1141 interface if necessary.
1142
1143 2006-09-12 Tom Tromey <tromey@redhat.com>
1144
1145 PR java/28892:
1146 * expr.c (expand_java_field_op): No error for assignments not in
1147 class initializer or constructor.
1148
1149 2006-08-22 Andrew Haley <aph@redhat.com>
1150
1151 * decl.c (java_add_stmt): Give the statement list a type.
1152
1153 2006-08-16 Jakub Jelinek <jakub@redhat.com>
1154 Bryce McKinlay <bryce@mckinlay.net.nz>
1155
1156 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1157
1158 2006-08-10 Simon Martin <simartin@users.sourceforge.net>
1159
1160 PR java/8923
1161 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
1162 or '--' is used with a constant operand.
1163 (java_complete_lhs): When processing a '++' or '--' expression,
1164 don't call java_complete_tree but java_complete_lhs, so that a
1165 static final variable operand is never replaced by its value. This
1166 avoids an ICE later on.
1167 (patch_unaryop): Fixed typo in comment.
1168
1169 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1170
1171 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1172
1173 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
1174
1175 * builtins.c (check_for_builtin): If a builtin could result in a
1176 direct call being generated, don't use it if flag_indirect_dispatch
1177 is set.
1178
1179 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
1180
1181 * gcj.texi (Invocation): Corrections for Invocation API example.
1182
1183 2006-07-04 Andrew Haley <aph@redhat.com>
1184
1185 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
1186 entry.
1187
1188 2006-06-21 Andrew Haley <aph@redhat.com>
1189
1190 * java-tree.h (update_aliases): Remove
1191 * expr.c (expand_iinc): Remove call to update_aliases().
1192 (STORE_INTERNAL): Likewise.
1193 * decl.c (update_aliases, initialize_local_variable)
1194 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
1195
1196 2006-06-19 Andrew Haley <aph@redhat.com>
1197
1198 PR java/1305
1199 PR java/27908
1200 * expr.c (java_modify_addr_for_volatile): New function.
1201 (expand_java_field_op): Handle volatile fields.
1202 * java-gimplify.c (java_gimplify_component_ref): Call
1203 java_modify_addr_for_volatile to give the field_ref the correct
1204 volatile type.
1205 (java_gimplify_modify_expr): Likewise.
1206 * java-tree.h (java_modify_addr_for_volatile): New decl.
1207
1208 2006-06-17 Karl Berry <karl@gnu.org>
1209
1210 * gcj.texi (@dircategory): Use "Software development" instead
1211 of "Programming", following the Free Software Directory.
1212
1213 2006-06-16 Andrew Haley <aph@redhat.com>
1214
1215 * class.c (make_class_data): When using flag_indirect_classes,
1216 don't initialize the vtable of Class instances.
1217
1218 2006-06-09 Andrew Haley <aph@redhat.com>
1219
1220 PR java/1305
1221 PR java/27908
1222 * builtins.c (initialize_builtins): Add __sync_synchronize().
1223 * class.c (add_field): Mark volatile fields.
1224 * java-gimplify.c (java_gimplify_expr): Call new functions to
1225 handle self-modifying exprs and COMPONENT_REFs.
1226 (java_gimplify_component_ref): New.
1227 (java_gimplify_modify_expr): Add handling for volatiles.
1228
1229 2006-06-08 Tom Tromey <tromey@redhat.com>
1230
1231 * gcj.texi (libgcj Runtime Properties): Document
1232 gnu.gcj.user.realname.
1233
1234 2006-06-08 Andrew Haley <aph@redhat.com>
1235
1236 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1237 get_symbol_table_index().
1238 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1239 private method.
1240 (build_known_method_ref): New arg: special. Pass it to
1241 get_symbol_table_index.
1242 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1243 the method list.
1244 (build_invokevirtual): New arg: special. Pass it to
1245 get_symbol_table_index.
1246 (expand_invoke): New variable: special.
1247 Pass it to maybe_rewrite_invocation().
1248 Pass it to build_known_method_ref().
1249 * class.c (build_symbol_entry): Add new arg: special. Use it to
1250 build the symbol table conbstructor.
1251 (emit_symbol_table): Extract SPECIAL from the method list and pass
1252 it to build_symbol_entry().
1253 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1254 special accordingly.
1255
1256 2006-06-06 David Daney <ddaney@avtrex.com>
1257
1258 * gcj.texi (libgcj Runtime Properties): Document
1259 gnu.gcj.runtime.NameFinder.show_raw and
1260 gnu.gcj.runtime.NameFinder.remove_unknown.
1261
1262 2006-06-06 Tom Tromey <tromey@redhat.com>
1263
1264 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1265 synthetic, enum, annotation.
1266 * jcf.h (ACC_BRIDGE): New macro.
1267 (ACC_VARARGS): Likewise.
1268 (ACC_SYNTHETIC): Likewise.
1269 (ACC_ENUM): Likewise.
1270 (ACC_ANNOTATION): Likewise.
1271
1272 2006-06-06 Mike Stump <mrs@apple.com>
1273
1274 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
1275 installing during build.
1276
1277 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
1278
1279 * gcj.texi (Extensions): Document the new gcj-dbtool-based
1280 classname-to-library resolution mechanism.
1281 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
1282 mechanism deprecated.
1283 (libgcj Runtime Properties): Document
1284 gnu.gcj.runtime.VMClassLoader.library_control's new default.
1285
1286 2006-05-29 Jakub Jelinek <jakub@redhat.com>
1287
1288 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
1289 bit wide type.
1290 (jword): Define to uint64 on 64-bit arches.
1291 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
1292
1293 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
1294
1295 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
1296 typos.
1297
1298 2006-05-26 Tom Tromey <tromey@redhat.com>
1299
1300 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
1301 * verify-glue.c (vfy_class_type): New function.
1302 * verify-impl.c (check_constant): Allow 'ldc class'.
1303 * verify.h (vfy_class_type): Declare.
1304
1305 2006-05-25 Andrew Haley <aph@redhat.com>
1306
1307 PR java/27756
1308 * decl.c (maybe_pushlevels): When variable ranges are non-nested
1309 update all lifetimes, not just the first one.
1310
1311 2006-05-24 Tom Tromey <tromey@redhat.com>
1312
1313 * java-tree.h: Fixed flag documentation.
1314
1315 2006-05-24 Tom Tromey <tromey@redhat.com>
1316
1317 PR libgcj/27729:
1318 * jcf.h (ACC_INVISIBLE): Changed value.
1319
1320 2006-05-24 Andrew Haley <aph@redhat.com>
1321
1322 PR java/27754
1323 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
1324 COMPOUND_EXPR.
1325
1326 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1327
1328 * lang.opt (femit-class-file): Remove VarExists.
1329
1330 2006-05-16 Tom Tromey <tromey@redhat.com>
1331
1332 * verify-impl.c (verify_instructions_0) <op_return>: Special case
1333 for Object.<init>.
1334
1335 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1336
1337 PR driver/26885
1338 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
1339 $(GCC_OBJS).
1340
1341 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
1342
1343 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
1344 (java/expr.o): Replace target.h with $(TARGET_H).
1345 (java/parse.o): Likewise.
1346
1347 2006-05-10 Andrew Haley <aph@redhat.com>
1348
1349 * class.c (emit_indirect_register_classes): Fix comment.
1350
1351 2006-05-04 Tom Tromey <tromey@redhat.com>
1352
1353 * java-tree.h (uses_jv_markobj_p): Declare.
1354 * class.c (uses_jv_markobj_p): Removed.
1355 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
1356 (get_boehm_type_descriptor): Use it.
1357 (uses_jv_markobj_p): Moved from class.c. Return bool.
1358
1359 2006-05-04 Tom Tromey <tromey@redhat.com>
1360
1361 * java-tree.def (THIS_EXPR): Now a tcc_expression.
1362
1363 2006-05-04 Andrew Haley <aph@redhat.com>
1364
1365 * class.c (make_field_value): Always build_address_of fdecl if
1366 there is an initializer.
1367
1368 2006-05-03 Andrew Haley <aph@redhat.com>
1369
1370 PR libgcj/27352
1371 * expr.c (maybe_rewrite_invocation): New function.
1372 (rewrite_arglist_getclass): Likewise.
1373 (rules): New.
1374 (expand_invoke): Call maybe_rewrite_invocation.
1375 * parse.y (patch_invoke): Likewise.
1376 * java-tree.h: (maybe_rewrite_invocation): New function.
1377
1378 2006-04-21 Andrew Haley <aph@redhat.com>
1379
1380 * lang.c (java_init): Handle flag_indirect_classes.
1381 * jvgenmain.c: Use "class$$" instead of "class$".
1382 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
1383 DECLs.
1384 (mangle_class_field): Special case "class$$" as well as "class$".
1385 * constants.c (build_ref_from_constant_pool): If
1386 flag_indirect_classes, generate a ref into the heap.
1387 * decl.c (constants_field_decl_node,
1388 constants_data_field_decl_node): New.
1389 * class.c (build_static_class_ref): New.
1390 (build_classdollar_field): Factor out from build_class_ref().
1391 (make_field_value): Handle static fields in heap.
1392 (make_class_data): Make sure we get a static ref to class.
1393 Make class initializer const if flag_indirect_classes.
1394 (register_class): Build a class_ref for initialization if
1395 flag_indirect_classes.
1396 (emit_indirect_register_classes): New.
1397
1398 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
1399
1400 * expr.c, gjavah.c: Fix comment typos.
1401
1402 2006-04-03 Andrew Haley <aph@redhat.com>
1403
1404 PR java/26858
1405 * expr.c (build_field_ref): Don't check the field offset if
1406 flag_syntax_only.
1407
1408 2006-03-30 Andrew Haley <aph@redhat.com>
1409
1410 PR java/26858
1411 * lang.c (java_attribute_table): New.
1412 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
1413 * expr.c (build_field_ref): Add a null pointer check for all
1414 fields of offset > 4k. Don't do so for accesses via the this
1415 pointer, which we know can never be null.
1416 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
1417 methods nonnull.
1418
1419 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
1420
1421 * Make-lang.in: Rename docdir to gcc_docdir.
1422
1423 2006-03-30 Tom Tromey <tromey@redhat.com>
1424
1425 PR java/26042:
1426 * parse.y (java_reorder_fields): Reset superclass field's size as
1427 well.
1428
1429 2006-03-28 Tom Tromey <tromey@redhat.com>
1430
1431 PR java/26390:
1432 * parse.y (find_most_specific_methods_list): Added 'class'
1433 argument.
1434 (lookup_method_invoke): Updated.
1435
1436 2006-03-15 Tom Tromey <tromey@redhat.com>
1437
1438 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
1439 non-static method calls.
1440
1441 2006-03-15 David Daney <ddaney@avtrex.com>
1442
1443 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
1444 declaration.
1445
1446 2006-03-15 David Daney <ddaney@avtrex.com>
1447
1448 * lang.opt (-freduced-reflection): New option.
1449 * lang.c (java_post_options): Generate an error if
1450 -freduced-reflection used with -fjni or -findirect-dispatch.
1451 * java-tree.h (flag_reduced_reflection): Declare new variable.
1452 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
1453 if bitmap overflows and flag_reduced_reflection set.
1454 * class.c (uses_jv_markobj_p): New function.
1455 (make_class_data): Moved generation of vtable to before
1456 reflection data, generate less reflection data if
1457 flag_reduced_reflection set.
1458 * gcj.texi: Document -freduced-reflection.
1459
1460 2006-03-15 Tom Tromey <tromey@redhat.com>
1461
1462 PR java/26638:
1463 * class.c (get_interface_method_index): Don't put <clinit> into
1464 interface table.
1465
1466 2006-03-15 Tom Tromey <tromey@redhat.com>
1467
1468 * parse.y (analyze_clinit_body): Ignore empty statements.
1469
1470 2006-03-08 David Daney <ddaney@avtrex.com>
1471
1472 * gcj.texi: Document -static-libgcj option.
1473
1474 2006-02-20 Andrew Haley <aph@redhat.com>
1475
1476 * jcf-parse.c (parse_class_file): Set input_location from
1477 current_class.
1478
1479 2006-02-15 Andrew Haley <aph@redhat.com>
1480
1481 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
1482 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
1483 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
1484
1485 2006-02-09 Andrew Haley <aph@redhat.com>
1486
1487 PR java/26192
1488 * expr.c (expand_invoke): Allow methods in arrays to be resolved
1489 in their superclass.
1490
1491 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
1492 array types.
1493
1494 2006-02-08 Tom Tromey <tromey@redhat.com>
1495
1496 PR java/22578:
1497 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
1498 * builtins.c (convert_real): New function.
1499 (java_builtins): Handle Float.intBitsToFloat,
1500 Float.floatToRawIntBits, Double.longBitsToDouble,
1501 Double.doubleToRawLongBits.
1502
1503 2006-02-07 Andrew Haley <aph@redhat.com>
1504
1505 * expr.c (expand_invoke): (BC mode.) If we find a method in a
1506 class other than the one in which we expected to find it, ignore
1507 the result.
1508
1509 PR java/25535
1510 * constants.c (build_constants_constructor): move initializer into
1511 first halfword on a 64-bit big-endian machine.
1512
1513 2006-02-04 Tom Tromey <tromey@redhat.com>
1514
1515 PR java/25676:
1516 * builtins.c (max_builtin): Skip floating point 'max'.
1517 (min_builtin): Skip floating point 'min'.
1518 (check_for_builtin): Never return NULL_TREE.
1519
1520 2006-02-04 Tom Tromey <tromey@redhat.com>
1521
1522 PR java/26097:
1523 * expr.c (push_type): Avoid side effect in gcc_assert.
1524
1525 2006-02-04 Roger Sayle <roger@eyesopen.com>
1526
1527 * decl.c (java_init_decl_processing): Create char_type_node as a
1528 regular INTEGER_TYPE node.
1529 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
1530 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
1531 test for char_type_node and promoted_char_type_node as special
1532 instances of INTEGER_TYPE tree codes.
1533 (promote_type,build_java_signature): Likewise.
1534 * jcf-write.c (adjust_typed_op): Likewise.
1535 * mangle.c (mangle_type): Likewise.
1536 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
1537 * parse.h (JINTEGRAL_TYPE_P): Likewise.
1538
1539 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
1540
1541 * expr.c (java_stack_swap): Revert gcc_assert patch.
1542
1543 2006-02-03 Ben Elliston <bje@au.ibm.com>
1544
1545 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
1546 * typeck.c: Likewise.
1547 * verify-impl.c: Likewise.
1548 * class.c: Likewise.
1549 * decl.c: Likewise.
1550 * jcf-parse.c: Likewise.
1551 * constants.c: Likewise.
1552 * check-init.c: Likewise.
1553 * jcf-write.c: Likewise.
1554 * verify-glue.c: Likewise.
1555 * mangle.c: Likewise.
1556 * expr.c: Likewise.
1557 * lang.c: Likewise.
1558 * boehm.c: Likewise.
1559
1560 2006-02-01 Jan Hubicka <jh@suse.cz>
1561
1562 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
1563 * lang.c (java_init_options): Set no_unit_at_a_time_default.
1564
1565 2006-01-30 Andrew Haley <aph@redhat.com>
1566
1567 PR java/21428
1568 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
1569
1570 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
1571
1572 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
1573 Update copyright notice dates.
1574
1575 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1576
1577 * jvspec.c (lang_specific_spec_functions): Remove.
1578
1579 2006-01-06 Tom Tromey <tromey@redhat.com>
1580
1581 * gcj.texi (Arrays): Added more documentation for
1582 JvNewObjectArray.
1583 (Primitive types): Correct information about primitive classes.
1584 (Reference types): New node.
1585 (Index): New node.
1586
1587 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
1588
1589 * jcf-parse.c (set_source_filename): Set the decl source location
1590 even when returning early.
1591
1592 2005-12-15 Tom Tromey <tromey@redhat.com>
1593 Andrew Haley <aph@redhat.com>
1594
1595 PR java/25429
1596 * parse.y (resolve_expression_name): Don't generate accessor
1597 methods for constant fields.
1598
1599 2005-12-13 Andrew Haley <aph@redhat.com>
1600
1601 PR java/25366
1602 PR java/25368
1603 * class.c (maybe_layout_super_class): Update current_class before
1604 calling do_resolve_class.
1605
1606 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
1607
1608 PR java/25330
1609 * jcf-write.c (write_classfile): Use PID in temporary class
1610 file. Save/restore errno when reporting error.
1611
1612 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
1613
1614 PR java/9861
1615 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
1616 to bare_function_type and including the return type
1617 * builtins.c (initialize_builtins) : Change builtin mangled name
1618 constants to conform to new mangling scheme
1619
1620 2005-12-08 Andrew Haley <aph@redhat.com>
1621
1622 PR libgcj/25265
1623 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
1624 (soft_abstractmethod_node): New.
1625 * expr.c (build_field_ref): Add in-line check for missing field.
1626 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
1627
1628 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1629
1630 * Make-lang.in (java.all.build, java.install-normal): Remove.
1631
1632 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1633
1634 * Make-lang.in: Remove all dependencies on s-gtype, except for
1635 gt-java-parse.h.
1636
1637 2005-12-07 Richard Sandiford <richard@codesourcery.com>
1638
1639 * class.c (build_utf8_ref, emit_register_classes): Use
1640 switch_to_section and get_section.
1641
1642 2005-12-06 Tom Tromey <tromey@redhat.com>
1643
1644 PR java/25283:
1645 * parse.y (patch_new_array_init): Revert previous patch.
1646 (lookup_method_invoke): Use size-less array type when creating an
1647 anonymous constructor.
1648
1649 2005-12-05 Tom Tromey <tromey@redhat.com>
1650
1651 * parse.y (patch_new_array_init): Don't set length on array.
1652
1653 2005-12-02 Richard Guenther <rguenther@suse.de>
1654
1655 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
1656 buildN instead of build.
1657 * class.c (finish_class): Likewise.
1658 * expr.c (java_create_object): Likewise.
1659
1660 2005-11-28 Tom Tromey <tromey@redhat.com>
1661
1662 PR java/18278:
1663 * expr.c (build_jni_stub): Unwrap the return value.
1664 * java-tree.h (soft_unwrapjni_node): New define.
1665 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
1666 * decl.c (java_init_decl_processing): Initialize
1667 soft_unwrapjni_node.
1668
1669 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
1670
1671 * gcj.texi (gij options): Add -Xss documentation.
1672
1673 2005-11-08 Wil Mahan <wmahan@gmail.com>
1674
1675 PR java/23617
1676 * zextract.c (read_zip_archive): Fix out of memory error when
1677 reading jar files with zip-style comments.
1678
1679 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
1680
1681 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
1682 formats.
1683 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
1684
1685 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
1686 Wil Mahan <wmahan@gmail.com>
1687
1688 PR java/23620
1689 * class.c (make_class): Create empty binfo here.
1690 (set_super_info): Only create binfo if we have superclasses.
1691
1692 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
1693
1694 PR java/24127
1695 * parse.y (method_header): Make the result of the rule a NULL_TREE
1696 when a parsing error occurs.
1697
1698 2005-09-29 Tom Tromey <tromey@redhat.com>
1699
1700 PR java/24120:
1701 * jcf-io.c (memoized_dirlist_hash): New function.
1702 (caching_stat): Use it.
1703
1704 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
1705
1706 PR java/21418
1707 * class.c (inherits_from_p): Try to lay out super class
1708 if it is not already laid out.
1709 (maybe_layout_super_class): Handle the case where SUPER_CLASS
1710 is a NULL_TREE.
1711
1712 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
1713
1714 * builtins.c (max_builtin, min_builtin, abs_builtin,
1715 java_build_function_call_expr): Use fold_buildN.
1716 * class.c (layout_class_method): Likewise.
1717 * expr.c (java_truthvalue_conversion, build_java_jsr,
1718 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
1719 build_java_binop, build_field_ref, expand_compare,
1720 build_known_method_ref, build_invokevirtual,
1721 process_jvm_instruction): Likewise.
1722 * parse.y (patch_binop, patch_exit_expr): Likewise.
1723 * typeck.c (convert_ieee_real_to_integer): Likewise.
1724 (convert): Don't call fold after convert_ieee_real_to_integer.
1725
1726 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
1727
1728 PR java/23891
1729 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
1730 the newly created type. Set import lists here, not in create_class.
1731 (jdep_resolve_class): Set current_class.
1732 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
1733 the current package context, not ctxp->package.
1734 (cicp_cache): Removed.
1735 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
1736 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
1737 * java-tree.h (TYPE_PACKAGE): New macro.
1738 (struct lang_type): New member 'package'.
1739
1740 2005-09-09 Andrew Haley <aph@redhat.com>
1741
1742 PR libgcj/23182
1743 * expr.c (pop_type_0): If the expected type is object or ptr
1744 (i.e. void*), return the type of the object we just popped from
1745 the stack.
1746
1747 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
1748
1749 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
1750 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
1751
1752 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
1753
1754 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
1755 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
1756 typos. Follow spelling conventions.
1757
1758 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
1759
1760 PR java/23431
1761 * typeck.c (lookup_do): Look up interfaces for the original class,
1762 not the base class.
1763 * parse.y (java_check_regular_methods): Fix diagnostic message for
1764 more restrictive overriding of a method from an interface.
1765
1766 2005-08-16 Tom Tromey <tromey@redhat.com>
1767
1768 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
1769 class' initial state.
1770
1771 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
1772
1773 PR java/22113
1774 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
1775 `literal_token' for large numeric input tokens.
1776
1777 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
1778
1779 PR java/19870
1780 * parse.y (nested_field_access_p): Rename to nested_member_access_p
1781 and expand to handle method accesses across nested classes.
1782 (build_outer_method_access_method): Rename to
1783 build_nested_method_access_method. Minor adjustments to comments.
1784 (resolve_expression_name): Use the newly-renamed
1785 nested_member_access_p method.
1786 (resolve_qualified_expression_name): Likewise.
1787 (patch_method_invocation): Also consider static methods for access
1788 method generation. Minor adjustments to comments.
1789 (maybe_use_access_method): Use the more general
1790 nested_memeber_access_p to determine access across nested class
1791 boundaries. Allow THIS_ARG to be NULL (for static methods).
1792
1793 2005-08-15 Tom Tromey <tromey@redhat.com>
1794
1795 PR java/23300.
1796 * expr.c (build_field_ref): Don't generate otable reference when
1797 DECL_FIELD_OFFSET is 0.
1798 * class.c (maybe_layout_super_class): Pass outer class to
1799 do_resolve_class.
1800
1801 2005-08-15 Tom Tromey <tromey@redhat.com>
1802
1803 * java-tree.h (LABEL_IN_SUBR): Removed.
1804 (LABEL_IN_SUBR): Likewise.
1805 (LABEL_IS_SUBR_START): Likewise.
1806 (LABEL_SUBR_START): Likewise.
1807 (LABEL_SUBR_CONTEXT): Likewise.
1808 (LABEL_CHANGED): Likewise.
1809 (LABEL_RETURN_LABEL): Likewise.
1810 (LABEL_RETURN_TYPE_STATE): Likewise.
1811 (LABEL_RETURN_LABELS): Likewise.
1812 (RETURN_MAP_ADJUSTED): Likewise.
1813 (LABEL_PENDING_CHAIN): Likewise.
1814
1815 2005-08-15 Tom Tromey <tromey@redhat.com>
1816
1817 * Make-lang.in (JAVA_OBJS): Removed verify.o
1818 (java/verify.o): Removed.
1819 * verify.c: Removed.
1820 * lang.c (flag_new_verifier): Removed.
1821 (java_post_options): Updated.
1822 * java-tree.h (flag_new_verifier): Removed.
1823 (verify_jvm_instructions): Removed.
1824 * expr.c (pop_type_0): Assume flag_new_verifier is true.
1825 (build_java_check_indexed_type): Likewise.
1826 (expand_java_arraystore): Likewise.
1827 (expand_java_arrayload): Likewise.
1828 (pop_arguments): Likewise.
1829 (expand_byte_code): Likewise.
1830 (process_jvm_instruction): Likewise.
1831
1832 2005-08-10 Andrew Haley <aph@redhat.com>
1833
1834 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
1835 type mismatches to make legal GIMPLE.
1836
1837 2005-08-10 Robin Green <greenrd@greenrd.org>
1838
1839 PR java/23230:
1840 * parse.y (maybe_use_access_method): Generalize check from
1841 java.lang.Object to any superclass of current_class
1842
1843 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
1844
1845 * class.c (build_class_ref): Wrap the primary class type in a
1846 NOP_EXPR.
1847 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
1848 primary class type from the NOP_EXPR in which it was placed.
1849
1850 2005-07-28 Diego Novillo <dnovillo@redhat.com>
1851
1852 * expr.c (expand_load_internal): Fix missing parens in
1853 predicate.
1854
1855 2005-07-28 Andrew Haley <aph@redhat.com>
1856
1857 * expr.c (expand_load_internal): Convert to destination type.
1858
1859 2005-07-22 Manfred Hollstein <mh@suse.com>
1860
1861 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
1862 (check_constant): Likewise.
1863 (check_wide_constant): Likewise.
1864
1865 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
1866
1867 Make CONSTRUCTOR use VEC to store initializers.
1868 * check-init.c (check_init): Update to cope with VEC in
1869 CONSTRUCTOR_ELTS.
1870 * class.c (make_field_value, make_method_value, get_dispatch_table,
1871 make_class_data, emit_symbol_table, emit_catch_table,
1872 emit_assertion_table): Use build_constructor_from_list instead of
1873 build_constructor.
1874 * constants.c (build_constants_constructor): Likewise.
1875 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
1876 VEC in CONSTRUCTOR_ELTS.
1877 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
1878 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
1879 of a TREE_LIST.
1880 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
1881 CONSTRUCTOR_ELTS.
1882 * parse.y (build_new_array_init): Use build_constructor_from_list
1883 instead of build_constructor.
1884 (patch_new_array_init): Update to cope with VEC in
1885 CONSTRUCTOR_ELTS.
1886 (array_constructor_check_entry): Likewise.
1887
1888 2005-07-12 Tom Tromey <tromey@redhat.com>
1889
1890 * jvspec.c (lang_specific_driver): Put filelist_filename first on
1891 command line.
1892
1893 2005-07-12 Tom Tromey <tromey@redhat.com>
1894
1895 PR java/19674:
1896 * parse-scan.y (interface_member_declaration): Added
1897 empty_statement.
1898
1899 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
1900
1901 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
1902 (LABEL_PENDING_CHAIN): Ditto.
1903 (LABEL_PC): Ditto.
1904 (DECL_BIT_INDEX): Ditto.
1905
1906 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
1907
1908 PR java/18119
1909 * parse.y (inner_class_accessible): New function. Logic moved from
1910 check_inner_class_access.
1911 (check_inner_class_access): Use inner_class_accessible.
1912 (resolve_inner_class): Simplify arguments. Create circularity hash
1913 here. Keep looking for classes if we found one that was inaccessible.
1914 Return the inaccessible class only if there is no other match.
1915 (do_resolve_class): Update for new resolve_inner_class arguments.
1916 Don't create circularity_hash here.
1917
1918 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
1919
1920 PR java/21045
1921 * parse.y (add_exception_to_throws): New function.
1922 (purge_unchecked_exceptions): Removed.
1923 (get_constructor_super): Renamed from verify_constructor_super. Now
1924 returns the super constructor after verification.
1925 (java_complete_expand_method): Don't use purge_unchecked_exceptions
1926 or save/restore the exception list.
1927 (check_thrown_exceptions): Add uncaught exceptions in anonymous
1928 class initializers and constructors to the throws clause of the method.
1929
1930 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
1931
1932 PR java/19674
1933 * parse.y (interface_member_declaration): Allow empty statements in
1934 interface declarations.
1935
1936 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
1937
1938 * Makefile.in (parse.o): Adjust dependencies.
1939 * parse.y: Include tree-dump.h.
1940
1941 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
1942
1943 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
1944 flag for quoting.
1945
1946 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
1947
1948 * parse.y (issue_warning_error_from_context): Call
1949 pp_output_formatted_text to be able to get the buffer.
1950
1951 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
1952
1953 * parse.y (issue_warning_error_from_context): Update for the
1954 renaming of pp_format_text to pp_format.
1955
1956 2005-06-28 Paul Brook <paul@codesourcery.com>
1957
1958 * decl.c (java_init_decl_processing): Call
1959 default_init_unwind_resume_libfunc.
1960
1961 2005-06-27 Tom Tromey <tromey@redhat.com>
1962
1963 PR java/21540, PR java/13788:
1964 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
1965 fold_constant_for_init.
1966 (patch_binop): Added 'folding' argument. Updated all callers.
1967 (patch_unaryop) <NOP_EXPR>: New case.
1968 (fold_constant_for_init) <NOP_EXPR>: Likewise.
1969 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
1970
1971 2005-06-25 Jan Hubicka <jh@suse.cz>
1972
1973 * builtins.c (define_builtin): Accept new flags parameter.
1974 (initialize_builtins): Mark the builtins const and nothrow accordingly.
1975
1976 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
1977
1978 * all files: Update FSF address in copyright headers.
1979
1980 2005-06-24 Tom Tromey <tromey@redhat.com>
1981
1982 * verify-impl.c (verify_instructions_0): Correctly handle
1983 situation where PC falls off end.
1984
1985 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
1986
1987 PR java/20697
1988 * parse.y (find_most_specific_methods_list): Remove special case for
1989 inner classes.
1990
1991 2005-06-15 Tom Tromey <tromey@redhat.com>
1992
1993 PR libgcj/21906:
1994 * class.c (make_method_value): Use soft_abstractmethod_node for
1995 abstract method.
1996 * java-tree.h (soft_abstractmethod_node): New define.
1997 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
1998 * decl.c (java_init_decl_processing): Initialize
1999 soft_abstractmethod_node.
2000
2001 2005-06-13 Geoffrey Keating <geoffk@apple.com>
2002
2003 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
2004
2005 2005-06-13 Per Bothner <per@bothner.com>
2006
2007 * expr.c (int highest_label_pc_this_method,
2008 start_label_pc_this_method): New globals.
2009 (lookup_label): Add start_label_pc_this_method to pc for label, and
2010 update highest_label_pc_this_method. This prevents conflicts between
2011 labels from different methods.
2012 * java-tree.h: Declare new globals.
2013 * jcf-parse.c (parse_class_file): If needed bump
2014 start_label_pc_this_method and reset highest_label_pc_this_method.
2015
2016 2005-06-13 Tom Tromey <tromey@redhat.com>
2017
2018 PR java/21844:
2019 * parse.y (nested_field_access_p): Handle case where outer field
2020 is inherited by enclosing class.
2021
2022 2005-06-12 Per Bothner <per@bothner.com>
2023
2024 * class.c (inherits_from_p): Do load_class if needed.
2025
2026 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2027
2028 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
2029 * java-tree.h (parse_error_context): Move...
2030 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
2031 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
2032 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
2033
2034 2005-06-08 Roger Sayle <roger@eyesopen.com>
2035
2036 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
2037
2038 2005-06-06 Jakub Jelinek <jakub@redhat.com>
2039
2040 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
2041 msgid for argument name.
2042 * gjavah.c (error): Likewise.
2043 * java-tree.h (parse_error_context): Likewise.
2044 * parse.y (parse_error_context, parse_warning_context,
2045 issue_warning_error_from_context): Likewise.
2046
2047 2005-06-01 Tom Tromey <tromey@redhat.com>
2048
2049 PR java/21722:
2050 * class.c (build_static_field_ref): Don't fold constant fields if
2051 current class is from a .class file and we're using indirect
2052 dispatch.
2053
2054 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2055
2056 * java/verify-glue.c: Don't include errors.h and include toplev.h.
2057 * java/Make-lang.in: Updates dependencies.
2058
2059 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
2060
2061 PR java/19870.
2062 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
2063 NESTED_FIELD_ACCESS_IDENTIFIER_P.
2064 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
2065 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
2066 * jcf-write.c (generate_classfile): Use
2067 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2068 OUTER_FIELD_ACCESS_IDENTIFIER_P.
2069 * parse.y (build_outer_field_access): Rename to
2070 build_nested_field_access. Support static fields and outer-to-inner
2071 class accesses.
2072 (outer_field_access_p): Rename to nested_field_access_p. Support
2073 static fields and generalise to outer-to-inner class and sibling
2074 inner class accesses.
2075 (outer_field_expanded_access_p): Rename to
2076 nested_field_expanded_access_p and support static fields.
2077 (outer_field_access_fix): Rename to nested_field_access_fix and
2078 support static fields.
2079 (build_outer_field_access_expr): Rename to
2080 build_nested_field_access_expr and support static fields.
2081 (build_outer_field_access_methods): Rename to
2082 build_nested_field_access_methods and support static fields. For
2083 static fields, generate accessors without class instance parameters.
2084 (build_outer_field_access_method): Rename to
2085 build_nested_field_access_method and support static fields.
2086 (build_outer_method_access_method): Use
2087 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2088 OUTER_FIELD_ACCESS_IDENTIFIER_P.
2089 (resolve_expression_name): Consider static field accesses across
2090 nested classes.
2091 (resolve_qualified_expression_name): Likewise.
2092 (java_complete_lhs): Use nested_field_access_fix instead of
2093 outer_field_access_fix.
2094 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
2095 Use nested_field_expanded_access_p instead of
2096 outer_field_expanded_access_p. Use nested_field_access_fix instead
2097 of outer_field_access_fix.
2098 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
2099 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
2100
2101 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
2102
2103 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
2104 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
2105 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
2106 MINOR_BINARYCOMPAT_ABI_VERSION): New.
2107 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
2108 (parse_version): Calculate version ID using new method. Use bit-flags
2109 for flag_indirect_dispatch and flag_bootstrap_classes.
2110
2111 2005-05-25 Richard Henderson <rth@redhat.com>
2112
2113 PR libgcj/21692
2114 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
2115 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
2116 DECL_CONTEXT; avoid pushdecl_top_level.
2117 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
2118 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
2119 (layout_class_method): Likewise.
2120 * decl.c (java_mark_cni_decl_local): New.
2121 (java_mark_class_local): Use it.
2122 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
2123 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
2124 (struct lang_decl_func): Add local_cni;
2125 (struct lang_decl_var): Add class_field, vtable.
2126 (java_mangle_decl): Declare.
2127 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
2128 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
2129 (mangle_obstack_1): New.
2130 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
2131 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
2132 lhd_set_decl_assembler_name for things that don't need mangling.
2133 (mangle_class_field): Rename from java_mangle_class_field, make
2134 static, don't call init_mangling or finish_mangling.
2135 (mangle_vtable): Similarly.
2136 (mangle_local_cni_method_decl): New.
2137 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
2138 gcc_assert, and MANGLE_RAW_STRING.
2139 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
2140
2141 2005-05-25 DJ Delorie <dj@redhat.com>
2142
2143 * class.c (set_constant_value): Move warning control from if() to
2144 warning(OPT_*).
2145
2146 2005-05-24 Richard Henderson <rth@redhat.com>
2147
2148 * builtins.c (define_builtin): Don't call make_decl_rtl.
2149 * constants.c (build_constant_data_ref): Likewise.
2150 * class.c (build_utf8_ref): Likewise.
2151 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
2152 (get_dispatch_table, layout_class_method): Likewise.
2153 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
2154 by hand.
2155 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
2156 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
2157 to determine if we need a non-zero address.
2158 * decl.c (builtin_function): Don't call make_decl_rtl.
2159 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
2160 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
2161 * resource.c (compile_resource_data): Likewise.
2162 * parse.y (resolve_field_access): Re-word comment to avoid
2163 building DECL_RTL.
2164
2165 2005-05-24 Richard Henderson <rth@redhat.com>
2166
2167 * class.c (registered_class): Take it out of class_roots; turn into
2168 a vec of trees.
2169 (register_class): Make static. Don't duplicate decl node. Use
2170 VEC_safe_push.
2171 (emit_register_classes): Use VEC_iterate. Use output_constant
2172 instead of assemble_integer. Don't call mark_decl_referenced
2173 directly.
2174 * java-tree.h (register_class): Remove decl.
2175
2176 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
2177
2178 PR java/17845
2179
2180 * parse.y (register_package, package_list): Remove.
2181 (package_declaration): Do not call register_package.
2182 (do_resolve_class): Do not use package_list.
2183
2184 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
2185
2186 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
2187 unused variable.
2188
2189 2005-05-15 Tom Tromey <tromey@redhat.com>
2190
2191 PR java/21519:
2192 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
2193 NOTE_PUSH.
2194
2195 2005-05-12 Aaron Luchko <aluchko@redhat.com>
2196
2197 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
2198
2199 2005-05-11 Tom Tromey <tromey@redhat.com>
2200
2201 * gcj.texi (Code Generation): Document -fbootstrap-classes.
2202 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
2203 (parse_version): Use it.
2204 * lang.opt (-fbootstrap-classes): New option.
2205
2206 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
2207
2208 PR java/21436
2209 * class.c (maybe_layout_super_class): Look for imports in this_class.
2210 * parse.h (ctxp_for_generation_last): New.
2211 (do_resolve_class): Add a parameter.
2212 * parse.y (ctxp_for_generation_last): New.
2213 (java_pop_parser_context): Add at end of list.
2214 (find_in_imports, find_in_imports_on_demand): Look in ctxp
2215 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
2216 the given type are NULL.
2217 (do_resolve_class): Look into the imports of the new second parameter.
2218 Adjust recursive calls.
2219 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
2220 calls to do_resolve_class.
2221 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
2222 (java_complete_class): Do not do that here.
2223
2224 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
2225
2226 PR java/20309
2227 * Make-lang.in (java): Add gjnih.
2228 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2229 (GJNIH_OBJS): New variable.
2230 (gjnih$(exeext)): New target.
2231 (JAVA_MANFILES): Add gjnih.1.
2232 (java.uninstall): Add gjnih.1.
2233 (java.mostlyclean): Add gjnih.
2234 (java.maintainer-clean): Add gjnih.1.
2235 (java/gjavah-jni.o): New target.
2236 (.INTERMEDIATE): Add gjnih.pod.
2237 (gjnih.pod): New target.
2238 * config-lang.in (stagestuff): Add gjnih.
2239 * gcj.texi (Top): Add gjnih node.
2240 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
2241 -bootclasspath options.
2242 (Invoking gjnih): New node.
2243 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
2244 (TOOLNAME): New macro.
2245 (error): Replace hard-coded gcjh with TOOLNAME.
2246 (process_file): Likewise.
2247 (usage): Likewise.
2248 (version): Likewise.
2249 (help): Likewise. Add help output for -force, -old, -trace and -J
2250 options.
2251 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
2252 (options): Add force, old, trace and J fields.
2253 (main): Handle -force, -old, -trace and -J options.
2254
2255 2005-05-03 Tom Tromey <tromey@redhat.com>
2256
2257 PR java/21245:
2258 * gjavah.c (main): Unlink output file on error.
2259
2260 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
2261
2262 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
2263 copyright.
2264
2265 2005-04-29 Tom Tromey <tromey@redhat.com>
2266
2267 * expr.c (build_jni_stub): Updated for change to build_block.
2268
2269 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
2270
2271 * expr.c (force_evaluation_order): Declare 'saved' earlier.
2272
2273 2005-04-28 Andrew Haley <aph@redhat.com>
2274
2275 PR java/19285
2276 * java-tree.h (soft_resolvepoolentry_node): New.
2277 (alloc_constant_fieldref): Declare.
2278 * expr.c (expand_java_field_op): Don't call class_init for
2279 accesses to static fields with indirect dispatch.
2280 * builtins.c (initialize_builtins): Add "__builtin_expect".
2281 * decl.c (soft_resolvepoolentry_node): New variable.
2282 (java_init_decl_processing): Create a decl for
2283 "_Jv_ResolvePoolEntry".
2284 * class.c (build_fieldref_cache_entry): New function.
2285 (build_static_field_ref): Rewrite for indirect dispatch.
2286 * constants.c (find_name_and_type_constant_tree): New function.
2287 (alloc_constant_fieldref): Likewise.
2288 (build_constants_constructor): Handle CONSTANT_Fieldref and
2289 CONSTANT_NameAndType.
2290
2291 PR java/21115
2292 * expr.c (force_evaluation_order): Convert outgoing args smaller
2293 than integer.
2294
2295 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
2296
2297 * gcj.texi (libgcj Runtime Properties): Remove obsolete
2298 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
2299 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
2300
2301 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2302
2303 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
2304 to `unlock_stream' with `unlock_std_streams'.
2305
2306 2005-04-25 Jakub Jelinek <jakub@redhat.com>
2307
2308 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
2309 instead of just expr.h.
2310
2311 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2312
2313 * gjavah.c (main): Unlock the stdio streams.
2314 * jcf-dump.c (main): Likewise.
2315 * jv-scan.c (main): Likewise.
2316 * jvgenmain.c (main): Likewise.
2317
2318 2005-04-23 DJ Delorie <dj@redhat.com>
2319
2320 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
2321 parse.y: Adjust warning() callers.
2322
2323 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
2324
2325 * gcj.texi (Object fields): Change "Integer" to "Int" in example
2326 contructor.
2327
2328 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
2329
2330 * gcj.texi: Fix typos and bogus example.
2331
2332 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
2333
2334 * except.c: Fix a comment typo.
2335
2336 2005-04-19 Julian Brown <julian@codesourcery.com>
2337
2338 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
2339 indirect dispatch with PIC.
2340
2341 2005-04-18 Andrew Haley <aph@redhat.com>
2342
2343 * java-except.h (struct eh_range.handler): Remove unused field.
2344 (handle_nested_ranges): Remove function declaration.
2345 (sanity_check_exception_range): Add function declaration.
2346 * verify.c (verify_jvm_instructions): Remove call to
2347 handle_nested_ranges.
2348 * verify-glue.c (verify_jvm_instructions_new): Call
2349 sanity_check_exception_range.
2350 * except.c (link_handler, eh_range_freelist, link_handler,
2351 handle_nested_ranges): Remove.
2352 (add_handler): Rewrite.
2353 (sanity_check_exception_range): New function.
2354 (print_ranges): New function.
2355
2356 2005-04-13 Julian Brown <julian@codesourcery.com>
2357
2358 * decl.c (finish_method): Give methods once-only linkage.
2359
2360 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
2361
2362 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2363
2364 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2365
2366 * java-tree.h: Don't use PARAMS().
2367
2368 2005-04-07 Per Bothner <per@bothner.com>
2369
2370 * class.c (push_class): By default, suppress debug output.
2371 (finish_class): Enable debug output for classes we're emitting.
2372
2373 2005-04-07 Andrew Haley <aph@redhat.com>
2374
2375 * gcj.texi: Correct gcj-dbtool instructions.
2376
2377 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
2378
2379 * gcj.texi: Fix a typo.
2380 * lang.c: Fix a comment typo.
2381
2382 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
2383
2384 * gcj.texi (Invoking gij): Add descriptions of new -X options.
2385 Mention recognized-and-ignored compatibility options.
2386 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
2387 JvFree.
2388 (About CNI): Add Memory allocation section.
2389
2390 2005-04-01 Tom Tromey <tromey@redhat.com>
2391
2392 * decl.c (java_init_decl_processing): Fix types of
2393 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
2394 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
2395 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
2396
2397 2005-03-31 Jan Hubicka <jh@suse.cz>
2398
2399 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
2400 * class.c: Include cgraph.h
2401 (make_local_functoin_alias): Mark aslias as needed.
2402 * resource.c: Include cgraph.h
2403 (compile_resource_data): Go via cgraph interface.
2404
2405 2005-03-30 Ian Lance Taylor <ian@airs.com>
2406
2407 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
2408
2409 2005-03-30 Tom Tromey <tromey@redhat.com>
2410
2411 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
2412 inner_class_info_index==0 or outer_class_info_index==0.
2413
2414 2005-03-29 Tom Tromey <tromey@redhat.com>
2415
2416 * gcj.texi (libgcj Runtime Properties): Document
2417 gnu.gcj.runtime.endorsed.dirs.
2418
2419 2005-03-24 Anthony Green <green@redhat.com>
2420
2421 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
2422 'gcj-dbtool -p'.
2423
2424 2005-03-23 Tom Tromey <tromey@redhat.com>
2425
2426 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
2427 (parse_version): Use it.
2428
2429 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2430
2431 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2432
2433 2005-03-18 Andrew Haley <aph@redhat.com>
2434
2435 PR java/20522
2436 * decl.c (update_aliases): Don't update variables that are about
2437 to die.
2438 (maybe_poplevels): Add comment.
2439
2440 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
2441
2442 PR java/20502
2443 * jcf-parse.c (duplicate_class_warning): New function.
2444 (java_parse_file): Call duplicate_class_warning if
2445 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
2446 (parse_zip_file_entries): Likewise. Also set
2447 CLASS_FROM_CURRENTLY_COMPILED_P.
2448
2449 2005-03-16 Andrew Haley <aph@redhat.com>
2450
2451 * expr.c (expand_java_arrayload): Don't generate a
2452 NullPointerException based on the type of the node.
2453 (build_java_array_length_access): Likewise.
2454
2455 2005-03-15 Zack Weinberg <zack@codesourcery.com>
2456
2457 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
2458
2459 2005-03-11 Tom Tromey <tromey@redhat.com>
2460
2461 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
2462 (libgcj Runtime Properties): Document the default .db.
2463
2464 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
2465
2466 PR java/20312
2467 * parse.y (checks_throws_clauses): Check exceptions list even when
2468 the base class does not come from a source file being compiled.
2469 (java_complete_lhs): Remove unused variable 'wfl'.
2470
2471 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
2472
2473 PR java/20338
2474 * decl.c (finish_method): Emit _Jv_InitClass for private static
2475 methods inside inner classes as well.
2476
2477 2005-03-08 Julian Brown <julian@codesourcery.com>
2478 * Revert patch from 2005-03-08 for causing bootstrap failure on
2479 ppc-darwin.
2480
2481 2005-03-08 Julian Brown <julian@codesourcery.com>
2482
2483 * decl.c (finish_method): Give methods once-only linkage.
2484
2485 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
2486
2487 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
2488
2489 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
2490
2491 * verify-glue.c (vfy_is_assignable_from): Perform static check using
2492 can_widen_reference_to if the C++ ABI is in use.
2493 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
2494 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
2495 type_isresolved, init_state, set_pc, state_get_pc,
2496 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
2497 (verify_fail): Report the current PC from the verifier context.
2498 (free_state): Remove #if 0 block to enable this function.
2499 (free_verifier_context): Call free_state on state_list iterator
2500 values before freeing them.
2501 * expr.c (pop_type_0): Pop correct type for error message when stack
2502 contains a multi-word type.
2503
2504 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
2505
2506 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
2507 for known NULL array length access.
2508
2509 2005-03-07 Tom Tromey <tromey@redhat.com>
2510
2511 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
2512
2513 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
2514
2515 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
2516 typeck.c: Update copyright.
2517
2518 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
2519
2520 Remove xref code.
2521 * xref.c, xref.h: Remove file.
2522 * Make-lang.in (java/xref.o): Remove.
2523 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
2524 * lang.c (flag_emit_xref): Remove definition.
2525 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
2526 * typeck.c (convert): Remove use of do_not_fold.
2527 * parse.y (do_not_fold): Remove definition.
2528 (parser grammar): Remove xref code.
2529 (maybe_create_class_interface_decl, create_class): Likewise.
2530 (register_fields, method_header, finish_method_declaration): Likewise.
2531 (declare_local_variables, source_end_java_method): Likewise.
2532 (java_complete_expand_classes): Do not set do_not_fold.
2533 (java_complete_expand_method): Remove xref code.
2534 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
2535 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
2536 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
2537 (patch_synchronized_statement, patch_throw_statement): Likewise.
2538 (maybe_build_class_init_for_field): Likewise.
2539
2540 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
2541
2542 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
2543 instead of IS_NON_TYPE_CODE_CLASS.
2544
2545 2005-03-04 Andrew Haley <aph@redhat.com>
2546
2547 PR java/18362
2548 * class.c (set_method_index): Don't set method_index if it is
2549 NULL_TREE.
2550 (layout_class_method): Don't complain about "non-static method foo
2551 overrides static method" in the case of indirect dispatch.
2552
2553 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2554
2555 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
2556 warning.
2557 * Make-lang.in: Don't elide warnings in jcf-io.c.
2558
2559 2005-03-01 Per Bothner <per@bothner.com>
2560
2561 PR java/8608
2562 * check-init.c (wfl): Remove static.
2563 (final_assign_error, check_init): Replace calls to parse_error_context
2564 by plain error.
2565 (check_init): Save, set, and restore input_location for each exp.
2566
2567 2005-03-01 Per Bothner <per@bothner.com>
2568
2569 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
2570 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
2571 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
2572
2573 2005-03-01 Per Bothner <per@bothner.com>
2574
2575 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
2576
2577 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
2578
2579 PR libgcj/16923
2580 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
2581 JvVMOption.
2582
2583 2005-02-22 Tom Tromey <tromey@redhat.com>
2584
2585 PR java/20056:
2586 * verify-impl.c (EITHER): New define.
2587 (types_compatible): Handle it.
2588 (check_field_constant): Use it.
2589
2590 2005-02-18 Tom Tromey <tromey@redhat.com>
2591
2592 PR java/20056:
2593 * verify-impl.c (types_equal): Fixed test.
2594
2595 PR java/20056:
2596 * verify-glue.c (vfy_class_has_field): New function.
2597 * verify.h (vfy_class_has_field): Declare.
2598 * verify-impl.c (check_field_constant): Added 'putfield'
2599 argument.
2600 (verify_instructions_0): Updated.
2601 (types_equal): New function.
2602
2603 2005-02-14 Tom Tromey <tromey@redhat.com>
2604
2605 PR java/19921:
2606 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
2607 stack effect of multianewarray.
2608
2609 2005-02-14 Andrew Haley <aph@redhat.com>
2610
2611 PR java/19907
2612 * expr.c (expand_byte_code): Call promote_arguments().
2613 (promote_arguments): New function.
2614 * decl.c (check_local_unnamed_variable): Remove special case for
2615 new verifier.
2616 (find_local_variable): Promote all boolean types to int
2617 when searching for local variable decls.
2618
2619 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
2620
2621 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
2622 parse-scan.y: Update copyright.
2623
2624 2005-02-11 Per Bothner <per@bothner.com>
2625
2626 PR java/15543
2627 * parse-scan.y (input_location): Remove variable.
2628 (main_input_filename): New - replaces input_filename, which isn't
2629 settable if USE_MAPPED_LOCATION.
2630 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
2631 so we don't reference input_location or wfl_operator in that case.
2632 * jv-scan.c (expand_location): Remove - no longer used.
2633 (main): Set main_input_filename rather than input_filename.
2634
2635 2005-02-09 Richard Henderson <rth@redhat.com>
2636
2637 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
2638 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
2639
2640 2005-02-08 Marcin Dalecki <martin@dalecki.de>
2641
2642 * expr.c (add_type_assertion): Use the proper enumeration type,
2643 since this is what htab_find_slot() is expecting.
2644
2645 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
2646
2647 * gcj.texi: Update copyright dates.
2648
2649 2005-02-02 Tom Tromey <tromey@redhat.com>
2650
2651 * gcj.texi (libgcj Runtime Properties): Default library_control
2652 to 'cache'.
2653
2654 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
2655
2656 PR java/15543
2657 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
2658 (modifiers) when square brackets are present in a declaration for
2659 a final paramter.
2660 * jv-scan.c (main): Set input_filename and input_line.
2661
2662 2005-02-01 Tom Tromey <tromey@redhat.com>
2663
2664 PR java/19742:
2665 * gjavah.c (get_field_name): Don't override name for JNI header.
2666
2667 2005-02-01 Roger Sayle <roger@eyesopen.com>
2668
2669 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
2670 of unsigned types using iushr and lushr JVM bytecodes.
2671
2672 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
2673
2674 PR java/19738
2675 * gjavah.c (jni_print_float): Do not emit floating-point
2676 initialiser for a static final field.
2677 (jni_print_double): Likewise.
2678
2679 2005-02-01 Mark Mitchell <mark@codesourcery.com>
2680
2681 Revert:
2682 2005-01-31 Mark Mitchell <mark@codesourcery.com>
2683 * gjavah.c (print_field_info): Mark static data members of
2684 floating-point type with "__extension__".
2685
2686 2005-01-31 Mark Mitchell <mark@codesourcery.com>
2687
2688 * gjavah.c (print_field_info): Mark static data members of
2689 floating-point type with "__extension__".
2690
2691 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
2692
2693 PR java/9157
2694 * parse.y (build_string_concatenation): Remove redundant if.
2695 (patch_conditional_expr): Attempt to patch_string() the condition
2696 of a ?: as well, in addition to its other operands.
2697
2698 2005-01-25 Tom Tromey <tromey@redhat.com>
2699
2700 * Make-lang.in (java/java-tree-inline.o): Removed.
2701
2702 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
2703
2704 PR java/19070
2705 * parse.y (patch_binop): Allow comparisons against NULL only
2706 if the other operand is of a reference type.
2707
2708 2005-01-24 Tom Tromey <tromey@redhat.com>
2709
2710 * java-tree.h (gcj_abi_version): Declare.
2711 * class.c (make_class_data): Push gcj_abi_version into "next"
2712 field. Renamed field.
2713 * decl.c (gcj_abi_version): New global.
2714 (parse_version): New function.
2715 (java_init_decl_processing): Call it. Renamed 'next' field.
2716 Include version.h.
2717 (GCJ_BINARYCOMPAT_ADDITION): New define.
2718
2719 2005-01-24 Roger Sayle <roger@eyesopen.com>
2720
2721 PR java/19295
2722 * jcf-write.c (generate_bytecode_insns): Conversions between
2723 integer types of the same precision shouldn't generate widening
2724 or narrowing conversion bytecodes.
2725
2726 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
2727
2728 * java-except.h, java-tree.h: Remove unused prototypes.
2729
2730 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
2731
2732 PR java/18091:
2733 * jcf-write.c (perform_relocations): Don't call memcpy if source
2734 and destination are the same.
2735
2736 2005-01-17 Tom Tromey <tromey@redhat.com>
2737
2738 * verify-impl.c (get_short): Sign extend.
2739 (get_int): Likewise.
2740
2741 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
2742
2743 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
2744 with TYPE_SIZE.
2745
2746 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
2747
2748 * verify.c: Revert to the version before the BC-ABI merge.
2749
2750 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
2751
2752 PR java/19277
2753 * check-init.c (check_init): Take care of references that do not
2754 have an explicit final variable declaration (e.g. array length
2755 access) for pre/post in/de-crement operators.
2756
2757 2005-01-08 Mark Wielaard <mark@klomp.org>
2758
2759 * parse.y (process_imports): Allocate (and free) original_name only
2760 when not already defined.
2761 * jcf-parse.c (read_class): Free results of find_class() and
2762 lrealpath().
2763 (java_parse_file): Keep pointer to head of file_list and free when
2764 done. Free result of lrealpath().
2765
2766 2005-01-05 Tom Tromey <tromey@redhat.com>
2767
2768 * gcj.texi (Standard Properties): java.ext.dirs is now used.
2769
2770 2004-12-20 Andrew Haley <aph@redhat.com>
2771
2772 * typeck.c: Use fold_convert for ints and booleans.
2773
2774 2004-12-17 Andrew Haley <aph@redhat.com>
2775
2776 PR java/18931
2777 * typeck.c (convert): Use a CONVERT_EXPR when converting to
2778 BOOLEAN_TYPE or CHAR_TYPE.
2779 (convert_to_boolean, convert_to_char) : Remove.
2780 * convert.h (convert_to_boolean, convert_to_char) : Remove.
2781 * expr.c (expand_load_internal): Do type conversion if type is not
2782 as required.
2783
2784 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
2785
2786 PR target/18459
2787 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
2788 Update comment.
2789
2790 2004-12-07 Andrew Haley <aph@redhat.com>
2791
2792 PR java/18811:
2793 * jcf-parse.c (load_class): Remove sanity test for missing inner
2794 class file.
2795
2796 2004-12-06 Tom Tromey <tromey@redhat.com>
2797
2798 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
2799 (java.uninstall): Likewise.
2800 (java.maintainer-clean): Likewise.
2801 (.INTERMEDIATE): Likewise.
2802 (java.install-man): Likewise.
2803 (gcj-dbtool.pod): New target.
2804 * gcj.texi (Code Generation): Document -findirect-dispatch.
2805 (libgcj Runtime Properties): Document
2806 gnu.gcj.precompiled.db.path.
2807 (Top): Link to "Invoking gcj-dbtool".
2808
2809 2004-12-06 Tom Tromey <tromey@redhat.com>
2810
2811 PR java/14853:
2812 * java-tree.h (extract_field_decl): Declare.
2813 * parse.y (extract_field_decl): Renamed from
2814 strip_out_static_field_access_decl. No longer static.
2815 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
2816
2817 2004-12-03 Tom Tromey <tromey@redhat.com>
2818
2819 * lang.c (flag_new_verifier): Define.
2820 (java_post_options): Set flag_new_verifier if indirect dispatch
2821 is being used.
2822 * lang.opt (fnew-verifier): Removed.
2823
2824 2004-12-03 Tom Tromey <tromey@redhat.com>
2825
2826 PR bootstrap/14614:
2827 * Make-lang.in (java.install-common): Only install transformed
2828 gcjh if gcj-cross exists.
2829
2830 2004-12-03 Andrew Haley <aph@redhat.com>
2831
2832 PR java/18812
2833 * except.c (link_handler): Patch 'outer' field of siblings of the
2834 range we're demoting.
2835
2836 2004-12-03 Andrew Haley <aph@redhat.com>
2837
2838 PR java/18697
2839 * class.c (layout_class_method): Don't fail to override a method
2840 simply because it has DECL_ARTIFICIAL set.
2841
2842 2004-12-02 Tom Tromey <tromey@redhat.com>
2843
2844 PR java/16675:
2845 * parse.y (craft_constructor): Special case null_pointer_node.
2846
2847 2004-12-02 Tom Tromey <tromey@redhat.com>
2848
2849 PR java/18741:
2850 * java-gimplify.c (java_gimplify_expr): Don't call
2851 SET_EXPR_LOCATION unless wrapped tree is an expression.
2852
2853 2004-11-27 Per Bothner <per@bothner.com>
2854
2855 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
2856 Fix fencepost error in 'i', which got executed one too many times.
2857 Also, fold memcpy into explicit loop, as originally intended.
2858 Also, free temporary 'buf' which otherwise leaks.
2859
2860 2004-11-27 Per Bothner <per@bothner.com>
2861
2862 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
2863 local static variables if not USE_MAPPED_LOCATION.
2864
2865 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
2866
2867 * class.c, decl.c, expr.c: Fix comment typos.
2868
2869 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
2870
2871 PR java/18305
2872 * decl.c (end_java_method): Call
2873 attach_init_test_initialization_flags on all the init_decls.
2874 * parse.y (attach_init_test_initialization_flags): Move to ...
2875 * expr.c (attach_init_test_initialization_flags): here and
2876 support BIND_EXPR also.
2877 * java-tree.h (attach_init_test_initialization_flags): Prototype.
2878 * jcf-parse.c (parse_class_file): Don't disable class init
2879 optimization.
2880
2881 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2882
2883 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
2884 in diagnostics.
2885
2886 2004-11-24 Richard Henderson <rth@redhat.com>
2887
2888 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
2889 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
2890
2891 2004-11-24 Tom Tromey <tromey@redhat.com>
2892
2893 * verify.c (defer_merging): Don't use C++-style comment.
2894 * verify.h (java_opcode): Added java_opcode_end.
2895 * class.c (build_class_ref): Remove C++ comment and old FIXME.
2896
2897 * verify-impl.c (vfy_push_type): Removed bogus "return".
2898 (initialize_stack): Use vfy_alloc and vfy_free.
2899 (verify_instructions_0): Likewise.
2900
2901 * Merged gcj-abi-2-dev-branch to trunk.
2902
2903 2004-11-24 Andrew Haley <aph@redhat.com>
2904
2905 * jcf-parse.c (parse_class_file): Set file_start_location.
2906
2907 2004-11-10 Tom Tromey <tromey@redhat.com>
2908
2909 * class.c (make_field_value): Don't call build_static_field_ref.
2910 (build_static_field_ref): Don't emit direct references when using
2911 indirect dispatch.
2912
2913 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
2914 -verbose:class into man page synopsis.
2915
2916 2004-11-09 Tom Tromey <tromey@redhat.com>
2917
2918 * expr.c (build_java_arraystore_check): Still generate check if
2919 element type is itself an array.
2920
2921 2004-11-08 Tom Tromey <tromey@redhat.com>
2922
2923 * java-tree.h (soft_check_assignment_node): Removed.
2924 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
2925 * decl.c (java_init_decl_processing): Don't initialize
2926 soft_check_assignment_node.
2927
2928 2004-11-05 Tom Tromey <tromey@redhat.com>
2929
2930 * class.c (layout_class_methods): Don't add Miranda methods when
2931 using indirect dispatch.
2932
2933 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
2934
2935 * class.c (make_class_data): Call emit_assertion_table to set the
2936 'assertion_table' field.
2937 (build_signature_for_libgcj): Move here from expr.c.
2938 (add_assertion_table_entry): New function. Callback for assertion
2939 hashtable traversal.
2940 (emit_assertion_table): New. Take class argument, and generate
2941 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
2942 * decl.c (init_decl_processing): Define assertion_entry_type record.
2943 Push 'assertion_table' class field instead of 'verify'.
2944 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
2945 (type_assertion_hash): Include 'assertion_code' in hash.
2946 (add_type_assertion): Rewritten. Take class and assertion_code
2947 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
2948 (can_widen_reference_to): Use new add_type_assertion() arguments.
2949 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
2950 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
2951 (verify_identifier_node): Removed.
2952 (assertion_entry_type, assertion_table_type): New.
2953 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
2954 assertion code definitions.
2955 (struct type_assertion): Add assertion_code. Rename 'source_type' and
2956 'target_type' to 'op1' and 'op2'.
2957 (add_type_assertion): Declare.
2958 (lang_printable_name_wls): Remove unused definition.
2959 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
2960 to emit runtime assertion.
2961 (vfy_note_stack_type): Clean up non-C90 declarations.
2962 (vfy_note_local_type): Likewise.
2963 * verify.h (vfy_is_assignable_from): Declare.
2964 * verify-impl.c (is_assignable_from_slow): Remove unused function.
2965 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
2966 instead of is_assignable_from_slow().
2967 (types_compatible): Reinstate ref_compatible() call.
2968
2969 2004-11-04 Tom Tromey <tromey@redhat.com>
2970
2971 * class.c (build_static_field_ref): Reverted previous patch.
2972
2973 * class.c (build_static_field_ref): Don't emit direct references
2974 when using indirect dispatch.
2975
2976 2004-11-03 Tom Tromey <tromey@redhat.com>
2977
2978 * expr.c (expand_java_arrayload): Set lhs_type_node.
2979 (expand_java_arraystore): Set rhs_type_node.
2980
2981 2004-11-02 Tom Tromey <tromey@redhat.com>
2982
2983 * jcf-parse.c (compute_class_name): Use filename length from zip
2984 directory, not strlen.
2985
2986 * expr.c (expand_invoke): Mark new interface methods as abstract.
2987
2988 2004-11-01 Tom Tromey <tromey@redhat.com>
2989
2990 * verify-impl.c (push_jump): Removed check for uninitialized
2991 objects.
2992 (push_exception_jump): Likewise.
2993 (handle_ret_insn): Likewise.
2994 (handle_jsr_insn): Likewise.
2995 (state_check_no_uninitialized_objects): Removed.
2996
2997 * decl.c (check_local_unnamed_variable): Recognize
2998 promoted-to-int parameters when using the new verifier.
2999 * expr.c (expand_java_arraystore): Explicitly request array type
3000 when using new verifier.
3001 (expand_java_arrayload): Likewise.
3002 (invoke_build_dtable): Don't pass object_type_node as
3003 expression argument to build_java_indirect_ref.
3004 (build_java_check_indexed_type): Do nothing.
3005 (build_java_arraystore_check): Handle case where array doesn't
3006 have array type.
3007 (build_java_array_length_access): Likewise.
3008 (expand_invoke): Handle case where interface overrides a method
3009 from Object.
3010 (pop_type_0): Always succeed for reference types.
3011 (process_jvm_instruction): Don't pop a value in a dead
3012 exception handler.
3013 (pop_arguments): Convert arguments to correct types.
3014
3015 2004-10-29 Andrew Haley <aph@redhat.com>
3016
3017 * jcf-parse.c (give_name_to_class): Remove line that was
3018 incorrectly merged.
3019
3020 2004-10-29 Andrew Haley <aph@redhat.com>
3021
3022 * jcf-parse.c (set_source_filename): Add code to build new sfname.
3023
3024 2004-10-20 Andrew Haley <aph@redhat.com>
3025
3026 * decl.c (end_java_method): Don't expand if flag_syntax_only.
3027
3028 2004-10-26 Tom Tromey <tromey@redhat.com>
3029
3030 * verify.h (vfy_notify_verified): Removed.
3031 * verify-glue.c (vfy_notify_verified): Removed.
3032
3033 2004-10-26 Tom Tromey <tromey@redhat.com>
3034
3035 * verify-impl.c (debug_print_state): Declare `i' before code.
3036 (merge_types): Modify `t' when it is null_type.
3037
3038 2004-10-26 Tom Tromey <tromey@redhat.com>
3039
3040 * verify-impl.c (type_print): Renamed from print. Now static and
3041 takes an argument.
3042 (debug_print_state): Use type_print.
3043
3044 2004-10-25 Tom Tromey <tromey@redhat.com>
3045
3046 * expr.c (build_invokeinterface): Compute correct offset for
3047 index into interface methods.
3048
3049 2004-10-20 Tom Tromey <tromey@redhat.com>
3050
3051 * java-tree.h (verify_jvm_instructions_new): Declare.
3052
3053 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
3054 command line.
3055
3056 * verify-impl.c (verify_instructions): Correctly handle wide
3057 types on the stack.
3058 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
3059 (vfy_get_component_type): Strip pointer types.
3060 (vfy_find_class): Use get_type_from_signature. Strip pointer
3061 types.
3062 Include java-except.h.
3063
3064 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
3065
3066 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
3067 vfy_push_type_t, set_variable, add_new_state, merge_into,
3068 handle_jsr_insn, branch_prepass, check_class_constant,
3069 check_wide_constant, get_one_type, compute_static_types,
3070 verify_instructions_0): Clean up C99 declarations after statements.
3071
3072 2004-10-20 Tom Tromey <tromey@redhat.com>
3073
3074 * verify-impl.c (merge_refs): Compare reference against iterator,
3075 not ref2.
3076
3077 * verify-glue.c (vfy_tag): Mask off resolved flag.
3078
3079 2004-10-19 Tom Tromey <tromey@redhat.com>
3080
3081 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
3082 (init_state_with_stack): Initialize `this_type' in state.
3083 (verify_method): Use debug_print.
3084 * verify-glue.c (vfy_is_primitive): Removed debugging print.
3085 (vfy_note_stack_depth): Reverted last patch.
3086 (vfy_note_stack_type): Note pointer to Object, not Object.
3087 (vfy_note_local_type): Likewise.
3088
3089 * verify.h (vfy_note_instruction_seen): Declare.
3090 * verify-glue.c (verify_jvm_instructions_new): Set
3091 BCODE_EXCEPTION_TARGET on target instruction.
3092 (vfy_note_instruction_seen): New function.
3093 * verify-impl.c (FLAG_INSN_SEEN): New define.
3094 (verify_instructions_0): Set flag on instruction. Save state for
3095 PC=0 later.
3096 (verify_instructions): Call vfy_note_instruction_seen.
3097
3098 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
3099 (verify_jvm_instructions_new): Call method_init_exceptions,
3100 add_handler, and handle_nested_ranges.
3101 * verify-impl.c (verify_method): Return 1 on success.
3102 (verify_instructions_0): Save the state at PC=0.
3103
3104 * verify-impl.c (init_type_from_class): Set is_resolved and
3105 ref_next on new ref_intersection.
3106 (init_type_from_string): Likewise.
3107
3108 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
3109
3110 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
3111 if flag_new_verifier is set.
3112 * java-tree.h (flag_new_verifier): Declare.
3113 * lang.opt (fnew-verifier): New option.
3114 * verify-impl.c: Work around namespace pollution by undef'ing
3115 'current_class'.
3116 (struct verifier_context): Make 'bytecode' const.
3117 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
3118 (types_compatible): For the BC-ABI, always consider reference types
3119 compatible.
3120 (check_class_constant): Use vfr->current_class.
3121 (check_constant): Likewise.
3122 (check_wide_constant): Likewise.
3123 (check_field_constant): Check for 'L' at start of type name.
3124 (get_one_type): Return pointer instead of type. Set type result in
3125 caller via passed type pointer.
3126 (compute_argument_types): Update to use new get_one_type arguments.
3127 (compute_return_type): Likewise.
3128 (make_verifier_context): New. Allocate and initialize 'vfr'.
3129 (free_verifier_context): New. Free 'vfr' and its contents.
3130 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
3131 and free_verifier_context.
3132
3133 2004-10-15 Tom Tromey <tromey@redhat.com>
3134
3135 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
3136 * verify.h (vfy_fail): Fixed formatting.
3137
3138 * verify-impl.c (vfr): Fixed comment formatting.
3139 (collapse_type): New function.
3140 (verify_instructions): Notify compiler about type map.
3141 * verify.h (vfy_note_stack_depth): Updated.
3142 (vfy_note_stack_type): Likewise.
3143 (vfy_note_local_type): Likewise.
3144 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
3145 Declare.
3146 * verify-glue.c (vfy_note_stack_depth): Correctly size type
3147 state. Added `method' argument.
3148 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
3149 argument.
3150 (vfy_note_local_type): New function.
3151 (vfy_unsuitable_type): Likewise.
3152 (vfy_return_address_type): Likewise.
3153 (vfy_null_type): Likewise.
3154
3155 * verify.h (VFY_IN_GCC): Removed.
3156 (VFY_WANT_TYPEMAP): Removed.
3157 * verify-impl.c (verify_instructions_0): Removed useless "\".
3158 (struct state) <next>: Uncomment.
3159
3160 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
3161
3162 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
3163 C-style.
3164
3165 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
3166
3167 * Make-lang.in (verify.o): Re-enabled this target.
3168 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
3169 (vfy_get_interface): Likewise.
3170 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
3171 * verify.h (verify_jvm_instructions_new): Declare.
3172 * verify-impl.c (free_state): Temporarily comment out unused
3173 function.
3174
3175 2004-10-06 Tom Tromey <tromey@redhat.com>
3176
3177 * java-tree.h (JV_STATE_READ): New enum value.
3178
3179 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
3180
3181 * verify.h: New file.
3182
3183 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
3184
3185 * verify-impl.c, verify-glue.c, verify.h: New files.
3186 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
3187
3188 2004-09-24 Andrew Haley <aph@redhat.com>
3189
3190 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
3191 for a slot if it's of pointer type.
3192
3193 2004-09-14 Tom Tromey <tromey@redhat.com>
3194
3195 * class.c (make_class_data): Correctly initialize "state" field.
3196 Initialize "engine" field.
3197 * decl.c (java_init_decl_processing): Add "engine" field.
3198
3199 2004-09-10 Andrew Haley <aph@redhat.com>
3200
3201 PR java/12760
3202 * expr.c (build_invokeinterface): Use fast method for interface
3203 dispatch.
3204 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
3205 JTI_ITABLE_PTR_TYPE.
3206 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
3207 (emit_symbol_table): Add new arg, element_size.
3208 * decl.c (java_init_decl_processing): Initialize Class.itable.
3209 * class.c (GEN_TABLE): New macro.
3210 (gen_indirect_dispatch_tables): Use it. Add itable.
3211 (make_class_data): Add new arg for emit_symbol_table().
3212 Emit itable.
3213 (add_miranda_methods): Make sure search_class has been parsed.
3214 (emit_symbol_table): Add new arg, element_size.
3215
3216 2004-09-06 Andrew Haley <aph@redhat.com>
3217
3218 * verify.c (merge_types): Return Object for all merges of
3219 interfaces.
3220 * expr.c (add_type_assertion): Don't generate assertions when
3221 source type is array of Object.
3222
3223 2004-09-03 Andrew Haley <aph@redhat.com>
3224
3225 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
3226
3227 * lang.c (java_post_options): Force flag_verify_invocations if
3228 we're not using indirect dispatch.
3229
3230 * expr.c (pop_type_0): Move test for interfaces before call to
3231 can_widen_reference_to().
3232 (build_signature_for_libgcj): Remove generation of canonical array
3233 type.
3234 (add_type_assertion): Canonicalize both arrays.
3235 Don't assert that type X can be assigned to Object.
3236 Don't assert that type X an be assigned to type X.
3237 Don't assert that Object can be assigned to type X.
3238 (can_widen_reference_to): Warn whenever we generate an assertion.
3239 (process_jvm_instruction): Use throwable_type_node for the type of
3240 an exception class.
3241
3242 2004-09-01 Andrew Haley <aph@redhat.com>
3243
3244 * decl.c (java_init_decl_processing): Change
3245 verify_identifier_node to "__verify".
3246 * expr.c (add_type_assertion): Use verify_identifier_node for name.
3247 * java-tree.h (verify_identifier_node): Change to "__verify".
3248
3249 * expr.c (build_signature_for_libgcj): New function.
3250 (add_type_assertion): Use it to construct signatures for
3251 source_type and target_type.
3252
3253 2004-08-27 Andrew Haley <aph@redhat.com>
3254
3255 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
3256 (verify_identifier_node): New.
3257 (TYPE_VERIFY_METHOD): New.
3258 (struct type_assertion): New type.
3259 * expr.c (type_assertion_eq): New function.
3260 (type_assertion_hash): New function.
3261 (add_type_assertion): New function.
3262 (can_widen_reference_to): Call add_type_assertion().
3263 * decl.c (java_init_decl_processing): Add verify_identifier_node.
3264 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
3265 (finish_class): Output TYPE_VERIFY_METHOD (type).
3266
3267 * decl.c (end_java_method): Nullify unused fields.
3268
3269 2004-08-17 Andrew Haley <aph@redhat.com>
3270
3271 * verify.c (defer_merging): Quieten.
3272 * jcf-parse.c (load_class): Only try to open a class file if it's
3273 java.lang.Object or if it's part of the current compilation.
3274 Check that the class we just tried to load is the class we just
3275 loaded. Quieten.
3276 (java_parse_file): Set flag_verify_invocations off if we're
3277 compiling from .class.
3278 (parse_zip_file_entries): Abort if we try to read a dummy class.
3279 * expr.c (can_widen_reference_to): Quieten.
3280 (build_invokevirtual): Abort if we try to invokevirtual an
3281 interface.
3282 (expand_invoke): Don't build a non-interface call to an interface.
3283 (build_instanceof): Don't do premature optimization if
3284 flag_verify_invocations is not set.
3285 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
3286 from superclass.
3287 (build_static_field_ref): Add correct type conversion for
3288 field_address.
3289 (add_miranda_methods): Disable generation of Miranda methods for
3290 dummy classes.
3291 (layout_class_method): Don't complain about non-static method
3292 overrides static method with dummy classes.
3293
3294 2004-08-13 Tom Tromey <tromey@redhat.com>
3295
3296 * class.c (build_static_field_ref): Re-enable atable lookups for
3297 static fields.
3298
3299 * parse.y (strip_out_static_field_access_decl): Indentation fix.
3300
3301 2004-08-11 Tom Tromey <tromey@redhat.com>
3302
3303 * gcj.texi (libgcj Runtime Properties): Document new properties.
3304
3305 2004-08-06 Andrew Haley <aph@redhat.com>
3306
3307 * jcf-parse.c (load_class): Check that we really have loaded the
3308 class we're looking for.
3309
3310 2004-07-19 Andrew Haley <aph@redhat.com>
3311
3312 * verify.c (verify_jvm_instructions): Comment change only.
3313
3314 * typeck.c (build_java_array_type): Add size field to array name.
3315
3316 * java-tree.h (LOCAL_SLOT_P): New.
3317 (update_aliases): Add PC argument.
3318 (pushdecl_function_level): New function.
3319
3320 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3321 MODIFY_EXPR, and SAVE_EXPR.
3322 (java_gimplify_modify_expr): New function.
3323
3324 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
3325 (expand_iinc): Pass PC to update_aliases().
3326 (STORE_INTERNAL): Likewise.
3327 (process_jvm_instruction): Likewise.
3328
3329 * decl.c (base_decl_map): New variable.
3330 (uniq): New variable.
3331 (update_aliases): Rewrite with more thorough checking.
3332 (debug_variable_p): New function.
3333 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
3334 (check_local_named_variable): Delete whole function.
3335 (initialize_local_variable): New function.
3336 (check_local_unnamed_variable): Add checks and comments.
3337 (find_local_variable): Rewrite.
3338 (java_replace_reference): New function.
3339 (function_binding_level): New variable.
3340 (pushdecl_function_level): New function.
3341 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3342 (maybe_pushlevels): Call pushdecl() on each of the new decls.
3343 (start_java_method): Reset uniq. Create base_decl_map. Set
3344 function_binding_level.
3345 (end_java_method): Null unused fields to save memory.
3346
3347 2004-06-29 Andrew Haley <aph@redhat.com>
3348
3349 * except.c (expand_start_java_handler): Push a new binding level.
3350 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
3351 register_exception_range() to register where we'll do it.
3352 (expand_end_java_handler): Remove old bogus code. Replace with
3353 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3354 the top of the expression we're curently building.
3355 (maybe_end_try): Delete.
3356 * decl.c (binding_level.exception_range): New field.
3357 (clear_binding_level): Add field exception_range. Reformat.
3358 (poplevel): Call expand_end_java_handler().
3359 (poplevel): Call java_add_stmt only if functionbody is false.
3360 (maybe_poplevels): Don't call maybe_end_try() from here.
3361 (end_java_method): Clear no longer used trees in function decl.
3362 (register_exception_range): New function.
3363 * java-tree.h (register_exception_range, struct eh_range): Declare.
3364
3365 2004-06-22 Andrew Haley <aph@redhat.com>
3366
3367 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
3368 the otable.
3369 * check-init.c (get_variable_decl): Teach check-init about
3370 FIELD_DECLs addressed via the otable.
3371 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
3372 CLASS_PARSED_P.
3373
3374 2004-05-28 Andrew Haley <aph@redhat.com>
3375
3376 * jcf-parse.c (load_class): Don't try to read a class that we've
3377 already read.
3378
3379 * expr.c (build_invokeinterface): Use the old-fashioned way of
3380 doing indirect dispatch: look up interfaces by name.
3381 * java-tree.h (enum java_tree_index): Add
3382 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
3383 * decl.c (java_init_decl_processing): Add
3384 soft_lookupinterfacemethodbyname_node.
3385
3386 * gjavah.c (print_method_info): Final methods have vtable entries,
3387 so gjavah needs to output them.
3388 * class.c (layout_class_method): Generate vtable entries for final
3389 methods.
3390 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
3391 dispatch, even if a method is final.
3392
3393 2004-05-25 Andrew Haley <aph@redhat.com>
3394
3395 * class.c (build_symbol_entry): Convert the names of constructors
3396 to init_identifier_node when generating an entry for the indirect
3397 dispatch table.
3398
3399 * expr.c (build_known_method_ref): Generate indirect calls for
3400 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
3401
3402 2004-05-24 Andrew Haley <aph@redhat.com>
3403
3404 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
3405 atable element is of the right type.
3406
3407 * class.c (build_static_field_ref): Cast pointer to correct type
3408 for field.
3409
3410 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
3411
3412 * Merged with HEAD as of 20040514. Diff against
3413 gcj-abi-2-merge-20040514.
3414
3415 2004-04-16 Andrew Haley <aph@redhat.com>
3416
3417 * verify.c (check_pending_block): Disable subroutine checks.
3418 (defer_merging): New function.
3419 (merge_types): If types are dummy, use defer_merging to combine them.
3420 (verify_jvm_instructions): If invocation is invokeinterface and
3421 target is dummy, assume target really is an interface.
3422
3423 * parse.y (patch_invoke): Break out call to java_create_object.
3424
3425 * lang.c (flag_verify_invocations): New.
3426
3427 * jcf-parse.c (load_class): If we've already failed to load a
3428 class, don't try again.
3429 (load_class): If we can't find a .class file, don't fail, but emit
3430 a warning.
3431 (parse_class_file): Don't act on dummy methods.
3432
3433 * java-tree.h (flag_verify_invocations): New.
3434 (TYPE_DUMMY): New.
3435 (lang_type.dummy_class): New field.
3436 (java_create_object): New function.
3437 (METHOD_DUMMY): New.
3438
3439 * expr.c (build_field_ref): Widen field offset.
3440 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
3441 that each of its elements is compatible with the one we're
3442 popping.
3443 (pop_type_0): Issue a warning to say that we need to generate a
3444 runtime check.
3445 (java_create_object): New function.
3446 (build_field_ref): Only generate hard refs if we're not using
3447 indirect dispatch.
3448 (expand_java_field_op): If we're using !verify_invocations and we
3449 see a missing field, generate a decl for it.
3450
3451 (expand_invoke): If a class doesn't have the method we seek and
3452 we're using !flag_verify_invocations, generate a decl for the
3453 method now.
3454
3455 (build_known_method_ref): Always use indirect dispatch via the
3456 atable for static methods.
3457
3458 (expand_java_NEW): Break out object creation into new function,
3459 java_create_object.
3460
3461 (can_widen_reference_to): Issue a warning to say that we need to
3462 generate a runtime check.
3463
3464 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
3465 (make_method_value): Also use index for interfaces.
3466 (make_class_data): Skip dummy field for inherited data.
3467 Don't build method array for dummy methods.
3468 Set size_in_byte to -1 when using inirect dispatch
3469 Don't build a hard class ref if we don't have a hard ref to our
3470 superclass, or if we're using inirect dispatch.
3471 Null out dispatch tables.
3472
3473 (layout_class_method): Don't complain about non-static method
3474 overrides static method is method is artificial.
3475
3476 (build_static_field_ref): Disable atable references to static
3477 fields for the time being.
3478
3479 (layout_class_methods): Check for CLASS_INTERFACE as
3480 well as CLASS_ABSTRACT.
3481
3482 2004-11-24 Steven Bosscher <stevenb@suse.de>
3483
3484 * class.c (make_class_data): Don't check flag_inline_functions.
3485 * lang.c (flag_really_inline): Remove unused flag.
3486 (java_handle_option): Don't set it here. Remove special handling
3487 of flag_inline_functions for Java.
3488 (java_init): Don't set flag_inline_trees here. Already done...
3489 (java_post_options): ...here. Don't clear flag_inline_functions.
3490
3491 2004-11-24 Steven Bosscher <stevenb@suse.de>
3492
3493 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
3494 (java_gimplify_exit_block_expr): New function.
3495 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
3496 LABELED_BLOCK_EXPR.
3497 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
3498 (EXIT_BLOCK_EXPR): Likewise.
3499 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
3500 (LABELED_BLOCK_BODY): Likewise.
3501 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
3502 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
3503 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
3504 TREE_OPERAND.
3505 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
3506 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
3507 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
3508 second operand of EXIT_BLOCK_EXPR.
3509 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
3510 TREE_OPERAND.
3511 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
3512
3513 2004-11-23 Ben Elliston <bje@au.ibm.com>
3514
3515 * xref.h (xref_flag_value): Remove.
3516 (xref_set_data, xref_get_data): Likewise.
3517 (xref_set_current_fp): Likewise.
3518 (XREF_NONE): Likewise.
3519 (XREF_GET_DATA): Likewise.
3520 * xref.c (xref_flag_value): Remove.
3521 (xref_set_data, xref_get_data): Likewise.
3522 (xref_set_current_fp): Likewise.
3523
3524 2004-11-23 Ben Elliston <bje@au.ibm.com>
3525
3526 * gjavah.c (output_directory): Make static.
3527 (temp_directory): Likewise.
3528
3529 2004-11-15 Tom Tromey <tromey@redhat.com>
3530
3531 * decl.c (instn_ptr_type_node): Removed.
3532 (lineNumbers_ptr_type_node): Removed.
3533 (jint_type): Removed.
3534 (jint_ptr_type): Removed.
3535
3536 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
3537
3538 PR java/15576
3539 * check-init.c (check_init): Ignore DECL_EXPR.
3540 * expr.c (always_initialize_class_p): Reenable.
3541 (build_class_init): Use a variable to store the decl. Also use
3542 boolean_false_node instead of integer_zero_node.
3543 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
3544 to the block.
3545
3546 2004-11-08 Tom Tromey <tromey@redhat.com>
3547
3548 PR java/16843:
3549 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
3550 generating a JNI header.
3551 (print_field_info): Handle JNI headers.
3552 (jni_print_float): Likewise.
3553 (jni_print_double): Likewise.
3554
3555 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
3556
3557 * decl.c (end_java_method): Remove duplicated code.
3558
3559 2004-11-06 Zack Weinberg <zack@codesourcery.com>
3560 Gerald Pfeifer <gerald@pfeifer.com>
3561
3562 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
3563 as well.
3564
3565 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
3566
3567 PR java/17265
3568 * class.c: Reinstate 2004-08-18 patch.
3569 (make_local_function_alias): Don't create an alias for extern (native)
3570 functions.
3571
3572 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
3573
3574 PR java/17265
3575 * class.c (make_local_function_alias): Revert 2004-08-18 change.
3576 (make_method_value): Likewise.
3577
3578 2004-10-21 Andrew Haley <aph@redhat.com>
3579
3580 PR java/18091:
3581 * jcf-parse.c (set_source_filename): Add code to build new sfname.
3582
3583 2004-10-20 Andrew Haley <aph@redhat.com>
3584
3585 * decl.c (end_java_method): Don't expand if flag_syntax_only.
3586 Remove duplicated code block.
3587
3588 2004-10-18 Steven Bosscher <stevenb@suse.de>
3589
3590 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
3591 New rules to work around old Bison warnings.
3592
3593 2004-10-17 Steven Bosscher <stevenb@suse.de>
3594
3595 * class.c (ident_subst): Always alloca buffer.
3596 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
3597 opcode after including javaop.def.
3598 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
3599 conditional expression that exits, to avoid warnings.
3600 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
3601 a user of an extension.
3602 * win32-host.c: Move check down to have non-empty file when
3603 WIN32 is not defined.
3604
3605 * Make-lang.in (java-warn): Add STRICT_WARN.
3606 (java/jcf-io.o-warn): Don't have Werror for this file.
3607 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
3608
3609 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
3610
3611 * expr.c (expr_add_location): Move declaration to before all
3612 statements.
3613 * parse.y (java_expand_classes): Ditto.
3614 * lex.c (java_peek_unicode): Ditto.
3615
3616 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
3617
3618 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
3619 if possible, else convert `foo' to 'foo'.
3620 * class.c: Likewise.
3621 * decl.c: Likewise.
3622 * expr.c: Likewise.
3623 * jcf-io.c: Likewise.
3624 * jcf-parse.c: Likewise.
3625 * lang.c: Likewise.
3626 * lex.c: Likewise.
3627 * parse.h: Likewise.
3628
3629 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
3630
3631 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
3632 rename parameter 'msg' to 'msgid' in function declaration.
3633 (issue_warning_error_from_context): Likewise.
3634 (yyerror): Rename parameter 'msg' to 'msgid'.
3635 (all over): Use new quoting style for diagnostics.
3636
3637 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
3638
3639 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
3640 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
3641 Update copyright.
3642
3643 2004-10-14 Matt Austern <austern@apple.com>
3644
3645 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
3646 pointer_set_t* now.
3647
3648 2004-10-13 Tom Tromey <tromey@redhat.com>
3649
3650 PR java/15578:
3651 * lang.opt (--extdirs): Document.
3652 * jvspec.c (lang_specific_driver): Recognize -encoding and
3653 -extdirs.
3654
3655 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
3656
3657 * parse.y (issue_warning_error_from_context): Use va_list *
3658 instead of va_list parameter.
3659 (parse_error_context): Update call.
3660 (parse_warning_context): Likewise.
3661
3662 2004-10-05 Zack Weinberg <zack@codesourcery.com>
3663
3664 * parse.y, parse-scan.y: Add list of diagnostic messages to
3665 insulate translation template from version of yacc/bison used
3666 to compile the grammar.
3667
3668 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
3669
3670 Prepare for %q, %< and %> in diagnostic message strings.
3671 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
3672 Name second parameter 'msgid'.
3673 * parse.y: Additionally include pretty-print.h and diagnostic.h.
3674 (issue_warning_error_from_context): Use pretty-printer functions
3675 instead of vsprintf for constructing formatted messages. Rename
3676 parameter 'msg' to 'msgid'.
3677 (parse_error_context): Rename parameter 'msg' to 'msgid'.
3678 (parse_warning_context): Likewise.
3679
3680 2004-10-05 Andrew Haley <aph@redhat.com>
3681
3682 PR java/17779
3683 * jcf-parse.c (parse_zip_file_entries): If a class has a
3684 superclass and a TYPE_SIZE of zero, lay it out.
3685
3686 2004-09-30 Andrew Haley <aph@redhat.com>
3687
3688 PR java/17733
3689 * jcf-parse.c (compute_class_name): Rewrite.
3690
3691 2004-10-01 Jan Hubicka <jh@suse.cz>
3692
3693 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
3694
3695 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
3696
3697 * lex.c: Fix a comment typo.
3698
3699 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
3700
3701 * java-tree.h: Fix a comment typo.
3702
3703 2004-09-30 Per Bothner <per@bothner.com>
3704
3705 Simplify lexer. Implement --enable-mapped-location support.
3706 * jcf-parse.c (parse_class_file): Use linemap_line_start.
3707 (parse_source_file_1): Pass filename as extra parameter, so we can call
3708 linemap_add and set input_location here, rather than in both callers.
3709 (read_class): Pass copied filename to parse_source_file_1.
3710 Don't initialize wfl_operator - only needed for source compilation.
3711 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
3712 * lex.h: Remove a bunch of debugging macros.
3713 * lex.h (struct_java_line, struct java_error): Remove types.
3714 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
3715 (struct java_lc_s): Remove prev_col field.
3716 (struct java_lexer): New fields next_unicode, next_columns, and
3717 avail_unicode. New position field, and maybe token_start field.
3718 Don't need hit_eof field - use next_unicode == -1 instead.
3719 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
3720 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
3721 * parse.h: Various changes for USE_MAPPED_LOCATION.
3722 (EXPR_WFL_EMIT_LINE_NOTE): XXX
3723 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
3724 (struct parser_ctxt): New file_start_location field.
3725 Remove p_line, c_line fields since we no longer save lines.
3726 Remove elc, lineno, and current_jcf fields - no longer used.
3727 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
3728 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
3729 source_location and is probably not needed anymore anyway.
3730 Use new expr_add_Location function.
3731 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
3732 (java_pop_parser_context): Minor cleanup.
3733 (java_parser_context_save_global, java_parser_context_restore_global,
3734 java_pop_parser_context): Save/restore input_location as a unit.
3735 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
3736 a source_location instead of a wfl context node.
3737 (check_class_interface_creation): input_filename is not addressable.
3738 (create_artificial_method): Calling java_parser_context_save_global
3739 and java_parser_context_restore_global is overkill. Instead,
3740 temporarily set input_location from class decl.
3741 (java_layout_seen_class_methods): Set input_location from method decl.
3742 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
3743 (finish_loop_body): Likewise.
3744 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
3745 (java_sprint_unicode): Take a character, not index in line.
3746 (java_sneak_uncode): Replaced by java_peek_unicode.
3747 (java_unget_unicode): No longer used.
3748 (java_allocate_new_line. java_store_unicode): Removed, since we
3749 no longer remember "lines".
3750 (java_new_lexer): Update for new data structures.
3751 (java_read_char): Move unget_value checking to java_read_unicode.
3752 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
3753 efficient functions that are used directly when lexing.
3754 (java_read_unicode_collapsing_terminators): No longer needed.
3755 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
3756 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
3757 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
3758 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
3759 combine switch branches, and test for common token kinds earlier.
3760 (java_lex_error): Rewrite.
3761 * jv-scan.c (expand_location): New function, copied from tree.c.
3762 (main): Set ctxp->filename instead of setting input_filename directly.
3763
3764 2004-09-30 Per Bothner <per@bothner.com>
3765
3766 More cleanup for --enable-mapped-location.
3767 * class.c (push_class): If USE_MAPPED_LOCATION don't set
3768 input_location here. Instead do it in give_name_to_class.
3769 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
3770 * expr.c (expand_byte_code): Call linemap_line_start.
3771 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
3772 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
3773 (expr_add_location): New function, if USE_MAPPED_LOCATION.
3774 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
3775 to USE_MAPPED_LOCATION case.
3776
3777 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
3778 * jcf-parse.c (java_parse_file): Don't set input_filename.
3779 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
3780 Create a list of TRANSLATION_UNIT_DECL.
3781 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
3782 reason is so we can set a DECL_SOURCE_LOCATION for each file.
3783 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
3784 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
3785 (file_start_location): New static.
3786 (set_source_filename): Avoid extra access to input_filename macro.
3787 Concatenate new name with class's package prefix.
3788 (set_source_filename, give_name_to_class): Update.
3789 (give_name_to_class): Set class's "line 0" input_location here.
3790 (parse_class_file): Set input_location as a unit.
3791
3792 * jcf-parse.c (load_class): Sanity test if missing inner class file.
3793
3794 2004-09-29 Per Bothner <per@bothner.com>
3795
3796 * java-tree.h: Redefine some macros and add some declaration
3797 to handle the USE_MAPPED_LOCATION case.
3798 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
3799 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
3800 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
3801 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
3802
3803 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
3804 * decl.c (finish_method, java_add_stmt): Likewise.
3805 * java-gimplify.c (java-gimplify.c): Likewise.
3806 * jcf-write.c (generate_bytecode_insns): Likewise.
3807 * lang.c (java_post_options): Likewise - call linemap_add.
3808
3809 2004-09-29 Andrew Haley <aph@redhat.com>
3810
3811 PR java/17007
3812 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
3813 result of TRUNC_MOD_EXPR.
3814 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
3815 * decl.c (java_init_decl_processing): Mark
3816 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
3817
3818 2004-09-28 Tom Tromey <tromey@redhat.com>
3819
3820 PR java/15710:
3821 * class.c (add_miranda_methods): Load superinterface if not
3822 already loaded.
3823
3824 2004-09-28 Andrew Haley <aph@redhat.com>
3825
3826 PR java/17586
3827 * jcf-parse.c (load_class): Don't try to read a class that we've
3828 already read.
3829
3830 2004-09-28 Andrew Haley <aph@redhat.com>
3831
3832 * jcf-parse.c (load_class): Back out previous broken patch.
3833
3834 2004-09-28 Andrew Haley <aph@redhat.com>
3835
3836 PR java/17586
3837 * jcf-parse.c (load_class): Don't try to read a class that we've
3838 already read.
3839 Check that we really did read the right class.
3840
3841 2004-09-25 Tom Tromey <tromey@redhat.com>
3842
3843 PR java/17500:
3844 * parse.y (create_artificial_method): Use add_method_1.
3845
3846 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
3847
3848 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
3849 comment typos.
3850 * gcj.texi: Fix typos.
3851
3852 2004-09-24 Tom Tromey <tromey@redhat.com>
3853
3854 PR java/15656:
3855 * parse.y (class_instance_creation_expression): Set `$$' to NULL
3856 in error parts of rule.
3857 (unary_expression): Don't call error_if_numeric_overflow when $1
3858 is NULL.
3859
3860 2004-09-24 Tom Tromey <tromey@redhat.com>
3861
3862 PR java/16789:
3863 * parse.y (resolve_qualified_expression_name): Set
3864 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
3865 * expr.c (force_evaluation_order): Check for empty argument list
3866 after stripping COMPOUND_EXPR.
3867
3868 2004-09-23 Andrew Haley <aph@redhat.com>
3869
3870 PR java/16927:
3871 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
3872 COND_EXPRs.
3873
3874 2004-09-23 Tom Tromey <tromey@redhat.com>
3875
3876 PR java/17329:
3877 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
3878 where operand is null.
3879
3880 2004-09-23 Tom Tromey <tromey@redhat.com>
3881
3882 PR java/17380:
3883 * parse.y (not_accessible_p): Allow access to protected members
3884 even when class is not static.
3885
3886 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
3887
3888 * Make-lang.in: Revert the gcc-none.o change.
3889
3890 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
3891
3892 * parse.y (patch_anonymous_class): VEC_space returns true if there
3893 is space.
3894
3895 2004-09-21 Matt Austern <austern@apple.com>
3896
3897 Fix bootstrap.
3898 * gjavah.c (free_method_name_list): Fix function definition so
3899 it's a proper C prototype.
3900
3901 2004-09-21 Tom Tromey <tromey@redhat.com>
3902
3903 PR java/17575:
3904 * gjavah.c (free_method_name_list): New method.
3905 (main): Call it.
3906
3907 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3908 Zack Weinberg <zack@codesourcery.com>
3909
3910 * java-tree.def: Use tree_code_class enumeration constants
3911 instead of code letters.
3912 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
3913 new tree-class enumeration constants.
3914
3915 2004-09-13 Tom Tromey <tromey@redhat.com>
3916
3917 PR java/17216:
3918 * class.c (layout_class_method): Put synthetic methods into the
3919 vtable.
3920
3921 2004-09-11 Andrew Pinski <apinski@apple.com>
3922
3923 * Make-lang.in (java/ggc-none.c): Change dependency
3924 for ggc.h into $(GGC_H).
3925
3926 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
3927
3928 * Make-lang.in (java/win32-host.o): Add dependency on
3929 coretypes.h.
3930 * win32-host.c: Add includes for coretypes.h, jcf.h
3931
3932 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
3933
3934 * Make-lang.in (GCJH_OBJS): Change dependency from
3935 ggc-none.o to java/ggc-none.o
3936 (JCFDUMP_OBJS): Likewise.
3937 (java/ggc-none.o): New target.
3938
3939 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3940
3941 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
3942 * class.c (build_utf8_ref, build_static_field_ref,
3943 make_field_value, make_method_value, get_dispatch_table,
3944 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
3945 * constants.c (get_tag_node, build_ref_from_constant_pool,
3946 build_constants_constructor): Likewise.
3947 * decl.c (java_init_decl_processing): Likewise.
3948 * expr.c (build_java_array_length_access, build_newarray,
3949 expand_java_multianewarray, expand_java_pushc, expand_iinc,
3950 build_java_binop, build_field_ref, expand_java_add_case,
3951 expand_java_call, build_known_method_ref, build_invokevirtual,
3952 build_invokeinterface, build_jni_stub): Likewise.
3953 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3954 * jcf-parse.c (get_constant): Likewise.
3955 * lex.c (do_java_lex): Likewise.
3956 * parse.y (patch_binop, patch_unaryop, patch_cast,
3957 build_newarray_node, patch_newarray): Likewise.
3958 * resource.c (compile_resource_data): Likewise.
3959 * typeck.c (build_prim_array_type): Likewise.
3960
3961 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3962
3963 * decl.c (java_init_decl_processing): Adjust
3964 initialize_sizetypes call.
3965
3966 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
3967
3968 * jv-scan.c (fancy_abort): Add.
3969
3970 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
3971
3972 * expr.c (build_java_arrayaccess): Use convert to change
3973 len's type.
3974
3975 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
3976
3977 * class.c (make_local_function_alias): Allocate extra space for 'L'
3978 in name buffer. Reported by Thomas Neumann.
3979
3980 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3981
3982 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
3983 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
3984 * lex.c (do_java_lex): Adjust.
3985 (error_if_numeric_overflow): Likewise.
3986
3987 2004-08-18 Andrew Pinski <apinski@apple.com>
3988
3989 * class.c (make_local_function_alias): Only make a new decl if we
3990 support alias attribute on all decls.
3991
3992 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
3993
3994 * class.c (make_local_function_alias): New function. Create local
3995 alias for public method DECL.
3996 (make_method_value): Use make_local_function_alias.
3997 * parse.y (craft_constructor): Don't special-case anonymous classes.
3998 Always set ctor_name to init_identifier_node.
3999 (lookup_method_invoke): Call layout_class_method when creating
4000 anonymous class constructor.
4001
4002 2004-08-18 Richard Henderson <rth@redhat.com>
4003
4004 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
4005 default case. Treat '<' similarly. Update for
4006 is_gimple_formal_tmp_var name change.
4007
4008 2004-08-17 Andrew Haley <aph@redhat.com>
4009
4010 * lang.c (lang_printable_name): Obey verbose flag.
4011 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
4012 lang_printable_name().
4013 (verify_constructor_circularity, get_printable_method_name,
4014 check_abstract_method_definitions, java_check_regular_methods,
4015 java_check_abstract_methods, check_inner_class_access,
4016 fix_constructors, patch_method_invocation, patch_return):
4017 Likewise.
4018 * expr.c (pop_type_0): Likewise.
4019
4020 * java-tree.h (lang_printable_name_wls): Delete.
4021
4022 2004-08-16 Tom Tromey <tromey@redhat.com>
4023
4024 PR java/8473:
4025 * parse.y (primary): Changed for initialized and uninitialized
4026 array creations.
4027 (array_access): Handle array_creation_initialized.
4028 (array_creation_expression): Split into
4029 array_creation_initialized and array_creation_uninitialized.
4030
4031 2004-08-16 Andrew Haley <aph@redhat.com>
4032
4033 * jcf-write.c (find_constant_index): Canonicalize NaNs when
4034 generating bytecode.
4035
4036 2004-08-16 Elliot Lee <sopwith@redhat.com>
4037
4038 PR java/9677
4039 * jcf-parse.c (java_parse_file): Handle filenames with embedded
4040 spaces, and quoted filelists.
4041
4042 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4043
4044 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
4045 * class.c (build_utf8_ref, build_static_field_ref,
4046 make_field_value, make_method_value, get_dispatch_table,
4047 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4048 * constants.c (get_tag_node, build_ref_from_constant_pool,
4049 build_constants_constructor): Likewise.
4050 * decl.c (java_init_decl_processing): Likewise.
4051 * expr.c (build_java_array_length_access, build_newarray,
4052 expand_java_multianewarray, expand_java_pushc, expand_iinc,
4053 build_java_binop, build_field_ref, expand_java_add_case,
4054 expand_java_call, build_known_method_ref, build_invokevirtual,
4055 build_invokeinterface, build_jni_stub): Likewise.
4056 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4057 * jcf-parse.c (get_constant): Likewise.
4058 * lex.c (do_java_lex): Likewise.
4059 * parse.y (patch_binop, patch_unaryop, patch_cast,
4060 build_null_of_type, patch_newarray): Likewise.
4061 * resource.c (compile_resource_data): Likewise.
4062 * typeck.c (build_prim_array_type): Likewise.
4063
4064 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
4065
4066 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
4067 Don't create BLOCK here or call java_gimplify_block.
4068
4069 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
4070
4071 * java-tree.h (flag_deprecated): Removed.
4072 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
4073 * parse.y (check_deprecation): Check warn_deprecated instead of
4074 flag_deprecated.
4075
4076 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
4077
4078 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
4079 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
4080 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
4081 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
4082 flag_force_classes_archive_check, flag_optimize_sci,
4083 flag_indirect_dispatch): Remove explicit declarations.
4084 * lang.opt: Add implicit declare/define/assign. Remove obsolete
4085 final comment.
4086
4087 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
4088
4089 PR bootstrap/14893
4090 * Make-lang.in (java.install-man): Install from either build
4091 tree or source tree, whichever has the file first.
4092
4093 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
4094
4095 * jcf-parse.c (get_constant): Adjust force_fit_type call.
4096 * lex.h (SET_LVAL_NODE_TYPE): Remove.
4097 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
4098 (do_java_lex): Likewise. Adjust force_fit_type call.
4099
4100 2004-08-04 Roger Sayle <roger@eyesopen.com>
4101 Andrew Haley <aph@redhat.com>
4102
4103 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
4104 checking trees as they're being built.
4105 (convert): Call convert_ieee_real_to_integer if we're
4106 converting a constant, even if we're writing a class file.
4107
4108 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
4109
4110 PR java/16701
4111 * parse.y (fold_constant_for_init): Call resolve_field_access with
4112 correct current_class context.
4113
4114 2004-08-01 Roger Sayle <roger@eyesopen.com>
4115
4116 * decl.c (update_aliases, initialize_local_variable): Replace calls
4117 to build with calls to buildN.
4118 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
4119 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
4120 * parse.h (BUILD_THROW): Likewise.
4121 * parse.y (switch_expression, synchronized_statement,
4122 catch_clause_parameter, array_creation_expression,
4123 conditional_expression, make_qualified_name,
4124 resolve_qualified_expression_name, patch_method_invocation,
4125 patch_invoke, build_method_invocation, build_new_invocation,
4126 build_assignment, patch_assignment, build_binop, patch_binop,
4127 build_string_concatenation, build_incdec, patch_unaryop,
4128 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
4129 patch_return, build_if_else_statement, build_labeled_block,
4130 build_new_loop, build_loop_body, build_bc_statement,
4131 build_assertion, encapsulate_with_try_catch, build_try_statement,
4132 build_try_finally_statement, patch_synchronized_statement,
4133 emit_test_initialization): Likewise, replace build with buildN.
4134
4135 2004-07-28 Eric Christopher <echristo@redhat.com>
4136
4137 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4138 (java_unsafe_for_reeval): Ditto.
4139
4140 2004-07-26 <hp@bitrange.com>
4141
4142 * parse.y (build_super_invocation): Adjust declaration order to
4143 avoid declaration after statement.
4144
4145 2004-07-25 Bernardo Innocenti <bernie@develer.com>
4146
4147 * decl.c: Rename all identifiers named `class' to `cl'.
4148
4149 2004-07-25 Richard Henderson <rth@redhat.com>
4150
4151 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
4152
4153 2004-07-23 Mike Stump <mrs@apple.com>
4154
4155 * boehm.c (set_bit): Improve type safety wrt unsignedness.
4156 * gjavah.c (throwable_p, decode_signature_piece,
4157 print_full_cxx_name, print_include, add_namelet, add_class_decl,
4158 process_file): Likewise.
4159 * jcf-dump.c (main): Likewise.
4160 * jcf-io.c (read_zip_member): Likewise.
4161 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
4162 give_name_to_class, get_class_constant): Likewise.
4163 * jcf-write.c (find_constant_wide, push_long_const,
4164 generate_classfile): Likewise.
4165 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
4166 * parse.y (read_import_dir): Likewise.
4167 * typeck.c (parse_signature_type): Likewise.
4168 * verify.c (verify_jvm_instructions): Likewise.
4169 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
4170
4171 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
4172
4173 * Make-lang.in: Replace rmic and rmiregistry references with
4174 grmic and grmiregistry.
4175 * gcj.texi: Likewise.
4176
4177 2004-07-20 Andrew Haley <aph@redhat.com>
4178
4179 PR java/16431.
4180 * verify.c (verify_jvm_instructions): Comment change only.
4181
4182 * typeck.c (build_java_array_type): Add size field to array name.
4183
4184 * java-tree.h (LOCAL_SLOT_P): New.
4185 (update_aliases): Add PC argument.
4186 (pushdecl_function_level): New function.
4187
4188 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4189 MODIFY_EXPR, and SAVE_EXPR.
4190 (java_gimplify_modify_expr): New function.
4191
4192 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4193 (expand_iinc): Pass PC to update_aliases().
4194 (STORE_INTERNAL): Likewise.
4195 (process_jvm_instruction): Likewise.
4196
4197 * decl.c (base_decl_map): New variable.
4198 (uniq): New variable.
4199 (update_aliases): Rewrite with more thorough checking.
4200 (debug_variable_p): New function.
4201 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
4202 (check_local_named_variable): Delete whole function.
4203 (initialize_local_variable): New function.
4204 (check_local_unnamed_variable): Add checks and comments.
4205 (find_local_variable): Rewrite.
4206 (java_replace_reference): New function.
4207 (function_binding_level): New variable.
4208 (pushdecl_function_level): New function.
4209 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4210 (maybe_pushlevels): Call pushdecl() on each of the new decls.
4211 (start_java_method): Reset uniq. Create base_decl_map. Set
4212 function_binding_level.
4213 (end_java_method): Null unused fields to save memory.
4214
4215 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4216
4217 * class.c (add_interface_do): Remove.
4218 (set_super_info, interface_of_p, maybe_add_interface,
4219 add_interface, make_class_data, layout_class,
4220 add_miranda_methods): Adjust BINFO accessors and addition.
4221 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
4222 accessors.
4223 * jcf-write.c (generate_classfile): Likewise.
4224 * parse.y (patch_anonymous_class, check_inner_circular_reference,
4225 check_circular_reference, java_complete_class,
4226 check_abstract_method_definitions,
4227 java_check_abstract_method_definitions,
4228 check_interface_throws_clauses, java_check_abstract_methods,
4229 lookup_java_interface_method2,
4230 find_applicable_accessible_methods_list): Adjust BINFO accessors
4231 and addition.
4232 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
4233
4234 2004-07-18 Roger Sayle <roger@eyesopen.com>
4235
4236 * builtins.c (max_builtin, min_builtin,
4237 java_build_function_call_expr): Replace calls to build with buildN.
4238 * class.c (build_class_ref, build_static_field_ref,
4239 get_dispatch_table, make_class_data, layout_class_method): Likewise.
4240 * constants.c (build_ref_from_constant_pool): Likewise.
4241 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
4242 add_stmt_to_compound): Likewise.
4243 * except.c (build_exception_object_ref, expand_end_java_handler):
4244 Likewise.
4245 * java-gimplify.c (java_gimplify_case_expr,
4246 java_gimplify_default_expr, java_gimplify_block,
4247 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
4248 * jcf-write.c (generate_bytecode_insns): Likewise.
4249 * typeck.c (convert_ieee_real_to_integer): Likewise.
4250
4251 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4252
4253 * java-tree.h (builtin_function): Declare.
4254
4255 2004-07-16 Steven Bosscher <stevenb@suse.de>
4256
4257 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
4258 abuse restore_line_number_status.
4259
4260 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
4261
4262 g++/15861
4263 * jcf-parse.c (java_emit_static_constructor): Specify default
4264 priority.
4265
4266 2004-07-13 Per Bothner <per@bothner.com>
4267
4268 * java-tree.h (all_class_filename): Remove useless macro.
4269 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
4270 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
4271 * parse.y (java_parser_context_restore_global): Replace
4272 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
4273 * jcf-parse.c (read_class, java_parse_file): Likewise.
4274
4275 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
4276
4277 PR java/16474
4278 gjavah.c (print_field_info): Emit constant only if field is static.
4279
4280 2004-07-11 Roger Sayle <roger@eyesopen.com>
4281
4282 * expr.c (java_truthvalue_conversion, flush_quick_stack,
4283 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
4284 build_java_ret, build_java_throw_out_of_bounds_exception,
4285 build_java_array_length_access, java_check_reference,
4286 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
4287 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
4288 expand_java_arrayload, build_java_monitor, expand_java_return,
4289 expand_load_internal, expand_java_NEW, build_get_class,
4290 build_instanceof, expand_java_CHECKCAST, expand_iinc,
4291 build_java_soft_divmod, build_java_binop, build_field_ref,
4292 expand_compare, expand_java_goto, expand_java_switch,
4293 expand_java_add_case, build_class_init, build_known_method_ref,
4294 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
4295 expand_invoke, build_jni_stub, expand_java_field_op,
4296 java_expand_expr, expand_byte_code, STORE_INTERNAL,
4297 force_evaluation_order, emit_init_test_initialization): Convert
4298 calls to "build" into calls to the prefered "buildN" functions.
4299
4300 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4301
4302 * java-tree.h (set_block): Remove.
4303 * lang.c (java_clear_binding_stack): New.
4304 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4305 * decl.c (struct binding_level): Remove this_block.
4306 (clear_binding_level): Likewise.
4307 (poplevel): Don't handle this_block.
4308 (set_block): Remove.
4309
4310 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
4311
4312 * class.c (common_enclosing_context_p): Remove statement with no
4313 side-effects.
4314
4315 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
4316
4317 PR java/8618
4318 * parse.y (create_anonymous_class): Remove 'location' argument. Use
4319 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
4320 (craft_constructor): Inherit access flags for implicit constructor
4321 from the enclosing class.
4322 (create_class): Fix comment typo.
4323 (resolve_qualified_expression_name): Pass type of qualifier to
4324 not_accessible_p, not the type in which target field was found.
4325 (not_accessible_p): Handle inner classes. Expand protected
4326 qualifier-subtype check to enclosing instances, but don't apply this
4327 check to static members. Allow protected access to inner classes
4328 of a subtype. Allow private access within common enclosing context.
4329 (build_super_invocation): Get WFL line number info from current
4330 class decl.
4331 (build_incomplete_class_ref): Update for new create_anonymous_class
4332 signature.
4333 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
4334 common_enclosing_instance_p.
4335 * class.c (common_enclosing_context_p): New. Determine if types
4336 share a common enclosing context, even across static contexts.
4337 (common_enclosing_instance_p): Renamed from
4338 common_enclosing_context_p. Determines if types share a common
4339 non-static enclosing instance.
4340 * java-tree.h (common_enclosing_instance_p): Declare.
4341 * jcf-write.c (get_method_access_flags): New. Surpress private flag
4342 for inner class constructors.
4343 (generate_classfile): Use get_method_access_flags.
4344
4345 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
4346
4347 * class.c (interface_of_p): Check for null TYPE_BINFO.
4348
4349 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
4350
4351 * class.c (make_class): Do not create binfo here.
4352 (set_super_info): Create it here.
4353 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
4354
4355 2004-07-08 Richard Henderson <rth@redhat.com>
4356
4357 * expr.c (case_identity, get_primitive_array_vtable,
4358 java_expand_expr, emit_init_test_initialization): Remove.
4359 * java-tree.h (java_expand_expr): Remove.
4360 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
4361
4362 2004-07-07 Per Bothner <per@bothner.com>
4363
4364 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
4365 get internal error due to mismatched types.
4366
4367 * gcj.texi (Invoking gij): Document new -verbose:class flag.
4368
4369 * gcj.texi (Linking): New node. Document -lgij usage.
4370
4371 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
4372
4373 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
4374 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
4375 * java/class.c (set_super_info, class_depth, interface_of_p,
4376 maybe_add_interface, add_interface, make_class_data,
4377 layout_class, add_miranda_methods): Adjust BINFO macros.
4378 * expr.c (can_widen_reference_to, lookup_field): Likewise.
4379 * jcf-write.c (generate_classfile): Likewise.
4380 * parse.y (patch_anonymous_class,
4381 check_inner_circular_reference, check_circular_reference,
4382 java_complete_class, check_abstract_method_definitions,
4383 java_check_abstract_method_definitions,
4384 check_interface_throws_clauses, java_check_abstract_methods,
4385 lookup_java_interface_method2,
4386 find_applicable_accessible_methods_list): Likewise.
4387 * typeck.c (find_method_in_interface): Likewise.
4388 * verify.c (merge_types): Likewise.
4389
4390 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
4391
4392 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
4393 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
4394
4395 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
4396
4397 * class.c (make_class): Use make_tree_binfo.
4398 (set_super_info, add_interface_do): Likewise.
4399 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
4400
4401 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
4402
4403 * verify.c: Correct array element access formatting thinko.
4404
4405 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
4406
4407 * verify.c: Insert a short blurb at the start referring to the JVMS.
4408 (merge_type_state): Remove redundant nested if statement.
4409 (verify_jvm_instructions): Ensure current_subr is initialised to
4410 NULL_TREE.
4411 Minor formatting fixes all over the place.
4412
4413 2004-07-02 Richard Henderson <rth@redhat.com>
4414
4415 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4416
4417 2004-07-01 Richard Henderson <rth@redhat.com>
4418
4419 * class.c (registerClass_libfunc): Remove.
4420 (init_class_processing): Don't set it.
4421 (emit_register_classes): Take list_p parameter. Fill it in
4422 with _Jv_RegisterClass calls.
4423 * decl.c (java_init_decl_processing): Don't call
4424 init_resource_processing.
4425 * jcf-parse.c (java_emit_static_constructor): New.
4426 (java_parse_file): Call it.
4427 * resource.c (registerResource_libfunc): Remove.
4428 (init_resource_processing): Remove.
4429 (write_resource_constructor): Take list_p parameter. Fill it in
4430 with _Jv_RegisterResource calls.
4431 * java-tree.h: Update prototypes.
4432
4433 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
4434
4435 PR java/1262
4436 * class.c (layout_class_method): Do not override package-private
4437 method if its in a different package.
4438 (split_qualified_name): Move here from parse.y. Rename from
4439 breakdown_qualified. Add comment.
4440 (in_same_package): Move here from parse.y. Add comment.
4441 * java-tree.h (break_down_qualified, in_same_package): Declare.
4442 (in_same_package): Likewise.
4443 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
4444 Callers updated.
4445
4446 2004-06-29 Andrew Haley <aph@redhat.com>
4447
4448 * except.c (expand_start_java_handler): Push a new binding level.
4449 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
4450 register_exception_range() to register where we'll do it.
4451 (expand_end_java_handler): Remove old bogus code. Replace with
4452 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4453 the top of the expression we're curently building.
4454 (maybe_end_try): Delete.
4455 * decl.c (binding_level.exception_range): New field.
4456 (clear_binding_level): Add field exception_range. Reformat.
4457 (poplevel): Call expand_end_java_handler().
4458 (poplevel): Call java_add_stmt only if functionbody is false.
4459 (maybe_poplevels): Don't call maybe_end_try() from here.
4460 (end_java_method): Clear no longer used trees in function decl.
4461 (register_exception_range): New function.
4462 * java-tree.h (register_exception_range, struct eh_range): Declare.
4463
4464 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
4465
4466 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
4467
4468 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
4469
4470 Formatting fixes.
4471 * expr.c (class_has_finalize_method): Fix method name indentation.
4472 (expand_java_call): Remove K&R style parameter declaration.
4473 (expand_invoke): Fix statement indentation.
4474 (expand_java_field_op): Likewise.
4475 * parse-scan.y: Fix typo.
4476 (reset_report): Fix method name indentation.
4477 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
4478 line. Fix typos.
4479 * verify.c (verify_jvm_instructions): Document parameters, insert
4480 page break.
4481 * lang.c (lang_init_source): Fix method name indentation.
4482 * class.c (common_enclosing_context_p): Likewise.
4483 (emit_symbol_table): Fix parameter list indentation.
4484 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
4485 parameter declaration.
4486 * constants.c: Fix copyright notice indentation.
4487 * typeck.c (find_method_in_superclasses): Fix parameter list
4488 indentation.
4489 (find_method_in_interfaces): Likewise.
4490 * zextract.c (makelong): Fix method name indentation.
4491
4492 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4493
4494 PR java/15715.
4495 * parse.y (create_interface): Set correct access modifiers for
4496 interfaces.
4497 * jcf-write.c (get_classfile_modifiers): New function.
4498 (generate_classfile): Use get_classfile_modifiers, not
4499 get_access_flags.
4500
4501 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4502
4503 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
4504 dependency to current parser context, not NULL_TREE, for top-level
4505 classes.
4506 (jdep_resolve_class): Enable member access check for all inner
4507 class dependencies.
4508
4509 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4510
4511 * parse.y (qualify_and_find): Pass type decl, not identifier, to
4512 load_class.
4513
4514 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4515
4516 PR java/15734
4517 * expr.c (expand_java_field_op): Ensure that target class for static
4518 field access has been loaded.
4519
4520 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4521 Ranjit Mathew <rmathew@hotmail.com>
4522
4523 PR java/1207, java/16178
4524 * jcf-parse.c (load_class): Return immediately if passed a type decl
4525 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
4526 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
4527 before calling load_class.
4528 (qualify_and_find): Likewise.
4529 (find_in_imports_on_demand): Likewise.
4530 (find_applicable_accessible_methods_list): Likewise.
4531
4532 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
4533
4534 * parse.y (java_layout_seen_class_methods): Don't call load_class
4535 on class defined by source parser.
4536
4537 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
4538
4539 * parse.y (set_nested_class_simple_name_value): Removed.
4540 (java_complete_expand_class): Remove calls to
4541 set_nested_class_simple_name_value.
4542
4543 2004-06-22 Andrew Haley <aph@redhat.com>
4544 Ranjit Mathew <rmathew@hotmail.com>
4545
4546 Fixes PR java/16113.
4547 * decl.c (force_poplevels): Remove call to expand_end_bindings.
4548
4549 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
4550
4551 * parse.y (create_class): Correct diagnostic message about
4552 java.lang.Object extending anything else.
4553
4554 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4555
4556 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
4557 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
4558 * constants.c (build_ref_from_constant_pool): Likewise.
4559 * expr.c (build_java_array_length_access): Likewise.
4560 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
4561 (invoke_build_dtable, build_invokevirtual): Likewise.
4562 (build_invokeinterface, java_expand_expr): Likewise.
4563 (emit_init_test_initialization): Likewise.
4564 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4565 * parse.y (make_qualifed_name, build_array_ref): Likewise.
4566
4567 2004-06-21 Andrew Haley <aph@redhat.com>
4568
4569 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
4570 block.
4571
4572 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
4573
4574 * jcf.h (struct JCF): Change java_source, right_zip and finished
4575 to unsigned int.
4576 * lex.h (struct java_lexer): Change hit_eof, read_anything,
4577 byte_swap and use_fallback to unsigned int.
4578 * parse.h (struct _jdep): Change flag0 to unsigned int.
4579
4580 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
4581
4582 Fixes PR java/13948
4583 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
4584 before trying to lay out its methods.
4585 * jcf-parse.c (read_class): Track parsed files using canonical paths
4586 obtained via lrealpath from libiberty.
4587 (java_parse_file): Likewise.
4588 (parse_source_file_1): Rename formal parameter to reflect its
4589 modified purpose. Minor formatting fix.
4590
4591 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
4592
4593 * class.c (emit_register_classes): Make the function uninlinable,
4594 do not set current_function_cannot_inline.
4595 * resource.c (write_resource_constructor): Do not reset
4596 flag_inline_functions around rest_of_compilation.
4597
4598 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
4599
4600 PR java/15769
4601 * expr.c (java_truthvalue_conversion): Handle
4602 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
4603 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
4604 i.e. return the expression.
4605
4606 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
4607
4608 * gjavah.c: Include version.h
4609
4610 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
4611
4612 * jcf-write.c (generate_bytecode_conditional): Correct handling
4613 of unordered conditionals. Add comment.
4614
4615 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
4616 Per Bothner <per@bothner.com>
4617
4618 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
4619 local variable was initialised upon declaration.
4620 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
4621 variable was final and initialised upon declaration.
4622 * check-init.c (check_final_reassigned): Give error only if a blank
4623 final is not definitely unassigned or if an initialised final is
4624 reassigned.
4625 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
4626 assignment expressions. Remove case MODIFY_EXPR, label do_default.
4627 (check_init): Perform initialised-variable-removing-optimisation
4628 only on non-final local variables.
4629
4630 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
4631
4632 * jcf-write.c (generate_bytecode_conditional): Handle binops
4633 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
4634 and LTGT_EXPR.
4635 (generate_bytecode_insns): Likewise.
4636
4637 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
4638
4639 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
4640 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
4641
4642 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
4643
4644 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
4645 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
4646
4647 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
4648
4649 * decl.c (struct binding_level): Add GTY marker. Compile
4650 binding_depth unconditionally.
4651 (current_binding_level, free_binding_level, global_binding_level):
4652 Likewise.
4653 (clear_binding_level): Unconditionally set binding_depth.
4654 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
4655
4656 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
4657
4658 * lex.c (java_new_lexer): Set 'encoding'.
4659 (java_read_char): Improve error message for unrecognized characters.
4660 * lex.h (struct java_lexer): New field 'encoding'.
4661
4662 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
4663
4664 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
4665
4666 2004-05-21 Mark Wielaard <mark@klomp.org>
4667
4668 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
4669 extern.
4670
4671 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
4672
4673 * typeck.c: Remove non-printable character 160.
4674
4675 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
4676
4677 * check-init.c: Correct minor typos.
4678
4679 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4680
4681 * Make-lang.in, expr.c, java-gimplify.c: Rename
4682 tree-simple.[ch] to tree-gimple.[ch].
4683
4684 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
4685
4686 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
4687
4688 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4689
4690 Merge from tree-ssa-20020619-branch. See
4691 ChangeLog.tree-ssa for details.
4692
4693 * Make-lang.in, builtins.c, check-init.c, class.c,
4694 constants.c, decl.c, except.c, expr.c, java-except.h,
4695 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
4696 lang.c, lang.opt, parse.y, resource.c: Merged.
4697 * java-gimplify.c: New file.
4698
4699 2004-05-10 Andrew Haley <aph@redhat.com>
4700
4701 * parse.y (create_class): Set TYPE_VFIELD.
4702 * decl.c (java_init_decl_processing): Likewise.
4703
4704 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
4705 * class.c (make_method_value): Replace DECL_VINDEX with call to
4706 get_method_index().
4707 (get_dispatch_vector): Likewise.
4708 (layout_class_method): Likewise.
4709 Replace set of DECL_VINDEX with call to set_method_index().
4710 (set_method_index): New function.
4711 (get_method_index): New function.
4712 * java-tree.h (set_method_index): New function decl.
4713 (get_method_index): New function decl.
4714
4715 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
4716
4717 * parse.y (check_pkg_class_access): Add new argument
4718 and use it when cl is NULL to call lookup_cl on it.
4719 (parser_check_super_interface): Do not call lookup_cl.
4720 Pass this_decl to check_pkg_class_access and NULL
4721 instead of lookup_cl.
4722 (parser_check_super): Update for change in
4723 check_pkg_class_access.
4724 (do_resolve_class): Likewise.
4725 (process_imports): Likewise.
4726 (find_in_imports_on_demand): Likewise.
4727 (resolve_qualified_expression_name): Likewise.
4728
4729 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
4730
4731 Fixes PR java/9685, PR java/15073
4732 * parse.y (accessibility_string): New method.
4733 (not_accessible_field_error): Use accessibility_string()
4734 instead of java_accstring_lookup().
4735 (resolve_qualified_expression_name): Check with
4736 check_pkg_class_access() before allowing access using
4737 qualified names.
4738 Fix comment typo.
4739 Use check_pkg_class_access() instead of not_accessible_p()
4740 for unqualified types.
4741 (not_accessible_p): Use DECL_CONTEXT (member) instead of
4742 REFERENCE for package-private access checking.
4743 (patch_method_invocation): Use accessibility_string() instead
4744 of java_accstring_lookup().
4745
4746 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
4747
4748 Fixes PR java/15133
4749 * gjavah.c (struct method_name): Add member is_native.
4750 (overloaded_jni_method_exists_p): Match candidate method only if
4751 it is native.
4752 (print_method_info): Initialise is_native flag from the method's
4753 access flags.
4754
4755 2004-04-30 Roger Sayle <roger@eyesopen.com>
4756
4757 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
4758 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
4759
4760 2004-04-22 Roger Sayle <roger@eyesopen.com>
4761
4762 * resource.c (write_resource_constructor): Guard call to possibly
4763 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
4764
4765 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
4766
4767 * class.c (make_class_data): Add new field aux_info.
4768 * decl.c (java_init_decl_processing): Push type and decl for
4769 `aux_info'.
4770
4771 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
4772
4773 * expr.c (expand_java_NEW): Don't use size argument for
4774 _Jv_AllocObject calls.
4775 * parse.y (patch_invoke): Likewise.
4776
4777 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
4778
4779 * expr.c (build_invokeinterface): Remove unused variables to
4780 fix warnings.
4781
4782 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
4783
4784 * class.c (get_interface_method_index): New function. Return dispatch
4785 index for interface method.
4786 (make_method_value): For interface methods, set index field to
4787 iface dispatch index, not DECL_VINDEX.
4788 * expr.c (build_invokeinterface): Use get_interface_method_index.
4789
4790 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4791
4792 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
4793
4794 2004-03-31 Andrew Haley <aph@redhat.com>
4795
4796 PR java/14104
4797 * jcf-io.c (opendir_in_zip): Tidy up error handling.
4798
4799 2004-03-30 Zack Weinberg <zack@codesourcery.com>
4800
4801 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
4802 form of GTY markers.
4803
4804 2004-03-25 Marcus Meissner <meissner@suse.de>
4805
4806 PR java/14689:
4807 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
4808
4809 2004-03-23 Tom Tromey <tromey@redhat.com>
4810
4811 PR java/14315:
4812 * jcf-write.c (make_class_file_name): Don't report if mkdir
4813 failed with EEXIST.
4814
4815 2004-03-23 Tom Tromey <tromey@redhat.com>
4816
4817 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
4818
4819 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
4820
4821 * class.c, gjavah.c, lang.c: Fix comment typos.
4822 * gcj.texi: Fix typos.
4823
4824 2004-03-19 Per Bothner <per@bothner.com>
4825
4826 * gcj.texi (Code Generation): Document new flags and assert defaults.
4827
4828 * class.c (assume_compiled_node_struct): Rename type to
4829 class_flag_node_struct, as it is now also used for enable_assertions.
4830 Rename assume_compiled_node typedef. Rename excludep field to value.
4831 (find_assume_compiled_node): Rename function to find_class_flag_node.
4832 Minor optimization - avoid needless strlen.
4833 (add_assume_compiled): Some tweaking and optimization.
4834 Rename and generalize to add_class_flag takem an extra parameter.
4835 (add_assume_compled): New just calls add_class_flag.
4836 (add_enable_assert, enable_assertions): New functions.
4837 (enable_assert_tree): New static.
4838 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
4839 * lang.opt (fenable-assertions, fenable-assertions=,
4840 fdisable-assertions, fdisable-assertions=): New options.
4841 * lang.c (java_handle_option): Handle new options.
4842 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
4843 class in an interface - create helper class nested in outer interface.
4844 (build_assertion): Short-circuit if enable_assertions is false.
4845
4846 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4847
4848 * java-tree.h: Changes throughout to add checking to macros
4849 and numerous whitespace changes.
4850 (VAR_OR_FIELD_CHECK): New macro.
4851 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
4852 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
4853
4854 2004-03-16 Per Bothner <per@bothner.com>
4855
4856 * jcf-jump.c (options): New --print-constants option.
4857 * gcj.texi (Invoking jcf-dump): Document --print-constants.
4858
4859 * jcf-dump.c (flag_print_constant_pool): Default to off.
4860 (print_constant_terse_with_index): New helper function.
4861 (various places): Check flag_print_constant_pool where missing.
4862 (main): If verbose set flag_print_constant_pool.
4863 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
4864
4865 2004-03-15 Andrew Haley <aph@redhat.com>
4866
4867 PR java/14581
4868 * parse.y (java_complete_lhs): Check that final variable has an
4869 initializer.
4870
4871 2004-03-12 Andrew Haley <aph@redhat.com>
4872
4873 PR java/14551
4874 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
4875 conversion.
4876
4877 2004-02-29 Roger Sayle <roger@eyesopen.com>
4878
4879 * jcf-parse.c (java_parse_file): Handle the case that input_filename
4880 is NULL.
4881
4882 2004-02-27 Per Bothner <per@bothner.com>
4883
4884 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
4885 suggestion: Use build_incomplete_class_ref.
4886 This fixes PR java/13508, java/11714.
4887
4888 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
4889
4890 * java/parse.h: Update copyright.
4891
4892 2004-02-26 Andrew Haley <aph@redhat.com>
4893
4894 PR java/14231:
4895 * parse.y (check_interface_throws_clauses): Check for
4896 !METHOD_INVISIBLE (iface_method).
4897 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
4898 well as CLASS_ABSTRACT.
4899
4900 2004-02-25 Per Bothner <per@bothner.com>
4901
4902 * parse.y (build_assertion): If we're in an inner class, create the
4903 class$ helper routine in the outer class.
4904
4905 2004-02-19 Richard Henderson <rth@redhat.com>
4906
4907 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
4908
4909 2004-02-16 Geoffrey Keating <geoffk@apple.com>
4910
4911 * Make-lang.in (java.install-man): Add extra dependencies.
4912
4913 2004-02-13 Geoffrey Keating <geoffk@apple.com>
4914
4915 * Make-lang.in: Install man pages under the same names
4916 (possibly transformed) as the program they document.
4917
4918 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
4919
4920 * gjavah.c: Include "intl.h".
4921 (error): New function.
4922 (main): Call gcc_init_libintl.
4923 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
4924 print_stub_or_jni, process_file, main): Use error rather than
4925 fprintf.
4926 (print_method_info, usage, help, version, main): Mark strings for
4927 translation with _. Avoid splitting up sentences. Send
4928 information messages to stdout.
4929 * jcf-dump.c: Include "intl.h".
4930 (main): Call gcc_init_libintl.
4931 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
4932 Mark error, usage and version messages for translation with _.
4933 Avoid splitting up sentences.
4934 * jv-scan.c: Include "intl.h".
4935 (fatal_error, warning): Change parameter s to msgid. Translate
4936 messages.
4937 (main): Call gcc_init_libintl.
4938 (usage, help, version): Mark error, usage and version messages for
4939 translation with _. Avoid splitting up sentences.
4940 * jvgenmain.c: Include "intl.h".
4941 (main): Call gcc_init_libintl.
4942 (usage, main): Mark error messages for translation with _.
4943 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
4944 JVGENMAIN_OBJS): Add intl.o.
4945 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
4946 java/jvgenmain.o): Update dependencies.
4947
4948 2004-02-08 Per Bothner <per@bothner.com>
4949
4950 * parse.y (resolve_qualified_expression_name): In case of inaccessible
4951 class don't use not_accessible_field_error, which can get confused.
4952
4953 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
4954
4955 Make-lang.in (po-generated): Delete.
4956
4957 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
4958
4959 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
4960 Depend on target.h.
4961 * decl.c: Include target.h.
4962 (start_java_method): Replace PROMOTE_PROTOTYPES with
4963 targetm.calls.promote_prototypes.
4964 * expr.c: Include target.h.
4965 (pop_arguments): Replace PROMOTE_PROTOTYPES with
4966 targetm.calls.promote_prototypes.
4967 * parse.y: Include target.h.
4968 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
4969 with targetm.calls.promote_prototypes.
4970
4971 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
4972
4973 * typeck.c: Update copyright.
4974
4975 2004-02-02 Tom Tromey <tromey@redhat.com>
4976
4977 * decl.c (java_init_decl_processing): Remove duplicate
4978 gnu/gcj/RawData.
4979
4980 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
4981
4982 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
4983
4984 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
4985
4986 * expr.c (build_field_ref): Move variable
4987 definition up.
4988
4989 2004-01-28 Andrew Haley <aph@redhat.com>
4990
4991 * expr.c (build_field_ref): Widen field offset.
4992
4993 2004-01-27 Andrew Haley <aph@redhat.com>
4994
4995 java/13273
4996 * parse.y (check_interface_throws_clauses): Make sure class_decl
4997 has been loaded.
4998
4999 2004-01-22 Jeff Sturm <jsturm@one-point.com>
5000
5001 PR java/13733
5002 * parse.y (patch_assignment): Don't modify lhs_type for
5003 reference assignments.
5004
5005 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5006
5007 * Make-lang.in: Replace $(docdir) with doc.
5008 (java.info, java.srcinfo, java.man, java.srcman): New rules.
5009 (java.install-man): Revamp rule.
5010
5011 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5012
5013 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
5014 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
5015 instead of deferred backquote.
5016
5017 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
5018
5019 * typeck.c (find_method_in_interfaces): Move variable
5020 definition up.
5021
5022 2004-01-16 Andrew Haley <aph@redhat.com>
5023
5024 PR java/13273:
5025 * typeck.c (shallow_find_method): New.
5026 (find_method_in_superclasses): New.
5027 (find_method_in_interfaces): New.
5028 (lookup_do): Rewrite.
5029 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
5030
5031 * jcf-parse.c (read_class): Save and restore output_class.
5032 * decl.c (java_expand_body): Set output_class from fndecl.
5033
5034 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
5035
5036 * class.c (gen_indirect_dispatch_tables): Fix string length
5037 calculations.
5038
5039 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
5040
5041 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
5042 (java.srcextra): Copy above back to source directory if requested.
5043 (po-generated): Delete reference to $(parsedir).
5044 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
5045 Use implicit rule.
5046
5047 2004-01-14 Jan Hubicka <jh@suse.cz>
5048
5049 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
5050 estimation.
5051
5052 2004-01-09 Mark Mitchell <mark@codesourcery.com>
5053
5054 * java-tree.h (java_expand_expr): Change prototype.
5055 * expr.c (java_expand_expr): Add alt_rtl parameter.
5056
5057 2004-01-09 Andrew Haley <aph@redhat.com>
5058
5059 PR java/12755:
5060 * parse.y (java_fix_constructors): Set output_class.
5061 (java_reorder_fields): Likewise.
5062 (java_layout_classes): Likewise.
5063 (java_expand_classes): Generate indirect dispatch tables.
5064 (java_expand_classes): Set output_class.
5065 (java_finish_classes): Likewise.
5066 * lang.c (java_init): Turn on always_initialize_class_p if we're
5067 using indirect dis[atch.
5068 (java_decl_ok_for_sibcall): Use output_class, not current_class.
5069 (java_get_callee_fndecl): Use class local atable.
5070 * jcf-parse.c
5071 (always_initialize_class_p): Decl moved to java-tree.h.
5072 (HANDLE_CLASS_INFO): Set output_class.
5073 (read_class): Likewise.
5074 (parse_class_file): Call gen_indirect_dispatch_tables.
5075 (parse_zip_file_entries): Set output_class.
5076 (java_parse_file): Set output_class. Don't emit symbol tables.
5077 * java-tree.h (output_class): New.
5078 Remove global declarations for otable, atable, and ctable.
5079 (always_initialize_class_p): moved here from decl.c.
5080 (DECL_OWNER): New.
5081 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
5082 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
5083 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
5084 (struct lang_type): Add otable_methods, otable_decl,
5085 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
5086 ctable_decl, catch_classes, type_to_runtime_map.
5087 * expr.c (build_field_ref): Make otable, atable, and ctable class
5088 local rather than global.
5089 (build_known_method_ref): Likewise.
5090 (build_invokeinterface): Likewise.
5091 (java_expand_expr): Pass runtime type (rather than actual type) to
5092 expand_start_catch.
5093 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
5094 this class. Look up each class in that map to delete duplicates.
5095 (expand_end_java_handler): Pass runtime type (rather than actual
5096 type) to expand_start_catch.
5097 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
5098 (do_nothing): New.
5099 (java_init_decl_processing): Rearrange things. Remove global
5100 declarations of otable, atable, and ctable.
5101 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
5102 (java_expand_body): Set output_class.
5103 * constants.c (build_constant_data_ref): Use output_class, not
5104 current_class.
5105 (alloc_name_constant): Likewise.
5106 * class.c (gen_indirect_dispatch_tables): New.
5107 (build_class_ref): Generate hard reference to superclass, even if
5108 using indirect dispatch.
5109 (build_static_field_ref): Use class local atable.
5110 (make_class_data): Generate hard reference to superclass, even if
5111 using indirect dispatch.
5112 Generate symbolic references to interfaces when using indirect
5113 dispatch.
5114 (make_class_data): Emit otable, atable, and ctable.
5115 Make otable, atable, and ctable class local rather than global.
5116 (emit_catch_table): Make otable, atable, and ctable class local
5117 rather than global.
5118
5119 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
5120
5121 * parse.y (catch_clause_parameter): Fix typo.
5122
5123 PR java/13404
5124 * parse.y: (catch_clause_parameter): Return early if $3, aka
5125 formal_parameter, is null.
5126
5127 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
5128
5129 * class.c: Remove uses of "register" specifier in
5130 declarations of arguments and local variables.
5131 * decl.c: Likewise.
5132 * expr.c: Likewise.
5133 * gjavah.c: Likewise.
5134 * jcf-dump.c: Likewise.
5135 * jcf-io.c: Likewise.
5136 * jcf-parse.c: Likewise.
5137 * jcf-write.c: Likewise.
5138 * keyword.h: Likewise.
5139 * parse.y: Likewise.
5140 * typeck.c: Likewise.
5141 * verify.c: Likewise.
5142
5143 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
5144
5145 * Make-lang.in (GCJ_CROSS_NAME): Delete.
5146 (java.install_common, java.install-man): Adjust for above.
5147 (java.uninstall): Likewise.
5148
5149 2003-12-03 Michael Koch <konqueror@gmx.de>
5150
5151 * class.c (make_class_data):
5152 Push field value to 'hack_signers' instead of 'signers'.
5153 * decl.c (java_init_decl_processing):
5154 Push field 'hack_signers' instead of 'signers'.
5155
5156 2003-12-03 Zack Weinberg <zack@codesourcery.com>
5157
5158 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
5159 including iconv.h.
5160
5161 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
5162
5163 PR java/12374:
5164 * parse.y (qualify_ambiguous_name): Remove lots of broken
5165 field access processing - there's no need to do that here,
5166 because we have resolve_field_access. Remove
5167 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
5168 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
5169 used.
5170
5171 2003-12-01 Jeff Sturm <jsturm@one-point.com>
5172
5173 Fix PR java/13237
5174 * parse.y (java_complete_lhs): Save location prior to patching
5175 CALL_EXPR.
5176
5177 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
5178
5179 PR java/12548
5180 * resource.c (write_resource_constructor): Append
5181 "_resource" to constructor identifier name.
5182
5183 2003-11-25 Jeff Sturm <jsturm@one-point.com>
5184
5185 Fix PR java/13183.
5186 * constants.c (cpool_for_class): New function.
5187 (outgoing_cpool): Remove global variable.
5188 (alloc_name_constant): Use cpool_for_class.
5189 (build_constants_constructor): Likewise.
5190 * decl.c (java_expand_body): Set current_class.
5191 * java-tree.h (outgoing_cpool) Remove declaration.
5192 (init_outgoing_cpool): Likewise.
5193 * jcf-parse.c (init_outgoing_cpool): Remove function.
5194 (parse_class_file): Don't call init_outgoing_cpool.
5195 * parse.y (java_complete_expand_methods): Don't call
5196 init_outgoing_cpool. Don't save outgoing_cpool.
5197 (java_expand_classes): Don't restore outgoing_cpool.
5198 (java_finish_classes): Likewise.
5199
5200 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
5201
5202 * Make-lang.in: (java.install-common) Add
5203 symlink for $(target_noncanonical)-gcjh for
5204 native builds.
5205
5206 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
5207
5208 * Make-lang.in (java.extraclean): Delete.
5209
5210 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
5211
5212 * Make-lang.in (check-java): Add.
5213
5214 2003-11-19 Jeff Sturm <jsturm@one-point.com>
5215
5216 Fix PR java/13024.
5217 * except.c (prepare_eh_table_type): Allocate variable-sized
5218 buffer `buf' with alloca.
5219
5220 2003-11-17 Jeff Sturm <jsturm@one-point.com>
5221
5222 Fix PR java/12857.
5223
5224 decl.c (java_init_decl_processing): Don't initialize
5225 class_not_found_type_node, no_class_def_found_type_node.
5226
5227 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
5228 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
5229 (class_not_found_type_node, no_class_def_found_type_node):
5230 Don't define.
5231
5232 parse.y (build_dot_class_method_invocation): Add this_class
5233 argument. Qualify method invocations to a different class.
5234 (create_new_parser_context): Initialize saved_data_ctx to 0.
5235 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
5236 (build_dot_class_method): Don't load classes. Register
5237 incomplete types.
5238 (build_incomplete_class_ref): Special cases for interfaces
5239 and inner classes. Move build_dot_class_method call to here...
5240 (patch_incomplete_class_ref): ...from here. Pass current_class
5241 to build_dot_class_method_invocation.
5242 (build_assertion): Pass class_type to
5243 build_dot_class_method_invocation.
5244 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
5245
5246 2003-11-17 Jeff Sturm <jsturm@one-point.com>
5247
5248 Fix PR java/12739.
5249 * java-tree.h (BLOCK_EMPTY_P): Define.
5250 * parse.y (java_complete_lhs): Check for empty blocks
5251 in TRY_FINALLY_EXPR case.
5252
5253 2003-11-17 Andrew Haley <aph@redhat.com>
5254
5255 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
5256 (struct lang_decl_var:freed): New variable.
5257 * decl.c (poplevel): Mark local vars that have gone out of scope.
5258 (push_jvm_slot): Don't use the RTL of a var that has gone out of
5259 scope.
5260
5261 2003-11-16 Jason Merrill <jason@redhat.com>
5262
5263 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
5264 and TAGS files that include them for each front end.
5265
5266 2003-11-15 Tom Tromey <tromey@redhat.com>
5267
5268 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
5269
5270 2003-11-12 Jason Merrill <jason@redhat.com>
5271
5272 PR optimization/12547
5273 * lang.c (java_tree_inlining_walk_subtrees): Just walk
5274 BLOCK_EXPR_BODY directly.
5275
5276 2003-11-12 Andrew Haley <aph@redhat.com>
5277
5278 PR java/11045
5279 * parse.y (fold_constant_for_init): Check that we really do have a
5280 constant.
5281
5282 PR java/11533
5283 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
5284 init_test_decls being inlined.
5285
5286 PR java/12890:
5287 * parse.y (do_resolve_class): Check return value from
5288 breakdown_qualified().
5289
5290 2003-11-11 Tom Tromey <tromey@redhat.com>
5291
5292 PR java/12915:
5293 * parse.y (merge_string_cste): Handle case where we have a
5294 pointer that happens to be zero, not null_pointer_node.
5295
5296 2003-11-10 Tom Tromey <tromey@redhat.com>
5297
5298 * jcf-parse.c (classify_zip_file): Correctly compare
5299 filename_length against length of manifest file's name.
5300
5301 2003-11-08 Tom Tromey <tromey@redhat.com>
5302
5303 PR java/12894:
5304 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
5305
5306 2003-11-06 Andrew Haley <aph@redhat.com>
5307
5308 * expr.c (java_stack_swap): Make sure destination stack slots are
5309 of the correct type.
5310
5311 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
5312
5313 * Make-lang.in (dvi): Move targets to $(docobjdir).
5314 (gcj.dvi): Simplify rule and adjust target.
5315 (gcj.info): Simplify rule.
5316 (gcj.pod): New intermediate rule.
5317 (gcjh.pod): Likewise.
5318 (jv-scan.pod): Likewise.
5319 (jcf-dump.pod): Likewise.
5320 (gij.pod): Likewise.
5321 (jv-convert.pod): Likewise.
5322 (rmic.pod): Likewise.
5323 (rmiregistry.pod): Likewise.
5324 (gcj.1): Delete.
5325 (gcjh.1): Delete.
5326 (jv-scan.1): Delete.
5327 (jcf-dump.1): Delete.
5328 (gij.1): Delete.
5329 (jv-convert.1): Delete.
5330 (rmic.1): Delete.
5331 (rmiregistry.1): Delete.
5332
5333 2003-11-02 Jeff Sturm <jsturm@one-point.com>
5334
5335 Fixes PR java/12866.
5336 * parse.y (resolve_qualified_expression_name): Move test
5337 for outer field access methods from here...
5338 (check_thrown_exceptions) ...to here.
5339
5340 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
5341
5342 * .cvsignore: Delete.
5343
5344 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
5345
5346 * verify.c (verify_jvm_instructions): Don't warn about legal
5347 eh binding regions generated for example by jdk 1.4.1.
5348
5349 2003-10-24 David S. Miller <davem@redhat.com>
5350
5351 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
5352
5353 2003-10-22 Andrew Haley <aph@redhat.com>
5354
5355 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
5356 (java_get_callee_fndecl): New.
5357
5358 * jcf-parse.c (java_parse_file): Call emit_catch_table().
5359
5360 * java-tree.h (ctable_decl): New.
5361 (catch_classes): New.
5362 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
5363
5364 * decl.c (java_init_decl_processing): Add catch_class_type.
5365 Add ctable_decl.
5366 Add catch_classes field.
5367
5368 * class.c (build_indirect_class_ref): Break out from
5369 build_class_ref.
5370 (make_field_value): Check flag_indirect_dispatch.
5371 (make_class_data): Ditto.
5372 Tidy uses of PUSH_FIELD_VALUE.
5373 Add field catch_classes.
5374 (make_catch_class_record): New.
5375
5376 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
5377
5378 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
5379
5380 * jcf-write.c: Follow spelling conventions.
5381 * parse.y: Likewise.
5382
5383 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
5384
5385 * ChangeLog: Fix typos.
5386 * expr.c: Fix comment typos.
5387 * jcf-write.c: Likewise.
5388 * lang.c: Likewise.
5389 * lex.c: Likewise.
5390 * mangle.c: Likewise.
5391 * parse-scan.y: Likewise.
5392 * parse.y: Likewise.
5393
5394 2003-10-22 Tom Tromey <tromey@redhat.com>
5395
5396 * expr.c (expand_byte_code): Only warn about dead bytecode when
5397 extra_warnings is set.
5398
5399 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
5400
5401 Fix for PR java/12586.
5402 * mangle.c (find_compression_record_match): Don't iterate through
5403 package namespace elements unless they all match compression_table
5404 entries.
5405
5406 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
5407
5408 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
5409 (generate-manpages): Likewise.
5410 (java.maintainer-clean): Likewise.
5411 (gcj.info): Likewise.
5412 (gcj.1): Likewise.
5413 (gcjh.1): Likewise.
5414 (jv-scan.1): Likewise.
5415 (jcf-dump.1): Likewise.
5416 (gij.1): Likewise.
5417 (jv-convert.1): Likewise.
5418 (rmic.1): Likewise.
5419 (rmiregistry.1): Likewise.
5420 (java.install-man): Likewise.
5421 (parse-scan.o): Move and define complete compile line.
5422 (parse.o): Likewise.
5423 (jcf-tree-inline.o): Move.
5424
5425 2003-10-20 Mark Mitchell <mark@codesourcery.com>
5426
5427 * Make-lang.in (info): Update dependencies.
5428 (java.install-info): Remove.
5429 ($(srcdir)/java/gcj.info): Replace with ...
5430 ($(docobjdir)/gcj.info): ... this.
5431
5432 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
5433
5434 * Make-lang.in: Replace uses of $(target_alias) with
5435 $(target_noncanonical).
5436
5437 2003-10-09 Tom Tromey <tromey@redhat.com>
5438
5439 * decl.c (java_init_decl_processing): Declare signers field.
5440 * class.c (make_class_data): Set signers field.
5441
5442 2003-10-09 Jason Merrill <jason@redhat.com>
5443
5444 * parse.y (patch_assignment): Use make_node to create a BLOCK.
5445 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
5446 POINTER_TYPE.
5447
5448 2003-10-06 Mark Mitchell <mark@codesourcery.com>
5449
5450 * Make-lang.in (java.info): Replace with ...
5451 (info): ... this.
5452 (java.dvi): Replace with ...
5453 (dvi): ... this.
5454 (java.generated-manpages): Replace with ...
5455
5456 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
5457
5458 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
5459
5460 2003-10-01 Andrew Haley <aph@redhat.com>
5461
5462 * jcf-parse.c (java_parse_file): Write otable and atable.
5463 * java-tree.h (atable_methods): New.
5464 (atable_decl): New.
5465 (atable_syms_decl): New.
5466 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
5467 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
5468 (symbol_*type): Rename method_symbol* to symbol*type.
5469 (emit_offset_symbol_table): Delete.
5470 (emit_symbol_table): New.
5471 (get_symbol_table_index): New.
5472 (atable_type): New.
5473 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
5474 (build_known_method_ref): Likewise.
5475 (get_symbol_table_index): Rename from get_offset_table_index.
5476 Parameterize to allow re-use by differing types of symbol table.
5477 (build_invokevirtual): Pass table to get_offset_table_index.
5478 * decl.c (java_init_decl_processing): Push types and decls for
5479 atable and atable_syyms.
5480 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
5481 (make_class_data): Add new fields atable and atable_syms.
5482 (emit_symbol_table): Rename from emit_offset_symbol_table.
5483 Parameterize to allow re-use by different types of symbol table.
5484 (build_symbol_entry): Renamed from build_method_symbols_entry.
5485
5486 2003-09-30 Roger Sayle <roger@eyesopen.com>
5487
5488 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
5489 semantics for SAVE_EXPR, by caching the result in a temporary.
5490
5491 2003-09-28 Richard Henderson <rth@redhat.com>
5492
5493 * check-init.c (check_init): Save and restore input_location
5494 instead of file and line separately.
5495 * decl.c (java_expand_body): Likewise.
5496 * jcf-write.c (generate_bytecode_insns): Likewise.
5497 * parse.y (safe_layout_class): Likewise.
5498 * jcf-parse.c (read_class, parse_class_file): Likewise.
5499 (java_parse_file): Use %H for warning locator.
5500
5501 2003-09-28 Roger Sayle <roger@eyesopen.com>
5502
5503 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
5504 with void-type branches instead of using a COMPOUND_EXPR.
5505
5506 2003-09-28 Jeff Sturm <jsturm@one-point.com>
5507
5508 * decl.c (java_optimize_inline, dump_function): Remove.
5509 * java-tree.h (java_optimize_inline): Remove declaration.
5510 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
5511 * parse.y (source_end_java_method, java_expand_classes):
5512 Likewise. Remove dead code.
5513
5514 2003-09-27 Roger Sayle <roger@eyesopen.com>
5515
5516 * lang.c (java_init_options): Set flag_evaluation_order.
5517 * expr.c (force_evaluation_order): Don't attempt to force
5518 evaluation order of binary operations using save_expr.
5519 * parse.y (java_complete_lhs): No longer need to call
5520 force_evaluation_order when constructing binary operators.
5521
5522 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
5523 Bryce McKinlay <bryce@mckinlay.net.nz>
5524
5525 PR java/1333:
5526 * parse.y (not_accessible_field_error): New function.
5527 (resolve_expression_name): Check field access permissions.
5528 (resolve_qualified_expression_name): Use
5529 not_accessible_field_error.
5530 (resolve_qualified_expression_name): Likewise.
5531
5532 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5533
5534 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
5535
5536 2003-09-23 Roger Sayle <roger@eyesopen.com>
5537
5538 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
5539 with equal operands without side-effects.
5540
5541 2003-09-22 Jeff Sturm <jsturm@one-point.com>
5542
5543 * decl.c (java_init_decl_processing): Don't emit otable decls
5544 if flag_indirect_dispatch is not set.
5545
5546 2003-09-21 Richard Henderson <rth@redhat.com>
5547
5548 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5549 resource.c: Revert.
5550
5551 2003-09-21 Richard Henderson <rth@redhat.com>
5552
5553 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5554 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
5555
5556 2003-09-20 Richard Henderson <rth@redhat.com>
5557
5558 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
5559
5560 2003-09-18 Roger Sayle <roger@eyesopen.com>
5561
5562 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
5563 * check-init.c (check_init): Likewise.
5564
5565 2003-09-18 Roger Sayle <roger@eyesopen.com>
5566
5567 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
5568
5569 2003-09-16 Andrew Haley <aph@redhat.com>
5570
5571 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
5572
5573 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
5574
5575 Fixes PR java/9577
5576 * mangle.c (find_compression_record_match): Skip
5577 over a "6JArray" (the array template mangled string)
5578 IDENTIFIER_NODE.
5579 (mangle_array_type): Correct minor typo.
5580 (atms): Move definition to the beginning.
5581
5582 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
5583
5584 * class.c (add_miranda_methods): Ensure super-interfaces are laid
5585 out. Fix for PR java/12254.
5586
5587 2003-09-11 Richard Henderson <rth@redhat.com>
5588
5589 * parse.y (source_end_java_method): Update for new
5590 cgraph_finalize_function argument.
5591
5592 2003-09-09 Richard Henderson <rth@redhat.com>
5593
5594 * parse.y (source_end_java_method): Update call to
5595 cgraph_finalize_function.
5596
5597 2003-09-03 Jeff Sturm <jsturm@one-point.com>
5598
5599 * decl.c (java_expand_body): New function.
5600 * expr.c (build_class_init): Set DECL_IGNORED_P.
5601 * java-tree.h (start_complete_expand_method,
5602 java_expand_body): Declare.
5603 * jcf-parse.c (cgraph.h): Include.
5604 (java_parse_file): Handle flag_unit_at_a_time.
5605 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
5606 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
5607 (java_estimate_num_insns): Use walk_tree_without_duplicates.
5608 (java_start_inlining): New function.
5609 * parse.h (java_finish_classes): Declare.
5610 * parse.y: Include cgraph.h.
5611 (block): Don't special-case empty block production.
5612 (craft_constructor): Set DECL_INLINE.
5613 (source_end_java_method): Handle flag_unit_at_a_time.
5614 Replace inline code with call to java_expand_body.
5615 (start_complete_expand_method): Remove static modifier.
5616 (java_expand_method_bodies): Patch function tree for
5617 class initialization and/or synchronization as needed.
5618 Don't begin RTL expansion yet.
5619 (java_expand_classes): Check flag_unit_at_a_time before
5620 calling finish_class.
5621 (java_finish_classes): New function.
5622 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
5623 (patch_assignment): Set DECL_CONTEXT on temporary variable.
5624 (emit_test_initialization): Set DECL_IGNORED_P.
5625
5626 2003-09-03 Roger Sayle <roger@eyesopen.com>
5627
5628 * builtins.c (enum builtin_type): Delete unused enumeration.
5629 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
5630
5631 2003-08-28 Tom Tromey <tromey@redhat.com>
5632
5633 * gcj.texi (Extensions): Document gcjlib URLs.
5634
5635 2003-08-20 Tom Tromey <tromey@redhat.com>
5636
5637 * gcj.texi (Extensions): Added xref.
5638 (libgcj Runtime Properties): Document
5639 gnu.gcj.runtime.VMClassLoader.library_control.
5640
5641 2003-08-20 Andrew Haley <aph@redhat.com>
5642
5643 * except.c (prepare_eh_table_type): Use new encoding for exception
5644 handlers when using -fno-assume-compiled.
5645
5646 2003-08-13 Tom Tromey <tromey@redhat.com>
5647
5648 * gcj.texi (Invoking gij): Document -X and -?.
5649
5650 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
5651
5652 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
5653 GCJH_OBJS, JCFDUMP_OBJS
5654 * win32-host.c: Removed the unnecessary and broken dependency
5655 on jcf.h
5656
5657 2003-08-11 Tom Tromey <tromey@redhat.com>
5658
5659 * parse.y (java_check_regular_methods): Typo fixes. Call
5660 check_interface_throws_clauses. Use
5661 check_concrete_throws_clauses.
5662 (check_interface_throws_clauses): New function.
5663 (check_concrete_throws_clauses): New function.
5664 (hack_is_accessible_p): New function.
5665 (find_most_specific_methods_list): Added FIXME.
5666 * typeck.c (lookup_do): Use `flags' argument to decide what to
5667 do. Reimplemented.
5668 (lookup_argument_method_generic): New function.
5669 (lookup_argument_method2): Removed.
5670 * jcf.h (ACC_INVISIBLE): New define.
5671 * jcf-write.c (generate_classfile): Skip invisible methods.
5672 * class.c (add_miranda_methods): New function.
5673 (layout_class_methods): Use it.
5674 (get_access_flags_from_decl): Use ACC_INVISIBLE.
5675 * java-tree.h (METHOD_INVISIBLE): New define.
5676 (lang_decl_func) [invisible]: New field.
5677 (lookup_argument_method_generic): Declare.
5678 (SEARCH_INTERFACE): New define.
5679 (SEARCH_SUPER): Likewise.
5680 (SEARCH_ONLY_INTERFACE): Likewise.
5681 (SEARCH_VISIBLE): Likewise.
5682 (lookup_argument_method2): Removed declaration.
5683
5684 2003-08-05 Tom Tromey <tromey@redhat.com>
5685
5686 Fix for PR java/11600:
5687 * parse.y (java_complete_lhs): See whether we're calling a method
5688 on an array.
5689 (check_thrown_exceptions): Added `is_array_call' argument;
5690 fixed `clone' checking; updated all callers.
5691
5692 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
5693
5694 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
5695
5696 2003-08-03 Tom Tromey <tromey@redhat.com>
5697
5698 * java-tree.h (METHOD_TRANSIENT): Removed.
5699 * decl.c (pushdecl): Removed some dead code.
5700 * class.c (get_access_flags_from_decl): Can't have transient
5701 method.
5702 (add_method_1): Can't have a transient method.
5703
5704 2003-07-28 Andreas Jaeger <aj@suse.de>
5705
5706 * jvspec.c: Convert to ISO C90 prototypes.
5707
5708 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
5709
5710 * decl.c (force_poplevels): Fix warning call.
5711
5712 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
5713
5714 * expr.c (expand_java_field_op): Don't use xxx_with_decl
5715 (expand_java_field_op): Likewise.
5716 * class.c (layout_class_method): Likewise
5717 (emit_register_classes): Likewise.
5718 * decl.c (pushdecl): Likewise.
5719 (poplevel): Likewise.
5720 (force_poplevels): Likewise.
5721 (give_name_to_locals): Likewise.
5722 * check-init.c (check_for_initialization): Likewise.
5723
5724 2003-07-24 Jason Merrill <jason@redhat.com>
5725
5726 * java-tree.h: Move boolean_type_node et al to the back end.
5727
5728 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5729
5730 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
5731 casts.
5732
5733 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
5734
5735 * lang.opt: Don't show -MD_ and -MDD_.
5736
5737 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
5738
5739 * lang-options.h: Remove.
5740 * lang.opt: Add help text.
5741
5742 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
5743
5744 * expr.c: Remove the last argument to expand_assignment().
5745
5746 2003-07-09 Jan Hubicka <jh@suse.cz>
5747
5748 * java-tree.h (DECL_NUM_STMTS): Rename to...
5749 (DECL_ESTIMATED_INSNS): ... this.
5750 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
5751 New static functions.
5752 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
5753 * parser.y (add_stmt_to_compound): Do not account statements.
5754
5755 2003-07-08 Mark Wielaard <mark@klomp.org>
5756
5757 * gcj.texi: CNI now expands to Compiled Native Interface.
5758
5759 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5760
5761 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
5762
5763 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
5764
5765 * expr.c (expand_byte_code): Adjist emit_line_note call.
5766
5767 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
5768
5769 * lang.c (java_handle_option): Don't handle filenames.
5770
5771 2003-07-02 Zack Weinberg <zack@codesourcery.com>
5772
5773 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
5774 DIR_SEPARATOR.
5775 Use FILENAME_CMP.
5776 * jcf-write.c: Don't default-define DIR_SEPARATOR.
5777 * jcf.h: Delete COMPARE_FILENAMES definition.
5778
5779 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
5780
5781 * lang.c (java_init_options): Update prototype.
5782
5783 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
5784
5785 * decl.c (poplevel): Adjust define_label call.
5786
5787 2003-06-27 Zack Weinberg <zack@codesourcery.com>
5788
5789 * gjavah.c (flag_jni): Make non-static.
5790 * parse-scan.y (ctxp): Make non-static.
5791
5792 * class.c (build_method_symbols_entry)
5793 * expr.c (get_offset_table_index)
5794 * jcf-parse.c (jcf_parse):
5795 Mark the definition static, matching the forward declaration.
5796
5797 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
5798
5799 * lang.c (java_handle_option): Don't check for missing arguments.
5800
5801 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
5802
5803 * class.c (push_class): Use a location_t to save place.
5804 (emit_register_classes): Set input_location. Adjust
5805 expand_function_end call.
5806 * resource.c (write_resource_constructor): Likewise.
5807 * decl.c (end_java_method): Adjust expand_function_end call.
5808 * parse.y (source_end_java_method): Likewise.
5809
5810 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
5811
5812 * lang.c (java_handle_option): Likewise.
5813
5814 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
5815
5816 * lang.c (java_handle_option): Special-casing of optional
5817 joined arguments no longer needed.
5818 * lang.opt: Update switches that take optional argument.
5819
5820 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
5821
5822 * lang.opt: Declare Java.
5823 * lang.c (java_init_options): Update.
5824
5825 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
5826
5827 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
5828
5829 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
5830
5831 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
5832 * lang.c (java_handle_option): -MD and -MMD have an underscore.
5833 * lang.opt: -MD and -MMD have an underscore.
5834
5835 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
5836
5837 * class.c (emit_register_classes): Adjust init_function_start
5838 call.
5839 * decl.c (complete_start_java_method): Likewise.
5840 * resource.c (write_resource_constructor): Likewise.
5841
5842 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
5843
5844 * Make-lang.in: Update to use options.c and options.h.
5845 * lang.c: Include options.h not j-options.h.
5846 (java_handle_option): Abort on unrecognized option.
5847 (java_init_options): Request Java switches.
5848
5849 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
5850
5851 * Make-lang.in: Handle mostlyclean.
5852
5853 2003-06-11 Tom Tromey <tromey@redhat.com>
5854
5855 * lang.c (java_handle_option): Update dependency_tracking for
5856 OPT_MF case.
5857
5858 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
5859 empty argument.
5860
5861 2003-06-10 Andrew Haley <aph@redhat.com>
5862
5863 * resource.c (write_resource_constructor): Use expand_expr to
5864 generate the address of the label attached to a resource.
5865 * Make-lang.in (java/resource.o): Add expr.h
5866
5867 2003-06-10 Andrew Haley <aph@redhat.com>
5868
5869 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
5870 (java_decl_ok_for_sibcall): New.
5871
5872 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
5873
5874 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
5875 (java/j-options.c, java/j-options.h): New.
5876 * java-tree.h (resource_name, compile_resource_file,
5877 compile_resource_data): Constify.
5878 * jcf-write.c (jcf_write_base_directory): Similarly.
5879 * jcf.h (jcf_write_base_directory): Similarly.
5880 * lang.c: Include j-options.h.
5881 (cl_options_count, cl_options, string_option, java_decode_option,
5882 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
5883 process_option_with_no): Remove.
5884 (resource_name): Constify.
5885 (LANG_HOOKS_HANDLE_OPTION): Override.
5886 (java_handle_option): New.
5887 (java_init): Don't call jcf_path_init.
5888 (java_init_options): Call jcf_path_init.
5889 * lang.opt: New.
5890 * resource.c (compile_resource_data, compile_resource_file): Constify.
5891
5892 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
5893
5894 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
5895 (struct lang_decl_func): Add last_line field.
5896 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
5897 DECL_SOURCE_LINE_LAST): Remove.
5898 * parse.y (missing_return_error, finish_method_declaration,
5899 lookup_cl, start_artificial_method_body, source_end_java_method,
5900 start_complete_expand_method): Adjust.
5901
5902 2003-06-08 Tom Tromey <tromey@redhat.com>
5903
5904 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
5905 fno-assume-compiled.
5906
5907 2003-06-08 Roger Sayle <roger@eyesopen.com>
5908
5909 * builtins.c (define_builtin_type, builtin_types): Delete.
5910 (define_builtin): Rewritten to take just the built-in code,
5911 the function's name, type and fallback library function name.
5912 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
5913 (initialize_builtins): Overhaul to define the GCC builtins
5914 used by gcj manually, providing the Java run-time's
5915 implementations as the fallback library function.
5916
5917 2003-06-08 Anthony Green <green@redhat.com>
5918
5919 * parse.y (patch_cast): Fix conversions from floating-point to
5920 integral types.
5921
5922 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
5923
5924 * Make-lang.in: Update.
5925 * lang.c: Include opts.h. Define cl_options_count and cl_options.
5926
5927 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
5928
5929 * lang.c (java_init_options): Update.
5930
5931 2003-06-05 Jan Hubicka <jh@suse.cz>
5932
5933 * Make-lang.in: Add support for stageprofile and stagefeedback
5934
5935 2003-05-31 Roger Sayle <roger@eyesopen.com>
5936
5937 * lang.c (java_init_options): Prescribe wrap-around two's
5938 complement arithmetic overflow by setting flag_wrapv.
5939
5940 2003-05-29 Roger Sayle <roger@eyesopen.com>
5941
5942 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
5943 (builtin_record): Add an additional builtin_code field to
5944 record which GCC built-in corresponds to the Java function.
5945 (java_builtins): Add new entries for atan, atan2, exp, log,
5946 pow and tan.
5947 (max_builtin, min_builtin, abs_builtin): Perform constant
5948 folding on the resulting tree.
5949 (java_build_function_call_expr): Likewise, perform constant
5950 folding on the resulting tree.
5951 (initialize_builtins): The NULL creators are now allowed in
5952 the java_builtins table, which is now terminated by an entry
5953 with builtin_code == END_BUILTINS.
5954 (check_for_builtin): Likewise. If the matching creator is
5955 NULL, construct the call using java_build_function_call_expr
5956 directly with the decl for the corresponding builtin_code.
5957
5958 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
5959
5960 * win32-host.c: Normalize copyright boilerplate.
5961
5962 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5963
5964 * parse.y (print_int_node): Use string concatentation on
5965 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
5966 function calls into one.
5967
5968 2003-05-13 Zack Weinberg <zack@codesourcery.com>
5969
5970 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
5971 fatal_io_error with calls to fatal_error; add ": %m" to the end of
5972 all the affected error messages.
5973
5974 2003-05-13 Richard Henderson <rth@redhat.com>
5975
5976 * class.c (layout_class_method): Set DECL_EXTERNAL.
5977 * decl.c (java_mark_decl_local, java_mark_class_local): New.
5978 * java-tree.h (java_mark_class_local): Declare.
5979 * jcf-parse.c (parse_class_file): Use it.
5980 * parse.y (java_expand_classes): Likewise.
5981
5982 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
5983
5984 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
5985 * lex.h: #include input.h.
5986 * jv-scan.c (input_filename): Remove.
5987
5988 2003-05-02 Tom Tromey <tromey@redhat.com>
5989
5990 PR java/10491:
5991 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
5992 (handle_inner_classes): New function.
5993
5994 2003-05-01 Tom Tromey <tromey@redhat.com>
5995
5996 PR java/10459:
5997 * parse.y (finish_for_loop): Do nothing if update expression is a
5998 EXPR_WFL_NODE wrapping nothing.
5999 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
6000
6001 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
6002
6003 * lex.h (input_lineno): Remove declaration.
6004 * parse-scan.y: #include input.h.
6005 (input_filename): Remove declaration.
6006 (input_location): Add definition.
6007 (input_line): Remove definition.
6008
6009 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
6010
6011 * lex.h (lineno): Rename to ...
6012 (input_line): ... here
6013 * parse-scan.y (lineno): Rename to ...
6014 (input_line): ... here.
6015 (reset_report): Rename lineno to input_line.
6016 * check-init.c (check_init): Likewise.
6017 * class.c (push_class): Likewise.
6018 * decl.c (complete_start_java_method, end_java_method): Likewise.
6019 * expr.c (expand_byte_code): Likewise.
6020 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
6021 * jcf-write.c (generate_bytecode_insns): Likewise.
6022 * lex.c (java_init_lex, java_allocate_new_line,
6023 do_java_lex): Likewise.
6024 * parse.h (YYNOT_TWICE): Likewise.
6025 * parse.y (empty_statement, expression_statement,
6026 java_pop_parser_context, java_parser_context_save_global,
6027 yyerror, register_fields, method_header, safe_layout_class,
6028 find_in_imports_on_demand, create_artificial_method,
6029 source_end_java_method, start_complete_expand_method,
6030 build_thisn_assign, java_complete_lhs,
6031 maybe_absorb_scoping_block): Likewise.
6032
6033 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
6034
6035 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
6036 '/' when computing java source filename
6037
6038 2003-04-13 Tom Tromey <tromey@redhat.com>
6039
6040 * gjavah.c (print_c_decl): Indentation fix.
6041
6042 2003-04-12 Zack Weinberg <zack@codesourcery.com>
6043
6044 * class.c (make_field_value, make_method_value, get_dispatch_table)
6045 (make_class_data, emit_offset_symbol_table)
6046 * constants.c (build_constants_constructor)
6047 * java-tree.h (START_RECORD_CONSTRUCTOR)
6048 * parse.y (maybe_build_array_element_wfl):
6049 Use build_constructor.
6050
6051 2003-04-10 Eric Blake <ebb9@email.byu.edu>
6052
6053 PR java/10253:
6054 * parse.y (string_convert_int_cst): Always use at least one digit
6055 in string conversion. Remove ASCII dependence.
6056 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
6057
6058 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
6059
6060 * Make-lang.in: added win32-host.c
6061 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
6062 resolves to open() on non-Win32 platforms and
6063 Win32-specific jcf_open_exact_case() on Win32
6064 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
6065 when trying .java and .class files
6066 * win32-host.c: added to repository. Defines
6067 Win32-specific jcf_open_exact_case()
6068
6069 2003-04-10 Andrew Haley <aph@redhat.com>
6070
6071 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
6072 (maybe_free_localvar): Renamed from localvar_free.
6073 Add new arg, really.
6074 (generate_bytecode_insns): Set new variable, jsrs.
6075 Only free local vars if no jsr insns have been emittted.
6076 Call maybe_free_localvar, not localvar_free.
6077
6078 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
6079
6080 * gcj.texi: Remove @ at start of file.
6081
6082 2003-03-25 Tom Tromey <tromey@redhat.com>
6083
6084 * parse.y (create_interface): Call CHECK_DEPRECATED.
6085
6086 2003-03-23 Zack Weinberg <zack@codesourcery.com>
6087
6088 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
6089
6090 2003-03-21 Zack Weinberg <zack@codesourcery.com>
6091
6092 * javaop.h (jfloat, jdouble): Make them structures mirroring
6093 the bit fields of IEEE float and double respectively.
6094 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
6095 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
6096 (union Word, union DWord): Delete.
6097 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
6098
6099 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
6100 D_NAN_MASK): Delete.
6101 (jni_print_float, jni_print_double): New. Generate
6102 hexadecimal floating constants.
6103 (print_field_info): Use jni_print_float/double.
6104
6105 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
6106 finite floating point numbers for output; special case
6107 non-finite floats.
6108
6109 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
6110
6111 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
6112 Replace 0 and 1 with true and false in return statements.
6113
6114 2003-03-19 Tom Tromey <tromey@redhat.com>
6115
6116 * lex.c (do_java_lex): Renamed from java_lex.
6117 (java_lex): New function.
6118 Include timevar.h.
6119
6120 2003-03-13 Tom Tromey <tromey@redhat.com>
6121
6122 * parse.y (resolve_inner_class): Error if qualifier is a primitive
6123 type.
6124
6125 2003-03-04 Andrew Haley <aph@redhat.com>
6126
6127 * gjavah.c (is_first_data_member): New global variable.
6128 (print_c_decl): If it's the first data member, align it as the
6129 superclass.
6130 (process_file): Set is_first_data_member.
6131
6132 2003-03-11 Tom Tromey <tromey@redhat.com>
6133
6134 * parse.y (resolve_field_access): Initialize class if field is
6135 found in another static field.
6136 * expr.c (build_class_init): Don't optimize out initialization of
6137 implemented interface.
6138
6139 2003-03-11 Andrew Haley <aph@redhat.com>
6140
6141 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
6142 warning.
6143
6144 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
6145
6146 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
6147 and DIR_SEPARATOR_2 for a target.
6148 Correct minor typos.
6149
6150 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
6151 and DIR_SEPARATOR_2 for a target into account.
6152
6153 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
6154
6155 * lang.c (java_init): Update prototype, move code to java_post_options.
6156 (java_post_options): Similarly.
6157
6158 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
6159
6160 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
6161 compare file name components depending on the case-sensitivity
6162 or otherwise of the host file system.
6163
6164 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
6165 "strcmp" to compare file name components.
6166 Use IS_DIR_SEPARATOR instead of comparing directly against
6167 DIR_SEPARATOR.
6168 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
6169 comparing directly against DIR_SEPARATOR.
6170
6171 2003-03-04 Tom Tromey <tromey@redhat.com>
6172
6173 * Make-lang.in (java.tags): New target.
6174
6175 2003-03-01 Roger Sayle <roger@eyesopen.com>
6176
6177 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
6178 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
6179
6180 2003-03-01 Tom Tromey <tromey@redhat.com>
6181
6182 * parse.y (jdep_resolve_class): Only check deprecation if we found
6183 a decl.
6184
6185 2003-02-28 Tom Tromey <tromey@redhat.com>
6186
6187 PR java/9695:
6188 * class.c (maybe_layout_super_class): Always pass a WFL to
6189 do_resolve_class.
6190 * parse.y (do_resolve_class): Updated comment to explain
6191 parameters.
6192
6193 2003-02-26 Tom Tromey <tromey@redhat.com>
6194
6195 * jcf-write.c (generate_classfile): Check whether class is
6196 deprecated before writing attribute count.
6197
6198 2003-02-25 Roger Sayle <roger@eyesopen.com>
6199
6200 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
6201 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
6202
6203 2003-02-23 Tom Tromey <tromey@redhat.com>
6204
6205 * lang-options.h: Added -Wdeprecated.
6206 * gcj.texi (Warnings): Document -Wdeprecated.
6207 * java-tree.h (flag_deprecated): Declare.
6208 * lang.c (lang_W_options): Added deprecated.
6209 (flag_deprecated): New global.
6210 * chartables.h: Rebuilt.
6211 * gen-table.pl (process_one): Look at whitespace.
6212 (print_tables): Define LETTER_SPACE, LETTER_MASK.
6213 * parse.h (CLEAR_DEPRECATED): New macro.
6214 (CHECK_DEPRECATED_NO_RESET): New macro.
6215 * jcf-parse.c (handle_deprecated): New function.
6216 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
6217 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
6218 * parse.y (resolve_type_during_patch): Check deprecation.
6219 (jdep_resolve_class): Likewise.
6220 (process_imports): Likewise.
6221 (resolve_expression_name): Likewise.
6222 (check_deprecation): Strip arrays from decl. Check
6223 flag_deprecated.
6224 (patch_method_invocation): Also check the particular constructor
6225 for deprecation.
6226 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
6227 * jcf-write.c (append_deprecated_attribute): New function.
6228 (generate_classfile): Generate deprecated attribute when
6229 appropriate.
6230 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
6231 (java_lex) [case '*']: Simplify logic.
6232 (java_start_char_p): Use LETTER_MASK.
6233 (java_part_char_p): Likewise.
6234 (java_space_char_p): New function.
6235
6236 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
6237
6238 Change base class access representation.
6239 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
6240 (add_interface_do): Likewise.
6241
6242 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
6243
6244 * decl.c (java_init_decl_processing): Change
6245 soft_lookupjnimethod_node to reflect the change in
6246 signature of _Jv_LookupJNIMethod in libjava/jni.cc
6247 * expr.c (build_jni_stub): Calculate and pass the size
6248 on the stack of the arguments to a JNI function. Use
6249 new target macro MODIFY_JNI_METHOD_CALL to allow a
6250 target to modify the call to a JNI method.
6251
6252 2003-02-08 Roger Sayle <roger@eyesopen.com>
6253
6254 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
6255 instead of basename to avoid compiler warnings on Tru64.
6256
6257 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
6258
6259 * gcj.texi: Update to GFDL 1.2.
6260
6261 2003-01-31 Andrew Haley <aph@redhat.com>
6262
6263 * parse.y (java_expand_classes): Scan the whole class list looking
6264 for access methods that haven't yet been expanded.
6265
6266 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
6267
6268 Fix for java/4269:
6269
6270 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
6271 to fix bootstrap on sparc-unknown-netbsdelf1.5.
6272 * jcf-parse.c: Likewise.
6273
6274 2003-01-31 Mark Wielaard <mark@klomp.org>
6275
6276 * gjavah.c (throwable_p): Allocate 1 more byte for string.
6277
6278 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
6279
6280 * class.c (make_class): Use BINFO_ELTS.
6281 (set_super_info): Likewse.
6282 (add_interface_do): Likewise.
6283
6284 2003-01-30 Tom Tromey <tromey@redhat.com>
6285
6286 * jcf-parse.c (read_class): Update identifier's class value if it
6287 changed during parsing.
6288
6289 2003-01-30 Loren James Rittle <ljrittle@acm.org>
6290
6291 * Make-lang.in (po-generated): Find the targets in $(parsedir).
6292 Propagate change to all other rules as required.
6293 (java/parse-scan.o): Add explicit dependency on
6294 $(parsedir)/java/parse-scan.c .
6295
6296 2003-01-29 Tom Tromey <tromey@redhat.com>
6297
6298 * parse.y (patch_assignment): Only transform the rhs of an
6299 assignment when compiling to native.
6300
6301 2003-01-28 Tom Tromey <tromey@redhat.com>
6302
6303 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
6304
6305 2003-01-28 Tom Tromey <tromey@redhat.com>
6306
6307 * lex.c (java_lex): Don't include UEOF as part of token.
6308 (java_read_unicode): Error if \u sequence prematurely terminated.
6309
6310 2003-01-27 Tom Tromey <tromey@redhat.com>
6311
6312 * parse.y (java_check_regular_methods): Check for construct after
6313 checking types in throws clause.
6314
6315 2003-01-24 Tom Tromey <tromey@redhat.com>
6316
6317 * class.c (build_static_field_ref): Only a String or numeric field
6318 can fold to a constant.
6319
6320 2003-01-23 Tom Tromey <tromey@redhat.com>
6321
6322 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
6323 file name in resource buffer.
6324
6325 2003-01-23 Tom Tromey <tromey@redhat.com>
6326
6327 * expr.c (build_known_method_ref): Use method's context to find
6328 method table index.
6329
6330 2003-01-23 Tom Tromey <tromey@redhat.com>
6331
6332 * constants.c (set_constant_entry): Allocated cleared memory.
6333
6334 2003-01-22 Tom Tromey <tromey@redhat.com>
6335
6336 * java-tree.h: Don't use PARAMS.
6337 * resource.c: Add prototypes for all functions.
6338 (write_resource_constructor): Use `const char *' to avoid
6339 warning.
6340
6341 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
6342
6343 * jcf-parse.c (process_zip_dir): Remove unused variable.
6344
6345 2003-01-22 Tom Tromey <tromey@redhat.com>
6346
6347 * expr.c (build_invokeinterface): Abort if method's context is not
6348 an interface.
6349
6350 2003-01-22 Tom Tromey <tromey@redhat.com>
6351
6352 * gcj.texi (Input and output files): Mention non-class entries.
6353 * decl.c (java_init_decl_processing): Call
6354 init_resource_processing.
6355 * java-tree.h (compile_resource_data, write_resource_constructor,
6356 compile_resource_file, init_resource_processing): Declare.
6357 * config-lang.in (gtfiles): Added resource.c.
6358 * Make-lang.in (gt-java-resource.h): New target.
6359 (JAVA_OBJS): Added resource.o.
6360 (java/resource.o): New target.
6361 * resource.c: New file.
6362 * class.c (compile_resource_file): Moved to resource.c.
6363 (registerResource_libfunc): Likewise.
6364 (utf8_decl_list): Mark with GTY; now static.
6365 * jcf-parse.c (classify_zip_file): New function.
6366 (parse_zip_file_entries): Use it; compile .properties files.
6367 (process_zip_dir): Use classify_zip_file and compute_class_name.
6368 Don't write class name into zip directory.
6369 (java_parse_file): Call write_resource_constructor.
6370 (compute_class_name): New function.
6371 * jcf-io.c (read_zip_member): Reindented.
6372
6373 2003-01-21 Tom Tromey <tromey@redhat.com>
6374
6375 * class.c (supers_all_compiled): New function.
6376 (make_class_data): Use it.
6377
6378 2003-01-21 Tom Tromey <tromey@redhat.com>
6379
6380 * parse.y (method_header): Native method can't be strictfp.
6381 No method can be transient or volatile.
6382
6383 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6384
6385 Make-lang.in (jvspec.o-warn): Add -Wno-error.
6386
6387 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
6388
6389 * check-init.c: Fix comment typos.
6390 * class.c: Likewise.
6391 * constants.c: Likewise.
6392 * decl.c: Likewise.
6393 * except.c: Likewise.
6394 * expr.c: Likewise.
6395 * java-except.h: Likewise.
6396 * java-tree.h: Likewise.
6397 * javaop.h: Likewise.
6398 * jcf-dump.c: Likewise.
6399 * jcf-io.c: Likewise.
6400 * jcf-parse.c: Likewise.
6401 * jcf-write.c: Likewise.
6402 * lang.c: Likewise.
6403 * mangle.c: Likewise.
6404 * typeck.c: Likewise.
6405 * verify.c: Likewise.
6406
6407 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6408
6409 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
6410 * jcf-write.c: Include "tm_p.h".
6411
6412 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6413
6414 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
6415
6416 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6417
6418 * builtins.c (java_build_function_call_expr): Renamed from
6419 build_function_call_expr. All callers changed.
6420
6421 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
6422 * jcf-parse.c: Include tm_p.h.
6423
6424 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
6425 warning.
6426
6427 2003-01-14 Tom Tromey <tromey@redhat.com>
6428
6429 * class.c (make_class_data): Check that super is compiled before
6430 building class reference to it.
6431
6432 2003-01-14 Andrew Haley <aph@redhat.com>
6433
6434 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6435 varargs function -- correct.
6436
6437 2003-01-14 Andrew Haley <aph@redhat.com>
6438
6439 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
6440
6441 2003-01-14 Andrew Haley <aph@redhat.com>
6442
6443 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6444 varargs function -- correct.
6445
6446 * parse.y (patch_assignment): Copy the rhs of an assignment into a
6447 temporary if the RHS is a reference.
6448
6449 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6450
6451 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
6452 * keyword.h: Regenerated.
6453
6454 * All Files: Convert to ISO C style function definitions.
6455
6456 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6457
6458 * parse.y (check_pkg_class_access): ANSIfy definition.
6459
6460 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6461
6462 * decl.c, parse-scan.y, parse.y: Don't cast return value of
6463 xmalloc et al.
6464
6465 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
6466
6467 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6468
6469 Merge from pch-branch:
6470
6471 2002-12-02 Geoffrey Keating <geoffk@apple.com>
6472
6473 * Make-lang.in (java/gjavah.o): Update dependencies.
6474 * gjavah.c: Include ggc.h.
6475
6476 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
6477
6478 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
6479 (JCFDUMP_OBJS): Add ggc-none.o.
6480 (java/jcf-dump.o): Depend on GGC_H.
6481 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
6482 CPool substructures.
6483 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
6484 * jcf-dump.c: Include ggc.h.
6485
6486 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
6487
6488 * jcf.h (union cpool_entry): New.
6489 (struct CPool): Use gengtype to mark. Change field 'data' to be
6490 an array of unions.
6491 (struct JCF): Use gengtype to mark.
6492 (CPOOL_UINT): Update for new cpool_entry type.
6493 (CPOOL_USHORT1): Likewise.
6494 (CPOOL_USHORT2): Likewise.
6495 (CPOOL_FINISH): Use GC to free cpool subfields.
6496 * parse.h (struct parser_ctxt): Mark field current_jcf.
6497 * lex.c (java_init_lex): Use GC to allocate struct JCF.
6498 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
6499 (main_jcf): Use gengtype to mark.
6500 (ggc_mark_jcf): Delete.
6501 (get_constant): Update for new cpool_entry type.
6502 (give_name_to_class): Likewise.
6503 (get_class_constant): Likewise.
6504 (init_outgoing_cpool): Use GGC to allocate struct CPool.
6505 (java_parse_file): Use GGC to allocate struct JCF.
6506 (init_jcf_parse): Don't call ggc_add_root.
6507 * jcf-reader.c (jcf_parse_constant_pool): Update for new
6508 cpool_entry type.
6509 * java-tree.h (current_jcf): Use gengtype to mark.
6510 (CPOOL_UTF): Update for new cpool_entry type.
6511 (outgoing_cpool): Use gengtype to mark.
6512 (struct lang_type): GC struct JCF and struct CPool.
6513 * config-lang.in (gtfiles): Add jcf.h.
6514 * constants.c (find_tree_constant): New.
6515 (set_constant_entry): Allocate cpool subfields using GGC. Update
6516 for new cpool_entry type.
6517 (find_constant1): Update for new cpool_entry type.
6518 (find_constant2): Likewise.
6519 (find_utf8_constant): Use find_tree_constant.
6520 (find_class_or_string_constant): Remove unnecessary cast to jword.
6521 Update for new cpool_entry type.
6522 (count_constant_pool_bytes): Update for new cpool_entry type.
6523 (write_constant_pool): Likewise.
6524 (alloc_name_constant): Use find_tree_constant.
6525 (build_constants_constructor): Update for new cpool_entry type.
6526
6527 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
6528
6529 * parse.y (mark_parser_ctxt): Delete.
6530 (goal): Don't use ggc_add_root.
6531 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
6532 (java_pop_parser_context): Let GC free parser_ctxt.
6533 (java_parser_context_resume): Likewise.
6534 * parse.h (struct parser_ctxt): Use gengtype to mark.
6535 (ctxp): Likewise.
6536 (ctxp_for_generation): Likewise.
6537 * lex.h (struct java_lc_s): Mark for gengtype.
6538 (java_lexer): Rearrange for gengtype.
6539 * config-lang.in (gtfiles): Add lex.h, parse.h.
6540
6541 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6542
6543 * All Files: Remove PARAMS macro.
6544
6545 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
6546 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
6547 `__STDC__' macros.
6548
6549 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
6550 VA_CLOSE.
6551
6552 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
6553
6554 * Make-lang.in (java.install-common, java.uninstall,
6555 java.install-info, java.install-man): Prepend $(DESTDIR)
6556 to destination paths in all (un)installation commands.
6557 (java.install-common): Rewrite $(LN) command to support
6558 DESTDIR with "ln" as well as with "ln -s".
6559
6560 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
6561
6562 * java-tree.h: Protect against multiple inclusion.
6563
6564 2003-01-07 Tom Tromey <tromey@redhat.com>
6565
6566 * class.c (add_assume_compiled): Don't adjust parent if we're
6567 already at the root of tree.
6568
6569 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6570
6571 * lang.c (dump_compound_expr): Prototype.
6572
6573 2003-01-03 Tom Tromey <tromey@redhat.com>
6574
6575 Fix for PR java/8712:
6576 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
6577 when simply checking against `null'.
6578
6579 2003-01-03 Tom Tromey <tromey@redhat.com>
6580
6581 * gcj.texi (Standard Properties): Document http.proxyHost and
6582 http.proxyPort.
6583
6584 * gcj.texi (GNU Classpath Properties): Document new properties.
6585
6586 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6587
6588 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
6589 java/lang-options.h, java/mangle.c, java/mangle_name.c,
6590 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
6591
6592 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
6593
6594 * Make-lang.in, boehm.c, buffer.c,
6595 buffer.h, builtins.c, class.c,
6596 config-lang.in, constants.c,
6597 convert.h, decl.c, except.c,
6598 expr.c, java-except.h,
6599 java-tree.h, javaop.def,
6600 jcf-parse.c, jcf-write.c,
6601 jv-scan.c, jvgenmain.c,
6602 jvspec.c, keyword.gperf,
6603 keyword.h, lang-options.h,
6604 lang-specs.h, lang.c, lex.c,
6605 lex.h, mangle.c, mangle_name.c,
6606 parse-scan.y, parse.h, parse.y,
6607 typeck.c, verify.c, xref.c,
6608 xref.h: Replace "GNU CC" with
6609 "GCC" in the copyright header.
6610
6611 * check-init.c, gjavah.c, javaop.h,
6612 jcf-depend.c, jcf-dump.c, jcf-io.c,
6613 jcf-path.c, jcf-reader.c, jcf.h,
6614 zextract.c, zipfile.h: These files are
6615 "part of GCC". Also say "GCC" not "GNU CC".
6616
6617 2002-12-30 DJ Delorie <dj@redhat.com>
6618
6619 * Make-lang.in: Protect against texi2pod/pod2man failing.
6620
6621 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
6622
6623 * gcj.texi: Use @copying.
6624
6625 2002-12-27 Mark Mitchell <mark@codesourcery.com>
6626
6627 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
6628 print_cxx_classname.
6629 (print_cxx_classname): Add add_scope parameter.
6630 (print_class_decls): Do not emit a semicolon after the extern
6631 "Java" block.
6632 (process_file): Adjust calls to print_cxx_classname.
6633
6634 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
6635
6636 * gcj.texi: Include Cover Texts in man page.
6637
6638 2002-12-23 Jeff Sturm <jsturm@one-point.com>
6639
6640 * class.c (build_static_field_ref): Check FIELD_FINAL.
6641
6642 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
6643 instead of current_constant_pool_data_ref.
6644 * java-tree.h (current_constant_pool_data_ref): Undefine.
6645 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
6646 * jcf-parse.c (init_outgoing_cpool): Don't initialize
6647 current_constant_pool_data_ref.
6648
6649 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
6650 not build_internal_class_name.
6651
6652 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
6653 Use it when class ref isn't certain to be compiled.
6654
6655 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
6656
6657 * gcj.texi: Include gcc-common.texi.
6658 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
6659 $(srcdir)/doc/include/gcc-common.texi.
6660
6661 2002-12-22 Anthony Green <green@redhat.com>
6662
6663 * gcj.texi (Limitations): Add note about org.xml.sax and
6664 org.w3c.dom.
6665
6666 2002-12-20 Tom Tromey <tromey@redhat.com>
6667
6668 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
6669 where minimum case value is Integer.MIN_VALUE.
6670 Fixes PR java/8955.
6671
6672 2002-12-18 Andrew Haley <aph@redhat.com>
6673
6674 * parse.y (patch_invoke): Force evaluation order when `check' is
6675 set. For PR libgcj/8945.
6676
6677 2002-12-16 Mark Mitchell <mark@codesourcery.com>
6678
6679 * gcj.texi: Change version number to 3.4.
6680
6681 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
6682 Andrew Haley <aph@redhat.com>
6683
6684 * parse.y (source_end_java_method): Remove custom encoding of line
6685 numbers for a function decl before passing it to the back end.
6686
6687 2002-12-03 Andrew Haley <aph@redhat.com>
6688
6689 * class.c (make_class_data): New field, "chain".
6690 * decl.c (java_init_decl_processing): Likewise.
6691
6692 2002-12-02 Tom Tromey <tromey@redhat.com>
6693
6694 For PR java/8740:
6695 * parse.y (do_resolve_class): Handle qualified name via
6696 recursion.
6697
6698 2002-11-30 Zack Weinberg <zack@codesourcery.com>
6699
6700 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
6701 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
6702 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
6703 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
6704 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
6705 Include coretypes.h and tm.h.
6706 * Make-lang.in: Update dependencies.
6707
6708 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6709
6710 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
6711
6712 2002-11-25 Diego Novillo <dnovillo@redhat.com>
6713
6714 * jcf-reader.c: Don't expand JCF_readu4 inside the
6715 expansion of JCF_SKIP.
6716
6717 2002-11-25 Diego Novillo <dnovillo@redhat.com>
6718
6719 * jcf-reader.c: Don't expand JCF_readu4 inside the
6720 expansion of JCF_SKIP.
6721
6722 2002-11-22 Tom Tromey <tromey@redhat.com>
6723
6724 * parse.y (patch_binop): Cast right hand side of shift expression
6725 to `int'. Fixes PR java/8676.
6726
6727 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
6728 Andrew Haley <aph@redhat.com>
6729
6730 * gcc/java/jcf-write.c (write_classfile): Remove target
6731 class file, if it exists, before renaming the temporary
6732 class file to it.
6733
6734 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
6735
6736 * jvspec.c (lang_specific_spec_functions): New.
6737
6738 2002-11-18 Tom Tromey <tromey@redhat.com>
6739
6740 Fix for PR java/7912:
6741 * expr.c (can_widen_reference_to): Allow cast of array to
6742 Cloneable or Serializable.
6743 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
6744 (java_io_serializable_identifier_node): Likewise.
6745 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
6746 (valid_ref_assignconv_cast_p): Use new identifier nodes.
6747 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
6748 java_io_serializable.
6749 * decl.c (java_init_decl_processing): Initialize
6750 java_lang_cloneable_identifier_node and
6751 java_io_serializable_identifier_node.
6752 (java_lang_cloneable_identifier_node): New global.
6753 (java_io_serializable_identifier_node): Likewise.
6754
6755 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
6756
6757 * buffer.c: Remove unnecessary casts.
6758 * check-init.c: Likewise.
6759 * class.c: Likewise.
6760 * constants.c: Likewise.
6761 * decl.c: Likewise.
6762 * except.c: Likewise.
6763 * gjavah.c: Likewise.
6764 * jcf-io.c: Likewise.
6765 * jcf-parse.c: Likewise.
6766 * jcf-path.c: Likewise.
6767 * jvspec.c: Likewise.
6768 * lang.c: Likewise.
6769 * lex.c: Likewise.
6770 * verify.c: Likewise.
6771
6772 2002-11-06 Tom Tromey <tromey@redhat.com>
6773
6774 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
6775 a JNI header.
6776
6777 2002-11-05 Tom Tromey <tromey@redhat.com>
6778
6779 Fix for PR java/6388.
6780 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
6781 * java-tree.h (enum java_tree_index): New values
6782 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
6783 (decimal_int_max, decimal_long_max): New defines.
6784 * lex.c (yylex): Rewrote range checking. Sign extend literals.
6785 (error_if_numeric_overflow): Rewrote range checking.
6786 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
6787 decimal_long_max.
6788
6789 2002-11-02 Tom Tromey <tromey@redhat.com>
6790
6791 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
6792
6793 * class.c (make_method_value): Put class name, not signature, into
6794 `throws' field. For PR java/8415.
6795
6796 2002-10-24 Tom Tromey <tromey@redhat.com>
6797
6798 * gcj.texi (Invoking gij): Document --showversion.
6799 (Standard Properties): java.library.path now set.
6800
6801 2002-10-23 Tom Tromey <tromey@redhat.com>
6802
6803 * gjavah.c (decode_signature_piece): In JNI mode, print
6804 `jobjectArray' when array depth is nonzero.
6805 Fixes PR java/8296.
6806
6807 2002-10-15 Andrew Haley <aph@redhat.com>
6808
6809 * parse.y (patch_invoke): Call force_evaluation_order on a static
6810 arg list.
6811 (resolve_qualified_expression_name): Call force_evaluation_order
6812 on a arg list that is part of a Qualified Expression Name.
6813
6814 * lang.c (dump_compound_expr): New.
6815 (java_dump_tree): New.
6816
6817 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
6818
6819 * gcj.texi: Added item describing the GCJ runtime property
6820 "gnu.gcj.progname".
6821
6822 2002-10-15 Richard Henderson <rth@redhat.com>
6823
6824 * jcf-parse.c (get_constant): Fix type warning.
6825
6826 2002-10-15 Andrew Haley <aph@redhat.com>
6827
6828 * java-tree.h (java_inlining_merge_static_initializers): Declare.
6829 (java_inlining_map_static_initializers): Declare.
6830
6831 2002-10-14 Andrew Haley <aph@redhat.com>
6832
6833 * tree-inline.c (remap_block): All local class initialization
6834 flags go in the outermost scope.
6835 (expand_call_inline): Call java_inlining_map_static_initializers.
6836 (expand_call_inline): Call java_inlining_merge_static_initializers.
6837 * java/lang.c (merge_init_test_initialization): New.
6838 (java_inlining_merge_static_initializers): New.
6839 (inline_init_test_initialization): New.
6840 (java_inlining_map_static_initializers): New.
6841
6842 2002-10-11 Mark Wielaard <mark@klomp.org>
6843
6844 * gcj.texi (Compatibility): Add Limitations and Extensions section.
6845
6846 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6847
6848 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
6849
6850 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6851
6852 * parse.y (merge_string_cste): Add parentheses around & within |.
6853
6854 2002-10-08 Tom Tromey <tromey@redhat.com>
6855
6856 * parse.y (variable_declarator_id): Simplify error path for
6857 array declarator error. For PR java/8003.
6858
6859 2002-10-08 Zack Weinberg <zack@codesourcery.com>
6860
6861 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
6862 bug_report_url.
6863
6864 2002-10-08 Andrew Haley <aph@redhat.com>
6865
6866 * parse.y (attach_init_test_initialization_flags): Check for
6867 error_mark_node.
6868
6869 2002-10-07 Anthony Green <green@redhat.com>
6870
6871 * parse.y (merge_string_cste): Fix bug in string concatenation.
6872
6873 2002-10-03 Michael Koch <konqueror@gmx.de>
6874
6875 * gcj.texi (Standard properties):
6876 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
6877
6878 2002-10-02 Roger Sayle <roger@eyesopen.com>
6879
6880 PR optimization/6627
6881 * lang.c (java_init): If storing the vbit in function
6882 pointers, ensure that force_align_functions_log is atleast
6883 one to aid compatability with g++ vtables.
6884
6885 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
6886
6887 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
6888 foul of type-based aliasing.
6889
6890 2002-09-30 Anthony Green <green@redhat.com>
6891
6892 * gcj.texi (Invoking jv-scan): Fix texinfo.
6893
6894 2002-09-28 Anthony Green <green@redhat.com>
6895
6896 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
6897 (Code Generation): Add -fno-assert documentation.
6898 * jv-scan.c (flag_assert): New global.
6899 (options): Add assert option.
6900 (help): Add --no-assert documentation.
6901 * parse-scan.y (flag_assert): New global.
6902 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
6903 (flag_assert): New global.
6904 * java-tree.h (flag_assert): New global.
6905 * lex.c (java_lex): Obey flag_assert.
6906 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
6907 calling cc1.
6908
6909 2002-09-26 Andrew Haley <aph@redhat.com>
6910
6911 * expr.c (build_java_array_length_access): Check for null pointer.
6912 * expr.c (expand_java_arrayload): Likewise.
6913
6914 2002-09-21 Richard Henderson <rth@redhat.com>
6915
6916 * jcf-parse.c (get_constant): Decode from IEEE no matter
6917 what the target format.
6918
6919 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
6920
6921 * ChangeLog: Follow spelling conventions.
6922 * class.c: Likewise.
6923 * decl.c: Likewise.
6924 * expr.c: Likewise.
6925 * gjavah.c: Likewise.
6926 * java-tree.h: Likewise.
6927 * jcf-dump.c: Likewise.
6928 * jcf-parse.c: Likewise.
6929 * jvspec.c: Likewise.
6930 * lang.c: Likewise.
6931 * mangle.c: Likewise.
6932 * parse.y: Likewise.
6933
6934 2002-09-17 Tom Tromey <tromey@redhat.com>
6935
6936 * lex.c (java_read_unicode_collapsing_terminators): Handle case
6937 where \r appears at EOF. Fixes PR java/7950.
6938
6939 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6940
6941 * jvspec.c (lang_specific_driver): Remove unused variable.
6942
6943 2002-09-16 Geoffrey Keating <geoffk@apple.com>
6944
6945 * java-tree.h (union lang_tree_node): Add chain_next option.
6946
6947 2002-09-16 Richard Henderson <rth@redhat.com>
6948
6949 * jcf-parse.c (get_constant): Runtime check for IEEE format;
6950 use new real.h interface.
6951 * jcf-write.c (find_constant_index): Use new real.h interface.
6952 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
6953
6954 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
6955
6956 * lang.c: Follow spelling conventions.
6957
6958 2002-09-11 Per Bothner <per@bothner.com>
6959
6960 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
6961 constant to the type of the field.
6962 (java_complete_tree): Remove now-redundant code.
6963
6964 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
6965
6966 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
6967
6968 For PR java/5794:
6969 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
6970 return label if a ret instruction for the jsr has been reached.
6971
6972 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
6973
6974 * parse.y (DIR_SEPARATOR): Don't define.
6975 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
6976
6977 2002-08-28 Andrew Haley <aph@redhat.com>
6978
6979 * verify.c (verify_jvm_instructions): Allow exception handler
6980 inside code that is being protected, but generate a warning.
6981 * except.c (link_handler): Initialize `expanded' in new eh_range.
6982 (binding_depth, is_class_level, current_pc): Declare extern.
6983
6984 2002-09-01 Mark Wielaard <mark@klomp.org>
6985
6986 * gcj.texi: Add chapter about system properties.
6987 Fixed some typos.
6988
6989 2002-08-26 Tom Tromey <tromey@redhat.com>
6990
6991 * parse.y (try_builtin_assignconv): Allow narrowing primitive
6992 conversion if RHS_TYPE is byte, short, or char.
6993
6994 2002-08-22 Tom Tromey <tromey@redhat.com>
6995
6996 * gcj.texi (Invoking gij): Document -cp and -classpath.
6997
6998 2002-08-21 Tom Tromey <tromey@redhat.com>
6999
7000 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
7001 $(prefix)/share. For PR libgcj/7633.
7002
7003 For PR java/6005 and PR java/7611:
7004 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
7005 (java_can_use_bit_fields_p): New function.
7006
7007 2002-08-16 Tom Tromey <tromey@redhat.com>
7008
7009 * gcj.texi (Class Initialization): Mention class initialization of
7010 arrays.
7011
7012 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
7013
7014 * Make-lang.in (java-tree-inline.o): New.
7015 (JAVA_OBJS): Add java-tree-inline.o.
7016 * parse.y (source_end_java_method): Call java_optimize_inline.
7017 (java_expand_method_bodies): Save method's tree in
7018 DECL_SAVED_TREE.
7019 (add_stmt_to_compound): Keep track of the number of statments.
7020 * lang.c (java_init): Enable flag_inline_trees.
7021 (java_post_options): If flag_inline_functions is on, enable
7022 flag_inline_trees instread.
7023 (decl_constant_value): New.
7024 (java_tree_inlining_walk_subtrees): New.
7025 * java-tree.h (DECL_NUM_STMTS): New macro.
7026 (java_optimize_inline): Declare.
7027 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
7028 Handle a LABEL_EXPR.
7029 * decl.c (build_result_decl): If we already have a DECL_RESULT
7030 don't make another.
7031 (dump_function): New.
7032 (java_optimize_inline): New.
7033 (dump_function): New.
7034
7035 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
7036
7037 For PR java/7483:
7038 * parse.y (build_assertion): Invert return from
7039 desiredAssertionStatus.
7040
7041 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7042
7043 * jcf-write.c (get_access_flags): Return correct access flags for
7044 private and protected inner classes.
7045
7046 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7047
7048 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
7049
7050 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
7051
7052 * mangle_name.c: Don't include obstack.h twice.
7053 * xref.c: Don't include obstack.h.
7054
7055 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
7056
7057 * class.c: (permanent_obstack): Delete declaration.
7058 * constants.c: (permanent_obstack): Delete declaration.
7059 * except.c: (permanent_obstack): Delete declaration.
7060 * expr.c: (permanent_obstack): Delete declaration.
7061 * jcf-parse.c: (permanent_obstack): Delete declaration.
7062 (saveable_obstack): Delete declaration.
7063 * parse.h: (permanent_obstack): Delete declaration.
7064 * typeck.c: (permanent_obstack): Delete declaration.
7065
7066 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
7067
7068 * gcj.texi (version-gcc): Increase to 3.3.
7069
7070 2002-07-22 Tom Tromey <tromey@redhat.com>
7071
7072 * lex.c (java_lex): Check for `e' or `E' after 0.
7073
7074 2002-07-21 Richard Henderson <rth@redhat.com>
7075
7076 * lang.c (java_unsafe_for_reeval): New.
7077 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
7078
7079 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
7080
7081 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
7082 (jcf_path_init): Use GET_ENVIRONMENT.
7083
7084 2002-07-10 Roger Sayle <roger@eyesopen.com>
7085 Zack Weinberg <zack@codesourcery.com>
7086
7087 * builtins.c (initialize_builtins): Remove defines that
7088 handled C/C++ specific junk hereby removed from builtins.def.
7089
7090 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
7091
7092 * lang.c (java_post_options): Update prototype.
7093
7094 2002-07-05 Roger Sayle <roger@eyesopen.com>
7095
7096 * builtins.c (initialize_builtins): Ignore the additional
7097 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
7098 the builtins.def file.
7099
7100 2002-07-01 Tom Tromey <tromey@redhat.com>
7101
7102 For PR libgcj/7073:
7103 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
7104 specially.
7105
7106 2002-07-01 Roger Sayle <roger@eyesopen.com>
7107
7108 * java/decl.c (builtin_function): Accept additional parameter.
7109 (java_init_decl_processing): Pass an additional NULL_TREE
7110 argument to builtin_function.
7111
7112 2002-06-29 T.J. Mather <tjmather@maxmind.com>
7113
7114 * gcj.texi: Fixed gcj invocation example so that it compiles.
7115
7116 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7117
7118 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
7119 * parse.y (mark_parser_ctxt): Likewise.
7120 (check_modifiers, declare_local_variables): Avoid incorrect
7121 hardcoded constant 10.
7122
7123 * lex.c (java_read_char): Avoid "comparison is always true"
7124 warning.
7125
7126 2002-06-25 Andreas Schwab <schwab@suse.de>
7127
7128 * expr.c (JSR): Avoid undefined operation on PC.
7129
7130 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7131
7132 * decl.c (clear_binding_level): Const-ify.
7133
7134 2002-06-13 Akim Demaille <akim@epita.fr>
7135
7136 * parse.y (class_declaration, interface_declaration): Make sure
7137 all their rules have an action, in order to avoid meaningless `$$
7138 = $1' and their type clashes.
7139
7140 2002-06-11 Tom Tromey <tromey@redhat.com>
7141
7142 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
7143 * parse-scan.y (statement_without_trailing_substatement): Added
7144 assert_statement.
7145 (assert_statement): New rule.
7146 * java-tree.h (struct lang_type) [assertions]: New field.
7147 (TYPE_USES_ASSERTIONS): New macro.
7148 (CLASS_USES_ASSERTIONS): Likewise.
7149 (FIELD_SYNTHETIC): New define.
7150 * lex.c (java_lval;): Added ASSERT_TK.
7151 * parse.y (ASSERT_TK): Added.
7152 (statement_without_trailing_substatement): Added assert_statement.
7153 (assert_statement): New rule.
7154 (build_assertion): New function.
7155 (maybe_generate_pre_expand_clinit): Create and initialize
7156 $assertionsDisabled.
7157 (lookup_package_type): Removed decl.
7158 * keyword.h: Rebuilt.
7159 * keyword.gperf (assert): New token.
7160
7161 2002-06-10 Akim Demaille <akim@epita.fr>
7162
7163 * parse.y (interface_type_list, class_member_declaration)
7164 (unary_expression_not_plus_minus): Remove duplicate %type.
7165 Whitespace changes.
7166
7167 2002-06-09 Tom Tromey <tromey@redhat.com>
7168
7169 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
7170
7171 * parse.y (method_header): Give error message in all cases.
7172 Fixes PR java/6865.
7173
7174 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7175
7176 Don't use RTL inlining. Fix for PR java/6820.
7177 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
7178 (flag_really_inline): New.
7179 (java_decode_option): Set flag_really_inline if -finline-functions
7180 is seen.
7181 (java_post_options): New function. Turn off inlining unless
7182 flag_really_inline is set.
7183
7184 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7185
7186 * gjavah.c (throwable_p): Accept argument as either a classname or
7187 signature fragment. Create null-terminated classname string for super
7188 when calling itself recursively.
7189 (decode_signature_piece): Skip first character from class name
7190 signature when calling throwable_p.
7191
7192 2002-06-08 H.J. Lu (hjl@gnu.org)
7193
7194 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
7195
7196 2002-06-04 Tom Tromey <tromey@redhat.com>
7197
7198 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
7199
7200 2002-06-04 Michael Koch <konqueror@gmx.de>
7201
7202 * gcj.texi (Input Options): Fixed typo.
7203
7204 2002-06-04 Zack Weinberg <zack@codesourcery.com>
7205
7206 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
7207 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
7208 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
7209 and all now-pointless local variables. Rename other local
7210 variables to reflect their not being handles.
7211
7212 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
7213 #if JCF_USE_STDIO blocks.
7214
7215 * parse.y: Add missing semicolon at end of rule.
7216
7217 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
7218
7219 * check-init.c (attach_initialized_static_class): Delete, unused.
7220 * parse.y: Use htab_t instead of struct hashtable, update
7221 all uses.
7222 * java-tree.h: Include hashtab.h instead of hash.h.
7223 (struct lang_decl_func): Use htab_t, set up for gengtype.
7224 (struct init_test_hash_entry): Delete.
7225 (struct treetreehash_entry): New.
7226 (java_treetreehash_find): New
7227 (java_treetreehash_new): New prototype.
7228 (java_treetreehash_create): New prototype.
7229 (java_mark_tree): Delete prototype.
7230 (java_hash_hash_tree_node): Delete prototype.
7231 (java_hash_compare_tree_node): Delete prototype.
7232 (attach_initialized_static_class): Delete prototype.
7233 * expr.c (build_class_init): Update to use java_treetreehash
7234 functions.
7235 (java_expand_expr): Update to use htab_t.
7236 (emit_init_test_initialization): Likewise.
7237 * decl.c (java_mark_tree): Delete.
7238 * class.c (init_test_hash_newfunc): Delete.
7239 (java_hash_hash_tree_node): Delete.
7240 (java_hash_compare_tree_node): Delete.
7241 (add_method_1): Update to use java_treetreehash functions.
7242 (JAVA_TREEHASHHASH_H): New macro.
7243 (java_treetreehash_hash): New function.
7244 (java_treetreehash_compare): New function.
7245 (java_treetreehash_find): New function.
7246 (java_treetreehash_new): New function.
7247 (java_treetreehash_create): New function.
7248 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
7249
7250 * Make-lang.in (java/parse.o): Depend on debug.h.
7251 * java-tree.h (struct lang_identifier): Use gengtype.
7252 (union lang_tree_node): New.
7253 (struct lang_decl_func): Use gengtype.
7254 (struct lang_decl_var): Likewise.
7255 (struct lang_decl): Likewise.
7256 * parse.y: Include debug.h.
7257 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
7258
7259 * lang.c (struct language_function): New dummy structure.
7260
7261 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
7262 descriminator for DECL_LANG_SPECIFIC.
7263 (struct lang_decl_func): Rename from struct lang_decl.
7264 (enum lang_decl_desc): New.
7265 (struct lang_decl): Make it a union. Update all the accessor macros.
7266 (struct lang_type): Use gengtype.
7267 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
7268 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
7269 are now the same size.
7270 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
7271 use discriminator to mark DECL_LANG_SPECIFIC.
7272
7273 * Make-lang.in (gt-java-builtins.h): New rule.
7274 (java/builtins.o): Add dependency on gt-<filename>.h.
7275 * builtins.c: Use gengtype for roots.
7276 (union string_or_tree): Use gengtype.
7277 (struct builtin_record): Use gengtype.
7278 * config-lang.in (gtfiles): Add builtins.c.
7279
7280 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
7281 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
7282 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
7283 gt-java-parse.h, gtype-java.h): Add rules to generate.
7284 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
7285 (class.o): Add dependency on gt-*.h.
7286 (constants.o): Likewise.
7287 (decl.o): Likewise.
7288 (expr.o): Likewise.
7289 (jcf-parse.o): Likewise.
7290 (jcf-write.o): Likewise.
7291 (lang.o): Likewise.
7292 * config-lang.in (gtfiles): New.
7293 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7294 * constants.c: Replace uses of ggc_add_* with GTY markers.
7295 Include gt-*.h.
7296 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7297 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7298 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
7299 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
7300 Include gt-*.h.
7301 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
7302 Include gt-*.h.
7303 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7304 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
7305 gt-*.h.
7306 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7307 Include gtype-java.h.
7308
7309 2002-06-02 Tom Tromey <tromey@redhat.com>
7310
7311 Fix for PR java/5913:
7312 * parse.y (patch_binop): Call patch_string on op1.
7313
7314 2002-06-02 Tom Tromey <tromey@redhat.com>
7315
7316 Fix for PR java/1343, PR java/6336:
7317 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
7318 formatting. Changed return type.
7319 (anonymous_class_counter): Moved to top of file.
7320 (maybe_make_nested_class_name): Append number to class name for
7321 function-local classes.
7322
7323 2002-05-28 Zack Weinberg <zack@codesourcery.com>
7324
7325 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
7326 * Make-lang.in: Update dependency lists.
7327
7328 2002-05-18 Mark Mitchell <mark@codesourcery.com>
7329
7330 * gjavah.c (throwable_p): Do not free the name of the class after
7331 passing it to find_class.
7332 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
7333 * jcf-io.c (dirent.h): Include it.
7334 (fnmatch.h): Likewise.
7335 (compare_path): New function.
7336 (java_or_class_file): Likewise.
7337 (memoized_dirlist_entry): New type.
7338 (memoized_dirlist_lookup_eq): New function.
7339 (memoized_dirlists): New variable.
7340 (caching_stat): New function.
7341 (memoized_class_lookup_eq): New function.
7342 (memoized_class_lookups): Likewise.
7343 (find_class): Use memoized_class_lookups and caching_stat.
7344 * jcf.h (JCF_USE_SCANDIR): Define.
7345 * parse.y (java_expand_classes): Write the class files in reverse
7346 order.
7347
7348 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7349
7350 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
7351
7352 2002-05-13 Mark Mitchell <mark@codesourcery.com>
7353
7354 * jcf-write.c (write_classfile): Unlink the temporary file if it
7355 cannot be renamed. Use concat to build up the name of the
7356 temporary file.
7357
7358 2002-05-08 Mark Mitchell <mark@codesourcery.com>
7359
7360 * jcf-write.c (write_classfile): Write the file to a
7361 temporary file and then rename it.
7362
7363 2002-05-07 Tom Tromey <tromey@redhat.com>
7364
7365 * gjavah.c (throwable_p): Use xstrdup, not strdup.
7366
7367 Fix for PR java/1200:
7368 * gjavah.c (throwable_p): New function.
7369 (decode_signature_piece): Use it. A `WeakReference' isn't the
7370 same as a `jweak'.
7371 Include hashtab.h.
7372 (gcjh_streq): New function.
7373
7374 2002-05-07 Andreas Jaeger <aj@suse.de>
7375
7376 * parse.y (finish_for_loop): Fix if statement.
7377
7378 2002-05-06 Tom Tromey <tromey@redhat.com>
7379
7380 Fix for PR java/5941:
7381 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
7382 loop update expression.
7383 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
7384 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
7385
7386 2002-05-04 Mark Wielaard <mark@klomp.org>
7387
7388 For PR java/6519:
7389 * parse.y (build_string_concatenation): Return just op1 only when op2
7390 is null and op1 is a STRING_CST, otherwise always construct a
7391 StringBuffer.
7392
7393 2002-04-27 Tom Tromey <tromey@redhat.com>
7394
7395 For PR java/6382:
7396 * parse.y (string_convert_int_cst): New function.
7397 (merge_string_cste): Use it.
7398
7399 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
7400
7401 * java-tree.h (java_parse_file): Update.
7402 (java_set_yydebug): Remove.
7403 * jcf-parse.c (yydebug): Remove.
7404 (java_set_yydebug): Die.
7405 (java_parse_file): Update.
7406 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7407
7408 2002-04-24 Tom Tromey <tromey@redhat.com>
7409
7410 For PR java/6425:
7411 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
7412 EXPR_WFL_QUALIFICATION of qual_wfl.
7413
7414 2002-04-23 Per Bothner <per@bothner.com>
7415
7416 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
7417 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
7418 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
7419
7420 2002-04-23 Tom Tromey <tromey@redhat.com>
7421
7422 For PR java/6314:
7423 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
7424 recognize `-fcompile-resource='.
7425 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
7426 a bit.
7427
7428 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
7429
7430 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
7431 paths. Fixes PR java/2791.
7432
7433 2002-04-19 Andrew Haley <aph@redhat.com>
7434
7435 * jcf-write.c (push_long_const): lo, hi: New variables.
7436 Use rshift_double to extract the high part of a 64-bit long.
7437 Use WORD_TO_INT to extract the low part.
7438
7439 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
7440 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
7441 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
7442
7443 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
7444
7445 * typeck.c (incomplete_type_error): Remove.
7446
7447 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7448
7449 * class.c (make_class_data): Set DECL_ALIGN on static class data,
7450 for hash synchronization.
7451 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
7452 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
7453 class_type_node.
7454
7455 2002-04-16 Mark Wielaard <mark@klomp.org>
7456
7457 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
7458 negative zero.
7459
7460 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7461
7462 Fix for PR java/6294:
7463 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
7464 interfaces.
7465
7466 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7467
7468 Fix for PR java/6085:
7469 * parse.y (patch_method_invocation): Always use build_access_to_thisn
7470 to get enclosing "this" argument for inner-class constructor
7471 invocation. Pass correct arguments to build_access_to_thisn.
7472
7473 2002-04-10 Andreas Jaeger <aj@suse.de>
7474
7475 * gcj.texi (Input Options): Fix extdirs patch.
7476
7477 2002-04-10 Anthony Green <green@redhat.com>
7478
7479 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
7480
7481 2002-04-09 Anthony Green <green@redhat.com>
7482
7483 * gcj.texi (Input Options): Add --extdirs documentation.
7484 * jcf-dump.c (OPT_extdirs): New macro.
7485 (options): Add extdirs option.
7486 (help): Describe --extdirs.
7487 (main): Handle OPT_extdirs.
7488 * gjavah.c (OPT_extdirs): New macro.
7489 (options): Add extdirs option.
7490 (help): Describe --extdirs.
7491 (main): Handle OPT_extdirs.
7492 * jcf-path.c (jcf_path_init): Add extdirs support.
7493 (jcf_path_extdirs_arg): New function.
7494 (extensions): New variable to hold extensions path entries.
7495 * jvspec.c: Remove -fextdirs= when compiling main().
7496 * lang.c (java_decode_option): Handle -fextdirs=.
7497 * jcf.h (jcf_path_extdirs_arg): Declare new function.
7498 * Make-lang.in: Compile jcf-path with version info for use in
7499 identifying the appropriate libgcj.jar.
7500
7501 2002-04-08 Tom Tromey <tromey@redhat.com>
7502
7503 For PR libgcj/5303:
7504 * .cvsignore: Added rmic.1 and rmiregistry.1.
7505 * gcj.texi (Top): Link to new nodes.
7506 (Invoking rmic): New node.
7507 (Invoking rmiregistry): Likewise.
7508 * Make-lang.in (java.generated-manpages): Added rmic.1 and
7509 rmiregistry.1.
7510 (java.maintainer-clean): Likewise.
7511 ($(srcdir)/java/rmic.1): New target.
7512 ($(srcdir)/java/rmiregistry.1): Likewise.
7513 (java.install-man): Handle rmic.1 and rmiregistry.1.
7514
7515 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7516
7517 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
7518 Add note about handling uncaught exceptions. Add an exception handler
7519 to example.
7520
7521 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7522
7523 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
7524 after using it to patch CALL_EXPR.
7525
7526 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7527
7528 * gcj.texi (Invocation): Document CNI invocation API.
7529
7530 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
7531
7532 * expr.c (truthvalue_conversion): Rename. Update.
7533 (expand_compare): Update.
7534 * java-tree.h (java_truthvalue_conversion): New.
7535 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7536
7537 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7538
7539 * java-tree.h (java_mark_addressable): New.
7540 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7541 * typeck.c (mark_addressable): Rename, update.
7542
7543 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7544
7545 * expr.c (build_java_binop): Update.
7546 * java-tree.h (java_signed_type, java_unsigned_type,
7547 java_signed_or_unsigned_type): Update.
7548 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7549 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7550 * parse.y (patch_binop): Update.
7551 * typeck.c (signed_or_unsigned_type, unsigned_type,
7552 signed_type): Update.
7553
7554 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
7555
7556 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7557 (java_dummy_print): Remove.
7558 (lang_print_error): Rename. Exit early if inhibiting output.
7559 (inhibit_error_printing_function): New.
7560 (java_init): Don't set hook.
7561 (lang_init_source): Use new boolean.
7562
7563 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
7564
7565 * parse.y (do_resolve_class): Fix infinite recursion.
7566
7567 2002-03-29 Tom Tromey <tromey@redhat.com>
7568
7569 * parse.y (check_inner_circular_reference): Ignore incomplete
7570 types.
7571
7572 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
7573
7574 * Make-lang.in (builtins.o): Update.
7575 * boehm.c (get_boehm_type_descriptor): Update.
7576 * builtins.c: Include langhooks.h.
7577 * decl.c (java_init_decl_processing): Update.
7578 * java-tree.h (java_type_for_mode, java_type_for_size): New.
7579 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
7580 Redefine.
7581 * typeck.c (type_for_mode, type_for_size): Update.
7582
7583 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
7584
7585 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
7586
7587 2002-03-28 Tom Tromey <tromey@redhat.com>
7588
7589 * except.c (expand_end_java_handler): If the handler type is NULL,
7590 use java.lang.Throwable. Fixes PR java/5986.
7591
7592 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
7593
7594 Fix for PR java/4715:
7595 * jcf-parse.c (parse_source_file_3): New function.
7596 (read_class): Call it.
7597 (java_parse_file): Likewise.
7598
7599 2002-03-28 Jan Hubicka <jh@suse.cz>
7600
7601 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
7602
7603 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7604
7605 * parse.y (resolve_package): Initialize "decl".
7606 (lookup_package_type): Remove unused function.
7607
7608 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7609
7610 Fix for PR java/5993:
7611 * parse.y (resolve_package): Return the decl if resolution was
7612 successful. Don't special case "java.lang" and "java.lang.reflect"
7613 packages. Set type_name to the merged identifier.
7614 (resolved_qualified_expression_name): Print error using "name" if
7615 resolve_package returns NULL_TREE.
7616
7617 2002-03-27 Tom Tromey <tromey@redhat.com>
7618
7619 * expr.c (expand_invoke): Don't generate null pointer check if
7620 we're calling <init>.
7621
7622 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
7623
7624 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
7625 fix prototype.
7626 * java-tree.h (java_lang_expand_expr): Similarly.
7627 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7628 (java_init): Don't set hook.
7629
7630 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7631
7632 Fix for PR java/5850:
7633 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
7634 context if field was not found in the current scope.
7635 * expr.c (lookup_field): Don't look in enclosing contexts.
7636
7637 2002-03-26 Tom Tromey <tromey@redhat.com>
7638
7639 Fix for PR java/5942:
7640 * parse.y (init_src_parse): Added sanity check.
7641 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
7642 elements, not 11.
7643
7644 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
7645
7646 * decl.c (lang_mark_tree): Rename java_mark_tree.
7647 * java-tree.h (java_mark_tree): New.
7648 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7649
7650 2002-03-25 Zack Weinberg <zack@codesourcery.com>
7651
7652 * lex.c: Change java_perform_atof to take normal parameters
7653 instead of a pointer to a parameter block. Call it directly
7654 from java_lex.
7655
7656 2002-03-22 Mark Wielaard <mark@klomp.org>
7657
7658 Fix for PR java/5368:
7659 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
7660 when printing error message.
7661
7662 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
7663
7664 * decl.c (maybe_build_cleanup): Remove.
7665
7666 2002-03-22 Tom Tromey <tromey@redhat.com>
7667
7668 Andrew Haley <aph@cambridge.redhat.com>
7669
7670 * expr.c (build_field_ref): Don't build a check if the field is a
7671 member of `this'.
7672
7673 2002-03-21 Eric Blake <ebb9@email.byu.edu>
7674
7675 Fix for PR java/6026:
7676 * lex.c (java_lex): Fix parsing of consecutive floats.
7677
7678 2002-03-21 Tom Tromey <tromey@redhat.com>
7679
7680 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
7681 class.
7682
7683 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
7684
7685 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7686 insert_block, getdecls, kept_level_p, global_bindings_p): New.
7687
7688 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
7689
7690 * gcj.texi: @code{gcj} becomes @command{gcj}.
7691 @code{gcc} becomes @command{gcc}.
7692 GcjRaw changed to gnu.gcc.RawData.
7693
7694 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
7695
7696 * decl.c (start_java_method): Use new hook.
7697 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7698 (java_init): Remove old hook.
7699
7700 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
7701
7702 * builtins.c (define_builtin): Do nothing if `type' is null.
7703 Fixes PR java/5876.
7704
7705 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7706
7707 * parse.y (parser_check_super_interface): Fix error message
7708 grammar/order.
7709
7710 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7711
7712 * jcf-parse.c (get_constant): Delete unused variables.
7713
7714 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
7715
7716 * java-tree.h (java_parse_file): New.
7717 * jcf-parse.c (yyparse): Rename java_parse_file.
7718 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
7719
7720 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7721
7722 * parse.y (craft_constructor): Return the constructor decl.
7723 (java_expand_classes): Update comments.
7724 (lookup_method_invoke): Call fix_constructors immediately for
7725 anonymous class. Fixes PR java/5935.
7726
7727 2002-03-15 Anthony Green <green@redhat.com>
7728
7729 * jcf-parse.c (yyparse): Don't emit class registration
7730 constructor when compiling resource files.
7731
7732 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7733
7734 * lang.c (java_tree_code_type, java_tree_code_length,
7735 tree_code_name): Delete.
7736 (tree_code_type, tree_code_length, tree_code_name): Define.
7737 (java_init): Don't try to copy into the various tree_code
7738 arrays.
7739
7740 2002-03-12 Tom Tromey <tromey@redhat.com>
7741
7742 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
7743 UTF-8, not UCS-2. Fixes PR java/5923.
7744
7745 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
7746 a call_expr wrapped in a convert. Fixes PR java/5848.
7747
7748 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7749
7750 * jcf-write.c (write_classfile): Improve error strings.
7751
7752 2002-03-11 Eric Blake <ebb9@email.byu.edu>
7753
7754 * lex.c: Adjust comments to GNU standards.
7755
7756 2002-03-11 Eric Blake <ebb9@email.byu.edu>
7757
7758 Fix for PR java/5902:
7759 * lex.c (java_lex): Fix parsing of literals.
7760
7761 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7762
7763 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
7764 to prevent it getting evaluated twice in the store checking case.
7765 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
7766 examining OBJECT.
7767
7768 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7769
7770 * decl.c (java_init_decl_processing): Make sure class_type_node
7771 alignment is not less than 64 bits if hash synchronization is enabled.
7772
7773 2002-03-08 Per Bothner <per@bothner.com>
7774
7775 * parse.y (java_complete_lhs): Check if patch_assignment
7776 returned an error-mark.
7777
7778 * parse.y (try_builtin_assignconv): Don't special-case zero.
7779
7780 2002-03-08 Per Bothner <per@bothner.com>
7781
7782 Fix for PR java/5812.
7783 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
7784 here instead of in JSR macro. Likewise with load_type_state call.
7785 Do the latter on if the return_pc has been verified (the jsr returns).
7786 (JSR): Now just call build_java_jsr.
7787
7788 2002-03-07 Jeff Sturm <jsturm@one-point.com>
7789
7790 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
7791 (java.install-common): Link native driver to
7792 JAVA_TARGET_INSTALL_NAME.
7793
7794 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
7795
7796 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
7797 * builtins.c(sin_builtin): Likewise
7798 * builtins.c(sqrt_builtin): Likewise
7799
7800 2002-03-03 Zack Weinberg <zack@codesourcery.com>
7801
7802 * java/expr.c, java/jcf-parse.c, java/lex.c:
7803 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
7804 REAL_ARITHMETIC blocks unconditional. Delete some further
7805 #ifdef blocks predicated on REAL_ARITHMETIC.
7806
7807 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7808
7809 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
7810 explicit sizeof/sizeof.
7811 * decl.c (java_init_decl_processing): Likewise.
7812 * jcf-parse.c (init_jcf_parse): Likewise.
7813 * parse.y (init_src_parse): Likewise.
7814
7815 2002-03-02 Per Bothner <per@bothner.com>
7816
7817 Make --CLASSPATH by a synonym for --classpath and -classpath.
7818 Implement --bootclasspath.
7819 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
7820 (classpath_l): Remove.
7821 (jcf_path_CLASSPATH_arg): Remove.
7822 (jcf_path_bootclasspath_arg): New function.
7823 (jcf_path_seal): Simplify accordingly.
7824
7825 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
7826 (jcf_path_CLASSPATH): Remove declaration.
7827 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
7828 (lang_specific_driver): Translate -bootclasspath.
7829 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
7830 * lang.c (decode_lang_options): Do jcf_path_init first.
7831 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
7832 * gjavah.c: Also handle --bootclasspath.
7833 Handle --CLASSPATH as a synonum for --classpath.
7834 * jcf-dump.c: Likewise.
7835
7836 "." is not part of system path, but is the default for --classpath.
7837 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
7838 (jcf_path_seal): Add "." if no CLASSPATH specified.
7839
7840 * gcj.texi: Document changes.
7841
7842 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7843
7844 * expr.c (build_java_arraystore_check): Fix formatting.
7845
7846 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
7847
7848 Fix for PR java/5758, java/5632:
7849 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
7850 inner-class separator too.
7851 * parse.y (do_resolve_class): New local `decl_result.'
7852 Progressively build a name for what can have been loaded.
7853
7854 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7855
7856 * expr.c (java_array_data_offset): Removed function.
7857 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
7858 (build_java_array_length_access): Obtain "length" value using a
7859 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
7860 (build_java_arrayaccess): Correct comment. Access "data" using a
7861 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
7862 (build_java_arraystore_check): New function.
7863 (expand_java_arraystore): Use build_java_arraystore_check.
7864 * parse.y (patch_assignment): Simplify code to insert a store check
7865 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
7866 * check-init.c (check_init): Update to reflect that an array length
7867 access is now a COMPONENT_REF.
7868 * gcj.texi (Code Generation): Improve documentation of
7869 -fno-bounds-check. Add documentation for -fno-store-check.
7870 * java-tree.h (flag_store_check): Declare.
7871 (build_java_arraystore_check): Declare.
7872 * lang.c (flag_store_check): Initialize to 1.
7873 (lang_f_options): Add store-check option.
7874 * jvspec.c: Don't pass store-check option to jvgenmain.
7875 * lang-options.h: Add help string for -fno-store-check.
7876
7877 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
7878
7879 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
7880 * java-tree.h (java_dup_lang_specific_decl): New.
7881 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
7882
7883 2002-02-27 Zack Weinberg <zack@codesourcery.com>
7884
7885 * builtins.c, decl.c: Delete traditional-mode-related code
7886 copied from the C front end but not used, or used only to
7887 permit the compiler to link.
7888
7889 2002-02-22 Tom Tromey <tromey@redhat.com>
7890
7891 Fix for PR java/2369:
7892 * jvspec.c (verify_class_name): New function.
7893 (lang_specific_driver): Call it.
7894 (JAVA_START_CHAR_P): New macro.
7895 (JAVA_PART_CHAR_P): Likewise.
7896
7897 2002-02-22 Per Bothner <per@bothner.com>
7898
7899 * class.c: Change vtable to be more compatible with g++ v3 abi.
7900 (get_dispatch_table): Prepend offset-to-top (always 0) and
7901 type_info pointer (currently unimplemented hence NULL) to vtable.
7902 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
7903 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
7904 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
7905 (build_dtable_decl): Add declarations for new fields.
7906
7907 2002-02-20 Per Bothner <per@bothner.com>
7908
7909 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
7910 to finit$ (otherwise generate_bytecode_insns drops it). However, we
7911 don't need to set it on the COMPOUND_EXPR - the caller does that.
7912
7913 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
7914
7915 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
7916 `--CLASSPATH' becomes `--classpath.'
7917 * gjavah.c: Likewise.
7918 * jcf-dump.c: Likewise.
7919 * lang-options.h: Likewise.
7920 * lang.c: Likewise.
7921 * jcf-path.c: Updated comment.
7922 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
7923 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
7924 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
7925 (jcf_path_CLASSPATH_arg): Ditto.
7926 (classpath_u): Updated leading comment.
7927
7928 2002-02-20 Per Bothner <per@bothner.com>
7929
7930 * builtins.c (check_for_builtin): New function.
7931 (build_call_or_builtin): Remove.
7932 * java-tree.h: Update accordingly.
7933 * expr.c (expand_invoke): Use build + check_for_builtin instead
7934 of build_call_or_builtin.
7935 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
7936 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
7937 flag (which had caused jcf-write to incorrectly emit invokevirtual).
7938
7939 2002-02-17 Tom Tromey <tromey@redhat.com>
7940
7941 * java-tree.h (TYPE_STRICTFP): New macro.
7942 (struct lang_type) [strictfp]: New field.
7943 (CLASS_STRICTFP): New macro.
7944 (METHOD_STRICTFP): New macro.
7945 (struct lang_decl) [strictfp]: New field.
7946 * parse.y (method_header): Disallow strictfp constructor or
7947 abstract method.
7948 (STRICT_TK): Move before MODIFIER_TK.
7949 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
7950 (METHOD_MODIFIERS): Likewise.
7951 (INTERFACE_MODIFIERS): Likewise.
7952 * jcf-write.c (get_access_flags): Likewise.
7953 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
7954 (add_method_1): Likewise.
7955 (get_access_flags_from_decl): Likewise.
7956 * jcf-dump.c (print_access_flags): Print in standard order. Also,
7957 recognize strictfp flag.
7958 * jcf.h (ACC_STRICT): New define.
7959
7960 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
7961
7962 * class.c(build_utf8_ref): Move declaration of decl_size
7963
7964 2002-02-07 Tom Tromey <tromey@redhat.com>
7965
7966 * gcj.texi (Input Options): --CLASSPATH does not suppress system
7967 path.
7968
7969 2002-02-04 Anthony Green <green@redhat.com>
7970
7971 * class.c (build_utf8_ref): Put UTF-8 constants into merged
7972 sections if available.
7973
7974 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7975
7976 * parse.y (java_expand_classes): Fix typo in static field loop.
7977
7978 2002-02-02 Richard Henderson <rth@redhat.com>
7979
7980 * class.c (add_field): Mark static fields external.
7981 (build_class_ref): Remove redundant set.
7982 * parse.y (java_expand_classes): Mark static fields of classes
7983 to be compiled as local.
7984 * jcf-parse.c (parse_class_file): Likewise.
7985
7986 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
7987
7988 * gcj.texi (About CNI): New node.
7989
7990 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
7991
7992 PR java/5080
7993 * jcf-parse.c : Check for HAVE_LOCALE_H before using
7994 setlocale() with LC_CTYPE as a parameter.
7995 * jv-scan.c: Same.
7996
7997 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
7998
7999 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
8000 Follow GNU Coding Standards for --version.
8001
8002 2002-01-28 Tom Tromey <tromey@redhat.com>
8003
8004 * expr.c (build_jni_stub): Ensure storage for `meth' is
8005 generated.
8006 * parse.y (java_complete_expand_methods): Set
8007 current_function_decl before building JNI stub.
8008
8009 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
8010
8011 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
8012 BUILT_IN_SQRTF.
8013
8014 2002-01-22 Tom Tromey <tromey@redhat.com>
8015
8016 * decl.c (java_init_decl_processing): Use add_predefined_file.
8017 Predefine RawData.java.
8018 (predef_filenames): Removed.
8019 (java_init_decl_processing): Don't register predef_filenames.
8020 * jcf-parse.c (add_predefined_file): New function.
8021 (predefined_filename_p): Rewrote.
8022 (predefined_filename_p): No longer static.
8023 * decl.c (java_init_decl_processing): Call initialize_builtins.
8024 * Make-lang.in (JAVA_OBJS): Added builtins.o.
8025 (java/builtins.o): New target.
8026 * builtins.c: New file.
8027 * parse.y (patch_invoke): Use build_call_or_builtin.
8028 * java-tree.h (build_call_or_builtin): Declare.
8029 (initialize_builtins): Declare.
8030 (java_set_exception_lang_code): Removed unused declaration.
8031 (PREDEF_FILENAMES_SIZE): Removed.
8032 (java_tree_index): Added JTI_PREDEF_FILENAMES.
8033 (predef_filenames): New define.
8034 (add_predefined_file): Declare.
8035 (predefined_filename_p): Declare.
8036 * expr.c (expand_invoke): Use build_call_or_builtin.
8037
8038 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8039
8040 * parse.y (patch_switch_statement): Fix format specifier.
8041
8042 2002-01-16 Tom Tromey <tromey@redhat.com>
8043
8044 More for PR java/5365:
8045 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
8046 default.
8047 (process_file): Generate include for
8048 java.lang.UnsupportedOperationExceptions.
8049
8050 2002-01-15 Andreas Jaeger <aj@suse.de>
8051
8052 * .cvsignore: Add man pages.
8053
8054 2002-01-15 Tom Tromey <tromey@redhat.com>
8055
8056 Fix for PR java/5365:
8057 * gjavah.c (process_file): Turn class name into a file name.
8058
8059 2002-01-14 Matthias Klose <doko@debian.org>
8060
8061 * gcj.texi: Fix whitespace and formatting errors in the
8062 synopsis of the man pages. Update copyright.
8063
8064 2002-01-14 Tom Tromey <tromey@redhat.com>
8065
8066 For PR libgcj/5303:
8067 * Make-lang.in (java.install-man): Handle jv-convert man page.
8068 (java.generated-manpages): Added jv-convert.1.
8069 (java.uninstall): Remove jv-convert.1.
8070 (java.maintainer-clean): Likewise.
8071 ($(srcdir)/java/jv-convert.1): New target.
8072 * gcj.texi (Top): Link to jv-convert node.
8073 (Individual utilities): Likewise.
8074 (Invoking jv-convert): New node.
8075
8076 2001-01-10 Jeff Sturm <jsturm@one-point.com>
8077 Martin Kahlert <martin.kahlert@infineon.com>
8078
8079 * jcf-parse.c (get_constant): Don't swap lo/hi for big
8080 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
8081
8082 2002-01-03 Graham Stott <grahams@redhat.com>
8083
8084 * class.c (compile_resource_file): Update copyright date.
8085 Constify filename parameter.
8086 (java-tree.h): Update copyright date.
8087 (compile_resource_file): Constify filename parameter.
8088
8089 2002-01-03 Graham Stott <grahams@redhat.com>
8090
8091 * gcc/jcf-parse.c: Update copyright date.
8092 (yyparse): Constify resource_filename.
8093
8094 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8095
8096 * parse.y (src_parse_roots): Don't needlessly zero init.
8097
8098 2001-12-31 Tom Tromey <tromey@redhat.com>
8099
8100 * parse.y (dump_java_tree): New function.
8101 (source_end_java_method): Call it.
8102 (end_class_declaration): Likewise.
8103 * lang.c (java_decode_option): Call dump_switch_p.
8104
8105 2001-12-28 Tom Tromey <tromey@redhat.com>
8106
8107 * gen-table.pl: Don't process characters after \uffff. Added
8108 comment pointing to input file.
8109
8110 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8111
8112 * gen-table.pl: Const-ify output. Document the location of a
8113 suitable unicode input file.
8114
8115 * chartables.h: Regenerate.
8116
8117 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8118
8119 * chartables.h: Const-ify.
8120 * gjavah.c (options): Likewise.
8121 * jcf-dump.c (options): Likewise.
8122 * jv-scan.c (options): Likewise.
8123 * lex.c (java_start_char_p, java_part_char_p): Likewise.
8124 * parse.y (binop_lookup): Likewise.
8125
8126 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8127
8128 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
8129 the static arrays that are output.
8130 * jvspec.c (jvgenmain_spec): Make static.
8131 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
8132 * keyword.h: Regenerate.
8133 * lang.c (string_option, process_option_with_no, lang_f_options,
8134 lang_W_options): Const-ify.
8135 * lex.c (java_lex): Likewise.
8136
8137 2001-12-21 Richard Henderson <rth@redhat.com>
8138
8139 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
8140 (get_boehm_type_descriptor): ... here. Arrange for the
8141 TREE_TYPE to get set properly.
8142
8143 2001-12-21 Richard Henderson <rth@redhat.com>
8144
8145 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
8146 only if the target requires collect2.
8147
8148 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
8149
8150 2001-12-20 Tom Tromey <tromey@redhat.com>
8151
8152 For PR java/4509:
8153 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
8154 CAN_COMPLETE_NORMALLY for the node.
8155 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
8156 generate code for second branch if first branch can't complete
8157 normally.
8158 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
8159 the loop head if the loop body can't complete normally.
8160
8161 2001-12-20 Tom Tromey <tromey@redhat.com>
8162
8163 For PR java/4766:
8164 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
8165 case where `finally' clause can't complete normally.
8166
8167 2001-12-20 Tom Tromey <tromey@redhat.com>
8168
8169 Fixes PR java/5057:
8170 * parse.y (analyze_clinit_body): Added this_class parameter.
8171 Check for more cases where we must keep <clinit>.
8172 (maybe_yank_clinit): Cleaned up flow control.
8173
8174 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8175
8176 * decl.c (java_init_decl_processing): Don't initialize
8177 finit_leg_identifier_node.
8178 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
8179 (finit_leg_identifier_node): Remove.
8180 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
8181
8182 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8183
8184 * mangle.c (mangle_member_name): Don't special-case for
8185 NO_DOLLAR_IN_LABEL.
8186 * mangle_name.c (unicode_mangling_length): Likewise.
8187 (append_unicode_mangled_name): Likewise.
8188 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
8189 code.
8190
8191 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8192
8193 * expr.c (build_java_array_length_access): Don't force null pointer
8194 check unless flag_check_references is set.
8195
8196 2001-12-20 Tom Tromey <tromey@redhat.com>
8197
8198 Fix for PR java/3417:
8199 * parse.y (patch_assignment): Added special processing for
8200 `return'.
8201 (patch_return): Don't convert booleans to integers, and don't
8202 special-case `null'.
8203
8204 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
8205
8206 * config-lang.in (diff_excludes): Remove.
8207
8208 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
8209
8210 * gcj.texi: Update link to GCC manual.
8211
8212 2001-12-17 Tom Tromey <tromey@redhat.com>
8213
8214 * parse.y (link_nested_class_to_enclosing): Removed useless
8215 statement.
8216
8217 2001-12-16 Tom Tromey <tromey@redhat.com>
8218
8219 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
8220 Fixes PR java/5088.
8221
8222 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
8223
8224 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
8225 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
8226 spelling errors.
8227
8228 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8229
8230 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
8231
8232 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8233
8234 * decl.c (java_init_decl_processing): Build otable_type correctly.
8235 otable_decl is an otable_type.
8236
8237 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8238
8239 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
8240 otable_type, otable_ptr_type, method_symbol_type,
8241 method_symbols_array_type, method_symbols_array_ptr_type): New
8242 field/global tree definitions.
8243 (flag_indirect_dispatch): New flag.
8244 * decl.c (java_init_decl_processing): Initialize new otable and
8245 otable_syms type nodes and decls. Add new field "index" to
8246 method_type_node.
8247 * class.c (build_method_symbols_entry): New function.
8248 (make_method_value): Set "index" to to method's vtable index for
8249 virtual methods when indirect-dispatch is not used.
8250 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
8251 and set vtable_method_count to -1. Set otable and otable_syms field
8252 if indirect-dispatch is used and there was something to put in them.
8253 (build_method_symbols_entry): New function.
8254 (emit_offset_symbol_table): New function.
8255 * expr.c (get_offset_table_index): New function.
8256 (build_invokevirtual): Build array reference to otable at the index
8257 returned by get_offset_table_index, and use the result as the vtable
8258 offset.
8259 (build_invokeinterface): Similar.
8260 * jcf-parse.c (yyparse): If indirect-dispatch, call
8261 emit_offset_symbol_table at the end of compilation, after all classes
8262 have been generated.
8263 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
8264 * lang.c (flag_indirect_dispatch): Define.
8265 (lang_f_options): Add indirect-dispatch flag.
8266
8267 2001-12-14 Matthias Klose <doko@debian.org>
8268
8269 * gcj.texi: Markup for man page generation. Document missing
8270 options printed by <tool> --help.
8271 Terminate description of gij's -ms option with a dot.
8272 * Make-lang.in ($(srcdir)/java/*.1): New targets.
8273 (java.generated-manpages java.install-man, java.uninstall,
8274 java-maintainer-clean) Updated.
8275
8276 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
8277
8278 * class.c (get_dispatch_table): Fix java vtable layout
8279 for TARGET_VTABLE_USES_DESCRIPTORS.
8280 * decl.c (java_init_decl_processing): Initialize
8281 alloc_no_finalizer_node, finalize_identifier_node.
8282 * expr.c (class_has_finalize_method): New function.
8283 (expand_java_NEW): Generate calls for finalizer-free allocation.
8284 (build_invokevirtual): Fix java vtable layout for
8285 TARGET_VTABLE_USES_DESCRIPTORS.
8286 * java-tree.h (enum java_tree_index): New entries:
8287 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
8288 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
8289 (class_has_finalize_method): declare.
8290 (HAS_FINALIZER_P): New macro.
8291 * parse.y (patch_invoke): Generate calls for finalizer-free
8292 allocation.
8293
8294 2001-12-12 Matthias Klose <doko@debian.org>
8295
8296 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
8297 whitespace at end of line.
8298
8299 2001-12-11 Tom Tromey <tromey@redhat.com>
8300
8301 * lex.c (java_init_lex): Define wfl_to_string as
8302 gnu.gcj.runtime.StringBuffer unless generating bytecode.
8303
8304 2001-12-11 Jeff Sturm <jsturm@one-point.com>
8305
8306 * class.c (make_method_value): Use null_pointer_node to
8307 represent empty exception table.
8308
8309 2001-12-10 Tom Tromey <tromey@redhat.com>
8310
8311 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
8312
8313 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
8314
8315 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
8316
8317 2001-12-09 Per Bothner <per@bothner.com>
8318
8319 * check-init.c (current_switch_has_default): New static field.
8320 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
8321 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
8322 DEFAULT_EXPR seen, simulate a default alternative that copies state.
8323
8324 2001-12-09 Tom Tromey <tromey@redhat.com>
8325
8326 * check-init.c (check_init): Don't allow pre- or post- increment
8327 or decrement of final variable.
8328 (final_assign_error): Minor error message rewording.
8329
8330 2001-12-08 Tom Tromey <tromey@redhat.com>
8331
8332 * java-tree.h: Fixed typo.
8333
8334 * gjavah.c (decompile_method): Don't decompile to `return this'
8335 for static methods.
8336
8337 * gjavah.c (cxx_keywords): Re-sorted.
8338 * lex.c (cxx_keywords): Re-sorted.
8339
8340 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
8341 else.
8342
8343 * gjavah.c (print_namelet): Clear subnamelets.
8344 (HANDLE_METHOD): Set `method_printed' earlier.
8345
8346 2001-12-07 Tom Tromey <tromey@redhat.com>
8347
8348 * lang.c (lang_f_options): Added
8349 optimize-static-class-initialization.
8350 (java_decode_option): Removed special case.
8351
8352 2001-12-07 Per Bothner <per@bothner.com>
8353
8354 * check-init.c (check_init): Fix typo freeing memory twice.
8355
8356 2001-12-05 Per Bothner <per@bothner.com>
8357
8358 Restore support for static class initialization optimization.
8359 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
8360 * check-init.c (check_int): At end of BLOCK handle initialization
8361 blocks, which used to be done in java_complete_expand_method but did
8362 not handle the case where check_for_initialization might allocate
8363 more than a word of bits.
8364 * decl.c (lang_make_tree): The smic field is now a tree.
8365 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
8366 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
8367
8368 * parse.y (emit_test_initialization): Combine hash_lookup calls.
8369
8370 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
8371 Change from a hash table to a list.
8372 (struct_lang_decl): Change field 'smic' to match.
8373 * class.c (add_method_1): Initialize
8374 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
8375 * parse.y (adjust_init_test_initialization): Removed - inlined into -
8376 (java_expand_method_bodies): -here, since 'smic' is now a list.
8377 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
8378
8379 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
8380
8381 * class.c (java_hash_compare_tree_node): Fix casts.
8382
8383 2001-12-04 Per Bothner <per@bothner.com>
8384
8385 * check-init.c: Handle definite unassignment to finals in addition
8386 to definite assignment.
8387 (loop_current_locals): New field.
8388 (num_current_locals, int start_current_locals, num_current_words):
8389 Make static.
8390 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
8391 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
8392 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
8393 (get_variable_decl, check_final_reassigned): New functions.
8394 (check_init, check_bool_init): Modify as needed for checking finals.
8395 (check_for_initialization): Take extra parameter and return void.
8396 Do extra start-up logic to check final fields for assignment.
8397 * parse.y (check_static_final_variable_assignment_flag,
8398 reset_static_final_variable_assignment_flag, check_final_assignment,
8399 check_final_variable_local_assignment_flag,
8400 reset_final_variable_indirect_assignment_flag,
8401 reset_final_variable_global_assignment_flag): Remove functions.
8402 (java_complete_expand_methods, outer_field_access_fix,
8403 patch_assignment): Remove no-longer used logic.
8404 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
8405 * parse.y (register_fields, java_complete_tree): Update accordingly.
8406
8407 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
8408 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
8409 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
8410
8411 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
8412
8413 * java-tree.h (DECL FINAL): New bit-field.
8414 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
8415 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
8416 (DECL_INIT_CALLS_THIS): New macro.
8417 (struct lang_decl): New bit-field init_calls_this.
8418 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
8419 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
8420 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
8421 use it for both local variables and final fields.
8422 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
8423 and local_final.
8424 (struct lang_type): Remove hfv bit-field.
8425 (check_for_initialization): Change to return void.
8426
8427 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
8428 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
8429 * check-init.c (final_assign_error): New helper function.
8430 (check_final_reassigned, check_init): Use it.
8431 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
8432
8433 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
8434 bit-fields to unsigned.
8435
8436 2001-12-03 Per Bothner <per@bothner.com>
8437
8438 * parse.y (patch_binop): Minor constant folding.
8439
8440 * parse.y (build_current_thisn): Shorter 'buffer'.
8441
8442 2001-12-03 Per Bothner <per@bothner.com>
8443
8444 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
8445 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
8446 * jcf-write.c (generate_bytecode_insns): Remove support for
8447 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
8448 * check-init.c (check_init): Likewise.
8449
8450 2001-12-03 Per Bothner <per@bothner.com>
8451
8452 * verify.c (subroutine_nesting): New function.
8453 (verify_jvm_instructions): Use it to fix logic for checking that
8454 we're done with the current subroutine.
8455
8456 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
8457 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
8458
8459 2001-12-03 Per Bothner <per@bothner.com>
8460
8461 * jcf.h: Fix obvious typo in comment.
8462 * typeck.c (build_null_signature): Add comment.
8463
8464 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
8465
8466 * expr.c: Remove leading capital from diagnostic messages, as
8467 per GNU coding standards.
8468 * jcf-io.c: Similarly.
8469 * jcf-parse.c: Similarly.
8470 * jv-scan.c: Similarly.
8471 * jvspec.c: Similarly.
8472 * mangle.c: Similarly.
8473
8474 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
8475 Alexandre Petit-Bianco <apbianco@redhat.com>
8476
8477 * expr.c (build_java_arrayaccess): Call save_expr on array for
8478 correct evaluation order, modified comment, fixed indentation.
8479 * parse.y: (patch_assignment): Correctly extract the array base
8480 from the tree generate by build_java_arrayaccess, added comments.
8481 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
8482 Fixes PR java/3096, PR java/3803, PR java/3965.
8483
8484 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
8485
8486 * expr.c (expand_byte_code): Remove trailing periods from messages.
8487 * jcf-parse.c (load_class, jcf_parse): Similarly.
8488 * jcf-write.c (generate_classfile): Similarly.
8489 * lex.c (java_lex): Similarly.
8490
8491 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8492
8493 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
8494
8495 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
8496
8497 * Make-lang.in (java.generated-manpages): New dummy target.
8498
8499 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8500
8501 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8502 ASM_FINAL_SPEC.
8503 (lang_specific_pre_link): Use set_input to set input_filename.
8504 Append `main' here.
8505 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8506 (main): Fix definition.
8507 Strip `main' from classname.
8508 Fixes PR java/227.
8509
8510 2001-11-18 Roger Sayle <roger@eyesopen.com>
8511
8512 * parse.h (java_expand_switch): Remove old prototype.
8513
8514 2001-11-18 Tom Tromey <tromey@redhat.com>
8515
8516 Fix for PR java/1401:
8517 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
8518 arg0 is null.
8519 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
8520 correctly.
8521
8522 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
8523
8524 * lang.c (finish_parse): Rename to java_finish.
8525 (LANG_HOOKS_FINISH, java_finish): New.
8526
8527 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
8528
8529 * decl.c (init_decl_processing): Rename java_init_decl_processing.
8530 * java-tree.h: New prototype.
8531 * lang.c (java_init): Update prototype. Combine with old init_parse.
8532
8533 2001-11-13 Tom Tromey <tromey@redhat.com>
8534
8535 * gjavah.c (method_signature): New global.
8536 (HANDLE_METHOD): Set it.
8537 (decompile_return_statement): New function.
8538 (decompile_method): Use it.
8539 (print_method_info): Removed `synth' argument.
8540
8541 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
8542
8543 * java-tree.h (java_set_yydebug): New.
8544 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
8545 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
8546 (print_lang_decl, print_lang_type, print_lang_identifier,
8547 print_lang_statistics, lang_print_xnode): Remove.
8548
8549 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
8550
8551 * jcf-parse.c (init_lex): Remove.
8552 * lang.c (language_string, lang_identify): Remove.
8553 (struct lang_hooks): Constify.
8554 (LANG_HOOKS_NAME): Override.
8555 (init_parse): Update.
8556
8557 2001-11-08 Andreas Franck <afranck@gmx.de>
8558
8559 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
8560 program_transform_name the way suggested by autoconf.
8561 (java.install-common): Also transform auxiliary program names with
8562 program_transform_name.
8563
8564 2001-11-08 Tom Tromey <tromey@cygnus.com>
8565
8566 * parse.y (trap_overflow_corner_case): New rule.
8567 (unary_expression): Use it.
8568 * lex.c (java_init_lex): Don't set minus_seen.
8569 (yylex): Don't use minus_seen. Communicate overflow to parser for
8570 it to handle.
8571 (error_if_numeric_overflow): New function.
8572 * parse.h (minus_seen): Removed field.
8573 (JAVA_RADIX10_FLAG): New define.
8574
8575 2001-11-07 Tom Tromey <tromey@redhat.com>
8576
8577 Patch for PR java/1414:
8578 * parse.y (case_label_list): New global.
8579 (goal): Register case_label_list with GC.
8580 (java_complete_lhs): Save new case on case_label_list.
8581 (patch_switch_statement): Check for duplicate case labels.
8582
8583 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
8584
8585 * parse.y (patch_assignment): Removed unused third argument.
8586 (java_complete_lhs): Removed unused third argument to patch_assignment.
8587
8588 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
8589
8590 * lang.c: Include langhooks-def.h.
8591 * Make-lang.in: Update.
8592
8593 2001-10-31 Zack Weinberg <zack@codesourcery.com>
8594
8595 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8596
8597 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8598
8599 * mangle.c (find_compression_record_match): Don't match compression
8600 records for package name elements unless they occur at the start of
8601 the name. Fix for PR java/4717.
8602
8603 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8604
8605 * expr.c (expand_java_field_op): Don't special-case references to
8606 java.lang.PRIMTYPE.TYPE.
8607 (build_primtype_type_ref): Removed.
8608 * java-tree.h (build_primtype_type_ref): Remove prototype.
8609 * parse.y (maybe_build_primttype_type_ref): Removed.
8610 (complete_function_arguments): Don't special-case references to
8611 java.lang.PRIMTYPE.TYPE.
8612 (patch_assignment): Likewise.
8613 (array_constructor_check_entry): Likewise.
8614
8615 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
8616
8617 * mangle.c (static tree compression_table): Fixed leading comment.
8618 * parse.h (struct parser_ctxt): Fixed field comment.
8619 * parse.y (check_pkg_class_access): New prototype, fixed leading
8620 comment, new parameter used to emit error only if passed as true.
8621 (parse_check_super): Pass extra argument to check_pkg_class_access.
8622 (do_resolve_class): Likewise.
8623 (process_imports): Likewise.
8624 (read_import_dir): Fixed indentation.
8625 (find_in_imports_on_demand): New local class_type_name. Local
8626 node_to_use deleted. while loop changed into for loop. Report
8627 multiple definition only for accessible classes. Improved error
8628 message.
8629 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
8630 assigned to parameter list, fixed indentation. while loop changed
8631 into for loop, restore TREE_CHAIN on local `tem' before the next
8632 iteration.
8633
8634 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8635
8636 * lang.c (lang_get_alias_set): Deleted.
8637
8638 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8639
8640 * gjavah.c (jni_print_char): Fix thinko in last change.
8641
8642 * gjavah.c (jni_print_char, decode_signature_piece): Use
8643 safe-ctype macros and/or fold extra calls into fewer ones.
8644 * lex.c (java_read_unicode, java_lex): Likewise.
8645 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
8646 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
8647 * mangle_name.c (append_unicode_mangled_name,
8648 unicode_mangling_length): Likewise.
8649
8650 2001-10-17 Richard Henderson <rth@redhat.com>
8651
8652 * Make-lang.in (java/lang.o): Depend on langhooks.h.
8653
8654 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
8655
8656 * lang.c (langhooks.h): Included.
8657 (LANG_HOOKS_INIT): Redefined.
8658 (LANG_HOOKS_INIT_OPTIONS): Likewise.
8659 (LANG_HOOKS_DECODE_OPTION): Likewise.
8660 (struct lang_hooks lang_hooks): New initialization.
8661
8662 2001-10-11 Per Bothner <per@bothner.com>
8663
8664 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
8665 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
8666 The former is simpler, and jcf-write.c handles it better.
8667 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
8668 or WITH_CLEANUP_EXPR.
8669 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
8670 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
8671
8672 * parse.y (patch_if_else_statement): If the condition is constant,
8673 optimize away the test.
8674
8675 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
8676
8677 * parse.y (patch_cast): Call patch_string on the first operand of
8678 the incoming node, update it if necessary. Fixes PR java/4510.
8679
8680 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8681
8682 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
8683 when name qualifier matches a package name.
8684
8685 2001-10-08 Tom Tromey <tromey@redhat.com>
8686
8687 Fix for PR java/4489:
8688 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
8689 force a new label when computing `body_block'.
8690
8691 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8692
8693 * jcf-io.c (format_uint): Const-ify.
8694 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
8695 * lex.c (java_get_line_col): Likewise.
8696 * parse.y (build_incdec): Likewise.
8697
8698 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
8699
8700 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
8701 a NULL enclosing context if appropriate. Fixes PR java/4466.
8702
8703 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
8704
8705 * parse.y (patch_assignment): Use lvalue's original TYPE when
8706 building the final COMPOUND_EXPR.
8707 (try_reference_assignconv): Fixed leading comment.
8708
8709 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
8710
8711 * parse.y (check_final_variable_indirect_assignment): For
8712 COMPOUND_EXPR, return only if finals were found initialized
8713 properly, if not, keep on checking.
8714 (check_final_variable_global_assignment_flag): New local
8715 error_found, set when appropriate and used to decide whether to
8716 report uninitialized finals. Fixed typo in comment.
8717
8718 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
8719
8720 * decl.c (init_decl_processing): Fixed typo in predef_filenames
8721 last three initializations. Fixes PR java/4360.
8722
8723 2001-09-21 Richard Henderson <rth@redhat.com>
8724
8725 * class.c (get_dispatch_table): Handle function descriptors.
8726 (build_dtable_decl): Likewise.
8727 * expr.c (build_invokevirtual): Likewise.
8728
8729 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
8730
8731 * parse.y (patch_method_invocation): Build class initialization
8732 when static finals are used to qualify method invocation.
8733 Fixes PR java/4366.
8734
8735 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
8736
8737 * parse.h: (WFL_STRIP_BRACKET): Re-written using
8738 build_type_name_from_array_name.
8739 (STRING_STRIP_BRACKETS): New macro.
8740 * parse.y (build_type_name_from_array_name): New function.
8741 (array_creation_expression:): Accumulate []s instead of [s.
8742 (cast_expression:): Accumulate []s instead of [s after cast type
8743 name.
8744 (build_array_from_name): Local string deleted, use
8745 build_type_name_from_array_name.
8746 (build_unresolved_array_type): Accumulate []s instead of [s after
8747 type name.
8748 (register_fields): Fixed comment.
8749 (resolve_class): Local name, base deleted, new locals tname and
8750 array_dims. Use build_type_name_from_array_name. Use array_dims to
8751 build array type.
8752 (purify_type_name): Use STRING_STRIP_BRACKETS.
8753
8754 2001-09-18 Andreas Jaeger <aj@suse.de>
8755
8756 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
8757 * jv-scan.c: Likewise.
8758
8759 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
8760
8761 * parse.y (patch_method_invocation): Inner class creation context
8762 check not enforced within constructors. Fixes PR java/1873.
8763
8764 2001-09-16 Tom Tromey <tromey@redhat.com>
8765
8766 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
8767 NOTE_PUSH for single-case push. Fixes PR java/4189.
8768
8769 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
8770
8771 * java-tree.h (TYPE_IMPORT_LIST): New macro.
8772 (TYPE_IMPORT_DEMAND_LIST): Likewise.
8773 (struct lang_type): New fields import_list and import_demand_list.
8774 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
8775 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
8776 (do_resolve_class): New local saved_enclosing_type, initialized,
8777 passed as parameter to find_in_imports and find_in_imports_on_demand.
8778 (find_in_imports): Added paramater enclosing_type, use its
8779 TYPE_IMPORT_LIST when applicable.
8780 (find_in_imports_on_demand): Added parameter enclosing_type, use
8781 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
8782 declaration and initialization.
8783 (fold_constant_for_init): Switch/restore current_class to the
8784 appropriate context.
8785
8786 2001-09-13 Mark Mitchell <mark@codesourcery.com>
8787
8788 * verify.c (verify_jvm_instructions): Fix typo.
8789
8790 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8791
8792 * expr.c (expand_invoke): Const-ification.
8793 * parse.y (patch_method_invocation): Likewise.
8794
8795 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8796
8797 * gjavah.c (cxx_keywords): Const-ification.
8798 * keyword.gperf (java_keyword): Likewise.
8799 * lang.c (java_tree_code_name): Likewise.
8800 * lex.c (cxx_keywords): Likewise.
8801 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
8802
8803 2001-09-11 Richard Henderson <rth@redhat.com>
8804
8805 * parse.h (ctxp_for_generation): Mark extern.
8806
8807 2001-09-10 Richard Henderson <rth@redhat.com>
8808
8809 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
8810
8811 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
8812
8813 * typeck.c (java_array_type_length, build_prim_array_type):
8814 Represent empty arrays by NULL index.
8815
8816 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
8817
8818 * java-tree.h (compile_resource_file): Grouped with other prototypes.
8819 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
8820
8821 2001-09-06 Anthony Green <green@redhat.com>
8822
8823 * class.c (O_BINARY): Define if necessary.
8824 (registerResource_libfunc): Declare.
8825 (init_class_processing): Initilize registerResource_libfunc.
8826 (compile_resource_file): New function.
8827 * java-tree.h (resource_name): Declare.
8828 (compile_resource_file): Declare.
8829 * jcf-parse.c (yyparse): Handle compiling java resource files.
8830 * lang.c (java_decode_option): Handle -fcompile-resource option.
8831 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
8832 resource files.
8833 * gcj.texi (Code Generation): Add documentation for -R flag.
8834
8835 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
8836
8837 * jcf-write.c (generate_classfile): Issue an error in case of
8838 field/initial value mismatch.
8839 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
8840 being initialized and we're generating bytecode.
8841 (java_complete_lhs): In MODIFY_EXPR section: added comments,
8842 set DECL_INITIAL properly when appropriate.
8843 Fixes PR java/4230
8844 Fixes PR java/4204
8845
8846 2001-09-01 Per Bothner <per@bothner.com>
8847
8848 * parse.y (maybe_yank_clinit): A field without an initializer is not
8849 relevant. All initializers except static final and constant require
8850 <clinit>, regardless of flag_emit_class_files.
8851
8852 2001-08-31 Per Bothner <per@bothner.com>
8853
8854 * class.c (set_constant_value): When not emitting class files, then a
8855 String ConstantValue is a utf8const_ptr_type.
8856
8857 2001-08-30 Per Bothner <per@bothner.com>
8858
8859 * jcf-write.c (generate_classfile): Check that field is primitive
8860 or string before emitting ConstantValue attribute.
8861
8862 2001-08-30 Per Bothner <per@bothner.com>
8863
8864 * parse.y (resolve_qualified_expression_name): If creating a
8865 COMPOUND_EXPR, set it's type correctly.
8866
8867 2001-08-30 Per Bothner <per@bothner.com>
8868
8869 * jcf-io.c (open_class): Set filename field.
8870
8871 * jcf-parse,c (parse_class_file): Set current_function_decl
8872 for better error message when Code attribute is missing.
8873
8874 * lang.c (put_decl_node, lang_print_error): Re-arrange for
8875 better diagnostics, especially for constructors.
8876
8877 2001-08-30 Per Bothner <per@bothner.com>
8878
8879 * jcf-write.c (generate_classfile): Don't write ConstantValue
8880 attribute if field is not final, for compatibility with jdk.
8881
8882 * jcf-write.c (generate_classfile): Convert ConstantValue values
8883 to correct type. Work-around for front-end bug.
8884 * class.c (set_constant_value): Error if constant has wrong type.
8885
8886 2001-08-30 Per Bothner <per@bothner.com>
8887
8888 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
8889 "Double" are printed at verbosity 1.
8890
8891 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
8892
8893 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
8894
8895 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
8896
8897 * parse.y (patch_assignment): Don't verify final re-assignment here.
8898 (java_complete_lhs): Verify assignments to finals calling
8899 patch_assignment. Verify re-assignments to finals before calling
8900 patch_assignment.
8901
8902 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
8903
8904 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
8905 Fixes PR java/1413
8906
8907 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
8908
8909 * lex.c (java_lex): new local found_hex_digits. Set and then used
8910 in test to reject invalid hexadecimal numbers.
8911 * parse.y (java_complete_tree): Prevent unwanted cast with
8912 initialized floating point finals.
8913 (patch_binop): Emit a warning when detecting a division by zero,
8914 mark result not constant, don't simplify non integer division.
8915
8916 2001-08-28 Per Bothner <per@bothner.com>
8917
8918 * jcf-write.c (generate_bytecode_insns): For increments and
8919 decrements just recurse to push constant. Improvement on Mark's patch.
8920
8921 2001-08-28 Mark Mitchell <mark@codesourcery.com>
8922
8923 * jcf-write.c (generate_bytecode_insns): Generate an integer to
8924 real conversion for increments and decrements of reals.
8925
8926 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
8927
8928 * parse.y (resolve_qualified_expression_name): Handle unresolved
8929 qualified expressions, prevent numerical qualifiers, fixed typo.
8930 Fixes PR java/4141
8931
8932 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
8933
8934 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
8935 don't report anything but deprecated class when marked so. Handle
8936 VAR_DECL.
8937 (patch_method_invocation): Check deprecation on methods and types.
8938 (patch_binop): code becomes an enum tree_code, added default: to
8939 switch to handle that. Detect division by zero, try to fold and
8940 return before using a subroutine.
8941
8942 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
8943
8944 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
8945 file smaller than 4 bytes.
8946 * parse.y (check_inner_circular_reference): New function.
8947 (check_circular_reference): Likewise.
8948 (array_initializer:): Accept {,}.
8949 (java_check_circular_reference): Rewritten using
8950 check_circular_reference and check_inner_circular_reference.
8951 (java_complete_expand_method): Unconditionally save and restore
8952 the unpurged exception list.
8953 (build_dot_class_method_invocation): Unmangle signature parameter.
8954
8955 2001-08-21 Tom Tromey <tromey@redhat.com>
8956
8957 * decl.c (init_decl_processing): Add `throws' field to method
8958 descriptor.
8959 * class.c (make_method_value): Compute `throws' field for method.
8960
8961 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
8962
8963 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
8964 circularity is detected.
8965 (ctors_unchecked_throws_clause_p): Fixed leading comment.
8966
8967 2001-08-17 Richard Henderson <rth@redhat.com>
8968
8969 * class.c (emit_register_classes): Add align parameter to
8970 call to assemble_integer.
8971
8972 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
8973
8974 * jcf-parse.c (load_class): New locals saved and class_loaded. If
8975 loading a class_or_name fails, try considering an innerclass name
8976 and load the enclosing context.
8977 * parse.y (resolve_inner_class): New function.
8978 (find_as_inner_class): Added leading comment.
8979 (register_incomplete_type): Keep the current context as enclosing
8980 context for JDEP_FIELD dependencies.
8981 (do_resolve_class): Locals new_class_decl and super initialized to
8982 NULL. Call resolve_inner_class, explore the enclosing context
8983 superclass if necessary.
8984 Fixes PR java/4007
8985
8986 2001-08-16 Tom Tromey <tromey@redhat.com>
8987
8988 * jcf-dump.c (main): Updated for change to jcf_path_seal.
8989 * gjavah.c (main): Updated for change to jcf_path_seal.
8990 * lang.c (version_flag): New global.
8991 (java_decode_option): Recognize `-version'.
8992 (java_init): Update for change to jcf_path_seal.
8993 * jcf.h (jcf_path_seal): Added `print' argument.
8994 * jcf-path.c (jcf_path_seal): Added `print' argument.
8995
8996 2001-08-13 Zack Weinberg <zackw@panix.com>
8997
8998 * Make-lang.in (java/decl.o): Update dependencies.
8999 * decl.c: Include libfuncs.h, don't include toplev.h.
9000
9001 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
9002
9003 * decl.c (init_decl_processing): exception_type_node,
9004 class_not_found_type_node, and no_class_def_found_type_node
9005 initialized. predef_filenames augmented accordingly.
9006 instinit_identifier_node initialized.
9007 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
9008 * java-tree.h (enum java_tree_index): New entries
9009 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
9010 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
9011 (exception_type_node): New macro.
9012 (class_not_found_type_node): Likewise.
9013 (no_class_def_found_type_node): Likewise.
9014 (instinit_identifier_node): Likewise.
9015 (PREDEF_FILENAMES_SIZE): Adjusted.
9016 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
9017 (struct lang_type): Fixed typo in bitfield name.
9018 (DECL_INSTINIT_P): New macro.
9019 (ID_INSTINIT_P): Likewise.
9020 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
9021 attribute.
9022 * parse.y (encapsulate_with_try_catch): New function.
9023 (generate_instinit): Likewise.
9024 (build_instinit_invocation): Likewise.
9025 (ctors_unchecked_throws_clause_p): Likewise.
9026 (add_instance_initializer): Deleted.
9027 (build_instance_initializer): Likewise.
9028 (in_instance_initializer): Likewise.
9029 (check_method_redefinition): instinit$ not to be verified.
9030 (java_complete_expand_methods): Generate instinit$, simplified code.
9031 (build_dot_class_method): Eliminated unnecessary locals. Use
9032 encapsulate_with_try_catch, removed unnecessary code.
9033 (fix_constructors): New local iii. Use build_instinit_invocation.
9034 (patch_method_invocation): Added comment.
9035 (maybe_use_access_method): Don't consider instinit$.
9036 (find_applicable_accessible_methods_list): Shorten the search for
9037 instinit$ too.
9038 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
9039 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
9040 (patch_throw_statement): Likewise. Fixed typo.
9041
9042 2001-08-12 David Edelsohn <edelsohn@gnu.org>
9043
9044 Revert:
9045 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9046 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9047 ASM_FINAL_SPEC.
9048 (lang_specific_pre_link): Use set_input to set input_filename.
9049 Append `main' here.
9050 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9051 (main): Fix definition.
9052 Strip `main' from classname.
9053 Fixes PR java/227.
9054
9055 2001-08-11 Zack Weinberg <zackw@panix.com>
9056
9057 * lex.h: Don't include setjmp.h. Don't define
9058 SET_FLOAT_HANDLER or prototype set_float_handler.
9059
9060 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9061
9062 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
9063 `poplevel' in the right order.
9064
9065 2001-08-09 Richard Henderson <rth@redhat.com>
9066
9067 * Make-lang.in (class.o): Depend on TARGET_H.
9068 * class.c (emit_register_classes): Use target hooks instead of
9069 assemble_constructor and assemble_destructor.
9070
9071 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
9072
9073 * check-init.c (flags.h): Include
9074 (check_init): Don't report uninitialized static class
9075 initialization flags, don't free bit index when doing static class
9076 initialization optimization.
9077 (check_for_initialization): Return type changed to `unsigned int.'
9078 (attach_initialized_static_class): New function.
9079 * class.c (add_method_1): Create the initialized static class
9080 table if necessary.
9081 (finish_class): Always emit deferred inline methods.
9082 * decl.c (emit_init_test_initialization): Moved to expr.c
9083 (complete_start_java_method): Don't traverse
9084 DECL_FUNCTION_INIT_TEST_TABLE.
9085 (lang_mark_tree): Mark hash tables in function decls.
9086 * expr.c (emit_init_test_initialization): Moved from decl.c.
9087 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
9088 initialization flag, set DECL_CONTEXT and
9089 LOCAL_CLASS_INITIALIZATION_FLAG.
9090 (java_lang_expand_expr): Emit initialization code for static class
9091 initialized flags when entering block, if necessary.
9092 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
9093 * java-tree.h (flag_optimize_sci): New global variable declaration.
9094 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
9095 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
9096 (LOCAL_FINAL_P): Fixed typo in comment.
9097 (FINAL_VARIABLE_P): Likewise.
9098 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
9099 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
9100 (struct lang_decl): New fields `ict', `smic' and `cif.'
9101 (check_for_initialization): New returned value for global.
9102 (attach_initialized_static_class): New global function.
9103 (STATIC_CLASS_INIT_OPT_P): New macro.
9104 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
9105 * lang.c (java_decode_option): Handle
9106 `-fno-optimize-static-class-initialization'
9107 * parse.y (start_complete_expand_method): New function.
9108 (java_expand_method_bodies): Likewise.
9109 (attach_init_test_initialization_flags): Likewise.
9110 (adjust_init_test_initialization): Likewise.
9111 (emit_test_initialization): Likewise.
9112 (java_complete_expand_methods): Nullify abstract and native method
9113 bodies.
9114 (java_complete_expand_method): New locals `fbody', `block_body'
9115 and `exception_copy.' Reorganized: directly return on empty method
9116 bodies, call `start_complete_expand_method', remember definitely
9117 initialized static class in function, don't expand method bodies.
9118 (java_expand_classes): Call `java_expand_method_bodies' before
9119 `finish_class' when compiling to native.
9120 (resolve_expression_name): Use `orig' after building outer class
9121 field access.
9122 (patch_invoke): Remember static method invocations.
9123
9124 2001-08-06 Richard Henderson <rth@redhat.com>
9125
9126 * class.c (emit_register_classes): Pass a symbol_ref and priority
9127 to assemble_constructor.
9128
9129 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
9130
9131 * java-tree.h (all_class_filename): New macro.
9132 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
9133 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
9134 newly created IDENTIFIER_NODE to `all_class_filename.'
9135
9136 2001-08-01 Jeff Sturm <jsturm@one-point.com>
9137
9138 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
9139 Use ggc_add_tree_root to register roots.
9140
9141 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
9142
9143 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
9144 second operand calling check_init.
9145 * decl.c (complete_start_java_method): Swaped second and third
9146 arguments while creating WITH_CLEANUP_EXPR node.
9147 * jcf-write.c (generate_bytecode_insns): Use second operand
9148 instead of third when handling WITH_CLEANUP_EXPR.
9149 * parse.y (java_complete_lhs): Expand second operand of
9150 WITH_CLEANUP_EXPR nodes.
9151 (patch_synchronized_statement): Swaped second and third arguments
9152 while creating WITH_CLEANUP_EXPR node.
9153
9154 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
9155
9156 * parse.y (create_interface): Avoid cyclic inheritance report when
9157 syntax error encountered during class definition.
9158 Fixes PR java/2956
9159
9160 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9161
9162 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9163 ASM_FINAL_SPEC.
9164 (lang_specific_pre_link): Use set_input to set input_filename.
9165 Append `main' here.
9166 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9167 (main): Fix definition.
9168 Strip `main' from classname.
9169 Fixes PR java/227.
9170
9171 2001-07-18 Tom Tromey <tromey@redhat.com>
9172
9173 For PR java/2812:
9174 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
9175 * lex.c (java_new_lexer): Use ICONV_CONST.
9176 (java_read_char): Likewise.
9177 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
9178 (jv-scan$(exeext)): Likewise.
9179
9180 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
9181
9182 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
9183 * parse.y (check_class_interface_creation): Allow `private' if the
9184 enclosing is not an interface.
9185 (create_interface): Interface tagged public if the enclosing
9186 context is an interface.
9187 (create_class): Class tagged public if the enclosing context
9188 is an interface.
9189 Fixes PR java/2959
9190
9191 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
9192
9193 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
9194 Fixes PR java/2665
9195
9196 2001-07-14 Tim Josling <tej@melbpc.org.au>
9197
9198 * check-init.c (check_init): Remove references to EXPON_EXPR.
9199
9200 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
9201
9202 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
9203 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
9204 Fixes PR java/3602
9205
9206 2001-07-13 Tom Tromey <tromey@redhat.com>
9207
9208 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
9209 invocation.
9210
9211 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
9212
9213 * parse.y (patch_method_invocation): Don't override primary if one
9214 is already provided, but let this$<n> be built. Fixed comment.
9215
9216 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
9217
9218 * parse.y (empty_statement:): Report empty statement error only
9219 when found at class declaration level.
9220 Fixes PR java/3635
9221
9222 2001-07-12 Tom Tromey <tromey@redhat.com>
9223
9224 * expr.c (expand_load_internal): New function.
9225 (LOAD_INTERNAL): Use it.
9226
9227 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
9228
9229 * parse.y (verify_constructor_super): Compare anonymous class ctor
9230 args with `valid_method_invocation_conversion_p.'
9231 Fixes PR java/3285
9232
9233 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9234
9235 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
9236 `-fsyntax-only.' Fixes PR java/3248
9237
9238 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9239
9240 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
9241
9242 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9243
9244 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
9245 current function is static. Fixes PR java/1970
9246
9247 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9248
9249 * parse.y (patch_method_invocation): Add enclosing context to ctor
9250 calls if necessary. Fixes PR java/2953
9251
9252 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9253
9254 * parse.y (resolve_package): Abort if qualified expression member
9255 isn't right.
9256 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
9257 Fixes PR java/1391
9258
9259 2001-07-07 Zack Weinberg <zackw@stanford.edu>
9260
9261 * verify.c: Don't use // comments.
9262
9263 2001-07-05 Tom Tromey <tromey@redhat.com>
9264
9265 * lang.c (flag_assume_compiled): Removed.
9266 * java-tree.h (flag_assume_compiled): Removed.
9267 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
9268 -fhash-synchronization, -fuse-divide-subroutine,
9269 -fcheck-references, -femit-class-file, -femit-class-files,
9270 -fassume-compiled. Updated --encoding information. Changed
9271 -foutput-class-dir to `-d'.
9272
9273 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
9274
9275 * jcf-parse.c (parse_class_file): Add lineno parameter to
9276 debug_start_source_file call.
9277
9278 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
9279
9280 * gcj.texi: Use gpl.texi.
9281 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
9282 dependencies and use doc/include in search path.
9283
9284 2001-07-03 Jeff Sturm <jsturm@one-point.com>
9285
9286 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
9287 `this'. If so, don't build instance initializers.
9288
9289 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
9290
9291 * parse.y (resolve_expression_name): Improved error message for
9292 inner class cases. Fixes PR java/1958
9293
9294 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
9295
9296 * lang.c: #include diagnostic.h
9297 (lang_print_error): Add a `diagnostic_context *' parameter.
9298 (java_dummy_print): Likewise.
9299 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
9300
9301 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9302
9303 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
9304 * jcf.h (typedef struct JCF): New bitfield `finished.'
9305 (JCF_FINISH): Set `finished.'
9306 (JCF_ZERO): Reset `finished.'
9307 Fixes PR java/2633
9308
9309 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9310
9311 * parse.y (class_body_declaration:): Don't install empty instance
9312 initializers.
9313 Fixes PR java/1314
9314
9315 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9316
9317 * class.c (set_super_info): Call `set_class_decl_access_flags.'
9318 (set_class_decl_access_flags): New function.
9319 * java-tree.h (set_class_decl_access_flags): New prototype.
9320 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
9321 (parse_class_file): New local `decl_max_locals.' Take wide types
9322 into account to compute DECL_MAX_LOCALS.
9323 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
9324 imports on demand.
9325
9326 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
9327
9328 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
9329
9330 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
9331
9332 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
9333 * parse.y (do_resolve_class): Moved comments out to leading comment
9334 section. Removed local `start', New local `_ht' and
9335 `circularity_hash.' Record `enclosing' in hash table and search
9336 it to detect circularity. Use `enclosing' as an argument to
9337 `lookup_cl.' Free the hash table when done.
9338
9339 2001-06-19 Tom Tromey <tromey@redhat.com>
9340
9341 * lex.c (java_read_char): Disallow invalid and overlong
9342 sequences. Fixes PR java/2319.
9343
9344 2001-06-05 Jeff Sturm <jsturm@one-point.com>
9345
9346 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
9347
9348 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
9349
9350 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
9351 arguments accordingly.
9352
9353 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
9354
9355 * gcj.texi: Move contents to just after title page.
9356
9357 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
9358
9359 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
9360 builtin type.
9361 (patch_incomplete_class_ref): Build the class ref, build the class
9362 init if necessary, complete the tree.
9363 Fixes PR java/2605
9364
9365 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
9366
9367 * parse.y (lookup_field_wrapper): Test `name' code.
9368 (resolve_qualified_expression_name): Test `qual_wfl' code.
9369 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
9370 handle `qual_wfl' by code.
9371 (maybe_build_primttype_type_ref): Test `wfl' code.
9372
9373 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9374
9375 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
9376 fdl.texi.
9377 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
9378 the dvi file in the java directory.
9379
9380 2001-05-25 Sam TH <sam@uchicago.edu>
9381
9382 * gen-table.pl javaop.h jcf.h lex.h,
9383 parse.h: Fix header include guards.
9384
9385 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
9386
9387 * jv-scan.c (version): Update copyright year.
9388
9389 2001-05-21 Per Bothner <per@bothner.com>
9390
9391 * jcf-parse.c (read_class): If class is from .class or .zip file
9392 and it's already been read, don't push/pop parser context.
9393
9394 2001-05-18 Per Bothner <per@bothner.com>
9395
9396 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
9397 command line so the jvgenmain-generated main program comes first.
9398
9399 2001-05-15 Tom Tromey <tromey@redhat.com>
9400
9401 * class.c (build_utf8_ref): Don't generate identifier based on
9402 utf8const contents.
9403
9404 2001-05-12 Richard Henderson <rth@redhat.com>
9405
9406 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
9407 * expr.c (java_lang_expand_expr): Expand it.
9408 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
9409 calling build_exception_object_ref.
9410 * parse.y (catch_clause_parameter): Likewise.
9411 (build_dot_class_method): Likewise.
9412 (try_reference_assignconv): Likewise.
9413 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
9414 * jcf-write.c (generate_bytecode_insns): Likewise.
9415
9416 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9417
9418 * parse.y (build_unresolved_array_type): Set
9419 EXPR_WFL_QUALIFICATION on the newly created wfl.
9420 Fixes PR java/2538. Fixes PR java/2535.
9421
9422 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9423
9424 * parse.y (fix_constructors): Removed unnecessary assignment to
9425 local. Moved assignment to `this$<n>', fixed comments and
9426 indentation.
9427 (build_wfl_wrap): Fixed indentation.
9428 Fixes PR java/2598, java/2579 and java/2658.
9429
9430 2001-05-03 Mo DeJong <mdejong@redhat.com>
9431
9432 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
9433 check for byte swap.
9434
9435 2000-05-02 Jeff Sturm <jsturm@one-point.com>
9436
9437 * expr.c (build_class_init): Move MODIFY_EXPR
9438 outside of COND_EXPR. Remove variable `call'.
9439
9440 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9441
9442 * decl.c: NULL_PTR -> NULL.
9443 * jcf-write.c: Likewise.
9444
9445 2001-05-01 Tom Tromey <tromey@redhat.com>
9446
9447 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
9448 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
9449 * gcj.texi: Updated copyright text. Include fdl.texi.
9450 (Top): Link to new node.
9451
9452 2001-05-01 Per Bothner <per@bothner.com>
9453
9454 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
9455
9456 2001-05-01 Per Bothner <per@bothner.com>
9457
9458 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
9459 import_list contains the name, not the TREE_PURPOSE.
9460
9461 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9462
9463 * jcf-io.c (read_zip_member): Cast to long in comparison with
9464 signed value.
9465
9466 * jvspec.c (lang_specific_driver): Initialize variables.
9467
9468 * mangle.c (find_compression_record_match): Likewise.
9469
9470 * typeck.c (build_null_signature): Provide static prototype. Mark
9471 parameter with ATTRIBUTE_UNUSED.
9472
9473 * verify.c (verify_jvm_instructions): Initialize variable.
9474
9475 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9476
9477 * parse.y (do_resolve_class): Check for cyclic inheritance during
9478 inner class resolution.
9479
9480 2001-04-27 Per Bothner <per@bothner.com>
9481
9482 * parse.y (java_expand_classes): Don't change ctxp_for_generation
9483 while iterating, since that could cause gc to lose stuff.
9484
9485 2001-04-26 Per Bothner <per@bothner.com>
9486
9487 Fix method search wrt scope of inner classes to match JLS2.
9488 * typeck.c (build_null_signature): New static function.
9489 (has_method): New function. Uses build_null_signature and lookup_do.
9490 * java-tree.h (has_method): New declaration.
9491 * parse.y (find_applicable_accessible_methods_list): Do not search
9492 context of inner classes here.
9493 (patch_method_invocation): Search scope, ie. current and outer clases,
9494 for method matching simple name, to find class.
9495
9496 2001-04-26 Per Bothner <per@bothner.com>
9497
9498 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
9499 Fix thinko: If a single case, use if_icmpeq, not ifeq.
9500
9501 * constants.c (find_methodref_with_class_index): New function.
9502 (find_methodref_index): Use find_methodref_with_class_index.
9503 * java-tree.h (find_methodref_with_class_index): New declaration.
9504 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
9505 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
9506 If context changed from interface to class, don't use invokeinterface.
9507
9508 2001-04-25 Per Bothner <per@bothner.com>
9509
9510 * verify.c (verify_jvm_instructions): For field instructions,
9511 check that field index is valid. For invoke instructions, check that
9512 method index is valid.
9513
9514 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
9515
9516 * config-lang.in (target_libs): Copy from $libgcj_saved.
9517
9518 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9519
9520 * decl.c (init_decl_processing): Add new class "protectionDomain"
9521 field.
9522 * class.c (make_class_data): Set initial value for "protectionDomain".
9523
9524 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9525
9526 * jvspec.c (lang_specific_driver): Fix memory allocation
9527 deficit, by using concat in lieu of xmalloc/sprintf.
9528
9529 2001-04-20 Per Bothner <per@bothner.com>
9530
9531 Fixes to compile multiple .class files at once.
9532 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
9533 * java-tree.h (CLASS_PARSED_P): New macro.
9534 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
9535 * jcf-parse.c (jcf_parse_source): Inline into read_class.
9536 (read_class): Avoid some code duplication.
9537 Don't call JCF_FINISH for a .class file - might be needed later.
9538 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
9539 rather than CLASS_LOADED_P, since latter implies class laid out.
9540 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
9541 * parse.y: Don't need to set CLASS_LOADED_P for array types.
9542
9543 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9544
9545 * Make-lang.in (java/boehm.o): Depend on toplev.h.
9546
9547 * boehm.c: Include toplev.h.
9548
9549 2001-04-06 Tom Tromey <tromey@redhat.com>
9550 Alexandre Petit-Bianco <apbianco@redhat.com>
9551
9552 Fix for PR gcj/1404 and PR gcj/2332:
9553 * parse.y (build_array_from_name): If we use the type_wfl then
9554 accumulate dimensions from the original type as well.
9555 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
9556
9557 2001-04-06 Tom Tromey <tromey@redhat.com>
9558
9559 * parse.y (analyze_clinit_body): Return true if the second operand
9560 of a METHOD_EXPR is nonzero.
9561
9562 2001-04-06 Tom Tromey <tromey@redhat.com>
9563
9564 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
9565 directory.
9566 ($(srcdir)/java/parse.c): Likewise.
9567
9568 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
9569
9570 * gcj.texi: Use `which-gcj' instead of `which-g77.'
9571 (version-gcc): Initialized.
9572 (which-gcj): Likewise.
9573
9574 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
9575
9576 * java-tree.h (struct lang_decl): New macro
9577 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
9578 * parse.y (build_instance_initializer): New function.
9579 (add_instance_initializer): Use it.
9580 (java_fix_constructors): Set `current_class' before fix pass.
9581 (fix_constructors): Just return if already fixed. Move `super()'
9582 invocation ahead. Use `build_instance_initializer.'
9583 Fixes PR java/1315.
9584
9585 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
9586
9587 * parse.y (resolve_qualified_expression_name): Pass field's
9588 DECL_CONTEXT to `not_accessible_p.'
9589 (not_accessible_p): Changed parameters order in `inherits_from_p'
9590 invocation.
9591
9592 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
9593
9594 * lang-options.h: Add flag_check_references.
9595
9596 2001-04-04 Per Bothner <per@bothner.com>
9597
9598 * java-tree.h (CONSTANT_VALUE_P): New macro.
9599 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
9600 * parse.y (maybe_build_class_init_for_field): New static function.
9601 (resolve_expression_name, resolve_field_access): Use
9602 maybe_build_class_init_for_field instead of build_class_init
9603 This does not do the init if the field is compile-time-constant.
9604 (resolve_field_access): Simplify.
9605
9606 * parse.y (fold_constant_for_init): Merge test into switch.
9607
9608 2001-04-03 Zack Weinberg <zackw@stanford.edu>
9609
9610 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
9611 on gansidecl.h.
9612 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
9613
9614 2001-04-02 Zack Weinberg <zackw@stanford.edu>
9615
9616 * expr.c (pop_type_0): Save the result of the first
9617 lang_printable_name call in a scratch buffer, so it
9618 won't be clobbered by the second call.
9619
9620 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
9621
9622 * parse-scan.y (array_type:): Rewritten.
9623 (type_declaration:): `empty_statement' replaces `SC_TK.'
9624 (class_member_declaration:): `empty statement' added.
9625 (method_body:): Simplified.
9626 (static_initializer:): Likewise.
9627 (primary_no_new_array:): Use `type_literals.'
9628 (type_literals:): New rule.
9629 (dims:): Set and update `bracket_count.'
9630 Fixes PR java/1074. Fixes PR java/2412.
9631
9632 2001-03-28 Hans Boehm <boehm@acm.org>
9633
9634 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
9635 (get_boehm_type_descriptor): Set type on returned value to be a
9636 pointer length integer.
9637
9638 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9639
9640 * expr.c (pop_type_0): Call `concat' rather than building the
9641 string manually.
9642 (pop_type): Add format specifier in call to `error'.
9643
9644 * parse.y (patch_method_invocation): Avoid casting away
9645 const-ness.
9646
9647 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
9648
9649 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
9650
9651 2001-03-28 Richard Henderson <rth@redhat.com>
9652
9653 IA-64 ABI Exception Handling:
9654 * Make-lang.in (except.o): Don't depend on eh-common.h.
9655 * check-init.c (check_init): Handle EXC_PTR_EXPR.
9656 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
9657 [soft_exceptioninfo_call_node]: Remove.
9658 [eh_personality_libfunc, lang_eh_runtime_type]: New.
9659 (end_java_method): No emit_handlers.
9660 * except.c (java_set_exception_lang_code): Remove.
9661 (method_init_exceptions): Don't call it.
9662 (prepare_eh_table_type): No CATCH_ALL_TYPE.
9663 (build_exception_object_ref): New.
9664 (expand_end_java_handler): Update for except.h name changes.
9665 (emit_handlers, expand_resume_after_catch): Remove.
9666 * expr.c (java_lang_expand_expr): Update for except.h name changes.
9667 (process_jvm_instruction): Use build_exception_object_ref.
9668 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
9669 (soft_exceptioninfo_call_node): Remove.
9670 (build_exception_object_ref): Declare.
9671 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
9672 soft_exceptioninfo_call_node. Move processing ...
9673 [EXC_PTR_EXPR]: ... here.
9674 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
9675 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
9676 (source_end_java_method): No java_set_exception_lang_code or
9677 emit_handlers.
9678 (build_dot_class_method): Use build_exception_object_ref.
9679 (try_reference_assignconv): Check EXC_PTR_EXPR not
9680 soft_exceptioninfo_call_node.
9681
9682 2001-03-28 Richard Henderson <rth@redhat.com>
9683
9684 * java-tree.h (throw_node): Define as a single member of
9685 java_global_trees instead of a separate array.
9686 (JTI_THROW_NODE): New.
9687 * decl.c (throw_node): Don't declare.
9688 (init_decl_processing): Init a scalar throw_node.
9689 Don't register it for gc.
9690 * check-init.c (check_init): Reference scalar throw_node.
9691 * expr.c (build_java_athrow): Likewise.
9692 * jcf-write.c (generate_bytecode_insns): Likewise.
9693 * parse.h (BUILD_THROW): Likewise.
9694
9695 2001-03-28 Richard Henderson <rth@redhat.com>
9696
9697 * decl.c (end_java_method): Do not save and restore
9698 flag_non_call_exceptions.
9699 * parse.y (source_end_java_method): Likewise.
9700 * lang.c (flag_exceptions): Don't declare.
9701 (java_init_options): Set flag_non_call_exceptions. Set
9702 flag_exceptions here ...
9703 (java_init): ... not here.
9704
9705 2001-03-27 Richard Henderson <rth@redhat.com>
9706
9707 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
9708 exceptions_via_longjmp.
9709
9710 * lang.c (flag_new_exceptions): Don't declare it.
9711 (java_init_options): Or set it.
9712
9713 2001-03-27 Richard Henderson <rth@redhat.com>
9714
9715 * decl.c (end_java_method): Rename asynchronous_exceptions to
9716 flag_non_call_exceptions.
9717 * parse.y (source_end_java_method): Likewise.
9718
9719 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9720
9721 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9722
9723 2001-03-26 Mark Mitchell <mark@codesourcery.com>
9724
9725 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
9726
9727 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
9728
9729 * parse.y (find_as_inner_class): Follow current package
9730 indications not to mistakingly load an unrelated class.
9731
9732 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9733
9734 * constants.c (PUTN): Use memcpy, not bcopy.
9735
9736 * lex.c (java_read_char): Use memmove, not bcopy.
9737
9738 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
9739
9740 2001-03-23 Per Bothner <per@bothner.com>
9741
9742 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
9743 macro for better error pin-pointing.
9744 * java-tree.h: Fix typo in comment.
9745
9746 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
9747 Don't include jsr/goto in exception range.
9748 Check if start and end of exception range are the same (also TRY_EXPR).
9749 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
9750 However, do emit the following goto even if try_block is empty.
9751 Defer freeing exception_decl until after the finalizer, to make
9752 sure the local isn't reused in the finalizer. Fixes PR java/1208.
9753
9754 * parse.y (java_complete_lhs): If the try-clause is empty, just
9755 return the finally-clause and vice versa.
9756
9757 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
9758
9759 * gcj.texi (Input Options): documented the check for attribute
9760 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
9761 * java-tree.h (flag_force_classes_archive_check): Declared extern.
9762 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
9763 (jcf_parse): Check for the right classes archive if necessary.
9764 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
9765 (jcf_parse_fields): Fixed indentation.
9766 * jcf-write.c (append_gcj_attribute): New function.
9767 (generate_classfile): Compute the attribute count, invoke
9768 `append_gcj_attribute'.
9769 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
9770 turned into bit-fields. New bit-field `right_zip.'
9771 (JCF_ZERO): Set `right_zip' to zero.
9772 * lang-options.h (-fforce-classes-archive-check): Added flag.
9773 * lang.c (flag_force_classes_archive_check): New flag.
9774 (lang_f_options): New entry `force-classes-archive-check.'
9775 Fixes PR java/1213.
9776
9777 2001-02-07 Andrew Haley <aph@redhat.com>
9778
9779 * gcj.texi (Configure-time Options): Add -fcheck-references.
9780 * expr.c (build_java_indirect_ref): New function.
9781 (java_check_reference): New function.
9782 (build_java_array_length_access): Use build_java_indirect_ref to
9783 check for null references.
9784 (build_java_arrayaccess): Likewise.
9785 (build_get_class): Likewise.
9786 (build_field_ref): Likewise.
9787 (invoke_build_dtable): Likewise.
9788 (build_invokeinterface): Likewise.
9789 * lang.c (lang_f_options): Add flag_check_references.
9790 * jvspec.c (jvgenmain_spec): Add flag_check_references.
9791 * java-tree.h (flag_check_references): New variable.
9792 * lang.c (flag_check_references): Likewise.
9793 * parse.y (patch_invoke): Use java_check_reference.
9794 (patch_assignment): Allow for extra nesting in
9795 _Jv_CheckArrayStore.
9796
9797 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
9798
9799 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
9800 * lex.c (cxx_keywords): Likewise.
9801
9802 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
9803
9804 * parse.y (qualify_ambiguous_name): Broaden `length'
9805 recognition. Help MODIFY_EXPR be resolved as expression names.
9806 Fixes PR java/2066. Fixes PR java/2400.
9807
9808 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
9809
9810 * gjavah.c (process_file): Mark interface definitions with
9811 "__attribute__ ((java_interface))".
9812
9813 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
9814
9815 * class.c (layout_class): Fixed push_super_field's second
9816 argument. Fixes PR java/2333.
9817 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
9818 too early to lay innerclasses out.
9819
9820 2001-03-20 Tom Tromey <tromey@redhat.com>
9821 Alexandre Petit-Bianco <apbianco@redhat.com>
9822
9823 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
9824 inside an array reference. Insertion of the array store check
9825 rewritten. Fixes PR java/2299.
9826
9827 2001-03-20 Tom Tromey <tromey@redhat.com>
9828
9829 * lex.c (java_read_unicode): Only accept leading `u's.
9830
9831 2001-03-20 Tom Tromey <tromey@redhat.com>
9832
9833 * jcf-parse.c (read_class): Initialize `class'.
9834
9835 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
9836
9837 * jcf_parse.c (jcf_parse): Eliminate unused variable.
9838
9839 2001-03-19 Mark Mitchell <mark@codesourcery.com>
9840
9841 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
9842 (layout_class): Likewise.
9843 (layout_class_method): Likewise.
9844 (emit_register_classes): Likewise.
9845 * decl.c (builtin_function): Likewise.
9846 (give_name_to_locals): Likewise.
9847
9848 2001-03-19 Per Bothner <per@bothner.com>
9849
9850 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
9851 before trying to load an inner class.
9852
9853 Fixes to process to command-line .class files in two passes.
9854 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
9855 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
9856 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
9857 * class.c (is_compiled_class): Fix for renamed flag.
9858 * parse.y (maybe_create_class_interface_decl): Likewise.
9859 * jcf-parse.c (yyparse): Also set if compiling .class files.
9860 * jcf-parse.c (read_class); Read current_class.
9861 (jcf_parse): Make static.
9862 (load_inner_classes): New function, with code moved from jcf_parse,
9863 because we need to inner classes after the command-line files are read.
9864 (yyparse): Set finput to NULL when it doesn't need to be closed.
9865 Reduce use of main_jcf (basically only for archive) and
9866 use finput instead of main_jcf->read_state.
9867 Inline jcf_figure_file_type into yyparse.
9868 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
9869 Defer load_inner_classes and parse_class_file to a second pass,
9870 after we've correctly mapped command-line .clas fiels to classes.
9871 (jcf_figure_file_type): Removed.
9872 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
9873 (JCF_ZERO): Also clear zipd field.
9874 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
9875
9876 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
9877
9878 * jcf-parse.c (yyparse): Change ch from char * to char.
9879
9880 2001-03-19 Per Bothner <per@bothner.com>
9881
9882 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
9883 Add constructed filelist-file at end, following -xjava. Thus any .o
9884 and library files are not affected by the -xjava. Also wrap
9885 explicit @FILE with -xjava and -xnone.
9886
9887 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
9888
9889 * class.c (build_static_field_ref): Call make_decl_rtl() after
9890 setting the DECL_EXTERNAL flag.
9891
9892 2001-03-17 Per Bothner <per@bothner.com>
9893
9894 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
9895
9896 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
9897 when result is is needed (target is STACK_TARGET).
9898
9899 * parse.h (JDEP_SOLV): Removed.
9900 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
9901
9902 * parse.y (incomplete_class_list): Removed.
9903 (obtain_incomplete_type): Don't use or set incomplete_class_list.
9904 It doesn't work if resolve_class changes the name of an array type
9905 that is on the list and then someone else looks for the modified name.
9906 Also, seems liable to break when compiling multiple source files at
9907 once. So the simplest is to just remove incomplete_class_list -
9908 it is only a minor space win and it is not even clear it saves time.
9909
9910 * parse.y (resolve_class): Remove unneeded promote_type.
9911
9912 2001-03-15 Per Bothner <per@bothner.com>
9913
9914 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
9915 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
9916 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
9917 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
9918
9919 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
9920 * parse.y (java_expand_classes): Likewise.
9921
9922 * parse.y (expand_start_java_method): Was only called once and had a
9923 misleading name, so inline in caller java_complete_expand_method.
9924 (enter_a_block): Likewise inline in enter_block and remove.
9925
9926 Remove junk from when gcc/java was created (by copying from C/C++).
9927 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
9928 (struct binding_level): Remove fields keep, keep_if_subblocks,
9929 more_cleanups_ok, have_cleanups (which have never been used).
9930 (pushlevel, poplevel): Remove related useless code.
9931
9932 * class.c (make_class_data): The class_dtable_decl (i.e. the
9933 vtable for Class) should be external, except when compiling Class.
9934
9935 * jvspec.c (lang_specific_driver): Fix -C handling.
9936 Check -save-temps to see if temp @FILE should be deleted.
9937 Follow-up to/fix for February 16 patch.
9938
9939 * verify.c (verify_jvm_instructions): Better error msgs for dup.
9940 (type_stack_dup): Remove no-longer neded error check.
9941
9942 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
9943
9944 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
9945 to 'for_pointer'. If this type is for a pointer (argument) mangling,
9946 don't surround the element with 'N..E' if the type name is
9947 unqualified.
9948
9949 2001-03-14 Mark Mitchell <mark@codesourcery.com>
9950
9951 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
9952 DECL_RTL_SET_P, etc.
9953 (make_method_value): Likewise.
9954 (get_dispatch_table): Likewise.
9955
9956 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9957
9958 2001-03-07 Tom Tromey <tromey@redhat.com>
9959
9960 * config-lang.in (lang_requires): Define.
9961
9962 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
9963
9964 * typeck.c (convert): Check flag_unsafe_math_optimizations,
9965 not flag_fast_math.
9966
9967 2001-03-05 Per Bothner <per@bothner.com>
9968
9969 Fix a problem where rest_of_decl_compilation applied to
9970 class_dtable_decl causes problems because it was done too early,
9971 before output file was opened.
9972 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
9973 * class.c (class_dtable_decl): Add macro - element of class_roots.
9974 (make_class_data): Define class_dtable_decl.
9975 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
9976
9977 2001-03-01 Zack Weinberg <zackw@stanford.edu>
9978
9979 * java/class.c, java/decl.c, java/java-tree.h: Replace all
9980 uses of 'boolean' with 'bool'.
9981
9982 2001-03-01 Zack Weinberg <zackw@stanford.edu>
9983
9984 * lang-specs.h: Add zero initializer for cpp_spec field to all
9985 array elements.
9986
9987 2001-02-16 Per Bothner <per@bothner.com>
9988
9989 Handle compiling multiple input files at once, and @FILE syntax.
9990 * gcj.texi: Updated documentation to match.
9991 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
9992 * jcf-parse.c (parse_source_file): Split into ...
9993 (parse_source_file_1): New function - and:
9994 (parse_source_file_2): New function.
9995 (yyparse): On -ffilelist-file, open and scan named file.
9996 On first pass over files, only do parse_source_file_1.
9997 A new second pass calls parse_source_file_2 for each file to compile.
9998 (init_jcf_parse): Call init_src_parse.
9999 * jvspec.c (INDIRECT_FILE_ARG): New flag.
10000 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
10001 as multiple input file combined in one compilation.
10002 * lang-options.h: Add -ffilelist-file
10003 * lang.c (flag_filelist_file): New flag variable.
10004 (lang_f_options): Handle -ffilelist-file.
10005 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
10006 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
10007 gclass_list - use global fields of src_parse_roots instead.
10008 * parse.y (src_parse_roots): New array.
10009 (incomplete_class_list, gclass_list): New macros.
10010 (push_parser_context, java_pop_parser_context,
10011 java_parser_context_resume): Don't fiddle with deleted fields.
10012 (various): Use incomplete_class gclass_list and global macros
10013 instead of parse_ctxt fields - the lists are global.
10014 (init_src_parse): New function.
10015
10016 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10017
10018 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
10019
10020 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10021
10022 * parse.y (check_inner_class_access): Moved declaration of local
10023 `enclosing_decl_type' to the right location.
10024
10025 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
10026
10027 * parse.y (parser_check_super_interface): Don't call
10028 check_pkg_class_access for an inner interface.
10029 (parser_check_super): Don't call check_pkg_class_access for inner
10030 class.
10031 (do_resolve_class): Simplify enclosing type loop. Don't call
10032 check_pkg_class_access if CL and DECL are not set.
10033 (find_in_imports_on_demand): Set DECL if class_type needed to be
10034 loaded. Don't call check_pkg_class_access for an inner class.
10035 (check_inner_class_access): Rewritten to implement member access
10036 rules as per spec 6.6.1.
10037 (check_pkg_class_access): Handle the empty package correctly.
10038 (in_same_package): New function. Determine if two classes are in the
10039 same package.
10040
10041 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
10042
10043 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
10044 method into array types.
10045 * parse.y (patch_method_invocation): Bypass access check on clone call
10046 to array instance.
10047
10048 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
10049
10050 * expr.c (build_instanceof): Check for arrays when trying fold to
10051 false.
10052
10053 2001-02-15 Jim Meyering <meyering@lucent.com>
10054
10055 * Make-lang.in (java.install-common): Depend on `installdirs'.
10056 (java.install-info): Likewise.
10057
10058 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
10059
10060 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
10061
10062 2001-02-14 Tom Tromey <tromey@redhat.com>
10063 Alexandre Petit-Bianco <apbianco@cygnus.com>
10064
10065 Fix for PR java/1261.
10066 * typeck.c (build_java_array_type): Add public `clone' method to
10067 arrays.
10068 * parse.y (resolve_qualified_expression_name): Use current_class
10069 when checking for inaccessibility.
10070 (patch_method_invocation): Fixed error message when accessibility
10071 denied. Added `from_super' argument.
10072
10073 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
10074
10075 * parse.y (resolve_class): Don't build a fake decl. Use the one
10076 already built.
10077 * typeck.c (build_java_array_type): Build and assign decl to array
10078 type.
10079
10080 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
10081
10082 * parse.y (not_accessible_p): Changed leading comment. Added extra
10083 `where' argument. Use it to enforce protected access rules.
10084 (resolve_qualified_expression_name): Added extra argument to
10085 not_accessible_p.
10086 (patch_method_invocation): Use argument `primary' to provide
10087 not_accessible_p with an extra argument.
10088 (lookup_method_invoke): Added extra argument to not_accessible_p.
10089 (search_applicable_method_list): Likewise.
10090
10091 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10092
10093 * parse.y (resolve_qualified_expression_name): Try to resolve as
10094 an inner class access only if `decl' is a TYPE_DECL.
10095
10096 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
10097
10098 * decl.c (classdollar_identifier_node): Initialize.
10099 * java-tree.h (enum java_tree_index): New entry
10100 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
10101 (classdollar_identifier_node): New macro.
10102 (ID_CLASSDOLLAR_P): Likewise.
10103 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
10104 (build_dot_class_method_invocation): Likewise.
10105 (find_applicable_accessible_methods_list): `class$' can't be
10106 inherited.
10107
10108 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
10109
10110 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
10111
10112 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10113
10114 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
10115 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
10116 gone.
10117
10118 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10119
10120 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
10121 outside of the `__U' sequence too.
10122 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
10123 sequence too.
10124
10125 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10126
10127 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
10128
10129 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
10130
10131 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
10132 (JVGENMAIN_OBJS): Likewise.
10133 * java-tree.h (append_gpp_mangled_name): New prototype.
10134 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
10135 Removed cast calling `gcc_add_root.'
10136 * jvgenmain.c (mangle_obstack): New global, initialized.
10137 (main): Use it.
10138 (do_mangle_class): Constify local `ptr.'
10139 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
10140 append_gpp_mangle_name and update `count' if necessary.
10141 Use `mangle_obstack.'
10142 * mangle.c (append_unicode_mangled_name): Removed.
10143 (append_gpp_mangled_name): Likewise.
10144 (unicode_mangling_length): Likewise.
10145 (mangle_member_name): Return type set to `void.'
10146 (mangle_field_decl): Don't append `U' in escaped names.
10147 (mangle_method_decl): Likewise.
10148 (mangle_member_name): Just use `append_gpp_mangled_name.'
10149 * mangle_name.c: New file.
10150
10151 2001-02-07 Per Bothner <per@bothner.com>
10152
10153 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
10154
10155 * check-init.c (check_init): Don't call done_alternative after
10156 processing loop code, as a LOOP_EXPR never terminates normally.
10157
10158 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
10159
10160 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
10161
10162 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10163
10164 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
10165 DECLs.
10166
10167 2001-02-06 Tom Tromey <tromey@redhat.com>
10168
10169 * lex.c (java_new_lexer): Longer error message.
10170
10171 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
10172 Alexandre Petit-Bianco <apbianco@cygnus.com>
10173
10174 * typeck.c (build_prim_array_type): Added leading comment.
10175 (build_java_array_type): Moved locals out of
10176 block. Always create the `data' field, fixed alignment to match
10177 C++.
10178
10179 2001-02-04 Tom Tromey <tromey@redhat.com>
10180
10181 * expr.c (java_lang_expand_expr): Don't bother recomputing
10182 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
10183 Fixes PR java/1866.
10184
10185 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
10186
10187 * parse.y (process_imports): Save the original name of the import
10188 for better error report.
10189
10190 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
10191
10192 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
10193 of macros used when compiling jvspec.c.
10194 * jvspec.c (lang_specific_driver): Link with the shared
10195 libgcc by default.
10196
10197 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10198
10199 * check-init.c (check_init): Call internal_error instead of fatal.
10200 * expr.c (java_lang_expand_expr): Likewise.
10201 * jcf-parse.c (get_constant): Likewise.
10202 * mangle.c (java_mangle_decl): Likewise.
10203 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
10204 (operator_string): Likewise.
10205 * check-init.c (check_init): Call abort instead of fatal.
10206 * class.c (build_class_ref): Likewise.
10207 * constants.c (write_constant_pool): Likewise.
10208 * decl.c (start_java_method): Likewise.
10209 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
10210 (java_stack_dup, encode_newarray_type): Likewise.
10211 (build_java_array_length_access): Likewise.
10212 (build_java_check_indexed_type, expand_java_pushc): Likewise.
10213 (build_java_soft_divmod, build_invokeinterface): Likewise.
10214 * java-tree.h (INNER_CLASS_P): Likewise.
10215 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
10216 (give_name_to_class, get_class_constant): Likewise.
10217 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
10218 (find_constant_index, generate_bytecode_conditional): Likewise.
10219 (generate_bytecode_insns, perform_relocations): Likewise.
10220 * lex.c (java_unget_unicode, java_lex): Likewise.
10221 * mangle.c (mangle_type, mangle_record_type): Likewise.
10222 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
10223 (finish_mangling): Likewise.
10224 * parse.h (MARK_FINAL_PARMS): Likewise.
10225 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
10226 (obtain_incomplete_type, java_complete_class): Likewise.
10227 (java_check_regular_methods, java_complete_expand_method): Likewise.
10228 (cut_identifier_in_qualified, check_deprecation): Likewise.
10229 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
10230 (java_complete_lhs, lookup_name_in_blocks): Likewise.
10231 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
10232 * typeck.c (set_local_type, parse_signature_type): Likewise.
10233 (parse_signature_string, build_java_signature): Likewise;
10234 (set_java_signature): Likewise.
10235 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
10236 * class.c (add_method): Call fatal_error instead of fatal.
10237 (build_static_field_ref): Likewise.
10238 * expr.c (build_known_method_ref, expand_invoke): Likewise.
10239 * jcf-parse.c (get_constant, jcf_parse): Likewise.
10240 * lex.c (java_new_new_lexer): Likewise.
10241 * jv-scan.c (main): Likewise.
10242 (fatal_error): Renamed from fatal.
10243 * jcf-parse.c (yyparse): Call fatal_io_error instead of
10244 pfatal_with_name.
10245 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
10246 (yyparse): Likewise.
10247 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
10248 * lex.c (java_get_line_col): Likewise.
10249 * jcf-parse.c (load_class): Make errors non-fatal.
10250 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
10251
10252 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
10253
10254 * jvgenmain.c (class_mangling_suffix): Remove unused string.
10255 (error): Remove unused function.
10256 (main): Don't use "__attribute__ alias" on generated class symbol.
10257
10258 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
10259
10260 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
10261 argument.
10262 * parse.y (finish_method_declaration): Code accounting for WFLed
10263 method DECL_NAMEs deleted.
10264 (check_abstract_method_definitions): Likewise.
10265 (resolve_type_during_patch): Layout resolved type.
10266 * typeck.c (lookup_do): Removed unused local.
10267
10268 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
10269
10270 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
10271 * decl.c (init_decl_processing): Use integer_minus_one_node, not
10272 integer_negative_one_node.
10273 * expr.c (build_java_binop): Likewise.
10274
10275 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
10276
10277 * zextract.c (read_zip_archive): Read file_offset before writing
10278 zipd and consequently clobbering the header contents.
10279
10280 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10281
10282 * Make-lang.in: Remove all dependencies on defaults.h.
10283 * decl.c: Don't include defaults.h.
10284 * expr.c: Likewise.
10285 * parse.y: Likewise.
10286
10287 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10288
10289 * ChangeLog (2001-01-21): Fixed typo.
10290 * class.c (layout_class_method): Code accounting for WFLed
10291 method DECL_NAMEs deleted.
10292 * constant.c (find_methodref_index): Likewise.
10293 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
10294 * java-tree.h (DECL_FUNCTION_WFL): New macro.
10295 (struct lang_decl): New field `wfl'.
10296 (java_get_real_method_name): Prototype deleted.
10297 * mangle.c (mangle_method_decl): Code accounting for WFLed
10298 method DECL_NAMEs deleted.
10299 * parse.h (GET_METHOD_NAME): Macro deleted.
10300 * parse.y (reset_method_name): Deleted.
10301 (method_header): Set DECL_FUNCTION_WFL.
10302 (check_abstract_method_header): Code accounting for WFLed method
10303 DECL_NAMEs deleted.
10304 (java_get_real_method_name): Deleted.
10305 (check_method_redefinition): Code accounting for WFLed method
10306 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
10307 (java_check_regular_methods): Likewise.
10308 (java_check_abstract_methods): Likewise.
10309 (java_expand_classes): Don't call `reset_method_name.'
10310 (search_applicable_method_list): Use DECL_NAMEs instead of
10311 GET_METHOD_NAME.
10312 * typeck.c (lookup_do): Code accounting for WFLed method
10313 DECL_NAMEs deleted.
10314
10315 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
10316
10317 * lex.c (java_read_char): Check for EOF from getc first.
10318
10319 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10320
10321 * class.c (layout_class): Don't lay the superclass out if it's
10322 already being laid out.
10323 * jcf-parse.c (handle_innerclass_attribute): New function.
10324 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
10325 handle_innerclasses_attribute.
10326 (jcf_parse): Don't load an innerclasses if it's already being
10327 laid out.
10328 * jcf-write.c (append_innerclass_attribute_entry): Static
10329 `anonymous_name' and its initialization deleted. `ocii' and `ini'
10330 to be zero for anonymous classes.
10331
10332 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10333
10334 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
10335 necessary.
10336 * jcf-parse.c (set_source_filename): Use
10337 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
10338
10339 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10340
10341 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
10342 gets a unique asm name.
10343
10344 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10345
10346 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
10347 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10348 if necessary.
10349 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
10350 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
10351 * parse.y (lookup_package_type_and_set_next): Deleted.
10352 (resolve_package): Removed unnecessary code.
10353 (find_applicable_accessible_methods_list): `finit$' can't be
10354 inherited.
10355 * verify.c (pop_argument_types): Added missing prototype.
10356
10357 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
10358
10359 * config-lang.in: Disable java by default.
10360
10361 2001-01-23 Tom Tromey <tromey@redhat.com>
10362
10363 * gcj.texi (Copying): New node.
10364 Added copyright information.
10365
10366 2001-01-21 Per Bothner <per@bothner.com>
10367
10368 Various fixes to allow compiling a compressed .jar/.zip archive.
10369 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
10370 (struct ZipFile): Add fields name and next (from ZipFileCache).
10371 (struct ZipDirectory): New field zipf points to owning ZipFile.
10372 * jcf.h (struct ZipDirectory): Add forward declaration.
10373 (struct JCF): Declare zipd field to have type struct ZipDirectory.
10374 Remove seen_in_zip and zip_offset fields.
10375 (JCF_SEEN_IN_ZIP): New macro.
10376 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
10377 * jcf-io.c: Change all ZipFileCache to ZipFile.
10378 (read_zip_member): New function.
10379 (open_in_zip): Call read_zip_member.
10380 * jcf-parse.c (find_in_current_zip): Remove function.
10381 (read_class): Merge in find_in_current_zip functionality.
10382 Call read_zip_member if needed.
10383 (parse_zip_file_entries): Use read_zip_member.
10384 (process_zip_dir): Update for removed and added JCF fields.
10385 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
10386
10387 2001-01-21 Per Bothner <per@bothner.com>
10388
10389 Minor optimization of static ggc roots.
10390 * jcf-parse.c (parse_roots): New static field.
10391 (current_field, current_method, current_file_list): Replace by macros
10392 naming fields of parse_roots.
10393 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
10394 * class.c (class_roots): New static field.
10395 (registered_class, fields_ident, info_ident, class_list):
10396 New macros naming fields of parse_roots.
10397 (build_static_field_ref): Don't register roots here.
10398 (layout_class): Static field list replaced by macro class_list.
10399 (init_class_processing): Call ggc_add_tree_root for 4 roots.
10400 Initialize fields_ident and info_ident here.
10401
10402 2001-01-21 Per Bothner <per@bothner.com>
10403
10404 * jcf-parse.c (ggc_mark_jcf): New function.
10405 (init_jcf_parse): Register current_jcf as ggc root.
10406
10407 2001-01-21 Per Bothner <per@bothner.com>
10408
10409 * lang.c (put_decl_node): Print method's name.
10410
10411 2001-01-21 Per Bothner <per@bothner.com>
10412
10413 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
10414 (verify_jvm_instructions): Use it, for better error messages on loads.
10415
10416 2001-01-21 Per Bothner <per@bothner.com>
10417
10418 * verify.c (merge_type_state): Still may have to merge even if
10419 LABEL_VERIFIED (label).
10420
10421 2001-01-21 Per Bothner <per@bothner.com>
10422
10423 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
10424 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
10425
10426 2001-01-19 Per Bothner <per@bothner.com>
10427
10428 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
10429 if expeting an interface type. Refines Tom's change of 2000-09-12.
10430
10431 2001-01-18 Per Bothner <per@bothner.com>
10432
10433 * gcj.texi (Input Options): Mention .java files.
10434
10435 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10436
10437 * lang-options.h (-Wunsupported-jdk11): Removed.
10438 * lang.c (flag_not_overriding): Deleted.
10439 (flag_static_local_jdk1_1): Likewise.
10440 (lang_W_options): Removed "unsupported-jdk11" entry.
10441 * parse.y (java_check_methods): Removed dead code.
10442
10443 2001-01-17 Tom Tromey <tromey@redhat.com>
10444
10445 Changes suggested by Per Bothner:
10446 * gcj.texi (Input Options): Don't mention input files.
10447 (Code Generation): Updated --main information.
10448 (Invoking jcf-dump): Mention that --javap is incomplete.
10449 From Alexandre Petit-Bianco:
10450 (Warnings): Don't mention -Wunsupported-jdk11.
10451 My stuff:
10452 (Compatibility): Mention JDK 1.2-ness of libraries.
10453 (Resources): Mention resources used when writing gcj.
10454
10455 2001-01-17 Tom Tromey <tromey@redhat.com>
10456
10457 * gcj.texi: New file.
10458 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
10459 (java.info): Depend on gcj.info.
10460 (java/gcj.dvi): New target.
10461 (java.dvi): Depend on gcj.dvi.
10462 (java.install-info): Wrote.
10463
10464 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
10465
10466 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
10467 having called make_decl_rtl.
10468
10469 2001-01-14 Per Bothner <per@bothner.com>
10470
10471 Various patches to emit better messages on verification errors.
10472 * expr.c (push_type_0): Return error indication on stack overflow,
10473 instead of callinfg fatal.
10474 (push_type): Now just call push_type_0 (nd fatal on overflow).
10475 (pop_type_0): Return detailed error message (in a char** argument).
10476 (pop_type): If pop_type_0 fails, print error message.
10477 (pop_argument_types): Moved to verify.c.
10478 * verify.c (pop_argument_types): Moved from expr.c.
10479 Return a (possible) error message, rather than void.
10480 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
10481 (verify_jvm_instruction): Use new macros, improving error messages.
10482 For case OPCODE_astore use object_ptr_type_node.
10483 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
10484 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
10485
10486 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
10487 constant, return body without wrapper. (Improves constant folding.)
10488 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
10489
10490 2001-01-13 Per Bothner <per@bothner.com>
10491
10492 * expr.c (expand_java_field_op): Assigning to a final field outside
10493 an initializer does not violate JVM spec, so should be warning, not
10494 error. (Sun's verifier does not complain - though MicroSoft's does.)
10495
10496 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
10497
10498 * gjavah.c (version), jcf-dump.c (version): Update copyright year
10499 to 2001.
10500
10501 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
10502
10503 * parse.y (resolve_expression_name): Permit instance variables from
10504 enclosing context in super constructor call.
10505 (resolve_qualified_expression_name): Permit enclosing class's qualified
10506 "this" in super constructor call.
10507
10508 2001-01-10 Mark Mitchell <mark@codesourcery.com>
10509
10510 * class.c (build_utf8_ref): Remove last argument in call to
10511 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10512 (build_class_ref): Likewise.
10513 (build_static_field_ref): Likewise.
10514 (get_dispatch_table): Likewise.
10515 (layout_class_method): Likewise.
10516 (emit_register_classes): Likewise.
10517 * constants.c (build_constant_data_ref): Likewise.
10518 * decl.c (builtin_function): Likewise.
10519 (create_primitive_vtable): Likewise.
10520 * expr.c (build_known_method_def): Likewise.
10521 (build_jni_stub): Likewise.
10522 (java_lang_expand_expr): Likewise.
10523
10524 2001-01-10 Tom Tromey <tromey@redhat.com>
10525
10526 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
10527
10528 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
10529
10530 * java-tree.h (lang_printable_name_wls): New prototype.
10531 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
10532 rather than `current_class' to print type name. Don't prepend type
10533 names when printing constructor names.
10534 (lang_printable_name_wls): New function.
10535 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
10536 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
10537 * parse.y (patch_method_invocation): Message tuned for constructors.
10538 (not_accessible_p): Grant `private' access from within
10539 enclosing contexts.
10540
10541 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10542
10543 All files with updated copyright when applicable.
10544 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
10545 * class.c (mangle_class_field): Function removed.
10546 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
10547 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
10548 (build_class_ref): Call `java_mangle_class_field' instead of
10549 `mangle_class_field.'
10550 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
10551 (layout_class): Call `java_mangle_decl' instead of
10552 `mangle_static_field.'
10553 (cxx_keywords): Initialized static array moved to `lex.c.'
10554 (layout_class_method): Changed leading comment. Simplified to
10555 call `java_mangle_decl.' Local `ptr' moved in for loop body.
10556 * decl.c (lang_mark_tree): Mark field `package_list.'
10557 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
10558 (struct lang_type): New field `package_list.'
10559 (unicode_mangling_length): Prototype removed.
10560 (append_gpp_mangled_name, append_gpp_mangled_classtype,
10561 emit_unicode_mangled_name): Likewise.
10562 (cxx_keyword_p): New prototype.
10563 (java_mangle_decl, java_mangle_class_field,
10564 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
10565 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
10566 `build_expr_wfl.'
10567 * jvgenmain.c (main_method_prefix): Global variable removed.
10568 (main_method_suffix): Likewise.
10569 (do_mangle_classname): New function.
10570 (main): Call it. Format changed to accommodate new mangling scheme.
10571 * lex.c: (utf8_cmp): Conditionally prototyped.
10572 (cxx_keywords): Moved from class.c, conditionally defined.
10573 (utf8_cmp, cxx_keyword_p): Likewise.
10574 * mangle.c (obstack.h, ggc.h): Included.
10575 (mangle_field_decl): New function.
10576 (mangle_method_decl, mangle_type, mangle_pointer_type,
10577 mangle_array_type, mangle_record_type,
10578 find_compression_pointer_match, find_compression_array_match,
10579 find_compression_record_match,
10580 find_compression_array_template_match, set_type_package_list,
10581 entry_match_pointer_p, emit_compression_string, init_mangling,
10582 finish_mangling, compression_table_add, mangle_member_name): Likewise.
10583 (mangle_obstack): New global.
10584 (MANGLE_RAW_STRING): New macro.
10585 (unicode_mangling_length): Turned static.
10586 (append_unicode_mangled_name): Renamed from
10587 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
10588 replaces `obstack', removed from the parameter list.
10589 (append_gpp_mangled_name): Turned static. `mangle_obstack'
10590 replaces parameter `obstack', removed from the parameter list. Call
10591 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
10592 (append_gpp_mangled_classtype): Removed.
10593 (compression_table, compression_next): New static variables.
10594 * parse.y (temporary_obstack): Extern declaration removed.
10595
10596 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
10597
10598 * parse.y (patch_binop): Compute missing type in error situations.
10599
10600 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
10601
10602 * class.c (make_class_data): Push initial value for "arrayclass".
10603 * decl.c (init_decl_processing): Add new class field "arrayclass".
10604
10605 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
10606
10607 From patha@softlab.ericsson.se:
10608 * parse.y (switch_label): Use build, not build1, to construct
10609 DEFAULT_EXPR.
10610
10611 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
10612
10613 * lang.c (lang_decode_option): Change -MA to -MP.
10614 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
10615 Update to new prototype; do quote targets.
10616 (jcf_dependency_write): Update.
10617
10618 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
10619
10620 Shorten primitive array allocation path:
10621 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
10622 to create new primitive arrays.
10623 * expr.c (build_newarray): If generating native code, call
10624 soft_newarray_node with a reference to the primitive TYPE identifier
10625 instead of type_value.
10626
10627 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
10628
10629 Fix for PRs gcj/312 and gcj/253:
10630 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
10631 dest if they arn't already.
10632 * class.c (layout_class): Call maybe_layout_super_class on
10633 superinterfaces also, but only if compiling from bytecode.
10634
10635 Fix for PR gcj/373:
10636 * parse.y (create_class): Set ACC_STATIC if class is declared in an
10637 interface.
10638
10639 2000-12-15 Tom Tromey <tromey@redhat.com>
10640
10641 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
10642 set.
10643
10644 2000-12-14 Andrew Haley <aph@redhat.com>
10645
10646 * boehm.c (mark_reference_fields): Change test to correctly detect
10647 bitmap overflow.
10648
10649 2000-12-15 Andreas Jaeger <aj@suse.de>
10650
10651 * config-lang.in (lang_dirs): Added.
10652
10653 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
10654
10655 * parse.y (end_artificial_method_body): Fixed undefined behavior.
10656 Credits go to rth for finding it.
10657
10658 2000-12-13 Mike Stump <mrs@wrs.com>
10659
10660 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
10661
10662 2000-11-07 Tom Tromey <tromey@cygnus.com>
10663
10664 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
10665 * lex.c (java_ignorable_control_p): Removed.
10666 (java_letter_or_digit_p): Removed.
10667 (java_start_char_p): New function.
10668 (java_read_char): Return `int', not `unicode_t'. Changed
10669 callers.
10670 (java_read_unicode): Likewise.
10671 (java_read_unicode_collapsing_terminators): Likewise.
10672 (java_get_unicode): Likewise.
10673 (java_new_lexer): Initialize hit_eof.
10674 (java_parse_end_comment): Take `int' argument.
10675 (java_parse_doc_section): Likewise.
10676 (java_parse_escape_sequence): Don't allow backlash-newline.
10677 Return `int'.
10678 * lex.h (JAVA_DIGIT_P): Removed.
10679 (_JAVA_LETTER_OR_DIGIT_P): Removed.
10680 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
10681 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
10682 (JAVA_PART_CHAR_P): New macro.
10683 (UEOF): Now -1.
10684 (JAVA_CHAR_ERROR): Now -2.
10685 (java_lexer): New field `hit_eof'.
10686 * chartables.h: New file.
10687 * gen-table.pl: new file.
10688
10689 2000-11-20 Tom Tromey <tromey@cygnus.com>
10690 Alexandre Petit-Bianco <apbianco@cygnus.com>
10691
10692 * parse.y (java_complete_lhs): Only allow compound assignment of
10693 reference type if type is String.
10694
10695 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
10696
10697 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
10698 jcf-path.c: Likewise.
10699
10700 2000-12-09 Anthony Green <green@redhat.com>
10701
10702 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
10703 filestart and filename_length as int values.
10704
10705 2000-12-07 Mo DeJong <mdejong@redhat.com>
10706
10707 * jcf-io.c (find_class): Correct the logic that tests to see if a
10708 .java file is newer than its .class file. The compiler was
10709 incorrectly printing a warning when file mod times were equal.
10710
10711 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
10712
10713 * jvgenmain.c: Use ISPRINT not isascii.
10714
10715 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
10716
10717 * parse.y (end_artificial_method_body): Fixed typo.
10718
10719 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
10720
10721 * parse.y (patch_method_invocation): Pick the correct enclosing
10722 context when creating inner class instances.
10723 Fixes gcj/332.
10724
10725 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
10726
10727 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
10728 Update copyright year to 2000.
10729
10730 2000-11-23 Anthony Green <green@redhat.com>
10731
10732 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
10733 Move current_file_list out of yyparse and make it static.
10734
10735 * expr.c: Declare quick_stack and tree_list_free_list as static
10736 (init_expr_processing): Register quick_stack and
10737 tree_list_free_list roots.
10738
10739 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10740
10741 * parse.y (build_outer_field_access): New local `decl_ctx', use
10742 it. Check for field's context and current class immediate outer
10743 context inheritance.
10744 (outer_field_access_p): Consider fields inherited from the last
10745 enclosing context.
10746 (build_access_to_thisn): Stop at the last enclosing context if
10747 necessary.
10748 Fixes gcj/367.
10749
10750 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
10751
10752 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
10753
10754 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
10755
10756 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
10757 scratch buffer.
10758
10759 2000-11-20 Tom Tromey <tromey@cygnus.com>
10760
10761 * jv-scan.c (help): Document --complexity.
10762 (options): Added --complexity.
10763 (flag_complexity): New global.
10764 (main): Call `report'.
10765 * parse-scan.y (complexity): New global.
10766 (if_then_statement, if_then_else_statement,
10767 if_then_else_statement_nsi, switch_block_statement_group,
10768 while_expression, do_statement, for_begin, continue_statement,
10769 throw_statement, catch_clause, finally, method_invocation,
10770 conditional_and_expression, conditional_or_expression,
10771 conditional_expression): Update complexity.
10772 (reset_report): Reset complexity.
10773 (report): New function.
10774
10775 2000-11-20 Tom Tromey <tromey@cygnus.com>
10776
10777 * lex.c (yylex): Added STRICT_TK case.
10778 * parse.y (STRICT_TK): Added.
10779 * parse-scan.y (STRICT_TK): Added.
10780 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
10781 `;'. Use 4, not 3, with -k option. Correctly rename resulting
10782 file.
10783 * keyword.h: Rebuilt.
10784 * keyword.gperf (strictfp): Added.
10785
10786 2000-11-20 Tom Tromey <tromey@cygnus.com>
10787
10788 * lex.c (yylex): Recognize floating point constants with leading
10789 0.
10790
10791 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10792
10793 * java-tree.h (cyclic_inheritance_report): Constify.
10794 * parse.y (cyclic_inheritance_report): Likewise.
10795
10796 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
10797
10798 * parse.y (goal): Remove call to ggc_add_string_root.
10799
10800 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
10801
10802 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
10803 Create string in scratch buffer, then pass to build_string.
10804
10805 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
10806
10807 * parse.y (issue_warning_error_from_context): Add
10808 ATTRIBUTE_PRINTF.
10809
10810 2000-11-11 Anthony Green <green@redhat.com>
10811
10812 * jcf-parse.c (process_zip_dir): Add finput parameter.
10813 (jcf_figure_file_type): Call process_zip_dir with appropriate
10814 argument.
10815
10816 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10817
10818 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
10819 * jcf-parse.c (jcf_figure_file_type): Likewise.
10820
10821 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
10822
10823 * parse.y (create_new_parser_context): Use memset () instead of
10824 bzero ().
10825
10826 2000-11-08 Tom Tromey <tromey@cygnus.com>
10827
10828 * gjavah.c (process_file): Only include gcj/cni.h when generating
10829 CNI stubs.
10830
10831 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
10832
10833 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
10834 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
10835 instead of bzero ().
10836
10837 2000-11-05 Tom Tromey <tromey@cygnus.com>
10838
10839 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
10840 * lex.c (IS_ZERO): New define.
10841 (java_perform_atof): Error on floating point underflow.
10842
10843 2000-11-04 Tom Tromey <tromey@cygnus.com>
10844
10845 * lex.c (java_parse_escape_sequence): Only read two octal
10846 characters if the first one is greater than 3. Don't allow
10847 "octal" numbers to include the digits 8 or 9.
10848
10849 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
10850
10851 * Make-lang.in (java.distdir): Remove.
10852
10853 2000-11-03 Tom Tromey <tromey@cygnus.com>
10854
10855 * Make-lang.in (java.dvi): New target.
10856 Partial fix for PR other/567.
10857
10858 * lang-options.h: Mention -Wout-of-date.
10859 * jcf-dump.c (flag_newer): New global.
10860 * gjavah.c (flag_newer): New global.
10861 * jcf-io.c (find_class): Only warn when flag_newer set.
10862 * lang.c (flag_newer): New global.
10863 (struct string_option): New declaration.
10864 (lang_W_options): New global.
10865 (process_option_with_no): New function.
10866 (lang_decode_option): Use it.
10867
10868 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
10869 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
10870 `$'.
10871
10872 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
10873 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
10874 * lex.c (java_read_unicode): Removed `term_context' argument.
10875 Recognize any number of `u' in `\u'.
10876 (java_read_unicode_collapsing_terminators): New function.
10877 (java_get_unicode): Use it.
10878 (java_lineterminator): Removed.
10879 (yylex): Produce error if character literal is newline or single
10880 quote. Return if eof found in middle of `//' comment. EOF in
10881 `//' comment is only an error if pedantic.
10882 (java_ignorable_control_p): New function.
10883 (java_parse_end_comment): Return if eof found in middle of
10884 comment.
10885 Include flags.h.
10886 * jv-scan.c (pedantic): New global.
10887
10888 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
10889
10890 * parse.y (outer_field_access_p): Inherited fields aren't
10891 consider outer fields.
10892 (maybe_build_thisn_access_method): Use
10893 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
10894 (resolve_expression_name): Trigger an error if a static field
10895 is being accessed as an outer field.
10896
10897 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
10898
10899 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
10900 Fixes gcj/365.
10901
10902 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
10903
10904 * Make-lang.in: Move all build rules here from Makefile.in,
10905 adapt to new context. Wrap all rules that change the current
10906 directory in parentheses. Expunge all references to $(P).
10907 When one command depends on another and they're run all at
10908 once, use && to separate them, not ;. Add OUTPUT_OPTION to
10909 all object-file generation rules. Delete obsolete variables.
10910
10911 * Makefile.in: Delete.
10912 * config-lang.in: Delete outputs= line.
10913
10914 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10915
10916 * parse.y (patch_method_invocation): NULLify this_arg when already
10917 inserted.
10918 (maybe_use_access_method): Handle call to methods unrelated to the
10919 current class. Fixed comment.
10920 Fixes gcj/361.
10921
10922 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
10923
10924 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
10925 scope.
10926
10927 2000-10-24 Tom Tromey <tromey@cygnus.com>
10928
10929 * lex.c (java_new_lexer): Initialize new fields. Work around
10930 broken iconv() implementations.
10931 (java_read_char): Swap bytes if required. Use fallback decoder if
10932 required.
10933 (byteswap_init, need_byteswap): New globals.
10934 (java_destroy_lexer): Only close iconv handle if it is in use.
10935 * lex.h (java_lexer): New fields read_anything, byte_swap,
10936 use_fallback.
10937 Made out_buffer unsigned.
10938
10939 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
10940
10941 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
10942 where an enclosing context can be set on the jdep.
10943 (do_resolve_class): Fixed identation.
10944
10945 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10946
10947 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
10948
10949 * jcf-reader.c (peek_attribute, skip_attribute): Only define
10950 when requested.
10951
10952 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
10953
10954 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
10955
10956 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
10957
10958 * jcf-write.c (OP1): Update `last_bc'.
10959 (struct jcf_block): Fixed indentation and typo in comments. New
10960 field `last_bc'.
10961 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
10962 follows `monitorenter'.
10963 * parse.y (patch_synchronized_statement): New local `tmp'. Call
10964 `patch_string'.
10965 Fixes gcj/232.
10966
10967 2000-10-16 Tom Tromey <tromey@cygnus.com>
10968
10969 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
10970 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
10971 * lang-options.h: Added -MA, -MT, -MF..
10972 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
10973 (DEPEND_TARGET_SET): New macro.
10974 (DEPEND_FILE_ALREADY_SET): Likewise.
10975 (init_parse): Handle new flags.
10976 * jcf.h (jcf_dependency_print_dummies): Declare.
10977 * Make-lang.in (s-java): Added mkdeps.o.
10978 * Makefile.in (BACKEND): Added mkdeps.o.
10979 (../gcjh$(exeext)): Added mkdeps.o.
10980 (../jcf-dump$(exeext)): Added mkdeps.o.
10981 * jcf-depend.c: Include mkdeps.h.
10982 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
10983 add_entry): Removed.
10984 (jcf_dependency_reset): Rewrote.
10985 (dependencies): New global.
10986 (jcf_dependency_set_target): Rewrote.
10987 (jcf_dependency_add_target): Likewise.
10988 (jcf_dependency_add_file): Likewise.
10989 (munge): Removed.
10990 (print_ents): Removed.
10991 (jcf_dependency_write): Rewrote.
10992 (print_dummies): New global.
10993 (jcf_dependency_print_dummies): New function
10994 (jcf_dependency_write): Call deps_dummy_targets if required.
10995
10996 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
10997
10998 * gjavah.c (add_class_decl): Removed unused variables `tname',
10999 `tlen' and `name_index'.
11000 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
11001 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
11002 in `wfl_operator' with value.
11003 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
11004 (jcf_figure_file_type): Fixed identation.
11005 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
11006 * parse.y (analyze_clinit_body): New function.
11007 (static_initializer:): Reset `current_static_block'.
11008 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
11009 `wfl_operator' with new value.
11010 (lookup_cl): Use EXPR_WFL_FILENAME.
11011 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
11012 analyze_clinit_body.
11013 (build_outer_field_access): Access to this$<n> built from
11014 current_class, not its outer context.
11015 (build_access_to_thisn): Fixed leading comment. Tidied things up.
11016 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
11017 (patch_method_invocation): Use `is_static_flag' when already
11018 initialized.
11019 (patch_newarray): Removed assignment in ternary operator.
11020
11021 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11022
11023 * except.c (free_eh_ranges): Don't free `whole_range'.
11024
11025 2000-10-15 Anthony Green <green@redhat.com>
11026
11027 * decl.c (init_decl_processing): Call init_class_processing before
11028 anything else.
11029
11030 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11031
11032 * check-init.c (check_init): Fixed leading comment. Use
11033 LOCAL_FINAL_P.
11034 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11035 (give_name_to_locals): Likewise.
11036 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
11037 fields in lang_decl_var.
11038 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
11039 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
11040 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
11041 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
11042 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
11043 (LOCAL_FINAL): Rewritten.
11044 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
11045 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
11046 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
11047 `init_final' fields.
11048 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
11049 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
11050 (TYPE_HAS_FINAL_VARIABLE): New macro.
11051 (struct lang_type): Added `afv' field.
11052 * parse.y (check_static_final_variable_assignment_flag): New function.
11053 (reset_static_final_variable_assignment_flag): Likewise.
11054 (check_final_variable_local_assignment_flag): Likewise.
11055 (reset_final_variable_local_assignment_flag): Likewise.
11056 (check_final_variable_indirect_assignment): Likewise.
11057 (check_final_variable_global_assignment_flag): Likewise.
11058 (add_inner_class_fields): Use LOCAL_FINAL_P.
11059 (register_fields): Handle local finals and final variables.
11060 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
11061 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11062 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11063 on local finals.
11064 (java_complete_expand_methods): Loop to set
11065 TYPE_HAS_FINAL_VARIABLE. Call
11066 `reset_final_variable_local_assignment_flag' and
11067 `check_final_variable_local_assignment_flag' accordingly before
11068 and after constructor expansion. Call
11069 `reset_static_final_variable_assignment_flag'
11070 before expanding <clinit> and after call
11071 `check_static_final_variable_assignment_flag' if the
11072 current_class isn't an interface. After all methods have been
11073 expanded, call `check_final_variable_global_assignment_flag' and
11074 `check_static_final_variable_assignment_flag' if the current class
11075 is an interface.
11076 (maybe_yank_clinit): Fixed typo in comment.
11077 (build_outer_field_access_methods): Removed old sanity check. Use
11078 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11079 Don't create access methods for finals.
11080 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
11081 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
11082 existing DECL_INIT has been processed.
11083 (java_complete_lhs): Likewise.
11084 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
11085 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
11086 logic.
11087 (patch_assignment): Use LOCAL_FINAL_P.
11088 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
11089 DECL_INITIAL is nullified.
11090 Fixes gcj/163.
11091
11092 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11093
11094 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
11095
11096 * Makefile.in (parse.c, parse-scan.c): Likewise.
11097
11098 2000-10-12 Mark Mitchell <mark@codesourcery.com>
11099
11100 * class.c (temporary_obstack): Remove.
11101 (make_class): Don't mess with obstascks.
11102 (push_class): Likewise.
11103 (set_super_info): Likewise.
11104 (add_method_1): Likewise.
11105 (add_method): Likewise.
11106 (add_field): Likewise.
11107 (build_utf8_ref): Likewise.
11108 (build_class_ref): Likewise.
11109 (build_static_field_ref): Likewise.
11110 (finish_class): Likewise.
11111 (push_super_field): Likewise.
11112 (layout_class): Likewise.
11113 (layout_class_methods): Likewise.
11114 (init_class_processing): Likewise.
11115 * constants.c (get_tag_node): Likewise.
11116 (build_constant_data_ref): Likewise.
11117 * decl.c (ggc_p): Remove.
11118 (copy_lang_decl): Use ggc_alloc.
11119 (complete_start_java_method): Don't mess with obstacks.
11120 (start_java_method): Likewise.
11121 (end_java_method): Likewise.
11122 * except.c (link_handler): Use xmalloc.
11123 (free_eh_ranges): New function.
11124 (method_init_exceptions): Use it.
11125 (add_handler): Use xmalloc.
11126 (expand_start_java_handler): Don't mess with obstacks.
11127 (prepare_eh_table_type): Likewise.
11128 (expand_end_java_handler): Likewise.
11129 * expr.c (push_value): Likewise.
11130 (create_label_decl): Likewise.
11131 (build_jni_stub): Likewise.
11132 (java_lang_expand_expr): Likewise.
11133 (note_instructions): Use xrealloc.
11134 (java_push_constant_from_pool): Don't mess with obstacks.
11135 (process_jvm_instruction): Likewise.
11136 * java-tree.h (cyclic_inheritance_report): Remove duplicate
11137 declaration.
11138 * jcf-parse.c (get_constant): Don't mess with obstacks.
11139 (read_class): Likewise.
11140 (jcf_parse): Likewise.
11141 * lex.c (expression_obstack): Remove.
11142 (java_lex): Don't use obstack_free.
11143 * parse.h (exit_java_complete_class): Don't mess with obstacks.
11144 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
11145 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
11146 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
11147 * parse.y (gaol): Add more GC roots.
11148 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
11149 (lookup_field_wrapper): Likewise.
11150 (obtain_incomplete_type): Don't mess with obstacks.
11151 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
11152 macros.
11153 (craft_constructor): Don't mess with obstacks.
11154 (safe_layout_class): Likewise.
11155 (java_complete_class): Likewise.
11156 (source_end_java_method): Likewise.
11157 (build_outer_field_access_methods): Likewise.
11158 (build_outer_method_access_method): Likewise.
11159 (maybe_build_thisn_access_method): Likewise.
11160 (build_dot_class_method_invocation): Likewise.
11161 (java_complete_tree): Likewise.
11162 (java_complete_lhs): Likewise.
11163 (do_merge_string_cste): Likewise.
11164 (patch_string_cst): Likewise.
11165 (array_constructor_check_entry): Likewise.
11166 * typeck.c (build_java_array_type): Likewise.
11167 (parse_signature_string): Likewise.
11168 (build_java_signature): Likewise.
11169
11170 2000-10-12 Tom Tromey <tromey@cygnus.com>
11171
11172 Fix for PR gcj/356:
11173 * gjavah.c (add_class_decl): Don't special-case inner classes.
11174 (add_namelet): Likewise.
11175
11176 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
11177
11178 * java-tree.h: Constify current_encoding.
11179 * lang.c: Constify current_encoding.
11180
11181 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
11182
11183 * jvgenmain.c (class_mangling_suffix): Omit `.'.
11184 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
11185
11186 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11187
11188 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
11189 patch. Fixes gcj/340.
11190
11191 2000-10-10 Tom Tromey <tromey@cygnus.com>
11192
11193 * lex.c (java_new_lexer): Initialize out_first and out_last
11194 fields.
11195 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
11196
11197 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11198
11199 * parse.y (pop_current_osb): New function.
11200 (array_type:): Use `dims:', changed actions
11201 accordingly. Suggested by Anthony Green.
11202 (array_creation_expression:): Used pop_current_osb.
11203 (cast_expression:): Likewise.
11204 (search_applicable_method_list): Fixed indentation.
11205
11206 2000-10-08 Anthony Green <green@redhat.com>
11207
11208 * parse.y (array_type_literal): Remove production.
11209 (type_literals): Refer to array_type, not array_type_literal.
11210
11211 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11212
11213 Patch contributed by Corey Minyard.
11214 * decl.c (check_local_named_variable): New function.
11215 (tree check_local_unnamed_variable): Likewise.
11216 (find_local_variable): Splitted. Call check_local_{un}named_variable.
11217
11218 2000-10-07 Anthony Green <green@redhat.com>
11219
11220 * class.c (layout_class): Handle case where superclass can't be
11221 layed out yet.
11222
11223 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
11224
11225 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
11226 gperf.
11227
11228 2000-10-05 Tom Tromey <tromey@cygnus.com>
11229
11230 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
11231 * jvgenmain.c (class_mangling_prefix): Removed.
11232 (class_mangling_suffix): New global.
11233 (main): Use it.
11234 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
11235 `$'.
11236 (print_method_info): Handle overrides for static and final
11237 methods.
11238 (process_file): Generate declaration for class object field.
11239 * class.c (cxx_keywords): New array.
11240 (utf8_cmp): New function.
11241 (cxx_keyword_p): New function.
11242 (layout_class_method): Mangle C++ keywords by appending `$'.
11243 (mangle_field): New function.
11244 (mangle_class_field): Use mangle_field. Mangle class name as
11245 `class$'.
11246 (mangle_static_field): Use mangle_field.
11247
11248 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
11249
11250 * decl.c (find_local_variable): Removed uncessary type check and
11251 fixed range check typo. From Corey Minyard.
11252
11253 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11254
11255 * decl.c (give_name_to_locals): New local `code_offset'. Call
11256 `maybe_adjust_start_pc'.
11257 * expr.c (note_instructions): New function.
11258 (expand_byte_code): Don't collect insn starts here.
11259 (peek_opcode_at_pc): New function.
11260 (maybe_adjust_start_pc): Likewise.
11261 * java-tree.h (maybe_adjust_start_pc): Declare.
11262 (note_instructions): Likewise.
11263 * jcf-parse.c (parse_class_file): Call `note_instructions'.
11264
11265 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11266
11267 * parse.y (field_access:): Fixed indentation.
11268 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
11269
11270 2000-09-07 Tom Tromey <tromey@cygnus.com>
11271
11272 Fix for PR gcj/307:
11273 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
11274 JPRIMITIVE_TYPE_P, for arithmetic operators.
11275 (patch_method_invocation): Indentation fix.
11276 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
11277 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
11278 (do_unary_numeric_promotion): Cleaned up code.
11279 (valid_cast_to_p): Handle boolean correctly.
11280
11281 2000-09-27 Tom Tromey <tromey@cygnus.com>
11282
11283 * lex.c (java_read_unicode): Reset bs_count when finished with
11284 `\u' sequence.
11285
11286 2000-10-01 Mark Mitchell <mark@codesourcery.com>
11287
11288 Convert to GC.
11289 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
11290 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
11291 (typeck.o): Depend on ggc.h.
11292 * class.c (add_method_1): Use GC functions for allocation.
11293 (init_class_processing): Register roots.
11294 * decl.c (ggc_p): Set to 1.
11295 (pending_local_decls): Make it static.
11296 (push_jvm_slot): Use GC functions for allocation.
11297 (init_decl_processing): Register roots.
11298 (give_name_to_locals): Use GC functions for allocation.
11299 (lang_mark_tree): New function.
11300 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
11301 functions for allocation.
11302 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
11303 * lex.c (java_lex): Use build_string, rather than replicating it
11304 inline.
11305 * parse.y (goal): Add more roots.
11306 (mark_parser_ctxt): New function.
11307 * typeck.c: Include ggc.h.
11308
11309 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11310
11311 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
11312 contains something else than MODIFY_EXPR.
11313
11314 2000-09-23 Mark Mitchell <mark@codesourcery.com>
11315
11316 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
11317 * Makefile.in (parse.o): Depend on ggc.h.
11318 (class.o): Likewise.
11319 (constants.o): Likewise.
11320 (decl.o): Likewise.
11321 (expr.o): Likewise.
11322 (jcf-parse.o): Likewise.
11323 (jcf-write.o): Likewise.
11324 (mangle.o): Likewise.
11325 * class.c: Include ggc.h.
11326 (build_static_field_ref): Register GC roots.
11327 (layout_class): Likewise.
11328 (init_class_processing): Likewise.
11329 * constants.c: Include ggc.h.
11330 (current_constant_pool_data_ref): Remove.
11331 (tag_nodes): Move it to ...
11332 (get_tag_node): ... here. Register GC roots.
11333 * decl.c: Include ggc.h. Remove many global tree definitions.
11334 (throw_node): Define.
11335 (java_global_trees): Likewise.
11336 (predef_filenames): Make the size a constant.
11337 (init_decl_processing): Adjust accordingly.
11338 (init_decl_processing): Call init_jcf_parse. Register GC roots.
11339 * expr.c: Include ggc.h.
11340 (init_expr_processing): Register GC roots.
11341 (build_invokeinterface): Likewise.
11342 * java-tree.h: Replace extern tree declarations with macros.
11343 (java_global_trees): New variable.
11344 (java_tree_index): New enumeration.
11345 (init_jcf_parse): Declare.
11346 * jcf-parse.c: Include ggc.h.
11347 (current_class): Remove declaration.
11348 (main_class): Likewise.
11349 (all_class_list): Likewise.
11350 (predefined_filename_p): Adjust for constant size of
11351 predef_filenames.
11352 (init_jcf_parse): New function.
11353 * jcf-write.c: Include ggc.h.
11354 (generate_classfile): Register GC roots.
11355 (append_synthetic_attribute): Likewise.
11356 (append_innerclass_attribute_entry): Likewise.
11357 * lang.c: Include ggc.h.
11358 (lang_print_error): Register GC roots.
11359 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
11360 with macros.
11361 * parse.y: Include ggc.h.
11362 (wfl_operator): Remove.
11363 (goal): Register GC roots.
11364 (java_pop_parser_context): Adjust for new field names.
11365 (java_parser_context_save_global): Likewse.
11366 (java_parser_context_restore_global): Likewise.
11367 (java_parser_context_suspend): Likewise.
11368 (java_parser_context_resume): Likewise.
11369 (verify_constructor_circularity): Register GC roots.
11370 (lookup_cl): Likewise.
11371 (java_reorder_fields): Likewise.
11372 (build_current_this): Likewise.
11373 (class_in_current_package): Likewise.
11374 (argument_types_convertible): Likewise.
11375 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
11376
11377 2000-09-14 Tom Tromey <tromey@cygnus.com>
11378
11379 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
11380
11381 2000-09-13 Tom Tromey <tromey@cygnus.com>
11382
11383 * jcf-parse.c: Include <locale.h>.
11384 * jv-scan.c: Include <locale.h>.
11385
11386 2000-09-12 Tom Tromey <tromey@cygnus.com>
11387
11388 * expr.c (pop_type_0): Return `Object' if trying to merge two
11389 interface types.
11390 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
11391 interface types; `Object' is always a valid supertype.
11392
11393 2000-09-12 Tom Tromey <tromey@cygnus.com>
11394
11395 Fix for PR gcj/33:
11396 * jv-scan.c (help): Document --encoding.
11397 (options): Added `encoding' entry.
11398 (OPT_ENCODING): New define.
11399 (main): Handle --encoding.
11400 Include <langinfo.h> if nl_langinfo exists.
11401 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
11402 --encoding.
11403 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
11404 (parse_source_file): Correctly call java_init_lex. Added `finput'
11405 argument. Use nl_langinfo to determine default encoding.
11406 * java-tree.h (current_encoding): Declare.
11407 * parse.y (java_parser_context_restore_global): Don't restore
11408 `finput'.
11409 (java_parser_context_save_global): Don't set `finput' field.
11410 (java_pop_parser_context): Don't restore `finput'. Free old lexer
11411 if required.
11412 * lang.c (current_encoding): New global.
11413 (lang_decode_option): Recognize `-fencoding='.
11414 (finish_parse): Don't close finput.
11415 * parse.h (struct parser_ctxt): Removed `finput' and
11416 `unget_utf8_value' fields. Added `lexer' field.
11417 (java_init_lex): Fixed declaration.
11418 * lex.c (java_new_lexer): New function.
11419 (java_destroy_lexer): Likewise.
11420 (java_read_char): Added `lex' argument. Handle iconv case.
11421 (java_read_unicode): Added `lex' argument. Count backslashes in
11422 lexer structure.
11423 (java_init_lex): Added `finput' and `encoding' arguments. Set
11424 `lexer' field in ctxp.
11425 (BAD_UTF8_VALUE): Removed.
11426 (java_lex): Handle seeing UEOF in the middle of a string literal.
11427 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
11428 (java_lexer): New structure.
11429 (UNGETC): Removed.
11430 (GETC): Removed.
11431 (DEFAULT_ENCODING): New define.
11432 (java_destroy_lexer): Declare.
11433
11434 2000-09-12 Tom Tromey <tromey@cygnus.com>
11435
11436 Fix for PR gcj/343:
11437 * lex.c (java_init_lex): Initialize java_io_serializable.
11438 * parse.y (java_io_serializable): New global.
11439 (valid_ref_assignconv_cast_p): An array can be cast to
11440 serializable.
11441
11442 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
11443
11444 * decl.c, expr.c: Include defaults.h if not already included.
11445 Don't define the *_TYPE_SIZE macros.
11446
11447 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
11448
11449 * typeck.c (build_java_array_type): Correct first parameter
11450 in ADJUST_FIELD_ALIGN invocation.
11451
11452 2000-09-06 Tom Tromey <tromey@cygnus.com>
11453
11454 * lang-specs.h: Also recognize `-femit-class-files'.
11455
11456 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11457
11458 * verify.c (merge_types): Load the types to merge if necessary.
11459
11460 2000-09-02 Anthony Green <green@redhat.com>
11461
11462 * jcf-io.c: Include zlib.h.
11463 (open_in_zip): Read compressed class file archives.
11464 * zipfile.h (ZipDirectory): Add uncompressed_size and
11465 compression_method fields.
11466 * zextract.c (read_zip_archive): Collect file compression info.
11467
11468 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
11469
11470 * parse.y (do_resolve_class): Also explore superclasses of
11471 intermediate enclosing contexts when searching for inner classes.
11472
11473 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11474
11475 * parse.y (variable_declarator_id:): Better error message.
11476 (expression_statement:): Use YYNOT_TWICE.
11477 (cast_expression:): Likewise.
11478 (assignment:): Likewise.
11479
11480 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11481
11482 * parse.y (do_merge_string_cste): New locals. Create new
11483 STRING_CSTs each time, use memcpy. Fixes gcj/311.
11484
11485 2000-08-07 Hans Boehm <boehm@acm.org>
11486
11487 * boehm.c (mark_reference_fields): Set marking bits for all words in
11488 a multiple-word record.
11489 (get_boehm_type_descriptor): Use the procedure marking descriptor for
11490 java.lang.Class.
11491
11492 2000-08-31 Mike Stump <mrs@wrs.com>
11493
11494 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
11495 jcf-dump$(exeext)): Make parallel safe.
11496
11497 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
11498
11499 * jcf-parse.c (set_source_filename): Constify a char *.
11500 * jcf-write.c (append_innerclasses_attribute,
11501 make_class_file_name): Constify a char *. Don't recycle a
11502 variable for an unrelated purpose.
11503 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
11504 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
11505
11506 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11507
11508 * expr.c (can_widen_reference_to): Fixed indentation.
11509 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
11510 * parse.y: `finit$' replaces `$finit$' in comments.
11511 (try_builtin_assignconv): Fixed leading comment.
11512
11513 2000-08-25 Greg McGary <greg@mcgary.org>
11514
11515 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
11516
11517 2000-08-24 Greg McGary <greg@mcgary.org>
11518
11519 * lang.c (lang_decode_option): Use ARRAY_SIZE.
11520 * parse.y (BINOP_LOOKUP): Likewise.
11521
11522 2000-08-22 Andrew Haley <aph@cygnus.com>
11523
11524 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
11525 sign extending. Fixes gcj/321.
11526 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
11527 combining to make a jlong. Fixes gcj/321.
11528
11529 2000-08-21 Nix <nix@esperi.demon.co.uk>
11530
11531 * lang-specs.h: Do not process -o or run the assembler if
11532 -fsyntax-only.
11533
11534 2000-08-16 Andrew Haley <aph@cygnus.com>
11535
11536 * typeck.c (build_java_array_type): Rewrite code to do array
11537 alignment. Take into account back-end macros when aligning array
11538 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
11539 user to set alignment. Fixes gcj/252 and 160.
11540
11541 2000-08-09 Tom Tromey <tromey@cygnus.com>
11542
11543 * parse.y (check_abstract_method_definitions): Now return `int'.
11544 Check implemented interfaces. Fixes PR gcj/305.
11545
11546 * parse.y (patch_switch_statement): Disallow `long' in switch
11547 expressions. Fixes PR gcj/310.
11548
11549 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
11550
11551 * decl.c (finit_leg_identifier_node): New global.
11552 (init_decl_processing): Use `finit$' to initialize
11553 finit_identifier_node. Use `$finit$' to initialize
11554 finit_leg_identifier_node.
11555 * expr.c (expand_java_field_op): Use ID_FINIT_P.
11556 * java-tree.h (finit_identifier_node): Changed attached comment.
11557 (finit_leg_identifier_node): New declaration.
11558 (ID_FINIT_P): Take finit_identifier_node and
11559 finit_leg_identifier_node into account. This is a backward
11560 compatibility hack.
11561
11562 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11563
11564 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
11565 Jan 6 2000 patch.
11566 (generate_bytecode_insns): Check `nargs' before emitting it.
11567 * verify.c (merge_type_state): Fixed typo.
11568 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
11569 generate_bytecode_{conditional,insns}.
11570
11571 2000-08-13 Anthony Green <green@redhat.com>
11572
11573 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
11574 for -pg builds).
11575
11576 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11577
11578 * class.c (maybe_layout_super_class): Fixed indentation.
11579 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
11580 (java_check_methods): New function declaration.
11581 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
11582 instead of `str_ptr'.
11583 * jcf-write.c (generate_bytecode_insns): Emit number the of args
11584 of a `invokeinterface' at the right time.
11585 * parse.h (WFL_STRIP_BRACKET): New macro.
11586 (SET_TYPE_FOR_RESOLUTION): Use it.
11587 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
11588 (check_class_interface_creation): Don't check for cross package
11589 innerclass name clashes.
11590 (method_header): Behave properly if MDECL is `error_mark_node'.
11591 (method_declarator): Return `error_mark_node' if bogus current
11592 class.
11593 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
11594 (resolve_and_layout): New local `decl_type', set and used. Call
11595 java_check_methods.
11596 (java_check_methods): New method.
11597 (java_layout_classes): Use it.
11598 (resolve_qualified_expression_name): No EH check necessary in
11599 access$<n>.
11600 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
11601 `case' statement.
11602 (patch_assignment): Set DECL_INITIAL on integral final local.
11603
11604 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11605
11606 * java-tree.h (flag_extraneous_semicolon): New extern.
11607 * lang-options.h: (-Wextraneous-semicolon): New option.
11608 * lang.c (flag_redundant): Fixed typo in leading comment.
11609 (flag_extraneous_semicolon): New global.
11610 (lang_decode_option): Set `flag_extraneous_semicolon' when
11611 -Wall. Decode `-Wextraneous-semicolon'.
11612 * parse.y (type_declaration:): Removed `SC_TK' hack, added
11613 `empty_statement' rule.
11614 (class_body_declaration): Likewise.
11615 (method_body:): Accept `;' as a method body.
11616 (static_initializer:): Removed `SC_TK' hack.
11617 (constructor_block_end:): Likewise.
11618 (empty_statement:): Report deprecated empty declaration. Fixes
11619 gcj/295
11620
11621 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11622
11623 * parse.y (build_dot_class_method_invocation): Changed parameter
11624 name to `type'. Build signature from `type' and convert it to a
11625 STRING_CST if it's an array.
11626 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
11627 to use `ref_type' directly.
11628
11629 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
11630
11631 * lang-options.h: Added a comma after the last element to avoid
11632 syntax errors when other languages define additional options.
11633
11634 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
11635
11636 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
11637 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
11638 (jc1): Link with $(BACKEND).
11639 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
11640
11641 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
11642
11643 * jvspec.c: Adjust type of second argument to
11644 lang_specific_driver, and update code as necessary.
11645
11646 * class.c (build_dtable_decl): Initialize dummy.
11647
11648 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11649
11650 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
11651 method bodies not to rule out discarding `<clinit>'; don't use
11652 <clinit> to initialize static fields with constant initializers.
11653
11654 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11655
11656 * gjavah.c (print_method_info): Added `synth' parameter. Skip
11657 synthetic methods.
11658 (method_synthetic): New global.
11659 (HANDLE_METHOD): Recognize synthetic method and tell
11660 `print_method_info' about it.
11661 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
11662 processing a synthetic method.
11663 * jcf-reader.c (skip_attribute): New function.
11664 ( skip_attribute): Likewise.
11665
11666 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11667
11668 * parse.y (build_outer_field_access): Fixed comments.
11669 (fix_constructors): Emit the initialization of this$<n> before
11670 calling $finit$.
11671 (resolve_qualified_expression_name): Build an access to `decl' if
11672 necessary.
11673
11674 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
11675
11676 * parse-scan.y (curent_class): Non longer const.
11677 (inner_qualifier, inner_qualifier_length): Deleted.
11678 (current_class_length): New global.
11679 (bracket_count): Fixed typo in leading comment.
11680 (anonymous_count): New global.
11681 (class_instance_creation_expression:): Handle anonymous classes.
11682 (anonymous_class_creation:): New rule.
11683 (push_class_context): Rewritten.
11684 (pop_class_context): Likewise.
11685 (INNER_QUALIFIER): Macro deleted.
11686 (report_class_declaration): call `push_class_context' when
11687 entering the function. `fprintf' format modified not to use
11688 INNER_QUALIFIER.
11689 (report_class_declaration): Assign `package_name' and
11690 `current_class' to NULL separately.
11691
11692 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
11693
11694 * expr.c (build_invokeinterface): Call layout_class_methods on
11695 target interface.
11696
11697 2000-07-27 Tom Tromey <tromey@cygnus.com>
11698 Anthony Green <green@cygnus.com>
11699 Alexandre Petit-Bianco <apbianco@cygnus.com>
11700
11701 * class.c (make_class_data): Create vtable for abstract classes.
11702 (get_dispatch_table): Changed to cope with abstract classes.
11703
11704 2000-07-27 Tom Tromey <tromey@cygnus.com>
11705
11706 * parse.y (patch_method_invocation): Don't reverse the argument
11707 list when dealing with anonymous class constructors. Fixed typo in
11708 comment.
11709
11710 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11711
11712 * parse.y (build_alias_initializer_parameter_list): Reverse
11713 crafted list when building aliases for anonymous class
11714 constructors.
11715
11716 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11717
11718 * parse.y (jdep_resolve_class): Don't bother checking potential
11719 innerclass access if `decl' is NULL.
11720 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
11721 WFL.
11722
11723 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11724
11725 * parse.c: Remove (again.)
11726
11727 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11728
11729 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
11730 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
11731 outside the `if' statement, alias to innerclass removed, `decl'
11732 used to mark the class complete.
11733
11734 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
11735
11736 * parse.y (simple_name:): Fixed typo in error message.
11737
11738 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
11739
11740 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
11741 or its first operand can be error marks.
11742
11743 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
11744
11745 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
11746 * parse.y (method_header): Likewise.
11747
11748 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11749
11750 * parse.y (process_imports): Consider that one might be trying to
11751 import an innerclass. Fixes gcj/254
11752
11753 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11754
11755 * parse.y (find_as_inner_class): Handle the case where the
11756 enclosing context of an innerclass has been loaded as bytecode.
11757
11758 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11759
11760 * parse.y (simple_name:): Reject `$' in type names.
11761 (resolve_type_during_patch): Use `type' as a second
11762 argument to resolve_no_layout. Fixes gcj/257.
11763
11764 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
11765
11766 * parse.y (find_most_specific_methods_list): Select the only
11767 non-abstract method even if max has been set.
11768 Fixes gcj/285, gcj/298.
11769
11770 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
11771
11772 * lang-specs.h: Added %(jc1) to java compiler options.
11773
11774 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
11775
11776 * .cvsignore: New file.
11777
11778 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11779
11780 * parse.y (not_accessible_p): Access granted to innerclasses
11781 (indirectly) extending the reference type. Fixes gcj/249.
11782
11783 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11784
11785 * parse.y (patch_method_invocation): Fixed comment.
11786 (maybe_use_access_method): Build this$<n>s to the context of the
11787 target method, or a type that extends it. Fixes gcj/242.
11788
11789 2000-07-13 Mark Mitchell <mark@codesourcery.com>
11790
11791 * parse.c: Remove.
11792
11793 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11794
11795 * parse.y (fold_constant_for_init): Avoid bullish conversion.
11796
11797 2000-07-13 Tom Tromey <tromey@cygnus.com>
11798
11799 * lang-specs.h: Added %{I*}.
11800
11801 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
11802
11803 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
11804
11805 2000-07-12 Mark Mitchell <mark@codesourcery.com>
11806
11807 * parse-scan.c: Remove.
11808
11809 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11810
11811 * class.c (set_super_info): Handled protected inner classes.
11812 (common_enclosing_context_p): Bail early if arguments aren't both
11813 inner classes.
11814 (get_access_flags_from_decl): Handle private and protected inner
11815 classes.
11816 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
11817 (CLASS_PROTECTED): Likewise.
11818 (struct lang_type): New bitfield `poic'.
11819 * parse.y (jdep_resolve_class): Call check_inner_class_access on
11820 inner classes only.
11821 (check_inner_class_access): Renamed arguments, added
11822 comments. Handles protected inner classes (fixes gcj/225)
11823 (not_accessible_p): Fixed comments. Avoid handling inner classes.
11824
11825 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11826
11827 * parse.y (resolve_qualified_expression_name): Verify qualified
11828 access to `this'. Fixes gcj/239.
11829
11830 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11831
11832 * jcf-write.c (generate_classfile): Don't install ConstantValue
11833 for null pointers.
11834
11835 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11836
11837 * parse.y (resolve_qualified_expression_name): Handle inner class
11838 access. Fixes gcj/256.
11839
11840 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11841
11842 * jcf-write.c (generate_classfile): Properly install the
11843 ConstantValue attribute and the initial value constant pool index
11844 on string constants.
11845 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
11846 class files.
11847
11848 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11849
11850 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
11851 construct.
11852 * parse.y (find_as_inner_class): Fixed typo.
11853 (do_resolve_class): Explore enclosing contexts when searching for
11854 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
11855 (check_inner_class_access): Check `decl' which can be null in case
11856 of previous errors.
11857
11858 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11859
11860 * java-tree.h (java_debug_context): Declared `extern'.
11861 (safe_layout_class): Likewise.
11862 * parse.y (resolve_field_access): Field must be `static' in order
11863 to be replaced by its initial value. Added comments.
11864 (find_applicable_accessible_methods_list): Fixed typo.
11865 (find_most_specific_methods_list): Methods found in innerclasses
11866 take over methods founds in the enclosing contexts.
11867 (java_complete_tree): Loosen restrictions on the type of DECLs
11868 that can be replaced by their initialization values.
11869 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
11870
11871 2000-07-05 Tom Tromey <tromey@cygnus.com>
11872
11873 * Make-lang.in (PARSE_DIR): New macro.
11874 (PARSE_RELDIR): Likewise.
11875 (PARSE_C): Likewise.
11876 (PARSE_SCAN_C): Likewise.
11877 ($(PARSE_C)): New target.
11878 ($(PARSE_SCAN_C)): Likewise.
11879 (SET_BISON): New macro.
11880 (BISONFLAGS): Likewise.
11881 (JAVABISONFLAGS): Likewise.
11882
11883 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
11884
11885 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
11886 argument on the first pass for CNI as well as JNI.
11887 (print_method_info): Set up method name on the first pass only.
11888
11889 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11890
11891 * parse.y (parser_qualified_classname): Removed parameter
11892 `is_static'.
11893 (create_interface): Removed first passed parameter to
11894 parser_qualified_classname.
11895 (create_class): Likewise. Don't install alias on static
11896 innerclasses. Fixes gcj/275.
11897
11898 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11899
11900 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
11901 debugable statement with empty_stmt_node. Fixes gcj/272
11902
11903 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11904
11905 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
11906 gcj/271.
11907
11908 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11909
11910 * jcf-write.c (push_long_const): Appropriately cast short negative
11911 constant to jword.
11912
11913 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11914
11915 * parse.y (verify_constructor_super): Use loop variable
11916 `m_arg_type' initialized with `mdecl_arg_type'.
11917
11918 2000-06-29 Tom Tromey <tromey@cygnus.com>
11919
11920 * parse.y (resolve_field_access): Handle case where `type_found'
11921 is NULL.
11922
11923 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11924
11925 * expr.c (lookup_field): The same field can be found through two
11926 different interface. Don't declare it ambiguous in that case.
11927
11928 2000-06-27 Tom Tromey <tromey@cygnus.com>
11929
11930 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
11931 follows \r, then unget it at a lower level.
11932
11933 2000-06-26 Tom Tromey <tromey@cygnus.com>
11934
11935 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
11936 java_complete_tree.
11937
11938 2000-06-25 Tom Tromey <tromey@cygnus.com>
11939
11940 * parse.y (for_statement): Wrap expression in a WFL if it is a
11941 constant. For PR gcj/268.
11942
11943 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11944
11945 * parse.y (do_resolve_class): Minor optimiztion in the package
11946 list search. Removed unnecessary test and return statement.
11947 (valid_ref_assignconv_cast_p): Order of arguments to
11948 enclosing_context_p fixed.
11949
11950 2000-06-24 Tom Tromey <tromey@cygnus.com>
11951
11952 * expr.c (lookup_field): Print error and return error_mark_node if
11953 field reference is ambiguous.
11954
11955 * parse.y (check_abstract_method_definitions): Also check if
11956 `other_method' is abstract.
11957
11958 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11959
11960 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
11961 classes.
11962 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
11963 (struct lang_type): New field `pic'.
11964 (CLASS_PRIVATE): New macro.
11965 * parse.y (check_inner_class_access): New function.
11966 (jdep_resolve_class): Call it.
11967
11968 2000-06-23 Tom Tromey <tromey@cygnus.com>
11969
11970 * parse.y (patch_incomplete_class_ref): Initialize the returned
11971 class. For PR gcj/260.
11972
11973 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
11974
11975 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
11976
11977 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
11978
11979 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
11980 Java specific checks.
11981 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
11982 screened by DECL_P.
11983 * java-tree.def (CASE_EXPR): Marked 'e'.
11984 (DEFAULT_EXPR): Likewise.
11985 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
11986 screened by DECL_P.
11987 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
11988 Java specific checks.
11989 (generate_bytecode_insns): Test try_block for BLOCK before using
11990 BLOCK_EXPR_BODY.
11991 * parse.y (build_wfl_wrap): Added `location' argument. Set
11992 EXPR_WFL_LINECOL accordingly.
11993 (dim_expr:): Wrap constants with WFLs.
11994 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
11995 (resolve_package): Check for `stmt' not being a BLOCK before
11996 building a debuggable statement with it.
11997 (make_qualified_primary): Added extra parameter to build_wfl_wrap
11998 invocation.
11999 (resolve_field_access): Make sure `decl' is a DECL before treating
12000 it as such.
12001 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
12002 IDENTIFIER_NODE before treating it as such.
12003 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
12004 treating it as such.
12005 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
12006 to be applied only on non array types.
12007
12008 2000-06-16 Per Bothner <per@bothner.com>
12009
12010 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
12011 define in terms of DECL_RESULT, as that fails when --enable-checking.
12012
12013 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12014
12015 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
12016 types the same in comparison.
12017 (CHECK_OP): Add static prototype.
12018
12019 2000-06-13 Jakub Jelinek <jakub@redhat.com>
12020
12021 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
12022 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
12023 * parse.c: Rebuilt.
12024
12025 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12026
12027 * decl.c (create_primitive_vtable): Prototype.
12028
12029 * jcf-write.c (generate_bytecode_insns): Initialize variable
12030 `saved_context'.
12031
12032 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
12033
12034 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
12035
12036 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
12037 to track searched classes, and do not search the same class more than
12038 once. Call find_applicable_accessible_methods_list on immediate
12039 superclass, instead of search_applicable_method_list on all ancestors.
12040 Fix for PR gcj/238.
12041
12042 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
12043
12044 * parse.y (register_fields): Permit static fields in inner classes
12045 if they are final. Fix for PR gcj/255.
12046
12047 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12048
12049 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
12050 * parse.y (find_in_imports): Returned type changed to void,
12051 leading comment fixed.
12052 (register_package): New function.
12053 (qualify_and_find): Likewise.
12054 (package_declaration:): Use `register_package'.
12055 (single_type_import_declaration:): Removed local variable
12056 `node'. Added missing `;' for consistency.
12057 (type_import_on_demand_declaration:): Use `chainon' to link new
12058 entries.
12059 (lookup_field_wrapper): Lookup local variables defined in outer
12060 contexts first.
12061 (java_complete_class): Don't reverse the list of imported on demand.
12062 (do_resolve_class): Reorganized. Removed local variable
12063 `original_name'. Call `qualify_and_find' with the current package
12064 name, invoke `find_in_imports_on_demand' right after. Call
12065 `qualify_and_find' with the packages we've seen so far. Fixed
12066 operations numbering in comments.
12067 (java_expand_class): Don't reverse `package_list'.
12068 (find_most_specific_methods_list): New local variables `abstract'
12069 and `candidates'. Use them to pick the right method.
12070
12071 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
12072
12073 * parse.y (check_modifiers_consistency): Don't subtract out
12074 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
12075
12076 2000-06-04 Philipp Thomas <pthomas@suse.de>
12077
12078 * Makefile.in (INTLLIBS): New.
12079 (LIBS): Add above.
12080 (DEPLIBS): Ditto.
12081
12082 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12083
12084 * class.c (get_dispatch_table): Build the vtable dummy entry list
12085 element with a null purpose. Fixed leading comment.
12086 (build_dtable_decl): Build an accurate dtable type when appropriate
12087 and use it.
12088
12089 2000-06-02 Richard Henderson <rth@cygnus.com>
12090
12091 * lang.c (lang_get_alias_set): New.
12092
12093 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12094
12095 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
12096 before using it as the accessed field.
12097
12098 2000-05-31 Tom Tromey <tromey@cygnus.com>
12099
12100 * java-tree.h (boolean_array_vtable, byte_array_vtable,
12101 char_array_vtable, short_array_vtable, int_array_vtable,
12102 long_array_vtable, float_array_vtable, double_array_vtable):
12103 Declare.
12104 * expr.c (get_primitive_array_vtable): New function.
12105 (create_primitive_vtable): New function.
12106 (java_lang_expand_expr): Enable code to statically generate
12107 arrays.
12108 * decl.c (init_decl_processing): Create primitive vtables.
12109 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
12110 short_array_vtable, int_array_vtable, long_array_vtable,
12111 float_array_vtable, double_array_vtable): Define.
12112
12113 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
12114
12115 * java/parse.y (find_applicable_accessible_methods_list):
12116 Don't add an uninitialized value to the list.
12117
12118 2000-05-25 Tom Tromey <tromey@cygnus.com>
12119
12120 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
12121 when trying to see if field's class should be initialized. Always
12122 initialize field's declaring class, not qualified class.
12123 For PR gcj/162.
12124
12125 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
12126 `wfl_operator', to maybe_build_primttype_type_ref.
12127 Fixes PR gcj/235.
12128
12129 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
12130
12131 * parse.y (patch_method_invocation): Don't try to lookup methods
12132 in primitive types.
12133
12134 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12135
12136 * parse.y (resolve_field_access): Call the appropriate <clinit>
12137 before accessing the length of a static array. Craft a decl for
12138 the field while its time. Fixes PR gcj/129.
12139
12140 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12141
12142 * parse.y (resolve_package): Correctly set `*next' (was off by
12143 one.)
12144 (resolve_qualified_expression_name): Fixed comment.
12145
12146 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12147
12148 * jcf-parse.c (jcf_parse_source): Reset current_class and
12149 current_function_decl to NULL before parsing a new file.
12150
12151 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12152
12153 * parse.y (block_end:): If the collected block doesn't feature a
12154 statement, insert an empty statement.
12155
12156 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12157
12158 * parse.y (maybe_yank_clinit): New function.
12159 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
12160 end of the list of methods belonging to a class.
12161 (java_complete_expand_method): Check whether <clinit> is really
12162 necessary and expand it accordingly.
12163
12164 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12165
12166 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
12167 processed by the method's switch statement.
12168
12169 2000-05-19 Tom Tromey <tromey@cygnus.com>
12170
12171 * java-tree.h: Added init state enum.
12172 * decl.c (emit_init_test_initialization): Initialize class
12173 initialization check variable by looking at class' state.
12174
12175 2000-05-19 Tom Tromey <tromey@cygnus.com>
12176
12177 * java-tree.h (build_instanceof): Declare.
12178 (build_get_class): Declare.
12179 * parse.y (patch_binop): Use build_instanceof.
12180 * expr.c (build_instanceof): New function. If class is final,
12181 don't make a function call.
12182 (expand_java_INSTANCEOF): Use it.
12183 (build_get_class): New function.
12184
12185 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
12186
12187 * jcf-write.c (generate_classfile): Scan the source_file for
12188 slashes with the right pointer variable.
12189
12190 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
12191
12192 * lang.c (lang_decode_option): Update -Wunused flags by calling
12193 set_Wunused.
12194 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
12195
12196 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
12197
12198 * check_init.c (check_init): Constify local char *.
12199 * class.c (push_class): Constify local char *.
12200 * java_tree.h: Update prototypes.
12201 * jcf-io.c (open_class): Constify filename parameter and
12202 return value.
12203 (find_class): Remove redundant string copy. Cast return from
12204 open_class.
12205 * jcf-parse.c (read_class, parse_class_file, yyparse):
12206 Constify local char *.
12207 * jcf-write.c (generate_bytecode_insns, generate_classfile):
12208 Constify local char *.
12209 * jcf.h (JCF): Constify filename and classname.
12210 (JCF_FINISH): Cast args to FREE to char * when appropriate.
12211 * lang.c (init_parse): Constify parameter and return value.
12212 * lex.c (java_get_line_col): Constify filename parameter.
12213 * parse.h: Constify parser_ctxt.filename. Update prototypes.
12214 * parse.y (java_parser_context_suspend,
12215 issue_warning_error_from_context, safe_layout_class): Constify
12216 local char *.
12217 * parse.c: Regenerate.
12218
12219 2000-05-08 Tom Tromey <tromey@cygnus.com>
12220
12221 * expr.c (build_jni_stub): Cache the result of
12222 _Jv_LookupJNIMethod.
12223
12224 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12225
12226 * decl.c (predef_filenames_size): Now 7.
12227 (predef_filenames): New seventh entry.
12228
12229 2000-05-04 Tom Tromey <tromey@cygnus.com>
12230
12231 * boehm.c (mark_reference_fields): Don't mark RawData fields.
12232 Keep track of when we've seen a reference field after a
12233 non-reference field.
12234 (get_boehm_type_descriptor): Handle case where we see
12235 non-reference fields but no trailing reference field.
12236 * decl.c (rawdata_ptr_type_node): Define.
12237 (init_decl_processing): Initialize rawdata_ptr_type_node.
12238 * java-tree.h (rawdata_ptr_type_node): Declare.
12239
12240 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12241
12242 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
12243 specifiers in calls to fprintf.
12244
12245 2000-05-03 Andrew Haley <aph@cygnus.com>
12246
12247 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
12248
12249 * javaop.h (WORD_TO_INT): New function.
12250 (IMMEDIATE_s4): Use WORD_TO_INT.
12251 * jcf.h (JPOOL_INT): Ditto.
12252
12253 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
12254 separator.
12255
12256 2000-04-19 Tom Tromey <tromey@cygnus.com>
12257
12258 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
12259 on native function.
12260 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
12261 JNI methods.
12262 * expr.c (build_jni_stub): New function.
12263 * lang-specs.h: -fjni and -femit-class-file are incompatible.
12264 * parse.c: Rebuilt.
12265 * parse.y (java_complete_expand_methods): Expand a native method
12266 and call build_jni_stub if -fjni given.
12267 * lang-options.h: Document -fjni.
12268 * lang.c (flag_jni): New global.
12269 (lang_f_options): Added `jni' entry.
12270 * java-tree.h (soft_lookupjnimethod_node,
12271 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
12272 Declare.
12273 (flag_jni): Declare.
12274 (build_jni_stub): Declare.
12275 (struct lang_decl): Added `native' flag.
12276 (METHOD_NATIVE): Redefined to use `native' field of lang specific
12277 structure.
12278 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
12279 soft_jnipopsystemframe_node): New globals.
12280 (init_decl_processing): Set them. _Jv_InitClass only takes one
12281 argument.
12282
12283 * java-tree.def: Put into `C' mode.
12284
12285 2000-04-27 Tom Tromey <tromey@cygnus.com>
12286
12287 Fix for PR gcj/2:
12288 * expr.c (expand_invoke): Generate check to see if object pointer
12289 is null in nonvirtual invocation case.
12290 * java-tree.h (soft_nullpointer_node): Declare.
12291 * decl.c (soft_nullpointer_node): New global.
12292 (init_decl_processing): Initialize soft_nullpointer_node.
12293 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12294 or `private' methods.
12295 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12296
12297 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
12298
12299 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12300 from <clinit>
12301
12302 2000-04-26 Tom Tromey <tromey@cygnus.com>
12303
12304 * zextract.c (find_zip_file_start): New function.
12305 (read_zip_archive): Use it.
12306
12307 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12308
12309 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
12310
12311 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12312
12313 * class.c (common_enclosing_context_p): New function.
12314 * java-tree.h (common_enclosing_context_p): Added prototype.
12315 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
12316 classes sharing an outer context with the current instance.
12317 * parse.y (build_access_to_thisn): Fixed leading comment.
12318 (verify_constructor_super): New local `supper_inner'. Skip
12319 enclosing context argument in the case of inner class constructors.
12320 (patch_method_invocation): Insert proper context as second
12321 parameter to pure inner class constructor super invocations.
12322
12323 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12324
12325 * parse.y (end_class_declaration): Reset the interface number
12326 counter.
12327
12328 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12329
12330 * parse.y (source_start_java_method): Deleted unnecessary code.
12331 (patch_method_invocation): Fixed comment.
12332
12333 2000-04-24 Robert Lipe <robertlipe@usa.net>
12334
12335 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
12336
12337 2000-04-23 Tom Tromey <tromey@cygnus.com>
12338
12339 * boehm.c (mark_reference_fields): Use int_byte_position.
12340
12341 2000-04-22 Tom Tromey <tromey@cygnus.com>
12342
12343 * boehm.c (mark_reference_fields): Only call byte_position on
12344 non-static fields.
12345
12346 2000-04-22 Tom Tromey <tromey@cygnus.com>
12347
12348 * boehm.c (mark_reference_fields): Added `last_view_index'
12349 argument. Use DECL_FIELD_OFFSET to determine field's offset.
12350
12351 2000-04-20 Mo DeJong <mdejong@cygnus.com>
12352
12353 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
12354 * parse.y (check_class_interface_creation): Fixed comments. Select
12355 permitted modifiers for (inner) interfaces. Changed error message
12356 to report rejected modifiers used with local classes.
12357
12358 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12359
12360 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
12361 of directly inherited type considered in scope.
12362 * parse.y (do_resolve_class): Search inherited classes for inner
12363 classes.
12364
12365 2000-04-20 Tom Tromey <tromey@cygnus.com>
12366
12367 * parse.y (not_accessible_p): Use member's class, not current
12368 class, when doing inheritance check for protected reference.
12369 Fixes PR gcj/124.
12370
12371 2000-04-20 Jason Schroeder <shrode@subnature.com>
12372
12373 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
12374
12375 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12376
12377 * parse.y (lookup_field_wrapper): Search for final local aliases.
12378 (resolve_expression_name): Let lookup_field_wrapper search for
12379 final local aliases. Force the value of `name' if one is found.
12380 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
12381 an expression name. Fixed comments.
12382
12383 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12384
12385 * parse.y (yyerror): `msg' can be null, don't use it in that case.
12386
12387 2000-04-19 Tom Tromey <tromey@cygnus.com>
12388
12389 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
12390
12391 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12392
12393 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
12394
12395 2000-04-18 Tom Tromey <tromey@cygnus.com>
12396
12397 PR gcj/211:
12398 * gjavah.c (utf8_cmp): Changed return value.
12399 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
12400 result.
12401 (cxx_keywords): New global.
12402 (get_field_name): Handle new result of cxx_keyword_subst.
12403 (print_method_info): Likewise.
12404
12405 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
12406
12407 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
12408 with a newline, for CNI.
12409 (print_stub_or_jni): Print a space or newline before method name for
12410 CNI as well as JNI.
12411 (print_cxx_classname): Don't write leading "::" in CNI stub method.
12412 (process_file): Include gcj/cni.h if generating CNI stubs.
12413
12414 2000-04-16 Tom Tromey <tromey@cygnus.com>
12415
12416 * gjavah.c (decompile_method): Use print_field_name.
12417 Fixes PR gcj/205.
12418
12419 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12420
12421 * parse.y (java_expand_classes): Reverse the package list once.
12422 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
12423 reduction.
12424 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
12425 the `==' and `!=' operators.
12426
12427 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12428
12429 * jcf-write.c (generate_bytecode_insns): At invocation time,
12430 always relate an interface method to the type of its selector.
12431
12432 2000-04-05 Tom Tromey <tromey@cygnus.com>
12433
12434 Fix for PR gcj/2:
12435 * expr.c (expand_invoke): Generate check to see if object pointer
12436 is null in nonvirtual invocation case.
12437 * java-tree.h (soft_nullpointer_node): Declare.
12438 * decl.c (soft_nullpointer_node): New global.
12439 (init_decl_processing): Initialize soft_nullpointer_node.
12440 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12441 or `private' methods.
12442 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12443
12444 2000-04-05 Tom Tromey <tromey@cygnus.com>
12445
12446 Fix for PR gcj/140:
12447 * parse.y (check_final_assignment): Recognize assignments to the
12448 `length' field of an array when generating class files.
12449
12450 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12451
12452 * class.c (decl_hash): Prototype removed.
12453 (decl_compare): Likewise.
12454
12455 2000-04-05 Tom Tromey <tromey@cygnus.com>
12456
12457 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
12458 * parse.y (check_modifiers_consistency): Check for final/volatile
12459 clash. Fixes PR gcj/164.
12460
12461 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12462
12463 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
12464 made global.
12465 (java_hash_compare_tree_node): Renamed from `decl_compare, made
12466 global.
12467 (add_method_1): Use `java_hash_hash_tree_node' and
12468 `java_hash_compare_tree_node'.
12469 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
12470 (java_hash_compare_tree_node): Likewise.
12471 * parse.y (find_applicable_accessible_methods_list): Create,
12472 delete and use a hash table to remember already searched interfaces.
12473
12474 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
12475
12476 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
12477 with latest entry.
12478
12479 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12480
12481 * boehm.c (mark_reference_fields, set_bit): Prototype.
12482 (set_bit): Un-ANSI-fy definition.
12483
12484 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
12485 Prototype.
12486
12487 * decl.c (emit_init_test_initialization): Likewise.
12488
12489 * gjavah.c (jni_print_char): Likewise.
12490
12491 * parse.y (create_new_parser_context): Likewise.
12492
12493 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12494
12495 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
12496 patch missing hunk. Fixed indentation.
12497
12498 2000-03-30 Tom Tromey <tromey@cygnus.com>
12499
12500 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
12501 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
12502
12503 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12504
12505 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12506 when negative *before* using it as an array index.
12507 * ChangeLog: Fixed typo.
12508
12509 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12510
12511 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12512 to 0 when it reaches -1.
12513
12514 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12515
12516 * jcf-parse.c (get_constant): Properly cast `num' during the
12517 invocation of `add_double'.
12518 * jcf-write.c (push_long_const): Properly cast `lo' before
12519 comparing it to short bounds.
12520 * parse-scan.y (interface_declaration:): Rule re-arrange so that
12521 `interface_body:' is reduced after the current interface is
12522 pushed.
12523
12524 2000-03-26 Tom Tromey <tromey@cygnus.com>
12525
12526 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
12527 Java-specific `-f' option.
12528
12529 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12530
12531 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
12532 Adjust order of making types.
12533 Make bitsize_*_node values.
12534
12535 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12536
12537 * class.c (make_field_value): Use byte_position.
12538 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
12539 (java_array_data_offset): Likewise.
12540 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
12541 bzero call.
12542
12543 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12544
12545 * parse.y (check_abstract_method_definitions): New local
12546 `end_type_reached'. Make sure we also consider `end_type'.
12547 (java_check_abstract_method_definitions): Make sure we eventually
12548 consider `java.lang.Object'.
12549 (maybe_use_access_method): Don't use access method if not in the
12550 context of a pure inner class or if the method's context is right.
12551 (find_applicable_accessible_methods_list): New static flag
12552 `object_done'. Don't search abstract classes as interfaces. Fixed
12553 indentation. Fixed the `java.lang.Object' only search. Search
12554 class interface(s) first, then fully search enclosing contexts.
12555 (find_most_specific_methods_list): Pick the closest candidate when
12556 they're all abstract.
12557
12558 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12559
12560 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12561 properly initialize `finished_label'. Don't emit gotos for empty
12562 try statements.
12563
12564 2000-03-19 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12565
12566 * except.c (emit_handlers): Clear catch_clauses_last.
12567
12568 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12569
12570 * parse.y (check_method_types_complete): New function.
12571 (create_class): Reset anonymous class counter only when seeing an
12572 non inner classe.
12573 (java_complete_class): JDEP_METHOD: Don't recompute signature
12574 if incomplete.
12575
12576 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12577
12578 * class.c (build_static_ref): Fixed indentation in comment.
12579 * java-tree.def (TRY_EXPR): Fixed typo in name.
12580 (CLASS_LITERAL): Likewise.
12581 * java-tree.h: (TYPE_DOT_CLASS): New macro.
12582 (struct lang_type): New field `dot_class'.
12583 * jcf-write.c (generate_bytecode_insns): Fixed error message.
12584 (generate_classfile): Method `class$' is synthetic.
12585 * parse.y (build_do_class_method): New function.
12586 (build_dot_class_method_invocation): Likewise.
12587 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
12588 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
12589 (qualify_ambiguous_name): Likewise.
12590 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
12591 (build_try_statement): Fixed leading comment.
12592
12593 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12594
12595 * class.c (make_field_value): Properly handle sizes.
12596 (get_dispatch_vector): Use tree_low_cst and host_integerp.
12597 (layout_class_method): Count using trees.
12598 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
12599 * expr.c (java_array_data_offset): Use int_bit_position.
12600 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
12601 (build_invokevirtual): Use tree_low_cst and do computations with trees.
12602
12603 2000-03-16 Tom Tromey <tromey@cygnus.com>
12604
12605 * lang.c (flag_hash_synchronization): New global.
12606 (lang_f_options): Added `hash-synchronization'.
12607 * lang-options.h: Mention -fhash-synchronization.
12608 * java-tree.h (flag_hash_synchronization): Declare.
12609 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
12610 hash table synchronization is disabled.
12611 * decl.c (init_decl_processing): Only push `sync_info' value when
12612 hash table synchronization is disabled.
12613 * class.c (make_class_data): Only push `sync_info' field when hash
12614 table synchronization is disabled. Removed dead code.
12615
12616 2000-03-16 Tom Tromey <tromey@cygnus.com>
12617
12618 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
12619
12620 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12621
12622 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
12623 classes.
12624 * parse.y (patch_method_invocation): Handle anonymous classes
12625 creation in static context.
12626
12627 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12628
12629 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
12630 * parse.y (resolve_qualified_expression_name): Use it.
12631 (patch_method_invocation): Likewise.
12632
12633 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12634
12635 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
12636 depending on the type of dependency which dictates what the
12637 current class is.
12638 (unresolved_type_p): Resolved types limited to the current class.
12639
12640 2000-03-15 Tom Tromey <tromey@cygnus.com>
12641
12642 * decl.c (init_decl_processing): Set type of `sync_info' to be
12643 pointer to Object.
12644
12645 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
12646 Correctly compute bit number for current slot. Zero `high' and
12647 `low' in DS_LENGTH case. Don't skip inherited fields. Use
12648 mark_reference_fields.
12649 (mark_reference_fields): New function.
12650
12651 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12652
12653 * parse.y (register_incomplete_type): Fixed initialization of
12654 JDEP_ENCLOSING.
12655
12656 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12657
12658 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
12659 static globals.
12660 (push_class_context, pop_class_context): New function.
12661 (class_body:): Call pop_class_context.
12662 (interface_body:): Likewise.
12663 (INNER_QUALIFIER): New macro.
12664 (report_class_declaration): Changed output format and use
12665 INNER_QUALIFIER. Call push_class_context.
12666
12667 2000-02-14 Andrew Haley <aph@cygnus.com>
12668
12669 * check-init.c (check_init): Add new cases for unary and binary
12670 tree nodes.
12671
12672 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12673
12674 * parse.y (resolve_package): Set `next' once a type name has been
12675 progressively discovered.
12676 (resolve_qualified_expression_name): Propagate resolution only if
12677 there are remaining qualifiers. Take into account `q' might have
12678 been cleared after re-qualification.
12679 * parse.y (patch_method_invocation): New local `resolved'.
12680 Section dealing with qualified expression rewritten to use
12681 resolve_field_access.
12682
12683 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12684
12685 * parse.h (PUSH_CPC): Fixed indentation.
12686 (DEBUG_CPC): New macro.
12687 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
12688 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
12689 * parse.y (class_body_declaration:): Use
12690 SET_CPC_INSTANCE_INITIALIZER_STMT.
12691 (method_declaration:): Check for null current_function_decl.
12692 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
12693 (java_parser_context_pop_initialized_field): Better handling of
12694 empty lists.
12695 (maybe_make_nested_class_name): Mark nested class name as
12696 qualified when necessary.
12697 (end_class_declaration): Don't call java_parse_context_resume when
12698 one or more error occurred.
12699 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
12700 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
12701 SET_CPC_INITIALIZER_STMT.
12702 (method_header): Check for inner classes declaring static methods.
12703 (resolve_qualified_expression_name): Handle situation where `this'
12704 is implied.
12705
12706 2000-03-13 Hans Boehm <boehm@acm.org>
12707
12708 * typeck.c (build_prim_array_type): Correctly set the high word too.
12709
12710 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12711
12712 * parse.y (java_complete_expand_methods): Leave <clinit> out of
12713 ordinary methods.
12714 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
12715 list of methods for interfaces.
12716
12717 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12718
12719 * parse.y (qualify_ambiguous_name): Properly handle expressions
12720 using `null'.
12721
12722 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12723
12724 * parse.y (check_final_assignment): Extended to process
12725 COMPOUND_EXPR.
12726 (patch_assignment): Have check_final_assignment called only once.
12727
12728 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12729
12730 * java-tree.h (IS_INIT_CHECKED): New flag.
12731 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
12732 * parse.y (patch_string): Call force_evaluation_order on the
12733 completed string concatenation tree.
12734 * expr.c (force_evaluation_order): Call force_evaluation_order on
12735 function's arguments too.
12736
12737 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12738
12739 * decl.c (emit_init_test_initialization): Mark KEY as unused.
12740 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
12741 (build_anewarray): Likewise.
12742 * parse.y (patch_newarray): Likewise.
12743 * parse.c: Regenerated.
12744
12745 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
12746
12747 * decl.c (init_decl_processing): Added new class fields `depth',
12748 `ancestors', and `idt' to class_type_node. Use
12749 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
12750 * class.c (make_class_data): Push initial values for new fields.
12751 * java-tree.h: Updated prototype for `build_invokeinterface'.
12752 * expr.c (build_invokeinterface): Changed parameters to accept
12753 `method' tree. Calculate index of `method' in its declaring
12754 interface. Build call to _Jv_LookupInterfaceMethodIdx.
12755 (expand_invoke): Call `build_invokeinterface' with new parameters.
12756 * parse.y (patch_invoke): Call `build_invokeinterface' with new
12757 parameters.
12758
12759 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
12760
12761 * typeck.c (lookup_do): Search superinterfaces first
12762 when looking up an interface method. From Godmar Back
12763 <gback@cs.utah.edu>
12764
12765 2000-03-06 Tom Tromey <tromey@cygnus.com>
12766
12767 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
12768
12769 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12770
12771 * java-tree.h (lookup_argument_method2): Declared.
12772 (safe_layout_class): Prototype moved from parse.h.
12773 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
12774 * parse.y (java_check_regular_methods): Local `super_class' gone.
12775 Call lookup_argument_method2 instead of lookup_argument_method.
12776 Perform modifier match for methods found declared in implemented
12777 interfaces. Fixed indentation problem. Overriding/hiding error
12778 report to take place only for methods found in classes.
12779 * typeck.c (lookup_argument_method): Changed leading
12780 comment. Re-written by calling lookup_do.
12781 (lookup_argument_method2): New function.
12782 (lookup_java_method): Re-written by calling lookup_do.
12783 (lookup_do): New function.
12784
12785 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12786
12787 * check-init.c (check_init): Removed dead code. Handle (blank)
12788 final variables.
12789 * parse.y (declare_local_variables): New local `final_p', set it
12790 and use it to initialize LOCAL_FINAL.
12791 (check_final_assignment): Only check FIELD_DECLs.
12792
12793 2000-02-17 Tom Tromey <tromey@cygnus.com>
12794
12795 * Makefile.in (JAVA_OBJS): Added boehm.o.
12796 (boehm.o): New target.
12797 * Make-lang.in (JAVA_SRCS): Added boehm.c.
12798 * java-tree.h (flag_use_boehm_gc): Declare.
12799 (get_boehm_type_descriptor): Declare.
12800 * lang.c (lang_f_options): Added `use-boehm-gc'.
12801 (flag_use_boehm_gc): New global.
12802 * lang-options.h: Added -fuse-boehm-gc.
12803 * boehm.c: New file.
12804 * class.c (get_dispatch_table): If class uses a Boehm type
12805 descriptor, put it in the vtable.
12806 (make_class_data): Removed dead code.
12807
12808 2000-03-03 Per Bothner <per@bothner.com>
12809
12810 * decl.c (init_decl_processing): Initialize sizetype properly.
12811
12812 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12813
12814 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
12815 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
12816 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12817 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
12818 (jcf_parse): New local `current'. Load innerclasses seen in outer
12819 context being processed.
12820 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12821 * jcf-write.c (append_innerclasses_attribute): New function.
12822 (append_innerclasses_attribute_entry): Likewise.
12823 (get_access_flags): Handle static classes. Set anonymous and local
12824 classes to be private.
12825 (generate_classfile): Attribute count adjusted. Call
12826 append_innerclasses_attribute.
12827 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
12828 PURE_INNER_CLASS_TYPE_P.
12829 * parse.y (parser_qualified_classname): New parameter `is_static',
12830 produce non qualified name accordingly.
12831 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
12832 (create_interface): Added argument to parser_qualified_classname.
12833 (create_class): Added argument to parser_qualified_classname. Setup
12834 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
12835 (add_inner_class_fields): Fixed indentation.
12836 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
12837 (method_declarator): Fixed typo in comment.
12838 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
12839 (build_current_thisn): Likewise.
12840 (patch_method_invocation): Likewise.
12841
12842 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
12843
12844 * decl.c (current_function_decl): Move to toplev.c.
12845
12846 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12847
12848 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
12849 (DECL_BIT_INDEX): Use underlying representation.
12850 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
12851
12852 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12853
12854 * expr.c (build_java_ret): Pass proper type to size_binop.
12855
12856 2000-02-25 Anthony Green <green@cygnus.com>
12857
12858 * expr.c (build_class_init): Mark the decl to be ignored by
12859 check_init.
12860 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
12861 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
12862 * class.c (init_test_hash_newfunc): New function.
12863 (decl_hash): New function.
12864 (decl_compare): New function.
12865 * decl.c (emit_init_test_initialization): New function.
12866 (complete_start_java_method): Traverse the init test hashtable,
12867 calling emit_init_test_initialization.
12868 (always_initialize_class_p): Define.
12869 * expr.c (build_class_init): Use initialization tests when
12870 emitting class initialization code.
12871 (always_initialize_class_p): Declare.
12872 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
12873 1.
12874 * java-tree.h: Include hash.h.
12875 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
12876 (struct lang_decl): Add init_test_table field.
12877 (init_test_hash_entry): Define.
12878
12879 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12880
12881 * gjavah.c (main): Avoid using `argi' to report unimplemented
12882 options.
12883
12884 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12885
12886 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12887 initialize locals to avoid warnings. Local `exception_type' moved
12888 into if statement.
12889
12890 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12891
12892 * parse.y (resolve_expression_name): Use `orig' as a second
12893 argument to resolve_field_access.
12894 (resolve_field_access): Removed unnecessary code when dealing with
12895 static fields.
12896
12897 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12898
12899 * class.c (push_super_field): Don't push the field twice.
12900 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
12901 * parse.h (java_reorder_fields): Prototyped.
12902 * parse.y (java_reorder_fields): New function.
12903 (java_layout_class): Simplified not to worry about re-ordering.
12904
12905 2000-02-23 Tom Tromey <tromey@cygnus.com>
12906
12907 * gjavah.c (print_name): In JNI case, correctly quote string.
12908 (print_method_info): Don't handle overrides in JNI mode.
12909
12910 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12911
12912 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
12913 value type set to `boolean_type_node'.
12914
12915 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
12916
12917 * jcf-dump.c (main): Test for correct condition after
12918 output file creation.
12919
12920 2000-02-19 Anthony Green <green@cygnus.com>
12921
12922 * jcf-depend.c (add_entry): Fix test for first list entry.
12923
12924 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12925
12926 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
12927 * constants.c (build_constants_constructor): Likewise.
12928
12929 2000-02-19 Anthony Green <green@cygnus.com>
12930
12931 * jcf-depend.c (add_entry): Add entries to the end of the list.
12932
12933 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
12934
12935 * decl.c (INT_TYPE_SIZE): Define if necessary.
12936 (expand_java_return): Handle the case of a native integer smaller
12937 than a JVM integer.
12938
12939 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
12940
12941 * gjavah.c (help): Use GCCBUGURL.
12942 * jv-scan.c (help): Likewise.
12943 * jcf-dump.c (help): Likewise.
12944
12945 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12946
12947 * jcf-write.c (generate_bytecode_insns): Don't generate empty
12948 `finally' clauses.
12949
12950 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12951
12952 * jcf-parse.c (load_class): Call `fatal' if no file containing
12953 the target class are found.
12954
12955 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
12956
12957 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
12958 lex.c, lex.h, and PARSE_H to...
12959 (parse.o, parse-scan.o): ...here, respectively.
12960
12961 * lex.c: Split out code that may trigger SIGFPE from yylex()
12962 to its own function.
12963 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
12964
12965 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12966
12967 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
12968
12969 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12970
12971 * parse.y (outer_field_access_p): Stop in time when outer contexts
12972 are exhausted.
12973 (resolve_qualified_expression_name): Properly qualify *everything*
12974 after a package.type to be resoled as expression names.
12975 (find_applicable_accessible_methods_list): Save/restore `class' to
12976 isolate it from a possible outer context search.
12977
12978 2000-02-15 Tom Tromey <tromey@cygnus.com>
12979
12980 * gjavah.c (jni_print_char): New function.
12981 (print_full_cxx_name): Use it.
12982 (decode_signature_piece): Likewise.
12983 (print_cxx_classname): Likewise.
12984
12985 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12986
12987 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
12988 version.o.
12989 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
12990
12991 * gjavah.c: Include version.h.
12992
12993 * jcf-dump.c: Likewise.
12994
12995 * jv-scan.c: Likewise.
12996
12997 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
12998
12999 * parse.y (outer_field_access_fix): First parameter now a tree
13000 node. Check for assignment to final. First argument to
13001 build_outer_field_access_fix modified to accommodate prototype.
13002 (build_outer_field_access): Don't check for assignment to final
13003 here.
13004 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
13005 possibly returned by outer_field_access_fix. Changed
13006 outer_field_access_fix's first argument.
13007 (check_final_assignment): $finit$'s context is OK.
13008 (patch_unaryop): Use node instead of its line/column value when
13009 calling outer_field_access_fix.
13010
13011 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13012
13013 * parse.y (interface_declaration:): No longer tagged
13014 <node>. Re-installed default action.
13015 (class_member_declaration:): Handle inner interfaces.
13016 (interface_member_declaration): Handle inner interfaces and
13017 classes.
13018 (create_interface): Push error if one seen. Suspend parsing
13019 context when processing an inner interface.
13020 (register_fields): Inner class static field limitations not to
13021 apply to inner interfaces.
13022
13023 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13024
13025 * jcf-parse.c (load_class): Update `java_error_count' when a
13026 class' file can't be found.
13027 (parse.y): Avoid (byte)code generation when errors seen.
13028
13029 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13030
13031 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
13032 decodes a valid node.
13033 (patch_binop): Handle TRUNC_DIV_EXPR.
13034
13035 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13036
13037 * parse.y (resolve_package): New local `acc'. Try to progressively
13038 build and guess a package and type name.
13039
13040 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13041
13042 * parse.y (find_applicable_accessible_methods_list): Load and
13043 layout the search class if necessary.
13044 (java_complete_tree): Keep to original type of the folded initial
13045 value.
13046
13047 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13048
13049 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
13050 Generate error message if circularity is detected. New static
13051 local `list'.
13052 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
13053 * jcf-write.c (generate_bytecode_insns): Very simply handle
13054 SAVE_EXPR.
13055 * parse.y (java_check_circular_reference): Use
13056 `cyclic_inheritance_report' during report, if necessary.
13057 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
13058 walking NEW_ARRAY_INIT twice.
13059
13060 2000-02-09 Tom Tromey <tromey@cygnus.com>
13061
13062 * parse.y (check_class_interface_creation): Allow inner classes to
13063 be `private' or `protected', check modifiers' consistency. Prevent
13064 block local classes from bearing any modifiers.
13065
13066 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13067
13068 * except.c (check_start_handlers): Re-add prototype lost in last
13069 patch.
13070 (maybe_start_try): Remove excess argument to `check_start_handlers'.
13071
13072 2000-02-09 Andrew Haley <aph@cygnus.com>
13073
13074 * decl.c (clear_binding_level): Remove excess initializer.
13075 (maybe_poplevels): Remove unused variable.
13076 (force_poplevels): Ditto.
13077 (struct binding_level): Add comment.
13078
13079 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13080
13081 * jcf-write.c (generate_classfile): Don't consider
13082 pre-initialization with reference value (use <clinit> instead.)
13083 * parse.y (java_fix_constructors): No generated constructor for
13084 interfaces.
13085 (build_outer_field_access): Removed debug message.
13086 (outer_field_expanded_access_p): Adapted to bytecode generation.
13087 (build_outer_field_access_method): Use fix_method_argument_names.
13088 (build_outer_method_access_method): Fixed indentation. Added
13089 comment. Handle access method generation for static and also void
13090 methods.
13091 (build_access_to_thisn): Inserted debug message.
13092 (maybe_build_thisn_access_method): Use fix_method_argument_names.
13093 (resolve_qualified_expression_name): Fixed comment.
13094 (not_accessible_p): Adapted to bytecode generation. Added comment.
13095 (patch_method_invocation): Added comment.
13096 (maybe_use_access_method): Fixed leading comment. Handle static
13097 methods.
13098 (java_complete_lhs): Don't shortcut handling of initialized upon
13099 declaration String type static fields when generating bytecode.
13100 (patch_unaryop): Handle outer field access when generating
13101 bytecode.
13102
13103 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
13104
13105 * java-tree.h (FIELD_THISN): New macro.
13106 * jcf-write.c (append_synthetic_attribute): New function.
13107 (generate_classfile): Set "Synthetic" attribute on this$<n>,
13108 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
13109 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
13110 this$<n> fields.
13111 (build_outer_field_access): Turned on access functions usage and
13112 generation when compiling to bytecode.
13113 (maybe_use_access_method): Likewise.
13114
13115 2000-01-25 Andrew Haley <aph@cygnus.com>
13116
13117 * java-except.h (struct eh_range): Add `expanded' field.
13118 (maybe_start_try): Add end_pc arg.
13119 (maybe_end_try): Ditto.
13120 * java-tree.h (force_poplevels): new function.
13121 * expr.c (expand_byte_code): Don't call maybe_start_try or
13122 maybe_end_try.
13123 * except.c (add_handler): Reset expanded.
13124 (expand_start_java_handler): Set expanded.
13125 (check_start_handlers): Don't expand a start handler that's
13126 already been expanded.
13127 (maybe_start_try): Add end_pc arg. Only expand a handler which
13128 ends after end_pc.
13129 (expand_end_java_handler): call force_poplevels.
13130 (force_poplevels): new function.
13131 * decl.c (binding_level): Add start_pc of binding level.
13132 (maybe_pushlevels): Call maybe_start_try when pushing binding
13133 levels.
13134 (maybe_poplevels): Call maybe_end_try when popping binding levels.
13135 (LARGEST_PC): Define.
13136 (clear_binding_level): Use LARGEST_PC.
13137
13138 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
13139 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
13140 (binding_depth, is_class_level, current_pc): new variables.
13141 (struct binding_level): ditto.
13142 (indent): new function.
13143 (push_jvm_slot): add debugging info.
13144 (maybe_pushlevels): ditto.
13145 (maybe_poplevels): ditto.
13146 (pushlevel): ditto.
13147 (poplevel): ditto.
13148 (start_java_method): ditto.
13149 (give_name_to_locals): comment only.
13150 * except.c (binding_depth, is_class_level, current_pc):
13151 new variables.
13152 (expand_start_java_handler): add debugging info.
13153 (expand_end_java_handler): ditto.
13154
13155 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13156
13157 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
13158 (print_name_for_stub_or_jni, process_file): Constify a char*.
13159
13160 2000-02-03 Tom Tromey <tromey@cygnus.com>
13161
13162 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
13163
13164 2000-01-31 Scott Bambrough <scottb@netwinder.org>
13165
13166 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
13167 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
13168 defined to be 1.
13169
13170 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13171
13172 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
13173 * java-tree.h (TYPE_II_STMT_LIST): New macro.
13174 (struct lang_type): New field `ii_block'.
13175 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
13176 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
13177 * parse.h (struct parser_ctxt): New field `instance_initializers'.
13178 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
13179 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
13180 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
13181 macros.
13182 * parse.y (add_instance_initializer): New function.
13183 (in_instance_initializer): New static global.
13184 (class_body_declaration:): Link instance initializer block.
13185 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
13186 (array_creation_expression:): Remove unused local.
13187 (java_parser_context_push_initialized_field): Fixed leading
13188 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
13189 CPC_INSTANCE_INITIALIZER_LIST.
13190 (java_parser_context_pop_initialized_field): Likewise.
13191 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
13192 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
13193 CPC_INITIALIZER_STMT.
13194 (fix_constructors): New local `class_type'. Use it. Call
13195 add_instance_initializer.
13196 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
13197 (patch_return): Forbid return in instance initializers.
13198 (patch_throw_statement): Enforce exception handling in the context
13199 of instance initializers.
13200
13201 2000-02-03 Tom Tromey <tromey@cygnus.com>
13202
13203 * Make-lang.in (java.mostlyclean): Remove executables in
13204 `mostlyclean'.
13205
13206 2000-01-31 Scott Bambrough <scottb@netwinder.org>
13207
13208 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
13209 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
13210 (java_float_finite): Convert to use union Word from javaop.h.
13211 (java_double_finite): Convert to use union DWord from javaop.h.
13212
13213 2000-02-02 Tom Tromey <tromey@cygnus.com>
13214
13215 * gjavah.c (options): Added `jni' entry.
13216 (help): Document -jni.
13217 (flag_jni): New global.
13218 (process_file): Handle JNI output. Don't print text from
13219 -prepend, -add, etc, when generating stubs. Only remove `.class'
13220 suffix if it actually exists.
13221 (main): Create a `.c' file when run with `--jni --stubs'. Create
13222 correct output file name with `--jni'.
13223 (print_include): Mangle header name differently in JNI case.
13224 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
13225 method list.
13226 (print_method_info): Handle JNI case. Put signature info into
13227 method name. Handle case when STREAM is NULL.
13228 (print_name_for_stub_or_jni): New function.
13229 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
13230 (print_cxx_classname): Handle JNI.
13231 (print_full_cxx_name): Likewise.
13232 (decode_signature_piece): Likewise.
13233 (overloaded_jni_method_exists_p): New function.
13234 (struct method_name): Added `signature' and `sig_length' fields.
13235 (HANDLE_END_FIELD): Do nothing in JNI mode.
13236
13237 2000-02-02 Tom Tromey <tromey@cygnus.com>
13238
13239 * jv-scan.c: Include version.c, <getopt.h>.
13240 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
13241 (options): New array.
13242 (usage): New function.
13243 (version): New function.
13244 (main): Use getopt_long to parse command line.
13245 * jcf-dump.c: Include version.c, <getopt.h>.
13246 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
13247 OPT_JAVAP): New macros.
13248 (options): New array.
13249 (usage): Return `void'. Changed message.
13250 (help): New function.
13251 (version): New function.
13252 (main): Use getopt_long_only to parse command line.
13253 * gjavah.c: Include <getopt.h>.
13254 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
13255 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
13256 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
13257 (options): New array.
13258 (java_no_argument): Removed.
13259 (help): Updated with missing options.
13260 (main): Use getopt_long_only to parse command line.
13261 (usage): Changed message.
13262
13263 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13264
13265 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
13266 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
13267 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
13268 * parse.y (array_creation_expression:): Handle anonymous arrays.
13269 (build_array_from_name): Don't set `ret_name' if null.
13270 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
13271 (qualify_ambiguous_name): Likewise.
13272 (java_complete_expand_class): Likewise.
13273
13274 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13275
13276 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
13277 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
13278 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
13279 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
13280 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
13281 AIPL_FUNCTION_COMPLETED_INVOCATION.
13282 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
13283 AIPL_FUNCTION_INVOCATION_READY.
13284 (AIPL_FUNCTION_DECLARATION): New enum entry.
13285 * parse.y (reorder_static_initialized): New function.
13286 (java_parser_context_pop_initialized_field): Use it.
13287 (add_inner_class_fields): Use
13288 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
13289 augmented. Install marker after last alias initializer, if any.
13290 (generate_finit): Fixed typo. Don't try to retain only the used
13291 fields.
13292 (method_header): Compute and set DECL_FUNCTION_NAP.
13293 (method_declarator): Fixed comment. Insert alias initializer in
13294 parameter list.
13295 (build_alias_initializer_parameter_list): Fixed leading
13296 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
13297 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
13298 (java_complete_expand_class): Code to retain only used aliases
13299 removed.
13300 (java_complete_expand_methods): New local `first_decl'. Generate
13301 $finit$ first, then expand the constructors, regular methods and
13302 <clinit>.
13303 (java_complete_expand_method): Don't report error on missing
13304 return statement if previously detected bogus.
13305 (fix_constructors): Don't patch constructor parameters list.
13306 (patch_method_invocation): Use new AIPL enum values. Reverse
13307 alias initializer list for anonymous classes.
13308
13309 2000-01-30 Anthony Green <green@redhat.com>
13310
13311 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
13312 determine how many stack slots to pop.
13313
13314 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13315
13316 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
13317 error handling/recovery.
13318 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
13319
13320 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13321
13322 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
13323 FIELD_LOCAL_ALIAS_USED): New macros.
13324 (DECL_FUNCTION_NAP): New macro.
13325 (struct lang_decl): New field `nap'.
13326 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
13327 (struct lang_type): New fields `finit_stmt_list' and
13328 `clinit_stmt_list'.
13329 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
13330 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
13331 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
13332 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
13333 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
13334 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
13335 (BUILD_THROW): Macro line separator re-indented.
13336 * parse.y (end_class_declaration): New function.
13337 (maybe_generate_pre_expand_clinit): New name for
13338 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
13339 pre-expand static fields.
13340 (maybe_generate_clinit): Function deleted.
13341 (check_for_static_method_reference): Prototype's parameter list
13342 indented.
13343 (generate_finit): New name for maybe_generate_finit. Changed
13344 leading comment. Function rewritten to use
13345 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
13346 (build_alias_initializer_parameter_list): New function.
13347 (java_parser_context_pop_initialized_field): Likewise.
13348 (add_inner_class_fields): Likewise.
13349 (type_declaration:): Call end_class_declaration.
13350 (class_member_declaration:): Likewise.
13351 (formal_parameter_list:): Fixed typos.
13352 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
13353 element. Improved error handling.
13354 (block_statement:): Call end_class_declaration.
13355 (anonymous_class_creation:): Likewise.
13356 (create_anonymous_class): Fixed comments.
13357 (create_class): Call add_inner_class_fields.
13358 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
13359 (method_header): Use MARK_FINAL_PARMS.
13360 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
13361 (method_declarator): Propagate final argument flag.
13362 (craft_constructor): New local `artificial'. Call
13363 build_alias_initializer_parameter_list. Use
13364 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
13365 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
13366 necessary.
13367 (complete_expand_class): Get rid of unused outer context local
13368 alias fields.
13369 (java_complete_expand_methods): Fixed leading
13370 comment. Generate/pre-expand <clinit> first. Changed method
13371 expansion order to regular, $finit$, constructors, <clinit>.
13372 (java_complete_expand_method): Set current_function_decl.
13373 (fix_constructors): Fix constructor parameter list to account for
13374 outer context local alias initializers.
13375 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13376 (resolve_expression_name): Lookup outer context local aliases. New
13377 local `access', use it.
13378 (patch_method_invocation): Patch inner class ctor invocation with
13379 outer context local aliases initialization values. $finit$
13380 invocation patching now includes things generated with
13381 build_alias_initializer_parameter_list.
13382 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13383 (build_super_invocation): Likewise.
13384 (patch_assignment): Changed comment.
13385
13386 2000-01-27 Andrew Haley <aph@cygnus.com>
13387
13388 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
13389 (emit_if): Ditto.
13390 (emit_jsr): Ditto.
13391
13392 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13393
13394 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
13395 concatenation.
13396 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
13397
13398 * parse.y (register_fields): Don't pass a format specifier to
13399 OBSOLETE_MODIFIER_WARNING.
13400 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
13401 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
13402 specifier.
13403 (check_modifiers): Change function into a macro.
13404 (check_class_interface_creation): Pass a literal format string.
13405
13406 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13407
13408 * buffer.h: PROTO -> PARAMS.
13409 * check-init.c: Likewise.
13410 * class.c: Likewise.
13411 * constants.c: Likewise.
13412 * convert.h: Likewise.
13413 * decl.c: Likewise.
13414 * except.c: Likewise.
13415 * expr.c: Likewise.
13416 * gjavah.c: Likewise.
13417 * java-except.h: Likewise.
13418 * java-tree.h: Likewise.
13419 * jcf-depend.c: Likewise.
13420 * jcf-dump.c: Likewise.
13421 * jcf-parse.c: Likewise.
13422 * jcf-path.c: Likewise.
13423 * jcf-reader.c: Likewise.
13424 * jcf-write.c: Likewise.
13425 * jcf.h: Likewise.
13426 * jv-scan.c: Likewise.
13427 * jvgenmain.c: Likewise.
13428 * jvspec.c: Likewise.
13429 * lang.c: Likewise.
13430 * lex.c: Likewise.
13431 * lex.h: Likewise.
13432 * parse-scan.y: Likewise.
13433 * parse.h: Likewise.
13434 * parse.y: Likewise.
13435 * typeck.c: Likewise.
13436 * verify.c: Likewise.
13437 * xref.c: Likewise.
13438 * xref.h: Likewise.
13439 * zextract.c: Likewise.
13440 * zipfile.h: Likewise.
13441
13442 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
13443
13444 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13445 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
13446 * constants.c (build_constant_data_ref): Check for cached
13447 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
13448 in TYPE_CPOOL_DATE_REF.
13449 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
13450 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
13451 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
13452 (LOCAL_FINAL): New macro.
13453 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
13454 constant pool -- don't try to reuse.
13455 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
13456 TYPE_LANG_SPECIFIC.
13457 (find_in_current_zip): Use TYPE_JCF.
13458 * parse.h (java_check_final): Prototype removed.
13459 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
13460 (maybe_create_class_interface_decl,
13461 check_class_interface_creation): Likewise.
13462 (java_expand_finals): Function removed.
13463 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
13464 (block_statement:): Fixed comment.
13465 (anonymous_class_creation:): Likewise.
13466 (check_class_interface_creation): Reversed Jan 12, 2000 extra
13467 argument patch.
13468 (check_class_interface_creation): Loosened error report on (inner)
13469 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
13470 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
13471 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
13472 argument patch.
13473 (create_interface): Likewise.
13474 (anonymous_class_counter): New static global.
13475 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
13476 patch. Fixed comments.
13477 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
13478 anonymous_class_counter when declaring a toplevel class.
13479 (craft_constructor): Fixed constructor name when handling
13480 anonymous classes. Anonymous class constructors to feature hidden
13481 this$<n> parameter.
13482 (java_fix_constructors): Added comment.
13483 (java_check_final): Function removed.
13484 (java_complete_expand_methods): Fixed comment. Don't generate
13485 class data, save its outgoing constant pool instead.
13486 (verify_constructor_super): Skip anonymous class constructor
13487 hidden this$<n> parameter.
13488 (java_expand_classes): New local `saved_ctxp'. Removed call to
13489 java_expand_finals and java_check_final. Expand anonymous class
13490 constructors. Generate class data.
13491 (build_super_invocation): Skip anonymous class hidden this$<n>
13492 parameter.
13493 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
13494 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13495 (set_java_signature): Likewise.
13496
13497 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
13498
13499 * gjavah.c: Delete ACC_VISIBILITY define.
13500 * jcf.h: Add ACC_VISIBILITY define.
13501 * parse.y: final: rule tagged <value>.
13502 (java_check_regular_methods): Use ACC_VISIBILITY define for
13503 default package access check.
13504 (local_variable_declaration_statement): Use final: rule.
13505
13506 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
13507
13508 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
13509 (final:): New rule.
13510
13511 2000-01-17 Tom Tromey <tromey@cygnus.com>
13512
13513 * gjavah.c (print_field_info): Allow non-static final fields.
13514
13515 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13516
13517 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
13518 * parse.y (patch_anonymous_class): New function.
13519 (create_anonymous_class): Register incomplete type when the
13520 class/interface to extends/implement isn't known yet.
13521 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
13522 (verify_constructor_super): Tuned error message.
13523
13524 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13525
13526 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
13527 (ANONYMOUS_CLASS_P): New macro.
13528 (TYPE_SIGNATURE, TYPE_JCF): New macros.
13529 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
13530 * parse.y (create_class): Added leading argument.
13531 (maybe_create_class_interface_decl,
13532 check_class_interface_creation): Likewise.
13533 (craft_constructor): New function.
13534 (verify_constructor_super): Added argument in prototype.
13535 (class_declaration:): Inserted leading argument.
13536 (for_begin:): Use FOR_LOOP_P.
13537 (anonymous_class_creation): Create WFL of the anonymous class to
13538 instantiate. Call build_new_invocation. Added comments.
13539 (check_class_interface_creation): Handle parameter `anonymous' in
13540 verbose mode class creation announce.
13541 (link_nested_class_to_enclosing): Exclude anonymous classes.
13542 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
13543 anonymous class, even though they appear to have an enclosing
13544 context.
13545 (create_interface): Pass extra argument to
13546 check_class_interface_creation.
13547 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
13548 (create_class): Call check_class_interface_creation and
13549 maybe_create_class_interface_decl with extra new argument. Don't
13550 add private this$<n> to anonymous classes.
13551 (method_declarator): Insert hidden this$<n> to anonymous class
13552 constructors.
13553 (java_fix_constructors): Deleted code creating default
13554 constructor. Call craft_constructor instead.
13555 (java_check_regular_methods): Set `saw_constructor' to 1 for
13556 anonymous classes.
13557 (fix_constructors): Pass extra argument to verify_constructor_super.
13558 (verify_constructor_super): New local `sdecl', use it. Search for
13559 matching constructor (possibly featuring arguments) in super
13560 class.
13561 (lookup_method_invoke): Craft constructor according to arguments
13562 list when dealing with anonymous class constructors.
13563 (build_super_invocation): Pass arguments to anonymous class super
13564 constructors.
13565 (search_loop): Use FOR_LOOP_P.
13566 (labeled_block_contains_loop_p): Likewise.
13567
13568 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
13569
13570 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
13571 (enclosing_context_p): New function.
13572 (get_access_flags_from_decl): Handle CLASS_STATIC.
13573 (maybe_layout_super_class): Extra first argument passed to
13574 do_resolve_class.
13575 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
13576 ID_INIT_P.
13577 * decl.c (access0_identifier_node): New global.
13578 (init_decl_processing): access0_identifier_node initialized.
13579 (pushdecl): Set DECL_CONTEXT only on non type decls.
13580 * expr.c (lookup_field): Lookup inner class fields in enclosing
13581 contexts.
13582 (expand_invoke): Use ID_INIT_P.
13583 (expand_java_field_op): Use DECL_CLINIT_P.
13584 * java-tree.def (CLASS_LITERAL): New tree code.
13585 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
13586 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
13587 (struct lang_decl): New field `inner_access'.
13588 (enclosing_context_p): Prototyped.
13589 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
13590 ID_CLINIT_P): New macros.
13591 (CLASS_STATIC): New macro.
13592 (CLASS_ACCESS0_GENERATED_P): New macro.
13593 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
13594 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
13595 INNER_CLASS_P): New macros.
13596 (DECL_INNER_CLASS_LIST): New macro.
13597 * jcf-parse.c (yyparse): Avoid the use of ANSI string
13598 concatenation.
13599 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13600 the shift value to int. Fixed typo in comment.
13601 * lex.c (inst_id, wpv_id): Initialize.
13602 * mangle.c (unicode_mangling_length): Take `$' into account.
13603 * parse.h (DRECOVER, RECOVER): Terminate properly.
13604 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
13605 (typedef struct _jdep): New field `enclosing'.
13606 (JDEP_ENCLOSING): New macro.
13607 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
13608 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
13609 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
13610 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
13611 GET_ENCLOSING_CPC_CONTEXT): New macros.
13612 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
13613 (do_resolve_class): Added extra argument in prototype.
13614 * parse.y (resolve_class): Added extra argument in prototype.
13615 (maybe_create_class_interface_decl): Likewise.
13616 (maybe_use_access_method, build_wfl_wrap): New functions.
13617 (java_complete_expand_classes, java_complete_expand_class):
13618 Likewise.
13619 (java_parser_context_push_initialized_field,
13620 java_parser_context_suspend, java_parser_context_resume):
13621 Likewise.
13622 (maybe_make_nested_class_name, make_nested_class_name,
13623 set_nested_class_simple_name_value,
13624 link_nested_class_to_enclosing, find_as_inner_class,
13625 find_as_inner_class_do, check_inner_class_redefinition,
13626 build_thisn_assign, build_current_thisn, build_access_to_thisn,
13627 maybe_build_thisn_access_method, build_outer_field_access,
13628 build_outer_field_access_methods, build_outer_field_access_expr,
13629 build_outer_method_access_method, build_new_access_id,
13630 build_outer_field_access_method, outer_field_access_p,
13631 outer_field_expanded_access_p, outer_field_access_fix,
13632 build_incomplete_class_ref, patch_incomplete_class_ref,
13633 create_anonymous_class): Likewise.
13634 (inst_id, wpv_id): New static global variables.
13635 (synchronized:): New rule, tagged <node>.
13636 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
13637 rules.
13638 (anonymous_class_creation:): New rule, tagged <node>.
13639 (NEW_TK): Tagged <node>.
13640 (type_literals, array_type_literal): New rules, tagged <node>.
13641 (class_declaration:): Removed action when reducing by class_body:
13642 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
13643 using GET_CPC in sub-rules.
13644 (class_member_declaration): Handle inner classes.
13645 (method_declaration): When reducing method_header:, reset
13646 current_function_decl when appropriate.
13647 (method_declarator:): Set the number of formal parameter to 0 for
13648 method declared without arguments.
13649 (constructor_declarator:): Likewise.
13650 (static_initializer:): List of elements kept in a list.
13651 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
13652 use of the keyword `static' for type declarations.
13653 (block_statement:): Handle inner class declarations.
13654 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
13655 type qualified `this'.
13656 (class_instance_creation_expression): Use anonymous_class_creation:
13657 to handle inner class instances creation. Handle qualified `new'.
13658 (something_dot_new): Added appropriate actions.
13659 (create_new_parser_context): New function.
13660 (java_push_parser_context, java_parser_context_save_global,
13661 java_parser_context_suspend): Use create_new_parser_context.
13662 (check_modifiers): Changed leading comment.
13663 (check_class_interface_creation): Handle interclasses.
13664 (add_superinterfaces): Fixed comment.
13665 (create_interface): Build qualified name from the raw_name instead
13666 of its matching WFL. Push the initialized fields list. raw_name added
13667 as an extra argument to maybe_create_class_interface_decl.
13668 (create_class): Build qualified name from the raw_name instead of
13669 its matching WFL. Removed assignment to current_parsed_class_un.
13670 Call PUSH_ERROR before returning an error. Suspend the current
13671 parser context when processing an inner class. Push the
13672 initialized fields list. raw_name added as an extra argument to
13673 maybe_create_class_interface_decl. Add the private this$<n>
13674 field.
13675 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
13676 (register_fields): Get the class type from GET_CPC and handle
13677 previous errors. Added code to handle the creation of static
13678 fields in inner classes. Initialized fields initialization
13679 statements kept in a list of lists.
13680 (maybe_generate_finit): Initialized fields initialization
13681 statements kept in a list of lists. Use GET_CPC.
13682 (maybe_generate_clinit): Likewise.
13683 (method_header): Use GET_CPC and GET_CPC_UN.
13684 (parser_qualified_classname): Handle inner classes.
13685 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
13686 (java_fix_constructors): Hide pointer to enclosing context
13687 instance in constructor list when dealing with inner classes.
13688 (jdep_resolve_class): Call resolve_class with extra first argument
13689 JDEP_ENCLOSING.
13690 (resolve_class): Add enclosing context as a first extra argument
13691 to do_resolve_class.
13692 (do_resolve_class): Call find_as_inner_class. Handle WFLs
13693 properly.
13694 (resolve_no_layout): Extra argument added to resolve_class
13695 invocation.
13696 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
13697 (java_get_real_method_name): Use GET_CPC_UN.
13698 (check_abstract_method_definitions): Use DECL_CLINIT_P.
13699 (java_check_abstract_methods): Handle static method declared in
13700 inner classes by an error.
13701 (java_check_regular_methods): Use DECL_CLINIT_P.
13702 (source_start_java_method): Also set DECL_MAX_LOCALS.
13703 (create_artificial_method): Call java_parser_context_save_global
13704 and java_parser_context_restore_global instead of saving/restoring
13705 the context by hand.
13706 (expand_start_java_method): Improved verbose mode message.
13707 (java_complete_expand_methods): Fixed leading comment. Use
13708 DECL_CLINIT_P.
13709 (fix_constructors): Added assignment to this$<n> if necessary.
13710 (java_expand_classes): Call java_complete_expand_classes instead
13711 of java_complete_expand_methods.
13712 (make_qualified_primary): Simplified.
13713 (merge_qualified_name): Optimized for missing left or right parts.
13714 (resolve_expression_name): Handle access to outer class fields from
13715 interclasses.
13716 (resolve_qualified_expression_name): New macro
13717 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
13718 classes. Report error on non appropriate qualification of
13719 `new'. Handle qualified `this'.
13720 (not_accessible_p): Allow access to outer class private fields from
13721 inner classes.
13722 (patch_method_invocation): Handle method invocations through
13723 access methods and inner class constructor invocations.
13724 (find_applicable_accessible_methods_list): Search enclosing
13725 contexts of an inner class.
13726 (search_applicable_methods_list): Fixed typo.
13727 (argument_types_convertible): Handle inner class constructors'
13728 hidden outer context reference argument.
13729 (qualify_ambiguous_name): Handle qualified `this'.
13730 (java_complete_lhs): Handle use of field accessed through
13731 artificial access methods in various cases of assignments. Handle
13732 CLASS_LITERAL node.
13733 (check_final_assignment): Use DECL_CLINIT_P.
13734 (valid_ref_assignconv_cast_p): Handle the destination being an
13735 enclosing context of the source.
13736 (patch_unaryop): Handle use of field accessed through artificial
13737 access methods.
13738 (patch_return): Use DECL_CLINIT_P.
13739 (patch_throw_statement): Use DECL_CLINIT_P.
13740 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
13741 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
13742 ID_INIT_P.
13743
13744 2000-01-16 Anthony Green <green@cygnus.com>
13745
13746 * parse.y (build_string_concatenation): Only use
13747 StringBuffer(String) shortcut if String arg is constant.
13748
13749 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
13750
13751 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13752 the shift value to int. Fixed typo in comment.
13753
13754 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
13755
13756 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
13757 * jcf-write.c: Likewise.
13758 * parse.y: Likewise.
13759 * parse.c: Regenerate.
13760
13761 2000-01-09 Anthony Green <green@cygnus.com>
13762
13763 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
13764 bytecodes in the correct order.
13765
13766 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13767
13768 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
13769
13770 2000-01-06 Anthony Green <green@cygnus.com>
13771
13772 * expr.c (java_lang_expand_expr): Switch to permanent obstack
13773 before building constant array decl.
13774
13775 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13776
13777 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
13778 method invocation and typo in conditional expression.
13779 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
13780 the appropriate NOTE_POP.
13781 * parse.y (patch_binop): Shift value mask to feature the right
13782 type.
13783
13784 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13785
13786 * class.c (assume_compiled, assume_compiled_node): Add static
13787 prototype.
13788 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
13789
13790 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
13791
13792 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
13793
13794 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
13795 to `__modifier' to avoid stringifying it.
13796
13797 * parse.y (verify_constructor_circularity): Don't call a variadic
13798 function with a non-literal format string.
13799 (java_check_abstract_methods): Move unreachable code inside
13800 `continue' statement.
13801 (lookup_method_invoke): Call xstrdup, not strdup.
13802
13803 * expr.c (expand_java_field_op): Avoid the use of ANSI string
13804 concatenation.
13805
13806 * jcf-parse.c (yyparse): Likewise.
13807
13808 * jv-scan.c (main): Likewise.
13809
13810 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13811
13812 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
13813 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
13814 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
13815 concatenation.
13816
13817 * parse.y (synchronized, variable_redefinition_error,
13818 check_class_interface_creation, create_interface, create_class,
13819 method_header, finish_method_declaration,
13820 check_modifiers_consistency, method_declarator,
13821 complete_class_report_errors, check_abstract_method_definitions,
13822 java_check_regular_methods, check_throws_clauses,
13823 java_check_abstract_methods, read_import_dir,
13824 check_pkg_class_access, declare_local_variables, fix_constructors,
13825 cut_identifier_in_qualified, resolve_expression_name,
13826 resolve_qualified_expression_name, patch_method_invocation,
13827 java_complete_lhs, patch_assignment, try_builtin_assignconv,
13828 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
13829 patch_exit_expr, patch_exit_expr, patch_switch_statement,
13830 patch_try_statement, patch_synchronized_statement,
13831 patch_throw_statement, check_thrown_exceptions,
13832 patch_conditional_expr): Likewise.
13833
13834 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13835
13836 * Makefile.in (LIBDEPS): Added gcc's errors.o
13837 (../jcf-dump$(exeext):): Link with gcc's errors.o
13838 (../gcjh$(exeext):): Likewise.
13839 * expr.c (expand_java_NEW): Layout the entire target type instead of
13840 laying out its methods only.
13841 (lookup_field): Layout the class after having loaded it.
13842 * java-tree.h (java_debug_context): Declared.
13843 * jcf-io.c (toplev.h): Included.
13844 (find_class): Removed assignment to jcf's outofsynch
13845 field. Force source file to be read if newer than its matching
13846 class file. Tweaked debug messages.
13847 * jcf-parse.c (jcf_out_of_synch): Deleted.
13848 (read_class): Call to jcf_out_of_synch removed.
13849 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
13850 (jcf_out_of_synch): Prototype deleted.
13851 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
13852 `deprecated' and `class_err': integer turned into bit-fields.
13853 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
13854 * parse.y (package_list): New global.
13855 (package_declaration:): Record newly parsed package name.
13856 (extra_ctxp_pushed_p): Static global deleted.
13857 (java_parser_context_save_global): Create buffer context for the
13858 purpose of saving globals, if necessary.
13859 (java_parser_context_restore_global): Pop context pushed for the
13860 purpose of saving globals, if necessary.
13861 (java_debug_context_do): New prototype and function.
13862 (java_debug_context): Likewise.
13863 (do_resolve_class): Use already parsed package names to qualify
13864 and lookup class candidate.
13865 (java_pre_expand_clinit): Removed unnecessary local variable.
13866
13867 1999-12-17 Tom Tromey <tromey@cygnus.com>
13868
13869 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
13870 fixes PR gcj/119.
13871 (process_file): Use `\n\' at end of each line in string.
13872
13873 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
13874
13875 * expr.c (expand_invoke): Layout the loaded class before
13876 attempting to use it.
13877 (expand_java_field_op): Allow final field assignments to take
13878 place in $finit$.
13879 * typeck.c (convert): Return error_mark_node if expr is null.
13880
13881 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13882
13883 * class.c (class_depth): Return -1 if the class doesn't load
13884 properly.
13885 * expr.c (can_widen_reference_to): Check for errors during depth
13886 computation and return 0 accordingly.
13887 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
13888 create default constructors and add an other error check.
13889 * parse.h (java_fix_constructors): Prototyped.
13890 * parse.y (java_pre_expand_clinit): Likewise.
13891 (build_super_invocation): Re-prototyped to feature one argument.
13892 (java_check_circular_reference): Directly use `current'.
13893 (java_fix_constructors): New function.
13894 (java_check_regular_methods): Don't create default constructors
13895 here, but abort if none were found.
13896 (java_complete_expand_methods): Pre-process <clinit> calling
13897 java_pre_expand_clinit.
13898 (java_pre_expand_clinit): New function.
13899 (fix_constructors): build_super_invocation invoked with the
13900 current method declaration as an argument.
13901 (build_super_invocation): Use the context of the processed method
13902 decl argument instead of current_class.
13903 * typeck.c (lookup_java_method): Take WFLs in method names into
13904 account.
13905
13906 1999-12-14 Per Bothner <per@bothner.com>
13907
13908 * class.c (make_class_data): flag_keep_inline_functions to keep
13909 private methods in the method array.
13910
13911 1999-12-15 Anthony Green <green@cygnus.com>
13912
13913 * check-init.c (check_init): Take into account both types of
13914 `throw's when checking for uninitialized variables.
13915
13916 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13917
13918 * parse.y (java_complete_lhs): Force conversion of array
13919 dimensions to int_type_node, that's what runtime's ABI expects.
13920
13921 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13922
13923 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
13924 operand of a WFL, until the Java front-end gets fixed with regard
13925 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
13926
13927 1999-12-10 Andrew Haley <aph@cygnus.com>
13928
13929 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
13930 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
13931 expr.c (build_java_athrow): Add support for sjlj-exceptions.
13932 java-tree.h: Ditto.
13933 jcf-write.c: Ditto.
13934
13935 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
13936
13937 * expr.c (java_lang_expand_expr): Switch to permanent obstack
13938 before calling expand_eh_region_start and expand_start_all_catch.
13939 * except.c (expand_start_java_handler): Switch to permanent
13940 obstack before calling expand_eh_region_start.
13941 (expand_end_java_handler): Switch to permanent obstack before
13942 calling expand_start_all_catch.
13943
13944 1999-12-5 Anthony Green <green@cygnus.com>
13945
13946 * decl.c (init_decl_processing): Mark throw_node as a noreturn
13947 function with side effects.
13948 (init_decl_processing): Mark all memory allocating DECLs with
13949 DECL_IS_MALLOC.
13950
13951 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13952
13953 * except.c (expand_end_java_handler): Call
13954 expand_resume_after_catch and end_catch_handler.
13955
13956 1999-11-30 Anthony Green <green@cygnus.com>
13957
13958 * verify.c (verify_jvm_instructions): Create new return label
13959 chain if non existent (don't rely on the verified state of the jsr
13960 target.)
13961
13962 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
13963
13964 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
13965 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
13966
13967 * parse.y (patch_assignment): Removed bogus final class test on
13968 lhs when checking on whether to emit an ArrayStoreException runtime
13969 check.
13970 * expr.c (expand_java_arraystore): Likewise.
13971
13972 1999-11-28 Anthony Green <green@cygnus.com>
13973
13974 * decl.c (find_local_variable): Reuse single slot decls when
13975 appropriate.
13976
13977 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13978
13979 * jcf-parse.c (saw_java_source): Global variable removed.
13980 (read_class): Don't use `saw_java_source'. Added extra braces.
13981 (yyparse): Code setting `saw_java_source' removed.
13982
13983 1999-11-24 Mark Mitchell <mark@codesourcery.com>
13984
13985 * except.c (emit_handlers): Zero catch_clauses after emitting them.
13986
13987 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13988
13989 * verify.c (merge_type_state): Non verified subroutines being
13990 considered more than once to trigger passive type merge.
13991
13992 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13993
13994 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
13995 in case of error. Error message tuned.
13996
13997 1999-11-21 Anthony Green <green@cygnus.com>
13998
13999 * constants.c (find_methodref_index): Unwrap method names before
14000 inserting them in the constant pool.
14001
14002 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
14003
14004 * class.c (assume_compiled_node): New typedef.
14005 (assume_compiled_tree): New static data.
14006 (find_assume_compiled_node): New function.
14007 (add_assume_compiled): New function.
14008 (assume_compiled): New function.
14009 * class.c (make_class_data): Use assume_compiled.
14010 (is_compiled_class): Use assume_compiled.
14011
14012 * java-tree.h (add_assume_compiled): Declare.
14013
14014 * lang.c (lang_decode_option): Parse new options.
14015
14016 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14017
14018 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
14019 int_type_node: that's what `_Jv_AllocObject' expects.
14020
14021 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14022
14023 * parse.y (lookup_method_invoke): Use lang_printable_name to
14024 reliably build the type name during error report. Fixes PR gcj/97.
14025
14026 1999-11-09 Tom Tromey <tromey@cygnus.com>
14027
14028 * jcf-path.c: Include <sys/stat.h>.
14029 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
14030 (DIR_UP): New macro.
14031
14032 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14033
14034 * parse.y (source_end_java_method): Resume permanent allocation,
14035 reversing Apr 27 1998 patch.
14036 (patch_string_cst): Pop obstacks after having pushed the permanent
14037 ones.
14038
14039 1999-11-05 Tom Tromey <tromey@cygnus.com>
14040
14041 * class.c (finish_class): Emit inlined methods if any native
14042 methods exist in the class. Fixes PR gcj/85.
14043
14044 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
14045
14046 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
14047 (qualify_ambiguous_name): Likewise.
14048
14049 1999-11-03 Godmar Back <gback@cs.utah.edu>
14050
14051 * typeck.c: (lookup_java_method): search all inherited
14052 interfaces when looking up interface method.
14053
14054 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14055
14056 * parse.y (method_header:): Issue error message for rule `type
14057 error'.
14058 (synchronized:): Error report when not using synchronized.
14059
14060 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14061
14062 * parse.y (resolve_qualified_expression_name): Prevent `this' from
14063 being used before the superclass constructor has been called.
14064 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
14065 instead of `CALL_THIS_CONSTRUCTOR_P'.
14066
14067 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
14068
14069 * check-init.c: Fix typo in comment.
14070
14071 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
14072
14073 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
14074 and final method.
14075
14076 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
14077
14078 * parse.y (expression_statement:): Call function to report
14079 improper invocation of a constructor.
14080 (parse_ctor_invocation_error): New function.
14081
14082 1999-10-26 Mark Mitchell <mark@codesourcery.com>
14083
14084 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
14085 remember_end_note.
14086
14087 1999-10-21 Tom Tromey <tromey@cygnus.com>
14088
14089 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
14090 in generated `main'.
14091
14092 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
14093
14094 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
14095 (qualify_ambiguous_name): Likewise.
14096
14097 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14098
14099 * parse.y (java_complete_tree): fold_constant_for_init to work on
14100 permanent_obstack.
14101 (java_complete_lhs): Likewise.
14102 (array_constructor_check_entry): Complete an initializer element
14103 on permanent_obstack.
14104
14105 1999-10-19 Tom Tromey <tromey@cygnus.com>
14106
14107 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
14108 From Mike Moreton <mike@pillim.demon.co.uk>.
14109
14110 1999-10-15 Greg McGary <gkm@gnu.org>
14111
14112 * java-tree.h (flag_bounds_check): Remove extern decl.
14113 * lang.c (flag_bounds_check): Remove global variable.
14114 (lang_f_options): Remove "bounds-check" entry.
14115 (lang_init_options): Default flag_bounds_check to "on".
14116
14117 1999-10-14 Tom Tromey <tromey@cygnus.com>
14118
14119 * jvgenmain.c (usage): New function.
14120 (main): Use it. Also, handle `-D' options.
14121 * jvspec.c (lang_specific_driver): Recognize -D.
14122 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
14123
14124 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
14125
14126 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14127
14128 * jcf-dump.c (print_constant, disassemble_method): Don't call a
14129 variadic function with a non-literal format string.
14130
14131 * parse-scan.y (report_main_declaration): Likewise.
14132
14133 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
14134
14135 * parse.y (read_import_dir, patch_assignment, patch_binop,
14136 patch_array_ref): Likewise.
14137
14138 * typeck.c (build_java_array_type): Likewise.
14139
14140 * verify.c (verify_jvm_instructions): Likewise.
14141
14142 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14143
14144 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
14145
14146 1999-10-07 Anthony Green <green@cygnus.com>
14147
14148 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
14149 where CHECK_PUT may fail for valid reasons.
14150
14151 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
14152 UNSAFE_PUTN): New macros.
14153
14154 1999-10-04 Tom Tromey <tromey@cygnus.com>
14155
14156 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
14157 well. Fixes Java PR gcj/59.
14158 * parse-scan.y (yyerror): Report errors.
14159
14160 1999-09-24 Glenn Chambers <GChambers@provsol.com>
14161
14162 * decl.c (insert_block): Remove unconditional `abort'.
14163
14164 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
14165
14166 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
14167 FUNCTION_CODE now of type int. All callers changed.
14168 Set the builtin's DECL_BUILT_IN_CLASS.
14169
14170 1999-09-23 Tom Tromey <tromey@cygnus.com>
14171
14172 * jvspec.c (lang_specific_driver): Don't read spec file if
14173 -fsyntax-only given.
14174
14175 1999-09-22 Tom Tromey <tromey@cygnus.com>
14176
14177 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
14178
14179 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
14180 (WORDS_TO_LONG): Likewise.
14181 (WORDS_TO_DOUBLE): Likewise.
14182
14183 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14184
14185 * jcf-write.c (RELOCATION_VALUE_0): New macro.
14186 (RELOCATION_VALUE_1): Likewise.
14187 (emit_iinc, emit_reloc, push_constant1, push_constant2,
14188 push_in_const, push_long_const): Prototyped.
14189 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
14190 (push_constant2): Likewise.
14191 (push_int_const): Cast find_constant1's integer arguments to `jword'.
14192 (find_constant_wide): Cast find_constant2's integer arguments to
14193 `jword'.
14194 (find_constant_index): Cast find_constant2's and find_constant2's
14195 integer arguments to `jword'.
14196 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
14197 (emit_switch_reloc): Use RELOCATION_VALUE_0.
14198 (emit_if): Use RELOCATION_VALUE_1.
14199 (emit_goto): Likewise.
14200 (emit_jsr): Likewise.
14201 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
14202 argument to push_long_const to HOST_WIDE_INT.
14203
14204 1999-09-15 Andreas Schwab <schwab@suse.de>
14205
14206 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
14207
14208 1999-09-20 Nick Clifton <nickc@cygnus.com>
14209
14210 * lang.c (lang_decode_option): Extend comment.
14211
14212 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
14213
14214 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
14215 instead of fndecl.
14216
14217 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14218
14219 * gjavah.c (get_field_name, print_method_info, print_include,
14220 add_namelet): Use xmalloc, not malloc.
14221
14222 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
14223 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
14224 NULL pointer.
14225
14226 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
14227
14228 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
14229
14230 * jcf-path.c (add_entry): Likewise.
14231
14232 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
14233
14234 * jv-scan.c (xmalloc): Remove definition.
14235
14236 * jvgenmain.c (xmalloc): Likewise.
14237
14238 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
14239
14240 * lex.c (java_store_unicode): Use xrealloc, not realloc.
14241
14242 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
14243 concat, not xmalloc/sprintf.
14244 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
14245 (xstrdup): Remove definition.
14246
14247 * parse.y (duplicate_declaration_error_p,
14248 constructor_circularity_msg, verify_constructor_circularity,
14249 check_abstract_method_definitions, java_check_regular_methods,
14250 java_check_abstract_methods, patch_method_invocation,
14251 check_for_static_method_reference, patch_assignment, patch_binop,
14252 patch_cast, array_constructor_check_entry, patch_return,
14253 patch_conditional_expr): Use xstrdup, not strdup.
14254
14255 * zextract.c (ALLOC): Use xmalloc, not malloc.
14256
14257 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14258
14259 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
14260
14261 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
14262 (do_spec, lang_specific_pre_link, lang_specific_driver,
14263 input_filename, input_filename_length): Don't declare.
14264 (main_class_name, jvgenmain_spec, lang_specific_driver):
14265 Constify a char*.
14266 (lang_specific_driver): All calls to the function pointer
14267 parameter now explicitly call `fatal'.
14268
14269 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14270
14271 * parse.y (find_applicable_accessible_methods_list): Search
14272 abstract classes as interfaces.
14273
14274 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14275
14276 * class.c (finish_class): We're now outside a valid method
14277 declaration. Tell the rest of gcc so.
14278
14279 1999-09-08 Bruce Korb autogen@linuxbox.com
14280
14281 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
14282
14283 1999-09-07 Tom Tromey <tromey@cygnus.com>
14284
14285 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
14286 java-array.h.
14287 (decode_signature_piece): Don't emit "::" in JArray<>.
14288 (print_namelet): Only print trailing `;' when printing a class.
14289
14290 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
14291
14292 * java-tree.h: Delete declarations for all tree nodes now moved to
14293 global_trees.
14294 * decl.c: Delete their definitions.
14295
14296 1999-09-04 Mark Mitchell <mark@codesourcery.com>
14297
14298 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
14299 * Makefile.in (OBJS): Add ggc-callbacks.o.
14300 (OBJDEPS): Likewise.
14301
14302 1999-09-03 Tom Tromey <tromey@cygnus.com>
14303
14304 * parse.y (strip_out_static_field_access_decl): Return operand if
14305 it satisfies JDECL_P.
14306
14307 1999-09-02 Tom Tromey <tromey@cygnus.com>
14308
14309 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
14310 Handle nested arrays, like `[[I'.
14311
14312 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14313
14314 * class.c (finish_class): Remove unused parameter, all callers
14315 changed.
14316
14317 * expr.c (build_java_athrow): Change return type to void.
14318 (java_lang_expand_expr): Make sure each case in switch returns a
14319 value.
14320
14321 * java-tree.h (finish_class): Fix prototype to take void args.
14322
14323 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
14324 (main): Issue return from main, not exit.
14325
14326 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
14327
14328 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
14329
14330 * jv-scan.c (main): Issue return from main, not exit.
14331
14332 * parse.y (check_abstract_method_definitions,
14333 java_check_abstract_method_definitions): Add static prototypes.
14334 (java_complete_expand_methods): Fix call to `finish_class'.
14335
14336 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
14337 and `prevpc'.
14338
14339 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14340
14341 * lang.c (language_string): Constify.
14342
14343 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14344
14345 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
14346 Remove hacks for stuff which comes from libiberty.
14347
14348 * Make-lang.in: Likewise.
14349
14350 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
14351
14352 * Makefile.in (xref.o): Depend on xref.c explicitly.
14353
14354 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14355
14356 * java-tree.h (lang_printable_name): Constify a char*.
14357
14358 * lang.c (lang_printable_name): Likewise.
14359
14360 1999-08-27 Jeffrey A Law (law@cygnus.com)
14361
14362 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
14363 comments in C code.
14364
14365 1999-08-26 Tom Tromey <tromey@cygnus.com>
14366
14367 * gjavah.c (print_cxx_classname): Print "::" before qualified
14368 name.
14369
14370 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
14371
14372 * parse.y (lookup_cl): Changed leading comment. Now does its best
14373 to set the column number.
14374 (qualify_ambiguous_name): Take WFL wrappers into account.
14375
14376 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
14377
14378 * verify.c (verify_jvm_instructions): Don't check instruction
14379 validity beyond end of method.
14380
14381 1999-08-25 Tom Tromey <tromey@cygnus.com>
14382
14383 * jvspec.c (lang_specific_driver): Correctly handle --help again.
14384
14385 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14386
14387 * gjavah.c (print_name, print_base_classname, utf8_cmp,
14388 cxx_keyword_subst, generate_access, name_is_method_p,
14389 get_field_name, print_field_name, super_class_name, print_include,
14390 decode_signature_piece, print_class_decls, usage, help,
14391 java_no_argument, version, add_namelet, print_namelet): Add static
14392 prototype.
14393 (print_base_classname, utf8_cmp, cxx_keyword_subst,
14394 name_is_method_p): Constify a char*.
14395 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
14396 Provide a final else clause in an if-else-if.
14397 (print_field_info): Add missing final arg in function call to
14398 `print_field_name'.
14399 (print_method_info, decompile_method, decode_signature_piece,
14400 print_c_decl, print_full_cxx_name, print_stub,
14401 print_mangled_classname, super_class_name, print_include,
14402 add_namelet, add_class_decl, print_class_decls, process_file,
14403 help): Constify a char*.
14404
14405 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
14406 push_int_const, find_constant_wide, find_constant_index,
14407 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
14408 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
14409 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
14410 emit_if, emit_goto, emit_jsr, call_cleanups,
14411 make_class_file_name): Add static prototypes.
14412 (generate_bytecode_return, generate_bytecode_insns): Pass a
14413 NULL_PTR, not a NULL_TREE.
14414
14415 * jv-scan.c: Include "jcf.h".
14416 (main): Declare using DEFUN macro.
14417
14418 * jvspec.c (find_spec_file, lang_specific_pre_link,
14419 lang_specific_driver): Add prototypes.
14420 (find_spec_file): Constify a char*.
14421
14422 * keyword.gperf (hash, java_keyword): Add prototypes.
14423
14424 * lang.c (lang_print_error): Add static prototype.
14425 (lang_init): Prefer memcpy over bcopy to avoid casts.
14426
14427 * lex.c (yylex): Add static prototype.
14428
14429 * parse-scan.y: Include "lex.c" earlier.
14430
14431 * parse.h: Remove redundant declaration for `yylex'.
14432
14433 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
14434 labeled_block_contains_loop_p): Add static prototypes.
14435 (not_accessible_p): Make static to match prototype.
14436
14437 * verify.c (start_pc_cmp): Don't needlessly cast away const.
14438
14439 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14440
14441 * parse.y (check_method_redefinition): Changed leading comment.
14442 (check_abstract_method_definitions): New function.
14443 (java_check_abstract_method_definitions): New function.
14444 (java_check_regular_methods): Call it.
14445 (verify_constructor_super): Fixed indentation.
14446 (lookup_method_invoke): Likewise.
14447
14448 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14449
14450 * parse.y (method_header): Return a null pointer if the current
14451 class node is null.
14452 (finish_method_declaration): Return if the current function decl
14453 is null.
14454 (source_start_java_method): Likewise.
14455 (java_method_add_stmt): Likewise.
14456
14457 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14458
14459 * class.c (emit_register_class): Removed unnecessary call to
14460 start_sequence.
14461 * parse.y (labeled_block_contains_loop_p): Removed unused local
14462 variable.
14463
14464 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14465
14466 * parse.y (java_refold): Added prototype.
14467
14468 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14469
14470 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
14471 (java_stabilize_reference): Removed unnecessary `else'.
14472 (java_complete_lhs): Set flag to remember boolean. Call
14473 java_refold. Added comments.
14474 (java_decl_equiv): New function.
14475 (binop_compound_p): Likewise.
14476 (java_refold): Likewise.
14477 (patch_unaryop): Striped static field access assigned to decl and
14478 op. Changed promotion scheme for ++/-- operators.
14479 (search_loop): New function.
14480 (labeled_block_contains_loop_p): Likewise.
14481 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
14482 comment.
14483 (patch_bc_statement): Call search_loop. Fixed comment.
14484
14485 1999-08-14 Anthony Green <green@cygnus.com>
14486
14487 * expr.c (java_lang_expand_expr): Mark static array data as
14488 referenced.
14489
14490 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
14491
14492 * jvgenmain.c (main): NUL-terminate name_obstack.
14493
14494 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14495
14496 * check-init.c (check_bool2_init, done_alternative): Add static
14497 prototypes.
14498
14499 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
14500 (add_method, build_utf8_ref, build_class_ref,
14501 append_gpp_mangled_type, layout_class_method): Constify a char*.
14502
14503 * decl.c (push_promoted_type, make_binding_level): Add static
14504 prototypes.
14505 (push_promoted_type, pushdecl): Constify a char*.
14506
14507 * except.c (find_handler_in_range, link_handler,
14508 check_start_handlers): Add static prototypes.
14509
14510 * expr.c (process_jvm_instruction): Constify a char*.
14511
14512 * gjavah.c (main): Constify a char*.
14513
14514 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
14515 Constify a char*.
14516
14517 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
14518 static prototypes.
14519 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
14520 munge, print_ents): Constify a char*.
14521
14522 * jcf-dump.c (disassemble_method): Constify a char*.
14523 (print_constant_pool, print_exception_table): Add static prototypes.
14524 (print_constant, print_exception_table, main, disassemble_method):
14525 Constify a char*.
14526
14527 * jcf-io.c (find_classfile, find_class): Likewise.
14528
14529 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
14530 (set_source_filename, predefined_filename_p): Add static prototypes.
14531 (set_source_filename, get_constant, get_class_constant,
14532 find_in_current_zip): Constify a char*.
14533
14534 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
14535 static prototypes.
14536 (add_entry, add_path, jcf_path_classpath_arg,
14537 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14538
14539 * jcf-reader.c (get_attribute, jcf_parse_preamble,
14540 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
14541 jcf_parse_one_method, jcf_parse_methods,
14542 jcf_parse_final_attributes): Add static prototypes.
14543 (get_attribute): Constify a char*.
14544
14545 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
14546 jcf_dependency_add_target, jcf_path_classpath_arg,
14547 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14548
14549 * jv-scan.c (main): Constify a char*.
14550 (gcc_obstack_init): Add prototype arguments.
14551
14552 * jvgenmain.c (gcc_obstack_init): Likewise.
14553 (main): Constify a char*.
14554
14555 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
14556 static prototypes.
14557 (put_decl_string, lang_print_error): Constify a char*.
14558 (lang_init): Remove redundant extern prototype.
14559
14560 * mangle.c (emit_unicode_mangled_name): Constify a char*.
14561
14562 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
14563 Add static prototypes.
14564 (get_type_from_signature): Constify a char*.
14565
14566 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
14567 Add static prototypes.
14568 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
14569 (verify_jvm_instructions): Constify a char*.
14570
14571 * xref.c (xref_flag_value): Likewise.
14572
14573 * xref.h (xref_flag_value): Likewise.
14574
14575 * zextract.c (makeword, makelong): Add static prototypes.
14576 (makeword, makelong): Constify a uch*.
14577
14578 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14579
14580 * lang.c (java_dummy_print): Constify a char*.
14581 (lang_print_error): Likewise.
14582 (lang_init): Remove redundant prototype for `print_error_function'.
14583 (lang_init_source): Likewise.
14584 (lang_identify): Constify a char*.
14585
14586 1999-08-09 Tom Tromey <tromey@cygnus.com>
14587
14588 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
14589 (WORDS_TO_LONG): Likewise.
14590 (WORDS_TO_DOUBLE): Likewise.
14591
14592 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14593
14594 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
14595
14596 * expr.c (java_stack_pop, java_array_data_offset,
14597 build_java_throw_out_of_bounds_exception, case_identity,
14598 build_java_check_indexed_type): Add static prototypes.
14599 (linenumber_table, expand_invoke, expand_java_field_op,
14600 build_primtype_type_ref, expand_byte_code): Constify a char*.
14601
14602 * java-tree.h (build_primtype_type_ref, linenumber_table):
14603 Constify a char*.
14604 (java_lang_expand_expr): Add prototype.
14605
14606 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
14607 `java_lang_expand_expr'.
14608
14609 * lex.c (java_lex_error): Constify a char*.
14610 (java_get_unicode, java_read_char, java_allocate_new_line,
14611 java_unget_unicode, java_sneak_unicode): Prototype.
14612
14613 * parse-scan.y (current_class, package_name, method_declarator,
14614 report_class_declaration, yyerror): Constify a char*.
14615
14616 * parse.h (java_report_errors): Prototype.
14617 (yyerror): Constify a char*.
14618
14619 * parse.y (classitf_redefinition_error, check_modifiers,
14620 parse_jdk1_1_error, lookup_package_type,
14621 lookup_package_type_and_set_next, get_printable_method_name,
14622 purify_type_name): Constify a char*.
14623 (build_super_invocation, maybe_generate_finit,
14624 verify_constructor_super, parser_add_interface,
14625 add_superinterfaces, jdep_resolve_class, note_possible_classname,
14626 java_complete_expand_methods, java_expand_finals,
14627 cut_identifier_in_qualified, java_stabilize_reference,
14628 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
14629 merge_string_cste): Prototype.
14630 (single_type_import_declaration, yyerror,
14631 variable_redefinition_error, build_array_from_name,
14632 build_unresolved_array_type, check_class_interface_creation,
14633 resolve_class, complete_class_report_errors,
14634 note_possible_classname, read_import_dir,
14635 find_in_imports_on_demand, resolve_package, fix_constructors,
14636 check_deprecation, lookup_method_invoke,
14637 maybe_build_primttype_type_ref, array_constructor_check_entry):
14638 Constify a char*.
14639 (java_complete_expand_methods, java_expand_finals): Make static.
14640 (convert_narrow): Remove static prototype.
14641
14642 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
14643
14644 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
14645
14646 1999-08-02 Richard Henderson <rth@cygnus.com>
14647
14648 * decl.c: Include defaults.h instead of expr.h.
14649 * parse.y: Likewise.
14650
14651 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
14652
14653 * java/decl.c (start_java_method): Change all uses of
14654 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
14655 Ensure expr.h is included.
14656 * java/expr.c (pop_arguments): Ditto.
14657 * java/parse.y (expand_start_java_method): Ditto.
14658
14659 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14660
14661 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
14662
14663 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
14664
14665 * decl.c: Include "function.h".
14666 * except.c: Likewise.
14667 * parse.y: Likewise.
14668 * Makefile.in: Update dependencies.
14669
14670 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14671
14672 * expr.c (build_java_soft_divmod): Provide a default case in switch.
14673 (java_lang_expand_expr): Mark parameters `target', `tmode' and
14674 `modifier' with ATTRIBUTE_UNUSED.
14675
14676 * gjavah.c (process_file): Add braces around ambiguous `else'.
14677
14678 * jcf-dump.c (print_access_flags, localvar_free): Change return
14679 type to void.
14680
14681 * parse.y (java_complete_expand_method): Initialize variable
14682 `exception_copy'.
14683 (resolve_qualified_expression_name): Likewise for `field_decl'.
14684 (patch_method_invocation): Likewise for `class_to_search'.
14685 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
14686 (patch_assignment): Likewise for `lhs_type'.
14687
14688 * verify.c (verify_jvm_instructions): Remove unused variable
14689 `caller'.
14690
14691 1999-07-25 Richard Henderson <rth@cygnus.com>
14692
14693 * decl.c (va_list_type_node): New.
14694
14695 1999-07-25 Anthony Green <green@cygnus.com>
14696
14697 * gjavah.c (print_stub): New function.
14698 (METHOD_IS_NATIVE): New macro.
14699 (print_mangled_classname): Make static.
14700 (HANDLE_END_FIELD): Don't emit fields during stub generation.
14701 (process_file): Perform stub generation.
14702 (HANDLE_METHOD): Don't emit class decls during stub
14703 generation.
14704 (HANDLE_END_METHOD): Take into account stub generation.
14705 (print_method_info): Handle stub generation.
14706 (print_stub): New function.
14707 (print_cxx_classname): Make signature consistant with others.
14708 (help): Describe -stubs option.
14709 (main): Create stub file.
14710 (version): Use version.c.
14711 (print_full_cxx_name): New function.
14712 (print_c_decl): Use print_full_cxx_name.
14713
14714 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14715
14716 * check-init.c (check_init): Handle MAX_EXPR.
14717
14718 1999-07-15 Andrew Haley <aph@cygnus.com>
14719
14720 * lang.c (flag_use_divide_subroutine): New variable.
14721 * typeck.c: (convert_ieee_real_to_integer): Bounds check
14722 fp-to-integer conversion.
14723 (convert): Call convert_ieee_real_to_integer when flag_fast_math
14724 is not set.
14725
14726 * expr.c (build_java_soft_divmod): New function.
14727 (build_java_binop): Call build_java_soft_divmod if
14728 flag_use_divide_subroutine is set.
14729 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14730 soft_lrem_node: new builtin functions.
14731 (init_decl_processing) Initialize the new builtins.
14732 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14733 soft_lrem_node: new builtin functions.
14734 (build_java_soft_divmod): New function.
14735 * parse.y: Call build_java_soft_divmod if
14736 flag_use_divide_subroutine is set.
14737 * parse.c: Rebuilt.
14738
14739 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
14740 a --specs= arg) even if not linking.
14741 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
14742 -fuse-divide-subroutine
14743
14744 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14745
14746 * parse.y (resolve_and_layout): Check methods only once.
14747 (resolve_qualified_expression_name): Verify thrown exceptions
14748 compatibility.
14749 (check_thrown_exceptions): Reject exceptions thrown in
14750 initializer. Error message tuned.
14751
14752 1999-07-14 Andrew Haley <aph@cygnus.com>
14753
14754 * expr.c (expand_expr): Do not return the last statement in a
14755 block as the block's value.
14756
14757 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14758
14759 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
14760 CALL_EXPR, to avoid order of evaluation changes.
14761
14762 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14763
14764 * parse.y (qualify_ambiguous_name): Do not use
14765 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
14766
14767 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14768
14769 * check-init.c (check_init): Handle MAX_EXPR.
14770 * expr.c (force_evaluation_order): Force method call arguments to
14771 be evaluated in left-to-right order.
14772 * parse.y (qualify_ambiguous_name): Loop again to qualify
14773 NEW_ARRAY_EXPR properly.
14774
14775 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
14776
14777 * parse.y (patch_invoke): Resolve unresolved invoked method
14778 returned type.
14779 (qualify_ambiguous_name): STRING_CST to qualify expression for
14780 type name resolution.
14781
14782 1999-06-24 Andrew Haley <aph@cygnus.com>
14783
14784 * class.c (finish_class): Whenever a deferred method is
14785 output, rescan the list of methods to see if a new candidate for
14786 output can be found.
14787
14788 1999-06-28 Tom Tromey <tromey@cygnus.com>
14789
14790 * jvspec.c (lang_specific_driver): Recognize --help.
14791
14792 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14793
14794 * parse.y (resolve_package): Fixed bogus return statement.
14795 (patch_method_invocation): Resolve method invocation beginning with
14796 a package name qualifier.
14797
14798 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14799
14800 * Make-lang.in (java.stage1): Depend on stage1-start.
14801 (java.stage2): Likewise for stage2-start.
14802 (java.stage3): Likewise for stage3-start.
14803 (java.stage4): Likewise for stage4-start.
14804
14805 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14806
14807 * parse.y (java_complete_lhs): When doing cross referencing, don't
14808 try to keep file location on a WFL expanded as a CALL_EXPR.
14809
14810 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
14811
14812 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
14813 compiling to class file a void method with an empty method body.
14814 As a side effect, the bytecode backend will generate the
14815 appropriate `return' instruction.
14816
14817 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14818
14819 * parse.y (lookup_package_type_and_set_next): New function prototype.
14820 (resolve_package): Search current and imported packages.
14821 (lookup_package_type_and_set_next): New function.
14822
14823 1999-06-22 Andrew Haley <aph@cygnus.com>
14824
14825 * verify.c (verify_jvm_instructions): Check for pending blocks
14826 before invalid PC test and opcode switch, not after.
14827
14828 1999-06-21 Andrew Haley <aph@cygnus.com>
14829
14830 * except.c (find_handler_in_range): The upper limit for exception
14831 ranges is exclusive, not inclusive: (start <= pc < end).
14832 (link_handler): find child pointer which points to outer by
14833 searching sibling list: previous code incorrectly assumed that
14834 outer->outer->first_child must point to outer.
14835 * verify.c (verify_jvm_instructions): FIXME added to code for
14836 `athrow'.
14837 (verify_jvm_instructions): Do not assume that the last block
14838 processed in a subroutine is a block which ends with a `ret'
14839 instruction. With some control flows it is possible that the last
14840 block ends with an `athrow'.
14841
14842 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14843
14844 * parse.y (qualify_ambiguous_name): Reorganized the post
14845 evaluation of non WFL leading expression nodes.
14846
14847 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14848
14849 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
14850 CONVERT_EXPR.
14851
14852 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14853
14854 * parse.y (qualify_ambiguous_name): Handle qualified expression
14855 beginning with a STRING_CST.
14856
14857 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14858
14859 * parse.y (register_fields): Set DECL_INITIAL on both
14860 pre-initialized static and public fields.
14861 (resolve_field_access): Static field access expressions to always
14862 use pointer types.
14863 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
14864 qualification. CONVERT_EXPR to be resolved as an expression name.
14865 (java_complete_lhs): Identify and access qualified final
14866 initialized field in switch statement case expression.
14867 (fold_constant_for_init): Pre-initialized field decl constant to
14868 be folded.
14869
14870 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14871
14872 * parse.y (note_possible_classname): Mark returned node with
14873 QUALIFIED_P only if the original class name contained a '/'.
14874
14875 1999-06-05 Anthony Green <green@cygnus.com>
14876
14877 * Make-lang.in (gcjh): More parallel build fixes.
14878
14879 1999-06-03 Mike Stump <mrs@wrs.com>
14880
14881 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
14882
14883 1999-06-02 Anthony Green <green@cygnus.com>
14884
14885 * except.c (link_handler): Chain exception handlers in order.
14886
14887 1999-06-02 Anthony Green <green@cygnus.com>
14888
14889 * expr.c (expand_byte_code): Fill unreachable bytecode regions
14890 with nops and process as usual in order to always set correct EH
14891 ranges. Emit detailed warnings about unreachable bytecodes.
14892
14893 1999-06-02 Anthony Green <green@cygnus.com>
14894
14895 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
14896 constant.
14897
14898 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14899
14900 * parse.y (lookup_field_wrapper): Unified returned value to NULL
14901 or the searched field decl.
14902
14903 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14904
14905 * parse.y (fold_constant_for_init): Convert numerical constant
14906 values to the type of the assigned field.
14907
14908 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14909
14910 * expr.c (lookup_field): Relaxed the test on class loading error
14911 detection.
14912 * parse.y (fold_constant_for_init): Enabeled old code.
14913
14914 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
14915
14916 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
14917 decide the validity of the cast of a java.lang.Cloneable reference
14918 to an array.
14919 (patch_conditional_expr): Fixed first argument passed to
14920 binary_numeric_promotion.
14921
14922 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
14923
14924 * parse.y (qualify_ambiguous_name): Take into account that a
14925 CONVERT_EXPR might specify a type as a WFL.
14926
14927 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14928
14929 * parse.y (patch_assignment): Save the rhs before using it as an
14930 argument to _Jv_CheckArrayStore.
14931
14932 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14933
14934 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
14935
14936 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14937
14938 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
14939 floating point literal only when the exponent indicator has been
14940 parsed.
14941
14942 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14943
14944 * parse.y (formal_parameter:): Construct argument tree list
14945 element even if a yet unsupported final parameter was encountered.
14946
14947 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14948
14949 * parse.y (finish_method_declaration): Issue errors for native or
14950 abstract methods declared with a method body, as well as for non
14951 native or non abstract methods with no method body.
14952
14953 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14954
14955 * class.c (build_utf8_ref): Initialize variable `field'.
14956
14957 * decl.c (init_decl_processing): Initialize variable `field'.
14958
14959 * expr.c (build_known_method_ref): Mark parameters `method_type',
14960 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
14961 (process_jvm_instruction): Likewise for parameter `length'.
14962
14963 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
14964 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
14965 ATTRIBUTE_UNUSED.
14966
14967 * parse.y (maybe_generate_clinit): Remove unused variable
14968 `has_non_primitive_fields'.
14969 (find_in_imports_on_demand): Initialize variables `node_to_use'
14970 and `cl'.
14971 (patch_binop): Likewise for variable `prom_type'.
14972 (patch_unaryop): Likewise for variable `prom_type'.
14973
14974 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
14975
14976 * xref.c (xref_table): Add missing initializer.
14977
14978 1999-05-14 Tom Tromey <tromey@cygnus.com>
14979
14980 * java-except.h (struct eh_range): Removed unused `next' member.
14981 * verify.c (verify_jvm_instructions): Call check_nested_ranges
14982 after adding all exception handlers. Sort exception ranges in
14983 order of start PC.
14984 (struct pc_index): New structure.
14985 (start_pc_cmp): New function.
14986 * except.c (add_handler): Return `void'. Don't call link_handler;
14987 instead construct an ordinary linked list and do range
14988 coalescing.
14989 (check_nested_ranges): New function.
14990 (link_handler): Changed interface to allow merging of eh_ranges.
14991 Split overlapping ranges. Return `void'.
14992
14993 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14994
14995 * parse.y (constructor_block_end:): New rule, tagged <node>.
14996 (constructor_body:): Use `constructor_block_end' instead of
14997 `block_end'.
14998
14999 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15000
15001 * parse.y (statement_nsi:): Pop `for' statement block.
15002 (java_complete_lhs): Labeled blocks containing no statement are
15003 marked as completing normally.
15004
15005 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15006
15007 * xref.c (xref_set_current_fp): New function, defined.
15008 * xref.h (xref_set_current_fp): New function, prototyped.
15009
15010 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15011
15012 * check-init.c (check_init): Take into account that
15013 LABELED_BLOCK_STMT can be empty.
15014
15015 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
15016
15017 * parse.y (java_check_regular_methods): Warning check on not
15018 overriding methods with default access in other packages does not
15019 apply to `<clinit>'.
15020 (java_complete_lhs): If block body is an empty_stmt_node, replace
15021 it by NULL_TREE. This prevents gcc from generating an irrelevant
15022 warning.
15023
15024 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
15025
15026 * check-init.c (check_init): Removed code accepting to see things
15027 falling through default:, when doing xrefs.
15028 * java-tree.h (do_not_fold): New global variable, declared.
15029 * parse.y (do_not_fold): New global variable, defined.
15030 (java_complete_expand_method): Set `do_not_fold' to the value of
15031 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
15032 and reinstall them after them have been purged; do not check for
15033 initializations; do not issue missing return errors.
15034 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
15035 when doing xrefs.
15036 (patch_binop): Skip the fold part when doing xrefs.
15037 (build_string_concatenation): Skip the concatenation part when
15038 doing xrefs.
15039 (patch_synchronized_statement): Do not generate a try-finally when
15040 doing xrefs.
15041 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
15042 and keep the location where the throw was seen.
15043 * typeck.c (convert): When `do_not_fold' is set, do not attempt
15044 any treatment on the converted node an simply return a NOP_EXPR of
15045 the targeted type.
15046 * xref.c (xref_get_data): New function, defined.
15047 * xref.h (xref_get_data): New function, declared.
15048 (XREF_GET_DATA): Use xref_get_data.
15049
15050 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15051
15052 * gjavah.c (print_include): Cast the result of `strlen' to int
15053 when comparing against a signed value.
15054 (add_namelet): Likewise.
15055
15056 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15057
15058 * expr.c (expand_invoke): Mark parameter `nargs' with
15059 ATTRIBUTE_UNUSED.
15060 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
15061
15062 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
15063 ATTRIBUTE_UNUSED.
15064
15065 * jcf-reader.c (get_attribute): Cast a value to long
15066 when comparing against a signed expression. Likewise.
15067
15068 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
15069 HOST_BITS_PER_CHAR.
15070
15071 1999-05-11 Andrew Haley <aph@cygnus.com>
15072
15073 * parse.y (source_end_java_method): If the current method contains
15074 any exception handlers, force asynchronous_exceptions: this is
15075 necessary because signal handlers in libjava may throw exceptions.
15076 * decl.c (end_java_method): Ditto.
15077
15078 1999-05-11 Tom Tromey <tromey@cygnus.com>
15079
15080 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
15081 flags.
15082 * jvspec.c (THREAD_NAME): Removed.
15083 (GC_NAME): Likewise.
15084 (MATHLIB): Likewise.
15085 (WITHLIBC): Likewise.
15086 (GCLIB): Likewise.
15087 (THREADLIB): Likewise.
15088 (MATH_LIBRARY): Likewise.
15089 (lang_specific_driver): Don't add `-l' options to command line.
15090 Instead, add a single --specs option. Recognize `-L' options and
15091 use them to search for spec file.
15092 (find_spec_file): New function.
15093 (SPEC_FILE): New define.
15094
15095 1999-05-11 Dave Brolley <brolley@cygnus.com>
15096
15097 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
15098 cpplib-enabled build.
15099
15100 1999-05-05 Per Bothner <bothner@cygnus.com>
15101
15102 * class.c (make_field_value): DECL_INITIAL may be a string literal;
15103 temporarily zero it while calling rest_of_decl_compilation.
15104
15105 * java-tree.h (string_ptr_type_node): Add declaration.
15106 * decl.c: Define and initialize string_ptr_type_node.
15107 * parse.y (patch_string_cst): Use string_ptr_type_node.
15108
15109 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
15110 * parse.y (for_statement): Now unconditionally exit_block.
15111 (finish_labeled_statement): No longer exit_block if for-loop.
15112 (patch_loop_statement): Check harder if the loop is already labeled.
15113
15114 * parse.y (patch_initialized_static_field): Removed function.
15115 (maybe_generate_clinit): Removed special handling for interfaces.
15116 (java_complete_expand_methods): Do a preliminary java_complete_tree
15117 on <clinit> to determine if it can be removed.
15118 (java_complete_expand_method): Remove special handling for <clinit>.
15119 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
15120 optimize if we get back empty_stmt_node.
15121 For MODIFY_EXPR, re-do checking of static initializers.
15122 (fold_constant_for_init): Don't return immediate if VAR_DECL.
15123 For VAR_DECL, pass correct context.
15124
15125 * verify.c (verify_jvm_instructions): Better error messages.
15126
15127 1999-05-03 Tom Tromey <tromey@cygnus.com>
15128
15129 * parse-scan.y (interface_declaration): Call
15130 report_class_declaration for interfaces.
15131
15132 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
15133
15134 * Makefile.in: Remove -v from bison command lines.
15135
15136 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15137
15138 * check-init.c (check_init): Exclude a case of error when doing
15139 xrefs.
15140 * class.c (layout_class_method): Don't generate the error message
15141 twice when compiling from source.
15142 * lang-options.h: Added `-Wredundant-modifers' and
15143 `-Wunusupported-jdk11' flags and help text.
15144 * lang.c (lang_decode_option): Added support for
15145 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
15146 flag_static_local_jdk11 and flag_redundant set accordingly.
15147 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
15148 * parse.h (EXPR_WFL_ADD_COL): New macro.
15149 (DECL_END_SOURCE_LINE): Likewise.
15150 (DECL_INHERITED_SOURCE_LINE): Likewise.
15151 * parse.y (static_ref_err): New function, prototyped.
15152 (CCB_TK): Now tagged <operator>.
15153 (class_body:): Remember the location of the closing '}' of a class
15154 definition when doing xrefs.
15155 (block:): Likewise.
15156 (block_end:): Likewise.
15157 (create_class): Remember the location of the inherited class
15158 identifier when doing xrefs.
15159 (register_fields): Added test on first operand of `init' before
15160 testing it TREE_CODE.
15161 (method_header): Store the location of the class identifier in the
15162 class decl when doing xrefs.
15163 (finish_method_declaration): Don't combine first/last method line
15164 when doing xref.
15165 (java_check_regular_methods): Warning check on not overriding
15166 methods with default access on other packages move before check on
15167 static methods. Initialization of `aflags' also moved up.
15168 (resolve_expression_name): Call static_ref_err to report the error.
15169 (static_ref_err): New function, implemented.
15170 (resolve_field_access): Returned simplified static field access
15171 when doing xrefs.
15172 (resolve_qualified_expression_name): Check for illegal use of
15173 static fields in a non static context. Call static_ref_err to
15174 report error in various places.
15175 (java_complete_tree): Do not fold initialized static fields when
15176 doing xrefs.
15177 (java_complete_lhs): Likewise.
15178
15179 1999-04-29 Anthony Green <green@cygnus.com>
15180
15181 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
15182 create internal labels.
15183 (lookup_label): Ditto.
15184
15185 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15186
15187 * class.c (layout_class_method): Generate <clinit>'s rtl for
15188 interfaces.
15189 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
15190 for interfaces' <clinit>.
15191 * expr.c (lookup_field): Search for fields in interfaces.
15192 (expand_invoke): Fixed indentation.
15193 (expand_java_field_op): Likewise. Use IS_CLINIT.
15194 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
15195 (IS_CLINIT): New macro.
15196 * parse.y (type_declaration:): Call maybe_generate_clinit after an
15197 interface was parsed.
15198 (maybe_generate_clinit): Don't generate if the current class is an
15199 interface with only fields of primitive types.
15200 (reset_method_name): Use IS_CLINIT.
15201 (java_complete_expand_method): Expand <clinit> when it exists for
15202 interfaces. Use IS_CLINIT.
15203 (resolve_expression_name): Use DECL_CONTEXT instead of
15204 current_class to build static field references.
15205 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
15206 ARRAY_REF when doing xreferencing.
15207 (check_final_assignment): Fixed typo in leading comment. Use
15208 IS_CLINIT.
15209 (patch_array_ref): Don't fully expand array references when
15210 xreferencing.
15211 (patch_return): Use IS_CLINIT.
15212 (patch_throw_statement): Likewise.
15213
15214 1999-04-22 Tom Tromey <tromey@cygnus.com>
15215
15216 * Make-lang.in (JAVA_SRCS): Added check-init.c.
15217
15218 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
15219
15220 * decl.c (predef_filenames, predef_filenames_size): New globals
15221 (init_decl_processing): predef_filenames and predef_filenames_size
15222 initialized.
15223 * java-tree.h (predef_filenames, predef_filenames_size): Declared
15224 extern.
15225 * jcf-parse.c (predefined_filename_p): New function.
15226 (yyparse): Check that files on the command line are specified only
15227 once and issue a warning otherwise.
15228 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
15229 * parse.y (source_end_java_method): Nullify NOP method bodies, to
15230 avoid a gcc warning with -W -Wall turned on.
15231 (java_expand_classes): Abort if errors were encountered.
15232 (java_complete_lhs): If the cross reference flag is set, wrap
15233 field DECL node around a WFL when resolving expression name.
15234
15235 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
15236
15237 * lang.c (lang_decode_option): Fixed returned value when parsing
15238 `-fxref=...' and `-Wall'.
15239 * parse.y (source_end_java_method): Do not generate code when
15240 flag_emit_xref is set.
15241 (resolve_expression_name): Do not build static field access when
15242 flag_emit_xref is set.
15243 (resolve_field_access): No special treatment on `length' when
15244 flag_emit_xref is set. Do not build qualified static field access
15245 when flag_emit_xref is set.
15246 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
15247 when flag_emit_xref is set.
15248 (patch_assignment): Do not generate array store runtime check when
15249 flag_emit_xref is set.
15250 * xref.c (xref_flag_value): Fixed function declaration
15251 indentation.
15252 (xset_set_data): New function.
15253 * xref.h (xref_set_data): Added prototype for new function.
15254 (typedef struct xref_flag_table): New field data.
15255 (XREF_GET_DATA): New macro.
15256
15257 1999-04-19 Tom Tromey <tromey@cygnus.com>
15258
15259 * xref.h (enum): Removed trailing comma.
15260
15261 * parse.y (resolve_qualified_expression_name): Added missing
15262 `break'.
15263
15264 1999-04-15 Anthony Green <green@cygnus.com>
15265
15266 * gjavah.c: New prototypes for java_float_finite and
15267 java_double_finite.
15268
15269 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15270
15271 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
15272 references.
15273
15274 1999-04-06 Jeffrey A Law (law@cygnus.com)
15275
15276 * Makefile.in (TREE_H): Add tree-check.h.
15277 (RTL_H): Add genrtl.h.
15278
15279 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
15280
15281 * parse.y (patch_assignment): Added ArrayStoreException runtime
15282 check.
15283
15284 1999-04-06 Per Bothner <bothner@cygnus.com>
15285
15286 * expr.c (pop_type_0): New function.
15287 (pop_type): Use pop_type_0.
15288 * java-tree.h (pop_type_0): New declaration.
15289 * verify.c (verify_jvm_instructions): Check return instructions.
15290
15291 * parse.y (patch_binop): Don't fold if non-constant and emiting
15292 class files.
15293
15294 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15295
15296 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
15297
15298 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
15299 (main_jcf): Don't define.
15300 (process_file): Don't set `main_jcf'.
15301
15302 * java-tree.h (main_jcf): Don't declare.
15303
15304 * jcf-parse.c (main_jcf): Add static definition.
15305
15306 * lang.c (main_jcf): Don't define.
15307
15308 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15309
15310 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
15311
15312 * decl.c (copy_lang_decl): Likewise for `bcopy'.
15313
15314 * jcf-depend.c: Include "config.h", not <config.h>.
15315
15316 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
15317 `bcopy' to PTR.
15318
15319 * jcf-path.c: Include "config.h", not <config.h>.
15320
15321 * lex.c: Don't include various system header files.
15322 (java_init_lex): Cast the argument of `bzero' to PTR
15323
15324 * parse-scan.y (java_push_parser_context): Likewise.
15325
15326 * parse.y (java_push_parser_context): Likewise.
15327 (patch_bc_statement): Match format specifier to variable argument.
15328
15329 * xref.c: Don't include <stdio.h>.
15330
15331 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
15332
15333 * parse.y (struct parser_ctxt *ctxp): Now global.
15334 (declare_local_variables): Use WFL compound value for the
15335 declaration source line value, when doing cross-referencing.
15336
15337 1999-03-31 Tom Tromey <tromey@cygnus.com>
15338
15339 * gjavah.c (print_field_info): Allow constants of other types.
15340 (print_include): Generate include when new name is proper prefix
15341 of already printed name.
15342 (add_namelet): Likewise.
15343 (cxx_keyword_subst): New function.
15344 (print_method_info): Use it.
15345 (print_field_name): New function.
15346 (get_field_name): New function.
15347 (print_field_info): Use get_field_name and print_field_name.
15348
15349 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15350
15351 * Makefile.in (keyword.h): Generate using gperf language 'C', not
15352 'KR-C', so gperf uses the `const' keyword on strings.
15353
15354 * keyword.gperf (java_keyword): Const-ify a char*.
15355
15356 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15357
15358 * parse.y (patch_bc_statement): Fixed identation and a bogus
15359 `printf' format.
15360
15361 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15362
15363 * parse.y (patch_assignment): Allow static variables in other
15364 classes to be assigned.
15365
15366 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15367
15368 * class.c (maybe_add_interface): Remove unused variable
15369 `interface_binfo'.
15370 (make_class_data): Use = for assignment, not ==. Likewise.
15371 (emit_register_classes): Remove unused variable `decl'.
15372
15373 * lex.c: Fix comment so as not to contain an embedded `/*'.
15374
15375 * verify.c (verify_jvm_instructions): Remove unused variable
15376 `self_type'.
15377
15378 1999-03-27 Per Bothner <bothner@cygnus.com>
15379
15380 * parse.y (complete_loop_body): Rename to finish_loop_body.
15381 (complete_labeled_statement): Rename to finish_labeled_statement.
15382 (complete_for_loop): Rename to finish_for_loop.
15383 (complete_method_declaration): Rename to finish_method_declaration.
15384
15385 * java-tree.h (continue_identifier_node): New global node.
15386 * decl.c: Define and initialize continue_identifier_node.
15387 * parse.y (generate_labeled_block): Remove - no longer needed.
15388 (build_loop_body): Use continue_identifier_node for continue block.
15389 (finish_labeled_statement): Also do pop_labeled_block actions.
15390 (java_complete_lhs): POP_LOOP even if error.
15391 (build_labeled_block): Special handling for continue_identifier_node.
15392 (patch_loop_statement): Re-organize.
15393 (patch_bc_statement): Re-write.
15394
15395 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15396
15397 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
15398 using a WFL compound value.
15399 * parse.y (xref.h): Include.
15400 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
15401 WFL compound value.
15402 (register_fields): Set WFL compound value to lineno if doing
15403 xrefs.
15404 (java_complete_expand_method): Call expand_xref if flag_emit_xref
15405 is set.
15406 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
15407 * xref.h (expand_xref): Prototype renamed from xref_generate.
15408
15409 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15410
15411 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
15412 (GET_CURRENT_BLOCK): New macro.
15413 * parse.y (current_static_block): New global variable.
15414 (method_body:): Define action.
15415 (complete_method_declaration): Set current_function_decl to NULL
15416 when work on the current method is done.
15417 (declare_local_variables): Use GET_CURRENT_BLOCK.
15418 (java_method_add_stmt): Likewise.
15419 (java_complete_expand_method): Disable the use of `this' when
15420 expanding <clinit>.
15421 (enter_a_block): If no current method exist, use
15422 current_static_block to link static initializer blocks.
15423 (exit_block): Rewritten to use current_static_block when no current
15424 method decl exists.
15425 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
15426 (patch_return): Forbid the use of `return' in static initializers.
15427 (patch_throw_statement): Fixed indentation. Issue specific error
15428 for uncaught thrown checked exception in static initializer
15429 blocks. Removed FIXME.
15430
15431 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
15432
15433 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
15434 Link gcj from gcc.o.
15435
15436 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15437
15438 * parse.y (find_applicable_accessible_methods_list): When dealing
15439 with interface: ensure that a given interface or java.lang.Object
15440 are searched only once.
15441
15442 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15443
15444 * gjavah.c (print_c_decl): Remove unused argument `flags'.
15445
15446 * jcf-dump.c (print_access_flags): Add braces around if-else.
15447
15448 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
15449 COMBINE_INPUTS.
15450
15451 * lex.c (build_wfl_node): Add static prototype.
15452
15453 * lex.h (build_wfl_node): Remove static prototype.
15454
15455 * parse.y: Include lex.c early enough to declare everything needed.
15456 Ensure calls to `build_wfl_node' pass the proper arguments.
15457 (create_class): Remove unused variable `super_decl'.
15458 (get_printable_method_name): Initialize variable `name'.
15459
15460 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15461
15462 * Changelog: Fixed 1999-03-22 typos.
15463 * lang.c (lang_decode_option): Fixed typo in error string in the
15464 XARG section.
15465
15466 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15467
15468 * Makefile.in (JAVA_OBJS): Added entry xref.o.
15469 (xref.o): New rule.
15470 * java-tree.h (flag_emit_xref): Declared extern.
15471 * lang.c (xref.h): Included.
15472 (flag_emit_xref): New global variable.
15473 (lang_decode_option): Added support for -fxref.
15474 * xref.c: Created.
15475 * xref.h: Likewise.
15476
15477 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
15478
15479 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
15480 linked with.
15481
15482 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15483
15484 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
15485 $(srcdir)/../system.h and $(JAVA_TREE_H).
15486 (jcf-io.o): Depend on $(JAVA_TREE_H).
15487 (mangle.o): Likewise.
15488
15489 * check-init.c (check_cond_init): Add static prototype.
15490
15491 * class.c (build_java_method_type, hashUtf8String,
15492 make_field_value, get_dispatch_vector, get_dispatch_table,
15493 append_gpp_mangled_type, mangle_static_field): Likewise.
15494 (strLengthUtf8): Hide unused definition.
15495 (hashUtf8String): Const-ify.
15496 (make_field_value): Un-ANSI-fy.
15497
15498 * constants.c: Move inclusion of jcf.h above java-tree.h.
15499 (set_constant_entry, find_class_or_string_constant,
15500 find_name_and_type_constant, get_tag_node,
15501 build_constant_data_ref): Add static prototype.
15502
15503 * decl.c (push_jvm_slot, builtin_function,
15504 lookup_name_current_level): Likewise.
15505 (builtin_function): Const-ify.
15506
15507 * except.c (expand_start_java_handler, expand_end_java_handler):
15508 Add static prototype.
15509
15510 * expr.c (flush_quick_stack, push_value, pop_value,
15511 java_stack_swap, java_stack_dup, build_java_athrow,
15512 build_java_jsr, build_java_ret, expand_java_multianewarray,
15513 expand_java_arraystore, expand_java_arrayload,
15514 expand_java_array_length, build_java_monitor, expand_java_pushc,
15515 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
15516 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
15517 expand_compare, expand_test, expand_cond, expand_java_goto,
15518 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
15519 expand_java_field_op, java_push_constant_from_pool): Likewise.
15520
15521 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
15522 (build_java_arraynull_check): Mark parameters `node' and `type'
15523 with ATTRIBUTE_UNUSED.
15524 (note_label): Likewise for parameter `current_pc'.
15525 (expand_java_call, expand_java_ret): Hide unused definition.
15526
15527 * java-tree.h (make_class, build_constants_constructor,
15528 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
15529 init_outgoing_cpool, register_class, emit_register_classes,
15530 java_layout_seen_class_methods): Prototype.
15531 (unicode_mangling_length): Const-ify.
15532 (append_gpp_mangled_name, append_gpp_mangled_classtype,
15533 emit_unicode_mangled_name, format_int, format_uint,
15534 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
15535 jcf_print_utf8_replace, open_class): Prototype.
15536
15537 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
15538 <stdio.h>. Include tree.h/java-tree.h.
15539 (utf8_equal_string usage, process_class): Add static prototype.
15540 (open_class): Don't prototype this here.
15541 (utf8_equal_string): Match arguments to format specifiers.
15542 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
15543 TABLE_SWITCH, disassemble_method): Likewise.
15544
15545 * jcf-io.c: Include tree.h/java-tree.h.
15546 (open_class, find_classfile, jcf_print_utf8,
15547 jcf_print_utf8_replace): Const-ify.
15548
15549 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
15550 parse_class_file): Add static prototype.
15551 (find_in_current_zip): Match definition to existing static
15552 prototype.
15553
15554 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
15555 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
15556 finish_jcf_block, define_jcf_label, get_jcf_label_here,
15557 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
15558 write_chunks, adjust_typed_op, generate_bytecode_conditional,
15559 generate_bytecode_return, perform_relocations, init_jcf_state,
15560 init_jcf_method, release_jcf_state, generate_classfile):
15561 Add static prototype.
15562 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
15563 (make_class_file_name): Const-ify.
15564
15565 * jcf.h (find_classfile): Const-ify.
15566
15567 * jv-scan.c (reset_report): Remove prototype.
15568
15569 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
15570 (error): Rewrite to allow varargs.
15571
15572 * lang.c (lang_f_options): Const-ify.
15573
15574 * lex.c (java_parse_escape_sequence): Add static prototype.
15575 (java_allocate_new_line): Match definition to existing static
15576 prototype.
15577
15578 * mangle.c Include tree.h/java-tree.h.
15579 (unicode_mangling_length, emit_unicode_mangled_name,
15580 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
15581
15582 * parse.h (jdep_code): Remove trailing comma in enumeration.
15583 (java_get_line_col): Move prototype outside of !JC1_LITE test.
15584 (reset_report): Add prototype.
15585
15586 * verify.c (push_pending_label, merge_types): Add static
15587 prototypes.
15588
15589 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
15590
15591 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
15592
15593 * parse.y (find_applicable_accessible_methods_list): Extend the
15594 search to superinterfaces when relevant.
15595 (search_applicable_methods_list): New function.
15596
15597 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15598
15599 * class.c (unmangle_classname): Implemented stricter testing
15600 before setting the QUALIFIED_P flag on an identifier.
15601
15602 1999-03-16 Per Bothner <bothner@cygnus.com>
15603
15604 * parse.y (java_complete_lhs): Call force_evaluation_order
15605 after patch_newarray.
15606 (patch_binop): Don't call fold if there are side effects.
15607
15608 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15609
15610 * parse.y (java_stabilize_reference): Use save_expr instead of
15611 building a SAVE_EXPR node.
15612 (java_complete_lhs): Patch the resulting string of the `+='
15613 operator (if necessary) and complete the RHS after having built
15614 the cast.
15615
15616 1999-03-15 Per Bothner <bothner@cygnus.com>
15617
15618 * class.c (make_class): Don't set CLASS_P here (because
15619 this function is also called by build_java_array_type).
15620 (push_class): Set CLASS_P here instead.
15621 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
15622
15623 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
15624 context. If the context is class, perfer "super" over "synchronized".
15625 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
15626
15627 * parse.y (create_class): Don't call parser_check_super here;
15628 it is not robust. Always wait until later.
15629
15630 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
15631 match what JDK 1.2 does), but don't set ACC_PUBLIC.
15632
15633 1999-03-13 Per Bothner <bothner@cygnus.com>
15634
15635 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
15636 * lex.h (UNGETC): Change misleading macro.
15637
15638 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15639
15640 * parse.y (java_stabilize_reference): Return NODE when patching a
15641 COMPOUND_EXPR.
15642 (java_complete_lhs): Put parenthesis around truth values.
15643
15644 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15645
15646 * class.c (layout_class_method): Don't make rtl for interface
15647 methods.
15648 * parse.h (GET_TYPE_NAME): New macro.
15649 * parse.y (if_then_statement:): Fixed indentation.
15650 (if_then_else_statement:): Likewise.
15651 (for_statement:): Fixed spacing.
15652 (try_statement:): Fixed indentation.
15653 (create_interface): Don't force interfaces to be abstract.
15654 (method_header): Abstract methods are OK in interfaces.
15655 (declare_local_variables): Fixed typo in comment.
15656 (java_complete_expand_method): Fixed indentation.
15657 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
15658 non accessible fields.
15659 (java_stabilize_reference): New function.
15660 (java_complete_lhs): Fixed indentation. Use
15661 java_stabilize_reference in compound assignment. Insert the
15662 cast. If not processing `+' fix string constants before processing
15663 binop.
15664
15665 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15666
15667 * constants.c (find_class_or_string_constant): Cast variable `j'
15668 to a `jword' when comparing against one.
15669
15670 * expr.c (java_lang_expand_expr): Remove unused variables
15671 `has_finally_p' and `op0'.
15672
15673 * gjavah.c (print_field_info): Cast a value to jint when comparing
15674 against one. Likewise for a jlong.
15675 (add_namelet): Likewise cast a `sizeof' to an int when comparing
15676 against a signed quantity.
15677
15678 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
15679 (print_signature): Don't needlessly dereference variable `str'
15680
15681 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
15682 `max_locals' with ATTRIBUTE_UNUSED.
15683 (jcf_parse_class): Likewise for variable `index'.
15684
15685 * parse.h (reverse_jdep_list): Remove static prototype.
15686
15687 * parse.y (build_jump_to_finally): Remove prototype and definition.
15688 (reverse_jdep_list): Add static prototype.
15689
15690 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
15691 `assignment' and `expr_decl'.
15692
15693 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
15694
15695 1999-03-12 Andrew Haley <aph@cygnus.com>
15696
15697 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
15698 we'll need a directory separator and a null character.
15699
15700 1999-03-10 Per Bothner <bothner@cygnus.com>
15701
15702 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
15703
15704 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
15705
15706 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
15707 interfaces.
15708
15709 1999-03-05 Per Bothner <bothner@cygnus.com>
15710
15711 * lex.c (java_parse_end_comment): Take extra parameter (next char).
15712
15713 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
15714
15715 * class.c (layout_class_method): A static method in a base class
15716 is never overridden, so treat it like it doesn't exist.
15717 However, do complain about private non-static method overriding
15718 public static method.
15719
15720 * parse.y: Don't set unused INITIALIZED_P flag.
15721 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
15722
15723 * parse.y (find_expr_with_wfl): Optimize tail-calls.
15724 (build_array_from_name): Re-order &index[string] to &string[index].
15725
15726 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
15727 error_mark (it might catch more errors, but it is more likely to lose).
15728
15729 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15730
15731 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
15732 (parse-scan.o): Depend on toplev.h.
15733
15734 * class.c (make_method_value): Add prototype. Make it static.
15735 Remove unused second argument, caller changed.
15736
15737 * expr.c (java_lang_expand_expr): Remove unused variable
15738 `return_label'.
15739
15740 * java-tree.h: Don't prototype find_in_current_zip.
15741 Add prototypes for verify_constant_pool, start_java_method,
15742 end_java_method, give_name_to_locals, expand_byte_code,
15743 open_in_zip, set_constant_value, find_constant1, find_constant2,
15744 find_utf8_constant, find_string_constant, find_class_constant,
15745 find_fieldref_index, find_methodref_index, write_constant_pool,
15746 count_constant_pool_bytes and encode_newarray_type.
15747
15748 * jcf-dump.c: Remove unused variable `LONG_temp'.
15749
15750 * jcf-parse.c: Include parse.h.
15751 (jcf_parse_source): Remove unused parameter, all callers changed.
15752 (jcf_figure_file_type): Add static prototype.
15753 (find_in_current_zip): Likewise. Also remove unused parameter,
15754 all callers changed.
15755 (read_class): Initialize variable `saved_pos'.
15756
15757 * jcf-reader.c (jcf_parse_preamble): Mark variables
15758 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
15759
15760 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
15761 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
15762 (java_parse_doc_section): Initialize variable `seen_star'.
15763 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
15764 (java_lex_error): Mark parameters `msg' and `forward' with
15765 ATTRIBUTE_UNUSED.
15766 (java_get_line_col): Mark parameters `filename' and `line' with
15767 ATTRIBUTE_UNUSED.
15768
15769 * parse-scan.y: Include toplev.h.
15770 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
15771
15772 * parse.h: use `struct JCF', not plain `JCF'.
15773 (java_parser_context_save_global, java_expand_classes
15774 java_parser_context_restore_global, java_parse): Add prototypes.
15775
15776 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
15777 `node'.
15778
15779 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
15780
15781 * check-init.c (check_init): COPYN takes word count, not bit count.
15782
15783 1999-02-26 Per Bothner <bothner@cygnus.com>
15784
15785 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
15786 explicit build_decl. (Avoids crash in reload when optimizing.)
15787
15788 1999-02-25 Per Bothner <bothner@cygnus.com>
15789
15790 * decl.c (complete_start_java_method): Handle synchronized method
15791 even when compiling from bytecode.
15792
15793 1999-02-26 Tom Tromey <tromey@cygnus.com>
15794
15795 * gjavah.c (add_class_decl): Only generate `#include' if outer
15796 class is not the name of the class we are processing. Correctly
15797 append `.h' in #include.
15798 (process_file): Clean up newlines around generated `#include's.
15799 (decode_signature_piece): Correctly handle inner classes.
15800 (struct include): New structure.
15801 (all_includes): New global.
15802 (print_include): New function.
15803 (add_class_decl): Use it.
15804 (process_file): Likewise.
15805 (add_class_decl): Generate include for java-array.h if array
15806 seen.
15807 (process_file): Don't generate java-array.h include.
15808
15809 * gjavah.c (add_namelet): Check for standard package names here.
15810 (add_class_decl): Don't check for standard package names here.
15811
15812 1999-02-25 Tom Tromey <tromey@cygnus.com>
15813
15814 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
15815 When reading a zip file, only use strncmp if both strings are
15816 bigger than the buffer length. Initialize `k' when looping
15817 through zip file.
15818
15819 1999-02-24 Tom Tromey <tromey@cygnus.com>
15820
15821 * gjavah.c (struct namelet): New structure.
15822 (add_namelet): New function.
15823 (print_namelet): New function.
15824 (print_class_decls): Use add_namelet and print_namelet to generate
15825 namespaces and not classes.
15826 (method_printed): New global.
15827 (HANDLE_END_METHOD): Examine method_printed.
15828 (print_method_info): Set method_printed when required. Print
15829 error if function to be ignored is marked virtual. Handle $finit$
15830 method.
15831 (METHOD_IS_FINAL): New macro.
15832 (print_field_info): Use it.
15833 (HANDLE_METHOD): Clear method_printed.
15834 (method_pass): New global.
15835 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
15836 (process_file): Do two passes over both fields and methods.
15837 (HANDLE_METHOD): Examine method_pass.
15838 (root): New global.
15839 (add_class_decl): New function.
15840 (print_class_decls): Don't scan over entire constant pool.
15841
15842 1999-02-23 Tom Tromey <tromey@cygnus.com>
15843
15844 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
15845 disable linking in that case.
15846
15847 1999-02-20 Tom Tromey <tromey@cygnus.com>
15848
15849 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
15850 not 0x1f.
15851
15852 1999-02-21 Per Bothner <bothner@cygnus.com>
15853
15854 * decl.c (build_result_decl), java-tree.h: New method.
15855 (complete_start_java_method): Handle synchronized methods.
15856 Don't build DECL_RESULT here. (Ordering dependency problem.)
15857 (start_java_method): Call build_result_decl here instead ...
15858 * parse.y (java_complete_expand_method): ... and here.
15859 (expand_start_java_method): Don't call complete_start_java_method here.
15860 (java_complete_expand_method): Call it here instead.
15861 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
15862 * java-tree.h: ... here.
15863
15864 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
15865 * parse.y (java_complete_lhs): Don't call force_evaluation_order
15866 for ARRAY_REF - it doesn't work when array bounds are checked.
15867 (patch_array_ref): Handle it here instead.
15868
15869 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
15870
15871 1999-02-19 Per Bothner <bothner@cygnus.com>
15872
15873 Force left-to-right evaluation of binary operations etc.
15874 * expr.c (force_evaluation_order), java-tree.h: New function.
15875 * parse.y (java_complete_lhs): Pass binary operations, procedure
15876 calls, and ARRAY_REFs to force_evaluation_order.
15877 (various): Set TREE_SIDE_EFFECTS more carefully.
15878
15879 Tolerate random (non-UTF8) encoding in comments without complaining.
15880 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
15881 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
15882
15883 * parse.y (resolve_qualified_expression_name): Handle error_mark.
15884 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
15885
15886 * parse.y (java_complete_lhs): Ignore an empty statement in a
15887 COMPOUND_EXPR. Don't complain about empty statement after return.
15888
15889 1999-02-19 Per Bothner <bothner@cygnus.com>
15890
15891 * parse.y (obtain_incomplete_type): Don't wrap unknown types
15892 in TREE_LIST - just chain the POINTER_TYPEs together.
15893 (resolve_class): If type already resolved, return decl.
15894 After resolving, update TREE_TYPE(class_type), and name (if array).
15895 * parse.h (do_resolve_class), parse.y: Make non-static.
15896 * class.c (maybe_layout_super_class): Take this_class argument.
15897 Do do_resolve_class if necessary.
15898 (layout_class, layout_class_methods): Adjust calls appropriately.
15899 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15900 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
15901 * typeck.c (build_java_array_type): Don't call layout_class.
15902
15903 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15904
15905 * parse.y (check_pkg_class_access): Allow private class access
15906 within the same package.
15907 (strip_out_static_field_access_decl): New function.
15908 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
15909 operator argument before testing its nature.
15910
15911 1999-02-03 Per Bothner <bothner@cygnus.com>
15912
15913 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
15914 (TRY_EXPR): Simplify - it no longer has a finally clause.
15915 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
15916 Simpler handling of TRY_EXPR, which no longer has a finally clause.
15917 * expr.c (java_lang_expand_expr): Likewise.
15918 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
15919 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
15920 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
15921 (build_try_statement): Remove finally parameter and handling.
15922 (build_try_finally_statement): New function.
15923 (patch_try_statement): No longer need to support finally clause.
15924 (try_statement): Update grammar action rules.
15925 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
15926 Simpler handling of TRY_EXPR, which no longer has a finally clause.
15927
15928 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
15929
15930 * jcf-parse.c (get_constant): Add braces around computation of 'd'
15931 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
15932
15933 1999-02-17 Andrew Haley <aph@cygnus.com>
15934
15935 * class.c (build_utf8_ref): Back out broken patch which was
15936 intended to to output signatures using '.' as a separator.
15937
15938 * class.c (make_class_data): Output signatures using '.' as a
15939 separator, rather than '/'.
15940 (mangled_classname): Likewise.
15941 (make_field_value): Likewise.
15942 (make_method_value): Likewise.
15943 * constants.c (alloc_class_constant): Likewise.
15944 * expr.c (build_invokeinterface): Likewise.
15945
15946 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15947
15948 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
15949 of an ancient workaround.
15950
15951 1999-02-10 Jeffrey A Law (law@cygnus.com)
15952
15953 * jvspec.c (xmalloc): Kill the prototype. It does not belong
15954 here anymore.
15955
15956 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15957
15958 * lex.c (yylex): Encode \0 as UTF8.
15959
15960 1999-02-10 Tom Tromey <tromey@cygnus.com>
15961
15962 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
15963 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
15964 (libgcj_zip): Renamed.
15965 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
15966 LIBJAVA_ZIP_FILE.
15967 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
15968
15969 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
15970 (GC_NAME): Renamed -lgc to -lgcjgc.
15971
15972 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15973
15974 * lex.c (java_lang_cloneable): Initialize.
15975 * parse.y (java_lang_cloneable): New static variable.
15976 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
15977 doing one more qualification round.
15978 (valid_ref_assignconv_cast_p): Reject null source or
15979 destination. Allow an array to be cast into java.lang.Cloneable.
15980 (patch_cast): Swapped two first arguments to first call to
15981 valid_ref_assignconv_cast_p.
15982
15983 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
15984
15985 * parse.h: DECL_P renamed JDECL_P.
15986 * parse.y: DECL_P replaced by JDECL_P.
15987 (build_array_from_name): Always use pointer's type.
15988 (patch_bc_statement): Extra code to search continue target in a
15989 for loop. Fixed comments. Continue target is current loop when
15990 unlabeled.
15991
15992 1999-02-05 Andrew Haley <aph@cygnus.com>
15993
15994 * class.c (make_class_data): The superclass of an interface should
15995 be null, not class Object.
15996
15997 * lex.c (java_lex): Sign extend hex literals.
15998
15999 1999-02-04 Andrew Haley <aph@cygnus.com>
16000
16001 * class.c (build_utf8_ref): Output signatures using '.' as a
16002 separator, rather than '/'.
16003 (make_class_data): Likewise.
16004
16005 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
16006
16007 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
16008 mkstemp.o. Get them from libiberty now.
16009
16010 1999-02-02 Jeffrey A Law (law@cygnus.com)
16011
16012 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
16013
16014 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16015
16016 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
16017 from libiberty.h
16018
16019 1999-02-02 Per Bothner <bothner@cygnus.com>
16020
16021 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
16022 * jcf-write.c (generate_bytecode_return): New function.
16023 (generate_bytecode_insns): Use it, for RETURN_EXPR.
16024
16025 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
16026 generate special [fd]const_[01] instructions.
16027
16028 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
16029
16030 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
16031 handling OPCODE_lookupswitch or OPCODE_tableswitch.
16032
16033 1999-02-01 Per Bothner <bothner@cygnus.com>
16034
16035 * parse.y (patch_method_invocation): Handle calling static methods,
16036 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
16037
16038 * parse.y (java_complete_lhs): Don't complain about unreachable
16039 exit condition in a do-while statement.
16040
16041 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
16042
16043 * lex.c (java_read_char): Fixed utf8 decoding.
16044 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
16045 range.
16046 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
16047 comments. Local variable `all_primitive' is gone. Broadened
16048 acceptance of `0' to floating point targets. `long' can now be
16049 widened to `double' or `float'.
16050 (valid_method_invocation_conversion_p): Added leading
16051 comment. Fixed tabulation.
16052 (build_string_concatenation): Optimize out left or right empty
16053 string constants.
16054
16055 1999-01-28 Per Bothner <bothner@cygnus.com>
16056
16057 * jcf-write.c (localvar_alloc): Only emit entry for
16058 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
16059 (generate_bytecode_insns): Only call put_linenumber if
16060 debug_info_level > DINFO_LEVEL_NONE.
16061 * jvspec.c (lang_specific_driver): If no -O* or -g* option
16062 is specified, add -g1 (for compatibility wih javac).
16063
16064 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
16065
16066 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
16067 gjavah.o, check-init.o, jv-scan.o
16068
16069 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16070
16071 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
16072
16073 * gjavah.c: Include config.h and system.h.
16074
16075 * javaop.h (inline): Don't define, its handled by system.h.
16076 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
16077 from `inline' to `static inline'.
16078
16079 * jcf.h (inline): Don't define, its handled by system.h.
16080
16081 * lex.c (inline): Likewise.
16082
16083 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
16084
16085 * lang-specs.h: Map -Qn to -fno-ident.
16086
16087 1999-01-29 Richard Henderson <rth@cygnus.com>
16088
16089 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
16090
16091 1999-01-29 Tom Tromey <tromey@cygnus.com>
16092
16093 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
16094 then cast it to Object before calling `append' method.
16095
16096 1999-01-28 Per Bothner <bothner@cygnus.com>
16097
16098 * check-init.c (check_bool2_init, check_bool_init, check_init):
16099 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
16100 * jcf-write.c (generate_bytecode_insns): Likewise.
16101
16102 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
16103
16104 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
16105 * parse.y (patch_cast): Allow a boolean to be cast into a
16106 boolean.
16107
16108 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16109
16110 * parse.y: (class_declaration:): Fixed indentation.
16111 (class_member_declaration:): Extra `;' after field declaration now
16112 accepted.
16113 (interface_declaration:): Removed debug messages in error reports.
16114 (patch_binop): Nodes created and returned inherit the orignal
16115 node's COMPOUND_ASSIGN_P flag value.
16116 (patch_cast): Fix cast from char to floating point.
16117
16118 1999-01-25 Andrew Haley <aph@cygnus.com>
16119
16120 * except.c, java-except.h (expand_resume_after_catch): new
16121 function.
16122 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
16123 to branch back to main flow of control after a catch block.
16124
16125 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16126
16127 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
16128 $(srcdir)/../system.h.
16129 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
16130 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
16131 (jcf-write.o): Likewise.
16132 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16133 (mangle.o): Depend on $(srcdir)/../toplev.h.
16134 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16135 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16136
16137 * class.c: Include output.h and parse.h.
16138 (mangled_classname): Add the `const' keyword to a char*.
16139 (find_named_method): Hide unused function definition.
16140 (build_utf8_ref): Change type of variable `c' to unsigned char.
16141 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
16142 (build_class_ref): Add the `const' keyword to a char*.
16143 (layout_class_method): Remove unused variable `buf'.
16144
16145 * decl.c (find_local_variable): Remove unused variable `rtl'.
16146 (pushdecl): Likewise for variables `different_binding_level' and
16147 `oldglobal'.
16148 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
16149 (maybe_build_cleanup): Likewise for parameter `decl'.
16150
16151 * except.c (expand_start_java_handler): Mark parameter `range'
16152 with ATTRIBUTE_UNUSED.
16153
16154 * expr.c: Include except.h.
16155 (pop_type): Remove unused variable `i'.
16156 (pop_value): Likewise for variables `n_words' and `i'.
16157 (expand_java_arrayload): Likewise for variable `convert'.
16158 (java_lang_expand_expr): Likewise for variables `op0', `type',
16159 `mode', `unsignedp', `node' and `elements'.
16160 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
16161 `eh_ranges'.
16162 (process_jvm_instruction): Add a `const' qualifier to a char*.
16163
16164 * gjavah.c (output_directory): Add the `const' keyword to a char*.
16165 (temp_directory): Likewise.
16166 (print_c_decl): Likewise.
16167 (print_method_info): Likewise.
16168 (decode_signature_piece): Likewise.
16169 (print_mangled_classname): Likewise.
16170
16171 * java-except.h: Provide prototypes for maybe_start_try,
16172 maybe_end_try and add_handler.
16173
16174 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
16175 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
16176 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
16177 init_expr_processing, push_super_field, init_class_processing,
16178 can_widen_reference_to, class_depth, verify_jvm_instructions,
16179 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
16180 set_local_type, merge_type_state, push_type, load_type_state,
16181 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
16182 emit_unicode_mangled_name): Add prototypes.
16183
16184 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
16185 (print_signature_type): Use ISDIGIT, not isdigit.
16186 (print_signature): Remove unused variable `j'.
16187
16188 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
16189 int when comparing against one.
16190
16191 * jcf-parse.c: Include toplev.h.
16192
16193 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
16194 (localvar_free): Remove unused variable `i'.
16195 (generate_bytecode_conditional): Likewise for variable `kind'.
16196
16197 * jv-scan.c: Include config.h and system.h. Remove redundant
16198 OS header and gansidecl.h includes.
16199 (warning): Add the `const' keyword to a char*. Also add
16200 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
16201 __STDC__, when determining whether to use ANSI-isms.
16202 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
16203 (xmalloc): Don't redundantly prototype here.
16204 (main): Remove unused parameter `envp'. Also fix the arguments
16205 passed to function `fatal' to match the format specifier.
16206
16207 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
16208
16209 * mangle.c: Include toplev.h.
16210 (emit_unicode_mangled_name): Declare parameter `len'.
16211
16212 * parse.y (parse_warning_context): Add the `const' keyword to a
16213 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
16214 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
16215 (issue_warning_error_from_context): Add the `const' keyword to
16216 a char*.
16217 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
16218 not `__STDC__' for whether to use ANSI-isms.
16219
16220 * typeck.c (incomplete_type_error): Mark parameters `value' and
16221 `type' with ATTRIBUTE_UNUSED.
16222 (parse_signature_type): Use ISDIGIT, not isdigit.
16223
16224 * verify.c (check_pending_block): Add the `const' keyword to a char*.
16225 (verify_jvm_instructions): Likewise. Remove unused variables
16226 `field_name' and `default_val'.
16227
16228 * zextract.c: Include config.h and system.h. Remove redundant
16229 OS header includes.
16230
16231 * zipfile.h: Prototype `read_zip_archive'.
16232
16233 1999-01-21 Andrew Haley <aph@cygnus.com>
16234
16235 * typeck.c (convert): Allow conversions to void type: some
16236 optimizations in gcc do this.
16237
16238 1999-01-21 Andrew Haley <aph@cygnus.com>
16239
16240 * typeck.c (convert_ieee_real_to_integer): New function.
16241 (convert): When not using fast-math and using hardware fp, convert
16242 an IEEE NaN to zero.
16243
16244 1999-01-18 Andrew Haley <aph@cygnus.com>
16245
16246 * parse.y (patch_binop): Do a type conversion from signed to
16247 unsigned and then back to signed when a ">>>" is found.
16248
16249 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16250
16251 * java-tree.h: (check_for_initialization): Added prototype.
16252 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
16253 * parse.y (do_resolve_class): Removed unused locals.
16254 (read_import_dir): Likewise.
16255 (resolve_qualified_expression_name): Array creation
16256 expressions are valid primary expressions.
16257 (qualify_ambiguous_name): Likewise.
16258 (patch_synchronized_statement): Removed unused local.
16259
16260 1999-01-17 Jeffrey A Law (law@cygnus.com)
16261
16262 * Makefile.in (zextract.o): Add dependencies.
16263
16264 * Makefile.in: Do not put ^Ls at the start of a line.
16265
16266 1999-01-15 Per Bothner <bothner@cygnus.com>
16267
16268 * expr.c (process_jvm_instruction): Coerce to correct Throwable
16269 sub-type the result of the call that gets the exception value.
16270
16271 * parse.y (java_complete_expand_methods): If flags_syntax_only,
16272 don't call finish_class.
16273
16274 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
16275 clear found before continuing.
16276
16277 * verify.c (verify_jvm_instructions): On an array load, allow
16278 and handle top of stack to be TYPE_NULL.
16279
16280 * gjavah.c (generate_access): Translate Java package private or
16281 protected access to C++ public, but with a comment.
16282
16283 1999-01-13 Andrew Haley <aph@cygnus.com>
16284
16285 * expr.c (generate_name): Name prefix changed to avoid clashes
16286 with assembler temp labels.
16287
16288 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
16289 MODIFY_EXPR. Without this, code for the assignment may not be
16290 generated at all and the synchronized statement will read an
16291 uninitialized variable.
16292
16293 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16294
16295 * class.c (maybe_layout_super_class): Fixed returned value.
16296 * lex.c: Added 1999 to the copyright.
16297 (java_init_lex): Initialize java_lang_imported.
16298 * lex.h: Added 1999 to the copyright.
16299 * parse.h: Added 1999 to the copyright.
16300 (REGISTER_IMPORT): Fixed typo in trailing macro.
16301 (CURRENT_OSB): New macro.
16302 (struct parser_ctxt): New fields osb_depth, osb_limit.
16303 * parse.y (java_lang_id): New global variable.
16304 (type_import_on_demand_declaration): Don't import java.lang.* twice.
16305 (array_creation_expression:): Use CURRENT_OSB.
16306 (dims:): Uses a stack to keep track of array dimensions.
16307 (cast_expression:): Use CURRENT_OSB.
16308 (find_expr_with_wfl): Return NULL if node found doesn't meet the
16309 conditions.
16310 (register_fields): Fixed typos in comment.
16311 (check_method_redefinition): Fixed comment indentation.
16312 (java_check_regular_methods): Set saved found wfl to NULL after
16313 having reinstalled it in the previously found DECL_NAME.
16314
16315 1999-01-10 Richard Henderson <rth@cygnus.com>
16316
16317 * gjavah.c (java_float_finite): Use a union to do type punning.
16318 (java_double_finite): Likewise.
16319
16320 1999-01-09 Per Bothner <bothner@cygnus.com>
16321
16322 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
16323 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
16324 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
16325 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
16326 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
16327 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
16328
16329 1999-01-08 Per Bothner <bothner@cygnus.com>
16330
16331 * check-init.c (check_init): If compiling to native, we don't
16332 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
16333
16334 1999-01-08 Tom Tromey <tromey@cygnus.com>
16335
16336 * parse-scan.y (variable_declarator_id): Set or increment
16337 bracket_count.
16338 (bracket_count): New global.
16339 (formal_parameter): Handle case where bracket pairs trail variable
16340 declarator id.
16341
16342 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
16343
16344 * jcf-parse.c (yyparse): variable len changed from a char to an
16345 int to prevent overflow.
16346
16347 1999-01-06 Per Bothner <bothner@cygnus.com>
16348
16349 * java-tree.h: Declare read_class.
16350 * jcf-parse.c (read_class): New function.
16351 (load_class): Now just call read_class.
16352
16353 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
16354 * jcf-parse.c (parse_source_file): Declare save_error_count,
16355 which is needed by java_parse_abort_on_error macro,
16356 * parse.y (java_layout_classes, java_expand_classes): Likewise.
16357
16358 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
16359 constructor, if initializing a static field.
16360 (patch_new_array_init): Set TREE_CONSTANT if it is.
16361 * expr.c (java_lang_expand_expr): For a static array constructor
16362 of primitive elements, allocate the array itself statically.
16363 Disabled until we can set the vtable field statically.
16364
16365 * check-init.c: New file. Checks for definite assignment.
16366 * Makefile.in (JAVA_OBJS): Add check-init.o.
16367 * parse.y (java_complete_expand_method): Call check_for_initialization.
16368 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
16369
16370 1999-01-06 Graham <grahams@rcp.co.uk>
16371
16372 * parse.y : include system.h instead of including
16373 standard headers directly with the exception of <dirent.h>.
16374
16375 1999-01-06 Per Bothner <bothner@cygnus.com>
16376
16377 * lex.h: Moved static function declarations to lex.c,
16378 to shut up some -Wall warnings.
16379 * lex.c: Static function declarations moved here.
16380 * jcf-dump.c: Small fixes to shut up -Wall warnings.
16381
16382 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16383
16384 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
16385
16386 1998-12-22 Per Bothner <bothner@cygnus.com>
16387
16388 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
16389 * verify.c (verify_jvm_instructions): Fix off-by-one error.
16390
16391 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
16392 (localvar_alloc): Change return type to void,
16393 (emit_unop): Remove unused variable size.
16394
16395 * jcf-write.c (struct jcf_block): Add new union.
16396 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
16397 (call_cleanups): New functions.
16398 (struct jcf_partial): New fields num_finalizers and return_value_decl.
16399 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
16400 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
16401 * lang.c (lang_init): Call using_eh_for_cleanups.
16402 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
16403 completing operands to patch_synchronized_statement.
16404 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
16405 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
16406 WITH_CLEANUP_EXPR instead of TRY_EXPR.
16407
16408 1998-12-20 John F. Carr <jfc@mit.edu>
16409
16410 * Make-lang.in: Comment out control-Ls; they upset some makes.
16411
16412 1998-12-18 Tom Tromey <tromey@cygnus.com>
16413
16414 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
16415 consistently.
16416
16417 1998-12-17 Tom Tromey <tromey@cygnus.com>
16418
16419 * parse.y (DIR_SEPARATOR): New define.
16420 (check_class_interface_creation): Use it.
16421
16422 * parse-scan.y (report_main_declaration): Recognize
16423 `java.lang.String' in argument to main.
16424
16425 1998-12-16 Per Bothner <bothner@cygnus.com>
16426
16427 * parse.y (create_interface): Remove bogus test.
16428
16429 1998-12-16 Per Bothner <bothner@cygnus.com>
16430
16431 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
16432 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
16433
16434 1998-12-16 Tom Tromey <tromey@cygnus.com>
16435
16436 * parse-scan.y (qualified_name): Use correct sprintf format.
16437
16438 1998-12-15 Tom Tromey <tromey@cygnus.com>
16439
16440 * gjavah.c (print_field_info): Changed how most negative number is
16441 printed.
16442
16443 1998-12-14 Per Bothner <bothner@cygnus.com>
16444
16445 * parse.y (fold_constant_for_init): New function.
16446 (resolve_expression_name): Don't replace static final
16447 constant-initialized fields by its value.
16448 (java_complete_lhs): New. Same as java_complete_tree, except does
16449 not replace static final constant-initialized fields by their values.
16450 (register_fields): If there is an initializer, set DECL_INITIAL and
16451 MODIFY_EXPR_FROM_INITIALIZATION_P.
16452 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
16453 Only call patch_initialized_static_field if
16454 MODIFY_EXPR_FROM_INITIALIZATION_P.
16455 (patch_initialized_static_field): If not valid constant, clear
16456 DECL_INITIAL.
16457
16458 * parse.y (lookup_field_wrapper): Fix thinko.
16459
16460 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
16461 set and restore global lineno.
16462
16463 1998-12-14 Tom Tromey <tromey@cygnus.com>
16464
16465 * gjavah.c (print_field_info): If value to print is the smallest
16466 value of its size, then print as hex to avoid later warnings from
16467 C++ compiler.
16468
16469 1998-12-14 Tom Tromey <tromey@cygnus.com>
16470
16471 * gjavah.c (decompile_method): Decompile `return null'.
16472 (process_file): Generate `#pragma interface'.
16473 (method_declared): New global.
16474 (print_method_info): Set it.
16475 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
16476 (print_method_info): Handle abstract methods.
16477
16478 1998-12-13 Per Bothner <bothner@cygnus.com>
16479
16480 * parse.y (patch_method_invocation): If class_decl is null
16481 (e.g. an array type), use original type.
16482
16483 * parse.y (check_thrown_exceptions): Temporary hack to suppress
16484 errors about uncaught exception from clone (of array, specifically).
16485
16486 1998-12-13 Tom Tromey <tromey@cygnus.com>
16487
16488 * gjavah.c (decompile_method): Handle all types of `return'
16489 opcode. Decompile `return this' and `return'.
16490 (method_access): New global.
16491 (print_method_info): Set it.
16492 (decompile_method): Don't decompile a synchronized method.
16493
16494 1998-12-13 Tom Tromey <tromey@cygnus.com>
16495
16496 * jcf-reader.c (jcf_parse_one_method): Recognize
16497 HANDLE_END_METHOD.
16498 * gjavah.c (HANDLE_END_METHOD): New macro.
16499 (HANDLE_CODE_ATTRIBUTE): New macro.
16500 (decompile_method): New function.
16501 (print_method_info): Don't print `;\n' at end of function decl.
16502 Include java-opcodes.h.
16503 (decompiled): New global.
16504
16505 1998-12-12 Per Bothner <bothner@cygnus.com>
16506
16507 * class.c (build_class_ref): Handle PRIMTYPE.class if
16508 flag_emit_class_files.
16509 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
16510 if flag_emit_class_files.
16511 * parse.y (java_complete_tree): Pre-liminary support for
16512 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
16513
16514 * parse.y (patch_synchronized_statement): Don't call monitorexit
16515 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
16516
16517 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
16518
16519 * zipfile.h (opendir_in_zip): New declaration.
16520 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
16521 (opendir_in_zip): New function, using code from open_in_zip.
16522 (open_in_zip): Call opendir_in_zip.
16523 (find_class): Remove no-longer-used do_class_file parameter,
16524 but add source_ok parameter. Change logic so if we find a .java file,
16525 we don't look for .class in later classpath emtries.
16526 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
16527 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
16528 * gjavah.c: Update call to find_class.
16529 * jcf-dump.c: Likewise.
16530
16531 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
16532 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
16533 nothing if body is empty_stmt_node.
16534 Various little fixes so SP gets correctly adjusted.
16535 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
16536 For CALL_EXPR, test if static first.
16537 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
16538 such as the ones we create for Object and Class.
16539 Set and restore current_function_decl.
16540 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
16541 (note_possible_classname): New function.
16542 (read_import_entry): Removed. Merged with read_import_dir.
16543 (read_import_dir): Don't call find_class - that only gives us
16544 the first classpath entry having the needed package.
16545 Use the struct buffer data structure from buffer.h.
16546 (read_import_dir, find_in_imports_on_demand): The remembered
16547 class names now use '.' (not '/') as package separator.
16548
16549 * parse.y (java_complete_expand_methods): Call write_classfile
16550 here, and not in java_expand_classes (which only gets first class).
16551
16552 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16553
16554 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
16555 (register_fields): If a static fields has an initializer, just
16556 chain it on ctxp->static_initialized, and handle later.
16557 (java_complete_expand_methods): Force <clinit> first.
16558 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
16559 - it's already been completed.
16560 (patch_initialized_static_field): New function.
16561 (java_complete_field): Call it.
16562
16563 1998-12-12 Per Bothner <bothner@cygnus.com>
16564
16565 * expr.c (encode_newarray_type, build_new_array): New functions.
16566 * java-tree.h: Declare build_new_array.
16567 * jcf-write.c (patch_newarray): Use build_new_array.
16568
16569 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
16570 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
16571
16572 * parse.y (patch_new_array_init): Re-organize.
16573 Now is passed the actual array (pointer) type of the value.
16574 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
16575 (patch_array_constructor): Removed - merged into patch_new_array_init.
16576 (java_complete_tree): Update patch_new_array_init.
16577
16578 * jcf-write.c (find_constant_index): New function.
16579 (generate_bytecode_insns): Use find_constant_index.
16580 (generate_classfile): Use find_constant_index for ConstantValue.
16581
16582 1998-12-11 Tom Tromey <tromey@cygnus.com>
16583
16584 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
16585 * decl.c (init_decl_processing): Renamed dtable -> vtable.
16586 * class.c (make_class_data): Renamed dtable -> vtable, and
16587 dtable_method_count -> vtable_method_count.
16588
16589 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16590
16591 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
16592 global variables, initialized.
16593 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
16594 Declared new global variables.
16595 * lex.c (java_lex): Return long_zero_node, float_zero_node,
16596 double_zero_node, integer_zero_node upon direct matching.
16597 * parse.y (purify_type_name): Added function prototype.
16598 (duplicate_declaration_error_p): Consider new_type as potentially
16599 being a incomplete type. Use purify_type_name on type string.
16600 (method_header): saved_type: unused variable removed. Don't figure
16601 return type if method name is invalid.
16602 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
16603 processed by patch_unaryop.
16604 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
16605 increment/decrement node into its original type after binary
16606 numeric promotion on its operands.
16607
16608 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16609
16610 * parse.y (array_initializer:): Array init operand is NULL_TREE
16611 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
16612 now an error. Fixed indentation problems.
16613 (patch_string): Handle error_mark_node as an argument.
16614 (patch_new_array_init): Fixed indentation problems.
16615 (array_constructor_check_entry): Removed check on null wfl_value.
16616 Return an error if wfl_value's walk returns an error.
16617
16618 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
16619
16620 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
16621 * lex.c (java_lex): Remember column position before advancing one
16622 token. Retain location information on OCB_TK.
16623 * lex.h (typedef struct java_lc): Added new field.
16624 * parse.h (GET_SKIP_TYPE): New macro.
16625 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
16626 * parse.y (build_new_array_init, patch_new_array_init,
16627 patch_array_constructor, maybe_build_array_element_wfl,
16628 array_constructor_check_entry): New function prototypes.
16629 (switch_block:): Tagged <node>.
16630 (OCB_TK): Tagged <operator>.
16631 (array_initializer:): Installed actions.
16632 (variable_initializer): Build location information on element if
16633 necessary.
16634 (switch_statement:): Fixed indentation typo.
16635 (switch_block:): Redefined default action.
16636 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
16637 (patch_assignment): Removed duplicate code.
16638 (maybe_build_array_element_wfl, build_new_array_init,
16639 patch_new_array_init, patch_array_constructor,
16640 array_constructor_check_entry): New functions.
16641
16642 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
16643
16644 * parse.y (array_initializer): Tagged <node>.
16645 (variable_initializer:): Use default rule.
16646 (array_initializer:): Defined actions.
16647 (variable_initializers:): Likewise.
16648 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
16649 non-static field accesses.
16650 (patch_invoke): Fixed indentation typo.
16651 (java_complete_tree): Likewise.
16652 (build_labeled_block): Changed leading comment. Generate an error
16653 in case of duplicate loop labels.
16654 (patch_conditional_expr): Patch results of string concatenation
16655 operations.
16656
16657 1998-12-06 Per Bothner <bothner@cygnus.com>
16658
16659 * constants.c (find_methodref_index): When the class is an interface,
16660 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
16661
16662 * decl.c (finit_identifier_node): Use "$finit$", rather than
16663 "<finit>" (which Sun's verifier rejects).
16664 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
16665 (generate_field_initialization_code): Removed.
16666 (fix_constructors) Don't add call to $finit$ here (wrong order).
16667 (patch_method_invocation): Add $finit$ call here.
16668
16669 * java-tree.h (CALL_USING_SUPER): New macro.
16670 * parse.y (patch_invoke): Remove im local variable.
16671 (patch_method_invocation, patch_invoke): Don't pass super parameter.
16672 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
16673 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
16674
16675 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
16676
16677 * parse.y (java_complete_tree): Don't complain about unreachable
16678 statement if it is empty_stmt_node.
16679
16680 * jcf-write.c (find_constant_wide): New function.
16681 (push_long_const): Use find_constant_wide.
16682
16683 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
16684 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
16685 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
16686 Emit invokeinterface when calling an interface method.
16687 Emit invokespecial also when calling super or private methods.
16688
16689 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
16690
16691 1998-12-06 Per Bothner <bothner@cygnus.com>
16692
16693 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
16694
16695 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
16696
16697 * java-tree.h (java_layout_seen_class_methods): New function
16698 prototype.
16699 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
16700 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
16701 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
16702 * parse.y (method_declarator:): Defined action.
16703 (issue_warning_error_from_context): input_filename saved, set to
16704 the appropriate value and restored after java_error is called.
16705 (build_unresolved_array_type): Fixed comment.
16706 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
16707 (method_header): Deal with return type the same way type are
16708 handled for fields and method's parameters and local variables
16709 types are handled.
16710 (check_method_redefinition): Removed extra CR.
16711 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
16712 (java_layout_seen_class_methods): New function.
16713 (java_layout_classes): Call java_layout_seen_class_methods.
16714
16715 1998-12-03 Per Bothner <bothner@cygnus.com>
16716
16717 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
16718
16719 1998-12-03 Per Bothner <bothner@cygnus.com>
16720
16721 * jcf-dump.c (main): Fix error message.
16722 * jcf-path.c (add_entry): Style fix.
16723
16724 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
16725
16726 * class.c (layout_class_method): Call build_java_argument_signature
16727 on constructors too.
16728 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
16729 (patch_method_invocation): Define a primary when resolving an
16730 expression name. Augmented comment on code checking illegal `this'
16731 usage. Loosened it test by accepting NEW_CLASS_EXPR.
16732
16733 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16734
16735 * class.c (layout_class_method): Don't report error on non-static
16736 overriding static if the method is private.
16737 * java-tree.h (finish_class): Prototype added.
16738 * lex.c (java_get_line_col): Handle col argument -2 value.
16739 * parse.h: All static method declarations moved to parse.y.
16740 * parse.y: Now contains all static method declarations previously
16741 found in parse.h.
16742 (find_expr_with_wfl, missing_return_error,
16743 unreachable_stmt_error): New functions.
16744 (java_get_real_method_name): Identify constructors bearing class
16745 names in source code compiled classes only.
16746 (java_complete_expand_methods): Call missing_return_error.
16747 (invocation_mode): Private methods invoked as static methods.
16748 (java_complete_tree): Call unreachable_stmt_error.
16749
16750 1998-12-01 Tom Tromey <tromey@cygnus.com>
16751
16752 * Makefile.in (+target): Removed.
16753 (+xmake_file): Likewise.
16754 (+tmake_file): Likewise.
16755 (.NOEXPORT): Removed duplicate.
16756
16757 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16758
16759 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
16760
16761 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
16762
16763 * jvgenmain.c: Remove the xmalloc prototype, we get it from
16764 libiberty.h. Provide an xmalloc definition.
16765
16766 * jvspec.c: Remove the xmalloc prototype.
16767
16768 * parse-scan.y: Include config.h and system.h. Don't include
16769 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
16770 Provide an xstrdup definition.
16771
16772 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
16773
16774 * jcf-path.c (add_entry): Recognize ".jar" too.
16775 * lang-specs.h: Likewise.
16776
16777 1998-11-26 Per Bothner <bothner@cygnus.com>
16778
16779 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
16780 soft_monitorenter_node, soft_monitorexit_node, throw_node.
16781
16782 * jcf-write.c (generate_bytecode_insns):
16783 Handle pre/post-increment/decrement of long.
16784
16785 * jcf-write.c (generate_bytecode_insns):
16786 Handle missing exception handler (finally for synchronized).
16787
16788 1998-11-25 Per Bothner <bothner@cygnus.com>
16789
16790 * java-tree.h (end_params_node): Declare global.
16791 * decl.c (end_params_node): New global.
16792 (init_decl_processing, start_java_method): Use end_params_node for
16793 end of list of parameter types. Follows correct gcc conventions.
16794 * expr.c (pop_argument_types, pop_arguments): Likewise.
16795 * lang.c (put_decl_node): Likewise.
16796 * typeck.c (various places): Likewise.
16797 * class.y (various places): Likewise.
16798 * parse.y (various places): Likewise.
16799
16800 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
16801 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
16802
16803 * class.c: Add #include flags.h, remove no-longer needed declaration.
16804
16805 * class.c (layout_class_method): Remove commented-out code, re-format.
16806 Don't add vtable entry (or index) for private methods.
16807 * expr.c (expand_invoke): A private method is implicitly final.
16808 * class.c (make_class_data): If inlining or optimizing,
16809 skip private methods.
16810
16811 * class.c (finish_class): New function. Calls existing methods,
16812 but alls emits deferred inline functions.
16813 * jcf-parse.c (parse_class_file): Call finish_class.
16814 * parse.y (java_complete_expand_methods): Likewise.
16815
16816 * expr.c (build_java_binop): Explicit default, to silence -Wall.
16817
16818 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
16819
16820 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
16821
16822 * jcf-write.c (generate_bytecode_conditional): Fix typo.
16823
16824 1998-11-24 Per Bothner <bothner@cygnus.com>
16825
16826 * (generate_classfile): Always write class access flag with
16827 ACC_SUPER set.
16828
16829 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16830
16831 * class.c (maybe_layout_super_class): New function.
16832 (layout_class): Reorganized. Loop on class methods dispatched into
16833 a new function. Call maybe_layout_super_class.
16834 (layout_class_methods, layout_class_method): New functions.
16835 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
16836 class.
16837 (expand_invoke): Likewise.
16838 * java-tree.h (all_class_list): New global variable declared.
16839 (layout_class_methods, layout_class_method): New function
16840 prototypes.
16841 (LAYOUT_SEEN_CLASS_METHODS): New macro.
16842 * jcf-parse.c (all_class_list): New global variable.
16843 (load_class): Extended what class_or_name can be. Use parser
16844 context mechanism to save globals before calling jcf_parse.
16845 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
16846 is set on the file name.
16847 (jcf_parse): Layout class methods when Object is loaded, otherwise
16848 record class in all_class_list for delayed method layout.
16849 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
16850 * lang.c (put_decl_node): Decode <init> into the decl context
16851 class name.
16852 * lex.c (java_allocate_new_line): Use xmalloc.
16853 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
16854 pointers, not TREE_LIST elements.
16855 (struct parser_ctxt): Fixed comment indentations, added comments
16856 and reordered some fields.
16857 (java_check_methods): Function prototype removed.
16858 * parse.y (java_push_parser_context): Use xmalloc.
16859 (java_parser_context_restore_global): Pop extra pushed ctxp only
16860 when there's nothing next.
16861 (maybe_create_class_interface_decl): Fixed comment, add new
16862 created class decl to all_class_list.
16863 (method_header): Use GET_REAL_TYPE on argument's types.
16864 (method_declarator): Use GET_REAL_TYPE, change type to the real
16865 type in TREE_LIST dependency node. Build argument list with the
16866 real type.
16867 (create_jdep_list): Use xmalloc. Removed allocation error message.
16868 (obtain_incomplete_type): Fixed leading comment. Broadened
16869 incoming argument meaning.
16870 (register_incomplete_type): Use xmalloc. Removed allocation error
16871 message.
16872 (safe_layout_class): Fixed leading comment.
16873 (jdep_resolve_class): Reversed if statement condition and switch
16874 if and else bodies.
16875 (resolve_and_layout): Fixed leading comment. Broadened incoming
16876 argument meaning.
16877 (complete_class_report_errors): New local variable name, for
16878 clarity. purify_type_name used for all error cases.
16879 (java_get_real_method_name): Stricter check on constructors.
16880 (java_check_regular_methods): Reverse methods list only if not
16881 already laid out. Layout artificial constructor.
16882 (java_check_methods): Deleted.
16883 (source_start_java_method): Obtain incomplete type for patchable
16884 method arguments.
16885 (java_layout_classes): Fixed leading comment. Use
16886 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
16887 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
16888 before returning. Fixed comments.
16889 (java_expand_classes): Check for errors up front.
16890 (patch_method_invocation): Class to search is resolved and laid
16891 out.
16892
16893 1998-11-24 Per Bothner <bothner@cygnus.com>
16894
16895 * expr.c (java_lang_expand_expr): Add missing emit_queue.
16896
16897 * javaop.h (int8): Removed - not used.
16898 (jbyte): Redefine portably with correct signedness.
16899
16900 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
16901
16902 * jcf-write.c (generate_bytecode_insns): Fix typo
16903 OPCODE_getstatic to OPCODE_getfield.
16904
16905 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
16906 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
16907 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
16908
16909 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16910
16911 * jcf-parse.c (jcf_parse_source): Function returned type is
16912 void. Added prototype.
16913 (jcf_parse): Function returned type is void.
16914 (yyparse): Remove call to fclose on the last parsed file.
16915
16916 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
16917
16918 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16919
16920 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
16921 (layout_class): Cope with methods featuring WFL in decl names.
16922 * decl.c (unqualified_object_id_node): New global variable,
16923 initialized.
16924 (build_decl_no_layout): Removed.
16925 * expr.c (build_primtype_type_ref): Handle Double.
16926 (java_lang_expand_expr): Fixed indentations.
16927 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
16928 (flag_wall, flag_redundant, flag_not_overriding,
16929 flag_static_local_jdk1_1, unqualified_object_id_node): Global
16930 variable declarations.
16931 (build_decl_no_layout): Removed prototype.
16932 (java_get_real_method_name): Added prototype.
16933 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
16934 (java_parse_abort_on_error): Macro now just returns.
16935 * jcf-parse.c (jcf_parse_source): Check fclose returned
16936 value. Call emit_register_classes if java_report_errors returns
16937 zero.
16938 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
16939 flag_static_local_jdk1_1): New integer flags.
16940 (lang_decode_option): New flags set here.
16941 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
16942 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
16943 the flag_redundant variable.
16944 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
16945 when parsing java.lang.Object class.
16946 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
16947 NULL_TREE to build.
16948 (resolve_qualified_expression_name): Fixed indentation.
16949 (patch_array_ref): Changed prototype.
16950 (not_initialized_as_it_should_p): Prototype removed.
16951 (java_report_errors): Added function prototype.
16952 * parse.y (formal_parameter:): Changed error message for not yet
16953 supported final parameters.
16954 (class_type_list:): Set both PURPOSE and VALUE of created
16955 TREE_LIST to be class_type.
16956 (primary_no_new_array:): Handle class literals on primitive types.
16957 (parse_warning_context): Reinstalled correct force_error and
16958 do_warning flags setups.
16959 (java_report_errors): Changed prototype. Return java_error_count
16960 value.
16961 (variable_redefinition_error): Consider treating variable type as
16962 a fake pointer.
16963 (create_interface): Warn about redundant abstract modifier if
16964 flag_redundant is set. Changed error message.
16965 (lookup_field_wrapper): Save/restore globals before/after looking
16966 up field.
16967 (duplicate_declaration_error_p): Consider treating declaration
16968 type as a fake pointer.
16969 (register_fields): Extract real type from dependency node. Check
16970 for duplicate field declaration after type adjustment. Use
16971 DECL_INITIAL to store static final initialized values.
16972 (method_header): Extract real function type from dependency node.
16973 (check_abstract_method_header): Use GET_METHOD_NAME.
16974 (obtain_incomplete_type): Layout fake pointer type.
16975 (safe_layout_class): Don't try to check for methods before layout.
16976 (java_complete_class): Don't check for correct throws clause
16977 elements inheritance here.
16978 (resolve_and_layout): Broadened name parameter meaning.
16979 (reset_method_name): Use GET_METHOD_NAME.
16980 (java_get_real_method_name): New function.
16981 (java_check_regular_methods): Don't check methods in
16982 java.lang.Object. Verify lineage of throws clause elements. Use
16983 flag_no_overriding in warning report.
16984 (check_throws_clauses): Don't check if class was from
16985 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
16986 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
16987 (declare_local_variables): Use flag_static_local_jdk1_1 to report
16988 warning on unsupported final local variables. Use build_decl
16989 instead of build_decl_no_layout. Get real local variable type from
16990 dependency node.
16991 (source_start_java_method): Get real parameter type from
16992 dependency node. Call build_decl instead of build_decl_no_layout.
16993 (java_layout_classes): Reverse tree and layout type and class as
16994 required. Mark class as loaded when done.
16995 (resolve_field_access): Fixed indentation. Restricted condition
16996 leading to static field access code generation. Set field_type
16997 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
16998 (resolve_qualified_expression_name): Initialize type_found to
16999 null. Handle static field resolved during qualification. Fixed
17000 layout on non primitive field decl types.
17001 (not_accessible_p): Fixed typo in comment.
17002 (patch_method_invocation): Resolve and layout class to search from
17003 type.
17004 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
17005 layout non primitive type, if necessary. Make method node only to
17006 report errors.
17007 (find_applicable_accessible_methods_list): Consider WFL'ed method
17008 decl names. Fixed indentation.
17009 (argument_types_convertible): Resolve and layout target type if
17010 necessary.
17011 (java_complete_tree): Fixed indentation problems. Rewrote
17012 CALL_EXPR thrown exceptions check. Re-installed further processing
17013 of the assignment in certain cases.
17014 (patch_assignment): Call maybe_build_primttype_type_ref to perform
17015 inlining on class literals.
17016 (valid_builtin_assignconv_identity_widening_p): Cope with constant
17017 0 literal.
17018 (valid_method_invocation_conversion_p): Likewise.
17019 (patch_string): Temporary disable forbidden use of `this' in
17020 explicit constructor invocations when doing string concatenation
17021 within their scope.
17022 (patch_unaryop): Added comment. Reinstalled code to disable
17023 further check on assignment operation with cast expression RHS.
17024 (patch_switch_statement): Fixed indentation.
17025 (build_try_statement): Call build_decl instead of
17026 build_decl_no_layout.
17027 (patch_synchronized_statement): Likewise.
17028 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
17029 IS_UNCHECKED_EXPRESSION_P.
17030 (check_thrown_exceptions_do): Changed leading comment. Resolve and
17031 layout argument exception type.
17032 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
17033 of IS_UNCHECKED_EXPRESSION_P.
17034
17035 1998-11-18 Anthony Green <green@cygnus.com>
17036
17037 * jcf-parse.c (yyparse): Open class file in binary mode.
17038
17039 1998-11-15 Per Bothner <bothner@cygnus.com>
17040
17041 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
17042
17043 * jcf-write.c (perform_relocations): Move check out one loop.
17044
17045 1998-11-15 Anthony Green <green@hoser.cygnus.com>
17046
17047 * Make-lang.in: Fix reference to srcdir.
17048 * jv-scan.c: Add missing xmalloc prototype.
17049 * jvgenmain.c: Ditto.
17050
17051 1998-11-15 Per Bothner <bothner@cygnus.com>
17052
17053 * decl.c (error_mark_node), java-tree.h: New global.
17054 * parse.y: Use empty_stmt_node instead of size_zero_node.
17055 (build_if_else_statement): If missing else, use empty_stmt_node.
17056
17057 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
17058 (java_complete_expand_method): Complain if return is missing.
17059 (java_check_regular_methods): Comment out incorrect error check.
17060 (not_accessible_p): Fix incorrect handling of protected methods.
17061 (patch_method_invocation): Pass correct context to not_accessible_p.
17062 (find_applicable_accessible_methods_list): Likewise.
17063 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
17064 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
17065 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
17066 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
17067
17068 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
17069 (push_int_const): Remove reundant NOTE_PUSH.
17070 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
17071 (- case SWITCH_EXPR): Fix code generation bug.
17072 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
17073 (generate_classfile): More robust for abstract methods.
17074
17075 1998-11-15 Anthony Green <green@cygnus.com>
17076
17077 * Makefile.in: jv-scan and jvgenmain all require libiberty.
17078 * Make-lang.in: Ditto.
17079
17080 * jv-scan.c: Remove xmalloc and xstrdup definitions.
17081 * jvgenmain: Ditto.
17082
17083 1998-11-15 Per Bothner <bothner@cygnus.com>
17084
17085 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
17086
17087 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
17088
17089 1998-11-14 Per Bothner <bothner@cygnus.com>
17090
17091 Allow uses of interface types to verify. This is not really
17092 type-safe, but it matches what Sun does, and is OK as long as
17093 there are appropriate run-time checks.
17094 * verify.c (merge_types): If merging two interface types,
17095 just set the result to java.lang.Object.
17096 * expr.c (pop_type): Any interface is matches by java.lang.Object.
17097
17098 1998-11-13 Tom Tromey <tromey@cygnus.com>
17099
17100 * gjavah.c (main): Handle --output-class-directory argument.
17101 * jvspec.c (lang_specific_driver): Translate `-d' into
17102 -foutput-class-dir.
17103 * jcf.h (jcf_write_base_directory): Declare.
17104 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
17105 * lang-options.h: Mention -foutput-class-dir.
17106 * jcf-write.c (jcf_write_base_directory): New global.
17107 (make_class_file_name): Put generated .class file into `-d'
17108 directory, or into source directory if -d not given. Function now
17109 static.
17110 (write_classfile): Free class file name. Handle case where class
17111 file name is NULL.
17112 (DIR_SEPARATOR): New macro.
17113 Include <sys/stat.h>
17114
17115 * Makefile.in (prefix): New macro.
17116
17117 1998-11-12 Per Bothner <bothner@cygnus.com>
17118
17119 * parse.y (patch_invoke): Do less if flag_emit_class_files.
17120 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
17121 here (done in patch_invoke instead).
17122 (case_identity): Moved here from parse.y.
17123
17124 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
17125 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
17126 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
17127 so they can be efficiently scanned without recursion.
17128 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
17129 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
17130 in BLOCK iteratively, rather than recursively.
17131
17132 * parse.y (do_unary_numeric_promotion): New function.
17133 (patch_unaryop, patch_binop, patch_array_ref): Use it.
17134
17135 * parse.y (patch_newarray): Various fixes.
17136
17137 Re-do handling of switch statements (for proper block scoping).
17138 * parse.y: Add just a single block for the enture switch block,
17139 but don't create any "case blocks".
17140 (group_of_labels): Rmeoved unneeded non-terminal.
17141 CASE_EXPR and DEFAULT_EXPR are added to current block.
17142 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
17143 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
17144 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
17145 * parse.y (wfl_operator, print_int_node): Make non-static.
17146 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
17147 as part of recursive scan of block.
17148 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
17149 (patch_switch_statement): Most tests move dinto java_complete_tree.
17150
17151 * parse.y: Make various production be non-typed (void).
17152 * parse.y (parse_error): Merged into issue_warning_error_from_context.
17153 * parse.y (add_stmt_to_compound): Don't create/change extra node.
17154 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
17155
17156 * jcf-write.c (struct jcf_handler): New type.
17157 (struct jcf_switch_state): New type.
17158 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
17159 (alloc_handler, emit_unop, emit_reloc): New functions.
17160 (adjust_typed_op): Add extra parameter ("max type" offset).
17161 (emit_switch_reloc, emit_case-reloc): New function.
17162 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
17163 (generate_bytecode_insns): Support REAL_CST, switch statements,
17164 exception handling, method calls, object/array creation, and more.
17165
17166 * class.c: Remove some unused variables.
17167 * constants.c (find_string_constant): New function.
17168 (count_constant_pool_bytes): Fix to correctly handle wide constants.
17169 * decl.c (complete_start_java_method): Don't _Jv_InitClass
17170 if flag_emit_class_files.
17171
17172 1998-11-12 Tom Tromey <tromey@cygnus.com>
17173
17174 * jcf-io.c (find_class): Added explanatory comment.
17175
17176 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
17177 trailing slash to `.zip' entries.
17178
17179 * jvspec.c (lang_specific_driver): Correctly handle case where
17180 GC_NAME not defined.
17181
17182 1998-11-11 Tom Tromey <tromey@cygnus.com>
17183
17184 * jvspec.c (GC_NAME): New define.
17185 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
17186 if required.
17187 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
17188
17189 1998-11-11 Per Bothner <bothner@cygnus.com>
17190
17191 * jcf-dump.c (TABLE_SWITCH): Fix typos.
17192
17193 1998-11-11 Tom Tromey <tromey@cygnus.com>
17194
17195 * jcf-dump.c (main): Correctly recognize `--'-style long options.
17196
17197 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17198
17199 * class.c (is_compiled_class): Call safe_layout_class for class
17200 compiled from source.
17201 * conver.h (convert_to_integer, convert_to_real,
17202 convert_to_pointer): Added prototypes.
17203 * decl.c (init_decl_processing): Non longer push the decls of
17204 `methodtable', `constants', `Class', `Field', `dispatchTable'
17205 `jexception' and `Method'.
17206 * expr.c (build_invokeinterface): New function.
17207 (expand_invoke): static variable CLASS_IDENT now in
17208 build_invokeinterface. Use build_invokeinterface.
17209 (expand_java_field_op): Moved code to inline
17210 java.lang.PRIMTYPE.TYPE into a function.
17211 (build_primtype_type_ref): New function.
17212 * java-tree.def (INSTANCEOF_EXPR): New tree code.
17213 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
17214 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
17215 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
17216 (DECL_LOCAL_STATIC_VALUE): New macro.
17217 (build_invokeinterface, build_primtype_type_ref): New function
17218 prototypes.
17219 (java_parse_abort_on_error): Macro rewritten.
17220 * jcf-parse.c (current_method): Add comment to declaration.
17221 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
17222 Function prototypes fixed.
17223 (jcf_parse_source): push/pop parser context. save/restore global.
17224 (parse_source_file): Fixed leading comment. Now take a
17225 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
17226 classes and pop the parser context anymore.
17227 (yyparse): Push parser context, save globals, parse the source
17228 file, restore globals and pop the parser context when processing a
17229 source file.
17230 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
17231 * lex.c (java_parse_doc_section): New function.
17232 (java_lex): Call java_parse_doc_section when appropriate. Build an
17233 operator around INSTANCEOF_TK.
17234 * lex.h (java_lineterminator, java_sprint_unicode,
17235 java_unicode_2_utf8, java_lex_error, java_store_unicode):
17236 Prototypes rewritten.
17237 (java_parse_escape_sequence, java_letter_or_digit_p,
17238 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
17239 java_read_unicode, java_store_unicode, java_read_char,
17240 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
17241 Added function prototypes.
17242 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
17243 define.
17244 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
17245 New macros
17246 (struct parser_ctxt): New fields: deprecated,
17247 current_parsed_class_un, gclass_list.
17248 (fix_method_argument_names, issue_warning_error_from_context,
17249 resolve_package, lookup_package_type): New function prototypes.
17250 (resolve_expression_name): Fixed function prototype.
17251 (find_applicable_accessible_methods_list): Fixed indentation, added
17252 extra argument in prototype.
17253 (check_final_assignment, build_null_of_type, check_deprecation,
17254 check_method_redefinition, reset_method_name,
17255 java_check_regular_methods, java_check_abstract_methods,
17256 maybe_build_primttype_type_ref): New function prototype.
17257 * parse.y (conver.h): Include.
17258 (INSTANCEOF_TK): Tagged <operator>.
17259 (single_type_import_declaration): Use REGISTER_IMPORT macro.
17260 (relational_expression:): Build binop for instanceof.
17261 (java_push_parser_context): Remember ctxp->gclass_list across
17262 contexts.
17263 (java_pop_parser_context): Simply return if no context
17264 exists. Remember gclass_list across contexts.
17265 (issue_warning_error_from_context): New function.
17266 (parse_error_context): Don't setup ctxp->elc here. Call
17267 issue_warning_error_from_context instead.
17268 (parse_warning_context): Likewise.
17269 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
17270 setup. Link new class/interface to ctxp->gclass_list.
17271 (add_superinterfaces): Register interface as incomplete if not
17272 loaded.
17273 (create_class): Remember class unqualified name in
17274 ctxp->current_parsed_class_un. Check class deprecation.
17275 (register_fields): Check field deprecation. Remember static final
17276 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
17277 processing INIT.
17278 (method_header): New local variable ORIG_ARG. Use unqualified
17279 current class name for check on constructor errors. Promote return
17280 type if of record type. Argument list fix moved in
17281 fix_method_argument_names, called here. Check method deprecation.
17282 (fix_method_argument_names): New function.
17283 (method_declarator): Promote record typed arguments.
17284 (safe_layout_class): Check class methods before layout.
17285 (java_complete_class): Compute field layout when patched.
17286 (do_resolve_class): Try to load class after having it renamed
17287 after the package name.
17288 (get_printable_method_name): Use DECL_CONTEXT.
17289 (reset_method_name): New function.
17290 (check_method_redefinition): Use reset_method_name.
17291 (java_check_regular_methods): New local variable
17292 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
17293 names for error report. Check for compile-time error when method
17294 found has default (package) access.
17295 (java_check_abstract_methods): Now takes an interface DECL node as
17296 an argument. Also reinstall real name on unchecked
17297 overriding/hiding methods for error report.
17298 (java_check_methods): Fixed leading comment. Get classes to verify
17299 from ctxp->gclass_list. Use CHECK_METHODS macro and set
17300 CLASS_METHOD_CHECKED_P on class verification.
17301 (lookup_java_method2): Get real method name if necessary.
17302 (find_in_imports): Don't check package class access here.
17303 (resolve_package, lookup_package_type): New functions.
17304 (java_layout_classes): Fixed leading comment. Take classes to be
17305 laid out from ctxp->gclass_list.
17306 (java_complete_expand_methods): Don't expand native and abstract
17307 methods.
17308 (java_expand_classes): New function.
17309 (resolve_expression_name): Use additional argument ORIG. Retrieve
17310 values of static final field of primitive types.
17311 (resolve_field_access): Handles static final field of promotive
17312 type.
17313 (resolve_qualified_expression_name): Handle STRING_CST as
17314 primaries and package name resolution. Check deprecation on found
17315 decls. Set where_found and type_found on non static field resolved
17316 during qualification. Layout non primitive field decl types.
17317 (check_deprecation): New function.
17318 (maybe_access_field): Simplified.
17319 (patch_method_invocation_stmt): Local variable CLASS_TYPE
17320 removed. Reverse method's argument when primary is a type. Don't
17321 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
17322 instead. Include abstract class in the list of class searchable
17323 for constructors. Use DECL_CONTEXT of found method for access
17324 checks. Check method deprecation.
17325 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
17326 converting arguments. Handle INVOKE_INTERFACE.
17327 (lookup_method_invoke): Search constructor using existing
17328 infrastructure (don't rely on lookup_java_constructor anymore).
17329 (find_applicable_accessible_methods_list): Extra argument flag
17330 LC. Now include constructor in the search.
17331 (qualify_ambiguous_name): Conditional expression are primaries.
17332 (not_initialized_as_it_should_p): static final are always
17333 initialized.
17334 (java_complete_tree): Pass extra NULL argument to
17335 resolve_expression_name. Stricter test to carry on patching
17336 assignments. New case for INSTANCEOF_EXPR.
17337 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
17338 (check_final_assignment, maybe_build_primttype_type_ref): New
17339 functions.
17340 (patch_assignment): Detect resolved static finals and carry normal
17341 assignment error check on them. Inline PRIMTYPE.TYPE read access.
17342 (try_builtin_assignconv): Access constant 0 on all primitive
17343 types.
17344 (valid_builtin_assignconv_identity_widening_p): Accept identical
17345 types. Accept all promoted type on int type.
17346 (valid_ref_assignconv_cast_p): Accept a null pointer to be
17347 assigned to a reference.
17348 (valid_method_invocation_conversion_p): Accept to check null
17349 pointers.
17350 (build_binop): Merge declaration and initialization of local
17351 variable BINOP.
17352 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
17353 numeric types. Improved validity test for qualify operators on
17354 references.
17355 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
17356 and PREINCREMENT_EXPR. Also detect resolved static finals of a
17357 primitive type and issue the appropriate error message.
17358 (resolve_type_during_patch): Mark class loaded when resolved.
17359 (patch_cast): Allow null to be cased to reference types.
17360 (build_null_of_type): New function.
17361 (patch_array_ref): Handle array on references correctly.
17362 (patch_return): Removed unused local variable MODIFY. Force
17363 boolean to be returned as integers. Allows null to be returned by
17364 a function returning a reference.
17365 * typeck.c (convert_to_integer, convert_to_real,
17366 convert_to_pointer): Prototypes moved to convert.h
17367 (lookup_argument_method): Use method real name, if necessary.
17368
17369 1998-10-30 Tom Tromey <tromey@cygnus.com>
17370
17371 * class.c (build_class_ref): Changed name of primitive classes to
17372 start with `_Jv_'.
17373
17374 * class.c (make_class_data): Renamed fields: nmethods to
17375 method_count, method_count to dtable_method_count. Always set
17376 `state' field to 0.
17377 * decl.c (init_decl_processing): Likewise.
17378
17379 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
17380
17381 * class.c (layout_class): Don't mangle <finit>, produce
17382 __finit<class> instead. Don't verify artificial methods.
17383 * decl.c (finit_identifier_node): New declared global.
17384 (init_decl_processing): finit_identifier_node initialized.
17385 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
17386 * java-tree.h (finit_identifier_node): Declared as extern.
17387 (struct lang_decl): New field called_constructor.
17388 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
17389 (CLASS_HAS_FINIT_P): New macro.
17390 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
17391 explicit constructor invocation.
17392 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
17393 CALL_SUPER_CONSTRUCTOR_P): New macros.
17394 (write_classfile): Added prototype.
17395 * jcf-parse.c (jcf_parse_source): Parse and remember for
17396 generation if the file was seen on the command line.
17397 (parse_source_file): Don't write the class file here.
17398 (yyparse): Loop on files rewritten. Set current_jcf.
17399 (parse_zip_file_entries): Parse class file only if it was found.
17400 * lang.c (init_parse): Don't open command line provided filename
17401 here.
17402 (lang_parse): Don't set main_jcf anymore.
17403 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
17404 (JCONSTRUCTOR_CHECK): New macro.
17405 (JBSC_TYPE_P): New macro.
17406 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
17407 (COMPLETE_CHECK_OP_2): New macro.
17408 (struct parse_ctxt): New field explicit_constructor_p.
17409 (check_class_interface_creation): Fixed prototype indentation.
17410 (patch_method_invocation_stmt): Prototype reflects added argument.
17411 (patch_invoke): Likewise.
17412 (complete_method_declaration, build_super_invocation,
17413 verify_constructor_circularity,
17414 build_this_super_qualified_invocation, get_printable_method_name,
17415 patch_conditional_expr, maybe_generate_finit, fix_constructors,
17416 verify_constructor_super, create_artificial_method,
17417 start_artificial_method_body, end_artificial_method_body,
17418 generate_field_initialization_code): New function prototypes.
17419 * parse.y: Fixed leading comment
17420 (constructor_header:, constructor_body:, block_end:): Rules tagged
17421 <node>.
17422 (type_declaration:): Call maybe_generate_finit.
17423 (method_declaration:): Action for method_body: placed in new
17424 function complete_method_declaration, called here.
17425 (constructor_declaration:): Defined actions. Removed leading
17426 FIXME.
17427 (constructor_header:): New rule with action.
17428 (constructor_body:): Rule rewritten using block_begin: and
17429 block_end:. Defined actions.
17430 (constructor_declarator:, explicit_constructor_invocation:):
17431 Defined actions.
17432 (block:): Use new rules block_begin: block_end:.
17433 (block_begin:, block_end:): New rules and actions.
17434 (block_statements:): Fixed error message for explicit
17435 constructors.
17436 (method_invocation:): Call build_this_super_qualified_invocation
17437 if primary is `this' or `super' was seen.
17438 (conditional_expression:): Action defined.
17439 (extra_ctxp_pushed_p): New static global flag.
17440 (java_parser_context_save_global): Create parser context if
17441 necessary. Use extra_ctxp_pushed_p to remember it.
17442 (java_parser_context_restore_global): Pop extra parser context if
17443 one exists.
17444 (build_array_from_name): Array on primitive types are marked
17445 loaded.
17446 (register_fields): Restore new name in field initializer
17447 expression if type was altered. Non static fields initialized upon
17448 declaration marked initialized.
17449 (maybe_generate_finit): New function.
17450 (maybe_generate_clinit): Use create_artificial_method,
17451 start_artificial_method_body, end_artificial_method_body. Generate
17452 debug info for enclosed initialization statements.
17453 (method_header): Fixed leading comment. Check constructor
17454 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
17455 accordingly.
17456 (complete_method_declaration, constructor_circularity_msg,
17457 verify_constructor_circularity): New functions.
17458 (get_printable_method_name): New function.
17459 (check_method_redefinition): Don't rename <finit> methods. Fix
17460 declared constructor names. Error message for
17461 constructors modified.
17462 (java_check_regular_methods): Local variable seen_constructor
17463 renamed saw_constructor. Skip verification on constructors. Create
17464 default constructor with create_artificial_method.
17465 (java_check_methods): Removed unnecessary empty line.
17466 (create_artificial_method, start_artificial_method_body,
17467 end_artificial_method_body): New functions.
17468 (java_layout_classes): Changed leading comment. Reverse fields
17469 list if necessary. Always layout java.lang.Object if being
17470 defined.
17471 (java_complete_expand_methods): Verify constructor circularity.
17472 (java_complete_expand_method): Call fix_constructor on
17473 constructors. Local variable no_ac_found removed. Restore
17474 bindings if method body expansion failed.
17475 (fix_constructors, verify_constructor_super,
17476 generate_field_initialization_code): New function.
17477 (java_expand_classes): Fixed leading comment. Write class file
17478 here.
17479 (resolve_expression_name): Check for illegal instance variable
17480 usage within the argument scope of an explicit constructor
17481 invocation.
17482 (resolve_qualified_expression_name): Pass extra from_super flag
17483 when invoking patch_method_invocation_stmt. New case for
17484 conditional expression when used as a primary. Check for error
17485 when acquiring super.
17486 (patch_method_invocation_stmt): Added extra argument super. New
17487 local variable is_static_flag. Set class_to_search according to
17488 the nature of the constructor invocation. Don't add `this'
17489 argument when expanding NEW_CLASS_EXPR. Check for illegal method
17490 invocation within the argument scope of explicit constructor
17491 invocation. Set is_static according to is_static_flag. Provide
17492 extra `super' argument to patch_invoke invocation.
17493 (patch_invoke): New argument from_super. Loop on arguments
17494 indentation fixed. Pass from_super to invocation_mode. New switch
17495 case INVOKE_SUPER. Fixed error message in switch default case.
17496 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
17497 value.
17498 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
17499 (lookup_method_invoke): Fixed prototypes in candidates list. Error
17500 message takes constructors into account.
17501 (find_applicable_accessible_methods_list): Fixed indentation.
17502 (qualify_ambiguous_name): Take explicit constructor invocation
17503 into account. Deal with a conditional expression as a primary to
17504 a method call.
17505 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
17506 case. Added extra argument to patch_method_invocation_stmt.
17507 Register calls made to explicit constructor `this'. Don't call
17508 save_expr in ARRAY_REF case when emitting class files. Check for
17509 illegal use of this when expanding explicit constructor invocation
17510 arguments.
17511 (complete_function_arguments): Set and reset parser context
17512 explicit_constructor_p field value when appropriate.
17513 (build_super_invocation, build_this_super_qualified_invocation):
17514 New functions.
17515 (patch_assignment): Fixed typo.
17516 (patch_unaryop): Check on final fields occurs only when a decl
17517 exits.
17518 (patch_return): Take constructors into account.
17519 (patch_conditional_expr): New function.
17520 * typeck.c (build_java_signature): Removed unnecessary empty line.
17521
17522 1998-10-28 Jeffrey A Law (law@cygnus.com)
17523
17524 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
17525
17526 1998-10-28 Tom Tromey <tromey@cygnus.com>
17527
17528 * decl.c (init_decl_processing): Renamed fields.
17529 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
17530 interface_len, msize fields.
17531
17532 * class.c (make_class_data): Removed subclass_head and
17533 subclass_next fields.
17534 * decl.c (init_decl_processing): Removed subclass_head and
17535 subclass_next fields.
17536
17537 1998-10-28 Jeffrey A Law (law@cygnus.com)
17538
17539 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
17540 * mangle.c (emit_unicode_mangled_name): Similarly.
17541
17542 1998-10-26 Nick Clifton <nickc@cygnus.com>
17543
17544 * jcf-parse.c (get_constant): Place braces around code to compute
17545 'd' when REAL_ARITHMETIC is not defined.
17546
17547 1998-10-25 H.J. Lu (hjl@gnu.org)
17548
17549 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
17550 dependency.
17551
17552 1998-10-23 Tom Tromey <tromey@cygnus.com>
17553
17554 * lang-specs.h: `.zip' files are input to jc1.
17555
17556 1998-10-22 Per Bothner <bothner@cygnus.com>
17557
17558 * jvspecs.c: Add (but don't enable) support for combining multiple
17559 .class and .java input filenames to a single jc1 invocation.
17560 Add support for -C flag (copile to .class files).
17561 Translate -classpath and -CLASSPATH arguments.
17562 * lang-specs.h: Don't set %2 spec.
17563
17564 1998-10-22 Tom Tromey <tromey@cygnus.com>
17565
17566 * jcf-path.c (add_entry): Don't add trailing separator if entry is
17567 a .zip file.
17568 (add_path): Don't add trailing separator to non-empty path
17569 elements.
17570
17571 * lang.c (lang_decode_option): Check for -fclasspath and
17572 -fCLASSPATH before examining other `-f' options.
17573
17574 * java-tree.h (finalize_identifier_node): Don't declare.
17575 * class.c (make_class_data): Don't push "final" field.
17576 * decl.c (init_decl_processing): Don't push "final" field.
17577 (finalize_identifier_node): Removed.
17578 (init_decl_processing): Don't set finalize_identifier_node.
17579
17580 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
17581
17582 1998-10-11 Anthony Green <green@cygnus.com>
17583
17584 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
17585 (JV_SCAN_SOURCES): New macro.
17586 (JCF_DUMP_SOURCES): Likewise.
17587 (jcf-dump$(exeext)): New target.
17588 (jv-scan$(exeext)): New target.
17589
17590 1998-10-22 Tom Tromey <tromey@cygnus.com>
17591
17592 * Makefile.in (LEX): Removed.
17593 (LEXFLAGS): Likewise.
17594 (SET_BISON): New macro.
17595 (BISON): Removed.
17596 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
17597 spurious diffs in parse.c.
17598 ($(PARSE_SCAN_C)): Likewise.
17599 (PARSE_DIR): New macro.
17600 (PARSE_C): Use it.
17601 (PARSE_SCAN_C): Likewise.
17602 (PARSE_RELDIR): New macro.
17603
17604 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
17605
17606 * jcf-io.c (find_class): Use saw_java_source to determine when to
17607 look for `.java' file.
17608 * jcf-parse.c (saw_java_source): New global.
17609 (yyparse): Set it if `.java' file seen.
17610
17611 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
17612 (GCJH_SOURCES): Likewise.
17613 * Makefile.in (datadir): New macro.
17614 (libjava_zip): Likewise.
17615 (JAVA_OBJS): Added jcf-path.o.
17616 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17617 (../gcjh$(exeext)): Likewise.
17618 (jcf-path.o): New target.
17619 * java-tree.h (fix_classpath): Removed decl.
17620 * jcf-parse.c (fix_classpath): Removed.
17621 (load_class): Don't call fix_classpath.
17622 * parse.y (read_import_dir): Don't call fix_classpath.
17623 * lex.h: Don't mention classpath.
17624 * lex.c (java_init_lex): Don't initialize classpath.
17625 * jcf-io.c (classpath): Removed global.
17626 (find_class): Use jcf_path iteration functions. Correctly search
17627 class path for .java file.
17628 (open_in_zip): New argument `is_system'.
17629 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
17630 classpath-related options.
17631 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
17632 and -I.
17633 (lang_init): Call jcf_path_init.
17634 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
17635 * lang-specs.h: Handle -I. Minor cleanup to -M options.
17636 Correctly put braces around second string in each entry.
17637 * gjavah.c (main): Call jcf_path_init. Recognize all the new
17638 classpath-related options.
17639 (help): Updated for new options.
17640 * jcf.h: Declare functions from jcf-path.c. Don't mention
17641 `classpath' global.
17642 * jcf-path.c: New file.
17643
17644 * jcf-depend.c: Include jcf.h.
17645
17646 * jcf-write.c (localvar_alloc): Returns `void'.
17647 (localvar_free): Removed unused variable.
17648
17649 * lang.c (OBJECT_SUFFIX): Define if not already defined.
17650 (init_parse): Use OBJECT_SUFFIX, not ".o".
17651
17652 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
17653
17654 * class.c (emit_register_classes): Renamed from
17655 emit_register_class.
17656 * java-tree.h (emit_register_classes): Prototype renamed from
17657 emit_register_class.
17658 * jcf-parse.c (yyparse): Call emit_register_classes once before
17659 returning.
17660 * parse.y (java_expand_classes): No longer register classes.
17661
17662 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17663
17664 * class.c (is_compiled_class): New local variable
17665 seen_in_zip. Identify classes found in currently compiled source
17666 file(s).
17667 * decl.c (complete_start_java_method): Fixed typo.
17668 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
17669 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
17670 (CLASS_P): Moved around.
17671 (java_parse_abort_on_error): Macro moved from jcf-parse.c
17672 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
17673 java-tree.h
17674 (jcf_parse_source): Changed leading comment. Removed unnecessary
17675 fclose and CLASS_FROM_SOURCE_P marking.
17676 (parse_source_file): New local variables remember_for_generation
17677 and filename. Mark parsed file name identifier node. Removed block
17678 executed when parse_only was null. Set remember_for_generation.
17679 Use it as an argument to java_pop_parser_context.
17680 (yyparse): New local variables several_files, list, next node and
17681 current_file_list. Split ampersand separated file names into
17682 current_file_list. Iterate through the list and parse accordingly.
17683 * parse.h (java_pop_parser_context): New function prototype.
17684 * parse.y (ctxp_for_generation): New static global variable.
17685 (java_pop_parser_context): New argument generate. Link popped ctxp
17686 to ctxp_for_generation list accordingly.
17687 (java_complete_expand_methods): Fixed indentation.
17688 (java_expand_classes): New function.
17689
17690 1998-10-17 Per Bothner <bothner@cygnus.com>
17691
17692 * Makefile.in: Link with libiberty.a instead of memmove.o.
17693
17694 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
17695
17696 * lex.c (setjmp.h): No longer included.
17697 * lex.h (setjmp.h): Included.
17698 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
17699 (duplicate_declaration_error_p): Renamed from
17700 duplicate_declaration_error.
17701 (build_array_from_name): New function prototype.
17702 * parse.y (setjmp.h): No longer included.
17703 (variable_declarator_id): Define action.
17704 (build_array_from_name): New function.
17705 (duplicate_declaration_error_p): Renamed from
17706 duplicate_declaration_error. Fixed leading comment.
17707 (register_fields): Main `for' loop reorganized. Uses
17708 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
17709 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
17710 build_array_from_name.
17711 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
17712 types.
17713 (read_import_dir): Don't try to skip `.' and `..'.
17714 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
17715 build_array_from_name. Main `for' loop reorganized.
17716 (resolve_qualified_expression_name): When building access to a
17717 field, use the type where the field was found, not its own type.
17718 (maybe_access_field): Use field DECL_CONTEXT if the type where the
17719 field was found is null.
17720 (qualify_ambiguous_name): Sweep through all successive array
17721 dimensions.
17722
17723 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
17724
17725 * java-tree.h (pop_labeled_block, lang_printable_name,
17726 maybe_add_interface, set_super_info, get_access_flags_from_decl,
17727 interface_of_p, inherits_from_p, fix_classpath,
17728 complete_start_java_method, emit_handlers, init_outgoing_cpool,
17729 make_class_data, register_class, alloc_name_constant): New
17730 function prototypes.
17731 * lang.c (lang_decode_option): Set argc argument unused. Fixed
17732 indentation. Added cast to remove warning.
17733 (lang_printable_name): Set v argument unused.
17734 (lang_print_error): Added argument to lang_printable_name call.
17735 (java_dummy_print, print_lang_decl, print_lang_type,
17736 print_lang_identifier, lang_print_xnode): All argument marked
17737 unused.
17738 * lex.c (java_unget_unicode): Removed unnecessary argument.
17739 (java_allocate_new_line): Unused local variable is gone.
17740 (java_read_char): Added parenthesis in expressions to remove
17741 warnings. Added final return statement.
17742 (java_read_unicode): Added parenthesis in expression to remove
17743 warning.
17744 (java_parse_end_comment): Fixed java_unget_unicode invocation.
17745 (java_parse_escape_sequence): Likewise.
17746 (java_lex): Unused local variables are gone. Fixed
17747 java_unget_unicode invocation.
17748 * lex.h (set_float_handler): Prototype added when JC1_LITE not
17749 defined.
17750 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
17751 lang_printable_name invocation in macro.
17752 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
17753 Likewise.
17754 (duplicate_declaration_error): Suppressed unused argument in
17755 prototype.
17756 (identical_subpath_p): Function declaration is gone.
17757 (patch_invoke): Suppressed unused argument in prototype.
17758 (patch_cast, build_labeled_block, check_thrown_exceptions):
17759 Likewise.
17760 * parse.y (setjmp.h): Included
17761 (toplev.h): Likewise.
17762 (field_declaration:): Suppressed unused local
17763 (label_decl:): Fixed build_labeled_block invocation.
17764 (java_pop_parser_context): Put extra parenthesis around assignment
17765 in if.
17766 (yyerror): Suppressed unused local variables.
17767 (variable_redefinition_error): Fixed lang_printable_name
17768 invocation.
17769 (create_interface): Suppressed unused local variables.
17770 (create_class): Likewise.
17771 (duplicate_declaration_error): Suppressed unused argument. Fixed
17772 lang_printable_name invocation.
17773 (register_fields): Suppressed unused local variable. Fixed
17774 duplicate_declaration_error invocation.
17775 (method_header): Suppressed unused local variable.
17776 (method_declarator, parser_check_super): Likewise.
17777 (java_complete_class): Suppressed unused local variable. Fixed
17778 fatal error message.
17779 (complete_class_report_errors): Added default: in switch.
17780 (java_check_regular_methods): Fixed lang_printable_name
17781 invocations.
17782 (check_throws_clauses): Likewise.
17783 (java_check_abstract_methods): Suppressed unused local
17784 variable. Fixed lang_printable_name invocation.
17785 (read_import_entry): Added supplemental return statement.
17786 (read_import_dir): Suppressed unused local variables.
17787 (check_pkg_class_access, declare_local_variables): Likewise.
17788 (source_start_java_method): Suppressed unused extern variable
17789 declarations
17790 (expand_start_java_method): Suppressed unused extern and local
17791 variable declarations.
17792 (java_complete_expand_methods): Likewise.
17793 (java_complete_expand_method): Suppressed unused local variables.
17794 (make_qualified_name): Likewise.
17795 (resolve_qualified_expression_name): Added default: in
17796 switch. Fixed lang_printable_name invocation.
17797 (class_instance_creation_expression): Added parenthesis around
17798 expressions.
17799 (patch_method_invocation_stmt): Fixed lang_printable_name and
17800 patch_invoke invocations.
17801 (check_for_static_method_reference): Fixed lang_printable_name
17802 invocation.
17803 (patch_invoke): Suppressed unused arguments and local variables.
17804 (lookup_method_invoke): Suppressed unused local variables.
17805 (qualify_ambiguous_name): Added default: in switch.
17806 (identical_subpath_p): Function removed.
17807 (patch_assignment): Suppressed unused local variables. Suppressed
17808 unnecessary if statement. Fixed lang_printable_name invocations.
17809 (try_builtin_assignconv): Fixed lang_printable_name invocations.
17810 (valid_ref_assignconv_cast_p): Parenthesis around
17811 expression. Suppressed unused local variables.
17812 (build_binop): Suppressed unused local variables. fixed
17813 lang_printable_name invocations.
17814 (string_constant_concatenation): Suppressed unused local
17815 variables.
17816 (patch_unaryop): Fixed lang_printable_name invocation.
17817 (patch_cast): Suppressed unnecessary argument. Fixed
17818 lang_printable_name invocation.
17819 (patch_array_ref): Fixed lang_printable_name invocation.
17820 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
17821 (build_labeled_block): Suppressed unused argument.
17822 (generate_labeled_block): Fixed build_labeled_block invocation.
17823 (build_loop_body): Suppressed unused local variables.
17824 (patch_loop_statement): Likewise.
17825 (patch_exit): Fixed lang_printable_name invocation.
17826 (patch_switch_statement): Likewise.
17827 (case_identity): First argument marked unused.
17828 (patch_try_statement): Fixed lang_printable_name invocations.
17829 (patch_synchronized_statement, patch_throw_statement): Likewise.
17830 (check_thrown_exceptions): Fixed check_thrown_exceptions and
17831 lang_printable_name invocations.
17832 (check_thrown_exceptions_do): Suppressed unused argument.
17833
17834 1998-10-14 Tom Tromey <tromey@cygnus.com>
17835
17836 * jcf-write.c (write_classfile): Add output class file as target.
17837 * lang-options.h: Added -MD, -MMD, -M, and -MM.
17838 * jcf.h: Added declarations for dependency-tracking functions.
17839 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
17840 * lang.c (lang_decode_option): Recognize -MD and -MMD.
17841 (finish_parse): Call jcf_dependency_write.
17842 (dependency_tracking): New global.
17843 (DEPEND_SET_FILE): New define.
17844 (DEPEND_ENABLE): New define.
17845 (init_parse): Enable dependency tracking if required.
17846 Include "flags.h".
17847 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
17848 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17849 (../gcjh$(exeext)): Likewise.
17850 (jcf-depend.o): New target.
17851 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
17852 (GCJH_SOURCES): Likewise.
17853 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
17854 dep_name argument.
17855 (find_classfile): Added dep_name argument.
17856 (find_class): Compute name of dependency.
17857 (open_in_zip): Call jcf_dependency_add_file.
17858 * gjavah.c (output_file): No longer global.
17859 (usage): Don't mention "gjavah".
17860 (help): Likewise.
17861 (java_no_argument): Likewise.
17862 (version): Likewise.
17863 (main): Recognize and handle -M family of options.
17864 (print_mangled_classname): Return is void.
17865 (process_file): Handle case where output is suppressed.
17866 (HANDLE_END_FIELD): Likewise.
17867 (HANDLE_METHOD): Likewise.
17868 * jcf-depend.c: New file.
17869
17870 1998-10-13 Jeffrey A Law (law@cygnus.com)
17871
17872 * java-tree.def: Add missing newline at EOF.
17873
17874 1998-10-13 Tom Tromey <tromey@cygnus.com>
17875
17876 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
17877 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
17878 function.
17879 Include <config.h> and "system.h".
17880 (disassemble_method): Undefine RET to avoid clash with
17881 config/i386/i386.h.
17882
17883 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
17884
17885 * decl.c (runtime_exception_type_node, error_exception_type_node):
17886 New global variables.
17887 (init_decl_processing): Initialized.
17888 * expr.c (java_lang_expand_expr): Set caught exception type to
17889 null if catch handler argument doesn't exit.
17890 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
17891 tree codes.
17892 * java-tree.h (runtime_exception_type_node,
17893 error_exception_type_node): Global variables declared.
17894 (DECL_FUNCTION_THROWS): New macro.
17895 (DECL_FUNCTION_BODY): Modified comment.
17896 (DECL_SPECIFIC_COUNT): Likewise.
17897 (struct lang_decl): New field throws_list.
17898 (IS_UNCHECKED_EXPRESSION_P): New macro.
17899 * lex.c (java_lex): Generate location information for THROW_TK.
17900 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
17901 EXCEPTIONS_P): New macros.
17902 (enum jdep_code): New value JDEP_EXCEPTION.
17903 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
17904 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
17905 PATCH_METHOD_RETURN_ERROR): New macros.
17906 (patch_method_invocation_stmt): Added new argument to prototype.
17907 (patch_synchronized_statement, patch_throw_statement,
17908 check_thrown_exceptions, check_thrown_exceptions_do,
17909 purge_unchecked_exceptions, check_throws_clauses): New function
17910 prototypes.
17911 * parse.y Fixed typo in keyword section.
17912 (throw:): Rule tagged <node>.
17913 (THROW_TK): Keyword tagged <operator>.
17914 (method_header:): Last argument to call to method_header passed
17915 from throws: rule.
17916 (throws:, class_type_list:, throw_statement:,
17917 synchronized_statement:, synchronized:): Defined actions.
17918 (method_header): New local variable current. Register exceptions
17919 from throws clause.
17920 (java_complete_tree): Complete and verify exceptions from throws
17921 clause.
17922 (complete_class_report_errors): Error message on exceptions not
17923 found
17924 (java_check_regular_methods): Fixed typo. Shortcut on private
17925 overriding methods. Changed error message on method
17926 redefinition. Check for throws clause compatibility.
17927 (check_throws_clauses): New function.
17928 (java_check_abstract_methods): Use DECL_NAME for wfl or current
17929 method. Changed error message on method redefinition.
17930 (currently_caught_type_list): New static variable.
17931 (java_complete_expand_methods): Purge unchecked exceptions from
17932 throws clause list. Call PUSH_EXCEPTIONS before walk and
17933 POP_EXCEPTIONS after.
17934 (resolve_qualified_expression_name): Pass new argument as NULL to
17935 patch_method_invocation_stmt.
17936 (patch_method_invocation_stmt): New argument ref_decl. Invoke
17937 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
17938 argument list when appropriate. Use new argument if non null to
17939 store selected method decl.
17940 (patch_invoke): Convert if necessary args of builtin types before
17941 forming CALL_EXPR. Argument list no longer reversed here.
17942 (invocation_mode): Treat final methods as static methods.
17943 (java_complete_tree): New cases for THROW_EXPR: and
17944 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
17945 function call.
17946 (complete_function_arguments): No more RECORD_TYPE
17947 conversion. Function parameter nodes no longer saved.
17948 (valid_ref_assignconv_cast_p): Avoid handling null type.
17949 (patch_binop): Fixed null constant reference handling.
17950 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
17951 BUILD_THROW macros.
17952 (patch_try_statement): Fixed comments. Record caught types in
17953 list, push the list, expand try block and pop the list.
17954 (patch_synchronized_statement, patch_throw_statement,
17955 check_thrown_exceptions, check_thrown_exceptions_do,
17956 purge_unchecked_exceptions): New functions.
17957 * typeck.c (lookup_argument_method): Allow WFL in place of method
17958 DECL_NAME during method definition check
17959
17960 1998-10-09 Tom Tromey <tromey@cygnus.com>
17961
17962 * gjavah.c (decode_signature_piece): New function.
17963 (print_c_decl): Use it. Added `name_override' argument.
17964 (print_method_info): Use name_override argument to print_c_decl.
17965 (seen_fields): Removed.
17966 (print_field_info): Don't update seen_fields.
17967 (struct method_name): New structure.
17968 (method_name_list): New global.
17969 (print_method_info): Add new method to list of methods.
17970 (name_is_method_p): New function.
17971 (print_field_info): If field name has same name as method, then
17972 change field name.
17973 (process_file): Parse methods before fields.
17974 (field_pass): New global.
17975 (HANDLE_END_FIELD): Take field_pass into account.
17976
17977 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17978
17979 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
17980 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
17981
17982 1998-10-03 Anthony Green <green@cygnus.com>
17983
17984 * jvspec.c: Fix bug in jvgenmain_spec patch.
17985
17986 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
17987
17988 * Makefile.in (lang.o:): Install dependency on java-tree.def.
17989 * decl.c (soft_exceptioninfo_call_node): New global variable.
17990 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
17991 takes extra integer argument. soft_exceptioninfo_call_node
17992 initialized.
17993 * except.c (java_set_exception_lang_code): New function
17994 (method_init_exceptions): Called here.
17995 (prepare_eh_table_type): New function.
17996 (expand_end_java_handler): Called here.
17997 * expr.c (build_java_throw_out_of_bounds_exception): Now features
17998 one argument. Modified generation of call to
17999 soft_badarrayindex_node to use new argument.
18000 (build_java_arrayaccess): Pass faulty index value to
18001 build_java_throw_out_of_bounds_exception.
18002 (generate_name): New function.
18003 (java_lang_expand_expr): New local variables node, current,
18004 has_finally_p. Expand TRY_EXPR node.
18005 (process_jvm_instruction): Replace top of the stack with thrown
18006 object reference when entering exception handler.
18007 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
18008 specific tree codes.
18009 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
18010 global.
18011 (DECL_SPECIFIC_COUNT): New macro.
18012 (prepare_eh_table_type, java_set_exception_lang_code,
18013 generate_name): New function declarations.
18014 (match_java_method): Declaration deleted.
18015 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
18016 macros.
18017 * lex.c (TRY_TK, CATCH_TK): Generate location information.
18018 * parse.h (redefinition_error, refine_accessible_methods_list,
18019 can_cast_to_p): Function declaration removed.
18020 (classitf_redefinition_error, variable_redefinition_error,
18021 parse_jdk1_1_error, find_applicable_accessible_methods_list,
18022 find_most_specific_methods_list, argument_types_convertible,
18023 enter_a_block, valid_builtin_assignconv_identity_widening_p,
18024 valid_cast_to_p, valid_method_invocation_conversion_p,
18025 try_reference_assignconv, add_stmt_to_compound,
18026 build_jump_to_finally, build_tree_list, patch_try_statement,
18027 java_get_catch_block): New function declarations.
18028 * parse.y (string_buffer_type): Global variable deleted.
18029 (group_of_labels, catches, catch_clause, catch_clause_parameter,
18030 finally): Rules tagged <node>.
18031 (TRY_TK, CATCH_TK): Token tagged <operator>.
18032 (class_body_declaration:, class_member_declaration:,
18033 formal_parameter:, explicit_constructor_invocation:,
18034 interface_member_declaration:, constant_declaration:,
18035 primary_no_new_array:, class_instance_creation_expression:,
18036 array_creation_expression:): Issue error on unsuported JDK1.1
18037 features.
18038 (try_statement:, catches:, finally:): Define actions.
18039 (catch_clause_parameter): New rule.
18040 (catch_clause:): Use new rule catch_clause_parameter.
18041 (parse_jdk1_1_error): New function.
18042 (redefinition_error): Renamed classitf_redefinition_error.
18043 (variable_redefinition_error): New function.
18044 (check_class_interface_creation): Call
18045 classitf_redefinition_error.
18046 (java_complete_tree): Added error message on JDEP_TYPE: case.
18047 (complete_class_report_errors): Fixed indentation.
18048 (declare_local_variables): Call variable_redefinition_error.
18049 (source_end_java_method): Call java_set_exception_lang_code and
18050 emit_handlers where appropriate.
18051 (java_method_add_stmt): Call add_stmt_to_block.
18052 (add_stmt_to_block): New function.
18053 (lookup_method_invoke): Fixed outside comment. new local variable
18054 candicates. Call find_applicable_accessible_methods_list and
18055 find_most_specific_methods_list when searching for a
18056 method. Modified error report to list possible candidates when
18057 applicable.
18058 (find_applicable_accessible_methods_list,
18059 find_most_specific_methods_list, argument_types_convertible): New
18060 function.
18061 (refine_accessible_methods_list): Function deleted.
18062 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
18063 expr (if applicable) before calling patch_array_ref.
18064 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
18065 (enter_block): Fixed comment.
18066 (enter_a_block): New function.
18067 (patch_assignment): Reorganized. Call try_reference_assignconv for
18068 references. Call valid_cast_to_p instead of can_cast_to_p.
18069 (try_reference_assignconv,
18070 valid_builtin_assignconv_identity_widening_p): New functions.
18071 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
18072 (valid_cast_to_p, valid_method_invocation_conversion_p): New
18073 functions.
18074 (build_string_concatenation): Don't resolve StringBuffer.
18075 (patch_cast): Fixed inverted arguments.
18076 (patch_array_ref): Code to save array expr deleted. Call
18077 valid_cast_to_p instead of can_cast_to_p.
18078 (generate_labeled_block): Call generate_name.
18079 (build_jump_to_finally, build_try_statement, java_get_catch_block,
18080 patch_try_statement): New functions.
18081 * typeck.c (match_java_method): Function deleted.
18082
18083 1998-10-02 Anthony Green <green@cygnus.com>
18084
18085 * jvspec.c: jvgenmain_spec uses different temporary file names.
18086
18087 1998-10-02 Anthony Green <green@cygnus.com>
18088
18089 * jvspec.c (lang_specific_driver): Fail if user specifies
18090 --main= when not linking.
18091
18092 1998-09-28 Tom Tromey <tromey@cygnus.com>
18093
18094 * class.c (make_class_data): Push value for `thread' field.
18095 * decl.c (init_decl_processing): Added `thread' field to class.
18096
18097 * class.c (add_field): Always make static fields externally
18098 visible.
18099
18100 1998-09-26 Anthony Green <green@cygnus.com>
18101
18102 * expr.c (build_java_athrow,
18103 build_java_throw_out_of_bounds_exception, expand_invoke,
18104 build_newarray, expand_java_multianewarray, build_java_monitor):
18105 Update comments to reflect _Jv_* function names.
18106
18107 1998-09-25 Per Bothner <bothner@cygnus.com>
18108
18109 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
18110 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
18111 * parse.y (expand_start_java_method): Likewise.
18112
18113 1998-09-24 Per Bothner <bothner@cygnus.com>
18114
18115 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
18116
18117 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
18118 (add_field): No longer need to convert from RECORD_TYPE to pointer,
18119 * expr.c: Remove no-longer-needed calls to promote_type.
18120 * decl.c (give_name_to_locals): Liekwise.
18121 * jcf-parse.c (get_class_constant): Compensate for new signatures.
18122 * parse.y: Add/remove promote_type calls as appropriate.
18123 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
18124 (parse_signature_string): Likewise.
18125 (build_java_array_type): Fix for now signature convenions.
18126
18127 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
18128
18129 1998-09-23 Tom Tromey <tromey@cygnus.com>
18130
18131 * class.c (init_class_processing): libjava function renamed to
18132 _Jv_RegisterClass.
18133
18134 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
18135
18136 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
18137 * java-tree.def: Fixed DEFTREECODE third argument.
18138 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
18139 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
18140 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
18141 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18142 JAVA_THIS_EXPR): Now replaced by tree code definitions.
18143 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
18144 * lang.c (java_tree_code_type, java_tree_code_length,
18145 java_tree_code_name): New arrays.
18146 (lang_init): Append Java tree node definitions to Gcc ones.
18147 * lex.c (expression_obstack): Declared as extern when JC1_LITE
18148 defined.
18149 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
18150 wfl_to_string.
18151 (java_lex): Allow declaration of empty string constants. Retain
18152 location information on CASE_TK and DEFAULT_TK.
18153 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
18154 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
18155 Modified to be more robust.
18156 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
18157 (build_new_invocation, try_builtin_assignconv,
18158 patch_switch_statement, string_constant_concatenation,
18159 build_string_concatenation, patch_string_cst, patch_string,
18160 java_expand_switch): New function declarations.
18161 * parse.y: Rules related to switch and EH tagged <node>.
18162 (label_id): Set to NULL_TREE
18163 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
18164 tree nodes.
18165 (this_or_super:): Fixed indentation.
18166 (statement:, statement_nsi:, statement_without_trailing_substatement:,
18167 statement_expression:): Removed call to RULE on all sub-rules.
18168 (switch_expression:, switch_labels:): New rules.
18169 (switch_statement:, switch_block:, switch_block_statement_groups:,
18170 switch_block_statement_group:, switch_labels:, switch_label:):
18171 Defined actions.
18172 (throw_statement:, synchronized_statement:, try_statement:):
18173 Defined temporary actions.
18174 (class_instance_creation_expression:): Call
18175 build_new_invocation. Fixed indentation.
18176 (field_access): Fixed indentation.
18177 (method_invocation): Likewise.
18178 (make_qualified_primary): Use THIS_EXPR.
18179 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
18180 resolving from SUPER, set *type_found.
18181 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
18182 (java_complete_tree): Removed unused local variable `location'. Case
18183 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
18184 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
18185 on MODIFY_EXPR: and all binary operator tree code cases. Removed
18186 STRING_CST: case. default: checks for patchable strings.
18187 (complete_function_arguments): Transform string constant or
18188 crafted StringBuffer if necessary.
18189 (build_method_invocation): Fixed comments.
18190 (build_new_invocation): New function.
18191 (patch_assignment): Call try_builtin_assignconv to figure a valid
18192 assignment conversion between builtin types.
18193 (try_builtin_assignconv): New function.
18194 (build_binop): Use URSHIFT_EXPR directly to call build.
18195 (operator_string): Use UNARY_PLUS_EXPR.
18196 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
18197 operator.
18198 (do_merge_string_cste, merge_string_cste,
18199 string_constant_concatenation, build_string_concatenation,
18200 patch_string, patch_string_cst): New function.
18201 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
18202 (patch_unaryop): Likewise. New test of valid ++/-- operands.
18203 (build_newarray_node): Use NEW_ARRAY_EXPR.
18204 (build_this): Use THIS_EXPR.
18205 (build_return): Enable debug information on return statement.
18206 (build_if_else_statement): Likewise.
18207 (complete_labeled_statement): Fixed related comment.
18208 (build_loop_body): Fixed comment.
18209 (build_bc_statement): Enable debug information on break/continue
18210 statements.
18211 (patch_bc_statement): Fixed typos. Handle SWITCH statement
18212 context.
18213 (patch_switch_statement, case_identity, java_expand_switch): New
18214 functions.
18215
18216 1998-09-21 Per Bothner <bothner@cygnus.com>
18217
18218 * buffer.h (BUFFER_INIT): New macro.
18219 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
18220 Pass (struct jcf_partial *state) to most functions.
18221 (jcf_block, jcf_relocation): New types.
18222 Support labels, branches, conditionals, loops.
18223
18224 1998-09-21 Tom Tromey <tromey@cygnus.com>
18225
18226 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
18227
18228 1998-09-21 Per Bothner <bothner@cygnus.com>
18229
18230 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
18231 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
18232 not integer_type_node (INT_TYPE_SIZ bits).
18233
18234 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
18235
18236 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
18237 * jcf-dump.c (print_exception_table): New function.
18238 (disassemble_method): Better handling of wide instructions.
18239 Make more robust for bad input.
18240
18241 1998-09-30 Jeffrey A Law (law@cygnus.com)
18242
18243 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
18244 FreeBSD.
18245
18246 1998-09-17 Jeffrey A Law (law@cygnus.com)
18247
18248 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
18249
18250 1998-09-17 Tom Tromey <tromey@cygnus.com>
18251
18252 * Makefile.in ($(PARSE_H)): Removed target.
18253
18254 1998-09-17 Jeffrey A Law (law@cygnus.com)
18255
18256 * Makefile.in (JAVA_OBJS): Add memmove.o
18257 (memmove.o): New target & rules.
18258
18259 1998-09-15 Tom Tromey <tromey@cygnus.com>
18260
18261 * expr.c (expand_invoke): Don't generate a call to the class init
18262 code.
18263
18264 1998-09-14 Jeffrey A Law (law@cygnus.com)
18265
18266 * Makefile.in: Add many missing dependencies.
18267 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
18268 as appropriate.
18269 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
18270 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
18271
18272 1998-09-11 Per Bothner <bothner@cygnus.com>
18273
18274 * decl.c (complete_start_java_method): If method is static (and
18275 not private) call _Jv_InitClass.
18276 * expr.c (expand_invoke): Don't call build_class_init.
18277
18278 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
18279
18280 1998-09-10 Jeffrey A Law (law@cygnus.com)
18281
18282 * Make-lang.in (GCJ): Define before using.
18283
18284 1998-09-09 Jeffrey A Law (law@cygnus.com)
18285
18286 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
18287 losing due to namespace pollution in GNU getopt.h
18288
18289 1998-09-09 Tom Tromey <tromey@cygnus.com>
18290
18291 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
18292 (java.all.cross): Likewise.
18293 (java.rest.encap): Likewise.
18294
18295 1998-09-08 Jeffrey A Law (law@cygnus.com)
18296
18297 * gjavah.c (print_class_decls): Fix thinko in arglist
18298 * jcv-io.c (find_classfile): Similarly.
18299
18300 1998-09-07 Jeffrey A Law (law@cygnus.com)
18301
18302 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
18303
18304 1998-09-05 Tom Tromey <tromey@cygnus.com>
18305
18306 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
18307 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
18308 * Makefile.in (PARSE_C): New macro.
18309 (PARSE_H): Likewise.
18310 (PARSE_SCAN_C): Likewise.
18311 ($(PARSE_C)): Target renamed from parse.c.
18312 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
18313 (clean): Remove parse-scan.c as well.
18314 (parse.o): Depend on $(PARSE_C).
18315
18316 1998-09-05 Anthony Green <green@cygnus.com>
18317
18318 * README, license.terms: Removed.
18319
18320 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
18321 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
18322 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
18323 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
18324 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
18325 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
18326 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
18327 and Java trademark attribution.
18328
18329 1998-09-04 Tom Tromey <tromey@cygnus.com>
18330
18331 * Makefile.in: Use gcjh, not gjavah.
18332 * config-lang.in (stagestuff): Use gcjh, not gjavah.
18333 * Make-lang.in: Changed gjavah to gcjh everywhere.
18334
18335 1998-09-03 Per Bothner <bothner@cygnus.com>
18336
18337 * gjavah.c: Support new -prepend -add -append flags.
18338 (print_method_info): Method is not virtual if class is final.
18339
18340 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
18341
18342 * jv-scan.c: Fixed copyright assignment.
18343 * keyword.gperf: Likewise.
18344 * keyword.h: Likewise.
18345 * lex.c: Fixed copyright assignment.
18346 (java_lex): Push unicode back when parsing '<'.
18347 * lex.h: Fixed copyright assignment.
18348 * parse-scan.y: Likewise.
18349 * parse.h: Fixed copyright assignment.
18350 (build_debugable_stmt, complete_for_loop): New function prototypes.
18351 * parse.y: Fixed copyright assignment.
18352 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
18353 size_zero_node when completing a loop with no exit condition.
18354 (for_statement_nsi:): Define action.
18355 (for_init:, for_update:): Return size_zero_node when empty.
18356 (declare_local_variables): Call build_debugable_stmt.
18357 (build_debugable_stmt): New function.
18358 (build_loop_body): Build debugable statement around loop
18359 condition part.
18360 (complete_loop_body): Take into account the debugable statement
18361 around the EXIT_EXPR.
18362 (complete_loop_body): New function.
18363 (patch_exit_expr): Fixed condition inversion.
18364
18365 1998-09-02 Tom Tromey <tromey@cygnus.com>
18366
18367 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
18368 name of thread define.
18369 * jvspec.c (THREAD_NAME): New macro.
18370 (GCLIB): Likewise.
18371 (THREADLIB): Likewise.
18372 (lang_specific_driver): Recognize attempt to link with thread
18373 library or gc library. Recognize -ljava on command line so it
18374 isn't linked against more than once.
18375
18376 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
18377
18378 * parse-scan.y (report_main_declaration): Name of the class
18379 containing `main' can be a qualified name.
18380
18381 1998-08-31 Tom Tromey <tromey@cygnus.com>
18382
18383 * config-lang.in: Changed gjavac to gjc everywhere.
18384 * Make-lang.in: Changed gjavac to gjc everywhere.
18385
18386 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
18387
18388 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
18389 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
18390 and install the files.
18391 * Makefile.in (JAVA_OBJS_LITE): New variable.
18392 (compiler:): Now include jv-scan as a dependency.
18393 (../jv-scan$(exeext), parse-scan.c): New targets.
18394 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
18395 * config-lang.in (compilers): Removed gcj, gjavah from the list.
18396 * jcf-parse.c (parse_source_file): Call java_layout_classes and
18397 check for errors even if parse_only.
18398 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
18399 defined.
18400 (yylex): New function. Uses java_lex body.
18401 (java_lex): Removed commented out statement. Remove local variable
18402 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
18403 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
18404 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
18405 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
18406 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
18407 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
18408 where appropriate.
18409 (java_lex_error): Empty if JC1_LITE is defined.
18410 (java_get_line_col): Return 0 if JC1_LITE is defined.
18411 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
18412 SET_MODIFIER_CTX): Moved into the section containing the macros
18413 conditionally defined by JC1_LITE.
18414 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
18415 argument if JC1_LITE is defined.
18416 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
18417 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
18418 is defined.
18419 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
18420 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
18421 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
18422 to different values according to JC1_LITE.
18423 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
18424 declared if JC1_LITE set.
18425 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
18426 defined if JC1_LITE not set.
18427 (struct parser_ctx): Reorganized and skip the jc1 front end part
18428 if JC1_LITE set.
18429 (java_layout_classes): New function definition.
18430 (java_push_parser_context, java_init_lex, yyparse, yylex,
18431 yyerror): Prototype always declared. All other static function
18432 prototypes declared only if JC1_LITE is not set.
18433 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
18434 declared in parse.h.
18435 (java_layout_classes): New function.
18436 (java_complete_expand_methods): No longer layout the class here.
18437 * parse-scan.y: New file.
18438 * jv-scan.c: New file.
18439
18440 1998-08-25 Tom Tromey <tromey@cygnus.com>
18441
18442 * gjavah.c (main): Handle -friend option.
18443 (friend_specs): New global.
18444 (generate_access): Handle friend_specs.
18445 (process_file): Likewise.
18446 (MAX_FRIENDS): New macro.
18447 (friend_count): New global.
18448 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
18449 Changed all callers.
18450
18451 1998-08-24 Per Bothner <bothner@cygnus.com>
18452
18453 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
18454 (main): Handle processing all the entries of a named .zip archive.
18455 * jcf-io.c (jcf_trim_old_input): New function.
18456 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
18457
18458 1998-08-24 Per Bothner <bothner@cygnus.com>
18459
18460 * lang.c (flag_assume_compiled): Make default be on.
18461
18462 1998-08-21 Per Bothner <bothner@cygnus.com>
18463
18464 * jcf-dump.c: Add bunches of flags to control output more.
18465 (process_class): New function; support printing more than one class.
18466 (main): Support new --print-main and --javap flags.
18467 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
18468 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
18469
18470 1998-08-20 Per Bothner <bothner@cygnus.com>
18471
18472 Change mangling of dispatch table to match C++ vtable (w/thunks).
18473 * class.c (build_dtable_decl), java-tree.h: New function.
18474 (make_class_data): Call it.
18475 * decl.c (init_decl_processing): Likewise.
18476
18477 1998-08-19 Warren Levy <warrenl@cygnus.com>
18478
18479 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
18480 soft_anewarray; adjust args passed.
18481 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
18482 match _Jv_NewObjectArray.
18483
18484 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
18485
18486 * decl.c (push_labeled_block, pop_labeled_block): New functions.
18487 * expr.c (loopup_label): Call create_label_decl.
18488 (create_label_decl): New function.
18489 (java_lang_expand_expr): Call expand_start_bindings with argument
18490 set to zero.
18491 * java-tree.h Added space after PROTO in function declarations
18492 when necessary.
18493 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
18494 (create_label_decl, push_labeled_block): New function
18495 declarations.
18496 * lex.c (label_id): Initialize.
18497 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
18498 switch.
18499 * parse.h Added space after PROTO in function declarations when
18500 necessary.
18501 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
18502 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
18503 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
18504 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
18505 macros.
18506 (struct parser_ctxt): New fields current_loop,
18507 current_labeled_block.
18508 (build_if_else_statement, patch_if_else_statement,
18509 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
18510 generate_labeled_block, complete_labeled_statement,
18511 build_bc_statement, patch_bc_statement, patch_loop_statement,
18512 build_new_loop, build_loop_body, complete_loop_body): New function
18513 declarations.
18514 * parse.y (java_warning_count): New global variable.
18515 (label_id): New static variable.
18516 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
18517 (block:): Return size_zero_node when block is empty.
18518 (empty_statement:): Return size_zero_node.
18519 (statement:): Implement supplemental action when for_statement: is
18520 reduced.
18521 (label_decl:): New rule.
18522 (labeled_statement:): Rewritten using label_decl. Actions
18523 implemented.
18524 (labeled_statement_nsi:): Likewise.
18525 (if_then_statement): Actions implemented.
18526 (while_expression): New rule.
18527 (while_statement:): Rewritten using while_expression. Actions
18528 implemented.
18529 (while_statement_nsi:): Likewise.
18530 (do_statement_begin:): New rule.
18531 (do_statement:): Rewritten using do_statement_begin. Actions
18532 implemented.
18533 (for_statement:): Rewritten using for_begin. Actions implemented.
18534 (for_statement_nsi:): Likewise.
18535 (for_header:, for_begin:): New rules.
18536 (for_init:): Actions implemented.
18537 (statement_expression_list:, break_statement:,
18538 continue_statement:): Likewise.
18539 (yyerror): Count number of issued warning(s).
18540 (java_report_errors): Report error(s) and/or warning(s).
18541 (java_complete_class): Use build_java_argument_signature to
18542 recompute completed method signature.
18543 (java_check_regular_methods): New locals method_wfl and aflags.
18544 Use method_wfl instead of lookup_cl during error reports. Fixed
18545 indentation and modified some error messages. Use
18546 lang_printable_name in method instead of the DECL_NAME. New code
18547 to issue warnings on methods not overriding corresponding methods
18548 private to a different package.
18549 (java_method_add_stmt): Call add_stmt_to_compound.
18550 (add_stmt_to_compound): New function.
18551 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
18552 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
18553 (build_if_else_statement, patch_if_else_statement,
18554 build_labeled_block, generate_labeled_block,
18555 complete_labeled_statement, build_new_loop, build_loop_body,
18556 complete_loop_body, patch_loop_statement, build_bc_statement,
18557 patch_bc_statement, patch_exit_expr): New functions.
18558 * typeck.c (build_java_signature): Build argument signature before
18559 enclosing it in between parenthesis.
18560
18561 1998-08-17 Warren Levy <warrenl@cygnus.com>
18562
18563 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
18564 (JAVA_OBJS): Added reminder comment
18565
18566 1998-08-13 Nick Clifton <nickc@cygnus.com>
18567
18568 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
18569 be interpreted as a long long.
18570
18571 1998-08-13 Warren Levy <warrenl@cygnus.com>
18572
18573 * decl.c (init_decl_processing): Use _Jv_InitClass, not
18574 soft_initialise_class. Use _Jv_NewMultiArray, not
18575 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
18576 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
18577 _Jv_CheckArrayStore, not soft_checkarraystore. Use
18578 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
18579
18580 1998-08-12 Per Bothner <bothner@cygnus.com>
18581
18582 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
18583 length_identifier_node): New global tree node constants.
18584 * parse.y (kw_super, kw_this, kw_length): Removed globals.
18585 Replace uses by super_identifier_node etc.
18586 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
18587
18588 * parse.y (resolve_field_access): Don't special-case ".length" if
18589 flag_emit_class_files.
18590 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
18591 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
18592 and ARRAY.length.
18593
18594 1998-08-11 Per Bothner <bothner@cygnus.com>
18595
18596 * decl.c (init_decl_processing): Remove unused method_type_node fields.
18597 * class.c (make_method_value): Remove init for removed fields.
18598
18599 * class.c (layout_class): Use build_java_argument_signature.
18600 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
18601
18602 * typeck.c (push_java_argument_signature): Removed. Merged into ...
18603 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
18604 (build_java_signature): Don't use push_java_argument_signature.
18605
18606 * typeck.c (lookup_argument_method): New function.
18607 * parse.y (java_check_regular_methods): Use lookup_argument_method
18608 instead of lookup_java_method2 followed by lookup_java_method.
18609
18610 * parse.y (check_method_redefinition): Minor optimization.
18611
18612 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
18613 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
18614
18615 1998-08-10 Tom Tromey <tromey@cygnus.com>
18616
18617 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
18618 c-pragma.o.
18619
18620 * gjavah.c (java_float_finite): Use K&R-style definition.
18621 (java_double_finite): Likewise.
18622 (generate_access): Now returns void. Changed all callers.
18623 (last_access_generated): Removed.
18624 (process_file): Only make a single pass over the .class file.
18625
18626 1998-07-29 Per Bothner <bothner@cygnus.com>
18627
18628 * class.c (get_dispatch_table): Add extra dummy vtable entry,
18629 for compatibility for G++ (with -fvtable-thunks).
18630 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
18631
18632 * gjavah.c (process_file): Use public inheritance for super-class.
18633
18634 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
18635
18636 * lex.c (java_init_lex): Initialize ctxp->package.
18637 * parse.h (struct parser_ctxt): package and package_len replaced
18638 by tree package, an identifier node. Field method_decl_list is
18639 gone. Fixed comments.
18640 (lookup_field_wrapper, merge_qualified_name, not_accessible,
18641 class_in_current_package): New function prototypes.
18642 * parse.y (array_type:): Set class loaded flag on primitive type
18643 arrays.
18644 (package_declaration:): Assign ctxp->package to the
18645 identifier node.
18646 (method_invocation:): Handle invocation of method qualified by
18647 `super'.
18648 (single_type_import_declaration:): Removed ambiguity check.
18649 (java_pop_parser_context): New local variable `next'. Reset and
18650 set IMPORT_CLASSFILE_NAME flags on current and previous import
18651 list.
18652 (java_accstring_lookup): Use new local macro COPY_RETURN.
18653 (lookup_field_wrapper): New function.
18654 (parser_qualified_classname): Use merge_qualified_name.
18655 (parser_check_super_interface): Broaden error message.
18656 (do_resolve_class): Check for qualified class name in the current
18657 compilation unit if appropriate.
18658 (process_imports): Check for already defined classes.
18659 (check_pkg_class_access): Got rid of call to
18660 get_access_flags_from_decl.
18661 (java_complete_expand_methods): Call safe_layout_class based on
18662 the current class size.
18663 (make_qualified_primary): Build a WFL qualification on primary if
18664 none exists.
18665 (merge_qualified_name): New function.
18666 (make_qualified_name): Use merge_qualified_name.
18667 (resolve_expression_name): Use safe_lookup_field.
18668 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
18669 (resolve_qualified_expression_name): Likewise. Check on resolved
18670 element accessibility.
18671 (not_accessible_p, class_in_current_package): New functions.
18672 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
18673 (patch_method_invocation_stmt): Merged common pieces. Check
18674 accessibility of invoked method.
18675 (check_for_static_method_reference): Add returned type in error
18676 message.
18677 (invocation_mode): Get rid of bogus check on PRIVATE methods.
18678 (refine_accessible_methods_list): Merged two conditions in test.
18679 (java_complete_class): Sanity check on stabilize_ref gone.
18680 * zextract.c (read_zip_archive): Cast lseek second argument to long.
18681
18682 1998-07-28 Per Bothner <bothner@cygnus.com>
18683
18684 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
18685
18686 1998-07-24 Tom Tromey <tromey@cygnus.com>
18687
18688 * gjavah.c (F_NAN): Removed.
18689 (F_NAN_MASK): New macro.
18690 (F_POSITIVE_INFINITY): Removed.
18691 (F_NEGATIVE_INFINITY): Likewise.
18692 (java_float_finite): Rewrote.
18693 (D_NAN_MASK): Renamed.
18694 (java_double_finite): Rewrote.
18695 (D_POSITIVE_INFINITY): Removed.
18696 (D_NEGATIVE_INFINITY): Likewise.
18697
18698 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
18699 If verbose, print underlying representation of value in hex.
18700
18701 1998-07-24 Per Bothner <bothner@cygnus.com>
18702
18703 * buffer.h, buffer.c: New files.
18704 * Makefile.in (JAVA_OBJS): Add buffer.o.
18705
18706 Support locals variables and writing their debug entries to .class.
18707 * jcf-write.c: Simplify some by user new buffer type.
18708 (vode_buffer_grow): Removed.
18709 (struct localvar_info): New type.
18710 (localsvars, localvartable): New buffers.
18711 (localvar_alloc, localvar_free): New functions.
18712 (generate_bytecode_insns): Handle local variables.
18713 (generate_classfile): Write LocalVariableTable attribute.
18714
18715 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
18716
18717 * jcf-io.c (open_in_zip): Check the zipfile magic number.
18718 * zipfile.h (ZIPMAGIC): New macro.
18719
18720 1998-07-24 Tom Tromey <tromey@cygnus.com>
18721
18722 * Makefile.in (gjavah.o): Updated dependencies.
18723 (jcf-dump.o): Likewise.
18724 (all.indirect): Use ../gjavah.
18725 (../gjavah$(exeext)): Likewise.
18726 (clean): Don't remove gjavah.
18727 (clean): Remove parse.c, not java/parse.c.
18728 * Make-lang.in (java): Added gjavah.
18729 (gjavah$(exeext)): New target.
18730 (GJAVAH_SOURCES): New macro.
18731 (java.all.build): Added gjavah.
18732 (java.all.cross): Likewise.
18733 (java.rest.encap): Likewise.
18734 * config-lang.in (compilers, stagestuff): Added gjavah.
18735
18736 1998-07-23 Tom Tromey <tromey@cygnus.com>
18737
18738 * gjavah.c (java_float_finite): New function.
18739 (java_double_finite): Likewise.
18740 (F_POSITIVE_INFINITY): New macro.
18741 (F_NEGATIVE_INFINITY): Likewise.
18742 (F_NAN): Likewise.
18743 (D_POSITIVE_INFINITY): Likewise.
18744 (D_NEGATIVE_INFINITY): Likewise.
18745 (D_NAN): Likewise.
18746 (print_field_info): Use java_float_finite and java_double_finite.
18747
18748 1998-07-23 Per Bothner <bothner@cygnus.com>
18749
18750 * parse.y (method_header): Name "this" implicit argument.
18751
18752 1998-07-22 Per Bothner <bothner@cygnus.com>
18753
18754 * jcf-write.c: Write out LineNumberTable attribute in .class file.
18755 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
18756 (put_linenumber): New function.
18757 (generate_bytecode_insns, generate_classfile): Write line numbers.
18758
18759 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
18760
18761 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
18762 (lookup_name, build_known_method_ref, build_class_init,
18763 build_invokevirtual, invoke_build_dtable, match_java_method,
18764 build_field_ref, pushdecl_force_head, build_java_binop,
18765 binary_numeric_promotion, build_decl_no_layout,
18766 build_java_arrayaccess, build_newarray, build_anewarray,
18767 build_java_array_length_access, build_java_arraynull_check): New
18768 extern function prototypes.
18769 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18770 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
18771 java-tree.h.
18772 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
18773 to NULL
18774 * jcf.h (jcf_out_of_synch): New extern function prototype.
18775 * parse.h: Static/global function implemented in parse.y
18776 prototyped and declarations moved at the end of the file.
18777 (DECL_P): Check that the argument isn't null.
18778 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18779 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
18780 (QUAL_DECL_TYPE): New macro.
18781 (PARAMS): Macro definition removed.
18782 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
18783 (return_statement:): Call build_return.
18784 (field_access:): Call make_qualified_primary in sub rule.
18785 (method_invocation:): Build method invocation and call
18786 make_qualified_primary when processing primaries.
18787 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
18788 get_type_from_signature.
18789 (java_check_regular_method): Extra integer 0 argument when calling
18790 lookup_java_method2.
18791 (lookup_java_interface_method2): Extra method DECL argument when
18792 calling lookup_java_interface_method2.
18793 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
18794 COMPOUND_EXPR node.
18795 (java_complete_expand_method): Layout current class iff not
18796 already done. Don't process interface's methods.
18797 (java_complete_expand_method): Use super class only if it
18798 exists. Use current class otherwise.
18799 (make_qualified_primary): New function.
18800 (resolve_expression_name): Process qualified expression or
18801 expression from primary the same way.
18802 (resolve_expression_name): Two last arguments to
18803 resolve_field_access are now NULL_TREEs.
18804 (resolve_field_access): New variable is_static. Local field must
18805 be DECLs. is_static computed on field DECLs only. Append code in
18806 where_found to the field access if necessary. Use QUAL_DECL_TYPE
18807 to initialize field_type.
18808 (resolve_qualified_expression_name): New local variable,
18809 previous_call_static and is_static. Handle primaries with function
18810 calls, casts, array references and `this'. `super' now handled as
18811 `(super_class)this'. Use is_static to clarify boolean expressions.
18812 Added code to handle case where a proper handle is required to
18813 access a field. Use QUAL_DECL_TYPE where applicable.
18814 (maybe_access_field): New function.
18815 (patch_method_invocation_stmt): New arguments primary, where,
18816 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
18817 deleted. Use `where' as a type to search from if specified. Check
18818 for static method reference where forbidden. Append primary or
18819 current_this to the argument list if not calling constructor nor
18820 static methods.
18821 (check_for_static_method_reference): New function.
18822 (patch_invoke): Layout the class on which new is done if
18823 necessary.
18824 (lookup_method_invoke): Changed format to report errors on
18825 methods.
18826 (qualify_ambiguous_name): New local variable this_found. Now
18827 handle things from primaries. Method call are considered
18828 expression names.
18829 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
18830 changed into NULLs.
18831 (not_initialized_as_it_should_p): Comply with the new DECL_P.
18832 (java_complete_tree): New case fo RETURN_EXPR. Process function
18833 call arguments in separate function.
18834 (complete_function_arguments): New function.
18835 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
18836 anymore.
18837 (patch_assignment): Take the return function slot into account as
18838 a RHS. Distinguish assignment from a return.
18839 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
18840 when checking methods in interfaces.
18841 (resolve_type_during_patch): NULL argument to unresolve_type_p
18842 instead of NULL_TREE.
18843 (patch_newarray): Fixed typo in comment.
18844 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
18845 (build_return, patch_return): New functions.
18846 * typeck.c (lookup_java_constructor): Fixed typo in comment.
18847
18848 1998-07-21 Per Bothner <bothner@cygnus.com>
18849
18850 * constants.c (find_name_and_type_constant, find_fieldref_index,
18851 find_methodref_index): New methods.
18852 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
18853 just return given method. Also, rename to build_known_method_ref.
18854 (expand_invoke): Rename call to build_invoke_non_interface.
18855 * java-tree.h, parse.h: Update prototype.
18856 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
18857 (such as expand_expr_stmt) if flag_emit_class_files.
18858 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
18859 STACK_TARGET, IGNORE_TARGET): New macros.
18860 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
18861 (generate_bytecode_insn): New function to generate method's bytecode.
18862 (generate_classfile): Node generate Code attribute for a method.
18863 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
18864 push_long_const, field_op, adjust_typed_op, maybe_wide):
18865 New functions used by generate_bytecode_insn.
18866
18867 * typeck.c (signature_include_return): Remove variable.
18868 (push_java_argument_signature, build_java_argument_signature): New.
18869 (build_java_signature): Use push_java_argument_signature.
18870 * parse.y: Use build_java_argument_signature instead of fiddling
18871 with signature_include_return.
18872
18873 1998-07-17 Tom Tromey <tromey@cygnus.com>
18874
18875 * gjavah.c (print_c_decl): Always generate JArray<>* for array
18876 types.
18877
18878 * Makefile.in (all.indirect): Added gjavah$(exeext).
18879 (gjavah$(exeext)): Added $(exeext).
18880 (clean): Likewise.
18881
18882 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
18883
18884 * class.c (layout_class): Call to java_layout_parsed_class replace
18885 by safe_layout_class.
18886 * expr.c (build_java_array_length_access): Removed static storage
18887 class in the function definition.
18888 (build_java_arraynull_check): Likewise.
18889 Also fixed typos in two comments.
18890 * lex.c (java_init_lex): Initialize static global kw_length.
18891 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
18892 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
18893 java_lex_error.
18894 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
18895 * parse.h (resolve_no_layout): New static function declaration.
18896 (get_identifier_in_static): Declaration removed.
18897 (java_layout_parsed_class): Function name declaration changed to
18898 safe_layout_class.
18899 (build_newarray_node, patch_newarray, resolve_type_during_patch,
18900 not_initialized_as_it_should_p, build_this): New static function
18901 declarations.
18902 (pushdecl_force_head, build_java_binop, int_fits_type_p,
18903 binary_numeric_promotion, stabilize_reference,
18904 build_decl_no_layout, build_java_arrayaccess): Extern function
18905 declarations moved into their own section.
18906 (build_newarray, build_anewarray, build_java_array_length_access,
18907 build_java_arraynull_check): New extern function declarations.
18908 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
18909 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
18910 fake tree codes.
18911 (CALL_CONSTRUCTOR_P): New macro.
18912 * parse.y (kw_length): New static global tree node.
18913 (return_statement): Tagged <node>.
18914 (RETURN_TK): Tagged <operator>.
18915 (variable_declarator_id:): Build variable declaration with an
18916 empty initialization value if a syntax error was found in the
18917 initialization part of the variable declaration.
18918 (statement_without_trailing_substatement:): return_statement: now
18919 uses the default rule.
18920 (return_statement:): Temporarily fixed to return NULL_TREE.
18921 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
18922 (class_instance_creation_expression:): Class creation rules now
18923 call build_method_invocation upon reduction.
18924 (array_creation_expression:): Rules call build_newarray_node upon
18925 reduction.
18926 (dim_exprs:): Build a list of dimension expressions.
18927 (dim_expr:): Store location of the OSB_TK in the dimension
18928 expression node.
18929 (method_invocation:): Added a new error rule.
18930 (build_unresolved_array_type): WFL argument may also be an array
18931 on a primitive type. Name of the argument changed to reflect this.
18932 (method_declarator): Insert argument type at the beginning of the
18933 argument type list and later reverse the list.
18934 (unresolved_type_p): Argument 'returned' may be optionally
18935 NULL_TREE.
18936 (java_layout_class_from_source): Function renamed
18937 safe_layout_class.
18938 (resolve_and_layout): Now call resolve_no_layout and
18939 safe_layout_class.
18940 (resolve_no_layout): New function.
18941 (purify_type_name): New function.
18942 (complete_class_report_errors): Call purify_type_name during error
18943 report on a type not found.
18944 (process_imports): error_found local variable doesn't need to be
18945 initialized to zero.
18946 (declare_local_variables): New local type_wfl. Fixed typo in error
18947 message. type_wfl assigned to unresolved type and used to register
18948 incomplete type. Build a WFL around the variable initialization
18949 statement so that debug info can be generated on it.
18950 (source_start_java_method): Reverse argument list after they've
18951 been processed.
18952 (current_this): New static global variable.
18953 (java_complete_expand_methods): Set current_this when appropriate.
18954 (resolve_expression_name): Build correct static and non static
18955 field access bearing a simple name.
18956 (resolve_field_access): Resolve the length field of arrays. Handle
18957 f.m() cases.
18958 (patch_method_invocation_stmt): Set the type of the method
18959 invocation to error_mark_node. This value is later overridden by a
18960 valid type, if any. Don't handle qualified constructor invocation
18961 as qualified method invocation. Call lookup_method_invoke with its
18962 new flag. It's no longer necessary to access the selected method
18963 as the value of a tree list. Handle constructor invocation.
18964 (patch_invoke): Reverse argument list when invoking non interface
18965 methods. Insert call to new as the first argument of the
18966 constructor.
18967 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
18968 defined within a final class. Return INVOKE_STATIC if the invoked
18969 method is a constructor.
18970 (lookup_method_invoke): New lc argument is a flag to indicate a
18971 constructor lookup. Now handle constructor lookup. Choose the most
18972 specific method in case several were matching the invocation
18973 requirements. Return a method decl instead of a tree list featuring
18974 one single method decl element.
18975 (refine_accessible_methods_list): New lc flag argument to
18976 indicate that a constructor is being looked up.
18977 (not_initialized_as_it_should_p): New function.
18978 (java_complete_tree): Now process fake tree codes
18979 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
18980 save_expr on resolved function call arguments. Case on
18981 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
18982 (patch_assignment): LHS can be a field access expression. When
18983 dealing with reference, lhs_type is the promoted type of the
18984 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
18985 applicable.
18986 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18987 (patch_binop): Use not_initialized_as_it_should_p where
18988 applicable.
18989 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18990 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
18991 where applicable.
18992 (resolve_type_during_patch): New function.
18993 (patch_cast): Call resolve_type_during_patch to resolve type and
18994 report error accordingly.
18995 (patch_array_ref): Use not_initialized_as_it_should_p where
18996 applicable. Array base expression is saved before being
18997 used. Promote the type of an array elements if it contains non
18998 builtin types.
18999 (build_newarray_node, patch_newarray, build_this): New functions.
19000
19001 1998-07-16 Tom Tromey <tromey@cygnus.com>
19002
19003 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
19004 increment it in `for' statement.
19005 (print_field_info): If number is inf or nan, don't print it.
19006 (print_method_info): If method name is `delete', just ignore it.
19007 (print_c_decl): Special-case jstringArray.
19008
19009 * gjavah.c (help): New function.
19010 (no_argument): New function.
19011 (usage): Changed text.
19012 (main): Rewrote argument handling. Now handles -v, --help,
19013 --version.
19014 (version): New function.
19015 (found_error): New global.
19016 (main): Return found_error.
19017 (generate_access): Set found_error.
19018 (print_c_decl): Likewise.
19019
19020 1998-07-15 Tom Tromey <tromey@cygnus.com>
19021
19022 * gjavah.c (print_c_decl): Don't print "," when examining field.
19023 Skip type name when looking at "[L" types.
19024 (process_file): Now static.
19025 (generate_access): Now returns int.
19026 (last_access_generated): New global.
19027 (process_file): Clear last_access_generated; make multiple passes
19028 over the class.
19029 (print_field_info): Just return if generate_access returns true.
19030 (print_method_info): Likewise. Also, allow <init> functions to
19031 pass through.
19032 (print_c_decl): Added is_init argument. Print constructors
19033 properly.
19034 (print_cxx_classname): Use UTF8_GET to extract characters from
19035 string.
19036 (print_base_classname): New function.
19037 (print_class_decls): New function.
19038 (process_file): Use it.
19039 (utf8_cmp): New function.
19040
19041 1998-07-13 Nick Clifton <nickc@cygnus.com>
19042
19043 * lang-options.h: Format changed to match changes in gcc/toplev.c
19044 to implement a --help option.
19045
19046 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
19047
19048 * decl.c (init_decl_processing): Revert change to dtable_type.
19049
19050 1998-07-09 Per Bothner <bothner@cygnus.com>
19051
19052 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
19053
19054 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
19055
19056 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
19057
19058 * lang.c (lang_init): Default flag_exceptions to 1, without
19059 checking to see if it's 2 first.
19060
19061 1998-07-08 Jeffrey A Law (law@cygnus.com)
19062
19063 * constants.c: Include "system.h".
19064 * decl.c: Likewise.
19065 * lang.c (flag_new_exceptions): Get via extern now.
19066 (lang_init_options): New functions. Turn on flag_new_exceptions.
19067
19068 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
19069
19070 * lex.c (java_lex): Return 0 when we see an invalid character in
19071 the input.
19072
19073 * lex.c (java_read_char): Specify extra argument when calling
19074 java_lex_error.
19075 (java_read_unicode, java_parse_end_comment,
19076 java_parse_escape_sequence): Likewise,
19077 (java_lex): Specify extra argument when calling
19078 java_lex_error. Test that IDs are beginning with a legal character
19079 for IDs. Handle invalid characters with an error message and a
19080 call to java_lex_error.
19081 (java_lex_error): Adjust column position by new argument
19082 `forward'. Issue an error even if in the middle of reporting an
19083 other error.
19084
19085 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
19086
19087 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
19088 we don't explicitly put a null pointer when we're copying it.
19089
19090 1998-07-07 Tom Tromey <tromey@cygnus.com>
19091
19092 * gjavah.c (print_cxx_classname): New function.
19093 (super_class_name): Likewise.
19094 (print_super_fields): Removed.
19095 (in_super): Removed.
19096 (print_field_info): Never generate #defines.
19097 (print_c_decl): Changed generated types to match JNI. No longer
19098 print class name before method name.
19099 (print_method_info): Print "static" before static methods.
19100 Print "virtual" before non-final methods.
19101 (usage): Use exit(1), not exit(-1).
19102 (main): Likewise.
19103 (print_field_info): Use %.17g to print a double.
19104 (last_access): New globals.
19105 (process_file): Initialize last_access.
19106 (usage): Now static.
19107 (ACC_VISIBILITY): New define.
19108 (generate_access): New function.
19109 (print_field_info): Call it.
19110 (print_method_info): Likewise. Also, generate information for all
19111 methods, not just native methods. Return void.
19112 (print_c_decl): Return void.
19113 (print_field_info): Return void.
19114
19115 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
19116
19117 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
19118 processing the jc1 grammar file. Prefix bison functions and
19119 variables with java_.
19120 (parse.c): Dependencies on parse.h and lex.h
19121 * expr.c (build_java_arrayaccess): Function now global.
19122 * java-tree.h: Comment reorganized to carry on previous
19123 classification effort.
19124 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
19125 RESOLVE_TYPE_NAME_P): New flags on WFLs.
19126 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
19127 java_parse (new prefix java_ generated by bison).
19128 (java_layout_parsed_class, java_register_parsed_class): Function
19129 call removed.
19130 (yyparse): Removed unnecessary call to init_outgoing_cpool.
19131 * lex.c (static tree wfl_op): Variable deleted.
19132 (java_init_lex): Initialize kw_super and kw_this. Initialize more
19133 ctxp fields to NULL_TREE.
19134 (java_lex): No longer create WFL for operators. Filename caching
19135 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
19136 created as STRING_CST and later expanded. Removed extra argument
19137 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
19138 and SUPER.
19139 (build_wfl_node): Removed code in comments.
19140 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
19141 store token and location data in the current bison token.
19142 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
19143 static/extern function declaration at the beginning of the file.
19144 (struct qualification): Data structure definition deleted.
19145 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
19146 (qualify_ambiguous_name): Function declaration modified. Function
19147 now returns nothing.
19148 (build_array_ref, patch_array_ref, make_qualified_name,
19149 resolve_qualified_expression_name, maybe_generate_clinit,
19150 resolve_field_access): New static function declarations.
19151 (build_java_arrayaccess): New extern function declaration.
19152 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
19153 (CALL_EXPR_PRIMARY): Macro deleted.
19154 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
19155 (struct parser_ctxt): Field initialized_final
19156 removed. non_static_initialized, static_initialized: New fields.
19157 * parse.y (static tree kw_super, static tree kw_this): New global
19158 static.
19159 (%union): tree wfl field of operator member replaced by int
19160 location. WFLs are non longer created for operators.
19161 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
19162 (qualified_name:): Now calls make_qualified_name to build the
19163 identifier.
19164 (type_declaration:): Consider generating <clinit> when class
19165 parsing completed.
19166 (variable_declarator:): Directly build an assignment node when the
19167 variable is initialized when declared.
19168 (this_or_super:): Build a WFL and set current location when THIS
19169 or SUPER are parsed.
19170 (expression_statement:): Wrap statement around a WFL.
19171 (primary_no_new_array:): Fixed typo. Changed value returned by
19172 THIS_TK because of its new type (temporary).
19173 (dim_exprs:): Temporary fix because of OSB_TK's new type.
19174 (field_access:): Build qualified name with SUPER.
19175 (method_invocation:): Fixed returned value because of SUPER's new
19176 type.
19177 (array_access:): Use OSB_TK location information.
19178 (post_increment_expression:, post_decrement_expression:,
19179 unary_expression:, pre_increment_expression:,
19180 pre_decrement_expression:, unary_expression_not_plus_minus:,
19181 cast_expression:, multiplicative_expression:,
19182 additive_expression:, shift_expression:, relational_expression:,
19183 equality_expression:, and_expression:, exclusive_or_expression:,
19184 inclusive_or_expression:, conditional_and_expression:,
19185 conditional_or_expression:, assignment:): Use new location/token
19186 information available on operators.
19187 (create_class): Set super_decl_type to NULL_TREE when processing
19188 java.lang.Object.
19189 (register_fields): Field initialization is now a MODIFY_EXPR
19190 node. Chain initialization code to the matching lists (according
19191 to the field declaration modifiers).
19192 (maybe_generate_clinit): New function.
19193 (method_header): Don't set method's DECL_NAME to a WFL when adding
19194 methods to java.lang.Object.
19195 (resolve_and_layout): Now can return NULL_TREE if the type
19196 resolution fails. Otherwise, return the class DECL instead of its
19197 TYPE.
19198 (check_method_redefinition): Don't patch method DECL_NAME if it
19199 belongs to java.lang.Object.
19200 (process_imports): Simply assign error_found to the value returned
19201 by check_pkg_class_access.
19202 (declare_local_variables): Don't use their init statements (if
19203 any) when parsing error were previously found. Reuse MODIFY_EXPR
19204 build during parsing as an init statement.
19205 (java_method_add_stmt): Now return the current method body.
19206 (java_layout_parsed_class, java_register_parsed_class): Functions
19207 removed.
19208 (java_complete_expand_methods): Initialize the constant pool on a
19209 per class basis. Layout the classes before expanding their method
19210 bodies. Don't try expand artificial constructor code if error were
19211 found. Make the classes data and register them if no error were
19212 found.
19213 (java_complete_expand_method): Retrieve an artificial constructor
19214 argument list before entering its body. Assign the top block to
19215 the artificial constructor function body and set types of declared
19216 blocks and compound statements to void. Walk method body if not an
19217 artificial constructor.
19218 (make_qualified_name, cut_identifier_in_qualified): New functions.
19219 (resolve_expression_name): Fixed comments. Save/restore the
19220 current class CLASS_LOADED_P flag value. Build non qualified
19221 static field access and handle qualified expression names.
19222 (resolve_field_access, resolve_qualified_expression_name): New
19223 functions.
19224 (patch_method_invocation_stmt): Use the new expression resolution
19225 scheme, calling resolve_field_access when the function call is
19226 resolved as an expression.
19227 (qualify_ambiguous_name): Function rewritten to work on qualified
19228 expression produced by make_qualified_name.
19229 (java_complete_tree): Promote type when function's argument are
19230 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
19231 the assignment to discover further errors if RHS is a expression
19232 name that fails to evaluate. Declare LHS initialized even though
19233 the assignment failed. Don't use the location variable and removed
19234 extra argument in patch function calls. Now handle the ARRAY_REF
19235 case and build internal string representation when STRING_CSTs are
19236 walked.
19237 (build_method_invocation): Don't wrap function call around a WFL.
19238 (build_assignment): Likewise. Use the operator location
19239 information.
19240 (patch_assignment): Handle array access LHSs. Handle error
19241 provenance, resulting in a better error report.
19242 (build_binop): Use op_location from operator as binop location
19243 information.
19244 (build_unaryop, build_incdec, build_cast): Likewise.
19245 (patch_binop): Extract location information from the node. Fixed
19246 typo in error message.
19247 (patch_unary_op): Extract location information from the node.
19248 (build_array_ref, patch_array_ref): New functions.
19249
19250 1998-07-01 Tom Tromey <tromey@cygnus.com>
19251
19252 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
19253 match _Jv_IsInstanceOf.
19254 * decl.c (init_decl_processing): Use _Jv_NewArray, not
19255 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
19256
19257 1998-06-30 Tom Tromey <tromey@cygnus.com>
19258
19259 * decl.c (init_decl_processing): Functions are now named
19260 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
19261
19262 1998-06-29 Per Bothner <bothner@cygnus.com>
19263
19264 * java-tree.h (load_class): Add prototype.
19265 * class.c (is_compiled_class): Add missing arg to load_class.
19266 * expr.c (expand_java_NEW): Call load_class.
19267 * parse.y (process_import): Removed bogus use of void return value.
19268
19269 1998-06-25 Per Bothner <bothner@cygnus.com>
19270
19271 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
19272 Function name is "_Jv_Throw" instead of "soft_athrow".
19273 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
19274 Function name is "_Jv_AllocObject" instead of "soft_new".
19275 Takes an extra parameter (object size).
19276 * expr.c: Update calls.
19277
19278 1998-06-24 Per Bothner <bothner@cygnus.com>
19279
19280 * lex.c (java_get_line_col): Handle end-of-file.
19281 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
19282
19283 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
19284
19285 * lang.c (lang_init): Make -fexceptions the default.
19286 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
19287 exception handling is not turned on.
19288
19289 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
19290
19291 * lang.c (flag_new_exceptions): Make this this default.
19292 * decl.c (end_java_method): Call emit_handlers.
19293 * except.c (method_init_exceptions): Set language code and version.
19294 (expand_start_java_handler): Enable exception, and call
19295 expand_eh_region_start.
19296 (expand_end_java_handler): Enable exception, and set up catch blocks.
19297 (emit_handlers): New routine to generate the saved handlers.
19298 * java-except.h (emit_handlers): Add prototype.
19299
19300 1998-06-12 Per Bothner <bothner@cygnus.com>
19301
19302 We used to have three different representations of the constant pool:
19303 the CPool structure, the tree_constant_pool, and the constructures
19304 used to build the Class object (which may need class and string
19305 constants) in compiled code. None were appropriate for compiling
19306 to .class files, so I did a major overhaul.
19307
19308 First, the tree_constant_pool array was removed. Things were
19309 modified to the CPool structure in the JCF could be used.
19310 Second, a "capacity" field was added to the CPool, and functions
19311 written to search for a matching constant, adding one if not found.
19312 The code that generated the Class object was changed to use a CPool.
19313 The actual TREE_LISTs used to build the CONSTRUCTORs used for
19314 the static Class object are now only in build_constants_constructor.
19315 Finally, I wrote code which can generate a .class file (including its
19316 constant pool) from the RECORD_TYPE of a class. This is a big step
19317 on the way to compiling Java source into .class files.
19318
19319 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
19320 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
19321
19322 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
19323 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
19324 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
19325 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
19326 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
19327 (lang_type): Removed constant_pool field.
19328 * jcf.h (CPool): Renamed size to count. Added field capacity.
19329 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
19330 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
19331 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
19332
19333 * constants.c (current_constant_pool_tags, current_constant_pool_data,
19334 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
19335 * constants.c (build_constants_constructor): Use new outgoing_cpool.
19336 (set_constant_entry, find_constant1, find_constant2,
19337 find_class_constant, count_constant_pool_bytes, write_constant_pool,
19338 find_utf8_constant, find_class_or_string_constant): New functions.
19339
19340 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
19341 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
19342 (give_name_to_class, get_class_constant): Likewise.
19343 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
19344 (get_name_and_type_constant, get_ref_constant): Removed.
19345 * parse.h (parser_ctxt): Remove field tree_constant_pool.
19346 * parse.y: Don't save/restore tree_constant_pool.
19347 * verify.c (verify_jvm_instructions): Update for new approach.
19348 * expr.c (expand_invoke, expand_java_field_op): Likewise.
19349
19350 * lang-options.h: Added -femit-class-file, -femit-class-files.
19351 * lang.c (flag_emit_class_files), java-tree.h: New flag.
19352 (lang_f_options): Added "emit-class-file(s)".
19353
19354 * expr.c (build_java_arrayaccess): Generate more efficient array
19355 bounds checking, by using unsigned compare.
19356
19357 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
19358
19359 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
19360
19361 * parse.h: New comment on the handling of unresolved type
19362 identifiers. JDEPs are now part of the jdep_code enum.
19363 (typedef struct jdep): Now use enum jdep_code or int, depending on
19364 availability. Both are narrowed down to an 8 bits bitfield.
19365 (CALL_EXPR_PRIMARY): Fixed comment.
19366
19367 1998-06-10 Tom Tromey <tromey@cygnus.com>
19368
19369 * Make-lang.in (java): Added gjavac and jvgenmain.
19370 (java.start.encap): Depend on gjavac.
19371 (java.rest.encap): Depend on jvgenmain.
19372
19373 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
19374 (JAVA_CROSS_NAME): Likewise.
19375 (java.all.build): Depend on jvgenmain and gjavac.
19376 (java.all.cross): Depend on jvgenmain and gjavac-cross.
19377 (jvgenmain$(exeext)): New target.
19378 (java.install-common): Wrote.
19379 * config-lang.in (compilers, stagestuff): Added gjavac and
19380 jvgenmain.
19381
19382 1998-06-10 Dave Brolley <brolley@cygnus.com>
19383
19384 * lang.c (lang_decode_option): New argc/argv interface.
19385
19386 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
19387
19388 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
19389 * decl.c (build_decl_no_layout): New function.
19390 * expr.c (java_lang_expand_expr): Layout declarations found in
19391 blocks before they're pushed.
19392 * jcf-parse.c (load_class): Save current line when parsing class
19393 file.
19394 (parse_source_file): Register class before expanding their
19395 methods.
19396 * lang.c (put_decl_node): Produce `null' when `void *' is
19397 processed.
19398 * lex.c (static tree wfl_op): New static global, for error report
19399 on casts.
19400 (java_init_lex): wfl_operator and wfl_op initialized
19401 here. Filename caching added for wfl_op. Return wfl_op when `(' is
19402 parsed.
19403 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
19404 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
19405 build_unresolved_array_type): New static function definitions.
19406 (build_decl_no_layout): New extern function declared.
19407 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
19408 faulty modifier exists.
19409 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
19410 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
19411 (UNARY_PLUS_EXPR): New fake operator.
19412 (struct parser_ctxt): New field osb_number.
19413 * parse.y (static tree wfl_operator): New static WFL for operator
19414 bound error messages.
19415 (DECR_TK, INCR_TK): Moved.
19416 (OP_TK): Tagged <operator>.
19417 (array_type:): Now call build_unresolved_array_type.
19418 (dim_expr:): Count the number of '[' seen.
19419 (post_increment_expression, post_decrement_expression,
19420 pre_increment_expression, pre_decrement_expression,
19421 unary_expression_not_plus_minus, unary_expression:): Actions are
19422 now building the corresponding unary expressions.
19423 (cast_expression:): Actions are now building cast expressions.
19424 (build_unresolved_array_type): New function.
19425 (create_interface): Reset the number of declared interfaces.
19426 (create_class): Likewise.
19427 (method_header): Methods declared within the scope of an interface
19428 are now implicitly set public and abstract.
19429 (java_complete_class): Variable's and parameter's type are patched
19430 with a promoted type.
19431 (declare_local_variables): Resolved non builtin types are promoted
19432 before being used to build a variable decl. Removed type patch
19433 posted on variable initialization statement.
19434 (source_start_java_method): Use build_decl_no_layout to build the
19435 decl of a parameter of incomplete type.
19436 (java_register_parsed_class): Process interfaces too. Call
19437 rest_of_decl_compilation on each processed class declarations.
19438 (java_complete_expand_methods): Don't attempt to expand things in
19439 interfaces.
19440 (java_complete_tree): Process CONVERT_EXPR, even though it always
19441 has a type. Propagate error_mark_node to node's type too. Promote
19442 method's call argument type and return error_mark_node if
19443 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
19444 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
19445 handle unary operator nodes.
19446 (build_assignment): Added comment.
19447 (print_int_node): New function.
19448 (patch_assignment): New second argument. New error handling. Use
19449 print_int_node. Handle references. Use can_cast_to_p to issue
19450 different error message according to the context and check upon
19451 the initialization of the RHS.
19452 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
19453 (operator_string): Handle more operators.
19454 (patch_binop): No longer use a function static
19455 wfl_operator. Improved error message on shift distance.
19456 (build_unaryop, build_incdec, build_cast, patch_unaryop,
19457 patch_cast): New functions.
19458
19459 1998-06-05 Per Bothner <bothner@cygnus.com>
19460
19461 * jvspec.c: New file.
19462 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
19463
19464 * java-tree.h (identifier_subst): Add declaration.
19465
19466 1998-06-04 Tom Tromey <tromey@cygnus.com>
19467
19468 * jvgenmain.c (main): Generate call to JvRunMain.
19469
19470 * class.c (make_class_data): Push value for "sync_info" field.
19471 * decl.c (init_decl_processing): Push "sync_info" field.
19472
19473 1998-06-03 Per Bothner <bothner@cygnus.com>
19474
19475 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
19476 Java (source) name, not signature.
19477 Set TYPE_ALIGN to (at least) that of element_type.
19478
19479 1998-06-02 Per Bothner <bothner@cygnus.com>
19480
19481 * class.c: Moved classname-mangling-rekated code to ...
19482 * mangle.c: ... this new file.
19483 * jvgenmain.c: New program (needs mangle.c) to generate main program.
19484 * Makefile.in: Update for above changes.
19485
19486 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
19487
19488 * expr.c (truthvalue_conversion): Convert integer and floating
19489 point value to their truth value.
19490 * lex.c (java_lex): Handle the `null' literal.
19491 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
19492 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
19493 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
19494 New macros.
19495
19496 * parse.y: Reorganization/documentation on token declaration.
19497 (binop_lookup[]): New added new tree codes.
19498 (relational_expression): Build corresponding binary operators.
19499 (equality_expression, conditional_and_expression,
19500 conditional_or_expression): Likewise.
19501 (java_complete_class): Fix crash in debug message.
19502 (java_complete_tree): Check initialization of method call
19503 arguments. Further bogus node evaluation to detect more error
19504 during assignments. Handles more binary operators.
19505 (patch_assignment): Use DECL_P.
19506 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
19507 code.
19508 (operator_string): Handle more case. Compacted source.
19509 (patch_binop): Changed function comment. Checking for
19510 uninitialized first operand takes the compound assignment into
19511 account and uses DECL_P. Checking for uninitialized second operand
19512 delayed to routine's end. Use macros to issue type bound error
19513 messages and issue messages on both operands if their types are
19514 different. Force fixed type into node. Handle all binary
19515 operators.
19516
19517 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
19518
19519 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
19520 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
19521 build operator node and return tokens.
19522 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
19523 * parse.h (java_complete_tree): Changed returned type in prototype.
19524 (build_method_invocation, build_assignment, patch_assignment,
19525 patch_binop): New static function declarations.
19526 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
19527 BUILD_EXPR_WFL): New macros.
19528 * parse.y (enum tree_code binop_lookup[]): New static for token to
19529 TREE_CODE lookup.
19530 (%union): Parser union has new sub-structure `operator'.
19531 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
19532 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
19533 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
19534 ASSIGN_ANY_TK): Tokens tagged `operator'.
19535 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
19536 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
19537 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
19538 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
19539 (assignment_operator:): Rule tagged `operator'.
19540 (expression_statement:): Re-installed default rule.
19541 (method_invocation:): Sub rules call build_method_invocation.
19542 (postfix_expression:): Don't attempt to resolve name here. Just
19543 return an ID.
19544 (multiplicative_expression:): Sub-rules build corresponding binop
19545 expression node.
19546 (additive_expression:, shift_expression:, and_expression:,
19547 exclusive_or_expression:, inclusive_or_expression:): Likewise.
19548 (assignment:): Sub rule invoke build_assignment.
19549 (assignment_operator:): Default rules on sub rules.
19550 (force_error): Added documentation on this variable.
19551 (declare_local_variables): Build initialization calling
19552 build_assignment.
19553 (expand_start_java_method): Removed unused rtx declaration. Mark
19554 arguments as already initialized.
19555 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
19556 (java_complete_expand_methods): Don't process next method if
19557 completion of the previous one triggered errors.
19558 (java_complete_expand_method): Call source_end_java_method if no
19559 error were found during completion.
19560 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
19561 locals declaratilon. Handle names found within a class. Return
19562 error_mark_node when things aren't found.
19563 (patch_method_invocation_stmt): Return error_mark_node on failures.
19564 (patch_invoke): Removed unused local. Return the correct node.
19565 (java_complete_tree): Now returns a value. The BLOCK section binds
19566 local identifiers and the type of a BLOCK is now void. Assign the
19567 result of operand completion on COMPOUND_EXPR. Assign the
19568 encapsulated node of a WFL to the result of its completion, except
19569 when the node is an identifier. Now handle MODIFY_EXPR and several
19570 binary operators. Return error_mark_node on errors.
19571 (build_method_invocation, build_assignment, patch_assignment,
19572 build_binop, operator_string, patch_binop): New functions.
19573 * typeck.c (binary_numeric_promotion): New function.
19574
19575 1998-05-21 Per Bothner <bothner@cygnus.com>
19576
19577 * class.c (identifier_subst): New convenience wrapper for ident_subst.
19578 Replace most uses of ident_subst by identifier_subst.
19579
19580 * class.c (push_class_static_dummy_field): Removed function.
19581 (build_class_ref): Find Class object decl by looking up "CNAME.class",
19582 instead of looking got "class" static field. Create that decl here.
19583 (class_identifier_node): Removed; no longer needed.
19584 (init_class_processing): Don't init class_identifier_node.
19585 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
19586 Do nreverse 0 times (instead of twice) for Object and Class.
19587 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
19588
19589 1998-05-20 Per Bothner <bothner@cygnus.com>
19590
19591 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
19592 while initializing linenumber_count and linenumber_table.
19593 Do it before init_function_start (which calls emit_line_note).
19594 * expr.c (expand_byte_code): Don't need to clear lineno here.
19595
19596 1998-05-18 Tom Tromey <tromey@cygnus.com>
19597
19598 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
19599 then mangle number as _N_.
19600
19601 * class.c (mangle_class_field): New function.
19602 (build_class_ref): Set assembler name of class reference using
19603 mangle_class_field.
19604 (push_class_static_dummy_field): Likewise.
19605
19606 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
19607
19608 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
19609 of assigning to TREE_CODE. The latter method exploits a feature
19610 of GCC that is not ANSI compliant.
19611
19612 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
19613
19614 * decl.c (pushdecl_force_head): New function.
19615 (pushlevel): Removed conditional printf.
19616 (complete_start_java_method): Don't enter local variable scope if
19617 function is compiled from source code.
19618 * expr.c: parse.h now included
19619 (java_lang_expand_expr): New function.
19620 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
19621 printf. Terminate buffer when doing directories.
19622 * jcf-parse.c (parse_source_file): Call lang_init_source before
19623 parsing and before code generation.
19624 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
19625 use printf if the macro is defined.
19626 * lang.c (lang_init): Install lang_expand_expr hook on
19627 java_lang_expand_expr.
19628 (java_dummy_print): New function.
19629 (lang_init_source): New function.
19630 * lex.c (java_lex): Remember location of an opening brace at the
19631 second nesting level.
19632 (java_is_eol): Unget character seen after a CR if it is EOF.
19633 * parse.h: Now includes lex.h
19634 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
19635 printf if the macro is defined.
19636 (expand_start_java_method, build_expr_block, enter_block,
19637 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
19638 New static function declarations.
19639 (pushdecl_force_head): New extern function declaration.
19640 (INCOMPLETE_TYPE_P): New macro.
19641 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
19642 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
19643 BLOCK_EXPR_ORIGIN): New macros.
19644 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
19645 DECL_SOURCE_LINE_LAST): New macros.
19646 (struct parser_ctxt): Removed field current_method_decl, redundant
19647 with the field current_function_decl. Added fields
19648 first_ccb_indent1 and pending_block.
19649 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
19650 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
19651 tagged <node>
19652 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
19653 (compilation_unit:): Cosmetic on sub rule.
19654 (type_declaration:): Cosmetic on sub rules. Added an error rule.
19655 (variable_initializer:): Installed default rule on expression:.
19656 (method_declaration:): method_header: starts a new
19657 method. method_body: installs the function body, absorbs blocks
19658 emitted for temporary variable scopings, pops function's body block
19659 and merges function's last statement lineno in DECL_SOURCE_LINE.
19660 (method_body:): Installed default rules.
19661 (block:): Call enter_block when an opening brace is seen. Absorb
19662 scoping blocks and call exit_block when a closing brace is seen.
19663 (block_statement:): Cosmetic changes.
19664 (method_invocation:): Create WFL around CALL_EXPR node.
19665 (patch_stage): Added comment around definition.
19666 (method_header): Try to use first_ccb_indent1 as the first line of
19667 the method, so BP debug info are emitted at the first opening
19668 brace of the function. If the function has no body, use the
19669 location of the function's name. Override currently defined method
19670 name with the matching WFL so we can point redefinition errors
19671 using the location where the function's name was declared.
19672 (check_abstract_method_header): Interprets DECL_NAME as an
19673 identifier or as a WFL, accordingly.
19674 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
19675 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
19676 location and name information out of it and reinstall DECL_NAME to
19677 its original identifier node value.
19678 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
19679 function's source code).
19680 (read_import_dir): Test the value returned by find_class and issue
19681 a fatal accordingly.
19682 (declare_local_variables): Push a new block for the scope of the
19683 new variable(s) if code has been already generated at that nesting
19684 level. Pinpoint redefinition errors using the variable id
19685 WFLs. Generate initialization code if necessary. If the variable
19686 type is incomplete, register a patch on its decl.
19687 (source_start_java_method): Rewritten. Define a new block for the
19688 function's parameters. Build parameter decl out of function's
19689 arguments and register them for a patch if their types are
19690 incomplete.
19691 (expand_start_java_method): Includes the part of
19692 source_start_java_method that was pushing the parameter decls and
19693 completing the method start code.
19694 (source_end_java_method): Removed call the expand_end_bindings and
19695 poplevel (already taken care of). Reinstall function's arguments
19696 and get function's last line of code before calling
19697 expand_function_end.
19698 (java_method_add_stmt): New comment before the function's
19699 code. Complement the second operand of the current COMPOUND_EXPR
19700 if necessary.
19701 (java_complete_expand_methods): Don't generate debug info on line
19702 zero when expanding a generated constructor.
19703 (java_complete_expand_method): Set start and end line numbers for
19704 a artificially generated constructor to one and manually call
19705 enter_block and exit_block when defining it. For all methods:
19706 expand function's start calling the new expand_start_java_method
19707 and invoke java_complete_tree on the effective method's body, if
19708 any.
19709 (resolve_expression_name): Now use lookup_name_in_blocks to search
19710 local variable decls and print out an error when variables are
19711 undefined.
19712 (patch_method_invocation_stmt): Inserted comment before the
19713 function's code.
19714 (lookup_method_invoke): Chain method's arguments using chainon
19715 with the current arg list as a second argument. Inserted missing
19716 IDENTIFIER_POINTER when reporting an error on methods not found.
19717 (refine_accessible_methods_list): Don't retain constructors.
19718 (patch_arguments): Function removed.
19719 (java_complete_tree): Inserted comment before the function's
19720 code. New case for BLOCKs. Moved the WFL case a bit
19721 further. Complete function's arguments.
19722 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
19723 maybe_absorb_scoping_blocks): New functions.
19724
19725 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
19726
19727 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
19728 previously set.
19729 * jcf-parse.c (parse_source_file, java_error_count): New forward
19730 and extern declarations.
19731 (java_parse_abort_on_error): Macro moved.
19732 (jcf_parse_source): fatal called if fopen fails. Now calls
19733 parse_source_file.
19734 (parse_source_file): New parse_only parameter. Reflects the
19735 elimination of the second pass.
19736 (yyparse): parse_source_file called with argument set to 0.
19737 * jcf.h (JCF_ZERO): Sets java_source to zero.
19738 * lex.c (java_init_lex): pass argument is gone. Function modified
19739 to be called once during the analysis of a file.
19740 (java_unget_unicode): Fixed typo in fatal message.
19741 (java_get_line_col): Likewise.
19742 (java_lval): Likewise. String literals no longer built during
19743 second pass.
19744 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
19745 account.
19746 * parse.h (MODIFIER_WFL): New macro.
19747 (parse_check_super, parser_check_super_interface): Now return int.
19748 (parser_chain_incomplete_item, not_builtin_p,
19749 complete_method_decl): Declarations removed.
19750 (build_method_invocation_stmt, build_invoke): Renamed using the
19751 `patch' instead of `build'
19752 (register-incomplete_type, obtain_incomplete_type,
19753 java_complete_tree, java_complete_expand_method,
19754 unresolved_type_p, create_jdep_list): New function declarations.
19755 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
19756 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
19757 (jdep): New typedef on new struct _jdep.
19758 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
19759 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
19760 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
19761 JDEP_RESOLVED_P): New macros.
19762 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
19763 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
19764 JDEP_VARIABLE): New enum values and jdep kinds.
19765 (jdeplist): New typedef on struct _jdeplist.
19766 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
19767 macros.
19768 (CALL_EXPR_PRIMARY): New macro.
19769 (struct parser_ctxt): Fields java_pass, current_method_decl,
19770 method_decl_list deleted. New field jdeplist.
19771 (INCOMPLETE_P): Macro deleted.
19772 * parse.y (single_type_import_declaration:): Removed pass switch.
19773 (type_import_on_demand_declaration): Likewise.
19774 (field_declaration:): Removed pass switch on all sub rules.
19775 (class_declaration:): Call the complete_class_decl removed on
19776 class_body rules.
19777 (method_declaration:): Removed second pass switch. No longer chain
19778 methods decl when method_header reduced.
19779 (method_header:): Sub rules no longer depend on pass switch.
19780 (method_declarator:): Likewise.
19781 (method_body:): Likewise.
19782 (abstract_method_declaration:): Likewise.
19783 (block_statement:): Likewise.
19784 (local_variable_declaration:): Likewise.
19785 (argument_list:): Likewise.
19786 (method_invocation:): Likewise. Call to build_method_invocation_stmt
19787 removed. Partial CLASS_EXPR tree node built instead.
19788 (postfix_expression:): Removed pass switch on all sub rules.
19789 (java_pop_parser_context): Free classd_list content.
19790 (yyerror): Call obstrack_grow0 to finalize error message.
19791 (check_class_interface_creation): Comment modified to reflect new
19792 returned value meaning. Removed second pass switch. Return 1 if an
19793 error was found, 0 otherwise. Adjust pointer on filename if a
19794 leading path separator was found.
19795 (maybe_create_class_interface_decl): Removed first pass switch
19796 when linking the class decl to the class_list. Install a new
19797 jdep_list for the class.
19798 (add_superinterfaces): List of unresolved interfaces is
19799 gone. Unresolved interfaces are directly added to the current
19800 dependencies list.
19801 (create_interface): Second pass shortcut removed.
19802 ctpx->modifier_ctx access through MODIFIER_WFL.
19803 (create_class): Second pass shortcut removed. Call to
19804 register_incomplete_type replaces the call to
19805 parser_chain_incomplete_item.
19806 (complete_class_decl): Function removed.
19807 (duplicate_declaration_error): New way of retrieving redeclared
19808 item type.
19809 (register_fields): Call to lookup_modifier_cl replaced by
19810 MODIFIER_WFL. New way of handling unresolved type, using
19811 unresolved_type_p and obtain_incomplete_type.
19812 register_incomplete_type replaces call to parser_chain_incomplete_item.
19813 (patch_stage): New static global variable.
19814 (method_header): New way of handling unresolved type, using
19815 unresolved_type_p and obtain_incomplete_type. patch_stage used to
19816 indicates that the method decl needs to be patched.
19817 (check_abstract_method_header): Call to lookup_modifier_cl
19818 replaced by MODIFIER_WFL.
19819 (method_declarator): Incomplete argument type are registered
19820 calling register_incomplete_type. Patch on the declared method is
19821 issued in that case.
19822 (unresolved_type_p): New function.
19823 (parser_check_super_interface): New comment to reflect function's
19824 modified returned type (int). Function and has a new argument
19825 this_wfl. Call to parse_error_context uses this_wfl instead of
19826 relying on lookup_cl.
19827 (parser_check_super): Comment reflects function's new returned
19828 type (int). Function returns nonzero value on error.
19829 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
19830 register_incomplete_type, jdep_resolve_class): New functions to
19831 handle incomplete types in declarations.
19832 (java_complete_class): Rewritten to work with the new incomplete
19833 type handling scheme.
19834 (complete_class_report_errors): Likewise.
19835 (complete_method_decl): Removed: it jobs is now handled by
19836 java_complete_class.
19837 (do_resolve_class): Class loaded in not already loaded and not
19838 found in Java source code.
19839 (java_check_regular_methods, java_check_abstract_methods): Don't
19840 call complete_method_decl anymore.
19841 (lookup_modifier_cl, not_builtin_p): Functions deleted.
19842 (read_import_dir): Got rid of the pass number dependency.
19843 (declare_local_variables): New handling of unresolved types (patch
19844 issued).
19845 (source_start_java_method): New parameter level. Function called
19846 with level set to 1 when argument types are potentially
19847 unresolved. Called to complete the job with level set to 2 once
19848 types are complete.
19849 (source_end_java_method): Call to permanent_allocation
19850 removed. Waiting to be replaced by a more suitable obstack
19851 management.
19852 (java_complete_expand_methods, java_complete_expand_method,
19853 java_expand_finals): New functions.
19854 (build_method_invocation_stmt): Renamed
19855 patch_method_invocation_stmt. Extracts function call expression
19856 (wfl) and arguments (args) from CALL_EXPR tree operands.
19857 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
19858 call. Patch the function and argument operand of the CALL_EXPR
19859 tree argument.
19860 (patch_argument, java_complete_tree): New functions.
19861
19862 1998-04-20 Per Bothner <bothner@cygnus.com>
19863
19864 Recover from missing fields and methods (i.e. error instead of fatal).
19865 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
19866 * expr.c (expand_invoke): Recover from missing method.
19867 (expand_java_field_op): Recover from missing field.
19868 Inline references to java.lang.{Integer,Char,...}.TYPE.
19869 * typeck.c (get_type_from_signature), java-tree.h: New function.
19870 * class.c (add_method): Use get_type_from_signature.
19871 (build_class_ref): Handle a class that was not found.
19872 * typeck.c (convert): Handle conversion to pointers (for convenience).
19873 * verify.c (verify_jvm_instructions): Use get_type_from_signature
19874 instead of lookup_field to handle missing fields.
19875
19876 * jcf-parse.c (process_zip_dir): Set java_source.
19877
19878 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
19879
19880 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
19881
19882 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
19883
19884 * jcf-parse.c (load_class): Don't change input_filename before
19885 calling jcf_parse_source (but still do it before calling
19886 jcf_parse).
19887 (jcf_parse_source): Assign input_filename after having saved the
19888 parser context.
19889 * lex.c (java_init_lex): Chain a WFL node to the import on demand
19890 list. ctxp->modifier_ctx zeroed according to its new
19891 definition. ctxp->filename initialized. Removed
19892 JAVA_MODIFIER_CTX_UNMARK.
19893 (java_unget_unicode): Update the character based column position.
19894 (java_allocate_new_line): ref_count not used anymore. Always free
19895 ctxp->p_line. Initialize c_line->char_col to 0.
19896 (java_get_unicode): Update the character based column position.
19897 (java_lex): Use ctxp->elc to store current position in source
19898 file, at the beginning of the parsed token. Set modifier_ctx entry
19899 corresponding to the parse modifier to a WFL node. Return a WFL
19900 node when an identifier is parsed.
19901 (java_lex_error): Now uses ctxp->elc to store current position in
19902 source.
19903 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
19904 * lex.h (build_wfl_node): New function definitions.
19905 (struct java_line): ref_count and next fields are gone. New field
19906 char_col.
19907 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
19908 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
19909 (JAVA_COLUMN_DELTA): New macro.
19910 (java_lc): New typedef on new struct _java_lc.
19911 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
19912 (parse_error_context, parse_warning_context): Changed prototypes.
19913 (java_get_line_col): Added as an available global function.
19914 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
19915 (IC_DECL): Replaced by macro IC_TYPE
19916 (DEPEND_WFL): New macro.
19917 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
19918 wrong modifier.
19919 (exit_java_complete_class): Removed a commented out statement.
19920 (struct parser_ctxt): Added comments on fields. modifier_ctx is
19921 now an array of tree nodes. Deleted fields line_list and
19922 e_line. New field elc, to replace e_line.
19923 * parse.y (array_type:): Build WFL node.
19924 (qualified_name:): Build a single WFL node out of two. Retain
19925 the location information of the first node in the resulting node.
19926 (package_declaration:): Use package name as a WFL node
19927 (single_type_import_declaration:): Use imported name as a WFL node.
19928 (type_import_on_demand_declaration:): Use root of the imported
19929 packages as a WFL node.
19930 (field_declaration:): Removed unused local variable cl.
19931 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
19932 (yyerror): New static elc. Removed static error_line, error_pos.
19933 New local code_from_source. Save ctxp->elc into elc at the first
19934 pass. Call java_get_line_col to get a string of the line where
19935 the error occurred.
19936 (debug_line): Removed static function.
19937 (parse_error_context, parse_warning_context): Parameter cl is now
19938 a WFL node. Use its value to initialize ctxp->elc.
19939 (redefinition_error): Parameter cl is now a WFL node.
19940 (parse_add_interface): New parameter wfl. No longer call
19941 lookup_cl, use wfl instead.
19942 (check_class_interface_creation): Parameter cl is now a WFL node.
19943 (maybe_create_class_interface_decl): Likewise.
19944 (add_superinterfaces): New function.
19945 (create_interface): Removed local cl, node, super_decl,
19946 super_decl_type. Function now uses id as a WFL node. Better
19947 warning/error report on obsolete or forbidden mix of
19948 modifiers. Now calls add_superinterfaces to register interfaces.
19949 (create_class): Removed local cl, node. Local variable id is used
19950 as a WFL node. Better error report on forbidden modifier
19951 mix. Uses add_superinterfaces to register interfaces.
19952 (find_field): Argument cl is now a WFL node. Now store the WFL
19953 node of a fields that needs to be checked for their
19954 initialization.
19955 (method_header): Local variable node non longer used. Local
19956 variable id replaces cl.
19957 (check_modifiers_consistency): Local variable cl is now a WFL
19958 node.
19959 (method_declarator): Local variable cl replaced by parameter id.
19960 (parser_qualified_name): Now uses parameter name as a WFL node.
19961 (parser_check_super_interface): New parameter wfl, for achieve
19962 greater accuracy during error reports.
19963 (parser_chain_incomplete_item): New parameter named location. Used,
19964 along the decl, to construct the incomplete item node.
19965 (java_complete_class): resolve_class now uses WFL node extracted
19966 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
19967 where appropriate.
19968 (complete_method_decl): Unresolved function's argument types are WFL.
19969 (resolve_class): Parameter cl is now a WFL node.
19970 (resolve_and_layout): Likewise.
19971 (do_resolve_class): Likewise. Try first to use cl and then do the
19972 lookup on the decl when calling check_pkg_class_access.
19973 (complete_class_report_errors): Use IC_TYPE in place of
19974 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
19975 instead of doing a lookup over the decl.
19976 (java_check_final): Use WFL info from field tree list.
19977 (lookup_cl): Rewritten and returns a statically defined WFL node.
19978 (lookup_modifier_cl): Now uses information from WFL nodes.
19979 (process_imports): Likewise.
19980 (read_import_dir): name and cl arguments replaced by a single WFL
19981 node. Function modified accordingly.
19982 (find_in_imports_on_demand): Now uses WFL node.
19983 (check_pkg_class_access): cl argument is now a WFL node.
19984 (declare_local_variables): Fixed to use WFL nodes.
19985 (resolve_expression_name): Likewise.
19986 (build_method_invocation_stmt): name_combo argument renamed
19987 wfl. Function modified to use WFL nodes.
19988 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
19989 (lookup_method_invoke): cl is now a WFL node. Added missing
19990 IDENTIFIER_POINTER to class type decl name.
19991
19992 1998-04-14 Dave Brolley <brolley@cygnus.com>
19993
19994 * lang.c (init_parse): Now returns char* containing the filename.
19995
19996 1998-04-10 Per Bothner <bothner@cygnus.com>
19997
19998 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
19999
20000 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
20001 * class.c (make_class_data): If flag_assume_compiled, initial class
20002 state is CSTATE_PREPARED; make superclass and interfaces direct
20003 references, rather than constant pool indexes.
20004
20005 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
20006
20007 * parser.y: Include flags.h. Removed debug variable pl.
20008 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
20009 (block:): Likewise.
20010 (labeled_statement_nsi:): Generate debug info when reducing
20011 expression_statement:.
20012 (check_pkg_class_access): get_access_flags_from_decl invocation
20013 fixed for new CLASS_* flags location.
20014 (source_end_java_method): Save/restore parser context when
20015 entering/leaving this routine. Restore lineno to its right value
20016 before calling expand_end_bindings.
20017 (build_method_invocation_stmt): build_invoke called with the
20018 current line information.
20019 (build_invoke): New argument cl. Wrap the function call around a
20020 wfl node.
20021 (refine_accessible_methods_list): Changed comment, removed
20022 unnecessary code.
20023 * parse.h: Fixed typo in comments.
20024 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
20025 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
20026 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
20027 parser_ccb_indent.
20028 * lex.c (java_lex): Record the last closing curly bracket of a
20029 function.
20030 * jcf-parse.c (jcf_parse_source): Now calls
20031 java_check_methods. Clarified comment, fixed typo.
20032
20033 1998-04-09 Dave Brolley <brolley@cygnus.com>
20034
20035 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
20036 (finish_parse): Expose for non USE_CPPLIB builds.
20037
20038 1998-04-08 Jeffrey A Law (law@cygnus.com)
20039
20040 * lang.c (lang_print_xnode): New function.
20041
20042 1998-04-03 Per Bothner <bothner@cygnus.com>
20043
20044 * decl.c (class_dtable_decl), java-tree.h: New tree node.
20045 * class.c (get_dispatch_vector, get_dispatch_table): New functions
20046 used to build a class's dispatch table.
20047 (make_class_data): Generate dispatch table if flag_assume_compiled.
20048 Set dtable of class object to address of class_dtable_decl.
20049
20050 * decl.c (int_decl_processing): Make soft_badarrayindex_node
20051 be volatile and have side effects - generates better code.
20052
20053 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
20054 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
20055
20056 * expr.c (expand_invoke): If class is final, method is
20057 effectively final, so can call it directly.
20058
20059 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
20060
20061 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
20062
20063 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
20064
20065 * parse.y (build_method_invocation_stmt): Removed extra argument
20066 to build_invoke.
20067
20068 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
20069
20070 * expr.c (dtable_indent): Now static global.
20071 (expand_invoke): Now call invoke_build_dtable and
20072 build_invokevirtual.
20073 (invoke_build_dtable, build_invokevirtual): New functions.
20074 * jcf-io.c (find_class): Defer issuing a warning by setting
20075 jcf->outofsynch to 1.
20076 * jcf-parse.c (jcf_out_of_synch): New function.
20077 (load_class): Test this_jcf.outofsynch flag and call
20078 jcf_out_of_synch accordingly.
20079 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
20080 comment indentation.
20081 * lex.c (java_get_unicode): Fixed code indentation.
20082 (java_lex): Create string literal. Fixed typo. Removed several
20083 premature obstack_free.
20084 * parse.h: New enums for name resolution and invocation mode.
20085 (struct qualification): New data structure.
20086 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
20087 (do_resolve_class, build_method_invocation_stmt,
20088 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
20089 debug_line, identical_subpath_p, invocation_mode,
20090 refine_accessible_methods_list, build_invoke,
20091 lookup_method_invoke): New functions declared.
20092 (build_invokevirtual, invoke_build_dtable, match_java_method,
20093 build_field_ref, jcf_out_of_synch): New references to external
20094 functions.
20095 (struct parse_ctxt): Removed artificial_constructor field.
20096 * parse.y: (array_type:): Type defined for this rule.
20097 (class_type:): Installed default rule for interface_type:.
20098 (array_type:): Now build Java array type.
20099 (qualified_name:): Now use obstack_grow0.
20100 (method_declaration:): Skip the artificial constructor added to
20101 the list, if any.
20102 (abstract_method_declaration:): Execute the code only during pass 1.
20103 (block:): Installed default rule in block_statements:.
20104 (block_statement:): Add the statement to the method during pass 2.
20105 (statement_expression): Installed default rule for
20106 method_invocation:.
20107 (argument_list:): Added code to build the argument list.
20108 (method_invocation:): Added call to create the method invocation
20109 node.
20110 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
20111 (debug_line): New function for debug.
20112 (complete_class_decl): No longer do something during pass 1.
20113 (method_header): Use BUILD_PTR_FROM_NAME.
20114 (parser_qualified_classname): Use obstack_grow0. Removed bogus
20115 obstack_free.
20116 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
20117 function's main comment.
20118 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
20119 classes.
20120 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
20121 (resolve_class): Now works with arrays.
20122 (do_resolve_class, resolve_and_layout): New functions.
20123 (java_check_regular_methods): Reverse method list before and after
20124 having processed it. No longer set ctxp->artificial_constructor.
20125 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
20126 accordingly. Fixed typo in issued error message. Now use
20127 obstack_grow0.
20128 (find_in_imports_on_demand): Now use obstack_grow0.
20129 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
20130 (source_end_java_method): Call expand_expr_stmt instead of
20131 expand_expr. Calls it before calling expand_function_end.
20132 (java_method_add_stmt): Do nothing if errors were found during
20133 parsing.
20134 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
20135 (build_method_invocation_stmt, build_invoke, invocation_mode,
20136 lookup_method_invoke, refine_accessible_methods_list,
20137 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
20138 New functions.
20139 * typeck.c (build_java_signature): Properly end method signature
20140 if return type skipped.
20141 (match_java_method): New function.
20142
20143 1998-03-16 Per Bothner <bothner@cygnus.com>
20144
20145 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
20146
20147 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
20148
20149 * expr.c (build_invoke_non_interface): New function.
20150 (methods_ident, ncode_ident): Now static globals.
20151 (expand_invoke): Use build_invoke_non_interface.
20152 * java-tree.h (struct lang_decl): New field function_decl_body.
20153 (DECL_FUNCTION_BODY): New macro.
20154 * jcf-parse.c (jcf_parse_source): Deeper check before setting
20155 CLASS_FROM_SOURCE_P.
20156 (parse_source_file): Fixed typos. Call java_layout_parsed_class
20157 before starting pass 2. Call to java_generate_parsed_class replaced
20158 by java_register_parsed_class.
20159 * lex.c: Fixed typo in header. Some line width related formating.
20160 * lex.h: Some line width related formating.
20161 * parse.h (source_end_java_method, resolve_expression_name,
20162 complete_class_decl, maybe_create_class_interface_decl,
20163 check_class_interface_creation): New static function declarations.
20164 (java_layout_parsed_class, java_method_add_stmt): New function
20165 declarations.
20166 (struct parser_ctxt): Field mark_class_generate removed. New
20167 fields class_list and artificial_constructor.
20168 * parse.y: Fixed typo in header.
20169 (class_declaration:): Call complete_class_decl when class body
20170 parsed.
20171 (method_declaration:): Call source_end_java_method in pass 2 when
20172 the method body is defined.
20173 (postfix_expression:): Do expression name resolution on sub-rule
20174 name during pass 2.
20175 (create_class, create_interface): Merged common pieces.
20176 (check_class_interface_creation, maybe_create_class_interface_decl):
20177 New functions.
20178 (complete_class_decl): New function.
20179 (register_fields): Fixed line width related typo.
20180 (method_header): Correctly skip first argument when fixing
20181 argument line. Changed the loop.
20182 (java_check_circular_reference): Now use ctxp->class_list.
20183 (java_complete_class): Removed start/stop marking.
20184 (java_check_regular_methods): Now takes a class decl as an
20185 argument. Add default constructor if none were encountered.
20186 (java_check_methods): Now use ctxp->class_list. Changed call to
20187 java_check_regular_methods.
20188 (source_start_java_method): Set DECL_ARG_TYPE for each function
20189 arguments.
20190 (source_end_java_method, java_method_add_stmt): New functions.
20191 (java_generate_parsed_class): No longer exists.
20192 (java_layout_parsed_class, java_register_parsed_class): New functions.
20193 (resolve_expression_name): New function.
20194
20195 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
20196
20197 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
20198 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
20199 until pass initializations are done. Call read_import_dir with
20200 pass set to 0.
20201 * parse.h: (lookup_modifier_cl): New function declared.
20202 (INTERFACE_FIELD_MODIFIERS): New macro.
20203 (OBSOLETE_MODIFIER_WARNING): New macro.
20204 * parse.y: (register_fields): Class type and current field name in
20205 local variables. Check modifier(s) if adding field(s) to an interface.
20206 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
20207 and report errors using the faulty modifier line context.
20208 (lookup_modifier_cl): New function.
20209 (read_import_dir): Detect and report default import processing
20210 failure.
20211
20212 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
20213
20214 Add a pair of -fassume-compiled/-fno-assume-compiled options.
20215 * class.c (is_compiled_class): Return 1 after making sure it
20216 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
20217 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
20218 * java-tree.h (flag_assume_compiled): Add decl.
20219 * lang.c (lang_f_options): Add the flag.
20220 (flag_assume_compiled): Add decl, default to 0.
20221
20222 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
20223
20224 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
20225 (is_compiled_class): Likewise.
20226 (layout_class): Likewise.
20227 (layout_class): Detect and lay out classes defined in source code.
20228 (interface_of_p, add_interface_do, may_add_interface): New
20229 function.
20230 (add_interface): Now use add_interface_do.
20231 (add_method_1): New function.
20232 (add_method): Now use add_method_1.
20233 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
20234 (complete_start_java_method): New function.
20235 (start_java_mehod): Now call complete_start_java_method.
20236 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
20237 (expand_invoke): Likewise and fixed typo.
20238 *gjava.c: (print_super_field): Use new argument to find_class
20239 DO_CLASS_FILE.
20240 (main): Likewise.
20241 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
20242 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
20243 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
20244 IDENTIFIER_NODE.
20245 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
20246 (add_method_1, push_class): New prototypes.
20247 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
20248 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
20249 directory where the class was found.
20250 (find_class): New argument DO_CLASS_FILE. Function find_class
20251 modified accordingly.
20252 *jcf-parse.c: (fix_class_path): New function.
20253 (load_class): Use new VERBOSE argument. load_class now finds and
20254 loads/parses .class/.java files. Save read_state of current_jcf
20255 if necessary.
20256 (java_parser_abort_on_error): New macro.
20257 (jcf_parse_source, parse_source_file): New function.
20258 (jcf_parse): Fixed typo.
20259 (yyparse): Call parse_source_file () only.
20260 (process_zip_dir): Fixed typo, fix zdir->filename_length when
20261 writing the real class name back in the zip directory entry.
20262 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
20263 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
20264 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
20265 (find_class): Prototype fixed.
20266 *lex.c: Added 1998 time stamp.
20267 Removed all static global variables, moved into the parser
20268 context data structure.. Now include unistd.h if SEEK_SET not
20269 defined.
20270 (java_init_lex): Rewritten.
20271 (java_sneak_unicode): Modified current unicode access in current line.
20272 (java_unget_unicode): Likewise.
20273 (java_allocate_new_line): New allocation management.
20274 (java_read_char): Modified access and storage of unget_utf8_value.
20275 New way of processing current unicode.
20276 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
20277 (java_get_unicode): Now use the parser context.
20278 (java_lineterminator): Likewise.
20279 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
20280 of the reentrant parser implementation. Function now use the
20281 parser context data structure and java_lval. Fixed production of
20282 the float and double constant "out of range" error message. Fixed
20283 obstack use. Return integer value when hitting a modifier. Now
20284 return type for TRUE, FALSE and other predefined types. Return
20285 identifier as a TREE_LIST list containing the current line context
20286 as the TREE_VALUE sub-node.
20287 (java_unicode_2_utf8): Fixed typo in declaration.
20288 (java_lex_error): Now use the parser context data structure.
20289 *lex.h: Added 1998 time stamp.
20290 (struct java_line): New fields ref_count and next.
20291 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20292 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
20293 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
20294 *parse.h: Added 1998 time stamp.
20295 (java_parse_source_file): Renamed from parse_source_file.
20296 (YYERROR_NOW, YYNOT_TWICE): Fixed.
20297 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
20298 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
20299 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
20300 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
20301 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
20302 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
20303 (struct parser_ctxt): New data structure to keep the parser context.
20304 *parse.y: Added 1998 time stamp, got rid of static global variables.
20305 (java_error_count, ctxp): New global variables.
20306 (%union): New value field.
20307 (numeric_type, integral_type): Rules removed.
20308 (primitive_type): Rule defined to handle integral, float, double and
20309 boolean types.
20310 (qualified_name, package_declaration,
20311 single_type_import_declaration, type_import_on_demand_declaration,
20312 modifiers, class_declaration, super, interfaces,
20313 interface_type_list, class_body, field_declaration,
20314 field_declaration, variable_declarators, variable_declarator,
20315 variable_declarator_id, method_declaration, method_header,
20316 formal_parameter_list, formal_parameter, method_body, block,
20317 static, interface_declaration, extends_interfaces,
20318 abstract_method_declaration, local_variable_declarators): Rules now
20319 define actions.
20320 (force_error, do_warning): New global statics.
20321 (push_parser_context, parser_context_save_global,
20322 parser_context_restore_global, pop_parser_context): New functions.
20323 (yyerror): Now uses the global parser context. Fixed use of obstack.
20324 (parse_error, parse_error_context, parse_warning_context,
20325 java_accstring_lookup, redefinition_error, check_modifiers,
20326 parser_add_interface, create_interface, create_class, find_field,
20327 duplicate_declaration_error, register_fields, method_header,
20328 check_modifiers_consistency, check_abstract_method_header,
20329 method_declarator, parser_qualified_classname,
20330 parser_check_super_interface, parser_check_super,
20331 parser_chain_incomplete_item, java_check_circular_reference,
20332 layout_class_from_source, java_complete_class,
20333 complete_method_decl, resolve_class, complete_class_report_errors,
20334 java_check_final, check_method_redefinition,
20335 java_check_regular_methods, java_check_abstract_methods,
20336 java_check_methods, lookup_java_interface_method2,
20337 lookup_java_method2, lookup_cl, find_name_in_single_imports,
20338 process_imports, find_in_imports, read_import_entry,
20339 read_import_dir, find_in_imports_on_demand,
20340 check_pkg_class_access, not_builtin_p, declare_local_variables,
20341 source_start_java_method, java_generate_parsed_class): New
20342 functions.
20343 *typeck.c: (signature_include_return): New global variable.
20344 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
20345 to add the function returned type in the signature.
20346
20347 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
20348
20349 * jcf-io.c (open_in_zip): Use strncmp and LEN.
20350
20351 1998-01-29 Dave Brolley <brolley@cygnus.com>
20352
20353 * Make-lang.in (java.info): Added.
20354 (java.install-info): Added
20355
20356 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
20357
20358 * Makefile.in (clean): Also remove java/parse.c.
20359
20360 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
20361
20362 Add a pair of -fbounds-check/-fno-bounds-check options.
20363 * lang.c (lang_decode_option): Add code to grok arguments.
20364 (flag_bounds_check): Add decl.
20365 (lang_f_options): New array w/ the option in it.
20366 * java-tree.h (flag_bounds_check): Add decl.
20367 * lang-options.h: New file.
20368 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
20369 of a static macro value.
20370 (JAVA_ARRAY_EXCEPTION): Delete macro.
20371
20372 1998-01-23 Per Bothner <bothner@cygnus.com>
20373
20374 * typeck.c (build_java_array_type): Fix two bugs in previous change.
20375 * expr.c (build_anewarray): Add missing promote_type.
20376
20377 1998-01-22 Per Bothner <bothner@cygnus.com>
20378
20379 Add array types with known length to optimize bounds checking.
20380 * typeck.c (build_java_array_type): Take length parameter.
20381 (java_array_type_length, build_prim_array_type): New functions.
20382 * java-tree.h: Update for new functions.
20383 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
20384 * class.c: Use build_prim_array_type.
20385 * expr.c (can_widen_reference_to): Handle known-length array types.
20386 (verify_jvm_instructions): Keep track of integer push instructions
20387 followed by newarray/anewarray, so we can build known-length arrays.
20388 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
20389 (java_array_data_offset): New function.
20390 (build_java_array_length_access): New function. Optimize if constant.
20391 (build_java_arrayaccess): Constant fold bounds check.
20392 (expand_java_newarray, expand_java_anewarray): Replaced by ...
20393 (build_newarray, build_anewarray): New functions.
20394 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
20395 * verify.c (merge_types): Handle known-lengh array types.
20396
20397 1998-01-19 Per Bothner <bothner@cygnus.com>
20398
20399 * expr.c (expand_byte_code): Fix performace bug, which caused
20400 searching linenumber_table to be linear rather than constant.
20401
20402 1997-12-12 Per Bothner <bothner@cygnus.com>
20403
20404 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
20405
20406 * decl.c, java-tree.h (soft_fmod_node): New global.
20407 * decl.c (init_decl_processing): Define __builtin_fmod.
20408 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
20409 using __builtin_fmod.
20410
20411 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
20412
20413 * keyword.h: New file, output of keyword.gperf as processed by
20414 gperf.
20415 * lex.c (java_lex_init): Initialize java_error_flag.
20416 * parse.c (YYERROR_NOW): Uses java_error_flag.
20417 * parse.y: New static java_error_flag. Useless definition of
20418 buffer_error gone.
20419 * parse.y (java_error): Portable error recovery using
20420 java_error_flag (not yet completely tuned).
20421
20422 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
20423
20424 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
20425
20426 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
20427
20428 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
20429 (parse.c, lex.c, keyword.h): New rules for Java source code
20430 front-end.
20431 * parse.c: Renamed into jcf-parse.c.
20432 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
20433 * keyword.gperf: New file, Java keywords.
20434 * parse.y: New file, Java language grammar.
20435 * parse.h: New file, Java language grammar definitions.
20436 * lex.c: New file, Java language lexer.
20437 * lex.h: New file, Java language lexer definitions.
20438
20439 1997-12-03 Per Bothner <bothner@cygnus.com>
20440
20441 * decl.c (clinit_identifier_node), java-tree.h: New global.
20442 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
20443 * verify.c (verify_jvm_instructions): Inline use of removed macros.
20444 * expr.c (expand_java_field_op): Check for invalid assignment
20445 to final field.
20446
20447 * jcf-reader.c (get_attribute): Test for wrong attribute length.
20448
20449 1997-10-27 Per Bothner <bothner@cygnus.com>
20450
20451 * verify.c (verify_jvm_instructions): When processing a handler,
20452 attempt to set the current_subr to the right value.
20453 (More complicated code combines Sep 17 and Oct 22 versions.)
20454
20455 1997-10-24 Per Bothner <bothner@cygnus.com>
20456
20457 * class.c (push_class): Figure out (guess) name of source file.
20458 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
20459 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
20460 (parse_class_file): Change return type from int to void.
20461 Call debug_start_source_file/debug_end_source_file.
20462
20463 * expr.c (build_java_binop): Fix masking 2nd operand.
20464 * decl.c (init_decl_processing): Set sizetype first.
20465
20466 1997-10-22 Per Bothner <bothner@cygnus.com>
20467
20468 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
20469 (Revert Sep 17 change.)
20470
20471 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
20472
20473 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
20474 .class extension in their name and fix thing so we don't process
20475 them parse_zip_file_entries().
20476 (parse_zip_file_entries): Cleaned unused local variables.
20477
20478 1997-10-20 Per Bothner <bothner@cygnus.com>
20479
20480 * expr.c (can_widen_reference_to): Allows equal array element types.
20481 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
20482 * jcf-dump.c (RET): Get (and print) index.
20483
20484 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
20485 Promote element type to POINTER_TYPE.
20486
20487 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
20488
20489 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
20490 find_in_current_zip, jcf_figure_file_type): Moved from
20491 jcf-reader.c to parse.c.
20492 * zextract.c: (read_zip_archive): takes file_comment_length possible
20493 field into account.
20494
20495 1997-10-20 Per Bothner <bothner@cygnus.com>
20496
20497 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
20498
20499 * verify.c (merge_types): Handle array types even better ...
20500
20501 1997-10-17 Per Bothner <bothner@cygnus.com>
20502
20503 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
20504
20505 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
20506 * class.c (make_class_data): Don't build fields_decl if no fields.
20507 When building fields_decl, skip if DECL_ARTIFICIAL.
20508
20509 * expr.c (java_stack_swap): Update stack_type_map.
20510 * verify.c (merge_types): Handle array types better.
20511
20512 1997-10-15 Per Bothner <bothner@cygnus.com>
20513
20514 * class.c (add_field): Don't promote short integral fields to
20515 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
20516 * expr.c (push_value): Promote and convert short integral values.
20517
20518 * decl.c, java-tree.h (integer_two_node): New constant node.
20519 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
20520
20521 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
20522
20523 * class.c (append_gpp_mangled_type): Use function argument
20524 unpromoted type to generate mangled name.
20525
20526 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
20527
20528 * constants.c (build_constant_data_ref): Now uses current_class
20529 instead of main_class.
20530 (build_constants_constructor): Now uses current_class instead of
20531 main_class.
20532 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
20533 of the global variable SeepZipFiles done here.
20534 * zextract.c (read_zip_archive): extra_field optional field taken
20535 into account while computing the position of the class file in the
20536 archive.
20537 * verify.c (verify_jvm_instructions): Use current_jcf to search
20538 the constant pool.
20539 * parse.c (load_class): First search for the class to load in the
20540 current zip file. Saves current_jcf (restored before returning
20541 from that function). Don't call JCF_FINISH in the class was found
20542 in the current ZIP file.
20543 (jcf_parse): If the class was found in the current ZIP file, save
20544 its tree_constant_pool (for later reuse).
20545 (parse_class_file): New function. Process each method defined in
20546 the current class and record the class as to be later registered.
20547 (yyparse): Rewritten. Figure the type of the current file and switch
20548 accordingly.
20549 * lang.c: New global variable current_jcf.
20550 (lang_init): Removed compiling_from_source test (done later, in
20551 yyparse). Removed call the jcf_parse ().
20552 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
20553 (typedef struct JCF): New fields seen_in_zip (to mark a class found
20554 in the current ZIP file) and zip_offset (offset to the class data in
20555 the current zip file).
20556 * jcf-reader.c: zipfile.h included.
20557 localToFile: New ZipFileCache static global variable
20558 (parse_zip_file_entries): New function. Browse the current ZIP
20559 file directory and process each class found.
20560 (process_zip_dir): New function. Register each class found in the
20561 ZIP file directory. The class aren't parsed but a valid JCF is
20562 link to each of them.
20563 (find_in_current_zip): New function. Search for a class in the
20564 current ZIP file directory. If found, prepare the class so that it
20565 can be loaded.
20566 (jcf_figure_file_type): New function. Examine the file structure
20567 to figure a class file, a ZIP file. If none of these categories are
20568 matched, a source file is assumed.
20569 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
20570 SeenZipFile: New global variable.
20571 (open_in_zip): Use zipmember's length to accelerate the search for
20572 a member. If zipmember was NULL and zip file successfully read,
20573 return 0.
20574 * java-tree.h: New global variable current_jcf declared. Added
20575 declaration for current_constant_pool_tags, current_constant_pool_data,
20576 current_constant_pool_length, current_constant_pool_data_ref.
20577 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
20578 store the JCF of classes seen in a zip file) and tree *constant_pool
20579 (to save a loaded class constant pool). current_class declared here.
20580 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
20581 retrieve method_ref_constant.
20582 (PUSHC): java_push_constant_from_pool now uses current_jcf.
20583 (OBJECT): get_class_constant now uses current_jcf.
20584 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
20585 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
20586 (expand_invoke): Now uses current_class instead of main_class
20587 (build_class_init): Now uses current_class instead of main_class
20588 * class.c: New static global variable registered_class.
20589 (register_class): New function.
20590 (emit_register_class): Modified to use registered_class instead of
20591 main_class
20592 (is_compiled_class): Now take into account class seen in the archive.
20593
20594 1997-10-06 Per Bothner <bothner@cygnus.com>
20595
20596 * except.h: Renamed to: java-except.h.
20597 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
20598 * except.c: Add semi-working (commented out) implementation.
20599
20600 * expr.c (expand_iinc): Add needed flush_quick_stack.
20601 * parse.c (set_source_filename): New function.
20602 (give_name_to_class): Set input_filename from package.classname.java.
20603
20604 * jcf-io.c (find_class): Don't look first in ".".
20605
20606 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
20607
20608 * zextract.c (read_zip_archive): Now takes into account the
20609 extra_field field.
20610 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
20611
20612 1997-09-20 Per Bothner <bothner@cygnus.com>
20613
20614 * constants.c, java-tree.h (build_internal_class_name): New function.
20615 (alloc_class_constant): Re-implement using build_internal_class_name.
20616 * class.c (make_class_data): Likewise.
20617 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
20618
20619 1997-09-17 Per Bothner <bothner@cygnus.com>
20620
20621 * verify.c (verify_jvm_instructions): Temporarily set current_subr
20622 to NULL before pushing an exception handler target.
20623
20624 * expr.c (flush_quick_stack): Save from low stack indexes to high.
20625 (java_stack_swap, java_stack_dup): Re-write to be safe from
20626 clobbering registers.
20627 (build_class_init): New function.
20628
20629 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
20630
20631 * typeck.c (build_java_array_type): Temporary use
20632 permanent_obstack to create the array 'length' field.
20633 * expr.c (lookup_label): Temporay use permanent_obstack to create
20634 label if not found.
20635 * class.c (push_super_field): Tempory use permanent_obstack.
20636
20637 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
20638
20639 * typeck.c (type_for_mode): Now handles double_type_node and
20640 float_type_node.
20641 * verify.c (verify_jvm_instructions): The instruction following
20642 the wide bytecode is checked. OPCODE_ret added to the list of
20643 wide.
20644
20645 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
20646
20647 * class.c (make_class): Temporary use permanent_obstack. Set the
20648 class CLASS_P field to 1.
20649 (push_class): Temporary use permanent_obstack.
20650 (set_super_info): Temporary use permanent_obstack.
20651 (add_method): Temporary use permanent_obstack, set
20652 METHOD_TRANSIENT().
20653 (add_field): Temporary use permanent_obstack. Sets
20654 FIELD_VOLATILE() and FIELD_TRANSIENT().
20655 (build_class_ref): Temporary use permanent_obstack if the class
20656 isn't compiled.
20657 (build_static_field_ref): Temporary use permanent_obstack when
20658 creating field's rtl.
20659 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
20660 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
20661 and fields. Function finalized, as far as flag handling.
20662 (push_class_static_dummy_field): Temporary use permanent_obstack.
20663 (emit_register_class): Force generation of class registration at
20664 -O3 or deeper.
20665 * decl.c (end_java_method): Call permanent_allocation() before
20666 returning.
20667 * expr.c (can_widen_reference_to): Added comment to interface
20668 handling, fixed typo.
20669 (lookup_field): Now uses CLASS_P() to correct FIXME
20670 (expand_invoke): Verification on public && !static &&
20671 !abstract moved into soft_lookupinterfacemethod (kaffe).
20672 Use Object class dtable if objectref is an array when expanding
20673 invokeinterface.
20674 (java_push_constant_from_pool): Temporary use permanent_obstack
20675 for CONSTANT_string
20676 * parse.c (get_ref_constant): Temporary use permanent_obstack to
20677 create constant references.
20678 (get_constant): Temporary use permanent_obstack to create constant.
20679 (load_class): Temporary use permanent_obstack to load class.
20680 (jcf_parse): Temporary use permanent_obstack to perform class
20681 layout.
20682 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
20683 (build_java_signature): Temporary use permanent_obstack.
20684 * verify.c: (verify_jvm_instruction): removed unnecessary verification
20685 on ACC_SUPER flag.
20686 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
20687 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
20688 (CLASS_P): Defined
20689
20690 1997-09-11 Per Bothner <bothner@cygnus.com>
20691
20692 * class.c (append_gpp_mangled_type): Fix typo.
20693 (emit_register_class): Use main_class to get class object, rather
20694 than looking for no-longer-existing static decl starting with _CL.
20695 * typeck.c (parse_signature_type): Promote array element type
20696 if it is a RECORD_TYPE.
20697
20698 1997-09-10 Per Bothner <bothner@cygnus.com>
20699
20700 * class.c (push_class_static_dummy_field): New function.
20701 (mangle_static_field): New. Do G++-style mangling of static fields.
20702 (layout_class): Mandle static fields here, not in add_field.
20703 (build_class_ref): The class object is now a dummy static field.
20704 * decl.c (find_local_variable): Look for best, instead of first match.
20705 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
20706 (build_java_athrow): Don't check here if exception is Throwable.
20707 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
20708 (TYPE_USED): Removed. No longer used ...
20709 * parse.c (jcf_parse): Call push_class_static_dummy_field.
20710 * verify.c (push_pending_label): New function.
20711 (push_pending_block): Renamed to check_pending_block.
20712 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
20713 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
20714 re-checking possible handlers) after a store (less wasted work).
20715 Check for null handler (finally) before calling add_handler.
20716 Various changes to (finally?) correctly handle try/finally.
20717
20718 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
20719
20720 * class.c: Include stdio.h.
20721
20722 1997-09-04 Per Bothner <bothner@cygnus.com>
20723
20724 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
20725 to make sure class is initialized before static/special invoke.
20726
20727 * verify.c (verify_jvm_instructions): On a store instruction,
20728 call find_local_variable to force pre-allocation of decl and rtx.
20729 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
20730
20731 1997-09-03 Per Bothner <bothner@cygnus.com>
20732
20733 * class.c (build_class_ref): Strip off "promoted_" if need be.
20734 (make_field_value): Call build_java_signature when needed.
20735 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
20736 * expr.c (build_java_athrow): Don't push_value of exception.
20737 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
20738 match specification of [fd]cmp[lg] for NaNs.
20739 (expand_byte_code): Add support for exception handler ranges.
20740 * except.c: Add skeleton for EH code-generation.
20741 * verify.c (merge_types): Treat all promoted integral types as equal.
20742 * constants.c (build_constants_constructor): To force creation of
20743 current_constant_pool_data_ref, call build_constant_data_ref.
20744
20745 * javaop.def (lload): Fix typo.
20746 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
20747
20748 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
20749
20750 * parse.c: Don't include function.h.
20751
20752 1997-08-27 Per Bothner <bothner@cygnus.com>
20753
20754 * except.[ch]: New files.
20755 * Makefile.in (JAVA_OBJS): Add except.o
20756 * expr.c: Temporary warning about unimplemented exceptions.
20757 * verify.c: Verify exception handlers.
20758
20759 * jcf-dump.c (disassemble_method): Print exception table.
20760
20761 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20762
20763 * expr.c (verify_jvm_instructions): Started a thorough
20764 verification of invoke* bytecodes.
20765 (expand_byte_code): flush quick stack if PC is the target of a
20766 branch. and undef RET (conflicting with config/i386/i386.h).
20767 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
20768 used.
20769 (expand_invoke): Now handles invokeinterface and do more
20770 verification according to the bytecode.
20771 (lookup_field): Don't try to load the class if processing
20772 dtable_type.
20773 (can_widen_reference_to): Now handles interfaces.
20774 * decl.c (init_decl_processing): New global variable
20775 soft_lookupinterfacemethod_node, declared in java-tree.h.
20776 Call set_super_info on string_type_node.
20777 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
20778 defined.
20779 * class.c (set_super_info): Fills the CLASS_* flags according to
20780 access_flags.
20781 (get_access_flags_from_decl): Handles all class flags.
20782
20783 1997-08-26 Per Bothner <bothner@cygnus.com>
20784
20785 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
20786 * parse.c (yyparse): Check for abstract method, and missing code.
20787 * expr.c (expand_byte_code): Change interface.
20788 * lang.c (put_decl_node): Print promoted types prettier.
20789 * verify.c (verify_jvm_instruction): Change interface.
20790 Partial support for scanning exception table.
20791 For load instructions, handle promoted integral types.
20792
20793 1997-08-21 Per Bothner <bothner@cygnus.com>
20794
20795 * verify.c: New file, with contents moved from expr.c.
20796 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
20797 * typeck.c (is_array_type_p): Moved here from expr.c.
20798 * java-tree.h: Add some now-needed function declarations.
20799 * Makefile.in (JAVA_OBJS): Added verify.o.
20800
20801 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
20802
20803 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
20804 METHOD_ABSTRACT flag.
20805
20806 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
20807 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
20808 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
20809
20810 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
20811 variables.
20812 (start_java_method): Hook for SYNCHRONIZED methods.
20813
20814 * expr.c (build_java_jsr, build_java_ret): New functions
20815 (JSR,PRE): New macros
20816 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
20817 (verify_jvm_instructions): tableswitch, lookupswitch,
20818 monitorenter, monitorexit, goto_w: verified.
20819 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
20820 (build_java_monitor): New function.
20821 (MONITOR_OPERATION): Modified to call build_java_monitor()
20822 (verify_jvm_instructions): Started a thorough verification of
20823 invoke* bytecodes.
20824
20825 1997-08-19 Per Bothner <bothner@cygnus.com>
20826
20827 Support verification of jsr/ret subroutines (used for try/finally).
20828 * decl.c (return_address_type_node): New type node.
20829 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
20830 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
20831 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
20832 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
20833 TYPE_USED): New macros for special types in type_map.
20834
20835 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
20836 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
20837 BCODE_JUMP_TARGET.
20838 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
20839
20840 * expr.c (can_widen_reference_to): New function.
20841 (pop_type): Use it.
20842 (merge_type_state): Support handling start of subroutine.
20843 (push_pending_block): Return char* error message, instead of calling
20844 fatal on an error. Also handle subroutines.
20845 (verify_jvm_instructions): Handle errors from push_poending_block.
20846 Support jsr and ret instructions.
20847
20848 1997-08-19 Per Bothner <bothner@cygnus.com>
20849
20850 * jcf-io.c (find_classfile): Fix thinko.
20851 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
20852
20853 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
20854
20855 * Makefile.in (BISON): Remove.
20856
20857 1997-08-07 Per Bothner <bothner@cygnus.com>
20858
20859 * Makefile.in: Convert to autoconf.
20860 * config-lang.in (outputs): Added java/Makefile.
20861
20862 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
20863 Rename cc1java to jc1.
20864
20865 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
20866 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
20867
20868 * class.c (class_depth): Do load_class if needed.
20869
20870 Mostly better verification.
20871 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
20872 (init_decl_processing): Change return type of soft_checkcast.
20873 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
20874 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
20875 lang_print_error): New functions.
20876 (lang_init): Set global hook print_error_function to lang_print_error.
20877 * expr.c: In the type_map ptr_type_node is only used for null now.
20878 (pop_type, merge_types): Hence ptr_type_node matches any reference.
20879 (merge_types): Dererence pointer to record types before comparing.
20880 (decode_newarray_type, merge_types): On error just return NULL.
20881 (build_java_binop): Add preliminary implementation (with warning)
20882 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
20883 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
20884 (expand_compare, expand_java_goto, expand_java_call): Don't
20885 push_pending_block, since that only makes sense when verifying.
20886 (merge_type_state): Different return codes.
20887 (push_pending_block): A block may need to be verified more than once.
20888 (expand_byte_code): Warn about unused code at code generation time.
20889 (verify_jvm_instruction): Changed logic, since code may need to be
20890 re-verified if type-state has changed. Also, better error handling.
20891 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
20892 Improve newarray, anewarray, ?aload, athrow,
20893 * java-tree.h (LABEL_CHANGED): New macro.
20894
20895 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
20896
20897 * decl.c (soft_athrow_node): New global variable initialized.
20898 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
20899 * typeck.c (convert): Added support for REAL_TYPE.
20900 (convert_to_char): New function.
20901 (convert): Handle CHAR_TYPE.
20902 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
20903 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
20904 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
20905 promoted type.
20906 (verify_jvm_instructions): Added break a the end of bogus unop: label.
20907 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
20908 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
20909 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
20910 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
20911 to Use The Right Things.
20912 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
20913 compatible with INT. BOOLEAN is made equivalent to BYTE.
20914 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
20915 OPCODE_ifnonnull): Now supported.
20916 (build_java_athrow): New function.
20917
20918 1997-08-04 Per Bothner <bothner@cygnus.com>
20919
20920 Rename method name <init> to match G++ (and fix mangling).
20921 * class.c (layout_class): Replace method name of <init> by class name.
20922 (make_method_value): Do inverse renaming of constructor from <init>.
20923 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
20924 * typeck.c (lookup_java_constructor): New function.
20925 * expr.c (expand_invoke): If method_name is <init>, call
20926 lookup_java_constructor to find constructor.
20927
20928 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
20929
20930 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
20931
20932 * parse.c (get_class_constant): Modified to handle array "classes"
20933 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
20934 wide type.
20935 (convert): Modified to handle real type.
20936 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
20937 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
20938 variables declared.
20939 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
20940 soft_multianewarray, soft_newarray_node, soft_throw_node): New
20941 global variables initialized.
20942 (find_local_variable): Handles the case of a pointer
20943 (end_java_method): Restore the use of one more scope
20944 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
20945 build_java_array_length_access, expand_java_arrayload,
20946 expand_java_arraystore, expand_java_array_length,
20947 expand_java_multianewarray, expand_java_anewarray,
20948 build_java_check_indexed_type, is_array_type_p,
20949 build_java_throw_out_of_bound_exception): New functions.
20950 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
20951 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
20952 OPCODE_<t>aload): Implemented code for verification.
20953 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
20954 ARRAY_NEW_MULTI): Macro defined.
20955 (CONVERT): Modified to invoke convert().
20956 (case OPCODE_aload2): Fixed index typo from 2 to 1.
20957
20958 1997-07-31 Per Bothner <bothner@cygnus.com>
20959
20960 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
20961 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
20962 (make_class_data): Field name needs '/' as package prefix.
20963 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
20964
20965 1997-07-25 Per Bothner <bothner@cygnus.com>
20966
20967 Implement debug information for local variables.
20968 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
20969 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
20970 DECL_LOCAL_SLOT_CHAIN): New macros.
20971 (struct lang_decl_var): New type.
20972 * parse.c (give_name_to_locals): Move to decl.c.
20973 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
20974 (start_java_method): Re-write parameter handling.
20975 (pending_local_decls): New global variable.
20976 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
20977 (find_local_variable): Accept pc so we can skips decls not in range.
20978 (struct binding_level): Add end_pc field.
20979 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
20980 (various): Change so current pc gets passed to find_local_variable.
20981
20982 * decl.c (init_decl_processing): Re-arrange fields in
20983 class_type_node and and method_type_node to match kaffe 0.9.1.
20984 * class.c (make_method_value, make_class_data): Update
20985 initializations to match.
20986
20987 1997-07-16 Per Bothner <bothner@cygnus.com>
20988
20989 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
20990 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
20991 (push_super_field): New function.
20992 (make_class_data): Handle inheritance of class static initializer.
20993 (layout_class): New name mangling.
20994 * constants.c (build_constant_data_ref): Init type of data array
20995 to a one-element array.
20996 (build_constants_constructor): Set DECL_SIZE from complete array type.
20997 * decl.c: Rename class_type, object_type etc to class_type_node,
20998 object_type_node etc. Make former inherit from latter.
20999 * expr.c (expand_invoke): Add cast of function address.
21000 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
21001 * parse.c (yyparse): Don't call layout_class here.
21002 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
21003
21004 1997-06-14 Per Bothner <bothner@cygnus.com>
21005
21006 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
21007 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
21008 (alloc_class_constant): New.
21009 * expr.c (expand_invoke): Make sure method's class is initialized.
21010 * class.c (interits_from_p, emit_register_class): New functions.
21011 * parse.c (yyparse): Call emit_register_class.
21012
21013 1997-06-09 Per Bothner <bothner@cygnus.com>
21014
21015 * constants.c: New file, to handle constant pool.
21016 * Makefile.in (JAVA_OBJS): Add constants.o.
21017 * decl.c (init_decl_processing): Update, fix, finish various structs.
21018 (pushdecl_top_level): New.
21019 * parse.c (layout_class): Moved to class.c.
21020 * expr.c (java_push_constant_from_pool): New function.
21021 * class.c (build_class_ref): Make work fully
21022 (make_class_data): Emit super-class, constant pool, interface vector.
21023
21024 1997-06-03 Per Bothner <bothner@cygnus.com>
21025
21026 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
21027 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
21028 * class.c (class_depth): New function.
21029 (lookup_named_class): Replaced by new function lookup_class.
21030 * decl.c (object_type_node, string_type_node): New.
21031 Remove various types that we no longer need.
21032 * expr.c (verify_jvm_instructions): New separate verifier pass.
21033 (push_type, pop_type): New functions for verifier.
21034 (type_stack_dup, pop_argument_types, merge_types): Likewise.
21035 (expand_byte_code): Simplify, since we assume already verified.
21036 (expand_invoke): Now mostly works.
21037 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
21038 * lang.c (main_class): Move to parse.c. Don't make_class yet.
21039 * parse.c: Wait to allocate class object until we know its name.
21040 (layout_class): Calculate DECL_VINDEX for each virtual method.
21041 * typeck.c (get_array_type): Rename to ...
21042 (build_java_array_type): ... and provide working implementation.
21043 (build_java_signature): New function - build Java signature of type.
21044 (set_java_signature): New function - cache signature with type.
21045 (lookup_java_method): New function.
21046
21047 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
21048
21049 * class.c (ident_subst): Take extra SUFFIX parameter.
21050 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
21051 (set_constant_value, build_static_field_ref, is_compiled_class): New.
21052 (build_class_ref): Actually implement.
21053 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
21054 * decl.c (builtin_function): New.
21055 (init_decl_processing): Update for current Kaffe. Declare some
21056 builtin Kaffe functions.
21057 * expr.c (build_address_of): New.
21058 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
21059 Renamed (from expand_java_new etc), and added working implementations.
21060 (build_field_ref): Now also handle static fields.
21061 (expand_invoke): Implement invokestatic, and start implement rest.
21062 * java-opcodes.h: Use javaop.def to avoid duplicated list.
21063 * javaop.def: Rename invokevirt -> invokevirtual.
21064 * lang.c (use_handles): Removed.
21065 * parse.c: Add support for ConstantValue attribute.
21066 Handle nested loading of a class. (JPOOL_UTF): New.
21067
21068 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
21069
21070 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
21071
21072 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
21073
21074 * Make-lang.in (java.install-man): New empty rule.
21075 * typeck.c (set_local_type): New function.
21076 * expr.c (STORE_INTERNAL): Call find_local_variable,
21077 not find_stack_slot. Call set_local_type.
21078
21079 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
21080
21081 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
21082 and building RECORD_TYPE CONSTRUCTORs.
21083 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
21084
21085 * lang.c (use_handles): Change the default to 0.
21086 * decl.c: Define and build class_type, field_type, utf8const_type.
21087 * class.c (make_class_data, make_field_value,
21088 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
21089 hashUtf8String, strLengthUtf8, mangled_classname:
21090 Functions to build reflective data structures.
21091 * parse.c (yyparse): Call make_class_data.
21092
21093 * jcf-io.c (open_class, find_classfile): New functions.
21094 * jcf-dump.c: Support reading classfile from explicitly-named
21095 class file (without CLASSPATH searching).
21096
21097 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
21098
21099 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
21100 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
21101 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
21102 (get_constant): Now trivial for CONSTANT_Utf8.
21103
21104 * jcf.h: Make NEW_CPOOL the default.
21105 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
21106
21107 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
21108
21109 New directory.