check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
[gcc.git] / gcc / java / ChangeLog
1 2004-09-29 Per Bothner <per@bothner.com>
2
3 * java-tree.h: Redefine some macros and add soem declaration
4 to handle the USE_MAPPED_LOCATION case.
5 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
6 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
7 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
8 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
9
10 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
11 * decl.c (finish_method, java_add_stmt): Likewise.
12 * java-gimplify.c (java-gimplify.c): Likewise.
13 * jcf-write.c (generate_bytecode_insns): Likewise.
14 * lang.c (java_post_options): Likewise - call linemap_add.
15
16 2004-09-29 Andrew Haley <aph@redhat.com>
17
18 PR java/17007
19 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
20 result of TRUNC_MOD_EXPR.
21 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
22 * decl.c (java_init_decl_processing): Mark
23 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
24
25 2004-09-28 Tom Tromey <tromey@redhat.com>
26
27 PR java/15710:
28 * class.c (add_miranda_methods): Load superinterface if not
29 already loaded.
30
31 2004-09-28 Andrew Haley <aph@redhat.com>
32
33 PR java/17586
34 * jcf-parse.c (load_class): Don't try to read a class that we've
35 already read.
36
37 2004-09-28 Andrew Haley <aph@redhat.com>
38
39 * jcf-parse.c (load_class): Back out previous broken patch.
40
41 2004-09-28 Andrew Haley <aph@redhat.com>
42
43 PR java/17586
44 * jcf-parse.c (load_class): Don't try to read a class that we've
45 already read.
46 Check that we really did read the right class.
47
48 2004-09-25 Tom Tromey <tromey@redhat.com>
49
50 PR java/17500:
51 * parse.y (create_artificial_method): Use add_method_1.
52
53 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
54
55 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
56 comment typos.
57 * gcj.texi: Fix typos.
58
59 2004-09-24 Tom Tromey <tromey@redhat.com>
60
61 PR java/15656:
62 * parse.y (class_instance_creation_expression): Set `$$' to NULL
63 in error parts of rule.
64 (unary_expression): Don't call error_if_numeric_overflow when $1
65 is NULL.
66
67 2004-09-24 Tom Tromey <tromey@redhat.com>
68
69 PR java/16789:
70 * parse.y (resolve_qualified_expression_name): Set
71 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
72 * expr.c (force_evaluation_order): Check for empty argument list
73 after stripping COMPOUND_EXPR.
74
75 2004-09-23 Andrew Haley <aph@redhat.com>
76
77 PR java/16927:
78 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
79 COND_EXPRs.
80
81 2004-09-23 Tom Tromey <tromey@redhat.com>
82
83 PR java/17329:
84 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
85 where operand is null.
86
87 2004-09-23 Tom Tromey <tromey@redhat.com>
88
89 PR java/17380:
90 * parse.y (not_accessible_p): Allow access to protected members
91 even when class is not static.
92
93 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
94
95 * Make-lang.in: Revert the gcc-none.o change.
96
97 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
98
99 * parse.y (patch_anonymous_class): VEC_space returns true if there
100 is space.
101
102 2004-09-21 Matt Austern <austern@apple.com>
103
104 Fix bootstrap.
105 * gjavah.c (free_method_name_list): Fix function definition so
106 it's a proper C prototype.
107
108 2004-09-21 Tom Tromey <tromey@redhat.com>
109
110 PR java/17575:
111 * gjavah.c (free_method_name_list): New method.
112 (main): Call it.
113
114 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
115 Zack Weinberg <zack@codesourcery.com>
116
117 * java-tree.def: Use tree_code_class enumeration constants
118 instead of code letters.
119 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
120 new tree-class enumeration constants.
121
122 2004-09-13 Tom Tromey <tromey@redhat.com>
123
124 PR java/17216:
125 * class.c (layout_class_method): Put synthetic methods into the
126 vtable.
127
128 2004-09-11 Andrew Pinski <apinski@apple.com>
129
130 * Make-lang.in (java/ggc-none.c): Change dependency
131 for ggc.h into $(GGC_H).
132
133 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
134
135 * Make-lang.in (java/win32-host.o): Add dependency on
136 coretypes.h.
137 * win32-host.c: Add includes for coretypes.h, jcf.h
138
139 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
140
141 * Make-lang.in (GCJH_OBJS): Change dependency from
142 ggc-none.o to java/ggc-none.o
143 (JCFDUMP_OBJS): Likewise.
144 (java/ggc-none.o): New target.
145
146 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
147
148 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
149 * class.c (build_utf8_ref, build_static_field_ref,
150 make_field_value, make_method_value, get_dispatch_table,
151 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
152 * constants.c (get_tag_node, build_ref_from_constant_pool,
153 build_constants_constructor): Likewise.
154 * decl.c (java_init_decl_processing): Likewise.
155 * expr.c (build_java_array_length_access, build_newarray,
156 expand_java_multianewarray, expand_java_pushc, expand_iinc,
157 build_java_binop, build_field_ref, expand_java_add_case,
158 expand_java_call, build_known_method_ref, build_invokevirtual,
159 build_invokeinterface, build_jni_stub): Likewise.
160 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
161 * jcf-parse.c (get_constant): Likewise.
162 * lex.c (do_java_lex): Likewise.
163 * parse.y (patch_binop, patch_unaryop, patch_cast,
164 build_newarray_node, patch_newarray): Likewise.
165 * resource.c (compile_resource_data): Likewise.
166 * typeck.c (build_prim_array_type): Likewise.
167
168 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
169
170 * decl.c (java_init_decl_processing): Adjust
171 initialize_sizetypes call.
172
173 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
174
175 * jv-scan.c (fancy_abort): Add.
176
177 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
178
179 * expr.c (build_java_arrayaccess): Use convert to change
180 len's type.
181
182 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
183
184 * class.c (make_local_function_alias): Allocate extra space for 'L'
185 in name buffer. Reported by Thomas Neumann.
186
187 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
188
189 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
190 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
191 * lex.c (do_java_lex): Adjust.
192 (error_if_numeric_overflow): Likewise.
193
194 2004-08-18 Andrew Pinski <apinski@apple.com>
195
196 * class.c (make_local_function_alias): Only make a new decl if we
197 support alias attribute on all decls.
198
199 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
200
201 * class.c (make_local_function_alias): New function. Create local
202 alias for public method DECL.
203 (make_method_value): Use make_local_function_alias.
204 * parse.y (craft_constructor): Don't special-case anonymous classes.
205 Always set ctor_name to init_identifier_node.
206 (lookup_method_invoke): Call layout_class_method when creating
207 anonymous class constructor.
208
209 2004-08-18 Richard Henderson <rth@redhat.com>
210
211 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
212 default case. Treat '<' similarly. Update for
213 is_gimple_formal_tmp_var name change.
214
215 2004-08-17 Andrew Haley <aph@redhat.com>
216
217 * lang.c (lang_printable_name): Obey verbose flag.
218 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
219 lang_printable_name().
220 (verify_constructor_circularity, get_printable_method_name,
221 check_abstract_method_definitions, java_check_regular_methods,
222 java_check_abstract_methods, check_inner_class_access,
223 fix_constructors, patch_method_invocation, patch_return):
224 Likewise.
225 * expr.c (pop_type_0): Likewise.
226
227 * java-tree.h (lang_printable_name_wls): Delete.
228
229 2004-08-16 Tom Tromey <tromey@redhat.com>
230
231 PR java/8473:
232 * parse.y (primary): Changed for initialized and uninitialized
233 array creations.
234 (array_access): Handle array_creation_initialized.
235 (array_creation_expression): Split into
236 array_creation_initialized and array_creation_uninitialized.
237
238 2004-08-16 Andrew Haley <aph@redhat.com>
239
240 * jcf-write.c (find_constant_index): Canonicalize NaNs when
241 generating bytecode.
242
243 2004-08-16 Elliot Lee <sopwith@redhat.com>
244
245 PR java/9677
246 * jcf-parse.c (java_parse_file): Handle filenames with embedded
247 spaces, and quoted filelists.
248
249 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
250
251 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
252 * class.c (build_utf8_ref, build_static_field_ref,
253 make_field_value, make_method_value, get_dispatch_table,
254 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
255 * constants.c (get_tag_node, build_ref_from_constant_pool,
256 build_constants_constructor): Likewise.
257 * decl.c (java_init_decl_processing): Likewise.
258 * expr.c (build_java_array_length_access, build_newarray,
259 expand_java_multianewarray, expand_java_pushc, expand_iinc,
260 build_java_binop, build_field_ref, expand_java_add_case,
261 expand_java_call, build_known_method_ref, build_invokevirtual,
262 build_invokeinterface, build_jni_stub): Likewise.
263 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
264 * jcf-parse.c (get_constant): Likewise.
265 * lex.c (do_java_lex): Likewise.
266 * parse.y (patch_binop, patch_unaryop, patch_cast,
267 build_null_of_type, patch_newarray): Likewise.
268 * resource.c (compile_resource_data): Likewise.
269 * typeck.c (build_prim_array_type): Likewise.
270
271 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
272
273 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
274 Don't create BLOCK here or call java_gimplify_block.
275
276 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
277
278 * java-tree.h (flag_deprecated): Removed.
279 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
280 * parse.y (check_deprecation): Check warn_deprecated instead of
281 flag_deprecated.
282
283 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
284
285 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
286 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
287 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
288 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
289 flag_force_classes_archive_check, flag_optimize_sci,
290 flag_indirect_dispatch): Remove explicit declarations.
291 * lang.opt: Add implicit declare/define/assign. Remove obsolete
292 final comment.
293
294 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
295
296 PR bootstrap/14893
297 * Make-lang.in (java.install-man): Install from either build
298 tree or source tree, whichever has the file first.
299
300 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
301
302 * jcf-parse.c (get_constant): Adjust force_fit_type call.
303 * lex.h (SET_LVAL_NODE_TYPE): Remove.
304 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
305 (do_java_lex): Likewise. Adjust force_fit_type call.
306
307 2004-08-04 Roger Sayle <roger@eyesopen.com>
308 Andrew Haley <aph@redhat.com>
309
310 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
311 checking trees as they're being built.
312 (convert): Call convert_ieee_real_to_integer if we're
313 converting a constant, even if we're writing a class file.
314
315 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
316
317 PR java/16701
318 * parse.y (fold_constant_for_init): Call resolve_field_access with
319 correct current_class context.
320
321 2004-08-01 Roger Sayle <roger@eyesopen.com>
322
323 * decl.c (update_aliases, initialize_local_variable): Replace calls
324 to build with calls to buildN.
325 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
326 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
327 * parse.h (BUILD_THROW): Likewise.
328 * parse.y (switch_expression, synchronized_statement,
329 catch_clause_parameter, array_creation_expression,
330 conditional_expression, make_qualified_name,
331 resolve_qualified_expression_name, patch_method_invocation,
332 patch_invoke, build_method_invocation, build_new_invocation,
333 build_assignment, patch_assignment, build_binop, patch_binop,
334 build_string_concatenation, build_incdec, patch_unaryop,
335 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
336 patch_return, build_if_else_statement, build_labeled_block,
337 build_new_loop, build_loop_body, build_bc_statement,
338 build_assertion, encapsulate_with_try_catch, build_try_statement,
339 build_try_finally_statement, patch_synchronized_statement,
340 emit_test_initialization): Likewise, replace build with buildN.
341
342 2004-07-28 Eric Christopher <echristo@redhat.com>
343
344 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
345 (java_unsafe_for_reeval): Ditto.
346
347 2004-07-26 <hp@bitrange.com>
348
349 * parse.y (build_super_invocation): Adjust declaration order to
350 avoid declaration after statement.
351
352 2004-07-25 Bernardo Innocenti <bernie@develer.com>
353
354 * decl.c: Rename all identifiers named `class' to `cl'.
355
356 2004-07-25 Richard Henderson <rth@redhat.com>
357
358 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
359
360 2004-07-23 Mike Stump <mrs@apple.com>
361
362 * boehm.c (set_bit): Improve type safety wrt unsignedness.
363 * gjavah.c (throwable_p, decode_signature_piece,
364 print_full_cxx_name, print_include, add_namelet, add_class_decl,
365 process_file): Likewise.
366 * jcf-dump.c (main): Likewise.
367 * jcf-io.c (read_zip_member): Likewise.
368 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
369 give_name_to_class, get_class_constant): Likewise.
370 * jcf-write.c (find_constant_wide, push_long_const,
371 generate_classfile): Likewise.
372 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
373 * parse.y (read_import_dir): Likewise.
374 * typeck.c (parse_signature_type): Likewise.
375 * verify.c (verify_jvm_instructions): Likewise.
376 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
377
378 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
379
380 * Make-lang.in: Replace rmic and rmiregistry references with
381 grmic and grmiregistry.
382 * gcj.texi: Likewise.
383
384 2004-07-20 Andrew Haley <aph@redhat.com>
385
386 PR java/16431.
387 * verify.c (verify_jvm_instructions): Comment change only.
388
389 * typeck.c (build_java_array_type): Add size field to array name.
390
391 * java-tree.h (LOCAL_SLOT_P): New.
392 (update_aliases): Add PC argument.
393 (pushdecl_function_level): New function.
394
395 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
396 MODIFY_EXPR, and SAVE_EXPR.
397 (java_gimplify_modify_expr): New function.
398
399 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
400 (expand_iinc): Pass PC to update_aliases().
401 (STORE_INTERNAL): Likewise.
402 (process_jvm_instruction): Likewise.
403
404 * decl.c (base_decl_map): New variable.
405 (uniq): New variable.
406 (update_aliases): Rewrite with more thorough checking.
407 (debug_variable_p): New function.
408 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
409 (check_local_named_variable): Delete whole function.
410 (initialize_local_variable): New function.
411 (check_local_unnamed_variable): Add checks and comments.
412 (find_local_variable): Rewrite.
413 (java_replace_reference): New function.
414 (function_binding_level): New variable.
415 (pushdecl_function_level): New function.
416 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
417 (maybe_pushlevels): Call pushdecl() on each of the new decls.
418 (start_java_method): Reset uniq. Create base_decl_map. Set
419 function_binding_level.
420 (end_java_method): Null unused fields to save memory.
421
422 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
423
424 * class.c (add_interface_do): Remove.
425 (set_super_info, interface_of_p, maybe_add_interface,
426 add_interface, make_class_data, layout_class,
427 add_miranda_methods): Adjust BINFO accessors and addition.
428 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
429 accessors.
430 * jcf-write.c (generate_classfile): Likewise.
431 * parse.y (patch_anonymous_class, check_inner_circular_reference,
432 check_circular_reference, java_complete_class,
433 check_abstract_method_definitions,
434 java_check_abstract_method_definitions,
435 check_interface_throws_clauses, java_check_abstract_methods,
436 lookup_java_interface_method2,
437 find_applicable_accessible_methods_list): Adjust BINFO accessors
438 and addition.
439 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
440
441 2004-07-18 Roger Sayle <roger@eyesopen.com>
442
443 * builtins.c (max_builtin, min_builtin,
444 java_build_function_call_expr): Replace calls to build with buildN.
445 * class.c (build_class_ref, build_static_field_ref,
446 get_dispatch_table, make_class_data, layout_class_method): Likewise.
447 * constants.c (build_ref_from_constant_pool): Likewise.
448 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
449 add_stmt_to_compound): Likewise.
450 * except.c (build_exception_object_ref, expand_end_java_handler):
451 Likewise.
452 * java-gimplify.c (java_gimplify_case_expr,
453 java_gimplify_default_expr, java_gimplify_block,
454 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
455 * jcf-write.c (generate_bytecode_insns): Likewise.
456 * typeck.c (convert_ieee_real_to_integer): Likewise.
457
458 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
459
460 * java-tree.h (builtin_function): Declare.
461
462 2004-07-16 Steven Bosscher <stevenb@suse.de>
463
464 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
465 abuse restore_line_number_status.
466
467 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
468
469 g++/15861
470 * jcf-parse.c (java_emit_static_constructor): Specify default
471 priority.
472
473 2004-07-13 Per Bothner <per@bothner.com>
474
475 * java-tree.h (all_class_filename): Remove useless macro.
476 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
477 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
478 * parse.y (java_parser_context_restore_global): Replace
479 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
480 * jcf-parse.c (read_class, java_parse_file): Likewise.
481
482 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
483
484 PR java/16474
485 gjavah.c (print_field_info): Emit constant only if field is static.
486
487 2004-07-11 Roger Sayle <roger@eyesopen.com>
488
489 * expr.c (java_truthvalue_conversion, flush_quick_stack,
490 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
491 build_java_ret, build_java_throw_out_of_bounds_exception,
492 build_java_array_length_access, java_check_reference,
493 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
494 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
495 expand_java_arrayload, build_java_monitor, expand_java_return,
496 expand_load_internal, expand_java_NEW, build_get_class,
497 build_instanceof, expand_java_CHECKCAST, expand_iinc,
498 build_java_soft_divmod, build_java_binop, build_field_ref,
499 expand_compare, expand_java_goto, expand_java_switch,
500 expand_java_add_case, build_class_init, build_known_method_ref,
501 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
502 expand_invoke, build_jni_stub, expand_java_field_op,
503 java_expand_expr, expand_byte_code, STORE_INTERNAL,
504 force_evaluation_order, emit_init_test_initialization): Convert
505 calls to "build" into calls to the prefered "buildN" functions.
506
507 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
508
509 * java-tree.h (set_block): Remove.
510 * lang.c (java_clear_binding_stack): New.
511 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
512 * decl.c (struct binding_level): Remove this_block.
513 (clear_binding_level): Likewise.
514 (poplevel): Don't handle this_block.
515 (set_block): Remove.
516
517 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
518
519 * class.c (common_enclosing_context_p): Remove statement with no
520 side-effects.
521
522 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
523
524 PR java/8618
525 * parse.y (create_anonymous_class): Remove 'location' argument. Use
526 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
527 (craft_constructor): Inherit access flags for implicit constructor
528 from the enclosing class.
529 (create_class): Fix comment typo.
530 (resolve_qualified_expression_name): Pass type of qualifier to
531 not_accessible_p, not the type in which target field was found.
532 (not_accessible_p): Handle inner classes. Expand protected
533 qualifier-subtype check to enclosing instances, but don't apply this
534 check to static members. Allow protected access to inner classes
535 of a subtype. Allow private access within common enclosing context.
536 (build_super_invocation): Get WFL line number info from current
537 class decl.
538 (build_incomplete_class_ref): Update for new create_anonymous_class
539 signature.
540 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
541 common_enclosing_instance_p.
542 * class.c (common_enclosing_context_p): New. Determine if types
543 share a common enclosing context, even across static contexts.
544 (common_enclosing_instance_p): Renamed from
545 common_enclosing_context_p. Determines if types share a common
546 non-static enclosing instance.
547 * java-tree.h (common_enclosing_instance_p): Declare.
548 * jcf-write.c (get_method_access_flags): New. Surpress private flag
549 for inner class constructors.
550 (generate_classfile): Use get_method_access_flags.
551
552 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
553
554 * class.c (interface_of_p): Check for null TYPE_BINFO.
555
556 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
557
558 * class.c (make_class): Do not create binfo here.
559 (set_super_info): Create it here.
560 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
561
562 2004-07-08 Richard Henderson <rth@redhat.com>
563
564 * expr.c (case_identity, get_primitive_array_vtable,
565 java_expand_expr, emit_init_test_initialization): Remove.
566 * java-tree.h (java_expand_expr): Remove.
567 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
568
569 2004-07-07 Per Bothner <per@bothner.com>
570
571 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
572 get internal error due to mismatched types.
573
574 * gcj.texi (Invoking gij): Document new -verbose:class flag.
575
576 * gcj.texi (Linking): New node. Document -lgij usage.
577
578 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
579
580 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
581 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
582 * java/class.c (set_super_info, class_depth, interface_of_p,
583 maybe_add_interface, add_interface, make_class_data,
584 layout_class, add_miranda_methods): Adjust BINFO macros.
585 * expr.c (can_widen_reference_to, lookup_field): Likewise.
586 * jcf-write.c (generate_classfile): Likewise.
587 * parse.y (patch_anonymous_class,
588 check_inner_circular_reference, check_circular_reference,
589 java_complete_class, check_abstract_method_definitions,
590 java_check_abstract_method_definitions,
591 check_interface_throws_clauses, java_check_abstract_methods,
592 lookup_java_interface_method2,
593 find_applicable_accessible_methods_list): Likewise.
594 * typeck.c (find_method_in_interface): Likewise.
595 * verify.c (merge_types): Likewise.
596
597 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
598
599 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
600 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
601
602 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
603
604 * class.c (make_class): Use make_tree_binfo.
605 (set_super_info, add_interface_do): Likewise.
606 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
607
608 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
609
610 * verify.c: Correct array element access formatting thinko.
611
612 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
613
614 * verify.c: Insert a short blurb at the start referring to the JVMS.
615 (merge_type_state): Remove redundant nested if statement.
616 (verify_jvm_instructions): Ensure current_subr is initialised to
617 NULL_TREE.
618 Minor formatting fixes all over the place.
619
620 2004-07-02 Richard Henderson <rth@redhat.com>
621
622 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
623
624 2004-07-01 Richard Henderson <rth@redhat.com>
625
626 * class.c (registerClass_libfunc): Remove.
627 (init_class_processing): Don't set it.
628 (emit_register_classes): Take list_p parameter. Fill it in
629 with _Jv_RegisterClass calls.
630 * decl.c (java_init_decl_processing): Don't call
631 init_resource_processing.
632 * jcf-parse.c (java_emit_static_constructor): New.
633 (java_parse_file): Call it.
634 * resource.c (registerResource_libfunc): Remove.
635 (init_resource_processing): Remove.
636 (write_resource_constructor): Take list_p parameter. Fill it in
637 with _Jv_RegisterResource calls.
638 * java-tree.h: Update prototypes.
639
640 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
641
642 PR java/1262
643 * class.c (layout_class_method): Do not override package-private
644 method if its in a different package.
645 (split_qualified_name): Move here from parse.y. Rename from
646 breakdown_qualified. Add comment.
647 (in_same_package): Move here from parse.y. Add comment.
648 * java-tree.h (break_down_qualified, in_same_package): Declare.
649 (in_same_package): Likewise.
650 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
651 Callers updated.
652
653 2004-06-29 Andrew Haley <aph@redhat.com>
654
655 * except.c (expand_start_java_handler): Push a new binding level.
656 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
657 register_exception_range() to register where we'll do it.
658 (expand_end_java_handler): Remove old bogus code. Replace with
659 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
660 the top of the expression we're curently building.
661 (maybe_end_try): Delete.
662 * decl.c (binding_level.exception_range): New field.
663 (clear_binding_level): Add field exception_range. Reformat.
664 (poplevel): Call expand_end_java_handler().
665 (poplevel): Call java_add_stmt only if functionbody is false.
666 (maybe_poplevels): Don't call maybe_end_try() from here.
667 (end_java_method): Clear no longer used trees in function decl.
668 (register_exception_range): New function.
669 * java-tree.h (register_exception_range, struct eh_range): Declare.
670
671 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
672
673 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
674
675 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
676
677 Formatting fixes.
678 * expr.c (class_has_finalize_method): Fix method name indentation.
679 (expand_java_call): Remove K&R style parameter declaration.
680 (expand_invoke): Fix statement indentation.
681 (expand_java_field_op): Likewise.
682 * parse-scan.y: Fix typo.
683 (reset_report): Fix method name indentation.
684 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
685 line. Fix typos.
686 * verify.c (verify_jvm_instructions): Document parameters, insert
687 page break.
688 * lang.c (lang_init_source): Fix method name indentation.
689 * class.c (common_enclosing_context_p): Likewise.
690 (emit_symbol_table): Fix parameter list indentation.
691 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
692 parameter declaration.
693 * constants.c: Fix copyright notice indentation.
694 * typeck.c (find_method_in_superclasses): Fix parameter list
695 indentation.
696 (find_method_in_interfaces): Likewise.
697 * zextract.c (makelong): Fix method name indentation.
698
699 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
700
701 PR java/15715.
702 * parse.y (create_interface): Set correct access modifiers for
703 interfaces.
704 * jcf-write.c (get_classfile_modifiers): New function.
705 (generate_classfile): Use get_classfile_modifiers, not
706 get_access_flags.
707
708 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
709
710 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
711 dependency to current parser context, not NULL_TREE, for top-level
712 classes.
713 (jdep_resolve_class): Enable member access check for all inner
714 class dependencies.
715
716 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
717
718 * parse.y (qualify_and_find): Pass type decl, not identifier, to
719 load_class.
720
721 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
722
723 PR java/15734
724 * expr.c (expand_java_field_op): Ensure that target class for static
725 field access has been loaded.
726
727 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
728 Ranjit Mathew <rmathew@hotmail.com>
729
730 PR java/1207, java/16178
731 * jcf-parse.c (load_class): Return immediately if passed a type decl
732 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
733 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
734 before calling load_class.
735 (qualify_and_find): Likewise.
736 (find_in_imports_on_demand): Likewise.
737 (find_applicable_accessible_methods_list): Likewise.
738
739 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
740
741 * parse.y (java_layout_seen_class_methods): Don't call load_class
742 on class defined by source parser.
743
744 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
745
746 * parse.y (set_nested_class_simple_name_value): Removed.
747 (java_complete_expand_class): Remove calls to
748 set_nested_class_simple_name_value.
749
750 2004-06-22 Andrew Haley <aph@redhat.com>
751 Ranjit Mathew <rmathew@hotmail.com>
752
753 Fixes PR java/16113.
754 * decl.c (force_poplevels): Remove call to expand_end_bindings.
755
756 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
757
758 * parse.y (create_class): Correct diagnostic message about
759 java.lang.Object extending anything else.
760
761 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
762
763 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
764 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
765 * constants.c (build_ref_from_constant_pool): Likewise.
766 * expr.c (build_java_array_length_access): Likewise.
767 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
768 (invoke_build_dtable, build_invokevirtual): Likewise.
769 (build_invokeinterface, java_expand_expr): Likewise.
770 (emit_init_test_initialization): Likewise.
771 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
772 * parse.y (make_qualifed_name, build_array_ref): Likewise.
773
774 2004-06-21 Andrew Haley <aph@redhat.com>
775
776 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
777 block.
778
779 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
780
781 * jcf.h (struct JCF): Change java_source, right_zip and finished
782 to unsigned int.
783 * lex.h (struct java_lexer): Change hit_eof, read_anything,
784 byte_swap and use_fallback to unsigned int.
785 * parse.h (struct _jdep): Change flag0 to unsigned int.
786
787 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
788
789 Fixes PR java/13948
790 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
791 before trying to lay out its methods.
792 * jcf-parse.c (read_class): Track parsed files using canonical paths
793 obtained via lrealpath from libiberty.
794 (java_parse_file): Likewise.
795 (parse_source_file_1): Rename formal parameter to reflect its
796 modified purpose. Minor formatting fix.
797
798 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
799
800 * class.c (emit_register_classes): Make the function uninlinable,
801 do not set current_function_cannot_inline.
802 * resource.c (write_resource_constructor): Do not reset
803 flag_inline_functions around rest_of_compilation.
804
805 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
806
807 PR java/15769
808 * expr.c (java_truthvalue_conversion): Handle
809 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
810 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
811 i.e. return the expression.
812
813 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
814
815 * gjavah.c: Include version.h
816
817 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
818
819 * jcf-write.c (generate_bytecode_conditional): Correct handling
820 of unordered conditionals. Add comment.
821
822 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
823 Per Bothner <per@bothner.com>
824
825 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
826 local variable was initialised upon declaration.
827 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
828 variable was final and initialised upon declaration.
829 * check-init.c (check_final_reassigned): Give error only if a blank
830 final is not definitely unassigned or if an initialised final is
831 reassigned.
832 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
833 assignment expressions. Remove case MODIFY_EXPR, label do_default.
834 (check_init): Perform initialised-variable-removing-optimisation
835 only on non-final local variables.
836
837 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
838
839 * jcf-write.c (generate_bytecode_conditional): Handle binops
840 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
841 and LTGT_EXPR.
842 (generate_bytecode_insns): Likewise.
843
844 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
845
846 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
847 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
848
849 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
850
851 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
852 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
853
854 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
855
856 * decl.c (struct binding_level): Add GTY marker. Compile
857 binding_depth unconditionally.
858 (current_binding_level, free_binding_level, global_binding_level):
859 Likewise.
860 (clear_binding_level): Unconditionally set binding_depth.
861 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
862
863 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
864
865 * lex.c (java_new_lexer): Set 'encoding'.
866 (java_read_char): Improve error message for unrecognized characters.
867 * lex.h (struct java_lexer): New field 'encoding'.
868
869 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
870
871 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
872
873 2004-05-21 Mark Wielaard <mark@klomp.org>
874
875 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
876 extern.
877
878 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
879
880 * typeck.c: Remove non-printable character 160.
881
882 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
883
884 * check-init.c: Correct minor typos.
885
886 2004-05-13 Diego Novillo <dnovillo@redhat.com>
887
888 * Make-lang.in, expr.c, java-gimplify.c: Rename
889 tree-simple.[ch] to tree-gimple.[ch].
890
891 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
892
893 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
894
895 2004-05-13 Diego Novillo <dnovillo@redhat.com>
896
897 Merge from tree-ssa-20020619-branch. See
898 ChangeLog.tree-ssa for details.
899
900 * Make-lang.in, builtins.c, check-init.c, class.c,
901 constants.c, decl.c, except.c, expr.c, java-except.h,
902 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
903 lang.c, lang.opt, parse.y, resource.c: Merged.
904 * java-gimplify.c: New file.
905
906 2004-05-10 Andrew Haley <aph@redhat.com>
907
908 * parse.y (create_class): Set TYPE_VFIELD.
909 * decl.c (java_init_decl_processing): Likewise.
910
911 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
912 * class.c (make_method_value): Replace DECL_VINDEX with call to
913 get_method_index().
914 (get_dispatch_vector): Likewise.
915 (layout_class_method): Likewise.
916 Replace set of DECL_VINDEX with call to set_method_index().
917 (set_method_index): New function.
918 (get_method_index): New function.
919 * java-tree.h (set_method_index): New function decl.
920 (get_method_index): New function decl.
921
922 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
923
924 * parse.y (check_pkg_class_access): Add new argument
925 and use it when cl is NULL to call lookup_cl on it.
926 (parser_check_super_interface): Do not call lookup_cl.
927 Pass this_decl to check_pkg_class_access and NULL
928 instead of lookup_cl.
929 (parser_check_super): Update for change in
930 check_pkg_class_access.
931 (do_resolve_class): Likewise.
932 (process_imports): Likewise.
933 (find_in_imports_on_demand): Likewise.
934 (resolve_qualified_expression_name): Likewise.
935
936 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
937
938 Fixes PR java/9685, PR java/15073
939 * parse.y (accessibility_string): New method.
940 (not_accessible_field_error): Use accessibility_string()
941 instead of java_accstring_lookup().
942 (resolve_qualified_expression_name): Check with
943 check_pkg_class_access() before allowing access using
944 qualified names.
945 Fix comment typo.
946 Use check_pkg_class_access() instead of not_accessible_p()
947 for unqualified types.
948 (not_accessible_p): Use DECL_CONTEXT (member) instead of
949 REFERENCE for package-private access checking.
950 (patch_method_invocation): Use accessibility_string() instead
951 of java_accstring_lookup().
952
953 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
954
955 Fixes PR java/15133
956 * gjavah.c (struct method_name): Add member is_native.
957 (overloaded_jni_method_exists_p): Match candidate method only if
958 it is native.
959 (print_method_info): Initialise is_native flag from the method's
960 access flags.
961
962 2004-04-30 Roger Sayle <roger@eyesopen.com>
963
964 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
965 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
966
967 2004-04-22 Roger Sayle <roger@eyesopen.com>
968
969 * resource.c (write_resource_constructor): Guard call to possibly
970 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
971
972 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
973
974 * class.c (make_class_data): Add new field aux_info.
975 * decl.c (java_init_decl_processing): Push type and decl for
976 `aux_info'.
977
978 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
979
980 * expr.c (expand_java_NEW): Don't use size argument for
981 _Jv_AllocObject calls.
982 * parse.y (patch_invoke): Likewise.
983
984 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
985
986 * expr.c (build_invokeinterface): Remove unused variables to
987 fix warnings.
988
989 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
990
991 * class.c (get_interface_method_index): New function. Return dispatch
992 index for interface method.
993 (make_method_value): For interface methods, set index field to
994 iface dispatch index, not DECL_VINDEX.
995 * expr.c (build_invokeinterface): Use get_interface_method_index.
996
997 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
998
999 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
1000
1001 2004-03-31 Andrew Haley <aph@redhat.com>
1002
1003 PR java/14104
1004 * jcf-io.c (opendir_in_zip): Tidy up error handling.
1005
1006 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1007
1008 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
1009 form of GTY markers.
1010
1011 2004-03-25 Marcus Meissner <meissner@suse.de>
1012
1013 PR java/14689:
1014 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
1015
1016 2004-03-23 Tom Tromey <tromey@redhat.com>
1017
1018 PR java/14315:
1019 * jcf-write.c (make_class_file_name): Don't report if mkdir
1020 failed with EEXIST.
1021
1022 2004-03-23 Tom Tromey <tromey@redhat.com>
1023
1024 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
1025
1026 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
1027
1028 * class.c, gjavah.c, lang.c: Fix comment typos.
1029 * gcj.texi: Fix typos.
1030
1031 2004-03-19 Per Bothner <per@bothner.com>
1032
1033 * gcj.texi (Code Generation): Document new flags and assert defaults.
1034
1035 * class.c (assume_compiled_node_struct): Rename type to
1036 class_flag_node_struct, as it is now also used for enable_assertions.
1037 Rename assume_compiled_node typedef. Rename excludep field to value.
1038 (find_assume_compiled_node): Rename function to find_class_flag_node.
1039 Minor optimization - avoid needless strlen.
1040 (add_assume_compiled): Some tweaking and optimization.
1041 Rename and generalize to add_class_flag takem an extra parameter.
1042 (add_assume_compled): New just calls add_class_flag.
1043 (add_enable_assert, enable_assertions): New functions.
1044 (enable_assert_tree): New static.
1045 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
1046 * lang.opt (fenable-assertions, fenable-assertions=,
1047 fdisable-assertions, fdisable-assertions=): New options.
1048 * lang.c (java_handle_option): Handle new options.
1049 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
1050 class in an interface - create helper class nested in outer interface.
1051 (build_assertion): Short-circuit if enable_assertions is false.
1052
1053 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1054
1055 * java-tree.h: Changes throughout to add checking to macros
1056 and numerous whitespace changes.
1057 (VAR_OR_FIELD_CHECK): New macro.
1058 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
1059 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
1060
1061 2004-03-16 Per Bothner <per@bothner.com>
1062
1063 * jcf-jump.c (options): New --print-constants option.
1064 * gcj.texi (Invoking jcf-dump): Document --print-constants.
1065
1066 * jcf-dump.c (flag_print_constant_pool): Default to off.
1067 (print_constant_terse_with_index): New helper function.
1068 (various places): Check flag_print_constant_pool where missing.
1069 (main): If verbose set flag_print_constant_pool.
1070 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
1071
1072 2004-03-15 Andrew Haley <aph@redhat.com>
1073
1074 PR java/14581
1075 * parse.y (java_complete_lhs): Check that final variable has an
1076 initializer.
1077
1078 2004-03-12 Andrew Haley <aph@redhat.com>
1079
1080 PR java/14551
1081 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
1082 conversion.
1083
1084 2004-02-29 Roger Sayle <roger@eyesopen.com>
1085
1086 * jcf-parse.c (java_parse_file): Handle the case that input_filename
1087 is NULL.
1088
1089 2004-02-27 Per Bothner <per@bothner.com>
1090
1091 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
1092 suggestion: Use build_incomplete_class_ref.
1093 This fixes PR java/13508, java/11714.
1094
1095 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
1096
1097 * java/parse.h: Update copyright.
1098
1099 2004-02-26 Andrew Haley <aph@redhat.com>
1100
1101 PR java/14231:
1102 * parse.y (check_interface_throws_clauses): Check for
1103 !METHOD_INVISIBLE (iface_method).
1104 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
1105 well as CLASS_ABSTRACT.
1106
1107 2004-02-25 Per Bothner <per@bothner.com>
1108
1109 * parse.y (build_assertion): If we're in an inner class, create the
1110 class$ helper routine in the outer class.
1111
1112 2004-02-19 Richard Henderson <rth@redhat.com>
1113
1114 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
1115
1116 2004-02-16 Geoffrey Keating <geoffk@apple.com>
1117
1118 * Make-lang.in (java.install-man): Add extra dependencies.
1119
1120 2004-02-13 Geoffrey Keating <geoffk@apple.com>
1121
1122 * Make-lang.in: Install man pages under the same names
1123 (possibly transformed) as the program they document.
1124
1125 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
1126
1127 * gjavah.c: Include "intl.h".
1128 (error): New function.
1129 (main): Call gcc_init_libintl.
1130 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
1131 print_stub_or_jni, process_file, main): Use error rather than
1132 fprintf.
1133 (print_method_info, usage, help, version, main): Mark strings for
1134 translation with _. Avoid splitting up sentences. Send
1135 information messages to stdout.
1136 * jcf-dump.c: Include "intl.h".
1137 (main): Call gcc_init_libintl.
1138 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
1139 Mark error, usage and version messages for translation with _.
1140 Avoid splitting up sentences.
1141 * jv-scan.c: Include "intl.h".
1142 (fatal_error, warning): Change parameter s to msgid. Translate
1143 messages.
1144 (main): Call gcc_init_libintl.
1145 (usage, help, version): Mark error, usage and version messages for
1146 translation with _. Avoid splitting up sentences.
1147 * jvgenmain.c: Include "intl.h".
1148 (main): Call gcc_init_libintl.
1149 (usage, main): Mark error messages for translation with _.
1150 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
1151 JVGENMAIN_OBJS): Add intl.o.
1152 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
1153 java/jvgenmain.o): Update dependencies.
1154
1155 2004-02-08 Per Bothner <per@bothner.com>
1156
1157 * parse.y (resolve_qualified_expression_name): In case of inaccessible
1158 class don't use not_accessible_field_error, which can get confused.
1159
1160 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
1161
1162 Make-lang.in (po-generated): Delete.
1163
1164 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
1165
1166 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
1167 Depend on target.h.
1168 * decl.c: Include target.h.
1169 (start_java_method): Replace PROMOTE_PROTOTYPES with
1170 targetm.calls.promote_prototypes.
1171 * expr.c: Include target.h.
1172 (pop_arguments): Replace PROMOTE_PROTOTYPES with
1173 targetm.calls.promote_prototypes.
1174 * parse.y: Include target.h.
1175 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
1176 with targetm.calls.promote_prototypes.
1177
1178 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
1179
1180 * typeck.c: Update copyright.
1181
1182 2004-02-02 Tom Tromey <tromey@redhat.com>
1183
1184 * decl.c (java_init_decl_processing): Remove duplicate
1185 gnu/gcj/RawData.
1186
1187 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
1188
1189 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
1190
1191 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
1192
1193 * expr.c (build_field_ref): Move variable
1194 definition up.
1195
1196 2004-01-28 Andrew Haley <aph@redhat.com>
1197
1198 * expr.c (build_field_ref): Widen field offset.
1199
1200 2004-01-27 Andrew Haley <aph@redhat.com>
1201
1202 java/13273
1203 * parse.y (check_interface_throws_clauses): Make sure class_decl
1204 has been loaded.
1205
1206 2004-01-22 Jeff Sturm <jsturm@one-point.com>
1207
1208 PR java/13733
1209 * parse.y (patch_assignment): Don't modify lhs_type for
1210 reference assignments.
1211
1212 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
1213
1214 * Make-lang.in: Replace $(docdir) with doc.
1215 (java.info, java.srcinfo, java.man, java.srcman): New rules.
1216 (java.install-man): Revamp rule.
1217
1218 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
1219
1220 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
1221 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
1222 instead of deferred backquote.
1223
1224 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
1225
1226 * typeck.c (find_method_in_interfaces): Move variable
1227 definition up.
1228
1229 2004-01-16 Andrew Haley <aph@redhat.com>
1230
1231 PR java/13273:
1232 * typeck.c (shallow_find_method): New.
1233 (find_method_in_superclasses): New.
1234 (find_method_in_interfaces): New.
1235 (lookup_do): Rewrite.
1236 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
1237
1238 * jcf-parse.c (read_class): Save and restore output_class.
1239 * decl.c (java_expand_body): Set output_class from fndecl.
1240
1241 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
1242
1243 * class.c (gen_indirect_dispatch_tables): Fix string length
1244 calculations.
1245
1246 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
1247
1248 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
1249 (java.srcextra): Copy above back to source directory if requested.
1250 (po-generated): Delete reference to $(parsedir).
1251 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
1252 Use implicit rule.
1253
1254 2004-01-14 Jan Hubicka <jh@suse.cz>
1255
1256 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
1257 estimation.
1258
1259 2004-01-09 Mark Mitchell <mark@codesourcery.com>
1260
1261 * java-tree.h (java_expand_expr): Change prototype.
1262 * expr.c (java_expand_expr): Add alt_rtl parameter.
1263
1264 2004-01-09 Andrew Haley <aph@redhat.com>
1265
1266 PR java/12755:
1267 * parse.y (java_fix_constructors): Set output_class.
1268 (java_reorder_fields): Likewise.
1269 (java_layout_classes): Likewise.
1270 (java_expand_classes): Generate indirect dispatch tables.
1271 (java_expand_classes): Set output_class.
1272 (java_finish_classes): Likewise.
1273 * lang.c (java_init): Turn on always_initialize_class_p if we're
1274 using indirect dis[atch.
1275 (java_decl_ok_for_sibcall): Use output_class, not current_class.
1276 (java_get_callee_fndecl): Use class local atable.
1277 * jcf-parse.c
1278 (always_initialize_class_p): Decl moved to java-tree.h.
1279 (HANDLE_CLASS_INFO): Set output_class.
1280 (read_class): Likewise.
1281 (parse_class_file): Call gen_indirect_dispatch_tables.
1282 (parse_zip_file_entries): Set output_class.
1283 (java_parse_file): Set output_class. Don't emit symbol tables.
1284 * java-tree.h (output_class): New.
1285 Remove global declarations for otable, atable, and ctable.
1286 (always_initialize_class_p): moved here from decl.c.
1287 (DECL_OWNER): New.
1288 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
1289 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
1290 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
1291 (struct lang_type): Add otable_methods, otable_decl,
1292 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
1293 ctable_decl, catch_classes, type_to_runtime_map.
1294 * expr.c (build_field_ref): Make otable, atable, and ctable class
1295 local rather than global.
1296 (build_known_method_ref): Likewise.
1297 (build_invokeinterface): Likewise.
1298 (java_expand_expr): Pass runtime type (rather than actual type) to
1299 expand_start_catch.
1300 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
1301 this class. Look up each class in that map to delete duplicates.
1302 (expand_end_java_handler): Pass runtime type (rather than actual
1303 type) to expand_start_catch.
1304 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
1305 (do_nothing): New.
1306 (java_init_decl_processing): Rearrange things. Remove global
1307 declarations of otable, atable, and ctable.
1308 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
1309 (java_expand_body): Set output_class.
1310 * constants.c (build_constant_data_ref): Use output_class, not
1311 current_class.
1312 (alloc_name_constant): Likewise.
1313 * class.c (gen_indirect_dispatch_tables): New.
1314 (build_class_ref): Generate hard reference to superclass, even if
1315 using indirect dispatch.
1316 (build_static_field_ref): Use class local atable.
1317 (make_class_data): Generate hard reference to superclass, even if
1318 using indirect dispatch.
1319 Generate symbolic references to interfaces when using indirect
1320 dispatch.
1321 (make_class_data): Emit otable, atable, and ctable.
1322 Make otable, atable, and ctable class local rather than global.
1323 (emit_catch_table): Make otable, atable, and ctable class local
1324 rather than global.
1325
1326 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
1327
1328 * parse.y (catch_clause_parameter): Fix typo.
1329
1330 PR java/13404
1331 * parse.y: (catch_clause_parameter): Return early if $3, aka
1332 formal_parameter, is null.
1333
1334 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
1335
1336 * class.c: Remove uses of "register" specifier in
1337 declarations of arguments and local variables.
1338 * decl.c: Likewise.
1339 * expr.c: Likewise.
1340 * gjavah.c: Likewise.
1341 * jcf-dump.c: Likewise.
1342 * jcf-io.c: Likewise.
1343 * jcf-parse.c: Likewise.
1344 * jcf-write.c: Likewise.
1345 * keyword.h: Likewise.
1346 * parse.y: Likewise.
1347 * typeck.c: Likewise.
1348 * verify.c: Likewise.
1349
1350 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
1351
1352 * Make-lang.in (GCJ_CROSS_NAME): Delete.
1353 (java.install_common, java.install-man): Adjust for above.
1354 (java.uninstall): Likewise.
1355
1356 2003-12-03 Michael Koch <konqueror@gmx.de>
1357
1358 * class.c (make_class_data):
1359 Push field value to 'hack_signers' instead of 'signers'.
1360 * decl.c (java_init_decl_processing):
1361 Push field 'hack_signers' instead of 'signers'.
1362
1363 2003-12-03 Zack Weinberg <zack@codesourcery.com>
1364
1365 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
1366 including iconv.h.
1367
1368 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
1369
1370 PR java/12374:
1371 * parse.y (qualify_ambiguous_name): Remove lots of broken
1372 field access processing - there's no need to do that here,
1373 because we have resolve_field_access. Remove
1374 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
1375 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
1376 used.
1377
1378 2003-12-01 Jeff Sturm <jsturm@one-point.com>
1379
1380 Fix PR java/13237
1381 * parse.y (java_complete_lhs): Save location prior to patching
1382 CALL_EXPR.
1383
1384 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
1385
1386 PR java/12548
1387 * resource.c (write_resource_constructor): Append
1388 "_resource" to constructor identifier name.
1389
1390 2003-11-25 Jeff Sturm <jsturm@one-point.com>
1391
1392 Fix PR java/13183.
1393 * constants.c (cpool_for_class): New function.
1394 (outgoing_cpool): Remove global variable.
1395 (alloc_name_constant): Use cpool_for_class.
1396 (build_constants_constructor): Likewise.
1397 * decl.c (java_expand_body): Set current_class.
1398 * java-tree.h (outgoing_cpool) Remove declaration.
1399 (init_outgoing_cpool): Likewise.
1400 * jcf-parse.c (init_outgoing_cpool): Remove function.
1401 (parse_class_file): Don't call init_outgoing_cpool.
1402 * parse.y (java_complete_expand_methods): Don't call
1403 init_outgoing_cpool. Don't save outgoing_cpool.
1404 (java_expand_classes): Don't restore outgoing_cpool.
1405 (java_finish_classes): Likewise.
1406
1407 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
1408
1409 * Make-lang.in: (java.install-common) Add
1410 symlink for $(target_noncanonical)-gcjh for
1411 native builds.
1412
1413 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
1414
1415 * Make-lang.in (java.extraclean): Delete.
1416
1417 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
1418
1419 * Make-lang.in (check-java): Add.
1420
1421 2003-11-19 Jeff Sturm <jsturm@one-point.com>
1422
1423 Fix PR java/13024.
1424 * except.c (prepare_eh_table_type): Allocate variable-sized
1425 buffer `buf' with alloca.
1426
1427 2003-11-17 Jeff Sturm <jsturm@one-point.com>
1428
1429 Fix PR java/12857.
1430
1431 decl.c (java_init_decl_processing): Don't initialize
1432 class_not_found_type_node, no_class_def_found_type_node.
1433
1434 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
1435 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
1436 (class_not_found_type_node, no_class_def_found_type_node):
1437 Don't define.
1438
1439 parse.y (build_dot_class_method_invocation): Add this_class
1440 argument. Qualify method invocations to a different class.
1441 (create_new_parser_context): Initialize saved_data_ctx to 0.
1442 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
1443 (build_dot_class_method): Don't load classes. Register
1444 incomplete types.
1445 (build_incomplete_class_ref): Special cases for interfaces
1446 and inner classes. Move build_dot_class_method call to here...
1447 (patch_incomplete_class_ref): ...from here. Pass current_class
1448 to build_dot_class_method_invocation.
1449 (build_assertion): Pass class_type to
1450 build_dot_class_method_invocation.
1451 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
1452
1453 2003-11-17 Jeff Sturm <jsturm@one-point.com>
1454
1455 Fix PR java/12739.
1456 * java-tree.h (BLOCK_EMPTY_P): Define.
1457 * parse.y (java_complete_lhs): Check for empty blocks
1458 in TRY_FINALLY_EXPR case.
1459
1460 2003-11-17 Andrew Haley <aph@redhat.com>
1461
1462 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
1463 (struct lang_decl_var:freed): New variable.
1464 * decl.c (poplevel): Mark local vars that have gone out of scope.
1465 (push_jvm_slot): Don't use the RTL of a var that has gone out of
1466 scope.
1467
1468 2003-11-16 Jason Merrill <jason@redhat.com>
1469
1470 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
1471 and TAGS files that include them for each front end.
1472
1473 2003-11-15 Tom Tromey <tromey@redhat.com>
1474
1475 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
1476
1477 2003-11-12 Jason Merrill <jason@redhat.com>
1478
1479 PR optimization/12547
1480 * lang.c (java_tree_inlining_walk_subtrees): Just walk
1481 BLOCK_EXPR_BODY directly.
1482
1483 2003-11-12 Andrew Haley <aph@redhat.com>
1484
1485 PR java/11045
1486 * parse.y (fold_constant_for_init): Check that we really do have a
1487 constant.
1488
1489 PR java/11533
1490 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
1491 init_test_decls being inlined.
1492
1493 PR java/12890:
1494 * parse.y (do_resolve_class): Check return value from
1495 breakdown_qualified().
1496
1497 2003-11-11 Tom Tromey <tromey@redhat.com>
1498
1499 PR java/12915:
1500 * parse.y (merge_string_cste): Handle case where we have a
1501 pointer that happens to be zero, not null_pointer_node.
1502
1503 2003-11-10 Tom Tromey <tromey@redhat.com>
1504
1505 * jcf-parse.c (classify_zip_file): Correctly compare
1506 filename_length against length of manifest file's name.
1507
1508 2003-11-08 Tom Tromey <tromey@redhat.com>
1509
1510 PR java/12894:
1511 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
1512
1513 2003-11-06 Andrew Haley <aph@redhat.com>
1514
1515 * expr.c (java_stack_swap): Make sure destination stack slots are
1516 of the correct type.
1517
1518 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
1519
1520 * Make-lang.in (dvi): Move targets to $(docobjdir).
1521 (gcj.dvi): Simplify rule and adjust target.
1522 (gcj.info): Simplify rule.
1523 (gcj.pod): New intermediate rule.
1524 (gcjh.pod): Likewise.
1525 (jv-scan.pod): Likewise.
1526 (jcf-dump.pod): Likewise.
1527 (gij.pod): Likewise.
1528 (jv-convert.pod): Likewise.
1529 (rmic.pod): Likewise.
1530 (rmiregistry.pod): Likewise.
1531 (gcj.1): Delete.
1532 (gcjh.1): Delete.
1533 (jv-scan.1): Delete.
1534 (jcf-dump.1): Delete.
1535 (gij.1): Delete.
1536 (jv-convert.1): Delete.
1537 (rmic.1): Delete.
1538 (rmiregistry.1): Delete.
1539
1540 2003-11-02 Jeff Sturm <jsturm@one-point.com>
1541
1542 Fixes PR java/12866.
1543 * parse.y (resolve_qualified_expression_name): Move test
1544 for outer field access methods from here...
1545 (check_thrown_exceptions) ...to here.
1546
1547 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
1548
1549 * .cvsignore: Delete.
1550
1551 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
1552
1553 * verify.c (verify_jvm_instructions): Don't warn about legal
1554 eh binding regions generated for example by jdk 1.4.1.
1555
1556 2003-10-24 David S. Miller <davem@redhat.com>
1557
1558 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
1559
1560 2003-10-22 Andrew Haley <aph@redhat.com>
1561
1562 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
1563 (java_get_callee_fndecl): New.
1564
1565 * jcf-parse.c (java_parse_file): Call emit_catch_table().
1566
1567 * java-tree.h (ctable_decl): New.
1568 (catch_classes): New.
1569 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
1570
1571 * decl.c (java_init_decl_processing): Add catch_class_type.
1572 Add ctable_decl.
1573 Add catch_classes field.
1574
1575 * class.c (build_indirect_class_ref): Break out from
1576 build_class_ref.
1577 (make_field_value): Check flag_indirect_dispatch.
1578 (make_class_data): Ditto.
1579 Tidy uses of PUSH_FIELD_VALUE.
1580 Add field catch_classes.
1581 (make_catch_class_record): New.
1582
1583 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
1584
1585 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
1586
1587 * jcf-write.c: Follow spelling conventions.
1588 * parse.y: Likewise.
1589
1590 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
1591
1592 * ChangeLog: Fix typos.
1593 * expr.c: Fix comment typos.
1594 * jcf-write.c: Likewise.
1595 * lang.c: Likewise.
1596 * lex.c: Likewise.
1597 * mangle.c: Likewise.
1598 * parse-scan.y: Likewise.
1599 * parse.y: Likewise.
1600
1601 2003-10-22 Tom Tromey <tromey@redhat.com>
1602
1603 * expr.c (expand_byte_code): Only warn about dead bytecode when
1604 extra_warnings is set.
1605
1606 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
1607
1608 Fix for PR java/12586.
1609 * mangle.c (find_compression_record_match): Don't iterate through
1610 package namespace elements unless they all match compression_table
1611 entries.
1612
1613 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
1614
1615 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
1616 (generate-manpages): Likewise.
1617 (java.maintainer-clean): Likewise.
1618 (gcj.info): Likewise.
1619 (gcj.1): Likewise.
1620 (gcjh.1): Likewise.
1621 (jv-scan.1): Likewise.
1622 (jcf-dump.1): Likewise.
1623 (gij.1): Likewise.
1624 (jv-convert.1): Likewise.
1625 (rmic.1): Likewise.
1626 (rmiregistry.1): Likewise.
1627 (java.install-man): Likewise.
1628 (parse-scan.o): Move and define complete compile line.
1629 (parse.o): Likewise.
1630 (jcf-tree-inline.o): Move.
1631
1632 2003-10-20 Mark Mitchell <mark@codesourcery.com>
1633
1634 * Make-lang.in (info): Update dependencies.
1635 (java.install-info): Remove.
1636 ($(srcdir)/java/gcj.info): Replace with ...
1637 ($(docobjdir)/gcj.info): ... this.
1638
1639 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
1640
1641 * Make-lang.in: Replace uses of $(target_alias) with
1642 $(target_noncanonical).
1643
1644 2003-10-09 Tom Tromey <tromey@redhat.com>
1645
1646 * decl.c (java_init_decl_processing): Declare signers field.
1647 * class.c (make_class_data): Set signers field.
1648
1649 2003-10-09 Jason Merrill <jason@redhat.com>
1650
1651 * parse.y (patch_assignment): Use make_node to create a BLOCK.
1652 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
1653 POINTER_TYPE.
1654
1655 2003-10-06 Mark Mitchell <mark@codesourcery.com>
1656
1657 * Make-lang.in (java.info): Replace with ...
1658 (info): ... this.
1659 (java.dvi): Replace with ...
1660 (dvi): ... this.
1661 (java.generated-manpages): Replace with ...
1662
1663 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
1664
1665 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
1666
1667 2003-10-01 Andrew Haley <aph@redhat.com>
1668
1669 * jcf-parse.c (java_parse_file): Write otable and atable.
1670 * java-tree.h (atable_methods): New.
1671 (atable_decl): New.
1672 (atable_syms_decl): New.
1673 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
1674 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
1675 (symbol_*type): Rename method_symbol* to symbol*type.
1676 (emit_offset_symbol_table): Delete.
1677 (emit_symbol_table): New.
1678 (get_symbol_table_index): New.
1679 (atable_type): New.
1680 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
1681 (build_known_method_ref): Likewise.
1682 (get_symbol_table_index): Rename from get_offset_table_index.
1683 Parameterize to allow re-use by differing types of symbol table.
1684 (build_invokevirtual): Pass table to get_offset_table_index.
1685 * decl.c (java_init_decl_processing): Push types and decls for
1686 atable and atable_syyms.
1687 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
1688 (make_class_data): Add new fields atable and atable_syms.
1689 (emit_symbol_table): Rename from emit_offset_symbol_table.
1690 Parameterize to allow re-use by different types of symbol table.
1691 (build_symbol_entry): Renamed from build_method_symbols_entry.
1692
1693 2003-09-30 Roger Sayle <roger@eyesopen.com>
1694
1695 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
1696 semantics for SAVE_EXPR, by caching the result in a temporary.
1697
1698 2003-09-28 Richard Henderson <rth@redhat.com>
1699
1700 * check-init.c (check_init): Save and restore input_location
1701 instead of file and line separately.
1702 * decl.c (java_expand_body): Likewise.
1703 * jcf-write.c (generate_bytecode_insns): Likewise.
1704 * parse.y (safe_layout_class): Likewise.
1705 * jcf-parse.c (read_class, parse_class_file): Likewise.
1706 (java_parse_file): Use %H for warning locator.
1707
1708 2003-09-28 Roger Sayle <roger@eyesopen.com>
1709
1710 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
1711 with void-type branches instead of using a COMPOUND_EXPR.
1712
1713 2003-09-28 Jeff Sturm <jsturm@one-point.com>
1714
1715 * decl.c (java_optimize_inline, dump_function): Remove.
1716 * java-tree.h (java_optimize_inline): Remove declaration.
1717 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
1718 * parse.y (source_end_java_method, java_expand_classes):
1719 Likewise. Remove dead code.
1720
1721 2003-09-27 Roger Sayle <roger@eyesopen.com>
1722
1723 * lang.c (java_init_options): Set flag_evaluation_order.
1724 * expr.c (force_evaluation_order): Don't attempt to force
1725 evaluation order of binary operations using save_expr.
1726 * parse.y (java_complete_lhs): No longer need to call
1727 force_evaluation_order when constructing binary operators.
1728
1729 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1730 Bryce McKinlay <bryce@mckinlay.net.nz>
1731
1732 PR java/1333:
1733 * parse.y (not_accessible_field_error): New function.
1734 (resolve_expression_name): Check field access permissions.
1735 (resolve_qualified_expression_name): Use
1736 not_accessible_field_error.
1737 (resolve_qualified_expression_name): Likewise.
1738
1739 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1740
1741 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
1742
1743 2003-09-23 Roger Sayle <roger@eyesopen.com>
1744
1745 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
1746 with equal operands without side-effects.
1747
1748 2003-09-22 Jeff Sturm <jsturm@one-point.com>
1749
1750 * decl.c (java_init_decl_processing): Don't emit otable decls
1751 if flag_indirect_dispatch is not set.
1752
1753 2003-09-21 Richard Henderson <rth@redhat.com>
1754
1755 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1756 resource.c: Revert.
1757
1758 2003-09-21 Richard Henderson <rth@redhat.com>
1759
1760 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1761 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
1762
1763 2003-09-20 Richard Henderson <rth@redhat.com>
1764
1765 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
1766
1767 2003-09-18 Roger Sayle <roger@eyesopen.com>
1768
1769 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
1770 * check-init.c (check_init): Likewise.
1771
1772 2003-09-18 Roger Sayle <roger@eyesopen.com>
1773
1774 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
1775
1776 2003-09-16 Andrew Haley <aph@redhat.com>
1777
1778 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
1779
1780 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
1781
1782 Fixes PR java/9577
1783 * mangle.c (find_compression_record_match): Skip
1784 over a "6JArray" (the array template mangled string)
1785 IDENTIFIER_NODE.
1786 (mangle_array_type): Correct minor typo.
1787 (atms): Move definition to the beginning.
1788
1789 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
1790
1791 * class.c (add_miranda_methods): Ensure super-interfaces are laid
1792 out. Fix for PR java/12254.
1793
1794 2003-09-11 Richard Henderson <rth@redhat.com>
1795
1796 * parse.y (source_end_java_method): Update for new
1797 cgraph_finalize_function argument.
1798
1799 2003-09-09 Richard Henderson <rth@redhat.com>
1800
1801 * parse.y (source_end_java_method): Update call to
1802 cgraph_finalize_function.
1803
1804 2003-09-03 Jeff Sturm <jsturm@one-point.com>
1805
1806 * decl.c (java_expand_body): New function.
1807 * expr.c (build_class_init): Set DECL_IGNORED_P.
1808 * java-tree.h (start_complete_expand_method,
1809 java_expand_body): Declare.
1810 * jcf-parse.c (cgraph.h): Include.
1811 (java_parse_file): Handle flag_unit_at_a_time.
1812 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
1813 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
1814 (java_estimate_num_insns): Use walk_tree_without_duplicates.
1815 (java_start_inlining): New function.
1816 * parse.h (java_finish_classes): Declare.
1817 * parse.y: Include cgraph.h.
1818 (block): Don't special-case empty block production.
1819 (craft_constructor): Set DECL_INLINE.
1820 (source_end_java_method): Handle flag_unit_at_a_time.
1821 Replace inline code with call to java_expand_body.
1822 (start_complete_expand_method): Remove static modifier.
1823 (java_expand_method_bodies): Patch function tree for
1824 class initialization and/or synchronization as needed.
1825 Don't begin RTL expansion yet.
1826 (java_expand_classes): Check flag_unit_at_a_time before
1827 calling finish_class.
1828 (java_finish_classes): New function.
1829 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
1830 (patch_assignment): Set DECL_CONTEXT on temporary variable.
1831 (emit_test_initialization): Set DECL_IGNORED_P.
1832
1833 2003-09-03 Roger Sayle <roger@eyesopen.com>
1834
1835 * builtins.c (enum builtin_type): Delete unused enumeration.
1836 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
1837
1838 2003-08-28 Tom Tromey <tromey@redhat.com>
1839
1840 * gcj.texi (Extensions): Document gcjlib URLs.
1841
1842 2003-08-20 Tom Tromey <tromey@redhat.com>
1843
1844 * gcj.texi (Extensions): Added xref.
1845 (libgcj Runtime Properties): Document
1846 gnu.gcj.runtime.VMClassLoader.library_control.
1847
1848 2003-08-20 Andrew Haley <aph@redhat.com>
1849
1850 * except.c (prepare_eh_table_type): Use new encoding for exception
1851 handlers when using -fno-assume-compiled.
1852
1853 2003-08-13 Tom Tromey <tromey@redhat.com>
1854
1855 * gcj.texi (Invoking gij): Document -X and -?.
1856
1857 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
1858
1859 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
1860 GCJH_OBJS, JCFDUMP_OBJS
1861 * win32-host.c: Removed the unnecessary and broken dependency
1862 on jcf.h
1863
1864 2003-08-11 Tom Tromey <tromey@redhat.com>
1865
1866 * parse.y (java_check_regular_methods): Typo fixes. Call
1867 check_interface_throws_clauses. Use
1868 check_concrete_throws_clauses.
1869 (check_interface_throws_clauses): New function.
1870 (check_concrete_throws_clauses): New function.
1871 (hack_is_accessible_p): New function.
1872 (find_most_specific_methods_list): Added FIXME.
1873 * typeck.c (lookup_do): Use `flags' argument to decide what to
1874 do. Reimplemented.
1875 (lookup_argument_method_generic): New function.
1876 (lookup_argument_method2): Removed.
1877 * jcf.h (ACC_INVISIBLE): New define.
1878 * jcf-write.c (generate_classfile): Skip invisible methods.
1879 * class.c (add_miranda_methods): New function.
1880 (layout_class_methods): Use it.
1881 (get_access_flags_from_decl): Use ACC_INVISIBLE.
1882 * java-tree.h (METHOD_INVISIBLE): New define.
1883 (lang_decl_func) [invisible]: New field.
1884 (lookup_argument_method_generic): Declare.
1885 (SEARCH_INTERFACE): New define.
1886 (SEARCH_SUPER): Likewise.
1887 (SEARCH_ONLY_INTERFACE): Likewise.
1888 (SEARCH_VISIBLE): Likewise.
1889 (lookup_argument_method2): Removed declaration.
1890
1891 2003-08-05 Tom Tromey <tromey@redhat.com>
1892
1893 Fix for PR java/11600:
1894 * parse.y (java_complete_lhs): See whether we're calling a method
1895 on an array.
1896 (check_thrown_exceptions): Added `is_array_call' argument;
1897 fixed `clone' checking; updated all callers.
1898
1899 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
1900
1901 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
1902
1903 2003-08-03 Tom Tromey <tromey@redhat.com>
1904
1905 * java-tree.h (METHOD_TRANSIENT): Removed.
1906 * decl.c (pushdecl): Removed some dead code.
1907 * class.c (get_access_flags_from_decl): Can't have transient
1908 method.
1909 (add_method_1): Can't have a transient method.
1910
1911 2003-07-28 Andreas Jaeger <aj@suse.de>
1912
1913 * jvspec.c: Convert to ISO C90 prototypes.
1914
1915 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1916
1917 * decl.c (force_poplevels): Fix warning call.
1918
1919 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1920
1921 * expr.c (expand_java_field_op): Don't use xxx_with_decl
1922 (expand_java_field_op): Likewise.
1923 * class.c (layout_class_method): Likewise
1924 (emit_register_classes): Likewise.
1925 * decl.c (pushdecl): Likewise.
1926 (poplevel): Likewise.
1927 (force_poplevels): Likewise.
1928 (give_name_to_locals): Likewise.
1929 * check-init.c (check_for_initialization): Likewise.
1930
1931 2003-07-24 Jason Merrill <jason@redhat.com>
1932
1933 * java-tree.h: Move boolean_type_node et al to the back end.
1934
1935 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1936
1937 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
1938 casts.
1939
1940 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
1941
1942 * lang.opt: Don't show -MD_ and -MDD_.
1943
1944 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
1945
1946 * lang-options.h: Remove.
1947 * lang.opt: Add help text.
1948
1949 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
1950
1951 * expr.c: Remove the last argument to expand_assignment().
1952
1953 2003-07-09 Jan Hubicka <jh@suse.cz>
1954
1955 * java-tree.h (DECL_NUM_STMTS): Rename to...
1956 (DECL_ESTIMATED_INSNS): ... this.
1957 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
1958 New static functions.
1959 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
1960 * parser.y (add_stmt_to_compound): Do not account statements.
1961
1962 2003-07-08 Mark Wielaard <mark@klomp.org>
1963
1964 * gcj.texi: CNI now expands to Compiled Native Interface.
1965
1966 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1967
1968 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
1969
1970 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
1971
1972 * expr.c (expand_byte_code): Adjist emit_line_note call.
1973
1974 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
1975
1976 * lang.c (java_handle_option): Don't handle filenames.
1977
1978 2003-07-02 Zack Weinberg <zack@codesourcery.com>
1979
1980 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
1981 DIR_SEPARATOR.
1982 Use FILENAME_CMP.
1983 * jcf-write.c: Don't default-define DIR_SEPARATOR.
1984 * jcf.h: Delete COMPARE_FILENAMES definition.
1985
1986 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
1987
1988 * lang.c (java_init_options): Update prototype.
1989
1990 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
1991
1992 * decl.c (poplevel): Adjust define_label call.
1993
1994 2003-06-27 Zack Weinberg <zack@codesourcery.com>
1995
1996 * gjavah.c (flag_jni): Make non-static.
1997 * parse-scan.y (ctxp): Make non-static.
1998
1999 * class.c (build_method_symbols_entry)
2000 * expr.c (get_offset_table_index)
2001 * jcf-parse.c (jcf_parse):
2002 Mark the definition static, matching the forward declaration.
2003
2004 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
2005
2006 * lang.c (java_handle_option): Don't check for missing arguments.
2007
2008 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
2009
2010 * class.c (push_class): Use a location_t to save place.
2011 (emit_register_classes): Set input_location. Adjust
2012 expand_function_end call.
2013 * resource.c (write_resource_constructor): Likewise.
2014 * decl.c (end_java_method): Adjust expand_function_end call.
2015 * parse.y (source_end_java_method): Likewise.
2016
2017 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
2018
2019 * lang.c (java_handle_option): Likewise.
2020
2021 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
2022
2023 * lang.c (java_handle_option): Special-casing of optional
2024 joined arguments no longer needed.
2025 * lang.opt: Update switches that take optional argument.
2026
2027 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
2028
2029 * lang.opt: Declare Java.
2030 * lang.c (java_init_options): Update.
2031
2032 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
2033
2034 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
2035
2036 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
2037
2038 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
2039 * lang.c (java_handle_option): -MD and -MMD have an underscore.
2040 * lang.opt: -MD and -MMD have an underscore.
2041
2042 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
2043
2044 * class.c (emit_register_classes): Adjust init_function_start
2045 call.
2046 * decl.c (complete_start_java_method): Likewise.
2047 * resource.c (write_resource_constructor): Likewise.
2048
2049 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
2050
2051 * Make-lang.in: Update to use options.c and options.h.
2052 * lang.c: Include options.h not j-options.h.
2053 (java_handle_option): Abort on unrecognized option.
2054 (java_init_options): Request Java switches.
2055
2056 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
2057
2058 * Make-lang.in: Handle mostlyclean.
2059
2060 2003-06-11 Tom Tromey <tromey@redhat.com>
2061
2062 * lang.c (java_handle_option): Update dependency_tracking for
2063 OPT_MF case.
2064
2065 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
2066 empty argument.
2067
2068 2003-06-10 Andrew Haley <aph@redhat.com>
2069
2070 * resource.c (write_resource_constructor): Use expand_expr to
2071 generate the address of the label attached to a resource.
2072 * Make-lang.in (java/resource.o): Add expr.h
2073
2074 2003-06-10 Andrew Haley <aph@redhat.com>
2075
2076 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
2077 (java_decl_ok_for_sibcall): New.
2078
2079 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
2080
2081 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
2082 (java/j-options.c, java/j-options.h): New.
2083 * java-tree.h (resource_name, compile_resource_file,
2084 compile_resource_data): Constify.
2085 * jcf-write.c (jcf_write_base_directory): Similarly.
2086 * jcf.h (jcf_write_base_directory): Similarly.
2087 * lang.c: Include j-options.h.
2088 (cl_options_count, cl_options, string_option, java_decode_option,
2089 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
2090 process_option_with_no): Remove.
2091 (resource_name): Constify.
2092 (LANG_HOOKS_HANDLE_OPTION): Override.
2093 (java_handle_option): New.
2094 (java_init): Don't call jcf_path_init.
2095 (java_init_options): Call jcf_path_init.
2096 * lang.opt: New.
2097 * resource.c (compile_resource_data, compile_resource_file): Constify.
2098
2099 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
2100
2101 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
2102 (struct lang_decl_func): Add last_line field.
2103 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
2104 DECL_SOURCE_LINE_LAST): Remove.
2105 * parse.y (missing_return_error, finish_method_declaration,
2106 lookup_cl, start_artificial_method_body, source_end_java_method,
2107 start_complete_expand_method): Adjust.
2108
2109 2003-06-08 Tom Tromey <tromey@redhat.com>
2110
2111 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
2112 fno-assume-compiled.
2113
2114 2003-06-08 Roger Sayle <roger@eyesopen.com>
2115
2116 * builtins.c (define_builtin_type, builtin_types): Delete.
2117 (define_builtin): Rewritten to take just the built-in code,
2118 the function's name, type and fallback library function name.
2119 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
2120 (initialize_builtins): Overhaul to define the GCC builtins
2121 used by gcj manually, providing the Java run-time's
2122 implementations as the fallback library function.
2123
2124 2003-06-08 Anthony Green <green@redhat.com>
2125
2126 * parse.y (patch_cast): Fix conversions from floating-point to
2127 integral types.
2128
2129 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
2130
2131 * Make-lang.in: Update.
2132 * lang.c: Include opts.h. Define cl_options_count and cl_options.
2133
2134 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
2135
2136 * lang.c (java_init_options): Update.
2137
2138 2003-06-05 Jan Hubicka <jh@suse.cz>
2139
2140 * Make-lang.in: Add support for stageprofile and stagefeedback
2141
2142 2003-05-31 Roger Sayle <roger@eyesopen.com>
2143
2144 * lang.c (java_init_options): Prescribe wrap-around two's
2145 complement arithmetic overflow by setting flag_wrapv.
2146
2147 2003-05-29 Roger Sayle <roger@eyesopen.com>
2148
2149 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
2150 (builtin_record): Add an additional builtin_code field to
2151 record which GCC built-in corresponds to the Java function.
2152 (java_builtins): Add new entries for atan, atan2, exp, log,
2153 pow and tan.
2154 (max_builtin, min_builtin, abs_builtin): Perform constant
2155 folding on the resulting tree.
2156 (java_build_function_call_expr): Likewise, perform constant
2157 folding on the resulting tree.
2158 (initialize_builtins): The NULL creators are now allowed in
2159 the java_builtins table, which is now terminated by an entry
2160 with builtin_code == END_BUILTINS.
2161 (check_for_builtin): Likewise. If the matching creator is
2162 NULL, construct the call using java_build_function_call_expr
2163 directly with the decl for the corresponding builtin_code.
2164
2165 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
2166
2167 * win32-host.c: Normalize copyright boilerplate.
2168
2169 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2170
2171 * parse.y (print_int_node): Use string concatentation on
2172 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
2173 function calls into one.
2174
2175 2003-05-13 Zack Weinberg <zack@codesourcery.com>
2176
2177 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
2178 fatal_io_error with calls to fatal_error; add ": %m" to the end of
2179 all the affected error messages.
2180
2181 2003-05-13 Richard Henderson <rth@redhat.com>
2182
2183 * class.c (layout_class_method): Set DECL_EXTERNAL.
2184 * decl.c (java_mark_decl_local, java_mark_class_local): New.
2185 * java-tree.h (java_mark_class_local): Declare.
2186 * jcf-parse.c (parse_class_file): Use it.
2187 * parse.y (java_expand_classes): Likewise.
2188
2189 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
2190
2191 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
2192 * lex.h: #include input.h.
2193 * jv-scan.c (input_filename): Remove.
2194
2195 2003-05-02 Tom Tromey <tromey@redhat.com>
2196
2197 PR java/10491:
2198 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
2199 (handle_inner_classes): New function.
2200
2201 2003-05-01 Tom Tromey <tromey@redhat.com>
2202
2203 PR java/10459:
2204 * parse.y (finish_for_loop): Do nothing if update expression is a
2205 EXPR_WFL_NODE wrapping nothing.
2206 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
2207
2208 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
2209
2210 * lex.h (input_lineno): Remove declaration.
2211 * parse-scan.y: #include input.h.
2212 (input_filename): Remove declaration.
2213 (input_location): Add definition.
2214 (input_line): Remove definition.
2215
2216 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
2217
2218 * lex.h (lineno): Rename to ...
2219 (input_line): ... here
2220 * parse-scan.y (lineno): Rename to ...
2221 (input_line): ... here.
2222 (reset_report): Rename lineno to input_line.
2223 * check-init.c (check_init): Likewise.
2224 * class.c (push_class): Likewise.
2225 * decl.c (complete_start_java_method, end_java_method): Likewise.
2226 * expr.c (expand_byte_code): Likewise.
2227 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
2228 * jcf-write.c (generate_bytecode_insns): Likewise.
2229 * lex.c (java_init_lex, java_allocate_new_line,
2230 do_java_lex): Likewise.
2231 * parse.h (YYNOT_TWICE): Likewise.
2232 * parse.y (empty_statement, expression_statement,
2233 java_pop_parser_context, java_parser_context_save_global,
2234 yyerror, register_fields, method_header, safe_layout_class,
2235 find_in_imports_on_demand, create_artificial_method,
2236 source_end_java_method, start_complete_expand_method,
2237 build_thisn_assign, java_complete_lhs,
2238 maybe_absorb_scoping_block): Likewise.
2239
2240 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
2241
2242 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
2243 '/' when computing java source filename
2244
2245 2003-04-13 Tom Tromey <tromey@redhat.com>
2246
2247 * gjavah.c (print_c_decl): Indentation fix.
2248
2249 2003-04-12 Zack Weinberg <zack@codesourcery.com>
2250
2251 * class.c (make_field_value, make_method_value, get_dispatch_table)
2252 (make_class_data, emit_offset_symbol_table)
2253 * constants.c (build_constants_constructor)
2254 * java-tree.h (START_RECORD_CONSTRUCTOR)
2255 * parse.y (maybe_build_array_element_wfl):
2256 Use build_constructor.
2257
2258 2003-04-10 Eric Blake <ebb9@email.byu.edu>
2259
2260 PR java/10253:
2261 * parse.y (string_convert_int_cst): Always use at least one digit
2262 in string conversion. Remove ASCII dependence.
2263 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
2264
2265 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
2266
2267 * Make-lang.in: added win32-host.c
2268 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
2269 resolves to open() on non-Win32 platforms and
2270 Win32-specific jcf_open_exact_case() on Win32
2271 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
2272 when trying .java and .class files
2273 * win32-host.c: added to repository. Defines
2274 Win32-specific jcf_open_exact_case()
2275
2276 2003-04-10 Andrew Haley <aph@redhat.com>
2277
2278 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
2279 (maybe_free_localvar): Renamed from localvar_free.
2280 Add new arg, really.
2281 (generate_bytecode_insns): Set new variable, jsrs.
2282 Only free local vars if no jsr insns have been emittted.
2283 Call maybe_free_localvar, not localvar_free.
2284
2285 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
2286
2287 * gcj.texi: Remove @ at start of file.
2288
2289 2003-03-25 Tom Tromey <tromey@redhat.com>
2290
2291 * parse.y (create_interface): Call CHECK_DEPRECATED.
2292
2293 2003-03-23 Zack Weinberg <zack@codesourcery.com>
2294
2295 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
2296
2297 2003-03-21 Zack Weinberg <zack@codesourcery.com>
2298
2299 * javaop.h (jfloat, jdouble): Make them structures mirroring
2300 the bit fields of IEEE float and double respectively.
2301 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
2302 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
2303 (union Word, union DWord): Delete.
2304 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
2305
2306 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
2307 D_NAN_MASK): Delete.
2308 (jni_print_float, jni_print_double): New. Generate
2309 hexadecimal floating constants.
2310 (print_field_info): Use jni_print_float/double.
2311
2312 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
2313 finite floating point numbers for output; special case
2314 non-finite floats.
2315
2316 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
2317
2318 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
2319 Replace 0 and 1 with true and false in return statements.
2320
2321 2003-03-19 Tom Tromey <tromey@redhat.com>
2322
2323 * lex.c (do_java_lex): Renamed from java_lex.
2324 (java_lex): New function.
2325 Include timevar.h.
2326
2327 2003-03-13 Tom Tromey <tromey@redhat.com>
2328
2329 * parse.y (resolve_inner_class): Error if qualifier is a primitive
2330 type.
2331
2332 2003-03-04 Andrew Haley <aph@redhat.com>
2333
2334 * gjavah.c (is_first_data_member): New global variable.
2335 (print_c_decl): If it's the first data member, align it as the
2336 superclass.
2337 (process_file): Set is_first_data_member.
2338
2339 2003-03-11 Tom Tromey <tromey@redhat.com>
2340
2341 * parse.y (resolve_field_access): Initialize class if field is
2342 found in another static field.
2343 * expr.c (build_class_init): Don't optimize out initialization of
2344 implemented interface.
2345
2346 2003-03-11 Andrew Haley <aph@redhat.com>
2347
2348 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
2349 warning.
2350
2351 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
2352
2353 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
2354 and DIR_SEPARATOR_2 for a target.
2355 Correct minor typos.
2356
2357 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
2358 and DIR_SEPARATOR_2 for a target into account.
2359
2360 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
2361
2362 * lang.c (java_init): Update prototype, move code to java_post_options.
2363 (java_post_options): Similarly.
2364
2365 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
2366
2367 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
2368 compare file name components depending on the case-sensitivity
2369 or otherwise of the host file system.
2370
2371 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
2372 "strcmp" to compare file name components.
2373 Use IS_DIR_SEPARATOR instead of comparing directly against
2374 DIR_SEPARATOR.
2375 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
2376 comparing directly against DIR_SEPARATOR.
2377
2378 2003-03-04 Tom Tromey <tromey@redhat.com>
2379
2380 * Make-lang.in (java.tags): New target.
2381
2382 2003-03-01 Roger Sayle <roger@eyesopen.com>
2383
2384 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
2385 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
2386
2387 2003-03-01 Tom Tromey <tromey@redhat.com>
2388
2389 * parse.y (jdep_resolve_class): Only check deprecation if we found
2390 a decl.
2391
2392 2003-02-28 Tom Tromey <tromey@redhat.com>
2393
2394 PR java/9695:
2395 * class.c (maybe_layout_super_class): Always pass a WFL to
2396 do_resolve_class.
2397 * parse.y (do_resolve_class): Updated comment to explain
2398 parameters.
2399
2400 2003-02-26 Tom Tromey <tromey@redhat.com>
2401
2402 * jcf-write.c (generate_classfile): Check whether class is
2403 deprecated before writing attribute count.
2404
2405 2003-02-25 Roger Sayle <roger@eyesopen.com>
2406
2407 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
2408 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
2409
2410 2003-02-23 Tom Tromey <tromey@redhat.com>
2411
2412 * lang-options.h: Added -Wdeprecated.
2413 * gcj.texi (Warnings): Document -Wdeprecated.
2414 * java-tree.h (flag_deprecated): Declare.
2415 * lang.c (lang_W_options): Added deprecated.
2416 (flag_deprecated): New global.
2417 * chartables.h: Rebuilt.
2418 * gen-table.pl (process_one): Look at whitespace.
2419 (print_tables): Define LETTER_SPACE, LETTER_MASK.
2420 * parse.h (CLEAR_DEPRECATED): New macro.
2421 (CHECK_DEPRECATED_NO_RESET): New macro.
2422 * jcf-parse.c (handle_deprecated): New function.
2423 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
2424 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
2425 * parse.y (resolve_type_during_patch): Check deprecation.
2426 (jdep_resolve_class): Likewise.
2427 (process_imports): Likewise.
2428 (resolve_expression_name): Likewise.
2429 (check_deprecation): Strip arrays from decl. Check
2430 flag_deprecated.
2431 (patch_method_invocation): Also check the particular constructor
2432 for deprecation.
2433 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
2434 * jcf-write.c (append_deprecated_attribute): New function.
2435 (generate_classfile): Generate deprecated attribute when
2436 appropriate.
2437 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
2438 (java_lex) [case '*']: Simplify logic.
2439 (java_start_char_p): Use LETTER_MASK.
2440 (java_part_char_p): Likewise.
2441 (java_space_char_p): New function.
2442
2443 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
2444
2445 Change base class access representation.
2446 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
2447 (add_interface_do): Likewise.
2448
2449 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
2450
2451 * decl.c (java_init_decl_processing): Change
2452 soft_lookupjnimethod_node to reflect the change in
2453 signature of _Jv_LookupJNIMethod in libjava/jni.cc
2454 * expr.c (build_jni_stub): Calculate and pass the size
2455 on the stack of the arguments to a JNI function. Use
2456 new target macro MODIFY_JNI_METHOD_CALL to allow a
2457 target to modify the call to a JNI method.
2458
2459 2003-02-08 Roger Sayle <roger@eyesopen.com>
2460
2461 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
2462 instead of basename to avoid compiler warnings on Tru64.
2463
2464 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
2465
2466 * gcj.texi: Update to GFDL 1.2.
2467
2468 2003-01-31 Andrew Haley <aph@redhat.com>
2469
2470 * parse.y (java_expand_classes): Scan the whole class list looking
2471 for access methods that haven't yet been expanded.
2472
2473 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
2474
2475 Fix for java/4269:
2476
2477 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
2478 to fix bootstrap on sparc-unknown-netbsdelf1.5.
2479 * jcf-parse.c: Likewise.
2480
2481 2003-01-31 Mark Wielaard <mark@klomp.org>
2482
2483 * gjavah.c (throwable_p): Allocate 1 more byte for string.
2484
2485 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
2486
2487 * class.c (make_class): Use BINFO_ELTS.
2488 (set_super_info): Likewse.
2489 (add_interface_do): Likewise.
2490
2491 2003-01-30 Tom Tromey <tromey@redhat.com>
2492
2493 * jcf-parse.c (read_class): Update identifier's class value if it
2494 changed during parsing.
2495
2496 2003-01-30 Loren James Rittle <ljrittle@acm.org>
2497
2498 * Make-lang.in (po-generated): Find the targets in $(parsedir).
2499 Propagate change to all other rules as required.
2500 (java/parse-scan.o): Add explicit dependency on
2501 $(parsedir)/java/parse-scan.c .
2502
2503 2003-01-29 Tom Tromey <tromey@redhat.com>
2504
2505 * parse.y (patch_assignment): Only transform the rhs of an
2506 assignment when compiling to native.
2507
2508 2003-01-28 Tom Tromey <tromey@redhat.com>
2509
2510 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
2511
2512 2003-01-28 Tom Tromey <tromey@redhat.com>
2513
2514 * lex.c (java_lex): Don't include UEOF as part of token.
2515 (java_read_unicode): Error if \u sequence prematurely terminated.
2516
2517 2003-01-27 Tom Tromey <tromey@redhat.com>
2518
2519 * parse.y (java_check_regular_methods): Check for construct after
2520 checking types in throws clause.
2521
2522 2003-01-24 Tom Tromey <tromey@redhat.com>
2523
2524 * class.c (build_static_field_ref): Only a String or numeric field
2525 can fold to a constant.
2526
2527 2003-01-23 Tom Tromey <tromey@redhat.com>
2528
2529 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
2530 file name in resource buffer.
2531
2532 2003-01-23 Tom Tromey <tromey@redhat.com>
2533
2534 * expr.c (build_known_method_ref): Use method's context to find
2535 method table index.
2536
2537 2003-01-23 Tom Tromey <tromey@redhat.com>
2538
2539 * constants.c (set_constant_entry): Allocated cleared memory.
2540
2541 2003-01-22 Tom Tromey <tromey@redhat.com>
2542
2543 * java-tree.h: Don't use PARAMS.
2544 * resource.c: Add prototypes for all functions.
2545 (write_resource_constructor): Use `const char *' to avoid
2546 warning.
2547
2548 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
2549
2550 * jcf-parse.c (process_zip_dir): Remove unused variable.
2551
2552 2003-01-22 Tom Tromey <tromey@redhat.com>
2553
2554 * expr.c (build_invokeinterface): Abort if method's context is not
2555 an interface.
2556
2557 2003-01-22 Tom Tromey <tromey@redhat.com>
2558
2559 * gcj.texi (Input and output files): Mention non-class entries.
2560 * decl.c (java_init_decl_processing): Call
2561 init_resource_processing.
2562 * java-tree.h (compile_resource_data, write_resource_constructor,
2563 compile_resource_file, init_resource_processing): Declare.
2564 * config-lang.in (gtfiles): Added resource.c.
2565 * Make-lang.in (gt-java-resource.h): New target.
2566 (JAVA_OBJS): Added resource.o.
2567 (java/resource.o): New target.
2568 * resource.c: New file.
2569 * class.c (compile_resource_file): Moved to resource.c.
2570 (registerResource_libfunc): Likewise.
2571 (utf8_decl_list): Mark with GTY; now static.
2572 * jcf-parse.c (classify_zip_file): New function.
2573 (parse_zip_file_entries): Use it; compile .properties files.
2574 (process_zip_dir): Use classify_zip_file and compute_class_name.
2575 Don't write class name into zip directory.
2576 (java_parse_file): Call write_resource_constructor.
2577 (compute_class_name): New function.
2578 * jcf-io.c (read_zip_member): Reindented.
2579
2580 2003-01-21 Tom Tromey <tromey@redhat.com>
2581
2582 * class.c (supers_all_compiled): New function.
2583 (make_class_data): Use it.
2584
2585 2003-01-21 Tom Tromey <tromey@redhat.com>
2586
2587 * parse.y (method_header): Native method can't be strictfp.
2588 No method can be transient or volatile.
2589
2590 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2591
2592 Make-lang.in (jvspec.o-warn): Add -Wno-error.
2593
2594 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
2595
2596 * check-init.c: Fix comment typos.
2597 * class.c: Likewise.
2598 * constants.c: Likewise.
2599 * decl.c: Likewise.
2600 * except.c: Likewise.
2601 * expr.c: Likewise.
2602 * java-except.h: Likewise.
2603 * java-tree.h: Likewise.
2604 * javaop.h: Likewise.
2605 * jcf-dump.c: Likewise.
2606 * jcf-io.c: Likewise.
2607 * jcf-parse.c: Likewise.
2608 * jcf-write.c: Likewise.
2609 * lang.c: Likewise.
2610 * mangle.c: Likewise.
2611 * typeck.c: Likewise.
2612 * verify.c: Likewise.
2613
2614 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2615
2616 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
2617 * jcf-write.c: Include "tm_p.h".
2618
2619 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2620
2621 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
2622
2623 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2624
2625 * builtins.c (java_build_function_call_expr): Renamed from
2626 build_function_call_expr. All callers changed.
2627
2628 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
2629 * jcf-parse.c: Include tm_p.h.
2630
2631 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
2632 warning.
2633
2634 2003-01-14 Tom Tromey <tromey@redhat.com>
2635
2636 * class.c (make_class_data): Check that super is compiled before
2637 building class reference to it.
2638
2639 2003-01-14 Andrew Haley <aph@redhat.com>
2640
2641 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2642 varargs function -- correct.
2643
2644 2003-01-14 Andrew Haley <aph@redhat.com>
2645
2646 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
2647
2648 2003-01-14 Andrew Haley <aph@redhat.com>
2649
2650 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2651 varargs function -- correct.
2652
2653 * parse.y (patch_assignment): Copy the rhs of an assignment into a
2654 temporary if the RHS is a reference.
2655
2656 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2657
2658 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
2659 * keyword.h: Regenerated.
2660
2661 * All Files: Convert to ISO C style function definitions.
2662
2663 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2664
2665 * parse.y (check_pkg_class_access): ANSIfy definition.
2666
2667 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2668
2669 * decl.c, parse-scan.y, parse.y: Don't cast return value of
2670 xmalloc et al.
2671
2672 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
2673
2674 2003-01-09 Geoffrey Keating <geoffk@apple.com>
2675
2676 Merge from pch-branch:
2677
2678 2002-12-02 Geoffrey Keating <geoffk@apple.com>
2679
2680 * Make-lang.in (java/gjavah.o): Update dependencies.
2681 * gjavah.c: Include ggc.h.
2682
2683 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
2684
2685 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
2686 (JCFDUMP_OBJS): Add ggc-none.o.
2687 (java/jcf-dump.o): Depend on GGC_H.
2688 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
2689 CPool substructures.
2690 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
2691 * jcf-dump.c: Include ggc.h.
2692
2693 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
2694
2695 * jcf.h (union cpool_entry): New.
2696 (struct CPool): Use gengtype to mark. Change field 'data' to be
2697 an array of unions.
2698 (struct JCF): Use gengtype to mark.
2699 (CPOOL_UINT): Update for new cpool_entry type.
2700 (CPOOL_USHORT1): Likewise.
2701 (CPOOL_USHORT2): Likewise.
2702 (CPOOL_FINISH): Use GC to free cpool subfields.
2703 * parse.h (struct parser_ctxt): Mark field current_jcf.
2704 * lex.c (java_init_lex): Use GC to allocate struct JCF.
2705 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
2706 (main_jcf): Use gengtype to mark.
2707 (ggc_mark_jcf): Delete.
2708 (get_constant): Update for new cpool_entry type.
2709 (give_name_to_class): Likewise.
2710 (get_class_constant): Likewise.
2711 (init_outgoing_cpool): Use GGC to allocate struct CPool.
2712 (java_parse_file): Use GGC to allocate struct JCF.
2713 (init_jcf_parse): Don't call ggc_add_root.
2714 * jcf-reader.c (jcf_parse_constant_pool): Update for new
2715 cpool_entry type.
2716 * java-tree.h (current_jcf): Use gengtype to mark.
2717 (CPOOL_UTF): Update for new cpool_entry type.
2718 (outgoing_cpool): Use gengtype to mark.
2719 (struct lang_type): GC struct JCF and struct CPool.
2720 * config-lang.in (gtfiles): Add jcf.h.
2721 * constants.c (find_tree_constant): New.
2722 (set_constant_entry): Allocate cpool subfields using GGC. Update
2723 for new cpool_entry type.
2724 (find_constant1): Update for new cpool_entry type.
2725 (find_constant2): Likewise.
2726 (find_utf8_constant): Use find_tree_constant.
2727 (find_class_or_string_constant): Remove unnecessary cast to jword.
2728 Update for new cpool_entry type.
2729 (count_constant_pool_bytes): Update for new cpool_entry type.
2730 (write_constant_pool): Likewise.
2731 (alloc_name_constant): Use find_tree_constant.
2732 (build_constants_constructor): Update for new cpool_entry type.
2733
2734 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
2735
2736 * parse.y (mark_parser_ctxt): Delete.
2737 (goal): Don't use ggc_add_root.
2738 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
2739 (java_pop_parser_context): Let GC free parser_ctxt.
2740 (java_parser_context_resume): Likewise.
2741 * parse.h (struct parser_ctxt): Use gengtype to mark.
2742 (ctxp): Likewise.
2743 (ctxp_for_generation): Likewise.
2744 * lex.h (struct java_lc_s): Mark for gengtype.
2745 (java_lexer): Rearrange for gengtype.
2746 * config-lang.in (gtfiles): Add lex.h, parse.h.
2747
2748 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2749
2750 * All Files: Remove PARAMS macro.
2751
2752 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
2753 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
2754 `__STDC__' macros.
2755
2756 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
2757 VA_CLOSE.
2758
2759 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
2760
2761 * Make-lang.in (java.install-common, java.uninstall,
2762 java.install-info, java.install-man): Prepend $(DESTDIR)
2763 to destination paths in all (un)installation commands.
2764 (java.install-common): Rewrite $(LN) command to support
2765 DESTDIR with "ln" as well as with "ln -s".
2766
2767 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
2768
2769 * java-tree.h: Protect against multiple inclusion.
2770
2771 2003-01-07 Tom Tromey <tromey@redhat.com>
2772
2773 * class.c (add_assume_compiled): Don't adjust parent if we're
2774 already at the root of tree.
2775
2776 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2777
2778 * lang.c (dump_compound_expr): Prototype.
2779
2780 2003-01-03 Tom Tromey <tromey@redhat.com>
2781
2782 Fix for PR java/8712:
2783 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
2784 when simply checking against `null'.
2785
2786 2003-01-03 Tom Tromey <tromey@redhat.com>
2787
2788 * gcj.texi (Standard Properties): Document http.proxyHost and
2789 http.proxyPort.
2790
2791 * gcj.texi (GNU Classpath Properties): Document new properties.
2792
2793 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
2794
2795 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
2796 java/lang-options.h, java/mangle.c, java/mangle_name.c,
2797 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
2798
2799 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
2800
2801 * Make-lang.in, boehm.c, buffer.c,
2802 buffer.h, builtins.c, class.c,
2803 config-lang.in, constants.c,
2804 convert.h, decl.c, except.c,
2805 expr.c, java-except.h,
2806 java-tree.h, javaop.def,
2807 jcf-parse.c, jcf-write.c,
2808 jv-scan.c, jvgenmain.c,
2809 jvspec.c, keyword.gperf,
2810 keyword.h, lang-options.h,
2811 lang-specs.h, lang.c, lex.c,
2812 lex.h, mangle.c, mangle_name.c,
2813 parse-scan.y, parse.h, parse.y,
2814 typeck.c, verify.c, xref.c,
2815 xref.h: Replace "GNU CC" with
2816 "GCC" in the copyright header.
2817
2818 * check-init.c, gjavah.c, javaop.h,
2819 jcf-depend.c, jcf-dump.c, jcf-io.c,
2820 jcf-path.c, jcf-reader.c, jcf.h,
2821 zextract.c, zipfile.h: These files are
2822 "part of GCC". Also say "GCC" not "GNU CC".
2823
2824 2002-12-30 DJ Delorie <dj@redhat.com>
2825
2826 * Make-lang.in: Protect against texi2pod/pod2man failing.
2827
2828 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
2829
2830 * gcj.texi: Use @copying.
2831
2832 2002-12-27 Mark Mitchell <mark@codesourcery.com>
2833
2834 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
2835 print_cxx_classname.
2836 (print_cxx_classname): Add add_scope parameter.
2837 (print_class_decls): Do not emit a semicolon after the extern
2838 "Java" block.
2839 (process_file): Adjust calls to print_cxx_classname.
2840
2841 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
2842
2843 * gcj.texi: Include Cover Texts in man page.
2844
2845 2002-12-23 Jeff Sturm <jsturm@one-point.com>
2846
2847 * class.c (build_static_field_ref): Check FIELD_FINAL.
2848
2849 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
2850 instead of current_constant_pool_data_ref.
2851 * java-tree.h (current_constant_pool_data_ref): Undefine.
2852 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
2853 * jcf-parse.c (init_outgoing_cpool): Don't initialize
2854 current_constant_pool_data_ref.
2855
2856 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
2857 not build_internal_class_name.
2858
2859 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
2860 Use it when class ref isn't certain to be compiled.
2861
2862 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
2863
2864 * gcj.texi: Include gcc-common.texi.
2865 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
2866 $(srcdir)/doc/include/gcc-common.texi.
2867
2868 2002-12-22 Anthony Green <green@redhat.com>
2869
2870 * gcj.texi (Limitations): Add note about org.xml.sax and
2871 org.w3c.dom.
2872
2873 2002-12-20 Tom Tromey <tromey@redhat.com>
2874
2875 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
2876 where minimum case value is Integer.MIN_VALUE.
2877 Fixes PR java/8955.
2878
2879 2002-12-18 Andrew Haley <aph@redhat.com>
2880
2881 * parse.y (patch_invoke): Force evaluation order when `check' is
2882 set. For PR libgcj/8945.
2883
2884 2002-12-16 Mark Mitchell <mark@codesourcery.com>
2885
2886 * gcj.texi: Change version number to 3.4.
2887
2888 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
2889 Andrew Haley <aph@redhat.com>
2890
2891 * parse.y (source_end_java_method): Remove custom encoding of line
2892 numbers for a function decl before passing it to the back end.
2893
2894 2002-12-03 Andrew Haley <aph@redhat.com>
2895
2896 * class.c (make_class_data): New field, "chain".
2897 * decl.c (java_init_decl_processing): Likewise.
2898
2899 2002-12-02 Tom Tromey <tromey@redhat.com>
2900
2901 For PR java/8740:
2902 * parse.y (do_resolve_class): Handle qualified name via
2903 recursion.
2904
2905 2002-11-30 Zack Weinberg <zack@codesourcery.com>
2906
2907 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
2908 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
2909 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
2910 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
2911 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
2912 Include coretypes.h and tm.h.
2913 * Make-lang.in: Update dependencies.
2914
2915 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2916
2917 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
2918
2919 2002-11-25 Diego Novillo <dnovillo@redhat.com>
2920
2921 * jcf-reader.c: Don't expand JCF_readu4 inside the
2922 expansion of JCF_SKIP.
2923
2924 2002-11-25 Diego Novillo <dnovillo@redhat.com>
2925
2926 * jcf-reader.c: Don't expand JCF_readu4 inside the
2927 expansion of JCF_SKIP.
2928
2929 2002-11-22 Tom Tromey <tromey@redhat.com>
2930
2931 * parse.y (patch_binop): Cast right hand side of shift expression
2932 to `int'. Fixes PR java/8676.
2933
2934 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
2935 Andrew Haley <aph@redhat.com>
2936
2937 * gcc/java/jcf-write.c (write_classfile): Remove target
2938 class file, if it exists, before renaming the temporary
2939 class file to it.
2940
2941 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
2942
2943 * jvspec.c (lang_specific_spec_functions): New.
2944
2945 2002-11-18 Tom Tromey <tromey@redhat.com>
2946
2947 Fix for PR java/7912:
2948 * expr.c (can_widen_reference_to): Allow cast of array to
2949 Cloneable or Serializable.
2950 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
2951 (java_io_serializable_identifier_node): Likewise.
2952 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
2953 (valid_ref_assignconv_cast_p): Use new identifier nodes.
2954 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
2955 java_io_serializable.
2956 * decl.c (java_init_decl_processing): Initialize
2957 java_lang_cloneable_identifier_node and
2958 java_io_serializable_identifier_node.
2959 (java_lang_cloneable_identifier_node): New global.
2960 (java_io_serializable_identifier_node): Likewise.
2961
2962 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
2963
2964 * buffer.c: Remove unnecessary casts.
2965 * check-init.c: Likewise.
2966 * class.c: Likewise.
2967 * constants.c: Likewise.
2968 * decl.c: Likewise.
2969 * except.c: Likewise.
2970 * gjavah.c: Likewise.
2971 * jcf-io.c: Likewise.
2972 * jcf-parse.c: Likewise.
2973 * jcf-path.c: Likewise.
2974 * jvspec.c: Likewise.
2975 * lang.c: Likewise.
2976 * lex.c: Likewise.
2977 * verify.c: Likewise.
2978
2979 2002-11-06 Tom Tromey <tromey@redhat.com>
2980
2981 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
2982 a JNI header.
2983
2984 2002-11-05 Tom Tromey <tromey@redhat.com>
2985
2986 Fix for PR java/6388.
2987 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
2988 * java-tree.h (enum java_tree_index): New values
2989 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
2990 (decimal_int_max, decimal_long_max): New defines.
2991 * lex.c (yylex): Rewrote range checking. Sign extend literals.
2992 (error_if_numeric_overflow): Rewrote range checking.
2993 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
2994 decimal_long_max.
2995
2996 2002-11-02 Tom Tromey <tromey@redhat.com>
2997
2998 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
2999
3000 * class.c (make_method_value): Put class name, not signature, into
3001 `throws' field. For PR java/8415.
3002
3003 2002-10-24 Tom Tromey <tromey@redhat.com>
3004
3005 * gcj.texi (Invoking gij): Document --showversion.
3006 (Standard Properties): java.library.path now set.
3007
3008 2002-10-23 Tom Tromey <tromey@redhat.com>
3009
3010 * gjavah.c (decode_signature_piece): In JNI mode, print
3011 `jobjectArray' when array depth is nonzero.
3012 Fixes PR java/8296.
3013
3014 2002-10-15 Andrew Haley <aph@redhat.com>
3015
3016 * parse.y (patch_invoke): Call force_evaluation_order on a static
3017 arg list.
3018 (resolve_qualified_expression_name): Call force_evaluation_order
3019 on a arg list that is part of a Qualified Expression Name.
3020
3021 * lang.c (dump_compound_expr): New.
3022 (java_dump_tree): New.
3023
3024 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
3025
3026 * gcj.texi: Added item describing the GCJ runtime property
3027 "gnu.gcj.progname".
3028
3029 2002-10-15 Richard Henderson <rth@redhat.com>
3030
3031 * jcf-parse.c (get_constant): Fix type warning.
3032
3033 2002-10-15 Andrew Haley <aph@redhat.com>
3034
3035 * java-tree.h (java_inlining_merge_static_initializers): Declare.
3036 (java_inlining_map_static_initializers): Declare.
3037
3038 2002-10-14 Andrew Haley <aph@redhat.com>
3039
3040 * tree-inline.c (remap_block): All local class initialization
3041 flags go in the outermost scope.
3042 (expand_call_inline): Call java_inlining_map_static_initializers.
3043 (expand_call_inline): Call java_inlining_merge_static_initializers.
3044 * java/lang.c (merge_init_test_initialization): New.
3045 (java_inlining_merge_static_initializers): New.
3046 (inline_init_test_initialization): New.
3047 (java_inlining_map_static_initializers): New.
3048
3049 2002-10-11 Mark Wielaard <mark@klomp.org>
3050
3051 * gcj.texi (Compatibility): Add Limitations and Extensions section.
3052
3053 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3054
3055 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
3056
3057 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3058
3059 * parse.y (merge_string_cste): Add parentheses around & within |.
3060
3061 2002-10-08 Tom Tromey <tromey@redhat.com>
3062
3063 * parse.y (variable_declarator_id): Simplify error path for
3064 array declarator error. For PR java/8003.
3065
3066 2002-10-08 Zack Weinberg <zack@codesourcery.com>
3067
3068 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
3069 bug_report_url.
3070
3071 2002-10-08 Andrew Haley <aph@redhat.com>
3072
3073 * parse.y (attach_init_test_initialization_flags): Check for
3074 error_mark_node.
3075
3076 2002-10-07 Anthony Green <green@redhat.com>
3077
3078 * parse.y (merge_string_cste): Fix bug in string concatenation.
3079
3080 2002-10-03 Michael Koch <konqueror@gmx.de>
3081
3082 * gcj.texi (Standard properties):
3083 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
3084
3085 2002-10-02 Roger Sayle <roger@eyesopen.com>
3086
3087 PR optimization/6627
3088 * lang.c (java_init): If storing the vbit in function
3089 pointers, ensure that force_align_functions_log is atleast
3090 one to aid compatability with g++ vtables.
3091
3092 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
3093
3094 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
3095 foul of type-based aliasing.
3096
3097 2002-09-30 Anthony Green <green@redhat.com>
3098
3099 * gcj.texi (Invoking jv-scan): Fix texinfo.
3100
3101 2002-09-28 Anthony Green <green@redhat.com>
3102
3103 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
3104 (Code Generation): Add -fno-assert documentation.
3105 * jv-scan.c (flag_assert): New global.
3106 (options): Add assert option.
3107 (help): Add --no-assert documentation.
3108 * parse-scan.y (flag_assert): New global.
3109 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
3110 (flag_assert): New global.
3111 * java-tree.h (flag_assert): New global.
3112 * lex.c (java_lex): Obey flag_assert.
3113 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
3114 calling cc1.
3115
3116 2002-09-26 Andrew Haley <aph@redhat.com>
3117
3118 * expr.c (build_java_array_length_access): Check for null pointer.
3119 * expr.c (expand_java_arrayload): Likewise.
3120
3121 2002-09-21 Richard Henderson <rth@redhat.com>
3122
3123 * jcf-parse.c (get_constant): Decode from IEEE no matter
3124 what the target format.
3125
3126 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
3127
3128 * ChangeLog: Follow spelling conventions.
3129 * class.c: Likewise.
3130 * decl.c: Likewise.
3131 * expr.c: Likewise.
3132 * gjavah.c: Likewise.
3133 * java-tree.h: Likewise.
3134 * jcf-dump.c: Likewise.
3135 * jcf-parse.c: Likewise.
3136 * jvspec.c: Likewise.
3137 * lang.c: Likewise.
3138 * mangle.c: Likewise.
3139 * parse.y: Likewise.
3140
3141 2002-09-17 Tom Tromey <tromey@redhat.com>
3142
3143 * lex.c (java_read_unicode_collapsing_terminators): Handle case
3144 where \r appears at EOF. Fixes PR java/7950.
3145
3146 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3147
3148 * jvspec.c (lang_specific_driver): Remove unused variable.
3149
3150 2002-09-16 Geoffrey Keating <geoffk@apple.com>
3151
3152 * java-tree.h (union lang_tree_node): Add chain_next option.
3153
3154 2002-09-16 Richard Henderson <rth@redhat.com>
3155
3156 * jcf-parse.c (get_constant): Runtime check for IEEE format;
3157 use new real.h interface.
3158 * jcf-write.c (find_constant_index): Use new real.h interface.
3159 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
3160
3161 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
3162
3163 * lang.c: Follow spelling conventions.
3164
3165 2002-09-11 Per Bothner <per@bothner.com>
3166
3167 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
3168 constant to the type of the field.
3169 (java_complete_tree): Remove now-redundant code.
3170
3171 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
3172
3173 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
3174
3175 For PR java/5794:
3176 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
3177 return label if a ret instruction for the jsr has been reached.
3178
3179 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
3180
3181 * parse.y (DIR_SEPARATOR): Don't define.
3182 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
3183
3184 2002-08-28 Andrew Haley <aph@redhat.com>
3185
3186 * verify.c (verify_jvm_instructions): Allow exception handler
3187 inside code that is being protected, but generate a warning.
3188 * except.c (link_handler): Initialize `expanded' in new eh_range.
3189 (binding_depth, is_class_level, current_pc): Declare extern.
3190
3191 2002-09-01 Mark Wielaard <mark@klomp.org>
3192
3193 * gcj.texi: Add chapter about system properties.
3194 Fixed some typos.
3195
3196 2002-08-26 Tom Tromey <tromey@redhat.com>
3197
3198 * parse.y (try_builtin_assignconv): Allow narrowing primitive
3199 conversion if RHS_TYPE is byte, short, or char.
3200
3201 2002-08-22 Tom Tromey <tromey@redhat.com>
3202
3203 * gcj.texi (Invoking gij): Document -cp and -classpath.
3204
3205 2002-08-21 Tom Tromey <tromey@redhat.com>
3206
3207 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
3208 $(prefix)/share. For PR libgcj/7633.
3209
3210 For PR java/6005 and PR java/7611:
3211 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
3212 (java_can_use_bit_fields_p): New function.
3213
3214 2002-08-16 Tom Tromey <tromey@redhat.com>
3215
3216 * gcj.texi (Class Initialization): Mention class initialization of
3217 arrays.
3218
3219 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
3220
3221 * Make-lang.in (java-tree-inline.o): New.
3222 (JAVA_OBJS): Add java-tree-inline.o.
3223 * parse.y (source_end_java_method): Call java_optimize_inline.
3224 (java_expand_method_bodies): Save method's tree in
3225 DECL_SAVED_TREE.
3226 (add_stmt_to_compound): Keep track of the number of statments.
3227 * lang.c (java_init): Enable flag_inline_trees.
3228 (java_post_options): If flag_inline_functions is on, enable
3229 flag_inline_trees instread.
3230 (decl_constant_value): New.
3231 (java_tree_inlining_walk_subtrees): New.
3232 * java-tree.h (DECL_NUM_STMTS): New macro.
3233 (java_optimize_inline): Declare.
3234 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
3235 Handle a LABEL_EXPR.
3236 * decl.c (build_result_decl): If we already have a DECL_RESULT
3237 don't make another.
3238 (dump_function): New.
3239 (java_optimize_inline): New.
3240 (dump_function): New.
3241
3242 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
3243
3244 For PR java/7483:
3245 * parse.y (build_assertion): Invert return from
3246 desiredAssertionStatus.
3247
3248 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3249
3250 * jcf-write.c (get_access_flags): Return correct access flags for
3251 private and protected inner classes.
3252
3253 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
3254
3255 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
3256
3257 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
3258
3259 * mangle_name.c: Don't include obstack.h twice.
3260 * xref.c: Don't include obstack.h.
3261
3262 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
3263
3264 * class.c: (permanent_obstack): Delete declaration.
3265 * constants.c: (permanent_obstack): Delete declaration.
3266 * except.c: (permanent_obstack): Delete declaration.
3267 * expr.c: (permanent_obstack): Delete declaration.
3268 * jcf-parse.c: (permanent_obstack): Delete declaration.
3269 (saveable_obstack): Delete declaration.
3270 * parse.h: (permanent_obstack): Delete declaration.
3271 * typeck.c: (permanent_obstack): Delete declaration.
3272
3273 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
3274
3275 * gcj.texi (version-gcc): Increase to 3.3.
3276
3277 2002-07-22 Tom Tromey <tromey@redhat.com>
3278
3279 * lex.c (java_lex): Check for `e' or `E' after 0.
3280
3281 2002-07-21 Richard Henderson <rth@redhat.com>
3282
3283 * lang.c (java_unsafe_for_reeval): New.
3284 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
3285
3286 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
3287
3288 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
3289 (jcf_path_init): Use GET_ENVIRONMENT.
3290
3291 2002-07-10 Roger Sayle <roger@eyesopen.com>
3292 Zack Weinberg <zack@codesourcery.com>
3293
3294 * builtins.c (initialize_builtins): Remove defines that
3295 handled C/C++ specific junk hereby removed from builtins.def.
3296
3297 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
3298
3299 * lang.c (java_post_options): Update prototype.
3300
3301 2002-07-05 Roger Sayle <roger@eyesopen.com>
3302
3303 * builtins.c (initialize_builtins): Ignore the additional
3304 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
3305 the builtins.def file.
3306
3307 2002-07-01 Tom Tromey <tromey@redhat.com>
3308
3309 For PR libgcj/7073:
3310 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
3311 specially.
3312
3313 2002-07-01 Roger Sayle <roger@eyesopen.com>
3314
3315 * java/decl.c (builtin_function): Accept additional parameter.
3316 (java_init_decl_processing): Pass an additional NULL_TREE
3317 argument to builtin_function.
3318
3319 2002-06-29 T.J. Mather <tjmather@maxmind.com>
3320
3321 * gcj.texi: Fixed gcj invocation example so that it compiles.
3322
3323 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3324
3325 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
3326 * parse.y (mark_parser_ctxt): Likewise.
3327 (check_modifiers, declare_local_variables): Avoid incorrect
3328 hardcoded constant 10.
3329
3330 * lex.c (java_read_char): Avoid "comparison is always true"
3331 warning.
3332
3333 2002-06-25 Andreas Schwab <schwab@suse.de>
3334
3335 * expr.c (JSR): Avoid undefined operation on PC.
3336
3337 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3338
3339 * decl.c (clear_binding_level): Const-ify.
3340
3341 2002-06-13 Akim Demaille <akim@epita.fr>
3342
3343 * parse.y (class_declaration, interface_declaration): Make sure
3344 all their rules have an action, in order to avoid meaningless `$$
3345 = $1' and their type clashes.
3346
3347 2002-06-11 Tom Tromey <tromey@redhat.com>
3348
3349 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
3350 * parse-scan.y (statement_without_trailing_substatement): Added
3351 assert_statement.
3352 (assert_statement): New rule.
3353 * java-tree.h (struct lang_type) [assertions]: New field.
3354 (TYPE_USES_ASSERTIONS): New macro.
3355 (CLASS_USES_ASSERTIONS): Likewise.
3356 (FIELD_SYNTHETIC): New define.
3357 * lex.c (java_lval;): Added ASSERT_TK.
3358 * parse.y (ASSERT_TK): Added.
3359 (statement_without_trailing_substatement): Added assert_statement.
3360 (assert_statement): New rule.
3361 (build_assertion): New function.
3362 (maybe_generate_pre_expand_clinit): Create and initialize
3363 $assertionsDisabled.
3364 (lookup_package_type): Removed decl.
3365 * keyword.h: Rebuilt.
3366 * keyword.gperf (assert): New token.
3367
3368 2002-06-10 Akim Demaille <akim@epita.fr>
3369
3370 * parse.y (interface_type_list, class_member_declaration)
3371 (unary_expression_not_plus_minus): Remove duplicate %type.
3372 Whitespace changes.
3373
3374 2002-06-09 Tom Tromey <tromey@redhat.com>
3375
3376 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
3377
3378 * parse.y (method_header): Give error message in all cases.
3379 Fixes PR java/6865.
3380
3381 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3382
3383 Don't use RTL inlining. Fix for PR java/6820.
3384 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
3385 (flag_really_inline): New.
3386 (java_decode_option): Set flag_really_inline if -finline-functions
3387 is seen.
3388 (java_post_options): New function. Turn off inlining unless
3389 flag_really_inline is set.
3390
3391 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3392
3393 * gjavah.c (throwable_p): Accept argument as either a classname or
3394 signature fragment. Create null-terminated classname string for super
3395 when calling itself recursively.
3396 (decode_signature_piece): Skip first character from class name
3397 signature when calling throwable_p.
3398
3399 2002-06-08 H.J. Lu (hjl@gnu.org)
3400
3401 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
3402
3403 2002-06-04 Tom Tromey <tromey@redhat.com>
3404
3405 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
3406
3407 2002-06-04 Michael Koch <konqueror@gmx.de>
3408
3409 * gcj.texi (Input Options): Fixed typo.
3410
3411 2002-06-04 Zack Weinberg <zack@codesourcery.com>
3412
3413 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
3414 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
3415 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
3416 and all now-pointless local variables. Rename other local
3417 variables to reflect their not being handles.
3418
3419 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
3420 #if JCF_USE_STDIO blocks.
3421
3422 * parse.y: Add missing semicolon at end of rule.
3423
3424 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
3425
3426 * check-init.c (attach_initialized_static_class): Delete, unused.
3427 * parse.y: Use htab_t instead of struct hashtable, update
3428 all uses.
3429 * java-tree.h: Include hashtab.h instead of hash.h.
3430 (struct lang_decl_func): Use htab_t, set up for gengtype.
3431 (struct init_test_hash_entry): Delete.
3432 (struct treetreehash_entry): New.
3433 (java_treetreehash_find): New
3434 (java_treetreehash_new): New prototype.
3435 (java_treetreehash_create): New prototype.
3436 (java_mark_tree): Delete prototype.
3437 (java_hash_hash_tree_node): Delete prototype.
3438 (java_hash_compare_tree_node): Delete prototype.
3439 (attach_initialized_static_class): Delete prototype.
3440 * expr.c (build_class_init): Update to use java_treetreehash
3441 functions.
3442 (java_expand_expr): Update to use htab_t.
3443 (emit_init_test_initialization): Likewise.
3444 * decl.c (java_mark_tree): Delete.
3445 * class.c (init_test_hash_newfunc): Delete.
3446 (java_hash_hash_tree_node): Delete.
3447 (java_hash_compare_tree_node): Delete.
3448 (add_method_1): Update to use java_treetreehash functions.
3449 (JAVA_TREEHASHHASH_H): New macro.
3450 (java_treetreehash_hash): New function.
3451 (java_treetreehash_compare): New function.
3452 (java_treetreehash_find): New function.
3453 (java_treetreehash_new): New function.
3454 (java_treetreehash_create): New function.
3455 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
3456
3457 * Make-lang.in (java/parse.o): Depend on debug.h.
3458 * java-tree.h (struct lang_identifier): Use gengtype.
3459 (union lang_tree_node): New.
3460 (struct lang_decl_func): Use gengtype.
3461 (struct lang_decl_var): Likewise.
3462 (struct lang_decl): Likewise.
3463 * parse.y: Include debug.h.
3464 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
3465
3466 * lang.c (struct language_function): New dummy structure.
3467
3468 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
3469 descriminator for DECL_LANG_SPECIFIC.
3470 (struct lang_decl_func): Rename from struct lang_decl.
3471 (enum lang_decl_desc): New.
3472 (struct lang_decl): Make it a union. Update all the accessor macros.
3473 (struct lang_type): Use gengtype.
3474 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
3475 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
3476 are now the same size.
3477 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
3478 use discriminator to mark DECL_LANG_SPECIFIC.
3479
3480 * Make-lang.in (gt-java-builtins.h): New rule.
3481 (java/builtins.o): Add dependency on gt-<filename>.h.
3482 * builtins.c: Use gengtype for roots.
3483 (union string_or_tree): Use gengtype.
3484 (struct builtin_record): Use gengtype.
3485 * config-lang.in (gtfiles): Add builtins.c.
3486
3487 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
3488 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
3489 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
3490 gt-java-parse.h, gtype-java.h): Add rules to generate.
3491 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
3492 (class.o): Add dependency on gt-*.h.
3493 (constants.o): Likewise.
3494 (decl.o): Likewise.
3495 (expr.o): Likewise.
3496 (jcf-parse.o): Likewise.
3497 (jcf-write.o): Likewise.
3498 (lang.o): Likewise.
3499 * config-lang.in (gtfiles): New.
3500 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3501 * constants.c: Replace uses of ggc_add_* with GTY markers.
3502 Include gt-*.h.
3503 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3504 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3505 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
3506 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
3507 Include gt-*.h.
3508 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
3509 Include gt-*.h.
3510 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3511 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
3512 gt-*.h.
3513 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3514 Include gtype-java.h.
3515
3516 2002-06-02 Tom Tromey <tromey@redhat.com>
3517
3518 Fix for PR java/5913:
3519 * parse.y (patch_binop): Call patch_string on op1.
3520
3521 2002-06-02 Tom Tromey <tromey@redhat.com>
3522
3523 Fix for PR java/1343, PR java/6336:
3524 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
3525 formatting. Changed return type.
3526 (anonymous_class_counter): Moved to top of file.
3527 (maybe_make_nested_class_name): Append number to class name for
3528 function-local classes.
3529
3530 2002-05-28 Zack Weinberg <zack@codesourcery.com>
3531
3532 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
3533 * Make-lang.in: Update dependency lists.
3534
3535 2002-05-18 Mark Mitchell <mark@codesourcery.com>
3536
3537 * gjavah.c (throwable_p): Do not free the name of the class after
3538 passing it to find_class.
3539 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
3540 * jcf-io.c (dirent.h): Include it.
3541 (fnmatch.h): Likewise.
3542 (compare_path): New function.
3543 (java_or_class_file): Likewise.
3544 (memoized_dirlist_entry): New type.
3545 (memoized_dirlist_lookup_eq): New function.
3546 (memoized_dirlists): New variable.
3547 (caching_stat): New function.
3548 (memoized_class_lookup_eq): New function.
3549 (memoized_class_lookups): Likewise.
3550 (find_class): Use memoized_class_lookups and caching_stat.
3551 * jcf.h (JCF_USE_SCANDIR): Define.
3552 * parse.y (java_expand_classes): Write the class files in reverse
3553 order.
3554
3555 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3556
3557 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
3558
3559 2002-05-13 Mark Mitchell <mark@codesourcery.com>
3560
3561 * jcf-write.c (write_classfile): Unlink the temporary file if it
3562 cannot be renamed. Use concat to build up the name of the
3563 temporary file.
3564
3565 2002-05-08 Mark Mitchell <mark@codesourcery.com>
3566
3567 * jcf-write.c (write_classfile): Write the file to a
3568 temporary file and then rename it.
3569
3570 2002-05-07 Tom Tromey <tromey@redhat.com>
3571
3572 * gjavah.c (throwable_p): Use xstrdup, not strdup.
3573
3574 Fix for PR java/1200:
3575 * gjavah.c (throwable_p): New function.
3576 (decode_signature_piece): Use it. A `WeakReference' isn't the
3577 same as a `jweak'.
3578 Include hashtab.h.
3579 (gcjh_streq): New function.
3580
3581 2002-05-07 Andreas Jaeger <aj@suse.de>
3582
3583 * parse.y (finish_for_loop): Fix if statement.
3584
3585 2002-05-06 Tom Tromey <tromey@redhat.com>
3586
3587 Fix for PR java/5941:
3588 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
3589 loop update expression.
3590 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
3591 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
3592
3593 2002-05-04 Mark Wielaard <mark@klomp.org>
3594
3595 For PR java/6519:
3596 * parse.y (build_string_concatenation): Return just op1 only when op2
3597 is null and op1 is a STRING_CST, otherwise always construct a
3598 StringBuffer.
3599
3600 2002-04-27 Tom Tromey <tromey@redhat.com>
3601
3602 For PR java/6382:
3603 * parse.y (string_convert_int_cst): New function.
3604 (merge_string_cste): Use it.
3605
3606 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
3607
3608 * java-tree.h (java_parse_file): Update.
3609 (java_set_yydebug): Remove.
3610 * jcf-parse.c (yydebug): Remove.
3611 (java_set_yydebug): Die.
3612 (java_parse_file): Update.
3613 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
3614
3615 2002-04-24 Tom Tromey <tromey@redhat.com>
3616
3617 For PR java/6425:
3618 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
3619 EXPR_WFL_QUALIFICATION of qual_wfl.
3620
3621 2002-04-23 Per Bothner <per@bothner.com>
3622
3623 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
3624 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
3625 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
3626
3627 2002-04-23 Tom Tromey <tromey@redhat.com>
3628
3629 For PR java/6314:
3630 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
3631 recognize `-fcompile-resource='.
3632 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
3633 a bit.
3634
3635 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
3636
3637 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
3638 paths. Fixes PR java/2791.
3639
3640 2002-04-19 Andrew Haley <aph@redhat.com>
3641
3642 * jcf-write.c (push_long_const): lo, hi: New variables.
3643 Use rshift_double to extract the high part of a 64-bit long.
3644 Use WORD_TO_INT to extract the low part.
3645
3646 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
3647 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
3648 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
3649
3650 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
3651
3652 * typeck.c (incomplete_type_error): Remove.
3653
3654 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3655
3656 * class.c (make_class_data): Set DECL_ALIGN on static class data,
3657 for hash synchronization.
3658 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
3659 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
3660 class_type_node.
3661
3662 2002-04-16 Mark Wielaard <mark@klomp.org>
3663
3664 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
3665 negative zero.
3666
3667 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3668
3669 Fix for PR java/6294:
3670 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
3671 interfaces.
3672
3673 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3674
3675 Fix for PR java/6085:
3676 * parse.y (patch_method_invocation): Always use build_access_to_thisn
3677 to get enclosing "this" argument for inner-class constructor
3678 invocation. Pass correct arguments to build_access_to_thisn.
3679
3680 2002-04-10 Andreas Jaeger <aj@suse.de>
3681
3682 * gcj.texi (Input Options): Fix extdirs patch.
3683
3684 2002-04-10 Anthony Green <green@redhat.com>
3685
3686 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
3687
3688 2002-04-09 Anthony Green <green@redhat.com>
3689
3690 * gcj.texi (Input Options): Add --extdirs documentation.
3691 * jcf-dump.c (OPT_extdirs): New macro.
3692 (options): Add extdirs option.
3693 (help): Describe --extdirs.
3694 (main): Handle OPT_extdirs.
3695 * gjavah.c (OPT_extdirs): New macro.
3696 (options): Add extdirs option.
3697 (help): Describe --extdirs.
3698 (main): Handle OPT_extdirs.
3699 * jcf-path.c (jcf_path_init): Add extdirs support.
3700 (jcf_path_extdirs_arg): New function.
3701 (extensions): New variable to hold extensions path entries.
3702 * jvspec.c: Remove -fextdirs= when compiling main().
3703 * lang.c (java_decode_option): Handle -fextdirs=.
3704 * jcf.h (jcf_path_extdirs_arg): Declare new function.
3705 * Make-lang.in: Compile jcf-path with version info for use in
3706 identifying the appropriate libgcj.jar.
3707
3708 2002-04-08 Tom Tromey <tromey@redhat.com>
3709
3710 For PR libgcj/5303:
3711 * .cvsignore: Added rmic.1 and rmiregistry.1.
3712 * gcj.texi (Top): Link to new nodes.
3713 (Invoking rmic): New node.
3714 (Invoking rmiregistry): Likewise.
3715 * Make-lang.in (java.generated-manpages): Added rmic.1 and
3716 rmiregistry.1.
3717 (java.maintainer-clean): Likewise.
3718 ($(srcdir)/java/rmic.1): New target.
3719 ($(srcdir)/java/rmiregistry.1): Likewise.
3720 (java.install-man): Handle rmic.1 and rmiregistry.1.
3721
3722 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3723
3724 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
3725 Add note about handling uncaught exceptions. Add an exception handler
3726 to example.
3727
3728 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3729
3730 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
3731 after using it to patch CALL_EXPR.
3732
3733 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3734
3735 * gcj.texi (Invocation): Document CNI invocation API.
3736
3737 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
3738
3739 * expr.c (truthvalue_conversion): Rename. Update.
3740 (expand_compare): Update.
3741 * java-tree.h (java_truthvalue_conversion): New.
3742 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3743
3744 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
3745
3746 * java-tree.h (java_mark_addressable): New.
3747 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
3748 * typeck.c (mark_addressable): Rename, update.
3749
3750 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
3751
3752 * expr.c (build_java_binop): Update.
3753 * java-tree.h (java_signed_type, java_unsigned_type,
3754 java_signed_or_unsigned_type): Update.
3755 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3756 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
3757 * parse.y (patch_binop): Update.
3758 * typeck.c (signed_or_unsigned_type, unsigned_type,
3759 signed_type): Update.
3760
3761 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
3762
3763 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
3764 (java_dummy_print): Remove.
3765 (lang_print_error): Rename. Exit early if inhibiting output.
3766 (inhibit_error_printing_function): New.
3767 (java_init): Don't set hook.
3768 (lang_init_source): Use new boolean.
3769
3770 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
3771
3772 * parse.y (do_resolve_class): Fix infinite recursion.
3773
3774 2002-03-29 Tom Tromey <tromey@redhat.com>
3775
3776 * parse.y (check_inner_circular_reference): Ignore incomplete
3777 types.
3778
3779 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
3780
3781 * Make-lang.in (builtins.o): Update.
3782 * boehm.c (get_boehm_type_descriptor): Update.
3783 * builtins.c: Include langhooks.h.
3784 * decl.c (java_init_decl_processing): Update.
3785 * java-tree.h (java_type_for_mode, java_type_for_size): New.
3786 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
3787 Redefine.
3788 * typeck.c (type_for_mode, type_for_size): Update.
3789
3790 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
3791
3792 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
3793
3794 2002-03-28 Tom Tromey <tromey@redhat.com>
3795
3796 * except.c (expand_end_java_handler): If the handler type is NULL,
3797 use java.lang.Throwable. Fixes PR java/5986.
3798
3799 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
3800
3801 Fix for PR java/4715:
3802 * jcf-parse.c (parse_source_file_3): New function.
3803 (read_class): Call it.
3804 (java_parse_file): Likewise.
3805
3806 2002-03-28 Jan Hubicka <jh@suse.cz>
3807
3808 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
3809
3810 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3811
3812 * parse.y (resolve_package): Initialize "decl".
3813 (lookup_package_type): Remove unused function.
3814
3815 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3816
3817 Fix for PR java/5993:
3818 * parse.y (resolve_package): Return the decl if resolution was
3819 successful. Don't special case "java.lang" and "java.lang.reflect"
3820 packages. Set type_name to the merged identifier.
3821 (resolved_qualified_expression_name): Print error using "name" if
3822 resolve_package returns NULL_TREE.
3823
3824 2002-03-27 Tom Tromey <tromey@redhat.com>
3825
3826 * expr.c (expand_invoke): Don't generate null pointer check if
3827 we're calling <init>.
3828
3829 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
3830
3831 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
3832 fix prototype.
3833 * java-tree.h (java_lang_expand_expr): Similarly.
3834 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
3835 (java_init): Don't set hook.
3836
3837 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3838
3839 Fix for PR java/5850:
3840 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
3841 context if field was not found in the current scope.
3842 * expr.c (lookup_field): Don't look in enclosing contexts.
3843
3844 2002-03-26 Tom Tromey <tromey@redhat.com>
3845
3846 Fix for PR java/5942:
3847 * parse.y (init_src_parse): Added sanity check.
3848 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
3849 elements, not 11.
3850
3851 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
3852
3853 * decl.c (lang_mark_tree): Rename java_mark_tree.
3854 * java-tree.h (java_mark_tree): New.
3855 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
3856
3857 2002-03-25 Zack Weinberg <zack@codesourcery.com>
3858
3859 * lex.c: Change java_perform_atof to take normal parameters
3860 instead of a pointer to a parameter block. Call it directly
3861 from java_lex.
3862
3863 2002-03-22 Mark Wielaard <mark@klomp.org>
3864
3865 Fix for PR java/5368:
3866 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
3867 when printing error message.
3868
3869 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
3870
3871 * decl.c (maybe_build_cleanup): Remove.
3872
3873 2002-03-22 Tom Tromey <tromey@redhat.com>
3874
3875 Andrew Haley <aph@cambridge.redhat.com>
3876
3877 * expr.c (build_field_ref): Don't build a check if the field is a
3878 member of `this'.
3879
3880 2002-03-21 Eric Blake <ebb9@email.byu.edu>
3881
3882 Fix for PR java/6026:
3883 * lex.c (java_lex): Fix parsing of consecutive floats.
3884
3885 2002-03-21 Tom Tromey <tromey@redhat.com>
3886
3887 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
3888 class.
3889
3890 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
3891
3892 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3893 insert_block, getdecls, kept_level_p, global_bindings_p): New.
3894
3895 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
3896
3897 * gcj.texi: @code{gcj} becomes @command{gcj}.
3898 @code{gcc} becomes @command{gcc}.
3899 GcjRaw changed to gnu.gcc.RawData.
3900
3901 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
3902
3903 * decl.c (start_java_method): Use new hook.
3904 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3905 (java_init): Remove old hook.
3906
3907 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
3908
3909 * builtins.c (define_builtin): Do nothing if `type' is null.
3910 Fixes PR java/5876.
3911
3912 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3913
3914 * parse.y (parser_check_super_interface): Fix error message
3915 grammar/order.
3916
3917 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3918
3919 * jcf-parse.c (get_constant): Delete unused variables.
3920
3921 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
3922
3923 * java-tree.h (java_parse_file): New.
3924 * jcf-parse.c (yyparse): Rename java_parse_file.
3925 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3926
3927 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3928
3929 * parse.y (craft_constructor): Return the constructor decl.
3930 (java_expand_classes): Update comments.
3931 (lookup_method_invoke): Call fix_constructors immediately for
3932 anonymous class. Fixes PR java/5935.
3933
3934 2002-03-15 Anthony Green <green@redhat.com>
3935
3936 * jcf-parse.c (yyparse): Don't emit class registration
3937 constructor when compiling resource files.
3938
3939 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3940
3941 * lang.c (java_tree_code_type, java_tree_code_length,
3942 tree_code_name): Delete.
3943 (tree_code_type, tree_code_length, tree_code_name): Define.
3944 (java_init): Don't try to copy into the various tree_code
3945 arrays.
3946
3947 2002-03-12 Tom Tromey <tromey@redhat.com>
3948
3949 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
3950 UTF-8, not UCS-2. Fixes PR java/5923.
3951
3952 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
3953 a call_expr wrapped in a convert. Fixes PR java/5848.
3954
3955 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3956
3957 * jcf-write.c (write_classfile): Improve error strings.
3958
3959 2002-03-11 Eric Blake <ebb9@email.byu.edu>
3960
3961 * lex.c: Adjust comments to GNU standards.
3962
3963 2002-03-11 Eric Blake <ebb9@email.byu.edu>
3964
3965 Fix for PR java/5902:
3966 * lex.c (java_lex): Fix parsing of literals.
3967
3968 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3969
3970 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
3971 to prevent it getting evaluated twice in the store checking case.
3972 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
3973 examining OBJECT.
3974
3975 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3976
3977 * decl.c (java_init_decl_processing): Make sure class_type_node
3978 alignment is not less than 64 bits if hash synchronization is enabled.
3979
3980 2002-03-08 Per Bothner <per@bothner.com>
3981
3982 * parse.y (java_complete_lhs): Check if patch_assignment
3983 returned an error-mark.
3984
3985 * parse.y (try_builtin_assignconv): Don't special-case zero.
3986
3987 2002-03-08 Per Bothner <per@bothner.com>
3988
3989 Fix for PR java/5812.
3990 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
3991 here instead of in JSR macro. Likewise with load_type_state call.
3992 Do the latter on if the return_pc has been verified (the jsr returns).
3993 (JSR): Now just call build_java_jsr.
3994
3995 2002-03-07 Jeff Sturm <jsturm@one-point.com>
3996
3997 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
3998 (java.install-common): Link native driver to
3999 JAVA_TARGET_INSTALL_NAME.
4000
4001 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
4002
4003 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
4004 * builtins.c(sin_builtin): Likewise
4005 * builtins.c(sqrt_builtin): Likewise
4006
4007 2002-03-03 Zack Weinberg <zack@codesourcery.com>
4008
4009 * java/expr.c, java/jcf-parse.c, java/lex.c:
4010 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
4011 REAL_ARITHMETIC blocks unconditional. Delete some further
4012 #ifdef blocks predicated on REAL_ARITHMETIC.
4013
4014 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4015
4016 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
4017 explicit sizeof/sizeof.
4018 * decl.c (java_init_decl_processing): Likewise.
4019 * jcf-parse.c (init_jcf_parse): Likewise.
4020 * parse.y (init_src_parse): Likewise.
4021
4022 2002-03-02 Per Bothner <per@bothner.com>
4023
4024 Make --CLASSPATH by a synonym for --classpath and -classpath.
4025 Implement --bootclasspath.
4026 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
4027 (classpath_l): Remove.
4028 (jcf_path_CLASSPATH_arg): Remove.
4029 (jcf_path_bootclasspath_arg): New function.
4030 (jcf_path_seal): Simplify accordingly.
4031
4032 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
4033 (jcf_path_CLASSPATH): Remove declaration.
4034 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
4035 (lang_specific_driver): Translate -bootclasspath.
4036 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
4037 * lang.c (decode_lang_options): Do jcf_path_init first.
4038 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
4039 * gjavah.c: Also handle --bootclasspath.
4040 Handle --CLASSPATH as a synonum for --classpath.
4041 * jcf-dump.c: Likewise.
4042
4043 "." is not part of system path, but is the default for --classpath.
4044 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
4045 (jcf_path_seal): Add "." if no CLASSPATH specified.
4046
4047 * gcj.texi: Document changes.
4048
4049 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4050
4051 * expr.c (build_java_arraystore_check): Fix formatting.
4052
4053 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
4054
4055 Fix for PR java/5758, java/5632:
4056 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
4057 inner-class separator too.
4058 * parse.y (do_resolve_class): New local `decl_result.'
4059 Progressively build a name for what can have been loaded.
4060
4061 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4062
4063 * expr.c (java_array_data_offset): Removed function.
4064 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
4065 (build_java_array_length_access): Obtain "length" value using a
4066 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
4067 (build_java_arrayaccess): Correct comment. Access "data" using a
4068 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
4069 (build_java_arraystore_check): New function.
4070 (expand_java_arraystore): Use build_java_arraystore_check.
4071 * parse.y (patch_assignment): Simplify code to insert a store check
4072 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
4073 * check-init.c (check_init): Update to reflect that an array length
4074 access is now a COMPONENT_REF.
4075 * gcj.texi (Code Generation): Improve documentation of
4076 -fno-bounds-check. Add documentation for -fno-store-check.
4077 * java-tree.h (flag_store_check): Declare.
4078 (build_java_arraystore_check): Declare.
4079 * lang.c (flag_store_check): Initialize to 1.
4080 (lang_f_options): Add store-check option.
4081 * jvspec.c: Don't pass store-check option to jvgenmain.
4082 * lang-options.h: Add help string for -fno-store-check.
4083
4084 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
4085
4086 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
4087 * java-tree.h (java_dup_lang_specific_decl): New.
4088 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
4089
4090 2002-02-27 Zack Weinberg <zack@codesourcery.com>
4091
4092 * builtins.c, decl.c: Delete traditional-mode-related code
4093 copied from the C front end but not used, or used only to
4094 permit the compiler to link.
4095
4096 2002-02-22 Tom Tromey <tromey@redhat.com>
4097
4098 Fix for PR java/2369:
4099 * jvspec.c (verify_class_name): New function.
4100 (lang_specific_driver): Call it.
4101 (JAVA_START_CHAR_P): New macro.
4102 (JAVA_PART_CHAR_P): Likewise.
4103
4104 2002-02-22 Per Bothner <per@bothner.com>
4105
4106 * class.c: Change vtable to be more compatible with g++ v3 abi.
4107 (get_dispatch_table): Prepend offset-to-top (always 0) and
4108 type_info pointer (currently unimplemented hence NULL) to vtable.
4109 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
4110 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
4111 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
4112 (build_dtable_decl): Add declarations for new fields.
4113
4114 2002-02-20 Per Bothner <per@bothner.com>
4115
4116 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
4117 to finit$ (otherwise generate_bytecode_insns drops it). However, we
4118 don't need to set it on the COMPOUND_EXPR - the caller does that.
4119
4120 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
4121
4122 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
4123 `--CLASSPATH' becomes `--classpath.'
4124 * gjavah.c: Likewise.
4125 * jcf-dump.c: Likewise.
4126 * lang-options.h: Likewise.
4127 * lang.c: Likewise.
4128 * jcf-path.c: Updated comment.
4129 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
4130 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
4131 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
4132 (jcf_path_CLASSPATH_arg): Ditto.
4133 (classpath_u): Updated leading comment.
4134
4135 2002-02-20 Per Bothner <per@bothner.com>
4136
4137 * builtins.c (check_for_builtin): New function.
4138 (build_call_or_builtin): Remove.
4139 * java-tree.h: Update accordingly.
4140 * expr.c (expand_invoke): Use build + check_for_builtin instead
4141 of build_call_or_builtin.
4142 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
4143 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
4144 flag (which had caused jcf-write to incorrectly emit invokevirtual).
4145
4146 2002-02-17 Tom Tromey <tromey@redhat.com>
4147
4148 * java-tree.h (TYPE_STRICTFP): New macro.
4149 (struct lang_type) [strictfp]: New field.
4150 (CLASS_STRICTFP): New macro.
4151 (METHOD_STRICTFP): New macro.
4152 (struct lang_decl) [strictfp]: New field.
4153 * parse.y (method_header): Disallow strictfp constructor or
4154 abstract method.
4155 (STRICT_TK): Move before MODIFIER_TK.
4156 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
4157 (METHOD_MODIFIERS): Likewise.
4158 (INTERFACE_MODIFIERS): Likewise.
4159 * jcf-write.c (get_access_flags): Likewise.
4160 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
4161 (add_method_1): Likewise.
4162 (get_access_flags_from_decl): Likewise.
4163 * jcf-dump.c (print_access_flags): Print in standard order. Also,
4164 recognize strictfp flag.
4165 * jcf.h (ACC_STRICT): New define.
4166
4167 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
4168
4169 * class.c(build_utf8_ref): Move declaration of decl_size
4170
4171 2002-02-07 Tom Tromey <tromey@redhat.com>
4172
4173 * gcj.texi (Input Options): --CLASSPATH does not suppress system
4174 path.
4175
4176 2002-02-04 Anthony Green <green@redhat.com>
4177
4178 * class.c (build_utf8_ref): Put UTF-8 constants into merged
4179 sections if available.
4180
4181 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4182
4183 * parse.y (java_expand_classes): Fix typo in static field loop.
4184
4185 2002-02-02 Richard Henderson <rth@redhat.com>
4186
4187 * class.c (add_field): Mark static fields external.
4188 (build_class_ref): Remove redundant set.
4189 * parse.y (java_expand_classes): Mark static fields of classes
4190 to be compiled as local.
4191 * jcf-parse.c (parse_class_file): Likewise.
4192
4193 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
4194
4195 * gcj.texi (About CNI): New node.
4196
4197 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
4198
4199 PR java/5080
4200 * jcf-parse.c : Check for HAVE_LOCALE_H before using
4201 setlocale() with LC_CTYPE as a parameter.
4202 * jv-scan.c: Same.
4203
4204 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
4205
4206 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
4207 Follow GNU Coding Standards for --version.
4208
4209 2002-01-28 Tom Tromey <tromey@redhat.com>
4210
4211 * expr.c (build_jni_stub): Ensure storage for `meth' is
4212 generated.
4213 * parse.y (java_complete_expand_methods): Set
4214 current_function_decl before building JNI stub.
4215
4216 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
4217
4218 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
4219 BUILT_IN_SQRTF.
4220
4221 2002-01-22 Tom Tromey <tromey@redhat.com>
4222
4223 * decl.c (java_init_decl_processing): Use add_predefined_file.
4224 Predefine RawData.java.
4225 (predef_filenames): Removed.
4226 (java_init_decl_processing): Don't register predef_filenames.
4227 * jcf-parse.c (add_predefined_file): New function.
4228 (predefined_filename_p): Rewrote.
4229 (predefined_filename_p): No longer static.
4230 * decl.c (java_init_decl_processing): Call initialize_builtins.
4231 * Make-lang.in (JAVA_OBJS): Added builtins.o.
4232 (java/builtins.o): New target.
4233 * builtins.c: New file.
4234 * parse.y (patch_invoke): Use build_call_or_builtin.
4235 * java-tree.h (build_call_or_builtin): Declare.
4236 (initialize_builtins): Declare.
4237 (java_set_exception_lang_code): Removed unused declaration.
4238 (PREDEF_FILENAMES_SIZE): Removed.
4239 (java_tree_index): Added JTI_PREDEF_FILENAMES.
4240 (predef_filenames): New define.
4241 (add_predefined_file): Declare.
4242 (predefined_filename_p): Declare.
4243 * expr.c (expand_invoke): Use build_call_or_builtin.
4244
4245 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4246
4247 * parse.y (patch_switch_statement): Fix format specifier.
4248
4249 2002-01-16 Tom Tromey <tromey@redhat.com>
4250
4251 More for PR java/5365:
4252 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
4253 default.
4254 (process_file): Generate include for
4255 java.lang.UnsupportedOperationExceptions.
4256
4257 2002-01-15 Andreas Jaeger <aj@suse.de>
4258
4259 * .cvsignore: Add man pages.
4260
4261 2002-01-15 Tom Tromey <tromey@redhat.com>
4262
4263 Fix for PR java/5365:
4264 * gjavah.c (process_file): Turn class name into a file name.
4265
4266 2002-01-14 Matthias Klose <doko@debian.org>
4267
4268 * gcj.texi: Fix whitespace and formatting errors in the
4269 synopsis of the man pages. Update copyright.
4270
4271 2002-01-14 Tom Tromey <tromey@redhat.com>
4272
4273 For PR libgcj/5303:
4274 * Make-lang.in (java.install-man): Handle jv-convert man page.
4275 (java.generated-manpages): Added jv-convert.1.
4276 (java.uninstall): Remove jv-convert.1.
4277 (java.maintainer-clean): Likewise.
4278 ($(srcdir)/java/jv-convert.1): New target.
4279 * gcj.texi (Top): Link to jv-convert node.
4280 (Individual utilities): Likewise.
4281 (Invoking jv-convert): New node.
4282
4283 2001-01-10 Jeff Sturm <jsturm@one-point.com>
4284 Martin Kahlert <martin.kahlert@infineon.com>
4285
4286 * jcf-parse.c (get_constant): Don't swap lo/hi for big
4287 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
4288
4289 2002-01-03 Graham Stott <grahams@redhat.com>
4290
4291 * class.c (compile_resource_file): Update copyright date.
4292 Constify filename parameter.
4293 (java-tree.h): Update copyright date.
4294 (compile_resource_file): Constify filename parameter.
4295
4296 2002-01-03 Graham Stott <grahams@redhat.com>
4297
4298 * gcc/jcf-parse.c: Update copyright date.
4299 (yyparse): Constify resource_filename.
4300
4301 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4302
4303 * parse.y (src_parse_roots): Don't needlessly zero init.
4304
4305 2001-12-31 Tom Tromey <tromey@redhat.com>
4306
4307 * parse.y (dump_java_tree): New function.
4308 (source_end_java_method): Call it.
4309 (end_class_declaration): Likewise.
4310 * lang.c (java_decode_option): Call dump_switch_p.
4311
4312 2001-12-28 Tom Tromey <tromey@redhat.com>
4313
4314 * gen-table.pl: Don't process characters after \uffff. Added
4315 comment pointing to input file.
4316
4317 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4318
4319 * gen-table.pl: Const-ify output. Document the location of a
4320 suitable unicode input file.
4321
4322 * chartables.h: Regenerate.
4323
4324 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4325
4326 * chartables.h: Const-ify.
4327 * gjavah.c (options): Likewise.
4328 * jcf-dump.c (options): Likewise.
4329 * jv-scan.c (options): Likewise.
4330 * lex.c (java_start_char_p, java_part_char_p): Likewise.
4331 * parse.y (binop_lookup): Likewise.
4332
4333 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4334
4335 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
4336 the static arrays that are output.
4337 * jvspec.c (jvgenmain_spec): Make static.
4338 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
4339 * keyword.h: Regenerate.
4340 * lang.c (string_option, process_option_with_no, lang_f_options,
4341 lang_W_options): Const-ify.
4342 * lex.c (java_lex): Likewise.
4343
4344 2001-12-21 Richard Henderson <rth@redhat.com>
4345
4346 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
4347 (get_boehm_type_descriptor): ... here. Arrange for the
4348 TREE_TYPE to get set properly.
4349
4350 2001-12-21 Richard Henderson <rth@redhat.com>
4351
4352 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
4353 only if the target requires collect2.
4354
4355 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
4356
4357 2001-12-20 Tom Tromey <tromey@redhat.com>
4358
4359 For PR java/4509:
4360 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
4361 CAN_COMPLETE_NORMALLY for the node.
4362 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
4363 generate code for second branch if first branch can't complete
4364 normally.
4365 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
4366 the loop head if the loop body can't complete normally.
4367
4368 2001-12-20 Tom Tromey <tromey@redhat.com>
4369
4370 For PR java/4766:
4371 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
4372 case where `finally' clause can't complete normally.
4373
4374 2001-12-20 Tom Tromey <tromey@redhat.com>
4375
4376 Fixes PR java/5057:
4377 * parse.y (analyze_clinit_body): Added this_class parameter.
4378 Check for more cases where we must keep <clinit>.
4379 (maybe_yank_clinit): Cleaned up flow control.
4380
4381 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4382
4383 * decl.c (java_init_decl_processing): Don't initialize
4384 finit_leg_identifier_node.
4385 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
4386 (finit_leg_identifier_node): Remove.
4387 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
4388
4389 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4390
4391 * mangle.c (mangle_member_name): Don't special-case for
4392 NO_DOLLAR_IN_LABEL.
4393 * mangle_name.c (unicode_mangling_length): Likewise.
4394 (append_unicode_mangled_name): Likewise.
4395 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
4396 code.
4397
4398 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4399
4400 * expr.c (build_java_array_length_access): Don't force null pointer
4401 check unless flag_check_references is set.
4402
4403 2001-12-20 Tom Tromey <tromey@redhat.com>
4404
4405 Fix for PR java/3417:
4406 * parse.y (patch_assignment): Added special processing for
4407 `return'.
4408 (patch_return): Don't convert booleans to integers, and don't
4409 special-case `null'.
4410
4411 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
4412
4413 * config-lang.in (diff_excludes): Remove.
4414
4415 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
4416
4417 * gcj.texi: Update link to GCC manual.
4418
4419 2001-12-17 Tom Tromey <tromey@redhat.com>
4420
4421 * parse.y (link_nested_class_to_enclosing): Removed useless
4422 statement.
4423
4424 2001-12-16 Tom Tromey <tromey@redhat.com>
4425
4426 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
4427 Fixes PR java/5088.
4428
4429 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
4430
4431 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
4432 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
4433 spelling errors.
4434
4435 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4436
4437 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
4438
4439 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4440
4441 * decl.c (java_init_decl_processing): Build otable_type correctly.
4442 otable_decl is an otable_type.
4443
4444 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4445
4446 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
4447 otable_type, otable_ptr_type, method_symbol_type,
4448 method_symbols_array_type, method_symbols_array_ptr_type): New
4449 field/global tree definitions.
4450 (flag_indirect_dispatch): New flag.
4451 * decl.c (java_init_decl_processing): Initialize new otable and
4452 otable_syms type nodes and decls. Add new field "index" to
4453 method_type_node.
4454 * class.c (build_method_symbols_entry): New function.
4455 (make_method_value): Set "index" to to method's vtable index for
4456 virtual methods when indirect-dispatch is not used.
4457 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
4458 and set vtable_method_count to -1. Set otable and otable_syms field
4459 if indirect-dispatch is used and there was something to put in them.
4460 (build_method_symbols_entry): New function.
4461 (emit_offset_symbol_table): New function.
4462 * expr.c (get_offset_table_index): New function.
4463 (build_invokevirtual): Build array reference to otable at the index
4464 returned by get_offset_table_index, and use the result as the vtable
4465 offset.
4466 (build_invokeinterface): Similar.
4467 * jcf-parse.c (yyparse): If indirect-dispatch, call
4468 emit_offset_symbol_table at the end of compilation, after all classes
4469 have been generated.
4470 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
4471 * lang.c (flag_indirect_dispatch): Define.
4472 (lang_f_options): Add indirect-dispatch flag.
4473
4474 2001-12-14 Matthias Klose <doko@debian.org>
4475
4476 * gcj.texi: Markup for man page generation. Document missing
4477 options printed by <tool> --help.
4478 Terminate description of gij's -ms option with a dot.
4479 * Make-lang.in ($(srcdir)/java/*.1): New targets.
4480 (java.generated-manpages java.install-man, java.uninstall,
4481 java-maintainer-clean) Updated.
4482
4483 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
4484
4485 * class.c (get_dispatch_table): Fix java vtable layout
4486 for TARGET_VTABLE_USES_DESCRIPTORS.
4487 * decl.c (java_init_decl_processing): Initialize
4488 alloc_no_finalizer_node, finalize_identifier_node.
4489 * expr.c (class_has_finalize_method): New function.
4490 (expand_java_NEW): Generate calls for finalizer-free allocation.
4491 (build_invokevirtual): Fix java vtable layout for
4492 TARGET_VTABLE_USES_DESCRIPTORS.
4493 * java-tree.h (enum java_tree_index): New entries:
4494 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
4495 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
4496 (class_has_finalize_method): declare.
4497 (HAS_FINALIZER_P): New macro.
4498 * parse.y (patch_invoke): Generate calls for finalizer-free
4499 allocation.
4500
4501 2001-12-12 Matthias Klose <doko@debian.org>
4502
4503 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
4504 whitespace at end of line.
4505
4506 2001-12-11 Tom Tromey <tromey@redhat.com>
4507
4508 * lex.c (java_init_lex): Define wfl_to_string as
4509 gnu.gcj.runtime.StringBuffer unless generating bytecode.
4510
4511 2001-12-11 Jeff Sturm <jsturm@one-point.com>
4512
4513 * class.c (make_method_value): Use null_pointer_node to
4514 represent empty exception table.
4515
4516 2001-12-10 Tom Tromey <tromey@redhat.com>
4517
4518 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
4519
4520 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
4521
4522 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
4523
4524 2001-12-09 Per Bothner <per@bothner.com>
4525
4526 * check-init.c (current_switch_has_default): New static field.
4527 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
4528 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
4529 DEFAULT_EXPR seen, simulate a default alternative that copies state.
4530
4531 2001-12-09 Tom Tromey <tromey@redhat.com>
4532
4533 * check-init.c (check_init): Don't allow pre- or post- increment
4534 or decrement of final variable.
4535 (final_assign_error): Minor error message rewording.
4536
4537 2001-12-08 Tom Tromey <tromey@redhat.com>
4538
4539 * java-tree.h: Fixed typo.
4540
4541 * gjavah.c (decompile_method): Don't decompile to `return this'
4542 for static methods.
4543
4544 * gjavah.c (cxx_keywords): Re-sorted.
4545 * lex.c (cxx_keywords): Re-sorted.
4546
4547 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
4548 else.
4549
4550 * gjavah.c (print_namelet): Clear subnamelets.
4551 (HANDLE_METHOD): Set `method_printed' earlier.
4552
4553 2001-12-07 Tom Tromey <tromey@redhat.com>
4554
4555 * lang.c (lang_f_options): Added
4556 optimize-static-class-initialization.
4557 (java_decode_option): Removed special case.
4558
4559 2001-12-07 Per Bothner <per@bothner.com>
4560
4561 * check-init.c (check_init): Fix typo freeing memory twice.
4562
4563 2001-12-05 Per Bothner <per@bothner.com>
4564
4565 Restore support for static class initialization optimization.
4566 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
4567 * check-init.c (check_int): At end of BLOCK handle initialization
4568 blocks, which used to be done in java_complete_expand_method but did
4569 not handle the case where check_for_initialization might allocate
4570 more than a word of bits.
4571 * decl.c (lang_make_tree): The smic field is now a tree.
4572 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
4573 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
4574
4575 * parse.y (emit_test_initialization): Combine hash_lookup calls.
4576
4577 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
4578 Change from a hash table to a list.
4579 (struct_lang_decl): Change field 'smic' to match.
4580 * class.c (add_method_1): Initialize
4581 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
4582 * parse.y (adjust_init_test_initialization): Removed - inlined into -
4583 (java_expand_method_bodies): -here, since 'smic' is now a list.
4584 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
4585
4586 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
4587
4588 * class.c (java_hash_compare_tree_node): Fix casts.
4589
4590 2001-12-04 Per Bothner <per@bothner.com>
4591
4592 * check-init.c: Handle definite unassignment to finals in addition
4593 to definite assignment.
4594 (loop_current_locals): New field.
4595 (num_current_locals, int start_current_locals, num_current_words):
4596 Make static.
4597 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
4598 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
4599 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
4600 (get_variable_decl, check_final_reassigned): New functions.
4601 (check_init, check_bool_init): Modify as needed for checking finals.
4602 (check_for_initialization): Take extra parameter and return void.
4603 Do extra start-up logic to check final fields for assignment.
4604 * parse.y (check_static_final_variable_assignment_flag,
4605 reset_static_final_variable_assignment_flag, check_final_assignment,
4606 check_final_variable_local_assignment_flag,
4607 reset_final_variable_indirect_assignment_flag,
4608 reset_final_variable_global_assignment_flag): Remove functions.
4609 (java_complete_expand_methods, outer_field_access_fix,
4610 patch_assignment): Remove no-longer used logic.
4611 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
4612 * parse.y (register_fields, java_complete_tree): Update accordingly.
4613
4614 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
4615 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
4616 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
4617
4618 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
4619
4620 * java-tree.h (DECL FINAL): New bit-field.
4621 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
4622 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
4623 (DECL_INIT_CALLS_THIS): New macro.
4624 (struct lang_decl): New bit-field init_calls_this.
4625 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
4626 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
4627 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
4628 use it for both local variables and final fields.
4629 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
4630 and local_final.
4631 (struct lang_type): Remove hfv bit-field.
4632 (check_for_initialization): Change to return void.
4633
4634 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
4635 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
4636 * check-init.c (final_assign_error): New helper function.
4637 (check_final_reassigned, check_init): Use it.
4638 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
4639
4640 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
4641 bit-fields to unsigned.
4642
4643 2001-12-03 Per Bothner <per@bothner.com>
4644
4645 * parse.y (patch_binop): Minor constant folding.
4646
4647 * parse.y (build_current_thisn): Shorter 'buffer'.
4648
4649 2001-12-03 Per Bothner <per@bothner.com>
4650
4651 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
4652 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
4653 * jcf-write.c (generate_bytecode_insns): Remove support for
4654 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
4655 * check-init.c (check_init): Likewise.
4656
4657 2001-12-03 Per Bothner <per@bothner.com>
4658
4659 * verify.c (subroutine_nesting): New function.
4660 (verify_jvm_instructions): Use it to fix logic for checking that
4661 we're done with the current subroutine.
4662
4663 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
4664 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
4665
4666 2001-12-03 Per Bothner <per@bothner.com>
4667
4668 * jcf.h: Fix obvious typo in comment.
4669 * typeck.c (build_null_signature): Add comment.
4670
4671 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
4672
4673 * expr.c: Remove leading capital from diagnostic messages, as
4674 per GNU coding standards.
4675 * jcf-io.c: Similarly.
4676 * jcf-parse.c: Similarly.
4677 * jv-scan.c: Similarly.
4678 * jvspec.c: Similarly.
4679 * mangle.c: Similarly.
4680
4681 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
4682 Alexandre Petit-Bianco <apbianco@redhat.com>
4683
4684 * expr.c (build_java_arrayaccess): Call save_expr on array for
4685 correct evaluation order, modified comment, fixed indentation.
4686 * parse.y: (patch_assignment): Correctly extract the array base
4687 from the tree generate by build_java_arrayaccess, added comments.
4688 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
4689 Fixes PR java/3096, PR java/3803, PR java/3965.
4690
4691 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
4692
4693 * expr.c (expand_byte_code): Remove trailing periods from messages.
4694 * jcf-parse.c (load_class, jcf_parse): Similarly.
4695 * jcf-write.c (generate_classfile): Similarly.
4696 * lex.c (java_lex): Similarly.
4697
4698 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4699
4700 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
4701
4702 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
4703
4704 * Make-lang.in (java.generated-manpages): New dummy target.
4705
4706 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4707
4708 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4709 ASM_FINAL_SPEC.
4710 (lang_specific_pre_link): Use set_input to set input_filename.
4711 Append `main' here.
4712 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4713 (main): Fix definition.
4714 Strip `main' from classname.
4715 Fixes PR java/227.
4716
4717 2001-11-18 Roger Sayle <roger@eyesopen.com>
4718
4719 * parse.h (java_expand_switch): Remove old prototype.
4720
4721 2001-11-18 Tom Tromey <tromey@redhat.com>
4722
4723 Fix for PR java/1401:
4724 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
4725 arg0 is null.
4726 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
4727 correctly.
4728
4729 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
4730
4731 * lang.c (finish_parse): Rename to java_finish.
4732 (LANG_HOOKS_FINISH, java_finish): New.
4733
4734 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
4735
4736 * decl.c (init_decl_processing): Rename java_init_decl_processing.
4737 * java-tree.h: New prototype.
4738 * lang.c (java_init): Update prototype. Combine with old init_parse.
4739
4740 2001-11-13 Tom Tromey <tromey@redhat.com>
4741
4742 * gjavah.c (method_signature): New global.
4743 (HANDLE_METHOD): Set it.
4744 (decompile_return_statement): New function.
4745 (decompile_method): Use it.
4746 (print_method_info): Removed `synth' argument.
4747
4748 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
4749
4750 * java-tree.h (java_set_yydebug): New.
4751 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
4752 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
4753 (print_lang_decl, print_lang_type, print_lang_identifier,
4754 print_lang_statistics, lang_print_xnode): Remove.
4755
4756 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
4757
4758 * jcf-parse.c (init_lex): Remove.
4759 * lang.c (language_string, lang_identify): Remove.
4760 (struct lang_hooks): Constify.
4761 (LANG_HOOKS_NAME): Override.
4762 (init_parse): Update.
4763
4764 2001-11-08 Andreas Franck <afranck@gmx.de>
4765
4766 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
4767 program_transform_name the way suggested by autoconf.
4768 (java.install-common): Also transform auxiliary program names with
4769 program_transform_name.
4770
4771 2001-11-08 Tom Tromey <tromey@cygnus.com>
4772
4773 * parse.y (trap_overflow_corner_case): New rule.
4774 (unary_expression): Use it.
4775 * lex.c (java_init_lex): Don't set minus_seen.
4776 (yylex): Don't use minus_seen. Communicate overflow to parser for
4777 it to handle.
4778 (error_if_numeric_overflow): New function.
4779 * parse.h (minus_seen): Removed field.
4780 (JAVA_RADIX10_FLAG): New define.
4781
4782 2001-11-07 Tom Tromey <tromey@redhat.com>
4783
4784 Patch for PR java/1414:
4785 * parse.y (case_label_list): New global.
4786 (goal): Register case_label_list with GC.
4787 (java_complete_lhs): Save new case on case_label_list.
4788 (patch_switch_statement): Check for duplicate case labels.
4789
4790 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
4791
4792 * parse.y (patch_assignment): Removed unused third argument.
4793 (java_complete_lhs): Removed unused third argument to patch_assignment.
4794
4795 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
4796
4797 * lang.c: Include langhooks-def.h.
4798 * Make-lang.in: Update.
4799
4800 2001-10-31 Zack Weinberg <zack@codesourcery.com>
4801
4802 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
4803
4804 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4805
4806 * mangle.c (find_compression_record_match): Don't match compression
4807 records for package name elements unless they occur at the start of
4808 the name. Fix for PR java/4717.
4809
4810 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4811
4812 * expr.c (expand_java_field_op): Don't special-case references to
4813 java.lang.PRIMTYPE.TYPE.
4814 (build_primtype_type_ref): Removed.
4815 * java-tree.h (build_primtype_type_ref): Remove prototype.
4816 * parse.y (maybe_build_primttype_type_ref): Removed.
4817 (complete_function_arguments): Don't special-case references to
4818 java.lang.PRIMTYPE.TYPE.
4819 (patch_assignment): Likewise.
4820 (array_constructor_check_entry): Likewise.
4821
4822 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
4823
4824 * mangle.c (static tree compression_table): Fixed leading comment.
4825 * parse.h (struct parser_ctxt): Fixed field comment.
4826 * parse.y (check_pkg_class_access): New prototype, fixed leading
4827 comment, new parameter used to emit error only if passed as true.
4828 (parse_check_super): Pass extra argument to check_pkg_class_access.
4829 (do_resolve_class): Likewise.
4830 (process_imports): Likewise.
4831 (read_import_dir): Fixed indentation.
4832 (find_in_imports_on_demand): New local class_type_name. Local
4833 node_to_use deleted. while loop changed into for loop. Report
4834 multiple definition only for accessible classes. Improved error
4835 message.
4836 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
4837 assigned to parameter list, fixed indentation. while loop changed
4838 into for loop, restore TREE_CHAIN on local `tem' before the next
4839 iteration.
4840
4841 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4842
4843 * lang.c (lang_get_alias_set): Deleted.
4844
4845 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4846
4847 * gjavah.c (jni_print_char): Fix thinko in last change.
4848
4849 * gjavah.c (jni_print_char, decode_signature_piece): Use
4850 safe-ctype macros and/or fold extra calls into fewer ones.
4851 * lex.c (java_read_unicode, java_lex): Likewise.
4852 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
4853 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
4854 * mangle_name.c (append_unicode_mangled_name,
4855 unicode_mangling_length): Likewise.
4856
4857 2001-10-17 Richard Henderson <rth@redhat.com>
4858
4859 * Make-lang.in (java/lang.o): Depend on langhooks.h.
4860
4861 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
4862
4863 * lang.c (langhooks.h): Included.
4864 (LANG_HOOKS_INIT): Redefined.
4865 (LANG_HOOKS_INIT_OPTIONS): Likewise.
4866 (LANG_HOOKS_DECODE_OPTION): Likewise.
4867 (struct lang_hooks lang_hooks): New initialization.
4868
4869 2001-10-11 Per Bothner <per@bothner.com>
4870
4871 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
4872 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
4873 The former is simpler, and jcf-write.c handles it better.
4874 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
4875 or WITH_CLEANUP_EXPR.
4876 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
4877 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
4878
4879 * parse.y (patch_if_else_statement): If the condition is constant,
4880 optimize away the test.
4881
4882 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
4883
4884 * parse.y (patch_cast): Call patch_string on the first operand of
4885 the incoming node, update it if necessary. Fixes PR java/4510.
4886
4887 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4888
4889 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
4890 when name qualifier matches a package name.
4891
4892 2001-10-08 Tom Tromey <tromey@redhat.com>
4893
4894 Fix for PR java/4489:
4895 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
4896 force a new label when computing `body_block'.
4897
4898 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4899
4900 * jcf-io.c (format_uint): Const-ify.
4901 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
4902 * lex.c (java_get_line_col): Likewise.
4903 * parse.y (build_incdec): Likewise.
4904
4905 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
4906
4907 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
4908 a NULL enclosing context if appropriate. Fixes PR java/4466.
4909
4910 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
4911
4912 * parse.y (patch_assignment): Use lvalue's original TYPE when
4913 building the final COMPOUND_EXPR.
4914 (try_reference_assignconv): Fixed leading comment.
4915
4916 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
4917
4918 * parse.y (check_final_variable_indirect_assignment): For
4919 COMPOUND_EXPR, return only if finals were found initialized
4920 properly, if not, keep on checking.
4921 (check_final_variable_global_assignment_flag): New local
4922 error_found, set when appropriate and used to decide whether to
4923 report uninitialized finals. Fixed typo in comment.
4924
4925 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
4926
4927 * decl.c (init_decl_processing): Fixed typo in predef_filenames
4928 last three initializations. Fixes PR java/4360.
4929
4930 2001-09-21 Richard Henderson <rth@redhat.com>
4931
4932 * class.c (get_dispatch_table): Handle function descriptors.
4933 (build_dtable_decl): Likewise.
4934 * expr.c (build_invokevirtual): Likewise.
4935
4936 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
4937
4938 * parse.y (patch_method_invocation): Build class initialization
4939 when static finals are used to qualify method invocation.
4940 Fixes PR java/4366.
4941
4942 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
4943
4944 * parse.h: (WFL_STRIP_BRACKET): Re-written using
4945 build_type_name_from_array_name.
4946 (STRING_STRIP_BRACKETS): New macro.
4947 * parse.y (build_type_name_from_array_name): New function.
4948 (array_creation_expression:): Accumulate []s instead of [s.
4949 (cast_expression:): Accumulate []s instead of [s after cast type
4950 name.
4951 (build_array_from_name): Local string deleted, use
4952 build_type_name_from_array_name.
4953 (build_unresolved_array_type): Accumulate []s instead of [s after
4954 type name.
4955 (register_fields): Fixed comment.
4956 (resolve_class): Local name, base deleted, new locals tname and
4957 array_dims. Use build_type_name_from_array_name. Use array_dims to
4958 build array type.
4959 (purify_type_name): Use STRING_STRIP_BRACKETS.
4960
4961 2001-09-18 Andreas Jaeger <aj@suse.de>
4962
4963 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
4964 * jv-scan.c: Likewise.
4965
4966 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
4967
4968 * parse.y (patch_method_invocation): Inner class creation context
4969 check not enforced within constructors. Fixes PR java/1873.
4970
4971 2001-09-16 Tom Tromey <tromey@redhat.com>
4972
4973 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
4974 NOTE_PUSH for single-case push. Fixes PR java/4189.
4975
4976 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
4977
4978 * java-tree.h (TYPE_IMPORT_LIST): New macro.
4979 (TYPE_IMPORT_DEMAND_LIST): Likewise.
4980 (struct lang_type): New fields import_list and import_demand_list.
4981 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
4982 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
4983 (do_resolve_class): New local saved_enclosing_type, initialized,
4984 passed as parameter to find_in_imports and find_in_imports_on_demand.
4985 (find_in_imports): Added paramater enclosing_type, use its
4986 TYPE_IMPORT_LIST when applicable.
4987 (find_in_imports_on_demand): Added parameter enclosing_type, use
4988 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
4989 declaration and initialization.
4990 (fold_constant_for_init): Switch/restore current_class to the
4991 appropriate context.
4992
4993 2001-09-13 Mark Mitchell <mark@codesourcery.com>
4994
4995 * verify.c (verify_jvm_instructions): Fix typo.
4996
4997 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4998
4999 * expr.c (expand_invoke): Const-ification.
5000 * parse.y (patch_method_invocation): Likewise.
5001
5002 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5003
5004 * gjavah.c (cxx_keywords): Const-ification.
5005 * keyword.gperf (java_keyword): Likewise.
5006 * lang.c (java_tree_code_name): Likewise.
5007 * lex.c (cxx_keywords): Likewise.
5008 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
5009
5010 2001-09-11 Richard Henderson <rth@redhat.com>
5011
5012 * parse.h (ctxp_for_generation): Mark extern.
5013
5014 2001-09-10 Richard Henderson <rth@redhat.com>
5015
5016 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
5017
5018 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
5019
5020 * typeck.c (java_array_type_length, build_prim_array_type):
5021 Represent empty arrays by NULL index.
5022
5023 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
5024
5025 * java-tree.h (compile_resource_file): Grouped with other prototypes.
5026 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
5027
5028 2001-09-06 Anthony Green <green@redhat.com>
5029
5030 * class.c (O_BINARY): Define if necessary.
5031 (registerResource_libfunc): Declare.
5032 (init_class_processing): Initilize registerResource_libfunc.
5033 (compile_resource_file): New function.
5034 * java-tree.h (resource_name): Declare.
5035 (compile_resource_file): Declare.
5036 * jcf-parse.c (yyparse): Handle compiling java resource files.
5037 * lang.c (java_decode_option): Handle -fcompile-resource option.
5038 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
5039 resource files.
5040 * gcj.texi (Code Generation): Add documentation for -R flag.
5041
5042 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
5043
5044 * jcf-write.c (generate_classfile): Issue an error in case of
5045 field/initial value mismatch.
5046 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
5047 being initialized and we're generating bytecode.
5048 (java_complete_lhs): In MODIFY_EXPR section: added comments,
5049 set DECL_INITIAL properly when appropriate.
5050 Fixes PR java/4230
5051 Fixes PR java/4204
5052
5053 2001-09-01 Per Bothner <per@bothner.com>
5054
5055 * parse.y (maybe_yank_clinit): A field without an initializer is not
5056 relevant. All initializers except static final and constant require
5057 <clinit>, regardless of flag_emit_class_files.
5058
5059 2001-08-31 Per Bothner <per@bothner.com>
5060
5061 * class.c (set_constant_value): When not emitting class files, then a
5062 String ConstantValue is a utf8const_ptr_type.
5063
5064 2001-08-30 Per Bothner <per@bothner.com>
5065
5066 * jcf-write.c (generate_classfile): Check that field is primitive
5067 or string before emitting ConstantValue attribute.
5068
5069 2001-08-30 Per Bothner <per@bothner.com>
5070
5071 * parse.y (resolve_qualified_expression_name): If creating a
5072 COMPOUND_EXPR, set it's type correctly.
5073
5074 2001-08-30 Per Bothner <per@bothner.com>
5075
5076 * jcf-io.c (open_class): Set filename field.
5077
5078 * jcf-parse,c (parse_class_file): Set current_function_decl
5079 for better error message when Code attribute is missing.
5080
5081 * lang.c (put_decl_node, lang_print_error): Re-arrange for
5082 better diagnostics, especially for constructors.
5083
5084 2001-08-30 Per Bothner <per@bothner.com>
5085
5086 * jcf-write.c (generate_classfile): Don't write ConstantValue
5087 attribute if field is not final, for compatibility with jdk.
5088
5089 * jcf-write.c (generate_classfile): Convert ConstantValue values
5090 to correct type. Work-around for front-end bug.
5091 * class.c (set_constant_value): Error if constant has wrong type.
5092
5093 2001-08-30 Per Bothner <per@bothner.com>
5094
5095 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
5096 "Double" are printed at verbosity 1.
5097
5098 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
5099
5100 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
5101
5102 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
5103
5104 * parse.y (patch_assignment): Don't verify final re-assignment here.
5105 (java_complete_lhs): Verify assignments to finals calling
5106 patch_assignment. Verify re-assignments to finals before calling
5107 patch_assignment.
5108
5109 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
5110
5111 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
5112 Fixes PR java/1413
5113
5114 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
5115
5116 * lex.c (java_lex): new local found_hex_digits. Set and then used
5117 in test to reject invalid hexadecimal numbers.
5118 * parse.y (java_complete_tree): Prevent unwanted cast with
5119 initialized floating point finals.
5120 (patch_binop): Emit a warning when detecting a division by zero,
5121 mark result not constant, don't simplify non integer division.
5122
5123 2001-08-28 Per Bothner <per@bothner.com>
5124
5125 * jcf-write.c (generate_bytecode_insns): For increments and
5126 decrements just recurse to push constant. Improvement on Mark's patch.
5127
5128 2001-08-28 Mark Mitchell <mark@codesourcery.com>
5129
5130 * jcf-write.c (generate_bytecode_insns): Generate an integer to
5131 real conversion for increments and decrements of reals.
5132
5133 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
5134
5135 * parse.y (resolve_qualified_expression_name): Handle unresolved
5136 qualified expressions, prevent numerical qualifiers, fixed typo.
5137 Fixes PR java/4141
5138
5139 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
5140
5141 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
5142 don't report anything but deprecated class when marked so. Handle
5143 VAR_DECL.
5144 (patch_method_invocation): Check deprecation on methods and types.
5145 (patch_binop): code becomes an enum tree_code, added default: to
5146 switch to handle that. Detect division by zero, try to fold and
5147 return before using a subroutine.
5148
5149 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
5150
5151 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
5152 file smaller than 4 bytes.
5153 * parse.y (check_inner_circular_reference): New function.
5154 (check_circular_reference): Likewise.
5155 (array_initializer:): Accept {,}.
5156 (java_check_circular_reference): Rewritten using
5157 check_circular_reference and check_inner_circular_reference.
5158 (java_complete_expand_method): Unconditionally save and restore
5159 the unpurged exception list.
5160 (build_dot_class_method_invocation): Unmangle signature parameter.
5161
5162 2001-08-21 Tom Tromey <tromey@redhat.com>
5163
5164 * decl.c (init_decl_processing): Add `throws' field to method
5165 descriptor.
5166 * class.c (make_method_value): Compute `throws' field for method.
5167
5168 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
5169
5170 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
5171 circularity is detected.
5172 (ctors_unchecked_throws_clause_p): Fixed leading comment.
5173
5174 2001-08-17 Richard Henderson <rth@redhat.com>
5175
5176 * class.c (emit_register_classes): Add align parameter to
5177 call to assemble_integer.
5178
5179 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
5180
5181 * jcf-parse.c (load_class): New locals saved and class_loaded. If
5182 loading a class_or_name fails, try considering an innerclass name
5183 and load the enclosing context.
5184 * parse.y (resolve_inner_class): New function.
5185 (find_as_inner_class): Added leading comment.
5186 (register_incomplete_type): Keep the current context as enclosing
5187 context for JDEP_FIELD dependencies.
5188 (do_resolve_class): Locals new_class_decl and super initialized to
5189 NULL. Call resolve_inner_class, explore the enclosing context
5190 superclass if necessary.
5191 Fixes PR java/4007
5192
5193 2001-08-16 Tom Tromey <tromey@redhat.com>
5194
5195 * jcf-dump.c (main): Updated for change to jcf_path_seal.
5196 * gjavah.c (main): Updated for change to jcf_path_seal.
5197 * lang.c (version_flag): New global.
5198 (java_decode_option): Recognize `-version'.
5199 (java_init): Update for change to jcf_path_seal.
5200 * jcf.h (jcf_path_seal): Added `print' argument.
5201 * jcf-path.c (jcf_path_seal): Added `print' argument.
5202
5203 2001-08-13 Zack Weinberg <zackw@panix.com>
5204
5205 * Make-lang.in (java/decl.o): Update dependencies.
5206 * decl.c: Include libfuncs.h, don't include toplev.h.
5207
5208 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
5209
5210 * decl.c (init_decl_processing): exception_type_node,
5211 class_not_found_type_node, and no_class_def_found_type_node
5212 initialized. predef_filenames augmented accordingly.
5213 instinit_identifier_node initialized.
5214 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
5215 * java-tree.h (enum java_tree_index): New entries
5216 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
5217 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
5218 (exception_type_node): New macro.
5219 (class_not_found_type_node): Likewise.
5220 (no_class_def_found_type_node): Likewise.
5221 (instinit_identifier_node): Likewise.
5222 (PREDEF_FILENAMES_SIZE): Adjusted.
5223 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
5224 (struct lang_type): Fixed typo in bitfield name.
5225 (DECL_INSTINIT_P): New macro.
5226 (ID_INSTINIT_P): Likewise.
5227 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
5228 attribute.
5229 * parse.y (encapsulate_with_try_catch): New function.
5230 (generate_instinit): Likewise.
5231 (build_instinit_invocation): Likewise.
5232 (ctors_unchecked_throws_clause_p): Likewise.
5233 (add_instance_initializer): Deleted.
5234 (build_instance_initializer): Likewise.
5235 (in_instance_initializer): Likewise.
5236 (check_method_redefinition): instinit$ not to be verified.
5237 (java_complete_expand_methods): Generate instinit$, simplified code.
5238 (build_dot_class_method): Eliminated unnecessary locals. Use
5239 encapsulate_with_try_catch, removed unnecessary code.
5240 (fix_constructors): New local iii. Use build_instinit_invocation.
5241 (patch_method_invocation): Added comment.
5242 (maybe_use_access_method): Don't consider instinit$.
5243 (find_applicable_accessible_methods_list): Shorten the search for
5244 instinit$ too.
5245 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
5246 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
5247 (patch_throw_statement): Likewise. Fixed typo.
5248
5249 2001-08-12 David Edelsohn <edelsohn@gnu.org>
5250
5251 Revert:
5252 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5253 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
5254 ASM_FINAL_SPEC.
5255 (lang_specific_pre_link): Use set_input to set input_filename.
5256 Append `main' here.
5257 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
5258 (main): Fix definition.
5259 Strip `main' from classname.
5260 Fixes PR java/227.
5261
5262 2001-08-11 Zack Weinberg <zackw@panix.com>
5263
5264 * lex.h: Don't include setjmp.h. Don't define
5265 SET_FLOAT_HANDLER or prototype set_float_handler.
5266
5267 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
5268
5269 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
5270 `poplevel' in the right order.
5271
5272 2001-08-09 Richard Henderson <rth@redhat.com>
5273
5274 * Make-lang.in (class.o): Depend on TARGET_H.
5275 * class.c (emit_register_classes): Use target hooks instead of
5276 assemble_constructor and assemble_destructor.
5277
5278 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
5279
5280 * check-init.c (flags.h): Include
5281 (check_init): Don't report uninitialized static class
5282 initialization flags, don't free bit index when doing static class
5283 initialization optimization.
5284 (check_for_initialization): Return type changed to `unsigned int.'
5285 (attach_initialized_static_class): New function.
5286 * class.c (add_method_1): Create the initialized static class
5287 table if necessary.
5288 (finish_class): Always emit deferred inline methods.
5289 * decl.c (emit_init_test_initialization): Moved to expr.c
5290 (complete_start_java_method): Don't traverse
5291 DECL_FUNCTION_INIT_TEST_TABLE.
5292 (lang_mark_tree): Mark hash tables in function decls.
5293 * expr.c (emit_init_test_initialization): Moved from decl.c.
5294 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
5295 initialization flag, set DECL_CONTEXT and
5296 LOCAL_CLASS_INITIALIZATION_FLAG.
5297 (java_lang_expand_expr): Emit initialization code for static class
5298 initialized flags when entering block, if necessary.
5299 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
5300 * java-tree.h (flag_optimize_sci): New global variable declaration.
5301 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
5302 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
5303 (LOCAL_FINAL_P): Fixed typo in comment.
5304 (FINAL_VARIABLE_P): Likewise.
5305 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
5306 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
5307 (struct lang_decl): New fields `ict', `smic' and `cif.'
5308 (check_for_initialization): New returned value for global.
5309 (attach_initialized_static_class): New global function.
5310 (STATIC_CLASS_INIT_OPT_P): New macro.
5311 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
5312 * lang.c (java_decode_option): Handle
5313 `-fno-optimize-static-class-initialization'
5314 * parse.y (start_complete_expand_method): New function.
5315 (java_expand_method_bodies): Likewise.
5316 (attach_init_test_initialization_flags): Likewise.
5317 (adjust_init_test_initialization): Likewise.
5318 (emit_test_initialization): Likewise.
5319 (java_complete_expand_methods): Nullify abstract and native method
5320 bodies.
5321 (java_complete_expand_method): New locals `fbody', `block_body'
5322 and `exception_copy.' Reorganized: directly return on empty method
5323 bodies, call `start_complete_expand_method', remember definitely
5324 initialized static class in function, don't expand method bodies.
5325 (java_expand_classes): Call `java_expand_method_bodies' before
5326 `finish_class' when compiling to native.
5327 (resolve_expression_name): Use `orig' after building outer class
5328 field access.
5329 (patch_invoke): Remember static method invocations.
5330
5331 2001-08-06 Richard Henderson <rth@redhat.com>
5332
5333 * class.c (emit_register_classes): Pass a symbol_ref and priority
5334 to assemble_constructor.
5335
5336 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
5337
5338 * java-tree.h (all_class_filename): New macro.
5339 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
5340 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
5341 newly created IDENTIFIER_NODE to `all_class_filename.'
5342
5343 2001-08-01 Jeff Sturm <jsturm@one-point.com>
5344
5345 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
5346 Use ggc_add_tree_root to register roots.
5347
5348 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
5349
5350 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
5351 second operand calling check_init.
5352 * decl.c (complete_start_java_method): Swaped second and third
5353 arguments while creating WITH_CLEANUP_EXPR node.
5354 * jcf-write.c (generate_bytecode_insns): Use second operand
5355 instead of third when handling WITH_CLEANUP_EXPR.
5356 * parse.y (java_complete_lhs): Expand second operand of
5357 WITH_CLEANUP_EXPR nodes.
5358 (patch_synchronized_statement): Swaped second and third arguments
5359 while creating WITH_CLEANUP_EXPR node.
5360
5361 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
5362
5363 * parse.y (create_interface): Avoid cyclic inheritance report when
5364 syntax error encountered during class definition.
5365 Fixes PR java/2956
5366
5367 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5368
5369 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
5370 ASM_FINAL_SPEC.
5371 (lang_specific_pre_link): Use set_input to set input_filename.
5372 Append `main' here.
5373 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
5374 (main): Fix definition.
5375 Strip `main' from classname.
5376 Fixes PR java/227.
5377
5378 2001-07-18 Tom Tromey <tromey@redhat.com>
5379
5380 For PR java/2812:
5381 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
5382 * lex.c (java_new_lexer): Use ICONV_CONST.
5383 (java_read_char): Likewise.
5384 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
5385 (jv-scan$(exeext)): Likewise.
5386
5387 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
5388
5389 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
5390 * parse.y (check_class_interface_creation): Allow `private' if the
5391 enclosing is not an interface.
5392 (create_interface): Interface tagged public if the enclosing
5393 context is an interface.
5394 (create_class): Class tagged public if the enclosing context
5395 is an interface.
5396 Fixes PR java/2959
5397
5398 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
5399
5400 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
5401 Fixes PR java/2665
5402
5403 2001-07-14 Tim Josling <tej@melbpc.org.au>
5404
5405 * check-init.c (check_init): Remove references to EXPON_EXPR.
5406
5407 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
5408
5409 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
5410 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
5411 Fixes PR java/3602
5412
5413 2001-07-13 Tom Tromey <tromey@redhat.com>
5414
5415 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
5416 invocation.
5417
5418 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
5419
5420 * parse.y (patch_method_invocation): Don't override primary if one
5421 is already provided, but let this$<n> be built. Fixed comment.
5422
5423 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
5424
5425 * parse.y (empty_statement:): Report empty statement error only
5426 when found at class declaration level.
5427 Fixes PR java/3635
5428
5429 2001-07-12 Tom Tromey <tromey@redhat.com>
5430
5431 * expr.c (expand_load_internal): New function.
5432 (LOAD_INTERNAL): Use it.
5433
5434 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
5435
5436 * parse.y (verify_constructor_super): Compare anonymous class ctor
5437 args with `valid_method_invocation_conversion_p.'
5438 Fixes PR java/3285
5439
5440 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
5441
5442 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
5443 `-fsyntax-only.' Fixes PR java/3248
5444
5445 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
5446
5447 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
5448
5449 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
5450
5451 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
5452 current function is static. Fixes PR java/1970
5453
5454 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
5455
5456 * parse.y (patch_method_invocation): Add enclosing context to ctor
5457 calls if necessary. Fixes PR java/2953
5458
5459 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
5460
5461 * parse.y (resolve_package): Abort if qualified expression member
5462 isn't right.
5463 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
5464 Fixes PR java/1391
5465
5466 2001-07-07 Zack Weinberg <zackw@stanford.edu>
5467
5468 * verify.c: Don't use // comments.
5469
5470 2001-07-05 Tom Tromey <tromey@redhat.com>
5471
5472 * lang.c (flag_assume_compiled): Removed.
5473 * java-tree.h (flag_assume_compiled): Removed.
5474 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
5475 -fhash-synchronization, -fuse-divide-subroutine,
5476 -fcheck-references, -femit-class-file, -femit-class-files,
5477 -fassume-compiled. Updated --encoding information. Changed
5478 -foutput-class-dir to `-d'.
5479
5480 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
5481
5482 * jcf-parse.c (parse_class_file): Add lineno parameter to
5483 debug_start_source_file call.
5484
5485 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
5486
5487 * gcj.texi: Use gpl.texi.
5488 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
5489 dependencies and use doc/include in search path.
5490
5491 2001-07-03 Jeff Sturm <jsturm@one-point.com>
5492
5493 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
5494 `this'. If so, don't build instance initializers.
5495
5496 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
5497
5498 * parse.y (resolve_expression_name): Improved error message for
5499 inner class cases. Fixes PR java/1958
5500
5501 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
5502
5503 * lang.c: #include diagnostic.h
5504 (lang_print_error): Add a `diagnostic_context *' parameter.
5505 (java_dummy_print): Likewise.
5506 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
5507
5508 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
5509
5510 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
5511 * jcf.h (typedef struct JCF): New bitfield `finished.'
5512 (JCF_FINISH): Set `finished.'
5513 (JCF_ZERO): Reset `finished.'
5514 Fixes PR java/2633
5515
5516 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
5517
5518 * parse.y (class_body_declaration:): Don't install empty instance
5519 initializers.
5520 Fixes PR java/1314
5521
5522 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
5523
5524 * class.c (set_super_info): Call `set_class_decl_access_flags.'
5525 (set_class_decl_access_flags): New function.
5526 * java-tree.h (set_class_decl_access_flags): New prototype.
5527 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
5528 (parse_class_file): New local `decl_max_locals.' Take wide types
5529 into account to compute DECL_MAX_LOCALS.
5530 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
5531 imports on demand.
5532
5533 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
5534
5535 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
5536
5537 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
5538
5539 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
5540 * parse.y (do_resolve_class): Moved comments out to leading comment
5541 section. Removed local `start', New local `_ht' and
5542 `circularity_hash.' Record `enclosing' in hash table and search
5543 it to detect circularity. Use `enclosing' as an argument to
5544 `lookup_cl.' Free the hash table when done.
5545
5546 2001-06-19 Tom Tromey <tromey@redhat.com>
5547
5548 * lex.c (java_read_char): Disallow invalid and overlong
5549 sequences. Fixes PR java/2319.
5550
5551 2001-06-05 Jeff Sturm <jsturm@one-point.com>
5552
5553 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
5554
5555 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
5556
5557 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
5558 arguments accordingly.
5559
5560 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
5561
5562 * gcj.texi: Move contents to just after title page.
5563
5564 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
5565
5566 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
5567 builtin type.
5568 (patch_incomplete_class_ref): Build the class ref, build the class
5569 init if necessary, complete the tree.
5570 Fixes PR java/2605
5571
5572 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
5573
5574 * parse.y (lookup_field_wrapper): Test `name' code.
5575 (resolve_qualified_expression_name): Test `qual_wfl' code.
5576 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
5577 handle `qual_wfl' by code.
5578 (maybe_build_primttype_type_ref): Test `wfl' code.
5579
5580 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5581
5582 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
5583 fdl.texi.
5584 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
5585 the dvi file in the java directory.
5586
5587 2001-05-25 Sam TH <sam@uchicago.edu>
5588
5589 * gen-table.pl javaop.h jcf.h lex.h,
5590 parse.h: Fix header include guards.
5591
5592 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
5593
5594 * jv-scan.c (version): Update copyright year.
5595
5596 2001-05-21 Per Bothner <per@bothner.com>
5597
5598 * jcf-parse.c (read_class): If class is from .class or .zip file
5599 and it's already been read, don't push/pop parser context.
5600
5601 2001-05-18 Per Bothner <per@bothner.com>
5602
5603 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
5604 command line so the jvgenmain-generated main program comes first.
5605
5606 2001-05-15 Tom Tromey <tromey@redhat.com>
5607
5608 * class.c (build_utf8_ref): Don't generate identifier based on
5609 utf8const contents.
5610
5611 2001-05-12 Richard Henderson <rth@redhat.com>
5612
5613 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
5614 * expr.c (java_lang_expand_expr): Expand it.
5615 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
5616 calling build_exception_object_ref.
5617 * parse.y (catch_clause_parameter): Likewise.
5618 (build_dot_class_method): Likewise.
5619 (try_reference_assignconv): Likewise.
5620 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
5621 * jcf-write.c (generate_bytecode_insns): Likewise.
5622
5623 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
5624
5625 * parse.y (build_unresolved_array_type): Set
5626 EXPR_WFL_QUALIFICATION on the newly created wfl.
5627 Fixes PR java/2538. Fixes PR java/2535.
5628
5629 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
5630
5631 * parse.y (fix_constructors): Removed unnecessary assignment to
5632 local. Moved assignment to `this$<n>', fixed comments and
5633 indentation.
5634 (build_wfl_wrap): Fixed indentation.
5635 Fixes PR java/2598, java/2579 and java/2658.
5636
5637 2001-05-03 Mo DeJong <mdejong@redhat.com>
5638
5639 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
5640 check for byte swap.
5641
5642 2000-05-02 Jeff Sturm <jsturm@one-point.com>
5643
5644 * expr.c (build_class_init): Move MODIFY_EXPR
5645 outside of COND_EXPR. Remove variable `call'.
5646
5647 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5648
5649 * decl.c: NULL_PTR -> NULL.
5650 * jcf-write.c: Likewise.
5651
5652 2001-05-01 Tom Tromey <tromey@redhat.com>
5653
5654 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
5655 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
5656 * gcj.texi: Updated copyright text. Include fdl.texi.
5657 (Top): Link to new node.
5658
5659 2001-05-01 Per Bothner <per@bothner.com>
5660
5661 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
5662
5663 2001-05-01 Per Bothner <per@bothner.com>
5664
5665 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
5666 import_list contains the name, not the TREE_PURPOSE.
5667
5668 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5669
5670 * jcf-io.c (read_zip_member): Cast to long in comparison with
5671 signed value.
5672
5673 * jvspec.c (lang_specific_driver): Initialize variables.
5674
5675 * mangle.c (find_compression_record_match): Likewise.
5676
5677 * typeck.c (build_null_signature): Provide static prototype. Mark
5678 parameter with ATTRIBUTE_UNUSED.
5679
5680 * verify.c (verify_jvm_instructions): Initialize variable.
5681
5682 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5683
5684 * parse.y (do_resolve_class): Check for cyclic inheritance during
5685 inner class resolution.
5686
5687 2001-04-27 Per Bothner <per@bothner.com>
5688
5689 * parse.y (java_expand_classes): Don't change ctxp_for_generation
5690 while iterating, since that could cause gc to lose stuff.
5691
5692 2001-04-26 Per Bothner <per@bothner.com>
5693
5694 Fix method search wrt scope of inner classes to match JLS2.
5695 * typeck.c (build_null_signature): New static function.
5696 (has_method): New function. Uses build_null_signature and lookup_do.
5697 * java-tree.h (has_method): New declaration.
5698 * parse.y (find_applicable_accessible_methods_list): Do not search
5699 context of inner classes here.
5700 (patch_method_invocation): Search scope, ie. current and outer clases,
5701 for method matching simple name, to find class.
5702
5703 2001-04-26 Per Bothner <per@bothner.com>
5704
5705 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
5706 Fix thinko: If a single case, use if_icmpeq, not ifeq.
5707
5708 * constants.c (find_methodref_with_class_index): New function.
5709 (find_methodref_index): Use find_methodref_with_class_index.
5710 * java-tree.h (find_methodref_with_class_index): New declaration.
5711 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
5712 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
5713 If context changed from interface to class, don't use invokeinterface.
5714
5715 2001-04-25 Per Bothner <per@bothner.com>
5716
5717 * verify.c (verify_jvm_instructions): For field instructions,
5718 check that field index is valid. For invoke instructions, check that
5719 method index is valid.
5720
5721 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
5722
5723 * config-lang.in (target_libs): Copy from $libgcj_saved.
5724
5725 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5726
5727 * decl.c (init_decl_processing): Add new class "protectionDomain"
5728 field.
5729 * class.c (make_class_data): Set initial value for "protectionDomain".
5730
5731 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5732
5733 * jvspec.c (lang_specific_driver): Fix memory allocation
5734 deficit, by using concat in lieu of xmalloc/sprintf.
5735
5736 2001-04-20 Per Bothner <per@bothner.com>
5737
5738 Fixes to compile multiple .class files at once.
5739 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
5740 * java-tree.h (CLASS_PARSED_P): New macro.
5741 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
5742 * jcf-parse.c (jcf_parse_source): Inline into read_class.
5743 (read_class): Avoid some code duplication.
5744 Don't call JCF_FINISH for a .class file - might be needed later.
5745 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
5746 rather than CLASS_LOADED_P, since latter implies class laid out.
5747 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
5748 * parse.y: Don't need to set CLASS_LOADED_P for array types.
5749
5750 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5751
5752 * Make-lang.in (java/boehm.o): Depend on toplev.h.
5753
5754 * boehm.c: Include toplev.h.
5755
5756 2001-04-06 Tom Tromey <tromey@redhat.com>
5757 Alexandre Petit-Bianco <apbianco@redhat.com>
5758
5759 Fix for PR gcj/1404 and PR gcj/2332:
5760 * parse.y (build_array_from_name): If we use the type_wfl then
5761 accumulate dimensions from the original type as well.
5762 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
5763
5764 2001-04-06 Tom Tromey <tromey@redhat.com>
5765
5766 * parse.y (analyze_clinit_body): Return true if the second operand
5767 of a METHOD_EXPR is nonzero.
5768
5769 2001-04-06 Tom Tromey <tromey@redhat.com>
5770
5771 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
5772 directory.
5773 ($(srcdir)/java/parse.c): Likewise.
5774
5775 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
5776
5777 * gcj.texi: Use `which-gcj' instead of `which-g77.'
5778 (version-gcc): Initialized.
5779 (which-gcj): Likewise.
5780
5781 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
5782
5783 * java-tree.h (struct lang_decl): New macro
5784 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
5785 * parse.y (build_instance_initializer): New function.
5786 (add_instance_initializer): Use it.
5787 (java_fix_constructors): Set `current_class' before fix pass.
5788 (fix_constructors): Just return if already fixed. Move `super()'
5789 invocation ahead. Use `build_instance_initializer.'
5790 Fixes PR java/1315.
5791
5792 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
5793
5794 * parse.y (resolve_qualified_expression_name): Pass field's
5795 DECL_CONTEXT to `not_accessible_p.'
5796 (not_accessible_p): Changed parameters order in `inherits_from_p'
5797 invocation.
5798
5799 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
5800
5801 * lang-options.h: Add flag_check_references.
5802
5803 2001-04-04 Per Bothner <per@bothner.com>
5804
5805 * java-tree.h (CONSTANT_VALUE_P): New macro.
5806 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
5807 * parse.y (maybe_build_class_init_for_field): New static function.
5808 (resolve_expression_name, resolve_field_access): Use
5809 maybe_build_class_init_for_field instead of build_class_init
5810 This does not do the init if the field is compile-time-constant.
5811 (resolve_field_access): Simplify.
5812
5813 * parse.y (fold_constant_for_init): Merge test into switch.
5814
5815 2001-04-03 Zack Weinberg <zackw@stanford.edu>
5816
5817 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
5818 on gansidecl.h.
5819 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
5820
5821 2001-04-02 Zack Weinberg <zackw@stanford.edu>
5822
5823 * expr.c (pop_type_0): Save the result of the first
5824 lang_printable_name call in a scratch buffer, so it
5825 won't be clobbered by the second call.
5826
5827 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
5828
5829 * parse-scan.y (array_type:): Rewritten.
5830 (type_declaration:): `empty_statement' replaces `SC_TK.'
5831 (class_member_declaration:): `empty statement' added.
5832 (method_body:): Simplified.
5833 (static_initializer:): Likewise.
5834 (primary_no_new_array:): Use `type_literals.'
5835 (type_literals:): New rule.
5836 (dims:): Set and update `bracket_count.'
5837 Fixes PR java/1074. Fixes PR java/2412.
5838
5839 2001-03-28 Hans Boehm <boehm@acm.org>
5840
5841 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
5842 (get_boehm_type_descriptor): Set type on returned value to be a
5843 pointer length integer.
5844
5845 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5846
5847 * expr.c (pop_type_0): Call `concat' rather than building the
5848 string manually.
5849 (pop_type): Add format specifier in call to `error'.
5850
5851 * parse.y (patch_method_invocation): Avoid casting away
5852 const-ness.
5853
5854 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
5855
5856 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
5857
5858 2001-03-28 Richard Henderson <rth@redhat.com>
5859
5860 IA-64 ABI Exception Handling:
5861 * Make-lang.in (except.o): Don't depend on eh-common.h.
5862 * check-init.c (check_init): Handle EXC_PTR_EXPR.
5863 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
5864 [soft_exceptioninfo_call_node]: Remove.
5865 [eh_personality_libfunc, lang_eh_runtime_type]: New.
5866 (end_java_method): No emit_handlers.
5867 * except.c (java_set_exception_lang_code): Remove.
5868 (method_init_exceptions): Don't call it.
5869 (prepare_eh_table_type): No CATCH_ALL_TYPE.
5870 (build_exception_object_ref): New.
5871 (expand_end_java_handler): Update for except.h name changes.
5872 (emit_handlers, expand_resume_after_catch): Remove.
5873 * expr.c (java_lang_expand_expr): Update for except.h name changes.
5874 (process_jvm_instruction): Use build_exception_object_ref.
5875 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
5876 (soft_exceptioninfo_call_node): Remove.
5877 (build_exception_object_ref): Declare.
5878 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
5879 soft_exceptioninfo_call_node. Move processing ...
5880 [EXC_PTR_EXPR]: ... here.
5881 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
5882 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
5883 (source_end_java_method): No java_set_exception_lang_code or
5884 emit_handlers.
5885 (build_dot_class_method): Use build_exception_object_ref.
5886 (try_reference_assignconv): Check EXC_PTR_EXPR not
5887 soft_exceptioninfo_call_node.
5888
5889 2001-03-28 Richard Henderson <rth@redhat.com>
5890
5891 * java-tree.h (throw_node): Define as a single member of
5892 java_global_trees instead of a separate array.
5893 (JTI_THROW_NODE): New.
5894 * decl.c (throw_node): Don't declare.
5895 (init_decl_processing): Init a scalar throw_node.
5896 Don't register it for gc.
5897 * check-init.c (check_init): Reference scalar throw_node.
5898 * expr.c (build_java_athrow): Likewise.
5899 * jcf-write.c (generate_bytecode_insns): Likewise.
5900 * parse.h (BUILD_THROW): Likewise.
5901
5902 2001-03-28 Richard Henderson <rth@redhat.com>
5903
5904 * decl.c (end_java_method): Do not save and restore
5905 flag_non_call_exceptions.
5906 * parse.y (source_end_java_method): Likewise.
5907 * lang.c (flag_exceptions): Don't declare.
5908 (java_init_options): Set flag_non_call_exceptions. Set
5909 flag_exceptions here ...
5910 (java_init): ... not here.
5911
5912 2001-03-27 Richard Henderson <rth@redhat.com>
5913
5914 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
5915 exceptions_via_longjmp.
5916
5917 * lang.c (flag_new_exceptions): Don't declare it.
5918 (java_init_options): Or set it.
5919
5920 2001-03-27 Richard Henderson <rth@redhat.com>
5921
5922 * decl.c (end_java_method): Rename asynchronous_exceptions to
5923 flag_non_call_exceptions.
5924 * parse.y (source_end_java_method): Likewise.
5925
5926 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5927
5928 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
5929
5930 2001-03-26 Mark Mitchell <mark@codesourcery.com>
5931
5932 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
5933
5934 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
5935
5936 * parse.y (find_as_inner_class): Follow current package
5937 indications not to mistakingly load an unrelated class.
5938
5939 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5940
5941 * constants.c (PUTN): Use memcpy, not bcopy.
5942
5943 * lex.c (java_read_char): Use memmove, not bcopy.
5944
5945 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
5946
5947 2001-03-23 Per Bothner <per@bothner.com>
5948
5949 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
5950 macro for better error pin-pointing.
5951 * java-tree.h: Fix typo in comment.
5952
5953 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
5954 Don't include jsr/goto in exception range.
5955 Check if start and end of exception range are the same (also TRY_EXPR).
5956 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
5957 However, do emit the following goto even if try_block is empty.
5958 Defer freeing exception_decl until after the finalizer, to make
5959 sure the local isn't reused in the finalizer. Fixes PR java/1208.
5960
5961 * parse.y (java_complete_lhs): If the try-clause is empty, just
5962 return the finally-clause and vice versa.
5963
5964 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
5965
5966 * gcj.texi (Input Options): documented the check for attribute
5967 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
5968 * java-tree.h (flag_force_classes_archive_check): Declared extern.
5969 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
5970 (jcf_parse): Check for the right classes archive if necessary.
5971 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
5972 (jcf_parse_fields): Fixed indentation.
5973 * jcf-write.c (append_gcj_attribute): New function.
5974 (generate_classfile): Compute the attribute count, invoke
5975 `append_gcj_attribute'.
5976 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
5977 turned into bit-fields. New bit-field `right_zip.'
5978 (JCF_ZERO): Set `right_zip' to zero.
5979 * lang-options.h (-fforce-classes-archive-check): Added flag.
5980 * lang.c (flag_force_classes_archive_check): New flag.
5981 (lang_f_options): New entry `force-classes-archive-check.'
5982 Fixes PR java/1213.
5983
5984 2001-02-07 Andrew Haley <aph@redhat.com>
5985
5986 * gcj.texi (Configure-time Options): Add -fcheck-references.
5987 * expr.c (build_java_indirect_ref): New function.
5988 (java_check_reference): New function.
5989 (build_java_array_length_access): Use build_java_indirect_ref to
5990 check for null references.
5991 (build_java_arrayaccess): Likewise.
5992 (build_get_class): Likewise.
5993 (build_field_ref): Likewise.
5994 (invoke_build_dtable): Likewise.
5995 (build_invokeinterface): Likewise.
5996 * lang.c (lang_f_options): Add flag_check_references.
5997 * jvspec.c (jvgenmain_spec): Add flag_check_references.
5998 * java-tree.h (flag_check_references): New variable.
5999 * lang.c (flag_check_references): Likewise.
6000 * parse.y (patch_invoke): Use java_check_reference.
6001 (patch_assignment): Allow for extra nesting in
6002 _Jv_CheckArrayStore.
6003
6004 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
6005
6006 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
6007 * lex.c (cxx_keywords): Likewise.
6008
6009 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
6010
6011 * parse.y (qualify_ambiguous_name): Broaden `length'
6012 recognition. Help MODIFY_EXPR be resolved as expression names.
6013 Fixes PR java/2066. Fixes PR java/2400.
6014
6015 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
6016
6017 * gjavah.c (process_file): Mark interface definitions with
6018 "__attribute__ ((java_interface))".
6019
6020 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
6021
6022 * class.c (layout_class): Fixed push_super_field's second
6023 argument. Fixes PR java/2333.
6024 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
6025 too early to lay innerclasses out.
6026
6027 2001-03-20 Tom Tromey <tromey@redhat.com>
6028 Alexandre Petit-Bianco <apbianco@redhat.com>
6029
6030 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
6031 inside an array reference. Insertion of the array store check
6032 rewritten. Fixes PR java/2299.
6033
6034 2001-03-20 Tom Tromey <tromey@redhat.com>
6035
6036 * lex.c (java_read_unicode): Only accept leading `u's.
6037
6038 2001-03-20 Tom Tromey <tromey@redhat.com>
6039
6040 * jcf-parse.c (read_class): Initialize `class'.
6041
6042 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
6043
6044 * jcf_parse.c (jcf_parse): Eliminate unused variable.
6045
6046 2001-03-19 Mark Mitchell <mark@codesourcery.com>
6047
6048 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
6049 (layout_class): Likewise.
6050 (layout_class_method): Likewise.
6051 (emit_register_classes): Likewise.
6052 * decl.c (builtin_function): Likewise.
6053 (give_name_to_locals): Likewise.
6054
6055 2001-03-19 Per Bothner <per@bothner.com>
6056
6057 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
6058 before trying to load an inner class.
6059
6060 Fixes to process to command-line .class files in two passes.
6061 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
6062 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
6063 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
6064 * class.c (is_compiled_class): Fix for renamed flag.
6065 * parse.y (maybe_create_class_interface_decl): Likewise.
6066 * jcf-parse.c (yyparse): Also set if compiling .class files.
6067 * jcf-parse.c (read_class); Read current_class.
6068 (jcf_parse): Make static.
6069 (load_inner_classes): New function, with code moved from jcf_parse,
6070 because we need to inner classes after the command-line files are read.
6071 (yyparse): Set finput to NULL when it doesn't need to be closed.
6072 Reduce use of main_jcf (basically only for archive) and
6073 use finput instead of main_jcf->read_state.
6074 Inline jcf_figure_file_type into yyparse.
6075 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
6076 Defer load_inner_classes and parse_class_file to a second pass,
6077 after we've correctly mapped command-line .clas fiels to classes.
6078 (jcf_figure_file_type): Removed.
6079 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
6080 (JCF_ZERO): Also clear zipd field.
6081 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
6082
6083 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
6084
6085 * jcf-parse.c (yyparse): Change ch from char * to char.
6086
6087 2001-03-19 Per Bothner <per@bothner.com>
6088
6089 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
6090 Add constructed filelist-file at end, following -xjava. Thus any .o
6091 and library files are not affected by the -xjava. Also wrap
6092 explicit @FILE with -xjava and -xnone.
6093
6094 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
6095
6096 * class.c (build_static_field_ref): Call make_decl_rtl() after
6097 setting the DECL_EXTERNAL flag.
6098
6099 2001-03-17 Per Bothner <per@bothner.com>
6100
6101 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
6102
6103 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
6104 when result is is needed (target is STACK_TARGET).
6105
6106 * parse.h (JDEP_SOLV): Removed.
6107 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
6108
6109 * parse.y (incomplete_class_list): Removed.
6110 (obtain_incomplete_type): Don't use or set incomplete_class_list.
6111 It doesn't work if resolve_class changes the name of an array type
6112 that is on the list and then someone else looks for the modified name.
6113 Also, seems liable to break when compiling multiple source files at
6114 once. So the simplest is to just remove incomplete_class_list -
6115 it is only a minor space win and it is not even clear it saves time.
6116
6117 * parse.y (resolve_class): Remove unneeded promote_type.
6118
6119 2001-03-15 Per Bothner <per@bothner.com>
6120
6121 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
6122 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
6123 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
6124 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
6125
6126 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
6127 * parse.y (java_expand_classes): Likewise.
6128
6129 * parse.y (expand_start_java_method): Was only called once and had a
6130 misleading name, so inline in caller java_complete_expand_method.
6131 (enter_a_block): Likewise inline in enter_block and remove.
6132
6133 Remove junk from when gcc/java was created (by copying from C/C++).
6134 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
6135 (struct binding_level): Remove fields keep, keep_if_subblocks,
6136 more_cleanups_ok, have_cleanups (which have never been used).
6137 (pushlevel, poplevel): Remove related useless code.
6138
6139 * class.c (make_class_data): The class_dtable_decl (i.e. the
6140 vtable for Class) should be external, except when compiling Class.
6141
6142 * jvspec.c (lang_specific_driver): Fix -C handling.
6143 Check -save-temps to see if temp @FILE should be deleted.
6144 Follow-up to/fix for February 16 patch.
6145
6146 * verify.c (verify_jvm_instructions): Better error msgs for dup.
6147 (type_stack_dup): Remove no-longer neded error check.
6148
6149 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
6150
6151 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
6152 to 'for_pointer'. If this type is for a pointer (argument) mangling,
6153 don't surround the element with 'N..E' if the type name is
6154 unqualified.
6155
6156 2001-03-14 Mark Mitchell <mark@codesourcery.com>
6157
6158 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
6159 DECL_RTL_SET_P, etc.
6160 (make_method_value): Likewise.
6161 (get_dispatch_table): Likewise.
6162
6163 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
6164
6165 2001-03-07 Tom Tromey <tromey@redhat.com>
6166
6167 * config-lang.in (lang_requires): Define.
6168
6169 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
6170
6171 * typeck.c (convert): Check flag_unsafe_math_optimizations,
6172 not flag_fast_math.
6173
6174 2001-03-05 Per Bothner <per@bothner.com>
6175
6176 Fix a problem where rest_of_decl_compilation applied to
6177 class_dtable_decl causes problems because it was done too early,
6178 before output file was opened.
6179 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
6180 * class.c (class_dtable_decl): Add macro - element of class_roots.
6181 (make_class_data): Define class_dtable_decl.
6182 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
6183
6184 2001-03-01 Zack Weinberg <zackw@stanford.edu>
6185
6186 * java/class.c, java/decl.c, java/java-tree.h: Replace all
6187 uses of 'boolean' with 'bool'.
6188
6189 2001-03-01 Zack Weinberg <zackw@stanford.edu>
6190
6191 * lang-specs.h: Add zero initializer for cpp_spec field to all
6192 array elements.
6193
6194 2001-02-16 Per Bothner <per@bothner.com>
6195
6196 Handle compiling multiple input files at once, and @FILE syntax.
6197 * gcj.texi: Updated documentation to match.
6198 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
6199 * jcf-parse.c (parse_source_file): Split into ...
6200 (parse_source_file_1): New function - and:
6201 (parse_source_file_2): New function.
6202 (yyparse): On -ffilelist-file, open and scan named file.
6203 On first pass over files, only do parse_source_file_1.
6204 A new second pass calls parse_source_file_2 for each file to compile.
6205 (init_jcf_parse): Call init_src_parse.
6206 * jvspec.c (INDIRECT_FILE_ARG): New flag.
6207 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
6208 as multiple input file combined in one compilation.
6209 * lang-options.h: Add -ffilelist-file
6210 * lang.c (flag_filelist_file): New flag variable.
6211 (lang_f_options): Handle -ffilelist-file.
6212 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
6213 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
6214 gclass_list - use global fields of src_parse_roots instead.
6215 * parse.y (src_parse_roots): New array.
6216 (incomplete_class_list, gclass_list): New macros.
6217 (push_parser_context, java_pop_parser_context,
6218 java_parser_context_resume): Don't fiddle with deleted fields.
6219 (various): Use incomplete_class gclass_list and global macros
6220 instead of parse_ctxt fields - the lists are global.
6221 (init_src_parse): New function.
6222
6223 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6224
6225 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
6226
6227 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
6228
6229 * parse.y (check_inner_class_access): Moved declaration of local
6230 `enclosing_decl_type' to the right location.
6231
6232 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
6233
6234 * parse.y (parser_check_super_interface): Don't call
6235 check_pkg_class_access for an inner interface.
6236 (parser_check_super): Don't call check_pkg_class_access for inner
6237 class.
6238 (do_resolve_class): Simplify enclosing type loop. Don't call
6239 check_pkg_class_access if CL and DECL are not set.
6240 (find_in_imports_on_demand): Set DECL if class_type needed to be
6241 loaded. Don't call check_pkg_class_access for an inner class.
6242 (check_inner_class_access): Rewritten to implement member access
6243 rules as per spec 6.6.1.
6244 (check_pkg_class_access): Handle the empty package correctly.
6245 (in_same_package): New function. Determine if two classes are in the
6246 same package.
6247
6248 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
6249
6250 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
6251 method into array types.
6252 * parse.y (patch_method_invocation): Bypass access check on clone call
6253 to array instance.
6254
6255 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
6256
6257 * expr.c (build_instanceof): Check for arrays when trying fold to
6258 false.
6259
6260 2001-02-15 Jim Meyering <meyering@lucent.com>
6261
6262 * Make-lang.in (java.install-common): Depend on `installdirs'.
6263 (java.install-info): Likewise.
6264
6265 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
6266
6267 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
6268
6269 2001-02-14 Tom Tromey <tromey@redhat.com>
6270 Alexandre Petit-Bianco <apbianco@cygnus.com>
6271
6272 Fix for PR java/1261.
6273 * typeck.c (build_java_array_type): Add public `clone' method to
6274 arrays.
6275 * parse.y (resolve_qualified_expression_name): Use current_class
6276 when checking for inaccessibility.
6277 (patch_method_invocation): Fixed error message when accessibility
6278 denied. Added `from_super' argument.
6279
6280 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
6281
6282 * parse.y (resolve_class): Don't build a fake decl. Use the one
6283 already built.
6284 * typeck.c (build_java_array_type): Build and assign decl to array
6285 type.
6286
6287 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
6288
6289 * parse.y (not_accessible_p): Changed leading comment. Added extra
6290 `where' argument. Use it to enforce protected access rules.
6291 (resolve_qualified_expression_name): Added extra argument to
6292 not_accessible_p.
6293 (patch_method_invocation): Use argument `primary' to provide
6294 not_accessible_p with an extra argument.
6295 (lookup_method_invoke): Added extra argument to not_accessible_p.
6296 (search_applicable_method_list): Likewise.
6297
6298 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
6299
6300 * parse.y (resolve_qualified_expression_name): Try to resolve as
6301 an inner class access only if `decl' is a TYPE_DECL.
6302
6303 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
6304
6305 * decl.c (classdollar_identifier_node): Initialize.
6306 * java-tree.h (enum java_tree_index): New entry
6307 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
6308 (classdollar_identifier_node): New macro.
6309 (ID_CLASSDOLLAR_P): Likewise.
6310 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
6311 (build_dot_class_method_invocation): Likewise.
6312 (find_applicable_accessible_methods_list): `class$' can't be
6313 inherited.
6314
6315 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
6316
6317 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
6318
6319 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6320
6321 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
6322 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
6323 gone.
6324
6325 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6326
6327 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
6328 outside of the `__U' sequence too.
6329 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
6330 sequence too.
6331
6332 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6333
6334 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
6335
6336 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
6337
6338 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
6339 (JVGENMAIN_OBJS): Likewise.
6340 * java-tree.h (append_gpp_mangled_name): New prototype.
6341 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
6342 Removed cast calling `gcc_add_root.'
6343 * jvgenmain.c (mangle_obstack): New global, initialized.
6344 (main): Use it.
6345 (do_mangle_class): Constify local `ptr.'
6346 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
6347 append_gpp_mangle_name and update `count' if necessary.
6348 Use `mangle_obstack.'
6349 * mangle.c (append_unicode_mangled_name): Removed.
6350 (append_gpp_mangled_name): Likewise.
6351 (unicode_mangling_length): Likewise.
6352 (mangle_member_name): Return type set to `void.'
6353 (mangle_field_decl): Don't append `U' in escaped names.
6354 (mangle_method_decl): Likewise.
6355 (mangle_member_name): Just use `append_gpp_mangled_name.'
6356 * mangle_name.c: New file.
6357
6358 2001-02-07 Per Bothner <per@bothner.com>
6359
6360 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
6361
6362 * check-init.c (check_init): Don't call done_alternative after
6363 processing loop code, as a LOOP_EXPR never terminates normally.
6364
6365 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
6366
6367 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
6368
6369 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
6370
6371 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
6372 DECLs.
6373
6374 2001-02-06 Tom Tromey <tromey@redhat.com>
6375
6376 * lex.c (java_new_lexer): Longer error message.
6377
6378 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
6379 Alexandre Petit-Bianco <apbianco@cygnus.com>
6380
6381 * typeck.c (build_prim_array_type): Added leading comment.
6382 (build_java_array_type): Moved locals out of
6383 block. Always create the `data' field, fixed alignment to match
6384 C++.
6385
6386 2001-02-04 Tom Tromey <tromey@redhat.com>
6387
6388 * expr.c (java_lang_expand_expr): Don't bother recomputing
6389 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
6390 Fixes PR java/1866.
6391
6392 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
6393
6394 * parse.y (process_imports): Save the original name of the import
6395 for better error report.
6396
6397 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
6398
6399 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
6400 of macros used when compiling jvspec.c.
6401 * jvspec.c (lang_specific_driver): Link with the shared
6402 libgcc by default.
6403
6404 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6405
6406 * check-init.c (check_init): Call internal_error instead of fatal.
6407 * expr.c (java_lang_expand_expr): Likewise.
6408 * jcf-parse.c (get_constant): Likewise.
6409 * mangle.c (java_mangle_decl): Likewise.
6410 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
6411 (operator_string): Likewise.
6412 * check-init.c (check_init): Call abort instead of fatal.
6413 * class.c (build_class_ref): Likewise.
6414 * constants.c (write_constant_pool): Likewise.
6415 * decl.c (start_java_method): Likewise.
6416 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
6417 (java_stack_dup, encode_newarray_type): Likewise.
6418 (build_java_array_length_access): Likewise.
6419 (build_java_check_indexed_type, expand_java_pushc): Likewise.
6420 (build_java_soft_divmod, build_invokeinterface): Likewise.
6421 * java-tree.h (INNER_CLASS_P): Likewise.
6422 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
6423 (give_name_to_class, get_class_constant): Likewise.
6424 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
6425 (find_constant_index, generate_bytecode_conditional): Likewise.
6426 (generate_bytecode_insns, perform_relocations): Likewise.
6427 * lex.c (java_unget_unicode, java_lex): Likewise.
6428 * mangle.c (mangle_type, mangle_record_type): Likewise.
6429 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
6430 (finish_mangling): Likewise.
6431 * parse.h (MARK_FINAL_PARMS): Likewise.
6432 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
6433 (obtain_incomplete_type, java_complete_class): Likewise.
6434 (java_check_regular_methods, java_complete_expand_method): Likewise.
6435 (cut_identifier_in_qualified, check_deprecation): Likewise.
6436 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
6437 (java_complete_lhs, lookup_name_in_blocks): Likewise.
6438 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
6439 * typeck.c (set_local_type, parse_signature_type): Likewise.
6440 (parse_signature_string, build_java_signature): Likewise;
6441 (set_java_signature): Likewise.
6442 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
6443 * class.c (add_method): Call fatal_error instead of fatal.
6444 (build_static_field_ref): Likewise.
6445 * expr.c (build_known_method_ref, expand_invoke): Likewise.
6446 * jcf-parse.c (get_constant, jcf_parse): Likewise.
6447 * lex.c (java_new_new_lexer): Likewise.
6448 * jv-scan.c (main): Likewise.
6449 (fatal_error): Renamed from fatal.
6450 * jcf-parse.c (yyparse): Call fatal_io_error instead of
6451 pfatal_with_name.
6452 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
6453 (yyparse): Likewise.
6454 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
6455 * lex.c (java_get_line_col): Likewise.
6456 * jcf-parse.c (load_class): Make errors non-fatal.
6457 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
6458
6459 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
6460
6461 * jvgenmain.c (class_mangling_suffix): Remove unused string.
6462 (error): Remove unused function.
6463 (main): Don't use "__attribute__ alias" on generated class symbol.
6464
6465 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
6466
6467 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
6468 argument.
6469 * parse.y (finish_method_declaration): Code accounting for WFLed
6470 method DECL_NAMEs deleted.
6471 (check_abstract_method_definitions): Likewise.
6472 (resolve_type_during_patch): Layout resolved type.
6473 * typeck.c (lookup_do): Removed unused local.
6474
6475 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
6476
6477 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
6478 * decl.c (init_decl_processing): Use integer_minus_one_node, not
6479 integer_negative_one_node.
6480 * expr.c (build_java_binop): Likewise.
6481
6482 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
6483
6484 * zextract.c (read_zip_archive): Read file_offset before writing
6485 zipd and consequently clobbering the header contents.
6486
6487 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6488
6489 * Make-lang.in: Remove all dependencies on defaults.h.
6490 * decl.c: Don't include defaults.h.
6491 * expr.c: Likewise.
6492 * parse.y: Likewise.
6493
6494 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
6495
6496 * ChangeLog (2001-01-21): Fixed typo.
6497 * class.c (layout_class_method): Code accounting for WFLed
6498 method DECL_NAMEs deleted.
6499 * constant.c (find_methodref_index): Likewise.
6500 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
6501 * java-tree.h (DECL_FUNCTION_WFL): New macro.
6502 (struct lang_decl): New field `wfl'.
6503 (java_get_real_method_name): Prototype deleted.
6504 * mangle.c (mangle_method_decl): Code accounting for WFLed
6505 method DECL_NAMEs deleted.
6506 * parse.h (GET_METHOD_NAME): Macro deleted.
6507 * parse.y (reset_method_name): Deleted.
6508 (method_header): Set DECL_FUNCTION_WFL.
6509 (check_abstract_method_header): Code accounting for WFLed method
6510 DECL_NAMEs deleted.
6511 (java_get_real_method_name): Deleted.
6512 (check_method_redefinition): Code accounting for WFLed method
6513 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
6514 (java_check_regular_methods): Likewise.
6515 (java_check_abstract_methods): Likewise.
6516 (java_expand_classes): Don't call `reset_method_name.'
6517 (search_applicable_method_list): Use DECL_NAMEs instead of
6518 GET_METHOD_NAME.
6519 * typeck.c (lookup_do): Code accounting for WFLed method
6520 DECL_NAMEs deleted.
6521
6522 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
6523
6524 * lex.c (java_read_char): Check for EOF from getc first.
6525
6526 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
6527
6528 * class.c (layout_class): Don't lay the superclass out if it's
6529 already being laid out.
6530 * jcf-parse.c (handle_innerclass_attribute): New function.
6531 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
6532 handle_innerclasses_attribute.
6533 (jcf_parse): Don't load an innerclasses if it's already being
6534 laid out.
6535 * jcf-write.c (append_innerclass_attribute_entry): Static
6536 `anonymous_name' and its initialization deleted. `ocii' and `ini'
6537 to be zero for anonymous classes.
6538
6539 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
6540
6541 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
6542 necessary.
6543 * jcf-parse.c (set_source_filename): Use
6544 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
6545
6546 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
6547
6548 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
6549 gets a unique asm name.
6550
6551 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
6552
6553 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
6554 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
6555 if necessary.
6556 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
6557 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
6558 * parse.y (lookup_package_type_and_set_next): Deleted.
6559 (resolve_package): Removed unnecessary code.
6560 (find_applicable_accessible_methods_list): `finit$' can't be
6561 inherited.
6562 * verify.c (pop_argument_types): Added missing prototype.
6563
6564 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
6565
6566 * config-lang.in: Disable java by default.
6567
6568 2001-01-23 Tom Tromey <tromey@redhat.com>
6569
6570 * gcj.texi (Copying): New node.
6571 Added copyright information.
6572
6573 2001-01-21 Per Bothner <per@bothner.com>
6574
6575 Various fixes to allow compiling a compressed .jar/.zip archive.
6576 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
6577 (struct ZipFile): Add fields name and next (from ZipFileCache).
6578 (struct ZipDirectory): New field zipf points to owning ZipFile.
6579 * jcf.h (struct ZipDirectory): Add forward declaration.
6580 (struct JCF): Declare zipd field to have type struct ZipDirectory.
6581 Remove seen_in_zip and zip_offset fields.
6582 (JCF_SEEN_IN_ZIP): New macro.
6583 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
6584 * jcf-io.c: Change all ZipFileCache to ZipFile.
6585 (read_zip_member): New function.
6586 (open_in_zip): Call read_zip_member.
6587 * jcf-parse.c (find_in_current_zip): Remove function.
6588 (read_class): Merge in find_in_current_zip functionality.
6589 Call read_zip_member if needed.
6590 (parse_zip_file_entries): Use read_zip_member.
6591 (process_zip_dir): Update for removed and added JCF fields.
6592 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
6593
6594 2001-01-21 Per Bothner <per@bothner.com>
6595
6596 Minor optimization of static ggc roots.
6597 * jcf-parse.c (parse_roots): New static field.
6598 (current_field, current_method, current_file_list): Replace by macros
6599 naming fields of parse_roots.
6600 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
6601 * class.c (class_roots): New static field.
6602 (registered_class, fields_ident, info_ident, class_list):
6603 New macros naming fields of parse_roots.
6604 (build_static_field_ref): Don't register roots here.
6605 (layout_class): Static field list replaced by macro class_list.
6606 (init_class_processing): Call ggc_add_tree_root for 4 roots.
6607 Initialize fields_ident and info_ident here.
6608
6609 2001-01-21 Per Bothner <per@bothner.com>
6610
6611 * jcf-parse.c (ggc_mark_jcf): New function.
6612 (init_jcf_parse): Register current_jcf as ggc root.
6613
6614 2001-01-21 Per Bothner <per@bothner.com>
6615
6616 * lang.c (put_decl_node): Print method's name.
6617
6618 2001-01-21 Per Bothner <per@bothner.com>
6619
6620 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
6621 (verify_jvm_instructions): Use it, for better error messages on loads.
6622
6623 2001-01-21 Per Bothner <per@bothner.com>
6624
6625 * verify.c (merge_type_state): Still may have to merge even if
6626 LABEL_VERIFIED (label).
6627
6628 2001-01-21 Per Bothner <per@bothner.com>
6629
6630 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
6631 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
6632
6633 2001-01-19 Per Bothner <per@bothner.com>
6634
6635 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
6636 if expeting an interface type. Refines Tom's change of 2000-09-12.
6637
6638 2001-01-18 Per Bothner <per@bothner.com>
6639
6640 * gcj.texi (Input Options): Mention .java files.
6641
6642 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
6643
6644 * lang-options.h (-Wunsupported-jdk11): Removed.
6645 * lang.c (flag_not_overriding): Deleted.
6646 (flag_static_local_jdk1_1): Likewise.
6647 (lang_W_options): Removed "unsupported-jdk11" entry.
6648 * parse.y (java_check_methods): Removed dead code.
6649
6650 2001-01-17 Tom Tromey <tromey@redhat.com>
6651
6652 Changes suggested by Per Bothner:
6653 * gcj.texi (Input Options): Don't mention input files.
6654 (Code Generation): Updated --main information.
6655 (Invoking jcf-dump): Mention that --javap is incomplete.
6656 From Alexandre Petit-Bianco:
6657 (Warnings): Don't mention -Wunsupported-jdk11.
6658 My stuff:
6659 (Compatibility): Mention JDK 1.2-ness of libraries.
6660 (Resources): Mention resources used when writing gcj.
6661
6662 2001-01-17 Tom Tromey <tromey@redhat.com>
6663
6664 * gcj.texi: New file.
6665 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
6666 (java.info): Depend on gcj.info.
6667 (java/gcj.dvi): New target.
6668 (java.dvi): Depend on gcj.dvi.
6669 (java.install-info): Wrote.
6670
6671 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
6672
6673 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
6674 having called make_decl_rtl.
6675
6676 2001-01-14 Per Bothner <per@bothner.com>
6677
6678 Various patches to emit better messages on verification errors.
6679 * expr.c (push_type_0): Return error indication on stack overflow,
6680 instead of callinfg fatal.
6681 (push_type): Now just call push_type_0 (nd fatal on overflow).
6682 (pop_type_0): Return detailed error message (in a char** argument).
6683 (pop_type): If pop_type_0 fails, print error message.
6684 (pop_argument_types): Moved to verify.c.
6685 * verify.c (pop_argument_types): Moved from expr.c.
6686 Return a (possible) error message, rather than void.
6687 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
6688 (verify_jvm_instruction): Use new macros, improving error messages.
6689 For case OPCODE_astore use object_ptr_type_node.
6690 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
6691 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
6692
6693 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
6694 constant, return body without wrapper. (Improves constant folding.)
6695 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
6696
6697 2001-01-13 Per Bothner <per@bothner.com>
6698
6699 * expr.c (expand_java_field_op): Assigning to a final field outside
6700 an initializer does not violate JVM spec, so should be warning, not
6701 error. (Sun's verifier does not complain - though MicroSoft's does.)
6702
6703 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
6704
6705 * gjavah.c (version), jcf-dump.c (version): Update copyright year
6706 to 2001.
6707
6708 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
6709
6710 * parse.y (resolve_expression_name): Permit instance variables from
6711 enclosing context in super constructor call.
6712 (resolve_qualified_expression_name): Permit enclosing class's qualified
6713 "this" in super constructor call.
6714
6715 2001-01-10 Mark Mitchell <mark@codesourcery.com>
6716
6717 * class.c (build_utf8_ref): Remove last argument in call to
6718 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
6719 (build_class_ref): Likewise.
6720 (build_static_field_ref): Likewise.
6721 (get_dispatch_table): Likewise.
6722 (layout_class_method): Likewise.
6723 (emit_register_classes): Likewise.
6724 * constants.c (build_constant_data_ref): Likewise.
6725 * decl.c (builtin_function): Likewise.
6726 (create_primitive_vtable): Likewise.
6727 * expr.c (build_known_method_def): Likewise.
6728 (build_jni_stub): Likewise.
6729 (java_lang_expand_expr): Likewise.
6730
6731 2001-01-10 Tom Tromey <tromey@redhat.com>
6732
6733 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
6734
6735 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
6736
6737 * java-tree.h (lang_printable_name_wls): New prototype.
6738 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
6739 rather than `current_class' to print type name. Don't prepend type
6740 names when printing constructor names.
6741 (lang_printable_name_wls): New function.
6742 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
6743 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
6744 * parse.y (patch_method_invocation): Message tuned for constructors.
6745 (not_accessible_p): Grant `private' access from within
6746 enclosing contexts.
6747
6748 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
6749
6750 All files with updated copyright when applicable.
6751 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
6752 * class.c (mangle_class_field): Function removed.
6753 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
6754 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
6755 (build_class_ref): Call `java_mangle_class_field' instead of
6756 `mangle_class_field.'
6757 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
6758 (layout_class): Call `java_mangle_decl' instead of
6759 `mangle_static_field.'
6760 (cxx_keywords): Initialized static array moved to `lex.c.'
6761 (layout_class_method): Changed leading comment. Simplified to
6762 call `java_mangle_decl.' Local `ptr' moved in for loop body.
6763 * decl.c (lang_mark_tree): Mark field `package_list.'
6764 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
6765 (struct lang_type): New field `package_list.'
6766 (unicode_mangling_length): Prototype removed.
6767 (append_gpp_mangled_name, append_gpp_mangled_classtype,
6768 emit_unicode_mangled_name): Likewise.
6769 (cxx_keyword_p): New prototype.
6770 (java_mangle_decl, java_mangle_class_field,
6771 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
6772 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
6773 `build_expr_wfl.'
6774 * jvgenmain.c (main_method_prefix): Global variable removed.
6775 (main_method_suffix): Likewise.
6776 (do_mangle_classname): New function.
6777 (main): Call it. Format changed to accommodate new mangling scheme.
6778 * lex.c: (utf8_cmp): Conditionally prototyped.
6779 (cxx_keywords): Moved from class.c, conditionally defined.
6780 (utf8_cmp, cxx_keyword_p): Likewise.
6781 * mangle.c (obstack.h, ggc.h): Included.
6782 (mangle_field_decl): New function.
6783 (mangle_method_decl, mangle_type, mangle_pointer_type,
6784 mangle_array_type, mangle_record_type,
6785 find_compression_pointer_match, find_compression_array_match,
6786 find_compression_record_match,
6787 find_compression_array_template_match, set_type_package_list,
6788 entry_match_pointer_p, emit_compression_string, init_mangling,
6789 finish_mangling, compression_table_add, mangle_member_name): Likewise.
6790 (mangle_obstack): New global.
6791 (MANGLE_RAW_STRING): New macro.
6792 (unicode_mangling_length): Turned static.
6793 (append_unicode_mangled_name): Renamed from
6794 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
6795 replaces `obstack', removed from the parameter list.
6796 (append_gpp_mangled_name): Turned static. `mangle_obstack'
6797 replaces parameter `obstack', removed from the parameter list. Call
6798 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
6799 (append_gpp_mangled_classtype): Removed.
6800 (compression_table, compression_next): New static variables.
6801 * parse.y (temporary_obstack): Extern declaration removed.
6802
6803 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
6804
6805 * parse.y (patch_binop): Compute missing type in error situations.
6806
6807 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
6808
6809 * class.c (make_class_data): Push initial value for "arrayclass".
6810 * decl.c (init_decl_processing): Add new class field "arrayclass".
6811
6812 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
6813
6814 From patha@softlab.ericsson.se:
6815 * parse.y (switch_label): Use build, not build1, to construct
6816 DEFAULT_EXPR.
6817
6818 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
6819
6820 * lang.c (lang_decode_option): Change -MA to -MP.
6821 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
6822 Update to new prototype; do quote targets.
6823 (jcf_dependency_write): Update.
6824
6825 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
6826
6827 Shorten primitive array allocation path:
6828 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
6829 to create new primitive arrays.
6830 * expr.c (build_newarray): If generating native code, call
6831 soft_newarray_node with a reference to the primitive TYPE identifier
6832 instead of type_value.
6833
6834 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
6835
6836 Fix for PRs gcj/312 and gcj/253:
6837 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
6838 dest if they arn't already.
6839 * class.c (layout_class): Call maybe_layout_super_class on
6840 superinterfaces also, but only if compiling from bytecode.
6841
6842 Fix for PR gcj/373:
6843 * parse.y (create_class): Set ACC_STATIC if class is declared in an
6844 interface.
6845
6846 2000-12-15 Tom Tromey <tromey@redhat.com>
6847
6848 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
6849 set.
6850
6851 2000-12-14 Andrew Haley <aph@redhat.com>
6852
6853 * boehm.c (mark_reference_fields): Change test to correctly detect
6854 bitmap overflow.
6855
6856 2000-12-15 Andreas Jaeger <aj@suse.de>
6857
6858 * config-lang.in (lang_dirs): Added.
6859
6860 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
6861
6862 * parse.y (end_artificial_method_body): Fixed undefined behavior.
6863 Credits go to rth for finding it.
6864
6865 2000-12-13 Mike Stump <mrs@wrs.com>
6866
6867 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
6868
6869 2000-11-07 Tom Tromey <tromey@cygnus.com>
6870
6871 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
6872 * lex.c (java_ignorable_control_p): Removed.
6873 (java_letter_or_digit_p): Removed.
6874 (java_start_char_p): New function.
6875 (java_read_char): Return `int', not `unicode_t'. Changed
6876 callers.
6877 (java_read_unicode): Likewise.
6878 (java_read_unicode_collapsing_terminators): Likewise.
6879 (java_get_unicode): Likewise.
6880 (java_new_lexer): Initialize hit_eof.
6881 (java_parse_end_comment): Take `int' argument.
6882 (java_parse_doc_section): Likewise.
6883 (java_parse_escape_sequence): Don't allow backlash-newline.
6884 Return `int'.
6885 * lex.h (JAVA_DIGIT_P): Removed.
6886 (_JAVA_LETTER_OR_DIGIT_P): Removed.
6887 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
6888 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
6889 (JAVA_PART_CHAR_P): New macro.
6890 (UEOF): Now -1.
6891 (JAVA_CHAR_ERROR): Now -2.
6892 (java_lexer): New field `hit_eof'.
6893 * chartables.h: New file.
6894 * gen-table.pl: new file.
6895
6896 2000-11-20 Tom Tromey <tromey@cygnus.com>
6897 Alexandre Petit-Bianco <apbianco@cygnus.com>
6898
6899 * parse.y (java_complete_lhs): Only allow compound assignment of
6900 reference type if type is String.
6901
6902 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
6903
6904 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
6905 jcf-path.c: Likewise.
6906
6907 2000-12-09 Anthony Green <green@redhat.com>
6908
6909 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
6910 filestart and filename_length as int values.
6911
6912 2000-12-07 Mo DeJong <mdejong@redhat.com>
6913
6914 * jcf-io.c (find_class): Correct the logic that tests to see if a
6915 .java file is newer than its .class file. The compiler was
6916 incorrectly printing a warning when file mod times were equal.
6917
6918 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
6919
6920 * jvgenmain.c: Use ISPRINT not isascii.
6921
6922 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
6923
6924 * parse.y (end_artificial_method_body): Fixed typo.
6925
6926 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
6927
6928 * parse.y (patch_method_invocation): Pick the correct enclosing
6929 context when creating inner class instances.
6930 Fixes gcj/332.
6931
6932 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
6933
6934 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
6935 Update copyright year to 2000.
6936
6937 2000-11-23 Anthony Green <green@redhat.com>
6938
6939 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
6940 Move current_file_list out of yyparse and make it static.
6941
6942 * expr.c: Declare quick_stack and tree_list_free_list as static
6943 (init_expr_processing): Register quick_stack and
6944 tree_list_free_list roots.
6945
6946 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
6947
6948 * parse.y (build_outer_field_access): New local `decl_ctx', use
6949 it. Check for field's context and current class immediate outer
6950 context inheritance.
6951 (outer_field_access_p): Consider fields inherited from the last
6952 enclosing context.
6953 (build_access_to_thisn): Stop at the last enclosing context if
6954 necessary.
6955 Fixes gcj/367.
6956
6957 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
6958
6959 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
6960
6961 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
6962
6963 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
6964 scratch buffer.
6965
6966 2000-11-20 Tom Tromey <tromey@cygnus.com>
6967
6968 * jv-scan.c (help): Document --complexity.
6969 (options): Added --complexity.
6970 (flag_complexity): New global.
6971 (main): Call `report'.
6972 * parse-scan.y (complexity): New global.
6973 (if_then_statement, if_then_else_statement,
6974 if_then_else_statement_nsi, switch_block_statement_group,
6975 while_expression, do_statement, for_begin, continue_statement,
6976 throw_statement, catch_clause, finally, method_invocation,
6977 conditional_and_expression, conditional_or_expression,
6978 conditional_expression): Update complexity.
6979 (reset_report): Reset complexity.
6980 (report): New function.
6981
6982 2000-11-20 Tom Tromey <tromey@cygnus.com>
6983
6984 * lex.c (yylex): Added STRICT_TK case.
6985 * parse.y (STRICT_TK): Added.
6986 * parse-scan.y (STRICT_TK): Added.
6987 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
6988 `;'. Use 4, not 3, with -k option. Correctly rename resulting
6989 file.
6990 * keyword.h: Rebuilt.
6991 * keyword.gperf (strictfp): Added.
6992
6993 2000-11-20 Tom Tromey <tromey@cygnus.com>
6994
6995 * lex.c (yylex): Recognize floating point constants with leading
6996 0.
6997
6998 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6999
7000 * java-tree.h (cyclic_inheritance_report): Constify.
7001 * parse.y (cyclic_inheritance_report): Likewise.
7002
7003 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
7004
7005 * parse.y (goal): Remove call to ggc_add_string_root.
7006
7007 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
7008
7009 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
7010 Create string in scratch buffer, then pass to build_string.
7011
7012 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
7013
7014 * parse.y (issue_warning_error_from_context): Add
7015 ATTRIBUTE_PRINTF.
7016
7017 2000-11-11 Anthony Green <green@redhat.com>
7018
7019 * jcf-parse.c (process_zip_dir): Add finput parameter.
7020 (jcf_figure_file_type): Call process_zip_dir with appropriate
7021 argument.
7022
7023 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7024
7025 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
7026 * jcf-parse.c (jcf_figure_file_type): Likewise.
7027
7028 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
7029
7030 * parse.y (create_new_parser_context): Use memset () instead of
7031 bzero ().
7032
7033 2000-11-08 Tom Tromey <tromey@cygnus.com>
7034
7035 * gjavah.c (process_file): Only include gcj/cni.h when generating
7036 CNI stubs.
7037
7038 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
7039
7040 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
7041 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
7042 instead of bzero ().
7043
7044 2000-11-05 Tom Tromey <tromey@cygnus.com>
7045
7046 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
7047 * lex.c (IS_ZERO): New define.
7048 (java_perform_atof): Error on floating point underflow.
7049
7050 2000-11-04 Tom Tromey <tromey@cygnus.com>
7051
7052 * lex.c (java_parse_escape_sequence): Only read two octal
7053 characters if the first one is greater than 3. Don't allow
7054 "octal" numbers to include the digits 8 or 9.
7055
7056 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
7057
7058 * Make-lang.in (java.distdir): Remove.
7059
7060 2000-11-03 Tom Tromey <tromey@cygnus.com>
7061
7062 * Make-lang.in (java.dvi): New target.
7063 Partial fix for PR other/567.
7064
7065 * lang-options.h: Mention -Wout-of-date.
7066 * jcf-dump.c (flag_newer): New global.
7067 * gjavah.c (flag_newer): New global.
7068 * jcf-io.c (find_class): Only warn when flag_newer set.
7069 * lang.c (flag_newer): New global.
7070 (struct string_option): New declaration.
7071 (lang_W_options): New global.
7072 (process_option_with_no): New function.
7073 (lang_decode_option): Use it.
7074
7075 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
7076 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
7077 `$'.
7078
7079 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
7080 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
7081 * lex.c (java_read_unicode): Removed `term_context' argument.
7082 Recognize any number of `u' in `\u'.
7083 (java_read_unicode_collapsing_terminators): New function.
7084 (java_get_unicode): Use it.
7085 (java_lineterminator): Removed.
7086 (yylex): Produce error if character literal is newline or single
7087 quote. Return if eof found in middle of `//' comment. EOF in
7088 `//' comment is only an error if pedantic.
7089 (java_ignorable_control_p): New function.
7090 (java_parse_end_comment): Return if eof found in middle of
7091 comment.
7092 Include flags.h.
7093 * jv-scan.c (pedantic): New global.
7094
7095 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
7096
7097 * parse.y (outer_field_access_p): Inherited fields aren't
7098 consider outer fields.
7099 (maybe_build_thisn_access_method): Use
7100 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
7101 (resolve_expression_name): Trigger an error if a static field
7102 is being accessed as an outer field.
7103
7104 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
7105
7106 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
7107 Fixes gcj/365.
7108
7109 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
7110
7111 * Make-lang.in: Move all build rules here from Makefile.in,
7112 adapt to new context. Wrap all rules that change the current
7113 directory in parentheses. Expunge all references to $(P).
7114 When one command depends on another and they're run all at
7115 once, use && to separate them, not ;. Add OUTPUT_OPTION to
7116 all object-file generation rules. Delete obsolete variables.
7117
7118 * Makefile.in: Delete.
7119 * config-lang.in: Delete outputs= line.
7120
7121 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7122
7123 * parse.y (patch_method_invocation): NULLify this_arg when already
7124 inserted.
7125 (maybe_use_access_method): Handle call to methods unrelated to the
7126 current class. Fixed comment.
7127 Fixes gcj/361.
7128
7129 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
7130
7131 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
7132 scope.
7133
7134 2000-10-24 Tom Tromey <tromey@cygnus.com>
7135
7136 * lex.c (java_new_lexer): Initialize new fields. Work around
7137 broken iconv() implementations.
7138 (java_read_char): Swap bytes if required. Use fallback decoder if
7139 required.
7140 (byteswap_init, need_byteswap): New globals.
7141 (java_destroy_lexer): Only close iconv handle if it is in use.
7142 * lex.h (java_lexer): New fields read_anything, byte_swap,
7143 use_fallback.
7144 Made out_buffer unsigned.
7145
7146 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
7147
7148 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
7149 where an enclosing context can be set on the jdep.
7150 (do_resolve_class): Fixed identation.
7151
7152 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7153
7154 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
7155
7156 * jcf-reader.c (peek_attribute, skip_attribute): Only define
7157 when requested.
7158
7159 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
7160
7161 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
7162
7163 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
7164
7165 * jcf-write.c (OP1): Update `last_bc'.
7166 (struct jcf_block): Fixed indentation and typo in comments. New
7167 field `last_bc'.
7168 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
7169 follows `monitorenter'.
7170 * parse.y (patch_synchronized_statement): New local `tmp'. Call
7171 `patch_string'.
7172 Fixes gcj/232.
7173
7174 2000-10-16 Tom Tromey <tromey@cygnus.com>
7175
7176 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
7177 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
7178 * lang-options.h: Added -MA, -MT, -MF..
7179 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
7180 (DEPEND_TARGET_SET): New macro.
7181 (DEPEND_FILE_ALREADY_SET): Likewise.
7182 (init_parse): Handle new flags.
7183 * jcf.h (jcf_dependency_print_dummies): Declare.
7184 * Make-lang.in (s-java): Added mkdeps.o.
7185 * Makefile.in (BACKEND): Added mkdeps.o.
7186 (../gcjh$(exeext)): Added mkdeps.o.
7187 (../jcf-dump$(exeext)): Added mkdeps.o.
7188 * jcf-depend.c: Include mkdeps.h.
7189 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
7190 add_entry): Removed.
7191 (jcf_dependency_reset): Rewrote.
7192 (dependencies): New global.
7193 (jcf_dependency_set_target): Rewrote.
7194 (jcf_dependency_add_target): Likewise.
7195 (jcf_dependency_add_file): Likewise.
7196 (munge): Removed.
7197 (print_ents): Removed.
7198 (jcf_dependency_write): Rewrote.
7199 (print_dummies): New global.
7200 (jcf_dependency_print_dummies): New function
7201 (jcf_dependency_write): Call deps_dummy_targets if required.
7202
7203 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
7204
7205 * gjavah.c (add_class_decl): Removed unused variables `tname',
7206 `tlen' and `name_index'.
7207 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
7208 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
7209 in `wfl_operator' with value.
7210 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
7211 (jcf_figure_file_type): Fixed identation.
7212 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
7213 * parse.y (analyze_clinit_body): New function.
7214 (static_initializer:): Reset `current_static_block'.
7215 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
7216 `wfl_operator' with new value.
7217 (lookup_cl): Use EXPR_WFL_FILENAME.
7218 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
7219 analyze_clinit_body.
7220 (build_outer_field_access): Access to this$<n> built from
7221 current_class, not its outer context.
7222 (build_access_to_thisn): Fixed leading comment. Tidied things up.
7223 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
7224 (patch_method_invocation): Use `is_static_flag' when already
7225 initialized.
7226 (patch_newarray): Removed assignment in ternary operator.
7227
7228 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
7229
7230 * except.c (free_eh_ranges): Don't free `whole_range'.
7231
7232 2000-10-15 Anthony Green <green@redhat.com>
7233
7234 * decl.c (init_decl_processing): Call init_class_processing before
7235 anything else.
7236
7237 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7238
7239 * check-init.c (check_init): Fixed leading comment. Use
7240 LOCAL_FINAL_P.
7241 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
7242 (give_name_to_locals): Likewise.
7243 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
7244 fields in lang_decl_var.
7245 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
7246 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
7247 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
7248 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
7249 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
7250 (LOCAL_FINAL): Rewritten.
7251 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
7252 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
7253 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
7254 `init_final' fields.
7255 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
7256 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
7257 (TYPE_HAS_FINAL_VARIABLE): New macro.
7258 (struct lang_type): Added `afv' field.
7259 * parse.y (check_static_final_variable_assignment_flag): New function.
7260 (reset_static_final_variable_assignment_flag): Likewise.
7261 (check_final_variable_local_assignment_flag): Likewise.
7262 (reset_final_variable_local_assignment_flag): Likewise.
7263 (check_final_variable_indirect_assignment): Likewise.
7264 (check_final_variable_global_assignment_flag): Likewise.
7265 (add_inner_class_fields): Use LOCAL_FINAL_P.
7266 (register_fields): Handle local finals and final variables.
7267 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
7268 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
7269 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
7270 on local finals.
7271 (java_complete_expand_methods): Loop to set
7272 TYPE_HAS_FINAL_VARIABLE. Call
7273 `reset_final_variable_local_assignment_flag' and
7274 `check_final_variable_local_assignment_flag' accordingly before
7275 and after constructor expansion. Call
7276 `reset_static_final_variable_assignment_flag'
7277 before expanding <clinit> and after call
7278 `check_static_final_variable_assignment_flag' if the
7279 current_class isn't an interface. After all methods have been
7280 expanded, call `check_final_variable_global_assignment_flag' and
7281 `check_static_final_variable_assignment_flag' if the current class
7282 is an interface.
7283 (maybe_yank_clinit): Fixed typo in comment.
7284 (build_outer_field_access_methods): Removed old sanity check. Use
7285 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
7286 Don't create access methods for finals.
7287 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
7288 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
7289 existing DECL_INIT has been processed.
7290 (java_complete_lhs): Likewise.
7291 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
7292 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
7293 logic.
7294 (patch_assignment): Use LOCAL_FINAL_P.
7295 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
7296 DECL_INITIAL is nullified.
7297 Fixes gcj/163.
7298
7299 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7300
7301 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
7302
7303 * Makefile.in (parse.c, parse-scan.c): Likewise.
7304
7305 2000-10-12 Mark Mitchell <mark@codesourcery.com>
7306
7307 * class.c (temporary_obstack): Remove.
7308 (make_class): Don't mess with obstascks.
7309 (push_class): Likewise.
7310 (set_super_info): Likewise.
7311 (add_method_1): Likewise.
7312 (add_method): Likewise.
7313 (add_field): Likewise.
7314 (build_utf8_ref): Likewise.
7315 (build_class_ref): Likewise.
7316 (build_static_field_ref): Likewise.
7317 (finish_class): Likewise.
7318 (push_super_field): Likewise.
7319 (layout_class): Likewise.
7320 (layout_class_methods): Likewise.
7321 (init_class_processing): Likewise.
7322 * constants.c (get_tag_node): Likewise.
7323 (build_constant_data_ref): Likewise.
7324 * decl.c (ggc_p): Remove.
7325 (copy_lang_decl): Use ggc_alloc.
7326 (complete_start_java_method): Don't mess with obstacks.
7327 (start_java_method): Likewise.
7328 (end_java_method): Likewise.
7329 * except.c (link_handler): Use xmalloc.
7330 (free_eh_ranges): New function.
7331 (method_init_exceptions): Use it.
7332 (add_handler): Use xmalloc.
7333 (expand_start_java_handler): Don't mess with obstacks.
7334 (prepare_eh_table_type): Likewise.
7335 (expand_end_java_handler): Likewise.
7336 * expr.c (push_value): Likewise.
7337 (create_label_decl): Likewise.
7338 (build_jni_stub): Likewise.
7339 (java_lang_expand_expr): Likewise.
7340 (note_instructions): Use xrealloc.
7341 (java_push_constant_from_pool): Don't mess with obstacks.
7342 (process_jvm_instruction): Likewise.
7343 * java-tree.h (cyclic_inheritance_report): Remove duplicate
7344 declaration.
7345 * jcf-parse.c (get_constant): Don't mess with obstacks.
7346 (read_class): Likewise.
7347 (jcf_parse): Likewise.
7348 * lex.c (expression_obstack): Remove.
7349 (java_lex): Don't use obstack_free.
7350 * parse.h (exit_java_complete_class): Don't mess with obstacks.
7351 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
7352 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
7353 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
7354 * parse.y (gaol): Add more GC roots.
7355 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
7356 (lookup_field_wrapper): Likewise.
7357 (obtain_incomplete_type): Don't mess with obstacks.
7358 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
7359 macros.
7360 (craft_constructor): Don't mess with obstacks.
7361 (safe_layout_class): Likewise.
7362 (java_complete_class): Likewise.
7363 (source_end_java_method): Likewise.
7364 (build_outer_field_access_methods): Likewise.
7365 (build_outer_method_access_method): Likewise.
7366 (maybe_build_thisn_access_method): Likewise.
7367 (build_dot_class_method_invocation): Likewise.
7368 (java_complete_tree): Likewise.
7369 (java_complete_lhs): Likewise.
7370 (do_merge_string_cste): Likewise.
7371 (patch_string_cst): Likewise.
7372 (array_constructor_check_entry): Likewise.
7373 * typeck.c (build_java_array_type): Likewise.
7374 (parse_signature_string): Likewise.
7375 (build_java_signature): Likewise.
7376
7377 2000-10-12 Tom Tromey <tromey@cygnus.com>
7378
7379 Fix for PR gcj/356:
7380 * gjavah.c (add_class_decl): Don't special-case inner classes.
7381 (add_namelet): Likewise.
7382
7383 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
7384
7385 * java-tree.h: Constify current_encoding.
7386 * lang.c: Constify current_encoding.
7387
7388 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
7389
7390 * jvgenmain.c (class_mangling_suffix): Omit `.'.
7391 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
7392
7393 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
7394
7395 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
7396 patch. Fixes gcj/340.
7397
7398 2000-10-10 Tom Tromey <tromey@cygnus.com>
7399
7400 * lex.c (java_new_lexer): Initialize out_first and out_last
7401 fields.
7402 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
7403
7404 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
7405
7406 * parse.y (pop_current_osb): New function.
7407 (array_type:): Use `dims:', changed actions
7408 accordingly. Suggested by Anthony Green.
7409 (array_creation_expression:): Used pop_current_osb.
7410 (cast_expression:): Likewise.
7411 (search_applicable_method_list): Fixed indentation.
7412
7413 2000-10-08 Anthony Green <green@redhat.com>
7414
7415 * parse.y (array_type_literal): Remove production.
7416 (type_literals): Refer to array_type, not array_type_literal.
7417
7418 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7419
7420 Patch contributed by Corey Minyard.
7421 * decl.c (check_local_named_variable): New function.
7422 (tree check_local_unnamed_variable): Likewise.
7423 (find_local_variable): Splitted. Call check_local_{un}named_variable.
7424
7425 2000-10-07 Anthony Green <green@redhat.com>
7426
7427 * class.c (layout_class): Handle case where superclass can't be
7428 layed out yet.
7429
7430 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
7431
7432 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
7433 gperf.
7434
7435 2000-10-05 Tom Tromey <tromey@cygnus.com>
7436
7437 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
7438 * jvgenmain.c (class_mangling_prefix): Removed.
7439 (class_mangling_suffix): New global.
7440 (main): Use it.
7441 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
7442 `$'.
7443 (print_method_info): Handle overrides for static and final
7444 methods.
7445 (process_file): Generate declaration for class object field.
7446 * class.c (cxx_keywords): New array.
7447 (utf8_cmp): New function.
7448 (cxx_keyword_p): New function.
7449 (layout_class_method): Mangle C++ keywords by appending `$'.
7450 (mangle_field): New function.
7451 (mangle_class_field): Use mangle_field. Mangle class name as
7452 `class$'.
7453 (mangle_static_field): Use mangle_field.
7454
7455 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
7456
7457 * decl.c (find_local_variable): Removed uncessary type check and
7458 fixed range check typo. From Corey Minyard.
7459
7460 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7461
7462 * decl.c (give_name_to_locals): New local `code_offset'. Call
7463 `maybe_adjust_start_pc'.
7464 * expr.c (note_instructions): New function.
7465 (expand_byte_code): Don't collect insn starts here.
7466 (peek_opcode_at_pc): New function.
7467 (maybe_adjust_start_pc): Likewise.
7468 * java-tree.h (maybe_adjust_start_pc): Declare.
7469 (note_instructions): Likewise.
7470 * jcf-parse.c (parse_class_file): Call `note_instructions'.
7471
7472 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7473
7474 * parse.y (field_access:): Fixed indentation.
7475 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
7476
7477 2000-09-07 Tom Tromey <tromey@cygnus.com>
7478
7479 Fix for PR gcj/307:
7480 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
7481 JPRIMITIVE_TYPE_P, for arithmetic operators.
7482 (patch_method_invocation): Indentation fix.
7483 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
7484 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
7485 (do_unary_numeric_promotion): Cleaned up code.
7486 (valid_cast_to_p): Handle boolean correctly.
7487
7488 2000-09-27 Tom Tromey <tromey@cygnus.com>
7489
7490 * lex.c (java_read_unicode): Reset bs_count when finished with
7491 `\u' sequence.
7492
7493 2000-10-01 Mark Mitchell <mark@codesourcery.com>
7494
7495 Convert to GC.
7496 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
7497 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
7498 (typeck.o): Depend on ggc.h.
7499 * class.c (add_method_1): Use GC functions for allocation.
7500 (init_class_processing): Register roots.
7501 * decl.c (ggc_p): Set to 1.
7502 (pending_local_decls): Make it static.
7503 (push_jvm_slot): Use GC functions for allocation.
7504 (init_decl_processing): Register roots.
7505 (give_name_to_locals): Use GC functions for allocation.
7506 (lang_mark_tree): New function.
7507 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
7508 functions for allocation.
7509 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
7510 * lex.c (java_lex): Use build_string, rather than replicating it
7511 inline.
7512 * parse.y (goal): Add more roots.
7513 (mark_parser_ctxt): New function.
7514 * typeck.c: Include ggc.h.
7515
7516 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
7517
7518 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
7519 contains something else than MODIFY_EXPR.
7520
7521 2000-09-23 Mark Mitchell <mark@codesourcery.com>
7522
7523 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
7524 * Makefile.in (parse.o): Depend on ggc.h.
7525 (class.o): Likewise.
7526 (constants.o): Likewise.
7527 (decl.o): Likewise.
7528 (expr.o): Likewise.
7529 (jcf-parse.o): Likewise.
7530 (jcf-write.o): Likewise.
7531 (mangle.o): Likewise.
7532 * class.c: Include ggc.h.
7533 (build_static_field_ref): Register GC roots.
7534 (layout_class): Likewise.
7535 (init_class_processing): Likewise.
7536 * constants.c: Include ggc.h.
7537 (current_constant_pool_data_ref): Remove.
7538 (tag_nodes): Move it to ...
7539 (get_tag_node): ... here. Register GC roots.
7540 * decl.c: Include ggc.h. Remove many global tree definitions.
7541 (throw_node): Define.
7542 (java_global_trees): Likewise.
7543 (predef_filenames): Make the size a constant.
7544 (init_decl_processing): Adjust accordingly.
7545 (init_decl_processing): Call init_jcf_parse. Register GC roots.
7546 * expr.c: Include ggc.h.
7547 (init_expr_processing): Register GC roots.
7548 (build_invokeinterface): Likewise.
7549 * java-tree.h: Replace extern tree declarations with macros.
7550 (java_global_trees): New variable.
7551 (java_tree_index): New enumeration.
7552 (init_jcf_parse): Declare.
7553 * jcf-parse.c: Include ggc.h.
7554 (current_class): Remove declaration.
7555 (main_class): Likewise.
7556 (all_class_list): Likewise.
7557 (predefined_filename_p): Adjust for constant size of
7558 predef_filenames.
7559 (init_jcf_parse): New function.
7560 * jcf-write.c: Include ggc.h.
7561 (generate_classfile): Register GC roots.
7562 (append_synthetic_attribute): Likewise.
7563 (append_innerclass_attribute_entry): Likewise.
7564 * lang.c: Include ggc.h.
7565 (lang_print_error): Register GC roots.
7566 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
7567 with macros.
7568 * parse.y: Include ggc.h.
7569 (wfl_operator): Remove.
7570 (goal): Register GC roots.
7571 (java_pop_parser_context): Adjust for new field names.
7572 (java_parser_context_save_global): Likewse.
7573 (java_parser_context_restore_global): Likewise.
7574 (java_parser_context_suspend): Likewise.
7575 (java_parser_context_resume): Likewise.
7576 (verify_constructor_circularity): Register GC roots.
7577 (lookup_cl): Likewise.
7578 (java_reorder_fields): Likewise.
7579 (build_current_this): Likewise.
7580 (class_in_current_package): Likewise.
7581 (argument_types_convertible): Likewise.
7582 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
7583
7584 2000-09-14 Tom Tromey <tromey@cygnus.com>
7585
7586 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
7587
7588 2000-09-13 Tom Tromey <tromey@cygnus.com>
7589
7590 * jcf-parse.c: Include <locale.h>.
7591 * jv-scan.c: Include <locale.h>.
7592
7593 2000-09-12 Tom Tromey <tromey@cygnus.com>
7594
7595 * expr.c (pop_type_0): Return `Object' if trying to merge two
7596 interface types.
7597 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
7598 interface types; `Object' is always a valid supertype.
7599
7600 2000-09-12 Tom Tromey <tromey@cygnus.com>
7601
7602 Fix for PR gcj/33:
7603 * jv-scan.c (help): Document --encoding.
7604 (options): Added `encoding' entry.
7605 (OPT_ENCODING): New define.
7606 (main): Handle --encoding.
7607 Include <langinfo.h> if nl_langinfo exists.
7608 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
7609 --encoding.
7610 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
7611 (parse_source_file): Correctly call java_init_lex. Added `finput'
7612 argument. Use nl_langinfo to determine default encoding.
7613 * java-tree.h (current_encoding): Declare.
7614 * parse.y (java_parser_context_restore_global): Don't restore
7615 `finput'.
7616 (java_parser_context_save_global): Don't set `finput' field.
7617 (java_pop_parser_context): Don't restore `finput'. Free old lexer
7618 if required.
7619 * lang.c (current_encoding): New global.
7620 (lang_decode_option): Recognize `-fencoding='.
7621 (finish_parse): Don't close finput.
7622 * parse.h (struct parser_ctxt): Removed `finput' and
7623 `unget_utf8_value' fields. Added `lexer' field.
7624 (java_init_lex): Fixed declaration.
7625 * lex.c (java_new_lexer): New function.
7626 (java_destroy_lexer): Likewise.
7627 (java_read_char): Added `lex' argument. Handle iconv case.
7628 (java_read_unicode): Added `lex' argument. Count backslashes in
7629 lexer structure.
7630 (java_init_lex): Added `finput' and `encoding' arguments. Set
7631 `lexer' field in ctxp.
7632 (BAD_UTF8_VALUE): Removed.
7633 (java_lex): Handle seeing UEOF in the middle of a string literal.
7634 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
7635 (java_lexer): New structure.
7636 (UNGETC): Removed.
7637 (GETC): Removed.
7638 (DEFAULT_ENCODING): New define.
7639 (java_destroy_lexer): Declare.
7640
7641 2000-09-12 Tom Tromey <tromey@cygnus.com>
7642
7643 Fix for PR gcj/343:
7644 * lex.c (java_init_lex): Initialize java_io_serializable.
7645 * parse.y (java_io_serializable): New global.
7646 (valid_ref_assignconv_cast_p): An array can be cast to
7647 serializable.
7648
7649 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
7650
7651 * decl.c, expr.c: Include defaults.h if not already included.
7652 Don't define the *_TYPE_SIZE macros.
7653
7654 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
7655
7656 * typeck.c (build_java_array_type): Correct first parameter
7657 in ADJUST_FIELD_ALIGN invocation.
7658
7659 2000-09-06 Tom Tromey <tromey@cygnus.com>
7660
7661 * lang-specs.h: Also recognize `-femit-class-files'.
7662
7663 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
7664
7665 * verify.c (merge_types): Load the types to merge if necessary.
7666
7667 2000-09-02 Anthony Green <green@redhat.com>
7668
7669 * jcf-io.c: Include zlib.h.
7670 (open_in_zip): Read compressed class file archives.
7671 * zipfile.h (ZipDirectory): Add uncompressed_size and
7672 compression_method fields.
7673 * zextract.c (read_zip_archive): Collect file compression info.
7674
7675 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
7676
7677 * parse.y (do_resolve_class): Also explore superclasses of
7678 intermediate enclosing contexts when searching for inner classes.
7679
7680 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
7681
7682 * parse.y (variable_declarator_id:): Better error message.
7683 (expression_statement:): Use YYNOT_TWICE.
7684 (cast_expression:): Likewise.
7685 (assignment:): Likewise.
7686
7687 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
7688
7689 * parse.y (do_merge_string_cste): New locals. Create new
7690 STRING_CSTs each time, use memcpy. Fixes gcj/311.
7691
7692 2000-08-07 Hans Boehm <boehm@acm.org>
7693
7694 * boehm.c (mark_reference_fields): Set marking bits for all words in
7695 a multiple-word record.
7696 (get_boehm_type_descriptor): Use the procedure marking descriptor for
7697 java.lang.Class.
7698
7699 2000-08-31 Mike Stump <mrs@wrs.com>
7700
7701 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
7702 jcf-dump$(exeext)): Make parallel safe.
7703
7704 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
7705
7706 * jcf-parse.c (set_source_filename): Constify a char *.
7707 * jcf-write.c (append_innerclasses_attribute,
7708 make_class_file_name): Constify a char *. Don't recycle a
7709 variable for an unrelated purpose.
7710 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
7711 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
7712
7713 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
7714
7715 * expr.c (can_widen_reference_to): Fixed indentation.
7716 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
7717 * parse.y: `finit$' replaces `$finit$' in comments.
7718 (try_builtin_assignconv): Fixed leading comment.
7719
7720 2000-08-25 Greg McGary <greg@mcgary.org>
7721
7722 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
7723
7724 2000-08-24 Greg McGary <greg@mcgary.org>
7725
7726 * lang.c (lang_decode_option): Use ARRAY_SIZE.
7727 * parse.y (BINOP_LOOKUP): Likewise.
7728
7729 2000-08-22 Andrew Haley <aph@cygnus.com>
7730
7731 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
7732 sign extending. Fixes gcj/321.
7733 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
7734 combining to make a jlong. Fixes gcj/321.
7735
7736 2000-08-21 Nix <nix@esperi.demon.co.uk>
7737
7738 * lang-specs.h: Do not process -o or run the assembler if
7739 -fsyntax-only.
7740
7741 2000-08-16 Andrew Haley <aph@cygnus.com>
7742
7743 * typeck.c (build_java_array_type): Rewrite code to do array
7744 alignment. Take into account back-end macros when aligning array
7745 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
7746 user to set alignment. Fixes gcj/252 and 160.
7747
7748 2000-08-09 Tom Tromey <tromey@cygnus.com>
7749
7750 * parse.y (check_abstract_method_definitions): Now return `int'.
7751 Check implemented interfaces. Fixes PR gcj/305.
7752
7753 * parse.y (patch_switch_statement): Disallow `long' in switch
7754 expressions. Fixes PR gcj/310.
7755
7756 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
7757
7758 * decl.c (finit_leg_identifier_node): New global.
7759 (init_decl_processing): Use `finit$' to initialize
7760 finit_identifier_node. Use `$finit$' to initialize
7761 finit_leg_identifier_node.
7762 * expr.c (expand_java_field_op): Use ID_FINIT_P.
7763 * java-tree.h (finit_identifier_node): Changed attached comment.
7764 (finit_leg_identifier_node): New declaration.
7765 (ID_FINIT_P): Take finit_identifier_node and
7766 finit_leg_identifier_node into account. This is a backward
7767 compatibility hack.
7768
7769 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
7770
7771 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
7772 Jan 6 2000 patch.
7773 (generate_bytecode_insns): Check `nargs' before emitting it.
7774 * verify.c (merge_type_state): Fixed typo.
7775 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
7776 generate_bytecode_{conditional,insns}.
7777
7778 2000-08-13 Anthony Green <green@redhat.com>
7779
7780 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
7781 for -pg builds).
7782
7783 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
7784
7785 * class.c (maybe_layout_super_class): Fixed indentation.
7786 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
7787 (java_check_methods): New function declaration.
7788 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
7789 instead of `str_ptr'.
7790 * jcf-write.c (generate_bytecode_insns): Emit number the of args
7791 of a `invokeinterface' at the right time.
7792 * parse.h (WFL_STRIP_BRACKET): New macro.
7793 (SET_TYPE_FOR_RESOLUTION): Use it.
7794 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
7795 (check_class_interface_creation): Don't check for cross package
7796 innerclass name clashes.
7797 (method_header): Behave properly if MDECL is `error_mark_node'.
7798 (method_declarator): Return `error_mark_node' if bogus current
7799 class.
7800 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
7801 (resolve_and_layout): New local `decl_type', set and used. Call
7802 java_check_methods.
7803 (java_check_methods): New method.
7804 (java_layout_classes): Use it.
7805 (resolve_qualified_expression_name): No EH check necessary in
7806 access$<n>.
7807 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
7808 `case' statement.
7809 (patch_assignment): Set DECL_INITIAL on integral final local.
7810
7811 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
7812
7813 * java-tree.h (flag_extraneous_semicolon): New extern.
7814 * lang-options.h: (-Wextraneous-semicolon): New option.
7815 * lang.c (flag_redundant): Fixed typo in leading comment.
7816 (flag_extraneous_semicolon): New global.
7817 (lang_decode_option): Set `flag_extraneous_semicolon' when
7818 -Wall. Decode `-Wextraneous-semicolon'.
7819 * parse.y (type_declaration:): Removed `SC_TK' hack, added
7820 `empty_statement' rule.
7821 (class_body_declaration): Likewise.
7822 (method_body:): Accept `;' as a method body.
7823 (static_initializer:): Removed `SC_TK' hack.
7824 (constructor_block_end:): Likewise.
7825 (empty_statement:): Report deprecated empty declaration. Fixes
7826 gcj/295
7827
7828 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7829
7830 * parse.y (build_dot_class_method_invocation): Changed parameter
7831 name to `type'. Build signature from `type' and convert it to a
7832 STRING_CST if it's an array.
7833 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
7834 to use `ref_type' directly.
7835
7836 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
7837
7838 * lang-options.h: Added a comma after the last element to avoid
7839 syntax errors when other languages define additional options.
7840
7841 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
7842
7843 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
7844 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
7845 (jc1): Link with $(BACKEND).
7846 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
7847
7848 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
7849
7850 * jvspec.c: Adjust type of second argument to
7851 lang_specific_driver, and update code as necessary.
7852
7853 * class.c (build_dtable_decl): Initialize dummy.
7854
7855 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7856
7857 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
7858 method bodies not to rule out discarding `<clinit>'; don't use
7859 <clinit> to initialize static fields with constant initializers.
7860
7861 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7862
7863 * gjavah.c (print_method_info): Added `synth' parameter. Skip
7864 synthetic methods.
7865 (method_synthetic): New global.
7866 (HANDLE_METHOD): Recognize synthetic method and tell
7867 `print_method_info' about it.
7868 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
7869 processing a synthetic method.
7870 * jcf-reader.c (skip_attribute): New function.
7871 ( skip_attribute): Likewise.
7872
7873 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7874
7875 * parse.y (build_outer_field_access): Fixed comments.
7876 (fix_constructors): Emit the initialization of this$<n> before
7877 calling $finit$.
7878 (resolve_qualified_expression_name): Build an access to `decl' if
7879 necessary.
7880
7881 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
7882
7883 * parse-scan.y (curent_class): Non longer const.
7884 (inner_qualifier, inner_qualifier_length): Deleted.
7885 (current_class_length): New global.
7886 (bracket_count): Fixed typo in leading comment.
7887 (anonymous_count): New global.
7888 (class_instance_creation_expression:): Handle anonymous classes.
7889 (anonymous_class_creation:): New rule.
7890 (push_class_context): Rewritten.
7891 (pop_class_context): Likewise.
7892 (INNER_QUALIFIER): Macro deleted.
7893 (report_class_declaration): call `push_class_context' when
7894 entering the function. `fprintf' format modified not to use
7895 INNER_QUALIFIER.
7896 (report_class_declaration): Assign `package_name' and
7897 `current_class' to NULL separately.
7898
7899 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
7900
7901 * expr.c (build_invokeinterface): Call layout_class_methods on
7902 target interface.
7903
7904 2000-07-27 Tom Tromey <tromey@cygnus.com>
7905 Anthony Green <green@cygnus.com>
7906 Alexandre Petit-Bianco <apbianco@cygnus.com>
7907
7908 * class.c (make_class_data): Create vtable for abstract classes.
7909 (get_dispatch_table): Changed to cope with abstract classes.
7910
7911 2000-07-27 Tom Tromey <tromey@cygnus.com>
7912
7913 * parse.y (patch_method_invocation): Don't reverse the argument
7914 list when dealing with anonymous class constructors. Fixed typo in
7915 comment.
7916
7917 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
7918
7919 * parse.y (build_alias_initializer_parameter_list): Reverse
7920 crafted list when building aliases for anonymous class
7921 constructors.
7922
7923 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7924
7925 * parse.y (jdep_resolve_class): Don't bother checking potential
7926 innerclass access if `decl' is NULL.
7927 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
7928 WFL.
7929
7930 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7931
7932 * parse.c: Remove (again.)
7933
7934 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
7935
7936 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
7937 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
7938 outside the `if' statement, alias to innerclass removed, `decl'
7939 used to mark the class complete.
7940
7941 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
7942
7943 * parse.y (simple_name:): Fixed typo in error message.
7944
7945 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
7946
7947 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
7948 or its first operand can be error marks.
7949
7950 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
7951
7952 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
7953 * parse.y (method_header): Likewise.
7954
7955 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
7956
7957 * parse.y (process_imports): Consider that one might be trying to
7958 import an innerclass. Fixes gcj/254
7959
7960 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
7961
7962 * parse.y (find_as_inner_class): Handle the case where the
7963 enclosing context of an innerclass has been loaded as bytecode.
7964
7965 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
7966
7967 * parse.y (simple_name:): Reject `$' in type names.
7968 (resolve_type_during_patch): Use `type' as a second
7969 argument to resolve_no_layout. Fixes gcj/257.
7970
7971 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
7972
7973 * parse.y (find_most_specific_methods_list): Select the only
7974 non-abstract method even if max has been set.
7975 Fixes gcj/285, gcj/298.
7976
7977 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
7978
7979 * lang-specs.h: Added %(jc1) to java compiler options.
7980
7981 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
7982
7983 * .cvsignore: New file.
7984
7985 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7986
7987 * parse.y (not_accessible_p): Access granted to innerclasses
7988 (indirectly) extending the reference type. Fixes gcj/249.
7989
7990 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7991
7992 * parse.y (patch_method_invocation): Fixed comment.
7993 (maybe_use_access_method): Build this$<n>s to the context of the
7994 target method, or a type that extends it. Fixes gcj/242.
7995
7996 2000-07-13 Mark Mitchell <mark@codesourcery.com>
7997
7998 * parse.c: Remove.
7999
8000 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8001
8002 * parse.y (fold_constant_for_init): Avoid bullish conversion.
8003
8004 2000-07-13 Tom Tromey <tromey@cygnus.com>
8005
8006 * lang-specs.h: Added %{I*}.
8007
8008 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
8009
8010 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
8011
8012 2000-07-12 Mark Mitchell <mark@codesourcery.com>
8013
8014 * parse-scan.c: Remove.
8015
8016 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8017
8018 * class.c (set_super_info): Handled protected inner classes.
8019 (common_enclosing_context_p): Bail early if arguments aren't both
8020 inner classes.
8021 (get_access_flags_from_decl): Handle private and protected inner
8022 classes.
8023 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
8024 (CLASS_PROTECTED): Likewise.
8025 (struct lang_type): New bitfield `poic'.
8026 * parse.y (jdep_resolve_class): Call check_inner_class_access on
8027 inner classes only.
8028 (check_inner_class_access): Renamed arguments, added
8029 comments. Handles protected inner classes (fixes gcj/225)
8030 (not_accessible_p): Fixed comments. Avoid handling inner classes.
8031
8032 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8033
8034 * parse.y (resolve_qualified_expression_name): Verify qualified
8035 access to `this'. Fixes gcj/239.
8036
8037 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8038
8039 * jcf-write.c (generate_classfile): Don't install ConstantValue
8040 for null pointers.
8041
8042 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8043
8044 * parse.y (resolve_qualified_expression_name): Handle inner class
8045 access. Fixes gcj/256.
8046
8047 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8048
8049 * jcf-write.c (generate_classfile): Properly install the
8050 ConstantValue attribute and the initial value constant pool index
8051 on string constants.
8052 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
8053 class files.
8054
8055 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
8056
8057 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
8058 construct.
8059 * parse.y (find_as_inner_class): Fixed typo.
8060 (do_resolve_class): Explore enclosing contexts when searching for
8061 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
8062 (check_inner_class_access): Check `decl' which can be null in case
8063 of previous errors.
8064
8065 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8066
8067 * java-tree.h (java_debug_context): Declared `extern'.
8068 (safe_layout_class): Likewise.
8069 * parse.y (resolve_field_access): Field must be `static' in order
8070 to be replaced by its initial value. Added comments.
8071 (find_applicable_accessible_methods_list): Fixed typo.
8072 (find_most_specific_methods_list): Methods found in innerclasses
8073 take over methods founds in the enclosing contexts.
8074 (java_complete_tree): Loosen restrictions on the type of DECLs
8075 that can be replaced by their initialization values.
8076 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
8077
8078 2000-07-05 Tom Tromey <tromey@cygnus.com>
8079
8080 * Make-lang.in (PARSE_DIR): New macro.
8081 (PARSE_RELDIR): Likewise.
8082 (PARSE_C): Likewise.
8083 (PARSE_SCAN_C): Likewise.
8084 ($(PARSE_C)): New target.
8085 ($(PARSE_SCAN_C)): Likewise.
8086 (SET_BISON): New macro.
8087 (BISONFLAGS): Likewise.
8088 (JAVABISONFLAGS): Likewise.
8089
8090 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
8091
8092 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
8093 argument on the first pass for CNI as well as JNI.
8094 (print_method_info): Set up method name on the first pass only.
8095
8096 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8097
8098 * parse.y (parser_qualified_classname): Removed parameter
8099 `is_static'.
8100 (create_interface): Removed first passed parameter to
8101 parser_qualified_classname.
8102 (create_class): Likewise. Don't install alias on static
8103 innerclasses. Fixes gcj/275.
8104
8105 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8106
8107 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
8108 debugable statement with empty_stmt_node. Fixes gcj/272
8109
8110 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8111
8112 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
8113 gcj/271.
8114
8115 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8116
8117 * jcf-write.c (push_long_const): Appropriately cast short negative
8118 constant to jword.
8119
8120 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8121
8122 * parse.y (verify_constructor_super): Use loop variable
8123 `m_arg_type' initialized with `mdecl_arg_type'.
8124
8125 2000-06-29 Tom Tromey <tromey@cygnus.com>
8126
8127 * parse.y (resolve_field_access): Handle case where `type_found'
8128 is NULL.
8129
8130 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
8131
8132 * expr.c (lookup_field): The same field can be found through two
8133 different interface. Don't declare it ambiguous in that case.
8134
8135 2000-06-27 Tom Tromey <tromey@cygnus.com>
8136
8137 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
8138 follows \r, then unget it at a lower level.
8139
8140 2000-06-26 Tom Tromey <tromey@cygnus.com>
8141
8142 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
8143 java_complete_tree.
8144
8145 2000-06-25 Tom Tromey <tromey@cygnus.com>
8146
8147 * parse.y (for_statement): Wrap expression in a WFL if it is a
8148 constant. For PR gcj/268.
8149
8150 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
8151
8152 * parse.y (do_resolve_class): Minor optimiztion in the package
8153 list search. Removed unnecessary test and return statement.
8154 (valid_ref_assignconv_cast_p): Order of arguments to
8155 enclosing_context_p fixed.
8156
8157 2000-06-24 Tom Tromey <tromey@cygnus.com>
8158
8159 * expr.c (lookup_field): Print error and return error_mark_node if
8160 field reference is ambiguous.
8161
8162 * parse.y (check_abstract_method_definitions): Also check if
8163 `other_method' is abstract.
8164
8165 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
8166
8167 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
8168 classes.
8169 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
8170 (struct lang_type): New field `pic'.
8171 (CLASS_PRIVATE): New macro.
8172 * parse.y (check_inner_class_access): New function.
8173 (jdep_resolve_class): Call it.
8174
8175 2000-06-23 Tom Tromey <tromey@cygnus.com>
8176
8177 * parse.y (patch_incomplete_class_ref): Initialize the returned
8178 class. For PR gcj/260.
8179
8180 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
8181
8182 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
8183
8184 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
8185
8186 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
8187 Java specific checks.
8188 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
8189 screened by DECL_P.
8190 * java-tree.def (CASE_EXPR): Marked 'e'.
8191 (DEFAULT_EXPR): Likewise.
8192 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
8193 screened by DECL_P.
8194 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
8195 Java specific checks.
8196 (generate_bytecode_insns): Test try_block for BLOCK before using
8197 BLOCK_EXPR_BODY.
8198 * parse.y (build_wfl_wrap): Added `location' argument. Set
8199 EXPR_WFL_LINECOL accordingly.
8200 (dim_expr:): Wrap constants with WFLs.
8201 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
8202 (resolve_package): Check for `stmt' not being a BLOCK before
8203 building a debuggable statement with it.
8204 (make_qualified_primary): Added extra parameter to build_wfl_wrap
8205 invocation.
8206 (resolve_field_access): Make sure `decl' is a DECL before treating
8207 it as such.
8208 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
8209 IDENTIFIER_NODE before treating it as such.
8210 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
8211 treating it as such.
8212 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
8213 to be applied only on non array types.
8214
8215 2000-06-16 Per Bothner <per@bothner.com>
8216
8217 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
8218 define in terms of DECL_RESULT, as that fails when --enable-checking.
8219
8220 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8221
8222 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
8223 types the same in comparison.
8224 (CHECK_OP): Add static prototype.
8225
8226 2000-06-13 Jakub Jelinek <jakub@redhat.com>
8227
8228 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
8229 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
8230 * parse.c: Rebuilt.
8231
8232 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8233
8234 * decl.c (create_primitive_vtable): Prototype.
8235
8236 * jcf-write.c (generate_bytecode_insns): Initialize variable
8237 `saved_context'.
8238
8239 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
8240
8241 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
8242
8243 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
8244 to track searched classes, and do not search the same class more than
8245 once. Call find_applicable_accessible_methods_list on immediate
8246 superclass, instead of search_applicable_method_list on all ancestors.
8247 Fix for PR gcj/238.
8248
8249 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
8250
8251 * parse.y (register_fields): Permit static fields in inner classes
8252 if they are final. Fix for PR gcj/255.
8253
8254 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
8255
8256 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
8257 * parse.y (find_in_imports): Returned type changed to void,
8258 leading comment fixed.
8259 (register_package): New function.
8260 (qualify_and_find): Likewise.
8261 (package_declaration:): Use `register_package'.
8262 (single_type_import_declaration:): Removed local variable
8263 `node'. Added missing `;' for consistency.
8264 (type_import_on_demand_declaration:): Use `chainon' to link new
8265 entries.
8266 (lookup_field_wrapper): Lookup local variables defined in outer
8267 contexts first.
8268 (java_complete_class): Don't reverse the list of imported on demand.
8269 (do_resolve_class): Reorganized. Removed local variable
8270 `original_name'. Call `qualify_and_find' with the current package
8271 name, invoke `find_in_imports_on_demand' right after. Call
8272 `qualify_and_find' with the packages we've seen so far. Fixed
8273 operations numbering in comments.
8274 (java_expand_class): Don't reverse `package_list'.
8275 (find_most_specific_methods_list): New local variables `abstract'
8276 and `candidates'. Use them to pick the right method.
8277
8278 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
8279
8280 * parse.y (check_modifiers_consistency): Don't subtract out
8281 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
8282
8283 2000-06-04 Philipp Thomas <pthomas@suse.de>
8284
8285 * Makefile.in (INTLLIBS): New.
8286 (LIBS): Add above.
8287 (DEPLIBS): Ditto.
8288
8289 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
8290
8291 * class.c (get_dispatch_table): Build the vtable dummy entry list
8292 element with a null purpose. Fixed leading comment.
8293 (build_dtable_decl): Build an accurate dtable type when appropriate
8294 and use it.
8295
8296 2000-06-02 Richard Henderson <rth@cygnus.com>
8297
8298 * lang.c (lang_get_alias_set): New.
8299
8300 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
8301
8302 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
8303 before using it as the accessed field.
8304
8305 2000-05-31 Tom Tromey <tromey@cygnus.com>
8306
8307 * java-tree.h (boolean_array_vtable, byte_array_vtable,
8308 char_array_vtable, short_array_vtable, int_array_vtable,
8309 long_array_vtable, float_array_vtable, double_array_vtable):
8310 Declare.
8311 * expr.c (get_primitive_array_vtable): New function.
8312 (create_primitive_vtable): New function.
8313 (java_lang_expand_expr): Enable code to statically generate
8314 arrays.
8315 * decl.c (init_decl_processing): Create primitive vtables.
8316 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
8317 short_array_vtable, int_array_vtable, long_array_vtable,
8318 float_array_vtable, double_array_vtable): Define.
8319
8320 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
8321
8322 * java/parse.y (find_applicable_accessible_methods_list):
8323 Don't add an uninitialized value to the list.
8324
8325 2000-05-25 Tom Tromey <tromey@cygnus.com>
8326
8327 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
8328 when trying to see if field's class should be initialized. Always
8329 initialize field's declaring class, not qualified class.
8330 For PR gcj/162.
8331
8332 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
8333 `wfl_operator', to maybe_build_primttype_type_ref.
8334 Fixes PR gcj/235.
8335
8336 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
8337
8338 * parse.y (patch_method_invocation): Don't try to lookup methods
8339 in primitive types.
8340
8341 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
8342
8343 * parse.y (resolve_field_access): Call the appropriate <clinit>
8344 before accessing the length of a static array. Craft a decl for
8345 the field while its time. Fixes PR gcj/129.
8346
8347 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8348
8349 * parse.y (resolve_package): Correctly set `*next' (was off by
8350 one.)
8351 (resolve_qualified_expression_name): Fixed comment.
8352
8353 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
8354
8355 * jcf-parse.c (jcf_parse_source): Reset current_class and
8356 current_function_decl to NULL before parsing a new file.
8357
8358 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
8359
8360 * parse.y (block_end:): If the collected block doesn't feature a
8361 statement, insert an empty statement.
8362
8363 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8364
8365 * parse.y (maybe_yank_clinit): New function.
8366 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
8367 end of the list of methods belonging to a class.
8368 (java_complete_expand_method): Check whether <clinit> is really
8369 necessary and expand it accordingly.
8370
8371 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8372
8373 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
8374 processed by the method's switch statement.
8375
8376 2000-05-19 Tom Tromey <tromey@cygnus.com>
8377
8378 * java-tree.h: Added init state enum.
8379 * decl.c (emit_init_test_initialization): Initialize class
8380 initialization check variable by looking at class' state.
8381
8382 2000-05-19 Tom Tromey <tromey@cygnus.com>
8383
8384 * java-tree.h (build_instanceof): Declare.
8385 (build_get_class): Declare.
8386 * parse.y (patch_binop): Use build_instanceof.
8387 * expr.c (build_instanceof): New function. If class is final,
8388 don't make a function call.
8389 (expand_java_INSTANCEOF): Use it.
8390 (build_get_class): New function.
8391
8392 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
8393
8394 * jcf-write.c (generate_classfile): Scan the source_file for
8395 slashes with the right pointer variable.
8396
8397 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
8398
8399 * lang.c (lang_decode_option): Update -Wunused flags by calling
8400 set_Wunused.
8401 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
8402
8403 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
8404
8405 * check_init.c (check_init): Constify local char *.
8406 * class.c (push_class): Constify local char *.
8407 * java_tree.h: Update prototypes.
8408 * jcf-io.c (open_class): Constify filename parameter and
8409 return value.
8410 (find_class): Remove redundant string copy. Cast return from
8411 open_class.
8412 * jcf-parse.c (read_class, parse_class_file, yyparse):
8413 Constify local char *.
8414 * jcf-write.c (generate_bytecode_insns, generate_classfile):
8415 Constify local char *.
8416 * jcf.h (JCF): Constify filename and classname.
8417 (JCF_FINISH): Cast args to FREE to char * when appropriate.
8418 * lang.c (init_parse): Constify parameter and return value.
8419 * lex.c (java_get_line_col): Constify filename parameter.
8420 * parse.h: Constify parser_ctxt.filename. Update prototypes.
8421 * parse.y (java_parser_context_suspend,
8422 issue_warning_error_from_context, safe_layout_class): Constify
8423 local char *.
8424 * parse.c: Regenerate.
8425
8426 2000-05-08 Tom Tromey <tromey@cygnus.com>
8427
8428 * expr.c (build_jni_stub): Cache the result of
8429 _Jv_LookupJNIMethod.
8430
8431 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8432
8433 * decl.c (predef_filenames_size): Now 7.
8434 (predef_filenames): New seventh entry.
8435
8436 2000-05-04 Tom Tromey <tromey@cygnus.com>
8437
8438 * boehm.c (mark_reference_fields): Don't mark RawData fields.
8439 Keep track of when we've seen a reference field after a
8440 non-reference field.
8441 (get_boehm_type_descriptor): Handle case where we see
8442 non-reference fields but no trailing reference field.
8443 * decl.c (rawdata_ptr_type_node): Define.
8444 (init_decl_processing): Initialize rawdata_ptr_type_node.
8445 * java-tree.h (rawdata_ptr_type_node): Declare.
8446
8447 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8448
8449 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
8450 specifiers in calls to fprintf.
8451
8452 2000-05-03 Andrew Haley <aph@cygnus.com>
8453
8454 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
8455
8456 * javaop.h (WORD_TO_INT): New function.
8457 (IMMEDIATE_s4): Use WORD_TO_INT.
8458 * jcf.h (JPOOL_INT): Ditto.
8459
8460 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
8461 separator.
8462
8463 2000-04-19 Tom Tromey <tromey@cygnus.com>
8464
8465 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
8466 on native function.
8467 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
8468 JNI methods.
8469 * expr.c (build_jni_stub): New function.
8470 * lang-specs.h: -fjni and -femit-class-file are incompatible.
8471 * parse.c: Rebuilt.
8472 * parse.y (java_complete_expand_methods): Expand a native method
8473 and call build_jni_stub if -fjni given.
8474 * lang-options.h: Document -fjni.
8475 * lang.c (flag_jni): New global.
8476 (lang_f_options): Added `jni' entry.
8477 * java-tree.h (soft_lookupjnimethod_node,
8478 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
8479 Declare.
8480 (flag_jni): Declare.
8481 (build_jni_stub): Declare.
8482 (struct lang_decl): Added `native' flag.
8483 (METHOD_NATIVE): Redefined to use `native' field of lang specific
8484 structure.
8485 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
8486 soft_jnipopsystemframe_node): New globals.
8487 (init_decl_processing): Set them. _Jv_InitClass only takes one
8488 argument.
8489
8490 * java-tree.def: Put into `C' mode.
8491
8492 2000-04-27 Tom Tromey <tromey@cygnus.com>
8493
8494 Fix for PR gcj/2:
8495 * expr.c (expand_invoke): Generate check to see if object pointer
8496 is null in nonvirtual invocation case.
8497 * java-tree.h (soft_nullpointer_node): Declare.
8498 * decl.c (soft_nullpointer_node): New global.
8499 (init_decl_processing): Initialize soft_nullpointer_node.
8500 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
8501 or `private' methods.
8502 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
8503
8504 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
8505
8506 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
8507 from <clinit>
8508
8509 2000-04-26 Tom Tromey <tromey@cygnus.com>
8510
8511 * zextract.c (find_zip_file_start): New function.
8512 (read_zip_archive): Use it.
8513
8514 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
8515
8516 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
8517
8518 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8519
8520 * class.c (common_enclosing_context_p): New function.
8521 * java-tree.h (common_enclosing_context_p): Added prototype.
8522 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
8523 classes sharing an outer context with the current instance.
8524 * parse.y (build_access_to_thisn): Fixed leading comment.
8525 (verify_constructor_super): New local `supper_inner'. Skip
8526 enclosing context argument in the case of inner class constructors.
8527 (patch_method_invocation): Insert proper context as second
8528 parameter to pure inner class constructor super invocations.
8529
8530 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8531
8532 * parse.y (end_class_declaration): Reset the interface number
8533 counter.
8534
8535 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8536
8537 * parse.y (source_start_java_method): Deleted unnecessary code.
8538 (patch_method_invocation): Fixed comment.
8539
8540 2000-04-24 Robert Lipe <robertlipe@usa.net>
8541
8542 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
8543
8544 2000-04-23 Tom Tromey <tromey@cygnus.com>
8545
8546 * boehm.c (mark_reference_fields): Use int_byte_position.
8547
8548 2000-04-22 Tom Tromey <tromey@cygnus.com>
8549
8550 * boehm.c (mark_reference_fields): Only call byte_position on
8551 non-static fields.
8552
8553 2000-04-22 Tom Tromey <tromey@cygnus.com>
8554
8555 * boehm.c (mark_reference_fields): Added `last_view_index'
8556 argument. Use DECL_FIELD_OFFSET to determine field's offset.
8557
8558 2000-04-20 Mo DeJong <mdejong@cygnus.com>
8559
8560 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
8561 * parse.y (check_class_interface_creation): Fixed comments. Select
8562 permitted modifiers for (inner) interfaces. Changed error message
8563 to report rejected modifiers used with local classes.
8564
8565 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
8566
8567 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
8568 of directly inherited type considered in scope.
8569 * parse.y (do_resolve_class): Search inherited classes for inner
8570 classes.
8571
8572 2000-04-20 Tom Tromey <tromey@cygnus.com>
8573
8574 * parse.y (not_accessible_p): Use member's class, not current
8575 class, when doing inheritance check for protected reference.
8576 Fixes PR gcj/124.
8577
8578 2000-04-20 Jason Schroeder <shrode@subnature.com>
8579
8580 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
8581
8582 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
8583
8584 * parse.y (lookup_field_wrapper): Search for final local aliases.
8585 (resolve_expression_name): Let lookup_field_wrapper search for
8586 final local aliases. Force the value of `name' if one is found.
8587 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
8588 an expression name. Fixed comments.
8589
8590 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
8591
8592 * parse.y (yyerror): `msg' can be null, don't use it in that case.
8593
8594 2000-04-19 Tom Tromey <tromey@cygnus.com>
8595
8596 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
8597
8598 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
8599
8600 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
8601
8602 2000-04-18 Tom Tromey <tromey@cygnus.com>
8603
8604 PR gcj/211:
8605 * gjavah.c (utf8_cmp): Changed return value.
8606 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
8607 result.
8608 (cxx_keywords): New global.
8609 (get_field_name): Handle new result of cxx_keyword_subst.
8610 (print_method_info): Likewise.
8611
8612 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
8613
8614 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
8615 with a newline, for CNI.
8616 (print_stub_or_jni): Print a space or newline before method name for
8617 CNI as well as JNI.
8618 (print_cxx_classname): Don't write leading "::" in CNI stub method.
8619 (process_file): Include gcj/cni.h if generating CNI stubs.
8620
8621 2000-04-16 Tom Tromey <tromey@cygnus.com>
8622
8623 * gjavah.c (decompile_method): Use print_field_name.
8624 Fixes PR gcj/205.
8625
8626 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
8627
8628 * parse.y (java_expand_classes): Reverse the package list once.
8629 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
8630 reduction.
8631 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
8632 the `==' and `!=' operators.
8633
8634 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8635
8636 * jcf-write.c (generate_bytecode_insns): At invocation time,
8637 always relate an interface method to the type of its selector.
8638
8639 2000-04-05 Tom Tromey <tromey@cygnus.com>
8640
8641 Fix for PR gcj/2:
8642 * expr.c (expand_invoke): Generate check to see if object pointer
8643 is null in nonvirtual invocation case.
8644 * java-tree.h (soft_nullpointer_node): Declare.
8645 * decl.c (soft_nullpointer_node): New global.
8646 (init_decl_processing): Initialize soft_nullpointer_node.
8647 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
8648 or `private' methods.
8649 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
8650
8651 2000-04-05 Tom Tromey <tromey@cygnus.com>
8652
8653 Fix for PR gcj/140:
8654 * parse.y (check_final_assignment): Recognize assignments to the
8655 `length' field of an array when generating class files.
8656
8657 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8658
8659 * class.c (decl_hash): Prototype removed.
8660 (decl_compare): Likewise.
8661
8662 2000-04-05 Tom Tromey <tromey@cygnus.com>
8663
8664 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
8665 * parse.y (check_modifiers_consistency): Check for final/volatile
8666 clash. Fixes PR gcj/164.
8667
8668 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8669
8670 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
8671 made global.
8672 (java_hash_compare_tree_node): Renamed from `decl_compare, made
8673 global.
8674 (add_method_1): Use `java_hash_hash_tree_node' and
8675 `java_hash_compare_tree_node'.
8676 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
8677 (java_hash_compare_tree_node): Likewise.
8678 * parse.y (find_applicable_accessible_methods_list): Create,
8679 delete and use a hash table to remember already searched interfaces.
8680
8681 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
8682
8683 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
8684 with latest entry.
8685
8686 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8687
8688 * boehm.c (mark_reference_fields, set_bit): Prototype.
8689 (set_bit): Un-ANSI-fy definition.
8690
8691 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
8692 Prototype.
8693
8694 * decl.c (emit_init_test_initialization): Likewise.
8695
8696 * gjavah.c (jni_print_char): Likewise.
8697
8698 * parse.y (create_new_parser_context): Likewise.
8699
8700 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
8701
8702 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
8703 patch missing hunk. Fixed indentation.
8704
8705 2000-03-30 Tom Tromey <tromey@cygnus.com>
8706
8707 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
8708 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
8709
8710 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
8711
8712 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8713 when negative *before* using it as an array index.
8714 * ChangeLog: Fixed typo.
8715
8716 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
8717
8718 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8719 to 0 when it reaches -1.
8720
8721 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
8722
8723 * jcf-parse.c (get_constant): Properly cast `num' during the
8724 invocation of `add_double'.
8725 * jcf-write.c (push_long_const): Properly cast `lo' before
8726 comparing it to short bounds.
8727 * parse-scan.y (interface_declaration:): Rule re-arrange so that
8728 `interface_body:' is reduced after the current interface is
8729 pushed.
8730
8731 2000-03-26 Tom Tromey <tromey@cygnus.com>
8732
8733 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
8734 Java-specific `-f' option.
8735
8736 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8737
8738 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
8739 Adjust order of making types.
8740 Make bitsize_*_node values.
8741
8742 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8743
8744 * class.c (make_field_value): Use byte_position.
8745 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
8746 (java_array_data_offset): Likewise.
8747 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
8748 bzero call.
8749
8750 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
8751
8752 * parse.y (check_abstract_method_definitions): New local
8753 `end_type_reached'. Make sure we also consider `end_type'.
8754 (java_check_abstract_method_definitions): Make sure we eventually
8755 consider `java.lang.Object'.
8756 (maybe_use_access_method): Don't use access method if not in the
8757 context of a pure inner class or if the method's context is right.
8758 (find_applicable_accessible_methods_list): New static flag
8759 `object_done'. Don't search abstract classes as interfaces. Fixed
8760 indentation. Fixed the `java.lang.Object' only search. Search
8761 class interface(s) first, then fully search enclosing contexts.
8762 (find_most_specific_methods_list): Pick the closest candidate when
8763 they're all abstract.
8764
8765 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
8766
8767 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8768 properly initialize `finished_label'. Don't emit gotos for empty
8769 try statements.
8770
8771 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8772
8773 * except.c (emit_handlers): Clear catch_clauses_last.
8774
8775 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8776
8777 * parse.y (check_method_types_complete): New function.
8778 (create_class): Reset anonymous class counter only when seeing an
8779 non inner classe.
8780 (java_complete_class): JDEP_METHOD: Don't recompute signature
8781 if incomplete.
8782
8783 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8784
8785 * class.c (build_static_ref): Fixed indentation in comment.
8786 * java-tree.def (TRY_EXPR): Fixed typo in name.
8787 (CLASS_LITERAL): Likewise.
8788 * java-tree.h: (TYPE_DOT_CLASS): New macro.
8789 (struct lang_type): New field `dot_class'.
8790 * jcf-write.c (generate_bytecode_insns): Fixed error message.
8791 (generate_classfile): Method `class$' is synthetic.
8792 * parse.y (build_do_class_method): New function.
8793 (build_dot_class_method_invocation): Likewise.
8794 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
8795 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
8796 (qualify_ambiguous_name): Likewise.
8797 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
8798 (build_try_statement): Fixed leading comment.
8799
8800 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8801
8802 * class.c (make_field_value): Properly handle sizes.
8803 (get_dispatch_vector): Use tree_low_cst and host_integerp.
8804 (layout_class_method): Count using trees.
8805 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
8806 * expr.c (java_array_data_offset): Use int_bit_position.
8807 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
8808 (build_invokevirtual): Use tree_low_cst and do computations with trees.
8809
8810 2000-03-16 Tom Tromey <tromey@cygnus.com>
8811
8812 * lang.c (flag_hash_synchronization): New global.
8813 (lang_f_options): Added `hash-synchronization'.
8814 * lang-options.h: Mention -fhash-synchronization.
8815 * java-tree.h (flag_hash_synchronization): Declare.
8816 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
8817 hash table synchronization is disabled.
8818 * decl.c (init_decl_processing): Only push `sync_info' value when
8819 hash table synchronization is disabled.
8820 * class.c (make_class_data): Only push `sync_info' field when hash
8821 table synchronization is disabled. Removed dead code.
8822
8823 2000-03-16 Tom Tromey <tromey@cygnus.com>
8824
8825 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
8826
8827 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
8828
8829 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
8830 classes.
8831 * parse.y (patch_method_invocation): Handle anonymous classes
8832 creation in static context.
8833
8834 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
8835
8836 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
8837 * parse.y (resolve_qualified_expression_name): Use it.
8838 (patch_method_invocation): Likewise.
8839
8840 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
8841
8842 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
8843 depending on the type of dependency which dictates what the
8844 current class is.
8845 (unresolved_type_p): Resolved types limited to the current class.
8846
8847 2000-03-15 Tom Tromey <tromey@cygnus.com>
8848
8849 * decl.c (init_decl_processing): Set type of `sync_info' to be
8850 pointer to Object.
8851
8852 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
8853 Correctly compute bit number for current slot. Zero `high' and
8854 `low' in DS_LENGTH case. Don't skip inherited fields. Use
8855 mark_reference_fields.
8856 (mark_reference_fields): New function.
8857
8858 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
8859
8860 * parse.y (register_incomplete_type): Fixed initialization of
8861 JDEP_ENCLOSING.
8862
8863 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
8864
8865 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
8866 static globals.
8867 (push_class_context, pop_class_context): New function.
8868 (class_body:): Call pop_class_context.
8869 (interface_body:): Likewise.
8870 (INNER_QUALIFIER): New macro.
8871 (report_class_declaration): Changed output format and use
8872 INNER_QUALIFIER. Call push_class_context.
8873
8874 2000-02-14 Andrew Haley <aph@cygnus.com>
8875
8876 * check-init.c (check_init): Add new cases for unary and binary
8877 tree nodes.
8878
8879 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8880
8881 * parse.y (resolve_package): Set `next' once a type name has been
8882 progressively discovered.
8883 (resolve_qualified_expression_name): Propagate resolution only if
8884 there are remaining qualifiers. Take into account `q' might have
8885 been cleared after re-qualification.
8886 * parse.y (patch_method_invocation): New local `resolved'.
8887 Section dealing with qualified expression rewritten to use
8888 resolve_field_access.
8889
8890 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8891
8892 * parse.h (PUSH_CPC): Fixed indentation.
8893 (DEBUG_CPC): New macro.
8894 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
8895 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
8896 * parse.y (class_body_declaration:): Use
8897 SET_CPC_INSTANCE_INITIALIZER_STMT.
8898 (method_declaration:): Check for null current_function_decl.
8899 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
8900 (java_parser_context_pop_initialized_field): Better handling of
8901 empty lists.
8902 (maybe_make_nested_class_name): Mark nested class name as
8903 qualified when necessary.
8904 (end_class_declaration): Don't call java_parse_context_resume when
8905 one or more error occurred.
8906 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
8907 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
8908 SET_CPC_INITIALIZER_STMT.
8909 (method_header): Check for inner classes declaring static methods.
8910 (resolve_qualified_expression_name): Handle situation where `this'
8911 is implied.
8912
8913 2000-03-13 Hans Boehm <boehm@acm.org>
8914
8915 * typeck.c (build_prim_array_type): Correctly set the high word too.
8916
8917 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
8918
8919 * parse.y (java_complete_expand_methods): Leave <clinit> out of
8920 ordinary methods.
8921 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
8922 list of methods for interfaces.
8923
8924 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8925
8926 * parse.y (qualify_ambiguous_name): Properly handle expressions
8927 using `null'.
8928
8929 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8930
8931 * parse.y (check_final_assignment): Extended to process
8932 COMPOUND_EXPR.
8933 (patch_assignment): Have check_final_assignment called only once.
8934
8935 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8936
8937 * java-tree.h (IS_INIT_CHECKED): New flag.
8938 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
8939 * parse.y (patch_string): Call force_evaluation_order on the
8940 completed string concatenation tree.
8941 * expr.c (force_evaluation_order): Call force_evaluation_order on
8942 function's arguments too.
8943
8944 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8945
8946 * decl.c (emit_init_test_initialization): Mark KEY as unused.
8947 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8948 (build_anewarray): Likewise.
8949 * parse.y (patch_newarray): Likewise.
8950 * parse.c: Regenerated.
8951
8952 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
8953
8954 * decl.c (init_decl_processing): Added new class fields `depth',
8955 `ancestors', and `idt' to class_type_node. Use
8956 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
8957 * class.c (make_class_data): Push initial values for new fields.
8958 * java-tree.h: Updated prototype for `build_invokeinterface'.
8959 * expr.c (build_invokeinterface): Changed parameters to accept
8960 `method' tree. Calculate index of `method' in its declaring
8961 interface. Build call to _Jv_LookupInterfaceMethodIdx.
8962 (expand_invoke): Call `build_invokeinterface' with new parameters.
8963 * parse.y (patch_invoke): Call `build_invokeinterface' with new
8964 parameters.
8965
8966 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
8967
8968 * typeck.c (lookup_do): Search superinterfaces first
8969 when looking up an interface method. From Godmar Back
8970 <gback@cs.utah.edu>
8971
8972 2000-03-06 Tom Tromey <tromey@cygnus.com>
8973
8974 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
8975
8976 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
8977
8978 * java-tree.h (lookup_argument_method2): Declared.
8979 (safe_layout_class): Prototype moved from parse.h.
8980 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
8981 * parse.y (java_check_regular_methods): Local `super_class' gone.
8982 Call lookup_argument_method2 instead of lookup_argument_method.
8983 Perform modifier match for methods found declared in implemented
8984 interfaces. Fixed indentation problem. Overriding/hiding error
8985 report to take place only for methods found in classes.
8986 * typeck.c (lookup_argument_method): Changed leading
8987 comment. Re-written by calling lookup_do.
8988 (lookup_argument_method2): New function.
8989 (lookup_java_method): Re-written by calling lookup_do.
8990 (lookup_do): New function.
8991
8992 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
8993
8994 * check-init.c (check_init): Removed dead code. Handle (blank)
8995 final variables.
8996 * parse.y (declare_local_variables): New local `final_p', set it
8997 and use it to initialize LOCAL_FINAL.
8998 (check_final_assignment): Only check FIELD_DECLs.
8999
9000 2000-02-17 Tom Tromey <tromey@cygnus.com>
9001
9002 * Makefile.in (JAVA_OBJS): Added boehm.o.
9003 (boehm.o): New target.
9004 * Make-lang.in (JAVA_SRCS): Added boehm.c.
9005 * java-tree.h (flag_use_boehm_gc): Declare.
9006 (get_boehm_type_descriptor): Declare.
9007 * lang.c (lang_f_options): Added `use-boehm-gc'.
9008 (flag_use_boehm_gc): New global.
9009 * lang-options.h: Added -fuse-boehm-gc.
9010 * boehm.c: New file.
9011 * class.c (get_dispatch_table): If class uses a Boehm type
9012 descriptor, put it in the vtable.
9013 (make_class_data): Removed dead code.
9014
9015 2000-03-03 Per Bothner <per@bothner.com>
9016
9017 * decl.c (init_decl_processing): Initialize sizetype properly.
9018
9019 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9020
9021 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
9022 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
9023 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
9024 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
9025 (jcf_parse): New local `current'. Load innerclasses seen in outer
9026 context being processed.
9027 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
9028 * jcf-write.c (append_innerclasses_attribute): New function.
9029 (append_innerclasses_attribute_entry): Likewise.
9030 (get_access_flags): Handle static classes. Set anonymous and local
9031 classes to be private.
9032 (generate_classfile): Attribute count adjusted. Call
9033 append_innerclasses_attribute.
9034 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
9035 PURE_INNER_CLASS_TYPE_P.
9036 * parse.y (parser_qualified_classname): New parameter `is_static',
9037 produce non qualified name accordingly.
9038 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
9039 (create_interface): Added argument to parser_qualified_classname.
9040 (create_class): Added argument to parser_qualified_classname. Setup
9041 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
9042 (add_inner_class_fields): Fixed indentation.
9043 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
9044 (method_declarator): Fixed typo in comment.
9045 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
9046 (build_current_thisn): Likewise.
9047 (patch_method_invocation): Likewise.
9048
9049 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
9050
9051 * decl.c (current_function_decl): Move to toplev.c.
9052
9053 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9054
9055 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
9056 (DECL_BIT_INDEX): Use underlying representation.
9057 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
9058
9059 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9060
9061 * expr.c (build_java_ret): Pass proper type to size_binop.
9062
9063 2000-02-25 Anthony Green <green@cygnus.com>
9064
9065 * expr.c (build_class_init): Mark the decl to be ignored by
9066 check_init.
9067 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
9068 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
9069 * class.c (init_test_hash_newfunc): New function.
9070 (decl_hash): New function.
9071 (decl_compare): New function.
9072 * decl.c (emit_init_test_initialization): New function.
9073 (complete_start_java_method): Traverse the init test hashtable,
9074 calling emit_init_test_initialization.
9075 (always_initialize_class_p): Define.
9076 * expr.c (build_class_init): Use initialization tests when
9077 emitting class initialization code.
9078 (always_initialize_class_p): Declare.
9079 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
9080 1.
9081 * java-tree.h: Include hash.h.
9082 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
9083 (struct lang_decl): Add init_test_table field.
9084 (init_test_hash_entry): Define.
9085
9086 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9087
9088 * gjavah.c (main): Avoid using `argi' to report unimplemented
9089 options.
9090
9091 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9092
9093 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
9094 initialize locals to avoid warnings. Local `exception_type' moved
9095 into if statement.
9096
9097 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9098
9099 * parse.y (resolve_expression_name): Use `orig' as a second
9100 argument to resolve_field_access.
9101 (resolve_field_access): Removed unnecessary code when dealing with
9102 static fields.
9103
9104 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
9105
9106 * class.c (push_super_field): Don't push the field twice.
9107 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
9108 * parse.h (java_reorder_fields): Prototyped.
9109 * parse.y (java_reorder_fields): New function.
9110 (java_layout_class): Simplified not to worry about re-ordering.
9111
9112 2000-02-23 Tom Tromey <tromey@cygnus.com>
9113
9114 * gjavah.c (print_name): In JNI case, correctly quote string.
9115 (print_method_info): Don't handle overrides in JNI mode.
9116
9117 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
9118
9119 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
9120 value type set to `boolean_type_node'.
9121
9122 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
9123
9124 * jcf-dump.c (main): Test for correct condition after
9125 output file creation.
9126
9127 2000-02-19 Anthony Green <green@cygnus.com>
9128
9129 * jcf-depend.c (add_entry): Fix test for first list entry.
9130
9131 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9132
9133 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
9134 * constants.c (build_constants_constructor): Likewise.
9135
9136 2000-02-19 Anthony Green <green@cygnus.com>
9137
9138 * jcf-depend.c (add_entry): Add entries to the end of the list.
9139
9140 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
9141
9142 * decl.c (INT_TYPE_SIZE): Define if necessary.
9143 (expand_java_return): Handle the case of a native integer smaller
9144 than a JVM integer.
9145
9146 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
9147
9148 * gjavah.c (help): Use GCCBUGURL.
9149 * jv-scan.c (help): Likewise.
9150 * jcf-dump.c (help): Likewise.
9151
9152 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9153
9154 * jcf-write.c (generate_bytecode_insns): Don't generate empty
9155 `finally' clauses.
9156
9157 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9158
9159 * jcf-parse.c (load_class): Call `fatal' if no file containing
9160 the target class are found.
9161
9162 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
9163
9164 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
9165 lex.c, lex.h, and PARSE_H to...
9166 (parse.o, parse-scan.o): ...here, respectively.
9167
9168 * lex.c: Split out code that may trigger SIGFPE from yylex()
9169 to its own function.
9170 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
9171
9172 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9173
9174 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
9175
9176 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
9177
9178 * parse.y (outer_field_access_p): Stop in time when outer contexts
9179 are exhausted.
9180 (resolve_qualified_expression_name): Properly qualify *everything*
9181 after a package.type to be resoled as expression names.
9182 (find_applicable_accessible_methods_list): Save/restore `class' to
9183 isolate it from a possible outer context search.
9184
9185 2000-02-15 Tom Tromey <tromey@cygnus.com>
9186
9187 * gjavah.c (jni_print_char): New function.
9188 (print_full_cxx_name): Use it.
9189 (decode_signature_piece): Likewise.
9190 (print_cxx_classname): Likewise.
9191
9192 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9193
9194 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
9195 version.o.
9196 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
9197
9198 * gjavah.c: Include version.h.
9199
9200 * jcf-dump.c: Likewise.
9201
9202 * jv-scan.c: Likewise.
9203
9204 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
9205
9206 * parse.y (outer_field_access_fix): First parameter now a tree
9207 node. Check for assignment to final. First argument to
9208 build_outer_field_access_fix modified to accommodate prototype.
9209 (build_outer_field_access): Don't check for assignment to final
9210 here.
9211 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
9212 possibly returned by outer_field_access_fix. Changed
9213 outer_field_access_fix's first argument.
9214 (check_final_assignment): $finit$'s context is OK.
9215 (patch_unaryop): Use node instead of its line/column value when
9216 calling outer_field_access_fix.
9217
9218 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
9219
9220 * parse.y (interface_declaration:): No longer tagged
9221 <node>. Re-installed default action.
9222 (class_member_declaration:): Handle inner interfaces.
9223 (interface_member_declaration): Handle inner interfaces and
9224 classes.
9225 (create_interface): Push error if one seen. Suspend parsing
9226 context when processing an inner interface.
9227 (register_fields): Inner class static field limitations not to
9228 apply to inner interfaces.
9229
9230 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9231
9232 * jcf-parse.c (load_class): Update `java_error_count' when a
9233 class' file can't be found.
9234 (parse.y): Avoid (byte)code generation when errors seen.
9235
9236 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9237
9238 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
9239 decodes a valid node.
9240 (patch_binop): Handle TRUNC_DIV_EXPR.
9241
9242 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9243
9244 * parse.y (resolve_package): New local `acc'. Try to progressively
9245 build and guess a package and type name.
9246
9247 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9248
9249 * parse.y (find_applicable_accessible_methods_list): Load and
9250 layout the search class if necessary.
9251 (java_complete_tree): Keep to original type of the folded initial
9252 value.
9253
9254 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
9255
9256 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
9257 Generate error message if circularity is detected. New static
9258 local `list'.
9259 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
9260 * jcf-write.c (generate_bytecode_insns): Very simply handle
9261 SAVE_EXPR.
9262 * parse.y (java_check_circular_reference): Use
9263 `cyclic_inheritance_report' during report, if necessary.
9264 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
9265 walking NEW_ARRAY_INIT twice.
9266
9267 2000-02-09 Tom Tromey <tromey@cygnus.com>
9268
9269 * parse.y (check_class_interface_creation): Allow inner classes to
9270 be `private' or `protected', check modifiers' consistency. Prevent
9271 block local classes from bearing any modifiers.
9272
9273 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9274
9275 * except.c (check_start_handlers): Re-add prototype lost in last
9276 patch.
9277 (maybe_start_try): Remove excess argument to `check_start_handlers'.
9278
9279 2000-02-09 Andrew Haley <aph@cygnus.com>
9280
9281 * decl.c (clear_binding_level): Remove excess initializer.
9282 (maybe_poplevels): Remove unused variable.
9283 (force_poplevels): Ditto.
9284 (struct binding_level): Add comment.
9285
9286 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9287
9288 * jcf-write.c (generate_classfile): Don't consider
9289 pre-initialization with reference value (use <clinit> instead.)
9290 * parse.y (java_fix_constructors): No generated constructor for
9291 interfaces.
9292 (build_outer_field_access): Removed debug message.
9293 (outer_field_expanded_access_p): Adapted to bytecode generation.
9294 (build_outer_field_access_method): Use fix_method_argument_names.
9295 (build_outer_method_access_method): Fixed indentation. Added
9296 comment. Handle access method generation for static and also void
9297 methods.
9298 (build_access_to_thisn): Inserted debug message.
9299 (maybe_build_thisn_access_method): Use fix_method_argument_names.
9300 (resolve_qualified_expression_name): Fixed comment.
9301 (not_accessible_p): Adapted to bytecode generation. Added comment.
9302 (patch_method_invocation): Added comment.
9303 (maybe_use_access_method): Fixed leading comment. Handle static
9304 methods.
9305 (java_complete_lhs): Don't shortcut handling of initialized upon
9306 declaration String type static fields when generating bytecode.
9307 (patch_unaryop): Handle outer field access when generating
9308 bytecode.
9309
9310 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
9311
9312 * java-tree.h (FIELD_THISN): New macro.
9313 * jcf-write.c (append_synthetic_attribute): New function.
9314 (generate_classfile): Set "Synthetic" attribute on this$<n>,
9315 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
9316 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
9317 this$<n> fields.
9318 (build_outer_field_access): Turned on access functions usage and
9319 generation when compiling to bytecode.
9320 (maybe_use_access_method): Likewise.
9321
9322 2000-01-25 Andrew Haley <aph@cygnus.com>
9323
9324 * java-except.h (struct eh_range): Add `expanded' field.
9325 (maybe_start_try): Add end_pc arg.
9326 (maybe_end_try): Ditto.
9327 * java-tree.h (force_poplevels): new function.
9328 * expr.c (expand_byte_code): Don't call maybe_start_try or
9329 maybe_end_try.
9330 * except.c (add_handler): Reset expanded.
9331 (expand_start_java_handler): Set expanded.
9332 (check_start_handlers): Don't expand a start handler that's
9333 already been expanded.
9334 (maybe_start_try): Add end_pc arg. Only expand a handler which
9335 ends after end_pc.
9336 (expand_end_java_handler): call force_poplevels.
9337 (force_poplevels): new function.
9338 * decl.c (binding_level): Add start_pc of binding level.
9339 (maybe_pushlevels): Call maybe_start_try when pushing binding
9340 levels.
9341 (maybe_poplevels): Call maybe_end_try when popping binding levels.
9342 (LARGEST_PC): Define.
9343 (clear_binding_level): Use LARGEST_PC.
9344
9345 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
9346 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
9347 (binding_depth, is_class_level, current_pc): new variables.
9348 (struct binding_level): ditto.
9349 (indent): new function.
9350 (push_jvm_slot): add debugging info.
9351 (maybe_pushlevels): ditto.
9352 (maybe_poplevels): ditto.
9353 (pushlevel): ditto.
9354 (poplevel): ditto.
9355 (start_java_method): ditto.
9356 (give_name_to_locals): comment only.
9357 * except.c (binding_depth, is_class_level, current_pc):
9358 new variables.
9359 (expand_start_java_handler): add debugging info.
9360 (expand_end_java_handler): ditto.
9361
9362 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9363
9364 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
9365 (print_name_for_stub_or_jni, process_file): Constify a char*.
9366
9367 2000-02-03 Tom Tromey <tromey@cygnus.com>
9368
9369 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
9370
9371 2000-01-31 Scott Bambrough <scottb@netwinder.org>
9372
9373 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
9374 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
9375 defined to be 1.
9376
9377 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
9378
9379 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
9380 * java-tree.h (TYPE_II_STMT_LIST): New macro.
9381 (struct lang_type): New field `ii_block'.
9382 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
9383 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
9384 * parse.h (struct parser_ctxt): New field `instance_initializers'.
9385 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
9386 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
9387 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
9388 macros.
9389 * parse.y (add_instance_initializer): New function.
9390 (in_instance_initializer): New static global.
9391 (class_body_declaration:): Link instance initializer block.
9392 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
9393 (array_creation_expression:): Remove unused local.
9394 (java_parser_context_push_initialized_field): Fixed leading
9395 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
9396 CPC_INSTANCE_INITIALIZER_LIST.
9397 (java_parser_context_pop_initialized_field): Likewise.
9398 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
9399 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
9400 CPC_INITIALIZER_STMT.
9401 (fix_constructors): New local `class_type'. Use it. Call
9402 add_instance_initializer.
9403 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
9404 (patch_return): Forbid return in instance initializers.
9405 (patch_throw_statement): Enforce exception handling in the context
9406 of instance initializers.
9407
9408 2000-02-03 Tom Tromey <tromey@cygnus.com>
9409
9410 * Make-lang.in (java.mostlyclean): Remove executables in
9411 `mostlyclean'.
9412
9413 2000-01-31 Scott Bambrough <scottb@netwinder.org>
9414
9415 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
9416 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
9417 (java_float_finite): Convert to use union Word from javaop.h.
9418 (java_double_finite): Convert to use union DWord from javaop.h.
9419
9420 2000-02-02 Tom Tromey <tromey@cygnus.com>
9421
9422 * gjavah.c (options): Added `jni' entry.
9423 (help): Document -jni.
9424 (flag_jni): New global.
9425 (process_file): Handle JNI output. Don't print text from
9426 -prepend, -add, etc, when generating stubs. Only remove `.class'
9427 suffix if it actually exists.
9428 (main): Create a `.c' file when run with `--jni --stubs'. Create
9429 correct output file name with `--jni'.
9430 (print_include): Mangle header name differently in JNI case.
9431 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
9432 method list.
9433 (print_method_info): Handle JNI case. Put signature info into
9434 method name. Handle case when STREAM is NULL.
9435 (print_name_for_stub_or_jni): New function.
9436 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
9437 (print_cxx_classname): Handle JNI.
9438 (print_full_cxx_name): Likewise.
9439 (decode_signature_piece): Likewise.
9440 (overloaded_jni_method_exists_p): New function.
9441 (struct method_name): Added `signature' and `sig_length' fields.
9442 (HANDLE_END_FIELD): Do nothing in JNI mode.
9443
9444 2000-02-02 Tom Tromey <tromey@cygnus.com>
9445
9446 * jv-scan.c: Include version.c, <getopt.h>.
9447 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
9448 (options): New array.
9449 (usage): New function.
9450 (version): New function.
9451 (main): Use getopt_long to parse command line.
9452 * jcf-dump.c: Include version.c, <getopt.h>.
9453 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
9454 OPT_JAVAP): New macros.
9455 (options): New array.
9456 (usage): Return `void'. Changed message.
9457 (help): New function.
9458 (version): New function.
9459 (main): Use getopt_long_only to parse command line.
9460 * gjavah.c: Include <getopt.h>.
9461 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
9462 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
9463 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
9464 (options): New array.
9465 (java_no_argument): Removed.
9466 (help): Updated with missing options.
9467 (main): Use getopt_long_only to parse command line.
9468 (usage): Changed message.
9469
9470 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9471
9472 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
9473 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
9474 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
9475 * parse.y (array_creation_expression:): Handle anonymous arrays.
9476 (build_array_from_name): Don't set `ret_name' if null.
9477 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
9478 (qualify_ambiguous_name): Likewise.
9479 (java_complete_expand_class): Likewise.
9480
9481 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9482
9483 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
9484 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
9485 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
9486 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
9487 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
9488 AIPL_FUNCTION_COMPLETED_INVOCATION.
9489 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
9490 AIPL_FUNCTION_INVOCATION_READY.
9491 (AIPL_FUNCTION_DECLARATION): New enum entry.
9492 * parse.y (reorder_static_initialized): New function.
9493 (java_parser_context_pop_initialized_field): Use it.
9494 (add_inner_class_fields): Use
9495 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
9496 augmented. Install marker after last alias initializer, if any.
9497 (generate_finit): Fixed typo. Don't try to retain only the used
9498 fields.
9499 (method_header): Compute and set DECL_FUNCTION_NAP.
9500 (method_declarator): Fixed comment. Insert alias initializer in
9501 parameter list.
9502 (build_alias_initializer_parameter_list): Fixed leading
9503 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
9504 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
9505 (java_complete_expand_class): Code to retain only used aliases
9506 removed.
9507 (java_complete_expand_methods): New local `first_decl'. Generate
9508 $finit$ first, then expand the constructors, regular methods and
9509 <clinit>.
9510 (java_complete_expand_method): Don't report error on missing
9511 return statement if previously detected bogus.
9512 (fix_constructors): Don't patch constructor parameters list.
9513 (patch_method_invocation): Use new AIPL enum values. Reverse
9514 alias initializer list for anonymous classes.
9515
9516 2000-01-30 Anthony Green <green@redhat.com>
9517
9518 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
9519 determine how many stack slots to pop.
9520
9521 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
9522
9523 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
9524 error handling/recovery.
9525 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
9526
9527 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
9528
9529 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
9530 FIELD_LOCAL_ALIAS_USED): New macros.
9531 (DECL_FUNCTION_NAP): New macro.
9532 (struct lang_decl): New field `nap'.
9533 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
9534 (struct lang_type): New fields `finit_stmt_list' and
9535 `clinit_stmt_list'.
9536 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
9537 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
9538 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
9539 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
9540 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
9541 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
9542 (BUILD_THROW): Macro line separator re-indented.
9543 * parse.y (end_class_declaration): New function.
9544 (maybe_generate_pre_expand_clinit): New name for
9545 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
9546 pre-expand static fields.
9547 (maybe_generate_clinit): Function deleted.
9548 (check_for_static_method_reference): Prototype's parameter list
9549 indented.
9550 (generate_finit): New name for maybe_generate_finit. Changed
9551 leading comment. Function rewritten to use
9552 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
9553 (build_alias_initializer_parameter_list): New function.
9554 (java_parser_context_pop_initialized_field): Likewise.
9555 (add_inner_class_fields): Likewise.
9556 (type_declaration:): Call end_class_declaration.
9557 (class_member_declaration:): Likewise.
9558 (formal_parameter_list:): Fixed typos.
9559 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
9560 element. Improved error handling.
9561 (block_statement:): Call end_class_declaration.
9562 (anonymous_class_creation:): Likewise.
9563 (create_anonymous_class): Fixed comments.
9564 (create_class): Call add_inner_class_fields.
9565 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
9566 (method_header): Use MARK_FINAL_PARMS.
9567 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
9568 (method_declarator): Propagate final argument flag.
9569 (craft_constructor): New local `artificial'. Call
9570 build_alias_initializer_parameter_list. Use
9571 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
9572 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
9573 necessary.
9574 (complete_expand_class): Get rid of unused outer context local
9575 alias fields.
9576 (java_complete_expand_methods): Fixed leading
9577 comment. Generate/pre-expand <clinit> first. Changed method
9578 expansion order to regular, $finit$, constructors, <clinit>.
9579 (java_complete_expand_method): Set current_function_decl.
9580 (fix_constructors): Fix constructor parameter list to account for
9581 outer context local alias initializers.
9582 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
9583 (resolve_expression_name): Lookup outer context local aliases. New
9584 local `access', use it.
9585 (patch_method_invocation): Patch inner class ctor invocation with
9586 outer context local aliases initialization values. $finit$
9587 invocation patching now includes things generated with
9588 build_alias_initializer_parameter_list.
9589 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
9590 (build_super_invocation): Likewise.
9591 (patch_assignment): Changed comment.
9592
9593 2000-01-27 Andrew Haley <aph@cygnus.com>
9594
9595 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
9596 (emit_if): Ditto.
9597 (emit_jsr): Ditto.
9598
9599 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9600
9601 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
9602 concatenation.
9603 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
9604
9605 * parse.y (register_fields): Don't pass a format specifier to
9606 OBSOLETE_MODIFIER_WARNING.
9607 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
9608 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
9609 specifier.
9610 (check_modifiers): Change function into a macro.
9611 (check_class_interface_creation): Pass a literal format string.
9612
9613 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9614
9615 * buffer.h: PROTO -> PARAMS.
9616 * check-init.c: Likewise.
9617 * class.c: Likewise.
9618 * constants.c: Likewise.
9619 * convert.h: Likewise.
9620 * decl.c: Likewise.
9621 * except.c: Likewise.
9622 * expr.c: Likewise.
9623 * gjavah.c: Likewise.
9624 * java-except.h: Likewise.
9625 * java-tree.h: Likewise.
9626 * jcf-depend.c: Likewise.
9627 * jcf-dump.c: Likewise.
9628 * jcf-parse.c: Likewise.
9629 * jcf-path.c: Likewise.
9630 * jcf-reader.c: Likewise.
9631 * jcf-write.c: Likewise.
9632 * jcf.h: Likewise.
9633 * jv-scan.c: Likewise.
9634 * jvgenmain.c: Likewise.
9635 * jvspec.c: Likewise.
9636 * lang.c: Likewise.
9637 * lex.c: Likewise.
9638 * lex.h: Likewise.
9639 * parse-scan.y: Likewise.
9640 * parse.h: Likewise.
9641 * parse.y: Likewise.
9642 * typeck.c: Likewise.
9643 * verify.c: Likewise.
9644 * xref.c: Likewise.
9645 * xref.h: Likewise.
9646 * zextract.c: Likewise.
9647 * zipfile.h: Likewise.
9648
9649 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
9650
9651 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9652 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
9653 * constants.c (build_constant_data_ref): Check for cached
9654 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
9655 in TYPE_CPOOL_DATE_REF.
9656 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
9657 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
9658 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
9659 (LOCAL_FINAL): New macro.
9660 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
9661 constant pool -- don't try to reuse.
9662 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
9663 TYPE_LANG_SPECIFIC.
9664 (find_in_current_zip): Use TYPE_JCF.
9665 * parse.h (java_check_final): Prototype removed.
9666 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
9667 (maybe_create_class_interface_decl,
9668 check_class_interface_creation): Likewise.
9669 (java_expand_finals): Function removed.
9670 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
9671 (block_statement:): Fixed comment.
9672 (anonymous_class_creation:): Likewise.
9673 (check_class_interface_creation): Reversed Jan 12, 2000 extra
9674 argument patch.
9675 (check_class_interface_creation): Loosened error report on (inner)
9676 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
9677 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
9678 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
9679 argument patch.
9680 (create_interface): Likewise.
9681 (anonymous_class_counter): New static global.
9682 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
9683 patch. Fixed comments.
9684 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
9685 anonymous_class_counter when declaring a toplevel class.
9686 (craft_constructor): Fixed constructor name when handling
9687 anonymous classes. Anonymous class constructors to feature hidden
9688 this$<n> parameter.
9689 (java_fix_constructors): Added comment.
9690 (java_check_final): Function removed.
9691 (java_complete_expand_methods): Fixed comment. Don't generate
9692 class data, save its outgoing constant pool instead.
9693 (verify_constructor_super): Skip anonymous class constructor
9694 hidden this$<n> parameter.
9695 (java_expand_classes): New local `saved_ctxp'. Removed call to
9696 java_expand_finals and java_check_final. Expand anonymous class
9697 constructors. Generate class data.
9698 (build_super_invocation): Skip anonymous class hidden this$<n>
9699 parameter.
9700 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
9701 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9702 (set_java_signature): Likewise.
9703
9704 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
9705
9706 * gjavah.c: Delete ACC_VISIBILITY define.
9707 * jcf.h: Add ACC_VISIBILITY define.
9708 * parse.y: final: rule tagged <value>.
9709 (java_check_regular_methods): Use ACC_VISIBILITY define for
9710 default package access check.
9711 (local_variable_declaration_statement): Use final: rule.
9712
9713 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
9714
9715 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
9716 (final:): New rule.
9717
9718 2000-01-17 Tom Tromey <tromey@cygnus.com>
9719
9720 * gjavah.c (print_field_info): Allow non-static final fields.
9721
9722 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9723
9724 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
9725 * parse.y (patch_anonymous_class): New function.
9726 (create_anonymous_class): Register incomplete type when the
9727 class/interface to extends/implement isn't known yet.
9728 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
9729 (verify_constructor_super): Tuned error message.
9730
9731 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9732
9733 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
9734 (ANONYMOUS_CLASS_P): New macro.
9735 (TYPE_SIGNATURE, TYPE_JCF): New macros.
9736 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
9737 * parse.y (create_class): Added leading argument.
9738 (maybe_create_class_interface_decl,
9739 check_class_interface_creation): Likewise.
9740 (craft_constructor): New function.
9741 (verify_constructor_super): Added argument in prototype.
9742 (class_declaration:): Inserted leading argument.
9743 (for_begin:): Use FOR_LOOP_P.
9744 (anonymous_class_creation): Create WFL of the anonymous class to
9745 instantiate. Call build_new_invocation. Added comments.
9746 (check_class_interface_creation): Handle parameter `anonymous' in
9747 verbose mode class creation announce.
9748 (link_nested_class_to_enclosing): Exclude anonymous classes.
9749 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
9750 anonymous class, even though they appear to have an enclosing
9751 context.
9752 (create_interface): Pass extra argument to
9753 check_class_interface_creation.
9754 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
9755 (create_class): Call check_class_interface_creation and
9756 maybe_create_class_interface_decl with extra new argument. Don't
9757 add private this$<n> to anonymous classes.
9758 (method_declarator): Insert hidden this$<n> to anonymous class
9759 constructors.
9760 (java_fix_constructors): Deleted code creating default
9761 constructor. Call craft_constructor instead.
9762 (java_check_regular_methods): Set `saw_constructor' to 1 for
9763 anonymous classes.
9764 (fix_constructors): Pass extra argument to verify_constructor_super.
9765 (verify_constructor_super): New local `sdecl', use it. Search for
9766 matching constructor (possibly featuring arguments) in super
9767 class.
9768 (lookup_method_invoke): Craft constructor according to arguments
9769 list when dealing with anonymous class constructors.
9770 (build_super_invocation): Pass arguments to anonymous class super
9771 constructors.
9772 (search_loop): Use FOR_LOOP_P.
9773 (labeled_block_contains_loop_p): Likewise.
9774
9775 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
9776
9777 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
9778 (enclosing_context_p): New function.
9779 (get_access_flags_from_decl): Handle CLASS_STATIC.
9780 (maybe_layout_super_class): Extra first argument passed to
9781 do_resolve_class.
9782 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
9783 ID_INIT_P.
9784 * decl.c (access0_identifier_node): New global.
9785 (init_decl_processing): access0_identifier_node initialized.
9786 (pushdecl): Set DECL_CONTEXT only on non type decls.
9787 * expr.c (lookup_field): Lookup inner class fields in enclosing
9788 contexts.
9789 (expand_invoke): Use ID_INIT_P.
9790 (expand_java_field_op): Use DECL_CLINIT_P.
9791 * java-tree.def (CLASS_LITERAL): New tree code.
9792 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
9793 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
9794 (struct lang_decl): New field `inner_access'.
9795 (enclosing_context_p): Prototyped.
9796 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
9797 ID_CLINIT_P): New macros.
9798 (CLASS_STATIC): New macro.
9799 (CLASS_ACCESS0_GENERATED_P): New macro.
9800 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
9801 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
9802 INNER_CLASS_P): New macros.
9803 (DECL_INNER_CLASS_LIST): New macro.
9804 * jcf-parse.c (yyparse): Avoid the use of ANSI string
9805 concatenation.
9806 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9807 the shift value to int. Fixed typo in comment.
9808 * lex.c (inst_id, wpv_id): Initialize.
9809 * mangle.c (unicode_mangling_length): Take `$' into account.
9810 * parse.h (DRECOVER, RECOVER): Terminate properly.
9811 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
9812 (typedef struct _jdep): New field `enclosing'.
9813 (JDEP_ENCLOSING): New macro.
9814 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
9815 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
9816 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
9817 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
9818 GET_ENCLOSING_CPC_CONTEXT): New macros.
9819 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
9820 (do_resolve_class): Added extra argument in prototype.
9821 * parse.y (resolve_class): Added extra argument in prototype.
9822 (maybe_create_class_interface_decl): Likewise.
9823 (maybe_use_access_method, build_wfl_wrap): New functions.
9824 (java_complete_expand_classes, java_complete_expand_class):
9825 Likewise.
9826 (java_parser_context_push_initialized_field,
9827 java_parser_context_suspend, java_parser_context_resume):
9828 Likewise.
9829 (maybe_make_nested_class_name, make_nested_class_name,
9830 set_nested_class_simple_name_value,
9831 link_nested_class_to_enclosing, find_as_inner_class,
9832 find_as_inner_class_do, check_inner_class_redefinition,
9833 build_thisn_assign, build_current_thisn, build_access_to_thisn,
9834 maybe_build_thisn_access_method, build_outer_field_access,
9835 build_outer_field_access_methods, build_outer_field_access_expr,
9836 build_outer_method_access_method, build_new_access_id,
9837 build_outer_field_access_method, outer_field_access_p,
9838 outer_field_expanded_access_p, outer_field_access_fix,
9839 build_incomplete_class_ref, patch_incomplete_class_ref,
9840 create_anonymous_class): Likewise.
9841 (inst_id, wpv_id): New static global variables.
9842 (synchronized:): New rule, tagged <node>.
9843 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
9844 rules.
9845 (anonymous_class_creation:): New rule, tagged <node>.
9846 (NEW_TK): Tagged <node>.
9847 (type_literals, array_type_literal): New rules, tagged <node>.
9848 (class_declaration:): Removed action when reducing by class_body:
9849 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
9850 using GET_CPC in sub-rules.
9851 (class_member_declaration): Handle inner classes.
9852 (method_declaration): When reducing method_header:, reset
9853 current_function_decl when appropriate.
9854 (method_declarator:): Set the number of formal parameter to 0 for
9855 method declared without arguments.
9856 (constructor_declarator:): Likewise.
9857 (static_initializer:): List of elements kept in a list.
9858 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
9859 use of the keyword `static' for type declarations.
9860 (block_statement:): Handle inner class declarations.
9861 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
9862 type qualified `this'.
9863 (class_instance_creation_expression): Use anonymous_class_creation:
9864 to handle inner class instances creation. Handle qualified `new'.
9865 (something_dot_new): Added appropriate actions.
9866 (create_new_parser_context): New function.
9867 (java_push_parser_context, java_parser_context_save_global,
9868 java_parser_context_suspend): Use create_new_parser_context.
9869 (check_modifiers): Changed leading comment.
9870 (check_class_interface_creation): Handle interclasses.
9871 (add_superinterfaces): Fixed comment.
9872 (create_interface): Build qualified name from the raw_name instead
9873 of its matching WFL. Push the initialized fields list. raw_name added
9874 as an extra argument to maybe_create_class_interface_decl.
9875 (create_class): Build qualified name from the raw_name instead of
9876 its matching WFL. Removed assignment to current_parsed_class_un.
9877 Call PUSH_ERROR before returning an error. Suspend the current
9878 parser context when processing an inner class. Push the
9879 initialized fields list. raw_name added as an extra argument to
9880 maybe_create_class_interface_decl. Add the private this$<n>
9881 field.
9882 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
9883 (register_fields): Get the class type from GET_CPC and handle
9884 previous errors. Added code to handle the creation of static
9885 fields in inner classes. Initialized fields initialization
9886 statements kept in a list of lists.
9887 (maybe_generate_finit): Initialized fields initialization
9888 statements kept in a list of lists. Use GET_CPC.
9889 (maybe_generate_clinit): Likewise.
9890 (method_header): Use GET_CPC and GET_CPC_UN.
9891 (parser_qualified_classname): Handle inner classes.
9892 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
9893 (java_fix_constructors): Hide pointer to enclosing context
9894 instance in constructor list when dealing with inner classes.
9895 (jdep_resolve_class): Call resolve_class with extra first argument
9896 JDEP_ENCLOSING.
9897 (resolve_class): Add enclosing context as a first extra argument
9898 to do_resolve_class.
9899 (do_resolve_class): Call find_as_inner_class. Handle WFLs
9900 properly.
9901 (resolve_no_layout): Extra argument added to resolve_class
9902 invocation.
9903 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
9904 (java_get_real_method_name): Use GET_CPC_UN.
9905 (check_abstract_method_definitions): Use DECL_CLINIT_P.
9906 (java_check_abstract_methods): Handle static method declared in
9907 inner classes by an error.
9908 (java_check_regular_methods): Use DECL_CLINIT_P.
9909 (source_start_java_method): Also set DECL_MAX_LOCALS.
9910 (create_artificial_method): Call java_parser_context_save_global
9911 and java_parser_context_restore_global instead of saving/restoring
9912 the context by hand.
9913 (expand_start_java_method): Improved verbose mode message.
9914 (java_complete_expand_methods): Fixed leading comment. Use
9915 DECL_CLINIT_P.
9916 (fix_constructors): Added assignment to this$<n> if necessary.
9917 (java_expand_classes): Call java_complete_expand_classes instead
9918 of java_complete_expand_methods.
9919 (make_qualified_primary): Simplified.
9920 (merge_qualified_name): Optimized for missing left or right parts.
9921 (resolve_expression_name): Handle access to outer class fields from
9922 interclasses.
9923 (resolve_qualified_expression_name): New macro
9924 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
9925 classes. Report error on non appropriate qualification of
9926 `new'. Handle qualified `this'.
9927 (not_accessible_p): Allow access to outer class private fields from
9928 inner classes.
9929 (patch_method_invocation): Handle method invocations through
9930 access methods and inner class constructor invocations.
9931 (find_applicable_accessible_methods_list): Search enclosing
9932 contexts of an inner class.
9933 (search_applicable_methods_list): Fixed typo.
9934 (argument_types_convertible): Handle inner class constructors'
9935 hidden outer context reference argument.
9936 (qualify_ambiguous_name): Handle qualified `this'.
9937 (java_complete_lhs): Handle use of field accessed through
9938 artificial access methods in various cases of assignments. Handle
9939 CLASS_LITERAL node.
9940 (check_final_assignment): Use DECL_CLINIT_P.
9941 (valid_ref_assignconv_cast_p): Handle the destination being an
9942 enclosing context of the source.
9943 (patch_unaryop): Handle use of field accessed through artificial
9944 access methods.
9945 (patch_return): Use DECL_CLINIT_P.
9946 (patch_throw_statement): Use DECL_CLINIT_P.
9947 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
9948 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
9949 ID_INIT_P.
9950
9951 2000-01-16 Anthony Green <green@cygnus.com>
9952
9953 * parse.y (build_string_concatenation): Only use
9954 StringBuffer(String) shortcut if String arg is constant.
9955
9956 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
9957
9958 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9959 the shift value to int. Fixed typo in comment.
9960
9961 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
9962
9963 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
9964 * jcf-write.c: Likewise.
9965 * parse.y: Likewise.
9966 * parse.c: Regenerate.
9967
9968 2000-01-09 Anthony Green <green@cygnus.com>
9969
9970 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
9971 bytecodes in the correct order.
9972
9973 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9974
9975 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
9976
9977 2000-01-06 Anthony Green <green@cygnus.com>
9978
9979 * expr.c (java_lang_expand_expr): Switch to permanent obstack
9980 before building constant array decl.
9981
9982 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
9983
9984 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
9985 method invocation and typo in conditional expression.
9986 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
9987 the appropriate NOTE_POP.
9988 * parse.y (patch_binop): Shift value mask to feature the right
9989 type.
9990
9991 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9992
9993 * class.c (assume_compiled, assume_compiled_node): Add static
9994 prototype.
9995 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
9996
9997 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
9998
9999 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
10000
10001 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
10002 to `__modifier' to avoid stringifying it.
10003
10004 * parse.y (verify_constructor_circularity): Don't call a variadic
10005 function with a non-literal format string.
10006 (java_check_abstract_methods): Move unreachable code inside
10007 `continue' statement.
10008 (lookup_method_invoke): Call xstrdup, not strdup.
10009
10010 * expr.c (expand_java_field_op): Avoid the use of ANSI string
10011 concatenation.
10012
10013 * jcf-parse.c (yyparse): Likewise.
10014
10015 * jv-scan.c (main): Likewise.
10016
10017 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10018
10019 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
10020 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
10021 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
10022 concatenation.
10023
10024 * parse.y (synchronized, variable_redefinition_error,
10025 check_class_interface_creation, create_interface, create_class,
10026 method_header, finish_method_declaration,
10027 check_modifiers_consistency, method_declarator,
10028 complete_class_report_errors, check_abstract_method_definitions,
10029 java_check_regular_methods, check_throws_clauses,
10030 java_check_abstract_methods, read_import_dir,
10031 check_pkg_class_access, declare_local_variables, fix_constructors,
10032 cut_identifier_in_qualified, resolve_expression_name,
10033 resolve_qualified_expression_name, patch_method_invocation,
10034 java_complete_lhs, patch_assignment, try_builtin_assignconv,
10035 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
10036 patch_exit_expr, patch_exit_expr, patch_switch_statement,
10037 patch_try_statement, patch_synchronized_statement,
10038 patch_throw_statement, check_thrown_exceptions,
10039 patch_conditional_expr): Likewise.
10040
10041 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
10042
10043 * Makefile.in (LIBDEPS): Added gcc's errors.o
10044 (../jcf-dump$(exeext):): Link with gcc's errors.o
10045 (../gcjh$(exeext):): Likewise.
10046 * expr.c (expand_java_NEW): Layout the entire target type instead of
10047 laying out its methods only.
10048 (lookup_field): Layout the class after having loaded it.
10049 * java-tree.h (java_debug_context): Declared.
10050 * jcf-io.c (toplev.h): Included.
10051 (find_class): Removed assignment to jcf's outofsynch
10052 field. Force source file to be read if newer than its matching
10053 class file. Tweaked debug messages.
10054 * jcf-parse.c (jcf_out_of_synch): Deleted.
10055 (read_class): Call to jcf_out_of_synch removed.
10056 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
10057 (jcf_out_of_synch): Prototype deleted.
10058 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
10059 `deprecated' and `class_err': integer turned into bit-fields.
10060 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
10061 * parse.y (package_list): New global.
10062 (package_declaration:): Record newly parsed package name.
10063 (extra_ctxp_pushed_p): Static global deleted.
10064 (java_parser_context_save_global): Create buffer context for the
10065 purpose of saving globals, if necessary.
10066 (java_parser_context_restore_global): Pop context pushed for the
10067 purpose of saving globals, if necessary.
10068 (java_debug_context_do): New prototype and function.
10069 (java_debug_context): Likewise.
10070 (do_resolve_class): Use already parsed package names to qualify
10071 and lookup class candidate.
10072 (java_pre_expand_clinit): Removed unnecessary local variable.
10073
10074 1999-12-17 Tom Tromey <tromey@cygnus.com>
10075
10076 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
10077 fixes PR gcj/119.
10078 (process_file): Use `\n\' at end of each line in string.
10079
10080 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
10081
10082 * expr.c (expand_invoke): Layout the loaded class before
10083 attempting to use it.
10084 (expand_java_field_op): Allow final field assignments to take
10085 place in $finit$.
10086 * typeck.c (convert): Return error_mark_node if expr is null.
10087
10088 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
10089
10090 * class.c (class_depth): Return -1 if the class doesn't load
10091 properly.
10092 * expr.c (can_widen_reference_to): Check for errors during depth
10093 computation and return 0 accordingly.
10094 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
10095 create default constructors and add an other error check.
10096 * parse.h (java_fix_constructors): Prototyped.
10097 * parse.y (java_pre_expand_clinit): Likewise.
10098 (build_super_invocation): Re-prototyped to feature one argument.
10099 (java_check_circular_reference): Directly use `current'.
10100 (java_fix_constructors): New function.
10101 (java_check_regular_methods): Don't create default constructors
10102 here, but abort if none were found.
10103 (java_complete_expand_methods): Pre-process <clinit> calling
10104 java_pre_expand_clinit.
10105 (java_pre_expand_clinit): New function.
10106 (fix_constructors): build_super_invocation invoked with the
10107 current method declaration as an argument.
10108 (build_super_invocation): Use the context of the processed method
10109 decl argument instead of current_class.
10110 * typeck.c (lookup_java_method): Take WFLs in method names into
10111 account.
10112
10113 1999-12-14 Per Bothner <per@bothner.com>
10114
10115 * class.c (make_class_data): flag_keep_inline_functions to keep
10116 private methods in the method array.
10117
10118 1999-12-15 Anthony Green <green@cygnus.com>
10119
10120 * check-init.c (check_init): Take into account both types of
10121 `throw's when checking for uninitialized variables.
10122
10123 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10124
10125 * parse.y (java_complete_lhs): Force conversion of array
10126 dimensions to int_type_node, that's what runtime's ABI expects.
10127
10128 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10129
10130 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
10131 operand of a WFL, until the Java front-end gets fixed with regard
10132 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
10133
10134 1999-12-10 Andrew Haley <aph@cygnus.com>
10135
10136 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
10137 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
10138 expr.c (build_java_athrow): Add support for sjlj-exceptions.
10139 java-tree.h: Ditto.
10140 jcf-write.c: Ditto.
10141
10142 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
10143
10144 * expr.c (java_lang_expand_expr): Switch to permanent obstack
10145 before calling expand_eh_region_start and expand_start_all_catch.
10146 * except.c (expand_start_java_handler): Switch to permanent
10147 obstack before calling expand_eh_region_start.
10148 (expand_end_java_handler): Switch to permanent obstack before
10149 calling expand_start_all_catch.
10150
10151 1999-12-5 Anthony Green <green@cygnus.com>
10152
10153 * decl.c (init_decl_processing): Mark throw_node as a noreturn
10154 function with side effects.
10155 (init_decl_processing): Mark all memory allocating DECLs with
10156 DECL_IS_MALLOC.
10157
10158 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10159
10160 * except.c (expand_end_java_handler): Call
10161 expand_resume_after_catch and end_catch_handler.
10162
10163 1999-11-30 Anthony Green <green@cygnus.com>
10164
10165 * verify.c (verify_jvm_instructions): Create new return label
10166 chain if non existent (don't rely on the verified state of the jsr
10167 target.)
10168
10169 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
10170
10171 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
10172 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
10173
10174 * parse.y (patch_assignment): Removed bogus final class test on
10175 lhs when checking on whether to emit an ArrayStoreException runtime
10176 check.
10177 * expr.c (expand_java_arraystore): Likewise.
10178
10179 1999-11-28 Anthony Green <green@cygnus.com>
10180
10181 * decl.c (find_local_variable): Reuse single slot decls when
10182 appropriate.
10183
10184 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
10185
10186 * jcf-parse.c (saw_java_source): Global variable removed.
10187 (read_class): Don't use `saw_java_source'. Added extra braces.
10188 (yyparse): Code setting `saw_java_source' removed.
10189
10190 1999-11-24 Mark Mitchell <mark@codesourcery.com>
10191
10192 * except.c (emit_handlers): Zero catch_clauses after emitting them.
10193
10194 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10195
10196 * verify.c (merge_type_state): Non verified subroutines being
10197 considered more than once to trigger passive type merge.
10198
10199 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10200
10201 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
10202 in case of error. Error message tuned.
10203
10204 1999-11-21 Anthony Green <green@cygnus.com>
10205
10206 * constants.c (find_methodref_index): Unwrap method names before
10207 inserting them in the constant pool.
10208
10209 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
10210
10211 * class.c (assume_compiled_node): New typedef.
10212 (assume_compiled_tree): New static data.
10213 (find_assume_compiled_node): New function.
10214 (add_assume_compiled): New function.
10215 (assume_compiled): New function.
10216 * class.c (make_class_data): Use assume_compiled.
10217 (is_compiled_class): Use assume_compiled.
10218
10219 * java-tree.h (add_assume_compiled): Declare.
10220
10221 * lang.c (lang_decode_option): Parse new options.
10222
10223 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10224
10225 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
10226 int_type_node: that's what `_Jv_AllocObject' expects.
10227
10228 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
10229
10230 * parse.y (lookup_method_invoke): Use lang_printable_name to
10231 reliably build the type name during error report. Fixes PR gcj/97.
10232
10233 1999-11-09 Tom Tromey <tromey@cygnus.com>
10234
10235 * jcf-path.c: Include <sys/stat.h>.
10236 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
10237 (DIR_UP): New macro.
10238
10239 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
10240
10241 * parse.y (source_end_java_method): Resume permanent allocation,
10242 reversing Apr 27 1998 patch.
10243 (patch_string_cst): Pop obstacks after having pushed the permanent
10244 ones.
10245
10246 1999-11-05 Tom Tromey <tromey@cygnus.com>
10247
10248 * class.c (finish_class): Emit inlined methods if any native
10249 methods exist in the class. Fixes PR gcj/85.
10250
10251 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
10252
10253 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
10254 (qualify_ambiguous_name): Likewise.
10255
10256 1999-11-03 Godmar Back <gback@cs.utah.edu>
10257
10258 * typeck.c: (lookup_java_method): search all inherited
10259 interfaces when looking up interface method.
10260
10261 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10262
10263 * parse.y (method_header:): Issue error message for rule `type
10264 error'.
10265 (synchronized:): Error report when not using synchronized.
10266
10267 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10268
10269 * parse.y (resolve_qualified_expression_name): Prevent `this' from
10270 being used before the superclass constructor has been called.
10271 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
10272 instead of `CALL_THIS_CONSTRUCTOR_P'.
10273
10274 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
10275
10276 * check-init.c: Fix typo in comment.
10277
10278 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
10279
10280 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
10281 and final method.
10282
10283 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
10284
10285 * parse.y (expression_statement:): Call function to report
10286 improper invocation of a constructor.
10287 (parse_ctor_invocation_error): New function.
10288
10289 1999-10-26 Mark Mitchell <mark@codesourcery.com>
10290
10291 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
10292 remember_end_note.
10293
10294 1999-10-21 Tom Tromey <tromey@cygnus.com>
10295
10296 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
10297 in generated `main'.
10298
10299 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
10300
10301 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
10302 (qualify_ambiguous_name): Likewise.
10303
10304 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
10305
10306 * parse.y (java_complete_tree): fold_constant_for_init to work on
10307 permanent_obstack.
10308 (java_complete_lhs): Likewise.
10309 (array_constructor_check_entry): Complete an initializer element
10310 on permanent_obstack.
10311
10312 1999-10-19 Tom Tromey <tromey@cygnus.com>
10313
10314 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
10315 From Mike Moreton <mike@pillim.demon.co.uk>.
10316
10317 1999-10-15 Greg McGary <gkm@gnu.org>
10318
10319 * java-tree.h (flag_bounds_check): Remove extern decl.
10320 * lang.c (flag_bounds_check): Remove global variable.
10321 (lang_f_options): Remove "bounds-check" entry.
10322 (lang_init_options): Default flag_bounds_check to "on".
10323
10324 1999-10-14 Tom Tromey <tromey@cygnus.com>
10325
10326 * jvgenmain.c (usage): New function.
10327 (main): Use it. Also, handle `-D' options.
10328 * jvspec.c (lang_specific_driver): Recognize -D.
10329 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
10330
10331 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
10332
10333 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10334
10335 * jcf-dump.c (print_constant, disassemble_method): Don't call a
10336 variadic function with a non-literal format string.
10337
10338 * parse-scan.y (report_main_declaration): Likewise.
10339
10340 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
10341
10342 * parse.y (read_import_dir, patch_assignment, patch_binop,
10343 patch_array_ref): Likewise.
10344
10345 * typeck.c (build_java_array_type): Likewise.
10346
10347 * verify.c (verify_jvm_instructions): Likewise.
10348
10349 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
10350
10351 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
10352
10353 1999-10-07 Anthony Green <green@cygnus.com>
10354
10355 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
10356 where CHECK_PUT may fail for valid reasons.
10357
10358 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
10359 UNSAFE_PUTN): New macros.
10360
10361 1999-10-04 Tom Tromey <tromey@cygnus.com>
10362
10363 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
10364 well. Fixes Java PR gcj/59.
10365 * parse-scan.y (yyerror): Report errors.
10366
10367 1999-09-24 Glenn Chambers <GChambers@provsol.com>
10368
10369 * decl.c (insert_block): Remove unconditional `abort'.
10370
10371 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
10372
10373 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
10374 FUNCTION_CODE now of type int. All callers changed.
10375 Set the builtin's DECL_BUILT_IN_CLASS.
10376
10377 1999-09-23 Tom Tromey <tromey@cygnus.com>
10378
10379 * jvspec.c (lang_specific_driver): Don't read spec file if
10380 -fsyntax-only given.
10381
10382 1999-09-22 Tom Tromey <tromey@cygnus.com>
10383
10384 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
10385
10386 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
10387 (WORDS_TO_LONG): Likewise.
10388 (WORDS_TO_DOUBLE): Likewise.
10389
10390 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
10391
10392 * jcf-write.c (RELOCATION_VALUE_0): New macro.
10393 (RELOCATION_VALUE_1): Likewise.
10394 (emit_iinc, emit_reloc, push_constant1, push_constant2,
10395 push_in_const, push_long_const): Prototyped.
10396 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
10397 (push_constant2): Likewise.
10398 (push_int_const): Cast find_constant1's integer arguments to `jword'.
10399 (find_constant_wide): Cast find_constant2's integer arguments to
10400 `jword'.
10401 (find_constant_index): Cast find_constant2's and find_constant2's
10402 integer arguments to `jword'.
10403 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
10404 (emit_switch_reloc): Use RELOCATION_VALUE_0.
10405 (emit_if): Use RELOCATION_VALUE_1.
10406 (emit_goto): Likewise.
10407 (emit_jsr): Likewise.
10408 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
10409 argument to push_long_const to HOST_WIDE_INT.
10410
10411 1999-09-15 Andreas Schwab <schwab@suse.de>
10412
10413 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
10414
10415 1999-09-20 Nick Clifton <nickc@cygnus.com>
10416
10417 * lang.c (lang_decode_option): Extend comment.
10418
10419 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
10420
10421 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
10422 instead of fndecl.
10423
10424 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10425
10426 * gjavah.c (get_field_name, print_method_info, print_include,
10427 add_namelet): Use xmalloc, not malloc.
10428
10429 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
10430 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
10431 NULL pointer.
10432
10433 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
10434
10435 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
10436
10437 * jcf-path.c (add_entry): Likewise.
10438
10439 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
10440
10441 * jv-scan.c (xmalloc): Remove definition.
10442
10443 * jvgenmain.c (xmalloc): Likewise.
10444
10445 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
10446
10447 * lex.c (java_store_unicode): Use xrealloc, not realloc.
10448
10449 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
10450 concat, not xmalloc/sprintf.
10451 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
10452 (xstrdup): Remove definition.
10453
10454 * parse.y (duplicate_declaration_error_p,
10455 constructor_circularity_msg, verify_constructor_circularity,
10456 check_abstract_method_definitions, java_check_regular_methods,
10457 java_check_abstract_methods, patch_method_invocation,
10458 check_for_static_method_reference, patch_assignment, patch_binop,
10459 patch_cast, array_constructor_check_entry, patch_return,
10460 patch_conditional_expr): Use xstrdup, not strdup.
10461
10462 * zextract.c (ALLOC): Use xmalloc, not malloc.
10463
10464 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10465
10466 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
10467
10468 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
10469 (do_spec, lang_specific_pre_link, lang_specific_driver,
10470 input_filename, input_filename_length): Don't declare.
10471 (main_class_name, jvgenmain_spec, lang_specific_driver):
10472 Constify a char*.
10473 (lang_specific_driver): All calls to the function pointer
10474 parameter now explicitly call `fatal'.
10475
10476 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
10477
10478 * parse.y (find_applicable_accessible_methods_list): Search
10479 abstract classes as interfaces.
10480
10481 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
10482
10483 * class.c (finish_class): We're now outside a valid method
10484 declaration. Tell the rest of gcc so.
10485
10486 1999-09-08 Bruce Korb autogen@linuxbox.com
10487
10488 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
10489
10490 1999-09-07 Tom Tromey <tromey@cygnus.com>
10491
10492 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
10493 java-array.h.
10494 (decode_signature_piece): Don't emit "::" in JArray<>.
10495 (print_namelet): Only print trailing `;' when printing a class.
10496
10497 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
10498
10499 * java-tree.h: Delete declarations for all tree nodes now moved to
10500 global_trees.
10501 * decl.c: Delete their definitions.
10502
10503 1999-09-04 Mark Mitchell <mark@codesourcery.com>
10504
10505 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
10506 * Makefile.in (OBJS): Add ggc-callbacks.o.
10507 (OBJDEPS): Likewise.
10508
10509 1999-09-03 Tom Tromey <tromey@cygnus.com>
10510
10511 * parse.y (strip_out_static_field_access_decl): Return operand if
10512 it satisfies JDECL_P.
10513
10514 1999-09-02 Tom Tromey <tromey@cygnus.com>
10515
10516 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
10517 Handle nested arrays, like `[[I'.
10518
10519 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10520
10521 * class.c (finish_class): Remove unused parameter, all callers
10522 changed.
10523
10524 * expr.c (build_java_athrow): Change return type to void.
10525 (java_lang_expand_expr): Make sure each case in switch returns a
10526 value.
10527
10528 * java-tree.h (finish_class): Fix prototype to take void args.
10529
10530 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
10531 (main): Issue return from main, not exit.
10532
10533 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
10534
10535 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
10536
10537 * jv-scan.c (main): Issue return from main, not exit.
10538
10539 * parse.y (check_abstract_method_definitions,
10540 java_check_abstract_method_definitions): Add static prototypes.
10541 (java_complete_expand_methods): Fix call to `finish_class'.
10542
10543 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
10544 and `prevpc'.
10545
10546 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10547
10548 * lang.c (language_string): Constify.
10549
10550 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10551
10552 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
10553 Remove hacks for stuff which comes from libiberty.
10554
10555 * Make-lang.in: Likewise.
10556
10557 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
10558
10559 * Makefile.in (xref.o): Depend on xref.c explicitly.
10560
10561 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10562
10563 * java-tree.h (lang_printable_name): Constify a char*.
10564
10565 * lang.c (lang_printable_name): Likewise.
10566
10567 1999-08-27 Jeffrey A Law (law@cygnus.com)
10568
10569 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
10570 comments in C code.
10571
10572 1999-08-26 Tom Tromey <tromey@cygnus.com>
10573
10574 * gjavah.c (print_cxx_classname): Print "::" before qualified
10575 name.
10576
10577 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
10578
10579 * parse.y (lookup_cl): Changed leading comment. Now does its best
10580 to set the column number.
10581 (qualify_ambiguous_name): Take WFL wrappers into account.
10582
10583 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
10584
10585 * verify.c (verify_jvm_instructions): Don't check instruction
10586 validity beyond end of method.
10587
10588 1999-08-25 Tom Tromey <tromey@cygnus.com>
10589
10590 * jvspec.c (lang_specific_driver): Correctly handle --help again.
10591
10592 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10593
10594 * gjavah.c (print_name, print_base_classname, utf8_cmp,
10595 cxx_keyword_subst, generate_access, name_is_method_p,
10596 get_field_name, print_field_name, super_class_name, print_include,
10597 decode_signature_piece, print_class_decls, usage, help,
10598 java_no_argument, version, add_namelet, print_namelet): Add static
10599 prototype.
10600 (print_base_classname, utf8_cmp, cxx_keyword_subst,
10601 name_is_method_p): Constify a char*.
10602 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
10603 Provide a final else clause in an if-else-if.
10604 (print_field_info): Add missing final arg in function call to
10605 `print_field_name'.
10606 (print_method_info, decompile_method, decode_signature_piece,
10607 print_c_decl, print_full_cxx_name, print_stub,
10608 print_mangled_classname, super_class_name, print_include,
10609 add_namelet, add_class_decl, print_class_decls, process_file,
10610 help): Constify a char*.
10611
10612 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
10613 push_int_const, find_constant_wide, find_constant_index,
10614 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
10615 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
10616 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
10617 emit_if, emit_goto, emit_jsr, call_cleanups,
10618 make_class_file_name): Add static prototypes.
10619 (generate_bytecode_return, generate_bytecode_insns): Pass a
10620 NULL_PTR, not a NULL_TREE.
10621
10622 * jv-scan.c: Include "jcf.h".
10623 (main): Declare using DEFUN macro.
10624
10625 * jvspec.c (find_spec_file, lang_specific_pre_link,
10626 lang_specific_driver): Add prototypes.
10627 (find_spec_file): Constify a char*.
10628
10629 * keyword.gperf (hash, java_keyword): Add prototypes.
10630
10631 * lang.c (lang_print_error): Add static prototype.
10632 (lang_init): Prefer memcpy over bcopy to avoid casts.
10633
10634 * lex.c (yylex): Add static prototype.
10635
10636 * parse-scan.y: Include "lex.c" earlier.
10637
10638 * parse.h: Remove redundant declaration for `yylex'.
10639
10640 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
10641 labeled_block_contains_loop_p): Add static prototypes.
10642 (not_accessible_p): Make static to match prototype.
10643
10644 * verify.c (start_pc_cmp): Don't needlessly cast away const.
10645
10646 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10647
10648 * parse.y (check_method_redefinition): Changed leading comment.
10649 (check_abstract_method_definitions): New function.
10650 (java_check_abstract_method_definitions): New function.
10651 (java_check_regular_methods): Call it.
10652 (verify_constructor_super): Fixed indentation.
10653 (lookup_method_invoke): Likewise.
10654
10655 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
10656
10657 * parse.y (method_header): Return a null pointer if the current
10658 class node is null.
10659 (finish_method_declaration): Return if the current function decl
10660 is null.
10661 (source_start_java_method): Likewise.
10662 (java_method_add_stmt): Likewise.
10663
10664 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
10665
10666 * class.c (emit_register_class): Removed unnecessary call to
10667 start_sequence.
10668 * parse.y (labeled_block_contains_loop_p): Removed unused local
10669 variable.
10670
10671 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10672
10673 * parse.y (java_refold): Added prototype.
10674
10675 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10676
10677 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
10678 (java_stabilize_reference): Removed unnecessary `else'.
10679 (java_complete_lhs): Set flag to remember boolean. Call
10680 java_refold. Added comments.
10681 (java_decl_equiv): New function.
10682 (binop_compound_p): Likewise.
10683 (java_refold): Likewise.
10684 (patch_unaryop): Striped static field access assigned to decl and
10685 op. Changed promotion scheme for ++/-- operators.
10686 (search_loop): New function.
10687 (labeled_block_contains_loop_p): Likewise.
10688 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
10689 comment.
10690 (patch_bc_statement): Call search_loop. Fixed comment.
10691
10692 1999-08-14 Anthony Green <green@cygnus.com>
10693
10694 * expr.c (java_lang_expand_expr): Mark static array data as
10695 referenced.
10696
10697 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10698
10699 * jvgenmain.c (main): NUL-terminate name_obstack.
10700
10701 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10702
10703 * check-init.c (check_bool2_init, done_alternative): Add static
10704 prototypes.
10705
10706 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
10707 (add_method, build_utf8_ref, build_class_ref,
10708 append_gpp_mangled_type, layout_class_method): Constify a char*.
10709
10710 * decl.c (push_promoted_type, make_binding_level): Add static
10711 prototypes.
10712 (push_promoted_type, pushdecl): Constify a char*.
10713
10714 * except.c (find_handler_in_range, link_handler,
10715 check_start_handlers): Add static prototypes.
10716
10717 * expr.c (process_jvm_instruction): Constify a char*.
10718
10719 * gjavah.c (main): Constify a char*.
10720
10721 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
10722 Constify a char*.
10723
10724 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
10725 static prototypes.
10726 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
10727 munge, print_ents): Constify a char*.
10728
10729 * jcf-dump.c (disassemble_method): Constify a char*.
10730 (print_constant_pool, print_exception_table): Add static prototypes.
10731 (print_constant, print_exception_table, main, disassemble_method):
10732 Constify a char*.
10733
10734 * jcf-io.c (find_classfile, find_class): Likewise.
10735
10736 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
10737 (set_source_filename, predefined_filename_p): Add static prototypes.
10738 (set_source_filename, get_constant, get_class_constant,
10739 find_in_current_zip): Constify a char*.
10740
10741 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
10742 static prototypes.
10743 (add_entry, add_path, jcf_path_classpath_arg,
10744 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10745
10746 * jcf-reader.c (get_attribute, jcf_parse_preamble,
10747 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
10748 jcf_parse_one_method, jcf_parse_methods,
10749 jcf_parse_final_attributes): Add static prototypes.
10750 (get_attribute): Constify a char*.
10751
10752 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
10753 jcf_dependency_add_target, jcf_path_classpath_arg,
10754 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10755
10756 * jv-scan.c (main): Constify a char*.
10757 (gcc_obstack_init): Add prototype arguments.
10758
10759 * jvgenmain.c (gcc_obstack_init): Likewise.
10760 (main): Constify a char*.
10761
10762 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
10763 static prototypes.
10764 (put_decl_string, lang_print_error): Constify a char*.
10765 (lang_init): Remove redundant extern prototype.
10766
10767 * mangle.c (emit_unicode_mangled_name): Constify a char*.
10768
10769 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
10770 Add static prototypes.
10771 (get_type_from_signature): Constify a char*.
10772
10773 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
10774 Add static prototypes.
10775 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
10776 (verify_jvm_instructions): Constify a char*.
10777
10778 * xref.c (xref_flag_value): Likewise.
10779
10780 * xref.h (xref_flag_value): Likewise.
10781
10782 * zextract.c (makeword, makelong): Add static prototypes.
10783 (makeword, makelong): Constify a uch*.
10784
10785 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10786
10787 * lang.c (java_dummy_print): Constify a char*.
10788 (lang_print_error): Likewise.
10789 (lang_init): Remove redundant prototype for `print_error_function'.
10790 (lang_init_source): Likewise.
10791 (lang_identify): Constify a char*.
10792
10793 1999-08-09 Tom Tromey <tromey@cygnus.com>
10794
10795 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
10796 (WORDS_TO_LONG): Likewise.
10797 (WORDS_TO_DOUBLE): Likewise.
10798
10799 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10800
10801 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
10802
10803 * expr.c (java_stack_pop, java_array_data_offset,
10804 build_java_throw_out_of_bounds_exception, case_identity,
10805 build_java_check_indexed_type): Add static prototypes.
10806 (linenumber_table, expand_invoke, expand_java_field_op,
10807 build_primtype_type_ref, expand_byte_code): Constify a char*.
10808
10809 * java-tree.h (build_primtype_type_ref, linenumber_table):
10810 Constify a char*.
10811 (java_lang_expand_expr): Add prototype.
10812
10813 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
10814 `java_lang_expand_expr'.
10815
10816 * lex.c (java_lex_error): Constify a char*.
10817 (java_get_unicode, java_read_char, java_allocate_new_line,
10818 java_unget_unicode, java_sneak_unicode): Prototype.
10819
10820 * parse-scan.y (current_class, package_name, method_declarator,
10821 report_class_declaration, yyerror): Constify a char*.
10822
10823 * parse.h (java_report_errors): Prototype.
10824 (yyerror): Constify a char*.
10825
10826 * parse.y (classitf_redefinition_error, check_modifiers,
10827 parse_jdk1_1_error, lookup_package_type,
10828 lookup_package_type_and_set_next, get_printable_method_name,
10829 purify_type_name): Constify a char*.
10830 (build_super_invocation, maybe_generate_finit,
10831 verify_constructor_super, parser_add_interface,
10832 add_superinterfaces, jdep_resolve_class, note_possible_classname,
10833 java_complete_expand_methods, java_expand_finals,
10834 cut_identifier_in_qualified, java_stabilize_reference,
10835 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
10836 merge_string_cste): Prototype.
10837 (single_type_import_declaration, yyerror,
10838 variable_redefinition_error, build_array_from_name,
10839 build_unresolved_array_type, check_class_interface_creation,
10840 resolve_class, complete_class_report_errors,
10841 note_possible_classname, read_import_dir,
10842 find_in_imports_on_demand, resolve_package, fix_constructors,
10843 check_deprecation, lookup_method_invoke,
10844 maybe_build_primttype_type_ref, array_constructor_check_entry):
10845 Constify a char*.
10846 (java_complete_expand_methods, java_expand_finals): Make static.
10847 (convert_narrow): Remove static prototype.
10848
10849 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
10850
10851 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
10852
10853 1999-08-02 Richard Henderson <rth@cygnus.com>
10854
10855 * decl.c: Include defaults.h instead of expr.h.
10856 * parse.y: Likewise.
10857
10858 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
10859
10860 * java/decl.c (start_java_method): Change all uses of
10861 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
10862 Ensure expr.h is included.
10863 * java/expr.c (pop_arguments): Ditto.
10864 * java/parse.y (expand_start_java_method): Ditto.
10865
10866 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10867
10868 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
10869
10870 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
10871
10872 * decl.c: Include "function.h".
10873 * except.c: Likewise.
10874 * parse.y: Likewise.
10875 * Makefile.in: Update dependencies.
10876
10877 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10878
10879 * expr.c (build_java_soft_divmod): Provide a default case in switch.
10880 (java_lang_expand_expr): Mark parameters `target', `tmode' and
10881 `modifier' with ATTRIBUTE_UNUSED.
10882
10883 * gjavah.c (process_file): Add braces around ambiguous `else'.
10884
10885 * jcf-dump.c (print_access_flags, localvar_free): Change return
10886 type to void.
10887
10888 * parse.y (java_complete_expand_method): Initialize variable
10889 `exception_copy'.
10890 (resolve_qualified_expression_name): Likewise for `field_decl'.
10891 (patch_method_invocation): Likewise for `class_to_search'.
10892 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
10893 (patch_assignment): Likewise for `lhs_type'.
10894
10895 * verify.c (verify_jvm_instructions): Remove unused variable
10896 `caller'.
10897
10898 1999-07-25 Richard Henderson <rth@cygnus.com>
10899
10900 * decl.c (va_list_type_node): New.
10901
10902 1999-07-25 Anthony Green <green@cygnus.com>
10903
10904 * gjavah.c (print_stub): New function.
10905 (METHOD_IS_NATIVE): New macro.
10906 (print_mangled_classname): Make static.
10907 (HANDLE_END_FIELD): Don't emit fields during stub generation.
10908 (process_file): Perform stub generation.
10909 (HANDLE_METHOD): Don't emit class decls during stub
10910 generation.
10911 (HANDLE_END_METHOD): Take into account stub generation.
10912 (print_method_info): Handle stub generation.
10913 (print_stub): New function.
10914 (print_cxx_classname): Make signature consistant with others.
10915 (help): Describe -stubs option.
10916 (main): Create stub file.
10917 (version): Use version.c.
10918 (print_full_cxx_name): New function.
10919 (print_c_decl): Use print_full_cxx_name.
10920
10921 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10922
10923 * check-init.c (check_init): Handle MAX_EXPR.
10924
10925 1999-07-15 Andrew Haley <aph@cygnus.com>
10926
10927 * lang.c (flag_use_divide_subroutine): New variable.
10928 * typeck.c: (convert_ieee_real_to_integer): Bounds check
10929 fp-to-integer conversion.
10930 (convert): Call convert_ieee_real_to_integer when flag_fast_math
10931 is not set.
10932
10933 * expr.c (build_java_soft_divmod): New function.
10934 (build_java_binop): Call build_java_soft_divmod if
10935 flag_use_divide_subroutine is set.
10936 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10937 soft_lrem_node: new builtin functions.
10938 (init_decl_processing) Initialize the new builtins.
10939 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10940 soft_lrem_node: new builtin functions.
10941 (build_java_soft_divmod): New function.
10942 * parse.y: Call build_java_soft_divmod if
10943 flag_use_divide_subroutine is set.
10944 * parse.c: Rebuilt.
10945
10946 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
10947 a --specs= arg) even if not linking.
10948 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
10949 -fuse-divide-subroutine
10950
10951 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
10952
10953 * parse.y (resolve_and_layout): Check methods only once.
10954 (resolve_qualified_expression_name): Verify thrown exceptions
10955 compatibility.
10956 (check_thrown_exceptions): Reject exceptions thrown in
10957 initializer. Error message tuned.
10958
10959 1999-07-14 Andrew Haley <aph@cygnus.com>
10960
10961 * expr.c (expand_expr): Do not return the last statement in a
10962 block as the block's value.
10963
10964 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
10965
10966 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
10967 CALL_EXPR, to avoid order of evaluation changes.
10968
10969 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
10970
10971 * parse.y (qualify_ambiguous_name): Do not use
10972 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
10973
10974 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10975
10976 * check-init.c (check_init): Handle MAX_EXPR.
10977 * expr.c (force_evaluation_order): Force method call arguments to
10978 be evaluated in left-to-right order.
10979 * parse.y (qualify_ambiguous_name): Loop again to qualify
10980 NEW_ARRAY_EXPR properly.
10981
10982 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
10983
10984 * parse.y (patch_invoke): Resolve unresolved invoked method
10985 returned type.
10986 (qualify_ambiguous_name): STRING_CST to qualify expression for
10987 type name resolution.
10988
10989 1999-06-24 Andrew Haley <aph@cygnus.com>
10990
10991 * class.c (finish_class): Whenever a deferred method is
10992 output, rescan the list of methods to see if a new candidate for
10993 output can be found.
10994
10995 1999-06-28 Tom Tromey <tromey@cygnus.com>
10996
10997 * jvspec.c (lang_specific_driver): Recognize --help.
10998
10999 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11000
11001 * parse.y (resolve_package): Fixed bogus return statement.
11002 (patch_method_invocation): Resolve method invocation beginning with
11003 a package name qualifier.
11004
11005 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11006
11007 * Make-lang.in (java.stage1): Depend on stage1-start.
11008 (java.stage2): Likewise for stage2-start.
11009 (java.stage3): Likewise for stage3-start.
11010 (java.stage4): Likewise for stage4-start.
11011
11012 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11013
11014 * parse.y (java_complete_lhs): When doing cross referencing, don't
11015 try to keep file location on a WFL expanded as a CALL_EXPR.
11016
11017 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11018
11019 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
11020 compiling to class file a void method with an empty method body.
11021 As a side effect, the bytecode backend will generate the
11022 appropriate `return' instruction.
11023
11024 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11025
11026 * parse.y (lookup_package_type_and_set_next): New function prototype.
11027 (resolve_package): Search current and imported packages.
11028 (lookup_package_type_and_set_next): New function.
11029
11030 1999-06-22 Andrew Haley <aph@cygnus.com>
11031
11032 * verify.c (verify_jvm_instructions): Check for pending blocks
11033 before invalid PC test and opcode switch, not after.
11034
11035 1999-06-21 Andrew Haley <aph@cygnus.com>
11036
11037 * except.c (find_handler_in_range): The upper limit for exception
11038 ranges is exclusive, not inclusive: (start <= pc < end).
11039 (link_handler): find child pointer which points to outer by
11040 searching sibling list: previous code incorrectly assumed that
11041 outer->outer->first_child must point to outer.
11042 * verify.c (verify_jvm_instructions): FIXME added to code for
11043 `athrow'.
11044 (verify_jvm_instructions): Do not assume that the last block
11045 processed in a subroutine is a block which ends with a `ret'
11046 instruction. With some control flows it is possible that the last
11047 block ends with an `athrow'.
11048
11049 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11050
11051 * parse.y (qualify_ambiguous_name): Reorganized the post
11052 evaluation of non WFL leading expression nodes.
11053
11054 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11055
11056 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
11057 CONVERT_EXPR.
11058
11059 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11060
11061 * parse.y (qualify_ambiguous_name): Handle qualified expression
11062 beginning with a STRING_CST.
11063
11064 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11065
11066 * parse.y (register_fields): Set DECL_INITIAL on both
11067 pre-initialized static and public fields.
11068 (resolve_field_access): Static field access expressions to always
11069 use pointer types.
11070 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
11071 qualification. CONVERT_EXPR to be resolved as an expression name.
11072 (java_complete_lhs): Identify and access qualified final
11073 initialized field in switch statement case expression.
11074 (fold_constant_for_init): Pre-initialized field decl constant to
11075 be folded.
11076
11077 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11078
11079 * parse.y (note_possible_classname): Mark returned node with
11080 QUALIFIED_P only if the original class name contained a '/'.
11081
11082 1999-06-05 Anthony Green <green@cygnus.com>
11083
11084 * Make-lang.in (gcjh): More parallel build fixes.
11085
11086 1999-06-03 Mike Stump <mrs@wrs.com>
11087
11088 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
11089
11090 1999-06-02 Anthony Green <green@cygnus.com>
11091
11092 * except.c (link_handler): Chain exception handlers in order.
11093
11094 1999-06-02 Anthony Green <green@cygnus.com>
11095
11096 * expr.c (expand_byte_code): Fill unreachable bytecode regions
11097 with nops and process as usual in order to always set correct EH
11098 ranges. Emit detailed warnings about unreachable bytecodes.
11099
11100 1999-06-02 Anthony Green <green@cygnus.com>
11101
11102 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
11103 constant.
11104
11105 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
11106
11107 * parse.y (lookup_field_wrapper): Unified returned value to NULL
11108 or the searched field decl.
11109
11110 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
11111
11112 * parse.y (fold_constant_for_init): Convert numerical constant
11113 values to the type of the assigned field.
11114
11115 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11116
11117 * expr.c (lookup_field): Relaxed the test on class loading error
11118 detection.
11119 * parse.y (fold_constant_for_init): Enabeled old code.
11120
11121 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
11122
11123 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
11124 decide the validity of the cast of a java.lang.Cloneable reference
11125 to an array.
11126 (patch_conditional_expr): Fixed first argument passed to
11127 binary_numeric_promotion.
11128
11129 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
11130
11131 * parse.y (qualify_ambiguous_name): Take into account that a
11132 CONVERT_EXPR might specify a type as a WFL.
11133
11134 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11135
11136 * parse.y (patch_assignment): Save the rhs before using it as an
11137 argument to _Jv_CheckArrayStore.
11138
11139 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11140
11141 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
11142
11143 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11144
11145 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
11146 floating point literal only when the exponent indicator has been
11147 parsed.
11148
11149 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11150
11151 * parse.y (formal_parameter:): Construct argument tree list
11152 element even if a yet unsupported final parameter was encountered.
11153
11154 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
11155
11156 * parse.y (finish_method_declaration): Issue errors for native or
11157 abstract methods declared with a method body, as well as for non
11158 native or non abstract methods with no method body.
11159
11160 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11161
11162 * class.c (build_utf8_ref): Initialize variable `field'.
11163
11164 * decl.c (init_decl_processing): Initialize variable `field'.
11165
11166 * expr.c (build_known_method_ref): Mark parameters `method_type',
11167 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
11168 (process_jvm_instruction): Likewise for parameter `length'.
11169
11170 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
11171 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
11172 ATTRIBUTE_UNUSED.
11173
11174 * parse.y (maybe_generate_clinit): Remove unused variable
11175 `has_non_primitive_fields'.
11176 (find_in_imports_on_demand): Initialize variables `node_to_use'
11177 and `cl'.
11178 (patch_binop): Likewise for variable `prom_type'.
11179 (patch_unaryop): Likewise for variable `prom_type'.
11180
11181 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
11182
11183 * xref.c (xref_table): Add missing initializer.
11184
11185 1999-05-14 Tom Tromey <tromey@cygnus.com>
11186
11187 * java-except.h (struct eh_range): Removed unused `next' member.
11188 * verify.c (verify_jvm_instructions): Call check_nested_ranges
11189 after adding all exception handlers. Sort exception ranges in
11190 order of start PC.
11191 (struct pc_index): New structure.
11192 (start_pc_cmp): New function.
11193 * except.c (add_handler): Return `void'. Don't call link_handler;
11194 instead construct an ordinary linked list and do range
11195 coalescing.
11196 (check_nested_ranges): New function.
11197 (link_handler): Changed interface to allow merging of eh_ranges.
11198 Split overlapping ranges. Return `void'.
11199
11200 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11201
11202 * parse.y (constructor_block_end:): New rule, tagged <node>.
11203 (constructor_body:): Use `constructor_block_end' instead of
11204 `block_end'.
11205
11206 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11207
11208 * parse.y (statement_nsi:): Pop `for' statement block.
11209 (java_complete_lhs): Labeled blocks containing no statement are
11210 marked as completing normally.
11211
11212 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11213
11214 * xref.c (xref_set_current_fp): New function, defined.
11215 * xref.h (xref_set_current_fp): New function, prototyped.
11216
11217 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11218
11219 * check-init.c (check_init): Take into account that
11220 LABELED_BLOCK_STMT can be empty.
11221
11222 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11223
11224 * parse.y (java_check_regular_methods): Warning check on not
11225 overriding methods with default access in other packages does not
11226 apply to `<clinit>'.
11227 (java_complete_lhs): If block body is an empty_stmt_node, replace
11228 it by NULL_TREE. This prevents gcc from generating an irrelevant
11229 warning.
11230
11231 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11232
11233 * check-init.c (check_init): Removed code accepting to see things
11234 falling through default:, when doing xrefs.
11235 * java-tree.h (do_not_fold): New global variable, declared.
11236 * parse.y (do_not_fold): New global variable, defined.
11237 (java_complete_expand_method): Set `do_not_fold' to the value of
11238 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
11239 and reinstall them after them have been purged; do not check for
11240 initializations; do not issue missing return errors.
11241 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
11242 when doing xrefs.
11243 (patch_binop): Skip the fold part when doing xrefs.
11244 (build_string_concatenation): Skip the concatenation part when
11245 doing xrefs.
11246 (patch_synchronized_statement): Do not generate a try-finally when
11247 doing xrefs.
11248 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
11249 and keep the location where the throw was seen.
11250 * typeck.c (convert): When `do_not_fold' is set, do not attempt
11251 any treatment on the converted node an simply return a NOP_EXPR of
11252 the targeted type.
11253 * xref.c (xref_get_data): New function, defined.
11254 * xref.h (xref_get_data): New function, declared.
11255 (XREF_GET_DATA): Use xref_get_data.
11256
11257 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11258
11259 * gjavah.c (print_include): Cast the result of `strlen' to int
11260 when comparing against a signed value.
11261 (add_namelet): Likewise.
11262
11263 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11264
11265 * expr.c (expand_invoke): Mark parameter `nargs' with
11266 ATTRIBUTE_UNUSED.
11267 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
11268
11269 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
11270 ATTRIBUTE_UNUSED.
11271
11272 * jcf-reader.c (get_attribute): Cast a value to long
11273 when comparing against a signed expression. Likewise.
11274
11275 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
11276 HOST_BITS_PER_CHAR.
11277
11278 1999-05-11 Andrew Haley <aph@cygnus.com>
11279
11280 * parse.y (source_end_java_method): If the current method contains
11281 any exception handlers, force asynchronous_exceptions: this is
11282 necessary because signal handlers in libjava may throw exceptions.
11283 * decl.c (end_java_method): Ditto.
11284
11285 1999-05-11 Tom Tromey <tromey@cygnus.com>
11286
11287 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
11288 flags.
11289 * jvspec.c (THREAD_NAME): Removed.
11290 (GC_NAME): Likewise.
11291 (MATHLIB): Likewise.
11292 (WITHLIBC): Likewise.
11293 (GCLIB): Likewise.
11294 (THREADLIB): Likewise.
11295 (MATH_LIBRARY): Likewise.
11296 (lang_specific_driver): Don't add `-l' options to command line.
11297 Instead, add a single --specs option. Recognize `-L' options and
11298 use them to search for spec file.
11299 (find_spec_file): New function.
11300 (SPEC_FILE): New define.
11301
11302 1999-05-11 Dave Brolley <brolley@cygnus.com>
11303
11304 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
11305 cpplib-enabled build.
11306
11307 1999-05-05 Per Bothner <bothner@cygnus.com>
11308
11309 * class.c (make_field_value): DECL_INITIAL may be a string literal;
11310 temporarily zero it while calling rest_of_decl_compilation.
11311
11312 * java-tree.h (string_ptr_type_node): Add declaration.
11313 * decl.c: Define and initialize string_ptr_type_node.
11314 * parse.y (patch_string_cst): Use string_ptr_type_node.
11315
11316 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
11317 * parse.y (for_statement): Now unconditionally exit_block.
11318 (finish_labeled_statement): No longer exit_block if for-loop.
11319 (patch_loop_statement): Check harder if the loop is already labeled.
11320
11321 * parse.y (patch_initialized_static_field): Removed function.
11322 (maybe_generate_clinit): Removed special handling for interfaces.
11323 (java_complete_expand_methods): Do a preliminary java_complete_tree
11324 on <clinit> to determine if it can be removed.
11325 (java_complete_expand_method): Remove special handling for <clinit>.
11326 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
11327 optimize if we get back empty_stmt_node.
11328 For MODIFY_EXPR, re-do checking of static initializers.
11329 (fold_constant_for_init): Don't return immediate if VAR_DECL.
11330 For VAR_DECL, pass correct context.
11331
11332 * verify.c (verify_jvm_instructions): Better error messages.
11333
11334 1999-05-03 Tom Tromey <tromey@cygnus.com>
11335
11336 * parse-scan.y (interface_declaration): Call
11337 report_class_declaration for interfaces.
11338
11339 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
11340
11341 * Makefile.in: Remove -v from bison command lines.
11342
11343 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11344
11345 * check-init.c (check_init): Exclude a case of error when doing
11346 xrefs.
11347 * class.c (layout_class_method): Don't generate the error message
11348 twice when compiling from source.
11349 * lang-options.h: Added `-Wredundant-modifers' and
11350 `-Wunusupported-jdk11' flags and help text.
11351 * lang.c (lang_decode_option): Added support for
11352 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
11353 flag_static_local_jdk11 and flag_redundant set accordingly.
11354 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
11355 * parse.h (EXPR_WFL_ADD_COL): New macro.
11356 (DECL_END_SOURCE_LINE): Likewise.
11357 (DECL_INHERITED_SOURCE_LINE): Likewise.
11358 * parse.y (static_ref_err): New function, prototyped.
11359 (CCB_TK): Now tagged <operator>.
11360 (class_body:): Remember the location of the closing '}' of a class
11361 definition when doing xrefs.
11362 (block:): Likewise.
11363 (block_end:): Likewise.
11364 (create_class): Remember the location of the inherited class
11365 identifier when doing xrefs.
11366 (register_fields): Added test on first operand of `init' before
11367 testing it TREE_CODE.
11368 (method_header): Store the location of the class identifier in the
11369 class decl when doing xrefs.
11370 (finish_method_declaration): Don't combine first/last method line
11371 when doing xref.
11372 (java_check_regular_methods): Warning check on not overriding
11373 methods with default access on other packages move before check on
11374 static methods. Initialization of `aflags' also moved up.
11375 (resolve_expression_name): Call static_ref_err to report the error.
11376 (static_ref_err): New function, implemented.
11377 (resolve_field_access): Returned simplified static field access
11378 when doing xrefs.
11379 (resolve_qualified_expression_name): Check for illegal use of
11380 static fields in a non static context. Call static_ref_err to
11381 report error in various places.
11382 (java_complete_tree): Do not fold initialized static fields when
11383 doing xrefs.
11384 (java_complete_lhs): Likewise.
11385
11386 1999-04-29 Anthony Green <green@cygnus.com>
11387
11388 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
11389 create internal labels.
11390 (lookup_label): Ditto.
11391
11392 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11393
11394 * class.c (layout_class_method): Generate <clinit>'s rtl for
11395 interfaces.
11396 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
11397 for interfaces' <clinit>.
11398 * expr.c (lookup_field): Search for fields in interfaces.
11399 (expand_invoke): Fixed indentation.
11400 (expand_java_field_op): Likewise. Use IS_CLINIT.
11401 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
11402 (IS_CLINIT): New macro.
11403 * parse.y (type_declaration:): Call maybe_generate_clinit after an
11404 interface was parsed.
11405 (maybe_generate_clinit): Don't generate if the current class is an
11406 interface with only fields of primitive types.
11407 (reset_method_name): Use IS_CLINIT.
11408 (java_complete_expand_method): Expand <clinit> when it exists for
11409 interfaces. Use IS_CLINIT.
11410 (resolve_expression_name): Use DECL_CONTEXT instead of
11411 current_class to build static field references.
11412 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
11413 ARRAY_REF when doing xreferencing.
11414 (check_final_assignment): Fixed typo in leading comment. Use
11415 IS_CLINIT.
11416 (patch_array_ref): Don't fully expand array references when
11417 xreferencing.
11418 (patch_return): Use IS_CLINIT.
11419 (patch_throw_statement): Likewise.
11420
11421 1999-04-22 Tom Tromey <tromey@cygnus.com>
11422
11423 * Make-lang.in (JAVA_SRCS): Added check-init.c.
11424
11425 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
11426
11427 * decl.c (predef_filenames, predef_filenames_size): New globals
11428 (init_decl_processing): predef_filenames and predef_filenames_size
11429 initialized.
11430 * java-tree.h (predef_filenames, predef_filenames_size): Declared
11431 extern.
11432 * jcf-parse.c (predefined_filename_p): New function.
11433 (yyparse): Check that files on the command line are specified only
11434 once and issue a warning otherwise.
11435 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
11436 * parse.y (source_end_java_method): Nullify NOP method bodies, to
11437 avoid a gcc warning with -W -Wall turned on.
11438 (java_expand_classes): Abort if errors were encountered.
11439 (java_complete_lhs): If the cross reference flag is set, wrap
11440 field DECL node around a WFL when resolving expression name.
11441
11442 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11443
11444 * lang.c (lang_decode_option): Fixed returned value when parsing
11445 `-fxref=...' and `-Wall'.
11446 * parse.y (source_end_java_method): Do not generate code when
11447 flag_emit_xref is set.
11448 (resolve_expression_name): Do not build static field access when
11449 flag_emit_xref is set.
11450 (resolve_field_access): No special treatment on `length' when
11451 flag_emit_xref is set. Do not build qualified static field access
11452 when flag_emit_xref is set.
11453 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
11454 when flag_emit_xref is set.
11455 (patch_assignment): Do not generate array store runtime check when
11456 flag_emit_xref is set.
11457 * xref.c (xref_flag_value): Fixed function declaration
11458 indentation.
11459 (xset_set_data): New function.
11460 * xref.h (xref_set_data): Added prototype for new function.
11461 (typedef struct xref_flag_table): New field data.
11462 (XREF_GET_DATA): New macro.
11463
11464 1999-04-19 Tom Tromey <tromey@cygnus.com>
11465
11466 * xref.h (enum): Removed trailing comma.
11467
11468 * parse.y (resolve_qualified_expression_name): Added missing
11469 `break'.
11470
11471 1999-04-15 Anthony Green <green@cygnus.com>
11472
11473 * gjavah.c: New prototypes for java_float_finite and
11474 java_double_finite.
11475
11476 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11477
11478 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
11479 references.
11480
11481 1999-04-06 Jeffrey A Law (law@cygnus.com)
11482
11483 * Makefile.in (TREE_H): Add tree-check.h.
11484 (RTL_H): Add genrtl.h.
11485
11486 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11487
11488 * parse.y (patch_assignment): Added ArrayStoreException runtime
11489 check.
11490
11491 1999-04-06 Per Bothner <bothner@cygnus.com>
11492
11493 * expr.c (pop_type_0): New function.
11494 (pop_type): Use pop_type_0.
11495 * java-tree.h (pop_type_0): New declaration.
11496 * verify.c (verify_jvm_instructions): Check return instructions.
11497
11498 * parse.y (patch_binop): Don't fold if non-constant and emiting
11499 class files.
11500
11501 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11502
11503 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
11504
11505 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
11506 (main_jcf): Don't define.
11507 (process_file): Don't set `main_jcf'.
11508
11509 * java-tree.h (main_jcf): Don't declare.
11510
11511 * jcf-parse.c (main_jcf): Add static definition.
11512
11513 * lang.c (main_jcf): Don't define.
11514
11515 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11516
11517 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
11518
11519 * decl.c (copy_lang_decl): Likewise for `bcopy'.
11520
11521 * jcf-depend.c: Include "config.h", not <config.h>.
11522
11523 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
11524 `bcopy' to PTR.
11525
11526 * jcf-path.c: Include "config.h", not <config.h>.
11527
11528 * lex.c: Don't include various system header files.
11529 (java_init_lex): Cast the argument of `bzero' to PTR
11530
11531 * parse-scan.y (java_push_parser_context): Likewise.
11532
11533 * parse.y (java_push_parser_context): Likewise.
11534 (patch_bc_statement): Match format specifier to variable argument.
11535
11536 * xref.c: Don't include <stdio.h>.
11537
11538 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11539
11540 * parse.y (struct parser_ctxt *ctxp): Now global.
11541 (declare_local_variables): Use WFL compound value for the
11542 declaration source line value, when doing cross-referencing.
11543
11544 1999-03-31 Tom Tromey <tromey@cygnus.com>
11545
11546 * gjavah.c (print_field_info): Allow constants of other types.
11547 (print_include): Generate include when new name is proper prefix
11548 of already printed name.
11549 (add_namelet): Likewise.
11550 (cxx_keyword_subst): New function.
11551 (print_method_info): Use it.
11552 (print_field_name): New function.
11553 (get_field_name): New function.
11554 (print_field_info): Use get_field_name and print_field_name.
11555
11556 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11557
11558 * Makefile.in (keyword.h): Generate using gperf language 'C', not
11559 'KR-C', so gperf uses the `const' keyword on strings.
11560
11561 * keyword.gperf (java_keyword): Const-ify a char*.
11562
11563 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11564
11565 * parse.y (patch_bc_statement): Fixed identation and a bogus
11566 `printf' format.
11567
11568 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11569
11570 * parse.y (patch_assignment): Allow static variables in other
11571 classes to be assigned.
11572
11573 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11574
11575 * class.c (maybe_add_interface): Remove unused variable
11576 `interface_binfo'.
11577 (make_class_data): Use = for assignment, not ==. Likewise.
11578 (emit_register_classes): Remove unused variable `decl'.
11579
11580 * lex.c: Fix comment so as not to contain an embedded `/*'.
11581
11582 * verify.c (verify_jvm_instructions): Remove unused variable
11583 `self_type'.
11584
11585 1999-03-27 Per Bothner <bothner@cygnus.com>
11586
11587 * parse.y (complete_loop_body): Rename to finish_loop_body.
11588 (complete_labeled_statement): Rename to finish_labeled_statement.
11589 (complete_for_loop): Rename to finish_for_loop.
11590 (complete_method_declaration): Rename to finish_method_declaration.
11591
11592 * java-tree.h (continue_identifier_node): New global node.
11593 * decl.c: Define and initialize continue_identifier_node.
11594 * parse.y (generate_labeled_block): Remove - no longer needed.
11595 (build_loop_body): Use continue_identifier_node for continue block.
11596 (finish_labeled_statement): Also do pop_labeled_block actions.
11597 (java_complete_lhs): POP_LOOP even if error.
11598 (build_labeled_block): Special handling for continue_identifier_node.
11599 (patch_loop_statement): Re-organize.
11600 (patch_bc_statement): Re-write.
11601
11602 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11603
11604 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
11605 using a WFL compound value.
11606 * parse.y (xref.h): Include.
11607 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
11608 WFL compound value.
11609 (register_fields): Set WFL compound value to lineno if doing
11610 xrefs.
11611 (java_complete_expand_method): Call expand_xref if flag_emit_xref
11612 is set.
11613 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
11614 * xref.h (expand_xref): Prototype renamed from xref_generate.
11615
11616 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11617
11618 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
11619 (GET_CURRENT_BLOCK): New macro.
11620 * parse.y (current_static_block): New global variable.
11621 (method_body:): Define action.
11622 (complete_method_declaration): Set current_function_decl to NULL
11623 when work on the current method is done.
11624 (declare_local_variables): Use GET_CURRENT_BLOCK.
11625 (java_method_add_stmt): Likewise.
11626 (java_complete_expand_method): Disable the use of `this' when
11627 expanding <clinit>.
11628 (enter_a_block): If no current method exist, use
11629 current_static_block to link static initializer blocks.
11630 (exit_block): Rewritten to use current_static_block when no current
11631 method decl exists.
11632 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
11633 (patch_return): Forbid the use of `return' in static initializers.
11634 (patch_throw_statement): Fixed indentation. Issue specific error
11635 for uncaught thrown checked exception in static initializer
11636 blocks. Removed FIXME.
11637
11638 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
11639
11640 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
11641 Link gcj from gcc.o.
11642
11643 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11644
11645 * parse.y (find_applicable_accessible_methods_list): When dealing
11646 with interface: ensure that a given interface or java.lang.Object
11647 are searched only once.
11648
11649 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11650
11651 * gjavah.c (print_c_decl): Remove unused argument `flags'.
11652
11653 * jcf-dump.c (print_access_flags): Add braces around if-else.
11654
11655 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
11656 COMBINE_INPUTS.
11657
11658 * lex.c (build_wfl_node): Add static prototype.
11659
11660 * lex.h (build_wfl_node): Remove static prototype.
11661
11662 * parse.y: Include lex.c early enough to declare everything needed.
11663 Ensure calls to `build_wfl_node' pass the proper arguments.
11664 (create_class): Remove unused variable `super_decl'.
11665 (get_printable_method_name): Initialize variable `name'.
11666
11667 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11668
11669 * Changelog: Fixed 1999-03-22 typos.
11670 * lang.c (lang_decode_option): Fixed typo in error string in the
11671 XARG section.
11672
11673 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11674
11675 * Makefile.in (JAVA_OBJS): Added entry xref.o.
11676 (xref.o): New rule.
11677 * java-tree.h (flag_emit_xref): Declared extern.
11678 * lang.c (xref.h): Included.
11679 (flag_emit_xref): New global variable.
11680 (lang_decode_option): Added support for -fxref.
11681 * xref.c: Created.
11682 * xref.h: Likewise.
11683
11684 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
11685
11686 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
11687 linked with.
11688
11689 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11690
11691 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
11692 $(srcdir)/../system.h and $(JAVA_TREE_H).
11693 (jcf-io.o): Depend on $(JAVA_TREE_H).
11694 (mangle.o): Likewise.
11695
11696 * check-init.c (check_cond_init): Add static prototype.
11697
11698 * class.c (build_java_method_type, hashUtf8String,
11699 make_field_value, get_dispatch_vector, get_dispatch_table,
11700 append_gpp_mangled_type, mangle_static_field): Likewise.
11701 (strLengthUtf8): Hide unused definition.
11702 (hashUtf8String): Const-ify.
11703 (make_field_value): Un-ANSI-fy.
11704
11705 * constants.c: Move inclusion of jcf.h above java-tree.h.
11706 (set_constant_entry, find_class_or_string_constant,
11707 find_name_and_type_constant, get_tag_node,
11708 build_constant_data_ref): Add static prototype.
11709
11710 * decl.c (push_jvm_slot, builtin_function,
11711 lookup_name_current_level): Likewise.
11712 (builtin_function): Const-ify.
11713
11714 * except.c (expand_start_java_handler, expand_end_java_handler):
11715 Add static prototype.
11716
11717 * expr.c (flush_quick_stack, push_value, pop_value,
11718 java_stack_swap, java_stack_dup, build_java_athrow,
11719 build_java_jsr, build_java_ret, expand_java_multianewarray,
11720 expand_java_arraystore, expand_java_arrayload,
11721 expand_java_array_length, build_java_monitor, expand_java_pushc,
11722 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
11723 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
11724 expand_compare, expand_test, expand_cond, expand_java_goto,
11725 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
11726 expand_java_field_op, java_push_constant_from_pool): Likewise.
11727
11728 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
11729 (build_java_arraynull_check): Mark parameters `node' and `type'
11730 with ATTRIBUTE_UNUSED.
11731 (note_label): Likewise for parameter `current_pc'.
11732 (expand_java_call, expand_java_ret): Hide unused definition.
11733
11734 * java-tree.h (make_class, build_constants_constructor,
11735 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
11736 init_outgoing_cpool, register_class, emit_register_classes,
11737 java_layout_seen_class_methods): Prototype.
11738 (unicode_mangling_length): Const-ify.
11739 (append_gpp_mangled_name, append_gpp_mangled_classtype,
11740 emit_unicode_mangled_name, format_int, format_uint,
11741 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
11742 jcf_print_utf8_replace, open_class): Prototype.
11743
11744 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
11745 <stdio.h>. Include tree.h/java-tree.h.
11746 (utf8_equal_string usage, process_class): Add static prototype.
11747 (open_class): Don't prototype this here.
11748 (utf8_equal_string): Match arguments to format specifiers.
11749 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
11750 TABLE_SWITCH, disassemble_method): Likewise.
11751
11752 * jcf-io.c: Include tree.h/java-tree.h.
11753 (open_class, find_classfile, jcf_print_utf8,
11754 jcf_print_utf8_replace): Const-ify.
11755
11756 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
11757 parse_class_file): Add static prototype.
11758 (find_in_current_zip): Match definition to existing static
11759 prototype.
11760
11761 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
11762 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
11763 finish_jcf_block, define_jcf_label, get_jcf_label_here,
11764 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
11765 write_chunks, adjust_typed_op, generate_bytecode_conditional,
11766 generate_bytecode_return, perform_relocations, init_jcf_state,
11767 init_jcf_method, release_jcf_state, generate_classfile):
11768 Add static prototype.
11769 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
11770 (make_class_file_name): Const-ify.
11771
11772 * jcf.h (find_classfile): Const-ify.
11773
11774 * jv-scan.c (reset_report): Remove prototype.
11775
11776 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
11777 (error): Rewrite to allow varargs.
11778
11779 * lang.c (lang_f_options): Const-ify.
11780
11781 * lex.c (java_parse_escape_sequence): Add static prototype.
11782 (java_allocate_new_line): Match definition to existing static
11783 prototype.
11784
11785 * mangle.c Include tree.h/java-tree.h.
11786 (unicode_mangling_length, emit_unicode_mangled_name,
11787 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
11788
11789 * parse.h (jdep_code): Remove trailing comma in enumeration.
11790 (java_get_line_col): Move prototype outside of !JC1_LITE test.
11791 (reset_report): Add prototype.
11792
11793 * verify.c (push_pending_label, merge_types): Add static
11794 prototypes.
11795
11796 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
11797
11798 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11799
11800 * parse.y (find_applicable_accessible_methods_list): Extend the
11801 search to superinterfaces when relevant.
11802 (search_applicable_methods_list): New function.
11803
11804 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
11805
11806 * class.c (unmangle_classname): Implemented stricter testing
11807 before setting the QUALIFIED_P flag on an identifier.
11808
11809 1999-03-16 Per Bothner <bothner@cygnus.com>
11810
11811 * parse.y (java_complete_lhs): Call force_evaluation_order
11812 after patch_newarray.
11813 (patch_binop): Don't call fold if there are side effects.
11814
11815 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
11816
11817 * parse.y (java_stabilize_reference): Use save_expr instead of
11818 building a SAVE_EXPR node.
11819 (java_complete_lhs): Patch the resulting string of the `+='
11820 operator (if necessary) and complete the RHS after having built
11821 the cast.
11822
11823 1999-03-15 Per Bothner <bothner@cygnus.com>
11824
11825 * class.c (make_class): Don't set CLASS_P here (because
11826 this function is also called by build_java_array_type).
11827 (push_class): Set CLASS_P here instead.
11828 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
11829
11830 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
11831 context. If the context is class, perfer "super" over "synchronized".
11832 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
11833
11834 * parse.y (create_class): Don't call parser_check_super here;
11835 it is not robust. Always wait until later.
11836
11837 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
11838 match what JDK 1.2 does), but don't set ACC_PUBLIC.
11839
11840 1999-03-13 Per Bothner <bothner@cygnus.com>
11841
11842 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
11843 * lex.h (UNGETC): Change misleading macro.
11844
11845 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11846
11847 * parse.y (java_stabilize_reference): Return NODE when patching a
11848 COMPOUND_EXPR.
11849 (java_complete_lhs): Put parenthesis around truth values.
11850
11851 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11852
11853 * class.c (layout_class_method): Don't make rtl for interface
11854 methods.
11855 * parse.h (GET_TYPE_NAME): New macro.
11856 * parse.y (if_then_statement:): Fixed indentation.
11857 (if_then_else_statement:): Likewise.
11858 (for_statement:): Fixed spacing.
11859 (try_statement:): Fixed indentation.
11860 (create_interface): Don't force interfaces to be abstract.
11861 (method_header): Abstract methods are OK in interfaces.
11862 (declare_local_variables): Fixed typo in comment.
11863 (java_complete_expand_method): Fixed indentation.
11864 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
11865 non accessible fields.
11866 (java_stabilize_reference): New function.
11867 (java_complete_lhs): Fixed indentation. Use
11868 java_stabilize_reference in compound assignment. Insert the
11869 cast. If not processing `+' fix string constants before processing
11870 binop.
11871
11872 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11873
11874 * constants.c (find_class_or_string_constant): Cast variable `j'
11875 to a `jword' when comparing against one.
11876
11877 * expr.c (java_lang_expand_expr): Remove unused variables
11878 `has_finally_p' and `op0'.
11879
11880 * gjavah.c (print_field_info): Cast a value to jint when comparing
11881 against one. Likewise for a jlong.
11882 (add_namelet): Likewise cast a `sizeof' to an int when comparing
11883 against a signed quantity.
11884
11885 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
11886 (print_signature): Don't needlessly dereference variable `str'
11887
11888 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
11889 `max_locals' with ATTRIBUTE_UNUSED.
11890 (jcf_parse_class): Likewise for variable `index'.
11891
11892 * parse.h (reverse_jdep_list): Remove static prototype.
11893
11894 * parse.y (build_jump_to_finally): Remove prototype and definition.
11895 (reverse_jdep_list): Add static prototype.
11896
11897 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
11898 `assignment' and `expr_decl'.
11899
11900 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
11901
11902 1999-03-12 Andrew Haley <aph@cygnus.com>
11903
11904 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
11905 we'll need a directory separator and a null character.
11906
11907 1999-03-10 Per Bothner <bothner@cygnus.com>
11908
11909 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
11910
11911 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
11912
11913 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
11914 interfaces.
11915
11916 1999-03-05 Per Bothner <bothner@cygnus.com>
11917
11918 * lex.c (java_parse_end_comment): Take extra parameter (next char).
11919
11920 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
11921
11922 * class.c (layout_class_method): A static method in a base class
11923 is never overridden, so treat it like it doesn't exist.
11924 However, do complain about private non-static method overriding
11925 public static method.
11926
11927 * parse.y: Don't set unused INITIALIZED_P flag.
11928 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
11929
11930 * parse.y (find_expr_with_wfl): Optimize tail-calls.
11931 (build_array_from_name): Re-order &index[string] to &string[index].
11932
11933 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
11934 error_mark (it might catch more errors, but it is more likely to lose).
11935
11936 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11937
11938 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
11939 (parse-scan.o): Depend on toplev.h.
11940
11941 * class.c (make_method_value): Add prototype. Make it static.
11942 Remove unused second argument, caller changed.
11943
11944 * expr.c (java_lang_expand_expr): Remove unused variable
11945 `return_label'.
11946
11947 * java-tree.h: Don't prototype find_in_current_zip.
11948 Add prototypes for verify_constant_pool, start_java_method,
11949 end_java_method, give_name_to_locals, expand_byte_code,
11950 open_in_zip, set_constant_value, find_constant1, find_constant2,
11951 find_utf8_constant, find_string_constant, find_class_constant,
11952 find_fieldref_index, find_methodref_index, write_constant_pool,
11953 count_constant_pool_bytes and encode_newarray_type.
11954
11955 * jcf-dump.c: Remove unused variable `LONG_temp'.
11956
11957 * jcf-parse.c: Include parse.h.
11958 (jcf_parse_source): Remove unused parameter, all callers changed.
11959 (jcf_figure_file_type): Add static prototype.
11960 (find_in_current_zip): Likewise. Also remove unused parameter,
11961 all callers changed.
11962 (read_class): Initialize variable `saved_pos'.
11963
11964 * jcf-reader.c (jcf_parse_preamble): Mark variables
11965 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
11966
11967 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
11968 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
11969 (java_parse_doc_section): Initialize variable `seen_star'.
11970 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
11971 (java_lex_error): Mark parameters `msg' and `forward' with
11972 ATTRIBUTE_UNUSED.
11973 (java_get_line_col): Mark parameters `filename' and `line' with
11974 ATTRIBUTE_UNUSED.
11975
11976 * parse-scan.y: Include toplev.h.
11977 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
11978
11979 * parse.h: use `struct JCF', not plain `JCF'.
11980 (java_parser_context_save_global, java_expand_classes
11981 java_parser_context_restore_global, java_parse): Add prototypes.
11982
11983 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
11984 `node'.
11985
11986 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
11987
11988 * check-init.c (check_init): COPYN takes word count, not bit count.
11989
11990 1999-02-26 Per Bothner <bothner@cygnus.com>
11991
11992 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
11993 explicit build_decl. (Avoids crash in reload when optimizing.)
11994
11995 1999-02-25 Per Bothner <bothner@cygnus.com>
11996
11997 * decl.c (complete_start_java_method): Handle synchronized method
11998 even when compiling from bytecode.
11999
12000 1999-02-26 Tom Tromey <tromey@cygnus.com>
12001
12002 * gjavah.c (add_class_decl): Only generate `#include' if outer
12003 class is not the name of the class we are processing. Correctly
12004 append `.h' in #include.
12005 (process_file): Clean up newlines around generated `#include's.
12006 (decode_signature_piece): Correctly handle inner classes.
12007 (struct include): New structure.
12008 (all_includes): New global.
12009 (print_include): New function.
12010 (add_class_decl): Use it.
12011 (process_file): Likewise.
12012 (add_class_decl): Generate include for java-array.h if array
12013 seen.
12014 (process_file): Don't generate java-array.h include.
12015
12016 * gjavah.c (add_namelet): Check for standard package names here.
12017 (add_class_decl): Don't check for standard package names here.
12018
12019 1999-02-25 Tom Tromey <tromey@cygnus.com>
12020
12021 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
12022 When reading a zip file, only use strncmp if both strings are
12023 bigger than the buffer length. Initialize `k' when looping
12024 through zip file.
12025
12026 1999-02-24 Tom Tromey <tromey@cygnus.com>
12027
12028 * gjavah.c (struct namelet): New structure.
12029 (add_namelet): New function.
12030 (print_namelet): New function.
12031 (print_class_decls): Use add_namelet and print_namelet to generate
12032 namespaces and not classes.
12033 (method_printed): New global.
12034 (HANDLE_END_METHOD): Examine method_printed.
12035 (print_method_info): Set method_printed when required. Print
12036 error if function to be ignored is marked virtual. Handle $finit$
12037 method.
12038 (METHOD_IS_FINAL): New macro.
12039 (print_field_info): Use it.
12040 (HANDLE_METHOD): Clear method_printed.
12041 (method_pass): New global.
12042 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
12043 (process_file): Do two passes over both fields and methods.
12044 (HANDLE_METHOD): Examine method_pass.
12045 (root): New global.
12046 (add_class_decl): New function.
12047 (print_class_decls): Don't scan over entire constant pool.
12048
12049 1999-02-23 Tom Tromey <tromey@cygnus.com>
12050
12051 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
12052 disable linking in that case.
12053
12054 1999-02-20 Tom Tromey <tromey@cygnus.com>
12055
12056 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
12057 not 0x1f.
12058
12059 1999-02-21 Per Bothner <bothner@cygnus.com>
12060
12061 * decl.c (build_result_decl), java-tree.h: New method.
12062 (complete_start_java_method): Handle synchronized methods.
12063 Don't build DECL_RESULT here. (Ordering dependency problem.)
12064 (start_java_method): Call build_result_decl here instead ...
12065 * parse.y (java_complete_expand_method): ... and here.
12066 (expand_start_java_method): Don't call complete_start_java_method here.
12067 (java_complete_expand_method): Call it here instead.
12068 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
12069 * java-tree.h: ... here.
12070
12071 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
12072 * parse.y (java_complete_lhs): Don't call force_evaluation_order
12073 for ARRAY_REF - it doesn't work when array bounds are checked.
12074 (patch_array_ref): Handle it here instead.
12075
12076 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
12077
12078 1999-02-19 Per Bothner <bothner@cygnus.com>
12079
12080 Force left-to-right evaluation of binary operations etc.
12081 * expr.c (force_evaluation_order), java-tree.h: New function.
12082 * parse.y (java_complete_lhs): Pass binary operations, procedure
12083 calls, and ARRAY_REFs to force_evaluation_order.
12084 (various): Set TREE_SIDE_EFFECTS more carefully.
12085
12086 Tolerate random (non-UTF8) encoding in comments without complaining.
12087 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
12088 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
12089
12090 * parse.y (resolve_qualified_expression_name): Handle error_mark.
12091 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
12092
12093 * parse.y (java_complete_lhs): Ignore an empty statement in a
12094 COMPOUND_EXPR. Don't complain about empty statement after return.
12095
12096 1999-02-19 Per Bothner <bothner@cygnus.com>
12097
12098 * parse.y (obtain_incomplete_type): Don't wrap unknown types
12099 in TREE_LIST - just chain the POINTER_TYPEs together.
12100 (resolve_class): If type already resolved, return decl.
12101 After resolving, update TREE_TYPE(class_type), and name (if array).
12102 * parse.h (do_resolve_class), parse.y: Make non-static.
12103 * class.c (maybe_layout_super_class): Take this_class argument.
12104 Do do_resolve_class if necessary.
12105 (layout_class, layout_class_methods): Adjust calls appropriately.
12106 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
12107 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
12108 * typeck.c (build_java_array_type): Don't call layout_class.
12109
12110 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12111
12112 * parse.y (check_pkg_class_access): Allow private class access
12113 within the same package.
12114 (strip_out_static_field_access_decl): New function.
12115 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
12116 operator argument before testing its nature.
12117
12118 1999-02-03 Per Bothner <bothner@cygnus.com>
12119
12120 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
12121 (TRY_EXPR): Simplify - it no longer has a finally clause.
12122 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
12123 Simpler handling of TRY_EXPR, which no longer has a finally clause.
12124 * expr.c (java_lang_expand_expr): Likewise.
12125 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
12126 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
12127 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
12128 (build_try_statement): Remove finally parameter and handling.
12129 (build_try_finally_statement): New function.
12130 (patch_try_statement): No longer need to support finally clause.
12131 (try_statement): Update grammar action rules.
12132 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
12133 Simpler handling of TRY_EXPR, which no longer has a finally clause.
12134
12135 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
12136
12137 * jcf-parse.c (get_constant): Add braces around computation of 'd'
12138 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
12139
12140 1999-02-17 Andrew Haley <aph@cygnus.com>
12141
12142 * class.c (build_utf8_ref): Back out broken patch which was
12143 intended to to output signatures using '.' as a separator.
12144
12145 * class.c (make_class_data): Output signatures using '.' as a
12146 separator, rather than '/'.
12147 (mangled_classname): Likewise.
12148 (make_field_value): Likewise.
12149 (make_method_value): Likewise.
12150 * constants.c (alloc_class_constant): Likewise.
12151 * expr.c (build_invokeinterface): Likewise.
12152
12153 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12154
12155 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
12156 of an ancient workaround.
12157
12158 1999-02-10 Jeffrey A Law (law@cygnus.com)
12159
12160 * jvspec.c (xmalloc): Kill the prototype. It does not belong
12161 here anymore.
12162
12163 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12164
12165 * lex.c (yylex): Encode \0 as UTF8.
12166
12167 1999-02-10 Tom Tromey <tromey@cygnus.com>
12168
12169 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
12170 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
12171 (libgcj_zip): Renamed.
12172 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
12173 LIBJAVA_ZIP_FILE.
12174 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
12175
12176 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
12177 (GC_NAME): Renamed -lgc to -lgcjgc.
12178
12179 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12180
12181 * lex.c (java_lang_cloneable): Initialize.
12182 * parse.y (java_lang_cloneable): New static variable.
12183 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
12184 doing one more qualification round.
12185 (valid_ref_assignconv_cast_p): Reject null source or
12186 destination. Allow an array to be cast into java.lang.Cloneable.
12187 (patch_cast): Swapped two first arguments to first call to
12188 valid_ref_assignconv_cast_p.
12189
12190 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12191
12192 * parse.h: DECL_P renamed JDECL_P.
12193 * parse.y: DECL_P replaced by JDECL_P.
12194 (build_array_from_name): Always use pointer's type.
12195 (patch_bc_statement): Extra code to search continue target in a
12196 for loop. Fixed comments. Continue target is current loop when
12197 unlabeled.
12198
12199 1999-02-05 Andrew Haley <aph@cygnus.com>
12200
12201 * class.c (make_class_data): The superclass of an interface should
12202 be null, not class Object.
12203
12204 * lex.c (java_lex): Sign extend hex literals.
12205
12206 1999-02-04 Andrew Haley <aph@cygnus.com>
12207
12208 * class.c (build_utf8_ref): Output signatures using '.' as a
12209 separator, rather than '/'.
12210 (make_class_data): Likewise.
12211
12212 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
12213
12214 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
12215 mkstemp.o. Get them from libiberty now.
12216
12217 1999-02-02 Jeffrey A Law (law@cygnus.com)
12218
12219 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
12220
12221 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12222
12223 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
12224 from libiberty.h
12225
12226 1999-02-02 Per Bothner <bothner@cygnus.com>
12227
12228 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
12229 * jcf-write.c (generate_bytecode_return): New function.
12230 (generate_bytecode_insns): Use it, for RETURN_EXPR.
12231
12232 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
12233 generate special [fd]const_[01] instructions.
12234
12235 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
12236
12237 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
12238 handling OPCODE_lookupswitch or OPCODE_tableswitch.
12239
12240 1999-02-01 Per Bothner <bothner@cygnus.com>
12241
12242 * parse.y (patch_method_invocation): Handle calling static methods,
12243 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
12244
12245 * parse.y (java_complete_lhs): Don't complain about unreachable
12246 exit condition in a do-while statement.
12247
12248 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12249
12250 * lex.c (java_read_char): Fixed utf8 decoding.
12251 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
12252 range.
12253 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
12254 comments. Local variable `all_primitive' is gone. Broadened
12255 acceptance of `0' to floating point targets. `long' can now be
12256 widened to `double' or `float'.
12257 (valid_method_invocation_conversion_p): Added leading
12258 comment. Fixed tabulation.
12259 (build_string_concatenation): Optimize out left or right empty
12260 string constants.
12261
12262 1999-01-28 Per Bothner <bothner@cygnus.com>
12263
12264 * jcf-write.c (localvar_alloc): Only emit entry for
12265 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
12266 (generate_bytecode_insns): Only call put_linenumber if
12267 debug_info_level > DINFO_LEVEL_NONE.
12268 * jvspec.c (lang_specific_driver): If no -O* or -g* option
12269 is specified, add -g1 (for compatibility wih javac).
12270
12271 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
12272
12273 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
12274 gjavah.o, check-init.o, jv-scan.o
12275
12276 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12277
12278 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
12279
12280 * gjavah.c: Include config.h and system.h.
12281
12282 * javaop.h (inline): Don't define, its handled by system.h.
12283 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
12284 from `inline' to `static inline'.
12285
12286 * jcf.h (inline): Don't define, its handled by system.h.
12287
12288 * lex.c (inline): Likewise.
12289
12290 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
12291
12292 * lang-specs.h: Map -Qn to -fno-ident.
12293
12294 1999-01-29 Richard Henderson <rth@cygnus.com>
12295
12296 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
12297
12298 1999-01-29 Tom Tromey <tromey@cygnus.com>
12299
12300 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
12301 then cast it to Object before calling `append' method.
12302
12303 1999-01-28 Per Bothner <bothner@cygnus.com>
12304
12305 * check-init.c (check_bool2_init, check_bool_init, check_init):
12306 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
12307 * jcf-write.c (generate_bytecode_insns): Likewise.
12308
12309 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12310
12311 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
12312 * parse.y (patch_cast): Allow a boolean to be cast into a
12313 boolean.
12314
12315 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12316
12317 * parse.y: (class_declaration:): Fixed indentation.
12318 (class_member_declaration:): Extra `;' after field declaration now
12319 accepted.
12320 (interface_declaration:): Removed debug messages in error reports.
12321 (patch_binop): Nodes created and returned inherit the orignal
12322 node's COMPOUND_ASSIGN_P flag value.
12323 (patch_cast): Fix cast from char to floating point.
12324
12325 1999-01-25 Andrew Haley <aph@cygnus.com>
12326
12327 * except.c, java-except.h (expand_resume_after_catch): new
12328 function.
12329 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
12330 to branch back to main flow of control after a catch block.
12331
12332 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12333
12334 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
12335 $(srcdir)/../system.h.
12336 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
12337 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
12338 (jcf-write.o): Likewise.
12339 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
12340 (mangle.o): Depend on $(srcdir)/../toplev.h.
12341 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
12342 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
12343
12344 * class.c: Include output.h and parse.h.
12345 (mangled_classname): Add the `const' keyword to a char*.
12346 (find_named_method): Hide unused function definition.
12347 (build_utf8_ref): Change type of variable `c' to unsigned char.
12348 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
12349 (build_class_ref): Add the `const' keyword to a char*.
12350 (layout_class_method): Remove unused variable `buf'.
12351
12352 * decl.c (find_local_variable): Remove unused variable `rtl'.
12353 (pushdecl): Likewise for variables `different_binding_level' and
12354 `oldglobal'.
12355 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
12356 (maybe_build_cleanup): Likewise for parameter `decl'.
12357
12358 * except.c (expand_start_java_handler): Mark parameter `range'
12359 with ATTRIBUTE_UNUSED.
12360
12361 * expr.c: Include except.h.
12362 (pop_type): Remove unused variable `i'.
12363 (pop_value): Likewise for variables `n_words' and `i'.
12364 (expand_java_arrayload): Likewise for variable `convert'.
12365 (java_lang_expand_expr): Likewise for variables `op0', `type',
12366 `mode', `unsignedp', `node' and `elements'.
12367 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
12368 `eh_ranges'.
12369 (process_jvm_instruction): Add a `const' qualifier to a char*.
12370
12371 * gjavah.c (output_directory): Add the `const' keyword to a char*.
12372 (temp_directory): Likewise.
12373 (print_c_decl): Likewise.
12374 (print_method_info): Likewise.
12375 (decode_signature_piece): Likewise.
12376 (print_mangled_classname): Likewise.
12377
12378 * java-except.h: Provide prototypes for maybe_start_try,
12379 maybe_end_try and add_handler.
12380
12381 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
12382 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
12383 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
12384 init_expr_processing, push_super_field, init_class_processing,
12385 can_widen_reference_to, class_depth, verify_jvm_instructions,
12386 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
12387 set_local_type, merge_type_state, push_type, load_type_state,
12388 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
12389 emit_unicode_mangled_name): Add prototypes.
12390
12391 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
12392 (print_signature_type): Use ISDIGIT, not isdigit.
12393 (print_signature): Remove unused variable `j'.
12394
12395 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
12396 int when comparing against one.
12397
12398 * jcf-parse.c: Include toplev.h.
12399
12400 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
12401 (localvar_free): Remove unused variable `i'.
12402 (generate_bytecode_conditional): Likewise for variable `kind'.
12403
12404 * jv-scan.c: Include config.h and system.h. Remove redundant
12405 OS header and gansidecl.h includes.
12406 (warning): Add the `const' keyword to a char*. Also add
12407 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
12408 __STDC__, when determining whether to use ANSI-isms.
12409 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
12410 (xmalloc): Don't redundantly prototype here.
12411 (main): Remove unused parameter `envp'. Also fix the arguments
12412 passed to function `fatal' to match the format specifier.
12413
12414 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
12415
12416 * mangle.c: Include toplev.h.
12417 (emit_unicode_mangled_name): Declare parameter `len'.
12418
12419 * parse.y (parse_warning_context): Add the `const' keyword to a
12420 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
12421 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
12422 (issue_warning_error_from_context): Add the `const' keyword to
12423 a char*.
12424 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
12425 not `__STDC__' for whether to use ANSI-isms.
12426
12427 * typeck.c (incomplete_type_error): Mark parameters `value' and
12428 `type' with ATTRIBUTE_UNUSED.
12429 (parse_signature_type): Use ISDIGIT, not isdigit.
12430
12431 * verify.c (check_pending_block): Add the `const' keyword to a char*.
12432 (verify_jvm_instructions): Likewise. Remove unused variables
12433 `field_name' and `default_val'.
12434
12435 * zextract.c: Include config.h and system.h. Remove redundant
12436 OS header includes.
12437
12438 * zipfile.h: Prototype `read_zip_archive'.
12439
12440 1999-01-21 Andrew Haley <aph@cygnus.com>
12441
12442 * typeck.c (convert): Allow conversions to void type: some
12443 optimizations in gcc do this.
12444
12445 1999-01-21 Andrew Haley <aph@cygnus.com>
12446
12447 * typeck.c (convert_ieee_real_to_integer): New function.
12448 (convert): When not using fast-math and using hardware fp, convert
12449 an IEEE NaN to zero.
12450
12451 1999-01-18 Andrew Haley <aph@cygnus.com>
12452
12453 * parse.y (patch_binop): Do a type conversion from signed to
12454 unsigned and then back to signed when a ">>>" is found.
12455
12456 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12457
12458 * java-tree.h: (check_for_initialization): Added prototype.
12459 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
12460 * parse.y (do_resolve_class): Removed unused locals.
12461 (read_import_dir): Likewise.
12462 (resolve_qualified_expression_name): Array creation
12463 expressions are valid primary expressions.
12464 (qualify_ambiguous_name): Likewise.
12465 (patch_synchronized_statement): Removed unused local.
12466
12467 1999-01-17 Jeffrey A Law (law@cygnus.com)
12468
12469 * Makefile.in (zextract.o): Add dependencies.
12470
12471 * Makefile.in: Do not put ^Ls at the start of a line.
12472
12473 1999-01-15 Per Bothner <bothner@cygnus.com>
12474
12475 * expr.c (process_jvm_instruction): Coerce to correct Throwable
12476 sub-type the result of the call that gets the exception value.
12477
12478 * parse.y (java_complete_expand_methods): If flags_syntax_only,
12479 don't call finish_class.
12480
12481 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
12482 clear found before continuing.
12483
12484 * verify.c (verify_jvm_instructions): On an array load, allow
12485 and handle top of stack to be TYPE_NULL.
12486
12487 * gjavah.c (generate_access): Translate Java package private or
12488 protected access to C++ public, but with a comment.
12489
12490 1999-01-13 Andrew Haley <aph@cygnus.com>
12491
12492 * expr.c (generate_name): Name prefix changed to avoid clashes
12493 with assembler temp labels.
12494
12495 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
12496 MODIFY_EXPR. Without this, code for the assignment may not be
12497 generated at all and the synchronized statement will read an
12498 uninitialized variable.
12499
12500 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12501
12502 * class.c (maybe_layout_super_class): Fixed returned value.
12503 * lex.c: Added 1999 to the copyright.
12504 (java_init_lex): Initialize java_lang_imported.
12505 * lex.h: Added 1999 to the copyright.
12506 * parse.h: Added 1999 to the copyright.
12507 (REGISTER_IMPORT): Fixed typo in trailing macro.
12508 (CURRENT_OSB): New macro.
12509 (struct parser_ctxt): New fields osb_depth, osb_limit.
12510 * parse.y (java_lang_id): New global variable.
12511 (type_import_on_demand_declaration): Don't import java.lang.* twice.
12512 (array_creation_expression:): Use CURRENT_OSB.
12513 (dims:): Uses a stack to keep track of array dimensions.
12514 (cast_expression:): Use CURRENT_OSB.
12515 (find_expr_with_wfl): Return NULL if node found doesn't meet the
12516 conditions.
12517 (register_fields): Fixed typos in comment.
12518 (check_method_redefinition): Fixed comment indentation.
12519 (java_check_regular_methods): Set saved found wfl to NULL after
12520 having reinstalled it in the previously found DECL_NAME.
12521
12522 1999-01-10 Richard Henderson <rth@cygnus.com>
12523
12524 * gjavah.c (java_float_finite): Use a union to do type punning.
12525 (java_double_finite): Likewise.
12526
12527 1999-01-09 Per Bothner <bothner@cygnus.com>
12528
12529 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
12530 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
12531 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
12532 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
12533 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
12534 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
12535
12536 1999-01-08 Per Bothner <bothner@cygnus.com>
12537
12538 * check-init.c (check_init): If compiling to native, we don't
12539 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
12540
12541 1999-01-08 Tom Tromey <tromey@cygnus.com>
12542
12543 * parse-scan.y (variable_declarator_id): Set or increment
12544 bracket_count.
12545 (bracket_count): New global.
12546 (formal_parameter): Handle case where bracket pairs trail variable
12547 declarator id.
12548
12549 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
12550
12551 * jcf-parse.c (yyparse): variable len changed from a char to an
12552 int to prevent overflow.
12553
12554 1999-01-06 Per Bothner <bothner@cygnus.com>
12555
12556 * java-tree.h: Declare read_class.
12557 * jcf-parse.c (read_class): New function.
12558 (load_class): Now just call read_class.
12559
12560 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
12561 * jcf-parse.c (parse_source_file): Declare save_error_count,
12562 which is needed by java_parse_abort_on_error macro,
12563 * parse.y (java_layout_classes, java_expand_classes): Likewise.
12564
12565 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
12566 constructor, if initializing a static field.
12567 (patch_new_array_init): Set TREE_CONSTANT if it is.
12568 * expr.c (java_lang_expand_expr): For a static array constructor
12569 of primitive elements, allocate the array itself statically.
12570 Disabled until we can set the vtable field statically.
12571
12572 * check-init.c: New file. Checks for definite assignment.
12573 * Makefile.in (JAVA_OBJS): Add check-init.o.
12574 * parse.y (java_complete_expand_method): Call check_for_initialization.
12575 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
12576
12577 1999-01-06 Graham <grahams@rcp.co.uk>
12578
12579 * parse.y : include system.h instead of including
12580 standard headers directly with the exception of <dirent.h>.
12581
12582 1999-01-06 Per Bothner <bothner@cygnus.com>
12583
12584 * lex.h: Moved static function declarations to lex.c,
12585 to shut up some -Wall warnings.
12586 * lex.c: Static function declarations moved here.
12587 * jcf-dump.c: Small fixes to shut up -Wall warnings.
12588
12589 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12590
12591 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
12592
12593 1998-12-22 Per Bothner <bothner@cygnus.com>
12594
12595 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
12596 * verify.c (verify_jvm_instructions): Fix off-by-one error.
12597
12598 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
12599 (localvar_alloc): Change return type to void,
12600 (emit_unop): Remove unused variable size.
12601
12602 * jcf-write.c (struct jcf_block): Add new union.
12603 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
12604 (call_cleanups): New functions.
12605 (struct jcf_partial): New fields num_finalizers and return_value_decl.
12606 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
12607 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
12608 * lang.c (lang_init): Call using_eh_for_cleanups.
12609 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
12610 completing operands to patch_synchronized_statement.
12611 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
12612 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
12613 WITH_CLEANUP_EXPR instead of TRY_EXPR.
12614
12615 1998-12-20 John F. Carr <jfc@mit.edu>
12616
12617 * Make-lang.in: Comment out control-Ls; they upset some makes.
12618
12619 1998-12-18 Tom Tromey <tromey@cygnus.com>
12620
12621 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
12622 consistently.
12623
12624 1998-12-17 Tom Tromey <tromey@cygnus.com>
12625
12626 * parse.y (DIR_SEPARATOR): New define.
12627 (check_class_interface_creation): Use it.
12628
12629 * parse-scan.y (report_main_declaration): Recognize
12630 `java.lang.String' in argument to main.
12631
12632 1998-12-16 Per Bothner <bothner@cygnus.com>
12633
12634 * parse.y (create_interface): Remove bogus test.
12635
12636 1998-12-16 Per Bothner <bothner@cygnus.com>
12637
12638 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
12639 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
12640
12641 1998-12-16 Tom Tromey <tromey@cygnus.com>
12642
12643 * parse-scan.y (qualified_name): Use correct sprintf format.
12644
12645 1998-12-15 Tom Tromey <tromey@cygnus.com>
12646
12647 * gjavah.c (print_field_info): Changed how most negative number is
12648 printed.
12649
12650 1998-12-14 Per Bothner <bothner@cygnus.com>
12651
12652 * parse.y (fold_constant_for_init): New function.
12653 (resolve_expression_name): Don't replace static final
12654 constant-initialized fields by its value.
12655 (java_complete_lhs): New. Same as java_complete_tree, except does
12656 not replace static final constant-initialized fields by their values.
12657 (register_fields): If there is an initializer, set DECL_INITIAL and
12658 MODIFY_EXPR_FROM_INITIALIZATION_P.
12659 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
12660 Only call patch_initialized_static_field if
12661 MODIFY_EXPR_FROM_INITIALIZATION_P.
12662 (patch_initialized_static_field): If not valid constant, clear
12663 DECL_INITIAL.
12664
12665 * parse.y (lookup_field_wrapper): Fix thinko.
12666
12667 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
12668 set and restore global lineno.
12669
12670 1998-12-14 Tom Tromey <tromey@cygnus.com>
12671
12672 * gjavah.c (print_field_info): If value to print is the smallest
12673 value of its size, then print as hex to avoid later warnings from
12674 C++ compiler.
12675
12676 1998-12-14 Tom Tromey <tromey@cygnus.com>
12677
12678 * gjavah.c (decompile_method): Decompile `return null'.
12679 (process_file): Generate `#pragma interface'.
12680 (method_declared): New global.
12681 (print_method_info): Set it.
12682 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
12683 (print_method_info): Handle abstract methods.
12684
12685 1998-12-13 Per Bothner <bothner@cygnus.com>
12686
12687 * parse.y (patch_method_invocation): If class_decl is null
12688 (e.g. an array type), use original type.
12689
12690 * parse.y (check_thrown_exceptions): Temporary hack to suppress
12691 errors about uncaught exception from clone (of array, specifically).
12692
12693 1998-12-13 Tom Tromey <tromey@cygnus.com>
12694
12695 * gjavah.c (decompile_method): Handle all types of `return'
12696 opcode. Decompile `return this' and `return'.
12697 (method_access): New global.
12698 (print_method_info): Set it.
12699 (decompile_method): Don't decompile a synchronized method.
12700
12701 1998-12-13 Tom Tromey <tromey@cygnus.com>
12702
12703 * jcf-reader.c (jcf_parse_one_method): Recognize
12704 HANDLE_END_METHOD.
12705 * gjavah.c (HANDLE_END_METHOD): New macro.
12706 (HANDLE_CODE_ATTRIBUTE): New macro.
12707 (decompile_method): New function.
12708 (print_method_info): Don't print `;\n' at end of function decl.
12709 Include java-opcodes.h.
12710 (decompiled): New global.
12711
12712 1998-12-12 Per Bothner <bothner@cygnus.com>
12713
12714 * class.c (build_class_ref): Handle PRIMTYPE.class if
12715 flag_emit_class_files.
12716 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
12717 if flag_emit_class_files.
12718 * parse.y (java_complete_tree): Pre-liminary support for
12719 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
12720
12721 * parse.y (patch_synchronized_statement): Don't call monitorexit
12722 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
12723
12724 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
12725
12726 * zipfile.h (opendir_in_zip): New declaration.
12727 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
12728 (opendir_in_zip): New function, using code from open_in_zip.
12729 (open_in_zip): Call opendir_in_zip.
12730 (find_class): Remove no-longer-used do_class_file parameter,
12731 but add source_ok parameter. Change logic so if we find a .java file,
12732 we don't look for .class in later classpath emtries.
12733 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
12734 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
12735 * gjavah.c: Update call to find_class.
12736 * jcf-dump.c: Likewise.
12737
12738 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
12739 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
12740 nothing if body is empty_stmt_node.
12741 Various little fixes so SP gets correctly adjusted.
12742 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
12743 For CALL_EXPR, test if static first.
12744 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
12745 such as the ones we create for Object and Class.
12746 Set and restore current_function_decl.
12747 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
12748 (note_possible_classname): New function.
12749 (read_import_entry): Removed. Merged with read_import_dir.
12750 (read_import_dir): Don't call find_class - that only gives us
12751 the first classpath entry having the needed package.
12752 Use the struct buffer data structure from buffer.h.
12753 (read_import_dir, find_in_imports_on_demand): The remembered
12754 class names now use '.' (not '/') as package separator.
12755
12756 * parse.y (java_complete_expand_methods): Call write_classfile
12757 here, and not in java_expand_classes (which only gets first class).
12758
12759 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
12760
12761 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
12762 (register_fields): If a static fields has an initializer, just
12763 chain it on ctxp->static_initialized, and handle later.
12764 (java_complete_expand_methods): Force <clinit> first.
12765 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
12766 - it's already been completed.
12767 (patch_initialized_static_field): New function.
12768 (java_complete_field): Call it.
12769
12770 1998-12-12 Per Bothner <bothner@cygnus.com>
12771
12772 * expr.c (encode_newarray_type, build_new_array): New functions.
12773 * java-tree.h: Declare build_new_array.
12774 * jcf-write.c (patch_newarray): Use build_new_array.
12775
12776 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
12777 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
12778
12779 * parse.y (patch_new_array_init): Re-organize.
12780 Now is passed the actual array (pointer) type of the value.
12781 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
12782 (patch_array_constructor): Removed - merged into patch_new_array_init.
12783 (java_complete_tree): Update patch_new_array_init.
12784
12785 * jcf-write.c (find_constant_index): New function.
12786 (generate_bytecode_insns): Use find_constant_index.
12787 (generate_classfile): Use find_constant_index for ConstantValue.
12788
12789 1998-12-11 Tom Tromey <tromey@cygnus.com>
12790
12791 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
12792 * decl.c (init_decl_processing): Renamed dtable -> vtable.
12793 * class.c (make_class_data): Renamed dtable -> vtable, and
12794 dtable_method_count -> vtable_method_count.
12795
12796 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12797
12798 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
12799 global variables, initialized.
12800 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
12801 Declared new global variables.
12802 * lex.c (java_lex): Return long_zero_node, float_zero_node,
12803 double_zero_node, integer_zero_node upon direct matching.
12804 * parse.y (purify_type_name): Added function prototype.
12805 (duplicate_declaration_error_p): Consider new_type as potentially
12806 being a incomplete type. Use purify_type_name on type string.
12807 (method_header): saved_type: unused variable removed. Don't figure
12808 return type if method name is invalid.
12809 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
12810 processed by patch_unaryop.
12811 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
12812 increment/decrement node into its original type after binary
12813 numeric promotion on its operands.
12814
12815 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12816
12817 * parse.y (array_initializer:): Array init operand is NULL_TREE
12818 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
12819 now an error. Fixed indentation problems.
12820 (patch_string): Handle error_mark_node as an argument.
12821 (patch_new_array_init): Fixed indentation problems.
12822 (array_constructor_check_entry): Removed check on null wfl_value.
12823 Return an error if wfl_value's walk returns an error.
12824
12825 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12826
12827 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
12828 * lex.c (java_lex): Remember column position before advancing one
12829 token. Retain location information on OCB_TK.
12830 * lex.h (typedef struct java_lc): Added new field.
12831 * parse.h (GET_SKIP_TYPE): New macro.
12832 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
12833 * parse.y (build_new_array_init, patch_new_array_init,
12834 patch_array_constructor, maybe_build_array_element_wfl,
12835 array_constructor_check_entry): New function prototypes.
12836 (switch_block:): Tagged <node>.
12837 (OCB_TK): Tagged <operator>.
12838 (array_initializer:): Installed actions.
12839 (variable_initializer): Build location information on element if
12840 necessary.
12841 (switch_statement:): Fixed indentation typo.
12842 (switch_block:): Redefined default action.
12843 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
12844 (patch_assignment): Removed duplicate code.
12845 (maybe_build_array_element_wfl, build_new_array_init,
12846 patch_new_array_init, patch_array_constructor,
12847 array_constructor_check_entry): New functions.
12848
12849 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12850
12851 * parse.y (array_initializer): Tagged <node>.
12852 (variable_initializer:): Use default rule.
12853 (array_initializer:): Defined actions.
12854 (variable_initializers:): Likewise.
12855 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
12856 non-static field accesses.
12857 (patch_invoke): Fixed indentation typo.
12858 (java_complete_tree): Likewise.
12859 (build_labeled_block): Changed leading comment. Generate an error
12860 in case of duplicate loop labels.
12861 (patch_conditional_expr): Patch results of string concatenation
12862 operations.
12863
12864 1998-12-06 Per Bothner <bothner@cygnus.com>
12865
12866 * constants.c (find_methodref_index): When the class is an interface,
12867 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
12868
12869 * decl.c (finit_identifier_node): Use "$finit$", rather than
12870 "<finit>" (which Sun's verifier rejects).
12871 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
12872 (generate_field_initialization_code): Removed.
12873 (fix_constructors) Don't add call to $finit$ here (wrong order).
12874 (patch_method_invocation): Add $finit$ call here.
12875
12876 * java-tree.h (CALL_USING_SUPER): New macro.
12877 * parse.y (patch_invoke): Remove im local variable.
12878 (patch_method_invocation, patch_invoke): Don't pass super parameter.
12879 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
12880 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
12881
12882 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
12883
12884 * parse.y (java_complete_tree): Don't complain about unreachable
12885 statement if it is empty_stmt_node.
12886
12887 * jcf-write.c (find_constant_wide): New function.
12888 (push_long_const): Use find_constant_wide.
12889
12890 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
12891 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
12892 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
12893 Emit invokeinterface when calling an interface method.
12894 Emit invokespecial also when calling super or private methods.
12895
12896 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
12897
12898 1998-12-06 Per Bothner <bothner@cygnus.com>
12899
12900 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
12901
12902 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
12903
12904 * java-tree.h (java_layout_seen_class_methods): New function
12905 prototype.
12906 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
12907 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
12908 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
12909 * parse.y (method_declarator:): Defined action.
12910 (issue_warning_error_from_context): input_filename saved, set to
12911 the appropriate value and restored after java_error is called.
12912 (build_unresolved_array_type): Fixed comment.
12913 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
12914 (method_header): Deal with return type the same way type are
12915 handled for fields and method's parameters and local variables
12916 types are handled.
12917 (check_method_redefinition): Removed extra CR.
12918 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
12919 (java_layout_seen_class_methods): New function.
12920 (java_layout_classes): Call java_layout_seen_class_methods.
12921
12922 1998-12-03 Per Bothner <bothner@cygnus.com>
12923
12924 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
12925
12926 1998-12-03 Per Bothner <bothner@cygnus.com>
12927
12928 * jcf-dump.c (main): Fix error message.
12929 * jcf-path.c (add_entry): Style fix.
12930
12931 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12932
12933 * class.c (layout_class_method): Call build_java_argument_signature
12934 on constructors too.
12935 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
12936 (patch_method_invocation): Define a primary when resolving an
12937 expression name. Augmented comment on code checking illegal `this'
12938 usage. Loosened it test by accepting NEW_CLASS_EXPR.
12939
12940 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12941
12942 * class.c (layout_class_method): Don't report error on non-static
12943 overriding static if the method is private.
12944 * java-tree.h (finish_class): Prototype added.
12945 * lex.c (java_get_line_col): Handle col argument -2 value.
12946 * parse.h: All static method declarations moved to parse.y.
12947 * parse.y: Now contains all static method declarations previously
12948 found in parse.h.
12949 (find_expr_with_wfl, missing_return_error,
12950 unreachable_stmt_error): New functions.
12951 (java_get_real_method_name): Identify constructors bearing class
12952 names in source code compiled classes only.
12953 (java_complete_expand_methods): Call missing_return_error.
12954 (invocation_mode): Private methods invoked as static methods.
12955 (java_complete_tree): Call unreachable_stmt_error.
12956
12957 1998-12-01 Tom Tromey <tromey@cygnus.com>
12958
12959 * Makefile.in (+target): Removed.
12960 (+xmake_file): Likewise.
12961 (+tmake_file): Likewise.
12962 (.NOEXPORT): Removed duplicate.
12963
12964 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12965
12966 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
12967
12968 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
12969
12970 * jvgenmain.c: Remove the xmalloc prototype, we get it from
12971 libiberty.h. Provide an xmalloc definition.
12972
12973 * jvspec.c: Remove the xmalloc prototype.
12974
12975 * parse-scan.y: Include config.h and system.h. Don't include
12976 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
12977 Provide an xstrdup definition.
12978
12979 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
12980
12981 * jcf-path.c (add_entry): Recognize ".jar" too.
12982 * lang-specs.h: Likewise.
12983
12984 1998-11-26 Per Bothner <bothner@cygnus.com>
12985
12986 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
12987 soft_monitorenter_node, soft_monitorexit_node, throw_node.
12988
12989 * jcf-write.c (generate_bytecode_insns):
12990 Handle pre/post-increment/decrement of long.
12991
12992 * jcf-write.c (generate_bytecode_insns):
12993 Handle missing exception handler (finally for synchronized).
12994
12995 1998-11-25 Per Bothner <bothner@cygnus.com>
12996
12997 * java-tree.h (end_params_node): Declare global.
12998 * decl.c (end_params_node): New global.
12999 (init_decl_processing, start_java_method): Use end_params_node for
13000 end of list of parameter types. Follows correct gcc conventions.
13001 * expr.c (pop_argument_types, pop_arguments): Likewise.
13002 * lang.c (put_decl_node): Likewise.
13003 * typeck.c (various places): Likewise.
13004 * class.y (various places): Likewise.
13005 * parse.y (various places): Likewise.
13006
13007 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
13008 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
13009
13010 * class.c: Add #include flags.h, remove no-longer needed declaration.
13011
13012 * class.c (layout_class_method): Remove commented-out code, re-format.
13013 Don't add vtable entry (or index) for private methods.
13014 * expr.c (expand_invoke): A private method is implicitly final.
13015 * class.c (make_class_data): If inlining or optimizing,
13016 skip private methods.
13017
13018 * class.c (finish_class): New function. Calls existing methods,
13019 but alls emits deferred inline functions.
13020 * jcf-parse.c (parse_class_file): Call finish_class.
13021 * parse.y (java_complete_expand_methods): Likewise.
13022
13023 * expr.c (build_java_binop): Explicit default, to silence -Wall.
13024
13025 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
13026
13027 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
13028
13029 * jcf-write.c (generate_bytecode_conditional): Fix typo.
13030
13031 1998-11-24 Per Bothner <bothner@cygnus.com>
13032
13033 * (generate_classfile): Always write class access flag with
13034 ACC_SUPER set.
13035
13036 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13037
13038 * class.c (maybe_layout_super_class): New function.
13039 (layout_class): Reorganized. Loop on class methods dispatched into
13040 a new function. Call maybe_layout_super_class.
13041 (layout_class_methods, layout_class_method): New functions.
13042 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
13043 class.
13044 (expand_invoke): Likewise.
13045 * java-tree.h (all_class_list): New global variable declared.
13046 (layout_class_methods, layout_class_method): New function
13047 prototypes.
13048 (LAYOUT_SEEN_CLASS_METHODS): New macro.
13049 * jcf-parse.c (all_class_list): New global variable.
13050 (load_class): Extended what class_or_name can be. Use parser
13051 context mechanism to save globals before calling jcf_parse.
13052 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
13053 is set on the file name.
13054 (jcf_parse): Layout class methods when Object is loaded, otherwise
13055 record class in all_class_list for delayed method layout.
13056 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
13057 * lang.c (put_decl_node): Decode <init> into the decl context
13058 class name.
13059 * lex.c (java_allocate_new_line): Use xmalloc.
13060 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
13061 pointers, not TREE_LIST elements.
13062 (struct parser_ctxt): Fixed comment indentations, added comments
13063 and reordered some fields.
13064 (java_check_methods): Function prototype removed.
13065 * parse.y (java_push_parser_context): Use xmalloc.
13066 (java_parser_context_restore_global): Pop extra pushed ctxp only
13067 when there's nothing next.
13068 (maybe_create_class_interface_decl): Fixed comment, add new
13069 created class decl to all_class_list.
13070 (method_header): Use GET_REAL_TYPE on argument's types.
13071 (method_declarator): Use GET_REAL_TYPE, change type to the real
13072 type in TREE_LIST dependency node. Build argument list with the
13073 real type.
13074 (create_jdep_list): Use xmalloc. Removed allocation error message.
13075 (obtain_incomplete_type): Fixed leading comment. Broadened
13076 incoming argument meaning.
13077 (register_incomplete_type): Use xmalloc. Removed allocation error
13078 message.
13079 (safe_layout_class): Fixed leading comment.
13080 (jdep_resolve_class): Reversed if statement condition and switch
13081 if and else bodies.
13082 (resolve_and_layout): Fixed leading comment. Broadened incoming
13083 argument meaning.
13084 (complete_class_report_errors): New local variable name, for
13085 clarity. purify_type_name used for all error cases.
13086 (java_get_real_method_name): Stricter check on constructors.
13087 (java_check_regular_methods): Reverse methods list only if not
13088 already laid out. Layout artificial constructor.
13089 (java_check_methods): Deleted.
13090 (source_start_java_method): Obtain incomplete type for patchable
13091 method arguments.
13092 (java_layout_classes): Fixed leading comment. Use
13093 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
13094 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
13095 before returning. Fixed comments.
13096 (java_expand_classes): Check for errors up front.
13097 (patch_method_invocation): Class to search is resolved and laid
13098 out.
13099
13100 1998-11-24 Per Bothner <bothner@cygnus.com>
13101
13102 * expr.c (java_lang_expand_expr): Add missing emit_queue.
13103
13104 * javaop.h (int8): Removed - not used.
13105 (jbyte): Redefine portably with correct signedness.
13106
13107 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
13108
13109 * jcf-write.c (generate_bytecode_insns): Fix typo
13110 OPCODE_getstatic to OPCODE_getfield.
13111
13112 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
13113 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
13114 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
13115
13116 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13117
13118 * jcf-parse.c (jcf_parse_source): Function returned type is
13119 void. Added prototype.
13120 (jcf_parse): Function returned type is void.
13121 (yyparse): Remove call to fclose on the last parsed file.
13122
13123 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
13124
13125 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
13126
13127 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
13128 (layout_class): Cope with methods featuring WFL in decl names.
13129 * decl.c (unqualified_object_id_node): New global variable,
13130 initialized.
13131 (build_decl_no_layout): Removed.
13132 * expr.c (build_primtype_type_ref): Handle Double.
13133 (java_lang_expand_expr): Fixed indentations.
13134 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
13135 (flag_wall, flag_redundant, flag_not_overriding,
13136 flag_static_local_jdk1_1, unqualified_object_id_node): Global
13137 variable declarations.
13138 (build_decl_no_layout): Removed prototype.
13139 (java_get_real_method_name): Added prototype.
13140 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
13141 (java_parse_abort_on_error): Macro now just returns.
13142 * jcf-parse.c (jcf_parse_source): Check fclose returned
13143 value. Call emit_register_classes if java_report_errors returns
13144 zero.
13145 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
13146 flag_static_local_jdk1_1): New integer flags.
13147 (lang_decode_option): New flags set here.
13148 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
13149 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
13150 the flag_redundant variable.
13151 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
13152 when parsing java.lang.Object class.
13153 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
13154 NULL_TREE to build.
13155 (resolve_qualified_expression_name): Fixed indentation.
13156 (patch_array_ref): Changed prototype.
13157 (not_initialized_as_it_should_p): Prototype removed.
13158 (java_report_errors): Added function prototype.
13159 * parse.y (formal_parameter:): Changed error message for not yet
13160 supported final parameters.
13161 (class_type_list:): Set both PURPOSE and VALUE of created
13162 TREE_LIST to be class_type.
13163 (primary_no_new_array:): Handle class literals on primitive types.
13164 (parse_warning_context): Reinstalled correct force_error and
13165 do_warning flags setups.
13166 (java_report_errors): Changed prototype. Return java_error_count
13167 value.
13168 (variable_redefinition_error): Consider treating variable type as
13169 a fake pointer.
13170 (create_interface): Warn about redundant abstract modifier if
13171 flag_redundant is set. Changed error message.
13172 (lookup_field_wrapper): Save/restore globals before/after looking
13173 up field.
13174 (duplicate_declaration_error_p): Consider treating declaration
13175 type as a fake pointer.
13176 (register_fields): Extract real type from dependency node. Check
13177 for duplicate field declaration after type adjustment. Use
13178 DECL_INITIAL to store static final initialized values.
13179 (method_header): Extract real function type from dependency node.
13180 (check_abstract_method_header): Use GET_METHOD_NAME.
13181 (obtain_incomplete_type): Layout fake pointer type.
13182 (safe_layout_class): Don't try to check for methods before layout.
13183 (java_complete_class): Don't check for correct throws clause
13184 elements inheritance here.
13185 (resolve_and_layout): Broadened name parameter meaning.
13186 (reset_method_name): Use GET_METHOD_NAME.
13187 (java_get_real_method_name): New function.
13188 (java_check_regular_methods): Don't check methods in
13189 java.lang.Object. Verify lineage of throws clause elements. Use
13190 flag_no_overriding in warning report.
13191 (check_throws_clauses): Don't check if class was from
13192 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
13193 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
13194 (declare_local_variables): Use flag_static_local_jdk1_1 to report
13195 warning on unsupported final local variables. Use build_decl
13196 instead of build_decl_no_layout. Get real local variable type from
13197 dependency node.
13198 (source_start_java_method): Get real parameter type from
13199 dependency node. Call build_decl instead of build_decl_no_layout.
13200 (java_layout_classes): Reverse tree and layout type and class as
13201 required. Mark class as loaded when done.
13202 (resolve_field_access): Fixed indentation. Restricted condition
13203 leading to static field access code generation. Set field_type
13204 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
13205 (resolve_qualified_expression_name): Initialize type_found to
13206 null. Handle static field resolved during qualification. Fixed
13207 layout on non primitive field decl types.
13208 (not_accessible_p): Fixed typo in comment.
13209 (patch_method_invocation): Resolve and layout class to search from
13210 type.
13211 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
13212 layout non primitive type, if necessary. Make method node only to
13213 report errors.
13214 (find_applicable_accessible_methods_list): Consider WFL'ed method
13215 decl names. Fixed indentation.
13216 (argument_types_convertible): Resolve and layout target type if
13217 necessary.
13218 (java_complete_tree): Fixed indentation problems. Rewrote
13219 CALL_EXPR thrown exceptions check. Re-installed further processing
13220 of the assignment in certain cases.
13221 (patch_assignment): Call maybe_build_primttype_type_ref to perform
13222 inlining on class literals.
13223 (valid_builtin_assignconv_identity_widening_p): Cope with constant
13224 0 literal.
13225 (valid_method_invocation_conversion_p): Likewise.
13226 (patch_string): Temporary disable forbidden use of `this' in
13227 explicit constructor invocations when doing string concatenation
13228 within their scope.
13229 (patch_unaryop): Added comment. Reinstalled code to disable
13230 further check on assignment operation with cast expression RHS.
13231 (patch_switch_statement): Fixed indentation.
13232 (build_try_statement): Call build_decl instead of
13233 build_decl_no_layout.
13234 (patch_synchronized_statement): Likewise.
13235 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
13236 IS_UNCHECKED_EXPRESSION_P.
13237 (check_thrown_exceptions_do): Changed leading comment. Resolve and
13238 layout argument exception type.
13239 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
13240 of IS_UNCHECKED_EXPRESSION_P.
13241
13242 1998-11-18 Anthony Green <green@cygnus.com>
13243
13244 * jcf-parse.c (yyparse): Open class file in binary mode.
13245
13246 1998-11-15 Per Bothner <bothner@cygnus.com>
13247
13248 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
13249
13250 * jcf-write.c (perform_relocations): Move check out one loop.
13251
13252 1998-11-15 Anthony Green <green@hoser.cygnus.com>
13253
13254 * Make-lang.in: Fix reference to srcdir.
13255 * jv-scan.c: Add missing xmalloc prototype.
13256 * jvgenmain.c: Ditto.
13257
13258 1998-11-15 Per Bothner <bothner@cygnus.com>
13259
13260 * decl.c (error_mark_node), java-tree.h: New global.
13261 * parse.y: Use empty_stmt_node instead of size_zero_node.
13262 (build_if_else_statement): If missing else, use empty_stmt_node.
13263
13264 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
13265 (java_complete_expand_method): Complain if return is missing.
13266 (java_check_regular_methods): Comment out incorrect error check.
13267 (not_accessible_p): Fix incorrect handling of protected methods.
13268 (patch_method_invocation): Pass correct context to not_accessible_p.
13269 (find_applicable_accessible_methods_list): Likewise.
13270 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
13271 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
13272 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
13273 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
13274
13275 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
13276 (push_int_const): Remove reundant NOTE_PUSH.
13277 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
13278 (- case SWITCH_EXPR): Fix code generation bug.
13279 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
13280 (generate_classfile): More robust for abstract methods.
13281
13282 1998-11-15 Anthony Green <green@cygnus.com>
13283
13284 * Makefile.in: jv-scan and jvgenmain all require libiberty.
13285 * Make-lang.in: Ditto.
13286
13287 * jv-scan.c: Remove xmalloc and xstrdup definitions.
13288 * jvgenmain: Ditto.
13289
13290 1998-11-15 Per Bothner <bothner@cygnus.com>
13291
13292 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
13293
13294 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
13295
13296 1998-11-14 Per Bothner <bothner@cygnus.com>
13297
13298 Allow uses of interface types to verify. This is not really
13299 type-safe, but it matches what Sun does, and is OK as long as
13300 there are appropriate run-time checks.
13301 * verify.c (merge_types): If merging two interface types,
13302 just set the result to java.lang.Object.
13303 * expr.c (pop_type): Any interface is matches by java.lang.Object.
13304
13305 1998-11-13 Tom Tromey <tromey@cygnus.com>
13306
13307 * gjavah.c (main): Handle --output-class-directory argument.
13308 * jvspec.c (lang_specific_driver): Translate `-d' into
13309 -foutput-class-dir.
13310 * jcf.h (jcf_write_base_directory): Declare.
13311 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
13312 * lang-options.h: Mention -foutput-class-dir.
13313 * jcf-write.c (jcf_write_base_directory): New global.
13314 (make_class_file_name): Put generated .class file into `-d'
13315 directory, or into source directory if -d not given. Function now
13316 static.
13317 (write_classfile): Free class file name. Handle case where class
13318 file name is NULL.
13319 (DIR_SEPARATOR): New macro.
13320 Include <sys/stat.h>
13321
13322 * Makefile.in (prefix): New macro.
13323
13324 1998-11-12 Per Bothner <bothner@cygnus.com>
13325
13326 * parse.y (patch_invoke): Do less if flag_emit_class_files.
13327 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
13328 here (done in patch_invoke instead).
13329 (case_identity): Moved here from parse.y.
13330
13331 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
13332 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
13333 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
13334 so they can be efficiently scanned without recursion.
13335 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
13336 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
13337 in BLOCK iteratively, rather than recursively.
13338
13339 * parse.y (do_unary_numeric_promotion): New function.
13340 (patch_unaryop, patch_binop, patch_array_ref): Use it.
13341
13342 * parse.y (patch_newarray): Various fixes.
13343
13344 Re-do handling of switch statements (for proper block scoping).
13345 * parse.y: Add just a single block for the enture switch block,
13346 but don't create any "case blocks".
13347 (group_of_labels): Rmeoved unneeded non-terminal.
13348 CASE_EXPR and DEFAULT_EXPR are added to current block.
13349 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
13350 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
13351 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
13352 * parse.y (wfl_operator, print_int_node): Make non-static.
13353 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
13354 as part of recursive scan of block.
13355 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
13356 (patch_switch_statement): Most tests move dinto java_complete_tree.
13357
13358 * parse.y: Make various production be non-typed (void).
13359 * parse.y (parse_error): Merged into issue_warning_error_from_context.
13360 * parse.y (add_stmt_to_compound): Don't create/change extra node.
13361 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
13362
13363 * jcf-write.c (struct jcf_handler): New type.
13364 (struct jcf_switch_state): New type.
13365 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
13366 (alloc_handler, emit_unop, emit_reloc): New functions.
13367 (adjust_typed_op): Add extra parameter ("max type" offset).
13368 (emit_switch_reloc, emit_case-reloc): New function.
13369 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
13370 (generate_bytecode_insns): Support REAL_CST, switch statements,
13371 exception handling, method calls, object/array creation, and more.
13372
13373 * class.c: Remove some unused variables.
13374 * constants.c (find_string_constant): New function.
13375 (count_constant_pool_bytes): Fix to correctly handle wide constants.
13376 * decl.c (complete_start_java_method): Don't _Jv_InitClass
13377 if flag_emit_class_files.
13378
13379 1998-11-12 Tom Tromey <tromey@cygnus.com>
13380
13381 * jcf-io.c (find_class): Added explanatory comment.
13382
13383 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
13384 trailing slash to `.zip' entries.
13385
13386 * jvspec.c (lang_specific_driver): Correctly handle case where
13387 GC_NAME not defined.
13388
13389 1998-11-11 Tom Tromey <tromey@cygnus.com>
13390
13391 * jvspec.c (GC_NAME): New define.
13392 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
13393 if required.
13394 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
13395
13396 1998-11-11 Per Bothner <bothner@cygnus.com>
13397
13398 * jcf-dump.c (TABLE_SWITCH): Fix typos.
13399
13400 1998-11-11 Tom Tromey <tromey@cygnus.com>
13401
13402 * jcf-dump.c (main): Correctly recognize `--'-style long options.
13403
13404 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13405
13406 * class.c (is_compiled_class): Call safe_layout_class for class
13407 compiled from source.
13408 * conver.h (convert_to_integer, convert_to_real,
13409 convert_to_pointer): Added prototypes.
13410 * decl.c (init_decl_processing): Non longer push the decls of
13411 `methodtable', `constants', `Class', `Field', `dispatchTable'
13412 `jexception' and `Method'.
13413 * expr.c (build_invokeinterface): New function.
13414 (expand_invoke): static variable CLASS_IDENT now in
13415 build_invokeinterface. Use build_invokeinterface.
13416 (expand_java_field_op): Moved code to inline
13417 java.lang.PRIMTYPE.TYPE into a function.
13418 (build_primtype_type_ref): New function.
13419 * java-tree.def (INSTANCEOF_EXPR): New tree code.
13420 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
13421 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
13422 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
13423 (DECL_LOCAL_STATIC_VALUE): New macro.
13424 (build_invokeinterface, build_primtype_type_ref): New function
13425 prototypes.
13426 (java_parse_abort_on_error): Macro rewritten.
13427 * jcf-parse.c (current_method): Add comment to declaration.
13428 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
13429 Function prototypes fixed.
13430 (jcf_parse_source): push/pop parser context. save/restore global.
13431 (parse_source_file): Fixed leading comment. Now take a
13432 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
13433 classes and pop the parser context anymore.
13434 (yyparse): Push parser context, save globals, parse the source
13435 file, restore globals and pop the parser context when processing a
13436 source file.
13437 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
13438 * lex.c (java_parse_doc_section): New function.
13439 (java_lex): Call java_parse_doc_section when appropriate. Build an
13440 operator around INSTANCEOF_TK.
13441 * lex.h (java_lineterminator, java_sprint_unicode,
13442 java_unicode_2_utf8, java_lex_error, java_store_unicode):
13443 Prototypes rewritten.
13444 (java_parse_escape_sequence, java_letter_or_digit_p,
13445 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
13446 java_read_unicode, java_store_unicode, java_read_char,
13447 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
13448 Added function prototypes.
13449 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
13450 define.
13451 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
13452 New macros
13453 (struct parser_ctxt): New fields: deprecated,
13454 current_parsed_class_un, gclass_list.
13455 (fix_method_argument_names, issue_warning_error_from_context,
13456 resolve_package, lookup_package_type): New function prototypes.
13457 (resolve_expression_name): Fixed function prototype.
13458 (find_applicable_accessible_methods_list): Fixed indentation, added
13459 extra argument in prototype.
13460 (check_final_assignment, build_null_of_type, check_deprecation,
13461 check_method_redefinition, reset_method_name,
13462 java_check_regular_methods, java_check_abstract_methods,
13463 maybe_build_primttype_type_ref): New function prototype.
13464 * parse.y (conver.h): Include.
13465 (INSTANCEOF_TK): Tagged <operator>.
13466 (single_type_import_declaration): Use REGISTER_IMPORT macro.
13467 (relational_expression:): Build binop for instanceof.
13468 (java_push_parser_context): Remember ctxp->gclass_list across
13469 contexts.
13470 (java_pop_parser_context): Simply return if no context
13471 exists. Remember gclass_list across contexts.
13472 (issue_warning_error_from_context): New function.
13473 (parse_error_context): Don't setup ctxp->elc here. Call
13474 issue_warning_error_from_context instead.
13475 (parse_warning_context): Likewise.
13476 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
13477 setup. Link new class/interface to ctxp->gclass_list.
13478 (add_superinterfaces): Register interface as incomplete if not
13479 loaded.
13480 (create_class): Remember class unqualified name in
13481 ctxp->current_parsed_class_un. Check class deprecation.
13482 (register_fields): Check field deprecation. Remember static final
13483 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
13484 processing INIT.
13485 (method_header): New local variable ORIG_ARG. Use unqualified
13486 current class name for check on constructor errors. Promote return
13487 type if of record type. Argument list fix moved in
13488 fix_method_argument_names, called here. Check method deprecation.
13489 (fix_method_argument_names): New function.
13490 (method_declarator): Promote record typed arguments.
13491 (safe_layout_class): Check class methods before layout.
13492 (java_complete_class): Compute field layout when patched.
13493 (do_resolve_class): Try to load class after having it renamed
13494 after the package name.
13495 (get_printable_method_name): Use DECL_CONTEXT.
13496 (reset_method_name): New function.
13497 (check_method_redefinition): Use reset_method_name.
13498 (java_check_regular_methods): New local variable
13499 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
13500 names for error report. Check for compile-time error when method
13501 found has default (package) access.
13502 (java_check_abstract_methods): Now takes an interface DECL node as
13503 an argument. Also reinstall real name on unchecked
13504 overriding/hiding methods for error report.
13505 (java_check_methods): Fixed leading comment. Get classes to verify
13506 from ctxp->gclass_list. Use CHECK_METHODS macro and set
13507 CLASS_METHOD_CHECKED_P on class verification.
13508 (lookup_java_method2): Get real method name if necessary.
13509 (find_in_imports): Don't check package class access here.
13510 (resolve_package, lookup_package_type): New functions.
13511 (java_layout_classes): Fixed leading comment. Take classes to be
13512 laid out from ctxp->gclass_list.
13513 (java_complete_expand_methods): Don't expand native and abstract
13514 methods.
13515 (java_expand_classes): New function.
13516 (resolve_expression_name): Use additional argument ORIG. Retrieve
13517 values of static final field of primitive types.
13518 (resolve_field_access): Handles static final field of promotive
13519 type.
13520 (resolve_qualified_expression_name): Handle STRING_CST as
13521 primaries and package name resolution. Check deprecation on found
13522 decls. Set where_found and type_found on non static field resolved
13523 during qualification. Layout non primitive field decl types.
13524 (check_deprecation): New function.
13525 (maybe_access_field): Simplified.
13526 (patch_method_invocation_stmt): Local variable CLASS_TYPE
13527 removed. Reverse method's argument when primary is a type. Don't
13528 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
13529 instead. Include abstract class in the list of class searchable
13530 for constructors. Use DECL_CONTEXT of found method for access
13531 checks. Check method deprecation.
13532 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
13533 converting arguments. Handle INVOKE_INTERFACE.
13534 (lookup_method_invoke): Search constructor using existing
13535 infrastructure (don't rely on lookup_java_constructor anymore).
13536 (find_applicable_accessible_methods_list): Extra argument flag
13537 LC. Now include constructor in the search.
13538 (qualify_ambiguous_name): Conditional expression are primaries.
13539 (not_initialized_as_it_should_p): static final are always
13540 initialized.
13541 (java_complete_tree): Pass extra NULL argument to
13542 resolve_expression_name. Stricter test to carry on patching
13543 assignments. New case for INSTANCEOF_EXPR.
13544 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
13545 (check_final_assignment, maybe_build_primttype_type_ref): New
13546 functions.
13547 (patch_assignment): Detect resolved static finals and carry normal
13548 assignment error check on them. Inline PRIMTYPE.TYPE read access.
13549 (try_builtin_assignconv): Access constant 0 on all primitive
13550 types.
13551 (valid_builtin_assignconv_identity_widening_p): Accept identical
13552 types. Accept all promoted type on int type.
13553 (valid_ref_assignconv_cast_p): Accept a null pointer to be
13554 assigned to a reference.
13555 (valid_method_invocation_conversion_p): Accept to check null
13556 pointers.
13557 (build_binop): Merge declaration and initialization of local
13558 variable BINOP.
13559 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
13560 numeric types. Improved validity test for qualify operators on
13561 references.
13562 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
13563 and PREINCREMENT_EXPR. Also detect resolved static finals of a
13564 primitive type and issue the appropriate error message.
13565 (resolve_type_during_patch): Mark class loaded when resolved.
13566 (patch_cast): Allow null to be cased to reference types.
13567 (build_null_of_type): New function.
13568 (patch_array_ref): Handle array on references correctly.
13569 (patch_return): Removed unused local variable MODIFY. Force
13570 boolean to be returned as integers. Allows null to be returned by
13571 a function returning a reference.
13572 * typeck.c (convert_to_integer, convert_to_real,
13573 convert_to_pointer): Prototypes moved to convert.h
13574 (lookup_argument_method): Use method real name, if necessary.
13575
13576 1998-10-30 Tom Tromey <tromey@cygnus.com>
13577
13578 * class.c (build_class_ref): Changed name of primitive classes to
13579 start with `_Jv_'.
13580
13581 * class.c (make_class_data): Renamed fields: nmethods to
13582 method_count, method_count to dtable_method_count. Always set
13583 `state' field to 0.
13584 * decl.c (init_decl_processing): Likewise.
13585
13586 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13587
13588 * class.c (layout_class): Don't mangle <finit>, produce
13589 __finit<class> instead. Don't verify artificial methods.
13590 * decl.c (finit_identifier_node): New declared global.
13591 (init_decl_processing): finit_identifier_node initialized.
13592 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
13593 * java-tree.h (finit_identifier_node): Declared as extern.
13594 (struct lang_decl): New field called_constructor.
13595 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
13596 (CLASS_HAS_FINIT_P): New macro.
13597 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
13598 explicit constructor invocation.
13599 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
13600 CALL_SUPER_CONSTRUCTOR_P): New macros.
13601 (write_classfile): Added prototype.
13602 * jcf-parse.c (jcf_parse_source): Parse and remember for
13603 generation if the file was seen on the command line.
13604 (parse_source_file): Don't write the class file here.
13605 (yyparse): Loop on files rewritten. Set current_jcf.
13606 (parse_zip_file_entries): Parse class file only if it was found.
13607 * lang.c (init_parse): Don't open command line provided filename
13608 here.
13609 (lang_parse): Don't set main_jcf anymore.
13610 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
13611 (JCONSTRUCTOR_CHECK): New macro.
13612 (JBSC_TYPE_P): New macro.
13613 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
13614 (COMPLETE_CHECK_OP_2): New macro.
13615 (struct parse_ctxt): New field explicit_constructor_p.
13616 (check_class_interface_creation): Fixed prototype indentation.
13617 (patch_method_invocation_stmt): Prototype reflects added argument.
13618 (patch_invoke): Likewise.
13619 (complete_method_declaration, build_super_invocation,
13620 verify_constructor_circularity,
13621 build_this_super_qualified_invocation, get_printable_method_name,
13622 patch_conditional_expr, maybe_generate_finit, fix_constructors,
13623 verify_constructor_super, create_artificial_method,
13624 start_artificial_method_body, end_artificial_method_body,
13625 generate_field_initialization_code): New function prototypes.
13626 * parse.y: Fixed leading comment
13627 (constructor_header:, constructor_body:, block_end:): Rules tagged
13628 <node>.
13629 (type_declaration:): Call maybe_generate_finit.
13630 (method_declaration:): Action for method_body: placed in new
13631 function complete_method_declaration, called here.
13632 (constructor_declaration:): Defined actions. Removed leading
13633 FIXME.
13634 (constructor_header:): New rule with action.
13635 (constructor_body:): Rule rewritten using block_begin: and
13636 block_end:. Defined actions.
13637 (constructor_declarator:, explicit_constructor_invocation:):
13638 Defined actions.
13639 (block:): Use new rules block_begin: block_end:.
13640 (block_begin:, block_end:): New rules and actions.
13641 (block_statements:): Fixed error message for explicit
13642 constructors.
13643 (method_invocation:): Call build_this_super_qualified_invocation
13644 if primary is `this' or `super' was seen.
13645 (conditional_expression:): Action defined.
13646 (extra_ctxp_pushed_p): New static global flag.
13647 (java_parser_context_save_global): Create parser context if
13648 necessary. Use extra_ctxp_pushed_p to remember it.
13649 (java_parser_context_restore_global): Pop extra parser context if
13650 one exists.
13651 (build_array_from_name): Array on primitive types are marked
13652 loaded.
13653 (register_fields): Restore new name in field initializer
13654 expression if type was altered. Non static fields initialized upon
13655 declaration marked initialized.
13656 (maybe_generate_finit): New function.
13657 (maybe_generate_clinit): Use create_artificial_method,
13658 start_artificial_method_body, end_artificial_method_body. Generate
13659 debug info for enclosed initialization statements.
13660 (method_header): Fixed leading comment. Check constructor
13661 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
13662 accordingly.
13663 (complete_method_declaration, constructor_circularity_msg,
13664 verify_constructor_circularity): New functions.
13665 (get_printable_method_name): New function.
13666 (check_method_redefinition): Don't rename <finit> methods. Fix
13667 declared constructor names. Error message for
13668 constructors modified.
13669 (java_check_regular_methods): Local variable seen_constructor
13670 renamed saw_constructor. Skip verification on constructors. Create
13671 default constructor with create_artificial_method.
13672 (java_check_methods): Removed unnecessary empty line.
13673 (create_artificial_method, start_artificial_method_body,
13674 end_artificial_method_body): New functions.
13675 (java_layout_classes): Changed leading comment. Reverse fields
13676 list if necessary. Always layout java.lang.Object if being
13677 defined.
13678 (java_complete_expand_methods): Verify constructor circularity.
13679 (java_complete_expand_method): Call fix_constructor on
13680 constructors. Local variable no_ac_found removed. Restore
13681 bindings if method body expansion failed.
13682 (fix_constructors, verify_constructor_super,
13683 generate_field_initialization_code): New function.
13684 (java_expand_classes): Fixed leading comment. Write class file
13685 here.
13686 (resolve_expression_name): Check for illegal instance variable
13687 usage within the argument scope of an explicit constructor
13688 invocation.
13689 (resolve_qualified_expression_name): Pass extra from_super flag
13690 when invoking patch_method_invocation_stmt. New case for
13691 conditional expression when used as a primary. Check for error
13692 when acquiring super.
13693 (patch_method_invocation_stmt): Added extra argument super. New
13694 local variable is_static_flag. Set class_to_search according to
13695 the nature of the constructor invocation. Don't add `this'
13696 argument when expanding NEW_CLASS_EXPR. Check for illegal method
13697 invocation within the argument scope of explicit constructor
13698 invocation. Set is_static according to is_static_flag. Provide
13699 extra `super' argument to patch_invoke invocation.
13700 (patch_invoke): New argument from_super. Loop on arguments
13701 indentation fixed. Pass from_super to invocation_mode. New switch
13702 case INVOKE_SUPER. Fixed error message in switch default case.
13703 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
13704 value.
13705 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
13706 (lookup_method_invoke): Fixed prototypes in candidates list. Error
13707 message takes constructors into account.
13708 (find_applicable_accessible_methods_list): Fixed indentation.
13709 (qualify_ambiguous_name): Take explicit constructor invocation
13710 into account. Deal with a conditional expression as a primary to
13711 a method call.
13712 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
13713 case. Added extra argument to patch_method_invocation_stmt.
13714 Register calls made to explicit constructor `this'. Don't call
13715 save_expr in ARRAY_REF case when emitting class files. Check for
13716 illegal use of this when expanding explicit constructor invocation
13717 arguments.
13718 (complete_function_arguments): Set and reset parser context
13719 explicit_constructor_p field value when appropriate.
13720 (build_super_invocation, build_this_super_qualified_invocation):
13721 New functions.
13722 (patch_assignment): Fixed typo.
13723 (patch_unaryop): Check on final fields occurs only when a decl
13724 exits.
13725 (patch_return): Take constructors into account.
13726 (patch_conditional_expr): New function.
13727 * typeck.c (build_java_signature): Removed unnecessary empty line.
13728
13729 1998-10-28 Jeffrey A Law (law@cygnus.com)
13730
13731 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
13732
13733 1998-10-28 Tom Tromey <tromey@cygnus.com>
13734
13735 * decl.c (init_decl_processing): Renamed fields.
13736 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
13737 interface_len, msize fields.
13738
13739 * class.c (make_class_data): Removed subclass_head and
13740 subclass_next fields.
13741 * decl.c (init_decl_processing): Removed subclass_head and
13742 subclass_next fields.
13743
13744 1998-10-28 Jeffrey A Law (law@cygnus.com)
13745
13746 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
13747 * mangle.c (emit_unicode_mangled_name): Similarly.
13748
13749 1998-10-26 Nick Clifton <nickc@cygnus.com>
13750
13751 * jcf-parse.c (get_constant): Place braces around code to compute
13752 'd' when REAL_ARITHMETIC is not defined.
13753
13754 1998-10-25 H.J. Lu (hjl@gnu.org)
13755
13756 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
13757 dependency.
13758
13759 1998-10-23 Tom Tromey <tromey@cygnus.com>
13760
13761 * lang-specs.h: `.zip' files are input to jc1.
13762
13763 1998-10-22 Per Bothner <bothner@cygnus.com>
13764
13765 * jvspecs.c: Add (but don't enable) support for combining multiple
13766 .class and .java input filenames to a single jc1 invocation.
13767 Add support for -C flag (copile to .class files).
13768 Translate -classpath and -CLASSPATH arguments.
13769 * lang-specs.h: Don't set %2 spec.
13770
13771 1998-10-22 Tom Tromey <tromey@cygnus.com>
13772
13773 * jcf-path.c (add_entry): Don't add trailing separator if entry is
13774 a .zip file.
13775 (add_path): Don't add trailing separator to non-empty path
13776 elements.
13777
13778 * lang.c (lang_decode_option): Check for -fclasspath and
13779 -fCLASSPATH before examining other `-f' options.
13780
13781 * java-tree.h (finalize_identifier_node): Don't declare.
13782 * class.c (make_class_data): Don't push "final" field.
13783 * decl.c (init_decl_processing): Don't push "final" field.
13784 (finalize_identifier_node): Removed.
13785 (init_decl_processing): Don't set finalize_identifier_node.
13786
13787 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
13788
13789 1998-10-11 Anthony Green <green@cygnus.com>
13790
13791 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
13792 (JV_SCAN_SOURCES): New macro.
13793 (JCF_DUMP_SOURCES): Likewise.
13794 (jcf-dump$(exeext)): New target.
13795 (jv-scan$(exeext)): New target.
13796
13797 1998-10-22 Tom Tromey <tromey@cygnus.com>
13798
13799 * Makefile.in (LEX): Removed.
13800 (LEXFLAGS): Likewise.
13801 (SET_BISON): New macro.
13802 (BISON): Removed.
13803 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
13804 spurious diffs in parse.c.
13805 ($(PARSE_SCAN_C)): Likewise.
13806 (PARSE_DIR): New macro.
13807 (PARSE_C): Use it.
13808 (PARSE_SCAN_C): Likewise.
13809 (PARSE_RELDIR): New macro.
13810
13811 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
13812
13813 * jcf-io.c (find_class): Use saw_java_source to determine when to
13814 look for `.java' file.
13815 * jcf-parse.c (saw_java_source): New global.
13816 (yyparse): Set it if `.java' file seen.
13817
13818 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
13819 (GCJH_SOURCES): Likewise.
13820 * Makefile.in (datadir): New macro.
13821 (libjava_zip): Likewise.
13822 (JAVA_OBJS): Added jcf-path.o.
13823 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13824 (../gcjh$(exeext)): Likewise.
13825 (jcf-path.o): New target.
13826 * java-tree.h (fix_classpath): Removed decl.
13827 * jcf-parse.c (fix_classpath): Removed.
13828 (load_class): Don't call fix_classpath.
13829 * parse.y (read_import_dir): Don't call fix_classpath.
13830 * lex.h: Don't mention classpath.
13831 * lex.c (java_init_lex): Don't initialize classpath.
13832 * jcf-io.c (classpath): Removed global.
13833 (find_class): Use jcf_path iteration functions. Correctly search
13834 class path for .java file.
13835 (open_in_zip): New argument `is_system'.
13836 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
13837 classpath-related options.
13838 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
13839 and -I.
13840 (lang_init): Call jcf_path_init.
13841 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
13842 * lang-specs.h: Handle -I. Minor cleanup to -M options.
13843 Correctly put braces around second string in each entry.
13844 * gjavah.c (main): Call jcf_path_init. Recognize all the new
13845 classpath-related options.
13846 (help): Updated for new options.
13847 * jcf.h: Declare functions from jcf-path.c. Don't mention
13848 `classpath' global.
13849 * jcf-path.c: New file.
13850
13851 * jcf-depend.c: Include jcf.h.
13852
13853 * jcf-write.c (localvar_alloc): Returns `void'.
13854 (localvar_free): Removed unused variable.
13855
13856 * lang.c (OBJECT_SUFFIX): Define if not already defined.
13857 (init_parse): Use OBJECT_SUFFIX, not ".o".
13858
13859 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13860
13861 * class.c (emit_register_classes): Renamed from
13862 emit_register_class.
13863 * java-tree.h (emit_register_classes): Prototype renamed from
13864 emit_register_class.
13865 * jcf-parse.c (yyparse): Call emit_register_classes once before
13866 returning.
13867 * parse.y (java_expand_classes): No longer register classes.
13868
13869 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13870
13871 * class.c (is_compiled_class): New local variable
13872 seen_in_zip. Identify classes found in currently compiled source
13873 file(s).
13874 * decl.c (complete_start_java_method): Fixed typo.
13875 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
13876 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
13877 (CLASS_P): Moved around.
13878 (java_parse_abort_on_error): Macro moved from jcf-parse.c
13879 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
13880 java-parse.h
13881 (jcf_parse_source): Changed leading comment. Removed unnecessary
13882 fclose and CLASS_FROM_SOURCE_P marking.
13883 (parse_source_file): New local variables remember_for_generation
13884 and filename. Mark parsed file name identifier node. Removed block
13885 executed when parse_only was null. Set remember_for_generation.
13886 Use it as an argument to java_pop_parser_context.
13887 (yyparse): New local variables several_files, list, next node and
13888 current_file_list. Split ampersand separated file names into
13889 current_file_list. Iterate through the list and parse accordingly.
13890 * parse.h (java_pop_parser_context): New function prototype.
13891 * parse.y (ctxp_for_generation): New static global variable.
13892 (java_pop_parser_context): New argument generate. Link popped ctxp
13893 to ctxp_for_generation list accordingly.
13894 (java_complete_expand_methods): Fixed indentation.
13895 (java_expand_classes): New function.
13896
13897 1998-10-17 Per Bothner <bothner@cygnus.com>
13898
13899 * Makefile.in: Link with libiberty.a instead of memmove.o.
13900
13901 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
13902
13903 * lex.c (setjmp.h): No longer included.
13904 * lex.h (setjmp.h): Included.
13905 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
13906 (duplicate_declaration_error_p): Renamed from
13907 duplicate_declaration_error.
13908 (build_array_from_name): New function prototype.
13909 * parse.y (setjmp.h): No longer included.
13910 (variable_declarator_id): Define action.
13911 (build_array_from_name): New function.
13912 (duplicate_declaration_error_p): Renamed from
13913 duplicate_declaration_error. Fixed leading comment.
13914 (register_fields): Main `for' loop reorganized. Uses
13915 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
13916 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
13917 build_array_from_name.
13918 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
13919 types.
13920 (read_import_dir): Don't try to skip `.' and `..'.
13921 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
13922 build_array_from_name. Main `for' loop reorganized.
13923 (resolve_qualified_expression_name): When building access to a
13924 field, use the type where the field was found, not its own type.
13925 (maybe_access_field): Use field DECL_CONTEXT if the type where the
13926 field was found is null.
13927 (qualify_ambiguous_name): Sweep through all successive array
13928 dimensions.
13929
13930 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13931
13932 * java-tree.h (pop_labeled_block, lang_printable_name,
13933 maybe_add_interface, set_super_info, get_access_flags_from_decl,
13934 interface_of_p, inherits_from_p, fix_classpath,
13935 complete_start_java_method, emit_handlers, init_outgoing_cpool,
13936 make_class_data, register_class, alloc_name_constant): New
13937 function prototypes.
13938 * lang.c (lang_decode_option): Set argc argument unused. Fixed
13939 indentation. Added cast to remove warning.
13940 (lang_printable_name): Set v argument unused.
13941 (lang_print_error): Added argument to lang_printable_name call.
13942 (java_dummy_print, print_lang_decl, print_lang_type,
13943 print_lang_identifier, lang_print_xnode): All argument marked
13944 unused.
13945 * lex.c (java_unget_unicode): Removed unnecessary argument.
13946 (java_allocate_new_line): Unused local variable is gone.
13947 (java_read_char): Added parenthesis in expressions to remove
13948 warnings. Added final return statement.
13949 (java_read_unicode): Added parenthesis in expression to remove
13950 warning.
13951 (java_parse_end_comment): Fixed java_unget_unicode invocation.
13952 (java_parse_escape_sequence): Likewise.
13953 (java_lex): Unused local variables are gone. Fixed
13954 java_unget_unicode invocation.
13955 * lex.h (set_float_handler): Prototype added when JC1_LITE not
13956 defined.
13957 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
13958 lang_printable_name invocation in macro.
13959 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
13960 Likewise.
13961 (duplicate_declaration_error): Suppressed unused argument in
13962 prototype.
13963 (identical_subpath_p): Function declaration is gone.
13964 (patch_invoke): Suppressed unused argument in prototype.
13965 (patch_cast, build_labeled_block, check_thrown_exceptions):
13966 Likewise.
13967 * parse.y (setjmp.h): Included
13968 (toplev.h): Likewise.
13969 (field_declaration:): Suppressed unused local
13970 (label_decl:): Fixed build_labeled_block invocation.
13971 (java_pop_parser_context): Put extra parenthesis around assignment
13972 in if.
13973 (yyerror): Suppressed unused local variables.
13974 (variable_redefinition_error): Fixed lang_printable_name
13975 invocation.
13976 (create_interface): Suppressed unused local variables.
13977 (create_class): Likewise.
13978 (duplicate_declaration_error): Suppressed unused argument. Fixed
13979 lang_printable_name invocation.
13980 (register_fields): Suppressed unused local variable. Fixed
13981 duplicate_declaration_error invocation.
13982 (method_header): Suppressed unused local variable.
13983 (method_declarator, parser_check_super): Likewise.
13984 (java_complete_class): Suppressed unused local variable. Fixed
13985 fatal error message.
13986 (complete_class_report_errors): Added default: in switch.
13987 (java_check_regular_methods): Fixed lang_printable_name
13988 invocations.
13989 (check_throws_clauses): Likewise.
13990 (java_check_abstract_methods): Suppressed unused local
13991 variable. Fixed lang_printable_name invocation.
13992 (read_import_entry): Added supplemental return statement.
13993 (read_import_dir): Suppressed unused local variables.
13994 (check_pkg_class_access, declare_local_variables): Likewise.
13995 (source_start_java_method): Suppressed unused extern variable
13996 declarations
13997 (expand_start_java_method): Suppressed unused extern and local
13998 variable declarations.
13999 (java_complete_expand_methods): Likewise.
14000 (java_complete_expand_method): Suppressed unused local variables.
14001 (make_qualified_name): Likewise.
14002 (resolve_qualified_expression_name): Added default: in
14003 switch. Fixed lang_printable_name invocation.
14004 (class_instance_creation_expression): Added parenthesis around
14005 expressions.
14006 (patch_method_invocation_stmt): Fixed lang_printable_name and
14007 patch_invoke invocations.
14008 (check_for_static_method_reference): Fixed lang_printable_name
14009 invocation.
14010 (patch_invoke): Suppressed unused arguments and local variables.
14011 (lookup_method_invoke): Suppressed unused local variables.
14012 (qualify_ambiguous_name): Added default: in switch.
14013 (identical_subpath_p): Function removed.
14014 (patch_assignment): Suppressed unused local variables. Suppressed
14015 unnecessary if statement. Fixed lang_printable_name invocations.
14016 (try_builtin_assignconv): Fixed lang_printable_name invocations.
14017 (valid_ref_assignconv_cast_p): Parenthesis around
14018 expression. Suppressed unused local variables.
14019 (build_binop): Suppressed unused local variables. fixed
14020 lang_printable_name invocations.
14021 (string_constant_concatenation): Suppressed unused local
14022 variables.
14023 (patch_unaryop): Fixed lang_printable_name invocation.
14024 (patch_cast): Suppressed unnecessary argument. Fixed
14025 lang_printable_name invocation.
14026 (patch_array_ref): Fixed lang_printable_name invocation.
14027 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
14028 (build_labeled_block): Suppressed unused argument.
14029 (generate_labeled_block): Fixed build_labeled_block invocation.
14030 (build_loop_body): Suppressed unused local variables.
14031 (patch_loop_statement): Likewise.
14032 (patch_exit): Fixed lang_printable_name invocation.
14033 (patch_switch_statement): Likewise.
14034 (case_identity): First argument marked unused.
14035 (patch_try_statement): Fixed lang_printable_name invocations.
14036 (patch_synchronized_statement, patch_throw_statement): Likewise.
14037 (check_thrown_exceptions): Fixed check_thrown_exceptions and
14038 lang_printable_name invocations.
14039 (check_thrown_exceptions_do): Suppressed unused argument.
14040
14041 1998-10-14 Tom Tromey <tromey@cygnus.com>
14042
14043 * jcf-write.c (write_classfile): Add output class file as target.
14044 * lang-options.h: Added -MD, -MMD, -M, and -MM.
14045 * jcf.h: Added declarations for dependency-tracking functions.
14046 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
14047 * lang.c (lang_decode_option): Recognize -MD and -MMD.
14048 (finish_parse): Call jcf_dependency_write.
14049 (dependency_tracking): New global.
14050 (DEPEND_SET_FILE): New define.
14051 (DEPEND_ENABLE): New define.
14052 (init_parse): Enable dependency tracking if required.
14053 Include "flags.h".
14054 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
14055 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
14056 (../gcjh$(exeext)): Likewise.
14057 (jcf-depend.o): New target.
14058 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
14059 (GCJH_SOURCES): Likewise.
14060 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
14061 dep_name argument.
14062 (find_classfile): Added dep_name argument.
14063 (find_class): Compute name of dependency.
14064 (open_in_zip): Call jcf_dependency_add_file.
14065 * gjavah.c (output_file): No longer global.
14066 (usage): Don't mention "gjavah".
14067 (help): Likewise.
14068 (java_no_argument): Likewise.
14069 (version): Likewise.
14070 (main): Recognize and handle -M family of options.
14071 (print_mangled_classname): Return is void.
14072 (process_file): Handle case where output is suppressed.
14073 (HANDLE_END_FIELD): Likewise.
14074 (HANDLE_METHOD): Likewise.
14075 * jcf-depend.c: New file.
14076
14077 1998-10-13 Jeffrey A Law (law@cygnus.com)
14078
14079 * java-tree.def: Add missing newline at EOF.
14080
14081 1998-10-13 Tom Tromey <tromey@cygnus.com>
14082
14083 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
14084 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
14085 function.
14086 Include <config.h> and "system.h".
14087 (disassemble_method): Undefine RET to avoid clash with
14088 config/i386/i386.h.
14089
14090 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14091
14092 * decl.c (runtime_exception_type_node, error_exception_type_node):
14093 New global variables.
14094 (init_decl_processing): Initialized.
14095 * expr.c (java_lang_expand_expr): Set caught exception type to
14096 null if catch handler argument doesn't exit.
14097 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
14098 tree codes.
14099 * java-tree.h (runtime_exception_type_node,
14100 error_exception_type_node): Global variables declared.
14101 (DECL_FUNCTION_THROWS): New macro.
14102 (DECL_FUNCTION_BODY): Modified comment.
14103 (DECL_SPECIFIC_COUNT): Likewise.
14104 (struct lang_decl): New field throws_list.
14105 (IS_UNCHECKED_EXPRESSION_P): New macro.
14106 * lex.c (java_lex): Generate location information for THROW_TK.
14107 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
14108 EXCEPTIONS_P): New macros.
14109 (enum jdep_code): New value JDEP_EXCEPTION.
14110 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
14111 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
14112 PATCH_METHOD_RETURN_ERROR): New macros.
14113 (patch_method_invocation_stmt): Added new argument to prototype.
14114 (patch_synchronized_statement, patch_throw_statement,
14115 check_thrown_exceptions, check_thrown_exceptions_do,
14116 purge_unchecked_exceptions, check_throws_clauses): New function
14117 prototypes.
14118 * parse.y Fixed typo in keyword section.
14119 (throw:): Rule tagged <node>.
14120 (THROW_TK): Keyword tagged <operator>.
14121 (method_header:): Last argument to call to method_header passed
14122 from throws: rule.
14123 (throws:, class_type_list:, throw_statement:,
14124 synchronized_statement:, synchronized:): Defined actions.
14125 (method_header): New local variable current. Register exceptions
14126 from throws clause.
14127 (java_complete_tree): Complete and verify exceptions from throws
14128 clause.
14129 (complete_class_report_errors): Error message on exceptions not
14130 found
14131 (java_check_regular_methods): Fixed typo. Shortcut on private
14132 overriding methods. Changed error message on method
14133 redefinition. Check for throws clause compatibility.
14134 (check_throws_clauses): New function.
14135 (java_check_abstract_methods): Use DECL_NAME for wfl or current
14136 method. Changed error message on method redefinition.
14137 (currently_caught_type_list): New static variable.
14138 (java_complete_expand_methods): Purge unchecked exceptions from
14139 throws clause list. Call PUSH_EXCEPTIONS before walk and
14140 POP_EXCEPTIONS after.
14141 (resolve_qualified_expression_name): Pass new argument as NULL to
14142 patch_method_invocation_stmt.
14143 (patch_method_invocation_stmt): New argument ref_decl. Invoke
14144 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
14145 argument list when appropriate. Use new argument if non null to
14146 store selected method decl.
14147 (patch_invoke): Convert if necessary args of builtin types before
14148 forming CALL_EXPR. Argument list no longer reversed here.
14149 (invocation_mode): Treat final methods as static methods.
14150 (java_complete_tree): New cases for THROW_EXPR: and
14151 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
14152 function call.
14153 (complete_function_arguments): No more RECORD_TYPE
14154 conversion. Function parameter nodes no longer saved.
14155 (valid_ref_assignconv_cast_p): Avoid handling null type.
14156 (patch_binop): Fixed null constant reference handling.
14157 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
14158 BUILD_THROW macros.
14159 (patch_try_statement): Fixed comments. Record caught types in
14160 list, push the list, expand try block and pop the list.
14161 (patch_synchronized_statement, patch_throw_statement,
14162 check_thrown_exceptions, check_thrown_exceptions_do,
14163 purge_unchecked_exceptions): New functions.
14164 * typeck.c (lookup_argument_method): Allow WFL in place of method
14165 DECL_NAME during method definition check
14166
14167 1998-10-09 Tom Tromey <tromey@cygnus.com>
14168
14169 * gjavah.c (decode_signature_piece): New function.
14170 (print_c_decl): Use it. Added `name_override' argument.
14171 (print_method_info): Use name_override argument to print_c_decl.
14172 (seen_fields): Removed.
14173 (print_field_info): Don't update seen_fields.
14174 (struct method_name): New structure.
14175 (method_name_list): New global.
14176 (print_method_info): Add new method to list of methods.
14177 (name_is_method_p): New function.
14178 (print_field_info): If field name has same name as method, then
14179 change field name.
14180 (process_file): Parse methods before fields.
14181 (field_pass): New global.
14182 (HANDLE_END_FIELD): Take field_pass into account.
14183
14184 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14185
14186 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
14187 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
14188
14189 1998-10-03 Anthony Green <green@cygnus.com>
14190
14191 * jvspec.c: Fix bug in jvgenmain_spec patch.
14192
14193 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14194
14195 * Makefile.in (lang.o:): Install dependency on java-tree.def.
14196 * decl.c (soft_exceptioninfo_call_node): New global variable.
14197 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
14198 takes extra integer argument. soft_exceptioninfo_call_node
14199 initialized.
14200 * except.c (java_set_exception_lang_code): New function
14201 (method_init_exceptions): Called here.
14202 (prepare_eh_table_type): New function.
14203 (expand_end_java_handler): Called here.
14204 * expr.c (build_java_throw_out_of_bounds_exception): Now features
14205 one argument. Modified generation of call to
14206 soft_badarrayindex_node to use new argument.
14207 (build_java_arrayaccess): Pass faulty index value to
14208 build_java_throw_out_of_bounds_exception.
14209 (generate_name): New function.
14210 (java_lang_expand_expr): New local variables node, current,
14211 has_finally_p. Expand TRY_EXPR node.
14212 (process_jvm_instruction): Replace top of the stack with thrown
14213 object reference when entering exception handler.
14214 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
14215 specific tree codes.
14216 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
14217 global.
14218 (DECL_SPECIFIC_COUNT): New macro.
14219 (prepare_eh_table_type, java_set_exception_lang_code,
14220 generate_name): New function declarations.
14221 (match_java_method): Declaration deleted.
14222 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
14223 macros.
14224 * lex.c (TRY_TK, CATCH_TK): Generate location information.
14225 * parse.h (redefinition_error, refine_accessible_methods_list,
14226 can_cast_to_p): Function declaration removed.
14227 (classitf_redefinition_error, variable_redefinition_error,
14228 parse_jdk1_1_error, find_applicable_accessible_methods_list,
14229 find_most_specific_methods_list, argument_types_convertible,
14230 enter_a_block, valid_builtin_assignconv_identity_widening_p,
14231 valid_cast_to_p, valid_method_invocation_conversion_p,
14232 try_reference_assignconv, add_stmt_to_compound,
14233 build_jump_to_finally, build_tree_list, patch_try_statement,
14234 java_get_catch_block): New function declarations.
14235 * parse.y (string_buffer_type): Global variable deleted.
14236 (group_of_labels, catches, catch_clause, catch_clause_parameter,
14237 finally): Rules tagged <node>.
14238 (TRY_TK, CATCH_TK): Token tagged <operator>.
14239 (class_body_declaration:, class_member_declaration:,
14240 formal_parameter:, explicit_constructor_invocation:,
14241 interface_member_declaration:, constant_declaration:,
14242 primary_no_new_array:, class_instance_creation_expression:,
14243 array_creation_expression:): Issue error on unsuported JDK1.1
14244 features.
14245 (try_statement:, catches:, finally:): Define actions.
14246 (catch_clause_parameter): New rule.
14247 (catch_clause:): Use new rule catch_clause_parameter.
14248 (parse_jdk1_1_error): New function.
14249 (redefinition_error): Renamed classitf_redefinition_error.
14250 (variable_redefinition_error): New function.
14251 (check_class_interface_creation): Call
14252 classitf_redefinition_error.
14253 (java_complete_tree): Added error message on JDEP_TYPE: case.
14254 (complete_class_report_errors): Fixed indentation.
14255 (declare_local_variables): Call variable_redefinition_error.
14256 (source_end_java_method): Call java_set_exception_lang_code and
14257 emit_handlers where appropriate.
14258 (java_method_add_stmt): Call add_stmt_to_block.
14259 (add_stmt_to_block): New function.
14260 (lookup_method_invoke): Fixed outside comment. new local variable
14261 candicates. Call find_applicable_accessible_methods_list and
14262 find_most_specific_methods_list when searching for a
14263 method. Modified error report to list possible candidates when
14264 applicable.
14265 (find_applicable_accessible_methods_list,
14266 find_most_specific_methods_list, argument_types_convertible): New
14267 function.
14268 (refine_accessible_methods_list): Function deleted.
14269 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
14270 expr (if applicable) before calling patch_array_ref.
14271 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
14272 (enter_block): Fixed comment.
14273 (enter_a_block): New function.
14274 (patch_assignment): Reorganized. Call try_reference_assignconv for
14275 references. Call valid_cast_to_p instead of can_cast_to_p.
14276 (try_reference_assignconv,
14277 valid_builtin_assignconv_identity_widening_p): New functions.
14278 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
14279 (valid_cast_to_p, valid_method_invocation_conversion_p): New
14280 functions.
14281 (build_string_concatenation): Don't resolve StringBuffer.
14282 (patch_cast): Fixed inverted arguments.
14283 (patch_array_ref): Code to save array expr deleted. Call
14284 valid_cast_to_p instead of can_cast_to_p.
14285 (generate_labeled_block): Call generate_name.
14286 (build_jump_to_finally, build_try_statement, java_get_catch_block,
14287 patch_try_statement): New functions.
14288 * typeck.c (match_java_method): Function deleted.
14289
14290 1998-10-02 Anthony Green <green@cygnus.com>
14291
14292 * jvspec.c: jvgenmain_spec uses different temporary file names.
14293
14294 1998-10-02 Anthony Green <green@cygnus.com>
14295
14296 * jvspec.c (lang_specific_driver): Fail if user specifies
14297 --main= when not linking.
14298
14299 1998-09-28 Tom Tromey <tromey@cygnus.com>
14300
14301 * class.c (make_class_data): Push value for `thread' field.
14302 * decl.c (init_decl_processing): Added `thread' field to class.
14303
14304 * class.c (add_field): Always make static fields externally
14305 visible.
14306
14307 1998-09-26 Anthony Green <green@cygnus.com>
14308
14309 * expr.c (build_java_athrow,
14310 build_java_throw_out_of_bounds_exception, expand_invoke,
14311 build_newarray, expand_java_multianewarray, build_java_monitor):
14312 Update comments to reflect _Jv_* function names.
14313
14314 1998-09-25 Per Bothner <bothner@cygnus.com>
14315
14316 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
14317 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
14318 * parse.y (expand_start_java_method): Likewise.
14319
14320 1998-09-24 Per Bothner <bothner@cygnus.com>
14321
14322 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
14323
14324 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
14325 (add_field): No longer need to convert from RECORD_TYPE to pointer,
14326 * expr.c: Remove no-longer-needed calls to promote_type.
14327 * decl.c (give_name_to_locals): Liekwise.
14328 * jcf-parse.c (get_class_constant): Compensate for new signatures.
14329 * parse.y: Add/remove promote_type calls as appropriate.
14330 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
14331 (parse_signature_string): Likewise.
14332 (build_java_array_type): Fix for now signature convenions.
14333
14334 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
14335
14336 1998-09-23 Tom Tromey <tromey@cygnus.com>
14337
14338 * class.c (init_class_processing): libjava function renamed to
14339 _Jv_RegisterClass.
14340
14341 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14342
14343 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
14344 * java-tree.def: Fixed DEFTREECODE third argument.
14345 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
14346 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
14347 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
14348 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14349 JAVA_THIS_EXPR): Now replaced by tree code definitions.
14350 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
14351 * lang.c (java_tree_code_type, java_tree_code_length,
14352 java_tree_code_name): New arrays.
14353 (lang_init): Append Java tree node definitions to Gcc ones.
14354 * lex.c (expression_obstack): Declared as extern when JC1_LITE
14355 defined.
14356 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
14357 wfl_to_string.
14358 (java_lex): Allow declaration of empty string constants. Retain
14359 location information on CASE_TK and DEFAULT_TK.
14360 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
14361 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
14362 Modified to be more robust.
14363 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
14364 (build_new_invocation, try_builtin_assignconv,
14365 patch_switch_statement, string_constant_concatenation,
14366 build_string_concatenation, patch_string_cst, patch_string,
14367 java_expand_switch): New function declarations.
14368 * parse.y: Rules related to switch and EH tagged <node>.
14369 (label_id): Set to NULL_TREE
14370 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
14371 tree nodes.
14372 (this_or_super:): Fixed indentation.
14373 (statement:, statement_nsi:, statement_without_trailing_substatement:,
14374 statement_expression:): Removed call to RULE on all sub-rules.
14375 (switch_expression:, switch_labels:): New rules.
14376 (switch_statement:, switch_block:, switch_block_statement_groups:,
14377 switch_block_statement_group:, switch_labels:, switch_label:):
14378 Defined actions.
14379 (throw_statement:, synchronized_statement:, try_statement:):
14380 Defined temporary actions.
14381 (class_instance_creation_expression:): Call
14382 build_new_invocation. Fixed indentation.
14383 (field_access): Fixed indentation.
14384 (method_invocation): Likewise.
14385 (make_qualified_primary): Use THIS_EXPR.
14386 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
14387 resolving from SUPER, set *type_found.
14388 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
14389 (java_complete_tree): Removed unused local variable `location'. Case
14390 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
14391 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
14392 on MODIFY_EXPR: and all binary operator tree code cases. Removed
14393 STRING_CST: case. default: checks for patchable strings.
14394 (complete_function_arguments): Transform string constant or
14395 crafted StringBuffer if necessary.
14396 (build_method_invocation): Fixed comments.
14397 (build_new_invocation): New function.
14398 (patch_assignment): Call try_builtin_assignconv to figure a valid
14399 assignment conversion between builtin types.
14400 (try_builtin_assignconv): New function.
14401 (build_binop): Use URSHIFT_EXPR directly to call build.
14402 (operator_string): Use UNARY_PLUS_EXPR.
14403 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
14404 operator.
14405 (do_merge_string_cste, merge_string_cste,
14406 string_constant_concatenation, build_string_concatenation,
14407 patch_string, patch_string_cst): New function.
14408 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
14409 (patch_unaryop): Likewise. New test of valid ++/-- operands.
14410 (build_newarray_node): Use NEW_ARRAY_EXPR.
14411 (build_this): Use THIS_EXPR.
14412 (build_return): Enable debug information on return statement.
14413 (build_if_else_statement): Likewise.
14414 (complete_labeled_statement): Fixed related comment.
14415 (build_loop_body): Fixed comment.
14416 (build_bc_statement): Enable debug information on break/continue
14417 statements.
14418 (patch_bc_statement): Fixed typos. Handle SWITCH statement
14419 context.
14420 (patch_switch_statement, case_identity, java_expand_switch): New
14421 functions.
14422
14423 1998-09-21 Per Bothner <bothner@cygnus.com>
14424
14425 * buffer.h (BUFFER_INIT): New macro.
14426 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
14427 Pass (struct jcf_partial *state) to most functions.
14428 (jcf_block, jcf_relocation): New types.
14429 Support labels, branches, conditionals, loops.
14430
14431 1998-09-21 Tom Tromey <tromey@cygnus.com>
14432
14433 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
14434
14435 1998-09-21 Per Bothner <bothner@cygnus.com>
14436
14437 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
14438 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
14439 not integer_type_node (INT_TYPE_SIZ bits).
14440
14441 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
14442
14443 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
14444 * jcf-dump.c (print_exception_table): New function.
14445 (disassemble_method): Better handling of wide instructions.
14446 Make more robust for bad input.
14447
14448 1998-09-30 Jeffrey A Law (law@cygnus.com)
14449
14450 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
14451 FreeBSD.
14452
14453 1998-09-17 Jeffrey A Law (law@cygnus.com)
14454
14455 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
14456
14457 1998-09-17 Tom Tromey <tromey@cygnus.com>
14458
14459 * Makefile.in ($(PARSE_H)): Removed target.
14460
14461 1998-09-17 Jeffrey A Law (law@cygnus.com)
14462
14463 * Makefile.in (JAVA_OBJS): Add memmove.o
14464 (memmove.o): New target & rules.
14465
14466 1998-09-15 Tom Tromey <tromey@cygnus.com>
14467
14468 * expr.c (expand_invoke): Don't generate a call to the class init
14469 code.
14470
14471 1998-09-14 Jeffrey A Law (law@cygnus.com)
14472
14473 * Makefile.in: Add many missing dependencies.
14474 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
14475 as appropriate.
14476 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
14477 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
14478
14479 1998-09-11 Per Bothner <bothner@cygnus.com>
14480
14481 * decl.c (complete_start_java_method): If method is static (and
14482 not private) call _Jv_InitClass.
14483 * expr.c (expand_invoke): Don't call build_class_init.
14484
14485 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
14486
14487 1998-09-10 Jeffrey A Law (law@cygnus.com)
14488
14489 * Make-lang.in (GCJ): Define before using.
14490
14491 1998-09-09 Jeffrey A Law (law@cygnus.com)
14492
14493 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
14494 losing due to namespace pollution in GNU getopt.h
14495
14496 1998-09-09 Tom Tromey <tromey@cygnus.com>
14497
14498 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
14499 (java.all.cross): Likewise.
14500 (java.rest.encap): Likewise.
14501
14502 1998-09-08 Jeffrey A Law (law@cygnus.com)
14503
14504 * gjavah.c (print_class_decls): Fix thinko in arglist
14505 * jcv-io.c (find_classfile): Similarly.
14506
14507 1998-09-07 Jeffrey A Law (law@cygnus.com)
14508
14509 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
14510
14511 1998-09-05 Tom Tromey <tromey@cygnus.com>
14512
14513 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
14514 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
14515 * Makefile.in (PARSE_C): New macro.
14516 (PARSE_H): Likewise.
14517 (PARSE_SCAN_C): Likewise.
14518 ($(PARSE_C)): Target renamed from parse.c.
14519 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
14520 (clean): Remove parse-scan.c as well.
14521 (parse.o): Depend on $(PARSE_C).
14522
14523 1998-09-05 Anthony Green <green@cygnus.com>
14524
14525 * README, license.terms: Removed.
14526
14527 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
14528 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
14529 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
14530 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
14531 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
14532 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
14533 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
14534 and Java trademark attribution.
14535
14536 1998-09-04 Tom Tromey <tromey@cygnus.com>
14537
14538 * Makefile.in: Use gcjh, not gjavah.
14539 * config-lang.in (stagestuff): Use gcjh, not gjavah.
14540 * Make-lang.in: Changed gjavah to gcjh everywhere.
14541
14542 1998-09-03 Per Bothner <bothner@cygnus.com>
14543
14544 * gjavah.c: Support new -prepend -add -append flags.
14545 (print_method_info): Method is not virtual if class is final.
14546
14547 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14548
14549 * jv-scan.c: Fixed copyright assignment.
14550 * keyword.gperf: Likewise.
14551 * keyword.h: Likewise.
14552 * lex.c: Fixed copyright assignment.
14553 (java_lex): Push unicode back when parsing '<'.
14554 * lex.h: Fixed copyright assignment.
14555 * parse-scan.y: Likewise.
14556 * parse.h: Fixed copyright assignment.
14557 (build_debugable_stmt, complete_for_loop): New function prototypes.
14558 * parse.y: Fixed copyright assignment.
14559 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
14560 size_zero_node when completing a loop with no exit condition.
14561 (for_statement_nsi:): Define action.
14562 (for_init:, for_update:): Return size_zero_node when empty.
14563 (declare_local_variables): Call build_debugable_stmt.
14564 (build_debugable_stmt): New function.
14565 (build_loop_body): Build debugable statement around loop
14566 condition part.
14567 (complete_loop_body): Take into account the debugable statement
14568 around the EXIT_EXPR.
14569 (complete_loop_body): New function.
14570 (patch_exit_expr): Fixed condition inversion.
14571
14572 1998-09-02 Tom Tromey <tromey@cygnus.com>
14573
14574 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
14575 name of thread define.
14576 * jvspec.c (THREAD_NAME): New macro.
14577 (GCLIB): Likewise.
14578 (THREADLIB): Likewise.
14579 (lang_specific_driver): Recognize attempt to link with thread
14580 library or gc library. Recognize -ljava on command line so it
14581 isn't linked against more than once.
14582
14583 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14584
14585 * parse-scan.y (report_main_declaration): Name of the class
14586 containing `main' can be a qualified name.
14587
14588 1998-08-31 Tom Tromey <tromey@cygnus.com>
14589
14590 * config-lang.in: Changed gjavac to gjc everywhere.
14591 * Make-lang.in: Changed gjavac to gjc everywhere.
14592
14593 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14594
14595 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
14596 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
14597 and install the files.
14598 * Makefile.in (JAVA_OBJS_LITE): New variable.
14599 (compiler:): Now include jv-scan as a dependency.
14600 (../jv-scan$(exeext), parse-scan.c): New targets.
14601 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
14602 * config-lang.in (compilers): Removed gcj, gjavah from the list.
14603 * jcf-parse.c (parse_source_file): Call java_layout_classes and
14604 check for errors even if parse_only.
14605 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
14606 defined.
14607 (yylex): New function. Uses java_lex body.
14608 (java_lex): Removed commented out statement. Remove local variable
14609 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
14610 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
14611 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
14612 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
14613 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
14614 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
14615 where appropriate.
14616 (java_lex_error): Empty if JC1_LITE is defined.
14617 (java_get_line_col): Return 0 if JC1_LITE is defined.
14618 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
14619 SET_MODIFIER_CTX): Moved into the section containing the macros
14620 conditionally defined by JC1_LITE.
14621 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
14622 argument if JC1_LITE is defined.
14623 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
14624 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
14625 is defined.
14626 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
14627 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
14628 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
14629 to different values according to JC1_LITE.
14630 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
14631 declared if JC1_LITE set.
14632 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
14633 defined if JC1_LITE not set.
14634 (struct parser_ctx): Reorganized and skip the jc1 front end part
14635 if JC1_LITE set.
14636 (java_layout_classes): New function definition.
14637 (java_push_parser_context, java_init_lex, yyparse, yylex,
14638 yyerror): Prototype always declared. All other static function
14639 prototypes declared only if JC1_LITE is not set.
14640 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
14641 declared in parse.h.
14642 (java_layout_classes): New function.
14643 (java_complete_expand_methods): No longer layout the class here.
14644 * parse-scan.y: New file.
14645 * jv-scan.c: New file.
14646
14647 1998-08-25 Tom Tromey <tromey@cygnus.com>
14648
14649 * gjavah.c (main): Handle -friend option.
14650 (friend_specs): New global.
14651 (generate_access): Handle friend_specs.
14652 (process_file): Likewise.
14653 (MAX_FRIENDS): New macro.
14654 (friend_count): New global.
14655 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
14656 Changed all callers.
14657
14658 1998-08-24 Per Bothner <bothner@cygnus.com>
14659
14660 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
14661 (main): Handle processing all the entries of a named .zip archive.
14662 * jcf-io.c (jcf_trim_old_input): New function.
14663 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
14664
14665 1998-08-24 Per Bothner <bothner@cygnus.com>
14666
14667 * lang.c (flag_assume_compiled): Make default be on.
14668
14669 1998-08-21 Per Bothner <bothner@cygnus.com>
14670
14671 * jcf-dump.c: Add bunches of flags to control output more.
14672 (process_class): New function; support printing more than one class.
14673 (main): Support new --print-main and --javap flags.
14674 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
14675 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
14676
14677 1998-08-20 Per Bothner <bothner@cygnus.com>
14678
14679 Change mangling of dispatch table to match C++ vtable (w/thunks).
14680 * class.c (build_dtable_decl), java-tree.h: New function.
14681 (make_class_data): Call it.
14682 * decl.c (init_decl_processing): Likewise.
14683
14684 1998-08-19 Warren Levy <warrenl@cygnus.com>
14685
14686 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
14687 soft_anewarray; adjust args passed.
14688 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
14689 match _Jv_NewObjectArray.
14690
14691 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14692
14693 * decl.c (push_labeled_block, pop_labeled_block): New functions.
14694 * expr.c (loopup_label): Call create_label_decl.
14695 (create_label_decl): New function.
14696 (java_lang_expand_expr): Call expand_start_bindings with argument
14697 set to zero.
14698 * java-tree.h Added space after PROTO in function declarations
14699 when necessary.
14700 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
14701 (create_label_decl, push_labeled_block): New function
14702 declarations.
14703 * lex.c (label_id): Initialize.
14704 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
14705 switch.
14706 * parse.h Added space after PROTO in function declarations when
14707 necessary.
14708 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
14709 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
14710 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
14711 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
14712 macros.
14713 (struct parser_ctxt): New fields current_loop,
14714 current_labeled_block.
14715 (build_if_else_statement, patch_if_else_statement,
14716 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
14717 generate_labeled_block, complete_labeled_statement,
14718 build_bc_statement, patch_bc_statement, patch_loop_statement,
14719 build_new_loop, build_loop_body, complete_loop_body): New function
14720 declarations.
14721 * parse.y (java_warning_count): New global variable.
14722 (label_id): New static variable.
14723 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
14724 (block:): Return size_zero_node when block is empty.
14725 (empty_statement:): Return size_zero_node.
14726 (statement:): Implement supplemental action when for_statement: is
14727 reduced.
14728 (label_decl:): New rule.
14729 (labeled_statement:): Rewritten using label_decl. Actions
14730 implemented.
14731 (labeled_statement_nsi:): Likewise.
14732 (if_then_statement): Actions implemented.
14733 (while_expression): New rule.
14734 (while_statement:): Rewritten using while_expression. Actions
14735 implemented.
14736 (while_statement_nsi:): Likewise.
14737 (do_statement_begin:): New rule.
14738 (do_statement:): Rewritten using do_statement_begin. Actions
14739 implemented.
14740 (for_statement:): Rewritten using for_begin. Actions implemented.
14741 (for_statement_nsi:): Likewise.
14742 (for_header:, for_begin:): New rules.
14743 (for_init:): Actions implemented.
14744 (statement_expression_list:, break_statement:,
14745 continue_statement:): Likewise.
14746 (yyerror): Count number of issued warning(s).
14747 (java_report_errors): Report error(s) and/or warning(s).
14748 (java_complete_class): Use build_java_argument_signature to
14749 recompute completed method signature.
14750 (java_check_regular_methods): New locals method_wfl and aflags.
14751 Use method_wfl instead of lookup_cl during error reports. Fixed
14752 indentation and modified some error messages. Use
14753 lang_printable_name in method instead of the DECL_NAME. New code
14754 to issue warnings on methods not overriding corresponding methods
14755 private to a different package.
14756 (java_method_add_stmt): Call add_stmt_to_compound.
14757 (add_stmt_to_compound): New function.
14758 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
14759 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
14760 (build_if_else_statement, patch_if_else_statement,
14761 build_labeled_block, generate_labeled_block,
14762 complete_labeled_statement, build_new_loop, build_loop_body,
14763 complete_loop_body, patch_loop_statement, build_bc_statement,
14764 patch_bc_statement, patch_exit_expr): New functions.
14765 * typeck.c (build_java_signature): Build argument signature before
14766 enclosing it in between parenthesis.
14767
14768 1998-08-17 Warren Levy <warrenl@cygnus.com>
14769
14770 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
14771 (JAVA_OBJS): Added reminder comment
14772
14773 1998-08-13 Nick Clifton <nickc@cygnus.com>
14774
14775 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
14776 be interpreted as a long long.
14777
14778 1998-08-13 Warren Levy <warrenl@cygnus.com>
14779
14780 * decl.c (init_decl_processing): Use _Jv_InitClass, not
14781 soft_initialise_class. Use _Jv_NewMultiArray, not
14782 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
14783 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
14784 _Jv_CheckArrayStore, not soft_checkarraystore. Use
14785 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
14786
14787 1998-08-12 Per Bothner <bothner@cygnus.com>
14788
14789 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
14790 length_identifier_node): New global tree node constants.
14791 * parse.y (kw_super, kw_this, kw_length): Removed globals.
14792 Replace uses by super_identifier_node etc.
14793 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
14794
14795 * parse.y (resolve_field_access): Don't special-case ".length" if
14796 flag_emit_class_files.
14797 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
14798 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
14799 and ARRAY.length.
14800
14801 1998-08-11 Per Bothner <bothner@cygnus.com>
14802
14803 * decl.c (init_decl_processing): Remove unused method_type_node fields.
14804 * class.c (make_method_value): Remove init for removed fields.
14805
14806 * class.c (layout_class): Use build_java_argument_signature.
14807 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
14808
14809 * typeck.c (push_java_argument_signature): Removed. Merged into ...
14810 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
14811 (build_java_signature): Don't use push_java_argument_signature.
14812
14813 * typeck.c (lookup_argument_method): New function.
14814 * parse.y (java_check_regular_methods): Use lookup_argument_method
14815 instead of lookup_java_method2 followed by lookup_java_method.
14816
14817 * parse.y (check_method_redefinition): Minor optimization.
14818
14819 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
14820 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
14821
14822 1998-08-10 Tom Tromey <tromey@cygnus.com>
14823
14824 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
14825 c-pragma.o.
14826
14827 * gjavah.c (java_float_finite): Use K&R-style definition.
14828 (java_double_finite): Likewise.
14829 (generate_access): Now returns void. Changed all callers.
14830 (last_access_generated): Removed.
14831 (process_file): Only make a single pass over the .class file.
14832
14833 1998-07-29 Per Bothner <bothner@cygnus.com>
14834
14835 * class.c (get_dispatch_table): Add extra dummy vtable entry,
14836 for compatibility for G++ (with -fvtable-thunks).
14837 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
14838
14839 * gjavah.c (process_file): Use public inheritance for super-class.
14840
14841 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
14842
14843 * lex.c (java_init_lex): Initialize ctxp->package.
14844 * parse.h (struct parser_ctxt): package and package_len replaced
14845 by tree package, an identifier node. Field method_decl_list is
14846 gone. Fixed comments.
14847 (lookup_field_wrapper, merge_qualified_name, not_accessible,
14848 class_in_current_package): New function prototypes.
14849 * parse.y (array_type:): Set class loaded flag on primitive type
14850 arrays.
14851 (package_declaration:): Assign ctxp->package to the
14852 identifier node.
14853 (method_invocation:): Handle invocation of method qualified by
14854 `super'.
14855 (single_type_import_declaration:): Removed ambiguity check.
14856 (java_pop_parser_context): New local variable `next'. Reset and
14857 set IMPORT_CLASSFILE_NAME flags on current and previous import
14858 list.
14859 (java_accstring_lookup): Use new local macro COPY_RETURN.
14860 (lookup_field_wrapper): New function.
14861 (parser_qualified_classname): Use merge_qualified_name.
14862 (parser_check_super_interface): Broaden error message.
14863 (do_resolve_class): Check for qualified class name in the current
14864 compilation unit if appropriate.
14865 (process_imports): Check for already defined classes.
14866 (check_pkg_class_access): Got rid of call to
14867 get_access_flags_from_decl.
14868 (java_complete_expand_methods): Call safe_layout_class based on
14869 the current class size.
14870 (make_qualified_primary): Build a WFL qualification on primary if
14871 none exists.
14872 (merge_qualified_name): New function.
14873 (make_qualified_name): Use merge_qualified_name.
14874 (resolve_expression_name): Use safe_lookup_field.
14875 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
14876 (resolve_qualified_expression_name): Likewise. Check on resolved
14877 element accessibility.
14878 (not_accessible_p, class_in_current_package): New functions.
14879 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
14880 (patch_method_invocation_stmt): Merged common pieces. Check
14881 accessibility of invoked method.
14882 (check_for_static_method_reference): Add returned type in error
14883 message.
14884 (invocation_mode): Get rid of bogus check on PRIVATE methods.
14885 (refine_accessible_methods_list): Merged two conditions in test.
14886 (java_complete_class): Sanity check on stabilize_ref gone.
14887 * zextract.c (read_zip_archive): Cast lseek second argument to long.
14888
14889 1998-07-28 Per Bothner <bothner@cygnus.com>
14890
14891 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
14892
14893 1998-07-24 Tom Tromey <tromey@cygnus.com>
14894
14895 * gjavah.c (F_NAN): Removed.
14896 (F_NAN_MASK): New macro.
14897 (F_POSITIVE_INFINITY): Removed.
14898 (F_NEGATIVE_INFINITY): Likewise.
14899 (java_float_finite): Rewrote.
14900 (D_NAN_MASK): Renamed.
14901 (java_double_finite): Rewrote.
14902 (D_POSITIVE_INFINITY): Removed.
14903 (D_NEGATIVE_INFINITY): Likewise.
14904
14905 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
14906 If verbose, print underlying representation of value in hex.
14907
14908 1998-07-24 Per Bothner <bothner@cygnus.com>
14909
14910 * buffer.h, buffer.c: New files.
14911 * Makefile.in (JAVA_OBJS): Add buffer.o.
14912
14913 Support locals variables and writing their debug entries to .class.
14914 * jcf-write.c: Simplify some by user new buffer type.
14915 (vode_buffer_grow): Removed.
14916 (struct localvar_info): New type.
14917 (localsvars, localvartable): New buffers.
14918 (localvar_alloc, localvar_free): New functions.
14919 (generate_bytecode_insns): Handle local variables.
14920 (generate_classfile): Write LocalVariableTable attribute.
14921
14922 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14923
14924 * jcf-io.c (open_in_zip): Check the zipfile magic number.
14925 * zipfile.h (ZIPMAGIC): New macro.
14926
14927 1998-07-24 Tom Tromey <tromey@cygnus.com>
14928
14929 * Makefile.in (gjavah.o): Updated dependencies.
14930 (jcf-dump.o): Likewise.
14931 (all.indirect): Use ../gjavah.
14932 (../gjavah$(exeext)): Likewise.
14933 (clean): Don't remove gjavah.
14934 (clean): Remove parse.c, not java/parse.c.
14935 * Make-lang.in (java): Added gjavah.
14936 (gjavah$(exeext)): New target.
14937 (GJAVAH_SOURCES): New macro.
14938 (java.all.build): Added gjavah.
14939 (java.all.cross): Likewise.
14940 (java.rest.encap): Likewise.
14941 * config-lang.in (compilers, stagestuff): Added gjavah.
14942
14943 1998-07-23 Tom Tromey <tromey@cygnus.com>
14944
14945 * gjavah.c (java_float_finite): New function.
14946 (java_double_finite): Likewise.
14947 (F_POSITIVE_INFINITY): New macro.
14948 (F_NEGATIVE_INFINITY): Likewise.
14949 (F_NAN): Likewise.
14950 (D_POSITIVE_INFINITY): Likewise.
14951 (D_NEGATIVE_INFINITY): Likewise.
14952 (D_NAN): Likewise.
14953 (print_field_info): Use java_float_finite and java_double_finite.
14954
14955 1998-07-23 Per Bothner <bothner@cygnus.com>
14956
14957 * parse.y (method_header): Name "this" implicit argument.
14958
14959 1998-07-22 Per Bothner <bothner@cygnus.com>
14960
14961 * jcf-write.c: Write out LineNumberTable attribute in .class file.
14962 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
14963 (put_linenumber): New function.
14964 (generate_bytecode_insns, generate_classfile): Write line numbers.
14965
14966 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14967
14968 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
14969 (lookup_name, build_known_method_ref, build_class_init,
14970 build_invokevirtual, invoke_build_dtable, match_java_method,
14971 build_field_ref, pushdecl_force_head, build_java_binop,
14972 binary_numeric_promotion, build_decl_no_layout,
14973 build_java_arrayaccess, build_newarray, build_anewarray,
14974 build_java_array_length_access, build_java_arraynull_check): New
14975 extern function prototypes.
14976 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14977 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
14978 java-tree.h.
14979 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
14980 to NULL
14981 * jcf.h (jcf_out_of_synch): New extern function prototype.
14982 * parse.h: Static/global function implemented in parse.y
14983 prototyped and declarations moved at the end of the file.
14984 (DECL_P): Check that the argument isn't null.
14985 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14986 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
14987 (QUAL_DECL_TYPE): New macro.
14988 (PARAMS): Macro definition removed.
14989 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
14990 (return_statement:): Call build_return.
14991 (field_access:): Call make_qualified_primary in sub rule.
14992 (method_invocation:): Build method invocation and call
14993 make_qualified_primary when processing primaries.
14994 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
14995 get_type_from_signature.
14996 (java_check_regular_method): Extra integer 0 argument when calling
14997 lookup_java_method2.
14998 (lookup_java_interface_method2): Extra method DECL argument when
14999 calling lookup_java_interface_method2.
15000 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
15001 COMPOUND_EXPR node.
15002 (java_complete_expand_method): Layout current class iff not
15003 already done. Don't process interface's methods.
15004 (java_complete_expand_method): Use super class only if it
15005 exists. Use current class otherwise.
15006 (make_qualified_primary): New function.
15007 (resolve_expression_name): Process qualified expression or
15008 expression from primary the same way.
15009 (resolve_expression_name): Two last arguments to
15010 resolve_field_access are now NULL_TREEs.
15011 (resolve_field_access): New variable is_static. Local field must
15012 be DECLs. is_static computed on field DECLs only. Append code in
15013 where_found to the field access if necessary. Use QUAL_DECL_TYPE
15014 to initialize field_type.
15015 (resolve_qualified_expression_name): New local variable,
15016 previous_call_static and is_static. Handle primaries with function
15017 calls, casts, array references and `this'. `super' now handled as
15018 `(super_class)this'. Use is_static to clarify boolean expressions.
15019 Added code to handle case where a proper handle is required to
15020 access a field. Use QUAL_DECL_TYPE where applicable.
15021 (maybe_access_field): New function.
15022 (patch_method_invocation_stmt): New arguments primary, where,
15023 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
15024 deleted. Use `where' as a type to search from if specified. Check
15025 for static method reference where forbidden. Append primary or
15026 current_this to the argument list if not calling constructor nor
15027 static methods.
15028 (check_for_static_method_reference): New function.
15029 (patch_invoke): Layout the class on which new is done if
15030 necessary.
15031 (lookup_method_invoke): Changed format to report errors on
15032 methods.
15033 (qualify_ambiguous_name): New local variable this_found. Now
15034 handle things from primaries. Method call are considered
15035 expression names.
15036 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
15037 changed into NULLs.
15038 (not_initialized_as_it_should_p): Comply with the new DECL_P.
15039 (java_complete_tree): New case fo RETURN_EXPR. Process function
15040 call arguments in separate function.
15041 (complete_function_arguments): New function.
15042 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
15043 anymore.
15044 (patch_assignment): Take the return function slot into account as
15045 a RHS. Distinguish assignment from a return.
15046 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
15047 when checking methods in interfaces.
15048 (resolve_type_during_patch): NULL argument to unresolve_type_p
15049 instead of NULL_TREE.
15050 (patch_newarray): Fixed typo in comment.
15051 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
15052 (build_return, patch_return): New functions.
15053 * typeck.c (lookup_java_constructor): Fixed typo in comment.
15054
15055 1998-07-21 Per Bothner <bothner@cygnus.com>
15056
15057 * constants.c (find_name_and_type_constant, find_fieldref_index,
15058 find_methodref_index): New methods.
15059 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
15060 just return given method. Also, rename to build_known_method_ref.
15061 (expand_invoke): Rename call to build_invoke_non_interface.
15062 * java-tree.h, parse.h: Update prototype.
15063 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
15064 (such as expand_expr_stmt) if flag_emit_class_files.
15065 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
15066 STACK_TARGET, IGNORE_TARGET): New macros.
15067 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
15068 (generate_bytecode_insn): New function to generate method's bytecode.
15069 (generate_classfile): Node generate Code attribute for a method.
15070 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
15071 push_long_const, field_op, adjust_typed_op, maybe_wide):
15072 New functions used by generate_bytecode_insn.
15073
15074 * typeck.c (signature_include_return): Remove variable.
15075 (push_java_argument_signature, build_java_argument_signature): New.
15076 (build_java_signature): Use push_java_argument_signature.
15077 * parse.y: Use build_java_argument_signature instead of fiddling
15078 with signature_include_return.
15079
15080 1998-07-17 Tom Tromey <tromey@cygnus.com>
15081
15082 * gjavah.c (print_c_decl): Always generate JArray<>* for array
15083 types.
15084
15085 * Makefile.in (all.indirect): Added gjavah$(exeext).
15086 (gjavah$(exeext)): Added $(exeext).
15087 (clean): Likewise.
15088
15089 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15090
15091 * class.c (layout_class): Call to java_layout_parsed_class replace
15092 by safe_layout_class.
15093 * expr.c (build_java_array_length_access): Removed static storage
15094 class in the function definition.
15095 (build_java_arraynull_check): Likewise.
15096 Also fixed typos in two comments.
15097 * lex.c (java_init_lex): Initialize static global kw_length.
15098 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
15099 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
15100 java_lex_error.
15101 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
15102 * parse.h (resolve_no_layout): New static function declaration.
15103 (get_identifier_in_static): Declaration removed.
15104 (java_layout_parsed_class): Function name declaration changed to
15105 safe_layout_class.
15106 (build_newarray_node, patch_newarray, resolve_type_during_patch,
15107 not_initialized_as_it_should_p, build_this): New static function
15108 declarations.
15109 (pushdecl_force_head, build_java_binop, int_fits_type_p,
15110 binary_numeric_promotion, stabilize_reference,
15111 build_decl_no_layout, build_java_arrayaccess): Extern function
15112 declarations moved into their own section.
15113 (build_newarray, build_anewarray, build_java_array_length_access,
15114 build_java_arraynull_check): New extern function declarations.
15115 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
15116 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
15117 fake tree codes.
15118 (CALL_CONSTRUCTOR_P): New macro.
15119 * parse.y (kw_length): New static global tree node.
15120 (return_statement): Tagged <node>.
15121 (RETURN_TK): Tagged <operator>.
15122 (variable_declarator_id:): Build variable declaration with an
15123 empty initialization value if a syntax error was found in the
15124 initialization part of the variable declaration.
15125 (statement_without_trailing_substatement:): return_statement: now
15126 uses the default rule.
15127 (return_statement:): Temporarily fixed to return NULL_TREE.
15128 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
15129 (class_instance_creation_expression:): Class creation rules now
15130 call build_method_invocation upon reduction.
15131 (array_creation_expression:): Rules call build_newarray_node upon
15132 reduction.
15133 (dim_exprs:): Build a list of dimension expressions.
15134 (dim_expr:): Store location of the OSB_TK in the dimension
15135 expression node.
15136 (method_invocation:): Added a new error rule.
15137 (build_unresolved_array_type): WFL argument may also be an array
15138 on a primitive type. Name of the argument changed to reflect this.
15139 (method_declarator): Insert argument type at the beginning of the
15140 argument type list and later reverse the list.
15141 (unresolved_type_p): Argument 'returned' may be optionally
15142 NULL_TREE.
15143 (java_layout_class_from_source): Function renamed
15144 safe_layout_class.
15145 (resolve_and_layout): Now call resolve_no_layout and
15146 safe_layout_class.
15147 (resolve_no_layout): New function.
15148 (purify_type_name): New function.
15149 (complete_class_report_errors): Call purify_type_name during error
15150 report on a type not found.
15151 (process_imports): error_found local variable doesn't need to be
15152 initialized to zero.
15153 (declare_local_variables): New local type_wfl. Fixed typo in error
15154 message. type_wfl assigned to unresolved type and used to register
15155 incomplete type. Build a WFL around the variable initialization
15156 statement so that debug info can be generated on it.
15157 (source_start_java_method): Reverse argument list after they've
15158 been processed.
15159 (current_this): New static global variable.
15160 (java_complete_expand_methods): Set current_this when appropriate.
15161 (resolve_expression_name): Build correct static and non static
15162 field access bearing a simple name.
15163 (resolve_field_access): Resolve the length field of arrays. Handle
15164 f.m() cases.
15165 (patch_method_invocation_stmt): Set the type of the method
15166 invocation to error_mark_node. This value is later overridden by a
15167 valid type, if any. Don't handle qualified constructor invocation
15168 as qualified method invocation. Call lookup_method_invoke with its
15169 new flag. It's no longer necessary to access the selected method
15170 as the value of a tree list. Handle constructor invocation.
15171 (patch_invoke): Reverse argument list when invoking non interface
15172 methods. Insert call to new as the first argument of the
15173 constructor.
15174 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
15175 defined within a final class. Return INVOKE_STATIC if the invoked
15176 method is a constructor.
15177 (lookup_method_invoke): New lc argument is a flag to indicate a
15178 constructor lookup. Now handle constructor lookup. Choose the most
15179 specific method in case several were matching the invocation
15180 requirements. Return a method decl instead of a tree list featuring
15181 one single method decl element.
15182 (refine_accessible_methods_list): New lc flag argument to
15183 indicate that a constructor is being looked up.
15184 (not_initialized_as_it_should_p): New function.
15185 (java_complete_tree): Now process fake tree codes
15186 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
15187 save_expr on resolved function call arguments. Case on
15188 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
15189 (patch_assignment): LHS can be a field access expression. When
15190 dealing with reference, lhs_type is the promoted type of the
15191 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
15192 applicable.
15193 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
15194 (patch_binop): Use not_initialized_as_it_should_p where
15195 applicable.
15196 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
15197 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
15198 where applicable.
15199 (resolve_type_during_patch): New function.
15200 (patch_cast): Call resolve_type_during_patch to resolve type and
15201 report error accordingly.
15202 (patch_array_ref): Use not_initialized_as_it_should_p where
15203 applicable. Array base expression is saved before being
15204 used. Promote the type of an array elements if it contains non
15205 builtin types.
15206 (build_newarray_node, patch_newarray, build_this): New functions.
15207
15208 1998-07-16 Tom Tromey <tromey@cygnus.com>
15209
15210 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
15211 increment it in `for' statement.
15212 (print_field_info): If number is inf or nan, don't print it.
15213 (print_method_info): If method name is `delete', just ignore it.
15214 (print_c_decl): Special-case jstringArray.
15215
15216 * gjavah.c (help): New function.
15217 (no_argument): New function.
15218 (usage): Changed text.
15219 (main): Rewrote argument handling. Now handles -v, --help,
15220 --version.
15221 (version): New function.
15222 (found_error): New global.
15223 (main): Return found_error.
15224 (generate_access): Set found_error.
15225 (print_c_decl): Likewise.
15226
15227 1998-07-15 Tom Tromey <tromey@cygnus.com>
15228
15229 * gjavah.c (print_c_decl): Don't print "," when examining field.
15230 Skip type name when looking at "[L" types.
15231 (process_file): Now static.
15232 (generate_access): Now returns int.
15233 (last_access_generated): New global.
15234 (process_file): Clear last_access_generated; make multiple passes
15235 over the class.
15236 (print_field_info): Just return if generate_access returns true.
15237 (print_method_info): Likewise. Also, allow <init> functions to
15238 pass through.
15239 (print_c_decl): Added is_init argument. Print constructors
15240 properly.
15241 (print_cxx_classname): Use UTF8_GET to extract characters from
15242 string.
15243 (print_base_classname): New function.
15244 (print_class_decls): New function.
15245 (process_file): Use it.
15246 (utf8_cmp): New function.
15247
15248 1998-07-13 Nick Clifton <nickc@cygnus.com>
15249
15250 * lang-options.h: Format changed to match changes in gcc/toplev.c
15251 to implement a --help option.
15252
15253 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
15254
15255 * decl.c (init_decl_processing): Revert change to dtable_type.
15256
15257 1998-07-09 Per Bothner <bothner@cygnus.com>
15258
15259 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
15260
15261 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
15262
15263 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
15264
15265 * lang.c (lang_init): Default flag_exceptions to 1, without
15266 checking to see if it's 2 first.
15267
15268 1998-07-08 Jeffrey A Law (law@cygnus.com)
15269
15270 * constants.c: Include "system.h".
15271 * decl.c: Likewise.
15272 * lang.c (flag_new_exceptions): Get via extern now.
15273 (lang_init_options): New functions. Turn on flag_new_exceptions.
15274
15275 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
15276
15277 * lex.c (java_lex): Return 0 when we see an invalid character in
15278 the input.
15279
15280 * lex.c (java_read_char): Specify extra argument when calling
15281 java_lex_error.
15282 (java_read_unicode, java_parse_end_comment,
15283 java_parse_escape_sequence): Likewise,
15284 (java_lex): Specify extra argument when calling
15285 java_lex_error. Test that IDs are beginning with a legal character
15286 for IDs. Handle invalid characters with an error message and a
15287 call to java_lex_error.
15288 (java_lex_error): Adjust column position by new argument
15289 `forward'. Issue an error even if in the middle of reporting an
15290 other error.
15291
15292 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
15293
15294 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
15295 we don't explicitly put a null pointer when we're copying it.
15296
15297 1998-07-07 Tom Tromey <tromey@cygnus.com>
15298
15299 * gjavah.c (print_cxx_classname): New function.
15300 (super_class_name): Likewise.
15301 (print_super_fields): Removed.
15302 (in_super): Removed.
15303 (print_field_info): Never generate #defines.
15304 (print_c_decl): Changed generated types to match JNI. No longer
15305 print class name before method name.
15306 (print_method_info): Print "static" before static methods.
15307 Print "virtual" before non-final methods.
15308 (usage): Use exit(1), not exit(-1).
15309 (main): Likewise.
15310 (print_field_info): Use %.17g to print a double.
15311 (last_access): New globals.
15312 (process_file): Initialize last_access.
15313 (usage): Now static.
15314 (ACC_VISIBILITY): New define.
15315 (generate_access): New function.
15316 (print_field_info): Call it.
15317 (print_method_info): Likewise. Also, generate information for all
15318 methods, not just native methods. Return void.
15319 (print_c_decl): Return void.
15320 (print_field_info): Return void.
15321
15322 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
15323
15324 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
15325 processing the jc1 grammar file. Prefix bison functions and
15326 variables with java_.
15327 (parse.c): Dependencies on parse.h and lex.h
15328 * expr.c (build_java_arrayaccess): Function now global.
15329 * java-tree.h: Comment reorganized to carry on previous
15330 classification effort.
15331 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
15332 RESOLVE_TYPE_NAME_P): New flags on WFLs.
15333 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
15334 java_parse (new prefix java_ generated by bison).
15335 (java_layout_parsed_class, java_register_parsed_class): Function
15336 call removed.
15337 (yyparse): Removed unnecessary call to init_outgoing_cpool.
15338 * lex.c (static tree wfl_op): Variable deleted.
15339 (java_init_lex): Initialize kw_super and kw_this. Initialize more
15340 ctxp fields to NULL_TREE.
15341 (java_lex): No longer create WFL for operators. Filename caching
15342 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
15343 created as STRING_CST and later expanded. Removed extra argument
15344 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
15345 and SUPER.
15346 (build_wfl_node): Removed code in comments.
15347 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
15348 store token and location data in the current bison token.
15349 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
15350 static/extern function declaration at the beginning of the file.
15351 (struct qualification): Data structure definition deleted.
15352 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
15353 (qualify_ambiguous_name): Function declaration modified. Function
15354 now returns nothing.
15355 (build_array_ref, patch_array_ref, make_qualified_name,
15356 resolve_qualified_expression_name, maybe_generate_clinit,
15357 resolve_field_access): New static function declarations.
15358 (build_java_arrayaccess): New extern function declaration.
15359 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
15360 (CALL_EXPR_PRIMARY): Macro deleted.
15361 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
15362 (struct parser_ctxt): Field initialized_final
15363 removed. non_static_initialized, static_initialized: New fields.
15364 * parse.y (static tree kw_super, static tree kw_this): New global
15365 static.
15366 (%union): tree wfl field of operator member replaced by int
15367 location. WFLs are non longer created for operators.
15368 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
15369 (qualified_name:): Now calls make_qualified_name to build the
15370 identifier.
15371 (type_declaration:): Consider generating <clinit> when class
15372 parsing completed.
15373 (variable_declarator:): Directly build an assignment node when the
15374 variable is initialized when declared.
15375 (this_or_super:): Build a WFL and set current location when THIS
15376 or SUPER are parsed.
15377 (expression_statement:): Wrap statement around a WFL.
15378 (primary_no_new_array:): Fixed typo. Changed value returned by
15379 THIS_TK because of its new type (temporary).
15380 (dim_exprs:): Temporary fix because of OSB_TK's new type.
15381 (field_access:): Build qualified name with SUPER.
15382 (method_invocation:): Fixed returned value because of SUPER's new
15383 type.
15384 (array_access:): Use OSB_TK location information.
15385 (post_increment_expression:, post_decrement_expression:,
15386 unary_expression:, pre_increment_expression:,
15387 pre_decrement_expression:, unary_expression_not_plus_minus:,
15388 cast_expression:, multiplicative_expression:,
15389 additive_expression:, shift_expression:, relational_expression:,
15390 equality_expression:, and_expression:, exclusive_or_expression:,
15391 inclusive_or_expression:, conditional_and_expression:,
15392 conditional_or_expression:, assignment:): Use new location/token
15393 information available on operators.
15394 (create_class): Set super_decl_type to NULL_TREE when processing
15395 java.lang.Object.
15396 (register_fields): Field initialization is now a MODIFY_EXPR
15397 node. Chain initialization code to the matching lists (according
15398 to the field declaration modifiers).
15399 (maybe_generate_clinit): New function.
15400 (method_header): Don't set method's DECL_NAME to a WFL when adding
15401 methods to java.lang.Object.
15402 (resolve_and_layout): Now can return NULL_TREE if the type
15403 resolution fails. Otherwise, return the class DECL instead of its
15404 TYPE.
15405 (check_method_redefinition): Don't patch method DECL_NAME if it
15406 belongs to java.lang.Object.
15407 (process_imports): Simply assign error_found to the value returned
15408 by check_pkg_class_access.
15409 (declare_local_variables): Don't use their init statements (if
15410 any) when parsing error were previously found. Reuse MODIFY_EXPR
15411 build during parsing as an init statement.
15412 (java_method_add_stmt): Now return the current method body.
15413 (java_layout_parsed_class, java_register_parsed_class): Functions
15414 removed.
15415 (java_complete_expand_methods): Initialize the constant pool on a
15416 per class basis. Layout the classes before expanding their method
15417 bodies. Don't try expand artificial constructor code if error were
15418 found. Make the classes data and register them if no error were
15419 found.
15420 (java_complete_expand_method): Retrieve an artificial constructor
15421 argument list before entering its body. Assign the top block to
15422 the artificial constructor function body and set types of declared
15423 blocks and compound statements to void. Walk method body if not an
15424 artificial constructor.
15425 (make_qualified_name, cut_identifier_in_qualified): New functions.
15426 (resolve_expression_name): Fixed comments. Save/restore the
15427 current class CLASS_LOADED_P flag value. Build non qualified
15428 static field access and handle qualified expression names.
15429 (resolve_field_access, resolve_qualified_expression_name): New
15430 functions.
15431 (patch_method_invocation_stmt): Use the new expression resolution
15432 scheme, calling resolve_field_access when the function call is
15433 resolved as an expression.
15434 (qualify_ambiguous_name): Function rewritten to work on qualified
15435 expression produced by make_qualified_name.
15436 (java_complete_tree): Promote type when function's argument are
15437 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
15438 the assignment to discover further errors if RHS is a expression
15439 name that fails to evaluate. Declare LHS initialized even though
15440 the assignment failed. Don't use the location variable and removed
15441 extra argument in patch function calls. Now handle the ARRAY_REF
15442 case and build internal string representation when STRING_CSTs are
15443 walked.
15444 (build_method_invocation): Don't wrap function call around a WFL.
15445 (build_assignment): Likewise. Use the operator location
15446 information.
15447 (patch_assignment): Handle array access LHSs. Handle error
15448 provenance, resulting in a better error report.
15449 (build_binop): Use op_location from operator as binop location
15450 information.
15451 (build_unaryop, build_incdec, build_cast): Likewise.
15452 (patch_binop): Extract location information from the node. Fixed
15453 typo in error message.
15454 (patch_unary_op): Extract location information from the node.
15455 (build_array_ref, patch_array_ref): New functions.
15456
15457 1998-07-01 Tom Tromey <tromey@cygnus.com>
15458
15459 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
15460 match _Jv_IsInstanceOf.
15461 * decl.c (init_decl_processing): Use _Jv_NewArray, not
15462 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
15463
15464 1998-06-30 Tom Tromey <tromey@cygnus.com>
15465
15466 * decl.c (init_decl_processing): Functions are now named
15467 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
15468
15469 1998-06-29 Per Bothner <bothner@cygnus.com>
15470
15471 * java-tree.h (load_class): Add prototype.
15472 * class.c (is_compiled_class): Add missing arg to load_class.
15473 * expr.c (expand_java_NEW): Call load_class.
15474 * parse.y (process_import): Removed bogus use of void return value.
15475
15476 1998-06-25 Per Bothner <bothner@cygnus.com>
15477
15478 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
15479 Function name is "_Jv_Throw" instead of "soft_athrow".
15480 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
15481 Function name is "_Jv_AllocObject" instead of "soft_new".
15482 Takes an extra parameter (object size).
15483 * expr.c: Update calls.
15484
15485 1998-06-24 Per Bothner <bothner@cygnus.com>
15486
15487 * lex.c (java_get_line_col): Handle end-of-file.
15488 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
15489
15490 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
15491
15492 * lang.c (lang_init): Make -fexceptions the default.
15493 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
15494 exception handling is not turned on.
15495
15496 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
15497
15498 * lang.c (flag_new_exceptions): Make this this default.
15499 * decl.c (end_java_method): Call emit_handlers.
15500 * except.c (method_init_exceptions): Set language code and version.
15501 (expand_start_java_handler): Enable exception, and call
15502 expand_eh_region_start.
15503 (expand_end_java_handler): Enable exception, and set up catch blocks.
15504 (emit_handlers): New routine to generate the saved handlers.
15505 * java-except.h (emit_handlers): Add prototype.
15506
15507 1998-06-12 Per Bothner <bothner@cygnus.com>
15508
15509 We used to have three different representations of the constant pool:
15510 the CPool structure, the tree_constant_pool, and the constructures
15511 used to build the Class object (which may need class and string
15512 constants) in compiled code. None were appropriate for compiling
15513 to .class files, so I did a major overhaul.
15514
15515 First, the tree_constant_pool array was removed. Things were
15516 modified to the CPool structure in the JCF could be used.
15517 Second, a "capacity" field was added to the CPool, and functions
15518 written to search for a matching constant, adding one if not found.
15519 The code that generated the Class object was changed to use a CPool.
15520 The actual TREE_LISTs used to build the CONSTRUCTORs used for
15521 the static Class object are now only in build_constants_constructor.
15522 Finally, I wrote code which can generate a .class file (including its
15523 constant pool) from the RECORD_TYPE of a class. This is a big step
15524 on the way to compiling Java source into .class files.
15525
15526 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
15527 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
15528
15529 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
15530 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
15531 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
15532 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
15533 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
15534 (lang_type): Removed constant_pool field.
15535 * jcf.h (CPool): Renamed size to count. Added field capacity.
15536 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
15537 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
15538 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
15539
15540 * constants.c (current_constant_pool_tags, current_constant_pool_data,
15541 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
15542 * constants.c (build_constants_constructor): Use new outgoing_cpool.
15543 (set_constant_entry, find_constant1, find_constant2,
15544 find_class_constant, count_constant_pool_bytes, write_constant_pool,
15545 find_utf8_constant, find_class_or_string_constant): New functions.
15546
15547 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
15548 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
15549 (give_name_to_class, get_class_constant): Likewise.
15550 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
15551 (get_name_and_type_constant, get_ref_constant): Removed.
15552 * parse.h (parser_ctxt): Remove field tree_constant_pool.
15553 * parse.y: Don't save/restore tree_constant_pool.
15554 * verify.c (verify_jvm_instructions): Update for new approach.
15555 * expr.c (expand_invoke, expand_java_field_op): Likewise.
15556
15557 * lang-options.h: Added -femit-class-file, -femit-class-files.
15558 * lang.c (flag_emit_class_files), java-tree.h: New flag.
15559 (lang_f_options): Added "emit-class-file(s)".
15560
15561 * expr.c (build_java_arrayaccess): Generate more efficient array
15562 bounds checking, by using unsigned compare.
15563
15564 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
15565
15566 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15567
15568 * parse.h: New comment on the handling of unresolved type
15569 identifiers. JDEPs are now part of the jdep_code enum.
15570 (typedef struct jdep): Now use enum jdep_code or int, depending on
15571 availability. Both are narrowed down to an 8 bits bitfield.
15572 (CALL_EXPR_PRIMARY): Fixed comment.
15573
15574 1998-06-10 Tom Tromey <tromey@cygnus.com>
15575
15576 * Make-lang.in (java): Added gjavac and jvgenmain.
15577 (java.start.encap): Depend on gjavac.
15578 (java.rest.encap): Depend on jvgenmain.
15579
15580 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
15581 (JAVA_CROSS_NAME): Likewise.
15582 (java.all.build): Depend on jvgenmain and gjavac.
15583 (java.all.cross): Depend on jvgenmain and gjavac-cross.
15584 (jvgenmain$(exeext)): New target.
15585 (java.install-common): Wrote.
15586 * config-lang.in (compilers, stagestuff): Added gjavac and
15587 jvgenmain.
15588
15589 1998-06-10 Dave Brolley <brolley@cygnus.com>
15590
15591 * lang.c (lang_decode_option): New argc/argv interface.
15592
15593 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15594
15595 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
15596 * decl.c (build_decl_no_layout): New function.
15597 * expr.c (java_lang_expand_expr): Layout declarations found in
15598 blocks before they're pushed.
15599 * jcf-parse.c (load_class): Save current line when parsing class
15600 file.
15601 (parse_source_file): Register class before expanding their
15602 methods.
15603 * lang.c (put_decl_node): Produce `null' when `void *' is
15604 processed.
15605 * lex.c (static tree wfl_op): New static global, for error report
15606 on casts.
15607 (java_init_lex): wfl_operator and wfl_op initialized
15608 here. Filename caching added for wfl_op. Return wfl_op when `(' is
15609 parsed.
15610 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
15611 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
15612 build_unresolved_array_type): New static function definitions.
15613 (build_decl_no_layout): New extern function declared.
15614 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
15615 faulty modifier exists.
15616 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
15617 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
15618 (UNARY_PLUS_EXPR): New fake operator.
15619 (struct parser_ctxt): New field osb_number.
15620 * parse.y (static tree wfl_operator): New static WFL for operator
15621 bound error messages.
15622 (DECR_TK, INCR_TK): Moved.
15623 (OP_TK): Tagged <operator>.
15624 (array_type:): Now call build_unresolved_array_type.
15625 (dim_expr:): Count the number of '[' seen.
15626 (post_increment_expression, post_decrement_expression,
15627 pre_increment_expression, pre_decrement_expression,
15628 unary_expression_not_plus_minus, unary_expression:): Actions are
15629 now building the corresponding unary expressions.
15630 (cast_expression:): Actions are now building cast expressions.
15631 (build_unresolved_array_type): New function.
15632 (create_interface): Reset the number of declared interfaces.
15633 (create_class): Likewise.
15634 (method_header): Methods declared within the scope of an interface
15635 are now implicitly set public and abstract.
15636 (java_complete_class): Variable's and parameter's type are patched
15637 with a promoted type.
15638 (declare_local_variables): Resolved non builtin types are promoted
15639 before being used to build a variable decl. Removed type patch
15640 posted on variable initialization statement.
15641 (source_start_java_method): Use build_decl_no_layout to build the
15642 decl of a parameter of incomplete type.
15643 (java_register_parsed_class): Process interfaces too. Call
15644 rest_of_decl_compilation on each processed class declarations.
15645 (java_complete_expand_methods): Don't attempt to expand things in
15646 interfaces.
15647 (java_complete_tree): Process CONVERT_EXPR, even though it always
15648 has a type. Propagate error_mark_node to node's type too. Promote
15649 method's call argument type and return error_mark_node if
15650 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
15651 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
15652 handle unary operator nodes.
15653 (build_assignment): Added comment.
15654 (print_int_node): New function.
15655 (patch_assignment): New second argument. New error handling. Use
15656 print_int_node. Handle references. Use can_cast_to_p to issue
15657 different error message according to the context and check upon
15658 the initialization of the RHS.
15659 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
15660 (operator_string): Handle more operators.
15661 (patch_binop): No longer use a function static
15662 wfl_operator. Improved error message on shift distance.
15663 (build_unaryop, build_incdec, build_cast, patch_unaryop,
15664 patch_cast): New functions.
15665
15666 1998-06-05 Per Bothner <bothner@cygnus.com>
15667
15668 * jvspec.c: New file.
15669 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
15670
15671 * java-tree.h (identifier_subst): Add declaration.
15672
15673 1998-06-04 Tom Tromey <tromey@cygnus.com>
15674
15675 * jvgenmain.c (main): Generate call to JvRunMain.
15676
15677 * class.c (make_class_data): Push value for "sync_info" field.
15678 * decl.c (init_decl_processing): Push "sync_info" field.
15679
15680 1998-06-03 Per Bothner <bothner@cygnus.com>
15681
15682 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
15683 Java (source) name, not signature.
15684 Set TYPE_ALIGN to (at least) that of element_type.
15685
15686 1998-06-02 Per Bothner <bothner@cygnus.com>
15687
15688 * class.c: Moved classname-mangling-rekated code to ...
15689 * mangle.c: ... this new file.
15690 * jvgenmain.c: New program (needs mangle.c) to generate main program.
15691 * Makefile.in: Update for above changes.
15692
15693 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15694
15695 * expr.c (truthvalue_conversion): Convert integer and floating
15696 point value to their truth value.
15697 * lex.c (java_lex): Handle the `null' literal.
15698 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
15699 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15700 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
15701 New macros.
15702
15703 * parse.y: Reorganization/documentation on token declaration.
15704 (binop_lookup[]): New added new tree codes.
15705 (relational_expression): Build corresponding binary operators.
15706 (equality_expression, conditional_and_expression,
15707 conditional_or_expression): Likewise.
15708 (java_complete_class): Fix crash in debug message.
15709 (java_complete_tree): Check initialization of method call
15710 arguments. Further bogus node evaluation to detect more error
15711 during assignments. Handles more binary operators.
15712 (patch_assignment): Use DECL_P.
15713 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
15714 code.
15715 (operator_string): Handle more case. Compacted source.
15716 (patch_binop): Changed function comment. Checking for
15717 uninitialized first operand takes the compound assignment into
15718 account and uses DECL_P. Checking for uninitialized second operand
15719 delayed to routine's end. Use macros to issue type bound error
15720 messages and issue messages on both operands if their types are
15721 different. Force fixed type into node. Handle all binary
15722 operators.
15723
15724 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15725
15726 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
15727 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
15728 build operator node and return tokens.
15729 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
15730 * parse.h (java_complete_tree): Changed returned type in prototype.
15731 (build_method_invocation, build_assignment, patch_assignment,
15732 patch_binop): New static function declarations.
15733 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
15734 BUILD_EXPR_WFL): New macros.
15735 * parse.y (enum tree_code binop_lookup[]): New static for token to
15736 TREE_CODE lookup.
15737 (%union): Parser union has new sub-structure `operator'.
15738 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
15739 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
15740 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
15741 ASSIGN_ANY_TK): Tokens tagged `operator'.
15742 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
15743 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
15744 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
15745 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
15746 (assignment_operator:): Rule tagged `operator'.
15747 (expression_statement:): Re-installed default rule.
15748 (method_invocation:): Sub rules call build_method_invocation.
15749 (postfix_expression:): Don't attempt to resolve name here. Just
15750 return an ID.
15751 (multiplicative_expression:): Sub-rules build corresponding binop
15752 expression node.
15753 (additive_expression:, shift_expression:, and_expression:,
15754 exclusive_or_expression:, inclusive_or_expression:): Likewise.
15755 (assignment:): Sub rule invoke build_assignment.
15756 (assignment_operator:): Default rules on sub rules.
15757 (force_error): Added documentation on this variable.
15758 (declare_local_variables): Build initialization calling
15759 build_assignment.
15760 (expand_start_java_method): Removed unused rtx declaration. Mark
15761 arguments as already initialized.
15762 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
15763 (java_complete_expand_methods): Don't process next method if
15764 completion of the previous one triggered errors.
15765 (java_complete_expand_method): Call source_end_java_method if no
15766 error were found during completion.
15767 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
15768 locals declaratilon. Handle names found within a class. Return
15769 error_mark_node when things aren't found.
15770 (patch_method_invocation_stmt): Return error_mark_node on failures.
15771 (patch_invoke): Removed unused local. Return the correct node.
15772 (java_complete_tree): Now returns a value. The BLOCK section binds
15773 local identifiers and the type of a BLOCK is now void. Assign the
15774 result of operand completion on COMPOUND_EXPR. Assign the
15775 encapsulated node of a WFL to the result of its completion, except
15776 when the node is an identifier. Now handle MODIFY_EXPR and several
15777 binary operators. Return error_mark_node on errors.
15778 (build_method_invocation, build_assignment, patch_assignment,
15779 build_binop, operator_string, patch_binop): New functions.
15780 * typeck.c (binary_numeric_promotion): New function.
15781
15782 1998-05-21 Per Bothner <bothner@cygnus.com>
15783
15784 * class.c (identifier_subst): New convenience wrapper for ident_subst.
15785 Replace most uses of ident_subst by identifier_subst.
15786
15787 * class.c (push_class_static_dummy_field): Removed function.
15788 (build_class_ref): Find Class object decl by looking up "CNAME.class",
15789 instead of looking got "class" static field. Create that decl here.
15790 (class_identifier_node): Removed; no longer needed.
15791 (init_class_processing): Don't init class_identifier_node.
15792 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
15793 Do nreverse 0 times (instead of twice) for Object and Class.
15794 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
15795
15796 1998-05-20 Per Bothner <bothner@cygnus.com>
15797
15798 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
15799 while initializing linenumber_count and linenumber_table.
15800 Do it before init_function_start (which calls emit_line_note).
15801 * expr.c (expand_byte_code): Don't need to clear lineno here.
15802
15803 1998-05-18 Tom Tromey <tromey@cygnus.com>
15804
15805 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
15806 then mangle number as _N_.
15807
15808 * class.c (mangle_class_field): New function.
15809 (build_class_ref): Set assembler name of class reference using
15810 mangle_class_field.
15811 (push_class_static_dummy_field): Likewise.
15812
15813 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
15814
15815 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
15816 of assigning to TREE_CODE. The latter method exploits a feature
15817 of GCC that is not ANSI compliant.
15818
15819 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15820
15821 * decl.c (pushdecl_force_head): New function.
15822 (pushlevel): Removed conditional printf.
15823 (complete_start_java_method): Don't enter local variable scope if
15824 function is compiled from source code.
15825 * expr.c: parse.h now included
15826 (java_lang_expand_expr): New function.
15827 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
15828 printf. Terminate buffer when doing directories.
15829 * jcf-parse.c (parse_source_file): Call lang_init_source before
15830 parsing and before code generation.
15831 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
15832 use printf if the macro is defined.
15833 * lang.c (lang_init): Install lang_expand_expr hook on
15834 java_lang_expand_expr.
15835 (java_dummy_print): New function.
15836 (lang_init_source): New function.
15837 * lex.c (java_lex): Remember location of an opening brace at the
15838 second nesting level.
15839 (java_is_eol): Unget character seen after a CR if it is EOF.
15840 * parse.h: Now includes lex.h
15841 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
15842 printf if the macro is defined.
15843 (expand_start_java_method, build_expr_block, enter_block,
15844 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
15845 New static function declarations.
15846 (pushdecl_force_head): New extern function declaration.
15847 (INCOMPLETE_TYPE_P): New macro.
15848 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
15849 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
15850 BLOCK_EXPR_ORIGIN): New macros.
15851 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
15852 DECL_SOURCE_LINE_LAST): New macros.
15853 (struct parser_ctxt): Removed field current_method_decl, redundant
15854 with the field current_function_decl. Added fields
15855 first_ccb_indent1 and pending_block.
15856 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
15857 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
15858 tagged <node>
15859 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
15860 (compilation_unit:): Cosmetic on sub rule.
15861 (type_declaration:): Cosmetic on sub rules. Added an error rule.
15862 (variable_initializer:): Installed default rule on expression:.
15863 (method_declaration:): method_header: starts a new
15864 method. method_body: installs the function body, absorbs blocks
15865 emitted for temporary variable scopings, pops function's body block
15866 and merges function's last statement lineno in DECL_SOURCE_LINE.
15867 (method_body:): Installed default rules.
15868 (block:): Call enter_block when an opening brace is seen. Absorb
15869 scoping blocks and call exit_block when a closing brace is seen.
15870 (block_statement:): Cosmetic changes.
15871 (method_invocation:): Create WFL around CALL_EXPR node.
15872 (patch_stage): Added comment around definition.
15873 (method_header): Try to use first_ccb_indent1 as the first line of
15874 the method, so BP debug info are emitted at the first opening
15875 brace of the function. If the function has no body, use the
15876 location of the function's name. Override currently defined method
15877 name with the matching WFL so we can point redefinition errors
15878 using the location where the function's name was declared.
15879 (check_abstract_method_header): Interprets DECL_NAME as an
15880 identifier or as a WFL, accordingly.
15881 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
15882 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
15883 location and name information out of it and reinstall DECL_NAME to
15884 its original identifier node value.
15885 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
15886 function's source code).
15887 (read_import_dir): Test the value returned by find_class and issue
15888 a fatal accordingly.
15889 (declare_local_variables): Push a new block for the scope of the
15890 new variable(s) if code has been already generated at that nesting
15891 level. Pinpoint redefinition errors using the variable id
15892 WFLs. Generate initialization code if necessary. If the variable
15893 type is incomplete, register a patch on its decl.
15894 (source_start_java_method): Rewritten. Define a new block for the
15895 function's parameters. Build parameter decl out of function's
15896 arguments and register them for a patch if their types are
15897 incomplete.
15898 (expand_start_java_method): Includes the part of
15899 source_start_java_method that was pushing the parameter decls and
15900 completing the method start code.
15901 (source_end_java_method): Removed call the expand_end_bindings and
15902 poplevel (already taken care of). Reinstall function's arguments
15903 and get function's last line of code before calling
15904 expand_function_end.
15905 (java_method_add_stmt): New comment before the function's
15906 code. Complement the second operand of the current COMPOUND_EXPR
15907 if necessary.
15908 (java_complete_expand_methods): Don't generate debug info on line
15909 zero when expanding a generated constructor.
15910 (java_complete_expand_method): Set start and end line numbers for
15911 a artificially generated constructor to one and manually call
15912 enter_block and exit_block when defining it. For all methods:
15913 expand function's start calling the new expand_start_java_method
15914 and invoke java_complete_tree on the effective method's body, if
15915 any.
15916 (resolve_expression_name): Now use lookup_name_in_blocks to search
15917 local variable decls and print out an error when variables are
15918 undefined.
15919 (patch_method_invocation_stmt): Inserted comment before the
15920 function's code.
15921 (lookup_method_invoke): Chain method's arguments using chainon
15922 with the current arg list as a second argument. Inserted missing
15923 IDENTIFIER_POINTER when reporting an error on methods not found.
15924 (refine_accessible_methods_list): Don't retain constructors.
15925 (patch_arguments): Function removed.
15926 (java_complete_tree): Inserted comment before the function's
15927 code. New case for BLOCKs. Moved the WFL case a bit
15928 further. Complete function's arguments.
15929 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
15930 maybe_absorb_scoping_blocks): New functions.
15931
15932 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15933
15934 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
15935 previously set.
15936 * jcf-parse.c (parse_source_file, java_error_count): New forward
15937 and extern declarations.
15938 (java_parse_abort_on_error): Macro moved.
15939 (jcf_parse_source): fatal called if fopen fails. Now calls
15940 parse_source_file.
15941 (parse_source_file): New parse_only parameter. Reflects the
15942 elimination of the second pass.
15943 (yyparse): parse_source_file called with argument set to 0.
15944 * jcf.h (JCF_ZERO): Sets java_source to zero.
15945 * lex.c (java_init_lex): pass argument is gone. Function modified
15946 to be called once during the analysis of a file.
15947 (java_unget_unicode): Fixed typo in fatal message.
15948 (java_get_line_col): Likewise.
15949 (java_lval): Likewise. String literals no longer built during
15950 second pass.
15951 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
15952 account.
15953 * parse.h (MODIFIER_WFL): New macro.
15954 (parse_check_super, parser_check_super_interface): Now return int.
15955 (parser_chain_incomplete_item, not_builtin_p,
15956 complete_method_decl): Declarations removed.
15957 (build_method_invocation_stmt, build_invoke): Renamed using the
15958 `patch' instead of `build'
15959 (register-incomplete_type, obtain_incomplete_type,
15960 java_complete_tree, java_complete_expand_method,
15961 unresolved_type_p, create_jdep_list): New function declarations.
15962 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
15963 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
15964 (jdep): New typedef on new struct _jdep.
15965 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
15966 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
15967 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15968 JDEP_RESOLVED_P): New macros.
15969 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
15970 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
15971 JDEP_VARIABLE): New enum values and jdep kinds.
15972 (jdeplist): New typedef on struct _jdeplist.
15973 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
15974 macros.
15975 (CALL_EXPR_PRIMARY): New macro.
15976 (struct parser_ctxt): Fields java_pass, current_method_decl,
15977 method_decl_list deleted. New field jdeplist.
15978 (INCOMPLETE_P): Macro deleted.
15979 * parse.y (single_type_import_declaration:): Removed pass switch.
15980 (type_import_on_demand_declaration): Likewise.
15981 (field_declaration:): Removed pass switch on all sub rules.
15982 (class_declaration:): Call the complete_class_decl removed on
15983 class_body rules.
15984 (method_declaration:): Removed second pass switch. No longer chain
15985 methods decl when method_header reduced.
15986 (method_header:): Sub rules no longer depend on pass switch.
15987 (method_declarator:): Likewise.
15988 (method_body:): Likewise.
15989 (abstract_method_declaration:): Likewise.
15990 (block_statement:): Likewise.
15991 (local_variable_declaration:): Likewise.
15992 (argument_list:): Likewise.
15993 (method_invocation:): Likewise. Call to build_method_invocation_stmt
15994 removed. Partial CLASS_EXPR tree node built instead.
15995 (postfix_expression:): Removed pass switch on all sub rules.
15996 (java_pop_parser_context): Free classd_list content.
15997 (yyerror): Call obstrack_grow0 to finalize error message.
15998 (check_class_interface_creation): Comment modified to reflect new
15999 returned value meaning. Removed second pass switch. Return 1 if an
16000 error was found, 0 otherwise. Adjust pointer on filename if a
16001 leading path separator was found.
16002 (maybe_create_class_interface_decl): Removed first pass switch
16003 when linking the class decl to the class_list. Install a new
16004 jdep_list for the class.
16005 (add_superinterfaces): List of unresolved interfaces is
16006 gone. Unresolved interfaces are directly added to the current
16007 dependencies list.
16008 (create_interface): Second pass shortcut removed.
16009 ctpx->modifier_ctx access through MODIFIER_WFL.
16010 (create_class): Second pass shortcut removed. Call to
16011 register_incomplete_type replaces the call to
16012 parser_chain_incomplete_item.
16013 (complete_class_decl): Function removed.
16014 (duplicate_declaration_error): New way of retrieving redeclared
16015 item type.
16016 (register_fields): Call to lookup_modifier_cl replaced by
16017 MODIFIER_WFL. New way of handling unresolved type, using
16018 unresolved_type_p and obtain_incomplete_type.
16019 register_incomplete_type replaces call to parser_chain_incomplete_item.
16020 (patch_stage): New static global variable.
16021 (method_header): New way of handling unresolved type, using
16022 unresolved_type_p and obtain_incomplete_type. patch_stage used to
16023 indicates that the method decl needs to be patched.
16024 (check_abstract_method_header): Call to lookup_modifier_cl
16025 replaced by MODIFIER_WFL.
16026 (method_declarator): Incomplete argument type are registered
16027 calling register_incomplete_type. Patch on the declared method is
16028 issued in that case.
16029 (unresolved_type_p): New function.
16030 (parser_check_super_interface): New comment to reflect function's
16031 modified returned type (int). Function and has a new argument
16032 this_wfl. Call to parse_error_context uses this_wfl instead of
16033 relying on lookup_cl.
16034 (parser_check_super): Comment reflects function's new returned
16035 type (int). Function returns nonzero value on error.
16036 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
16037 register_incomplete_type, jdep_resolve_class): New functions to
16038 handle incomplete types in declarations.
16039 (java_complete_class): Rewritten to work with the new incomplete
16040 type handling scheme.
16041 (complete_class_report_errors): Likewise.
16042 (complete_method_decl): Removed: it jobs is now handled by
16043 java_complete_class.
16044 (do_resolve_class): Class loaded in not already loaded and not
16045 found in Java source code.
16046 (java_check_regular_methods, java_check_abstract_methods): Don't
16047 call complete_method_decl anymore.
16048 (lookup_modifier_cl, not_builtin_p): Functions deleted.
16049 (read_import_dir): Got rid of the pass number dependency.
16050 (declare_local_variables): New handling of unresolved types (patch
16051 issued).
16052 (source_start_java_method): New parameter level. Function called
16053 with level set to 1 when argument types are potentially
16054 unresolved. Called to complete the job with level set to 2 once
16055 types are complete.
16056 (source_end_java_method): Call to permanent_allocation
16057 removed. Waiting to be replaced by a more suitable obstack
16058 management.
16059 (java_complete_expand_methods, java_complete_expand_method,
16060 java_expand_finals): New functions.
16061 (build_method_invocation_stmt): Renamed
16062 patch_method_invocation_stmt. Extracts function call expression
16063 (wfl) and arguments (args) from CALL_EXPR tree operands.
16064 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
16065 call. Patch the function and argument operand of the CALL_EXPR
16066 tree argument.
16067 (patch_argument, java_complete_tree): New functions.
16068
16069 1998-04-20 Per Bothner <bothner@cygnus.com>
16070
16071 Recover from missing fields and methods (i.e. error instead of fatal).
16072 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
16073 * expr.c (expand_invoke): Recover from missing method.
16074 (expand_java_field_op): Recover from missing field.
16075 Inline references to java.lang.{Integer,Char,...}.TYPE.
16076 * typeck.c (get_type_from_signature), java-tree.h: New function.
16077 * class.c (add_method): Use get_type_from_signature.
16078 (build_class_ref): Handle a class that was not found.
16079 * typeck.c (convert): Handle conversion to pointers (for convenience).
16080 * verify.c (verify_jvm_instructions): Use get_type_from_signature
16081 instead of lookup_field to handle missing fields.
16082
16083 * jcf-parse.c (process_zip_dir): Set java_source.
16084
16085 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
16086
16087 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
16088
16089 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16090
16091 * jcf-parse.c (load_class): Don't change input_filename before
16092 calling jcf_parse_source (but still do it before calling
16093 jcf_parse).
16094 (jcf_parse_source): Assign input_filename after having saved the
16095 parser context.
16096 * lex.c (java_init_lex): Chain a WFL node to the import on demand
16097 list. ctxp->modifier_ctx zeroed according to its new
16098 definition. ctxp->filename initialized. Removed
16099 JAVA_MODIFIER_CTX_UNMARK.
16100 (java_unget_unicode): Update the character based column position.
16101 (java_allocate_new_line): ref_count not used anymore. Always free
16102 ctxp->p_line. Initialize c_line->char_col to 0.
16103 (java_get_unicode): Update the character based column position.
16104 (java_lex): Use ctxp->elc to store current position in source
16105 file, at the beginning of the parsed token. Set modifier_ctx entry
16106 corresponding to the parse modifier to a WFL node. Return a WFL
16107 node when an identifier is parsed.
16108 (java_lex_error): Now uses ctxp->elc to store current position in
16109 source.
16110 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
16111 * lex.h (build_wfl_node): New function definitions.
16112 (struct java_line): ref_count and next fields are gone. New field
16113 char_col.
16114 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
16115 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
16116 (JAVA_COLUMN_DELTA): New macro.
16117 (java_lc): New typedef on new struct _java_lc.
16118 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
16119 (parse_error_context, parse_warning_context): Changed prototypes.
16120 (java_get_line_col): Added as an available global function.
16121 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
16122 (IC_DECL): Replaced by macro IC_TYPE
16123 (DEPEND_WFL): New macro.
16124 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
16125 wrong modifier.
16126 (exit_java_complete_class): Removed a commented out statement.
16127 (struct parser_ctxt): Added comments on fields. modifier_ctx is
16128 now an array of tree nodes. Deleted fields line_list and
16129 e_line. New field elc, to replace e_line.
16130 * parse.y (array_type:): Build WFL node.
16131 (qualified_name:): Build a single WFL node out of two. Retain
16132 the location information of the first node in the resulting node.
16133 (package_declaration:): Use package name as a WFL node
16134 (single_type_import_declaration:): Use imported name as a WFL node.
16135 (type_import_on_demand_declaration:): Use root of the imported
16136 packages as a WFL node.
16137 (field_declaration:): Removed unused local variable cl.
16138 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
16139 (yyerror): New static elc. Removed static error_line, error_pos.
16140 New local code_from_source. Save ctxp->elc into elc at the first
16141 pass. Call java_get_line_col to get a string of the line where
16142 the error occurred.
16143 (debug_line): Removed static function.
16144 (parse_error_context, parse_warning_context): Parameter cl is now
16145 a WFL node. Use its value to initialize ctxp->elc.
16146 (redefinition_error): Parameter cl is now a WFL node.
16147 (parse_add_interface): New parameter wfl. No longer call
16148 lookup_cl, use wfl instead.
16149 (check_class_interface_creation): Parameter cl is now a WFL node.
16150 (maybe_create_class_interface_decl): Likewise.
16151 (add_superinterfaces): New function.
16152 (create_interface): Removed local cl, node, super_decl,
16153 super_decl_type. Function now uses id as a WFL node. Better
16154 warning/error report on obsolete or forbidden mix of
16155 modifiers. Now calls add_superinterfaces to register interfaces.
16156 (create_class): Removed local cl, node. Local variable id is used
16157 as a WFL node. Better error report on forbidden modifier
16158 mix. Uses add_superinterfaces to register interfaces.
16159 (find_field): Argument cl is now a WFL node. Now store the WFL
16160 node of a fields that needs to be checked for their
16161 initialization.
16162 (method_header): Local variable node non longer used. Local
16163 variable id replaces cl.
16164 (check_modifiers_consistency): Local variable cl is now a WFL
16165 node.
16166 (method_declarator): Local variable cl replaced by parameter id.
16167 (parser_qualified_name): Now uses parameter name as a WFL node.
16168 (parser_check_super_interface): New parameter wfl, for achieve
16169 greater accuracy during error reports.
16170 (parser_chain_incomplete_item): New parameter named location. Used,
16171 along the decl, to construct the incomplete item node.
16172 (java_complete_class): resolve_class now uses WFL node extracted
16173 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
16174 where appropriate.
16175 (complete_method_decl): Unresolved function's argument types are WFL.
16176 (resolve_class): Parameter cl is now a WFL node.
16177 (resolve_and_layout): Likewise.
16178 (do_resolve_class): Likewise. Try first to use cl and then do the
16179 lookup on the decl when calling check_pkg_class_access.
16180 (complete_class_report_errors): Use IC_TYPE in place of
16181 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
16182 instead of doing a lookup over the decl.
16183 (java_check_final): Use WFL info from field tree list.
16184 (lookup_cl): Rewritten and returns a statically defined WFL node.
16185 (lookup_modifier_cl): Now uses information from WFL nodes.
16186 (process_imports): Likewise.
16187 (read_import_dir): name and cl arguments replaced by a single WFL
16188 node. Function modified accordingly.
16189 (find_in_imports_on_demand): Now uses WFL node.
16190 (check_pkg_class_access): cl argument is now a WFL node.
16191 (declare_local_variables): Fixed to use WFL nodes.
16192 (resolve_expression_name): Likewise.
16193 (build_method_invocation_stmt): name_combo argument renamed
16194 wfl. Function modified to use WFL nodes.
16195 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
16196 (lookup_method_invoke): cl is now a WFL node. Added missing
16197 IDENTIFIER_POINTER to class type decl name.
16198
16199 1998-04-14 Dave Brolley <brolley@cygnus.com>
16200
16201 * lang.c (init_parse): Now returns char* containing the filename.
16202
16203 1998-04-10 Per Bothner <bothner@cygnus.com>
16204
16205 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
16206
16207 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
16208 * class.c (make_class_data): If flag_assume_compiled, initial class
16209 state is CSTATE_PREPARED; make superclass and interfaces direct
16210 references, rather than constant pool indexes.
16211
16212 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
16213
16214 * parser.y: Include flags.h. Removed debug variable pl.
16215 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
16216 (block:): Likewise.
16217 (labeled_statement_nsi:): Generate debug info when reducing
16218 expression_statement:.
16219 (check_pkg_class_access): get_access_flags_from_decl invocation
16220 fixed for new CLASS_* flags location.
16221 (source_end_java_method): Save/restore parser context when
16222 entering/leaving this routine. Restore lineno to its right value
16223 before calling expand_end_bindings.
16224 (build_method_invocation_stmt): build_invoke called with the
16225 current line information.
16226 (build_invoke): New argument cl. Wrap the function call around a
16227 wfl node.
16228 (refine_accessible_methods_list): Changed comment, removed
16229 unnecessary code.
16230 * parse.h: Fixed typo in comments.
16231 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
16232 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
16233 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
16234 parser_ccb_indent.
16235 * lex.c (java_lex): Record the last closing curly bracket of a
16236 function.
16237 * jcf-parse.c (jcf_parse_source): Now calls
16238 java_check_methods. Clarified comment, fixed typo.
16239
16240 1998-04-09 Dave Brolley <brolley@cygnus.com>
16241
16242 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
16243 (finish_parse): Expose for non USE_CPPLIB builds.
16244
16245 1998-04-08 Jeffrey A Law (law@cygnus.com)
16246
16247 * lang.c (lang_print_xnode): New function.
16248
16249 1998-04-03 Per Bothner <bothner@cygnus.com>
16250
16251 * decl.c (class_dtable_decl), java-tree.h: New tree node.
16252 * class.c (get_dispatch_vector, get_dispatch_table): New functions
16253 used to build a class's dispatch table.
16254 (make_class_data): Generate dispatch table if flag_assume_compiled.
16255 Set dtable of class object to address of class_dtable_decl.
16256
16257 * decl.c (int_decl_processing): Make soft_badarrayindex_node
16258 be volatile and have side effects - generates better code.
16259
16260 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
16261 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
16262
16263 * expr.c (expand_invoke): If class is final, method is
16264 effectively final, so can call it directly.
16265
16266 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
16267
16268 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
16269
16270 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16271
16272 * parse.y (build_method_invocation_stmt): Removed extra argument
16273 to build_invoke.
16274
16275 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16276
16277 * expr.c (dtable_indent): Now static global.
16278 (expand_invoke): Now call invoke_build_dtable and
16279 build_invokevirtual.
16280 (invoke_build_dtable, build_invokevirtual): New functions.
16281 * jcf-io.c (find_class): Defer issuing a warning by setting
16282 jcf->outofsynch to 1.
16283 * jcf-parse.c (jcf_out_of_synch): New function.
16284 (load_class): Test this_jcf.outofsynch flag and call
16285 jcf_out_of_synch accordingly.
16286 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
16287 comment indentation.
16288 * lex.c (java_get_unicode): Fixed code indentation.
16289 (java_lex): Create string literal. Fixed typo. Removed several
16290 premature obstack_free.
16291 * parse.h: New enums for name resolution and invocation mode.
16292 (struct qualification): New data structure.
16293 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
16294 (do_resolve_class, build_method_invocation_stmt,
16295 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
16296 debug_line, identical_subpath_p, invocation_mode,
16297 refine_accessible_methods_list, build_invoke,
16298 lookup_method_invoke): New functions declared.
16299 (build_invokevirtual, invoke_build_dtable, match_java_method,
16300 build_field_ref, jcf_out_of_synch): New references to external
16301 functions.
16302 (struct parse_ctxt): Removed artificial_constructor field.
16303 * parse.y: (array_type:): Type defined for this rule.
16304 (class_type:): Installed default rule for interface_type:.
16305 (array_type:): Now build Java array type.
16306 (qualified_name:): Now use obstack_grow0.
16307 (method_declaration:): Skip the artificial constructor added to
16308 the list, if any.
16309 (abstract_method_declaration:): Execute the code only during pass 1.
16310 (block:): Installed default rule in block_statements:.
16311 (block_statement:): Add the statement to the method during pass 2.
16312 (statement_expression): Installed default rule for
16313 method_invocation:.
16314 (argument_list:): Added code to build the argument list.
16315 (method_invocation:): Added call to create the method invocation
16316 node.
16317 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
16318 (debug_line): New function for debug.
16319 (complete_class_decl): No longer do something during pass 1.
16320 (method_header): Use BUILD_PTR_FROM_NAME.
16321 (parser_qualified_classname): Use obstack_grow0. Removed bogus
16322 obstack_free.
16323 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
16324 function's main comment.
16325 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
16326 classes.
16327 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
16328 (resolve_class): Now works with arrays.
16329 (do_resolve_class, resolve_and_layout): New functions.
16330 (java_check_regular_methods): Reverse method list before and after
16331 having processed it. No longer set ctxp->artificial_constructor.
16332 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
16333 accordingly. Fixed typo in issued error message. Now use
16334 obstack_grow0.
16335 (find_in_imports_on_demand): Now use obstack_grow0.
16336 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
16337 (source_end_java_method): Call expand_expr_stmt instead of
16338 expand_expr. Calls it before calling expand_function_end.
16339 (java_method_add_stmt): Do nothing if errors were found during
16340 parsing.
16341 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
16342 (build_method_invocation_stmt, build_invoke, invocation_mode,
16343 lookup_method_invoke, refine_accessible_methods_list,
16344 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
16345 New functions.
16346 * typeck.c (build_java_signature): Properly end method signature
16347 if return type skipped.
16348 (match_java_method): New function.
16349
16350 1998-03-16 Per Bothner <bothner@cygnus.com>
16351
16352 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
16353
16354 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16355
16356 * expr.c (build_invoke_non_interface): New function.
16357 (methods_ident, ncode_ident): Now static globals.
16358 (expand_invoke): Use build_invoke_non_interface.
16359 * java-tree.h (struct lang_decl): New field function_decl_body.
16360 (DECL_FUNCTION_BODY): New macro.
16361 * jcf-parse.c (jcf_parse_source): Deeper check before setting
16362 CLASS_FROM_SOURCE_P.
16363 (parse_source_file): Fixed typos. Call java_layout_parsed_class
16364 before starting pass 2. Call to java_generate_parsed_class replaced
16365 by java_register_parsed_class.
16366 * lex.c: Fixed typo in header. Some line width related formating.
16367 * lex.h: Some line width related formating.
16368 * parse.h (source_end_java_method, resolve_expression_name,
16369 complete_class_decl, maybe_create_class_interface_decl,
16370 check_class_interface_creation): New static function declarations.
16371 (java_layout_parsed_class, java_method_add_stmt): New function
16372 declarations.
16373 (struct parser_ctxt): Field mark_class_generate removed. New
16374 fields class_list and artificial_constructor.
16375 * parse.y: Fixed typo in header.
16376 (class_declaration:): Call complete_class_decl when class body
16377 parsed.
16378 (method_declaration:): Call source_end_java_method in pass 2 when
16379 the method body is defined.
16380 (postfix_expression:): Do expression name resolution on sub-rule
16381 name during pass 2.
16382 (create_class, create_interface): Merged common pieces.
16383 (check_class_interface_creation, maybe_create_class_interface_decl):
16384 New functions.
16385 (complete_class_decl): New function.
16386 (register_fields): Fixed line width related typo.
16387 (method_header): Correctly skip first argument when fixing
16388 argument line. Changed the loop.
16389 (java_check_circular_reference): Now use ctxp->class_list.
16390 (java_complete_class): Removed start/stop marking.
16391 (java_check_regular_methods): Now takes a class decl as an
16392 argument. Add default constructor if none were encountered.
16393 (java_check_methods): Now use ctxp->class_list. Changed call to
16394 java_check_regular_methods.
16395 (source_start_java_method): Set DECL_ARG_TYPE for each function
16396 arguments.
16397 (source_end_java_method, java_method_add_stmt): New functions.
16398 (java_generate_parsed_class): No longer exists.
16399 (java_layout_parsed_class, java_register_parsed_class): New functions.
16400 (resolve_expression_name): New function.
16401
16402 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16403
16404 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
16405 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
16406 until pass initializations are done. Call read_import_dir with
16407 pass set to 0.
16408 * parse.h: (lookup_modifier_cl): New function declared.
16409 (INTERFACE_FIELD_MODIFIERS): New macro.
16410 (OBSOLETE_MODIFIER_WARNING): New macro.
16411 * parse.y: (register_fields): Class type and current field name in
16412 local variables. Check modifier(s) if adding field(s) to an interface.
16413 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
16414 and report errors using the faulty modifier line context.
16415 (lookup_modifier_cl): New function.
16416 (read_import_dir): Detect and report default import processing
16417 failure.
16418
16419 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
16420
16421 Add a pair of -fassume-compiled/-fno-assume-compiled options.
16422 * class.c (is_compiled_class): Return 1 after making sure it
16423 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
16424 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
16425 * java-tree.h (flag_assume_compiled): Add decl.
16426 * lang.c (lang_f_options): Add the flag.
16427 (flag_assume_compiled): Add decl, default to 0.
16428
16429 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16430
16431 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
16432 (is_compiled_class): Likewise.
16433 (layout_class): Likewise.
16434 (layout_class): Detect and lay out classes defined in source code.
16435 (interface_of_p, add_interface_do, may_add_interface): New
16436 function.
16437 (add_interface): Now use add_interface_do.
16438 (add_method_1): New function.
16439 (add_method): Now use add_method_1.
16440 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
16441 (complete_start_java_method): New function.
16442 (start_java_mehod): Now call complete_start_java_method.
16443 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
16444 (expand_invoke): Likewise and fixed typo.
16445 *gjava.c: (print_super_field): Use new argument to find_class
16446 DO_CLASS_FILE.
16447 (main): Likewise.
16448 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
16449 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
16450 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
16451 IDENTIFIER_NODE.
16452 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
16453 (add_method_1, push_class): New prototypes.
16454 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
16455 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
16456 directory where the class was found.
16457 (find_class): New argument DO_CLASS_FILE. Function find_class
16458 modified accordingly.
16459 *jcf-parse.c: (fix_class_path): New function.
16460 (load_class): Use new VERBOSE argument. load_class now finds and
16461 loads/parses .class/.java files. Save read_state of current_jcf
16462 if necessary.
16463 (java_parser_abort_on_error): New macro.
16464 (jcf_parse_source, parse_source_file): New function.
16465 (jcf_parse): Fixed typo.
16466 (yyparse): Call parse_source_file () only.
16467 (process_zip_dir): Fixed typo, fix zdir->filename_length when
16468 writing the real class name back in the zip directory entry.
16469 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
16470 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
16471 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
16472 (find_class): Prototype fixed.
16473 *lex.c: Added 1998 time stamp.
16474 Removed all static global variables, moved into the parser
16475 context data structure.. Now include unistd.h if SEEK_SET not
16476 defined.
16477 (java_init_lex): Rewritten.
16478 (java_sneak_unicode): Modified current unicode access in current line.
16479 (java_unget_unicode): Likewise.
16480 (java_allocate_new_line): New allocation management.
16481 (java_read_char): Modified access and storage of unget_utf8_value.
16482 New way of processing current unicode.
16483 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
16484 (java_get_unicode): Now use the parser context.
16485 (java_lineterminator): Likewise.
16486 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
16487 of the reentrant parser implementation. Function now use the
16488 parser context data structure and java_lval. Fixed production of
16489 the float and double constant "out of range" error message. Fixed
16490 obstack use. Return integer value when hitting a modifier. Now
16491 return type for TRUE, FALSE and other predefined types. Return
16492 identifier as a TREE_LIST list containing the current line context
16493 as the TREE_VALUE sub-node.
16494 (java_unicode_2_utf8): Fixed typo in declaration.
16495 (java_lex_error): Now use the parser context data structure.
16496 *lex.h: Added 1998 time stamp.
16497 (struct java_line): New fields ref_count and next.
16498 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
16499 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
16500 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
16501 *parse.h: Added 1998 time stamp.
16502 (java_parse_source_file): Renamed from parse_source_file.
16503 (YYERROR_NOW, YYNOT_TWICE): Fixed.
16504 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
16505 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
16506 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
16507 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
16508 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
16509 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
16510 (struct parser_ctxt): New data structure to keep the parser context.
16511 *parse.y: Added 1998 time stamp, got rid of static global variables.
16512 (java_error_count, ctxp): New global variables.
16513 (%union): New value field.
16514 (numeric_type, integral_type): Rules removed.
16515 (primitive_type): Rule defined to handle integral, float, double and
16516 boolean types.
16517 (qualified_name, package_declaration,
16518 single_type_import_declaration, type_import_on_demand_declaration,
16519 modifiers, class_declaration, super, interfaces,
16520 interface_type_list, class_body, field_declaration,
16521 field_declaration, variable_declarators, variable_declarator,
16522 variable_declarator_id, method_declaration, method_header,
16523 formal_parameter_list, formal_parameter, method_body, block,
16524 static, interface_declaration, extends_interfaces,
16525 abstract_method_declaration, local_variable_declarators): Rules now
16526 define actions.
16527 (force_error, do_warning): New global statics.
16528 (push_parser_context, parser_context_save_global,
16529 parser_context_restore_global, pop_parser_context): New functions.
16530 (yyerror): Now uses the global parser context. Fixed use of obstack.
16531 (parse_error, parse_error_context, parse_warning_context,
16532 java_accstring_lookup, redefinition_error, check_modifiers,
16533 parser_add_interface, create_interface, create_class, find_field,
16534 duplicate_declaration_error, register_fields, method_header,
16535 check_modifiers_consistency, check_abstract_method_header,
16536 method_declarator, parser_qualified_classname,
16537 parser_check_super_interface, parser_check_super,
16538 parser_chain_incomplete_item, java_check_circular_reference,
16539 layout_class_from_source, java_complete_class,
16540 complete_method_decl, resolve_class, complete_class_report_errors,
16541 java_check_final, check_method_redefinition,
16542 java_check_regular_methods, java_check_abstract_methods,
16543 java_check_methods, lookup_java_interface_method2,
16544 lookup_java_method2, lookup_cl, find_name_in_single_imports,
16545 process_imports, find_in_imports, read_import_entry,
16546 read_import_dir, find_in_imports_on_demand,
16547 check_pkg_class_access, not_builtin_p, declare_local_variables,
16548 source_start_java_method, java_generate_parsed_class): New
16549 functions.
16550 *typeck.c: (signature_include_return): New global variable.
16551 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
16552 to add the function returned type in the signature.
16553
16554 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
16555
16556 * jcf-io.c (open_in_zip): Use strncmp and LEN.
16557
16558 1998-01-29 Dave Brolley <brolley@cygnus.com>
16559
16560 * Make-lang.in (java.info): Added.
16561 (java.install-info): Added
16562
16563 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
16564
16565 * Makefile.in (clean): Also remove java/parse.c.
16566
16567 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
16568
16569 Add a pair of -fbounds-check/-fno-bounds-check options.
16570 * lang.c (lang_decode_option): Add code to grok arguments.
16571 (flag_bounds_check): Add decl.
16572 (lang_f_options): New array w/ the option in it.
16573 * java-tree.h (flag_bounds_check): Add decl.
16574 * lang-options.h: New file.
16575 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
16576 of a static macro value.
16577 (JAVA_ARRAY_EXCEPTION): Delete macro.
16578
16579 1998-01-23 Per Bothner <bothner@cygnus.com>
16580
16581 * typeck.c (build_java_array_type): Fix two bugs in previous change.
16582 * expr.c (build_anewarray): Add missing promote_type.
16583
16584 1998-01-22 Per Bothner <bothner@cygnus.com>
16585
16586 Add array types with known length to optimize bounds checking.
16587 * typeck.c (build_java_array_type): Take length parameter.
16588 (java_array_type_length, build_prim_array_type): New functions.
16589 * java-tree.h: Update for new functions.
16590 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
16591 * class.c: Use build_prim_array_type.
16592 * expr.c (can_widen_reference_to): Handle known-length array types.
16593 (verify_jvm_instructions): Keep track of integer push instructions
16594 followed by newarray/anewarray, so we can build known-length arrays.
16595 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
16596 (java_array_data_offset): New function.
16597 (build_java_array_length_access): New function. Optimize if constant.
16598 (build_java_arrayaccess): Constant fold bounds check.
16599 (expand_java_newarray, expand_java_anewarray): Replaced by ...
16600 (build_newarray, build_anewarray): New functions.
16601 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
16602 * verify.c (merge_types): Handle known-lengh array types.
16603
16604 1998-01-19 Per Bothner <bothner@cygnus.com>
16605
16606 * expr.c (expand_byte_code): Fix performace bug, which caused
16607 searching linenumber_table to be linear rather than constant.
16608
16609 1997-12-12 Per Bothner <bothner@cygnus.com>
16610
16611 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
16612
16613 * decl.c, java-tree.h (soft_fmod_node): New global.
16614 * decl.c (init_decl_processing): Define __builtin_fmod.
16615 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
16616 using __builtin_fmod.
16617
16618 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
16619
16620 * keyword.h: New file, output of keyword.gperf as processed by
16621 gperf.
16622 * lex.c (java_lex_init): Initialize java_error_flag.
16623 * parse.c (YYERROR_NOW): Uses java_error_flag.
16624 * parse.y: New static java_error_flag. Useless definition of
16625 buffer_error gone.
16626 * parse.y (java_error): Portable error recovery using
16627 java_error_flag (not yet completely tuned).
16628
16629 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
16630
16631 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
16632
16633 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
16634
16635 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
16636 (parse.c, lex.c, keyword.h): New rules for Java source code
16637 front-end.
16638 * parse.c: Renamed into jcf-parse.c.
16639 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
16640 * keyword.gperf: New file, Java keywords.
16641 * parse.y: New file, Java language grammar.
16642 * parse.h: New file, Java language grammar definitions.
16643 * lex.c: New file, Java language lexer.
16644 * lex.h: New file, Java language lexer definitions.
16645
16646 1997-12-03 Per Bothner <bothner@cygnus.com>
16647
16648 * decl.c (clinit_identifier_node), java-tree.h: New global.
16649 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
16650 * verify.c (verify_jvm_instructions): Inline use of removed macros.
16651 * expr.c (expand_java_field_op): Check for invalid assignment
16652 to final field.
16653
16654 * jcf-reader.c (get_attribute): Test for wrong attribute length.
16655
16656 1997-10-27 Per Bothner <bothner@cygnus.com>
16657
16658 * verify.c (verify_jvm_instructions): When processing a handler,
16659 attempt to set the current_subr to the right value.
16660 (More complicated code combines Sep 17 and Oct 22 versions.)
16661
16662 1997-10-24 Per Bothner <bothner@cygnus.com>
16663
16664 * class.c (push_class): Figure out (guess) name of source file.
16665 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
16666 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
16667 (parse_class_file): Change return type from int to void.
16668 Call debug_start_source_file/debug_end_source_file.
16669
16670 * expr.c (build_java_binop): Fix masking 2nd operand.
16671 * decl.c (init_decl_processing): Set sizetype first.
16672
16673 1997-10-22 Per Bothner <bothner@cygnus.com>
16674
16675 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
16676 (Revert Sep 17 change.)
16677
16678 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
16679
16680 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
16681 .class extension in their name and fix thing so we don't process
16682 them parse_zip_file_entries().
16683 (parse_zip_file_entries): Cleaned unused local variables.
16684
16685 1997-10-20 Per Bothner <bothner@cygnus.com>
16686
16687 * expr.c (can_widen_reference_to): Allows equal array element types.
16688 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
16689 * jcf-dump.c (RET): Get (and print) index.
16690
16691 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
16692 Promote element type to POINTER_TYPE.
16693
16694 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16695
16696 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
16697 find_in_current_zip, jcf_figure_file_type): Moved from
16698 jcf-reader.c to parse.c.
16699 * zextract.c: (read_zip_archive): takes file_comment_length possible
16700 field into account.
16701
16702 1997-10-20 Per Bothner <bothner@cygnus.com>
16703
16704 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
16705
16706 * verify.c (merge_types): Handle array types even better ...
16707
16708 1997-10-17 Per Bothner <bothner@cygnus.com>
16709
16710 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
16711
16712 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
16713 * class.c (make_class_data): Don't build fields_decl if no fields.
16714 When building fields_decl, skip if DECL_ARTIFICIAL.
16715
16716 * expr.c (java_stack_swap): Update stack_type_map.
16717 * verify.c (merge_types): Handle array types better.
16718
16719 1997-10-15 Per Bothner <bothner@cygnus.com>
16720
16721 * class.c (add_field): Don't promote short integral fields to
16722 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
16723 * expr.c (push_value): Promote and convert short integral values.
16724
16725 * decl.c, java-tree.h (integer_two_node): New constant node.
16726 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
16727
16728 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
16729
16730 * class.c (append_gpp_mangled_type): Use function argument
16731 unpromoted type to generate mangled name.
16732
16733 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16734
16735 * constants.c (build_constant_data_ref): Now uses current_class
16736 instead of main_class.
16737 (build_constants_constructor): Now uses current_class instead of
16738 main_class.
16739 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
16740 of the global variable SeepZipFiles done here.
16741 * zextract.c (read_zip_archive): extra_field optional field taken
16742 into account while computing the position of the class file in the
16743 archive.
16744 * verify.c (verify_jvm_instructions): Use current_jcf to search
16745 the constant pool.
16746 * parse.c (load_class): First search for the class to load in the
16747 current zip file. Saves current_jcf (restored before returning
16748 from that function). Don't call JCF_FINISH in the class was found
16749 in the current ZIP file.
16750 (jcf_parse): If the class was found in the current ZIP file, save
16751 its tree_constant_pool (for later reuse).
16752 (parse_class_file): New function. Process each method defined in
16753 the current class and record the class as to be later registered.
16754 (yyparse): Rewritten. Figure the type of the current file and switch
16755 accordingly.
16756 * lang.c: New global variable current_jcf.
16757 (lang_init): Removed compiling_from_source test (done later, in
16758 yyparse). Removed call the jcf_parse ().
16759 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
16760 (typedef struct JCF): New fields seen_in_zip (to mark a class found
16761 in the current ZIP file) and zip_offset (offset to the class data in
16762 the current zip file).
16763 * jcf-reader.c: zipfile.h included.
16764 localToFile: New ZipFileCache static global variable
16765 (parse_zip_file_entries): New function. Browse the current ZIP
16766 file directory and process each class found.
16767 (process_zip_dir): New function. Register each class found in the
16768 ZIP file directory. The class aren't parsed but a valid JCF is
16769 link to each of them.
16770 (find_in_current_zip): New function. Search for a class in the
16771 current ZIP file directory. If found, prepare the class so that it
16772 can be loaded.
16773 (jcf_figure_file_type): New function. Examine the file structure
16774 to figure a class file, a ZIP file. If none of these categories are
16775 matched, a source file is assumed.
16776 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
16777 SeenZipFile: New global variable.
16778 (open_in_zip): Use zipmember's length to accelerate the search for
16779 a member. If zipmember was NULL and zip file successfully read,
16780 return 0.
16781 * java-tree.h: New global variable current_jcf declared. Added
16782 declaration for current_constant_pool_tags, current_constant_pool_data,
16783 current_constant_pool_length, current_constant_pool_data_ref.
16784 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
16785 store the JCF of classes seen in a zip file) and tree *constant_pool
16786 (to save a loaded class constant pool). current_class declared here.
16787 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
16788 retrieve method_ref_constant.
16789 (PUSHC): java_push_constant_from_pool now uses current_jcf.
16790 (OBJECT): get_class_constant now uses current_jcf.
16791 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
16792 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
16793 (expand_invoke): Now uses current_class instead of main_class
16794 (build_class_init): Now uses current_class instead of main_class
16795 * class.c: New static global variable registered_class.
16796 (register_class): New function.
16797 (emit_register_class): Modified to use registered_class instead of
16798 main_class
16799 (is_compiled_class): Now take into account class seen in the archive.
16800
16801 1997-10-06 Per Bothner <bothner@cygnus.com>
16802
16803 * except.h: Renamed to: java-except.h.
16804 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
16805 * except.c: Add semi-working (commented out) implementation.
16806
16807 * expr.c (expand_iinc): Add needed flush_quick_stack.
16808 * parse.c (set_source_filename): New function.
16809 (give_name_to_class): Set input_filename from package.classname.java.
16810
16811 * jcf-io.c (find_class): Don't look first in ".".
16812
16813 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16814
16815 * zextract.c (read_zip_archive): Now takes into account the
16816 extra_field field.
16817 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
16818
16819 1997-09-20 Per Bothner <bothner@cygnus.com>
16820
16821 * constants.c, java-tree.h (build_internal_class_name): New function.
16822 (alloc_class_constant): Re-implement using build_internal_class_name.
16823 * class.c (make_class_data): Likewise.
16824 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
16825
16826 1997-09-17 Per Bothner <bothner@cygnus.com>
16827
16828 * verify.c (verify_jvm_instructions): Temporarily set current_subr
16829 to NULL before pushing an exception handler target.
16830
16831 * expr.c (flush_quick_stack): Save from low stack indexes to high.
16832 (java_stack_swap, java_stack_dup): Re-write to be safe from
16833 clobbering registers.
16834 (build_class_init): New function.
16835
16836 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16837
16838 * typeck.c (build_java_array_type): Temporary use
16839 permanent_obstack to create the array 'length' field.
16840 * expr.c (lookup_label): Temporay use permanent_obstack to create
16841 label if not found.
16842 * class.c (push_super_field): Tempory use permanent_obstack.
16843
16844 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
16845
16846 * typeck.c (type_for_mode): Now handles double_type_node and
16847 float_type_node.
16848 * verify.c (verify_jvm_instructions): The instruction following
16849 the wide bytecode is checked. OPCODE_ret added to the list of
16850 wide.
16851
16852 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16853
16854 * class.c (make_class): Temporary use permanent_obstack. Set the
16855 class CLASS_P field to 1.
16856 (push_class): Temporary use permanent_obstack.
16857 (set_super_info): Temporary use permanent_obstack.
16858 (add_method): Temporary use permanent_obstack, set
16859 METHOD_TRANSIENT().
16860 (add_field): Temporary use permanent_obstack. Sets
16861 FIELD_VOLATILE() and FIELD_TRANSIENT().
16862 (build_class_ref): Temporary use permanent_obstack if the class
16863 isn't compiled.
16864 (build_static_field_ref): Temporary use permanent_obstack when
16865 creating field's rtl.
16866 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
16867 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
16868 and fields. Function finalized, as far as flag handling.
16869 (push_class_static_dummy_field): Temporary use permanent_obstack.
16870 (emit_register_class): Force generation of class registration at
16871 -O3 or deeper.
16872 * decl.c (end_java_method): Call permanent_allocation() before
16873 returning.
16874 * expr.c (can_widen_reference_to): Added comment to interface
16875 handling, fixed typo.
16876 (lookup_field): Now uses CLASS_P() to correct FIXME
16877 (expand_invoke): Verification on public && !static &&
16878 !abstract moved into soft_lookupinterfacemethod (kaffe).
16879 Use Object class dtable if objectref is an array when expanding
16880 invokeinterface.
16881 (java_push_constant_from_pool): Temporary use permanent_obstack
16882 for CONSTANT_string
16883 * parse.c (get_ref_constant): Temporary use permanent_obstack to
16884 create constant references.
16885 (get_constant): Temporary use permanent_obstack to create constant.
16886 (load_class): Temporary use permanent_obstack to load class.
16887 (jcf_parse): Temporary use permanent_obstack to perform class
16888 layout.
16889 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
16890 (build_java_signature): Temporary use permanent_obstack.
16891 * verify.c: (verify_jvm_instruction): removed unnecessary verification
16892 on ACC_SUPER flag.
16893 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
16894 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
16895 (CLASS_P): Defined
16896
16897 1997-09-11 Per Bothner <bothner@cygnus.com>
16898
16899 * class.c (append_gpp_mangled_type): Fix typo.
16900 (emit_register_class): Use main_class to get class object, rather
16901 than looking for no-longer-existing static decl starting with _CL.
16902 * typeck.c (parse_signature_type): Promote array element type
16903 if it is a RECORD_TYPE.
16904
16905 1997-09-10 Per Bothner <bothner@cygnus.com>
16906
16907 * class.c (push_class_static_dummy_field): New function.
16908 (mangle_static_field): New. Do G++-style mangling of static fields.
16909 (layout_class): Mandle static fields here, not in add_field.
16910 (build_class_ref): The class object is now a dummy static field.
16911 * decl.c (find_local_variable): Look for best, instead of first match.
16912 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
16913 (build_java_athrow): Don't check here if exception is Throwable.
16914 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
16915 (TYPE_USED): Removed. No longer used ...
16916 * parse.c (jcf_parse): Call push_class_static_dummy_field.
16917 * verify.c (push_pending_label): New function.
16918 (push_pending_block): Renamed to check_pending_block.
16919 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
16920 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
16921 re-checking possible handlers) after a store (less wasted work).
16922 Check for null handler (finally) before calling add_handler.
16923 Various changes to (finally?) correctly handle try/finally.
16924
16925 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
16926
16927 * class.c: Include stdio.h.
16928
16929 1997-09-04 Per Bothner <bothner@cygnus.com>
16930
16931 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
16932 to make sure class is initialized before static/special invoke.
16933
16934 * verify.c (verify_jvm_instructions): On a store instruction,
16935 call find_local_variable to force pre-allocation of decl and rtx.
16936 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
16937
16938 1997-09-03 Per Bothner <bothner@cygnus.com>
16939
16940 * class.c (build_class_ref): Strip off "promoted_" if need be.
16941 (make_field_value): Call build_java_signature when needed.
16942 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
16943 * expr.c (build_java_athrow): Don't push_value of exception.
16944 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
16945 match specification of [fd]cmp[lg] for NaNs.
16946 (expand_byte_code): Add support for exception handler ranges.
16947 * except.c: Add skeleton for EH code-generation.
16948 * verify.c (merge_types): Treat all promoted integral types as equal.
16949 * constants.c (build_constants_constructor): To force creation of
16950 current_constant_pool_data_ref, call build_constant_data_ref.
16951
16952 * javaop.def (lload): Fix typo.
16953 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
16954
16955 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
16956
16957 * parse.c: Don't include function.h.
16958
16959 1997-08-27 Per Bothner <bothner@cygnus.com>
16960
16961 * except.[ch]: New files.
16962 * Makefile.in (JAVA_OBJS): Add except.o
16963 * expr.c: Temporary warning about unimplemented exceptions.
16964 * verify.c: Verify exception handlers.
16965
16966 * jcf-dump.c (disassemble_method): Print exception table.
16967
16968 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16969
16970 * expr.c (verify_jvm_instructions): Started a thorough
16971 verification of invoke* bytecodes.
16972 (expand_byte_code): flush quick stack if PC is the target of a
16973 branch. and undef RET (conflicting with config/i386/i386.h).
16974 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
16975 used.
16976 (expand_invoke): Now handles invokeinterface and do more
16977 verification according to the bytecode.
16978 (lookup_field): Don't try to load the class if processing
16979 dtable_type.
16980 (can_widen_reference_to): Now handles interfaces.
16981 * decl.c (init_decl_processing): New global variable
16982 soft_lookupinterfacemethod_node, declared in java-tree.h.
16983 Call set_super_info on string_type_node.
16984 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
16985 defined.
16986 * class.c (set_super_info): Fills the CLASS_* flags according to
16987 access_flags.
16988 (get_access_flags_from_decl): Handles all class flags.
16989
16990 1997-08-26 Per Bothner <bothner@cygnus.com>
16991
16992 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
16993 * parse.c (yyparse): Check for abstract method, and missing code.
16994 * expr.c (expand_byte_code): Change interface.
16995 * lang.c (put_decl_node): Print promoted types prettier.
16996 * verify.c (verify_jvm_instruction): Change interface.
16997 Partial support for scanning exception table.
16998 For load instructions, handle promoted integral types.
16999
17000 1997-08-21 Per Bothner <bothner@cygnus.com>
17001
17002 * verify.c: New file, with contents moved from expr.c.
17003 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
17004 * typeck.c (is_array_type_p): Moved here from expr.c.
17005 * java-tree.h: Add some now-needed function declarations.
17006 * Makefile.in (JAVA_OBJS): Added verify.o.
17007
17008 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17009
17010 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
17011 METHOD_ABSTRACT flag.
17012
17013 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
17014 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
17015 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
17016
17017 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
17018 variables.
17019 (start_java_method): Hook for SYNCHRONIZED methods.
17020
17021 * expr.c (build_java_jsr, build_java_ret): New functions
17022 (JSR,PRE): New macros
17023 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
17024 (verify_jvm_instructions): tableswitch, lookupswitch,
17025 monitorenter, monitorexit, goto_w: verified.
17026 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
17027 (build_java_monitor): New function.
17028 (MONITOR_OPERATION): Modified to call build_java_monitor()
17029 (verify_jvm_instructions): Started a thorough verification of
17030 invoke* bytecodes.
17031
17032 1997-08-19 Per Bothner <bothner@cygnus.com>
17033
17034 Support verification of jsr/ret subroutines (used for try/finally).
17035 * decl.c (return_address_type_node): New type node.
17036 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
17037 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
17038 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
17039 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
17040 TYPE_USED): New macros for special types in type_map.
17041
17042 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
17043 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
17044 BCODE_JUMP_TARGET.
17045 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
17046
17047 * expr.c (can_widen_reference_to): New function.
17048 (pop_type): Use it.
17049 (merge_type_state): Support handling start of subroutine.
17050 (push_pending_block): Return char* error message, instead of calling
17051 fatal on an error. Also handle subroutines.
17052 (verify_jvm_instructions): Handle errors from push_poending_block.
17053 Support jsr and ret instructions.
17054
17055 1997-08-19 Per Bothner <bothner@cygnus.com>
17056
17057 * jcf-io.c (find_classfile): Fix thinko.
17058 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
17059
17060 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
17061
17062 * Makefile.in (BISON): Remove.
17063
17064 1997-08-07 Per Bothner <bothner@cygnus.com>
17065
17066 * Makefile.in: Convert to autoconf.
17067 * config-lang.in (outputs): Added java/Makefile.
17068
17069 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
17070 Rename cc1java to jc1.
17071
17072 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
17073 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
17074
17075 * class.c (class_depth): Do load_class if needed.
17076
17077 Mostly better verification.
17078 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
17079 (init_decl_processing): Change return type of soft_checkcast.
17080 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
17081 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
17082 lang_print_error): New functions.
17083 (lang_init): Set global hook print_error_function to lang_print_error.
17084 * expr.c: In the type_map ptr_type_node is only used for null now.
17085 (pop_type, merge_types): Hence ptr_type_node matches any reference.
17086 (merge_types): Dererence pointer to record types before comparing.
17087 (decode_newarray_type, merge_types): On error just return NULL.
17088 (build_java_binop): Add preliminary implementation (with warning)
17089 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
17090 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
17091 (expand_compare, expand_java_goto, expand_java_call): Don't
17092 push_pending_block, since that only makes sense when verifying.
17093 (merge_type_state): Different return codes.
17094 (push_pending_block): A block may need to be verified more than once.
17095 (expand_byte_code): Warn about unused code at code generation time.
17096 (verify_jvm_instruction): Changed logic, since code may need to be
17097 re-verified if type-state has changed. Also, better error handling.
17098 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
17099 Improve newarray, anewarray, ?aload, athrow,
17100 * java-tree.h (LABEL_CHANGED): New macro.
17101
17102 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
17103
17104 * decl.c (soft_athrow_node): New global variable initialized.
17105 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
17106 * typeck.c (convert): Added support for REAL_TYPE.
17107 (convert_to_char): New function.
17108 (convert): Handle CHAR_TYPE.
17109 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
17110 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
17111 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
17112 promoted type.
17113 (verify_jvm_instructions): Added break a the end of bogus unop: label.
17114 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
17115 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
17116 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
17117 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
17118 to Use The Right Things.
17119 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
17120 compatible with INT. BOOLEAN is made equivalent to BYTE.
17121 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
17122 OPCODE_ifnonnull): Now supported.
17123 (build_java_athrow): New function.
17124
17125 1997-08-04 Per Bothner <bothner@cygnus.com>
17126
17127 Rename method name <init> to match G++ (and fix mangling).
17128 * class.c (layout_class): Replace method name of <init> by class name.
17129 (make_method_value): Do inverse renaming of constructor from <init>.
17130 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
17131 * typeck.c (lookup_java_constructor): New function.
17132 * expr.c (expand_invoke): If method_name is <init>, call
17133 lookup_java_constructor to find constructor.
17134
17135 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
17136
17137 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
17138
17139 * parse.c (get_class_constant): Modified to handle array "classes"
17140 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
17141 wide type.
17142 (convert): Modified to handle real type.
17143 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
17144 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
17145 variables declared.
17146 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
17147 soft_multianewarray, soft_newarray_node, soft_throw_node): New
17148 global variables initialized.
17149 (find_local_variable): Handles the case of a pointer
17150 (end_java_method): Restore the use of one more scope
17151 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
17152 build_java_array_length_access, expand_java_arrayload,
17153 expand_java_arraystore, expand_java_array_length,
17154 expand_java_multianewarray, expand_java_anewarray,
17155 build_java_check_indexed_type, is_array_type_p,
17156 build_java_throw_out_of_bound_exception): New functions.
17157 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
17158 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
17159 OPCODE_<t>aload): Implemented code for verification.
17160 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
17161 ARRAY_NEW_MULTI): Macro defined.
17162 (CONVERT): Modified to invoke convert().
17163 (case OPCODE_aload2): Fixed index typo from 2 to 1.
17164
17165 1997-07-31 Per Bothner <bothner@cygnus.com>
17166
17167 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
17168 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
17169 (make_class_data): Field name needs '/' as package prefix.
17170 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
17171
17172 1997-07-25 Per Bothner <bothner@cygnus.com>
17173
17174 Implement debug information for local variables.
17175 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
17176 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
17177 DECL_LOCAL_SLOT_CHAIN): New macros.
17178 (struct lang_decl_var): New type.
17179 * parse.c (give_name_to_locals): Move to decl.c.
17180 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
17181 (start_java_method): Re-write parameter handling.
17182 (pending_local_decls): New global variable.
17183 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
17184 (find_local_variable): Accept pc so we can skips decls not in range.
17185 (struct binding_level): Add end_pc field.
17186 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
17187 (various): Change so current pc gets passed to find_local_variable.
17188
17189 * decl.c (init_decl_processing): Re-arrange fields in
17190 class_type_node and and method_type_node to match kaffe 0.9.1.
17191 * class.c (make_method_value, make_class_data): Update
17192 initializations to match.
17193
17194 1997-07-16 Per Bothner <bothner@cygnus.com>
17195
17196 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
17197 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
17198 (push_super_field): New function.
17199 (make_class_data): Handle inheritance of class static initializer.
17200 (layout_class): New name mangling.
17201 * constants.c (build_constant_data_ref): Init type of data array
17202 to a one-element array.
17203 (build_constants_constructor): Set DECL_SIZE from complete array type.
17204 * decl.c: Rename class_type, object_type etc to class_type_node,
17205 object_type_node etc. Make former inherit from latter.
17206 * expr.c (expand_invoke): Add cast of function address.
17207 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
17208 * parse.c (yyparse): Don't call layout_class here.
17209 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
17210
17211 1997-06-14 Per Bothner <bothner@cygnus.com>
17212
17213 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
17214 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
17215 (alloc_class_constant): New.
17216 * expr.c (expand_invoke): Make sure method's class is initialized.
17217 * class.c (interits_from_p, emit_register_class): New functions.
17218 * parse.c (yyparse): Call emit_register_class.
17219
17220 1997-06-09 Per Bothner <bothner@cygnus.com>
17221
17222 * constants.c: New file, to handle constant pool.
17223 * Makefile.in (JAVA_OBJS): Add constants.o.
17224 * decl.c (init_decl_processing): Update, fix, finish various structs.
17225 (pushdecl_top_level): New.
17226 * parse.c (layout_class): Moved to class.c.
17227 * expr.c (java_push_constant_from_pool): New function.
17228 * class.c (build_class_ref): Make work fully
17229 (make_class_data): Emit super-class, constant pool, interface vector.
17230
17231 1997-06-03 Per Bothner <bothner@cygnus.com>
17232
17233 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
17234 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
17235 * class.c (class_depth): New function.
17236 (lookup_named_class): Replaced by new function lookup_class.
17237 * decl.c (object_type_node, string_type_node): New.
17238 Remove various types that we no longer need.
17239 * expr.c (verify_jvm_instructions): New separate verifier pass.
17240 (push_type, pop_type): New functions for verifier.
17241 (type_stack_dup, pop_argument_types, merge_types): Likewise.
17242 (expand_byte_code): Simplify, since we assume already verified.
17243 (expand_invoke): Now mostly works.
17244 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
17245 * lang.c (main_class): Move to parse.c. Don't make_class yet.
17246 * parse.c: Wait to allocate class object until we know its name.
17247 (layout_class): Calculate DECL_VINDEX for each virtual method.
17248 * typeck.c (get_array_type): Rename to ...
17249 (build_java_array_type): ... and provide working implementation.
17250 (build_java_signature): New function - build Java signature of type.
17251 (set_java_signature): New function - cache signature with type.
17252 (lookup_java_method): New function.
17253
17254 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
17255
17256 * class.c (ident_subst): Take extra SUFFIX parameter.
17257 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
17258 (set_constant_value, build_static_field_ref, is_compiled_class): New.
17259 (build_class_ref): Actually implement.
17260 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
17261 * decl.c (builtin_function): New.
17262 (init_decl_processing): Update for current Kaffe. Declare some
17263 builtin Kaffe functions.
17264 * expr.c (build_address_of): New.
17265 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
17266 Renamed (from expand_java_new etc), and added working implementations.
17267 (build_field_ref): Now also handle static fields.
17268 (expand_invoke): Implement invokestatic, and start implement rest.
17269 * java-opcodes.h: Use javaop.def to avoid duplicated list.
17270 * javaop.def: Rename invokevirt -> invokevirtual.
17271 * lang.c (use_handles): Removed.
17272 * parse.c: Add support for ConstantValue attribute.
17273 Handle nested loading of a class. (JPOOL_UTF): New.
17274
17275 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
17276
17277 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
17278
17279 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
17280
17281 * Make-lang.in (java.install-man): New empty rule.
17282 * typeck.c (set_local_type): New function.
17283 * expr.c (STORE_INTERNAL): Call find_local_variable,
17284 not find_stack_slot. Call set_local_type.
17285
17286 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
17287
17288 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
17289 and building RECORD_TYPE CONSTRUCTORs.
17290 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
17291
17292 * lang.c (use_handles): Change the default to 0.
17293 * decl.c: Define and build class_type, field_type, utf8const_type.
17294 * class.c (make_class_data, make_field_value,
17295 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
17296 hashUtf8String, strLengthUtf8, mangled_classname:
17297 Functions to build reflective data structures.
17298 * parse.c (yyparse): Call make_class_data.
17299
17300 * jcf-io.c (open_class, find_classfile): New functions.
17301 * jcf-dump.c: Support reading classfile from explicitly-named
17302 class file (without CLASSPATH searching).
17303
17304 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
17305
17306 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
17307 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
17308 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
17309 (get_constant): Now trivial for CONSTANT_Utf8.
17310
17311 * jcf.h: Make NEW_CPOOL the default.
17312 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
17313
17314 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
17315
17316 New directory.