re PR java/15710 (ICE: tree check: expected class 'E', have 'c' (integer_cst) in...
[gcc.git] / gcc / java / ChangeLog
1 2004-09-28 Tom Tromey <tromey@redhat.com>
2
3 PR java/15710:
4 * class.c (add_miranda_methods): Load superinterface if not
5 already loaded.
6
7 2004-09-28 Andrew Haley <aph@redhat.com>
8
9 PR java/17586
10 * jcf-parse.c (load_class): Don't try to read a class that we've
11 already read.
12
13 2004-09-28 Andrew Haley <aph@redhat.com>
14
15 * jcf-parse.c (load_class): Back out previous broken patch.
16
17 2004-09-28 Andrew Haley <aph@redhat.com>
18
19 PR java/17586
20 * jcf-parse.c (load_class): Don't try to read a class that we've
21 already read.
22 Check that we really did read the right class.
23
24 2004-09-25 Tom Tromey <tromey@redhat.com>
25
26 PR java/17500:
27 * parse.y (create_artificial_method): Use add_method_1.
28
29 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
30
31 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
32 comment typos.
33 * gcj.texi: Fix typos.
34
35 2004-09-24 Tom Tromey <tromey@redhat.com>
36
37 PR java/15656:
38 * parse.y (class_instance_creation_expression): Set `$$' to NULL
39 in error parts of rule.
40 (unary_expression): Don't call error_if_numeric_overflow when $1
41 is NULL.
42
43 2004-09-24 Tom Tromey <tromey@redhat.com>
44
45 PR java/16789:
46 * parse.y (resolve_qualified_expression_name): Set
47 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
48 * expr.c (force_evaluation_order): Check for empty argument list
49 after stripping COMPOUND_EXPR.
50
51 2004-09-23 Andrew Haley <aph@redhat.com>
52
53 PR java/16927:
54 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
55 COND_EXPRs.
56
57 2004-09-23 Tom Tromey <tromey@redhat.com>
58
59 PR java/17329:
60 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
61 where operand is null.
62
63 2004-09-23 Tom Tromey <tromey@redhat.com>
64
65 PR java/17380:
66 * parse.y (not_accessible_p): Allow access to protected members
67 even when class is not static.
68
69 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
70
71 * Make-lang.in: Revert the gcc-none.o change.
72
73 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
74
75 * parse.y (patch_anonymous_class): VEC_space returns true if there
76 is space.
77
78 2004-09-21 Matt Austern <austern@apple.com>
79
80 Fix bootstrap.
81 * gjavah.c (free_method_name_list): Fix function definition so
82 it's a proper C prototype.
83
84 2004-09-21 Tom Tromey <tromey@redhat.com>
85
86 PR java/17575:
87 * gjavah.c (free_method_name_list): New method.
88 (main): Call it.
89
90 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
91 Zack Weinberg <zack@codesourcery.com>
92
93 * java-tree.def: Use tree_code_class enumeration constants
94 instead of code letters.
95 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
96 new tree-class enumeration constants.
97
98 2004-09-13 Tom Tromey <tromey@redhat.com>
99
100 PR java/17216:
101 * class.c (layout_class_method): Put synthetic methods into the
102 vtable.
103
104 2004-09-11 Andrew Pinski <apinski@apple.com>
105
106 * Make-lang.in (java/ggc-none.c): Change dependency
107 for ggc.h into $(GGC_H).
108
109 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
110
111 * Make-lang.in (java/win32-host.o): Add dependency on
112 coretypes.h.
113 * win32-host.c: Add includes for coretypes.h, jcf.h
114
115 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
116
117 * Make-lang.in (GCJH_OBJS): Change dependency from
118 ggc-none.o to java/ggc-none.o
119 (JCFDUMP_OBJS): Likewise.
120 (java/ggc-none.o): New target.
121
122 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
123
124 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
125 * class.c (build_utf8_ref, build_static_field_ref,
126 make_field_value, make_method_value, get_dispatch_table,
127 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
128 * constants.c (get_tag_node, build_ref_from_constant_pool,
129 build_constants_constructor): Likewise.
130 * decl.c (java_init_decl_processing): Likewise.
131 * expr.c (build_java_array_length_access, build_newarray,
132 expand_java_multianewarray, expand_java_pushc, expand_iinc,
133 build_java_binop, build_field_ref, expand_java_add_case,
134 expand_java_call, build_known_method_ref, build_invokevirtual,
135 build_invokeinterface, build_jni_stub): Likewise.
136 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
137 * jcf-parse.c (get_constant): Likewise.
138 * lex.c (do_java_lex): Likewise.
139 * parse.y (patch_binop, patch_unaryop, patch_cast,
140 build_newarray_node, patch_newarray): Likewise.
141 * resource.c (compile_resource_data): Likewise.
142 * typeck.c (build_prim_array_type): Likewise.
143
144 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
145
146 * decl.c (java_init_decl_processing): Adjust
147 initialize_sizetypes call.
148
149 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
150
151 * jv-scan.c (fancy_abort): Add.
152
153 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
154
155 * expr.c (build_java_arrayaccess): Use convert to change
156 len's type.
157
158 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
159
160 * class.c (make_local_function_alias): Allocate extra space for 'L'
161 in name buffer. Reported by Thomas Neumann.
162
163 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
164
165 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
166 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
167 * lex.c (do_java_lex): Adjust.
168 (error_if_numeric_overflow): Likewise.
169
170 2004-08-18 Andrew Pinski <apinski@apple.com>
171
172 * class.c (make_local_function_alias): Only make a new decl if we
173 support alias attribute on all decls.
174
175 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
176
177 * class.c (make_local_function_alias): New function. Create local
178 alias for public method DECL.
179 (make_method_value): Use make_local_function_alias.
180 * parse.y (craft_constructor): Don't special-case anonymous classes.
181 Always set ctor_name to init_identifier_node.
182 (lookup_method_invoke): Call layout_class_method when creating
183 anonymous class constructor.
184
185 2004-08-18 Richard Henderson <rth@redhat.com>
186
187 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
188 default case. Treat '<' similarly. Update for
189 is_gimple_formal_tmp_var name change.
190
191 2004-08-17 Andrew Haley <aph@redhat.com>
192
193 * lang.c (lang_printable_name): Obey verbose flag.
194 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
195 lang_printable_name().
196 (verify_constructor_circularity, get_printable_method_name,
197 check_abstract_method_definitions, java_check_regular_methods,
198 java_check_abstract_methods, check_inner_class_access,
199 fix_constructors, patch_method_invocation, patch_return):
200 Likewise.
201 * expr.c (pop_type_0): Likewise.
202
203 * java-tree.h (lang_printable_name_wls): Delete.
204
205 2004-08-16 Tom Tromey <tromey@redhat.com>
206
207 PR java/8473:
208 * parse.y (primary): Changed for initialized and uninitialized
209 array creations.
210 (array_access): Handle array_creation_initialized.
211 (array_creation_expression): Split into
212 array_creation_initialized and array_creation_uninitialized.
213
214 2004-08-16 Andrew Haley <aph@redhat.com>
215
216 * jcf-write.c (find_constant_index): Canonicalize NaNs when
217 generating bytecode.
218
219 2004-08-16 Elliot Lee <sopwith@redhat.com>
220
221 PR java/9677
222 * jcf-parse.c (java_parse_file): Handle filenames with embedded
223 spaces, and quoted filelists.
224
225 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
226
227 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
228 * class.c (build_utf8_ref, build_static_field_ref,
229 make_field_value, make_method_value, get_dispatch_table,
230 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
231 * constants.c (get_tag_node, build_ref_from_constant_pool,
232 build_constants_constructor): Likewise.
233 * decl.c (java_init_decl_processing): Likewise.
234 * expr.c (build_java_array_length_access, build_newarray,
235 expand_java_multianewarray, expand_java_pushc, expand_iinc,
236 build_java_binop, build_field_ref, expand_java_add_case,
237 expand_java_call, build_known_method_ref, build_invokevirtual,
238 build_invokeinterface, build_jni_stub): Likewise.
239 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
240 * jcf-parse.c (get_constant): Likewise.
241 * lex.c (do_java_lex): Likewise.
242 * parse.y (patch_binop, patch_unaryop, patch_cast,
243 build_null_of_type, patch_newarray): Likewise.
244 * resource.c (compile_resource_data): Likewise.
245 * typeck.c (build_prim_array_type): Likewise.
246
247 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
248
249 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
250 Don't create BLOCK here or call java_gimplify_block.
251
252 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
253
254 * java-tree.h (flag_deprecated): Removed.
255 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
256 * parse.y (check_deprecation): Check warn_deprecated instead of
257 flag_deprecated.
258
259 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
260
261 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
262 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
263 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
264 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
265 flag_force_classes_archive_check, flag_optimize_sci,
266 flag_indirect_dispatch): Remove explicit declarations.
267 * lang.opt: Add implicit declare/define/assign. Remove obsolete
268 final comment.
269
270 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
271
272 PR bootstrap/14893
273 * Make-lang.in (java.install-man): Install from either build
274 tree or source tree, whichever has the file first.
275
276 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
277
278 * jcf-parse.c (get_constant): Adjust force_fit_type call.
279 * lex.h (SET_LVAL_NODE_TYPE): Remove.
280 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
281 (do_java_lex): Likewise. Adjust force_fit_type call.
282
283 2004-08-04 Roger Sayle <roger@eyesopen.com>
284 Andrew Haley <aph@redhat.com>
285
286 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
287 checking trees as they're being built.
288 (convert): Call convert_ieee_real_to_integer if we're
289 converting a constant, even if we're writing a class file.
290
291 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
292
293 PR java/16701
294 * parse.y (fold_constant_for_init): Call resolve_field_access with
295 correct current_class context.
296
297 2004-08-01 Roger Sayle <roger@eyesopen.com>
298
299 * decl.c (update_aliases, initialize_local_variable): Replace calls
300 to build with calls to buildN.
301 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
302 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
303 * parse.h (BUILD_THROW): Likewise.
304 * parse.y (switch_expression, synchronized_statement,
305 catch_clause_parameter, array_creation_expression,
306 conditional_expression, make_qualified_name,
307 resolve_qualified_expression_name, patch_method_invocation,
308 patch_invoke, build_method_invocation, build_new_invocation,
309 build_assignment, patch_assignment, build_binop, patch_binop,
310 build_string_concatenation, build_incdec, patch_unaryop,
311 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
312 patch_return, build_if_else_statement, build_labeled_block,
313 build_new_loop, build_loop_body, build_bc_statement,
314 build_assertion, encapsulate_with_try_catch, build_try_statement,
315 build_try_finally_statement, patch_synchronized_statement,
316 emit_test_initialization): Likewise, replace build with buildN.
317
318 2004-07-28 Eric Christopher <echristo@redhat.com>
319
320 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
321 (java_unsafe_for_reeval): Ditto.
322
323 2004-07-26 <hp@bitrange.com>
324
325 * parse.y (build_super_invocation): Adjust declaration order to
326 avoid declaration after statement.
327
328 2004-07-25 Bernardo Innocenti <bernie@develer.com>
329
330 * decl.c: Rename all identifiers named `class' to `cl'.
331
332 2004-07-25 Richard Henderson <rth@redhat.com>
333
334 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
335
336 2004-07-23 Mike Stump <mrs@apple.com>
337
338 * boehm.c (set_bit): Improve type safety wrt unsignedness.
339 * gjavah.c (throwable_p, decode_signature_piece,
340 print_full_cxx_name, print_include, add_namelet, add_class_decl,
341 process_file): Likewise.
342 * jcf-dump.c (main): Likewise.
343 * jcf-io.c (read_zip_member): Likewise.
344 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
345 give_name_to_class, get_class_constant): Likewise.
346 * jcf-write.c (find_constant_wide, push_long_const,
347 generate_classfile): Likewise.
348 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
349 * parse.y (read_import_dir): Likewise.
350 * typeck.c (parse_signature_type): Likewise.
351 * verify.c (verify_jvm_instructions): Likewise.
352 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
353
354 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
355
356 * Make-lang.in: Replace rmic and rmiregistry references with
357 grmic and grmiregistry.
358 * gcj.texi: Likewise.
359
360 2004-07-20 Andrew Haley <aph@redhat.com>
361
362 PR java/16431.
363 * verify.c (verify_jvm_instructions): Comment change only.
364
365 * typeck.c (build_java_array_type): Add size field to array name.
366
367 * java-tree.h (LOCAL_SLOT_P): New.
368 (update_aliases): Add PC argument.
369 (pushdecl_function_level): New function.
370
371 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
372 MODIFY_EXPR, and SAVE_EXPR.
373 (java_gimplify_modify_expr): New function.
374
375 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
376 (expand_iinc): Pass PC to update_aliases().
377 (STORE_INTERNAL): Likewise.
378 (process_jvm_instruction): Likewise.
379
380 * decl.c (base_decl_map): New variable.
381 (uniq): New variable.
382 (update_aliases): Rewrite with more thorough checking.
383 (debug_variable_p): New function.
384 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
385 (check_local_named_variable): Delete whole function.
386 (initialize_local_variable): New function.
387 (check_local_unnamed_variable): Add checks and comments.
388 (find_local_variable): Rewrite.
389 (java_replace_reference): New function.
390 (function_binding_level): New variable.
391 (pushdecl_function_level): New function.
392 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
393 (maybe_pushlevels): Call pushdecl() on each of the new decls.
394 (start_java_method): Reset uniq. Create base_decl_map. Set
395 function_binding_level.
396 (end_java_method): Null unused fields to save memory.
397
398 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
399
400 * class.c (add_interface_do): Remove.
401 (set_super_info, interface_of_p, maybe_add_interface,
402 add_interface, make_class_data, layout_class,
403 add_miranda_methods): Adjust BINFO accessors and addition.
404 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
405 accessors.
406 * jcf-write.c (generate_classfile): Likewise.
407 * parse.y (patch_anonymous_class, check_inner_circular_reference,
408 check_circular_reference, java_complete_class,
409 check_abstract_method_definitions,
410 java_check_abstract_method_definitions,
411 check_interface_throws_clauses, java_check_abstract_methods,
412 lookup_java_interface_method2,
413 find_applicable_accessible_methods_list): Adjust BINFO accessors
414 and addition.
415 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
416
417 2004-07-18 Roger Sayle <roger@eyesopen.com>
418
419 * builtins.c (max_builtin, min_builtin,
420 java_build_function_call_expr): Replace calls to build with buildN.
421 * class.c (build_class_ref, build_static_field_ref,
422 get_dispatch_table, make_class_data, layout_class_method): Likewise.
423 * constants.c (build_ref_from_constant_pool): Likewise.
424 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
425 add_stmt_to_compound): Likewise.
426 * except.c (build_exception_object_ref, expand_end_java_handler):
427 Likewise.
428 * java-gimplify.c (java_gimplify_case_expr,
429 java_gimplify_default_expr, java_gimplify_block,
430 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
431 * jcf-write.c (generate_bytecode_insns): Likewise.
432 * typeck.c (convert_ieee_real_to_integer): Likewise.
433
434 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
435
436 * java-tree.h (builtin_function): Declare.
437
438 2004-07-16 Steven Bosscher <stevenb@suse.de>
439
440 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
441 abuse restore_line_number_status.
442
443 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
444
445 g++/15861
446 * jcf-parse.c (java_emit_static_constructor): Specify default
447 priority.
448
449 2004-07-13 Per Bothner <per@bothner.com>
450
451 * java-tree.h (all_class_filename): Remove useless macro.
452 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
453 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
454 * parse.y (java_parser_context_restore_global): Replace
455 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
456 * jcf-parse.c (read_class, java_parse_file): Likewise.
457
458 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
459
460 PR java/16474
461 gjavah.c (print_field_info): Emit constant only if field is static.
462
463 2004-07-11 Roger Sayle <roger@eyesopen.com>
464
465 * expr.c (java_truthvalue_conversion, flush_quick_stack,
466 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
467 build_java_ret, build_java_throw_out_of_bounds_exception,
468 build_java_array_length_access, java_check_reference,
469 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
470 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
471 expand_java_arrayload, build_java_monitor, expand_java_return,
472 expand_load_internal, expand_java_NEW, build_get_class,
473 build_instanceof, expand_java_CHECKCAST, expand_iinc,
474 build_java_soft_divmod, build_java_binop, build_field_ref,
475 expand_compare, expand_java_goto, expand_java_switch,
476 expand_java_add_case, build_class_init, build_known_method_ref,
477 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
478 expand_invoke, build_jni_stub, expand_java_field_op,
479 java_expand_expr, expand_byte_code, STORE_INTERNAL,
480 force_evaluation_order, emit_init_test_initialization): Convert
481 calls to "build" into calls to the prefered "buildN" functions.
482
483 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
484
485 * java-tree.h (set_block): Remove.
486 * lang.c (java_clear_binding_stack): New.
487 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
488 * decl.c (struct binding_level): Remove this_block.
489 (clear_binding_level): Likewise.
490 (poplevel): Don't handle this_block.
491 (set_block): Remove.
492
493 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
494
495 * class.c (common_enclosing_context_p): Remove statement with no
496 side-effects.
497
498 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
499
500 PR java/8618
501 * parse.y (create_anonymous_class): Remove 'location' argument. Use
502 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
503 (craft_constructor): Inherit access flags for implicit constructor
504 from the enclosing class.
505 (create_class): Fix comment typo.
506 (resolve_qualified_expression_name): Pass type of qualifier to
507 not_accessible_p, not the type in which target field was found.
508 (not_accessible_p): Handle inner classes. Expand protected
509 qualifier-subtype check to enclosing instances, but don't apply this
510 check to static members. Allow protected access to inner classes
511 of a subtype. Allow private access within common enclosing context.
512 (build_super_invocation): Get WFL line number info from current
513 class decl.
514 (build_incomplete_class_ref): Update for new create_anonymous_class
515 signature.
516 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
517 common_enclosing_instance_p.
518 * class.c (common_enclosing_context_p): New. Determine if types
519 share a common enclosing context, even across static contexts.
520 (common_enclosing_instance_p): Renamed from
521 common_enclosing_context_p. Determines if types share a common
522 non-static enclosing instance.
523 * java-tree.h (common_enclosing_instance_p): Declare.
524 * jcf-write.c (get_method_access_flags): New. Surpress private flag
525 for inner class constructors.
526 (generate_classfile): Use get_method_access_flags.
527
528 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
529
530 * class.c (interface_of_p): Check for null TYPE_BINFO.
531
532 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
533
534 * class.c (make_class): Do not create binfo here.
535 (set_super_info): Create it here.
536 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
537
538 2004-07-08 Richard Henderson <rth@redhat.com>
539
540 * expr.c (case_identity, get_primitive_array_vtable,
541 java_expand_expr, emit_init_test_initialization): Remove.
542 * java-tree.h (java_expand_expr): Remove.
543 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
544
545 2004-07-07 Per Bothner <per@bothner.com>
546
547 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
548 get internal error due to mismatched types.
549
550 * gcj.texi (Invoking gij): Document new -verbose:class flag.
551
552 * gcj.texi (Linking): New node. Document -lgij usage.
553
554 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
555
556 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
557 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
558 * java/class.c (set_super_info, class_depth, interface_of_p,
559 maybe_add_interface, add_interface, make_class_data,
560 layout_class, add_miranda_methods): Adjust BINFO macros.
561 * expr.c (can_widen_reference_to, lookup_field): Likewise.
562 * jcf-write.c (generate_classfile): Likewise.
563 * parse.y (patch_anonymous_class,
564 check_inner_circular_reference, check_circular_reference,
565 java_complete_class, check_abstract_method_definitions,
566 java_check_abstract_method_definitions,
567 check_interface_throws_clauses, java_check_abstract_methods,
568 lookup_java_interface_method2,
569 find_applicable_accessible_methods_list): Likewise.
570 * typeck.c (find_method_in_interface): Likewise.
571 * verify.c (merge_types): Likewise.
572
573 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
574
575 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
576 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
577
578 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
579
580 * class.c (make_class): Use make_tree_binfo.
581 (set_super_info, add_interface_do): Likewise.
582 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
583
584 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
585
586 * verify.c: Correct array element access formatting thinko.
587
588 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
589
590 * verify.c: Insert a short blurb at the start referring to the JVMS.
591 (merge_type_state): Remove redundant nested if statement.
592 (verify_jvm_instructions): Ensure current_subr is initialised to
593 NULL_TREE.
594 Minor formatting fixes all over the place.
595
596 2004-07-02 Richard Henderson <rth@redhat.com>
597
598 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
599
600 2004-07-01 Richard Henderson <rth@redhat.com>
601
602 * class.c (registerClass_libfunc): Remove.
603 (init_class_processing): Don't set it.
604 (emit_register_classes): Take list_p parameter. Fill it in
605 with _Jv_RegisterClass calls.
606 * decl.c (java_init_decl_processing): Don't call
607 init_resource_processing.
608 * jcf-parse.c (java_emit_static_constructor): New.
609 (java_parse_file): Call it.
610 * resource.c (registerResource_libfunc): Remove.
611 (init_resource_processing): Remove.
612 (write_resource_constructor): Take list_p parameter. Fill it in
613 with _Jv_RegisterResource calls.
614 * java-tree.h: Update prototypes.
615
616 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
617
618 PR java/1262
619 * class.c (layout_class_method): Do not override package-private
620 method if its in a different package.
621 (split_qualified_name): Move here from parse.y. Rename from
622 breakdown_qualified. Add comment.
623 (in_same_package): Move here from parse.y. Add comment.
624 * java-tree.h (break_down_qualified, in_same_package): Declare.
625 (in_same_package): Likewise.
626 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
627 Callers updated.
628
629 2004-06-29 Andrew Haley <aph@redhat.com>
630
631 * except.c (expand_start_java_handler): Push a new binding level.
632 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
633 register_exception_range() to register where we'll do it.
634 (expand_end_java_handler): Remove old bogus code. Replace with
635 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
636 the top of the expression we're curently building.
637 (maybe_end_try): Delete.
638 * decl.c (binding_level.exception_range): New field.
639 (clear_binding_level): Add field exception_range. Reformat.
640 (poplevel): Call expand_end_java_handler().
641 (poplevel): Call java_add_stmt only if functionbody is false.
642 (maybe_poplevels): Don't call maybe_end_try() from here.
643 (end_java_method): Clear no longer used trees in function decl.
644 (register_exception_range): New function.
645 * java-tree.h (register_exception_range, struct eh_range): Declare.
646
647 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
648
649 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
650
651 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
652
653 Formatting fixes.
654 * expr.c (class_has_finalize_method): Fix method name indentation.
655 (expand_java_call): Remove K&R style parameter declaration.
656 (expand_invoke): Fix statement indentation.
657 (expand_java_field_op): Likewise.
658 * parse-scan.y: Fix typo.
659 (reset_report): Fix method name indentation.
660 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
661 line. Fix typos.
662 * verify.c (verify_jvm_instructions): Document parameters, insert
663 page break.
664 * lang.c (lang_init_source): Fix method name indentation.
665 * class.c (common_enclosing_context_p): Likewise.
666 (emit_symbol_table): Fix parameter list indentation.
667 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
668 parameter declaration.
669 * constants.c: Fix copyright notice indentation.
670 * typeck.c (find_method_in_superclasses): Fix parameter list
671 indentation.
672 (find_method_in_interfaces): Likewise.
673 * zextract.c (makelong): Fix method name indentation.
674
675 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
676
677 PR java/15715.
678 * parse.y (create_interface): Set correct access modifiers for
679 interfaces.
680 * jcf-write.c (get_classfile_modifiers): New function.
681 (generate_classfile): Use get_classfile_modifiers, not
682 get_access_flags.
683
684 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
685
686 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
687 dependency to current parser context, not NULL_TREE, for top-level
688 classes.
689 (jdep_resolve_class): Enable member access check for all inner
690 class dependencies.
691
692 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
693
694 * parse.y (qualify_and_find): Pass type decl, not identifier, to
695 load_class.
696
697 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
698
699 PR java/15734
700 * expr.c (expand_java_field_op): Ensure that target class for static
701 field access has been loaded.
702
703 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
704 Ranjit Mathew <rmathew@hotmail.com>
705
706 PR java/1207, java/16178
707 * jcf-parse.c (load_class): Return immediately if passed a type decl
708 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
709 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
710 before calling load_class.
711 (qualify_and_find): Likewise.
712 (find_in_imports_on_demand): Likewise.
713 (find_applicable_accessible_methods_list): Likewise.
714
715 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
716
717 * parse.y (java_layout_seen_class_methods): Don't call load_class
718 on class defined by source parser.
719
720 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
721
722 * parse.y (set_nested_class_simple_name_value): Removed.
723 (java_complete_expand_class): Remove calls to
724 set_nested_class_simple_name_value.
725
726 2004-06-22 Andrew Haley <aph@redhat.com>
727 Ranjit Mathew <rmathew@hotmail.com>
728
729 Fixes PR java/16113.
730 * decl.c (force_poplevels): Remove call to expand_end_bindings.
731
732 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
733
734 * parse.y (create_class): Correct diagnostic message about
735 java.lang.Object extending anything else.
736
737 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
738
739 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
740 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
741 * constants.c (build_ref_from_constant_pool): Likewise.
742 * expr.c (build_java_array_length_access): Likewise.
743 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
744 (invoke_build_dtable, build_invokevirtual): Likewise.
745 (build_invokeinterface, java_expand_expr): Likewise.
746 (emit_init_test_initialization): Likewise.
747 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
748 * parse.y (make_qualifed_name, build_array_ref): Likewise.
749
750 2004-06-21 Andrew Haley <aph@redhat.com>
751
752 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
753 block.
754
755 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
756
757 * jcf.h (struct JCF): Change java_source, right_zip and finished
758 to unsigned int.
759 * lex.h (struct java_lexer): Change hit_eof, read_anything,
760 byte_swap and use_fallback to unsigned int.
761 * parse.h (struct _jdep): Change flag0 to unsigned int.
762
763 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
764
765 Fixes PR java/13948
766 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
767 before trying to lay out its methods.
768 * jcf-parse.c (read_class): Track parsed files using canonical paths
769 obtained via lrealpath from libiberty.
770 (java_parse_file): Likewise.
771 (parse_source_file_1): Rename formal parameter to reflect its
772 modified purpose. Minor formatting fix.
773
774 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
775
776 * class.c (emit_register_classes): Make the function uninlinable,
777 do not set current_function_cannot_inline.
778 * resource.c (write_resource_constructor): Do not reset
779 flag_inline_functions around rest_of_compilation.
780
781 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
782
783 PR java/15769
784 * expr.c (java_truthvalue_conversion): Handle
785 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
786 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
787 i.e. return the expression.
788
789 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
790
791 * gjavah.c: Include version.h
792
793 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
794
795 * jcf-write.c (generate_bytecode_conditional): Correct handling
796 of unordered conditionals. Add comment.
797
798 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
799 Per Bothner <per@bothner.com>
800
801 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
802 local variable was initialised upon declaration.
803 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
804 variable was final and initialised upon declaration.
805 * check-init.c (check_final_reassigned): Give error only if a blank
806 final is not definitely unassigned or if an initialised final is
807 reassigned.
808 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
809 assignment expressions. Remove case MODIFY_EXPR, label do_default.
810 (check_init): Perform initialised-variable-removing-optimisation
811 only on non-final local variables.
812
813 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
814
815 * jcf-write.c (generate_bytecode_conditional): Handle binops
816 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
817 and LTGT_EXPR.
818 (generate_bytecode_insns): Likewise.
819
820 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
821
822 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
823 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
824
825 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
826
827 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
828 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
829
830 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
831
832 * decl.c (struct binding_level): Add GTY marker. Compile
833 binding_depth unconditionally.
834 (current_binding_level, free_binding_level, global_binding_level):
835 Likewise.
836 (clear_binding_level): Unconditionally set binding_depth.
837 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
838
839 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
840
841 * lex.c (java_new_lexer): Set 'encoding'.
842 (java_read_char): Improve error message for unrecognized characters.
843 * lex.h (struct java_lexer): New field 'encoding'.
844
845 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
846
847 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
848
849 2004-05-21 Mark Wielaard <mark@klomp.org>
850
851 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
852 extern.
853
854 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
855
856 * typeck.c: Remove non-printable character 160.
857
858 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
859
860 * check-init.c: Correct minor typos.
861
862 2004-05-13 Diego Novillo <dnovillo@redhat.com>
863
864 * Make-lang.in, expr.c, java-gimplify.c: Rename
865 tree-simple.[ch] to tree-gimple.[ch].
866
867 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
868
869 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
870
871 2004-05-13 Diego Novillo <dnovillo@redhat.com>
872
873 Merge from tree-ssa-20020619-branch. See
874 ChangeLog.tree-ssa for details.
875
876 * Make-lang.in, builtins.c, check-init.c, class.c,
877 constants.c, decl.c, except.c, expr.c, java-except.h,
878 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
879 lang.c, lang.opt, parse.y, resource.c: Merged.
880 * java-gimplify.c: New file.
881
882 2004-05-10 Andrew Haley <aph@redhat.com>
883
884 * parse.y (create_class): Set TYPE_VFIELD.
885 * decl.c (java_init_decl_processing): Likewise.
886
887 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
888 * class.c (make_method_value): Replace DECL_VINDEX with call to
889 get_method_index().
890 (get_dispatch_vector): Likewise.
891 (layout_class_method): Likewise.
892 Replace set of DECL_VINDEX with call to set_method_index().
893 (set_method_index): New function.
894 (get_method_index): New function.
895 * java-tree.h (set_method_index): New function decl.
896 (get_method_index): New function decl.
897
898 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
899
900 * parse.y (check_pkg_class_access): Add new argument
901 and use it when cl is NULL to call lookup_cl on it.
902 (parser_check_super_interface): Do not call lookup_cl.
903 Pass this_decl to check_pkg_class_access and NULL
904 instead of lookup_cl.
905 (parser_check_super): Update for change in
906 check_pkg_class_access.
907 (do_resolve_class): Likewise.
908 (process_imports): Likewise.
909 (find_in_imports_on_demand): Likewise.
910 (resolve_qualified_expression_name): Likewise.
911
912 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
913
914 Fixes PR java/9685, PR java/15073
915 * parse.y (accessibility_string): New method.
916 (not_accessible_field_error): Use accessibility_string()
917 instead of java_accstring_lookup().
918 (resolve_qualified_expression_name): Check with
919 check_pkg_class_access() before allowing access using
920 qualified names.
921 Fix comment typo.
922 Use check_pkg_class_access() instead of not_accessible_p()
923 for unqualified types.
924 (not_accessible_p): Use DECL_CONTEXT (member) instead of
925 REFERENCE for package-private access checking.
926 (patch_method_invocation): Use accessibility_string() instead
927 of java_accstring_lookup().
928
929 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
930
931 Fixes PR java/15133
932 * gjavah.c (struct method_name): Add member is_native.
933 (overloaded_jni_method_exists_p): Match candidate method only if
934 it is native.
935 (print_method_info): Initialise is_native flag from the method's
936 access flags.
937
938 2004-04-30 Roger Sayle <roger@eyesopen.com>
939
940 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
941 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
942
943 2004-04-22 Roger Sayle <roger@eyesopen.com>
944
945 * resource.c (write_resource_constructor): Guard call to possibly
946 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
947
948 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
949
950 * class.c (make_class_data): Add new field aux_info.
951 * decl.c (java_init_decl_processing): Push type and decl for
952 `aux_info'.
953
954 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
955
956 * expr.c (expand_java_NEW): Don't use size argument for
957 _Jv_AllocObject calls.
958 * parse.y (patch_invoke): Likewise.
959
960 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
961
962 * expr.c (build_invokeinterface): Remove unused variables to
963 fix warnings.
964
965 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
966
967 * class.c (get_interface_method_index): New function. Return dispatch
968 index for interface method.
969 (make_method_value): For interface methods, set index field to
970 iface dispatch index, not DECL_VINDEX.
971 * expr.c (build_invokeinterface): Use get_interface_method_index.
972
973 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
974
975 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
976
977 2004-03-31 Andrew Haley <aph@redhat.com>
978
979 PR java/14104
980 * jcf-io.c (opendir_in_zip): Tidy up error handling.
981
982 2004-03-30 Zack Weinberg <zack@codesourcery.com>
983
984 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
985 form of GTY markers.
986
987 2004-03-25 Marcus Meissner <meissner@suse.de>
988
989 PR java/14689:
990 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
991
992 2004-03-23 Tom Tromey <tromey@redhat.com>
993
994 PR java/14315:
995 * jcf-write.c (make_class_file_name): Don't report if mkdir
996 failed with EEXIST.
997
998 2004-03-23 Tom Tromey <tromey@redhat.com>
999
1000 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
1001
1002 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
1003
1004 * class.c, gjavah.c, lang.c: Fix comment typos.
1005 * gcj.texi: Fix typos.
1006
1007 2004-03-19 Per Bothner <per@bothner.com>
1008
1009 * gcj.texi (Code Generation): Document new flags and assert defaults.
1010
1011 * class.c (assume_compiled_node_struct): Rename type to
1012 class_flag_node_struct, as it is now also used for enable_assertions.
1013 Rename assume_compiled_node typedef. Rename excludep field to value.
1014 (find_assume_compiled_node): Rename function to find_class_flag_node.
1015 Minor optimization - avoid needless strlen.
1016 (add_assume_compiled): Some tweaking and optimization.
1017 Rename and generalize to add_class_flag takem an extra parameter.
1018 (add_assume_compled): New just calls add_class_flag.
1019 (add_enable_assert, enable_assertions): New functions.
1020 (enable_assert_tree): New static.
1021 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
1022 * lang.opt (fenable-assertions, fenable-assertions=,
1023 fdisable-assertions, fdisable-assertions=): New options.
1024 * lang.c (java_handle_option): Handle new options.
1025 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
1026 class in an interface - create helper class nested in outer interface.
1027 (build_assertion): Short-circuit if enable_assertions is false.
1028
1029 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1030
1031 * java-tree.h: Changes throughout to add checking to macros
1032 and numerous whitespace changes.
1033 (VAR_OR_FIELD_CHECK): New macro.
1034 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
1035 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
1036
1037 2004-03-16 Per Bothner <per@bothner.com>
1038
1039 * jcf-jump.c (options): New --print-constants option.
1040 * gcj.texi (Invoking jcf-dump): Document --print-constants.
1041
1042 * jcf-dump.c (flag_print_constant_pool): Default to off.
1043 (print_constant_terse_with_index): New helper function.
1044 (various places): Check flag_print_constant_pool where missing.
1045 (main): If verbose set flag_print_constant_pool.
1046 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
1047
1048 2004-03-15 Andrew Haley <aph@redhat.com>
1049
1050 PR java/14581
1051 * parse.y (java_complete_lhs): Check that final variable has an
1052 initializer.
1053
1054 2004-03-12 Andrew Haley <aph@redhat.com>
1055
1056 PR java/14551
1057 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
1058 conversion.
1059
1060 2004-02-29 Roger Sayle <roger@eyesopen.com>
1061
1062 * jcf-parse.c (java_parse_file): Handle the case that input_filename
1063 is NULL.
1064
1065 2004-02-27 Per Bothner <per@bothner.com>
1066
1067 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
1068 suggestion: Use build_incomplete_class_ref.
1069 This fixes PR java/13508, java/11714.
1070
1071 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
1072
1073 * java/parse.h: Update copyright.
1074
1075 2004-02-26 Andrew Haley <aph@redhat.com>
1076
1077 PR java/14231:
1078 * parse.y (check_interface_throws_clauses): Check for
1079 !METHOD_INVISIBLE (iface_method).
1080 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
1081 well as CLASS_ABSTRACT.
1082
1083 2004-02-25 Per Bothner <per@bothner.com>
1084
1085 * parse.y (build_assertion): If we're in an inner class, create the
1086 class$ helper routine in the outer class.
1087
1088 2004-02-19 Richard Henderson <rth@redhat.com>
1089
1090 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
1091
1092 2004-02-16 Geoffrey Keating <geoffk@apple.com>
1093
1094 * Make-lang.in (java.install-man): Add extra dependencies.
1095
1096 2004-02-13 Geoffrey Keating <geoffk@apple.com>
1097
1098 * Make-lang.in: Install man pages under the same names
1099 (possibly transformed) as the program they document.
1100
1101 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
1102
1103 * gjavah.c: Include "intl.h".
1104 (error): New function.
1105 (main): Call gcc_init_libintl.
1106 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
1107 print_stub_or_jni, process_file, main): Use error rather than
1108 fprintf.
1109 (print_method_info, usage, help, version, main): Mark strings for
1110 translation with _. Avoid splitting up sentences. Send
1111 information messages to stdout.
1112 * jcf-dump.c: Include "intl.h".
1113 (main): Call gcc_init_libintl.
1114 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
1115 Mark error, usage and version messages for translation with _.
1116 Avoid splitting up sentences.
1117 * jv-scan.c: Include "intl.h".
1118 (fatal_error, warning): Change parameter s to msgid. Translate
1119 messages.
1120 (main): Call gcc_init_libintl.
1121 (usage, help, version): Mark error, usage and version messages for
1122 translation with _. Avoid splitting up sentences.
1123 * jvgenmain.c: Include "intl.h".
1124 (main): Call gcc_init_libintl.
1125 (usage, main): Mark error messages for translation with _.
1126 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
1127 JVGENMAIN_OBJS): Add intl.o.
1128 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
1129 java/jvgenmain.o): Update dependencies.
1130
1131 2004-02-08 Per Bothner <per@bothner.com>
1132
1133 * parse.y (resolve_qualified_expression_name): In case of inaccessible
1134 class don't use not_accessible_field_error, which can get confused.
1135
1136 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
1137
1138 Make-lang.in (po-generated): Delete.
1139
1140 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
1141
1142 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
1143 Depend on target.h.
1144 * decl.c: Include target.h.
1145 (start_java_method): Replace PROMOTE_PROTOTYPES with
1146 targetm.calls.promote_prototypes.
1147 * expr.c: Include target.h.
1148 (pop_arguments): Replace PROMOTE_PROTOTYPES with
1149 targetm.calls.promote_prototypes.
1150 * parse.y: Include target.h.
1151 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
1152 with targetm.calls.promote_prototypes.
1153
1154 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
1155
1156 * typeck.c: Update copyright.
1157
1158 2004-02-02 Tom Tromey <tromey@redhat.com>
1159
1160 * decl.c (java_init_decl_processing): Remove duplicate
1161 gnu/gcj/RawData.
1162
1163 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
1164
1165 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
1166
1167 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
1168
1169 * expr.c (build_field_ref): Move variable
1170 definition up.
1171
1172 2004-01-28 Andrew Haley <aph@redhat.com>
1173
1174 * expr.c (build_field_ref): Widen field offset.
1175
1176 2004-01-27 Andrew Haley <aph@redhat.com>
1177
1178 java/13273
1179 * parse.y (check_interface_throws_clauses): Make sure class_decl
1180 has been loaded.
1181
1182 2004-01-22 Jeff Sturm <jsturm@one-point.com>
1183
1184 PR java/13733
1185 * parse.y (patch_assignment): Don't modify lhs_type for
1186 reference assignments.
1187
1188 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
1189
1190 * Make-lang.in: Replace $(docdir) with doc.
1191 (java.info, java.srcinfo, java.man, java.srcman): New rules.
1192 (java.install-man): Revamp rule.
1193
1194 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
1195
1196 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
1197 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
1198 instead of deferred backquote.
1199
1200 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
1201
1202 * typeck.c (find_method_in_interfaces): Move variable
1203 definition up.
1204
1205 2004-01-16 Andrew Haley <aph@redhat.com>
1206
1207 PR java/13273:
1208 * typeck.c (shallow_find_method): New.
1209 (find_method_in_superclasses): New.
1210 (find_method_in_interfaces): New.
1211 (lookup_do): Rewrite.
1212 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
1213
1214 * jcf-parse.c (read_class): Save and restore output_class.
1215 * decl.c (java_expand_body): Set output_class from fndecl.
1216
1217 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
1218
1219 * class.c (gen_indirect_dispatch_tables): Fix string length
1220 calculations.
1221
1222 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
1223
1224 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
1225 (java.srcextra): Copy above back to source directory if requested.
1226 (po-generated): Delete reference to $(parsedir).
1227 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
1228 Use implicit rule.
1229
1230 2004-01-14 Jan Hubicka <jh@suse.cz>
1231
1232 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
1233 estimation.
1234
1235 2004-01-09 Mark Mitchell <mark@codesourcery.com>
1236
1237 * java-tree.h (java_expand_expr): Change prototype.
1238 * expr.c (java_expand_expr): Add alt_rtl parameter.
1239
1240 2004-01-09 Andrew Haley <aph@redhat.com>
1241
1242 PR java/12755:
1243 * parse.y (java_fix_constructors): Set output_class.
1244 (java_reorder_fields): Likewise.
1245 (java_layout_classes): Likewise.
1246 (java_expand_classes): Generate indirect dispatch tables.
1247 (java_expand_classes): Set output_class.
1248 (java_finish_classes): Likewise.
1249 * lang.c (java_init): Turn on always_initialize_class_p if we're
1250 using indirect dis[atch.
1251 (java_decl_ok_for_sibcall): Use output_class, not current_class.
1252 (java_get_callee_fndecl): Use class local atable.
1253 * jcf-parse.c
1254 (always_initialize_class_p): Decl moved to java-tree.h.
1255 (HANDLE_CLASS_INFO): Set output_class.
1256 (read_class): Likewise.
1257 (parse_class_file): Call gen_indirect_dispatch_tables.
1258 (parse_zip_file_entries): Set output_class.
1259 (java_parse_file): Set output_class. Don't emit symbol tables.
1260 * java-tree.h (output_class): New.
1261 Remove global declarations for otable, atable, and ctable.
1262 (always_initialize_class_p): moved here from decl.c.
1263 (DECL_OWNER): New.
1264 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
1265 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
1266 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
1267 (struct lang_type): Add otable_methods, otable_decl,
1268 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
1269 ctable_decl, catch_classes, type_to_runtime_map.
1270 * expr.c (build_field_ref): Make otable, atable, and ctable class
1271 local rather than global.
1272 (build_known_method_ref): Likewise.
1273 (build_invokeinterface): Likewise.
1274 (java_expand_expr): Pass runtime type (rather than actual type) to
1275 expand_start_catch.
1276 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
1277 this class. Look up each class in that map to delete duplicates.
1278 (expand_end_java_handler): Pass runtime type (rather than actual
1279 type) to expand_start_catch.
1280 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
1281 (do_nothing): New.
1282 (java_init_decl_processing): Rearrange things. Remove global
1283 declarations of otable, atable, and ctable.
1284 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
1285 (java_expand_body): Set output_class.
1286 * constants.c (build_constant_data_ref): Use output_class, not
1287 current_class.
1288 (alloc_name_constant): Likewise.
1289 * class.c (gen_indirect_dispatch_tables): New.
1290 (build_class_ref): Generate hard reference to superclass, even if
1291 using indirect dispatch.
1292 (build_static_field_ref): Use class local atable.
1293 (make_class_data): Generate hard reference to superclass, even if
1294 using indirect dispatch.
1295 Generate symbolic references to interfaces when using indirect
1296 dispatch.
1297 (make_class_data): Emit otable, atable, and ctable.
1298 Make otable, atable, and ctable class local rather than global.
1299 (emit_catch_table): Make otable, atable, and ctable class local
1300 rather than global.
1301
1302 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
1303
1304 * parse.y (catch_clause_parameter): Fix typo.
1305
1306 PR java/13404
1307 * parse.y: (catch_clause_parameter): Return early if $3, aka
1308 formal_parameter, is null.
1309
1310 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
1311
1312 * class.c: Remove uses of "register" specifier in
1313 declarations of arguments and local variables.
1314 * decl.c: Likewise.
1315 * expr.c: Likewise.
1316 * gjavah.c: Likewise.
1317 * jcf-dump.c: Likewise.
1318 * jcf-io.c: Likewise.
1319 * jcf-parse.c: Likewise.
1320 * jcf-write.c: Likewise.
1321 * keyword.h: Likewise.
1322 * parse.y: Likewise.
1323 * typeck.c: Likewise.
1324 * verify.c: Likewise.
1325
1326 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
1327
1328 * Make-lang.in (GCJ_CROSS_NAME): Delete.
1329 (java.install_common, java.install-man): Adjust for above.
1330 (java.uninstall): Likewise.
1331
1332 2003-12-03 Michael Koch <konqueror@gmx.de>
1333
1334 * class.c (make_class_data):
1335 Push field value to 'hack_signers' instead of 'signers'.
1336 * decl.c (java_init_decl_processing):
1337 Push field 'hack_signers' instead of 'signers'.
1338
1339 2003-12-03 Zack Weinberg <zack@codesourcery.com>
1340
1341 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
1342 including iconv.h.
1343
1344 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
1345
1346 PR java/12374:
1347 * parse.y (qualify_ambiguous_name): Remove lots of broken
1348 field access processing - there's no need to do that here,
1349 because we have resolve_field_access. Remove
1350 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
1351 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
1352 used.
1353
1354 2003-12-01 Jeff Sturm <jsturm@one-point.com>
1355
1356 Fix PR java/13237
1357 * parse.y (java_complete_lhs): Save location prior to patching
1358 CALL_EXPR.
1359
1360 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
1361
1362 PR java/12548
1363 * resource.c (write_resource_constructor): Append
1364 "_resource" to constructor identifier name.
1365
1366 2003-11-25 Jeff Sturm <jsturm@one-point.com>
1367
1368 Fix PR java/13183.
1369 * constants.c (cpool_for_class): New function.
1370 (outgoing_cpool): Remove global variable.
1371 (alloc_name_constant): Use cpool_for_class.
1372 (build_constants_constructor): Likewise.
1373 * decl.c (java_expand_body): Set current_class.
1374 * java-tree.h (outgoing_cpool) Remove declaration.
1375 (init_outgoing_cpool): Likewise.
1376 * jcf-parse.c (init_outgoing_cpool): Remove function.
1377 (parse_class_file): Don't call init_outgoing_cpool.
1378 * parse.y (java_complete_expand_methods): Don't call
1379 init_outgoing_cpool. Don't save outgoing_cpool.
1380 (java_expand_classes): Don't restore outgoing_cpool.
1381 (java_finish_classes): Likewise.
1382
1383 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
1384
1385 * Make-lang.in: (java.install-common) Add
1386 symlink for $(target_noncanonical)-gcjh for
1387 native builds.
1388
1389 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
1390
1391 * Make-lang.in (java.extraclean): Delete.
1392
1393 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
1394
1395 * Make-lang.in (check-java): Add.
1396
1397 2003-11-19 Jeff Sturm <jsturm@one-point.com>
1398
1399 Fix PR java/13024.
1400 * except.c (prepare_eh_table_type): Allocate variable-sized
1401 buffer `buf' with alloca.
1402
1403 2003-11-17 Jeff Sturm <jsturm@one-point.com>
1404
1405 Fix PR java/12857.
1406
1407 decl.c (java_init_decl_processing): Don't initialize
1408 class_not_found_type_node, no_class_def_found_type_node.
1409
1410 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
1411 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
1412 (class_not_found_type_node, no_class_def_found_type_node):
1413 Don't define.
1414
1415 parse.y (build_dot_class_method_invocation): Add this_class
1416 argument. Qualify method invocations to a different class.
1417 (create_new_parser_context): Initialize saved_data_ctx to 0.
1418 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
1419 (build_dot_class_method): Don't load classes. Register
1420 incomplete types.
1421 (build_incomplete_class_ref): Special cases for interfaces
1422 and inner classes. Move build_dot_class_method call to here...
1423 (patch_incomplete_class_ref): ...from here. Pass current_class
1424 to build_dot_class_method_invocation.
1425 (build_assertion): Pass class_type to
1426 build_dot_class_method_invocation.
1427 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
1428
1429 2003-11-17 Jeff Sturm <jsturm@one-point.com>
1430
1431 Fix PR java/12739.
1432 * java-tree.h (BLOCK_EMPTY_P): Define.
1433 * parse.y (java_complete_lhs): Check for empty blocks
1434 in TRY_FINALLY_EXPR case.
1435
1436 2003-11-17 Andrew Haley <aph@redhat.com>
1437
1438 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
1439 (struct lang_decl_var:freed): New variable.
1440 * decl.c (poplevel): Mark local vars that have gone out of scope.
1441 (push_jvm_slot): Don't use the RTL of a var that has gone out of
1442 scope.
1443
1444 2003-11-16 Jason Merrill <jason@redhat.com>
1445
1446 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
1447 and TAGS files that include them for each front end.
1448
1449 2003-11-15 Tom Tromey <tromey@redhat.com>
1450
1451 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
1452
1453 2003-11-12 Jason Merrill <jason@redhat.com>
1454
1455 PR optimization/12547
1456 * lang.c (java_tree_inlining_walk_subtrees): Just walk
1457 BLOCK_EXPR_BODY directly.
1458
1459 2003-11-12 Andrew Haley <aph@redhat.com>
1460
1461 PR java/11045
1462 * parse.y (fold_constant_for_init): Check that we really do have a
1463 constant.
1464
1465 PR java/11533
1466 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
1467 init_test_decls being inlined.
1468
1469 PR java/12890:
1470 * parse.y (do_resolve_class): Check return value from
1471 breakdown_qualified().
1472
1473 2003-11-11 Tom Tromey <tromey@redhat.com>
1474
1475 PR java/12915:
1476 * parse.y (merge_string_cste): Handle case where we have a
1477 pointer that happens to be zero, not null_pointer_node.
1478
1479 2003-11-10 Tom Tromey <tromey@redhat.com>
1480
1481 * jcf-parse.c (classify_zip_file): Correctly compare
1482 filename_length against length of manifest file's name.
1483
1484 2003-11-08 Tom Tromey <tromey@redhat.com>
1485
1486 PR java/12894:
1487 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
1488
1489 2003-11-06 Andrew Haley <aph@redhat.com>
1490
1491 * expr.c (java_stack_swap): Make sure destination stack slots are
1492 of the correct type.
1493
1494 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
1495
1496 * Make-lang.in (dvi): Move targets to $(docobjdir).
1497 (gcj.dvi): Simplify rule and adjust target.
1498 (gcj.info): Simplify rule.
1499 (gcj.pod): New intermediate rule.
1500 (gcjh.pod): Likewise.
1501 (jv-scan.pod): Likewise.
1502 (jcf-dump.pod): Likewise.
1503 (gij.pod): Likewise.
1504 (jv-convert.pod): Likewise.
1505 (rmic.pod): Likewise.
1506 (rmiregistry.pod): Likewise.
1507 (gcj.1): Delete.
1508 (gcjh.1): Delete.
1509 (jv-scan.1): Delete.
1510 (jcf-dump.1): Delete.
1511 (gij.1): Delete.
1512 (jv-convert.1): Delete.
1513 (rmic.1): Delete.
1514 (rmiregistry.1): Delete.
1515
1516 2003-11-02 Jeff Sturm <jsturm@one-point.com>
1517
1518 Fixes PR java/12866.
1519 * parse.y (resolve_qualified_expression_name): Move test
1520 for outer field access methods from here...
1521 (check_thrown_exceptions) ...to here.
1522
1523 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
1524
1525 * .cvsignore: Delete.
1526
1527 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
1528
1529 * verify.c (verify_jvm_instructions): Don't warn about legal
1530 eh binding regions generated for example by jdk 1.4.1.
1531
1532 2003-10-24 David S. Miller <davem@redhat.com>
1533
1534 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
1535
1536 2003-10-22 Andrew Haley <aph@redhat.com>
1537
1538 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
1539 (java_get_callee_fndecl): New.
1540
1541 * jcf-parse.c (java_parse_file): Call emit_catch_table().
1542
1543 * java-tree.h (ctable_decl): New.
1544 (catch_classes): New.
1545 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
1546
1547 * decl.c (java_init_decl_processing): Add catch_class_type.
1548 Add ctable_decl.
1549 Add catch_classes field.
1550
1551 * class.c (build_indirect_class_ref): Break out from
1552 build_class_ref.
1553 (make_field_value): Check flag_indirect_dispatch.
1554 (make_class_data): Ditto.
1555 Tidy uses of PUSH_FIELD_VALUE.
1556 Add field catch_classes.
1557 (make_catch_class_record): New.
1558
1559 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
1560
1561 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
1562
1563 * jcf-write.c: Follow spelling conventions.
1564 * parse.y: Likewise.
1565
1566 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
1567
1568 * ChangeLog: Fix typos.
1569 * expr.c: Fix comment typos.
1570 * jcf-write.c: Likewise.
1571 * lang.c: Likewise.
1572 * lex.c: Likewise.
1573 * mangle.c: Likewise.
1574 * parse-scan.y: Likewise.
1575 * parse.y: Likewise.
1576
1577 2003-10-22 Tom Tromey <tromey@redhat.com>
1578
1579 * expr.c (expand_byte_code): Only warn about dead bytecode when
1580 extra_warnings is set.
1581
1582 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
1583
1584 Fix for PR java/12586.
1585 * mangle.c (find_compression_record_match): Don't iterate through
1586 package namespace elements unless they all match compression_table
1587 entries.
1588
1589 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
1590
1591 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
1592 (generate-manpages): Likewise.
1593 (java.maintainer-clean): Likewise.
1594 (gcj.info): Likewise.
1595 (gcj.1): Likewise.
1596 (gcjh.1): Likewise.
1597 (jv-scan.1): Likewise.
1598 (jcf-dump.1): Likewise.
1599 (gij.1): Likewise.
1600 (jv-convert.1): Likewise.
1601 (rmic.1): Likewise.
1602 (rmiregistry.1): Likewise.
1603 (java.install-man): Likewise.
1604 (parse-scan.o): Move and define complete compile line.
1605 (parse.o): Likewise.
1606 (jcf-tree-inline.o): Move.
1607
1608 2003-10-20 Mark Mitchell <mark@codesourcery.com>
1609
1610 * Make-lang.in (info): Update dependencies.
1611 (java.install-info): Remove.
1612 ($(srcdir)/java/gcj.info): Replace with ...
1613 ($(docobjdir)/gcj.info): ... this.
1614
1615 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
1616
1617 * Make-lang.in: Replace uses of $(target_alias) with
1618 $(target_noncanonical).
1619
1620 2003-10-09 Tom Tromey <tromey@redhat.com>
1621
1622 * decl.c (java_init_decl_processing): Declare signers field.
1623 * class.c (make_class_data): Set signers field.
1624
1625 2003-10-09 Jason Merrill <jason@redhat.com>
1626
1627 * parse.y (patch_assignment): Use make_node to create a BLOCK.
1628 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
1629 POINTER_TYPE.
1630
1631 2003-10-06 Mark Mitchell <mark@codesourcery.com>
1632
1633 * Make-lang.in (java.info): Replace with ...
1634 (info): ... this.
1635 (java.dvi): Replace with ...
1636 (dvi): ... this.
1637 (java.generated-manpages): Replace with ...
1638
1639 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
1640
1641 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
1642
1643 2003-10-01 Andrew Haley <aph@redhat.com>
1644
1645 * jcf-parse.c (java_parse_file): Write otable and atable.
1646 * java-tree.h (atable_methods): New.
1647 (atable_decl): New.
1648 (atable_syms_decl): New.
1649 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
1650 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
1651 (symbol_*type): Rename method_symbol* to symbol*type.
1652 (emit_offset_symbol_table): Delete.
1653 (emit_symbol_table): New.
1654 (get_symbol_table_index): New.
1655 (atable_type): New.
1656 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
1657 (build_known_method_ref): Likewise.
1658 (get_symbol_table_index): Rename from get_offset_table_index.
1659 Parameterize to allow re-use by differing types of symbol table.
1660 (build_invokevirtual): Pass table to get_offset_table_index.
1661 * decl.c (java_init_decl_processing): Push types and decls for
1662 atable and atable_syyms.
1663 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
1664 (make_class_data): Add new fields atable and atable_syms.
1665 (emit_symbol_table): Rename from emit_offset_symbol_table.
1666 Parameterize to allow re-use by different types of symbol table.
1667 (build_symbol_entry): Renamed from build_method_symbols_entry.
1668
1669 2003-09-30 Roger Sayle <roger@eyesopen.com>
1670
1671 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
1672 semantics for SAVE_EXPR, by caching the result in a temporary.
1673
1674 2003-09-28 Richard Henderson <rth@redhat.com>
1675
1676 * check-init.c (check_init): Save and restore input_location
1677 instead of file and line separately.
1678 * decl.c (java_expand_body): Likewise.
1679 * jcf-write.c (generate_bytecode_insns): Likewise.
1680 * parse.y (safe_layout_class): Likewise.
1681 * jcf-parse.c (read_class, parse_class_file): Likewise.
1682 (java_parse_file): Use %H for warning locator.
1683
1684 2003-09-28 Roger Sayle <roger@eyesopen.com>
1685
1686 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
1687 with void-type branches instead of using a COMPOUND_EXPR.
1688
1689 2003-09-28 Jeff Sturm <jsturm@one-point.com>
1690
1691 * decl.c (java_optimize_inline, dump_function): Remove.
1692 * java-tree.h (java_optimize_inline): Remove declaration.
1693 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
1694 * parse.y (source_end_java_method, java_expand_classes):
1695 Likewise. Remove dead code.
1696
1697 2003-09-27 Roger Sayle <roger@eyesopen.com>
1698
1699 * lang.c (java_init_options): Set flag_evaluation_order.
1700 * expr.c (force_evaluation_order): Don't attempt to force
1701 evaluation order of binary operations using save_expr.
1702 * parse.y (java_complete_lhs): No longer need to call
1703 force_evaluation_order when constructing binary operators.
1704
1705 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1706 Bryce McKinlay <bryce@mckinlay.net.nz>
1707
1708 PR java/1333:
1709 * parse.y (not_accessible_field_error): New function.
1710 (resolve_expression_name): Check field access permissions.
1711 (resolve_qualified_expression_name): Use
1712 not_accessible_field_error.
1713 (resolve_qualified_expression_name): Likewise.
1714
1715 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1716
1717 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
1718
1719 2003-09-23 Roger Sayle <roger@eyesopen.com>
1720
1721 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
1722 with equal operands without side-effects.
1723
1724 2003-09-22 Jeff Sturm <jsturm@one-point.com>
1725
1726 * decl.c (java_init_decl_processing): Don't emit otable decls
1727 if flag_indirect_dispatch is not set.
1728
1729 2003-09-21 Richard Henderson <rth@redhat.com>
1730
1731 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1732 resource.c: Revert.
1733
1734 2003-09-21 Richard Henderson <rth@redhat.com>
1735
1736 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1737 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
1738
1739 2003-09-20 Richard Henderson <rth@redhat.com>
1740
1741 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
1742
1743 2003-09-18 Roger Sayle <roger@eyesopen.com>
1744
1745 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
1746 * check-init.c (check_init): Likewise.
1747
1748 2003-09-18 Roger Sayle <roger@eyesopen.com>
1749
1750 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
1751
1752 2003-09-16 Andrew Haley <aph@redhat.com>
1753
1754 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
1755
1756 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
1757
1758 Fixes PR java/9577
1759 * mangle.c (find_compression_record_match): Skip
1760 over a "6JArray" (the array template mangled string)
1761 IDENTIFIER_NODE.
1762 (mangle_array_type): Correct minor typo.
1763 (atms): Move definition to the beginning.
1764
1765 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
1766
1767 * class.c (add_miranda_methods): Ensure super-interfaces are laid
1768 out. Fix for PR java/12254.
1769
1770 2003-09-11 Richard Henderson <rth@redhat.com>
1771
1772 * parse.y (source_end_java_method): Update for new
1773 cgraph_finalize_function argument.
1774
1775 2003-09-09 Richard Henderson <rth@redhat.com>
1776
1777 * parse.y (source_end_java_method): Update call to
1778 cgraph_finalize_function.
1779
1780 2003-09-03 Jeff Sturm <jsturm@one-point.com>
1781
1782 * decl.c (java_expand_body): New function.
1783 * expr.c (build_class_init): Set DECL_IGNORED_P.
1784 * java-tree.h (start_complete_expand_method,
1785 java_expand_body): Declare.
1786 * jcf-parse.c (cgraph.h): Include.
1787 (java_parse_file): Handle flag_unit_at_a_time.
1788 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
1789 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
1790 (java_estimate_num_insns): Use walk_tree_without_duplicates.
1791 (java_start_inlining): New function.
1792 * parse.h (java_finish_classes): Declare.
1793 * parse.y: Include cgraph.h.
1794 (block): Don't special-case empty block production.
1795 (craft_constructor): Set DECL_INLINE.
1796 (source_end_java_method): Handle flag_unit_at_a_time.
1797 Replace inline code with call to java_expand_body.
1798 (start_complete_expand_method): Remove static modifier.
1799 (java_expand_method_bodies): Patch function tree for
1800 class initialization and/or synchronization as needed.
1801 Don't begin RTL expansion yet.
1802 (java_expand_classes): Check flag_unit_at_a_time before
1803 calling finish_class.
1804 (java_finish_classes): New function.
1805 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
1806 (patch_assignment): Set DECL_CONTEXT on temporary variable.
1807 (emit_test_initialization): Set DECL_IGNORED_P.
1808
1809 2003-09-03 Roger Sayle <roger@eyesopen.com>
1810
1811 * builtins.c (enum builtin_type): Delete unused enumeration.
1812 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
1813
1814 2003-08-28 Tom Tromey <tromey@redhat.com>
1815
1816 * gcj.texi (Extensions): Document gcjlib URLs.
1817
1818 2003-08-20 Tom Tromey <tromey@redhat.com>
1819
1820 * gcj.texi (Extensions): Added xref.
1821 (libgcj Runtime Properties): Document
1822 gnu.gcj.runtime.VMClassLoader.library_control.
1823
1824 2003-08-20 Andrew Haley <aph@redhat.com>
1825
1826 * except.c (prepare_eh_table_type): Use new encoding for exception
1827 handlers when using -fno-assume-compiled.
1828
1829 2003-08-13 Tom Tromey <tromey@redhat.com>
1830
1831 * gcj.texi (Invoking gij): Document -X and -?.
1832
1833 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
1834
1835 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
1836 GCJH_OBJS, JCFDUMP_OBJS
1837 * win32-host.c: Removed the unnecessary and broken dependency
1838 on jcf.h
1839
1840 2003-08-11 Tom Tromey <tromey@redhat.com>
1841
1842 * parse.y (java_check_regular_methods): Typo fixes. Call
1843 check_interface_throws_clauses. Use
1844 check_concrete_throws_clauses.
1845 (check_interface_throws_clauses): New function.
1846 (check_concrete_throws_clauses): New function.
1847 (hack_is_accessible_p): New function.
1848 (find_most_specific_methods_list): Added FIXME.
1849 * typeck.c (lookup_do): Use `flags' argument to decide what to
1850 do. Reimplemented.
1851 (lookup_argument_method_generic): New function.
1852 (lookup_argument_method2): Removed.
1853 * jcf.h (ACC_INVISIBLE): New define.
1854 * jcf-write.c (generate_classfile): Skip invisible methods.
1855 * class.c (add_miranda_methods): New function.
1856 (layout_class_methods): Use it.
1857 (get_access_flags_from_decl): Use ACC_INVISIBLE.
1858 * java-tree.h (METHOD_INVISIBLE): New define.
1859 (lang_decl_func) [invisible]: New field.
1860 (lookup_argument_method_generic): Declare.
1861 (SEARCH_INTERFACE): New define.
1862 (SEARCH_SUPER): Likewise.
1863 (SEARCH_ONLY_INTERFACE): Likewise.
1864 (SEARCH_VISIBLE): Likewise.
1865 (lookup_argument_method2): Removed declaration.
1866
1867 2003-08-05 Tom Tromey <tromey@redhat.com>
1868
1869 Fix for PR java/11600:
1870 * parse.y (java_complete_lhs): See whether we're calling a method
1871 on an array.
1872 (check_thrown_exceptions): Added `is_array_call' argument;
1873 fixed `clone' checking; updated all callers.
1874
1875 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
1876
1877 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
1878
1879 2003-08-03 Tom Tromey <tromey@redhat.com>
1880
1881 * java-tree.h (METHOD_TRANSIENT): Removed.
1882 * decl.c (pushdecl): Removed some dead code.
1883 * class.c (get_access_flags_from_decl): Can't have transient
1884 method.
1885 (add_method_1): Can't have a transient method.
1886
1887 2003-07-28 Andreas Jaeger <aj@suse.de>
1888
1889 * jvspec.c: Convert to ISO C90 prototypes.
1890
1891 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1892
1893 * decl.c (force_poplevels): Fix warning call.
1894
1895 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1896
1897 * expr.c (expand_java_field_op): Don't use xxx_with_decl
1898 (expand_java_field_op): Likewise.
1899 * class.c (layout_class_method): Likewise
1900 (emit_register_classes): Likewise.
1901 * decl.c (pushdecl): Likewise.
1902 (poplevel): Likewise.
1903 (force_poplevels): Likewise.
1904 (give_name_to_locals): Likewise.
1905 * check-init.c (check_for_initialization): Likewise.
1906
1907 2003-07-24 Jason Merrill <jason@redhat.com>
1908
1909 * java-tree.h: Move boolean_type_node et al to the back end.
1910
1911 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1912
1913 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
1914 casts.
1915
1916 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
1917
1918 * lang.opt: Don't show -MD_ and -MDD_.
1919
1920 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
1921
1922 * lang-options.h: Remove.
1923 * lang.opt: Add help text.
1924
1925 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
1926
1927 * expr.c: Remove the last argument to expand_assignment().
1928
1929 2003-07-09 Jan Hubicka <jh@suse.cz>
1930
1931 * java-tree.h (DECL_NUM_STMTS): Rename to...
1932 (DECL_ESTIMATED_INSNS): ... this.
1933 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
1934 New static functions.
1935 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
1936 * parser.y (add_stmt_to_compound): Do not account statements.
1937
1938 2003-07-08 Mark Wielaard <mark@klomp.org>
1939
1940 * gcj.texi: CNI now expands to Compiled Native Interface.
1941
1942 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1943
1944 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
1945
1946 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
1947
1948 * expr.c (expand_byte_code): Adjist emit_line_note call.
1949
1950 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
1951
1952 * lang.c (java_handle_option): Don't handle filenames.
1953
1954 2003-07-02 Zack Weinberg <zack@codesourcery.com>
1955
1956 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
1957 DIR_SEPARATOR.
1958 Use FILENAME_CMP.
1959 * jcf-write.c: Don't default-define DIR_SEPARATOR.
1960 * jcf.h: Delete COMPARE_FILENAMES definition.
1961
1962 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
1963
1964 * lang.c (java_init_options): Update prototype.
1965
1966 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
1967
1968 * decl.c (poplevel): Adjust define_label call.
1969
1970 2003-06-27 Zack Weinberg <zack@codesourcery.com>
1971
1972 * gjavah.c (flag_jni): Make non-static.
1973 * parse-scan.y (ctxp): Make non-static.
1974
1975 * class.c (build_method_symbols_entry)
1976 * expr.c (get_offset_table_index)
1977 * jcf-parse.c (jcf_parse):
1978 Mark the definition static, matching the forward declaration.
1979
1980 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
1981
1982 * lang.c (java_handle_option): Don't check for missing arguments.
1983
1984 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
1985
1986 * class.c (push_class): Use a location_t to save place.
1987 (emit_register_classes): Set input_location. Adjust
1988 expand_function_end call.
1989 * resource.c (write_resource_constructor): Likewise.
1990 * decl.c (end_java_method): Adjust expand_function_end call.
1991 * parse.y (source_end_java_method): Likewise.
1992
1993 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
1994
1995 * lang.c (java_handle_option): Likewise.
1996
1997 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
1998
1999 * lang.c (java_handle_option): Special-casing of optional
2000 joined arguments no longer needed.
2001 * lang.opt: Update switches that take optional argument.
2002
2003 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
2004
2005 * lang.opt: Declare Java.
2006 * lang.c (java_init_options): Update.
2007
2008 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
2009
2010 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
2011
2012 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
2013
2014 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
2015 * lang.c (java_handle_option): -MD and -MMD have an underscore.
2016 * lang.opt: -MD and -MMD have an underscore.
2017
2018 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
2019
2020 * class.c (emit_register_classes): Adjust init_function_start
2021 call.
2022 * decl.c (complete_start_java_method): Likewise.
2023 * resource.c (write_resource_constructor): Likewise.
2024
2025 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
2026
2027 * Make-lang.in: Update to use options.c and options.h.
2028 * lang.c: Include options.h not j-options.h.
2029 (java_handle_option): Abort on unrecognized option.
2030 (java_init_options): Request Java switches.
2031
2032 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
2033
2034 * Make-lang.in: Handle mostlyclean.
2035
2036 2003-06-11 Tom Tromey <tromey@redhat.com>
2037
2038 * lang.c (java_handle_option): Update dependency_tracking for
2039 OPT_MF case.
2040
2041 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
2042 empty argument.
2043
2044 2003-06-10 Andrew Haley <aph@redhat.com>
2045
2046 * resource.c (write_resource_constructor): Use expand_expr to
2047 generate the address of the label attached to a resource.
2048 * Make-lang.in (java/resource.o): Add expr.h
2049
2050 2003-06-10 Andrew Haley <aph@redhat.com>
2051
2052 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
2053 (java_decl_ok_for_sibcall): New.
2054
2055 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
2056
2057 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
2058 (java/j-options.c, java/j-options.h): New.
2059 * java-tree.h (resource_name, compile_resource_file,
2060 compile_resource_data): Constify.
2061 * jcf-write.c (jcf_write_base_directory): Similarly.
2062 * jcf.h (jcf_write_base_directory): Similarly.
2063 * lang.c: Include j-options.h.
2064 (cl_options_count, cl_options, string_option, java_decode_option,
2065 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
2066 process_option_with_no): Remove.
2067 (resource_name): Constify.
2068 (LANG_HOOKS_HANDLE_OPTION): Override.
2069 (java_handle_option): New.
2070 (java_init): Don't call jcf_path_init.
2071 (java_init_options): Call jcf_path_init.
2072 * lang.opt: New.
2073 * resource.c (compile_resource_data, compile_resource_file): Constify.
2074
2075 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
2076
2077 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
2078 (struct lang_decl_func): Add last_line field.
2079 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
2080 DECL_SOURCE_LINE_LAST): Remove.
2081 * parse.y (missing_return_error, finish_method_declaration,
2082 lookup_cl, start_artificial_method_body, source_end_java_method,
2083 start_complete_expand_method): Adjust.
2084
2085 2003-06-08 Tom Tromey <tromey@redhat.com>
2086
2087 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
2088 fno-assume-compiled.
2089
2090 2003-06-08 Roger Sayle <roger@eyesopen.com>
2091
2092 * builtins.c (define_builtin_type, builtin_types): Delete.
2093 (define_builtin): Rewritten to take just the built-in code,
2094 the function's name, type and fallback library function name.
2095 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
2096 (initialize_builtins): Overhaul to define the GCC builtins
2097 used by gcj manually, providing the Java run-time's
2098 implementations as the fallback library function.
2099
2100 2003-06-08 Anthony Green <green@redhat.com>
2101
2102 * parse.y (patch_cast): Fix conversions from floating-point to
2103 integral types.
2104
2105 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
2106
2107 * Make-lang.in: Update.
2108 * lang.c: Include opts.h. Define cl_options_count and cl_options.
2109
2110 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
2111
2112 * lang.c (java_init_options): Update.
2113
2114 2003-06-05 Jan Hubicka <jh@suse.cz>
2115
2116 * Make-lang.in: Add support for stageprofile and stagefeedback
2117
2118 2003-05-31 Roger Sayle <roger@eyesopen.com>
2119
2120 * lang.c (java_init_options): Prescribe wrap-around two's
2121 complement arithmetic overflow by setting flag_wrapv.
2122
2123 2003-05-29 Roger Sayle <roger@eyesopen.com>
2124
2125 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
2126 (builtin_record): Add an additional builtin_code field to
2127 record which GCC built-in corresponds to the Java function.
2128 (java_builtins): Add new entries for atan, atan2, exp, log,
2129 pow and tan.
2130 (max_builtin, min_builtin, abs_builtin): Perform constant
2131 folding on the resulting tree.
2132 (java_build_function_call_expr): Likewise, perform constant
2133 folding on the resulting tree.
2134 (initialize_builtins): The NULL creators are now allowed in
2135 the java_builtins table, which is now terminated by an entry
2136 with builtin_code == END_BUILTINS.
2137 (check_for_builtin): Likewise. If the matching creator is
2138 NULL, construct the call using java_build_function_call_expr
2139 directly with the decl for the corresponding builtin_code.
2140
2141 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
2142
2143 * win32-host.c: Normalize copyright boilerplate.
2144
2145 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2146
2147 * parse.y (print_int_node): Use string concatentation on
2148 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
2149 function calls into one.
2150
2151 2003-05-13 Zack Weinberg <zack@codesourcery.com>
2152
2153 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
2154 fatal_io_error with calls to fatal_error; add ": %m" to the end of
2155 all the affected error messages.
2156
2157 2003-05-13 Richard Henderson <rth@redhat.com>
2158
2159 * class.c (layout_class_method): Set DECL_EXTERNAL.
2160 * decl.c (java_mark_decl_local, java_mark_class_local): New.
2161 * java-tree.h (java_mark_class_local): Declare.
2162 * jcf-parse.c (parse_class_file): Use it.
2163 * parse.y (java_expand_classes): Likewise.
2164
2165 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
2166
2167 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
2168 * lex.h: #include input.h.
2169 * jv-scan.c (input_filename): Remove.
2170
2171 2003-05-02 Tom Tromey <tromey@redhat.com>
2172
2173 PR java/10491:
2174 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
2175 (handle_inner_classes): New function.
2176
2177 2003-05-01 Tom Tromey <tromey@redhat.com>
2178
2179 PR java/10459:
2180 * parse.y (finish_for_loop): Do nothing if update expression is a
2181 EXPR_WFL_NODE wrapping nothing.
2182 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
2183
2184 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
2185
2186 * lex.h (input_lineno): Remove declaration.
2187 * parse-scan.y: #include input.h.
2188 (input_filename): Remove declaration.
2189 (input_location): Add definition.
2190 (input_line): Remove definition.
2191
2192 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
2193
2194 * lex.h (lineno): Rename to ...
2195 (input_line): ... here
2196 * parse-scan.y (lineno): Rename to ...
2197 (input_line): ... here.
2198 (reset_report): Rename lineno to input_line.
2199 * check-init.c (check_init): Likewise.
2200 * class.c (push_class): Likewise.
2201 * decl.c (complete_start_java_method, end_java_method): Likewise.
2202 * expr.c (expand_byte_code): Likewise.
2203 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
2204 * jcf-write.c (generate_bytecode_insns): Likewise.
2205 * lex.c (java_init_lex, java_allocate_new_line,
2206 do_java_lex): Likewise.
2207 * parse.h (YYNOT_TWICE): Likewise.
2208 * parse.y (empty_statement, expression_statement,
2209 java_pop_parser_context, java_parser_context_save_global,
2210 yyerror, register_fields, method_header, safe_layout_class,
2211 find_in_imports_on_demand, create_artificial_method,
2212 source_end_java_method, start_complete_expand_method,
2213 build_thisn_assign, java_complete_lhs,
2214 maybe_absorb_scoping_block): Likewise.
2215
2216 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
2217
2218 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
2219 '/' when computing java source filename
2220
2221 2003-04-13 Tom Tromey <tromey@redhat.com>
2222
2223 * gjavah.c (print_c_decl): Indentation fix.
2224
2225 2003-04-12 Zack Weinberg <zack@codesourcery.com>
2226
2227 * class.c (make_field_value, make_method_value, get_dispatch_table)
2228 (make_class_data, emit_offset_symbol_table)
2229 * constants.c (build_constants_constructor)
2230 * java-tree.h (START_RECORD_CONSTRUCTOR)
2231 * parse.y (maybe_build_array_element_wfl):
2232 Use build_constructor.
2233
2234 2003-04-10 Eric Blake <ebb9@email.byu.edu>
2235
2236 PR java/10253:
2237 * parse.y (string_convert_int_cst): Always use at least one digit
2238 in string conversion. Remove ASCII dependence.
2239 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
2240
2241 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
2242
2243 * Make-lang.in: added win32-host.c
2244 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
2245 resolves to open() on non-Win32 platforms and
2246 Win32-specific jcf_open_exact_case() on Win32
2247 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
2248 when trying .java and .class files
2249 * win32-host.c: added to repository. Defines
2250 Win32-specific jcf_open_exact_case()
2251
2252 2003-04-10 Andrew Haley <aph@redhat.com>
2253
2254 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
2255 (maybe_free_localvar): Renamed from localvar_free.
2256 Add new arg, really.
2257 (generate_bytecode_insns): Set new variable, jsrs.
2258 Only free local vars if no jsr insns have been emittted.
2259 Call maybe_free_localvar, not localvar_free.
2260
2261 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
2262
2263 * gcj.texi: Remove @ at start of file.
2264
2265 2003-03-25 Tom Tromey <tromey@redhat.com>
2266
2267 * parse.y (create_interface): Call CHECK_DEPRECATED.
2268
2269 2003-03-23 Zack Weinberg <zack@codesourcery.com>
2270
2271 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
2272
2273 2003-03-21 Zack Weinberg <zack@codesourcery.com>
2274
2275 * javaop.h (jfloat, jdouble): Make them structures mirroring
2276 the bit fields of IEEE float and double respectively.
2277 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
2278 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
2279 (union Word, union DWord): Delete.
2280 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
2281
2282 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
2283 D_NAN_MASK): Delete.
2284 (jni_print_float, jni_print_double): New. Generate
2285 hexadecimal floating constants.
2286 (print_field_info): Use jni_print_float/double.
2287
2288 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
2289 finite floating point numbers for output; special case
2290 non-finite floats.
2291
2292 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
2293
2294 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
2295 Replace 0 and 1 with true and false in return statements.
2296
2297 2003-03-19 Tom Tromey <tromey@redhat.com>
2298
2299 * lex.c (do_java_lex): Renamed from java_lex.
2300 (java_lex): New function.
2301 Include timevar.h.
2302
2303 2003-03-13 Tom Tromey <tromey@redhat.com>
2304
2305 * parse.y (resolve_inner_class): Error if qualifier is a primitive
2306 type.
2307
2308 2003-03-04 Andrew Haley <aph@redhat.com>
2309
2310 * gjavah.c (is_first_data_member): New global variable.
2311 (print_c_decl): If it's the first data member, align it as the
2312 superclass.
2313 (process_file): Set is_first_data_member.
2314
2315 2003-03-11 Tom Tromey <tromey@redhat.com>
2316
2317 * parse.y (resolve_field_access): Initialize class if field is
2318 found in another static field.
2319 * expr.c (build_class_init): Don't optimize out initialization of
2320 implemented interface.
2321
2322 2003-03-11 Andrew Haley <aph@redhat.com>
2323
2324 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
2325 warning.
2326
2327 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
2328
2329 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
2330 and DIR_SEPARATOR_2 for a target.
2331 Correct minor typos.
2332
2333 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
2334 and DIR_SEPARATOR_2 for a target into account.
2335
2336 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
2337
2338 * lang.c (java_init): Update prototype, move code to java_post_options.
2339 (java_post_options): Similarly.
2340
2341 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
2342
2343 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
2344 compare file name components depending on the case-sensitivity
2345 or otherwise of the host file system.
2346
2347 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
2348 "strcmp" to compare file name components.
2349 Use IS_DIR_SEPARATOR instead of comparing directly against
2350 DIR_SEPARATOR.
2351 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
2352 comparing directly against DIR_SEPARATOR.
2353
2354 2003-03-04 Tom Tromey <tromey@redhat.com>
2355
2356 * Make-lang.in (java.tags): New target.
2357
2358 2003-03-01 Roger Sayle <roger@eyesopen.com>
2359
2360 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
2361 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
2362
2363 2003-03-01 Tom Tromey <tromey@redhat.com>
2364
2365 * parse.y (jdep_resolve_class): Only check deprecation if we found
2366 a decl.
2367
2368 2003-02-28 Tom Tromey <tromey@redhat.com>
2369
2370 PR java/9695:
2371 * class.c (maybe_layout_super_class): Always pass a WFL to
2372 do_resolve_class.
2373 * parse.y (do_resolve_class): Updated comment to explain
2374 parameters.
2375
2376 2003-02-26 Tom Tromey <tromey@redhat.com>
2377
2378 * jcf-write.c (generate_classfile): Check whether class is
2379 deprecated before writing attribute count.
2380
2381 2003-02-25 Roger Sayle <roger@eyesopen.com>
2382
2383 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
2384 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
2385
2386 2003-02-23 Tom Tromey <tromey@redhat.com>
2387
2388 * lang-options.h: Added -Wdeprecated.
2389 * gcj.texi (Warnings): Document -Wdeprecated.
2390 * java-tree.h (flag_deprecated): Declare.
2391 * lang.c (lang_W_options): Added deprecated.
2392 (flag_deprecated): New global.
2393 * chartables.h: Rebuilt.
2394 * gen-table.pl (process_one): Look at whitespace.
2395 (print_tables): Define LETTER_SPACE, LETTER_MASK.
2396 * parse.h (CLEAR_DEPRECATED): New macro.
2397 (CHECK_DEPRECATED_NO_RESET): New macro.
2398 * jcf-parse.c (handle_deprecated): New function.
2399 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
2400 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
2401 * parse.y (resolve_type_during_patch): Check deprecation.
2402 (jdep_resolve_class): Likewise.
2403 (process_imports): Likewise.
2404 (resolve_expression_name): Likewise.
2405 (check_deprecation): Strip arrays from decl. Check
2406 flag_deprecated.
2407 (patch_method_invocation): Also check the particular constructor
2408 for deprecation.
2409 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
2410 * jcf-write.c (append_deprecated_attribute): New function.
2411 (generate_classfile): Generate deprecated attribute when
2412 appropriate.
2413 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
2414 (java_lex) [case '*']: Simplify logic.
2415 (java_start_char_p): Use LETTER_MASK.
2416 (java_part_char_p): Likewise.
2417 (java_space_char_p): New function.
2418
2419 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
2420
2421 Change base class access representation.
2422 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
2423 (add_interface_do): Likewise.
2424
2425 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
2426
2427 * decl.c (java_init_decl_processing): Change
2428 soft_lookupjnimethod_node to reflect the change in
2429 signature of _Jv_LookupJNIMethod in libjava/jni.cc
2430 * expr.c (build_jni_stub): Calculate and pass the size
2431 on the stack of the arguments to a JNI function. Use
2432 new target macro MODIFY_JNI_METHOD_CALL to allow a
2433 target to modify the call to a JNI method.
2434
2435 2003-02-08 Roger Sayle <roger@eyesopen.com>
2436
2437 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
2438 instead of basename to avoid compiler warnings on Tru64.
2439
2440 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
2441
2442 * gcj.texi: Update to GFDL 1.2.
2443
2444 2003-01-31 Andrew Haley <aph@redhat.com>
2445
2446 * parse.y (java_expand_classes): Scan the whole class list looking
2447 for access methods that haven't yet been expanded.
2448
2449 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
2450
2451 Fix for java/4269:
2452
2453 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
2454 to fix bootstrap on sparc-unknown-netbsdelf1.5.
2455 * jcf-parse.c: Likewise.
2456
2457 2003-01-31 Mark Wielaard <mark@klomp.org>
2458
2459 * gjavah.c (throwable_p): Allocate 1 more byte for string.
2460
2461 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
2462
2463 * class.c (make_class): Use BINFO_ELTS.
2464 (set_super_info): Likewse.
2465 (add_interface_do): Likewise.
2466
2467 2003-01-30 Tom Tromey <tromey@redhat.com>
2468
2469 * jcf-parse.c (read_class): Update identifier's class value if it
2470 changed during parsing.
2471
2472 2003-01-30 Loren James Rittle <ljrittle@acm.org>
2473
2474 * Make-lang.in (po-generated): Find the targets in $(parsedir).
2475 Propagate change to all other rules as required.
2476 (java/parse-scan.o): Add explicit dependency on
2477 $(parsedir)/java/parse-scan.c .
2478
2479 2003-01-29 Tom Tromey <tromey@redhat.com>
2480
2481 * parse.y (patch_assignment): Only transform the rhs of an
2482 assignment when compiling to native.
2483
2484 2003-01-28 Tom Tromey <tromey@redhat.com>
2485
2486 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
2487
2488 2003-01-28 Tom Tromey <tromey@redhat.com>
2489
2490 * lex.c (java_lex): Don't include UEOF as part of token.
2491 (java_read_unicode): Error if \u sequence prematurely terminated.
2492
2493 2003-01-27 Tom Tromey <tromey@redhat.com>
2494
2495 * parse.y (java_check_regular_methods): Check for construct after
2496 checking types in throws clause.
2497
2498 2003-01-24 Tom Tromey <tromey@redhat.com>
2499
2500 * class.c (build_static_field_ref): Only a String or numeric field
2501 can fold to a constant.
2502
2503 2003-01-23 Tom Tromey <tromey@redhat.com>
2504
2505 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
2506 file name in resource buffer.
2507
2508 2003-01-23 Tom Tromey <tromey@redhat.com>
2509
2510 * expr.c (build_known_method_ref): Use method's context to find
2511 method table index.
2512
2513 2003-01-23 Tom Tromey <tromey@redhat.com>
2514
2515 * constants.c (set_constant_entry): Allocated cleared memory.
2516
2517 2003-01-22 Tom Tromey <tromey@redhat.com>
2518
2519 * java-tree.h: Don't use PARAMS.
2520 * resource.c: Add prototypes for all functions.
2521 (write_resource_constructor): Use `const char *' to avoid
2522 warning.
2523
2524 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
2525
2526 * jcf-parse.c (process_zip_dir): Remove unused variable.
2527
2528 2003-01-22 Tom Tromey <tromey@redhat.com>
2529
2530 * expr.c (build_invokeinterface): Abort if method's context is not
2531 an interface.
2532
2533 2003-01-22 Tom Tromey <tromey@redhat.com>
2534
2535 * gcj.texi (Input and output files): Mention non-class entries.
2536 * decl.c (java_init_decl_processing): Call
2537 init_resource_processing.
2538 * java-tree.h (compile_resource_data, write_resource_constructor,
2539 compile_resource_file, init_resource_processing): Declare.
2540 * config-lang.in (gtfiles): Added resource.c.
2541 * Make-lang.in (gt-java-resource.h): New target.
2542 (JAVA_OBJS): Added resource.o.
2543 (java/resource.o): New target.
2544 * resource.c: New file.
2545 * class.c (compile_resource_file): Moved to resource.c.
2546 (registerResource_libfunc): Likewise.
2547 (utf8_decl_list): Mark with GTY; now static.
2548 * jcf-parse.c (classify_zip_file): New function.
2549 (parse_zip_file_entries): Use it; compile .properties files.
2550 (process_zip_dir): Use classify_zip_file and compute_class_name.
2551 Don't write class name into zip directory.
2552 (java_parse_file): Call write_resource_constructor.
2553 (compute_class_name): New function.
2554 * jcf-io.c (read_zip_member): Reindented.
2555
2556 2003-01-21 Tom Tromey <tromey@redhat.com>
2557
2558 * class.c (supers_all_compiled): New function.
2559 (make_class_data): Use it.
2560
2561 2003-01-21 Tom Tromey <tromey@redhat.com>
2562
2563 * parse.y (method_header): Native method can't be strictfp.
2564 No method can be transient or volatile.
2565
2566 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2567
2568 Make-lang.in (jvspec.o-warn): Add -Wno-error.
2569
2570 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
2571
2572 * check-init.c: Fix comment typos.
2573 * class.c: Likewise.
2574 * constants.c: Likewise.
2575 * decl.c: Likewise.
2576 * except.c: Likewise.
2577 * expr.c: Likewise.
2578 * java-except.h: Likewise.
2579 * java-tree.h: Likewise.
2580 * javaop.h: Likewise.
2581 * jcf-dump.c: Likewise.
2582 * jcf-io.c: Likewise.
2583 * jcf-parse.c: Likewise.
2584 * jcf-write.c: Likewise.
2585 * lang.c: Likewise.
2586 * mangle.c: Likewise.
2587 * typeck.c: Likewise.
2588 * verify.c: Likewise.
2589
2590 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2591
2592 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
2593 * jcf-write.c: Include "tm_p.h".
2594
2595 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2596
2597 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
2598
2599 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2600
2601 * builtins.c (java_build_function_call_expr): Renamed from
2602 build_function_call_expr. All callers changed.
2603
2604 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
2605 * jcf-parse.c: Include tm_p.h.
2606
2607 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
2608 warning.
2609
2610 2003-01-14 Tom Tromey <tromey@redhat.com>
2611
2612 * class.c (make_class_data): Check that super is compiled before
2613 building class reference to it.
2614
2615 2003-01-14 Andrew Haley <aph@redhat.com>
2616
2617 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2618 varargs function -- correct.
2619
2620 2003-01-14 Andrew Haley <aph@redhat.com>
2621
2622 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
2623
2624 2003-01-14 Andrew Haley <aph@redhat.com>
2625
2626 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2627 varargs function -- correct.
2628
2629 * parse.y (patch_assignment): Copy the rhs of an assignment into a
2630 temporary if the RHS is a reference.
2631
2632 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2633
2634 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
2635 * keyword.h: Regenerated.
2636
2637 * All Files: Convert to ISO C style function definitions.
2638
2639 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2640
2641 * parse.y (check_pkg_class_access): ANSIfy definition.
2642
2643 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2644
2645 * decl.c, parse-scan.y, parse.y: Don't cast return value of
2646 xmalloc et al.
2647
2648 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
2649
2650 2003-01-09 Geoffrey Keating <geoffk@apple.com>
2651
2652 Merge from pch-branch:
2653
2654 2002-12-02 Geoffrey Keating <geoffk@apple.com>
2655
2656 * Make-lang.in (java/gjavah.o): Update dependencies.
2657 * gjavah.c: Include ggc.h.
2658
2659 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
2660
2661 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
2662 (JCFDUMP_OBJS): Add ggc-none.o.
2663 (java/jcf-dump.o): Depend on GGC_H.
2664 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
2665 CPool substructures.
2666 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
2667 * jcf-dump.c: Include ggc.h.
2668
2669 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
2670
2671 * jcf.h (union cpool_entry): New.
2672 (struct CPool): Use gengtype to mark. Change field 'data' to be
2673 an array of unions.
2674 (struct JCF): Use gengtype to mark.
2675 (CPOOL_UINT): Update for new cpool_entry type.
2676 (CPOOL_USHORT1): Likewise.
2677 (CPOOL_USHORT2): Likewise.
2678 (CPOOL_FINISH): Use GC to free cpool subfields.
2679 * parse.h (struct parser_ctxt): Mark field current_jcf.
2680 * lex.c (java_init_lex): Use GC to allocate struct JCF.
2681 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
2682 (main_jcf): Use gengtype to mark.
2683 (ggc_mark_jcf): Delete.
2684 (get_constant): Update for new cpool_entry type.
2685 (give_name_to_class): Likewise.
2686 (get_class_constant): Likewise.
2687 (init_outgoing_cpool): Use GGC to allocate struct CPool.
2688 (java_parse_file): Use GGC to allocate struct JCF.
2689 (init_jcf_parse): Don't call ggc_add_root.
2690 * jcf-reader.c (jcf_parse_constant_pool): Update for new
2691 cpool_entry type.
2692 * java-tree.h (current_jcf): Use gengtype to mark.
2693 (CPOOL_UTF): Update for new cpool_entry type.
2694 (outgoing_cpool): Use gengtype to mark.
2695 (struct lang_type): GC struct JCF and struct CPool.
2696 * config-lang.in (gtfiles): Add jcf.h.
2697 * constants.c (find_tree_constant): New.
2698 (set_constant_entry): Allocate cpool subfields using GGC. Update
2699 for new cpool_entry type.
2700 (find_constant1): Update for new cpool_entry type.
2701 (find_constant2): Likewise.
2702 (find_utf8_constant): Use find_tree_constant.
2703 (find_class_or_string_constant): Remove unnecessary cast to jword.
2704 Update for new cpool_entry type.
2705 (count_constant_pool_bytes): Update for new cpool_entry type.
2706 (write_constant_pool): Likewise.
2707 (alloc_name_constant): Use find_tree_constant.
2708 (build_constants_constructor): Update for new cpool_entry type.
2709
2710 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
2711
2712 * parse.y (mark_parser_ctxt): Delete.
2713 (goal): Don't use ggc_add_root.
2714 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
2715 (java_pop_parser_context): Let GC free parser_ctxt.
2716 (java_parser_context_resume): Likewise.
2717 * parse.h (struct parser_ctxt): Use gengtype to mark.
2718 (ctxp): Likewise.
2719 (ctxp_for_generation): Likewise.
2720 * lex.h (struct java_lc_s): Mark for gengtype.
2721 (java_lexer): Rearrange for gengtype.
2722 * config-lang.in (gtfiles): Add lex.h, parse.h.
2723
2724 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2725
2726 * All Files: Remove PARAMS macro.
2727
2728 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
2729 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
2730 `__STDC__' macros.
2731
2732 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
2733 VA_CLOSE.
2734
2735 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
2736
2737 * Make-lang.in (java.install-common, java.uninstall,
2738 java.install-info, java.install-man): Prepend $(DESTDIR)
2739 to destination paths in all (un)installation commands.
2740 (java.install-common): Rewrite $(LN) command to support
2741 DESTDIR with "ln" as well as with "ln -s".
2742
2743 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
2744
2745 * java-tree.h: Protect against multiple inclusion.
2746
2747 2003-01-07 Tom Tromey <tromey@redhat.com>
2748
2749 * class.c (add_assume_compiled): Don't adjust parent if we're
2750 already at the root of tree.
2751
2752 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2753
2754 * lang.c (dump_compound_expr): Prototype.
2755
2756 2003-01-03 Tom Tromey <tromey@redhat.com>
2757
2758 Fix for PR java/8712:
2759 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
2760 when simply checking against `null'.
2761
2762 2003-01-03 Tom Tromey <tromey@redhat.com>
2763
2764 * gcj.texi (Standard Properties): Document http.proxyHost and
2765 http.proxyPort.
2766
2767 * gcj.texi (GNU Classpath Properties): Document new properties.
2768
2769 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
2770
2771 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
2772 java/lang-options.h, java/mangle.c, java/mangle_name.c,
2773 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
2774
2775 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
2776
2777 * Make-lang.in, boehm.c, buffer.c,
2778 buffer.h, builtins.c, class.c,
2779 config-lang.in, constants.c,
2780 convert.h, decl.c, except.c,
2781 expr.c, java-except.h,
2782 java-tree.h, javaop.def,
2783 jcf-parse.c, jcf-write.c,
2784 jv-scan.c, jvgenmain.c,
2785 jvspec.c, keyword.gperf,
2786 keyword.h, lang-options.h,
2787 lang-specs.h, lang.c, lex.c,
2788 lex.h, mangle.c, mangle_name.c,
2789 parse-scan.y, parse.h, parse.y,
2790 typeck.c, verify.c, xref.c,
2791 xref.h: Replace "GNU CC" with
2792 "GCC" in the copyright header.
2793
2794 * check-init.c, gjavah.c, javaop.h,
2795 jcf-depend.c, jcf-dump.c, jcf-io.c,
2796 jcf-path.c, jcf-reader.c, jcf.h,
2797 zextract.c, zipfile.h: These files are
2798 "part of GCC". Also say "GCC" not "GNU CC".
2799
2800 2002-12-30 DJ Delorie <dj@redhat.com>
2801
2802 * Make-lang.in: Protect against texi2pod/pod2man failing.
2803
2804 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
2805
2806 * gcj.texi: Use @copying.
2807
2808 2002-12-27 Mark Mitchell <mark@codesourcery.com>
2809
2810 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
2811 print_cxx_classname.
2812 (print_cxx_classname): Add add_scope parameter.
2813 (print_class_decls): Do not emit a semicolon after the extern
2814 "Java" block.
2815 (process_file): Adjust calls to print_cxx_classname.
2816
2817 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
2818
2819 * gcj.texi: Include Cover Texts in man page.
2820
2821 2002-12-23 Jeff Sturm <jsturm@one-point.com>
2822
2823 * class.c (build_static_field_ref): Check FIELD_FINAL.
2824
2825 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
2826 instead of current_constant_pool_data_ref.
2827 * java-tree.h (current_constant_pool_data_ref): Undefine.
2828 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
2829 * jcf-parse.c (init_outgoing_cpool): Don't initialize
2830 current_constant_pool_data_ref.
2831
2832 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
2833 not build_internal_class_name.
2834
2835 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
2836 Use it when class ref isn't certain to be compiled.
2837
2838 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
2839
2840 * gcj.texi: Include gcc-common.texi.
2841 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
2842 $(srcdir)/doc/include/gcc-common.texi.
2843
2844 2002-12-22 Anthony Green <green@redhat.com>
2845
2846 * gcj.texi (Limitations): Add note about org.xml.sax and
2847 org.w3c.dom.
2848
2849 2002-12-20 Tom Tromey <tromey@redhat.com>
2850
2851 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
2852 where minimum case value is Integer.MIN_VALUE.
2853 Fixes PR java/8955.
2854
2855 2002-12-18 Andrew Haley <aph@redhat.com>
2856
2857 * parse.y (patch_invoke): Force evaluation order when `check' is
2858 set. For PR libgcj/8945.
2859
2860 2002-12-16 Mark Mitchell <mark@codesourcery.com>
2861
2862 * gcj.texi: Change version number to 3.4.
2863
2864 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
2865 Andrew Haley <aph@redhat.com>
2866
2867 * parse.y (source_end_java_method): Remove custom encoding of line
2868 numbers for a function decl before passing it to the back end.
2869
2870 2002-12-03 Andrew Haley <aph@redhat.com>
2871
2872 * class.c (make_class_data): New field, "chain".
2873 * decl.c (java_init_decl_processing): Likewise.
2874
2875 2002-12-02 Tom Tromey <tromey@redhat.com>
2876
2877 For PR java/8740:
2878 * parse.y (do_resolve_class): Handle qualified name via
2879 recursion.
2880
2881 2002-11-30 Zack Weinberg <zack@codesourcery.com>
2882
2883 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
2884 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
2885 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
2886 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
2887 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
2888 Include coretypes.h and tm.h.
2889 * Make-lang.in: Update dependencies.
2890
2891 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2892
2893 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
2894
2895 2002-11-25 Diego Novillo <dnovillo@redhat.com>
2896
2897 * jcf-reader.c: Don't expand JCF_readu4 inside the
2898 expansion of JCF_SKIP.
2899
2900 2002-11-25 Diego Novillo <dnovillo@redhat.com>
2901
2902 * jcf-reader.c: Don't expand JCF_readu4 inside the
2903 expansion of JCF_SKIP.
2904
2905 2002-11-22 Tom Tromey <tromey@redhat.com>
2906
2907 * parse.y (patch_binop): Cast right hand side of shift expression
2908 to `int'. Fixes PR java/8676.
2909
2910 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
2911 Andrew Haley <aph@redhat.com>
2912
2913 * gcc/java/jcf-write.c (write_classfile): Remove target
2914 class file, if it exists, before renaming the temporary
2915 class file to it.
2916
2917 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
2918
2919 * jvspec.c (lang_specific_spec_functions): New.
2920
2921 2002-11-18 Tom Tromey <tromey@redhat.com>
2922
2923 Fix for PR java/7912:
2924 * expr.c (can_widen_reference_to): Allow cast of array to
2925 Cloneable or Serializable.
2926 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
2927 (java_io_serializable_identifier_node): Likewise.
2928 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
2929 (valid_ref_assignconv_cast_p): Use new identifier nodes.
2930 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
2931 java_io_serializable.
2932 * decl.c (java_init_decl_processing): Initialize
2933 java_lang_cloneable_identifier_node and
2934 java_io_serializable_identifier_node.
2935 (java_lang_cloneable_identifier_node): New global.
2936 (java_io_serializable_identifier_node): Likewise.
2937
2938 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
2939
2940 * buffer.c: Remove unnecessary casts.
2941 * check-init.c: Likewise.
2942 * class.c: Likewise.
2943 * constants.c: Likewise.
2944 * decl.c: Likewise.
2945 * except.c: Likewise.
2946 * gjavah.c: Likewise.
2947 * jcf-io.c: Likewise.
2948 * jcf-parse.c: Likewise.
2949 * jcf-path.c: Likewise.
2950 * jvspec.c: Likewise.
2951 * lang.c: Likewise.
2952 * lex.c: Likewise.
2953 * verify.c: Likewise.
2954
2955 2002-11-06 Tom Tromey <tromey@redhat.com>
2956
2957 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
2958 a JNI header.
2959
2960 2002-11-05 Tom Tromey <tromey@redhat.com>
2961
2962 Fix for PR java/6388.
2963 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
2964 * java-tree.h (enum java_tree_index): New values
2965 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
2966 (decimal_int_max, decimal_long_max): New defines.
2967 * lex.c (yylex): Rewrote range checking. Sign extend literals.
2968 (error_if_numeric_overflow): Rewrote range checking.
2969 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
2970 decimal_long_max.
2971
2972 2002-11-02 Tom Tromey <tromey@redhat.com>
2973
2974 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
2975
2976 * class.c (make_method_value): Put class name, not signature, into
2977 `throws' field. For PR java/8415.
2978
2979 2002-10-24 Tom Tromey <tromey@redhat.com>
2980
2981 * gcj.texi (Invoking gij): Document --showversion.
2982 (Standard Properties): java.library.path now set.
2983
2984 2002-10-23 Tom Tromey <tromey@redhat.com>
2985
2986 * gjavah.c (decode_signature_piece): In JNI mode, print
2987 `jobjectArray' when array depth is nonzero.
2988 Fixes PR java/8296.
2989
2990 2002-10-15 Andrew Haley <aph@redhat.com>
2991
2992 * parse.y (patch_invoke): Call force_evaluation_order on a static
2993 arg list.
2994 (resolve_qualified_expression_name): Call force_evaluation_order
2995 on a arg list that is part of a Qualified Expression Name.
2996
2997 * lang.c (dump_compound_expr): New.
2998 (java_dump_tree): New.
2999
3000 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
3001
3002 * gcj.texi: Added item describing the GCJ runtime property
3003 "gnu.gcj.progname".
3004
3005 2002-10-15 Richard Henderson <rth@redhat.com>
3006
3007 * jcf-parse.c (get_constant): Fix type warning.
3008
3009 2002-10-15 Andrew Haley <aph@redhat.com>
3010
3011 * java-tree.h (java_inlining_merge_static_initializers): Declare.
3012 (java_inlining_map_static_initializers): Declare.
3013
3014 2002-10-14 Andrew Haley <aph@redhat.com>
3015
3016 * tree-inline.c (remap_block): All local class initialization
3017 flags go in the outermost scope.
3018 (expand_call_inline): Call java_inlining_map_static_initializers.
3019 (expand_call_inline): Call java_inlining_merge_static_initializers.
3020 * java/lang.c (merge_init_test_initialization): New.
3021 (java_inlining_merge_static_initializers): New.
3022 (inline_init_test_initialization): New.
3023 (java_inlining_map_static_initializers): New.
3024
3025 2002-10-11 Mark Wielaard <mark@klomp.org>
3026
3027 * gcj.texi (Compatibility): Add Limitations and Extensions section.
3028
3029 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3030
3031 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
3032
3033 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3034
3035 * parse.y (merge_string_cste): Add parentheses around & within |.
3036
3037 2002-10-08 Tom Tromey <tromey@redhat.com>
3038
3039 * parse.y (variable_declarator_id): Simplify error path for
3040 array declarator error. For PR java/8003.
3041
3042 2002-10-08 Zack Weinberg <zack@codesourcery.com>
3043
3044 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
3045 bug_report_url.
3046
3047 2002-10-08 Andrew Haley <aph@redhat.com>
3048
3049 * parse.y (attach_init_test_initialization_flags): Check for
3050 error_mark_node.
3051
3052 2002-10-07 Anthony Green <green@redhat.com>
3053
3054 * parse.y (merge_string_cste): Fix bug in string concatenation.
3055
3056 2002-10-03 Michael Koch <konqueror@gmx.de>
3057
3058 * gcj.texi (Standard properties):
3059 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
3060
3061 2002-10-02 Roger Sayle <roger@eyesopen.com>
3062
3063 PR optimization/6627
3064 * lang.c (java_init): If storing the vbit in function
3065 pointers, ensure that force_align_functions_log is atleast
3066 one to aid compatability with g++ vtables.
3067
3068 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
3069
3070 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
3071 foul of type-based aliasing.
3072
3073 2002-09-30 Anthony Green <green@redhat.com>
3074
3075 * gcj.texi (Invoking jv-scan): Fix texinfo.
3076
3077 2002-09-28 Anthony Green <green@redhat.com>
3078
3079 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
3080 (Code Generation): Add -fno-assert documentation.
3081 * jv-scan.c (flag_assert): New global.
3082 (options): Add assert option.
3083 (help): Add --no-assert documentation.
3084 * parse-scan.y (flag_assert): New global.
3085 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
3086 (flag_assert): New global.
3087 * java-tree.h (flag_assert): New global.
3088 * lex.c (java_lex): Obey flag_assert.
3089 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
3090 calling cc1.
3091
3092 2002-09-26 Andrew Haley <aph@redhat.com>
3093
3094 * expr.c (build_java_array_length_access): Check for null pointer.
3095 * expr.c (expand_java_arrayload): Likewise.
3096
3097 2002-09-21 Richard Henderson <rth@redhat.com>
3098
3099 * jcf-parse.c (get_constant): Decode from IEEE no matter
3100 what the target format.
3101
3102 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
3103
3104 * ChangeLog: Follow spelling conventions.
3105 * class.c: Likewise.
3106 * decl.c: Likewise.
3107 * expr.c: Likewise.
3108 * gjavah.c: Likewise.
3109 * java-tree.h: Likewise.
3110 * jcf-dump.c: Likewise.
3111 * jcf-parse.c: Likewise.
3112 * jvspec.c: Likewise.
3113 * lang.c: Likewise.
3114 * mangle.c: Likewise.
3115 * parse.y: Likewise.
3116
3117 2002-09-17 Tom Tromey <tromey@redhat.com>
3118
3119 * lex.c (java_read_unicode_collapsing_terminators): Handle case
3120 where \r appears at EOF. Fixes PR java/7950.
3121
3122 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3123
3124 * jvspec.c (lang_specific_driver): Remove unused variable.
3125
3126 2002-09-16 Geoffrey Keating <geoffk@apple.com>
3127
3128 * java-tree.h (union lang_tree_node): Add chain_next option.
3129
3130 2002-09-16 Richard Henderson <rth@redhat.com>
3131
3132 * jcf-parse.c (get_constant): Runtime check for IEEE format;
3133 use new real.h interface.
3134 * jcf-write.c (find_constant_index): Use new real.h interface.
3135 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
3136
3137 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
3138
3139 * lang.c: Follow spelling conventions.
3140
3141 2002-09-11 Per Bothner <per@bothner.com>
3142
3143 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
3144 constant to the type of the field.
3145 (java_complete_tree): Remove now-redundant code.
3146
3147 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
3148
3149 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
3150
3151 For PR java/5794:
3152 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
3153 return label if a ret instruction for the jsr has been reached.
3154
3155 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
3156
3157 * parse.y (DIR_SEPARATOR): Don't define.
3158 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
3159
3160 2002-08-28 Andrew Haley <aph@redhat.com>
3161
3162 * verify.c (verify_jvm_instructions): Allow exception handler
3163 inside code that is being protected, but generate a warning.
3164 * except.c (link_handler): Initialize `expanded' in new eh_range.
3165 (binding_depth, is_class_level, current_pc): Declare extern.
3166
3167 2002-09-01 Mark Wielaard <mark@klomp.org>
3168
3169 * gcj.texi: Add chapter about system properties.
3170 Fixed some typos.
3171
3172 2002-08-26 Tom Tromey <tromey@redhat.com>
3173
3174 * parse.y (try_builtin_assignconv): Allow narrowing primitive
3175 conversion if RHS_TYPE is byte, short, or char.
3176
3177 2002-08-22 Tom Tromey <tromey@redhat.com>
3178
3179 * gcj.texi (Invoking gij): Document -cp and -classpath.
3180
3181 2002-08-21 Tom Tromey <tromey@redhat.com>
3182
3183 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
3184 $(prefix)/share. For PR libgcj/7633.
3185
3186 For PR java/6005 and PR java/7611:
3187 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
3188 (java_can_use_bit_fields_p): New function.
3189
3190 2002-08-16 Tom Tromey <tromey@redhat.com>
3191
3192 * gcj.texi (Class Initialization): Mention class initialization of
3193 arrays.
3194
3195 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
3196
3197 * Make-lang.in (java-tree-inline.o): New.
3198 (JAVA_OBJS): Add java-tree-inline.o.
3199 * parse.y (source_end_java_method): Call java_optimize_inline.
3200 (java_expand_method_bodies): Save method's tree in
3201 DECL_SAVED_TREE.
3202 (add_stmt_to_compound): Keep track of the number of statments.
3203 * lang.c (java_init): Enable flag_inline_trees.
3204 (java_post_options): If flag_inline_functions is on, enable
3205 flag_inline_trees instread.
3206 (decl_constant_value): New.
3207 (java_tree_inlining_walk_subtrees): New.
3208 * java-tree.h (DECL_NUM_STMTS): New macro.
3209 (java_optimize_inline): Declare.
3210 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
3211 Handle a LABEL_EXPR.
3212 * decl.c (build_result_decl): If we already have a DECL_RESULT
3213 don't make another.
3214 (dump_function): New.
3215 (java_optimize_inline): New.
3216 (dump_function): New.
3217
3218 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
3219
3220 For PR java/7483:
3221 * parse.y (build_assertion): Invert return from
3222 desiredAssertionStatus.
3223
3224 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3225
3226 * jcf-write.c (get_access_flags): Return correct access flags for
3227 private and protected inner classes.
3228
3229 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
3230
3231 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
3232
3233 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
3234
3235 * mangle_name.c: Don't include obstack.h twice.
3236 * xref.c: Don't include obstack.h.
3237
3238 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
3239
3240 * class.c: (permanent_obstack): Delete declaration.
3241 * constants.c: (permanent_obstack): Delete declaration.
3242 * except.c: (permanent_obstack): Delete declaration.
3243 * expr.c: (permanent_obstack): Delete declaration.
3244 * jcf-parse.c: (permanent_obstack): Delete declaration.
3245 (saveable_obstack): Delete declaration.
3246 * parse.h: (permanent_obstack): Delete declaration.
3247 * typeck.c: (permanent_obstack): Delete declaration.
3248
3249 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
3250
3251 * gcj.texi (version-gcc): Increase to 3.3.
3252
3253 2002-07-22 Tom Tromey <tromey@redhat.com>
3254
3255 * lex.c (java_lex): Check for `e' or `E' after 0.
3256
3257 2002-07-21 Richard Henderson <rth@redhat.com>
3258
3259 * lang.c (java_unsafe_for_reeval): New.
3260 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
3261
3262 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
3263
3264 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
3265 (jcf_path_init): Use GET_ENVIRONMENT.
3266
3267 2002-07-10 Roger Sayle <roger@eyesopen.com>
3268 Zack Weinberg <zack@codesourcery.com>
3269
3270 * builtins.c (initialize_builtins): Remove defines that
3271 handled C/C++ specific junk hereby removed from builtins.def.
3272
3273 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
3274
3275 * lang.c (java_post_options): Update prototype.
3276
3277 2002-07-05 Roger Sayle <roger@eyesopen.com>
3278
3279 * builtins.c (initialize_builtins): Ignore the additional
3280 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
3281 the builtins.def file.
3282
3283 2002-07-01 Tom Tromey <tromey@redhat.com>
3284
3285 For PR libgcj/7073:
3286 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
3287 specially.
3288
3289 2002-07-01 Roger Sayle <roger@eyesopen.com>
3290
3291 * java/decl.c (builtin_function): Accept additional parameter.
3292 (java_init_decl_processing): Pass an additional NULL_TREE
3293 argument to builtin_function.
3294
3295 2002-06-29 T.J. Mather <tjmather@maxmind.com>
3296
3297 * gcj.texi: Fixed gcj invocation example so that it compiles.
3298
3299 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3300
3301 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
3302 * parse.y (mark_parser_ctxt): Likewise.
3303 (check_modifiers, declare_local_variables): Avoid incorrect
3304 hardcoded constant 10.
3305
3306 * lex.c (java_read_char): Avoid "comparison is always true"
3307 warning.
3308
3309 2002-06-25 Andreas Schwab <schwab@suse.de>
3310
3311 * expr.c (JSR): Avoid undefined operation on PC.
3312
3313 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3314
3315 * decl.c (clear_binding_level): Const-ify.
3316
3317 2002-06-13 Akim Demaille <akim@epita.fr>
3318
3319 * parse.y (class_declaration, interface_declaration): Make sure
3320 all their rules have an action, in order to avoid meaningless `$$
3321 = $1' and their type clashes.
3322
3323 2002-06-11 Tom Tromey <tromey@redhat.com>
3324
3325 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
3326 * parse-scan.y (statement_without_trailing_substatement): Added
3327 assert_statement.
3328 (assert_statement): New rule.
3329 * java-tree.h (struct lang_type) [assertions]: New field.
3330 (TYPE_USES_ASSERTIONS): New macro.
3331 (CLASS_USES_ASSERTIONS): Likewise.
3332 (FIELD_SYNTHETIC): New define.
3333 * lex.c (java_lval;): Added ASSERT_TK.
3334 * parse.y (ASSERT_TK): Added.
3335 (statement_without_trailing_substatement): Added assert_statement.
3336 (assert_statement): New rule.
3337 (build_assertion): New function.
3338 (maybe_generate_pre_expand_clinit): Create and initialize
3339 $assertionsDisabled.
3340 (lookup_package_type): Removed decl.
3341 * keyword.h: Rebuilt.
3342 * keyword.gperf (assert): New token.
3343
3344 2002-06-10 Akim Demaille <akim@epita.fr>
3345
3346 * parse.y (interface_type_list, class_member_declaration)
3347 (unary_expression_not_plus_minus): Remove duplicate %type.
3348 Whitespace changes.
3349
3350 2002-06-09 Tom Tromey <tromey@redhat.com>
3351
3352 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
3353
3354 * parse.y (method_header): Give error message in all cases.
3355 Fixes PR java/6865.
3356
3357 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3358
3359 Don't use RTL inlining. Fix for PR java/6820.
3360 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
3361 (flag_really_inline): New.
3362 (java_decode_option): Set flag_really_inline if -finline-functions
3363 is seen.
3364 (java_post_options): New function. Turn off inlining unless
3365 flag_really_inline is set.
3366
3367 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3368
3369 * gjavah.c (throwable_p): Accept argument as either a classname or
3370 signature fragment. Create null-terminated classname string for super
3371 when calling itself recursively.
3372 (decode_signature_piece): Skip first character from class name
3373 signature when calling throwable_p.
3374
3375 2002-06-08 H.J. Lu (hjl@gnu.org)
3376
3377 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
3378
3379 2002-06-04 Tom Tromey <tromey@redhat.com>
3380
3381 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
3382
3383 2002-06-04 Michael Koch <konqueror@gmx.de>
3384
3385 * gcj.texi (Input Options): Fixed typo.
3386
3387 2002-06-04 Zack Weinberg <zack@codesourcery.com>
3388
3389 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
3390 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
3391 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
3392 and all now-pointless local variables. Rename other local
3393 variables to reflect their not being handles.
3394
3395 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
3396 #if JCF_USE_STDIO blocks.
3397
3398 * parse.y: Add missing semicolon at end of rule.
3399
3400 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
3401
3402 * check-init.c (attach_initialized_static_class): Delete, unused.
3403 * parse.y: Use htab_t instead of struct hashtable, update
3404 all uses.
3405 * java-tree.h: Include hashtab.h instead of hash.h.
3406 (struct lang_decl_func): Use htab_t, set up for gengtype.
3407 (struct init_test_hash_entry): Delete.
3408 (struct treetreehash_entry): New.
3409 (java_treetreehash_find): New
3410 (java_treetreehash_new): New prototype.
3411 (java_treetreehash_create): New prototype.
3412 (java_mark_tree): Delete prototype.
3413 (java_hash_hash_tree_node): Delete prototype.
3414 (java_hash_compare_tree_node): Delete prototype.
3415 (attach_initialized_static_class): Delete prototype.
3416 * expr.c (build_class_init): Update to use java_treetreehash
3417 functions.
3418 (java_expand_expr): Update to use htab_t.
3419 (emit_init_test_initialization): Likewise.
3420 * decl.c (java_mark_tree): Delete.
3421 * class.c (init_test_hash_newfunc): Delete.
3422 (java_hash_hash_tree_node): Delete.
3423 (java_hash_compare_tree_node): Delete.
3424 (add_method_1): Update to use java_treetreehash functions.
3425 (JAVA_TREEHASHHASH_H): New macro.
3426 (java_treetreehash_hash): New function.
3427 (java_treetreehash_compare): New function.
3428 (java_treetreehash_find): New function.
3429 (java_treetreehash_new): New function.
3430 (java_treetreehash_create): New function.
3431 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
3432
3433 * Make-lang.in (java/parse.o): Depend on debug.h.
3434 * java-tree.h (struct lang_identifier): Use gengtype.
3435 (union lang_tree_node): New.
3436 (struct lang_decl_func): Use gengtype.
3437 (struct lang_decl_var): Likewise.
3438 (struct lang_decl): Likewise.
3439 * parse.y: Include debug.h.
3440 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
3441
3442 * lang.c (struct language_function): New dummy structure.
3443
3444 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
3445 descriminator for DECL_LANG_SPECIFIC.
3446 (struct lang_decl_func): Rename from struct lang_decl.
3447 (enum lang_decl_desc): New.
3448 (struct lang_decl): Make it a union. Update all the accessor macros.
3449 (struct lang_type): Use gengtype.
3450 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
3451 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
3452 are now the same size.
3453 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
3454 use discriminator to mark DECL_LANG_SPECIFIC.
3455
3456 * Make-lang.in (gt-java-builtins.h): New rule.
3457 (java/builtins.o): Add dependency on gt-<filename>.h.
3458 * builtins.c: Use gengtype for roots.
3459 (union string_or_tree): Use gengtype.
3460 (struct builtin_record): Use gengtype.
3461 * config-lang.in (gtfiles): Add builtins.c.
3462
3463 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
3464 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
3465 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
3466 gt-java-parse.h, gtype-java.h): Add rules to generate.
3467 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
3468 (class.o): Add dependency on gt-*.h.
3469 (constants.o): Likewise.
3470 (decl.o): Likewise.
3471 (expr.o): Likewise.
3472 (jcf-parse.o): Likewise.
3473 (jcf-write.o): Likewise.
3474 (lang.o): Likewise.
3475 * config-lang.in (gtfiles): New.
3476 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3477 * constants.c: Replace uses of ggc_add_* with GTY markers.
3478 Include gt-*.h.
3479 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3480 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3481 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
3482 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
3483 Include gt-*.h.
3484 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
3485 Include gt-*.h.
3486 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3487 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
3488 gt-*.h.
3489 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3490 Include gtype-java.h.
3491
3492 2002-06-02 Tom Tromey <tromey@redhat.com>
3493
3494 Fix for PR java/5913:
3495 * parse.y (patch_binop): Call patch_string on op1.
3496
3497 2002-06-02 Tom Tromey <tromey@redhat.com>
3498
3499 Fix for PR java/1343, PR java/6336:
3500 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
3501 formatting. Changed return type.
3502 (anonymous_class_counter): Moved to top of file.
3503 (maybe_make_nested_class_name): Append number to class name for
3504 function-local classes.
3505
3506 2002-05-28 Zack Weinberg <zack@codesourcery.com>
3507
3508 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
3509 * Make-lang.in: Update dependency lists.
3510
3511 2002-05-18 Mark Mitchell <mark@codesourcery.com>
3512
3513 * gjavah.c (throwable_p): Do not free the name of the class after
3514 passing it to find_class.
3515 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
3516 * jcf-io.c (dirent.h): Include it.
3517 (fnmatch.h): Likewise.
3518 (compare_path): New function.
3519 (java_or_class_file): Likewise.
3520 (memoized_dirlist_entry): New type.
3521 (memoized_dirlist_lookup_eq): New function.
3522 (memoized_dirlists): New variable.
3523 (caching_stat): New function.
3524 (memoized_class_lookup_eq): New function.
3525 (memoized_class_lookups): Likewise.
3526 (find_class): Use memoized_class_lookups and caching_stat.
3527 * jcf.h (JCF_USE_SCANDIR): Define.
3528 * parse.y (java_expand_classes): Write the class files in reverse
3529 order.
3530
3531 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3532
3533 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
3534
3535 2002-05-13 Mark Mitchell <mark@codesourcery.com>
3536
3537 * jcf-write.c (write_classfile): Unlink the temporary file if it
3538 cannot be renamed. Use concat to build up the name of the
3539 temporary file.
3540
3541 2002-05-08 Mark Mitchell <mark@codesourcery.com>
3542
3543 * jcf-write.c (write_classfile): Write the file to a
3544 temporary file and then rename it.
3545
3546 2002-05-07 Tom Tromey <tromey@redhat.com>
3547
3548 * gjavah.c (throwable_p): Use xstrdup, not strdup.
3549
3550 Fix for PR java/1200:
3551 * gjavah.c (throwable_p): New function.
3552 (decode_signature_piece): Use it. A `WeakReference' isn't the
3553 same as a `jweak'.
3554 Include hashtab.h.
3555 (gcjh_streq): New function.
3556
3557 2002-05-07 Andreas Jaeger <aj@suse.de>
3558
3559 * parse.y (finish_for_loop): Fix if statement.
3560
3561 2002-05-06 Tom Tromey <tromey@redhat.com>
3562
3563 Fix for PR java/5941:
3564 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
3565 loop update expression.
3566 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
3567 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
3568
3569 2002-05-04 Mark Wielaard <mark@klomp.org>
3570
3571 For PR java/6519:
3572 * parse.y (build_string_concatenation): Return just op1 only when op2
3573 is null and op1 is a STRING_CST, otherwise always construct a
3574 StringBuffer.
3575
3576 2002-04-27 Tom Tromey <tromey@redhat.com>
3577
3578 For PR java/6382:
3579 * parse.y (string_convert_int_cst): New function.
3580 (merge_string_cste): Use it.
3581
3582 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
3583
3584 * java-tree.h (java_parse_file): Update.
3585 (java_set_yydebug): Remove.
3586 * jcf-parse.c (yydebug): Remove.
3587 (java_set_yydebug): Die.
3588 (java_parse_file): Update.
3589 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
3590
3591 2002-04-24 Tom Tromey <tromey@redhat.com>
3592
3593 For PR java/6425:
3594 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
3595 EXPR_WFL_QUALIFICATION of qual_wfl.
3596
3597 2002-04-23 Per Bothner <per@bothner.com>
3598
3599 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
3600 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
3601 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
3602
3603 2002-04-23 Tom Tromey <tromey@redhat.com>
3604
3605 For PR java/6314:
3606 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
3607 recognize `-fcompile-resource='.
3608 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
3609 a bit.
3610
3611 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
3612
3613 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
3614 paths. Fixes PR java/2791.
3615
3616 2002-04-19 Andrew Haley <aph@redhat.com>
3617
3618 * jcf-write.c (push_long_const): lo, hi: New variables.
3619 Use rshift_double to extract the high part of a 64-bit long.
3620 Use WORD_TO_INT to extract the low part.
3621
3622 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
3623 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
3624 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
3625
3626 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
3627
3628 * typeck.c (incomplete_type_error): Remove.
3629
3630 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3631
3632 * class.c (make_class_data): Set DECL_ALIGN on static class data,
3633 for hash synchronization.
3634 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
3635 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
3636 class_type_node.
3637
3638 2002-04-16 Mark Wielaard <mark@klomp.org>
3639
3640 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
3641 negative zero.
3642
3643 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3644
3645 Fix for PR java/6294:
3646 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
3647 interfaces.
3648
3649 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3650
3651 Fix for PR java/6085:
3652 * parse.y (patch_method_invocation): Always use build_access_to_thisn
3653 to get enclosing "this" argument for inner-class constructor
3654 invocation. Pass correct arguments to build_access_to_thisn.
3655
3656 2002-04-10 Andreas Jaeger <aj@suse.de>
3657
3658 * gcj.texi (Input Options): Fix extdirs patch.
3659
3660 2002-04-10 Anthony Green <green@redhat.com>
3661
3662 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
3663
3664 2002-04-09 Anthony Green <green@redhat.com>
3665
3666 * gcj.texi (Input Options): Add --extdirs documentation.
3667 * jcf-dump.c (OPT_extdirs): New macro.
3668 (options): Add extdirs option.
3669 (help): Describe --extdirs.
3670 (main): Handle OPT_extdirs.
3671 * gjavah.c (OPT_extdirs): New macro.
3672 (options): Add extdirs option.
3673 (help): Describe --extdirs.
3674 (main): Handle OPT_extdirs.
3675 * jcf-path.c (jcf_path_init): Add extdirs support.
3676 (jcf_path_extdirs_arg): New function.
3677 (extensions): New variable to hold extensions path entries.
3678 * jvspec.c: Remove -fextdirs= when compiling main().
3679 * lang.c (java_decode_option): Handle -fextdirs=.
3680 * jcf.h (jcf_path_extdirs_arg): Declare new function.
3681 * Make-lang.in: Compile jcf-path with version info for use in
3682 identifying the appropriate libgcj.jar.
3683
3684 2002-04-08 Tom Tromey <tromey@redhat.com>
3685
3686 For PR libgcj/5303:
3687 * .cvsignore: Added rmic.1 and rmiregistry.1.
3688 * gcj.texi (Top): Link to new nodes.
3689 (Invoking rmic): New node.
3690 (Invoking rmiregistry): Likewise.
3691 * Make-lang.in (java.generated-manpages): Added rmic.1 and
3692 rmiregistry.1.
3693 (java.maintainer-clean): Likewise.
3694 ($(srcdir)/java/rmic.1): New target.
3695 ($(srcdir)/java/rmiregistry.1): Likewise.
3696 (java.install-man): Handle rmic.1 and rmiregistry.1.
3697
3698 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3699
3700 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
3701 Add note about handling uncaught exceptions. Add an exception handler
3702 to example.
3703
3704 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3705
3706 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
3707 after using it to patch CALL_EXPR.
3708
3709 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3710
3711 * gcj.texi (Invocation): Document CNI invocation API.
3712
3713 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
3714
3715 * expr.c (truthvalue_conversion): Rename. Update.
3716 (expand_compare): Update.
3717 * java-tree.h (java_truthvalue_conversion): New.
3718 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3719
3720 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
3721
3722 * java-tree.h (java_mark_addressable): New.
3723 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
3724 * typeck.c (mark_addressable): Rename, update.
3725
3726 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
3727
3728 * expr.c (build_java_binop): Update.
3729 * java-tree.h (java_signed_type, java_unsigned_type,
3730 java_signed_or_unsigned_type): Update.
3731 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3732 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
3733 * parse.y (patch_binop): Update.
3734 * typeck.c (signed_or_unsigned_type, unsigned_type,
3735 signed_type): Update.
3736
3737 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
3738
3739 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
3740 (java_dummy_print): Remove.
3741 (lang_print_error): Rename. Exit early if inhibiting output.
3742 (inhibit_error_printing_function): New.
3743 (java_init): Don't set hook.
3744 (lang_init_source): Use new boolean.
3745
3746 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
3747
3748 * parse.y (do_resolve_class): Fix infinite recursion.
3749
3750 2002-03-29 Tom Tromey <tromey@redhat.com>
3751
3752 * parse.y (check_inner_circular_reference): Ignore incomplete
3753 types.
3754
3755 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
3756
3757 * Make-lang.in (builtins.o): Update.
3758 * boehm.c (get_boehm_type_descriptor): Update.
3759 * builtins.c: Include langhooks.h.
3760 * decl.c (java_init_decl_processing): Update.
3761 * java-tree.h (java_type_for_mode, java_type_for_size): New.
3762 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
3763 Redefine.
3764 * typeck.c (type_for_mode, type_for_size): Update.
3765
3766 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
3767
3768 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
3769
3770 2002-03-28 Tom Tromey <tromey@redhat.com>
3771
3772 * except.c (expand_end_java_handler): If the handler type is NULL,
3773 use java.lang.Throwable. Fixes PR java/5986.
3774
3775 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
3776
3777 Fix for PR java/4715:
3778 * jcf-parse.c (parse_source_file_3): New function.
3779 (read_class): Call it.
3780 (java_parse_file): Likewise.
3781
3782 2002-03-28 Jan Hubicka <jh@suse.cz>
3783
3784 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
3785
3786 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3787
3788 * parse.y (resolve_package): Initialize "decl".
3789 (lookup_package_type): Remove unused function.
3790
3791 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3792
3793 Fix for PR java/5993:
3794 * parse.y (resolve_package): Return the decl if resolution was
3795 successful. Don't special case "java.lang" and "java.lang.reflect"
3796 packages. Set type_name to the merged identifier.
3797 (resolved_qualified_expression_name): Print error using "name" if
3798 resolve_package returns NULL_TREE.
3799
3800 2002-03-27 Tom Tromey <tromey@redhat.com>
3801
3802 * expr.c (expand_invoke): Don't generate null pointer check if
3803 we're calling <init>.
3804
3805 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
3806
3807 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
3808 fix prototype.
3809 * java-tree.h (java_lang_expand_expr): Similarly.
3810 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
3811 (java_init): Don't set hook.
3812
3813 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3814
3815 Fix for PR java/5850:
3816 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
3817 context if field was not found in the current scope.
3818 * expr.c (lookup_field): Don't look in enclosing contexts.
3819
3820 2002-03-26 Tom Tromey <tromey@redhat.com>
3821
3822 Fix for PR java/5942:
3823 * parse.y (init_src_parse): Added sanity check.
3824 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
3825 elements, not 11.
3826
3827 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
3828
3829 * decl.c (lang_mark_tree): Rename java_mark_tree.
3830 * java-tree.h (java_mark_tree): New.
3831 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
3832
3833 2002-03-25 Zack Weinberg <zack@codesourcery.com>
3834
3835 * lex.c: Change java_perform_atof to take normal parameters
3836 instead of a pointer to a parameter block. Call it directly
3837 from java_lex.
3838
3839 2002-03-22 Mark Wielaard <mark@klomp.org>
3840
3841 Fix for PR java/5368:
3842 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
3843 when printing error message.
3844
3845 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
3846
3847 * decl.c (maybe_build_cleanup): Remove.
3848
3849 2002-03-22 Tom Tromey <tromey@redhat.com>
3850
3851 Andrew Haley <aph@cambridge.redhat.com>
3852
3853 * expr.c (build_field_ref): Don't build a check if the field is a
3854 member of `this'.
3855
3856 2002-03-21 Eric Blake <ebb9@email.byu.edu>
3857
3858 Fix for PR java/6026:
3859 * lex.c (java_lex): Fix parsing of consecutive floats.
3860
3861 2002-03-21 Tom Tromey <tromey@redhat.com>
3862
3863 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
3864 class.
3865
3866 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
3867
3868 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3869 insert_block, getdecls, kept_level_p, global_bindings_p): New.
3870
3871 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
3872
3873 * gcj.texi: @code{gcj} becomes @command{gcj}.
3874 @code{gcc} becomes @command{gcc}.
3875 GcjRaw changed to gnu.gcc.RawData.
3876
3877 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
3878
3879 * decl.c (start_java_method): Use new hook.
3880 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3881 (java_init): Remove old hook.
3882
3883 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
3884
3885 * builtins.c (define_builtin): Do nothing if `type' is null.
3886 Fixes PR java/5876.
3887
3888 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3889
3890 * parse.y (parser_check_super_interface): Fix error message
3891 grammar/order.
3892
3893 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3894
3895 * jcf-parse.c (get_constant): Delete unused variables.
3896
3897 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
3898
3899 * java-tree.h (java_parse_file): New.
3900 * jcf-parse.c (yyparse): Rename java_parse_file.
3901 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3902
3903 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3904
3905 * parse.y (craft_constructor): Return the constructor decl.
3906 (java_expand_classes): Update comments.
3907 (lookup_method_invoke): Call fix_constructors immediately for
3908 anonymous class. Fixes PR java/5935.
3909
3910 2002-03-15 Anthony Green <green@redhat.com>
3911
3912 * jcf-parse.c (yyparse): Don't emit class registration
3913 constructor when compiling resource files.
3914
3915 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3916
3917 * lang.c (java_tree_code_type, java_tree_code_length,
3918 tree_code_name): Delete.
3919 (tree_code_type, tree_code_length, tree_code_name): Define.
3920 (java_init): Don't try to copy into the various tree_code
3921 arrays.
3922
3923 2002-03-12 Tom Tromey <tromey@redhat.com>
3924
3925 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
3926 UTF-8, not UCS-2. Fixes PR java/5923.
3927
3928 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
3929 a call_expr wrapped in a convert. Fixes PR java/5848.
3930
3931 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3932
3933 * jcf-write.c (write_classfile): Improve error strings.
3934
3935 2002-03-11 Eric Blake <ebb9@email.byu.edu>
3936
3937 * lex.c: Adjust comments to GNU standards.
3938
3939 2002-03-11 Eric Blake <ebb9@email.byu.edu>
3940
3941 Fix for PR java/5902:
3942 * lex.c (java_lex): Fix parsing of literals.
3943
3944 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3945
3946 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
3947 to prevent it getting evaluated twice in the store checking case.
3948 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
3949 examining OBJECT.
3950
3951 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3952
3953 * decl.c (java_init_decl_processing): Make sure class_type_node
3954 alignment is not less than 64 bits if hash synchronization is enabled.
3955
3956 2002-03-08 Per Bothner <per@bothner.com>
3957
3958 * parse.y (java_complete_lhs): Check if patch_assignment
3959 returned an error-mark.
3960
3961 * parse.y (try_builtin_assignconv): Don't special-case zero.
3962
3963 2002-03-08 Per Bothner <per@bothner.com>
3964
3965 Fix for PR java/5812.
3966 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
3967 here instead of in JSR macro. Likewise with load_type_state call.
3968 Do the latter on if the return_pc has been verified (the jsr returns).
3969 (JSR): Now just call build_java_jsr.
3970
3971 2002-03-07 Jeff Sturm <jsturm@one-point.com>
3972
3973 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
3974 (java.install-common): Link native driver to
3975 JAVA_TARGET_INSTALL_NAME.
3976
3977 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
3978
3979 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
3980 * builtins.c(sin_builtin): Likewise
3981 * builtins.c(sqrt_builtin): Likewise
3982
3983 2002-03-03 Zack Weinberg <zack@codesourcery.com>
3984
3985 * java/expr.c, java/jcf-parse.c, java/lex.c:
3986 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
3987 REAL_ARITHMETIC blocks unconditional. Delete some further
3988 #ifdef blocks predicated on REAL_ARITHMETIC.
3989
3990 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3991
3992 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
3993 explicit sizeof/sizeof.
3994 * decl.c (java_init_decl_processing): Likewise.
3995 * jcf-parse.c (init_jcf_parse): Likewise.
3996 * parse.y (init_src_parse): Likewise.
3997
3998 2002-03-02 Per Bothner <per@bothner.com>
3999
4000 Make --CLASSPATH by a synonym for --classpath and -classpath.
4001 Implement --bootclasspath.
4002 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
4003 (classpath_l): Remove.
4004 (jcf_path_CLASSPATH_arg): Remove.
4005 (jcf_path_bootclasspath_arg): New function.
4006 (jcf_path_seal): Simplify accordingly.
4007
4008 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
4009 (jcf_path_CLASSPATH): Remove declaration.
4010 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
4011 (lang_specific_driver): Translate -bootclasspath.
4012 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
4013 * lang.c (decode_lang_options): Do jcf_path_init first.
4014 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
4015 * gjavah.c: Also handle --bootclasspath.
4016 Handle --CLASSPATH as a synonum for --classpath.
4017 * jcf-dump.c: Likewise.
4018
4019 "." is not part of system path, but is the default for --classpath.
4020 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
4021 (jcf_path_seal): Add "." if no CLASSPATH specified.
4022
4023 * gcj.texi: Document changes.
4024
4025 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4026
4027 * expr.c (build_java_arraystore_check): Fix formatting.
4028
4029 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
4030
4031 Fix for PR java/5758, java/5632:
4032 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
4033 inner-class separator too.
4034 * parse.y (do_resolve_class): New local `decl_result.'
4035 Progressively build a name for what can have been loaded.
4036
4037 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4038
4039 * expr.c (java_array_data_offset): Removed function.
4040 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
4041 (build_java_array_length_access): Obtain "length" value using a
4042 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
4043 (build_java_arrayaccess): Correct comment. Access "data" using a
4044 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
4045 (build_java_arraystore_check): New function.
4046 (expand_java_arraystore): Use build_java_arraystore_check.
4047 * parse.y (patch_assignment): Simplify code to insert a store check
4048 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
4049 * check-init.c (check_init): Update to reflect that an array length
4050 access is now a COMPONENT_REF.
4051 * gcj.texi (Code Generation): Improve documentation of
4052 -fno-bounds-check. Add documentation for -fno-store-check.
4053 * java-tree.h (flag_store_check): Declare.
4054 (build_java_arraystore_check): Declare.
4055 * lang.c (flag_store_check): Initialize to 1.
4056 (lang_f_options): Add store-check option.
4057 * jvspec.c: Don't pass store-check option to jvgenmain.
4058 * lang-options.h: Add help string for -fno-store-check.
4059
4060 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
4061
4062 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
4063 * java-tree.h (java_dup_lang_specific_decl): New.
4064 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
4065
4066 2002-02-27 Zack Weinberg <zack@codesourcery.com>
4067
4068 * builtins.c, decl.c: Delete traditional-mode-related code
4069 copied from the C front end but not used, or used only to
4070 permit the compiler to link.
4071
4072 2002-02-22 Tom Tromey <tromey@redhat.com>
4073
4074 Fix for PR java/2369:
4075 * jvspec.c (verify_class_name): New function.
4076 (lang_specific_driver): Call it.
4077 (JAVA_START_CHAR_P): New macro.
4078 (JAVA_PART_CHAR_P): Likewise.
4079
4080 2002-02-22 Per Bothner <per@bothner.com>
4081
4082 * class.c: Change vtable to be more compatible with g++ v3 abi.
4083 (get_dispatch_table): Prepend offset-to-top (always 0) and
4084 type_info pointer (currently unimplemented hence NULL) to vtable.
4085 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
4086 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
4087 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
4088 (build_dtable_decl): Add declarations for new fields.
4089
4090 2002-02-20 Per Bothner <per@bothner.com>
4091
4092 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
4093 to finit$ (otherwise generate_bytecode_insns drops it). However, we
4094 don't need to set it on the COMPOUND_EXPR - the caller does that.
4095
4096 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
4097
4098 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
4099 `--CLASSPATH' becomes `--classpath.'
4100 * gjavah.c: Likewise.
4101 * jcf-dump.c: Likewise.
4102 * lang-options.h: Likewise.
4103 * lang.c: Likewise.
4104 * jcf-path.c: Updated comment.
4105 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
4106 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
4107 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
4108 (jcf_path_CLASSPATH_arg): Ditto.
4109 (classpath_u): Updated leading comment.
4110
4111 2002-02-20 Per Bothner <per@bothner.com>
4112
4113 * builtins.c (check_for_builtin): New function.
4114 (build_call_or_builtin): Remove.
4115 * java-tree.h: Update accordingly.
4116 * expr.c (expand_invoke): Use build + check_for_builtin instead
4117 of build_call_or_builtin.
4118 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
4119 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
4120 flag (which had caused jcf-write to incorrectly emit invokevirtual).
4121
4122 2002-02-17 Tom Tromey <tromey@redhat.com>
4123
4124 * java-tree.h (TYPE_STRICTFP): New macro.
4125 (struct lang_type) [strictfp]: New field.
4126 (CLASS_STRICTFP): New macro.
4127 (METHOD_STRICTFP): New macro.
4128 (struct lang_decl) [strictfp]: New field.
4129 * parse.y (method_header): Disallow strictfp constructor or
4130 abstract method.
4131 (STRICT_TK): Move before MODIFIER_TK.
4132 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
4133 (METHOD_MODIFIERS): Likewise.
4134 (INTERFACE_MODIFIERS): Likewise.
4135 * jcf-write.c (get_access_flags): Likewise.
4136 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
4137 (add_method_1): Likewise.
4138 (get_access_flags_from_decl): Likewise.
4139 * jcf-dump.c (print_access_flags): Print in standard order. Also,
4140 recognize strictfp flag.
4141 * jcf.h (ACC_STRICT): New define.
4142
4143 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
4144
4145 * class.c(build_utf8_ref): Move declaration of decl_size
4146
4147 2002-02-07 Tom Tromey <tromey@redhat.com>
4148
4149 * gcj.texi (Input Options): --CLASSPATH does not suppress system
4150 path.
4151
4152 2002-02-04 Anthony Green <green@redhat.com>
4153
4154 * class.c (build_utf8_ref): Put UTF-8 constants into merged
4155 sections if available.
4156
4157 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4158
4159 * parse.y (java_expand_classes): Fix typo in static field loop.
4160
4161 2002-02-02 Richard Henderson <rth@redhat.com>
4162
4163 * class.c (add_field): Mark static fields external.
4164 (build_class_ref): Remove redundant set.
4165 * parse.y (java_expand_classes): Mark static fields of classes
4166 to be compiled as local.
4167 * jcf-parse.c (parse_class_file): Likewise.
4168
4169 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
4170
4171 * gcj.texi (About CNI): New node.
4172
4173 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
4174
4175 PR java/5080
4176 * jcf-parse.c : Check for HAVE_LOCALE_H before using
4177 setlocale() with LC_CTYPE as a parameter.
4178 * jv-scan.c: Same.
4179
4180 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
4181
4182 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
4183 Follow GNU Coding Standards for --version.
4184
4185 2002-01-28 Tom Tromey <tromey@redhat.com>
4186
4187 * expr.c (build_jni_stub): Ensure storage for `meth' is
4188 generated.
4189 * parse.y (java_complete_expand_methods): Set
4190 current_function_decl before building JNI stub.
4191
4192 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
4193
4194 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
4195 BUILT_IN_SQRTF.
4196
4197 2002-01-22 Tom Tromey <tromey@redhat.com>
4198
4199 * decl.c (java_init_decl_processing): Use add_predefined_file.
4200 Predefine RawData.java.
4201 (predef_filenames): Removed.
4202 (java_init_decl_processing): Don't register predef_filenames.
4203 * jcf-parse.c (add_predefined_file): New function.
4204 (predefined_filename_p): Rewrote.
4205 (predefined_filename_p): No longer static.
4206 * decl.c (java_init_decl_processing): Call initialize_builtins.
4207 * Make-lang.in (JAVA_OBJS): Added builtins.o.
4208 (java/builtins.o): New target.
4209 * builtins.c: New file.
4210 * parse.y (patch_invoke): Use build_call_or_builtin.
4211 * java-tree.h (build_call_or_builtin): Declare.
4212 (initialize_builtins): Declare.
4213 (java_set_exception_lang_code): Removed unused declaration.
4214 (PREDEF_FILENAMES_SIZE): Removed.
4215 (java_tree_index): Added JTI_PREDEF_FILENAMES.
4216 (predef_filenames): New define.
4217 (add_predefined_file): Declare.
4218 (predefined_filename_p): Declare.
4219 * expr.c (expand_invoke): Use build_call_or_builtin.
4220
4221 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4222
4223 * parse.y (patch_switch_statement): Fix format specifier.
4224
4225 2002-01-16 Tom Tromey <tromey@redhat.com>
4226
4227 More for PR java/5365:
4228 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
4229 default.
4230 (process_file): Generate include for
4231 java.lang.UnsupportedOperationExceptions.
4232
4233 2002-01-15 Andreas Jaeger <aj@suse.de>
4234
4235 * .cvsignore: Add man pages.
4236
4237 2002-01-15 Tom Tromey <tromey@redhat.com>
4238
4239 Fix for PR java/5365:
4240 * gjavah.c (process_file): Turn class name into a file name.
4241
4242 2002-01-14 Matthias Klose <doko@debian.org>
4243
4244 * gcj.texi: Fix whitespace and formatting errors in the
4245 synopsis of the man pages. Update copyright.
4246
4247 2002-01-14 Tom Tromey <tromey@redhat.com>
4248
4249 For PR libgcj/5303:
4250 * Make-lang.in (java.install-man): Handle jv-convert man page.
4251 (java.generated-manpages): Added jv-convert.1.
4252 (java.uninstall): Remove jv-convert.1.
4253 (java.maintainer-clean): Likewise.
4254 ($(srcdir)/java/jv-convert.1): New target.
4255 * gcj.texi (Top): Link to jv-convert node.
4256 (Individual utilities): Likewise.
4257 (Invoking jv-convert): New node.
4258
4259 2001-01-10 Jeff Sturm <jsturm@one-point.com>
4260 Martin Kahlert <martin.kahlert@infineon.com>
4261
4262 * jcf-parse.c (get_constant): Don't swap lo/hi for big
4263 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
4264
4265 2002-01-03 Graham Stott <grahams@redhat.com>
4266
4267 * class.c (compile_resource_file): Update copyright date.
4268 Constify filename parameter.
4269 (java-tree.h): Update copyright date.
4270 (compile_resource_file): Constify filename parameter.
4271
4272 2002-01-03 Graham Stott <grahams@redhat.com>
4273
4274 * gcc/jcf-parse.c: Update copyright date.
4275 (yyparse): Constify resource_filename.
4276
4277 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4278
4279 * parse.y (src_parse_roots): Don't needlessly zero init.
4280
4281 2001-12-31 Tom Tromey <tromey@redhat.com>
4282
4283 * parse.y (dump_java_tree): New function.
4284 (source_end_java_method): Call it.
4285 (end_class_declaration): Likewise.
4286 * lang.c (java_decode_option): Call dump_switch_p.
4287
4288 2001-12-28 Tom Tromey <tromey@redhat.com>
4289
4290 * gen-table.pl: Don't process characters after \uffff. Added
4291 comment pointing to input file.
4292
4293 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4294
4295 * gen-table.pl: Const-ify output. Document the location of a
4296 suitable unicode input file.
4297
4298 * chartables.h: Regenerate.
4299
4300 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4301
4302 * chartables.h: Const-ify.
4303 * gjavah.c (options): Likewise.
4304 * jcf-dump.c (options): Likewise.
4305 * jv-scan.c (options): Likewise.
4306 * lex.c (java_start_char_p, java_part_char_p): Likewise.
4307 * parse.y (binop_lookup): Likewise.
4308
4309 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4310
4311 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
4312 the static arrays that are output.
4313 * jvspec.c (jvgenmain_spec): Make static.
4314 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
4315 * keyword.h: Regenerate.
4316 * lang.c (string_option, process_option_with_no, lang_f_options,
4317 lang_W_options): Const-ify.
4318 * lex.c (java_lex): Likewise.
4319
4320 2001-12-21 Richard Henderson <rth@redhat.com>
4321
4322 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
4323 (get_boehm_type_descriptor): ... here. Arrange for the
4324 TREE_TYPE to get set properly.
4325
4326 2001-12-21 Richard Henderson <rth@redhat.com>
4327
4328 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
4329 only if the target requires collect2.
4330
4331 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
4332
4333 2001-12-20 Tom Tromey <tromey@redhat.com>
4334
4335 For PR java/4509:
4336 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
4337 CAN_COMPLETE_NORMALLY for the node.
4338 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
4339 generate code for second branch if first branch can't complete
4340 normally.
4341 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
4342 the loop head if the loop body can't complete normally.
4343
4344 2001-12-20 Tom Tromey <tromey@redhat.com>
4345
4346 For PR java/4766:
4347 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
4348 case where `finally' clause can't complete normally.
4349
4350 2001-12-20 Tom Tromey <tromey@redhat.com>
4351
4352 Fixes PR java/5057:
4353 * parse.y (analyze_clinit_body): Added this_class parameter.
4354 Check for more cases where we must keep <clinit>.
4355 (maybe_yank_clinit): Cleaned up flow control.
4356
4357 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4358
4359 * decl.c (java_init_decl_processing): Don't initialize
4360 finit_leg_identifier_node.
4361 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
4362 (finit_leg_identifier_node): Remove.
4363 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
4364
4365 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4366
4367 * mangle.c (mangle_member_name): Don't special-case for
4368 NO_DOLLAR_IN_LABEL.
4369 * mangle_name.c (unicode_mangling_length): Likewise.
4370 (append_unicode_mangled_name): Likewise.
4371 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
4372 code.
4373
4374 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4375
4376 * expr.c (build_java_array_length_access): Don't force null pointer
4377 check unless flag_check_references is set.
4378
4379 2001-12-20 Tom Tromey <tromey@redhat.com>
4380
4381 Fix for PR java/3417:
4382 * parse.y (patch_assignment): Added special processing for
4383 `return'.
4384 (patch_return): Don't convert booleans to integers, and don't
4385 special-case `null'.
4386
4387 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
4388
4389 * config-lang.in (diff_excludes): Remove.
4390
4391 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
4392
4393 * gcj.texi: Update link to GCC manual.
4394
4395 2001-12-17 Tom Tromey <tromey@redhat.com>
4396
4397 * parse.y (link_nested_class_to_enclosing): Removed useless
4398 statement.
4399
4400 2001-12-16 Tom Tromey <tromey@redhat.com>
4401
4402 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
4403 Fixes PR java/5088.
4404
4405 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
4406
4407 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
4408 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
4409 spelling errors.
4410
4411 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4412
4413 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
4414
4415 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4416
4417 * decl.c (java_init_decl_processing): Build otable_type correctly.
4418 otable_decl is an otable_type.
4419
4420 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4421
4422 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
4423 otable_type, otable_ptr_type, method_symbol_type,
4424 method_symbols_array_type, method_symbols_array_ptr_type): New
4425 field/global tree definitions.
4426 (flag_indirect_dispatch): New flag.
4427 * decl.c (java_init_decl_processing): Initialize new otable and
4428 otable_syms type nodes and decls. Add new field "index" to
4429 method_type_node.
4430 * class.c (build_method_symbols_entry): New function.
4431 (make_method_value): Set "index" to to method's vtable index for
4432 virtual methods when indirect-dispatch is not used.
4433 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
4434 and set vtable_method_count to -1. Set otable and otable_syms field
4435 if indirect-dispatch is used and there was something to put in them.
4436 (build_method_symbols_entry): New function.
4437 (emit_offset_symbol_table): New function.
4438 * expr.c (get_offset_table_index): New function.
4439 (build_invokevirtual): Build array reference to otable at the index
4440 returned by get_offset_table_index, and use the result as the vtable
4441 offset.
4442 (build_invokeinterface): Similar.
4443 * jcf-parse.c (yyparse): If indirect-dispatch, call
4444 emit_offset_symbol_table at the end of compilation, after all classes
4445 have been generated.
4446 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
4447 * lang.c (flag_indirect_dispatch): Define.
4448 (lang_f_options): Add indirect-dispatch flag.
4449
4450 2001-12-14 Matthias Klose <doko@debian.org>
4451
4452 * gcj.texi: Markup for man page generation. Document missing
4453 options printed by <tool> --help.
4454 Terminate description of gij's -ms option with a dot.
4455 * Make-lang.in ($(srcdir)/java/*.1): New targets.
4456 (java.generated-manpages java.install-man, java.uninstall,
4457 java-maintainer-clean) Updated.
4458
4459 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
4460
4461 * class.c (get_dispatch_table): Fix java vtable layout
4462 for TARGET_VTABLE_USES_DESCRIPTORS.
4463 * decl.c (java_init_decl_processing): Initialize
4464 alloc_no_finalizer_node, finalize_identifier_node.
4465 * expr.c (class_has_finalize_method): New function.
4466 (expand_java_NEW): Generate calls for finalizer-free allocation.
4467 (build_invokevirtual): Fix java vtable layout for
4468 TARGET_VTABLE_USES_DESCRIPTORS.
4469 * java-tree.h (enum java_tree_index): New entries:
4470 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
4471 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
4472 (class_has_finalize_method): declare.
4473 (HAS_FINALIZER_P): New macro.
4474 * parse.y (patch_invoke): Generate calls for finalizer-free
4475 allocation.
4476
4477 2001-12-12 Matthias Klose <doko@debian.org>
4478
4479 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
4480 whitespace at end of line.
4481
4482 2001-12-11 Tom Tromey <tromey@redhat.com>
4483
4484 * lex.c (java_init_lex): Define wfl_to_string as
4485 gnu.gcj.runtime.StringBuffer unless generating bytecode.
4486
4487 2001-12-11 Jeff Sturm <jsturm@one-point.com>
4488
4489 * class.c (make_method_value): Use null_pointer_node to
4490 represent empty exception table.
4491
4492 2001-12-10 Tom Tromey <tromey@redhat.com>
4493
4494 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
4495
4496 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
4497
4498 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
4499
4500 2001-12-09 Per Bothner <per@bothner.com>
4501
4502 * check-init.c (current_switch_has_default): New static field.
4503 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
4504 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
4505 DEFAULT_EXPR seen, simulate a default alternative that copies state.
4506
4507 2001-12-09 Tom Tromey <tromey@redhat.com>
4508
4509 * check-init.c (check_init): Don't allow pre- or post- increment
4510 or decrement of final variable.
4511 (final_assign_error): Minor error message rewording.
4512
4513 2001-12-08 Tom Tromey <tromey@redhat.com>
4514
4515 * java-tree.h: Fixed typo.
4516
4517 * gjavah.c (decompile_method): Don't decompile to `return this'
4518 for static methods.
4519
4520 * gjavah.c (cxx_keywords): Re-sorted.
4521 * lex.c (cxx_keywords): Re-sorted.
4522
4523 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
4524 else.
4525
4526 * gjavah.c (print_namelet): Clear subnamelets.
4527 (HANDLE_METHOD): Set `method_printed' earlier.
4528
4529 2001-12-07 Tom Tromey <tromey@redhat.com>
4530
4531 * lang.c (lang_f_options): Added
4532 optimize-static-class-initialization.
4533 (java_decode_option): Removed special case.
4534
4535 2001-12-07 Per Bothner <per@bothner.com>
4536
4537 * check-init.c (check_init): Fix typo freeing memory twice.
4538
4539 2001-12-05 Per Bothner <per@bothner.com>
4540
4541 Restore support for static class initialization optimization.
4542 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
4543 * check-init.c (check_int): At end of BLOCK handle initialization
4544 blocks, which used to be done in java_complete_expand_method but did
4545 not handle the case where check_for_initialization might allocate
4546 more than a word of bits.
4547 * decl.c (lang_make_tree): The smic field is now a tree.
4548 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
4549 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
4550
4551 * parse.y (emit_test_initialization): Combine hash_lookup calls.
4552
4553 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
4554 Change from a hash table to a list.
4555 (struct_lang_decl): Change field 'smic' to match.
4556 * class.c (add_method_1): Initialize
4557 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
4558 * parse.y (adjust_init_test_initialization): Removed - inlined into -
4559 (java_expand_method_bodies): -here, since 'smic' is now a list.
4560 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
4561
4562 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
4563
4564 * class.c (java_hash_compare_tree_node): Fix casts.
4565
4566 2001-12-04 Per Bothner <per@bothner.com>
4567
4568 * check-init.c: Handle definite unassignment to finals in addition
4569 to definite assignment.
4570 (loop_current_locals): New field.
4571 (num_current_locals, int start_current_locals, num_current_words):
4572 Make static.
4573 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
4574 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
4575 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
4576 (get_variable_decl, check_final_reassigned): New functions.
4577 (check_init, check_bool_init): Modify as needed for checking finals.
4578 (check_for_initialization): Take extra parameter and return void.
4579 Do extra start-up logic to check final fields for assignment.
4580 * parse.y (check_static_final_variable_assignment_flag,
4581 reset_static_final_variable_assignment_flag, check_final_assignment,
4582 check_final_variable_local_assignment_flag,
4583 reset_final_variable_indirect_assignment_flag,
4584 reset_final_variable_global_assignment_flag): Remove functions.
4585 (java_complete_expand_methods, outer_field_access_fix,
4586 patch_assignment): Remove no-longer used logic.
4587 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
4588 * parse.y (register_fields, java_complete_tree): Update accordingly.
4589
4590 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
4591 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
4592 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
4593
4594 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
4595
4596 * java-tree.h (DECL FINAL): New bit-field.
4597 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
4598 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
4599 (DECL_INIT_CALLS_THIS): New macro.
4600 (struct lang_decl): New bit-field init_calls_this.
4601 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
4602 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
4603 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
4604 use it for both local variables and final fields.
4605 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
4606 and local_final.
4607 (struct lang_type): Remove hfv bit-field.
4608 (check_for_initialization): Change to return void.
4609
4610 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
4611 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
4612 * check-init.c (final_assign_error): New helper function.
4613 (check_final_reassigned, check_init): Use it.
4614 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
4615
4616 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
4617 bit-fields to unsigned.
4618
4619 2001-12-03 Per Bothner <per@bothner.com>
4620
4621 * parse.y (patch_binop): Minor constant folding.
4622
4623 * parse.y (build_current_thisn): Shorter 'buffer'.
4624
4625 2001-12-03 Per Bothner <per@bothner.com>
4626
4627 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
4628 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
4629 * jcf-write.c (generate_bytecode_insns): Remove support for
4630 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
4631 * check-init.c (check_init): Likewise.
4632
4633 2001-12-03 Per Bothner <per@bothner.com>
4634
4635 * verify.c (subroutine_nesting): New function.
4636 (verify_jvm_instructions): Use it to fix logic for checking that
4637 we're done with the current subroutine.
4638
4639 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
4640 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
4641
4642 2001-12-03 Per Bothner <per@bothner.com>
4643
4644 * jcf.h: Fix obvious typo in comment.
4645 * typeck.c (build_null_signature): Add comment.
4646
4647 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
4648
4649 * expr.c: Remove leading capital from diagnostic messages, as
4650 per GNU coding standards.
4651 * jcf-io.c: Similarly.
4652 * jcf-parse.c: Similarly.
4653 * jv-scan.c: Similarly.
4654 * jvspec.c: Similarly.
4655 * mangle.c: Similarly.
4656
4657 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
4658 Alexandre Petit-Bianco <apbianco@redhat.com>
4659
4660 * expr.c (build_java_arrayaccess): Call save_expr on array for
4661 correct evaluation order, modified comment, fixed indentation.
4662 * parse.y: (patch_assignment): Correctly extract the array base
4663 from the tree generate by build_java_arrayaccess, added comments.
4664 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
4665 Fixes PR java/3096, PR java/3803, PR java/3965.
4666
4667 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
4668
4669 * expr.c (expand_byte_code): Remove trailing periods from messages.
4670 * jcf-parse.c (load_class, jcf_parse): Similarly.
4671 * jcf-write.c (generate_classfile): Similarly.
4672 * lex.c (java_lex): Similarly.
4673
4674 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4675
4676 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
4677
4678 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
4679
4680 * Make-lang.in (java.generated-manpages): New dummy target.
4681
4682 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4683
4684 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4685 ASM_FINAL_SPEC.
4686 (lang_specific_pre_link): Use set_input to set input_filename.
4687 Append `main' here.
4688 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4689 (main): Fix definition.
4690 Strip `main' from classname.
4691 Fixes PR java/227.
4692
4693 2001-11-18 Roger Sayle <roger@eyesopen.com>
4694
4695 * parse.h (java_expand_switch): Remove old prototype.
4696
4697 2001-11-18 Tom Tromey <tromey@redhat.com>
4698
4699 Fix for PR java/1401:
4700 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
4701 arg0 is null.
4702 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
4703 correctly.
4704
4705 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
4706
4707 * lang.c (finish_parse): Rename to java_finish.
4708 (LANG_HOOKS_FINISH, java_finish): New.
4709
4710 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
4711
4712 * decl.c (init_decl_processing): Rename java_init_decl_processing.
4713 * java-tree.h: New prototype.
4714 * lang.c (java_init): Update prototype. Combine with old init_parse.
4715
4716 2001-11-13 Tom Tromey <tromey@redhat.com>
4717
4718 * gjavah.c (method_signature): New global.
4719 (HANDLE_METHOD): Set it.
4720 (decompile_return_statement): New function.
4721 (decompile_method): Use it.
4722 (print_method_info): Removed `synth' argument.
4723
4724 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
4725
4726 * java-tree.h (java_set_yydebug): New.
4727 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
4728 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
4729 (print_lang_decl, print_lang_type, print_lang_identifier,
4730 print_lang_statistics, lang_print_xnode): Remove.
4731
4732 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
4733
4734 * jcf-parse.c (init_lex): Remove.
4735 * lang.c (language_string, lang_identify): Remove.
4736 (struct lang_hooks): Constify.
4737 (LANG_HOOKS_NAME): Override.
4738 (init_parse): Update.
4739
4740 2001-11-08 Andreas Franck <afranck@gmx.de>
4741
4742 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
4743 program_transform_name the way suggested by autoconf.
4744 (java.install-common): Also transform auxiliary program names with
4745 program_transform_name.
4746
4747 2001-11-08 Tom Tromey <tromey@cygnus.com>
4748
4749 * parse.y (trap_overflow_corner_case): New rule.
4750 (unary_expression): Use it.
4751 * lex.c (java_init_lex): Don't set minus_seen.
4752 (yylex): Don't use minus_seen. Communicate overflow to parser for
4753 it to handle.
4754 (error_if_numeric_overflow): New function.
4755 * parse.h (minus_seen): Removed field.
4756 (JAVA_RADIX10_FLAG): New define.
4757
4758 2001-11-07 Tom Tromey <tromey@redhat.com>
4759
4760 Patch for PR java/1414:
4761 * parse.y (case_label_list): New global.
4762 (goal): Register case_label_list with GC.
4763 (java_complete_lhs): Save new case on case_label_list.
4764 (patch_switch_statement): Check for duplicate case labels.
4765
4766 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
4767
4768 * parse.y (patch_assignment): Removed unused third argument.
4769 (java_complete_lhs): Removed unused third argument to patch_assignment.
4770
4771 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
4772
4773 * lang.c: Include langhooks-def.h.
4774 * Make-lang.in: Update.
4775
4776 2001-10-31 Zack Weinberg <zack@codesourcery.com>
4777
4778 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
4779
4780 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4781
4782 * mangle.c (find_compression_record_match): Don't match compression
4783 records for package name elements unless they occur at the start of
4784 the name. Fix for PR java/4717.
4785
4786 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4787
4788 * expr.c (expand_java_field_op): Don't special-case references to
4789 java.lang.PRIMTYPE.TYPE.
4790 (build_primtype_type_ref): Removed.
4791 * java-tree.h (build_primtype_type_ref): Remove prototype.
4792 * parse.y (maybe_build_primttype_type_ref): Removed.
4793 (complete_function_arguments): Don't special-case references to
4794 java.lang.PRIMTYPE.TYPE.
4795 (patch_assignment): Likewise.
4796 (array_constructor_check_entry): Likewise.
4797
4798 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
4799
4800 * mangle.c (static tree compression_table): Fixed leading comment.
4801 * parse.h (struct parser_ctxt): Fixed field comment.
4802 * parse.y (check_pkg_class_access): New prototype, fixed leading
4803 comment, new parameter used to emit error only if passed as true.
4804 (parse_check_super): Pass extra argument to check_pkg_class_access.
4805 (do_resolve_class): Likewise.
4806 (process_imports): Likewise.
4807 (read_import_dir): Fixed indentation.
4808 (find_in_imports_on_demand): New local class_type_name. Local
4809 node_to_use deleted. while loop changed into for loop. Report
4810 multiple definition only for accessible classes. Improved error
4811 message.
4812 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
4813 assigned to parameter list, fixed indentation. while loop changed
4814 into for loop, restore TREE_CHAIN on local `tem' before the next
4815 iteration.
4816
4817 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4818
4819 * lang.c (lang_get_alias_set): Deleted.
4820
4821 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4822
4823 * gjavah.c (jni_print_char): Fix thinko in last change.
4824
4825 * gjavah.c (jni_print_char, decode_signature_piece): Use
4826 safe-ctype macros and/or fold extra calls into fewer ones.
4827 * lex.c (java_read_unicode, java_lex): Likewise.
4828 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
4829 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
4830 * mangle_name.c (append_unicode_mangled_name,
4831 unicode_mangling_length): Likewise.
4832
4833 2001-10-17 Richard Henderson <rth@redhat.com>
4834
4835 * Make-lang.in (java/lang.o): Depend on langhooks.h.
4836
4837 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
4838
4839 * lang.c (langhooks.h): Included.
4840 (LANG_HOOKS_INIT): Redefined.
4841 (LANG_HOOKS_INIT_OPTIONS): Likewise.
4842 (LANG_HOOKS_DECODE_OPTION): Likewise.
4843 (struct lang_hooks lang_hooks): New initialization.
4844
4845 2001-10-11 Per Bothner <per@bothner.com>
4846
4847 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
4848 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
4849 The former is simpler, and jcf-write.c handles it better.
4850 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
4851 or WITH_CLEANUP_EXPR.
4852 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
4853 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
4854
4855 * parse.y (patch_if_else_statement): If the condition is constant,
4856 optimize away the test.
4857
4858 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
4859
4860 * parse.y (patch_cast): Call patch_string on the first operand of
4861 the incoming node, update it if necessary. Fixes PR java/4510.
4862
4863 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4864
4865 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
4866 when name qualifier matches a package name.
4867
4868 2001-10-08 Tom Tromey <tromey@redhat.com>
4869
4870 Fix for PR java/4489:
4871 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
4872 force a new label when computing `body_block'.
4873
4874 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4875
4876 * jcf-io.c (format_uint): Const-ify.
4877 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
4878 * lex.c (java_get_line_col): Likewise.
4879 * parse.y (build_incdec): Likewise.
4880
4881 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
4882
4883 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
4884 a NULL enclosing context if appropriate. Fixes PR java/4466.
4885
4886 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
4887
4888 * parse.y (patch_assignment): Use lvalue's original TYPE when
4889 building the final COMPOUND_EXPR.
4890 (try_reference_assignconv): Fixed leading comment.
4891
4892 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
4893
4894 * parse.y (check_final_variable_indirect_assignment): For
4895 COMPOUND_EXPR, return only if finals were found initialized
4896 properly, if not, keep on checking.
4897 (check_final_variable_global_assignment_flag): New local
4898 error_found, set when appropriate and used to decide whether to
4899 report uninitialized finals. Fixed typo in comment.
4900
4901 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
4902
4903 * decl.c (init_decl_processing): Fixed typo in predef_filenames
4904 last three initializations. Fixes PR java/4360.
4905
4906 2001-09-21 Richard Henderson <rth@redhat.com>
4907
4908 * class.c (get_dispatch_table): Handle function descriptors.
4909 (build_dtable_decl): Likewise.
4910 * expr.c (build_invokevirtual): Likewise.
4911
4912 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
4913
4914 * parse.y (patch_method_invocation): Build class initialization
4915 when static finals are used to qualify method invocation.
4916 Fixes PR java/4366.
4917
4918 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
4919
4920 * parse.h: (WFL_STRIP_BRACKET): Re-written using
4921 build_type_name_from_array_name.
4922 (STRING_STRIP_BRACKETS): New macro.
4923 * parse.y (build_type_name_from_array_name): New function.
4924 (array_creation_expression:): Accumulate []s instead of [s.
4925 (cast_expression:): Accumulate []s instead of [s after cast type
4926 name.
4927 (build_array_from_name): Local string deleted, use
4928 build_type_name_from_array_name.
4929 (build_unresolved_array_type): Accumulate []s instead of [s after
4930 type name.
4931 (register_fields): Fixed comment.
4932 (resolve_class): Local name, base deleted, new locals tname and
4933 array_dims. Use build_type_name_from_array_name. Use array_dims to
4934 build array type.
4935 (purify_type_name): Use STRING_STRIP_BRACKETS.
4936
4937 2001-09-18 Andreas Jaeger <aj@suse.de>
4938
4939 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
4940 * jv-scan.c: Likewise.
4941
4942 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
4943
4944 * parse.y (patch_method_invocation): Inner class creation context
4945 check not enforced within constructors. Fixes PR java/1873.
4946
4947 2001-09-16 Tom Tromey <tromey@redhat.com>
4948
4949 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
4950 NOTE_PUSH for single-case push. Fixes PR java/4189.
4951
4952 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
4953
4954 * java-tree.h (TYPE_IMPORT_LIST): New macro.
4955 (TYPE_IMPORT_DEMAND_LIST): Likewise.
4956 (struct lang_type): New fields import_list and import_demand_list.
4957 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
4958 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
4959 (do_resolve_class): New local saved_enclosing_type, initialized,
4960 passed as parameter to find_in_imports and find_in_imports_on_demand.
4961 (find_in_imports): Added paramater enclosing_type, use its
4962 TYPE_IMPORT_LIST when applicable.
4963 (find_in_imports_on_demand): Added parameter enclosing_type, use
4964 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
4965 declaration and initialization.
4966 (fold_constant_for_init): Switch/restore current_class to the
4967 appropriate context.
4968
4969 2001-09-13 Mark Mitchell <mark@codesourcery.com>
4970
4971 * verify.c (verify_jvm_instructions): Fix typo.
4972
4973 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4974
4975 * expr.c (expand_invoke): Const-ification.
4976 * parse.y (patch_method_invocation): Likewise.
4977
4978 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4979
4980 * gjavah.c (cxx_keywords): Const-ification.
4981 * keyword.gperf (java_keyword): Likewise.
4982 * lang.c (java_tree_code_name): Likewise.
4983 * lex.c (cxx_keywords): Likewise.
4984 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
4985
4986 2001-09-11 Richard Henderson <rth@redhat.com>
4987
4988 * parse.h (ctxp_for_generation): Mark extern.
4989
4990 2001-09-10 Richard Henderson <rth@redhat.com>
4991
4992 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
4993
4994 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
4995
4996 * typeck.c (java_array_type_length, build_prim_array_type):
4997 Represent empty arrays by NULL index.
4998
4999 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
5000
5001 * java-tree.h (compile_resource_file): Grouped with other prototypes.
5002 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
5003
5004 2001-09-06 Anthony Green <green@redhat.com>
5005
5006 * class.c (O_BINARY): Define if necessary.
5007 (registerResource_libfunc): Declare.
5008 (init_class_processing): Initilize registerResource_libfunc.
5009 (compile_resource_file): New function.
5010 * java-tree.h (resource_name): Declare.
5011 (compile_resource_file): Declare.
5012 * jcf-parse.c (yyparse): Handle compiling java resource files.
5013 * lang.c (java_decode_option): Handle -fcompile-resource option.
5014 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
5015 resource files.
5016 * gcj.texi (Code Generation): Add documentation for -R flag.
5017
5018 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
5019
5020 * jcf-write.c (generate_classfile): Issue an error in case of
5021 field/initial value mismatch.
5022 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
5023 being initialized and we're generating bytecode.
5024 (java_complete_lhs): In MODIFY_EXPR section: added comments,
5025 set DECL_INITIAL properly when appropriate.
5026 Fixes PR java/4230
5027 Fixes PR java/4204
5028
5029 2001-09-01 Per Bothner <per@bothner.com>
5030
5031 * parse.y (maybe_yank_clinit): A field without an initializer is not
5032 relevant. All initializers except static final and constant require
5033 <clinit>, regardless of flag_emit_class_files.
5034
5035 2001-08-31 Per Bothner <per@bothner.com>
5036
5037 * class.c (set_constant_value): When not emitting class files, then a
5038 String ConstantValue is a utf8const_ptr_type.
5039
5040 2001-08-30 Per Bothner <per@bothner.com>
5041
5042 * jcf-write.c (generate_classfile): Check that field is primitive
5043 or string before emitting ConstantValue attribute.
5044
5045 2001-08-30 Per Bothner <per@bothner.com>
5046
5047 * parse.y (resolve_qualified_expression_name): If creating a
5048 COMPOUND_EXPR, set it's type correctly.
5049
5050 2001-08-30 Per Bothner <per@bothner.com>
5051
5052 * jcf-io.c (open_class): Set filename field.
5053
5054 * jcf-parse,c (parse_class_file): Set current_function_decl
5055 for better error message when Code attribute is missing.
5056
5057 * lang.c (put_decl_node, lang_print_error): Re-arrange for
5058 better diagnostics, especially for constructors.
5059
5060 2001-08-30 Per Bothner <per@bothner.com>
5061
5062 * jcf-write.c (generate_classfile): Don't write ConstantValue
5063 attribute if field is not final, for compatibility with jdk.
5064
5065 * jcf-write.c (generate_classfile): Convert ConstantValue values
5066 to correct type. Work-around for front-end bug.
5067 * class.c (set_constant_value): Error if constant has wrong type.
5068
5069 2001-08-30 Per Bothner <per@bothner.com>
5070
5071 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
5072 "Double" are printed at verbosity 1.
5073
5074 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
5075
5076 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
5077
5078 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
5079
5080 * parse.y (patch_assignment): Don't verify final re-assignment here.
5081 (java_complete_lhs): Verify assignments to finals calling
5082 patch_assignment. Verify re-assignments to finals before calling
5083 patch_assignment.
5084
5085 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
5086
5087 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
5088 Fixes PR java/1413
5089
5090 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
5091
5092 * lex.c (java_lex): new local found_hex_digits. Set and then used
5093 in test to reject invalid hexadecimal numbers.
5094 * parse.y (java_complete_tree): Prevent unwanted cast with
5095 initialized floating point finals.
5096 (patch_binop): Emit a warning when detecting a division by zero,
5097 mark result not constant, don't simplify non integer division.
5098
5099 2001-08-28 Per Bothner <per@bothner.com>
5100
5101 * jcf-write.c (generate_bytecode_insns): For increments and
5102 decrements just recurse to push constant. Improvement on Mark's patch.
5103
5104 2001-08-28 Mark Mitchell <mark@codesourcery.com>
5105
5106 * jcf-write.c (generate_bytecode_insns): Generate an integer to
5107 real conversion for increments and decrements of reals.
5108
5109 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
5110
5111 * parse.y (resolve_qualified_expression_name): Handle unresolved
5112 qualified expressions, prevent numerical qualifiers, fixed typo.
5113 Fixes PR java/4141
5114
5115 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
5116
5117 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
5118 don't report anything but deprecated class when marked so. Handle
5119 VAR_DECL.
5120 (patch_method_invocation): Check deprecation on methods and types.
5121 (patch_binop): code becomes an enum tree_code, added default: to
5122 switch to handle that. Detect division by zero, try to fold and
5123 return before using a subroutine.
5124
5125 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
5126
5127 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
5128 file smaller than 4 bytes.
5129 * parse.y (check_inner_circular_reference): New function.
5130 (check_circular_reference): Likewise.
5131 (array_initializer:): Accept {,}.
5132 (java_check_circular_reference): Rewritten using
5133 check_circular_reference and check_inner_circular_reference.
5134 (java_complete_expand_method): Unconditionally save and restore
5135 the unpurged exception list.
5136 (build_dot_class_method_invocation): Unmangle signature parameter.
5137
5138 2001-08-21 Tom Tromey <tromey@redhat.com>
5139
5140 * decl.c (init_decl_processing): Add `throws' field to method
5141 descriptor.
5142 * class.c (make_method_value): Compute `throws' field for method.
5143
5144 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
5145
5146 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
5147 circularity is detected.
5148 (ctors_unchecked_throws_clause_p): Fixed leading comment.
5149
5150 2001-08-17 Richard Henderson <rth@redhat.com>
5151
5152 * class.c (emit_register_classes): Add align parameter to
5153 call to assemble_integer.
5154
5155 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
5156
5157 * jcf-parse.c (load_class): New locals saved and class_loaded. If
5158 loading a class_or_name fails, try considering an innerclass name
5159 and load the enclosing context.
5160 * parse.y (resolve_inner_class): New function.
5161 (find_as_inner_class): Added leading comment.
5162 (register_incomplete_type): Keep the current context as enclosing
5163 context for JDEP_FIELD dependencies.
5164 (do_resolve_class): Locals new_class_decl and super initialized to
5165 NULL. Call resolve_inner_class, explore the enclosing context
5166 superclass if necessary.
5167 Fixes PR java/4007
5168
5169 2001-08-16 Tom Tromey <tromey@redhat.com>
5170
5171 * jcf-dump.c (main): Updated for change to jcf_path_seal.
5172 * gjavah.c (main): Updated for change to jcf_path_seal.
5173 * lang.c (version_flag): New global.
5174 (java_decode_option): Recognize `-version'.
5175 (java_init): Update for change to jcf_path_seal.
5176 * jcf.h (jcf_path_seal): Added `print' argument.
5177 * jcf-path.c (jcf_path_seal): Added `print' argument.
5178
5179 2001-08-13 Zack Weinberg <zackw@panix.com>
5180
5181 * Make-lang.in (java/decl.o): Update dependencies.
5182 * decl.c: Include libfuncs.h, don't include toplev.h.
5183
5184 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
5185
5186 * decl.c (init_decl_processing): exception_type_node,
5187 class_not_found_type_node, and no_class_def_found_type_node
5188 initialized. predef_filenames augmented accordingly.
5189 instinit_identifier_node initialized.
5190 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
5191 * java-tree.h (enum java_tree_index): New entries
5192 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
5193 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
5194 (exception_type_node): New macro.
5195 (class_not_found_type_node): Likewise.
5196 (no_class_def_found_type_node): Likewise.
5197 (instinit_identifier_node): Likewise.
5198 (PREDEF_FILENAMES_SIZE): Adjusted.
5199 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
5200 (struct lang_type): Fixed typo in bitfield name.
5201 (DECL_INSTINIT_P): New macro.
5202 (ID_INSTINIT_P): Likewise.
5203 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
5204 attribute.
5205 * parse.y (encapsulate_with_try_catch): New function.
5206 (generate_instinit): Likewise.
5207 (build_instinit_invocation): Likewise.
5208 (ctors_unchecked_throws_clause_p): Likewise.
5209 (add_instance_initializer): Deleted.
5210 (build_instance_initializer): Likewise.
5211 (in_instance_initializer): Likewise.
5212 (check_method_redefinition): instinit$ not to be verified.
5213 (java_complete_expand_methods): Generate instinit$, simplified code.
5214 (build_dot_class_method): Eliminated unnecessary locals. Use
5215 encapsulate_with_try_catch, removed unnecessary code.
5216 (fix_constructors): New local iii. Use build_instinit_invocation.
5217 (patch_method_invocation): Added comment.
5218 (maybe_use_access_method): Don't consider instinit$.
5219 (find_applicable_accessible_methods_list): Shorten the search for
5220 instinit$ too.
5221 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
5222 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
5223 (patch_throw_statement): Likewise. Fixed typo.
5224
5225 2001-08-12 David Edelsohn <edelsohn@gnu.org>
5226
5227 Revert:
5228 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5229 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
5230 ASM_FINAL_SPEC.
5231 (lang_specific_pre_link): Use set_input to set input_filename.
5232 Append `main' here.
5233 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
5234 (main): Fix definition.
5235 Strip `main' from classname.
5236 Fixes PR java/227.
5237
5238 2001-08-11 Zack Weinberg <zackw@panix.com>
5239
5240 * lex.h: Don't include setjmp.h. Don't define
5241 SET_FLOAT_HANDLER or prototype set_float_handler.
5242
5243 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
5244
5245 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
5246 `poplevel' in the right order.
5247
5248 2001-08-09 Richard Henderson <rth@redhat.com>
5249
5250 * Make-lang.in (class.o): Depend on TARGET_H.
5251 * class.c (emit_register_classes): Use target hooks instead of
5252 assemble_constructor and assemble_destructor.
5253
5254 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
5255
5256 * check-init.c (flags.h): Include
5257 (check_init): Don't report uninitialized static class
5258 initialization flags, don't free bit index when doing static class
5259 initialization optimization.
5260 (check_for_initialization): Return type changed to `unsigned int.'
5261 (attach_initialized_static_class): New function.
5262 * class.c (add_method_1): Create the initialized static class
5263 table if necessary.
5264 (finish_class): Always emit deferred inline methods.
5265 * decl.c (emit_init_test_initialization): Moved to expr.c
5266 (complete_start_java_method): Don't traverse
5267 DECL_FUNCTION_INIT_TEST_TABLE.
5268 (lang_mark_tree): Mark hash tables in function decls.
5269 * expr.c (emit_init_test_initialization): Moved from decl.c.
5270 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
5271 initialization flag, set DECL_CONTEXT and
5272 LOCAL_CLASS_INITIALIZATION_FLAG.
5273 (java_lang_expand_expr): Emit initialization code for static class
5274 initialized flags when entering block, if necessary.
5275 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
5276 * java-tree.h (flag_optimize_sci): New global variable declaration.
5277 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
5278 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
5279 (LOCAL_FINAL_P): Fixed typo in comment.
5280 (FINAL_VARIABLE_P): Likewise.
5281 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
5282 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
5283 (struct lang_decl): New fields `ict', `smic' and `cif.'
5284 (check_for_initialization): New returned value for global.
5285 (attach_initialized_static_class): New global function.
5286 (STATIC_CLASS_INIT_OPT_P): New macro.
5287 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
5288 * lang.c (java_decode_option): Handle
5289 `-fno-optimize-static-class-initialization'
5290 * parse.y (start_complete_expand_method): New function.
5291 (java_expand_method_bodies): Likewise.
5292 (attach_init_test_initialization_flags): Likewise.
5293 (adjust_init_test_initialization): Likewise.
5294 (emit_test_initialization): Likewise.
5295 (java_complete_expand_methods): Nullify abstract and native method
5296 bodies.
5297 (java_complete_expand_method): New locals `fbody', `block_body'
5298 and `exception_copy.' Reorganized: directly return on empty method
5299 bodies, call `start_complete_expand_method', remember definitely
5300 initialized static class in function, don't expand method bodies.
5301 (java_expand_classes): Call `java_expand_method_bodies' before
5302 `finish_class' when compiling to native.
5303 (resolve_expression_name): Use `orig' after building outer class
5304 field access.
5305 (patch_invoke): Remember static method invocations.
5306
5307 2001-08-06 Richard Henderson <rth@redhat.com>
5308
5309 * class.c (emit_register_classes): Pass a symbol_ref and priority
5310 to assemble_constructor.
5311
5312 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
5313
5314 * java-tree.h (all_class_filename): New macro.
5315 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
5316 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
5317 newly created IDENTIFIER_NODE to `all_class_filename.'
5318
5319 2001-08-01 Jeff Sturm <jsturm@one-point.com>
5320
5321 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
5322 Use ggc_add_tree_root to register roots.
5323
5324 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
5325
5326 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
5327 second operand calling check_init.
5328 * decl.c (complete_start_java_method): Swaped second and third
5329 arguments while creating WITH_CLEANUP_EXPR node.
5330 * jcf-write.c (generate_bytecode_insns): Use second operand
5331 instead of third when handling WITH_CLEANUP_EXPR.
5332 * parse.y (java_complete_lhs): Expand second operand of
5333 WITH_CLEANUP_EXPR nodes.
5334 (patch_synchronized_statement): Swaped second and third arguments
5335 while creating WITH_CLEANUP_EXPR node.
5336
5337 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
5338
5339 * parse.y (create_interface): Avoid cyclic inheritance report when
5340 syntax error encountered during class definition.
5341 Fixes PR java/2956
5342
5343 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5344
5345 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
5346 ASM_FINAL_SPEC.
5347 (lang_specific_pre_link): Use set_input to set input_filename.
5348 Append `main' here.
5349 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
5350 (main): Fix definition.
5351 Strip `main' from classname.
5352 Fixes PR java/227.
5353
5354 2001-07-18 Tom Tromey <tromey@redhat.com>
5355
5356 For PR java/2812:
5357 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
5358 * lex.c (java_new_lexer): Use ICONV_CONST.
5359 (java_read_char): Likewise.
5360 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
5361 (jv-scan$(exeext)): Likewise.
5362
5363 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
5364
5365 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
5366 * parse.y (check_class_interface_creation): Allow `private' if the
5367 enclosing is not an interface.
5368 (create_interface): Interface tagged public if the enclosing
5369 context is an interface.
5370 (create_class): Class tagged public if the enclosing context
5371 is an interface.
5372 Fixes PR java/2959
5373
5374 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
5375
5376 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
5377 Fixes PR java/2665
5378
5379 2001-07-14 Tim Josling <tej@melbpc.org.au>
5380
5381 * check-init.c (check_init): Remove references to EXPON_EXPR.
5382
5383 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
5384
5385 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
5386 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
5387 Fixes PR java/3602
5388
5389 2001-07-13 Tom Tromey <tromey@redhat.com>
5390
5391 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
5392 invocation.
5393
5394 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
5395
5396 * parse.y (patch_method_invocation): Don't override primary if one
5397 is already provided, but let this$<n> be built. Fixed comment.
5398
5399 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
5400
5401 * parse.y (empty_statement:): Report empty statement error only
5402 when found at class declaration level.
5403 Fixes PR java/3635
5404
5405 2001-07-12 Tom Tromey <tromey@redhat.com>
5406
5407 * expr.c (expand_load_internal): New function.
5408 (LOAD_INTERNAL): Use it.
5409
5410 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
5411
5412 * parse.y (verify_constructor_super): Compare anonymous class ctor
5413 args with `valid_method_invocation_conversion_p.'
5414 Fixes PR java/3285
5415
5416 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
5417
5418 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
5419 `-fsyntax-only.' Fixes PR java/3248
5420
5421 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
5422
5423 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
5424
5425 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
5426
5427 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
5428 current function is static. Fixes PR java/1970
5429
5430 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
5431
5432 * parse.y (patch_method_invocation): Add enclosing context to ctor
5433 calls if necessary. Fixes PR java/2953
5434
5435 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
5436
5437 * parse.y (resolve_package): Abort if qualified expression member
5438 isn't right.
5439 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
5440 Fixes PR java/1391
5441
5442 2001-07-07 Zack Weinberg <zackw@stanford.edu>
5443
5444 * verify.c: Don't use // comments.
5445
5446 2001-07-05 Tom Tromey <tromey@redhat.com>
5447
5448 * lang.c (flag_assume_compiled): Removed.
5449 * java-tree.h (flag_assume_compiled): Removed.
5450 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
5451 -fhash-synchronization, -fuse-divide-subroutine,
5452 -fcheck-references, -femit-class-file, -femit-class-files,
5453 -fassume-compiled. Updated --encoding information. Changed
5454 -foutput-class-dir to `-d'.
5455
5456 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
5457
5458 * jcf-parse.c (parse_class_file): Add lineno parameter to
5459 debug_start_source_file call.
5460
5461 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
5462
5463 * gcj.texi: Use gpl.texi.
5464 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
5465 dependencies and use doc/include in search path.
5466
5467 2001-07-03 Jeff Sturm <jsturm@one-point.com>
5468
5469 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
5470 `this'. If so, don't build instance initializers.
5471
5472 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
5473
5474 * parse.y (resolve_expression_name): Improved error message for
5475 inner class cases. Fixes PR java/1958
5476
5477 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
5478
5479 * lang.c: #include diagnostic.h
5480 (lang_print_error): Add a `diagnostic_context *' parameter.
5481 (java_dummy_print): Likewise.
5482 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
5483
5484 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
5485
5486 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
5487 * jcf.h (typedef struct JCF): New bitfield `finished.'
5488 (JCF_FINISH): Set `finished.'
5489 (JCF_ZERO): Reset `finished.'
5490 Fixes PR java/2633
5491
5492 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
5493
5494 * parse.y (class_body_declaration:): Don't install empty instance
5495 initializers.
5496 Fixes PR java/1314
5497
5498 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
5499
5500 * class.c (set_super_info): Call `set_class_decl_access_flags.'
5501 (set_class_decl_access_flags): New function.
5502 * java-tree.h (set_class_decl_access_flags): New prototype.
5503 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
5504 (parse_class_file): New local `decl_max_locals.' Take wide types
5505 into account to compute DECL_MAX_LOCALS.
5506 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
5507 imports on demand.
5508
5509 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
5510
5511 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
5512
5513 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
5514
5515 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
5516 * parse.y (do_resolve_class): Moved comments out to leading comment
5517 section. Removed local `start', New local `_ht' and
5518 `circularity_hash.' Record `enclosing' in hash table and search
5519 it to detect circularity. Use `enclosing' as an argument to
5520 `lookup_cl.' Free the hash table when done.
5521
5522 2001-06-19 Tom Tromey <tromey@redhat.com>
5523
5524 * lex.c (java_read_char): Disallow invalid and overlong
5525 sequences. Fixes PR java/2319.
5526
5527 2001-06-05 Jeff Sturm <jsturm@one-point.com>
5528
5529 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
5530
5531 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
5532
5533 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
5534 arguments accordingly.
5535
5536 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
5537
5538 * gcj.texi: Move contents to just after title page.
5539
5540 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
5541
5542 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
5543 builtin type.
5544 (patch_incomplete_class_ref): Build the class ref, build the class
5545 init if necessary, complete the tree.
5546 Fixes PR java/2605
5547
5548 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
5549
5550 * parse.y (lookup_field_wrapper): Test `name' code.
5551 (resolve_qualified_expression_name): Test `qual_wfl' code.
5552 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
5553 handle `qual_wfl' by code.
5554 (maybe_build_primttype_type_ref): Test `wfl' code.
5555
5556 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5557
5558 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
5559 fdl.texi.
5560 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
5561 the dvi file in the java directory.
5562
5563 2001-05-25 Sam TH <sam@uchicago.edu>
5564
5565 * gen-table.pl javaop.h jcf.h lex.h,
5566 parse.h: Fix header include guards.
5567
5568 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
5569
5570 * jv-scan.c (version): Update copyright year.
5571
5572 2001-05-21 Per Bothner <per@bothner.com>
5573
5574 * jcf-parse.c (read_class): If class is from .class or .zip file
5575 and it's already been read, don't push/pop parser context.
5576
5577 2001-05-18 Per Bothner <per@bothner.com>
5578
5579 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
5580 command line so the jvgenmain-generated main program comes first.
5581
5582 2001-05-15 Tom Tromey <tromey@redhat.com>
5583
5584 * class.c (build_utf8_ref): Don't generate identifier based on
5585 utf8const contents.
5586
5587 2001-05-12 Richard Henderson <rth@redhat.com>
5588
5589 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
5590 * expr.c (java_lang_expand_expr): Expand it.
5591 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
5592 calling build_exception_object_ref.
5593 * parse.y (catch_clause_parameter): Likewise.
5594 (build_dot_class_method): Likewise.
5595 (try_reference_assignconv): Likewise.
5596 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
5597 * jcf-write.c (generate_bytecode_insns): Likewise.
5598
5599 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
5600
5601 * parse.y (build_unresolved_array_type): Set
5602 EXPR_WFL_QUALIFICATION on the newly created wfl.
5603 Fixes PR java/2538. Fixes PR java/2535.
5604
5605 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
5606
5607 * parse.y (fix_constructors): Removed unnecessary assignment to
5608 local. Moved assignment to `this$<n>', fixed comments and
5609 indentation.
5610 (build_wfl_wrap): Fixed indentation.
5611 Fixes PR java/2598, java/2579 and java/2658.
5612
5613 2001-05-03 Mo DeJong <mdejong@redhat.com>
5614
5615 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
5616 check for byte swap.
5617
5618 2000-05-02 Jeff Sturm <jsturm@one-point.com>
5619
5620 * expr.c (build_class_init): Move MODIFY_EXPR
5621 outside of COND_EXPR. Remove variable `call'.
5622
5623 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5624
5625 * decl.c: NULL_PTR -> NULL.
5626 * jcf-write.c: Likewise.
5627
5628 2001-05-01 Tom Tromey <tromey@redhat.com>
5629
5630 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
5631 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
5632 * gcj.texi: Updated copyright text. Include fdl.texi.
5633 (Top): Link to new node.
5634
5635 2001-05-01 Per Bothner <per@bothner.com>
5636
5637 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
5638
5639 2001-05-01 Per Bothner <per@bothner.com>
5640
5641 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
5642 import_list contains the name, not the TREE_PURPOSE.
5643
5644 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5645
5646 * jcf-io.c (read_zip_member): Cast to long in comparison with
5647 signed value.
5648
5649 * jvspec.c (lang_specific_driver): Initialize variables.
5650
5651 * mangle.c (find_compression_record_match): Likewise.
5652
5653 * typeck.c (build_null_signature): Provide static prototype. Mark
5654 parameter with ATTRIBUTE_UNUSED.
5655
5656 * verify.c (verify_jvm_instructions): Initialize variable.
5657
5658 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5659
5660 * parse.y (do_resolve_class): Check for cyclic inheritance during
5661 inner class resolution.
5662
5663 2001-04-27 Per Bothner <per@bothner.com>
5664
5665 * parse.y (java_expand_classes): Don't change ctxp_for_generation
5666 while iterating, since that could cause gc to lose stuff.
5667
5668 2001-04-26 Per Bothner <per@bothner.com>
5669
5670 Fix method search wrt scope of inner classes to match JLS2.
5671 * typeck.c (build_null_signature): New static function.
5672 (has_method): New function. Uses build_null_signature and lookup_do.
5673 * java-tree.h (has_method): New declaration.
5674 * parse.y (find_applicable_accessible_methods_list): Do not search
5675 context of inner classes here.
5676 (patch_method_invocation): Search scope, ie. current and outer clases,
5677 for method matching simple name, to find class.
5678
5679 2001-04-26 Per Bothner <per@bothner.com>
5680
5681 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
5682 Fix thinko: If a single case, use if_icmpeq, not ifeq.
5683
5684 * constants.c (find_methodref_with_class_index): New function.
5685 (find_methodref_index): Use find_methodref_with_class_index.
5686 * java-tree.h (find_methodref_with_class_index): New declaration.
5687 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
5688 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
5689 If context changed from interface to class, don't use invokeinterface.
5690
5691 2001-04-25 Per Bothner <per@bothner.com>
5692
5693 * verify.c (verify_jvm_instructions): For field instructions,
5694 check that field index is valid. For invoke instructions, check that
5695 method index is valid.
5696
5697 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
5698
5699 * config-lang.in (target_libs): Copy from $libgcj_saved.
5700
5701 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5702
5703 * decl.c (init_decl_processing): Add new class "protectionDomain"
5704 field.
5705 * class.c (make_class_data): Set initial value for "protectionDomain".
5706
5707 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5708
5709 * jvspec.c (lang_specific_driver): Fix memory allocation
5710 deficit, by using concat in lieu of xmalloc/sprintf.
5711
5712 2001-04-20 Per Bothner <per@bothner.com>
5713
5714 Fixes to compile multiple .class files at once.
5715 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
5716 * java-tree.h (CLASS_PARSED_P): New macro.
5717 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
5718 * jcf-parse.c (jcf_parse_source): Inline into read_class.
5719 (read_class): Avoid some code duplication.
5720 Don't call JCF_FINISH for a .class file - might be needed later.
5721 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
5722 rather than CLASS_LOADED_P, since latter implies class laid out.
5723 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
5724 * parse.y: Don't need to set CLASS_LOADED_P for array types.
5725
5726 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5727
5728 * Make-lang.in (java/boehm.o): Depend on toplev.h.
5729
5730 * boehm.c: Include toplev.h.
5731
5732 2001-04-06 Tom Tromey <tromey@redhat.com>
5733 Alexandre Petit-Bianco <apbianco@redhat.com>
5734
5735 Fix for PR gcj/1404 and PR gcj/2332:
5736 * parse.y (build_array_from_name): If we use the type_wfl then
5737 accumulate dimensions from the original type as well.
5738 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
5739
5740 2001-04-06 Tom Tromey <tromey@redhat.com>
5741
5742 * parse.y (analyze_clinit_body): Return true if the second operand
5743 of a METHOD_EXPR is nonzero.
5744
5745 2001-04-06 Tom Tromey <tromey@redhat.com>
5746
5747 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
5748 directory.
5749 ($(srcdir)/java/parse.c): Likewise.
5750
5751 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
5752
5753 * gcj.texi: Use `which-gcj' instead of `which-g77.'
5754 (version-gcc): Initialized.
5755 (which-gcj): Likewise.
5756
5757 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
5758
5759 * java-tree.h (struct lang_decl): New macro
5760 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
5761 * parse.y (build_instance_initializer): New function.
5762 (add_instance_initializer): Use it.
5763 (java_fix_constructors): Set `current_class' before fix pass.
5764 (fix_constructors): Just return if already fixed. Move `super()'
5765 invocation ahead. Use `build_instance_initializer.'
5766 Fixes PR java/1315.
5767
5768 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
5769
5770 * parse.y (resolve_qualified_expression_name): Pass field's
5771 DECL_CONTEXT to `not_accessible_p.'
5772 (not_accessible_p): Changed parameters order in `inherits_from_p'
5773 invocation.
5774
5775 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
5776
5777 * lang-options.h: Add flag_check_references.
5778
5779 2001-04-04 Per Bothner <per@bothner.com>
5780
5781 * java-tree.h (CONSTANT_VALUE_P): New macro.
5782 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
5783 * parse.y (maybe_build_class_init_for_field): New static function.
5784 (resolve_expression_name, resolve_field_access): Use
5785 maybe_build_class_init_for_field instead of build_class_init
5786 This does not do the init if the field is compile-time-constant.
5787 (resolve_field_access): Simplify.
5788
5789 * parse.y (fold_constant_for_init): Merge test into switch.
5790
5791 2001-04-03 Zack Weinberg <zackw@stanford.edu>
5792
5793 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
5794 on gansidecl.h.
5795 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
5796
5797 2001-04-02 Zack Weinberg <zackw@stanford.edu>
5798
5799 * expr.c (pop_type_0): Save the result of the first
5800 lang_printable_name call in a scratch buffer, so it
5801 won't be clobbered by the second call.
5802
5803 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
5804
5805 * parse-scan.y (array_type:): Rewritten.
5806 (type_declaration:): `empty_statement' replaces `SC_TK.'
5807 (class_member_declaration:): `empty statement' added.
5808 (method_body:): Simplified.
5809 (static_initializer:): Likewise.
5810 (primary_no_new_array:): Use `type_literals.'
5811 (type_literals:): New rule.
5812 (dims:): Set and update `bracket_count.'
5813 Fixes PR java/1074. Fixes PR java/2412.
5814
5815 2001-03-28 Hans Boehm <boehm@acm.org>
5816
5817 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
5818 (get_boehm_type_descriptor): Set type on returned value to be a
5819 pointer length integer.
5820
5821 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5822
5823 * expr.c (pop_type_0): Call `concat' rather than building the
5824 string manually.
5825 (pop_type): Add format specifier in call to `error'.
5826
5827 * parse.y (patch_method_invocation): Avoid casting away
5828 const-ness.
5829
5830 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
5831
5832 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
5833
5834 2001-03-28 Richard Henderson <rth@redhat.com>
5835
5836 IA-64 ABI Exception Handling:
5837 * Make-lang.in (except.o): Don't depend on eh-common.h.
5838 * check-init.c (check_init): Handle EXC_PTR_EXPR.
5839 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
5840 [soft_exceptioninfo_call_node]: Remove.
5841 [eh_personality_libfunc, lang_eh_runtime_type]: New.
5842 (end_java_method): No emit_handlers.
5843 * except.c (java_set_exception_lang_code): Remove.
5844 (method_init_exceptions): Don't call it.
5845 (prepare_eh_table_type): No CATCH_ALL_TYPE.
5846 (build_exception_object_ref): New.
5847 (expand_end_java_handler): Update for except.h name changes.
5848 (emit_handlers, expand_resume_after_catch): Remove.
5849 * expr.c (java_lang_expand_expr): Update for except.h name changes.
5850 (process_jvm_instruction): Use build_exception_object_ref.
5851 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
5852 (soft_exceptioninfo_call_node): Remove.
5853 (build_exception_object_ref): Declare.
5854 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
5855 soft_exceptioninfo_call_node. Move processing ...
5856 [EXC_PTR_EXPR]: ... here.
5857 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
5858 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
5859 (source_end_java_method): No java_set_exception_lang_code or
5860 emit_handlers.
5861 (build_dot_class_method): Use build_exception_object_ref.
5862 (try_reference_assignconv): Check EXC_PTR_EXPR not
5863 soft_exceptioninfo_call_node.
5864
5865 2001-03-28 Richard Henderson <rth@redhat.com>
5866
5867 * java-tree.h (throw_node): Define as a single member of
5868 java_global_trees instead of a separate array.
5869 (JTI_THROW_NODE): New.
5870 * decl.c (throw_node): Don't declare.
5871 (init_decl_processing): Init a scalar throw_node.
5872 Don't register it for gc.
5873 * check-init.c (check_init): Reference scalar throw_node.
5874 * expr.c (build_java_athrow): Likewise.
5875 * jcf-write.c (generate_bytecode_insns): Likewise.
5876 * parse.h (BUILD_THROW): Likewise.
5877
5878 2001-03-28 Richard Henderson <rth@redhat.com>
5879
5880 * decl.c (end_java_method): Do not save and restore
5881 flag_non_call_exceptions.
5882 * parse.y (source_end_java_method): Likewise.
5883 * lang.c (flag_exceptions): Don't declare.
5884 (java_init_options): Set flag_non_call_exceptions. Set
5885 flag_exceptions here ...
5886 (java_init): ... not here.
5887
5888 2001-03-27 Richard Henderson <rth@redhat.com>
5889
5890 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
5891 exceptions_via_longjmp.
5892
5893 * lang.c (flag_new_exceptions): Don't declare it.
5894 (java_init_options): Or set it.
5895
5896 2001-03-27 Richard Henderson <rth@redhat.com>
5897
5898 * decl.c (end_java_method): Rename asynchronous_exceptions to
5899 flag_non_call_exceptions.
5900 * parse.y (source_end_java_method): Likewise.
5901
5902 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5903
5904 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
5905
5906 2001-03-26 Mark Mitchell <mark@codesourcery.com>
5907
5908 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
5909
5910 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
5911
5912 * parse.y (find_as_inner_class): Follow current package
5913 indications not to mistakingly load an unrelated class.
5914
5915 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5916
5917 * constants.c (PUTN): Use memcpy, not bcopy.
5918
5919 * lex.c (java_read_char): Use memmove, not bcopy.
5920
5921 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
5922
5923 2001-03-23 Per Bothner <per@bothner.com>
5924
5925 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
5926 macro for better error pin-pointing.
5927 * java-tree.h: Fix typo in comment.
5928
5929 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
5930 Don't include jsr/goto in exception range.
5931 Check if start and end of exception range are the same (also TRY_EXPR).
5932 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
5933 However, do emit the following goto even if try_block is empty.
5934 Defer freeing exception_decl until after the finalizer, to make
5935 sure the local isn't reused in the finalizer. Fixes PR java/1208.
5936
5937 * parse.y (java_complete_lhs): If the try-clause is empty, just
5938 return the finally-clause and vice versa.
5939
5940 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
5941
5942 * gcj.texi (Input Options): documented the check for attribute
5943 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
5944 * java-tree.h (flag_force_classes_archive_check): Declared extern.
5945 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
5946 (jcf_parse): Check for the right classes archive if necessary.
5947 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
5948 (jcf_parse_fields): Fixed indentation.
5949 * jcf-write.c (append_gcj_attribute): New function.
5950 (generate_classfile): Compute the attribute count, invoke
5951 `append_gcj_attribute'.
5952 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
5953 turned into bit-fields. New bit-field `right_zip.'
5954 (JCF_ZERO): Set `right_zip' to zero.
5955 * lang-options.h (-fforce-classes-archive-check): Added flag.
5956 * lang.c (flag_force_classes_archive_check): New flag.
5957 (lang_f_options): New entry `force-classes-archive-check.'
5958 Fixes PR java/1213.
5959
5960 2001-02-07 Andrew Haley <aph@redhat.com>
5961
5962 * gcj.texi (Configure-time Options): Add -fcheck-references.
5963 * expr.c (build_java_indirect_ref): New function.
5964 (java_check_reference): New function.
5965 (build_java_array_length_access): Use build_java_indirect_ref to
5966 check for null references.
5967 (build_java_arrayaccess): Likewise.
5968 (build_get_class): Likewise.
5969 (build_field_ref): Likewise.
5970 (invoke_build_dtable): Likewise.
5971 (build_invokeinterface): Likewise.
5972 * lang.c (lang_f_options): Add flag_check_references.
5973 * jvspec.c (jvgenmain_spec): Add flag_check_references.
5974 * java-tree.h (flag_check_references): New variable.
5975 * lang.c (flag_check_references): Likewise.
5976 * parse.y (patch_invoke): Use java_check_reference.
5977 (patch_assignment): Allow for extra nesting in
5978 _Jv_CheckArrayStore.
5979
5980 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
5981
5982 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
5983 * lex.c (cxx_keywords): Likewise.
5984
5985 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
5986
5987 * parse.y (qualify_ambiguous_name): Broaden `length'
5988 recognition. Help MODIFY_EXPR be resolved as expression names.
5989 Fixes PR java/2066. Fixes PR java/2400.
5990
5991 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
5992
5993 * gjavah.c (process_file): Mark interface definitions with
5994 "__attribute__ ((java_interface))".
5995
5996 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
5997
5998 * class.c (layout_class): Fixed push_super_field's second
5999 argument. Fixes PR java/2333.
6000 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
6001 too early to lay innerclasses out.
6002
6003 2001-03-20 Tom Tromey <tromey@redhat.com>
6004 Alexandre Petit-Bianco <apbianco@redhat.com>
6005
6006 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
6007 inside an array reference. Insertion of the array store check
6008 rewritten. Fixes PR java/2299.
6009
6010 2001-03-20 Tom Tromey <tromey@redhat.com>
6011
6012 * lex.c (java_read_unicode): Only accept leading `u's.
6013
6014 2001-03-20 Tom Tromey <tromey@redhat.com>
6015
6016 * jcf-parse.c (read_class): Initialize `class'.
6017
6018 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
6019
6020 * jcf_parse.c (jcf_parse): Eliminate unused variable.
6021
6022 2001-03-19 Mark Mitchell <mark@codesourcery.com>
6023
6024 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
6025 (layout_class): Likewise.
6026 (layout_class_method): Likewise.
6027 (emit_register_classes): Likewise.
6028 * decl.c (builtin_function): Likewise.
6029 (give_name_to_locals): Likewise.
6030
6031 2001-03-19 Per Bothner <per@bothner.com>
6032
6033 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
6034 before trying to load an inner class.
6035
6036 Fixes to process to command-line .class files in two passes.
6037 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
6038 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
6039 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
6040 * class.c (is_compiled_class): Fix for renamed flag.
6041 * parse.y (maybe_create_class_interface_decl): Likewise.
6042 * jcf-parse.c (yyparse): Also set if compiling .class files.
6043 * jcf-parse.c (read_class); Read current_class.
6044 (jcf_parse): Make static.
6045 (load_inner_classes): New function, with code moved from jcf_parse,
6046 because we need to inner classes after the command-line files are read.
6047 (yyparse): Set finput to NULL when it doesn't need to be closed.
6048 Reduce use of main_jcf (basically only for archive) and
6049 use finput instead of main_jcf->read_state.
6050 Inline jcf_figure_file_type into yyparse.
6051 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
6052 Defer load_inner_classes and parse_class_file to a second pass,
6053 after we've correctly mapped command-line .clas fiels to classes.
6054 (jcf_figure_file_type): Removed.
6055 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
6056 (JCF_ZERO): Also clear zipd field.
6057 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
6058
6059 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
6060
6061 * jcf-parse.c (yyparse): Change ch from char * to char.
6062
6063 2001-03-19 Per Bothner <per@bothner.com>
6064
6065 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
6066 Add constructed filelist-file at end, following -xjava. Thus any .o
6067 and library files are not affected by the -xjava. Also wrap
6068 explicit @FILE with -xjava and -xnone.
6069
6070 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
6071
6072 * class.c (build_static_field_ref): Call make_decl_rtl() after
6073 setting the DECL_EXTERNAL flag.
6074
6075 2001-03-17 Per Bothner <per@bothner.com>
6076
6077 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
6078
6079 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
6080 when result is is needed (target is STACK_TARGET).
6081
6082 * parse.h (JDEP_SOLV): Removed.
6083 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
6084
6085 * parse.y (incomplete_class_list): Removed.
6086 (obtain_incomplete_type): Don't use or set incomplete_class_list.
6087 It doesn't work if resolve_class changes the name of an array type
6088 that is on the list and then someone else looks for the modified name.
6089 Also, seems liable to break when compiling multiple source files at
6090 once. So the simplest is to just remove incomplete_class_list -
6091 it is only a minor space win and it is not even clear it saves time.
6092
6093 * parse.y (resolve_class): Remove unneeded promote_type.
6094
6095 2001-03-15 Per Bothner <per@bothner.com>
6096
6097 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
6098 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
6099 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
6100 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
6101
6102 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
6103 * parse.y (java_expand_classes): Likewise.
6104
6105 * parse.y (expand_start_java_method): Was only called once and had a
6106 misleading name, so inline in caller java_complete_expand_method.
6107 (enter_a_block): Likewise inline in enter_block and remove.
6108
6109 Remove junk from when gcc/java was created (by copying from C/C++).
6110 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
6111 (struct binding_level): Remove fields keep, keep_if_subblocks,
6112 more_cleanups_ok, have_cleanups (which have never been used).
6113 (pushlevel, poplevel): Remove related useless code.
6114
6115 * class.c (make_class_data): The class_dtable_decl (i.e. the
6116 vtable for Class) should be external, except when compiling Class.
6117
6118 * jvspec.c (lang_specific_driver): Fix -C handling.
6119 Check -save-temps to see if temp @FILE should be deleted.
6120 Follow-up to/fix for February 16 patch.
6121
6122 * verify.c (verify_jvm_instructions): Better error msgs for dup.
6123 (type_stack_dup): Remove no-longer neded error check.
6124
6125 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
6126
6127 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
6128 to 'for_pointer'. If this type is for a pointer (argument) mangling,
6129 don't surround the element with 'N..E' if the type name is
6130 unqualified.
6131
6132 2001-03-14 Mark Mitchell <mark@codesourcery.com>
6133
6134 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
6135 DECL_RTL_SET_P, etc.
6136 (make_method_value): Likewise.
6137 (get_dispatch_table): Likewise.
6138
6139 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
6140
6141 2001-03-07 Tom Tromey <tromey@redhat.com>
6142
6143 * config-lang.in (lang_requires): Define.
6144
6145 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
6146
6147 * typeck.c (convert): Check flag_unsafe_math_optimizations,
6148 not flag_fast_math.
6149
6150 2001-03-05 Per Bothner <per@bothner.com>
6151
6152 Fix a problem where rest_of_decl_compilation applied to
6153 class_dtable_decl causes problems because it was done too early,
6154 before output file was opened.
6155 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
6156 * class.c (class_dtable_decl): Add macro - element of class_roots.
6157 (make_class_data): Define class_dtable_decl.
6158 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
6159
6160 2001-03-01 Zack Weinberg <zackw@stanford.edu>
6161
6162 * java/class.c, java/decl.c, java/java-tree.h: Replace all
6163 uses of 'boolean' with 'bool'.
6164
6165 2001-03-01 Zack Weinberg <zackw@stanford.edu>
6166
6167 * lang-specs.h: Add zero initializer for cpp_spec field to all
6168 array elements.
6169
6170 2001-02-16 Per Bothner <per@bothner.com>
6171
6172 Handle compiling multiple input files at once, and @FILE syntax.
6173 * gcj.texi: Updated documentation to match.
6174 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
6175 * jcf-parse.c (parse_source_file): Split into ...
6176 (parse_source_file_1): New function - and:
6177 (parse_source_file_2): New function.
6178 (yyparse): On -ffilelist-file, open and scan named file.
6179 On first pass over files, only do parse_source_file_1.
6180 A new second pass calls parse_source_file_2 for each file to compile.
6181 (init_jcf_parse): Call init_src_parse.
6182 * jvspec.c (INDIRECT_FILE_ARG): New flag.
6183 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
6184 as multiple input file combined in one compilation.
6185 * lang-options.h: Add -ffilelist-file
6186 * lang.c (flag_filelist_file): New flag variable.
6187 (lang_f_options): Handle -ffilelist-file.
6188 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
6189 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
6190 gclass_list - use global fields of src_parse_roots instead.
6191 * parse.y (src_parse_roots): New array.
6192 (incomplete_class_list, gclass_list): New macros.
6193 (push_parser_context, java_pop_parser_context,
6194 java_parser_context_resume): Don't fiddle with deleted fields.
6195 (various): Use incomplete_class gclass_list and global macros
6196 instead of parse_ctxt fields - the lists are global.
6197 (init_src_parse): New function.
6198
6199 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6200
6201 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
6202
6203 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
6204
6205 * parse.y (check_inner_class_access): Moved declaration of local
6206 `enclosing_decl_type' to the right location.
6207
6208 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
6209
6210 * parse.y (parser_check_super_interface): Don't call
6211 check_pkg_class_access for an inner interface.
6212 (parser_check_super): Don't call check_pkg_class_access for inner
6213 class.
6214 (do_resolve_class): Simplify enclosing type loop. Don't call
6215 check_pkg_class_access if CL and DECL are not set.
6216 (find_in_imports_on_demand): Set DECL if class_type needed to be
6217 loaded. Don't call check_pkg_class_access for an inner class.
6218 (check_inner_class_access): Rewritten to implement member access
6219 rules as per spec 6.6.1.
6220 (check_pkg_class_access): Handle the empty package correctly.
6221 (in_same_package): New function. Determine if two classes are in the
6222 same package.
6223
6224 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
6225
6226 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
6227 method into array types.
6228 * parse.y (patch_method_invocation): Bypass access check on clone call
6229 to array instance.
6230
6231 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
6232
6233 * expr.c (build_instanceof): Check for arrays when trying fold to
6234 false.
6235
6236 2001-02-15 Jim Meyering <meyering@lucent.com>
6237
6238 * Make-lang.in (java.install-common): Depend on `installdirs'.
6239 (java.install-info): Likewise.
6240
6241 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
6242
6243 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
6244
6245 2001-02-14 Tom Tromey <tromey@redhat.com>
6246 Alexandre Petit-Bianco <apbianco@cygnus.com>
6247
6248 Fix for PR java/1261.
6249 * typeck.c (build_java_array_type): Add public `clone' method to
6250 arrays.
6251 * parse.y (resolve_qualified_expression_name): Use current_class
6252 when checking for inaccessibility.
6253 (patch_method_invocation): Fixed error message when accessibility
6254 denied. Added `from_super' argument.
6255
6256 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
6257
6258 * parse.y (resolve_class): Don't build a fake decl. Use the one
6259 already built.
6260 * typeck.c (build_java_array_type): Build and assign decl to array
6261 type.
6262
6263 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
6264
6265 * parse.y (not_accessible_p): Changed leading comment. Added extra
6266 `where' argument. Use it to enforce protected access rules.
6267 (resolve_qualified_expression_name): Added extra argument to
6268 not_accessible_p.
6269 (patch_method_invocation): Use argument `primary' to provide
6270 not_accessible_p with an extra argument.
6271 (lookup_method_invoke): Added extra argument to not_accessible_p.
6272 (search_applicable_method_list): Likewise.
6273
6274 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
6275
6276 * parse.y (resolve_qualified_expression_name): Try to resolve as
6277 an inner class access only if `decl' is a TYPE_DECL.
6278
6279 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
6280
6281 * decl.c (classdollar_identifier_node): Initialize.
6282 * java-tree.h (enum java_tree_index): New entry
6283 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
6284 (classdollar_identifier_node): New macro.
6285 (ID_CLASSDOLLAR_P): Likewise.
6286 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
6287 (build_dot_class_method_invocation): Likewise.
6288 (find_applicable_accessible_methods_list): `class$' can't be
6289 inherited.
6290
6291 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
6292
6293 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
6294
6295 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6296
6297 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
6298 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
6299 gone.
6300
6301 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6302
6303 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
6304 outside of the `__U' sequence too.
6305 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
6306 sequence too.
6307
6308 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6309
6310 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
6311
6312 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
6313
6314 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
6315 (JVGENMAIN_OBJS): Likewise.
6316 * java-tree.h (append_gpp_mangled_name): New prototype.
6317 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
6318 Removed cast calling `gcc_add_root.'
6319 * jvgenmain.c (mangle_obstack): New global, initialized.
6320 (main): Use it.
6321 (do_mangle_class): Constify local `ptr.'
6322 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
6323 append_gpp_mangle_name and update `count' if necessary.
6324 Use `mangle_obstack.'
6325 * mangle.c (append_unicode_mangled_name): Removed.
6326 (append_gpp_mangled_name): Likewise.
6327 (unicode_mangling_length): Likewise.
6328 (mangle_member_name): Return type set to `void.'
6329 (mangle_field_decl): Don't append `U' in escaped names.
6330 (mangle_method_decl): Likewise.
6331 (mangle_member_name): Just use `append_gpp_mangled_name.'
6332 * mangle_name.c: New file.
6333
6334 2001-02-07 Per Bothner <per@bothner.com>
6335
6336 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
6337
6338 * check-init.c (check_init): Don't call done_alternative after
6339 processing loop code, as a LOOP_EXPR never terminates normally.
6340
6341 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
6342
6343 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
6344
6345 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
6346
6347 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
6348 DECLs.
6349
6350 2001-02-06 Tom Tromey <tromey@redhat.com>
6351
6352 * lex.c (java_new_lexer): Longer error message.
6353
6354 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
6355 Alexandre Petit-Bianco <apbianco@cygnus.com>
6356
6357 * typeck.c (build_prim_array_type): Added leading comment.
6358 (build_java_array_type): Moved locals out of
6359 block. Always create the `data' field, fixed alignment to match
6360 C++.
6361
6362 2001-02-04 Tom Tromey <tromey@redhat.com>
6363
6364 * expr.c (java_lang_expand_expr): Don't bother recomputing
6365 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
6366 Fixes PR java/1866.
6367
6368 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
6369
6370 * parse.y (process_imports): Save the original name of the import
6371 for better error report.
6372
6373 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
6374
6375 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
6376 of macros used when compiling jvspec.c.
6377 * jvspec.c (lang_specific_driver): Link with the shared
6378 libgcc by default.
6379
6380 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6381
6382 * check-init.c (check_init): Call internal_error instead of fatal.
6383 * expr.c (java_lang_expand_expr): Likewise.
6384 * jcf-parse.c (get_constant): Likewise.
6385 * mangle.c (java_mangle_decl): Likewise.
6386 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
6387 (operator_string): Likewise.
6388 * check-init.c (check_init): Call abort instead of fatal.
6389 * class.c (build_class_ref): Likewise.
6390 * constants.c (write_constant_pool): Likewise.
6391 * decl.c (start_java_method): Likewise.
6392 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
6393 (java_stack_dup, encode_newarray_type): Likewise.
6394 (build_java_array_length_access): Likewise.
6395 (build_java_check_indexed_type, expand_java_pushc): Likewise.
6396 (build_java_soft_divmod, build_invokeinterface): Likewise.
6397 * java-tree.h (INNER_CLASS_P): Likewise.
6398 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
6399 (give_name_to_class, get_class_constant): Likewise.
6400 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
6401 (find_constant_index, generate_bytecode_conditional): Likewise.
6402 (generate_bytecode_insns, perform_relocations): Likewise.
6403 * lex.c (java_unget_unicode, java_lex): Likewise.
6404 * mangle.c (mangle_type, mangle_record_type): Likewise.
6405 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
6406 (finish_mangling): Likewise.
6407 * parse.h (MARK_FINAL_PARMS): Likewise.
6408 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
6409 (obtain_incomplete_type, java_complete_class): Likewise.
6410 (java_check_regular_methods, java_complete_expand_method): Likewise.
6411 (cut_identifier_in_qualified, check_deprecation): Likewise.
6412 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
6413 (java_complete_lhs, lookup_name_in_blocks): Likewise.
6414 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
6415 * typeck.c (set_local_type, parse_signature_type): Likewise.
6416 (parse_signature_string, build_java_signature): Likewise;
6417 (set_java_signature): Likewise.
6418 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
6419 * class.c (add_method): Call fatal_error instead of fatal.
6420 (build_static_field_ref): Likewise.
6421 * expr.c (build_known_method_ref, expand_invoke): Likewise.
6422 * jcf-parse.c (get_constant, jcf_parse): Likewise.
6423 * lex.c (java_new_new_lexer): Likewise.
6424 * jv-scan.c (main): Likewise.
6425 (fatal_error): Renamed from fatal.
6426 * jcf-parse.c (yyparse): Call fatal_io_error instead of
6427 pfatal_with_name.
6428 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
6429 (yyparse): Likewise.
6430 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
6431 * lex.c (java_get_line_col): Likewise.
6432 * jcf-parse.c (load_class): Make errors non-fatal.
6433 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
6434
6435 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
6436
6437 * jvgenmain.c (class_mangling_suffix): Remove unused string.
6438 (error): Remove unused function.
6439 (main): Don't use "__attribute__ alias" on generated class symbol.
6440
6441 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
6442
6443 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
6444 argument.
6445 * parse.y (finish_method_declaration): Code accounting for WFLed
6446 method DECL_NAMEs deleted.
6447 (check_abstract_method_definitions): Likewise.
6448 (resolve_type_during_patch): Layout resolved type.
6449 * typeck.c (lookup_do): Removed unused local.
6450
6451 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
6452
6453 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
6454 * decl.c (init_decl_processing): Use integer_minus_one_node, not
6455 integer_negative_one_node.
6456 * expr.c (build_java_binop): Likewise.
6457
6458 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
6459
6460 * zextract.c (read_zip_archive): Read file_offset before writing
6461 zipd and consequently clobbering the header contents.
6462
6463 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6464
6465 * Make-lang.in: Remove all dependencies on defaults.h.
6466 * decl.c: Don't include defaults.h.
6467 * expr.c: Likewise.
6468 * parse.y: Likewise.
6469
6470 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
6471
6472 * ChangeLog (2001-01-21): Fixed typo.
6473 * class.c (layout_class_method): Code accounting for WFLed
6474 method DECL_NAMEs deleted.
6475 * constant.c (find_methodref_index): Likewise.
6476 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
6477 * java-tree.h (DECL_FUNCTION_WFL): New macro.
6478 (struct lang_decl): New field `wfl'.
6479 (java_get_real_method_name): Prototype deleted.
6480 * mangle.c (mangle_method_decl): Code accounting for WFLed
6481 method DECL_NAMEs deleted.
6482 * parse.h (GET_METHOD_NAME): Macro deleted.
6483 * parse.y (reset_method_name): Deleted.
6484 (method_header): Set DECL_FUNCTION_WFL.
6485 (check_abstract_method_header): Code accounting for WFLed method
6486 DECL_NAMEs deleted.
6487 (java_get_real_method_name): Deleted.
6488 (check_method_redefinition): Code accounting for WFLed method
6489 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
6490 (java_check_regular_methods): Likewise.
6491 (java_check_abstract_methods): Likewise.
6492 (java_expand_classes): Don't call `reset_method_name.'
6493 (search_applicable_method_list): Use DECL_NAMEs instead of
6494 GET_METHOD_NAME.
6495 * typeck.c (lookup_do): Code accounting for WFLed method
6496 DECL_NAMEs deleted.
6497
6498 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
6499
6500 * lex.c (java_read_char): Check for EOF from getc first.
6501
6502 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
6503
6504 * class.c (layout_class): Don't lay the superclass out if it's
6505 already being laid out.
6506 * jcf-parse.c (handle_innerclass_attribute): New function.
6507 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
6508 handle_innerclasses_attribute.
6509 (jcf_parse): Don't load an innerclasses if it's already being
6510 laid out.
6511 * jcf-write.c (append_innerclass_attribute_entry): Static
6512 `anonymous_name' and its initialization deleted. `ocii' and `ini'
6513 to be zero for anonymous classes.
6514
6515 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
6516
6517 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
6518 necessary.
6519 * jcf-parse.c (set_source_filename): Use
6520 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
6521
6522 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
6523
6524 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
6525 gets a unique asm name.
6526
6527 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
6528
6529 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
6530 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
6531 if necessary.
6532 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
6533 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
6534 * parse.y (lookup_package_type_and_set_next): Deleted.
6535 (resolve_package): Removed unnecessary code.
6536 (find_applicable_accessible_methods_list): `finit$' can't be
6537 inherited.
6538 * verify.c (pop_argument_types): Added missing prototype.
6539
6540 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
6541
6542 * config-lang.in: Disable java by default.
6543
6544 2001-01-23 Tom Tromey <tromey@redhat.com>
6545
6546 * gcj.texi (Copying): New node.
6547 Added copyright information.
6548
6549 2001-01-21 Per Bothner <per@bothner.com>
6550
6551 Various fixes to allow compiling a compressed .jar/.zip archive.
6552 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
6553 (struct ZipFile): Add fields name and next (from ZipFileCache).
6554 (struct ZipDirectory): New field zipf points to owning ZipFile.
6555 * jcf.h (struct ZipDirectory): Add forward declaration.
6556 (struct JCF): Declare zipd field to have type struct ZipDirectory.
6557 Remove seen_in_zip and zip_offset fields.
6558 (JCF_SEEN_IN_ZIP): New macro.
6559 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
6560 * jcf-io.c: Change all ZipFileCache to ZipFile.
6561 (read_zip_member): New function.
6562 (open_in_zip): Call read_zip_member.
6563 * jcf-parse.c (find_in_current_zip): Remove function.
6564 (read_class): Merge in find_in_current_zip functionality.
6565 Call read_zip_member if needed.
6566 (parse_zip_file_entries): Use read_zip_member.
6567 (process_zip_dir): Update for removed and added JCF fields.
6568 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
6569
6570 2001-01-21 Per Bothner <per@bothner.com>
6571
6572 Minor optimization of static ggc roots.
6573 * jcf-parse.c (parse_roots): New static field.
6574 (current_field, current_method, current_file_list): Replace by macros
6575 naming fields of parse_roots.
6576 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
6577 * class.c (class_roots): New static field.
6578 (registered_class, fields_ident, info_ident, class_list):
6579 New macros naming fields of parse_roots.
6580 (build_static_field_ref): Don't register roots here.
6581 (layout_class): Static field list replaced by macro class_list.
6582 (init_class_processing): Call ggc_add_tree_root for 4 roots.
6583 Initialize fields_ident and info_ident here.
6584
6585 2001-01-21 Per Bothner <per@bothner.com>
6586
6587 * jcf-parse.c (ggc_mark_jcf): New function.
6588 (init_jcf_parse): Register current_jcf as ggc root.
6589
6590 2001-01-21 Per Bothner <per@bothner.com>
6591
6592 * lang.c (put_decl_node): Print method's name.
6593
6594 2001-01-21 Per Bothner <per@bothner.com>
6595
6596 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
6597 (verify_jvm_instructions): Use it, for better error messages on loads.
6598
6599 2001-01-21 Per Bothner <per@bothner.com>
6600
6601 * verify.c (merge_type_state): Still may have to merge even if
6602 LABEL_VERIFIED (label).
6603
6604 2001-01-21 Per Bothner <per@bothner.com>
6605
6606 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
6607 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
6608
6609 2001-01-19 Per Bothner <per@bothner.com>
6610
6611 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
6612 if expeting an interface type. Refines Tom's change of 2000-09-12.
6613
6614 2001-01-18 Per Bothner <per@bothner.com>
6615
6616 * gcj.texi (Input Options): Mention .java files.
6617
6618 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
6619
6620 * lang-options.h (-Wunsupported-jdk11): Removed.
6621 * lang.c (flag_not_overriding): Deleted.
6622 (flag_static_local_jdk1_1): Likewise.
6623 (lang_W_options): Removed "unsupported-jdk11" entry.
6624 * parse.y (java_check_methods): Removed dead code.
6625
6626 2001-01-17 Tom Tromey <tromey@redhat.com>
6627
6628 Changes suggested by Per Bothner:
6629 * gcj.texi (Input Options): Don't mention input files.
6630 (Code Generation): Updated --main information.
6631 (Invoking jcf-dump): Mention that --javap is incomplete.
6632 From Alexandre Petit-Bianco:
6633 (Warnings): Don't mention -Wunsupported-jdk11.
6634 My stuff:
6635 (Compatibility): Mention JDK 1.2-ness of libraries.
6636 (Resources): Mention resources used when writing gcj.
6637
6638 2001-01-17 Tom Tromey <tromey@redhat.com>
6639
6640 * gcj.texi: New file.
6641 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
6642 (java.info): Depend on gcj.info.
6643 (java/gcj.dvi): New target.
6644 (java.dvi): Depend on gcj.dvi.
6645 (java.install-info): Wrote.
6646
6647 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
6648
6649 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
6650 having called make_decl_rtl.
6651
6652 2001-01-14 Per Bothner <per@bothner.com>
6653
6654 Various patches to emit better messages on verification errors.
6655 * expr.c (push_type_0): Return error indication on stack overflow,
6656 instead of callinfg fatal.
6657 (push_type): Now just call push_type_0 (nd fatal on overflow).
6658 (pop_type_0): Return detailed error message (in a char** argument).
6659 (pop_type): If pop_type_0 fails, print error message.
6660 (pop_argument_types): Moved to verify.c.
6661 * verify.c (pop_argument_types): Moved from expr.c.
6662 Return a (possible) error message, rather than void.
6663 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
6664 (verify_jvm_instruction): Use new macros, improving error messages.
6665 For case OPCODE_astore use object_ptr_type_node.
6666 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
6667 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
6668
6669 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
6670 constant, return body without wrapper. (Improves constant folding.)
6671 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
6672
6673 2001-01-13 Per Bothner <per@bothner.com>
6674
6675 * expr.c (expand_java_field_op): Assigning to a final field outside
6676 an initializer does not violate JVM spec, so should be warning, not
6677 error. (Sun's verifier does not complain - though MicroSoft's does.)
6678
6679 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
6680
6681 * gjavah.c (version), jcf-dump.c (version): Update copyright year
6682 to 2001.
6683
6684 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
6685
6686 * parse.y (resolve_expression_name): Permit instance variables from
6687 enclosing context in super constructor call.
6688 (resolve_qualified_expression_name): Permit enclosing class's qualified
6689 "this" in super constructor call.
6690
6691 2001-01-10 Mark Mitchell <mark@codesourcery.com>
6692
6693 * class.c (build_utf8_ref): Remove last argument in call to
6694 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
6695 (build_class_ref): Likewise.
6696 (build_static_field_ref): Likewise.
6697 (get_dispatch_table): Likewise.
6698 (layout_class_method): Likewise.
6699 (emit_register_classes): Likewise.
6700 * constants.c (build_constant_data_ref): Likewise.
6701 * decl.c (builtin_function): Likewise.
6702 (create_primitive_vtable): Likewise.
6703 * expr.c (build_known_method_def): Likewise.
6704 (build_jni_stub): Likewise.
6705 (java_lang_expand_expr): Likewise.
6706
6707 2001-01-10 Tom Tromey <tromey@redhat.com>
6708
6709 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
6710
6711 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
6712
6713 * java-tree.h (lang_printable_name_wls): New prototype.
6714 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
6715 rather than `current_class' to print type name. Don't prepend type
6716 names when printing constructor names.
6717 (lang_printable_name_wls): New function.
6718 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
6719 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
6720 * parse.y (patch_method_invocation): Message tuned for constructors.
6721 (not_accessible_p): Grant `private' access from within
6722 enclosing contexts.
6723
6724 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
6725
6726 All files with updated copyright when applicable.
6727 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
6728 * class.c (mangle_class_field): Function removed.
6729 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
6730 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
6731 (build_class_ref): Call `java_mangle_class_field' instead of
6732 `mangle_class_field.'
6733 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
6734 (layout_class): Call `java_mangle_decl' instead of
6735 `mangle_static_field.'
6736 (cxx_keywords): Initialized static array moved to `lex.c.'
6737 (layout_class_method): Changed leading comment. Simplified to
6738 call `java_mangle_decl.' Local `ptr' moved in for loop body.
6739 * decl.c (lang_mark_tree): Mark field `package_list.'
6740 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
6741 (struct lang_type): New field `package_list.'
6742 (unicode_mangling_length): Prototype removed.
6743 (append_gpp_mangled_name, append_gpp_mangled_classtype,
6744 emit_unicode_mangled_name): Likewise.
6745 (cxx_keyword_p): New prototype.
6746 (java_mangle_decl, java_mangle_class_field,
6747 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
6748 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
6749 `build_expr_wfl.'
6750 * jvgenmain.c (main_method_prefix): Global variable removed.
6751 (main_method_suffix): Likewise.
6752 (do_mangle_classname): New function.
6753 (main): Call it. Format changed to accommodate new mangling scheme.
6754 * lex.c: (utf8_cmp): Conditionally prototyped.
6755 (cxx_keywords): Moved from class.c, conditionally defined.
6756 (utf8_cmp, cxx_keyword_p): Likewise.
6757 * mangle.c (obstack.h, ggc.h): Included.
6758 (mangle_field_decl): New function.
6759 (mangle_method_decl, mangle_type, mangle_pointer_type,
6760 mangle_array_type, mangle_record_type,
6761 find_compression_pointer_match, find_compression_array_match,
6762 find_compression_record_match,
6763 find_compression_array_template_match, set_type_package_list,
6764 entry_match_pointer_p, emit_compression_string, init_mangling,
6765 finish_mangling, compression_table_add, mangle_member_name): Likewise.
6766 (mangle_obstack): New global.
6767 (MANGLE_RAW_STRING): New macro.
6768 (unicode_mangling_length): Turned static.
6769 (append_unicode_mangled_name): Renamed from
6770 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
6771 replaces `obstack', removed from the parameter list.
6772 (append_gpp_mangled_name): Turned static. `mangle_obstack'
6773 replaces parameter `obstack', removed from the parameter list. Call
6774 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
6775 (append_gpp_mangled_classtype): Removed.
6776 (compression_table, compression_next): New static variables.
6777 * parse.y (temporary_obstack): Extern declaration removed.
6778
6779 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
6780
6781 * parse.y (patch_binop): Compute missing type in error situations.
6782
6783 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
6784
6785 * class.c (make_class_data): Push initial value for "arrayclass".
6786 * decl.c (init_decl_processing): Add new class field "arrayclass".
6787
6788 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
6789
6790 From patha@softlab.ericsson.se:
6791 * parse.y (switch_label): Use build, not build1, to construct
6792 DEFAULT_EXPR.
6793
6794 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
6795
6796 * lang.c (lang_decode_option): Change -MA to -MP.
6797 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
6798 Update to new prototype; do quote targets.
6799 (jcf_dependency_write): Update.
6800
6801 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
6802
6803 Shorten primitive array allocation path:
6804 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
6805 to create new primitive arrays.
6806 * expr.c (build_newarray): If generating native code, call
6807 soft_newarray_node with a reference to the primitive TYPE identifier
6808 instead of type_value.
6809
6810 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
6811
6812 Fix for PRs gcj/312 and gcj/253:
6813 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
6814 dest if they arn't already.
6815 * class.c (layout_class): Call maybe_layout_super_class on
6816 superinterfaces also, but only if compiling from bytecode.
6817
6818 Fix for PR gcj/373:
6819 * parse.y (create_class): Set ACC_STATIC if class is declared in an
6820 interface.
6821
6822 2000-12-15 Tom Tromey <tromey@redhat.com>
6823
6824 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
6825 set.
6826
6827 2000-12-14 Andrew Haley <aph@redhat.com>
6828
6829 * boehm.c (mark_reference_fields): Change test to correctly detect
6830 bitmap overflow.
6831
6832 2000-12-15 Andreas Jaeger <aj@suse.de>
6833
6834 * config-lang.in (lang_dirs): Added.
6835
6836 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
6837
6838 * parse.y (end_artificial_method_body): Fixed undefined behavior.
6839 Credits go to rth for finding it.
6840
6841 2000-12-13 Mike Stump <mrs@wrs.com>
6842
6843 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
6844
6845 2000-11-07 Tom Tromey <tromey@cygnus.com>
6846
6847 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
6848 * lex.c (java_ignorable_control_p): Removed.
6849 (java_letter_or_digit_p): Removed.
6850 (java_start_char_p): New function.
6851 (java_read_char): Return `int', not `unicode_t'. Changed
6852 callers.
6853 (java_read_unicode): Likewise.
6854 (java_read_unicode_collapsing_terminators): Likewise.
6855 (java_get_unicode): Likewise.
6856 (java_new_lexer): Initialize hit_eof.
6857 (java_parse_end_comment): Take `int' argument.
6858 (java_parse_doc_section): Likewise.
6859 (java_parse_escape_sequence): Don't allow backlash-newline.
6860 Return `int'.
6861 * lex.h (JAVA_DIGIT_P): Removed.
6862 (_JAVA_LETTER_OR_DIGIT_P): Removed.
6863 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
6864 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
6865 (JAVA_PART_CHAR_P): New macro.
6866 (UEOF): Now -1.
6867 (JAVA_CHAR_ERROR): Now -2.
6868 (java_lexer): New field `hit_eof'.
6869 * chartables.h: New file.
6870 * gen-table.pl: new file.
6871
6872 2000-11-20 Tom Tromey <tromey@cygnus.com>
6873 Alexandre Petit-Bianco <apbianco@cygnus.com>
6874
6875 * parse.y (java_complete_lhs): Only allow compound assignment of
6876 reference type if type is String.
6877
6878 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
6879
6880 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
6881 jcf-path.c: Likewise.
6882
6883 2000-12-09 Anthony Green <green@redhat.com>
6884
6885 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
6886 filestart and filename_length as int values.
6887
6888 2000-12-07 Mo DeJong <mdejong@redhat.com>
6889
6890 * jcf-io.c (find_class): Correct the logic that tests to see if a
6891 .java file is newer than its .class file. The compiler was
6892 incorrectly printing a warning when file mod times were equal.
6893
6894 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
6895
6896 * jvgenmain.c: Use ISPRINT not isascii.
6897
6898 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
6899
6900 * parse.y (end_artificial_method_body): Fixed typo.
6901
6902 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
6903
6904 * parse.y (patch_method_invocation): Pick the correct enclosing
6905 context when creating inner class instances.
6906 Fixes gcj/332.
6907
6908 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
6909
6910 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
6911 Update copyright year to 2000.
6912
6913 2000-11-23 Anthony Green <green@redhat.com>
6914
6915 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
6916 Move current_file_list out of yyparse and make it static.
6917
6918 * expr.c: Declare quick_stack and tree_list_free_list as static
6919 (init_expr_processing): Register quick_stack and
6920 tree_list_free_list roots.
6921
6922 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
6923
6924 * parse.y (build_outer_field_access): New local `decl_ctx', use
6925 it. Check for field's context and current class immediate outer
6926 context inheritance.
6927 (outer_field_access_p): Consider fields inherited from the last
6928 enclosing context.
6929 (build_access_to_thisn): Stop at the last enclosing context if
6930 necessary.
6931 Fixes gcj/367.
6932
6933 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
6934
6935 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
6936
6937 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
6938
6939 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
6940 scratch buffer.
6941
6942 2000-11-20 Tom Tromey <tromey@cygnus.com>
6943
6944 * jv-scan.c (help): Document --complexity.
6945 (options): Added --complexity.
6946 (flag_complexity): New global.
6947 (main): Call `report'.
6948 * parse-scan.y (complexity): New global.
6949 (if_then_statement, if_then_else_statement,
6950 if_then_else_statement_nsi, switch_block_statement_group,
6951 while_expression, do_statement, for_begin, continue_statement,
6952 throw_statement, catch_clause, finally, method_invocation,
6953 conditional_and_expression, conditional_or_expression,
6954 conditional_expression): Update complexity.
6955 (reset_report): Reset complexity.
6956 (report): New function.
6957
6958 2000-11-20 Tom Tromey <tromey@cygnus.com>
6959
6960 * lex.c (yylex): Added STRICT_TK case.
6961 * parse.y (STRICT_TK): Added.
6962 * parse-scan.y (STRICT_TK): Added.
6963 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
6964 `;'. Use 4, not 3, with -k option. Correctly rename resulting
6965 file.
6966 * keyword.h: Rebuilt.
6967 * keyword.gperf (strictfp): Added.
6968
6969 2000-11-20 Tom Tromey <tromey@cygnus.com>
6970
6971 * lex.c (yylex): Recognize floating point constants with leading
6972 0.
6973
6974 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6975
6976 * java-tree.h (cyclic_inheritance_report): Constify.
6977 * parse.y (cyclic_inheritance_report): Likewise.
6978
6979 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
6980
6981 * parse.y (goal): Remove call to ggc_add_string_root.
6982
6983 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
6984
6985 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
6986 Create string in scratch buffer, then pass to build_string.
6987
6988 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
6989
6990 * parse.y (issue_warning_error_from_context): Add
6991 ATTRIBUTE_PRINTF.
6992
6993 2000-11-11 Anthony Green <green@redhat.com>
6994
6995 * jcf-parse.c (process_zip_dir): Add finput parameter.
6996 (jcf_figure_file_type): Call process_zip_dir with appropriate
6997 argument.
6998
6999 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7000
7001 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
7002 * jcf-parse.c (jcf_figure_file_type): Likewise.
7003
7004 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
7005
7006 * parse.y (create_new_parser_context): Use memset () instead of
7007 bzero ().
7008
7009 2000-11-08 Tom Tromey <tromey@cygnus.com>
7010
7011 * gjavah.c (process_file): Only include gcj/cni.h when generating
7012 CNI stubs.
7013
7014 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
7015
7016 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
7017 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
7018 instead of bzero ().
7019
7020 2000-11-05 Tom Tromey <tromey@cygnus.com>
7021
7022 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
7023 * lex.c (IS_ZERO): New define.
7024 (java_perform_atof): Error on floating point underflow.
7025
7026 2000-11-04 Tom Tromey <tromey@cygnus.com>
7027
7028 * lex.c (java_parse_escape_sequence): Only read two octal
7029 characters if the first one is greater than 3. Don't allow
7030 "octal" numbers to include the digits 8 or 9.
7031
7032 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
7033
7034 * Make-lang.in (java.distdir): Remove.
7035
7036 2000-11-03 Tom Tromey <tromey@cygnus.com>
7037
7038 * Make-lang.in (java.dvi): New target.
7039 Partial fix for PR other/567.
7040
7041 * lang-options.h: Mention -Wout-of-date.
7042 * jcf-dump.c (flag_newer): New global.
7043 * gjavah.c (flag_newer): New global.
7044 * jcf-io.c (find_class): Only warn when flag_newer set.
7045 * lang.c (flag_newer): New global.
7046 (struct string_option): New declaration.
7047 (lang_W_options): New global.
7048 (process_option_with_no): New function.
7049 (lang_decode_option): Use it.
7050
7051 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
7052 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
7053 `$'.
7054
7055 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
7056 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
7057 * lex.c (java_read_unicode): Removed `term_context' argument.
7058 Recognize any number of `u' in `\u'.
7059 (java_read_unicode_collapsing_terminators): New function.
7060 (java_get_unicode): Use it.
7061 (java_lineterminator): Removed.
7062 (yylex): Produce error if character literal is newline or single
7063 quote. Return if eof found in middle of `//' comment. EOF in
7064 `//' comment is only an error if pedantic.
7065 (java_ignorable_control_p): New function.
7066 (java_parse_end_comment): Return if eof found in middle of
7067 comment.
7068 Include flags.h.
7069 * jv-scan.c (pedantic): New global.
7070
7071 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
7072
7073 * parse.y (outer_field_access_p): Inherited fields aren't
7074 consider outer fields.
7075 (maybe_build_thisn_access_method): Use
7076 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
7077 (resolve_expression_name): Trigger an error if a static field
7078 is being accessed as an outer field.
7079
7080 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
7081
7082 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
7083 Fixes gcj/365.
7084
7085 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
7086
7087 * Make-lang.in: Move all build rules here from Makefile.in,
7088 adapt to new context. Wrap all rules that change the current
7089 directory in parentheses. Expunge all references to $(P).
7090 When one command depends on another and they're run all at
7091 once, use && to separate them, not ;. Add OUTPUT_OPTION to
7092 all object-file generation rules. Delete obsolete variables.
7093
7094 * Makefile.in: Delete.
7095 * config-lang.in: Delete outputs= line.
7096
7097 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7098
7099 * parse.y (patch_method_invocation): NULLify this_arg when already
7100 inserted.
7101 (maybe_use_access_method): Handle call to methods unrelated to the
7102 current class. Fixed comment.
7103 Fixes gcj/361.
7104
7105 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
7106
7107 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
7108 scope.
7109
7110 2000-10-24 Tom Tromey <tromey@cygnus.com>
7111
7112 * lex.c (java_new_lexer): Initialize new fields. Work around
7113 broken iconv() implementations.
7114 (java_read_char): Swap bytes if required. Use fallback decoder if
7115 required.
7116 (byteswap_init, need_byteswap): New globals.
7117 (java_destroy_lexer): Only close iconv handle if it is in use.
7118 * lex.h (java_lexer): New fields read_anything, byte_swap,
7119 use_fallback.
7120 Made out_buffer unsigned.
7121
7122 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
7123
7124 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
7125 where an enclosing context can be set on the jdep.
7126 (do_resolve_class): Fixed identation.
7127
7128 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7129
7130 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
7131
7132 * jcf-reader.c (peek_attribute, skip_attribute): Only define
7133 when requested.
7134
7135 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
7136
7137 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
7138
7139 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
7140
7141 * jcf-write.c (OP1): Update `last_bc'.
7142 (struct jcf_block): Fixed indentation and typo in comments. New
7143 field `last_bc'.
7144 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
7145 follows `monitorenter'.
7146 * parse.y (patch_synchronized_statement): New local `tmp'. Call
7147 `patch_string'.
7148 Fixes gcj/232.
7149
7150 2000-10-16 Tom Tromey <tromey@cygnus.com>
7151
7152 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
7153 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
7154 * lang-options.h: Added -MA, -MT, -MF..
7155 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
7156 (DEPEND_TARGET_SET): New macro.
7157 (DEPEND_FILE_ALREADY_SET): Likewise.
7158 (init_parse): Handle new flags.
7159 * jcf.h (jcf_dependency_print_dummies): Declare.
7160 * Make-lang.in (s-java): Added mkdeps.o.
7161 * Makefile.in (BACKEND): Added mkdeps.o.
7162 (../gcjh$(exeext)): Added mkdeps.o.
7163 (../jcf-dump$(exeext)): Added mkdeps.o.
7164 * jcf-depend.c: Include mkdeps.h.
7165 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
7166 add_entry): Removed.
7167 (jcf_dependency_reset): Rewrote.
7168 (dependencies): New global.
7169 (jcf_dependency_set_target): Rewrote.
7170 (jcf_dependency_add_target): Likewise.
7171 (jcf_dependency_add_file): Likewise.
7172 (munge): Removed.
7173 (print_ents): Removed.
7174 (jcf_dependency_write): Rewrote.
7175 (print_dummies): New global.
7176 (jcf_dependency_print_dummies): New function
7177 (jcf_dependency_write): Call deps_dummy_targets if required.
7178
7179 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
7180
7181 * gjavah.c (add_class_decl): Removed unused variables `tname',
7182 `tlen' and `name_index'.
7183 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
7184 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
7185 in `wfl_operator' with value.
7186 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
7187 (jcf_figure_file_type): Fixed identation.
7188 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
7189 * parse.y (analyze_clinit_body): New function.
7190 (static_initializer:): Reset `current_static_block'.
7191 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
7192 `wfl_operator' with new value.
7193 (lookup_cl): Use EXPR_WFL_FILENAME.
7194 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
7195 analyze_clinit_body.
7196 (build_outer_field_access): Access to this$<n> built from
7197 current_class, not its outer context.
7198 (build_access_to_thisn): Fixed leading comment. Tidied things up.
7199 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
7200 (patch_method_invocation): Use `is_static_flag' when already
7201 initialized.
7202 (patch_newarray): Removed assignment in ternary operator.
7203
7204 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
7205
7206 * except.c (free_eh_ranges): Don't free `whole_range'.
7207
7208 2000-10-15 Anthony Green <green@redhat.com>
7209
7210 * decl.c (init_decl_processing): Call init_class_processing before
7211 anything else.
7212
7213 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7214
7215 * check-init.c (check_init): Fixed leading comment. Use
7216 LOCAL_FINAL_P.
7217 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
7218 (give_name_to_locals): Likewise.
7219 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
7220 fields in lang_decl_var.
7221 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
7222 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
7223 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
7224 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
7225 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
7226 (LOCAL_FINAL): Rewritten.
7227 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
7228 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
7229 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
7230 `init_final' fields.
7231 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
7232 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
7233 (TYPE_HAS_FINAL_VARIABLE): New macro.
7234 (struct lang_type): Added `afv' field.
7235 * parse.y (check_static_final_variable_assignment_flag): New function.
7236 (reset_static_final_variable_assignment_flag): Likewise.
7237 (check_final_variable_local_assignment_flag): Likewise.
7238 (reset_final_variable_local_assignment_flag): Likewise.
7239 (check_final_variable_indirect_assignment): Likewise.
7240 (check_final_variable_global_assignment_flag): Likewise.
7241 (add_inner_class_fields): Use LOCAL_FINAL_P.
7242 (register_fields): Handle local finals and final variables.
7243 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
7244 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
7245 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
7246 on local finals.
7247 (java_complete_expand_methods): Loop to set
7248 TYPE_HAS_FINAL_VARIABLE. Call
7249 `reset_final_variable_local_assignment_flag' and
7250 `check_final_variable_local_assignment_flag' accordingly before
7251 and after constructor expansion. Call
7252 `reset_static_final_variable_assignment_flag'
7253 before expanding <clinit> and after call
7254 `check_static_final_variable_assignment_flag' if the
7255 current_class isn't an interface. After all methods have been
7256 expanded, call `check_final_variable_global_assignment_flag' and
7257 `check_static_final_variable_assignment_flag' if the current class
7258 is an interface.
7259 (maybe_yank_clinit): Fixed typo in comment.
7260 (build_outer_field_access_methods): Removed old sanity check. Use
7261 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
7262 Don't create access methods for finals.
7263 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
7264 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
7265 existing DECL_INIT has been processed.
7266 (java_complete_lhs): Likewise.
7267 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
7268 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
7269 logic.
7270 (patch_assignment): Use LOCAL_FINAL_P.
7271 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
7272 DECL_INITIAL is nullified.
7273 Fixes gcj/163.
7274
7275 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7276
7277 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
7278
7279 * Makefile.in (parse.c, parse-scan.c): Likewise.
7280
7281 2000-10-12 Mark Mitchell <mark@codesourcery.com>
7282
7283 * class.c (temporary_obstack): Remove.
7284 (make_class): Don't mess with obstascks.
7285 (push_class): Likewise.
7286 (set_super_info): Likewise.
7287 (add_method_1): Likewise.
7288 (add_method): Likewise.
7289 (add_field): Likewise.
7290 (build_utf8_ref): Likewise.
7291 (build_class_ref): Likewise.
7292 (build_static_field_ref): Likewise.
7293 (finish_class): Likewise.
7294 (push_super_field): Likewise.
7295 (layout_class): Likewise.
7296 (layout_class_methods): Likewise.
7297 (init_class_processing): Likewise.
7298 * constants.c (get_tag_node): Likewise.
7299 (build_constant_data_ref): Likewise.
7300 * decl.c (ggc_p): Remove.
7301 (copy_lang_decl): Use ggc_alloc.
7302 (complete_start_java_method): Don't mess with obstacks.
7303 (start_java_method): Likewise.
7304 (end_java_method): Likewise.
7305 * except.c (link_handler): Use xmalloc.
7306 (free_eh_ranges): New function.
7307 (method_init_exceptions): Use it.
7308 (add_handler): Use xmalloc.
7309 (expand_start_java_handler): Don't mess with obstacks.
7310 (prepare_eh_table_type): Likewise.
7311 (expand_end_java_handler): Likewise.
7312 * expr.c (push_value): Likewise.
7313 (create_label_decl): Likewise.
7314 (build_jni_stub): Likewise.
7315 (java_lang_expand_expr): Likewise.
7316 (note_instructions): Use xrealloc.
7317 (java_push_constant_from_pool): Don't mess with obstacks.
7318 (process_jvm_instruction): Likewise.
7319 * java-tree.h (cyclic_inheritance_report): Remove duplicate
7320 declaration.
7321 * jcf-parse.c (get_constant): Don't mess with obstacks.
7322 (read_class): Likewise.
7323 (jcf_parse): Likewise.
7324 * lex.c (expression_obstack): Remove.
7325 (java_lex): Don't use obstack_free.
7326 * parse.h (exit_java_complete_class): Don't mess with obstacks.
7327 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
7328 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
7329 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
7330 * parse.y (gaol): Add more GC roots.
7331 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
7332 (lookup_field_wrapper): Likewise.
7333 (obtain_incomplete_type): Don't mess with obstacks.
7334 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
7335 macros.
7336 (craft_constructor): Don't mess with obstacks.
7337 (safe_layout_class): Likewise.
7338 (java_complete_class): Likewise.
7339 (source_end_java_method): Likewise.
7340 (build_outer_field_access_methods): Likewise.
7341 (build_outer_method_access_method): Likewise.
7342 (maybe_build_thisn_access_method): Likewise.
7343 (build_dot_class_method_invocation): Likewise.
7344 (java_complete_tree): Likewise.
7345 (java_complete_lhs): Likewise.
7346 (do_merge_string_cste): Likewise.
7347 (patch_string_cst): Likewise.
7348 (array_constructor_check_entry): Likewise.
7349 * typeck.c (build_java_array_type): Likewise.
7350 (parse_signature_string): Likewise.
7351 (build_java_signature): Likewise.
7352
7353 2000-10-12 Tom Tromey <tromey@cygnus.com>
7354
7355 Fix for PR gcj/356:
7356 * gjavah.c (add_class_decl): Don't special-case inner classes.
7357 (add_namelet): Likewise.
7358
7359 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
7360
7361 * java-tree.h: Constify current_encoding.
7362 * lang.c: Constify current_encoding.
7363
7364 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
7365
7366 * jvgenmain.c (class_mangling_suffix): Omit `.'.
7367 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
7368
7369 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
7370
7371 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
7372 patch. Fixes gcj/340.
7373
7374 2000-10-10 Tom Tromey <tromey@cygnus.com>
7375
7376 * lex.c (java_new_lexer): Initialize out_first and out_last
7377 fields.
7378 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
7379
7380 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
7381
7382 * parse.y (pop_current_osb): New function.
7383 (array_type:): Use `dims:', changed actions
7384 accordingly. Suggested by Anthony Green.
7385 (array_creation_expression:): Used pop_current_osb.
7386 (cast_expression:): Likewise.
7387 (search_applicable_method_list): Fixed indentation.
7388
7389 2000-10-08 Anthony Green <green@redhat.com>
7390
7391 * parse.y (array_type_literal): Remove production.
7392 (type_literals): Refer to array_type, not array_type_literal.
7393
7394 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7395
7396 Patch contributed by Corey Minyard.
7397 * decl.c (check_local_named_variable): New function.
7398 (tree check_local_unnamed_variable): Likewise.
7399 (find_local_variable): Splitted. Call check_local_{un}named_variable.
7400
7401 2000-10-07 Anthony Green <green@redhat.com>
7402
7403 * class.c (layout_class): Handle case where superclass can't be
7404 layed out yet.
7405
7406 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
7407
7408 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
7409 gperf.
7410
7411 2000-10-05 Tom Tromey <tromey@cygnus.com>
7412
7413 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
7414 * jvgenmain.c (class_mangling_prefix): Removed.
7415 (class_mangling_suffix): New global.
7416 (main): Use it.
7417 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
7418 `$'.
7419 (print_method_info): Handle overrides for static and final
7420 methods.
7421 (process_file): Generate declaration for class object field.
7422 * class.c (cxx_keywords): New array.
7423 (utf8_cmp): New function.
7424 (cxx_keyword_p): New function.
7425 (layout_class_method): Mangle C++ keywords by appending `$'.
7426 (mangle_field): New function.
7427 (mangle_class_field): Use mangle_field. Mangle class name as
7428 `class$'.
7429 (mangle_static_field): Use mangle_field.
7430
7431 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
7432
7433 * decl.c (find_local_variable): Removed uncessary type check and
7434 fixed range check typo. From Corey Minyard.
7435
7436 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7437
7438 * decl.c (give_name_to_locals): New local `code_offset'. Call
7439 `maybe_adjust_start_pc'.
7440 * expr.c (note_instructions): New function.
7441 (expand_byte_code): Don't collect insn starts here.
7442 (peek_opcode_at_pc): New function.
7443 (maybe_adjust_start_pc): Likewise.
7444 * java-tree.h (maybe_adjust_start_pc): Declare.
7445 (note_instructions): Likewise.
7446 * jcf-parse.c (parse_class_file): Call `note_instructions'.
7447
7448 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7449
7450 * parse.y (field_access:): Fixed indentation.
7451 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
7452
7453 2000-09-07 Tom Tromey <tromey@cygnus.com>
7454
7455 Fix for PR gcj/307:
7456 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
7457 JPRIMITIVE_TYPE_P, for arithmetic operators.
7458 (patch_method_invocation): Indentation fix.
7459 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
7460 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
7461 (do_unary_numeric_promotion): Cleaned up code.
7462 (valid_cast_to_p): Handle boolean correctly.
7463
7464 2000-09-27 Tom Tromey <tromey@cygnus.com>
7465
7466 * lex.c (java_read_unicode): Reset bs_count when finished with
7467 `\u' sequence.
7468
7469 2000-10-01 Mark Mitchell <mark@codesourcery.com>
7470
7471 Convert to GC.
7472 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
7473 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
7474 (typeck.o): Depend on ggc.h.
7475 * class.c (add_method_1): Use GC functions for allocation.
7476 (init_class_processing): Register roots.
7477 * decl.c (ggc_p): Set to 1.
7478 (pending_local_decls): Make it static.
7479 (push_jvm_slot): Use GC functions for allocation.
7480 (init_decl_processing): Register roots.
7481 (give_name_to_locals): Use GC functions for allocation.
7482 (lang_mark_tree): New function.
7483 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
7484 functions for allocation.
7485 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
7486 * lex.c (java_lex): Use build_string, rather than replicating it
7487 inline.
7488 * parse.y (goal): Add more roots.
7489 (mark_parser_ctxt): New function.
7490 * typeck.c: Include ggc.h.
7491
7492 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
7493
7494 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
7495 contains something else than MODIFY_EXPR.
7496
7497 2000-09-23 Mark Mitchell <mark@codesourcery.com>
7498
7499 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
7500 * Makefile.in (parse.o): Depend on ggc.h.
7501 (class.o): Likewise.
7502 (constants.o): Likewise.
7503 (decl.o): Likewise.
7504 (expr.o): Likewise.
7505 (jcf-parse.o): Likewise.
7506 (jcf-write.o): Likewise.
7507 (mangle.o): Likewise.
7508 * class.c: Include ggc.h.
7509 (build_static_field_ref): Register GC roots.
7510 (layout_class): Likewise.
7511 (init_class_processing): Likewise.
7512 * constants.c: Include ggc.h.
7513 (current_constant_pool_data_ref): Remove.
7514 (tag_nodes): Move it to ...
7515 (get_tag_node): ... here. Register GC roots.
7516 * decl.c: Include ggc.h. Remove many global tree definitions.
7517 (throw_node): Define.
7518 (java_global_trees): Likewise.
7519 (predef_filenames): Make the size a constant.
7520 (init_decl_processing): Adjust accordingly.
7521 (init_decl_processing): Call init_jcf_parse. Register GC roots.
7522 * expr.c: Include ggc.h.
7523 (init_expr_processing): Register GC roots.
7524 (build_invokeinterface): Likewise.
7525 * java-tree.h: Replace extern tree declarations with macros.
7526 (java_global_trees): New variable.
7527 (java_tree_index): New enumeration.
7528 (init_jcf_parse): Declare.
7529 * jcf-parse.c: Include ggc.h.
7530 (current_class): Remove declaration.
7531 (main_class): Likewise.
7532 (all_class_list): Likewise.
7533 (predefined_filename_p): Adjust for constant size of
7534 predef_filenames.
7535 (init_jcf_parse): New function.
7536 * jcf-write.c: Include ggc.h.
7537 (generate_classfile): Register GC roots.
7538 (append_synthetic_attribute): Likewise.
7539 (append_innerclass_attribute_entry): Likewise.
7540 * lang.c: Include ggc.h.
7541 (lang_print_error): Register GC roots.
7542 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
7543 with macros.
7544 * parse.y: Include ggc.h.
7545 (wfl_operator): Remove.
7546 (goal): Register GC roots.
7547 (java_pop_parser_context): Adjust for new field names.
7548 (java_parser_context_save_global): Likewse.
7549 (java_parser_context_restore_global): Likewise.
7550 (java_parser_context_suspend): Likewise.
7551 (java_parser_context_resume): Likewise.
7552 (verify_constructor_circularity): Register GC roots.
7553 (lookup_cl): Likewise.
7554 (java_reorder_fields): Likewise.
7555 (build_current_this): Likewise.
7556 (class_in_current_package): Likewise.
7557 (argument_types_convertible): Likewise.
7558 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
7559
7560 2000-09-14 Tom Tromey <tromey@cygnus.com>
7561
7562 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
7563
7564 2000-09-13 Tom Tromey <tromey@cygnus.com>
7565
7566 * jcf-parse.c: Include <locale.h>.
7567 * jv-scan.c: Include <locale.h>.
7568
7569 2000-09-12 Tom Tromey <tromey@cygnus.com>
7570
7571 * expr.c (pop_type_0): Return `Object' if trying to merge two
7572 interface types.
7573 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
7574 interface types; `Object' is always a valid supertype.
7575
7576 2000-09-12 Tom Tromey <tromey@cygnus.com>
7577
7578 Fix for PR gcj/33:
7579 * jv-scan.c (help): Document --encoding.
7580 (options): Added `encoding' entry.
7581 (OPT_ENCODING): New define.
7582 (main): Handle --encoding.
7583 Include <langinfo.h> if nl_langinfo exists.
7584 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
7585 --encoding.
7586 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
7587 (parse_source_file): Correctly call java_init_lex. Added `finput'
7588 argument. Use nl_langinfo to determine default encoding.
7589 * java-tree.h (current_encoding): Declare.
7590 * parse.y (java_parser_context_restore_global): Don't restore
7591 `finput'.
7592 (java_parser_context_save_global): Don't set `finput' field.
7593 (java_pop_parser_context): Don't restore `finput'. Free old lexer
7594 if required.
7595 * lang.c (current_encoding): New global.
7596 (lang_decode_option): Recognize `-fencoding='.
7597 (finish_parse): Don't close finput.
7598 * parse.h (struct parser_ctxt): Removed `finput' and
7599 `unget_utf8_value' fields. Added `lexer' field.
7600 (java_init_lex): Fixed declaration.
7601 * lex.c (java_new_lexer): New function.
7602 (java_destroy_lexer): Likewise.
7603 (java_read_char): Added `lex' argument. Handle iconv case.
7604 (java_read_unicode): Added `lex' argument. Count backslashes in
7605 lexer structure.
7606 (java_init_lex): Added `finput' and `encoding' arguments. Set
7607 `lexer' field in ctxp.
7608 (BAD_UTF8_VALUE): Removed.
7609 (java_lex): Handle seeing UEOF in the middle of a string literal.
7610 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
7611 (java_lexer): New structure.
7612 (UNGETC): Removed.
7613 (GETC): Removed.
7614 (DEFAULT_ENCODING): New define.
7615 (java_destroy_lexer): Declare.
7616
7617 2000-09-12 Tom Tromey <tromey@cygnus.com>
7618
7619 Fix for PR gcj/343:
7620 * lex.c (java_init_lex): Initialize java_io_serializable.
7621 * parse.y (java_io_serializable): New global.
7622 (valid_ref_assignconv_cast_p): An array can be cast to
7623 serializable.
7624
7625 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
7626
7627 * decl.c, expr.c: Include defaults.h if not already included.
7628 Don't define the *_TYPE_SIZE macros.
7629
7630 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
7631
7632 * typeck.c (build_java_array_type): Correct first parameter
7633 in ADJUST_FIELD_ALIGN invocation.
7634
7635 2000-09-06 Tom Tromey <tromey@cygnus.com>
7636
7637 * lang-specs.h: Also recognize `-femit-class-files'.
7638
7639 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
7640
7641 * verify.c (merge_types): Load the types to merge if necessary.
7642
7643 2000-09-02 Anthony Green <green@redhat.com>
7644
7645 * jcf-io.c: Include zlib.h.
7646 (open_in_zip): Read compressed class file archives.
7647 * zipfile.h (ZipDirectory): Add uncompressed_size and
7648 compression_method fields.
7649 * zextract.c (read_zip_archive): Collect file compression info.
7650
7651 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
7652
7653 * parse.y (do_resolve_class): Also explore superclasses of
7654 intermediate enclosing contexts when searching for inner classes.
7655
7656 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
7657
7658 * parse.y (variable_declarator_id:): Better error message.
7659 (expression_statement:): Use YYNOT_TWICE.
7660 (cast_expression:): Likewise.
7661 (assignment:): Likewise.
7662
7663 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
7664
7665 * parse.y (do_merge_string_cste): New locals. Create new
7666 STRING_CSTs each time, use memcpy. Fixes gcj/311.
7667
7668 2000-08-07 Hans Boehm <boehm@acm.org>
7669
7670 * boehm.c (mark_reference_fields): Set marking bits for all words in
7671 a multiple-word record.
7672 (get_boehm_type_descriptor): Use the procedure marking descriptor for
7673 java.lang.Class.
7674
7675 2000-08-31 Mike Stump <mrs@wrs.com>
7676
7677 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
7678 jcf-dump$(exeext)): Make parallel safe.
7679
7680 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
7681
7682 * jcf-parse.c (set_source_filename): Constify a char *.
7683 * jcf-write.c (append_innerclasses_attribute,
7684 make_class_file_name): Constify a char *. Don't recycle a
7685 variable for an unrelated purpose.
7686 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
7687 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
7688
7689 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
7690
7691 * expr.c (can_widen_reference_to): Fixed indentation.
7692 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
7693 * parse.y: `finit$' replaces `$finit$' in comments.
7694 (try_builtin_assignconv): Fixed leading comment.
7695
7696 2000-08-25 Greg McGary <greg@mcgary.org>
7697
7698 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
7699
7700 2000-08-24 Greg McGary <greg@mcgary.org>
7701
7702 * lang.c (lang_decode_option): Use ARRAY_SIZE.
7703 * parse.y (BINOP_LOOKUP): Likewise.
7704
7705 2000-08-22 Andrew Haley <aph@cygnus.com>
7706
7707 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
7708 sign extending. Fixes gcj/321.
7709 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
7710 combining to make a jlong. Fixes gcj/321.
7711
7712 2000-08-21 Nix <nix@esperi.demon.co.uk>
7713
7714 * lang-specs.h: Do not process -o or run the assembler if
7715 -fsyntax-only.
7716
7717 2000-08-16 Andrew Haley <aph@cygnus.com>
7718
7719 * typeck.c (build_java_array_type): Rewrite code to do array
7720 alignment. Take into account back-end macros when aligning array
7721 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
7722 user to set alignment. Fixes gcj/252 and 160.
7723
7724 2000-08-09 Tom Tromey <tromey@cygnus.com>
7725
7726 * parse.y (check_abstract_method_definitions): Now return `int'.
7727 Check implemented interfaces. Fixes PR gcj/305.
7728
7729 * parse.y (patch_switch_statement): Disallow `long' in switch
7730 expressions. Fixes PR gcj/310.
7731
7732 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
7733
7734 * decl.c (finit_leg_identifier_node): New global.
7735 (init_decl_processing): Use `finit$' to initialize
7736 finit_identifier_node. Use `$finit$' to initialize
7737 finit_leg_identifier_node.
7738 * expr.c (expand_java_field_op): Use ID_FINIT_P.
7739 * java-tree.h (finit_identifier_node): Changed attached comment.
7740 (finit_leg_identifier_node): New declaration.
7741 (ID_FINIT_P): Take finit_identifier_node and
7742 finit_leg_identifier_node into account. This is a backward
7743 compatibility hack.
7744
7745 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
7746
7747 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
7748 Jan 6 2000 patch.
7749 (generate_bytecode_insns): Check `nargs' before emitting it.
7750 * verify.c (merge_type_state): Fixed typo.
7751 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
7752 generate_bytecode_{conditional,insns}.
7753
7754 2000-08-13 Anthony Green <green@redhat.com>
7755
7756 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
7757 for -pg builds).
7758
7759 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
7760
7761 * class.c (maybe_layout_super_class): Fixed indentation.
7762 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
7763 (java_check_methods): New function declaration.
7764 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
7765 instead of `str_ptr'.
7766 * jcf-write.c (generate_bytecode_insns): Emit number the of args
7767 of a `invokeinterface' at the right time.
7768 * parse.h (WFL_STRIP_BRACKET): New macro.
7769 (SET_TYPE_FOR_RESOLUTION): Use it.
7770 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
7771 (check_class_interface_creation): Don't check for cross package
7772 innerclass name clashes.
7773 (method_header): Behave properly if MDECL is `error_mark_node'.
7774 (method_declarator): Return `error_mark_node' if bogus current
7775 class.
7776 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
7777 (resolve_and_layout): New local `decl_type', set and used. Call
7778 java_check_methods.
7779 (java_check_methods): New method.
7780 (java_layout_classes): Use it.
7781 (resolve_qualified_expression_name): No EH check necessary in
7782 access$<n>.
7783 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
7784 `case' statement.
7785 (patch_assignment): Set DECL_INITIAL on integral final local.
7786
7787 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
7788
7789 * java-tree.h (flag_extraneous_semicolon): New extern.
7790 * lang-options.h: (-Wextraneous-semicolon): New option.
7791 * lang.c (flag_redundant): Fixed typo in leading comment.
7792 (flag_extraneous_semicolon): New global.
7793 (lang_decode_option): Set `flag_extraneous_semicolon' when
7794 -Wall. Decode `-Wextraneous-semicolon'.
7795 * parse.y (type_declaration:): Removed `SC_TK' hack, added
7796 `empty_statement' rule.
7797 (class_body_declaration): Likewise.
7798 (method_body:): Accept `;' as a method body.
7799 (static_initializer:): Removed `SC_TK' hack.
7800 (constructor_block_end:): Likewise.
7801 (empty_statement:): Report deprecated empty declaration. Fixes
7802 gcj/295
7803
7804 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7805
7806 * parse.y (build_dot_class_method_invocation): Changed parameter
7807 name to `type'. Build signature from `type' and convert it to a
7808 STRING_CST if it's an array.
7809 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
7810 to use `ref_type' directly.
7811
7812 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
7813
7814 * lang-options.h: Added a comma after the last element to avoid
7815 syntax errors when other languages define additional options.
7816
7817 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
7818
7819 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
7820 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
7821 (jc1): Link with $(BACKEND).
7822 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
7823
7824 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
7825
7826 * jvspec.c: Adjust type of second argument to
7827 lang_specific_driver, and update code as necessary.
7828
7829 * class.c (build_dtable_decl): Initialize dummy.
7830
7831 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7832
7833 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
7834 method bodies not to rule out discarding `<clinit>'; don't use
7835 <clinit> to initialize static fields with constant initializers.
7836
7837 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7838
7839 * gjavah.c (print_method_info): Added `synth' parameter. Skip
7840 synthetic methods.
7841 (method_synthetic): New global.
7842 (HANDLE_METHOD): Recognize synthetic method and tell
7843 `print_method_info' about it.
7844 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
7845 processing a synthetic method.
7846 * jcf-reader.c (skip_attribute): New function.
7847 ( skip_attribute): Likewise.
7848
7849 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7850
7851 * parse.y (build_outer_field_access): Fixed comments.
7852 (fix_constructors): Emit the initialization of this$<n> before
7853 calling $finit$.
7854 (resolve_qualified_expression_name): Build an access to `decl' if
7855 necessary.
7856
7857 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
7858
7859 * parse-scan.y (curent_class): Non longer const.
7860 (inner_qualifier, inner_qualifier_length): Deleted.
7861 (current_class_length): New global.
7862 (bracket_count): Fixed typo in leading comment.
7863 (anonymous_count): New global.
7864 (class_instance_creation_expression:): Handle anonymous classes.
7865 (anonymous_class_creation:): New rule.
7866 (push_class_context): Rewritten.
7867 (pop_class_context): Likewise.
7868 (INNER_QUALIFIER): Macro deleted.
7869 (report_class_declaration): call `push_class_context' when
7870 entering the function. `fprintf' format modified not to use
7871 INNER_QUALIFIER.
7872 (report_class_declaration): Assign `package_name' and
7873 `current_class' to NULL separately.
7874
7875 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
7876
7877 * expr.c (build_invokeinterface): Call layout_class_methods on
7878 target interface.
7879
7880 2000-07-27 Tom Tromey <tromey@cygnus.com>
7881 Anthony Green <green@cygnus.com>
7882 Alexandre Petit-Bianco <apbianco@cygnus.com>
7883
7884 * class.c (make_class_data): Create vtable for abstract classes.
7885 (get_dispatch_table): Changed to cope with abstract classes.
7886
7887 2000-07-27 Tom Tromey <tromey@cygnus.com>
7888
7889 * parse.y (patch_method_invocation): Don't reverse the argument
7890 list when dealing with anonymous class constructors. Fixed typo in
7891 comment.
7892
7893 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
7894
7895 * parse.y (build_alias_initializer_parameter_list): Reverse
7896 crafted list when building aliases for anonymous class
7897 constructors.
7898
7899 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7900
7901 * parse.y (jdep_resolve_class): Don't bother checking potential
7902 innerclass access if `decl' is NULL.
7903 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
7904 WFL.
7905
7906 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7907
7908 * parse.c: Remove (again.)
7909
7910 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
7911
7912 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
7913 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
7914 outside the `if' statement, alias to innerclass removed, `decl'
7915 used to mark the class complete.
7916
7917 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
7918
7919 * parse.y (simple_name:): Fixed typo in error message.
7920
7921 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
7922
7923 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
7924 or its first operand can be error marks.
7925
7926 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
7927
7928 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
7929 * parse.y (method_header): Likewise.
7930
7931 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
7932
7933 * parse.y (process_imports): Consider that one might be trying to
7934 import an innerclass. Fixes gcj/254
7935
7936 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
7937
7938 * parse.y (find_as_inner_class): Handle the case where the
7939 enclosing context of an innerclass has been loaded as bytecode.
7940
7941 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
7942
7943 * parse.y (simple_name:): Reject `$' in type names.
7944 (resolve_type_during_patch): Use `type' as a second
7945 argument to resolve_no_layout. Fixes gcj/257.
7946
7947 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
7948
7949 * parse.y (find_most_specific_methods_list): Select the only
7950 non-abstract method even if max has been set.
7951 Fixes gcj/285, gcj/298.
7952
7953 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
7954
7955 * lang-specs.h: Added %(jc1) to java compiler options.
7956
7957 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
7958
7959 * .cvsignore: New file.
7960
7961 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7962
7963 * parse.y (not_accessible_p): Access granted to innerclasses
7964 (indirectly) extending the reference type. Fixes gcj/249.
7965
7966 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7967
7968 * parse.y (patch_method_invocation): Fixed comment.
7969 (maybe_use_access_method): Build this$<n>s to the context of the
7970 target method, or a type that extends it. Fixes gcj/242.
7971
7972 2000-07-13 Mark Mitchell <mark@codesourcery.com>
7973
7974 * parse.c: Remove.
7975
7976 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7977
7978 * parse.y (fold_constant_for_init): Avoid bullish conversion.
7979
7980 2000-07-13 Tom Tromey <tromey@cygnus.com>
7981
7982 * lang-specs.h: Added %{I*}.
7983
7984 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
7985
7986 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
7987
7988 2000-07-12 Mark Mitchell <mark@codesourcery.com>
7989
7990 * parse-scan.c: Remove.
7991
7992 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
7993
7994 * class.c (set_super_info): Handled protected inner classes.
7995 (common_enclosing_context_p): Bail early if arguments aren't both
7996 inner classes.
7997 (get_access_flags_from_decl): Handle private and protected inner
7998 classes.
7999 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
8000 (CLASS_PROTECTED): Likewise.
8001 (struct lang_type): New bitfield `poic'.
8002 * parse.y (jdep_resolve_class): Call check_inner_class_access on
8003 inner classes only.
8004 (check_inner_class_access): Renamed arguments, added
8005 comments. Handles protected inner classes (fixes gcj/225)
8006 (not_accessible_p): Fixed comments. Avoid handling inner classes.
8007
8008 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8009
8010 * parse.y (resolve_qualified_expression_name): Verify qualified
8011 access to `this'. Fixes gcj/239.
8012
8013 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8014
8015 * jcf-write.c (generate_classfile): Don't install ConstantValue
8016 for null pointers.
8017
8018 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8019
8020 * parse.y (resolve_qualified_expression_name): Handle inner class
8021 access. Fixes gcj/256.
8022
8023 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8024
8025 * jcf-write.c (generate_classfile): Properly install the
8026 ConstantValue attribute and the initial value constant pool index
8027 on string constants.
8028 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
8029 class files.
8030
8031 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
8032
8033 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
8034 construct.
8035 * parse.y (find_as_inner_class): Fixed typo.
8036 (do_resolve_class): Explore enclosing contexts when searching for
8037 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
8038 (check_inner_class_access): Check `decl' which can be null in case
8039 of previous errors.
8040
8041 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8042
8043 * java-tree.h (java_debug_context): Declared `extern'.
8044 (safe_layout_class): Likewise.
8045 * parse.y (resolve_field_access): Field must be `static' in order
8046 to be replaced by its initial value. Added comments.
8047 (find_applicable_accessible_methods_list): Fixed typo.
8048 (find_most_specific_methods_list): Methods found in innerclasses
8049 take over methods founds in the enclosing contexts.
8050 (java_complete_tree): Loosen restrictions on the type of DECLs
8051 that can be replaced by their initialization values.
8052 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
8053
8054 2000-07-05 Tom Tromey <tromey@cygnus.com>
8055
8056 * Make-lang.in (PARSE_DIR): New macro.
8057 (PARSE_RELDIR): Likewise.
8058 (PARSE_C): Likewise.
8059 (PARSE_SCAN_C): Likewise.
8060 ($(PARSE_C)): New target.
8061 ($(PARSE_SCAN_C)): Likewise.
8062 (SET_BISON): New macro.
8063 (BISONFLAGS): Likewise.
8064 (JAVABISONFLAGS): Likewise.
8065
8066 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
8067
8068 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
8069 argument on the first pass for CNI as well as JNI.
8070 (print_method_info): Set up method name on the first pass only.
8071
8072 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8073
8074 * parse.y (parser_qualified_classname): Removed parameter
8075 `is_static'.
8076 (create_interface): Removed first passed parameter to
8077 parser_qualified_classname.
8078 (create_class): Likewise. Don't install alias on static
8079 innerclasses. Fixes gcj/275.
8080
8081 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8082
8083 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
8084 debugable statement with empty_stmt_node. Fixes gcj/272
8085
8086 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8087
8088 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
8089 gcj/271.
8090
8091 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8092
8093 * jcf-write.c (push_long_const): Appropriately cast short negative
8094 constant to jword.
8095
8096 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8097
8098 * parse.y (verify_constructor_super): Use loop variable
8099 `m_arg_type' initialized with `mdecl_arg_type'.
8100
8101 2000-06-29 Tom Tromey <tromey@cygnus.com>
8102
8103 * parse.y (resolve_field_access): Handle case where `type_found'
8104 is NULL.
8105
8106 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
8107
8108 * expr.c (lookup_field): The same field can be found through two
8109 different interface. Don't declare it ambiguous in that case.
8110
8111 2000-06-27 Tom Tromey <tromey@cygnus.com>
8112
8113 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
8114 follows \r, then unget it at a lower level.
8115
8116 2000-06-26 Tom Tromey <tromey@cygnus.com>
8117
8118 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
8119 java_complete_tree.
8120
8121 2000-06-25 Tom Tromey <tromey@cygnus.com>
8122
8123 * parse.y (for_statement): Wrap expression in a WFL if it is a
8124 constant. For PR gcj/268.
8125
8126 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
8127
8128 * parse.y (do_resolve_class): Minor optimiztion in the package
8129 list search. Removed unnecessary test and return statement.
8130 (valid_ref_assignconv_cast_p): Order of arguments to
8131 enclosing_context_p fixed.
8132
8133 2000-06-24 Tom Tromey <tromey@cygnus.com>
8134
8135 * expr.c (lookup_field): Print error and return error_mark_node if
8136 field reference is ambiguous.
8137
8138 * parse.y (check_abstract_method_definitions): Also check if
8139 `other_method' is abstract.
8140
8141 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
8142
8143 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
8144 classes.
8145 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
8146 (struct lang_type): New field `pic'.
8147 (CLASS_PRIVATE): New macro.
8148 * parse.y (check_inner_class_access): New function.
8149 (jdep_resolve_class): Call it.
8150
8151 2000-06-23 Tom Tromey <tromey@cygnus.com>
8152
8153 * parse.y (patch_incomplete_class_ref): Initialize the returned
8154 class. For PR gcj/260.
8155
8156 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
8157
8158 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
8159
8160 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
8161
8162 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
8163 Java specific checks.
8164 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
8165 screened by DECL_P.
8166 * java-tree.def (CASE_EXPR): Marked 'e'.
8167 (DEFAULT_EXPR): Likewise.
8168 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
8169 screened by DECL_P.
8170 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
8171 Java specific checks.
8172 (generate_bytecode_insns): Test try_block for BLOCK before using
8173 BLOCK_EXPR_BODY.
8174 * parse.y (build_wfl_wrap): Added `location' argument. Set
8175 EXPR_WFL_LINECOL accordingly.
8176 (dim_expr:): Wrap constants with WFLs.
8177 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
8178 (resolve_package): Check for `stmt' not being a BLOCK before
8179 building a debuggable statement with it.
8180 (make_qualified_primary): Added extra parameter to build_wfl_wrap
8181 invocation.
8182 (resolve_field_access): Make sure `decl' is a DECL before treating
8183 it as such.
8184 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
8185 IDENTIFIER_NODE before treating it as such.
8186 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
8187 treating it as such.
8188 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
8189 to be applied only on non array types.
8190
8191 2000-06-16 Per Bothner <per@bothner.com>
8192
8193 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
8194 define in terms of DECL_RESULT, as that fails when --enable-checking.
8195
8196 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8197
8198 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
8199 types the same in comparison.
8200 (CHECK_OP): Add static prototype.
8201
8202 2000-06-13 Jakub Jelinek <jakub@redhat.com>
8203
8204 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
8205 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
8206 * parse.c: Rebuilt.
8207
8208 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8209
8210 * decl.c (create_primitive_vtable): Prototype.
8211
8212 * jcf-write.c (generate_bytecode_insns): Initialize variable
8213 `saved_context'.
8214
8215 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
8216
8217 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
8218
8219 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
8220 to track searched classes, and do not search the same class more than
8221 once. Call find_applicable_accessible_methods_list on immediate
8222 superclass, instead of search_applicable_method_list on all ancestors.
8223 Fix for PR gcj/238.
8224
8225 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
8226
8227 * parse.y (register_fields): Permit static fields in inner classes
8228 if they are final. Fix for PR gcj/255.
8229
8230 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
8231
8232 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
8233 * parse.y (find_in_imports): Returned type changed to void,
8234 leading comment fixed.
8235 (register_package): New function.
8236 (qualify_and_find): Likewise.
8237 (package_declaration:): Use `register_package'.
8238 (single_type_import_declaration:): Removed local variable
8239 `node'. Added missing `;' for consistency.
8240 (type_import_on_demand_declaration:): Use `chainon' to link new
8241 entries.
8242 (lookup_field_wrapper): Lookup local variables defined in outer
8243 contexts first.
8244 (java_complete_class): Don't reverse the list of imported on demand.
8245 (do_resolve_class): Reorganized. Removed local variable
8246 `original_name'. Call `qualify_and_find' with the current package
8247 name, invoke `find_in_imports_on_demand' right after. Call
8248 `qualify_and_find' with the packages we've seen so far. Fixed
8249 operations numbering in comments.
8250 (java_expand_class): Don't reverse `package_list'.
8251 (find_most_specific_methods_list): New local variables `abstract'
8252 and `candidates'. Use them to pick the right method.
8253
8254 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
8255
8256 * parse.y (check_modifiers_consistency): Don't subtract out
8257 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
8258
8259 2000-06-04 Philipp Thomas <pthomas@suse.de>
8260
8261 * Makefile.in (INTLLIBS): New.
8262 (LIBS): Add above.
8263 (DEPLIBS): Ditto.
8264
8265 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
8266
8267 * class.c (get_dispatch_table): Build the vtable dummy entry list
8268 element with a null purpose. Fixed leading comment.
8269 (build_dtable_decl): Build an accurate dtable type when appropriate
8270 and use it.
8271
8272 2000-06-02 Richard Henderson <rth@cygnus.com>
8273
8274 * lang.c (lang_get_alias_set): New.
8275
8276 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
8277
8278 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
8279 before using it as the accessed field.
8280
8281 2000-05-31 Tom Tromey <tromey@cygnus.com>
8282
8283 * java-tree.h (boolean_array_vtable, byte_array_vtable,
8284 char_array_vtable, short_array_vtable, int_array_vtable,
8285 long_array_vtable, float_array_vtable, double_array_vtable):
8286 Declare.
8287 * expr.c (get_primitive_array_vtable): New function.
8288 (create_primitive_vtable): New function.
8289 (java_lang_expand_expr): Enable code to statically generate
8290 arrays.
8291 * decl.c (init_decl_processing): Create primitive vtables.
8292 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
8293 short_array_vtable, int_array_vtable, long_array_vtable,
8294 float_array_vtable, double_array_vtable): Define.
8295
8296 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
8297
8298 * java/parse.y (find_applicable_accessible_methods_list):
8299 Don't add an uninitialized value to the list.
8300
8301 2000-05-25 Tom Tromey <tromey@cygnus.com>
8302
8303 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
8304 when trying to see if field's class should be initialized. Always
8305 initialize field's declaring class, not qualified class.
8306 For PR gcj/162.
8307
8308 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
8309 `wfl_operator', to maybe_build_primttype_type_ref.
8310 Fixes PR gcj/235.
8311
8312 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
8313
8314 * parse.y (patch_method_invocation): Don't try to lookup methods
8315 in primitive types.
8316
8317 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
8318
8319 * parse.y (resolve_field_access): Call the appropriate <clinit>
8320 before accessing the length of a static array. Craft a decl for
8321 the field while its time. Fixes PR gcj/129.
8322
8323 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8324
8325 * parse.y (resolve_package): Correctly set `*next' (was off by
8326 one.)
8327 (resolve_qualified_expression_name): Fixed comment.
8328
8329 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
8330
8331 * jcf-parse.c (jcf_parse_source): Reset current_class and
8332 current_function_decl to NULL before parsing a new file.
8333
8334 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
8335
8336 * parse.y (block_end:): If the collected block doesn't feature a
8337 statement, insert an empty statement.
8338
8339 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8340
8341 * parse.y (maybe_yank_clinit): New function.
8342 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
8343 end of the list of methods belonging to a class.
8344 (java_complete_expand_method): Check whether <clinit> is really
8345 necessary and expand it accordingly.
8346
8347 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8348
8349 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
8350 processed by the method's switch statement.
8351
8352 2000-05-19 Tom Tromey <tromey@cygnus.com>
8353
8354 * java-tree.h: Added init state enum.
8355 * decl.c (emit_init_test_initialization): Initialize class
8356 initialization check variable by looking at class' state.
8357
8358 2000-05-19 Tom Tromey <tromey@cygnus.com>
8359
8360 * java-tree.h (build_instanceof): Declare.
8361 (build_get_class): Declare.
8362 * parse.y (patch_binop): Use build_instanceof.
8363 * expr.c (build_instanceof): New function. If class is final,
8364 don't make a function call.
8365 (expand_java_INSTANCEOF): Use it.
8366 (build_get_class): New function.
8367
8368 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
8369
8370 * jcf-write.c (generate_classfile): Scan the source_file for
8371 slashes with the right pointer variable.
8372
8373 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
8374
8375 * lang.c (lang_decode_option): Update -Wunused flags by calling
8376 set_Wunused.
8377 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
8378
8379 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
8380
8381 * check_init.c (check_init): Constify local char *.
8382 * class.c (push_class): Constify local char *.
8383 * java_tree.h: Update prototypes.
8384 * jcf-io.c (open_class): Constify filename parameter and
8385 return value.
8386 (find_class): Remove redundant string copy. Cast return from
8387 open_class.
8388 * jcf-parse.c (read_class, parse_class_file, yyparse):
8389 Constify local char *.
8390 * jcf-write.c (generate_bytecode_insns, generate_classfile):
8391 Constify local char *.
8392 * jcf.h (JCF): Constify filename and classname.
8393 (JCF_FINISH): Cast args to FREE to char * when appropriate.
8394 * lang.c (init_parse): Constify parameter and return value.
8395 * lex.c (java_get_line_col): Constify filename parameter.
8396 * parse.h: Constify parser_ctxt.filename. Update prototypes.
8397 * parse.y (java_parser_context_suspend,
8398 issue_warning_error_from_context, safe_layout_class): Constify
8399 local char *.
8400 * parse.c: Regenerate.
8401
8402 2000-05-08 Tom Tromey <tromey@cygnus.com>
8403
8404 * expr.c (build_jni_stub): Cache the result of
8405 _Jv_LookupJNIMethod.
8406
8407 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8408
8409 * decl.c (predef_filenames_size): Now 7.
8410 (predef_filenames): New seventh entry.
8411
8412 2000-05-04 Tom Tromey <tromey@cygnus.com>
8413
8414 * boehm.c (mark_reference_fields): Don't mark RawData fields.
8415 Keep track of when we've seen a reference field after a
8416 non-reference field.
8417 (get_boehm_type_descriptor): Handle case where we see
8418 non-reference fields but no trailing reference field.
8419 * decl.c (rawdata_ptr_type_node): Define.
8420 (init_decl_processing): Initialize rawdata_ptr_type_node.
8421 * java-tree.h (rawdata_ptr_type_node): Declare.
8422
8423 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8424
8425 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
8426 specifiers in calls to fprintf.
8427
8428 2000-05-03 Andrew Haley <aph@cygnus.com>
8429
8430 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
8431
8432 * javaop.h (WORD_TO_INT): New function.
8433 (IMMEDIATE_s4): Use WORD_TO_INT.
8434 * jcf.h (JPOOL_INT): Ditto.
8435
8436 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
8437 separator.
8438
8439 2000-04-19 Tom Tromey <tromey@cygnus.com>
8440
8441 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
8442 on native function.
8443 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
8444 JNI methods.
8445 * expr.c (build_jni_stub): New function.
8446 * lang-specs.h: -fjni and -femit-class-file are incompatible.
8447 * parse.c: Rebuilt.
8448 * parse.y (java_complete_expand_methods): Expand a native method
8449 and call build_jni_stub if -fjni given.
8450 * lang-options.h: Document -fjni.
8451 * lang.c (flag_jni): New global.
8452 (lang_f_options): Added `jni' entry.
8453 * java-tree.h (soft_lookupjnimethod_node,
8454 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
8455 Declare.
8456 (flag_jni): Declare.
8457 (build_jni_stub): Declare.
8458 (struct lang_decl): Added `native' flag.
8459 (METHOD_NATIVE): Redefined to use `native' field of lang specific
8460 structure.
8461 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
8462 soft_jnipopsystemframe_node): New globals.
8463 (init_decl_processing): Set them. _Jv_InitClass only takes one
8464 argument.
8465
8466 * java-tree.def: Put into `C' mode.
8467
8468 2000-04-27 Tom Tromey <tromey@cygnus.com>
8469
8470 Fix for PR gcj/2:
8471 * expr.c (expand_invoke): Generate check to see if object pointer
8472 is null in nonvirtual invocation case.
8473 * java-tree.h (soft_nullpointer_node): Declare.
8474 * decl.c (soft_nullpointer_node): New global.
8475 (init_decl_processing): Initialize soft_nullpointer_node.
8476 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
8477 or `private' methods.
8478 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
8479
8480 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
8481
8482 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
8483 from <clinit>
8484
8485 2000-04-26 Tom Tromey <tromey@cygnus.com>
8486
8487 * zextract.c (find_zip_file_start): New function.
8488 (read_zip_archive): Use it.
8489
8490 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
8491
8492 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
8493
8494 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8495
8496 * class.c (common_enclosing_context_p): New function.
8497 * java-tree.h (common_enclosing_context_p): Added prototype.
8498 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
8499 classes sharing an outer context with the current instance.
8500 * parse.y (build_access_to_thisn): Fixed leading comment.
8501 (verify_constructor_super): New local `supper_inner'. Skip
8502 enclosing context argument in the case of inner class constructors.
8503 (patch_method_invocation): Insert proper context as second
8504 parameter to pure inner class constructor super invocations.
8505
8506 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8507
8508 * parse.y (end_class_declaration): Reset the interface number
8509 counter.
8510
8511 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8512
8513 * parse.y (source_start_java_method): Deleted unnecessary code.
8514 (patch_method_invocation): Fixed comment.
8515
8516 2000-04-24 Robert Lipe <robertlipe@usa.net>
8517
8518 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
8519
8520 2000-04-23 Tom Tromey <tromey@cygnus.com>
8521
8522 * boehm.c (mark_reference_fields): Use int_byte_position.
8523
8524 2000-04-22 Tom Tromey <tromey@cygnus.com>
8525
8526 * boehm.c (mark_reference_fields): Only call byte_position on
8527 non-static fields.
8528
8529 2000-04-22 Tom Tromey <tromey@cygnus.com>
8530
8531 * boehm.c (mark_reference_fields): Added `last_view_index'
8532 argument. Use DECL_FIELD_OFFSET to determine field's offset.
8533
8534 2000-04-20 Mo DeJong <mdejong@cygnus.com>
8535
8536 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
8537 * parse.y (check_class_interface_creation): Fixed comments. Select
8538 permitted modifiers for (inner) interfaces. Changed error message
8539 to report rejected modifiers used with local classes.
8540
8541 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
8542
8543 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
8544 of directly inherited type considered in scope.
8545 * parse.y (do_resolve_class): Search inherited classes for inner
8546 classes.
8547
8548 2000-04-20 Tom Tromey <tromey@cygnus.com>
8549
8550 * parse.y (not_accessible_p): Use member's class, not current
8551 class, when doing inheritance check for protected reference.
8552 Fixes PR gcj/124.
8553
8554 2000-04-20 Jason Schroeder <shrode@subnature.com>
8555
8556 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
8557
8558 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
8559
8560 * parse.y (lookup_field_wrapper): Search for final local aliases.
8561 (resolve_expression_name): Let lookup_field_wrapper search for
8562 final local aliases. Force the value of `name' if one is found.
8563 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
8564 an expression name. Fixed comments.
8565
8566 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
8567
8568 * parse.y (yyerror): `msg' can be null, don't use it in that case.
8569
8570 2000-04-19 Tom Tromey <tromey@cygnus.com>
8571
8572 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
8573
8574 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
8575
8576 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
8577
8578 2000-04-18 Tom Tromey <tromey@cygnus.com>
8579
8580 PR gcj/211:
8581 * gjavah.c (utf8_cmp): Changed return value.
8582 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
8583 result.
8584 (cxx_keywords): New global.
8585 (get_field_name): Handle new result of cxx_keyword_subst.
8586 (print_method_info): Likewise.
8587
8588 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
8589
8590 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
8591 with a newline, for CNI.
8592 (print_stub_or_jni): Print a space or newline before method name for
8593 CNI as well as JNI.
8594 (print_cxx_classname): Don't write leading "::" in CNI stub method.
8595 (process_file): Include gcj/cni.h if generating CNI stubs.
8596
8597 2000-04-16 Tom Tromey <tromey@cygnus.com>
8598
8599 * gjavah.c (decompile_method): Use print_field_name.
8600 Fixes PR gcj/205.
8601
8602 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
8603
8604 * parse.y (java_expand_classes): Reverse the package list once.
8605 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
8606 reduction.
8607 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
8608 the `==' and `!=' operators.
8609
8610 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8611
8612 * jcf-write.c (generate_bytecode_insns): At invocation time,
8613 always relate an interface method to the type of its selector.
8614
8615 2000-04-05 Tom Tromey <tromey@cygnus.com>
8616
8617 Fix for PR gcj/2:
8618 * expr.c (expand_invoke): Generate check to see if object pointer
8619 is null in nonvirtual invocation case.
8620 * java-tree.h (soft_nullpointer_node): Declare.
8621 * decl.c (soft_nullpointer_node): New global.
8622 (init_decl_processing): Initialize soft_nullpointer_node.
8623 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
8624 or `private' methods.
8625 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
8626
8627 2000-04-05 Tom Tromey <tromey@cygnus.com>
8628
8629 Fix for PR gcj/140:
8630 * parse.y (check_final_assignment): Recognize assignments to the
8631 `length' field of an array when generating class files.
8632
8633 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8634
8635 * class.c (decl_hash): Prototype removed.
8636 (decl_compare): Likewise.
8637
8638 2000-04-05 Tom Tromey <tromey@cygnus.com>
8639
8640 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
8641 * parse.y (check_modifiers_consistency): Check for final/volatile
8642 clash. Fixes PR gcj/164.
8643
8644 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8645
8646 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
8647 made global.
8648 (java_hash_compare_tree_node): Renamed from `decl_compare, made
8649 global.
8650 (add_method_1): Use `java_hash_hash_tree_node' and
8651 `java_hash_compare_tree_node'.
8652 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
8653 (java_hash_compare_tree_node): Likewise.
8654 * parse.y (find_applicable_accessible_methods_list): Create,
8655 delete and use a hash table to remember already searched interfaces.
8656
8657 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
8658
8659 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
8660 with latest entry.
8661
8662 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8663
8664 * boehm.c (mark_reference_fields, set_bit): Prototype.
8665 (set_bit): Un-ANSI-fy definition.
8666
8667 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
8668 Prototype.
8669
8670 * decl.c (emit_init_test_initialization): Likewise.
8671
8672 * gjavah.c (jni_print_char): Likewise.
8673
8674 * parse.y (create_new_parser_context): Likewise.
8675
8676 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
8677
8678 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
8679 patch missing hunk. Fixed indentation.
8680
8681 2000-03-30 Tom Tromey <tromey@cygnus.com>
8682
8683 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
8684 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
8685
8686 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
8687
8688 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8689 when negative *before* using it as an array index.
8690 * ChangeLog: Fixed typo.
8691
8692 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
8693
8694 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8695 to 0 when it reaches -1.
8696
8697 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
8698
8699 * jcf-parse.c (get_constant): Properly cast `num' during the
8700 invocation of `add_double'.
8701 * jcf-write.c (push_long_const): Properly cast `lo' before
8702 comparing it to short bounds.
8703 * parse-scan.y (interface_declaration:): Rule re-arrange so that
8704 `interface_body:' is reduced after the current interface is
8705 pushed.
8706
8707 2000-03-26 Tom Tromey <tromey@cygnus.com>
8708
8709 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
8710 Java-specific `-f' option.
8711
8712 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8713
8714 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
8715 Adjust order of making types.
8716 Make bitsize_*_node values.
8717
8718 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8719
8720 * class.c (make_field_value): Use byte_position.
8721 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
8722 (java_array_data_offset): Likewise.
8723 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
8724 bzero call.
8725
8726 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
8727
8728 * parse.y (check_abstract_method_definitions): New local
8729 `end_type_reached'. Make sure we also consider `end_type'.
8730 (java_check_abstract_method_definitions): Make sure we eventually
8731 consider `java.lang.Object'.
8732 (maybe_use_access_method): Don't use access method if not in the
8733 context of a pure inner class or if the method's context is right.
8734 (find_applicable_accessible_methods_list): New static flag
8735 `object_done'. Don't search abstract classes as interfaces. Fixed
8736 indentation. Fixed the `java.lang.Object' only search. Search
8737 class interface(s) first, then fully search enclosing contexts.
8738 (find_most_specific_methods_list): Pick the closest candidate when
8739 they're all abstract.
8740
8741 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
8742
8743 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8744 properly initialize `finished_label'. Don't emit gotos for empty
8745 try statements.
8746
8747 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8748
8749 * except.c (emit_handlers): Clear catch_clauses_last.
8750
8751 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8752
8753 * parse.y (check_method_types_complete): New function.
8754 (create_class): Reset anonymous class counter only when seeing an
8755 non inner classe.
8756 (java_complete_class): JDEP_METHOD: Don't recompute signature
8757 if incomplete.
8758
8759 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8760
8761 * class.c (build_static_ref): Fixed indentation in comment.
8762 * java-tree.def (TRY_EXPR): Fixed typo in name.
8763 (CLASS_LITERAL): Likewise.
8764 * java-tree.h: (TYPE_DOT_CLASS): New macro.
8765 (struct lang_type): New field `dot_class'.
8766 * jcf-write.c (generate_bytecode_insns): Fixed error message.
8767 (generate_classfile): Method `class$' is synthetic.
8768 * parse.y (build_do_class_method): New function.
8769 (build_dot_class_method_invocation): Likewise.
8770 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
8771 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
8772 (qualify_ambiguous_name): Likewise.
8773 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
8774 (build_try_statement): Fixed leading comment.
8775
8776 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8777
8778 * class.c (make_field_value): Properly handle sizes.
8779 (get_dispatch_vector): Use tree_low_cst and host_integerp.
8780 (layout_class_method): Count using trees.
8781 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
8782 * expr.c (java_array_data_offset): Use int_bit_position.
8783 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
8784 (build_invokevirtual): Use tree_low_cst and do computations with trees.
8785
8786 2000-03-16 Tom Tromey <tromey@cygnus.com>
8787
8788 * lang.c (flag_hash_synchronization): New global.
8789 (lang_f_options): Added `hash-synchronization'.
8790 * lang-options.h: Mention -fhash-synchronization.
8791 * java-tree.h (flag_hash_synchronization): Declare.
8792 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
8793 hash table synchronization is disabled.
8794 * decl.c (init_decl_processing): Only push `sync_info' value when
8795 hash table synchronization is disabled.
8796 * class.c (make_class_data): Only push `sync_info' field when hash
8797 table synchronization is disabled. Removed dead code.
8798
8799 2000-03-16 Tom Tromey <tromey@cygnus.com>
8800
8801 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
8802
8803 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
8804
8805 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
8806 classes.
8807 * parse.y (patch_method_invocation): Handle anonymous classes
8808 creation in static context.
8809
8810 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
8811
8812 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
8813 * parse.y (resolve_qualified_expression_name): Use it.
8814 (patch_method_invocation): Likewise.
8815
8816 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
8817
8818 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
8819 depending on the type of dependency which dictates what the
8820 current class is.
8821 (unresolved_type_p): Resolved types limited to the current class.
8822
8823 2000-03-15 Tom Tromey <tromey@cygnus.com>
8824
8825 * decl.c (init_decl_processing): Set type of `sync_info' to be
8826 pointer to Object.
8827
8828 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
8829 Correctly compute bit number for current slot. Zero `high' and
8830 `low' in DS_LENGTH case. Don't skip inherited fields. Use
8831 mark_reference_fields.
8832 (mark_reference_fields): New function.
8833
8834 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
8835
8836 * parse.y (register_incomplete_type): Fixed initialization of
8837 JDEP_ENCLOSING.
8838
8839 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
8840
8841 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
8842 static globals.
8843 (push_class_context, pop_class_context): New function.
8844 (class_body:): Call pop_class_context.
8845 (interface_body:): Likewise.
8846 (INNER_QUALIFIER): New macro.
8847 (report_class_declaration): Changed output format and use
8848 INNER_QUALIFIER. Call push_class_context.
8849
8850 2000-02-14 Andrew Haley <aph@cygnus.com>
8851
8852 * check-init.c (check_init): Add new cases for unary and binary
8853 tree nodes.
8854
8855 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8856
8857 * parse.y (resolve_package): Set `next' once a type name has been
8858 progressively discovered.
8859 (resolve_qualified_expression_name): Propagate resolution only if
8860 there are remaining qualifiers. Take into account `q' might have
8861 been cleared after re-qualification.
8862 * parse.y (patch_method_invocation): New local `resolved'.
8863 Section dealing with qualified expression rewritten to use
8864 resolve_field_access.
8865
8866 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8867
8868 * parse.h (PUSH_CPC): Fixed indentation.
8869 (DEBUG_CPC): New macro.
8870 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
8871 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
8872 * parse.y (class_body_declaration:): Use
8873 SET_CPC_INSTANCE_INITIALIZER_STMT.
8874 (method_declaration:): Check for null current_function_decl.
8875 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
8876 (java_parser_context_pop_initialized_field): Better handling of
8877 empty lists.
8878 (maybe_make_nested_class_name): Mark nested class name as
8879 qualified when necessary.
8880 (end_class_declaration): Don't call java_parse_context_resume when
8881 one or more error occurred.
8882 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
8883 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
8884 SET_CPC_INITIALIZER_STMT.
8885 (method_header): Check for inner classes declaring static methods.
8886 (resolve_qualified_expression_name): Handle situation where `this'
8887 is implied.
8888
8889 2000-03-13 Hans Boehm <boehm@acm.org>
8890
8891 * typeck.c (build_prim_array_type): Correctly set the high word too.
8892
8893 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
8894
8895 * parse.y (java_complete_expand_methods): Leave <clinit> out of
8896 ordinary methods.
8897 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
8898 list of methods for interfaces.
8899
8900 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8901
8902 * parse.y (qualify_ambiguous_name): Properly handle expressions
8903 using `null'.
8904
8905 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8906
8907 * parse.y (check_final_assignment): Extended to process
8908 COMPOUND_EXPR.
8909 (patch_assignment): Have check_final_assignment called only once.
8910
8911 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8912
8913 * java-tree.h (IS_INIT_CHECKED): New flag.
8914 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
8915 * parse.y (patch_string): Call force_evaluation_order on the
8916 completed string concatenation tree.
8917 * expr.c (force_evaluation_order): Call force_evaluation_order on
8918 function's arguments too.
8919
8920 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8921
8922 * decl.c (emit_init_test_initialization): Mark KEY as unused.
8923 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8924 (build_anewarray): Likewise.
8925 * parse.y (patch_newarray): Likewise.
8926 * parse.c: Regenerated.
8927
8928 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
8929
8930 * decl.c (init_decl_processing): Added new class fields `depth',
8931 `ancestors', and `idt' to class_type_node. Use
8932 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
8933 * class.c (make_class_data): Push initial values for new fields.
8934 * java-tree.h: Updated prototype for `build_invokeinterface'.
8935 * expr.c (build_invokeinterface): Changed parameters to accept
8936 `method' tree. Calculate index of `method' in its declaring
8937 interface. Build call to _Jv_LookupInterfaceMethodIdx.
8938 (expand_invoke): Call `build_invokeinterface' with new parameters.
8939 * parse.y (patch_invoke): Call `build_invokeinterface' with new
8940 parameters.
8941
8942 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
8943
8944 * typeck.c (lookup_do): Search superinterfaces first
8945 when looking up an interface method. From Godmar Back
8946 <gback@cs.utah.edu>
8947
8948 2000-03-06 Tom Tromey <tromey@cygnus.com>
8949
8950 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
8951
8952 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
8953
8954 * java-tree.h (lookup_argument_method2): Declared.
8955 (safe_layout_class): Prototype moved from parse.h.
8956 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
8957 * parse.y (java_check_regular_methods): Local `super_class' gone.
8958 Call lookup_argument_method2 instead of lookup_argument_method.
8959 Perform modifier match for methods found declared in implemented
8960 interfaces. Fixed indentation problem. Overriding/hiding error
8961 report to take place only for methods found in classes.
8962 * typeck.c (lookup_argument_method): Changed leading
8963 comment. Re-written by calling lookup_do.
8964 (lookup_argument_method2): New function.
8965 (lookup_java_method): Re-written by calling lookup_do.
8966 (lookup_do): New function.
8967
8968 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
8969
8970 * check-init.c (check_init): Removed dead code. Handle (blank)
8971 final variables.
8972 * parse.y (declare_local_variables): New local `final_p', set it
8973 and use it to initialize LOCAL_FINAL.
8974 (check_final_assignment): Only check FIELD_DECLs.
8975
8976 2000-02-17 Tom Tromey <tromey@cygnus.com>
8977
8978 * Makefile.in (JAVA_OBJS): Added boehm.o.
8979 (boehm.o): New target.
8980 * Make-lang.in (JAVA_SRCS): Added boehm.c.
8981 * java-tree.h (flag_use_boehm_gc): Declare.
8982 (get_boehm_type_descriptor): Declare.
8983 * lang.c (lang_f_options): Added `use-boehm-gc'.
8984 (flag_use_boehm_gc): New global.
8985 * lang-options.h: Added -fuse-boehm-gc.
8986 * boehm.c: New file.
8987 * class.c (get_dispatch_table): If class uses a Boehm type
8988 descriptor, put it in the vtable.
8989 (make_class_data): Removed dead code.
8990
8991 2000-03-03 Per Bothner <per@bothner.com>
8992
8993 * decl.c (init_decl_processing): Initialize sizetype properly.
8994
8995 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8996
8997 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
8998 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
8999 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
9000 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
9001 (jcf_parse): New local `current'. Load innerclasses seen in outer
9002 context being processed.
9003 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
9004 * jcf-write.c (append_innerclasses_attribute): New function.
9005 (append_innerclasses_attribute_entry): Likewise.
9006 (get_access_flags): Handle static classes. Set anonymous and local
9007 classes to be private.
9008 (generate_classfile): Attribute count adjusted. Call
9009 append_innerclasses_attribute.
9010 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
9011 PURE_INNER_CLASS_TYPE_P.
9012 * parse.y (parser_qualified_classname): New parameter `is_static',
9013 produce non qualified name accordingly.
9014 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
9015 (create_interface): Added argument to parser_qualified_classname.
9016 (create_class): Added argument to parser_qualified_classname. Setup
9017 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
9018 (add_inner_class_fields): Fixed indentation.
9019 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
9020 (method_declarator): Fixed typo in comment.
9021 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
9022 (build_current_thisn): Likewise.
9023 (patch_method_invocation): Likewise.
9024
9025 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
9026
9027 * decl.c (current_function_decl): Move to toplev.c.
9028
9029 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9030
9031 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
9032 (DECL_BIT_INDEX): Use underlying representation.
9033 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
9034
9035 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9036
9037 * expr.c (build_java_ret): Pass proper type to size_binop.
9038
9039 2000-02-25 Anthony Green <green@cygnus.com>
9040
9041 * expr.c (build_class_init): Mark the decl to be ignored by
9042 check_init.
9043 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
9044 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
9045 * class.c (init_test_hash_newfunc): New function.
9046 (decl_hash): New function.
9047 (decl_compare): New function.
9048 * decl.c (emit_init_test_initialization): New function.
9049 (complete_start_java_method): Traverse the init test hashtable,
9050 calling emit_init_test_initialization.
9051 (always_initialize_class_p): Define.
9052 * expr.c (build_class_init): Use initialization tests when
9053 emitting class initialization code.
9054 (always_initialize_class_p): Declare.
9055 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
9056 1.
9057 * java-tree.h: Include hash.h.
9058 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
9059 (struct lang_decl): Add init_test_table field.
9060 (init_test_hash_entry): Define.
9061
9062 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9063
9064 * gjavah.c (main): Avoid using `argi' to report unimplemented
9065 options.
9066
9067 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9068
9069 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
9070 initialize locals to avoid warnings. Local `exception_type' moved
9071 into if statement.
9072
9073 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9074
9075 * parse.y (resolve_expression_name): Use `orig' as a second
9076 argument to resolve_field_access.
9077 (resolve_field_access): Removed unnecessary code when dealing with
9078 static fields.
9079
9080 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
9081
9082 * class.c (push_super_field): Don't push the field twice.
9083 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
9084 * parse.h (java_reorder_fields): Prototyped.
9085 * parse.y (java_reorder_fields): New function.
9086 (java_layout_class): Simplified not to worry about re-ordering.
9087
9088 2000-02-23 Tom Tromey <tromey@cygnus.com>
9089
9090 * gjavah.c (print_name): In JNI case, correctly quote string.
9091 (print_method_info): Don't handle overrides in JNI mode.
9092
9093 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
9094
9095 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
9096 value type set to `boolean_type_node'.
9097
9098 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
9099
9100 * jcf-dump.c (main): Test for correct condition after
9101 output file creation.
9102
9103 2000-02-19 Anthony Green <green@cygnus.com>
9104
9105 * jcf-depend.c (add_entry): Fix test for first list entry.
9106
9107 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9108
9109 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
9110 * constants.c (build_constants_constructor): Likewise.
9111
9112 2000-02-19 Anthony Green <green@cygnus.com>
9113
9114 * jcf-depend.c (add_entry): Add entries to the end of the list.
9115
9116 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
9117
9118 * decl.c (INT_TYPE_SIZE): Define if necessary.
9119 (expand_java_return): Handle the case of a native integer smaller
9120 than a JVM integer.
9121
9122 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
9123
9124 * gjavah.c (help): Use GCCBUGURL.
9125 * jv-scan.c (help): Likewise.
9126 * jcf-dump.c (help): Likewise.
9127
9128 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9129
9130 * jcf-write.c (generate_bytecode_insns): Don't generate empty
9131 `finally' clauses.
9132
9133 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9134
9135 * jcf-parse.c (load_class): Call `fatal' if no file containing
9136 the target class are found.
9137
9138 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
9139
9140 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
9141 lex.c, lex.h, and PARSE_H to...
9142 (parse.o, parse-scan.o): ...here, respectively.
9143
9144 * lex.c: Split out code that may trigger SIGFPE from yylex()
9145 to its own function.
9146 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
9147
9148 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9149
9150 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
9151
9152 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
9153
9154 * parse.y (outer_field_access_p): Stop in time when outer contexts
9155 are exhausted.
9156 (resolve_qualified_expression_name): Properly qualify *everything*
9157 after a package.type to be resoled as expression names.
9158 (find_applicable_accessible_methods_list): Save/restore `class' to
9159 isolate it from a possible outer context search.
9160
9161 2000-02-15 Tom Tromey <tromey@cygnus.com>
9162
9163 * gjavah.c (jni_print_char): New function.
9164 (print_full_cxx_name): Use it.
9165 (decode_signature_piece): Likewise.
9166 (print_cxx_classname): Likewise.
9167
9168 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9169
9170 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
9171 version.o.
9172 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
9173
9174 * gjavah.c: Include version.h.
9175
9176 * jcf-dump.c: Likewise.
9177
9178 * jv-scan.c: Likewise.
9179
9180 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
9181
9182 * parse.y (outer_field_access_fix): First parameter now a tree
9183 node. Check for assignment to final. First argument to
9184 build_outer_field_access_fix modified to accommodate prototype.
9185 (build_outer_field_access): Don't check for assignment to final
9186 here.
9187 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
9188 possibly returned by outer_field_access_fix. Changed
9189 outer_field_access_fix's first argument.
9190 (check_final_assignment): $finit$'s context is OK.
9191 (patch_unaryop): Use node instead of its line/column value when
9192 calling outer_field_access_fix.
9193
9194 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
9195
9196 * parse.y (interface_declaration:): No longer tagged
9197 <node>. Re-installed default action.
9198 (class_member_declaration:): Handle inner interfaces.
9199 (interface_member_declaration): Handle inner interfaces and
9200 classes.
9201 (create_interface): Push error if one seen. Suspend parsing
9202 context when processing an inner interface.
9203 (register_fields): Inner class static field limitations not to
9204 apply to inner interfaces.
9205
9206 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9207
9208 * jcf-parse.c (load_class): Update `java_error_count' when a
9209 class' file can't be found.
9210 (parse.y): Avoid (byte)code generation when errors seen.
9211
9212 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9213
9214 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
9215 decodes a valid node.
9216 (patch_binop): Handle TRUNC_DIV_EXPR.
9217
9218 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9219
9220 * parse.y (resolve_package): New local `acc'. Try to progressively
9221 build and guess a package and type name.
9222
9223 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9224
9225 * parse.y (find_applicable_accessible_methods_list): Load and
9226 layout the search class if necessary.
9227 (java_complete_tree): Keep to original type of the folded initial
9228 value.
9229
9230 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
9231
9232 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
9233 Generate error message if circularity is detected. New static
9234 local `list'.
9235 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
9236 * jcf-write.c (generate_bytecode_insns): Very simply handle
9237 SAVE_EXPR.
9238 * parse.y (java_check_circular_reference): Use
9239 `cyclic_inheritance_report' during report, if necessary.
9240 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
9241 walking NEW_ARRAY_INIT twice.
9242
9243 2000-02-09 Tom Tromey <tromey@cygnus.com>
9244
9245 * parse.y (check_class_interface_creation): Allow inner classes to
9246 be `private' or `protected', check modifiers' consistency. Prevent
9247 block local classes from bearing any modifiers.
9248
9249 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9250
9251 * except.c (check_start_handlers): Re-add prototype lost in last
9252 patch.
9253 (maybe_start_try): Remove excess argument to `check_start_handlers'.
9254
9255 2000-02-09 Andrew Haley <aph@cygnus.com>
9256
9257 * decl.c (clear_binding_level): Remove excess initializer.
9258 (maybe_poplevels): Remove unused variable.
9259 (force_poplevels): Ditto.
9260 (struct binding_level): Add comment.
9261
9262 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9263
9264 * jcf-write.c (generate_classfile): Don't consider
9265 pre-initialization with reference value (use <clinit> instead.)
9266 * parse.y (java_fix_constructors): No generated constructor for
9267 interfaces.
9268 (build_outer_field_access): Removed debug message.
9269 (outer_field_expanded_access_p): Adapted to bytecode generation.
9270 (build_outer_field_access_method): Use fix_method_argument_names.
9271 (build_outer_method_access_method): Fixed indentation. Added
9272 comment. Handle access method generation for static and also void
9273 methods.
9274 (build_access_to_thisn): Inserted debug message.
9275 (maybe_build_thisn_access_method): Use fix_method_argument_names.
9276 (resolve_qualified_expression_name): Fixed comment.
9277 (not_accessible_p): Adapted to bytecode generation. Added comment.
9278 (patch_method_invocation): Added comment.
9279 (maybe_use_access_method): Fixed leading comment. Handle static
9280 methods.
9281 (java_complete_lhs): Don't shortcut handling of initialized upon
9282 declaration String type static fields when generating bytecode.
9283 (patch_unaryop): Handle outer field access when generating
9284 bytecode.
9285
9286 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
9287
9288 * java-tree.h (FIELD_THISN): New macro.
9289 * jcf-write.c (append_synthetic_attribute): New function.
9290 (generate_classfile): Set "Synthetic" attribute on this$<n>,
9291 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
9292 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
9293 this$<n> fields.
9294 (build_outer_field_access): Turned on access functions usage and
9295 generation when compiling to bytecode.
9296 (maybe_use_access_method): Likewise.
9297
9298 2000-01-25 Andrew Haley <aph@cygnus.com>
9299
9300 * java-except.h (struct eh_range): Add `expanded' field.
9301 (maybe_start_try): Add end_pc arg.
9302 (maybe_end_try): Ditto.
9303 * java-tree.h (force_poplevels): new function.
9304 * expr.c (expand_byte_code): Don't call maybe_start_try or
9305 maybe_end_try.
9306 * except.c (add_handler): Reset expanded.
9307 (expand_start_java_handler): Set expanded.
9308 (check_start_handlers): Don't expand a start handler that's
9309 already been expanded.
9310 (maybe_start_try): Add end_pc arg. Only expand a handler which
9311 ends after end_pc.
9312 (expand_end_java_handler): call force_poplevels.
9313 (force_poplevels): new function.
9314 * decl.c (binding_level): Add start_pc of binding level.
9315 (maybe_pushlevels): Call maybe_start_try when pushing binding
9316 levels.
9317 (maybe_poplevels): Call maybe_end_try when popping binding levels.
9318 (LARGEST_PC): Define.
9319 (clear_binding_level): Use LARGEST_PC.
9320
9321 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
9322 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
9323 (binding_depth, is_class_level, current_pc): new variables.
9324 (struct binding_level): ditto.
9325 (indent): new function.
9326 (push_jvm_slot): add debugging info.
9327 (maybe_pushlevels): ditto.
9328 (maybe_poplevels): ditto.
9329 (pushlevel): ditto.
9330 (poplevel): ditto.
9331 (start_java_method): ditto.
9332 (give_name_to_locals): comment only.
9333 * except.c (binding_depth, is_class_level, current_pc):
9334 new variables.
9335 (expand_start_java_handler): add debugging info.
9336 (expand_end_java_handler): ditto.
9337
9338 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9339
9340 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
9341 (print_name_for_stub_or_jni, process_file): Constify a char*.
9342
9343 2000-02-03 Tom Tromey <tromey@cygnus.com>
9344
9345 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
9346
9347 2000-01-31 Scott Bambrough <scottb@netwinder.org>
9348
9349 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
9350 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
9351 defined to be 1.
9352
9353 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
9354
9355 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
9356 * java-tree.h (TYPE_II_STMT_LIST): New macro.
9357 (struct lang_type): New field `ii_block'.
9358 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
9359 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
9360 * parse.h (struct parser_ctxt): New field `instance_initializers'.
9361 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
9362 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
9363 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
9364 macros.
9365 * parse.y (add_instance_initializer): New function.
9366 (in_instance_initializer): New static global.
9367 (class_body_declaration:): Link instance initializer block.
9368 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
9369 (array_creation_expression:): Remove unused local.
9370 (java_parser_context_push_initialized_field): Fixed leading
9371 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
9372 CPC_INSTANCE_INITIALIZER_LIST.
9373 (java_parser_context_pop_initialized_field): Likewise.
9374 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
9375 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
9376 CPC_INITIALIZER_STMT.
9377 (fix_constructors): New local `class_type'. Use it. Call
9378 add_instance_initializer.
9379 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
9380 (patch_return): Forbid return in instance initializers.
9381 (patch_throw_statement): Enforce exception handling in the context
9382 of instance initializers.
9383
9384 2000-02-03 Tom Tromey <tromey@cygnus.com>
9385
9386 * Make-lang.in (java.mostlyclean): Remove executables in
9387 `mostlyclean'.
9388
9389 2000-01-31 Scott Bambrough <scottb@netwinder.org>
9390
9391 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
9392 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
9393 (java_float_finite): Convert to use union Word from javaop.h.
9394 (java_double_finite): Convert to use union DWord from javaop.h.
9395
9396 2000-02-02 Tom Tromey <tromey@cygnus.com>
9397
9398 * gjavah.c (options): Added `jni' entry.
9399 (help): Document -jni.
9400 (flag_jni): New global.
9401 (process_file): Handle JNI output. Don't print text from
9402 -prepend, -add, etc, when generating stubs. Only remove `.class'
9403 suffix if it actually exists.
9404 (main): Create a `.c' file when run with `--jni --stubs'. Create
9405 correct output file name with `--jni'.
9406 (print_include): Mangle header name differently in JNI case.
9407 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
9408 method list.
9409 (print_method_info): Handle JNI case. Put signature info into
9410 method name. Handle case when STREAM is NULL.
9411 (print_name_for_stub_or_jni): New function.
9412 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
9413 (print_cxx_classname): Handle JNI.
9414 (print_full_cxx_name): Likewise.
9415 (decode_signature_piece): Likewise.
9416 (overloaded_jni_method_exists_p): New function.
9417 (struct method_name): Added `signature' and `sig_length' fields.
9418 (HANDLE_END_FIELD): Do nothing in JNI mode.
9419
9420 2000-02-02 Tom Tromey <tromey@cygnus.com>
9421
9422 * jv-scan.c: Include version.c, <getopt.h>.
9423 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
9424 (options): New array.
9425 (usage): New function.
9426 (version): New function.
9427 (main): Use getopt_long to parse command line.
9428 * jcf-dump.c: Include version.c, <getopt.h>.
9429 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
9430 OPT_JAVAP): New macros.
9431 (options): New array.
9432 (usage): Return `void'. Changed message.
9433 (help): New function.
9434 (version): New function.
9435 (main): Use getopt_long_only to parse command line.
9436 * gjavah.c: Include <getopt.h>.
9437 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
9438 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
9439 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
9440 (options): New array.
9441 (java_no_argument): Removed.
9442 (help): Updated with missing options.
9443 (main): Use getopt_long_only to parse command line.
9444 (usage): Changed message.
9445
9446 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9447
9448 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
9449 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
9450 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
9451 * parse.y (array_creation_expression:): Handle anonymous arrays.
9452 (build_array_from_name): Don't set `ret_name' if null.
9453 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
9454 (qualify_ambiguous_name): Likewise.
9455 (java_complete_expand_class): Likewise.
9456
9457 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9458
9459 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
9460 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
9461 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
9462 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
9463 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
9464 AIPL_FUNCTION_COMPLETED_INVOCATION.
9465 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
9466 AIPL_FUNCTION_INVOCATION_READY.
9467 (AIPL_FUNCTION_DECLARATION): New enum entry.
9468 * parse.y (reorder_static_initialized): New function.
9469 (java_parser_context_pop_initialized_field): Use it.
9470 (add_inner_class_fields): Use
9471 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
9472 augmented. Install marker after last alias initializer, if any.
9473 (generate_finit): Fixed typo. Don't try to retain only the used
9474 fields.
9475 (method_header): Compute and set DECL_FUNCTION_NAP.
9476 (method_declarator): Fixed comment. Insert alias initializer in
9477 parameter list.
9478 (build_alias_initializer_parameter_list): Fixed leading
9479 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
9480 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
9481 (java_complete_expand_class): Code to retain only used aliases
9482 removed.
9483 (java_complete_expand_methods): New local `first_decl'. Generate
9484 $finit$ first, then expand the constructors, regular methods and
9485 <clinit>.
9486 (java_complete_expand_method): Don't report error on missing
9487 return statement if previously detected bogus.
9488 (fix_constructors): Don't patch constructor parameters list.
9489 (patch_method_invocation): Use new AIPL enum values. Reverse
9490 alias initializer list for anonymous classes.
9491
9492 2000-01-30 Anthony Green <green@redhat.com>
9493
9494 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
9495 determine how many stack slots to pop.
9496
9497 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
9498
9499 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
9500 error handling/recovery.
9501 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
9502
9503 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
9504
9505 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
9506 FIELD_LOCAL_ALIAS_USED): New macros.
9507 (DECL_FUNCTION_NAP): New macro.
9508 (struct lang_decl): New field `nap'.
9509 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
9510 (struct lang_type): New fields `finit_stmt_list' and
9511 `clinit_stmt_list'.
9512 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
9513 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
9514 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
9515 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
9516 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
9517 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
9518 (BUILD_THROW): Macro line separator re-indented.
9519 * parse.y (end_class_declaration): New function.
9520 (maybe_generate_pre_expand_clinit): New name for
9521 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
9522 pre-expand static fields.
9523 (maybe_generate_clinit): Function deleted.
9524 (check_for_static_method_reference): Prototype's parameter list
9525 indented.
9526 (generate_finit): New name for maybe_generate_finit. Changed
9527 leading comment. Function rewritten to use
9528 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
9529 (build_alias_initializer_parameter_list): New function.
9530 (java_parser_context_pop_initialized_field): Likewise.
9531 (add_inner_class_fields): Likewise.
9532 (type_declaration:): Call end_class_declaration.
9533 (class_member_declaration:): Likewise.
9534 (formal_parameter_list:): Fixed typos.
9535 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
9536 element. Improved error handling.
9537 (block_statement:): Call end_class_declaration.
9538 (anonymous_class_creation:): Likewise.
9539 (create_anonymous_class): Fixed comments.
9540 (create_class): Call add_inner_class_fields.
9541 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
9542 (method_header): Use MARK_FINAL_PARMS.
9543 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
9544 (method_declarator): Propagate final argument flag.
9545 (craft_constructor): New local `artificial'. Call
9546 build_alias_initializer_parameter_list. Use
9547 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
9548 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
9549 necessary.
9550 (complete_expand_class): Get rid of unused outer context local
9551 alias fields.
9552 (java_complete_expand_methods): Fixed leading
9553 comment. Generate/pre-expand <clinit> first. Changed method
9554 expansion order to regular, $finit$, constructors, <clinit>.
9555 (java_complete_expand_method): Set current_function_decl.
9556 (fix_constructors): Fix constructor parameter list to account for
9557 outer context local alias initializers.
9558 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
9559 (resolve_expression_name): Lookup outer context local aliases. New
9560 local `access', use it.
9561 (patch_method_invocation): Patch inner class ctor invocation with
9562 outer context local aliases initialization values. $finit$
9563 invocation patching now includes things generated with
9564 build_alias_initializer_parameter_list.
9565 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
9566 (build_super_invocation): Likewise.
9567 (patch_assignment): Changed comment.
9568
9569 2000-01-27 Andrew Haley <aph@cygnus.com>
9570
9571 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
9572 (emit_if): Ditto.
9573 (emit_jsr): Ditto.
9574
9575 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9576
9577 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
9578 concatenation.
9579 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
9580
9581 * parse.y (register_fields): Don't pass a format specifier to
9582 OBSOLETE_MODIFIER_WARNING.
9583 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
9584 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
9585 specifier.
9586 (check_modifiers): Change function into a macro.
9587 (check_class_interface_creation): Pass a literal format string.
9588
9589 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9590
9591 * buffer.h: PROTO -> PARAMS.
9592 * check-init.c: Likewise.
9593 * class.c: Likewise.
9594 * constants.c: Likewise.
9595 * convert.h: Likewise.
9596 * decl.c: Likewise.
9597 * except.c: Likewise.
9598 * expr.c: Likewise.
9599 * gjavah.c: Likewise.
9600 * java-except.h: Likewise.
9601 * java-tree.h: Likewise.
9602 * jcf-depend.c: Likewise.
9603 * jcf-dump.c: Likewise.
9604 * jcf-parse.c: Likewise.
9605 * jcf-path.c: Likewise.
9606 * jcf-reader.c: Likewise.
9607 * jcf-write.c: Likewise.
9608 * jcf.h: Likewise.
9609 * jv-scan.c: Likewise.
9610 * jvgenmain.c: Likewise.
9611 * jvspec.c: Likewise.
9612 * lang.c: Likewise.
9613 * lex.c: Likewise.
9614 * lex.h: Likewise.
9615 * parse-scan.y: Likewise.
9616 * parse.h: Likewise.
9617 * parse.y: Likewise.
9618 * typeck.c: Likewise.
9619 * verify.c: Likewise.
9620 * xref.c: Likewise.
9621 * xref.h: Likewise.
9622 * zextract.c: Likewise.
9623 * zipfile.h: Likewise.
9624
9625 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
9626
9627 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9628 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
9629 * constants.c (build_constant_data_ref): Check for cached
9630 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
9631 in TYPE_CPOOL_DATE_REF.
9632 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
9633 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
9634 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
9635 (LOCAL_FINAL): New macro.
9636 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
9637 constant pool -- don't try to reuse.
9638 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
9639 TYPE_LANG_SPECIFIC.
9640 (find_in_current_zip): Use TYPE_JCF.
9641 * parse.h (java_check_final): Prototype removed.
9642 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
9643 (maybe_create_class_interface_decl,
9644 check_class_interface_creation): Likewise.
9645 (java_expand_finals): Function removed.
9646 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
9647 (block_statement:): Fixed comment.
9648 (anonymous_class_creation:): Likewise.
9649 (check_class_interface_creation): Reversed Jan 12, 2000 extra
9650 argument patch.
9651 (check_class_interface_creation): Loosened error report on (inner)
9652 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
9653 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
9654 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
9655 argument patch.
9656 (create_interface): Likewise.
9657 (anonymous_class_counter): New static global.
9658 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
9659 patch. Fixed comments.
9660 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
9661 anonymous_class_counter when declaring a toplevel class.
9662 (craft_constructor): Fixed constructor name when handling
9663 anonymous classes. Anonymous class constructors to feature hidden
9664 this$<n> parameter.
9665 (java_fix_constructors): Added comment.
9666 (java_check_final): Function removed.
9667 (java_complete_expand_methods): Fixed comment. Don't generate
9668 class data, save its outgoing constant pool instead.
9669 (verify_constructor_super): Skip anonymous class constructor
9670 hidden this$<n> parameter.
9671 (java_expand_classes): New local `saved_ctxp'. Removed call to
9672 java_expand_finals and java_check_final. Expand anonymous class
9673 constructors. Generate class data.
9674 (build_super_invocation): Skip anonymous class hidden this$<n>
9675 parameter.
9676 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
9677 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9678 (set_java_signature): Likewise.
9679
9680 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
9681
9682 * gjavah.c: Delete ACC_VISIBILITY define.
9683 * jcf.h: Add ACC_VISIBILITY define.
9684 * parse.y: final: rule tagged <value>.
9685 (java_check_regular_methods): Use ACC_VISIBILITY define for
9686 default package access check.
9687 (local_variable_declaration_statement): Use final: rule.
9688
9689 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
9690
9691 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
9692 (final:): New rule.
9693
9694 2000-01-17 Tom Tromey <tromey@cygnus.com>
9695
9696 * gjavah.c (print_field_info): Allow non-static final fields.
9697
9698 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9699
9700 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
9701 * parse.y (patch_anonymous_class): New function.
9702 (create_anonymous_class): Register incomplete type when the
9703 class/interface to extends/implement isn't known yet.
9704 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
9705 (verify_constructor_super): Tuned error message.
9706
9707 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9708
9709 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
9710 (ANONYMOUS_CLASS_P): New macro.
9711 (TYPE_SIGNATURE, TYPE_JCF): New macros.
9712 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
9713 * parse.y (create_class): Added leading argument.
9714 (maybe_create_class_interface_decl,
9715 check_class_interface_creation): Likewise.
9716 (craft_constructor): New function.
9717 (verify_constructor_super): Added argument in prototype.
9718 (class_declaration:): Inserted leading argument.
9719 (for_begin:): Use FOR_LOOP_P.
9720 (anonymous_class_creation): Create WFL of the anonymous class to
9721 instantiate. Call build_new_invocation. Added comments.
9722 (check_class_interface_creation): Handle parameter `anonymous' in
9723 verbose mode class creation announce.
9724 (link_nested_class_to_enclosing): Exclude anonymous classes.
9725 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
9726 anonymous class, even though they appear to have an enclosing
9727 context.
9728 (create_interface): Pass extra argument to
9729 check_class_interface_creation.
9730 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
9731 (create_class): Call check_class_interface_creation and
9732 maybe_create_class_interface_decl with extra new argument. Don't
9733 add private this$<n> to anonymous classes.
9734 (method_declarator): Insert hidden this$<n> to anonymous class
9735 constructors.
9736 (java_fix_constructors): Deleted code creating default
9737 constructor. Call craft_constructor instead.
9738 (java_check_regular_methods): Set `saw_constructor' to 1 for
9739 anonymous classes.
9740 (fix_constructors): Pass extra argument to verify_constructor_super.
9741 (verify_constructor_super): New local `sdecl', use it. Search for
9742 matching constructor (possibly featuring arguments) in super
9743 class.
9744 (lookup_method_invoke): Craft constructor according to arguments
9745 list when dealing with anonymous class constructors.
9746 (build_super_invocation): Pass arguments to anonymous class super
9747 constructors.
9748 (search_loop): Use FOR_LOOP_P.
9749 (labeled_block_contains_loop_p): Likewise.
9750
9751 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
9752
9753 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
9754 (enclosing_context_p): New function.
9755 (get_access_flags_from_decl): Handle CLASS_STATIC.
9756 (maybe_layout_super_class): Extra first argument passed to
9757 do_resolve_class.
9758 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
9759 ID_INIT_P.
9760 * decl.c (access0_identifier_node): New global.
9761 (init_decl_processing): access0_identifier_node initialized.
9762 (pushdecl): Set DECL_CONTEXT only on non type decls.
9763 * expr.c (lookup_field): Lookup inner class fields in enclosing
9764 contexts.
9765 (expand_invoke): Use ID_INIT_P.
9766 (expand_java_field_op): Use DECL_CLINIT_P.
9767 * java-tree.def (CLASS_LITERAL): New tree code.
9768 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
9769 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
9770 (struct lang_decl): New field `inner_access'.
9771 (enclosing_context_p): Prototyped.
9772 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
9773 ID_CLINIT_P): New macros.
9774 (CLASS_STATIC): New macro.
9775 (CLASS_ACCESS0_GENERATED_P): New macro.
9776 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
9777 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
9778 INNER_CLASS_P): New macros.
9779 (DECL_INNER_CLASS_LIST): New macro.
9780 * jcf-parse.c (yyparse): Avoid the use of ANSI string
9781 concatenation.
9782 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9783 the shift value to int. Fixed typo in comment.
9784 * lex.c (inst_id, wpv_id): Initialize.
9785 * mangle.c (unicode_mangling_length): Take `$' into account.
9786 * parse.h (DRECOVER, RECOVER): Terminate properly.
9787 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
9788 (typedef struct _jdep): New field `enclosing'.
9789 (JDEP_ENCLOSING): New macro.
9790 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
9791 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
9792 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
9793 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
9794 GET_ENCLOSING_CPC_CONTEXT): New macros.
9795 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
9796 (do_resolve_class): Added extra argument in prototype.
9797 * parse.y (resolve_class): Added extra argument in prototype.
9798 (maybe_create_class_interface_decl): Likewise.
9799 (maybe_use_access_method, build_wfl_wrap): New functions.
9800 (java_complete_expand_classes, java_complete_expand_class):
9801 Likewise.
9802 (java_parser_context_push_initialized_field,
9803 java_parser_context_suspend, java_parser_context_resume):
9804 Likewise.
9805 (maybe_make_nested_class_name, make_nested_class_name,
9806 set_nested_class_simple_name_value,
9807 link_nested_class_to_enclosing, find_as_inner_class,
9808 find_as_inner_class_do, check_inner_class_redefinition,
9809 build_thisn_assign, build_current_thisn, build_access_to_thisn,
9810 maybe_build_thisn_access_method, build_outer_field_access,
9811 build_outer_field_access_methods, build_outer_field_access_expr,
9812 build_outer_method_access_method, build_new_access_id,
9813 build_outer_field_access_method, outer_field_access_p,
9814 outer_field_expanded_access_p, outer_field_access_fix,
9815 build_incomplete_class_ref, patch_incomplete_class_ref,
9816 create_anonymous_class): Likewise.
9817 (inst_id, wpv_id): New static global variables.
9818 (synchronized:): New rule, tagged <node>.
9819 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
9820 rules.
9821 (anonymous_class_creation:): New rule, tagged <node>.
9822 (NEW_TK): Tagged <node>.
9823 (type_literals, array_type_literal): New rules, tagged <node>.
9824 (class_declaration:): Removed action when reducing by class_body:
9825 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
9826 using GET_CPC in sub-rules.
9827 (class_member_declaration): Handle inner classes.
9828 (method_declaration): When reducing method_header:, reset
9829 current_function_decl when appropriate.
9830 (method_declarator:): Set the number of formal parameter to 0 for
9831 method declared without arguments.
9832 (constructor_declarator:): Likewise.
9833 (static_initializer:): List of elements kept in a list.
9834 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
9835 use of the keyword `static' for type declarations.
9836 (block_statement:): Handle inner class declarations.
9837 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
9838 type qualified `this'.
9839 (class_instance_creation_expression): Use anonymous_class_creation:
9840 to handle inner class instances creation. Handle qualified `new'.
9841 (something_dot_new): Added appropriate actions.
9842 (create_new_parser_context): New function.
9843 (java_push_parser_context, java_parser_context_save_global,
9844 java_parser_context_suspend): Use create_new_parser_context.
9845 (check_modifiers): Changed leading comment.
9846 (check_class_interface_creation): Handle interclasses.
9847 (add_superinterfaces): Fixed comment.
9848 (create_interface): Build qualified name from the raw_name instead
9849 of its matching WFL. Push the initialized fields list. raw_name added
9850 as an extra argument to maybe_create_class_interface_decl.
9851 (create_class): Build qualified name from the raw_name instead of
9852 its matching WFL. Removed assignment to current_parsed_class_un.
9853 Call PUSH_ERROR before returning an error. Suspend the current
9854 parser context when processing an inner class. Push the
9855 initialized fields list. raw_name added as an extra argument to
9856 maybe_create_class_interface_decl. Add the private this$<n>
9857 field.
9858 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
9859 (register_fields): Get the class type from GET_CPC and handle
9860 previous errors. Added code to handle the creation of static
9861 fields in inner classes. Initialized fields initialization
9862 statements kept in a list of lists.
9863 (maybe_generate_finit): Initialized fields initialization
9864 statements kept in a list of lists. Use GET_CPC.
9865 (maybe_generate_clinit): Likewise.
9866 (method_header): Use GET_CPC and GET_CPC_UN.
9867 (parser_qualified_classname): Handle inner classes.
9868 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
9869 (java_fix_constructors): Hide pointer to enclosing context
9870 instance in constructor list when dealing with inner classes.
9871 (jdep_resolve_class): Call resolve_class with extra first argument
9872 JDEP_ENCLOSING.
9873 (resolve_class): Add enclosing context as a first extra argument
9874 to do_resolve_class.
9875 (do_resolve_class): Call find_as_inner_class. Handle WFLs
9876 properly.
9877 (resolve_no_layout): Extra argument added to resolve_class
9878 invocation.
9879 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
9880 (java_get_real_method_name): Use GET_CPC_UN.
9881 (check_abstract_method_definitions): Use DECL_CLINIT_P.
9882 (java_check_abstract_methods): Handle static method declared in
9883 inner classes by an error.
9884 (java_check_regular_methods): Use DECL_CLINIT_P.
9885 (source_start_java_method): Also set DECL_MAX_LOCALS.
9886 (create_artificial_method): Call java_parser_context_save_global
9887 and java_parser_context_restore_global instead of saving/restoring
9888 the context by hand.
9889 (expand_start_java_method): Improved verbose mode message.
9890 (java_complete_expand_methods): Fixed leading comment. Use
9891 DECL_CLINIT_P.
9892 (fix_constructors): Added assignment to this$<n> if necessary.
9893 (java_expand_classes): Call java_complete_expand_classes instead
9894 of java_complete_expand_methods.
9895 (make_qualified_primary): Simplified.
9896 (merge_qualified_name): Optimized for missing left or right parts.
9897 (resolve_expression_name): Handle access to outer class fields from
9898 interclasses.
9899 (resolve_qualified_expression_name): New macro
9900 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
9901 classes. Report error on non appropriate qualification of
9902 `new'. Handle qualified `this'.
9903 (not_accessible_p): Allow access to outer class private fields from
9904 inner classes.
9905 (patch_method_invocation): Handle method invocations through
9906 access methods and inner class constructor invocations.
9907 (find_applicable_accessible_methods_list): Search enclosing
9908 contexts of an inner class.
9909 (search_applicable_methods_list): Fixed typo.
9910 (argument_types_convertible): Handle inner class constructors'
9911 hidden outer context reference argument.
9912 (qualify_ambiguous_name): Handle qualified `this'.
9913 (java_complete_lhs): Handle use of field accessed through
9914 artificial access methods in various cases of assignments. Handle
9915 CLASS_LITERAL node.
9916 (check_final_assignment): Use DECL_CLINIT_P.
9917 (valid_ref_assignconv_cast_p): Handle the destination being an
9918 enclosing context of the source.
9919 (patch_unaryop): Handle use of field accessed through artificial
9920 access methods.
9921 (patch_return): Use DECL_CLINIT_P.
9922 (patch_throw_statement): Use DECL_CLINIT_P.
9923 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
9924 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
9925 ID_INIT_P.
9926
9927 2000-01-16 Anthony Green <green@cygnus.com>
9928
9929 * parse.y (build_string_concatenation): Only use
9930 StringBuffer(String) shortcut if String arg is constant.
9931
9932 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
9933
9934 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9935 the shift value to int. Fixed typo in comment.
9936
9937 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
9938
9939 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
9940 * jcf-write.c: Likewise.
9941 * parse.y: Likewise.
9942 * parse.c: Regenerate.
9943
9944 2000-01-09 Anthony Green <green@cygnus.com>
9945
9946 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
9947 bytecodes in the correct order.
9948
9949 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9950
9951 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
9952
9953 2000-01-06 Anthony Green <green@cygnus.com>
9954
9955 * expr.c (java_lang_expand_expr): Switch to permanent obstack
9956 before building constant array decl.
9957
9958 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
9959
9960 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
9961 method invocation and typo in conditional expression.
9962 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
9963 the appropriate NOTE_POP.
9964 * parse.y (patch_binop): Shift value mask to feature the right
9965 type.
9966
9967 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9968
9969 * class.c (assume_compiled, assume_compiled_node): Add static
9970 prototype.
9971 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
9972
9973 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
9974
9975 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
9976
9977 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
9978 to `__modifier' to avoid stringifying it.
9979
9980 * parse.y (verify_constructor_circularity): Don't call a variadic
9981 function with a non-literal format string.
9982 (java_check_abstract_methods): Move unreachable code inside
9983 `continue' statement.
9984 (lookup_method_invoke): Call xstrdup, not strdup.
9985
9986 * expr.c (expand_java_field_op): Avoid the use of ANSI string
9987 concatenation.
9988
9989 * jcf-parse.c (yyparse): Likewise.
9990
9991 * jv-scan.c (main): Likewise.
9992
9993 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9994
9995 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
9996 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
9997 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
9998 concatenation.
9999
10000 * parse.y (synchronized, variable_redefinition_error,
10001 check_class_interface_creation, create_interface, create_class,
10002 method_header, finish_method_declaration,
10003 check_modifiers_consistency, method_declarator,
10004 complete_class_report_errors, check_abstract_method_definitions,
10005 java_check_regular_methods, check_throws_clauses,
10006 java_check_abstract_methods, read_import_dir,
10007 check_pkg_class_access, declare_local_variables, fix_constructors,
10008 cut_identifier_in_qualified, resolve_expression_name,
10009 resolve_qualified_expression_name, patch_method_invocation,
10010 java_complete_lhs, patch_assignment, try_builtin_assignconv,
10011 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
10012 patch_exit_expr, patch_exit_expr, patch_switch_statement,
10013 patch_try_statement, patch_synchronized_statement,
10014 patch_throw_statement, check_thrown_exceptions,
10015 patch_conditional_expr): Likewise.
10016
10017 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
10018
10019 * Makefile.in (LIBDEPS): Added gcc's errors.o
10020 (../jcf-dump$(exeext):): Link with gcc's errors.o
10021 (../gcjh$(exeext):): Likewise.
10022 * expr.c (expand_java_NEW): Layout the entire target type instead of
10023 laying out its methods only.
10024 (lookup_field): Layout the class after having loaded it.
10025 * java-tree.h (java_debug_context): Declared.
10026 * jcf-io.c (toplev.h): Included.
10027 (find_class): Removed assignment to jcf's outofsynch
10028 field. Force source file to be read if newer than its matching
10029 class file. Tweaked debug messages.
10030 * jcf-parse.c (jcf_out_of_synch): Deleted.
10031 (read_class): Call to jcf_out_of_synch removed.
10032 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
10033 (jcf_out_of_synch): Prototype deleted.
10034 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
10035 `deprecated' and `class_err': integer turned into bit-fields.
10036 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
10037 * parse.y (package_list): New global.
10038 (package_declaration:): Record newly parsed package name.
10039 (extra_ctxp_pushed_p): Static global deleted.
10040 (java_parser_context_save_global): Create buffer context for the
10041 purpose of saving globals, if necessary.
10042 (java_parser_context_restore_global): Pop context pushed for the
10043 purpose of saving globals, if necessary.
10044 (java_debug_context_do): New prototype and function.
10045 (java_debug_context): Likewise.
10046 (do_resolve_class): Use already parsed package names to qualify
10047 and lookup class candidate.
10048 (java_pre_expand_clinit): Removed unnecessary local variable.
10049
10050 1999-12-17 Tom Tromey <tromey@cygnus.com>
10051
10052 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
10053 fixes PR gcj/119.
10054 (process_file): Use `\n\' at end of each line in string.
10055
10056 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
10057
10058 * expr.c (expand_invoke): Layout the loaded class before
10059 attempting to use it.
10060 (expand_java_field_op): Allow final field assignments to take
10061 place in $finit$.
10062 * typeck.c (convert): Return error_mark_node if expr is null.
10063
10064 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
10065
10066 * class.c (class_depth): Return -1 if the class doesn't load
10067 properly.
10068 * expr.c (can_widen_reference_to): Check for errors during depth
10069 computation and return 0 accordingly.
10070 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
10071 create default constructors and add an other error check.
10072 * parse.h (java_fix_constructors): Prototyped.
10073 * parse.y (java_pre_expand_clinit): Likewise.
10074 (build_super_invocation): Re-prototyped to feature one argument.
10075 (java_check_circular_reference): Directly use `current'.
10076 (java_fix_constructors): New function.
10077 (java_check_regular_methods): Don't create default constructors
10078 here, but abort if none were found.
10079 (java_complete_expand_methods): Pre-process <clinit> calling
10080 java_pre_expand_clinit.
10081 (java_pre_expand_clinit): New function.
10082 (fix_constructors): build_super_invocation invoked with the
10083 current method declaration as an argument.
10084 (build_super_invocation): Use the context of the processed method
10085 decl argument instead of current_class.
10086 * typeck.c (lookup_java_method): Take WFLs in method names into
10087 account.
10088
10089 1999-12-14 Per Bothner <per@bothner.com>
10090
10091 * class.c (make_class_data): flag_keep_inline_functions to keep
10092 private methods in the method array.
10093
10094 1999-12-15 Anthony Green <green@cygnus.com>
10095
10096 * check-init.c (check_init): Take into account both types of
10097 `throw's when checking for uninitialized variables.
10098
10099 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10100
10101 * parse.y (java_complete_lhs): Force conversion of array
10102 dimensions to int_type_node, that's what runtime's ABI expects.
10103
10104 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10105
10106 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
10107 operand of a WFL, until the Java front-end gets fixed with regard
10108 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
10109
10110 1999-12-10 Andrew Haley <aph@cygnus.com>
10111
10112 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
10113 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
10114 expr.c (build_java_athrow): Add support for sjlj-exceptions.
10115 java-tree.h: Ditto.
10116 jcf-write.c: Ditto.
10117
10118 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
10119
10120 * expr.c (java_lang_expand_expr): Switch to permanent obstack
10121 before calling expand_eh_region_start and expand_start_all_catch.
10122 * except.c (expand_start_java_handler): Switch to permanent
10123 obstack before calling expand_eh_region_start.
10124 (expand_end_java_handler): Switch to permanent obstack before
10125 calling expand_start_all_catch.
10126
10127 1999-12-5 Anthony Green <green@cygnus.com>
10128
10129 * decl.c (init_decl_processing): Mark throw_node as a noreturn
10130 function with side effects.
10131 (init_decl_processing): Mark all memory allocating DECLs with
10132 DECL_IS_MALLOC.
10133
10134 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10135
10136 * except.c (expand_end_java_handler): Call
10137 expand_resume_after_catch and end_catch_handler.
10138
10139 1999-11-30 Anthony Green <green@cygnus.com>
10140
10141 * verify.c (verify_jvm_instructions): Create new return label
10142 chain if non existent (don't rely on the verified state of the jsr
10143 target.)
10144
10145 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
10146
10147 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
10148 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
10149
10150 * parse.y (patch_assignment): Removed bogus final class test on
10151 lhs when checking on whether to emit an ArrayStoreException runtime
10152 check.
10153 * expr.c (expand_java_arraystore): Likewise.
10154
10155 1999-11-28 Anthony Green <green@cygnus.com>
10156
10157 * decl.c (find_local_variable): Reuse single slot decls when
10158 appropriate.
10159
10160 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
10161
10162 * jcf-parse.c (saw_java_source): Global variable removed.
10163 (read_class): Don't use `saw_java_source'. Added extra braces.
10164 (yyparse): Code setting `saw_java_source' removed.
10165
10166 1999-11-24 Mark Mitchell <mark@codesourcery.com>
10167
10168 * except.c (emit_handlers): Zero catch_clauses after emitting them.
10169
10170 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10171
10172 * verify.c (merge_type_state): Non verified subroutines being
10173 considered more than once to trigger passive type merge.
10174
10175 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10176
10177 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
10178 in case of error. Error message tuned.
10179
10180 1999-11-21 Anthony Green <green@cygnus.com>
10181
10182 * constants.c (find_methodref_index): Unwrap method names before
10183 inserting them in the constant pool.
10184
10185 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
10186
10187 * class.c (assume_compiled_node): New typedef.
10188 (assume_compiled_tree): New static data.
10189 (find_assume_compiled_node): New function.
10190 (add_assume_compiled): New function.
10191 (assume_compiled): New function.
10192 * class.c (make_class_data): Use assume_compiled.
10193 (is_compiled_class): Use assume_compiled.
10194
10195 * java-tree.h (add_assume_compiled): Declare.
10196
10197 * lang.c (lang_decode_option): Parse new options.
10198
10199 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10200
10201 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
10202 int_type_node: that's what `_Jv_AllocObject' expects.
10203
10204 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
10205
10206 * parse.y (lookup_method_invoke): Use lang_printable_name to
10207 reliably build the type name during error report. Fixes PR gcj/97.
10208
10209 1999-11-09 Tom Tromey <tromey@cygnus.com>
10210
10211 * jcf-path.c: Include <sys/stat.h>.
10212 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
10213 (DIR_UP): New macro.
10214
10215 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
10216
10217 * parse.y (source_end_java_method): Resume permanent allocation,
10218 reversing Apr 27 1998 patch.
10219 (patch_string_cst): Pop obstacks after having pushed the permanent
10220 ones.
10221
10222 1999-11-05 Tom Tromey <tromey@cygnus.com>
10223
10224 * class.c (finish_class): Emit inlined methods if any native
10225 methods exist in the class. Fixes PR gcj/85.
10226
10227 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
10228
10229 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
10230 (qualify_ambiguous_name): Likewise.
10231
10232 1999-11-03 Godmar Back <gback@cs.utah.edu>
10233
10234 * typeck.c: (lookup_java_method): search all inherited
10235 interfaces when looking up interface method.
10236
10237 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10238
10239 * parse.y (method_header:): Issue error message for rule `type
10240 error'.
10241 (synchronized:): Error report when not using synchronized.
10242
10243 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10244
10245 * parse.y (resolve_qualified_expression_name): Prevent `this' from
10246 being used before the superclass constructor has been called.
10247 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
10248 instead of `CALL_THIS_CONSTRUCTOR_P'.
10249
10250 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
10251
10252 * check-init.c: Fix typo in comment.
10253
10254 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
10255
10256 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
10257 and final method.
10258
10259 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
10260
10261 * parse.y (expression_statement:): Call function to report
10262 improper invocation of a constructor.
10263 (parse_ctor_invocation_error): New function.
10264
10265 1999-10-26 Mark Mitchell <mark@codesourcery.com>
10266
10267 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
10268 remember_end_note.
10269
10270 1999-10-21 Tom Tromey <tromey@cygnus.com>
10271
10272 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
10273 in generated `main'.
10274
10275 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
10276
10277 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
10278 (qualify_ambiguous_name): Likewise.
10279
10280 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
10281
10282 * parse.y (java_complete_tree): fold_constant_for_init to work on
10283 permanent_obstack.
10284 (java_complete_lhs): Likewise.
10285 (array_constructor_check_entry): Complete an initializer element
10286 on permanent_obstack.
10287
10288 1999-10-19 Tom Tromey <tromey@cygnus.com>
10289
10290 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
10291 From Mike Moreton <mike@pillim.demon.co.uk>.
10292
10293 1999-10-15 Greg McGary <gkm@gnu.org>
10294
10295 * java-tree.h (flag_bounds_check): Remove extern decl.
10296 * lang.c (flag_bounds_check): Remove global variable.
10297 (lang_f_options): Remove "bounds-check" entry.
10298 (lang_init_options): Default flag_bounds_check to "on".
10299
10300 1999-10-14 Tom Tromey <tromey@cygnus.com>
10301
10302 * jvgenmain.c (usage): New function.
10303 (main): Use it. Also, handle `-D' options.
10304 * jvspec.c (lang_specific_driver): Recognize -D.
10305 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
10306
10307 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
10308
10309 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10310
10311 * jcf-dump.c (print_constant, disassemble_method): Don't call a
10312 variadic function with a non-literal format string.
10313
10314 * parse-scan.y (report_main_declaration): Likewise.
10315
10316 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
10317
10318 * parse.y (read_import_dir, patch_assignment, patch_binop,
10319 patch_array_ref): Likewise.
10320
10321 * typeck.c (build_java_array_type): Likewise.
10322
10323 * verify.c (verify_jvm_instructions): Likewise.
10324
10325 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
10326
10327 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
10328
10329 1999-10-07 Anthony Green <green@cygnus.com>
10330
10331 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
10332 where CHECK_PUT may fail for valid reasons.
10333
10334 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
10335 UNSAFE_PUTN): New macros.
10336
10337 1999-10-04 Tom Tromey <tromey@cygnus.com>
10338
10339 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
10340 well. Fixes Java PR gcj/59.
10341 * parse-scan.y (yyerror): Report errors.
10342
10343 1999-09-24 Glenn Chambers <GChambers@provsol.com>
10344
10345 * decl.c (insert_block): Remove unconditional `abort'.
10346
10347 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
10348
10349 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
10350 FUNCTION_CODE now of type int. All callers changed.
10351 Set the builtin's DECL_BUILT_IN_CLASS.
10352
10353 1999-09-23 Tom Tromey <tromey@cygnus.com>
10354
10355 * jvspec.c (lang_specific_driver): Don't read spec file if
10356 -fsyntax-only given.
10357
10358 1999-09-22 Tom Tromey <tromey@cygnus.com>
10359
10360 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
10361
10362 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
10363 (WORDS_TO_LONG): Likewise.
10364 (WORDS_TO_DOUBLE): Likewise.
10365
10366 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
10367
10368 * jcf-write.c (RELOCATION_VALUE_0): New macro.
10369 (RELOCATION_VALUE_1): Likewise.
10370 (emit_iinc, emit_reloc, push_constant1, push_constant2,
10371 push_in_const, push_long_const): Prototyped.
10372 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
10373 (push_constant2): Likewise.
10374 (push_int_const): Cast find_constant1's integer arguments to `jword'.
10375 (find_constant_wide): Cast find_constant2's integer arguments to
10376 `jword'.
10377 (find_constant_index): Cast find_constant2's and find_constant2's
10378 integer arguments to `jword'.
10379 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
10380 (emit_switch_reloc): Use RELOCATION_VALUE_0.
10381 (emit_if): Use RELOCATION_VALUE_1.
10382 (emit_goto): Likewise.
10383 (emit_jsr): Likewise.
10384 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
10385 argument to push_long_const to HOST_WIDE_INT.
10386
10387 1999-09-15 Andreas Schwab <schwab@suse.de>
10388
10389 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
10390
10391 1999-09-20 Nick Clifton <nickc@cygnus.com>
10392
10393 * lang.c (lang_decode_option): Extend comment.
10394
10395 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
10396
10397 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
10398 instead of fndecl.
10399
10400 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10401
10402 * gjavah.c (get_field_name, print_method_info, print_include,
10403 add_namelet): Use xmalloc, not malloc.
10404
10405 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
10406 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
10407 NULL pointer.
10408
10409 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
10410
10411 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
10412
10413 * jcf-path.c (add_entry): Likewise.
10414
10415 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
10416
10417 * jv-scan.c (xmalloc): Remove definition.
10418
10419 * jvgenmain.c (xmalloc): Likewise.
10420
10421 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
10422
10423 * lex.c (java_store_unicode): Use xrealloc, not realloc.
10424
10425 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
10426 concat, not xmalloc/sprintf.
10427 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
10428 (xstrdup): Remove definition.
10429
10430 * parse.y (duplicate_declaration_error_p,
10431 constructor_circularity_msg, verify_constructor_circularity,
10432 check_abstract_method_definitions, java_check_regular_methods,
10433 java_check_abstract_methods, patch_method_invocation,
10434 check_for_static_method_reference, patch_assignment, patch_binop,
10435 patch_cast, array_constructor_check_entry, patch_return,
10436 patch_conditional_expr): Use xstrdup, not strdup.
10437
10438 * zextract.c (ALLOC): Use xmalloc, not malloc.
10439
10440 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10441
10442 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
10443
10444 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
10445 (do_spec, lang_specific_pre_link, lang_specific_driver,
10446 input_filename, input_filename_length): Don't declare.
10447 (main_class_name, jvgenmain_spec, lang_specific_driver):
10448 Constify a char*.
10449 (lang_specific_driver): All calls to the function pointer
10450 parameter now explicitly call `fatal'.
10451
10452 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
10453
10454 * parse.y (find_applicable_accessible_methods_list): Search
10455 abstract classes as interfaces.
10456
10457 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
10458
10459 * class.c (finish_class): We're now outside a valid method
10460 declaration. Tell the rest of gcc so.
10461
10462 1999-09-08 Bruce Korb autogen@linuxbox.com
10463
10464 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
10465
10466 1999-09-07 Tom Tromey <tromey@cygnus.com>
10467
10468 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
10469 java-array.h.
10470 (decode_signature_piece): Don't emit "::" in JArray<>.
10471 (print_namelet): Only print trailing `;' when printing a class.
10472
10473 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
10474
10475 * java-tree.h: Delete declarations for all tree nodes now moved to
10476 global_trees.
10477 * decl.c: Delete their definitions.
10478
10479 1999-09-04 Mark Mitchell <mark@codesourcery.com>
10480
10481 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
10482 * Makefile.in (OBJS): Add ggc-callbacks.o.
10483 (OBJDEPS): Likewise.
10484
10485 1999-09-03 Tom Tromey <tromey@cygnus.com>
10486
10487 * parse.y (strip_out_static_field_access_decl): Return operand if
10488 it satisfies JDECL_P.
10489
10490 1999-09-02 Tom Tromey <tromey@cygnus.com>
10491
10492 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
10493 Handle nested arrays, like `[[I'.
10494
10495 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10496
10497 * class.c (finish_class): Remove unused parameter, all callers
10498 changed.
10499
10500 * expr.c (build_java_athrow): Change return type to void.
10501 (java_lang_expand_expr): Make sure each case in switch returns a
10502 value.
10503
10504 * java-tree.h (finish_class): Fix prototype to take void args.
10505
10506 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
10507 (main): Issue return from main, not exit.
10508
10509 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
10510
10511 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
10512
10513 * jv-scan.c (main): Issue return from main, not exit.
10514
10515 * parse.y (check_abstract_method_definitions,
10516 java_check_abstract_method_definitions): Add static prototypes.
10517 (java_complete_expand_methods): Fix call to `finish_class'.
10518
10519 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
10520 and `prevpc'.
10521
10522 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10523
10524 * lang.c (language_string): Constify.
10525
10526 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10527
10528 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
10529 Remove hacks for stuff which comes from libiberty.
10530
10531 * Make-lang.in: Likewise.
10532
10533 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
10534
10535 * Makefile.in (xref.o): Depend on xref.c explicitly.
10536
10537 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10538
10539 * java-tree.h (lang_printable_name): Constify a char*.
10540
10541 * lang.c (lang_printable_name): Likewise.
10542
10543 1999-08-27 Jeffrey A Law (law@cygnus.com)
10544
10545 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
10546 comments in C code.
10547
10548 1999-08-26 Tom Tromey <tromey@cygnus.com>
10549
10550 * gjavah.c (print_cxx_classname): Print "::" before qualified
10551 name.
10552
10553 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
10554
10555 * parse.y (lookup_cl): Changed leading comment. Now does its best
10556 to set the column number.
10557 (qualify_ambiguous_name): Take WFL wrappers into account.
10558
10559 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
10560
10561 * verify.c (verify_jvm_instructions): Don't check instruction
10562 validity beyond end of method.
10563
10564 1999-08-25 Tom Tromey <tromey@cygnus.com>
10565
10566 * jvspec.c (lang_specific_driver): Correctly handle --help again.
10567
10568 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10569
10570 * gjavah.c (print_name, print_base_classname, utf8_cmp,
10571 cxx_keyword_subst, generate_access, name_is_method_p,
10572 get_field_name, print_field_name, super_class_name, print_include,
10573 decode_signature_piece, print_class_decls, usage, help,
10574 java_no_argument, version, add_namelet, print_namelet): Add static
10575 prototype.
10576 (print_base_classname, utf8_cmp, cxx_keyword_subst,
10577 name_is_method_p): Constify a char*.
10578 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
10579 Provide a final else clause in an if-else-if.
10580 (print_field_info): Add missing final arg in function call to
10581 `print_field_name'.
10582 (print_method_info, decompile_method, decode_signature_piece,
10583 print_c_decl, print_full_cxx_name, print_stub,
10584 print_mangled_classname, super_class_name, print_include,
10585 add_namelet, add_class_decl, print_class_decls, process_file,
10586 help): Constify a char*.
10587
10588 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
10589 push_int_const, find_constant_wide, find_constant_index,
10590 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
10591 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
10592 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
10593 emit_if, emit_goto, emit_jsr, call_cleanups,
10594 make_class_file_name): Add static prototypes.
10595 (generate_bytecode_return, generate_bytecode_insns): Pass a
10596 NULL_PTR, not a NULL_TREE.
10597
10598 * jv-scan.c: Include "jcf.h".
10599 (main): Declare using DEFUN macro.
10600
10601 * jvspec.c (find_spec_file, lang_specific_pre_link,
10602 lang_specific_driver): Add prototypes.
10603 (find_spec_file): Constify a char*.
10604
10605 * keyword.gperf (hash, java_keyword): Add prototypes.
10606
10607 * lang.c (lang_print_error): Add static prototype.
10608 (lang_init): Prefer memcpy over bcopy to avoid casts.
10609
10610 * lex.c (yylex): Add static prototype.
10611
10612 * parse-scan.y: Include "lex.c" earlier.
10613
10614 * parse.h: Remove redundant declaration for `yylex'.
10615
10616 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
10617 labeled_block_contains_loop_p): Add static prototypes.
10618 (not_accessible_p): Make static to match prototype.
10619
10620 * verify.c (start_pc_cmp): Don't needlessly cast away const.
10621
10622 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10623
10624 * parse.y (check_method_redefinition): Changed leading comment.
10625 (check_abstract_method_definitions): New function.
10626 (java_check_abstract_method_definitions): New function.
10627 (java_check_regular_methods): Call it.
10628 (verify_constructor_super): Fixed indentation.
10629 (lookup_method_invoke): Likewise.
10630
10631 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
10632
10633 * parse.y (method_header): Return a null pointer if the current
10634 class node is null.
10635 (finish_method_declaration): Return if the current function decl
10636 is null.
10637 (source_start_java_method): Likewise.
10638 (java_method_add_stmt): Likewise.
10639
10640 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
10641
10642 * class.c (emit_register_class): Removed unnecessary call to
10643 start_sequence.
10644 * parse.y (labeled_block_contains_loop_p): Removed unused local
10645 variable.
10646
10647 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10648
10649 * parse.y (java_refold): Added prototype.
10650
10651 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10652
10653 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
10654 (java_stabilize_reference): Removed unnecessary `else'.
10655 (java_complete_lhs): Set flag to remember boolean. Call
10656 java_refold. Added comments.
10657 (java_decl_equiv): New function.
10658 (binop_compound_p): Likewise.
10659 (java_refold): Likewise.
10660 (patch_unaryop): Striped static field access assigned to decl and
10661 op. Changed promotion scheme for ++/-- operators.
10662 (search_loop): New function.
10663 (labeled_block_contains_loop_p): Likewise.
10664 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
10665 comment.
10666 (patch_bc_statement): Call search_loop. Fixed comment.
10667
10668 1999-08-14 Anthony Green <green@cygnus.com>
10669
10670 * expr.c (java_lang_expand_expr): Mark static array data as
10671 referenced.
10672
10673 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10674
10675 * jvgenmain.c (main): NUL-terminate name_obstack.
10676
10677 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10678
10679 * check-init.c (check_bool2_init, done_alternative): Add static
10680 prototypes.
10681
10682 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
10683 (add_method, build_utf8_ref, build_class_ref,
10684 append_gpp_mangled_type, layout_class_method): Constify a char*.
10685
10686 * decl.c (push_promoted_type, make_binding_level): Add static
10687 prototypes.
10688 (push_promoted_type, pushdecl): Constify a char*.
10689
10690 * except.c (find_handler_in_range, link_handler,
10691 check_start_handlers): Add static prototypes.
10692
10693 * expr.c (process_jvm_instruction): Constify a char*.
10694
10695 * gjavah.c (main): Constify a char*.
10696
10697 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
10698 Constify a char*.
10699
10700 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
10701 static prototypes.
10702 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
10703 munge, print_ents): Constify a char*.
10704
10705 * jcf-dump.c (disassemble_method): Constify a char*.
10706 (print_constant_pool, print_exception_table): Add static prototypes.
10707 (print_constant, print_exception_table, main, disassemble_method):
10708 Constify a char*.
10709
10710 * jcf-io.c (find_classfile, find_class): Likewise.
10711
10712 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
10713 (set_source_filename, predefined_filename_p): Add static prototypes.
10714 (set_source_filename, get_constant, get_class_constant,
10715 find_in_current_zip): Constify a char*.
10716
10717 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
10718 static prototypes.
10719 (add_entry, add_path, jcf_path_classpath_arg,
10720 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10721
10722 * jcf-reader.c (get_attribute, jcf_parse_preamble,
10723 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
10724 jcf_parse_one_method, jcf_parse_methods,
10725 jcf_parse_final_attributes): Add static prototypes.
10726 (get_attribute): Constify a char*.
10727
10728 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
10729 jcf_dependency_add_target, jcf_path_classpath_arg,
10730 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10731
10732 * jv-scan.c (main): Constify a char*.
10733 (gcc_obstack_init): Add prototype arguments.
10734
10735 * jvgenmain.c (gcc_obstack_init): Likewise.
10736 (main): Constify a char*.
10737
10738 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
10739 static prototypes.
10740 (put_decl_string, lang_print_error): Constify a char*.
10741 (lang_init): Remove redundant extern prototype.
10742
10743 * mangle.c (emit_unicode_mangled_name): Constify a char*.
10744
10745 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
10746 Add static prototypes.
10747 (get_type_from_signature): Constify a char*.
10748
10749 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
10750 Add static prototypes.
10751 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
10752 (verify_jvm_instructions): Constify a char*.
10753
10754 * xref.c (xref_flag_value): Likewise.
10755
10756 * xref.h (xref_flag_value): Likewise.
10757
10758 * zextract.c (makeword, makelong): Add static prototypes.
10759 (makeword, makelong): Constify a uch*.
10760
10761 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10762
10763 * lang.c (java_dummy_print): Constify a char*.
10764 (lang_print_error): Likewise.
10765 (lang_init): Remove redundant prototype for `print_error_function'.
10766 (lang_init_source): Likewise.
10767 (lang_identify): Constify a char*.
10768
10769 1999-08-09 Tom Tromey <tromey@cygnus.com>
10770
10771 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
10772 (WORDS_TO_LONG): Likewise.
10773 (WORDS_TO_DOUBLE): Likewise.
10774
10775 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10776
10777 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
10778
10779 * expr.c (java_stack_pop, java_array_data_offset,
10780 build_java_throw_out_of_bounds_exception, case_identity,
10781 build_java_check_indexed_type): Add static prototypes.
10782 (linenumber_table, expand_invoke, expand_java_field_op,
10783 build_primtype_type_ref, expand_byte_code): Constify a char*.
10784
10785 * java-tree.h (build_primtype_type_ref, linenumber_table):
10786 Constify a char*.
10787 (java_lang_expand_expr): Add prototype.
10788
10789 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
10790 `java_lang_expand_expr'.
10791
10792 * lex.c (java_lex_error): Constify a char*.
10793 (java_get_unicode, java_read_char, java_allocate_new_line,
10794 java_unget_unicode, java_sneak_unicode): Prototype.
10795
10796 * parse-scan.y (current_class, package_name, method_declarator,
10797 report_class_declaration, yyerror): Constify a char*.
10798
10799 * parse.h (java_report_errors): Prototype.
10800 (yyerror): Constify a char*.
10801
10802 * parse.y (classitf_redefinition_error, check_modifiers,
10803 parse_jdk1_1_error, lookup_package_type,
10804 lookup_package_type_and_set_next, get_printable_method_name,
10805 purify_type_name): Constify a char*.
10806 (build_super_invocation, maybe_generate_finit,
10807 verify_constructor_super, parser_add_interface,
10808 add_superinterfaces, jdep_resolve_class, note_possible_classname,
10809 java_complete_expand_methods, java_expand_finals,
10810 cut_identifier_in_qualified, java_stabilize_reference,
10811 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
10812 merge_string_cste): Prototype.
10813 (single_type_import_declaration, yyerror,
10814 variable_redefinition_error, build_array_from_name,
10815 build_unresolved_array_type, check_class_interface_creation,
10816 resolve_class, complete_class_report_errors,
10817 note_possible_classname, read_import_dir,
10818 find_in_imports_on_demand, resolve_package, fix_constructors,
10819 check_deprecation, lookup_method_invoke,
10820 maybe_build_primttype_type_ref, array_constructor_check_entry):
10821 Constify a char*.
10822 (java_complete_expand_methods, java_expand_finals): Make static.
10823 (convert_narrow): Remove static prototype.
10824
10825 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
10826
10827 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
10828
10829 1999-08-02 Richard Henderson <rth@cygnus.com>
10830
10831 * decl.c: Include defaults.h instead of expr.h.
10832 * parse.y: Likewise.
10833
10834 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
10835
10836 * java/decl.c (start_java_method): Change all uses of
10837 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
10838 Ensure expr.h is included.
10839 * java/expr.c (pop_arguments): Ditto.
10840 * java/parse.y (expand_start_java_method): Ditto.
10841
10842 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10843
10844 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
10845
10846 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
10847
10848 * decl.c: Include "function.h".
10849 * except.c: Likewise.
10850 * parse.y: Likewise.
10851 * Makefile.in: Update dependencies.
10852
10853 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10854
10855 * expr.c (build_java_soft_divmod): Provide a default case in switch.
10856 (java_lang_expand_expr): Mark parameters `target', `tmode' and
10857 `modifier' with ATTRIBUTE_UNUSED.
10858
10859 * gjavah.c (process_file): Add braces around ambiguous `else'.
10860
10861 * jcf-dump.c (print_access_flags, localvar_free): Change return
10862 type to void.
10863
10864 * parse.y (java_complete_expand_method): Initialize variable
10865 `exception_copy'.
10866 (resolve_qualified_expression_name): Likewise for `field_decl'.
10867 (patch_method_invocation): Likewise for `class_to_search'.
10868 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
10869 (patch_assignment): Likewise for `lhs_type'.
10870
10871 * verify.c (verify_jvm_instructions): Remove unused variable
10872 `caller'.
10873
10874 1999-07-25 Richard Henderson <rth@cygnus.com>
10875
10876 * decl.c (va_list_type_node): New.
10877
10878 1999-07-25 Anthony Green <green@cygnus.com>
10879
10880 * gjavah.c (print_stub): New function.
10881 (METHOD_IS_NATIVE): New macro.
10882 (print_mangled_classname): Make static.
10883 (HANDLE_END_FIELD): Don't emit fields during stub generation.
10884 (process_file): Perform stub generation.
10885 (HANDLE_METHOD): Don't emit class decls during stub
10886 generation.
10887 (HANDLE_END_METHOD): Take into account stub generation.
10888 (print_method_info): Handle stub generation.
10889 (print_stub): New function.
10890 (print_cxx_classname): Make signature consistant with others.
10891 (help): Describe -stubs option.
10892 (main): Create stub file.
10893 (version): Use version.c.
10894 (print_full_cxx_name): New function.
10895 (print_c_decl): Use print_full_cxx_name.
10896
10897 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10898
10899 * check-init.c (check_init): Handle MAX_EXPR.
10900
10901 1999-07-15 Andrew Haley <aph@cygnus.com>
10902
10903 * lang.c (flag_use_divide_subroutine): New variable.
10904 * typeck.c: (convert_ieee_real_to_integer): Bounds check
10905 fp-to-integer conversion.
10906 (convert): Call convert_ieee_real_to_integer when flag_fast_math
10907 is not set.
10908
10909 * expr.c (build_java_soft_divmod): New function.
10910 (build_java_binop): Call build_java_soft_divmod if
10911 flag_use_divide_subroutine is set.
10912 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10913 soft_lrem_node: new builtin functions.
10914 (init_decl_processing) Initialize the new builtins.
10915 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10916 soft_lrem_node: new builtin functions.
10917 (build_java_soft_divmod): New function.
10918 * parse.y: Call build_java_soft_divmod if
10919 flag_use_divide_subroutine is set.
10920 * parse.c: Rebuilt.
10921
10922 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
10923 a --specs= arg) even if not linking.
10924 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
10925 -fuse-divide-subroutine
10926
10927 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
10928
10929 * parse.y (resolve_and_layout): Check methods only once.
10930 (resolve_qualified_expression_name): Verify thrown exceptions
10931 compatibility.
10932 (check_thrown_exceptions): Reject exceptions thrown in
10933 initializer. Error message tuned.
10934
10935 1999-07-14 Andrew Haley <aph@cygnus.com>
10936
10937 * expr.c (expand_expr): Do not return the last statement in a
10938 block as the block's value.
10939
10940 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
10941
10942 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
10943 CALL_EXPR, to avoid order of evaluation changes.
10944
10945 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
10946
10947 * parse.y (qualify_ambiguous_name): Do not use
10948 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
10949
10950 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10951
10952 * check-init.c (check_init): Handle MAX_EXPR.
10953 * expr.c (force_evaluation_order): Force method call arguments to
10954 be evaluated in left-to-right order.
10955 * parse.y (qualify_ambiguous_name): Loop again to qualify
10956 NEW_ARRAY_EXPR properly.
10957
10958 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
10959
10960 * parse.y (patch_invoke): Resolve unresolved invoked method
10961 returned type.
10962 (qualify_ambiguous_name): STRING_CST to qualify expression for
10963 type name resolution.
10964
10965 1999-06-24 Andrew Haley <aph@cygnus.com>
10966
10967 * class.c (finish_class): Whenever a deferred method is
10968 output, rescan the list of methods to see if a new candidate for
10969 output can be found.
10970
10971 1999-06-28 Tom Tromey <tromey@cygnus.com>
10972
10973 * jvspec.c (lang_specific_driver): Recognize --help.
10974
10975 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10976
10977 * parse.y (resolve_package): Fixed bogus return statement.
10978 (patch_method_invocation): Resolve method invocation beginning with
10979 a package name qualifier.
10980
10981 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10982
10983 * Make-lang.in (java.stage1): Depend on stage1-start.
10984 (java.stage2): Likewise for stage2-start.
10985 (java.stage3): Likewise for stage3-start.
10986 (java.stage4): Likewise for stage4-start.
10987
10988 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
10989
10990 * parse.y (java_complete_lhs): When doing cross referencing, don't
10991 try to keep file location on a WFL expanded as a CALL_EXPR.
10992
10993 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10994
10995 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
10996 compiling to class file a void method with an empty method body.
10997 As a side effect, the bytecode backend will generate the
10998 appropriate `return' instruction.
10999
11000 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11001
11002 * parse.y (lookup_package_type_and_set_next): New function prototype.
11003 (resolve_package): Search current and imported packages.
11004 (lookup_package_type_and_set_next): New function.
11005
11006 1999-06-22 Andrew Haley <aph@cygnus.com>
11007
11008 * verify.c (verify_jvm_instructions): Check for pending blocks
11009 before invalid PC test and opcode switch, not after.
11010
11011 1999-06-21 Andrew Haley <aph@cygnus.com>
11012
11013 * except.c (find_handler_in_range): The upper limit for exception
11014 ranges is exclusive, not inclusive: (start <= pc < end).
11015 (link_handler): find child pointer which points to outer by
11016 searching sibling list: previous code incorrectly assumed that
11017 outer->outer->first_child must point to outer.
11018 * verify.c (verify_jvm_instructions): FIXME added to code for
11019 `athrow'.
11020 (verify_jvm_instructions): Do not assume that the last block
11021 processed in a subroutine is a block which ends with a `ret'
11022 instruction. With some control flows it is possible that the last
11023 block ends with an `athrow'.
11024
11025 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11026
11027 * parse.y (qualify_ambiguous_name): Reorganized the post
11028 evaluation of non WFL leading expression nodes.
11029
11030 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11031
11032 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
11033 CONVERT_EXPR.
11034
11035 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11036
11037 * parse.y (qualify_ambiguous_name): Handle qualified expression
11038 beginning with a STRING_CST.
11039
11040 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11041
11042 * parse.y (register_fields): Set DECL_INITIAL on both
11043 pre-initialized static and public fields.
11044 (resolve_field_access): Static field access expressions to always
11045 use pointer types.
11046 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
11047 qualification. CONVERT_EXPR to be resolved as an expression name.
11048 (java_complete_lhs): Identify and access qualified final
11049 initialized field in switch statement case expression.
11050 (fold_constant_for_init): Pre-initialized field decl constant to
11051 be folded.
11052
11053 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11054
11055 * parse.y (note_possible_classname): Mark returned node with
11056 QUALIFIED_P only if the original class name contained a '/'.
11057
11058 1999-06-05 Anthony Green <green@cygnus.com>
11059
11060 * Make-lang.in (gcjh): More parallel build fixes.
11061
11062 1999-06-03 Mike Stump <mrs@wrs.com>
11063
11064 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
11065
11066 1999-06-02 Anthony Green <green@cygnus.com>
11067
11068 * except.c (link_handler): Chain exception handlers in order.
11069
11070 1999-06-02 Anthony Green <green@cygnus.com>
11071
11072 * expr.c (expand_byte_code): Fill unreachable bytecode regions
11073 with nops and process as usual in order to always set correct EH
11074 ranges. Emit detailed warnings about unreachable bytecodes.
11075
11076 1999-06-02 Anthony Green <green@cygnus.com>
11077
11078 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
11079 constant.
11080
11081 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
11082
11083 * parse.y (lookup_field_wrapper): Unified returned value to NULL
11084 or the searched field decl.
11085
11086 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
11087
11088 * parse.y (fold_constant_for_init): Convert numerical constant
11089 values to the type of the assigned field.
11090
11091 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11092
11093 * expr.c (lookup_field): Relaxed the test on class loading error
11094 detection.
11095 * parse.y (fold_constant_for_init): Enabeled old code.
11096
11097 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
11098
11099 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
11100 decide the validity of the cast of a java.lang.Cloneable reference
11101 to an array.
11102 (patch_conditional_expr): Fixed first argument passed to
11103 binary_numeric_promotion.
11104
11105 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
11106
11107 * parse.y (qualify_ambiguous_name): Take into account that a
11108 CONVERT_EXPR might specify a type as a WFL.
11109
11110 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11111
11112 * parse.y (patch_assignment): Save the rhs before using it as an
11113 argument to _Jv_CheckArrayStore.
11114
11115 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11116
11117 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
11118
11119 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11120
11121 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
11122 floating point literal only when the exponent indicator has been
11123 parsed.
11124
11125 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11126
11127 * parse.y (formal_parameter:): Construct argument tree list
11128 element even if a yet unsupported final parameter was encountered.
11129
11130 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
11131
11132 * parse.y (finish_method_declaration): Issue errors for native or
11133 abstract methods declared with a method body, as well as for non
11134 native or non abstract methods with no method body.
11135
11136 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11137
11138 * class.c (build_utf8_ref): Initialize variable `field'.
11139
11140 * decl.c (init_decl_processing): Initialize variable `field'.
11141
11142 * expr.c (build_known_method_ref): Mark parameters `method_type',
11143 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
11144 (process_jvm_instruction): Likewise for parameter `length'.
11145
11146 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
11147 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
11148 ATTRIBUTE_UNUSED.
11149
11150 * parse.y (maybe_generate_clinit): Remove unused variable
11151 `has_non_primitive_fields'.
11152 (find_in_imports_on_demand): Initialize variables `node_to_use'
11153 and `cl'.
11154 (patch_binop): Likewise for variable `prom_type'.
11155 (patch_unaryop): Likewise for variable `prom_type'.
11156
11157 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
11158
11159 * xref.c (xref_table): Add missing initializer.
11160
11161 1999-05-14 Tom Tromey <tromey@cygnus.com>
11162
11163 * java-except.h (struct eh_range): Removed unused `next' member.
11164 * verify.c (verify_jvm_instructions): Call check_nested_ranges
11165 after adding all exception handlers. Sort exception ranges in
11166 order of start PC.
11167 (struct pc_index): New structure.
11168 (start_pc_cmp): New function.
11169 * except.c (add_handler): Return `void'. Don't call link_handler;
11170 instead construct an ordinary linked list and do range
11171 coalescing.
11172 (check_nested_ranges): New function.
11173 (link_handler): Changed interface to allow merging of eh_ranges.
11174 Split overlapping ranges. Return `void'.
11175
11176 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11177
11178 * parse.y (constructor_block_end:): New rule, tagged <node>.
11179 (constructor_body:): Use `constructor_block_end' instead of
11180 `block_end'.
11181
11182 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11183
11184 * parse.y (statement_nsi:): Pop `for' statement block.
11185 (java_complete_lhs): Labeled blocks containing no statement are
11186 marked as completing normally.
11187
11188 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11189
11190 * xref.c (xref_set_current_fp): New function, defined.
11191 * xref.h (xref_set_current_fp): New function, prototyped.
11192
11193 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11194
11195 * check-init.c (check_init): Take into account that
11196 LABELED_BLOCK_STMT can be empty.
11197
11198 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11199
11200 * parse.y (java_check_regular_methods): Warning check on not
11201 overriding methods with default access in other packages does not
11202 apply to `<clinit>'.
11203 (java_complete_lhs): If block body is an empty_stmt_node, replace
11204 it by NULL_TREE. This prevents gcc from generating an irrelevant
11205 warning.
11206
11207 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11208
11209 * check-init.c (check_init): Removed code accepting to see things
11210 falling through default:, when doing xrefs.
11211 * java-tree.h (do_not_fold): New global variable, declared.
11212 * parse.y (do_not_fold): New global variable, defined.
11213 (java_complete_expand_method): Set `do_not_fold' to the value of
11214 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
11215 and reinstall them after them have been purged; do not check for
11216 initializations; do not issue missing return errors.
11217 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
11218 when doing xrefs.
11219 (patch_binop): Skip the fold part when doing xrefs.
11220 (build_string_concatenation): Skip the concatenation part when
11221 doing xrefs.
11222 (patch_synchronized_statement): Do not generate a try-finally when
11223 doing xrefs.
11224 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
11225 and keep the location where the throw was seen.
11226 * typeck.c (convert): When `do_not_fold' is set, do not attempt
11227 any treatment on the converted node an simply return a NOP_EXPR of
11228 the targeted type.
11229 * xref.c (xref_get_data): New function, defined.
11230 * xref.h (xref_get_data): New function, declared.
11231 (XREF_GET_DATA): Use xref_get_data.
11232
11233 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11234
11235 * gjavah.c (print_include): Cast the result of `strlen' to int
11236 when comparing against a signed value.
11237 (add_namelet): Likewise.
11238
11239 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11240
11241 * expr.c (expand_invoke): Mark parameter `nargs' with
11242 ATTRIBUTE_UNUSED.
11243 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
11244
11245 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
11246 ATTRIBUTE_UNUSED.
11247
11248 * jcf-reader.c (get_attribute): Cast a value to long
11249 when comparing against a signed expression. Likewise.
11250
11251 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
11252 HOST_BITS_PER_CHAR.
11253
11254 1999-05-11 Andrew Haley <aph@cygnus.com>
11255
11256 * parse.y (source_end_java_method): If the current method contains
11257 any exception handlers, force asynchronous_exceptions: this is
11258 necessary because signal handlers in libjava may throw exceptions.
11259 * decl.c (end_java_method): Ditto.
11260
11261 1999-05-11 Tom Tromey <tromey@cygnus.com>
11262
11263 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
11264 flags.
11265 * jvspec.c (THREAD_NAME): Removed.
11266 (GC_NAME): Likewise.
11267 (MATHLIB): Likewise.
11268 (WITHLIBC): Likewise.
11269 (GCLIB): Likewise.
11270 (THREADLIB): Likewise.
11271 (MATH_LIBRARY): Likewise.
11272 (lang_specific_driver): Don't add `-l' options to command line.
11273 Instead, add a single --specs option. Recognize `-L' options and
11274 use them to search for spec file.
11275 (find_spec_file): New function.
11276 (SPEC_FILE): New define.
11277
11278 1999-05-11 Dave Brolley <brolley@cygnus.com>
11279
11280 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
11281 cpplib-enabled build.
11282
11283 1999-05-05 Per Bothner <bothner@cygnus.com>
11284
11285 * class.c (make_field_value): DECL_INITIAL may be a string literal;
11286 temporarily zero it while calling rest_of_decl_compilation.
11287
11288 * java-tree.h (string_ptr_type_node): Add declaration.
11289 * decl.c: Define and initialize string_ptr_type_node.
11290 * parse.y (patch_string_cst): Use string_ptr_type_node.
11291
11292 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
11293 * parse.y (for_statement): Now unconditionally exit_block.
11294 (finish_labeled_statement): No longer exit_block if for-loop.
11295 (patch_loop_statement): Check harder if the loop is already labeled.
11296
11297 * parse.y (patch_initialized_static_field): Removed function.
11298 (maybe_generate_clinit): Removed special handling for interfaces.
11299 (java_complete_expand_methods): Do a preliminary java_complete_tree
11300 on <clinit> to determine if it can be removed.
11301 (java_complete_expand_method): Remove special handling for <clinit>.
11302 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
11303 optimize if we get back empty_stmt_node.
11304 For MODIFY_EXPR, re-do checking of static initializers.
11305 (fold_constant_for_init): Don't return immediate if VAR_DECL.
11306 For VAR_DECL, pass correct context.
11307
11308 * verify.c (verify_jvm_instructions): Better error messages.
11309
11310 1999-05-03 Tom Tromey <tromey@cygnus.com>
11311
11312 * parse-scan.y (interface_declaration): Call
11313 report_class_declaration for interfaces.
11314
11315 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
11316
11317 * Makefile.in: Remove -v from bison command lines.
11318
11319 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11320
11321 * check-init.c (check_init): Exclude a case of error when doing
11322 xrefs.
11323 * class.c (layout_class_method): Don't generate the error message
11324 twice when compiling from source.
11325 * lang-options.h: Added `-Wredundant-modifers' and
11326 `-Wunusupported-jdk11' flags and help text.
11327 * lang.c (lang_decode_option): Added support for
11328 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
11329 flag_static_local_jdk11 and flag_redundant set accordingly.
11330 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
11331 * parse.h (EXPR_WFL_ADD_COL): New macro.
11332 (DECL_END_SOURCE_LINE): Likewise.
11333 (DECL_INHERITED_SOURCE_LINE): Likewise.
11334 * parse.y (static_ref_err): New function, prototyped.
11335 (CCB_TK): Now tagged <operator>.
11336 (class_body:): Remember the location of the closing '}' of a class
11337 definition when doing xrefs.
11338 (block:): Likewise.
11339 (block_end:): Likewise.
11340 (create_class): Remember the location of the inherited class
11341 identifier when doing xrefs.
11342 (register_fields): Added test on first operand of `init' before
11343 testing it TREE_CODE.
11344 (method_header): Store the location of the class identifier in the
11345 class decl when doing xrefs.
11346 (finish_method_declaration): Don't combine first/last method line
11347 when doing xref.
11348 (java_check_regular_methods): Warning check on not overriding
11349 methods with default access on other packages move before check on
11350 static methods. Initialization of `aflags' also moved up.
11351 (resolve_expression_name): Call static_ref_err to report the error.
11352 (static_ref_err): New function, implemented.
11353 (resolve_field_access): Returned simplified static field access
11354 when doing xrefs.
11355 (resolve_qualified_expression_name): Check for illegal use of
11356 static fields in a non static context. Call static_ref_err to
11357 report error in various places.
11358 (java_complete_tree): Do not fold initialized static fields when
11359 doing xrefs.
11360 (java_complete_lhs): Likewise.
11361
11362 1999-04-29 Anthony Green <green@cygnus.com>
11363
11364 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
11365 create internal labels.
11366 (lookup_label): Ditto.
11367
11368 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11369
11370 * class.c (layout_class_method): Generate <clinit>'s rtl for
11371 interfaces.
11372 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
11373 for interfaces' <clinit>.
11374 * expr.c (lookup_field): Search for fields in interfaces.
11375 (expand_invoke): Fixed indentation.
11376 (expand_java_field_op): Likewise. Use IS_CLINIT.
11377 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
11378 (IS_CLINIT): New macro.
11379 * parse.y (type_declaration:): Call maybe_generate_clinit after an
11380 interface was parsed.
11381 (maybe_generate_clinit): Don't generate if the current class is an
11382 interface with only fields of primitive types.
11383 (reset_method_name): Use IS_CLINIT.
11384 (java_complete_expand_method): Expand <clinit> when it exists for
11385 interfaces. Use IS_CLINIT.
11386 (resolve_expression_name): Use DECL_CONTEXT instead of
11387 current_class to build static field references.
11388 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
11389 ARRAY_REF when doing xreferencing.
11390 (check_final_assignment): Fixed typo in leading comment. Use
11391 IS_CLINIT.
11392 (patch_array_ref): Don't fully expand array references when
11393 xreferencing.
11394 (patch_return): Use IS_CLINIT.
11395 (patch_throw_statement): Likewise.
11396
11397 1999-04-22 Tom Tromey <tromey@cygnus.com>
11398
11399 * Make-lang.in (JAVA_SRCS): Added check-init.c.
11400
11401 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
11402
11403 * decl.c (predef_filenames, predef_filenames_size): New globals
11404 (init_decl_processing): predef_filenames and predef_filenames_size
11405 initialized.
11406 * java-tree.h (predef_filenames, predef_filenames_size): Declared
11407 extern.
11408 * jcf-parse.c (predefined_filename_p): New function.
11409 (yyparse): Check that files on the command line are specified only
11410 once and issue a warning otherwise.
11411 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
11412 * parse.y (source_end_java_method): Nullify NOP method bodies, to
11413 avoid a gcc warning with -W -Wall turned on.
11414 (java_expand_classes): Abort if errors were encountered.
11415 (java_complete_lhs): If the cross reference flag is set, wrap
11416 field DECL node around a WFL when resolving expression name.
11417
11418 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11419
11420 * lang.c (lang_decode_option): Fixed returned value when parsing
11421 `-fxref=...' and `-Wall'.
11422 * parse.y (source_end_java_method): Do not generate code when
11423 flag_emit_xref is set.
11424 (resolve_expression_name): Do not build static field access when
11425 flag_emit_xref is set.
11426 (resolve_field_access): No special treatment on `length' when
11427 flag_emit_xref is set. Do not build qualified static field access
11428 when flag_emit_xref is set.
11429 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
11430 when flag_emit_xref is set.
11431 (patch_assignment): Do not generate array store runtime check when
11432 flag_emit_xref is set.
11433 * xref.c (xref_flag_value): Fixed function declaration
11434 indentation.
11435 (xset_set_data): New function.
11436 * xref.h (xref_set_data): Added prototype for new function.
11437 (typedef struct xref_flag_table): New field data.
11438 (XREF_GET_DATA): New macro.
11439
11440 1999-04-19 Tom Tromey <tromey@cygnus.com>
11441
11442 * xref.h (enum): Removed trailing comma.
11443
11444 * parse.y (resolve_qualified_expression_name): Added missing
11445 `break'.
11446
11447 1999-04-15 Anthony Green <green@cygnus.com>
11448
11449 * gjavah.c: New prototypes for java_float_finite and
11450 java_double_finite.
11451
11452 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11453
11454 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
11455 references.
11456
11457 1999-04-06 Jeffrey A Law (law@cygnus.com)
11458
11459 * Makefile.in (TREE_H): Add tree-check.h.
11460 (RTL_H): Add genrtl.h.
11461
11462 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11463
11464 * parse.y (patch_assignment): Added ArrayStoreException runtime
11465 check.
11466
11467 1999-04-06 Per Bothner <bothner@cygnus.com>
11468
11469 * expr.c (pop_type_0): New function.
11470 (pop_type): Use pop_type_0.
11471 * java-tree.h (pop_type_0): New declaration.
11472 * verify.c (verify_jvm_instructions): Check return instructions.
11473
11474 * parse.y (patch_binop): Don't fold if non-constant and emiting
11475 class files.
11476
11477 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11478
11479 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
11480
11481 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
11482 (main_jcf): Don't define.
11483 (process_file): Don't set `main_jcf'.
11484
11485 * java-tree.h (main_jcf): Don't declare.
11486
11487 * jcf-parse.c (main_jcf): Add static definition.
11488
11489 * lang.c (main_jcf): Don't define.
11490
11491 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11492
11493 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
11494
11495 * decl.c (copy_lang_decl): Likewise for `bcopy'.
11496
11497 * jcf-depend.c: Include "config.h", not <config.h>.
11498
11499 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
11500 `bcopy' to PTR.
11501
11502 * jcf-path.c: Include "config.h", not <config.h>.
11503
11504 * lex.c: Don't include various system header files.
11505 (java_init_lex): Cast the argument of `bzero' to PTR
11506
11507 * parse-scan.y (java_push_parser_context): Likewise.
11508
11509 * parse.y (java_push_parser_context): Likewise.
11510 (patch_bc_statement): Match format specifier to variable argument.
11511
11512 * xref.c: Don't include <stdio.h>.
11513
11514 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11515
11516 * parse.y (struct parser_ctxt *ctxp): Now global.
11517 (declare_local_variables): Use WFL compound value for the
11518 declaration source line value, when doing cross-referencing.
11519
11520 1999-03-31 Tom Tromey <tromey@cygnus.com>
11521
11522 * gjavah.c (print_field_info): Allow constants of other types.
11523 (print_include): Generate include when new name is proper prefix
11524 of already printed name.
11525 (add_namelet): Likewise.
11526 (cxx_keyword_subst): New function.
11527 (print_method_info): Use it.
11528 (print_field_name): New function.
11529 (get_field_name): New function.
11530 (print_field_info): Use get_field_name and print_field_name.
11531
11532 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11533
11534 * Makefile.in (keyword.h): Generate using gperf language 'C', not
11535 'KR-C', so gperf uses the `const' keyword on strings.
11536
11537 * keyword.gperf (java_keyword): Const-ify a char*.
11538
11539 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11540
11541 * parse.y (patch_bc_statement): Fixed identation and a bogus
11542 `printf' format.
11543
11544 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11545
11546 * parse.y (patch_assignment): Allow static variables in other
11547 classes to be assigned.
11548
11549 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11550
11551 * class.c (maybe_add_interface): Remove unused variable
11552 `interface_binfo'.
11553 (make_class_data): Use = for assignment, not ==. Likewise.
11554 (emit_register_classes): Remove unused variable `decl'.
11555
11556 * lex.c: Fix comment so as not to contain an embedded `/*'.
11557
11558 * verify.c (verify_jvm_instructions): Remove unused variable
11559 `self_type'.
11560
11561 1999-03-27 Per Bothner <bothner@cygnus.com>
11562
11563 * parse.y (complete_loop_body): Rename to finish_loop_body.
11564 (complete_labeled_statement): Rename to finish_labeled_statement.
11565 (complete_for_loop): Rename to finish_for_loop.
11566 (complete_method_declaration): Rename to finish_method_declaration.
11567
11568 * java-tree.h (continue_identifier_node): New global node.
11569 * decl.c: Define and initialize continue_identifier_node.
11570 * parse.y (generate_labeled_block): Remove - no longer needed.
11571 (build_loop_body): Use continue_identifier_node for continue block.
11572 (finish_labeled_statement): Also do pop_labeled_block actions.
11573 (java_complete_lhs): POP_LOOP even if error.
11574 (build_labeled_block): Special handling for continue_identifier_node.
11575 (patch_loop_statement): Re-organize.
11576 (patch_bc_statement): Re-write.
11577
11578 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11579
11580 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
11581 using a WFL compound value.
11582 * parse.y (xref.h): Include.
11583 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
11584 WFL compound value.
11585 (register_fields): Set WFL compound value to lineno if doing
11586 xrefs.
11587 (java_complete_expand_method): Call expand_xref if flag_emit_xref
11588 is set.
11589 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
11590 * xref.h (expand_xref): Prototype renamed from xref_generate.
11591
11592 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11593
11594 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
11595 (GET_CURRENT_BLOCK): New macro.
11596 * parse.y (current_static_block): New global variable.
11597 (method_body:): Define action.
11598 (complete_method_declaration): Set current_function_decl to NULL
11599 when work on the current method is done.
11600 (declare_local_variables): Use GET_CURRENT_BLOCK.
11601 (java_method_add_stmt): Likewise.
11602 (java_complete_expand_method): Disable the use of `this' when
11603 expanding <clinit>.
11604 (enter_a_block): If no current method exist, use
11605 current_static_block to link static initializer blocks.
11606 (exit_block): Rewritten to use current_static_block when no current
11607 method decl exists.
11608 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
11609 (patch_return): Forbid the use of `return' in static initializers.
11610 (patch_throw_statement): Fixed indentation. Issue specific error
11611 for uncaught thrown checked exception in static initializer
11612 blocks. Removed FIXME.
11613
11614 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
11615
11616 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
11617 Link gcj from gcc.o.
11618
11619 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11620
11621 * parse.y (find_applicable_accessible_methods_list): When dealing
11622 with interface: ensure that a given interface or java.lang.Object
11623 are searched only once.
11624
11625 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11626
11627 * gjavah.c (print_c_decl): Remove unused argument `flags'.
11628
11629 * jcf-dump.c (print_access_flags): Add braces around if-else.
11630
11631 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
11632 COMBINE_INPUTS.
11633
11634 * lex.c (build_wfl_node): Add static prototype.
11635
11636 * lex.h (build_wfl_node): Remove static prototype.
11637
11638 * parse.y: Include lex.c early enough to declare everything needed.
11639 Ensure calls to `build_wfl_node' pass the proper arguments.
11640 (create_class): Remove unused variable `super_decl'.
11641 (get_printable_method_name): Initialize variable `name'.
11642
11643 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11644
11645 * Changelog: Fixed 1999-03-22 typos.
11646 * lang.c (lang_decode_option): Fixed typo in error string in the
11647 XARG section.
11648
11649 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11650
11651 * Makefile.in (JAVA_OBJS): Added entry xref.o.
11652 (xref.o): New rule.
11653 * java-tree.h (flag_emit_xref): Declared extern.
11654 * lang.c (xref.h): Included.
11655 (flag_emit_xref): New global variable.
11656 (lang_decode_option): Added support for -fxref.
11657 * xref.c: Created.
11658 * xref.h: Likewise.
11659
11660 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
11661
11662 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
11663 linked with.
11664
11665 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11666
11667 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
11668 $(srcdir)/../system.h and $(JAVA_TREE_H).
11669 (jcf-io.o): Depend on $(JAVA_TREE_H).
11670 (mangle.o): Likewise.
11671
11672 * check-init.c (check_cond_init): Add static prototype.
11673
11674 * class.c (build_java_method_type, hashUtf8String,
11675 make_field_value, get_dispatch_vector, get_dispatch_table,
11676 append_gpp_mangled_type, mangle_static_field): Likewise.
11677 (strLengthUtf8): Hide unused definition.
11678 (hashUtf8String): Const-ify.
11679 (make_field_value): Un-ANSI-fy.
11680
11681 * constants.c: Move inclusion of jcf.h above java-tree.h.
11682 (set_constant_entry, find_class_or_string_constant,
11683 find_name_and_type_constant, get_tag_node,
11684 build_constant_data_ref): Add static prototype.
11685
11686 * decl.c (push_jvm_slot, builtin_function,
11687 lookup_name_current_level): Likewise.
11688 (builtin_function): Const-ify.
11689
11690 * except.c (expand_start_java_handler, expand_end_java_handler):
11691 Add static prototype.
11692
11693 * expr.c (flush_quick_stack, push_value, pop_value,
11694 java_stack_swap, java_stack_dup, build_java_athrow,
11695 build_java_jsr, build_java_ret, expand_java_multianewarray,
11696 expand_java_arraystore, expand_java_arrayload,
11697 expand_java_array_length, build_java_monitor, expand_java_pushc,
11698 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
11699 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
11700 expand_compare, expand_test, expand_cond, expand_java_goto,
11701 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
11702 expand_java_field_op, java_push_constant_from_pool): Likewise.
11703
11704 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
11705 (build_java_arraynull_check): Mark parameters `node' and `type'
11706 with ATTRIBUTE_UNUSED.
11707 (note_label): Likewise for parameter `current_pc'.
11708 (expand_java_call, expand_java_ret): Hide unused definition.
11709
11710 * java-tree.h (make_class, build_constants_constructor,
11711 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
11712 init_outgoing_cpool, register_class, emit_register_classes,
11713 java_layout_seen_class_methods): Prototype.
11714 (unicode_mangling_length): Const-ify.
11715 (append_gpp_mangled_name, append_gpp_mangled_classtype,
11716 emit_unicode_mangled_name, format_int, format_uint,
11717 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
11718 jcf_print_utf8_replace, open_class): Prototype.
11719
11720 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
11721 <stdio.h>. Include tree.h/java-tree.h.
11722 (utf8_equal_string usage, process_class): Add static prototype.
11723 (open_class): Don't prototype this here.
11724 (utf8_equal_string): Match arguments to format specifiers.
11725 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
11726 TABLE_SWITCH, disassemble_method): Likewise.
11727
11728 * jcf-io.c: Include tree.h/java-tree.h.
11729 (open_class, find_classfile, jcf_print_utf8,
11730 jcf_print_utf8_replace): Const-ify.
11731
11732 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
11733 parse_class_file): Add static prototype.
11734 (find_in_current_zip): Match definition to existing static
11735 prototype.
11736
11737 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
11738 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
11739 finish_jcf_block, define_jcf_label, get_jcf_label_here,
11740 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
11741 write_chunks, adjust_typed_op, generate_bytecode_conditional,
11742 generate_bytecode_return, perform_relocations, init_jcf_state,
11743 init_jcf_method, release_jcf_state, generate_classfile):
11744 Add static prototype.
11745 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
11746 (make_class_file_name): Const-ify.
11747
11748 * jcf.h (find_classfile): Const-ify.
11749
11750 * jv-scan.c (reset_report): Remove prototype.
11751
11752 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
11753 (error): Rewrite to allow varargs.
11754
11755 * lang.c (lang_f_options): Const-ify.
11756
11757 * lex.c (java_parse_escape_sequence): Add static prototype.
11758 (java_allocate_new_line): Match definition to existing static
11759 prototype.
11760
11761 * mangle.c Include tree.h/java-tree.h.
11762 (unicode_mangling_length, emit_unicode_mangled_name,
11763 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
11764
11765 * parse.h (jdep_code): Remove trailing comma in enumeration.
11766 (java_get_line_col): Move prototype outside of !JC1_LITE test.
11767 (reset_report): Add prototype.
11768
11769 * verify.c (push_pending_label, merge_types): Add static
11770 prototypes.
11771
11772 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
11773
11774 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11775
11776 * parse.y (find_applicable_accessible_methods_list): Extend the
11777 search to superinterfaces when relevant.
11778 (search_applicable_methods_list): New function.
11779
11780 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
11781
11782 * class.c (unmangle_classname): Implemented stricter testing
11783 before setting the QUALIFIED_P flag on an identifier.
11784
11785 1999-03-16 Per Bothner <bothner@cygnus.com>
11786
11787 * parse.y (java_complete_lhs): Call force_evaluation_order
11788 after patch_newarray.
11789 (patch_binop): Don't call fold if there are side effects.
11790
11791 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
11792
11793 * parse.y (java_stabilize_reference): Use save_expr instead of
11794 building a SAVE_EXPR node.
11795 (java_complete_lhs): Patch the resulting string of the `+='
11796 operator (if necessary) and complete the RHS after having built
11797 the cast.
11798
11799 1999-03-15 Per Bothner <bothner@cygnus.com>
11800
11801 * class.c (make_class): Don't set CLASS_P here (because
11802 this function is also called by build_java_array_type).
11803 (push_class): Set CLASS_P here instead.
11804 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
11805
11806 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
11807 context. If the context is class, perfer "super" over "synchronized".
11808 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
11809
11810 * parse.y (create_class): Don't call parser_check_super here;
11811 it is not robust. Always wait until later.
11812
11813 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
11814 match what JDK 1.2 does), but don't set ACC_PUBLIC.
11815
11816 1999-03-13 Per Bothner <bothner@cygnus.com>
11817
11818 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
11819 * lex.h (UNGETC): Change misleading macro.
11820
11821 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11822
11823 * parse.y (java_stabilize_reference): Return NODE when patching a
11824 COMPOUND_EXPR.
11825 (java_complete_lhs): Put parenthesis around truth values.
11826
11827 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11828
11829 * class.c (layout_class_method): Don't make rtl for interface
11830 methods.
11831 * parse.h (GET_TYPE_NAME): New macro.
11832 * parse.y (if_then_statement:): Fixed indentation.
11833 (if_then_else_statement:): Likewise.
11834 (for_statement:): Fixed spacing.
11835 (try_statement:): Fixed indentation.
11836 (create_interface): Don't force interfaces to be abstract.
11837 (method_header): Abstract methods are OK in interfaces.
11838 (declare_local_variables): Fixed typo in comment.
11839 (java_complete_expand_method): Fixed indentation.
11840 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
11841 non accessible fields.
11842 (java_stabilize_reference): New function.
11843 (java_complete_lhs): Fixed indentation. Use
11844 java_stabilize_reference in compound assignment. Insert the
11845 cast. If not processing `+' fix string constants before processing
11846 binop.
11847
11848 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11849
11850 * constants.c (find_class_or_string_constant): Cast variable `j'
11851 to a `jword' when comparing against one.
11852
11853 * expr.c (java_lang_expand_expr): Remove unused variables
11854 `has_finally_p' and `op0'.
11855
11856 * gjavah.c (print_field_info): Cast a value to jint when comparing
11857 against one. Likewise for a jlong.
11858 (add_namelet): Likewise cast a `sizeof' to an int when comparing
11859 against a signed quantity.
11860
11861 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
11862 (print_signature): Don't needlessly dereference variable `str'
11863
11864 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
11865 `max_locals' with ATTRIBUTE_UNUSED.
11866 (jcf_parse_class): Likewise for variable `index'.
11867
11868 * parse.h (reverse_jdep_list): Remove static prototype.
11869
11870 * parse.y (build_jump_to_finally): Remove prototype and definition.
11871 (reverse_jdep_list): Add static prototype.
11872
11873 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
11874 `assignment' and `expr_decl'.
11875
11876 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
11877
11878 1999-03-12 Andrew Haley <aph@cygnus.com>
11879
11880 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
11881 we'll need a directory separator and a null character.
11882
11883 1999-03-10 Per Bothner <bothner@cygnus.com>
11884
11885 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
11886
11887 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
11888
11889 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
11890 interfaces.
11891
11892 1999-03-05 Per Bothner <bothner@cygnus.com>
11893
11894 * lex.c (java_parse_end_comment): Take extra parameter (next char).
11895
11896 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
11897
11898 * class.c (layout_class_method): A static method in a base class
11899 is never overridden, so treat it like it doesn't exist.
11900 However, do complain about private non-static method overriding
11901 public static method.
11902
11903 * parse.y: Don't set unused INITIALIZED_P flag.
11904 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
11905
11906 * parse.y (find_expr_with_wfl): Optimize tail-calls.
11907 (build_array_from_name): Re-order &index[string] to &string[index].
11908
11909 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
11910 error_mark (it might catch more errors, but it is more likely to lose).
11911
11912 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11913
11914 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
11915 (parse-scan.o): Depend on toplev.h.
11916
11917 * class.c (make_method_value): Add prototype. Make it static.
11918 Remove unused second argument, caller changed.
11919
11920 * expr.c (java_lang_expand_expr): Remove unused variable
11921 `return_label'.
11922
11923 * java-tree.h: Don't prototype find_in_current_zip.
11924 Add prototypes for verify_constant_pool, start_java_method,
11925 end_java_method, give_name_to_locals, expand_byte_code,
11926 open_in_zip, set_constant_value, find_constant1, find_constant2,
11927 find_utf8_constant, find_string_constant, find_class_constant,
11928 find_fieldref_index, find_methodref_index, write_constant_pool,
11929 count_constant_pool_bytes and encode_newarray_type.
11930
11931 * jcf-dump.c: Remove unused variable `LONG_temp'.
11932
11933 * jcf-parse.c: Include parse.h.
11934 (jcf_parse_source): Remove unused parameter, all callers changed.
11935 (jcf_figure_file_type): Add static prototype.
11936 (find_in_current_zip): Likewise. Also remove unused parameter,
11937 all callers changed.
11938 (read_class): Initialize variable `saved_pos'.
11939
11940 * jcf-reader.c (jcf_parse_preamble): Mark variables
11941 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
11942
11943 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
11944 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
11945 (java_parse_doc_section): Initialize variable `seen_star'.
11946 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
11947 (java_lex_error): Mark parameters `msg' and `forward' with
11948 ATTRIBUTE_UNUSED.
11949 (java_get_line_col): Mark parameters `filename' and `line' with
11950 ATTRIBUTE_UNUSED.
11951
11952 * parse-scan.y: Include toplev.h.
11953 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
11954
11955 * parse.h: use `struct JCF', not plain `JCF'.
11956 (java_parser_context_save_global, java_expand_classes
11957 java_parser_context_restore_global, java_parse): Add prototypes.
11958
11959 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
11960 `node'.
11961
11962 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
11963
11964 * check-init.c (check_init): COPYN takes word count, not bit count.
11965
11966 1999-02-26 Per Bothner <bothner@cygnus.com>
11967
11968 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
11969 explicit build_decl. (Avoids crash in reload when optimizing.)
11970
11971 1999-02-25 Per Bothner <bothner@cygnus.com>
11972
11973 * decl.c (complete_start_java_method): Handle synchronized method
11974 even when compiling from bytecode.
11975
11976 1999-02-26 Tom Tromey <tromey@cygnus.com>
11977
11978 * gjavah.c (add_class_decl): Only generate `#include' if outer
11979 class is not the name of the class we are processing. Correctly
11980 append `.h' in #include.
11981 (process_file): Clean up newlines around generated `#include's.
11982 (decode_signature_piece): Correctly handle inner classes.
11983 (struct include): New structure.
11984 (all_includes): New global.
11985 (print_include): New function.
11986 (add_class_decl): Use it.
11987 (process_file): Likewise.
11988 (add_class_decl): Generate include for java-array.h if array
11989 seen.
11990 (process_file): Don't generate java-array.h include.
11991
11992 * gjavah.c (add_namelet): Check for standard package names here.
11993 (add_class_decl): Don't check for standard package names here.
11994
11995 1999-02-25 Tom Tromey <tromey@cygnus.com>
11996
11997 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
11998 When reading a zip file, only use strncmp if both strings are
11999 bigger than the buffer length. Initialize `k' when looping
12000 through zip file.
12001
12002 1999-02-24 Tom Tromey <tromey@cygnus.com>
12003
12004 * gjavah.c (struct namelet): New structure.
12005 (add_namelet): New function.
12006 (print_namelet): New function.
12007 (print_class_decls): Use add_namelet and print_namelet to generate
12008 namespaces and not classes.
12009 (method_printed): New global.
12010 (HANDLE_END_METHOD): Examine method_printed.
12011 (print_method_info): Set method_printed when required. Print
12012 error if function to be ignored is marked virtual. Handle $finit$
12013 method.
12014 (METHOD_IS_FINAL): New macro.
12015 (print_field_info): Use it.
12016 (HANDLE_METHOD): Clear method_printed.
12017 (method_pass): New global.
12018 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
12019 (process_file): Do two passes over both fields and methods.
12020 (HANDLE_METHOD): Examine method_pass.
12021 (root): New global.
12022 (add_class_decl): New function.
12023 (print_class_decls): Don't scan over entire constant pool.
12024
12025 1999-02-23 Tom Tromey <tromey@cygnus.com>
12026
12027 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
12028 disable linking in that case.
12029
12030 1999-02-20 Tom Tromey <tromey@cygnus.com>
12031
12032 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
12033 not 0x1f.
12034
12035 1999-02-21 Per Bothner <bothner@cygnus.com>
12036
12037 * decl.c (build_result_decl), java-tree.h: New method.
12038 (complete_start_java_method): Handle synchronized methods.
12039 Don't build DECL_RESULT here. (Ordering dependency problem.)
12040 (start_java_method): Call build_result_decl here instead ...
12041 * parse.y (java_complete_expand_method): ... and here.
12042 (expand_start_java_method): Don't call complete_start_java_method here.
12043 (java_complete_expand_method): Call it here instead.
12044 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
12045 * java-tree.h: ... here.
12046
12047 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
12048 * parse.y (java_complete_lhs): Don't call force_evaluation_order
12049 for ARRAY_REF - it doesn't work when array bounds are checked.
12050 (patch_array_ref): Handle it here instead.
12051
12052 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
12053
12054 1999-02-19 Per Bothner <bothner@cygnus.com>
12055
12056 Force left-to-right evaluation of binary operations etc.
12057 * expr.c (force_evaluation_order), java-tree.h: New function.
12058 * parse.y (java_complete_lhs): Pass binary operations, procedure
12059 calls, and ARRAY_REFs to force_evaluation_order.
12060 (various): Set TREE_SIDE_EFFECTS more carefully.
12061
12062 Tolerate random (non-UTF8) encoding in comments without complaining.
12063 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
12064 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
12065
12066 * parse.y (resolve_qualified_expression_name): Handle error_mark.
12067 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
12068
12069 * parse.y (java_complete_lhs): Ignore an empty statement in a
12070 COMPOUND_EXPR. Don't complain about empty statement after return.
12071
12072 1999-02-19 Per Bothner <bothner@cygnus.com>
12073
12074 * parse.y (obtain_incomplete_type): Don't wrap unknown types
12075 in TREE_LIST - just chain the POINTER_TYPEs together.
12076 (resolve_class): If type already resolved, return decl.
12077 After resolving, update TREE_TYPE(class_type), and name (if array).
12078 * parse.h (do_resolve_class), parse.y: Make non-static.
12079 * class.c (maybe_layout_super_class): Take this_class argument.
12080 Do do_resolve_class if necessary.
12081 (layout_class, layout_class_methods): Adjust calls appropriately.
12082 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
12083 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
12084 * typeck.c (build_java_array_type): Don't call layout_class.
12085
12086 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12087
12088 * parse.y (check_pkg_class_access): Allow private class access
12089 within the same package.
12090 (strip_out_static_field_access_decl): New function.
12091 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
12092 operator argument before testing its nature.
12093
12094 1999-02-03 Per Bothner <bothner@cygnus.com>
12095
12096 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
12097 (TRY_EXPR): Simplify - it no longer has a finally clause.
12098 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
12099 Simpler handling of TRY_EXPR, which no longer has a finally clause.
12100 * expr.c (java_lang_expand_expr): Likewise.
12101 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
12102 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
12103 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
12104 (build_try_statement): Remove finally parameter and handling.
12105 (build_try_finally_statement): New function.
12106 (patch_try_statement): No longer need to support finally clause.
12107 (try_statement): Update grammar action rules.
12108 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
12109 Simpler handling of TRY_EXPR, which no longer has a finally clause.
12110
12111 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
12112
12113 * jcf-parse.c (get_constant): Add braces around computation of 'd'
12114 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
12115
12116 1999-02-17 Andrew Haley <aph@cygnus.com>
12117
12118 * class.c (build_utf8_ref): Back out broken patch which was
12119 intended to to output signatures using '.' as a separator.
12120
12121 * class.c (make_class_data): Output signatures using '.' as a
12122 separator, rather than '/'.
12123 (mangled_classname): Likewise.
12124 (make_field_value): Likewise.
12125 (make_method_value): Likewise.
12126 * constants.c (alloc_class_constant): Likewise.
12127 * expr.c (build_invokeinterface): Likewise.
12128
12129 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12130
12131 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
12132 of an ancient workaround.
12133
12134 1999-02-10 Jeffrey A Law (law@cygnus.com)
12135
12136 * jvspec.c (xmalloc): Kill the prototype. It does not belong
12137 here anymore.
12138
12139 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12140
12141 * lex.c (yylex): Encode \0 as UTF8.
12142
12143 1999-02-10 Tom Tromey <tromey@cygnus.com>
12144
12145 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
12146 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
12147 (libgcj_zip): Renamed.
12148 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
12149 LIBJAVA_ZIP_FILE.
12150 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
12151
12152 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
12153 (GC_NAME): Renamed -lgc to -lgcjgc.
12154
12155 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12156
12157 * lex.c (java_lang_cloneable): Initialize.
12158 * parse.y (java_lang_cloneable): New static variable.
12159 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
12160 doing one more qualification round.
12161 (valid_ref_assignconv_cast_p): Reject null source or
12162 destination. Allow an array to be cast into java.lang.Cloneable.
12163 (patch_cast): Swapped two first arguments to first call to
12164 valid_ref_assignconv_cast_p.
12165
12166 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12167
12168 * parse.h: DECL_P renamed JDECL_P.
12169 * parse.y: DECL_P replaced by JDECL_P.
12170 (build_array_from_name): Always use pointer's type.
12171 (patch_bc_statement): Extra code to search continue target in a
12172 for loop. Fixed comments. Continue target is current loop when
12173 unlabeled.
12174
12175 1999-02-05 Andrew Haley <aph@cygnus.com>
12176
12177 * class.c (make_class_data): The superclass of an interface should
12178 be null, not class Object.
12179
12180 * lex.c (java_lex): Sign extend hex literals.
12181
12182 1999-02-04 Andrew Haley <aph@cygnus.com>
12183
12184 * class.c (build_utf8_ref): Output signatures using '.' as a
12185 separator, rather than '/'.
12186 (make_class_data): Likewise.
12187
12188 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
12189
12190 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
12191 mkstemp.o. Get them from libiberty now.
12192
12193 1999-02-02 Jeffrey A Law (law@cygnus.com)
12194
12195 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
12196
12197 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12198
12199 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
12200 from libiberty.h
12201
12202 1999-02-02 Per Bothner <bothner@cygnus.com>
12203
12204 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
12205 * jcf-write.c (generate_bytecode_return): New function.
12206 (generate_bytecode_insns): Use it, for RETURN_EXPR.
12207
12208 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
12209 generate special [fd]const_[01] instructions.
12210
12211 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
12212
12213 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
12214 handling OPCODE_lookupswitch or OPCODE_tableswitch.
12215
12216 1999-02-01 Per Bothner <bothner@cygnus.com>
12217
12218 * parse.y (patch_method_invocation): Handle calling static methods,
12219 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
12220
12221 * parse.y (java_complete_lhs): Don't complain about unreachable
12222 exit condition in a do-while statement.
12223
12224 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12225
12226 * lex.c (java_read_char): Fixed utf8 decoding.
12227 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
12228 range.
12229 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
12230 comments. Local variable `all_primitive' is gone. Broadened
12231 acceptance of `0' to floating point targets. `long' can now be
12232 widened to `double' or `float'.
12233 (valid_method_invocation_conversion_p): Added leading
12234 comment. Fixed tabulation.
12235 (build_string_concatenation): Optimize out left or right empty
12236 string constants.
12237
12238 1999-01-28 Per Bothner <bothner@cygnus.com>
12239
12240 * jcf-write.c (localvar_alloc): Only emit entry for
12241 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
12242 (generate_bytecode_insns): Only call put_linenumber if
12243 debug_info_level > DINFO_LEVEL_NONE.
12244 * jvspec.c (lang_specific_driver): If no -O* or -g* option
12245 is specified, add -g1 (for compatibility wih javac).
12246
12247 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
12248
12249 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
12250 gjavah.o, check-init.o, jv-scan.o
12251
12252 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12253
12254 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
12255
12256 * gjavah.c: Include config.h and system.h.
12257
12258 * javaop.h (inline): Don't define, its handled by system.h.
12259 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
12260 from `inline' to `static inline'.
12261
12262 * jcf.h (inline): Don't define, its handled by system.h.
12263
12264 * lex.c (inline): Likewise.
12265
12266 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
12267
12268 * lang-specs.h: Map -Qn to -fno-ident.
12269
12270 1999-01-29 Richard Henderson <rth@cygnus.com>
12271
12272 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
12273
12274 1999-01-29 Tom Tromey <tromey@cygnus.com>
12275
12276 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
12277 then cast it to Object before calling `append' method.
12278
12279 1999-01-28 Per Bothner <bothner@cygnus.com>
12280
12281 * check-init.c (check_bool2_init, check_bool_init, check_init):
12282 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
12283 * jcf-write.c (generate_bytecode_insns): Likewise.
12284
12285 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12286
12287 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
12288 * parse.y (patch_cast): Allow a boolean to be cast into a
12289 boolean.
12290
12291 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12292
12293 * parse.y: (class_declaration:): Fixed indentation.
12294 (class_member_declaration:): Extra `;' after field declaration now
12295 accepted.
12296 (interface_declaration:): Removed debug messages in error reports.
12297 (patch_binop): Nodes created and returned inherit the orignal
12298 node's COMPOUND_ASSIGN_P flag value.
12299 (patch_cast): Fix cast from char to floating point.
12300
12301 1999-01-25 Andrew Haley <aph@cygnus.com>
12302
12303 * except.c, java-except.h (expand_resume_after_catch): new
12304 function.
12305 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
12306 to branch back to main flow of control after a catch block.
12307
12308 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12309
12310 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
12311 $(srcdir)/../system.h.
12312 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
12313 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
12314 (jcf-write.o): Likewise.
12315 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
12316 (mangle.o): Depend on $(srcdir)/../toplev.h.
12317 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
12318 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
12319
12320 * class.c: Include output.h and parse.h.
12321 (mangled_classname): Add the `const' keyword to a char*.
12322 (find_named_method): Hide unused function definition.
12323 (build_utf8_ref): Change type of variable `c' to unsigned char.
12324 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
12325 (build_class_ref): Add the `const' keyword to a char*.
12326 (layout_class_method): Remove unused variable `buf'.
12327
12328 * decl.c (find_local_variable): Remove unused variable `rtl'.
12329 (pushdecl): Likewise for variables `different_binding_level' and
12330 `oldglobal'.
12331 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
12332 (maybe_build_cleanup): Likewise for parameter `decl'.
12333
12334 * except.c (expand_start_java_handler): Mark parameter `range'
12335 with ATTRIBUTE_UNUSED.
12336
12337 * expr.c: Include except.h.
12338 (pop_type): Remove unused variable `i'.
12339 (pop_value): Likewise for variables `n_words' and `i'.
12340 (expand_java_arrayload): Likewise for variable `convert'.
12341 (java_lang_expand_expr): Likewise for variables `op0', `type',
12342 `mode', `unsignedp', `node' and `elements'.
12343 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
12344 `eh_ranges'.
12345 (process_jvm_instruction): Add a `const' qualifier to a char*.
12346
12347 * gjavah.c (output_directory): Add the `const' keyword to a char*.
12348 (temp_directory): Likewise.
12349 (print_c_decl): Likewise.
12350 (print_method_info): Likewise.
12351 (decode_signature_piece): Likewise.
12352 (print_mangled_classname): Likewise.
12353
12354 * java-except.h: Provide prototypes for maybe_start_try,
12355 maybe_end_try and add_handler.
12356
12357 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
12358 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
12359 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
12360 init_expr_processing, push_super_field, init_class_processing,
12361 can_widen_reference_to, class_depth, verify_jvm_instructions,
12362 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
12363 set_local_type, merge_type_state, push_type, load_type_state,
12364 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
12365 emit_unicode_mangled_name): Add prototypes.
12366
12367 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
12368 (print_signature_type): Use ISDIGIT, not isdigit.
12369 (print_signature): Remove unused variable `j'.
12370
12371 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
12372 int when comparing against one.
12373
12374 * jcf-parse.c: Include toplev.h.
12375
12376 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
12377 (localvar_free): Remove unused variable `i'.
12378 (generate_bytecode_conditional): Likewise for variable `kind'.
12379
12380 * jv-scan.c: Include config.h and system.h. Remove redundant
12381 OS header and gansidecl.h includes.
12382 (warning): Add the `const' keyword to a char*. Also add
12383 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
12384 __STDC__, when determining whether to use ANSI-isms.
12385 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
12386 (xmalloc): Don't redundantly prototype here.
12387 (main): Remove unused parameter `envp'. Also fix the arguments
12388 passed to function `fatal' to match the format specifier.
12389
12390 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
12391
12392 * mangle.c: Include toplev.h.
12393 (emit_unicode_mangled_name): Declare parameter `len'.
12394
12395 * parse.y (parse_warning_context): Add the `const' keyword to a
12396 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
12397 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
12398 (issue_warning_error_from_context): Add the `const' keyword to
12399 a char*.
12400 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
12401 not `__STDC__' for whether to use ANSI-isms.
12402
12403 * typeck.c (incomplete_type_error): Mark parameters `value' and
12404 `type' with ATTRIBUTE_UNUSED.
12405 (parse_signature_type): Use ISDIGIT, not isdigit.
12406
12407 * verify.c (check_pending_block): Add the `const' keyword to a char*.
12408 (verify_jvm_instructions): Likewise. Remove unused variables
12409 `field_name' and `default_val'.
12410
12411 * zextract.c: Include config.h and system.h. Remove redundant
12412 OS header includes.
12413
12414 * zipfile.h: Prototype `read_zip_archive'.
12415
12416 1999-01-21 Andrew Haley <aph@cygnus.com>
12417
12418 * typeck.c (convert): Allow conversions to void type: some
12419 optimizations in gcc do this.
12420
12421 1999-01-21 Andrew Haley <aph@cygnus.com>
12422
12423 * typeck.c (convert_ieee_real_to_integer): New function.
12424 (convert): When not using fast-math and using hardware fp, convert
12425 an IEEE NaN to zero.
12426
12427 1999-01-18 Andrew Haley <aph@cygnus.com>
12428
12429 * parse.y (patch_binop): Do a type conversion from signed to
12430 unsigned and then back to signed when a ">>>" is found.
12431
12432 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12433
12434 * java-tree.h: (check_for_initialization): Added prototype.
12435 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
12436 * parse.y (do_resolve_class): Removed unused locals.
12437 (read_import_dir): Likewise.
12438 (resolve_qualified_expression_name): Array creation
12439 expressions are valid primary expressions.
12440 (qualify_ambiguous_name): Likewise.
12441 (patch_synchronized_statement): Removed unused local.
12442
12443 1999-01-17 Jeffrey A Law (law@cygnus.com)
12444
12445 * Makefile.in (zextract.o): Add dependencies.
12446
12447 * Makefile.in: Do not put ^Ls at the start of a line.
12448
12449 1999-01-15 Per Bothner <bothner@cygnus.com>
12450
12451 * expr.c (process_jvm_instruction): Coerce to correct Throwable
12452 sub-type the result of the call that gets the exception value.
12453
12454 * parse.y (java_complete_expand_methods): If flags_syntax_only,
12455 don't call finish_class.
12456
12457 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
12458 clear found before continuing.
12459
12460 * verify.c (verify_jvm_instructions): On an array load, allow
12461 and handle top of stack to be TYPE_NULL.
12462
12463 * gjavah.c (generate_access): Translate Java package private or
12464 protected access to C++ public, but with a comment.
12465
12466 1999-01-13 Andrew Haley <aph@cygnus.com>
12467
12468 * expr.c (generate_name): Name prefix changed to avoid clashes
12469 with assembler temp labels.
12470
12471 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
12472 MODIFY_EXPR. Without this, code for the assignment may not be
12473 generated at all and the synchronized statement will read an
12474 uninitialized variable.
12475
12476 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12477
12478 * class.c (maybe_layout_super_class): Fixed returned value.
12479 * lex.c: Added 1999 to the copyright.
12480 (java_init_lex): Initialize java_lang_imported.
12481 * lex.h: Added 1999 to the copyright.
12482 * parse.h: Added 1999 to the copyright.
12483 (REGISTER_IMPORT): Fixed typo in trailing macro.
12484 (CURRENT_OSB): New macro.
12485 (struct parser_ctxt): New fields osb_depth, osb_limit.
12486 * parse.y (java_lang_id): New global variable.
12487 (type_import_on_demand_declaration): Don't import java.lang.* twice.
12488 (array_creation_expression:): Use CURRENT_OSB.
12489 (dims:): Uses a stack to keep track of array dimensions.
12490 (cast_expression:): Use CURRENT_OSB.
12491 (find_expr_with_wfl): Return NULL if node found doesn't meet the
12492 conditions.
12493 (register_fields): Fixed typos in comment.
12494 (check_method_redefinition): Fixed comment indentation.
12495 (java_check_regular_methods): Set saved found wfl to NULL after
12496 having reinstalled it in the previously found DECL_NAME.
12497
12498 1999-01-10 Richard Henderson <rth@cygnus.com>
12499
12500 * gjavah.c (java_float_finite): Use a union to do type punning.
12501 (java_double_finite): Likewise.
12502
12503 1999-01-09 Per Bothner <bothner@cygnus.com>
12504
12505 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
12506 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
12507 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
12508 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
12509 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
12510 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
12511
12512 1999-01-08 Per Bothner <bothner@cygnus.com>
12513
12514 * check-init.c (check_init): If compiling to native, we don't
12515 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
12516
12517 1999-01-08 Tom Tromey <tromey@cygnus.com>
12518
12519 * parse-scan.y (variable_declarator_id): Set or increment
12520 bracket_count.
12521 (bracket_count): New global.
12522 (formal_parameter): Handle case where bracket pairs trail variable
12523 declarator id.
12524
12525 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
12526
12527 * jcf-parse.c (yyparse): variable len changed from a char to an
12528 int to prevent overflow.
12529
12530 1999-01-06 Per Bothner <bothner@cygnus.com>
12531
12532 * java-tree.h: Declare read_class.
12533 * jcf-parse.c (read_class): New function.
12534 (load_class): Now just call read_class.
12535
12536 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
12537 * jcf-parse.c (parse_source_file): Declare save_error_count,
12538 which is needed by java_parse_abort_on_error macro,
12539 * parse.y (java_layout_classes, java_expand_classes): Likewise.
12540
12541 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
12542 constructor, if initializing a static field.
12543 (patch_new_array_init): Set TREE_CONSTANT if it is.
12544 * expr.c (java_lang_expand_expr): For a static array constructor
12545 of primitive elements, allocate the array itself statically.
12546 Disabled until we can set the vtable field statically.
12547
12548 * check-init.c: New file. Checks for definite assignment.
12549 * Makefile.in (JAVA_OBJS): Add check-init.o.
12550 * parse.y (java_complete_expand_method): Call check_for_initialization.
12551 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
12552
12553 1999-01-06 Graham <grahams@rcp.co.uk>
12554
12555 * parse.y : include system.h instead of including
12556 standard headers directly with the exception of <dirent.h>.
12557
12558 1999-01-06 Per Bothner <bothner@cygnus.com>
12559
12560 * lex.h: Moved static function declarations to lex.c,
12561 to shut up some -Wall warnings.
12562 * lex.c: Static function declarations moved here.
12563 * jcf-dump.c: Small fixes to shut up -Wall warnings.
12564
12565 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12566
12567 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
12568
12569 1998-12-22 Per Bothner <bothner@cygnus.com>
12570
12571 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
12572 * verify.c (verify_jvm_instructions): Fix off-by-one error.
12573
12574 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
12575 (localvar_alloc): Change return type to void,
12576 (emit_unop): Remove unused variable size.
12577
12578 * jcf-write.c (struct jcf_block): Add new union.
12579 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
12580 (call_cleanups): New functions.
12581 (struct jcf_partial): New fields num_finalizers and return_value_decl.
12582 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
12583 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
12584 * lang.c (lang_init): Call using_eh_for_cleanups.
12585 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
12586 completing operands to patch_synchronized_statement.
12587 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
12588 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
12589 WITH_CLEANUP_EXPR instead of TRY_EXPR.
12590
12591 1998-12-20 John F. Carr <jfc@mit.edu>
12592
12593 * Make-lang.in: Comment out control-Ls; they upset some makes.
12594
12595 1998-12-18 Tom Tromey <tromey@cygnus.com>
12596
12597 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
12598 consistently.
12599
12600 1998-12-17 Tom Tromey <tromey@cygnus.com>
12601
12602 * parse.y (DIR_SEPARATOR): New define.
12603 (check_class_interface_creation): Use it.
12604
12605 * parse-scan.y (report_main_declaration): Recognize
12606 `java.lang.String' in argument to main.
12607
12608 1998-12-16 Per Bothner <bothner@cygnus.com>
12609
12610 * parse.y (create_interface): Remove bogus test.
12611
12612 1998-12-16 Per Bothner <bothner@cygnus.com>
12613
12614 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
12615 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
12616
12617 1998-12-16 Tom Tromey <tromey@cygnus.com>
12618
12619 * parse-scan.y (qualified_name): Use correct sprintf format.
12620
12621 1998-12-15 Tom Tromey <tromey@cygnus.com>
12622
12623 * gjavah.c (print_field_info): Changed how most negative number is
12624 printed.
12625
12626 1998-12-14 Per Bothner <bothner@cygnus.com>
12627
12628 * parse.y (fold_constant_for_init): New function.
12629 (resolve_expression_name): Don't replace static final
12630 constant-initialized fields by its value.
12631 (java_complete_lhs): New. Same as java_complete_tree, except does
12632 not replace static final constant-initialized fields by their values.
12633 (register_fields): If there is an initializer, set DECL_INITIAL and
12634 MODIFY_EXPR_FROM_INITIALIZATION_P.
12635 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
12636 Only call patch_initialized_static_field if
12637 MODIFY_EXPR_FROM_INITIALIZATION_P.
12638 (patch_initialized_static_field): If not valid constant, clear
12639 DECL_INITIAL.
12640
12641 * parse.y (lookup_field_wrapper): Fix thinko.
12642
12643 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
12644 set and restore global lineno.
12645
12646 1998-12-14 Tom Tromey <tromey@cygnus.com>
12647
12648 * gjavah.c (print_field_info): If value to print is the smallest
12649 value of its size, then print as hex to avoid later warnings from
12650 C++ compiler.
12651
12652 1998-12-14 Tom Tromey <tromey@cygnus.com>
12653
12654 * gjavah.c (decompile_method): Decompile `return null'.
12655 (process_file): Generate `#pragma interface'.
12656 (method_declared): New global.
12657 (print_method_info): Set it.
12658 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
12659 (print_method_info): Handle abstract methods.
12660
12661 1998-12-13 Per Bothner <bothner@cygnus.com>
12662
12663 * parse.y (patch_method_invocation): If class_decl is null
12664 (e.g. an array type), use original type.
12665
12666 * parse.y (check_thrown_exceptions): Temporary hack to suppress
12667 errors about uncaught exception from clone (of array, specifically).
12668
12669 1998-12-13 Tom Tromey <tromey@cygnus.com>
12670
12671 * gjavah.c (decompile_method): Handle all types of `return'
12672 opcode. Decompile `return this' and `return'.
12673 (method_access): New global.
12674 (print_method_info): Set it.
12675 (decompile_method): Don't decompile a synchronized method.
12676
12677 1998-12-13 Tom Tromey <tromey@cygnus.com>
12678
12679 * jcf-reader.c (jcf_parse_one_method): Recognize
12680 HANDLE_END_METHOD.
12681 * gjavah.c (HANDLE_END_METHOD): New macro.
12682 (HANDLE_CODE_ATTRIBUTE): New macro.
12683 (decompile_method): New function.
12684 (print_method_info): Don't print `;\n' at end of function decl.
12685 Include java-opcodes.h.
12686 (decompiled): New global.
12687
12688 1998-12-12 Per Bothner <bothner@cygnus.com>
12689
12690 * class.c (build_class_ref): Handle PRIMTYPE.class if
12691 flag_emit_class_files.
12692 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
12693 if flag_emit_class_files.
12694 * parse.y (java_complete_tree): Pre-liminary support for
12695 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
12696
12697 * parse.y (patch_synchronized_statement): Don't call monitorexit
12698 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
12699
12700 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
12701
12702 * zipfile.h (opendir_in_zip): New declaration.
12703 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
12704 (opendir_in_zip): New function, using code from open_in_zip.
12705 (open_in_zip): Call opendir_in_zip.
12706 (find_class): Remove no-longer-used do_class_file parameter,
12707 but add source_ok parameter. Change logic so if we find a .java file,
12708 we don't look for .class in later classpath emtries.
12709 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
12710 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
12711 * gjavah.c: Update call to find_class.
12712 * jcf-dump.c: Likewise.
12713
12714 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
12715 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
12716 nothing if body is empty_stmt_node.
12717 Various little fixes so SP gets correctly adjusted.
12718 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
12719 For CALL_EXPR, test if static first.
12720 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
12721 such as the ones we create for Object and Class.
12722 Set and restore current_function_decl.
12723 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
12724 (note_possible_classname): New function.
12725 (read_import_entry): Removed. Merged with read_import_dir.
12726 (read_import_dir): Don't call find_class - that only gives us
12727 the first classpath entry having the needed package.
12728 Use the struct buffer data structure from buffer.h.
12729 (read_import_dir, find_in_imports_on_demand): The remembered
12730 class names now use '.' (not '/') as package separator.
12731
12732 * parse.y (java_complete_expand_methods): Call write_classfile
12733 here, and not in java_expand_classes (which only gets first class).
12734
12735 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
12736
12737 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
12738 (register_fields): If a static fields has an initializer, just
12739 chain it on ctxp->static_initialized, and handle later.
12740 (java_complete_expand_methods): Force <clinit> first.
12741 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
12742 - it's already been completed.
12743 (patch_initialized_static_field): New function.
12744 (java_complete_field): Call it.
12745
12746 1998-12-12 Per Bothner <bothner@cygnus.com>
12747
12748 * expr.c (encode_newarray_type, build_new_array): New functions.
12749 * java-tree.h: Declare build_new_array.
12750 * jcf-write.c (patch_newarray): Use build_new_array.
12751
12752 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
12753 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
12754
12755 * parse.y (patch_new_array_init): Re-organize.
12756 Now is passed the actual array (pointer) type of the value.
12757 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
12758 (patch_array_constructor): Removed - merged into patch_new_array_init.
12759 (java_complete_tree): Update patch_new_array_init.
12760
12761 * jcf-write.c (find_constant_index): New function.
12762 (generate_bytecode_insns): Use find_constant_index.
12763 (generate_classfile): Use find_constant_index for ConstantValue.
12764
12765 1998-12-11 Tom Tromey <tromey@cygnus.com>
12766
12767 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
12768 * decl.c (init_decl_processing): Renamed dtable -> vtable.
12769 * class.c (make_class_data): Renamed dtable -> vtable, and
12770 dtable_method_count -> vtable_method_count.
12771
12772 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12773
12774 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
12775 global variables, initialized.
12776 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
12777 Declared new global variables.
12778 * lex.c (java_lex): Return long_zero_node, float_zero_node,
12779 double_zero_node, integer_zero_node upon direct matching.
12780 * parse.y (purify_type_name): Added function prototype.
12781 (duplicate_declaration_error_p): Consider new_type as potentially
12782 being a incomplete type. Use purify_type_name on type string.
12783 (method_header): saved_type: unused variable removed. Don't figure
12784 return type if method name is invalid.
12785 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
12786 processed by patch_unaryop.
12787 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
12788 increment/decrement node into its original type after binary
12789 numeric promotion on its operands.
12790
12791 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12792
12793 * parse.y (array_initializer:): Array init operand is NULL_TREE
12794 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
12795 now an error. Fixed indentation problems.
12796 (patch_string): Handle error_mark_node as an argument.
12797 (patch_new_array_init): Fixed indentation problems.
12798 (array_constructor_check_entry): Removed check on null wfl_value.
12799 Return an error if wfl_value's walk returns an error.
12800
12801 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12802
12803 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
12804 * lex.c (java_lex): Remember column position before advancing one
12805 token. Retain location information on OCB_TK.
12806 * lex.h (typedef struct java_lc): Added new field.
12807 * parse.h (GET_SKIP_TYPE): New macro.
12808 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
12809 * parse.y (build_new_array_init, patch_new_array_init,
12810 patch_array_constructor, maybe_build_array_element_wfl,
12811 array_constructor_check_entry): New function prototypes.
12812 (switch_block:): Tagged <node>.
12813 (OCB_TK): Tagged <operator>.
12814 (array_initializer:): Installed actions.
12815 (variable_initializer): Build location information on element if
12816 necessary.
12817 (switch_statement:): Fixed indentation typo.
12818 (switch_block:): Redefined default action.
12819 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
12820 (patch_assignment): Removed duplicate code.
12821 (maybe_build_array_element_wfl, build_new_array_init,
12822 patch_new_array_init, patch_array_constructor,
12823 array_constructor_check_entry): New functions.
12824
12825 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12826
12827 * parse.y (array_initializer): Tagged <node>.
12828 (variable_initializer:): Use default rule.
12829 (array_initializer:): Defined actions.
12830 (variable_initializers:): Likewise.
12831 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
12832 non-static field accesses.
12833 (patch_invoke): Fixed indentation typo.
12834 (java_complete_tree): Likewise.
12835 (build_labeled_block): Changed leading comment. Generate an error
12836 in case of duplicate loop labels.
12837 (patch_conditional_expr): Patch results of string concatenation
12838 operations.
12839
12840 1998-12-06 Per Bothner <bothner@cygnus.com>
12841
12842 * constants.c (find_methodref_index): When the class is an interface,
12843 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
12844
12845 * decl.c (finit_identifier_node): Use "$finit$", rather than
12846 "<finit>" (which Sun's verifier rejects).
12847 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
12848 (generate_field_initialization_code): Removed.
12849 (fix_constructors) Don't add call to $finit$ here (wrong order).
12850 (patch_method_invocation): Add $finit$ call here.
12851
12852 * java-tree.h (CALL_USING_SUPER): New macro.
12853 * parse.y (patch_invoke): Remove im local variable.
12854 (patch_method_invocation, patch_invoke): Don't pass super parameter.
12855 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
12856 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
12857
12858 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
12859
12860 * parse.y (java_complete_tree): Don't complain about unreachable
12861 statement if it is empty_stmt_node.
12862
12863 * jcf-write.c (find_constant_wide): New function.
12864 (push_long_const): Use find_constant_wide.
12865
12866 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
12867 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
12868 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
12869 Emit invokeinterface when calling an interface method.
12870 Emit invokespecial also when calling super or private methods.
12871
12872 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
12873
12874 1998-12-06 Per Bothner <bothner@cygnus.com>
12875
12876 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
12877
12878 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
12879
12880 * java-tree.h (java_layout_seen_class_methods): New function
12881 prototype.
12882 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
12883 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
12884 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
12885 * parse.y (method_declarator:): Defined action.
12886 (issue_warning_error_from_context): input_filename saved, set to
12887 the appropriate value and restored after java_error is called.
12888 (build_unresolved_array_type): Fixed comment.
12889 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
12890 (method_header): Deal with return type the same way type are
12891 handled for fields and method's parameters and local variables
12892 types are handled.
12893 (check_method_redefinition): Removed extra CR.
12894 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
12895 (java_layout_seen_class_methods): New function.
12896 (java_layout_classes): Call java_layout_seen_class_methods.
12897
12898 1998-12-03 Per Bothner <bothner@cygnus.com>
12899
12900 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
12901
12902 1998-12-03 Per Bothner <bothner@cygnus.com>
12903
12904 * jcf-dump.c (main): Fix error message.
12905 * jcf-path.c (add_entry): Style fix.
12906
12907 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12908
12909 * class.c (layout_class_method): Call build_java_argument_signature
12910 on constructors too.
12911 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
12912 (patch_method_invocation): Define a primary when resolving an
12913 expression name. Augmented comment on code checking illegal `this'
12914 usage. Loosened it test by accepting NEW_CLASS_EXPR.
12915
12916 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12917
12918 * class.c (layout_class_method): Don't report error on non-static
12919 overriding static if the method is private.
12920 * java-tree.h (finish_class): Prototype added.
12921 * lex.c (java_get_line_col): Handle col argument -2 value.
12922 * parse.h: All static method declarations moved to parse.y.
12923 * parse.y: Now contains all static method declarations previously
12924 found in parse.h.
12925 (find_expr_with_wfl, missing_return_error,
12926 unreachable_stmt_error): New functions.
12927 (java_get_real_method_name): Identify constructors bearing class
12928 names in source code compiled classes only.
12929 (java_complete_expand_methods): Call missing_return_error.
12930 (invocation_mode): Private methods invoked as static methods.
12931 (java_complete_tree): Call unreachable_stmt_error.
12932
12933 1998-12-01 Tom Tromey <tromey@cygnus.com>
12934
12935 * Makefile.in (+target): Removed.
12936 (+xmake_file): Likewise.
12937 (+tmake_file): Likewise.
12938 (.NOEXPORT): Removed duplicate.
12939
12940 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12941
12942 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
12943
12944 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
12945
12946 * jvgenmain.c: Remove the xmalloc prototype, we get it from
12947 libiberty.h. Provide an xmalloc definition.
12948
12949 * jvspec.c: Remove the xmalloc prototype.
12950
12951 * parse-scan.y: Include config.h and system.h. Don't include
12952 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
12953 Provide an xstrdup definition.
12954
12955 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
12956
12957 * jcf-path.c (add_entry): Recognize ".jar" too.
12958 * lang-specs.h: Likewise.
12959
12960 1998-11-26 Per Bothner <bothner@cygnus.com>
12961
12962 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
12963 soft_monitorenter_node, soft_monitorexit_node, throw_node.
12964
12965 * jcf-write.c (generate_bytecode_insns):
12966 Handle pre/post-increment/decrement of long.
12967
12968 * jcf-write.c (generate_bytecode_insns):
12969 Handle missing exception handler (finally for synchronized).
12970
12971 1998-11-25 Per Bothner <bothner@cygnus.com>
12972
12973 * java-tree.h (end_params_node): Declare global.
12974 * decl.c (end_params_node): New global.
12975 (init_decl_processing, start_java_method): Use end_params_node for
12976 end of list of parameter types. Follows correct gcc conventions.
12977 * expr.c (pop_argument_types, pop_arguments): Likewise.
12978 * lang.c (put_decl_node): Likewise.
12979 * typeck.c (various places): Likewise.
12980 * class.y (various places): Likewise.
12981 * parse.y (various places): Likewise.
12982
12983 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
12984 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
12985
12986 * class.c: Add #include flags.h, remove no-longer needed declaration.
12987
12988 * class.c (layout_class_method): Remove commented-out code, re-format.
12989 Don't add vtable entry (or index) for private methods.
12990 * expr.c (expand_invoke): A private method is implicitly final.
12991 * class.c (make_class_data): If inlining or optimizing,
12992 skip private methods.
12993
12994 * class.c (finish_class): New function. Calls existing methods,
12995 but alls emits deferred inline functions.
12996 * jcf-parse.c (parse_class_file): Call finish_class.
12997 * parse.y (java_complete_expand_methods): Likewise.
12998
12999 * expr.c (build_java_binop): Explicit default, to silence -Wall.
13000
13001 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
13002
13003 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
13004
13005 * jcf-write.c (generate_bytecode_conditional): Fix typo.
13006
13007 1998-11-24 Per Bothner <bothner@cygnus.com>
13008
13009 * (generate_classfile): Always write class access flag with
13010 ACC_SUPER set.
13011
13012 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13013
13014 * class.c (maybe_layout_super_class): New function.
13015 (layout_class): Reorganized. Loop on class methods dispatched into
13016 a new function. Call maybe_layout_super_class.
13017 (layout_class_methods, layout_class_method): New functions.
13018 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
13019 class.
13020 (expand_invoke): Likewise.
13021 * java-tree.h (all_class_list): New global variable declared.
13022 (layout_class_methods, layout_class_method): New function
13023 prototypes.
13024 (LAYOUT_SEEN_CLASS_METHODS): New macro.
13025 * jcf-parse.c (all_class_list): New global variable.
13026 (load_class): Extended what class_or_name can be. Use parser
13027 context mechanism to save globals before calling jcf_parse.
13028 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
13029 is set on the file name.
13030 (jcf_parse): Layout class methods when Object is loaded, otherwise
13031 record class in all_class_list for delayed method layout.
13032 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
13033 * lang.c (put_decl_node): Decode <init> into the decl context
13034 class name.
13035 * lex.c (java_allocate_new_line): Use xmalloc.
13036 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
13037 pointers, not TREE_LIST elements.
13038 (struct parser_ctxt): Fixed comment indentations, added comments
13039 and reordered some fields.
13040 (java_check_methods): Function prototype removed.
13041 * parse.y (java_push_parser_context): Use xmalloc.
13042 (java_parser_context_restore_global): Pop extra pushed ctxp only
13043 when there's nothing next.
13044 (maybe_create_class_interface_decl): Fixed comment, add new
13045 created class decl to all_class_list.
13046 (method_header): Use GET_REAL_TYPE on argument's types.
13047 (method_declarator): Use GET_REAL_TYPE, change type to the real
13048 type in TREE_LIST dependency node. Build argument list with the
13049 real type.
13050 (create_jdep_list): Use xmalloc. Removed allocation error message.
13051 (obtain_incomplete_type): Fixed leading comment. Broadened
13052 incoming argument meaning.
13053 (register_incomplete_type): Use xmalloc. Removed allocation error
13054 message.
13055 (safe_layout_class): Fixed leading comment.
13056 (jdep_resolve_class): Reversed if statement condition and switch
13057 if and else bodies.
13058 (resolve_and_layout): Fixed leading comment. Broadened incoming
13059 argument meaning.
13060 (complete_class_report_errors): New local variable name, for
13061 clarity. purify_type_name used for all error cases.
13062 (java_get_real_method_name): Stricter check on constructors.
13063 (java_check_regular_methods): Reverse methods list only if not
13064 already laid out. Layout artificial constructor.
13065 (java_check_methods): Deleted.
13066 (source_start_java_method): Obtain incomplete type for patchable
13067 method arguments.
13068 (java_layout_classes): Fixed leading comment. Use
13069 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
13070 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
13071 before returning. Fixed comments.
13072 (java_expand_classes): Check for errors up front.
13073 (patch_method_invocation): Class to search is resolved and laid
13074 out.
13075
13076 1998-11-24 Per Bothner <bothner@cygnus.com>
13077
13078 * expr.c (java_lang_expand_expr): Add missing emit_queue.
13079
13080 * javaop.h (int8): Removed - not used.
13081 (jbyte): Redefine portably with correct signedness.
13082
13083 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
13084
13085 * jcf-write.c (generate_bytecode_insns): Fix typo
13086 OPCODE_getstatic to OPCODE_getfield.
13087
13088 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
13089 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
13090 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
13091
13092 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13093
13094 * jcf-parse.c (jcf_parse_source): Function returned type is
13095 void. Added prototype.
13096 (jcf_parse): Function returned type is void.
13097 (yyparse): Remove call to fclose on the last parsed file.
13098
13099 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
13100
13101 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
13102
13103 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
13104 (layout_class): Cope with methods featuring WFL in decl names.
13105 * decl.c (unqualified_object_id_node): New global variable,
13106 initialized.
13107 (build_decl_no_layout): Removed.
13108 * expr.c (build_primtype_type_ref): Handle Double.
13109 (java_lang_expand_expr): Fixed indentations.
13110 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
13111 (flag_wall, flag_redundant, flag_not_overriding,
13112 flag_static_local_jdk1_1, unqualified_object_id_node): Global
13113 variable declarations.
13114 (build_decl_no_layout): Removed prototype.
13115 (java_get_real_method_name): Added prototype.
13116 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
13117 (java_parse_abort_on_error): Macro now just returns.
13118 * jcf-parse.c (jcf_parse_source): Check fclose returned
13119 value. Call emit_register_classes if java_report_errors returns
13120 zero.
13121 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
13122 flag_static_local_jdk1_1): New integer flags.
13123 (lang_decode_option): New flags set here.
13124 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
13125 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
13126 the flag_redundant variable.
13127 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
13128 when parsing java.lang.Object class.
13129 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
13130 NULL_TREE to build.
13131 (resolve_qualified_expression_name): Fixed indentation.
13132 (patch_array_ref): Changed prototype.
13133 (not_initialized_as_it_should_p): Prototype removed.
13134 (java_report_errors): Added function prototype.
13135 * parse.y (formal_parameter:): Changed error message for not yet
13136 supported final parameters.
13137 (class_type_list:): Set both PURPOSE and VALUE of created
13138 TREE_LIST to be class_type.
13139 (primary_no_new_array:): Handle class literals on primitive types.
13140 (parse_warning_context): Reinstalled correct force_error and
13141 do_warning flags setups.
13142 (java_report_errors): Changed prototype. Return java_error_count
13143 value.
13144 (variable_redefinition_error): Consider treating variable type as
13145 a fake pointer.
13146 (create_interface): Warn about redundant abstract modifier if
13147 flag_redundant is set. Changed error message.
13148 (lookup_field_wrapper): Save/restore globals before/after looking
13149 up field.
13150 (duplicate_declaration_error_p): Consider treating declaration
13151 type as a fake pointer.
13152 (register_fields): Extract real type from dependency node. Check
13153 for duplicate field declaration after type adjustment. Use
13154 DECL_INITIAL to store static final initialized values.
13155 (method_header): Extract real function type from dependency node.
13156 (check_abstract_method_header): Use GET_METHOD_NAME.
13157 (obtain_incomplete_type): Layout fake pointer type.
13158 (safe_layout_class): Don't try to check for methods before layout.
13159 (java_complete_class): Don't check for correct throws clause
13160 elements inheritance here.
13161 (resolve_and_layout): Broadened name parameter meaning.
13162 (reset_method_name): Use GET_METHOD_NAME.
13163 (java_get_real_method_name): New function.
13164 (java_check_regular_methods): Don't check methods in
13165 java.lang.Object. Verify lineage of throws clause elements. Use
13166 flag_no_overriding in warning report.
13167 (check_throws_clauses): Don't check if class was from
13168 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
13169 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
13170 (declare_local_variables): Use flag_static_local_jdk1_1 to report
13171 warning on unsupported final local variables. Use build_decl
13172 instead of build_decl_no_layout. Get real local variable type from
13173 dependency node.
13174 (source_start_java_method): Get real parameter type from
13175 dependency node. Call build_decl instead of build_decl_no_layout.
13176 (java_layout_classes): Reverse tree and layout type and class as
13177 required. Mark class as loaded when done.
13178 (resolve_field_access): Fixed indentation. Restricted condition
13179 leading to static field access code generation. Set field_type
13180 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
13181 (resolve_qualified_expression_name): Initialize type_found to
13182 null. Handle static field resolved during qualification. Fixed
13183 layout on non primitive field decl types.
13184 (not_accessible_p): Fixed typo in comment.
13185 (patch_method_invocation): Resolve and layout class to search from
13186 type.
13187 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
13188 layout non primitive type, if necessary. Make method node only to
13189 report errors.
13190 (find_applicable_accessible_methods_list): Consider WFL'ed method
13191 decl names. Fixed indentation.
13192 (argument_types_convertible): Resolve and layout target type if
13193 necessary.
13194 (java_complete_tree): Fixed indentation problems. Rewrote
13195 CALL_EXPR thrown exceptions check. Re-installed further processing
13196 of the assignment in certain cases.
13197 (patch_assignment): Call maybe_build_primttype_type_ref to perform
13198 inlining on class literals.
13199 (valid_builtin_assignconv_identity_widening_p): Cope with constant
13200 0 literal.
13201 (valid_method_invocation_conversion_p): Likewise.
13202 (patch_string): Temporary disable forbidden use of `this' in
13203 explicit constructor invocations when doing string concatenation
13204 within their scope.
13205 (patch_unaryop): Added comment. Reinstalled code to disable
13206 further check on assignment operation with cast expression RHS.
13207 (patch_switch_statement): Fixed indentation.
13208 (build_try_statement): Call build_decl instead of
13209 build_decl_no_layout.
13210 (patch_synchronized_statement): Likewise.
13211 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
13212 IS_UNCHECKED_EXPRESSION_P.
13213 (check_thrown_exceptions_do): Changed leading comment. Resolve and
13214 layout argument exception type.
13215 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
13216 of IS_UNCHECKED_EXPRESSION_P.
13217
13218 1998-11-18 Anthony Green <green@cygnus.com>
13219
13220 * jcf-parse.c (yyparse): Open class file in binary mode.
13221
13222 1998-11-15 Per Bothner <bothner@cygnus.com>
13223
13224 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
13225
13226 * jcf-write.c (perform_relocations): Move check out one loop.
13227
13228 1998-11-15 Anthony Green <green@hoser.cygnus.com>
13229
13230 * Make-lang.in: Fix reference to srcdir.
13231 * jv-scan.c: Add missing xmalloc prototype.
13232 * jvgenmain.c: Ditto.
13233
13234 1998-11-15 Per Bothner <bothner@cygnus.com>
13235
13236 * decl.c (error_mark_node), java-tree.h: New global.
13237 * parse.y: Use empty_stmt_node instead of size_zero_node.
13238 (build_if_else_statement): If missing else, use empty_stmt_node.
13239
13240 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
13241 (java_complete_expand_method): Complain if return is missing.
13242 (java_check_regular_methods): Comment out incorrect error check.
13243 (not_accessible_p): Fix incorrect handling of protected methods.
13244 (patch_method_invocation): Pass correct context to not_accessible_p.
13245 (find_applicable_accessible_methods_list): Likewise.
13246 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
13247 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
13248 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
13249 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
13250
13251 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
13252 (push_int_const): Remove reundant NOTE_PUSH.
13253 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
13254 (- case SWITCH_EXPR): Fix code generation bug.
13255 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
13256 (generate_classfile): More robust for abstract methods.
13257
13258 1998-11-15 Anthony Green <green@cygnus.com>
13259
13260 * Makefile.in: jv-scan and jvgenmain all require libiberty.
13261 * Make-lang.in: Ditto.
13262
13263 * jv-scan.c: Remove xmalloc and xstrdup definitions.
13264 * jvgenmain: Ditto.
13265
13266 1998-11-15 Per Bothner <bothner@cygnus.com>
13267
13268 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
13269
13270 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
13271
13272 1998-11-14 Per Bothner <bothner@cygnus.com>
13273
13274 Allow uses of interface types to verify. This is not really
13275 type-safe, but it matches what Sun does, and is OK as long as
13276 there are appropriate run-time checks.
13277 * verify.c (merge_types): If merging two interface types,
13278 just set the result to java.lang.Object.
13279 * expr.c (pop_type): Any interface is matches by java.lang.Object.
13280
13281 1998-11-13 Tom Tromey <tromey@cygnus.com>
13282
13283 * gjavah.c (main): Handle --output-class-directory argument.
13284 * jvspec.c (lang_specific_driver): Translate `-d' into
13285 -foutput-class-dir.
13286 * jcf.h (jcf_write_base_directory): Declare.
13287 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
13288 * lang-options.h: Mention -foutput-class-dir.
13289 * jcf-write.c (jcf_write_base_directory): New global.
13290 (make_class_file_name): Put generated .class file into `-d'
13291 directory, or into source directory if -d not given. Function now
13292 static.
13293 (write_classfile): Free class file name. Handle case where class
13294 file name is NULL.
13295 (DIR_SEPARATOR): New macro.
13296 Include <sys/stat.h>
13297
13298 * Makefile.in (prefix): New macro.
13299
13300 1998-11-12 Per Bothner <bothner@cygnus.com>
13301
13302 * parse.y (patch_invoke): Do less if flag_emit_class_files.
13303 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
13304 here (done in patch_invoke instead).
13305 (case_identity): Moved here from parse.y.
13306
13307 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
13308 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
13309 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
13310 so they can be efficiently scanned without recursion.
13311 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
13312 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
13313 in BLOCK iteratively, rather than recursively.
13314
13315 * parse.y (do_unary_numeric_promotion): New function.
13316 (patch_unaryop, patch_binop, patch_array_ref): Use it.
13317
13318 * parse.y (patch_newarray): Various fixes.
13319
13320 Re-do handling of switch statements (for proper block scoping).
13321 * parse.y: Add just a single block for the enture switch block,
13322 but don't create any "case blocks".
13323 (group_of_labels): Rmeoved unneeded non-terminal.
13324 CASE_EXPR and DEFAULT_EXPR are added to current block.
13325 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
13326 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
13327 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
13328 * parse.y (wfl_operator, print_int_node): Make non-static.
13329 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
13330 as part of recursive scan of block.
13331 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
13332 (patch_switch_statement): Most tests move dinto java_complete_tree.
13333
13334 * parse.y: Make various production be non-typed (void).
13335 * parse.y (parse_error): Merged into issue_warning_error_from_context.
13336 * parse.y (add_stmt_to_compound): Don't create/change extra node.
13337 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
13338
13339 * jcf-write.c (struct jcf_handler): New type.
13340 (struct jcf_switch_state): New type.
13341 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
13342 (alloc_handler, emit_unop, emit_reloc): New functions.
13343 (adjust_typed_op): Add extra parameter ("max type" offset).
13344 (emit_switch_reloc, emit_case-reloc): New function.
13345 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
13346 (generate_bytecode_insns): Support REAL_CST, switch statements,
13347 exception handling, method calls, object/array creation, and more.
13348
13349 * class.c: Remove some unused variables.
13350 * constants.c (find_string_constant): New function.
13351 (count_constant_pool_bytes): Fix to correctly handle wide constants.
13352 * decl.c (complete_start_java_method): Don't _Jv_InitClass
13353 if flag_emit_class_files.
13354
13355 1998-11-12 Tom Tromey <tromey@cygnus.com>
13356
13357 * jcf-io.c (find_class): Added explanatory comment.
13358
13359 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
13360 trailing slash to `.zip' entries.
13361
13362 * jvspec.c (lang_specific_driver): Correctly handle case where
13363 GC_NAME not defined.
13364
13365 1998-11-11 Tom Tromey <tromey@cygnus.com>
13366
13367 * jvspec.c (GC_NAME): New define.
13368 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
13369 if required.
13370 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
13371
13372 1998-11-11 Per Bothner <bothner@cygnus.com>
13373
13374 * jcf-dump.c (TABLE_SWITCH): Fix typos.
13375
13376 1998-11-11 Tom Tromey <tromey@cygnus.com>
13377
13378 * jcf-dump.c (main): Correctly recognize `--'-style long options.
13379
13380 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13381
13382 * class.c (is_compiled_class): Call safe_layout_class for class
13383 compiled from source.
13384 * conver.h (convert_to_integer, convert_to_real,
13385 convert_to_pointer): Added prototypes.
13386 * decl.c (init_decl_processing): Non longer push the decls of
13387 `methodtable', `constants', `Class', `Field', `dispatchTable'
13388 `jexception' and `Method'.
13389 * expr.c (build_invokeinterface): New function.
13390 (expand_invoke): static variable CLASS_IDENT now in
13391 build_invokeinterface. Use build_invokeinterface.
13392 (expand_java_field_op): Moved code to inline
13393 java.lang.PRIMTYPE.TYPE into a function.
13394 (build_primtype_type_ref): New function.
13395 * java-tree.def (INSTANCEOF_EXPR): New tree code.
13396 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
13397 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
13398 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
13399 (DECL_LOCAL_STATIC_VALUE): New macro.
13400 (build_invokeinterface, build_primtype_type_ref): New function
13401 prototypes.
13402 (java_parse_abort_on_error): Macro rewritten.
13403 * jcf-parse.c (current_method): Add comment to declaration.
13404 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
13405 Function prototypes fixed.
13406 (jcf_parse_source): push/pop parser context. save/restore global.
13407 (parse_source_file): Fixed leading comment. Now take a
13408 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
13409 classes and pop the parser context anymore.
13410 (yyparse): Push parser context, save globals, parse the source
13411 file, restore globals and pop the parser context when processing a
13412 source file.
13413 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
13414 * lex.c (java_parse_doc_section): New function.
13415 (java_lex): Call java_parse_doc_section when appropriate. Build an
13416 operator around INSTANCEOF_TK.
13417 * lex.h (java_lineterminator, java_sprint_unicode,
13418 java_unicode_2_utf8, java_lex_error, java_store_unicode):
13419 Prototypes rewritten.
13420 (java_parse_escape_sequence, java_letter_or_digit_p,
13421 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
13422 java_read_unicode, java_store_unicode, java_read_char,
13423 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
13424 Added function prototypes.
13425 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
13426 define.
13427 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
13428 New macros
13429 (struct parser_ctxt): New fields: deprecated,
13430 current_parsed_class_un, gclass_list.
13431 (fix_method_argument_names, issue_warning_error_from_context,
13432 resolve_package, lookup_package_type): New function prototypes.
13433 (resolve_expression_name): Fixed function prototype.
13434 (find_applicable_accessible_methods_list): Fixed indentation, added
13435 extra argument in prototype.
13436 (check_final_assignment, build_null_of_type, check_deprecation,
13437 check_method_redefinition, reset_method_name,
13438 java_check_regular_methods, java_check_abstract_methods,
13439 maybe_build_primttype_type_ref): New function prototype.
13440 * parse.y (conver.h): Include.
13441 (INSTANCEOF_TK): Tagged <operator>.
13442 (single_type_import_declaration): Use REGISTER_IMPORT macro.
13443 (relational_expression:): Build binop for instanceof.
13444 (java_push_parser_context): Remember ctxp->gclass_list across
13445 contexts.
13446 (java_pop_parser_context): Simply return if no context
13447 exists. Remember gclass_list across contexts.
13448 (issue_warning_error_from_context): New function.
13449 (parse_error_context): Don't setup ctxp->elc here. Call
13450 issue_warning_error_from_context instead.
13451 (parse_warning_context): Likewise.
13452 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
13453 setup. Link new class/interface to ctxp->gclass_list.
13454 (add_superinterfaces): Register interface as incomplete if not
13455 loaded.
13456 (create_class): Remember class unqualified name in
13457 ctxp->current_parsed_class_un. Check class deprecation.
13458 (register_fields): Check field deprecation. Remember static final
13459 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
13460 processing INIT.
13461 (method_header): New local variable ORIG_ARG. Use unqualified
13462 current class name for check on constructor errors. Promote return
13463 type if of record type. Argument list fix moved in
13464 fix_method_argument_names, called here. Check method deprecation.
13465 (fix_method_argument_names): New function.
13466 (method_declarator): Promote record typed arguments.
13467 (safe_layout_class): Check class methods before layout.
13468 (java_complete_class): Compute field layout when patched.
13469 (do_resolve_class): Try to load class after having it renamed
13470 after the package name.
13471 (get_printable_method_name): Use DECL_CONTEXT.
13472 (reset_method_name): New function.
13473 (check_method_redefinition): Use reset_method_name.
13474 (java_check_regular_methods): New local variable
13475 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
13476 names for error report. Check for compile-time error when method
13477 found has default (package) access.
13478 (java_check_abstract_methods): Now takes an interface DECL node as
13479 an argument. Also reinstall real name on unchecked
13480 overriding/hiding methods for error report.
13481 (java_check_methods): Fixed leading comment. Get classes to verify
13482 from ctxp->gclass_list. Use CHECK_METHODS macro and set
13483 CLASS_METHOD_CHECKED_P on class verification.
13484 (lookup_java_method2): Get real method name if necessary.
13485 (find_in_imports): Don't check package class access here.
13486 (resolve_package, lookup_package_type): New functions.
13487 (java_layout_classes): Fixed leading comment. Take classes to be
13488 laid out from ctxp->gclass_list.
13489 (java_complete_expand_methods): Don't expand native and abstract
13490 methods.
13491 (java_expand_classes): New function.
13492 (resolve_expression_name): Use additional argument ORIG. Retrieve
13493 values of static final field of primitive types.
13494 (resolve_field_access): Handles static final field of promotive
13495 type.
13496 (resolve_qualified_expression_name): Handle STRING_CST as
13497 primaries and package name resolution. Check deprecation on found
13498 decls. Set where_found and type_found on non static field resolved
13499 during qualification. Layout non primitive field decl types.
13500 (check_deprecation): New function.
13501 (maybe_access_field): Simplified.
13502 (patch_method_invocation_stmt): Local variable CLASS_TYPE
13503 removed. Reverse method's argument when primary is a type. Don't
13504 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
13505 instead. Include abstract class in the list of class searchable
13506 for constructors. Use DECL_CONTEXT of found method for access
13507 checks. Check method deprecation.
13508 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
13509 converting arguments. Handle INVOKE_INTERFACE.
13510 (lookup_method_invoke): Search constructor using existing
13511 infrastructure (don't rely on lookup_java_constructor anymore).
13512 (find_applicable_accessible_methods_list): Extra argument flag
13513 LC. Now include constructor in the search.
13514 (qualify_ambiguous_name): Conditional expression are primaries.
13515 (not_initialized_as_it_should_p): static final are always
13516 initialized.
13517 (java_complete_tree): Pass extra NULL argument to
13518 resolve_expression_name. Stricter test to carry on patching
13519 assignments. New case for INSTANCEOF_EXPR.
13520 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
13521 (check_final_assignment, maybe_build_primttype_type_ref): New
13522 functions.
13523 (patch_assignment): Detect resolved static finals and carry normal
13524 assignment error check on them. Inline PRIMTYPE.TYPE read access.
13525 (try_builtin_assignconv): Access constant 0 on all primitive
13526 types.
13527 (valid_builtin_assignconv_identity_widening_p): Accept identical
13528 types. Accept all promoted type on int type.
13529 (valid_ref_assignconv_cast_p): Accept a null pointer to be
13530 assigned to a reference.
13531 (valid_method_invocation_conversion_p): Accept to check null
13532 pointers.
13533 (build_binop): Merge declaration and initialization of local
13534 variable BINOP.
13535 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
13536 numeric types. Improved validity test for qualify operators on
13537 references.
13538 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
13539 and PREINCREMENT_EXPR. Also detect resolved static finals of a
13540 primitive type and issue the appropriate error message.
13541 (resolve_type_during_patch): Mark class loaded when resolved.
13542 (patch_cast): Allow null to be cased to reference types.
13543 (build_null_of_type): New function.
13544 (patch_array_ref): Handle array on references correctly.
13545 (patch_return): Removed unused local variable MODIFY. Force
13546 boolean to be returned as integers. Allows null to be returned by
13547 a function returning a reference.
13548 * typeck.c (convert_to_integer, convert_to_real,
13549 convert_to_pointer): Prototypes moved to convert.h
13550 (lookup_argument_method): Use method real name, if necessary.
13551
13552 1998-10-30 Tom Tromey <tromey@cygnus.com>
13553
13554 * class.c (build_class_ref): Changed name of primitive classes to
13555 start with `_Jv_'.
13556
13557 * class.c (make_class_data): Renamed fields: nmethods to
13558 method_count, method_count to dtable_method_count. Always set
13559 `state' field to 0.
13560 * decl.c (init_decl_processing): Likewise.
13561
13562 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13563
13564 * class.c (layout_class): Don't mangle <finit>, produce
13565 __finit<class> instead. Don't verify artificial methods.
13566 * decl.c (finit_identifier_node): New declared global.
13567 (init_decl_processing): finit_identifier_node initialized.
13568 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
13569 * java-tree.h (finit_identifier_node): Declared as extern.
13570 (struct lang_decl): New field called_constructor.
13571 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
13572 (CLASS_HAS_FINIT_P): New macro.
13573 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
13574 explicit constructor invocation.
13575 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
13576 CALL_SUPER_CONSTRUCTOR_P): New macros.
13577 (write_classfile): Added prototype.
13578 * jcf-parse.c (jcf_parse_source): Parse and remember for
13579 generation if the file was seen on the command line.
13580 (parse_source_file): Don't write the class file here.
13581 (yyparse): Loop on files rewritten. Set current_jcf.
13582 (parse_zip_file_entries): Parse class file only if it was found.
13583 * lang.c (init_parse): Don't open command line provided filename
13584 here.
13585 (lang_parse): Don't set main_jcf anymore.
13586 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
13587 (JCONSTRUCTOR_CHECK): New macro.
13588 (JBSC_TYPE_P): New macro.
13589 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
13590 (COMPLETE_CHECK_OP_2): New macro.
13591 (struct parse_ctxt): New field explicit_constructor_p.
13592 (check_class_interface_creation): Fixed prototype indentation.
13593 (patch_method_invocation_stmt): Prototype reflects added argument.
13594 (patch_invoke): Likewise.
13595 (complete_method_declaration, build_super_invocation,
13596 verify_constructor_circularity,
13597 build_this_super_qualified_invocation, get_printable_method_name,
13598 patch_conditional_expr, maybe_generate_finit, fix_constructors,
13599 verify_constructor_super, create_artificial_method,
13600 start_artificial_method_body, end_artificial_method_body,
13601 generate_field_initialization_code): New function prototypes.
13602 * parse.y: Fixed leading comment
13603 (constructor_header:, constructor_body:, block_end:): Rules tagged
13604 <node>.
13605 (type_declaration:): Call maybe_generate_finit.
13606 (method_declaration:): Action for method_body: placed in new
13607 function complete_method_declaration, called here.
13608 (constructor_declaration:): Defined actions. Removed leading
13609 FIXME.
13610 (constructor_header:): New rule with action.
13611 (constructor_body:): Rule rewritten using block_begin: and
13612 block_end:. Defined actions.
13613 (constructor_declarator:, explicit_constructor_invocation:):
13614 Defined actions.
13615 (block:): Use new rules block_begin: block_end:.
13616 (block_begin:, block_end:): New rules and actions.
13617 (block_statements:): Fixed error message for explicit
13618 constructors.
13619 (method_invocation:): Call build_this_super_qualified_invocation
13620 if primary is `this' or `super' was seen.
13621 (conditional_expression:): Action defined.
13622 (extra_ctxp_pushed_p): New static global flag.
13623 (java_parser_context_save_global): Create parser context if
13624 necessary. Use extra_ctxp_pushed_p to remember it.
13625 (java_parser_context_restore_global): Pop extra parser context if
13626 one exists.
13627 (build_array_from_name): Array on primitive types are marked
13628 loaded.
13629 (register_fields): Restore new name in field initializer
13630 expression if type was altered. Non static fields initialized upon
13631 declaration marked initialized.
13632 (maybe_generate_finit): New function.
13633 (maybe_generate_clinit): Use create_artificial_method,
13634 start_artificial_method_body, end_artificial_method_body. Generate
13635 debug info for enclosed initialization statements.
13636 (method_header): Fixed leading comment. Check constructor
13637 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
13638 accordingly.
13639 (complete_method_declaration, constructor_circularity_msg,
13640 verify_constructor_circularity): New functions.
13641 (get_printable_method_name): New function.
13642 (check_method_redefinition): Don't rename <finit> methods. Fix
13643 declared constructor names. Error message for
13644 constructors modified.
13645 (java_check_regular_methods): Local variable seen_constructor
13646 renamed saw_constructor. Skip verification on constructors. Create
13647 default constructor with create_artificial_method.
13648 (java_check_methods): Removed unnecessary empty line.
13649 (create_artificial_method, start_artificial_method_body,
13650 end_artificial_method_body): New functions.
13651 (java_layout_classes): Changed leading comment. Reverse fields
13652 list if necessary. Always layout java.lang.Object if being
13653 defined.
13654 (java_complete_expand_methods): Verify constructor circularity.
13655 (java_complete_expand_method): Call fix_constructor on
13656 constructors. Local variable no_ac_found removed. Restore
13657 bindings if method body expansion failed.
13658 (fix_constructors, verify_constructor_super,
13659 generate_field_initialization_code): New function.
13660 (java_expand_classes): Fixed leading comment. Write class file
13661 here.
13662 (resolve_expression_name): Check for illegal instance variable
13663 usage within the argument scope of an explicit constructor
13664 invocation.
13665 (resolve_qualified_expression_name): Pass extra from_super flag
13666 when invoking patch_method_invocation_stmt. New case for
13667 conditional expression when used as a primary. Check for error
13668 when acquiring super.
13669 (patch_method_invocation_stmt): Added extra argument super. New
13670 local variable is_static_flag. Set class_to_search according to
13671 the nature of the constructor invocation. Don't add `this'
13672 argument when expanding NEW_CLASS_EXPR. Check for illegal method
13673 invocation within the argument scope of explicit constructor
13674 invocation. Set is_static according to is_static_flag. Provide
13675 extra `super' argument to patch_invoke invocation.
13676 (patch_invoke): New argument from_super. Loop on arguments
13677 indentation fixed. Pass from_super to invocation_mode. New switch
13678 case INVOKE_SUPER. Fixed error message in switch default case.
13679 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
13680 value.
13681 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
13682 (lookup_method_invoke): Fixed prototypes in candidates list. Error
13683 message takes constructors into account.
13684 (find_applicable_accessible_methods_list): Fixed indentation.
13685 (qualify_ambiguous_name): Take explicit constructor invocation
13686 into account. Deal with a conditional expression as a primary to
13687 a method call.
13688 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
13689 case. Added extra argument to patch_method_invocation_stmt.
13690 Register calls made to explicit constructor `this'. Don't call
13691 save_expr in ARRAY_REF case when emitting class files. Check for
13692 illegal use of this when expanding explicit constructor invocation
13693 arguments.
13694 (complete_function_arguments): Set and reset parser context
13695 explicit_constructor_p field value when appropriate.
13696 (build_super_invocation, build_this_super_qualified_invocation):
13697 New functions.
13698 (patch_assignment): Fixed typo.
13699 (patch_unaryop): Check on final fields occurs only when a decl
13700 exits.
13701 (patch_return): Take constructors into account.
13702 (patch_conditional_expr): New function.
13703 * typeck.c (build_java_signature): Removed unnecessary empty line.
13704
13705 1998-10-28 Jeffrey A Law (law@cygnus.com)
13706
13707 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
13708
13709 1998-10-28 Tom Tromey <tromey@cygnus.com>
13710
13711 * decl.c (init_decl_processing): Renamed fields.
13712 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
13713 interface_len, msize fields.
13714
13715 * class.c (make_class_data): Removed subclass_head and
13716 subclass_next fields.
13717 * decl.c (init_decl_processing): Removed subclass_head and
13718 subclass_next fields.
13719
13720 1998-10-28 Jeffrey A Law (law@cygnus.com)
13721
13722 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
13723 * mangle.c (emit_unicode_mangled_name): Similarly.
13724
13725 1998-10-26 Nick Clifton <nickc@cygnus.com>
13726
13727 * jcf-parse.c (get_constant): Place braces around code to compute
13728 'd' when REAL_ARITHMETIC is not defined.
13729
13730 1998-10-25 H.J. Lu (hjl@gnu.org)
13731
13732 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
13733 dependency.
13734
13735 1998-10-23 Tom Tromey <tromey@cygnus.com>
13736
13737 * lang-specs.h: `.zip' files are input to jc1.
13738
13739 1998-10-22 Per Bothner <bothner@cygnus.com>
13740
13741 * jvspecs.c: Add (but don't enable) support for combining multiple
13742 .class and .java input filenames to a single jc1 invocation.
13743 Add support for -C flag (copile to .class files).
13744 Translate -classpath and -CLASSPATH arguments.
13745 * lang-specs.h: Don't set %2 spec.
13746
13747 1998-10-22 Tom Tromey <tromey@cygnus.com>
13748
13749 * jcf-path.c (add_entry): Don't add trailing separator if entry is
13750 a .zip file.
13751 (add_path): Don't add trailing separator to non-empty path
13752 elements.
13753
13754 * lang.c (lang_decode_option): Check for -fclasspath and
13755 -fCLASSPATH before examining other `-f' options.
13756
13757 * java-tree.h (finalize_identifier_node): Don't declare.
13758 * class.c (make_class_data): Don't push "final" field.
13759 * decl.c (init_decl_processing): Don't push "final" field.
13760 (finalize_identifier_node): Removed.
13761 (init_decl_processing): Don't set finalize_identifier_node.
13762
13763 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
13764
13765 1998-10-11 Anthony Green <green@cygnus.com>
13766
13767 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
13768 (JV_SCAN_SOURCES): New macro.
13769 (JCF_DUMP_SOURCES): Likewise.
13770 (jcf-dump$(exeext)): New target.
13771 (jv-scan$(exeext)): New target.
13772
13773 1998-10-22 Tom Tromey <tromey@cygnus.com>
13774
13775 * Makefile.in (LEX): Removed.
13776 (LEXFLAGS): Likewise.
13777 (SET_BISON): New macro.
13778 (BISON): Removed.
13779 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
13780 spurious diffs in parse.c.
13781 ($(PARSE_SCAN_C)): Likewise.
13782 (PARSE_DIR): New macro.
13783 (PARSE_C): Use it.
13784 (PARSE_SCAN_C): Likewise.
13785 (PARSE_RELDIR): New macro.
13786
13787 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
13788
13789 * jcf-io.c (find_class): Use saw_java_source to determine when to
13790 look for `.java' file.
13791 * jcf-parse.c (saw_java_source): New global.
13792 (yyparse): Set it if `.java' file seen.
13793
13794 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
13795 (GCJH_SOURCES): Likewise.
13796 * Makefile.in (datadir): New macro.
13797 (libjava_zip): Likewise.
13798 (JAVA_OBJS): Added jcf-path.o.
13799 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13800 (../gcjh$(exeext)): Likewise.
13801 (jcf-path.o): New target.
13802 * java-tree.h (fix_classpath): Removed decl.
13803 * jcf-parse.c (fix_classpath): Removed.
13804 (load_class): Don't call fix_classpath.
13805 * parse.y (read_import_dir): Don't call fix_classpath.
13806 * lex.h: Don't mention classpath.
13807 * lex.c (java_init_lex): Don't initialize classpath.
13808 * jcf-io.c (classpath): Removed global.
13809 (find_class): Use jcf_path iteration functions. Correctly search
13810 class path for .java file.
13811 (open_in_zip): New argument `is_system'.
13812 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
13813 classpath-related options.
13814 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
13815 and -I.
13816 (lang_init): Call jcf_path_init.
13817 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
13818 * lang-specs.h: Handle -I. Minor cleanup to -M options.
13819 Correctly put braces around second string in each entry.
13820 * gjavah.c (main): Call jcf_path_init. Recognize all the new
13821 classpath-related options.
13822 (help): Updated for new options.
13823 * jcf.h: Declare functions from jcf-path.c. Don't mention
13824 `classpath' global.
13825 * jcf-path.c: New file.
13826
13827 * jcf-depend.c: Include jcf.h.
13828
13829 * jcf-write.c (localvar_alloc): Returns `void'.
13830 (localvar_free): Removed unused variable.
13831
13832 * lang.c (OBJECT_SUFFIX): Define if not already defined.
13833 (init_parse): Use OBJECT_SUFFIX, not ".o".
13834
13835 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13836
13837 * class.c (emit_register_classes): Renamed from
13838 emit_register_class.
13839 * java-tree.h (emit_register_classes): Prototype renamed from
13840 emit_register_class.
13841 * jcf-parse.c (yyparse): Call emit_register_classes once before
13842 returning.
13843 * parse.y (java_expand_classes): No longer register classes.
13844
13845 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13846
13847 * class.c (is_compiled_class): New local variable
13848 seen_in_zip. Identify classes found in currently compiled source
13849 file(s).
13850 * decl.c (complete_start_java_method): Fixed typo.
13851 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
13852 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
13853 (CLASS_P): Moved around.
13854 (java_parse_abort_on_error): Macro moved from jcf-parse.c
13855 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
13856 java-parse.h
13857 (jcf_parse_source): Changed leading comment. Removed unnecessary
13858 fclose and CLASS_FROM_SOURCE_P marking.
13859 (parse_source_file): New local variables remember_for_generation
13860 and filename. Mark parsed file name identifier node. Removed block
13861 executed when parse_only was null. Set remember_for_generation.
13862 Use it as an argument to java_pop_parser_context.
13863 (yyparse): New local variables several_files, list, next node and
13864 current_file_list. Split ampersand separated file names into
13865 current_file_list. Iterate through the list and parse accordingly.
13866 * parse.h (java_pop_parser_context): New function prototype.
13867 * parse.y (ctxp_for_generation): New static global variable.
13868 (java_pop_parser_context): New argument generate. Link popped ctxp
13869 to ctxp_for_generation list accordingly.
13870 (java_complete_expand_methods): Fixed indentation.
13871 (java_expand_classes): New function.
13872
13873 1998-10-17 Per Bothner <bothner@cygnus.com>
13874
13875 * Makefile.in: Link with libiberty.a instead of memmove.o.
13876
13877 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
13878
13879 * lex.c (setjmp.h): No longer included.
13880 * lex.h (setjmp.h): Included.
13881 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
13882 (duplicate_declaration_error_p): Renamed from
13883 duplicate_declaration_error.
13884 (build_array_from_name): New function prototype.
13885 * parse.y (setjmp.h): No longer included.
13886 (variable_declarator_id): Define action.
13887 (build_array_from_name): New function.
13888 (duplicate_declaration_error_p): Renamed from
13889 duplicate_declaration_error. Fixed leading comment.
13890 (register_fields): Main `for' loop reorganized. Uses
13891 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
13892 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
13893 build_array_from_name.
13894 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
13895 types.
13896 (read_import_dir): Don't try to skip `.' and `..'.
13897 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
13898 build_array_from_name. Main `for' loop reorganized.
13899 (resolve_qualified_expression_name): When building access to a
13900 field, use the type where the field was found, not its own type.
13901 (maybe_access_field): Use field DECL_CONTEXT if the type where the
13902 field was found is null.
13903 (qualify_ambiguous_name): Sweep through all successive array
13904 dimensions.
13905
13906 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13907
13908 * java-tree.h (pop_labeled_block, lang_printable_name,
13909 maybe_add_interface, set_super_info, get_access_flags_from_decl,
13910 interface_of_p, inherits_from_p, fix_classpath,
13911 complete_start_java_method, emit_handlers, init_outgoing_cpool,
13912 make_class_data, register_class, alloc_name_constant): New
13913 function prototypes.
13914 * lang.c (lang_decode_option): Set argc argument unused. Fixed
13915 indentation. Added cast to remove warning.
13916 (lang_printable_name): Set v argument unused.
13917 (lang_print_error): Added argument to lang_printable_name call.
13918 (java_dummy_print, print_lang_decl, print_lang_type,
13919 print_lang_identifier, lang_print_xnode): All argument marked
13920 unused.
13921 * lex.c (java_unget_unicode): Removed unnecessary argument.
13922 (java_allocate_new_line): Unused local variable is gone.
13923 (java_read_char): Added parenthesis in expressions to remove
13924 warnings. Added final return statement.
13925 (java_read_unicode): Added parenthesis in expression to remove
13926 warning.
13927 (java_parse_end_comment): Fixed java_unget_unicode invocation.
13928 (java_parse_escape_sequence): Likewise.
13929 (java_lex): Unused local variables are gone. Fixed
13930 java_unget_unicode invocation.
13931 * lex.h (set_float_handler): Prototype added when JC1_LITE not
13932 defined.
13933 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
13934 lang_printable_name invocation in macro.
13935 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
13936 Likewise.
13937 (duplicate_declaration_error): Suppressed unused argument in
13938 prototype.
13939 (identical_subpath_p): Function declaration is gone.
13940 (patch_invoke): Suppressed unused argument in prototype.
13941 (patch_cast, build_labeled_block, check_thrown_exceptions):
13942 Likewise.
13943 * parse.y (setjmp.h): Included
13944 (toplev.h): Likewise.
13945 (field_declaration:): Suppressed unused local
13946 (label_decl:): Fixed build_labeled_block invocation.
13947 (java_pop_parser_context): Put extra parenthesis around assignment
13948 in if.
13949 (yyerror): Suppressed unused local variables.
13950 (variable_redefinition_error): Fixed lang_printable_name
13951 invocation.
13952 (create_interface): Suppressed unused local variables.
13953 (create_class): Likewise.
13954 (duplicate_declaration_error): Suppressed unused argument. Fixed
13955 lang_printable_name invocation.
13956 (register_fields): Suppressed unused local variable. Fixed
13957 duplicate_declaration_error invocation.
13958 (method_header): Suppressed unused local variable.
13959 (method_declarator, parser_check_super): Likewise.
13960 (java_complete_class): Suppressed unused local variable. Fixed
13961 fatal error message.
13962 (complete_class_report_errors): Added default: in switch.
13963 (java_check_regular_methods): Fixed lang_printable_name
13964 invocations.
13965 (check_throws_clauses): Likewise.
13966 (java_check_abstract_methods): Suppressed unused local
13967 variable. Fixed lang_printable_name invocation.
13968 (read_import_entry): Added supplemental return statement.
13969 (read_import_dir): Suppressed unused local variables.
13970 (check_pkg_class_access, declare_local_variables): Likewise.
13971 (source_start_java_method): Suppressed unused extern variable
13972 declarations
13973 (expand_start_java_method): Suppressed unused extern and local
13974 variable declarations.
13975 (java_complete_expand_methods): Likewise.
13976 (java_complete_expand_method): Suppressed unused local variables.
13977 (make_qualified_name): Likewise.
13978 (resolve_qualified_expression_name): Added default: in
13979 switch. Fixed lang_printable_name invocation.
13980 (class_instance_creation_expression): Added parenthesis around
13981 expressions.
13982 (patch_method_invocation_stmt): Fixed lang_printable_name and
13983 patch_invoke invocations.
13984 (check_for_static_method_reference): Fixed lang_printable_name
13985 invocation.
13986 (patch_invoke): Suppressed unused arguments and local variables.
13987 (lookup_method_invoke): Suppressed unused local variables.
13988 (qualify_ambiguous_name): Added default: in switch.
13989 (identical_subpath_p): Function removed.
13990 (patch_assignment): Suppressed unused local variables. Suppressed
13991 unnecessary if statement. Fixed lang_printable_name invocations.
13992 (try_builtin_assignconv): Fixed lang_printable_name invocations.
13993 (valid_ref_assignconv_cast_p): Parenthesis around
13994 expression. Suppressed unused local variables.
13995 (build_binop): Suppressed unused local variables. fixed
13996 lang_printable_name invocations.
13997 (string_constant_concatenation): Suppressed unused local
13998 variables.
13999 (patch_unaryop): Fixed lang_printable_name invocation.
14000 (patch_cast): Suppressed unnecessary argument. Fixed
14001 lang_printable_name invocation.
14002 (patch_array_ref): Fixed lang_printable_name invocation.
14003 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
14004 (build_labeled_block): Suppressed unused argument.
14005 (generate_labeled_block): Fixed build_labeled_block invocation.
14006 (build_loop_body): Suppressed unused local variables.
14007 (patch_loop_statement): Likewise.
14008 (patch_exit): Fixed lang_printable_name invocation.
14009 (patch_switch_statement): Likewise.
14010 (case_identity): First argument marked unused.
14011 (patch_try_statement): Fixed lang_printable_name invocations.
14012 (patch_synchronized_statement, patch_throw_statement): Likewise.
14013 (check_thrown_exceptions): Fixed check_thrown_exceptions and
14014 lang_printable_name invocations.
14015 (check_thrown_exceptions_do): Suppressed unused argument.
14016
14017 1998-10-14 Tom Tromey <tromey@cygnus.com>
14018
14019 * jcf-write.c (write_classfile): Add output class file as target.
14020 * lang-options.h: Added -MD, -MMD, -M, and -MM.
14021 * jcf.h: Added declarations for dependency-tracking functions.
14022 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
14023 * lang.c (lang_decode_option): Recognize -MD and -MMD.
14024 (finish_parse): Call jcf_dependency_write.
14025 (dependency_tracking): New global.
14026 (DEPEND_SET_FILE): New define.
14027 (DEPEND_ENABLE): New define.
14028 (init_parse): Enable dependency tracking if required.
14029 Include "flags.h".
14030 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
14031 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
14032 (../gcjh$(exeext)): Likewise.
14033 (jcf-depend.o): New target.
14034 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
14035 (GCJH_SOURCES): Likewise.
14036 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
14037 dep_name argument.
14038 (find_classfile): Added dep_name argument.
14039 (find_class): Compute name of dependency.
14040 (open_in_zip): Call jcf_dependency_add_file.
14041 * gjavah.c (output_file): No longer global.
14042 (usage): Don't mention "gjavah".
14043 (help): Likewise.
14044 (java_no_argument): Likewise.
14045 (version): Likewise.
14046 (main): Recognize and handle -M family of options.
14047 (print_mangled_classname): Return is void.
14048 (process_file): Handle case where output is suppressed.
14049 (HANDLE_END_FIELD): Likewise.
14050 (HANDLE_METHOD): Likewise.
14051 * jcf-depend.c: New file.
14052
14053 1998-10-13 Jeffrey A Law (law@cygnus.com)
14054
14055 * java-tree.def: Add missing newline at EOF.
14056
14057 1998-10-13 Tom Tromey <tromey@cygnus.com>
14058
14059 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
14060 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
14061 function.
14062 Include <config.h> and "system.h".
14063 (disassemble_method): Undefine RET to avoid clash with
14064 config/i386/i386.h.
14065
14066 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14067
14068 * decl.c (runtime_exception_type_node, error_exception_type_node):
14069 New global variables.
14070 (init_decl_processing): Initialized.
14071 * expr.c (java_lang_expand_expr): Set caught exception type to
14072 null if catch handler argument doesn't exit.
14073 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
14074 tree codes.
14075 * java-tree.h (runtime_exception_type_node,
14076 error_exception_type_node): Global variables declared.
14077 (DECL_FUNCTION_THROWS): New macro.
14078 (DECL_FUNCTION_BODY): Modified comment.
14079 (DECL_SPECIFIC_COUNT): Likewise.
14080 (struct lang_decl): New field throws_list.
14081 (IS_UNCHECKED_EXPRESSION_P): New macro.
14082 * lex.c (java_lex): Generate location information for THROW_TK.
14083 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
14084 EXCEPTIONS_P): New macros.
14085 (enum jdep_code): New value JDEP_EXCEPTION.
14086 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
14087 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
14088 PATCH_METHOD_RETURN_ERROR): New macros.
14089 (patch_method_invocation_stmt): Added new argument to prototype.
14090 (patch_synchronized_statement, patch_throw_statement,
14091 check_thrown_exceptions, check_thrown_exceptions_do,
14092 purge_unchecked_exceptions, check_throws_clauses): New function
14093 prototypes.
14094 * parse.y Fixed typo in keyword section.
14095 (throw:): Rule tagged <node>.
14096 (THROW_TK): Keyword tagged <operator>.
14097 (method_header:): Last argument to call to method_header passed
14098 from throws: rule.
14099 (throws:, class_type_list:, throw_statement:,
14100 synchronized_statement:, synchronized:): Defined actions.
14101 (method_header): New local variable current. Register exceptions
14102 from throws clause.
14103 (java_complete_tree): Complete and verify exceptions from throws
14104 clause.
14105 (complete_class_report_errors): Error message on exceptions not
14106 found
14107 (java_check_regular_methods): Fixed typo. Shortcut on private
14108 overriding methods. Changed error message on method
14109 redefinition. Check for throws clause compatibility.
14110 (check_throws_clauses): New function.
14111 (java_check_abstract_methods): Use DECL_NAME for wfl or current
14112 method. Changed error message on method redefinition.
14113 (currently_caught_type_list): New static variable.
14114 (java_complete_expand_methods): Purge unchecked exceptions from
14115 throws clause list. Call PUSH_EXCEPTIONS before walk and
14116 POP_EXCEPTIONS after.
14117 (resolve_qualified_expression_name): Pass new argument as NULL to
14118 patch_method_invocation_stmt.
14119 (patch_method_invocation_stmt): New argument ref_decl. Invoke
14120 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
14121 argument list when appropriate. Use new argument if non null to
14122 store selected method decl.
14123 (patch_invoke): Convert if necessary args of builtin types before
14124 forming CALL_EXPR. Argument list no longer reversed here.
14125 (invocation_mode): Treat final methods as static methods.
14126 (java_complete_tree): New cases for THROW_EXPR: and
14127 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
14128 function call.
14129 (complete_function_arguments): No more RECORD_TYPE
14130 conversion. Function parameter nodes no longer saved.
14131 (valid_ref_assignconv_cast_p): Avoid handling null type.
14132 (patch_binop): Fixed null constant reference handling.
14133 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
14134 BUILD_THROW macros.
14135 (patch_try_statement): Fixed comments. Record caught types in
14136 list, push the list, expand try block and pop the list.
14137 (patch_synchronized_statement, patch_throw_statement,
14138 check_thrown_exceptions, check_thrown_exceptions_do,
14139 purge_unchecked_exceptions): New functions.
14140 * typeck.c (lookup_argument_method): Allow WFL in place of method
14141 DECL_NAME during method definition check
14142
14143 1998-10-09 Tom Tromey <tromey@cygnus.com>
14144
14145 * gjavah.c (decode_signature_piece): New function.
14146 (print_c_decl): Use it. Added `name_override' argument.
14147 (print_method_info): Use name_override argument to print_c_decl.
14148 (seen_fields): Removed.
14149 (print_field_info): Don't update seen_fields.
14150 (struct method_name): New structure.
14151 (method_name_list): New global.
14152 (print_method_info): Add new method to list of methods.
14153 (name_is_method_p): New function.
14154 (print_field_info): If field name has same name as method, then
14155 change field name.
14156 (process_file): Parse methods before fields.
14157 (field_pass): New global.
14158 (HANDLE_END_FIELD): Take field_pass into account.
14159
14160 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14161
14162 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
14163 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
14164
14165 1998-10-03 Anthony Green <green@cygnus.com>
14166
14167 * jvspec.c: Fix bug in jvgenmain_spec patch.
14168
14169 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14170
14171 * Makefile.in (lang.o:): Install dependency on java-tree.def.
14172 * decl.c (soft_exceptioninfo_call_node): New global variable.
14173 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
14174 takes extra integer argument. soft_exceptioninfo_call_node
14175 initialized.
14176 * except.c (java_set_exception_lang_code): New function
14177 (method_init_exceptions): Called here.
14178 (prepare_eh_table_type): New function.
14179 (expand_end_java_handler): Called here.
14180 * expr.c (build_java_throw_out_of_bounds_exception): Now features
14181 one argument. Modified generation of call to
14182 soft_badarrayindex_node to use new argument.
14183 (build_java_arrayaccess): Pass faulty index value to
14184 build_java_throw_out_of_bounds_exception.
14185 (generate_name): New function.
14186 (java_lang_expand_expr): New local variables node, current,
14187 has_finally_p. Expand TRY_EXPR node.
14188 (process_jvm_instruction): Replace top of the stack with thrown
14189 object reference when entering exception handler.
14190 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
14191 specific tree codes.
14192 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
14193 global.
14194 (DECL_SPECIFIC_COUNT): New macro.
14195 (prepare_eh_table_type, java_set_exception_lang_code,
14196 generate_name): New function declarations.
14197 (match_java_method): Declaration deleted.
14198 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
14199 macros.
14200 * lex.c (TRY_TK, CATCH_TK): Generate location information.
14201 * parse.h (redefinition_error, refine_accessible_methods_list,
14202 can_cast_to_p): Function declaration removed.
14203 (classitf_redefinition_error, variable_redefinition_error,
14204 parse_jdk1_1_error, find_applicable_accessible_methods_list,
14205 find_most_specific_methods_list, argument_types_convertible,
14206 enter_a_block, valid_builtin_assignconv_identity_widening_p,
14207 valid_cast_to_p, valid_method_invocation_conversion_p,
14208 try_reference_assignconv, add_stmt_to_compound,
14209 build_jump_to_finally, build_tree_list, patch_try_statement,
14210 java_get_catch_block): New function declarations.
14211 * parse.y (string_buffer_type): Global variable deleted.
14212 (group_of_labels, catches, catch_clause, catch_clause_parameter,
14213 finally): Rules tagged <node>.
14214 (TRY_TK, CATCH_TK): Token tagged <operator>.
14215 (class_body_declaration:, class_member_declaration:,
14216 formal_parameter:, explicit_constructor_invocation:,
14217 interface_member_declaration:, constant_declaration:,
14218 primary_no_new_array:, class_instance_creation_expression:,
14219 array_creation_expression:): Issue error on unsuported JDK1.1
14220 features.
14221 (try_statement:, catches:, finally:): Define actions.
14222 (catch_clause_parameter): New rule.
14223 (catch_clause:): Use new rule catch_clause_parameter.
14224 (parse_jdk1_1_error): New function.
14225 (redefinition_error): Renamed classitf_redefinition_error.
14226 (variable_redefinition_error): New function.
14227 (check_class_interface_creation): Call
14228 classitf_redefinition_error.
14229 (java_complete_tree): Added error message on JDEP_TYPE: case.
14230 (complete_class_report_errors): Fixed indentation.
14231 (declare_local_variables): Call variable_redefinition_error.
14232 (source_end_java_method): Call java_set_exception_lang_code and
14233 emit_handlers where appropriate.
14234 (java_method_add_stmt): Call add_stmt_to_block.
14235 (add_stmt_to_block): New function.
14236 (lookup_method_invoke): Fixed outside comment. new local variable
14237 candicates. Call find_applicable_accessible_methods_list and
14238 find_most_specific_methods_list when searching for a
14239 method. Modified error report to list possible candidates when
14240 applicable.
14241 (find_applicable_accessible_methods_list,
14242 find_most_specific_methods_list, argument_types_convertible): New
14243 function.
14244 (refine_accessible_methods_list): Function deleted.
14245 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
14246 expr (if applicable) before calling patch_array_ref.
14247 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
14248 (enter_block): Fixed comment.
14249 (enter_a_block): New function.
14250 (patch_assignment): Reorganized. Call try_reference_assignconv for
14251 references. Call valid_cast_to_p instead of can_cast_to_p.
14252 (try_reference_assignconv,
14253 valid_builtin_assignconv_identity_widening_p): New functions.
14254 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
14255 (valid_cast_to_p, valid_method_invocation_conversion_p): New
14256 functions.
14257 (build_string_concatenation): Don't resolve StringBuffer.
14258 (patch_cast): Fixed inverted arguments.
14259 (patch_array_ref): Code to save array expr deleted. Call
14260 valid_cast_to_p instead of can_cast_to_p.
14261 (generate_labeled_block): Call generate_name.
14262 (build_jump_to_finally, build_try_statement, java_get_catch_block,
14263 patch_try_statement): New functions.
14264 * typeck.c (match_java_method): Function deleted.
14265
14266 1998-10-02 Anthony Green <green@cygnus.com>
14267
14268 * jvspec.c: jvgenmain_spec uses different temporary file names.
14269
14270 1998-10-02 Anthony Green <green@cygnus.com>
14271
14272 * jvspec.c (lang_specific_driver): Fail if user specifies
14273 --main= when not linking.
14274
14275 1998-09-28 Tom Tromey <tromey@cygnus.com>
14276
14277 * class.c (make_class_data): Push value for `thread' field.
14278 * decl.c (init_decl_processing): Added `thread' field to class.
14279
14280 * class.c (add_field): Always make static fields externally
14281 visible.
14282
14283 1998-09-26 Anthony Green <green@cygnus.com>
14284
14285 * expr.c (build_java_athrow,
14286 build_java_throw_out_of_bounds_exception, expand_invoke,
14287 build_newarray, expand_java_multianewarray, build_java_monitor):
14288 Update comments to reflect _Jv_* function names.
14289
14290 1998-09-25 Per Bothner <bothner@cygnus.com>
14291
14292 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
14293 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
14294 * parse.y (expand_start_java_method): Likewise.
14295
14296 1998-09-24 Per Bothner <bothner@cygnus.com>
14297
14298 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
14299
14300 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
14301 (add_field): No longer need to convert from RECORD_TYPE to pointer,
14302 * expr.c: Remove no-longer-needed calls to promote_type.
14303 * decl.c (give_name_to_locals): Liekwise.
14304 * jcf-parse.c (get_class_constant): Compensate for new signatures.
14305 * parse.y: Add/remove promote_type calls as appropriate.
14306 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
14307 (parse_signature_string): Likewise.
14308 (build_java_array_type): Fix for now signature convenions.
14309
14310 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
14311
14312 1998-09-23 Tom Tromey <tromey@cygnus.com>
14313
14314 * class.c (init_class_processing): libjava function renamed to
14315 _Jv_RegisterClass.
14316
14317 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14318
14319 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
14320 * java-tree.def: Fixed DEFTREECODE third argument.
14321 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
14322 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
14323 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
14324 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14325 JAVA_THIS_EXPR): Now replaced by tree code definitions.
14326 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
14327 * lang.c (java_tree_code_type, java_tree_code_length,
14328 java_tree_code_name): New arrays.
14329 (lang_init): Append Java tree node definitions to Gcc ones.
14330 * lex.c (expression_obstack): Declared as extern when JC1_LITE
14331 defined.
14332 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
14333 wfl_to_string.
14334 (java_lex): Allow declaration of empty string constants. Retain
14335 location information on CASE_TK and DEFAULT_TK.
14336 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
14337 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
14338 Modified to be more robust.
14339 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
14340 (build_new_invocation, try_builtin_assignconv,
14341 patch_switch_statement, string_constant_concatenation,
14342 build_string_concatenation, patch_string_cst, patch_string,
14343 java_expand_switch): New function declarations.
14344 * parse.y: Rules related to switch and EH tagged <node>.
14345 (label_id): Set to NULL_TREE
14346 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
14347 tree nodes.
14348 (this_or_super:): Fixed indentation.
14349 (statement:, statement_nsi:, statement_without_trailing_substatement:,
14350 statement_expression:): Removed call to RULE on all sub-rules.
14351 (switch_expression:, switch_labels:): New rules.
14352 (switch_statement:, switch_block:, switch_block_statement_groups:,
14353 switch_block_statement_group:, switch_labels:, switch_label:):
14354 Defined actions.
14355 (throw_statement:, synchronized_statement:, try_statement:):
14356 Defined temporary actions.
14357 (class_instance_creation_expression:): Call
14358 build_new_invocation. Fixed indentation.
14359 (field_access): Fixed indentation.
14360 (method_invocation): Likewise.
14361 (make_qualified_primary): Use THIS_EXPR.
14362 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
14363 resolving from SUPER, set *type_found.
14364 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
14365 (java_complete_tree): Removed unused local variable `location'. Case
14366 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
14367 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
14368 on MODIFY_EXPR: and all binary operator tree code cases. Removed
14369 STRING_CST: case. default: checks for patchable strings.
14370 (complete_function_arguments): Transform string constant or
14371 crafted StringBuffer if necessary.
14372 (build_method_invocation): Fixed comments.
14373 (build_new_invocation): New function.
14374 (patch_assignment): Call try_builtin_assignconv to figure a valid
14375 assignment conversion between builtin types.
14376 (try_builtin_assignconv): New function.
14377 (build_binop): Use URSHIFT_EXPR directly to call build.
14378 (operator_string): Use UNARY_PLUS_EXPR.
14379 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
14380 operator.
14381 (do_merge_string_cste, merge_string_cste,
14382 string_constant_concatenation, build_string_concatenation,
14383 patch_string, patch_string_cst): New function.
14384 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
14385 (patch_unaryop): Likewise. New test of valid ++/-- operands.
14386 (build_newarray_node): Use NEW_ARRAY_EXPR.
14387 (build_this): Use THIS_EXPR.
14388 (build_return): Enable debug information on return statement.
14389 (build_if_else_statement): Likewise.
14390 (complete_labeled_statement): Fixed related comment.
14391 (build_loop_body): Fixed comment.
14392 (build_bc_statement): Enable debug information on break/continue
14393 statements.
14394 (patch_bc_statement): Fixed typos. Handle SWITCH statement
14395 context.
14396 (patch_switch_statement, case_identity, java_expand_switch): New
14397 functions.
14398
14399 1998-09-21 Per Bothner <bothner@cygnus.com>
14400
14401 * buffer.h (BUFFER_INIT): New macro.
14402 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
14403 Pass (struct jcf_partial *state) to most functions.
14404 (jcf_block, jcf_relocation): New types.
14405 Support labels, branches, conditionals, loops.
14406
14407 1998-09-21 Tom Tromey <tromey@cygnus.com>
14408
14409 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
14410
14411 1998-09-21 Per Bothner <bothner@cygnus.com>
14412
14413 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
14414 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
14415 not integer_type_node (INT_TYPE_SIZ bits).
14416
14417 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
14418
14419 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
14420 * jcf-dump.c (print_exception_table): New function.
14421 (disassemble_method): Better handling of wide instructions.
14422 Make more robust for bad input.
14423
14424 1998-09-30 Jeffrey A Law (law@cygnus.com)
14425
14426 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
14427 FreeBSD.
14428
14429 1998-09-17 Jeffrey A Law (law@cygnus.com)
14430
14431 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
14432
14433 1998-09-17 Tom Tromey <tromey@cygnus.com>
14434
14435 * Makefile.in ($(PARSE_H)): Removed target.
14436
14437 1998-09-17 Jeffrey A Law (law@cygnus.com)
14438
14439 * Makefile.in (JAVA_OBJS): Add memmove.o
14440 (memmove.o): New target & rules.
14441
14442 1998-09-15 Tom Tromey <tromey@cygnus.com>
14443
14444 * expr.c (expand_invoke): Don't generate a call to the class init
14445 code.
14446
14447 1998-09-14 Jeffrey A Law (law@cygnus.com)
14448
14449 * Makefile.in: Add many missing dependencies.
14450 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
14451 as appropriate.
14452 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
14453 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
14454
14455 1998-09-11 Per Bothner <bothner@cygnus.com>
14456
14457 * decl.c (complete_start_java_method): If method is static (and
14458 not private) call _Jv_InitClass.
14459 * expr.c (expand_invoke): Don't call build_class_init.
14460
14461 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
14462
14463 1998-09-10 Jeffrey A Law (law@cygnus.com)
14464
14465 * Make-lang.in (GCJ): Define before using.
14466
14467 1998-09-09 Jeffrey A Law (law@cygnus.com)
14468
14469 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
14470 losing due to namespace pollution in GNU getopt.h
14471
14472 1998-09-09 Tom Tromey <tromey@cygnus.com>
14473
14474 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
14475 (java.all.cross): Likewise.
14476 (java.rest.encap): Likewise.
14477
14478 1998-09-08 Jeffrey A Law (law@cygnus.com)
14479
14480 * gjavah.c (print_class_decls): Fix thinko in arglist
14481 * jcv-io.c (find_classfile): Similarly.
14482
14483 1998-09-07 Jeffrey A Law (law@cygnus.com)
14484
14485 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
14486
14487 1998-09-05 Tom Tromey <tromey@cygnus.com>
14488
14489 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
14490 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
14491 * Makefile.in (PARSE_C): New macro.
14492 (PARSE_H): Likewise.
14493 (PARSE_SCAN_C): Likewise.
14494 ($(PARSE_C)): Target renamed from parse.c.
14495 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
14496 (clean): Remove parse-scan.c as well.
14497 (parse.o): Depend on $(PARSE_C).
14498
14499 1998-09-05 Anthony Green <green@cygnus.com>
14500
14501 * README, license.terms: Removed.
14502
14503 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
14504 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
14505 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
14506 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
14507 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
14508 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
14509 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
14510 and Java trademark attribution.
14511
14512 1998-09-04 Tom Tromey <tromey@cygnus.com>
14513
14514 * Makefile.in: Use gcjh, not gjavah.
14515 * config-lang.in (stagestuff): Use gcjh, not gjavah.
14516 * Make-lang.in: Changed gjavah to gcjh everywhere.
14517
14518 1998-09-03 Per Bothner <bothner@cygnus.com>
14519
14520 * gjavah.c: Support new -prepend -add -append flags.
14521 (print_method_info): Method is not virtual if class is final.
14522
14523 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14524
14525 * jv-scan.c: Fixed copyright assignment.
14526 * keyword.gperf: Likewise.
14527 * keyword.h: Likewise.
14528 * lex.c: Fixed copyright assignment.
14529 (java_lex): Push unicode back when parsing '<'.
14530 * lex.h: Fixed copyright assignment.
14531 * parse-scan.y: Likewise.
14532 * parse.h: Fixed copyright assignment.
14533 (build_debugable_stmt, complete_for_loop): New function prototypes.
14534 * parse.y: Fixed copyright assignment.
14535 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
14536 size_zero_node when completing a loop with no exit condition.
14537 (for_statement_nsi:): Define action.
14538 (for_init:, for_update:): Return size_zero_node when empty.
14539 (declare_local_variables): Call build_debugable_stmt.
14540 (build_debugable_stmt): New function.
14541 (build_loop_body): Build debugable statement around loop
14542 condition part.
14543 (complete_loop_body): Take into account the debugable statement
14544 around the EXIT_EXPR.
14545 (complete_loop_body): New function.
14546 (patch_exit_expr): Fixed condition inversion.
14547
14548 1998-09-02 Tom Tromey <tromey@cygnus.com>
14549
14550 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
14551 name of thread define.
14552 * jvspec.c (THREAD_NAME): New macro.
14553 (GCLIB): Likewise.
14554 (THREADLIB): Likewise.
14555 (lang_specific_driver): Recognize attempt to link with thread
14556 library or gc library. Recognize -ljava on command line so it
14557 isn't linked against more than once.
14558
14559 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14560
14561 * parse-scan.y (report_main_declaration): Name of the class
14562 containing `main' can be a qualified name.
14563
14564 1998-08-31 Tom Tromey <tromey@cygnus.com>
14565
14566 * config-lang.in: Changed gjavac to gjc everywhere.
14567 * Make-lang.in: Changed gjavac to gjc everywhere.
14568
14569 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14570
14571 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
14572 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
14573 and install the files.
14574 * Makefile.in (JAVA_OBJS_LITE): New variable.
14575 (compiler:): Now include jv-scan as a dependency.
14576 (../jv-scan$(exeext), parse-scan.c): New targets.
14577 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
14578 * config-lang.in (compilers): Removed gcj, gjavah from the list.
14579 * jcf-parse.c (parse_source_file): Call java_layout_classes and
14580 check for errors even if parse_only.
14581 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
14582 defined.
14583 (yylex): New function. Uses java_lex body.
14584 (java_lex): Removed commented out statement. Remove local variable
14585 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
14586 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
14587 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
14588 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
14589 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
14590 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
14591 where appropriate.
14592 (java_lex_error): Empty if JC1_LITE is defined.
14593 (java_get_line_col): Return 0 if JC1_LITE is defined.
14594 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
14595 SET_MODIFIER_CTX): Moved into the section containing the macros
14596 conditionally defined by JC1_LITE.
14597 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
14598 argument if JC1_LITE is defined.
14599 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
14600 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
14601 is defined.
14602 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
14603 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
14604 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
14605 to different values according to JC1_LITE.
14606 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
14607 declared if JC1_LITE set.
14608 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
14609 defined if JC1_LITE not set.
14610 (struct parser_ctx): Reorganized and skip the jc1 front end part
14611 if JC1_LITE set.
14612 (java_layout_classes): New function definition.
14613 (java_push_parser_context, java_init_lex, yyparse, yylex,
14614 yyerror): Prototype always declared. All other static function
14615 prototypes declared only if JC1_LITE is not set.
14616 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
14617 declared in parse.h.
14618 (java_layout_classes): New function.
14619 (java_complete_expand_methods): No longer layout the class here.
14620 * parse-scan.y: New file.
14621 * jv-scan.c: New file.
14622
14623 1998-08-25 Tom Tromey <tromey@cygnus.com>
14624
14625 * gjavah.c (main): Handle -friend option.
14626 (friend_specs): New global.
14627 (generate_access): Handle friend_specs.
14628 (process_file): Likewise.
14629 (MAX_FRIENDS): New macro.
14630 (friend_count): New global.
14631 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
14632 Changed all callers.
14633
14634 1998-08-24 Per Bothner <bothner@cygnus.com>
14635
14636 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
14637 (main): Handle processing all the entries of a named .zip archive.
14638 * jcf-io.c (jcf_trim_old_input): New function.
14639 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
14640
14641 1998-08-24 Per Bothner <bothner@cygnus.com>
14642
14643 * lang.c (flag_assume_compiled): Make default be on.
14644
14645 1998-08-21 Per Bothner <bothner@cygnus.com>
14646
14647 * jcf-dump.c: Add bunches of flags to control output more.
14648 (process_class): New function; support printing more than one class.
14649 (main): Support new --print-main and --javap flags.
14650 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
14651 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
14652
14653 1998-08-20 Per Bothner <bothner@cygnus.com>
14654
14655 Change mangling of dispatch table to match C++ vtable (w/thunks).
14656 * class.c (build_dtable_decl), java-tree.h: New function.
14657 (make_class_data): Call it.
14658 * decl.c (init_decl_processing): Likewise.
14659
14660 1998-08-19 Warren Levy <warrenl@cygnus.com>
14661
14662 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
14663 soft_anewarray; adjust args passed.
14664 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
14665 match _Jv_NewObjectArray.
14666
14667 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14668
14669 * decl.c (push_labeled_block, pop_labeled_block): New functions.
14670 * expr.c (loopup_label): Call create_label_decl.
14671 (create_label_decl): New function.
14672 (java_lang_expand_expr): Call expand_start_bindings with argument
14673 set to zero.
14674 * java-tree.h Added space after PROTO in function declarations
14675 when necessary.
14676 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
14677 (create_label_decl, push_labeled_block): New function
14678 declarations.
14679 * lex.c (label_id): Initialize.
14680 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
14681 switch.
14682 * parse.h Added space after PROTO in function declarations when
14683 necessary.
14684 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
14685 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
14686 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
14687 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
14688 macros.
14689 (struct parser_ctxt): New fields current_loop,
14690 current_labeled_block.
14691 (build_if_else_statement, patch_if_else_statement,
14692 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
14693 generate_labeled_block, complete_labeled_statement,
14694 build_bc_statement, patch_bc_statement, patch_loop_statement,
14695 build_new_loop, build_loop_body, complete_loop_body): New function
14696 declarations.
14697 * parse.y (java_warning_count): New global variable.
14698 (label_id): New static variable.
14699 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
14700 (block:): Return size_zero_node when block is empty.
14701 (empty_statement:): Return size_zero_node.
14702 (statement:): Implement supplemental action when for_statement: is
14703 reduced.
14704 (label_decl:): New rule.
14705 (labeled_statement:): Rewritten using label_decl. Actions
14706 implemented.
14707 (labeled_statement_nsi:): Likewise.
14708 (if_then_statement): Actions implemented.
14709 (while_expression): New rule.
14710 (while_statement:): Rewritten using while_expression. Actions
14711 implemented.
14712 (while_statement_nsi:): Likewise.
14713 (do_statement_begin:): New rule.
14714 (do_statement:): Rewritten using do_statement_begin. Actions
14715 implemented.
14716 (for_statement:): Rewritten using for_begin. Actions implemented.
14717 (for_statement_nsi:): Likewise.
14718 (for_header:, for_begin:): New rules.
14719 (for_init:): Actions implemented.
14720 (statement_expression_list:, break_statement:,
14721 continue_statement:): Likewise.
14722 (yyerror): Count number of issued warning(s).
14723 (java_report_errors): Report error(s) and/or warning(s).
14724 (java_complete_class): Use build_java_argument_signature to
14725 recompute completed method signature.
14726 (java_check_regular_methods): New locals method_wfl and aflags.
14727 Use method_wfl instead of lookup_cl during error reports. Fixed
14728 indentation and modified some error messages. Use
14729 lang_printable_name in method instead of the DECL_NAME. New code
14730 to issue warnings on methods not overriding corresponding methods
14731 private to a different package.
14732 (java_method_add_stmt): Call add_stmt_to_compound.
14733 (add_stmt_to_compound): New function.
14734 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
14735 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
14736 (build_if_else_statement, patch_if_else_statement,
14737 build_labeled_block, generate_labeled_block,
14738 complete_labeled_statement, build_new_loop, build_loop_body,
14739 complete_loop_body, patch_loop_statement, build_bc_statement,
14740 patch_bc_statement, patch_exit_expr): New functions.
14741 * typeck.c (build_java_signature): Build argument signature before
14742 enclosing it in between parenthesis.
14743
14744 1998-08-17 Warren Levy <warrenl@cygnus.com>
14745
14746 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
14747 (JAVA_OBJS): Added reminder comment
14748
14749 1998-08-13 Nick Clifton <nickc@cygnus.com>
14750
14751 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
14752 be interpreted as a long long.
14753
14754 1998-08-13 Warren Levy <warrenl@cygnus.com>
14755
14756 * decl.c (init_decl_processing): Use _Jv_InitClass, not
14757 soft_initialise_class. Use _Jv_NewMultiArray, not
14758 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
14759 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
14760 _Jv_CheckArrayStore, not soft_checkarraystore. Use
14761 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
14762
14763 1998-08-12 Per Bothner <bothner@cygnus.com>
14764
14765 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
14766 length_identifier_node): New global tree node constants.
14767 * parse.y (kw_super, kw_this, kw_length): Removed globals.
14768 Replace uses by super_identifier_node etc.
14769 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
14770
14771 * parse.y (resolve_field_access): Don't special-case ".length" if
14772 flag_emit_class_files.
14773 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
14774 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
14775 and ARRAY.length.
14776
14777 1998-08-11 Per Bothner <bothner@cygnus.com>
14778
14779 * decl.c (init_decl_processing): Remove unused method_type_node fields.
14780 * class.c (make_method_value): Remove init for removed fields.
14781
14782 * class.c (layout_class): Use build_java_argument_signature.
14783 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
14784
14785 * typeck.c (push_java_argument_signature): Removed. Merged into ...
14786 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
14787 (build_java_signature): Don't use push_java_argument_signature.
14788
14789 * typeck.c (lookup_argument_method): New function.
14790 * parse.y (java_check_regular_methods): Use lookup_argument_method
14791 instead of lookup_java_method2 followed by lookup_java_method.
14792
14793 * parse.y (check_method_redefinition): Minor optimization.
14794
14795 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
14796 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
14797
14798 1998-08-10 Tom Tromey <tromey@cygnus.com>
14799
14800 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
14801 c-pragma.o.
14802
14803 * gjavah.c (java_float_finite): Use K&R-style definition.
14804 (java_double_finite): Likewise.
14805 (generate_access): Now returns void. Changed all callers.
14806 (last_access_generated): Removed.
14807 (process_file): Only make a single pass over the .class file.
14808
14809 1998-07-29 Per Bothner <bothner@cygnus.com>
14810
14811 * class.c (get_dispatch_table): Add extra dummy vtable entry,
14812 for compatibility for G++ (with -fvtable-thunks).
14813 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
14814
14815 * gjavah.c (process_file): Use public inheritance for super-class.
14816
14817 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
14818
14819 * lex.c (java_init_lex): Initialize ctxp->package.
14820 * parse.h (struct parser_ctxt): package and package_len replaced
14821 by tree package, an identifier node. Field method_decl_list is
14822 gone. Fixed comments.
14823 (lookup_field_wrapper, merge_qualified_name, not_accessible,
14824 class_in_current_package): New function prototypes.
14825 * parse.y (array_type:): Set class loaded flag on primitive type
14826 arrays.
14827 (package_declaration:): Assign ctxp->package to the
14828 identifier node.
14829 (method_invocation:): Handle invocation of method qualified by
14830 `super'.
14831 (single_type_import_declaration:): Removed ambiguity check.
14832 (java_pop_parser_context): New local variable `next'. Reset and
14833 set IMPORT_CLASSFILE_NAME flags on current and previous import
14834 list.
14835 (java_accstring_lookup): Use new local macro COPY_RETURN.
14836 (lookup_field_wrapper): New function.
14837 (parser_qualified_classname): Use merge_qualified_name.
14838 (parser_check_super_interface): Broaden error message.
14839 (do_resolve_class): Check for qualified class name in the current
14840 compilation unit if appropriate.
14841 (process_imports): Check for already defined classes.
14842 (check_pkg_class_access): Got rid of call to
14843 get_access_flags_from_decl.
14844 (java_complete_expand_methods): Call safe_layout_class based on
14845 the current class size.
14846 (make_qualified_primary): Build a WFL qualification on primary if
14847 none exists.
14848 (merge_qualified_name): New function.
14849 (make_qualified_name): Use merge_qualified_name.
14850 (resolve_expression_name): Use safe_lookup_field.
14851 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
14852 (resolve_qualified_expression_name): Likewise. Check on resolved
14853 element accessibility.
14854 (not_accessible_p, class_in_current_package): New functions.
14855 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
14856 (patch_method_invocation_stmt): Merged common pieces. Check
14857 accessibility of invoked method.
14858 (check_for_static_method_reference): Add returned type in error
14859 message.
14860 (invocation_mode): Get rid of bogus check on PRIVATE methods.
14861 (refine_accessible_methods_list): Merged two conditions in test.
14862 (java_complete_class): Sanity check on stabilize_ref gone.
14863 * zextract.c (read_zip_archive): Cast lseek second argument to long.
14864
14865 1998-07-28 Per Bothner <bothner@cygnus.com>
14866
14867 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
14868
14869 1998-07-24 Tom Tromey <tromey@cygnus.com>
14870
14871 * gjavah.c (F_NAN): Removed.
14872 (F_NAN_MASK): New macro.
14873 (F_POSITIVE_INFINITY): Removed.
14874 (F_NEGATIVE_INFINITY): Likewise.
14875 (java_float_finite): Rewrote.
14876 (D_NAN_MASK): Renamed.
14877 (java_double_finite): Rewrote.
14878 (D_POSITIVE_INFINITY): Removed.
14879 (D_NEGATIVE_INFINITY): Likewise.
14880
14881 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
14882 If verbose, print underlying representation of value in hex.
14883
14884 1998-07-24 Per Bothner <bothner@cygnus.com>
14885
14886 * buffer.h, buffer.c: New files.
14887 * Makefile.in (JAVA_OBJS): Add buffer.o.
14888
14889 Support locals variables and writing their debug entries to .class.
14890 * jcf-write.c: Simplify some by user new buffer type.
14891 (vode_buffer_grow): Removed.
14892 (struct localvar_info): New type.
14893 (localsvars, localvartable): New buffers.
14894 (localvar_alloc, localvar_free): New functions.
14895 (generate_bytecode_insns): Handle local variables.
14896 (generate_classfile): Write LocalVariableTable attribute.
14897
14898 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14899
14900 * jcf-io.c (open_in_zip): Check the zipfile magic number.
14901 * zipfile.h (ZIPMAGIC): New macro.
14902
14903 1998-07-24 Tom Tromey <tromey@cygnus.com>
14904
14905 * Makefile.in (gjavah.o): Updated dependencies.
14906 (jcf-dump.o): Likewise.
14907 (all.indirect): Use ../gjavah.
14908 (../gjavah$(exeext)): Likewise.
14909 (clean): Don't remove gjavah.
14910 (clean): Remove parse.c, not java/parse.c.
14911 * Make-lang.in (java): Added gjavah.
14912 (gjavah$(exeext)): New target.
14913 (GJAVAH_SOURCES): New macro.
14914 (java.all.build): Added gjavah.
14915 (java.all.cross): Likewise.
14916 (java.rest.encap): Likewise.
14917 * config-lang.in (compilers, stagestuff): Added gjavah.
14918
14919 1998-07-23 Tom Tromey <tromey@cygnus.com>
14920
14921 * gjavah.c (java_float_finite): New function.
14922 (java_double_finite): Likewise.
14923 (F_POSITIVE_INFINITY): New macro.
14924 (F_NEGATIVE_INFINITY): Likewise.
14925 (F_NAN): Likewise.
14926 (D_POSITIVE_INFINITY): Likewise.
14927 (D_NEGATIVE_INFINITY): Likewise.
14928 (D_NAN): Likewise.
14929 (print_field_info): Use java_float_finite and java_double_finite.
14930
14931 1998-07-23 Per Bothner <bothner@cygnus.com>
14932
14933 * parse.y (method_header): Name "this" implicit argument.
14934
14935 1998-07-22 Per Bothner <bothner@cygnus.com>
14936
14937 * jcf-write.c: Write out LineNumberTable attribute in .class file.
14938 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
14939 (put_linenumber): New function.
14940 (generate_bytecode_insns, generate_classfile): Write line numbers.
14941
14942 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14943
14944 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
14945 (lookup_name, build_known_method_ref, build_class_init,
14946 build_invokevirtual, invoke_build_dtable, match_java_method,
14947 build_field_ref, pushdecl_force_head, build_java_binop,
14948 binary_numeric_promotion, build_decl_no_layout,
14949 build_java_arrayaccess, build_newarray, build_anewarray,
14950 build_java_array_length_access, build_java_arraynull_check): New
14951 extern function prototypes.
14952 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14953 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
14954 java-tree.h.
14955 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
14956 to NULL
14957 * jcf.h (jcf_out_of_synch): New extern function prototype.
14958 * parse.h: Static/global function implemented in parse.y
14959 prototyped and declarations moved at the end of the file.
14960 (DECL_P): Check that the argument isn't null.
14961 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14962 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
14963 (QUAL_DECL_TYPE): New macro.
14964 (PARAMS): Macro definition removed.
14965 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
14966 (return_statement:): Call build_return.
14967 (field_access:): Call make_qualified_primary in sub rule.
14968 (method_invocation:): Build method invocation and call
14969 make_qualified_primary when processing primaries.
14970 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
14971 get_type_from_signature.
14972 (java_check_regular_method): Extra integer 0 argument when calling
14973 lookup_java_method2.
14974 (lookup_java_interface_method2): Extra method DECL argument when
14975 calling lookup_java_interface_method2.
14976 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
14977 COMPOUND_EXPR node.
14978 (java_complete_expand_method): Layout current class iff not
14979 already done. Don't process interface's methods.
14980 (java_complete_expand_method): Use super class only if it
14981 exists. Use current class otherwise.
14982 (make_qualified_primary): New function.
14983 (resolve_expression_name): Process qualified expression or
14984 expression from primary the same way.
14985 (resolve_expression_name): Two last arguments to
14986 resolve_field_access are now NULL_TREEs.
14987 (resolve_field_access): New variable is_static. Local field must
14988 be DECLs. is_static computed on field DECLs only. Append code in
14989 where_found to the field access if necessary. Use QUAL_DECL_TYPE
14990 to initialize field_type.
14991 (resolve_qualified_expression_name): New local variable,
14992 previous_call_static and is_static. Handle primaries with function
14993 calls, casts, array references and `this'. `super' now handled as
14994 `(super_class)this'. Use is_static to clarify boolean expressions.
14995 Added code to handle case where a proper handle is required to
14996 access a field. Use QUAL_DECL_TYPE where applicable.
14997 (maybe_access_field): New function.
14998 (patch_method_invocation_stmt): New arguments primary, where,
14999 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
15000 deleted. Use `where' as a type to search from if specified. Check
15001 for static method reference where forbidden. Append primary or
15002 current_this to the argument list if not calling constructor nor
15003 static methods.
15004 (check_for_static_method_reference): New function.
15005 (patch_invoke): Layout the class on which new is done if
15006 necessary.
15007 (lookup_method_invoke): Changed format to report errors on
15008 methods.
15009 (qualify_ambiguous_name): New local variable this_found. Now
15010 handle things from primaries. Method call are considered
15011 expression names.
15012 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
15013 changed into NULLs.
15014 (not_initialized_as_it_should_p): Comply with the new DECL_P.
15015 (java_complete_tree): New case fo RETURN_EXPR. Process function
15016 call arguments in separate function.
15017 (complete_function_arguments): New function.
15018 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
15019 anymore.
15020 (patch_assignment): Take the return function slot into account as
15021 a RHS. Distinguish assignment from a return.
15022 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
15023 when checking methods in interfaces.
15024 (resolve_type_during_patch): NULL argument to unresolve_type_p
15025 instead of NULL_TREE.
15026 (patch_newarray): Fixed typo in comment.
15027 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
15028 (build_return, patch_return): New functions.
15029 * typeck.c (lookup_java_constructor): Fixed typo in comment.
15030
15031 1998-07-21 Per Bothner <bothner@cygnus.com>
15032
15033 * constants.c (find_name_and_type_constant, find_fieldref_index,
15034 find_methodref_index): New methods.
15035 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
15036 just return given method. Also, rename to build_known_method_ref.
15037 (expand_invoke): Rename call to build_invoke_non_interface.
15038 * java-tree.h, parse.h: Update prototype.
15039 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
15040 (such as expand_expr_stmt) if flag_emit_class_files.
15041 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
15042 STACK_TARGET, IGNORE_TARGET): New macros.
15043 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
15044 (generate_bytecode_insn): New function to generate method's bytecode.
15045 (generate_classfile): Node generate Code attribute for a method.
15046 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
15047 push_long_const, field_op, adjust_typed_op, maybe_wide):
15048 New functions used by generate_bytecode_insn.
15049
15050 * typeck.c (signature_include_return): Remove variable.
15051 (push_java_argument_signature, build_java_argument_signature): New.
15052 (build_java_signature): Use push_java_argument_signature.
15053 * parse.y: Use build_java_argument_signature instead of fiddling
15054 with signature_include_return.
15055
15056 1998-07-17 Tom Tromey <tromey@cygnus.com>
15057
15058 * gjavah.c (print_c_decl): Always generate JArray<>* for array
15059 types.
15060
15061 * Makefile.in (all.indirect): Added gjavah$(exeext).
15062 (gjavah$(exeext)): Added $(exeext).
15063 (clean): Likewise.
15064
15065 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15066
15067 * class.c (layout_class): Call to java_layout_parsed_class replace
15068 by safe_layout_class.
15069 * expr.c (build_java_array_length_access): Removed static storage
15070 class in the function definition.
15071 (build_java_arraynull_check): Likewise.
15072 Also fixed typos in two comments.
15073 * lex.c (java_init_lex): Initialize static global kw_length.
15074 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
15075 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
15076 java_lex_error.
15077 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
15078 * parse.h (resolve_no_layout): New static function declaration.
15079 (get_identifier_in_static): Declaration removed.
15080 (java_layout_parsed_class): Function name declaration changed to
15081 safe_layout_class.
15082 (build_newarray_node, patch_newarray, resolve_type_during_patch,
15083 not_initialized_as_it_should_p, build_this): New static function
15084 declarations.
15085 (pushdecl_force_head, build_java_binop, int_fits_type_p,
15086 binary_numeric_promotion, stabilize_reference,
15087 build_decl_no_layout, build_java_arrayaccess): Extern function
15088 declarations moved into their own section.
15089 (build_newarray, build_anewarray, build_java_array_length_access,
15090 build_java_arraynull_check): New extern function declarations.
15091 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
15092 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
15093 fake tree codes.
15094 (CALL_CONSTRUCTOR_P): New macro.
15095 * parse.y (kw_length): New static global tree node.
15096 (return_statement): Tagged <node>.
15097 (RETURN_TK): Tagged <operator>.
15098 (variable_declarator_id:): Build variable declaration with an
15099 empty initialization value if a syntax error was found in the
15100 initialization part of the variable declaration.
15101 (statement_without_trailing_substatement:): return_statement: now
15102 uses the default rule.
15103 (return_statement:): Temporarily fixed to return NULL_TREE.
15104 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
15105 (class_instance_creation_expression:): Class creation rules now
15106 call build_method_invocation upon reduction.
15107 (array_creation_expression:): Rules call build_newarray_node upon
15108 reduction.
15109 (dim_exprs:): Build a list of dimension expressions.
15110 (dim_expr:): Store location of the OSB_TK in the dimension
15111 expression node.
15112 (method_invocation:): Added a new error rule.
15113 (build_unresolved_array_type): WFL argument may also be an array
15114 on a primitive type. Name of the argument changed to reflect this.
15115 (method_declarator): Insert argument type at the beginning of the
15116 argument type list and later reverse the list.
15117 (unresolved_type_p): Argument 'returned' may be optionally
15118 NULL_TREE.
15119 (java_layout_class_from_source): Function renamed
15120 safe_layout_class.
15121 (resolve_and_layout): Now call resolve_no_layout and
15122 safe_layout_class.
15123 (resolve_no_layout): New function.
15124 (purify_type_name): New function.
15125 (complete_class_report_errors): Call purify_type_name during error
15126 report on a type not found.
15127 (process_imports): error_found local variable doesn't need to be
15128 initialized to zero.
15129 (declare_local_variables): New local type_wfl. Fixed typo in error
15130 message. type_wfl assigned to unresolved type and used to register
15131 incomplete type. Build a WFL around the variable initialization
15132 statement so that debug info can be generated on it.
15133 (source_start_java_method): Reverse argument list after they've
15134 been processed.
15135 (current_this): New static global variable.
15136 (java_complete_expand_methods): Set current_this when appropriate.
15137 (resolve_expression_name): Build correct static and non static
15138 field access bearing a simple name.
15139 (resolve_field_access): Resolve the length field of arrays. Handle
15140 f.m() cases.
15141 (patch_method_invocation_stmt): Set the type of the method
15142 invocation to error_mark_node. This value is later overridden by a
15143 valid type, if any. Don't handle qualified constructor invocation
15144 as qualified method invocation. Call lookup_method_invoke with its
15145 new flag. It's no longer necessary to access the selected method
15146 as the value of a tree list. Handle constructor invocation.
15147 (patch_invoke): Reverse argument list when invoking non interface
15148 methods. Insert call to new as the first argument of the
15149 constructor.
15150 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
15151 defined within a final class. Return INVOKE_STATIC if the invoked
15152 method is a constructor.
15153 (lookup_method_invoke): New lc argument is a flag to indicate a
15154 constructor lookup. Now handle constructor lookup. Choose the most
15155 specific method in case several were matching the invocation
15156 requirements. Return a method decl instead of a tree list featuring
15157 one single method decl element.
15158 (refine_accessible_methods_list): New lc flag argument to
15159 indicate that a constructor is being looked up.
15160 (not_initialized_as_it_should_p): New function.
15161 (java_complete_tree): Now process fake tree codes
15162 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
15163 save_expr on resolved function call arguments. Case on
15164 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
15165 (patch_assignment): LHS can be a field access expression. When
15166 dealing with reference, lhs_type is the promoted type of the
15167 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
15168 applicable.
15169 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
15170 (patch_binop): Use not_initialized_as_it_should_p where
15171 applicable.
15172 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
15173 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
15174 where applicable.
15175 (resolve_type_during_patch): New function.
15176 (patch_cast): Call resolve_type_during_patch to resolve type and
15177 report error accordingly.
15178 (patch_array_ref): Use not_initialized_as_it_should_p where
15179 applicable. Array base expression is saved before being
15180 used. Promote the type of an array elements if it contains non
15181 builtin types.
15182 (build_newarray_node, patch_newarray, build_this): New functions.
15183
15184 1998-07-16 Tom Tromey <tromey@cygnus.com>
15185
15186 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
15187 increment it in `for' statement.
15188 (print_field_info): If number is inf or nan, don't print it.
15189 (print_method_info): If method name is `delete', just ignore it.
15190 (print_c_decl): Special-case jstringArray.
15191
15192 * gjavah.c (help): New function.
15193 (no_argument): New function.
15194 (usage): Changed text.
15195 (main): Rewrote argument handling. Now handles -v, --help,
15196 --version.
15197 (version): New function.
15198 (found_error): New global.
15199 (main): Return found_error.
15200 (generate_access): Set found_error.
15201 (print_c_decl): Likewise.
15202
15203 1998-07-15 Tom Tromey <tromey@cygnus.com>
15204
15205 * gjavah.c (print_c_decl): Don't print "," when examining field.
15206 Skip type name when looking at "[L" types.
15207 (process_file): Now static.
15208 (generate_access): Now returns int.
15209 (last_access_generated): New global.
15210 (process_file): Clear last_access_generated; make multiple passes
15211 over the class.
15212 (print_field_info): Just return if generate_access returns true.
15213 (print_method_info): Likewise. Also, allow <init> functions to
15214 pass through.
15215 (print_c_decl): Added is_init argument. Print constructors
15216 properly.
15217 (print_cxx_classname): Use UTF8_GET to extract characters from
15218 string.
15219 (print_base_classname): New function.
15220 (print_class_decls): New function.
15221 (process_file): Use it.
15222 (utf8_cmp): New function.
15223
15224 1998-07-13 Nick Clifton <nickc@cygnus.com>
15225
15226 * lang-options.h: Format changed to match changes in gcc/toplev.c
15227 to implement a --help option.
15228
15229 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
15230
15231 * decl.c (init_decl_processing): Revert change to dtable_type.
15232
15233 1998-07-09 Per Bothner <bothner@cygnus.com>
15234
15235 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
15236
15237 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
15238
15239 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
15240
15241 * lang.c (lang_init): Default flag_exceptions to 1, without
15242 checking to see if it's 2 first.
15243
15244 1998-07-08 Jeffrey A Law (law@cygnus.com)
15245
15246 * constants.c: Include "system.h".
15247 * decl.c: Likewise.
15248 * lang.c (flag_new_exceptions): Get via extern now.
15249 (lang_init_options): New functions. Turn on flag_new_exceptions.
15250
15251 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
15252
15253 * lex.c (java_lex): Return 0 when we see an invalid character in
15254 the input.
15255
15256 * lex.c (java_read_char): Specify extra argument when calling
15257 java_lex_error.
15258 (java_read_unicode, java_parse_end_comment,
15259 java_parse_escape_sequence): Likewise,
15260 (java_lex): Specify extra argument when calling
15261 java_lex_error. Test that IDs are beginning with a legal character
15262 for IDs. Handle invalid characters with an error message and a
15263 call to java_lex_error.
15264 (java_lex_error): Adjust column position by new argument
15265 `forward'. Issue an error even if in the middle of reporting an
15266 other error.
15267
15268 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
15269
15270 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
15271 we don't explicitly put a null pointer when we're copying it.
15272
15273 1998-07-07 Tom Tromey <tromey@cygnus.com>
15274
15275 * gjavah.c (print_cxx_classname): New function.
15276 (super_class_name): Likewise.
15277 (print_super_fields): Removed.
15278 (in_super): Removed.
15279 (print_field_info): Never generate #defines.
15280 (print_c_decl): Changed generated types to match JNI. No longer
15281 print class name before method name.
15282 (print_method_info): Print "static" before static methods.
15283 Print "virtual" before non-final methods.
15284 (usage): Use exit(1), not exit(-1).
15285 (main): Likewise.
15286 (print_field_info): Use %.17g to print a double.
15287 (last_access): New globals.
15288 (process_file): Initialize last_access.
15289 (usage): Now static.
15290 (ACC_VISIBILITY): New define.
15291 (generate_access): New function.
15292 (print_field_info): Call it.
15293 (print_method_info): Likewise. Also, generate information for all
15294 methods, not just native methods. Return void.
15295 (print_c_decl): Return void.
15296 (print_field_info): Return void.
15297
15298 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
15299
15300 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
15301 processing the jc1 grammar file. Prefix bison functions and
15302 variables with java_.
15303 (parse.c): Dependencies on parse.h and lex.h
15304 * expr.c (build_java_arrayaccess): Function now global.
15305 * java-tree.h: Comment reorganized to carry on previous
15306 classification effort.
15307 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
15308 RESOLVE_TYPE_NAME_P): New flags on WFLs.
15309 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
15310 java_parse (new prefix java_ generated by bison).
15311 (java_layout_parsed_class, java_register_parsed_class): Function
15312 call removed.
15313 (yyparse): Removed unnecessary call to init_outgoing_cpool.
15314 * lex.c (static tree wfl_op): Variable deleted.
15315 (java_init_lex): Initialize kw_super and kw_this. Initialize more
15316 ctxp fields to NULL_TREE.
15317 (java_lex): No longer create WFL for operators. Filename caching
15318 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
15319 created as STRING_CST and later expanded. Removed extra argument
15320 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
15321 and SUPER.
15322 (build_wfl_node): Removed code in comments.
15323 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
15324 store token and location data in the current bison token.
15325 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
15326 static/extern function declaration at the beginning of the file.
15327 (struct qualification): Data structure definition deleted.
15328 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
15329 (qualify_ambiguous_name): Function declaration modified. Function
15330 now returns nothing.
15331 (build_array_ref, patch_array_ref, make_qualified_name,
15332 resolve_qualified_expression_name, maybe_generate_clinit,
15333 resolve_field_access): New static function declarations.
15334 (build_java_arrayaccess): New extern function declaration.
15335 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
15336 (CALL_EXPR_PRIMARY): Macro deleted.
15337 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
15338 (struct parser_ctxt): Field initialized_final
15339 removed. non_static_initialized, static_initialized: New fields.
15340 * parse.y (static tree kw_super, static tree kw_this): New global
15341 static.
15342 (%union): tree wfl field of operator member replaced by int
15343 location. WFLs are non longer created for operators.
15344 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
15345 (qualified_name:): Now calls make_qualified_name to build the
15346 identifier.
15347 (type_declaration:): Consider generating <clinit> when class
15348 parsing completed.
15349 (variable_declarator:): Directly build an assignment node when the
15350 variable is initialized when declared.
15351 (this_or_super:): Build a WFL and set current location when THIS
15352 or SUPER are parsed.
15353 (expression_statement:): Wrap statement around a WFL.
15354 (primary_no_new_array:): Fixed typo. Changed value returned by
15355 THIS_TK because of its new type (temporary).
15356 (dim_exprs:): Temporary fix because of OSB_TK's new type.
15357 (field_access:): Build qualified name with SUPER.
15358 (method_invocation:): Fixed returned value because of SUPER's new
15359 type.
15360 (array_access:): Use OSB_TK location information.
15361 (post_increment_expression:, post_decrement_expression:,
15362 unary_expression:, pre_increment_expression:,
15363 pre_decrement_expression:, unary_expression_not_plus_minus:,
15364 cast_expression:, multiplicative_expression:,
15365 additive_expression:, shift_expression:, relational_expression:,
15366 equality_expression:, and_expression:, exclusive_or_expression:,
15367 inclusive_or_expression:, conditional_and_expression:,
15368 conditional_or_expression:, assignment:): Use new location/token
15369 information available on operators.
15370 (create_class): Set super_decl_type to NULL_TREE when processing
15371 java.lang.Object.
15372 (register_fields): Field initialization is now a MODIFY_EXPR
15373 node. Chain initialization code to the matching lists (according
15374 to the field declaration modifiers).
15375 (maybe_generate_clinit): New function.
15376 (method_header): Don't set method's DECL_NAME to a WFL when adding
15377 methods to java.lang.Object.
15378 (resolve_and_layout): Now can return NULL_TREE if the type
15379 resolution fails. Otherwise, return the class DECL instead of its
15380 TYPE.
15381 (check_method_redefinition): Don't patch method DECL_NAME if it
15382 belongs to java.lang.Object.
15383 (process_imports): Simply assign error_found to the value returned
15384 by check_pkg_class_access.
15385 (declare_local_variables): Don't use their init statements (if
15386 any) when parsing error were previously found. Reuse MODIFY_EXPR
15387 build during parsing as an init statement.
15388 (java_method_add_stmt): Now return the current method body.
15389 (java_layout_parsed_class, java_register_parsed_class): Functions
15390 removed.
15391 (java_complete_expand_methods): Initialize the constant pool on a
15392 per class basis. Layout the classes before expanding their method
15393 bodies. Don't try expand artificial constructor code if error were
15394 found. Make the classes data and register them if no error were
15395 found.
15396 (java_complete_expand_method): Retrieve an artificial constructor
15397 argument list before entering its body. Assign the top block to
15398 the artificial constructor function body and set types of declared
15399 blocks and compound statements to void. Walk method body if not an
15400 artificial constructor.
15401 (make_qualified_name, cut_identifier_in_qualified): New functions.
15402 (resolve_expression_name): Fixed comments. Save/restore the
15403 current class CLASS_LOADED_P flag value. Build non qualified
15404 static field access and handle qualified expression names.
15405 (resolve_field_access, resolve_qualified_expression_name): New
15406 functions.
15407 (patch_method_invocation_stmt): Use the new expression resolution
15408 scheme, calling resolve_field_access when the function call is
15409 resolved as an expression.
15410 (qualify_ambiguous_name): Function rewritten to work on qualified
15411 expression produced by make_qualified_name.
15412 (java_complete_tree): Promote type when function's argument are
15413 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
15414 the assignment to discover further errors if RHS is a expression
15415 name that fails to evaluate. Declare LHS initialized even though
15416 the assignment failed. Don't use the location variable and removed
15417 extra argument in patch function calls. Now handle the ARRAY_REF
15418 case and build internal string representation when STRING_CSTs are
15419 walked.
15420 (build_method_invocation): Don't wrap function call around a WFL.
15421 (build_assignment): Likewise. Use the operator location
15422 information.
15423 (patch_assignment): Handle array access LHSs. Handle error
15424 provenance, resulting in a better error report.
15425 (build_binop): Use op_location from operator as binop location
15426 information.
15427 (build_unaryop, build_incdec, build_cast): Likewise.
15428 (patch_binop): Extract location information from the node. Fixed
15429 typo in error message.
15430 (patch_unary_op): Extract location information from the node.
15431 (build_array_ref, patch_array_ref): New functions.
15432
15433 1998-07-01 Tom Tromey <tromey@cygnus.com>
15434
15435 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
15436 match _Jv_IsInstanceOf.
15437 * decl.c (init_decl_processing): Use _Jv_NewArray, not
15438 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
15439
15440 1998-06-30 Tom Tromey <tromey@cygnus.com>
15441
15442 * decl.c (init_decl_processing): Functions are now named
15443 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
15444
15445 1998-06-29 Per Bothner <bothner@cygnus.com>
15446
15447 * java-tree.h (load_class): Add prototype.
15448 * class.c (is_compiled_class): Add missing arg to load_class.
15449 * expr.c (expand_java_NEW): Call load_class.
15450 * parse.y (process_import): Removed bogus use of void return value.
15451
15452 1998-06-25 Per Bothner <bothner@cygnus.com>
15453
15454 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
15455 Function name is "_Jv_Throw" instead of "soft_athrow".
15456 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
15457 Function name is "_Jv_AllocObject" instead of "soft_new".
15458 Takes an extra parameter (object size).
15459 * expr.c: Update calls.
15460
15461 1998-06-24 Per Bothner <bothner@cygnus.com>
15462
15463 * lex.c (java_get_line_col): Handle end-of-file.
15464 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
15465
15466 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
15467
15468 * lang.c (lang_init): Make -fexceptions the default.
15469 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
15470 exception handling is not turned on.
15471
15472 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
15473
15474 * lang.c (flag_new_exceptions): Make this this default.
15475 * decl.c (end_java_method): Call emit_handlers.
15476 * except.c (method_init_exceptions): Set language code and version.
15477 (expand_start_java_handler): Enable exception, and call
15478 expand_eh_region_start.
15479 (expand_end_java_handler): Enable exception, and set up catch blocks.
15480 (emit_handlers): New routine to generate the saved handlers.
15481 * java-except.h (emit_handlers): Add prototype.
15482
15483 1998-06-12 Per Bothner <bothner@cygnus.com>
15484
15485 We used to have three different representations of the constant pool:
15486 the CPool structure, the tree_constant_pool, and the constructures
15487 used to build the Class object (which may need class and string
15488 constants) in compiled code. None were appropriate for compiling
15489 to .class files, so I did a major overhaul.
15490
15491 First, the tree_constant_pool array was removed. Things were
15492 modified to the CPool structure in the JCF could be used.
15493 Second, a "capacity" field was added to the CPool, and functions
15494 written to search for a matching constant, adding one if not found.
15495 The code that generated the Class object was changed to use a CPool.
15496 The actual TREE_LISTs used to build the CONSTRUCTORs used for
15497 the static Class object are now only in build_constants_constructor.
15498 Finally, I wrote code which can generate a .class file (including its
15499 constant pool) from the RECORD_TYPE of a class. This is a big step
15500 on the way to compiling Java source into .class files.
15501
15502 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
15503 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
15504
15505 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
15506 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
15507 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
15508 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
15509 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
15510 (lang_type): Removed constant_pool field.
15511 * jcf.h (CPool): Renamed size to count. Added field capacity.
15512 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
15513 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
15514 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
15515
15516 * constants.c (current_constant_pool_tags, current_constant_pool_data,
15517 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
15518 * constants.c (build_constants_constructor): Use new outgoing_cpool.
15519 (set_constant_entry, find_constant1, find_constant2,
15520 find_class_constant, count_constant_pool_bytes, write_constant_pool,
15521 find_utf8_constant, find_class_or_string_constant): New functions.
15522
15523 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
15524 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
15525 (give_name_to_class, get_class_constant): Likewise.
15526 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
15527 (get_name_and_type_constant, get_ref_constant): Removed.
15528 * parse.h (parser_ctxt): Remove field tree_constant_pool.
15529 * parse.y: Don't save/restore tree_constant_pool.
15530 * verify.c (verify_jvm_instructions): Update for new approach.
15531 * expr.c (expand_invoke, expand_java_field_op): Likewise.
15532
15533 * lang-options.h: Added -femit-class-file, -femit-class-files.
15534 * lang.c (flag_emit_class_files), java-tree.h: New flag.
15535 (lang_f_options): Added "emit-class-file(s)".
15536
15537 * expr.c (build_java_arrayaccess): Generate more efficient array
15538 bounds checking, by using unsigned compare.
15539
15540 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
15541
15542 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15543
15544 * parse.h: New comment on the handling of unresolved type
15545 identifiers. JDEPs are now part of the jdep_code enum.
15546 (typedef struct jdep): Now use enum jdep_code or int, depending on
15547 availability. Both are narrowed down to an 8 bits bitfield.
15548 (CALL_EXPR_PRIMARY): Fixed comment.
15549
15550 1998-06-10 Tom Tromey <tromey@cygnus.com>
15551
15552 * Make-lang.in (java): Added gjavac and jvgenmain.
15553 (java.start.encap): Depend on gjavac.
15554 (java.rest.encap): Depend on jvgenmain.
15555
15556 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
15557 (JAVA_CROSS_NAME): Likewise.
15558 (java.all.build): Depend on jvgenmain and gjavac.
15559 (java.all.cross): Depend on jvgenmain and gjavac-cross.
15560 (jvgenmain$(exeext)): New target.
15561 (java.install-common): Wrote.
15562 * config-lang.in (compilers, stagestuff): Added gjavac and
15563 jvgenmain.
15564
15565 1998-06-10 Dave Brolley <brolley@cygnus.com>
15566
15567 * lang.c (lang_decode_option): New argc/argv interface.
15568
15569 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15570
15571 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
15572 * decl.c (build_decl_no_layout): New function.
15573 * expr.c (java_lang_expand_expr): Layout declarations found in
15574 blocks before they're pushed.
15575 * jcf-parse.c (load_class): Save current line when parsing class
15576 file.
15577 (parse_source_file): Register class before expanding their
15578 methods.
15579 * lang.c (put_decl_node): Produce `null' when `void *' is
15580 processed.
15581 * lex.c (static tree wfl_op): New static global, for error report
15582 on casts.
15583 (java_init_lex): wfl_operator and wfl_op initialized
15584 here. Filename caching added for wfl_op. Return wfl_op when `(' is
15585 parsed.
15586 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
15587 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
15588 build_unresolved_array_type): New static function definitions.
15589 (build_decl_no_layout): New extern function declared.
15590 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
15591 faulty modifier exists.
15592 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
15593 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
15594 (UNARY_PLUS_EXPR): New fake operator.
15595 (struct parser_ctxt): New field osb_number.
15596 * parse.y (static tree wfl_operator): New static WFL for operator
15597 bound error messages.
15598 (DECR_TK, INCR_TK): Moved.
15599 (OP_TK): Tagged <operator>.
15600 (array_type:): Now call build_unresolved_array_type.
15601 (dim_expr:): Count the number of '[' seen.
15602 (post_increment_expression, post_decrement_expression,
15603 pre_increment_expression, pre_decrement_expression,
15604 unary_expression_not_plus_minus, unary_expression:): Actions are
15605 now building the corresponding unary expressions.
15606 (cast_expression:): Actions are now building cast expressions.
15607 (build_unresolved_array_type): New function.
15608 (create_interface): Reset the number of declared interfaces.
15609 (create_class): Likewise.
15610 (method_header): Methods declared within the scope of an interface
15611 are now implicitly set public and abstract.
15612 (java_complete_class): Variable's and parameter's type are patched
15613 with a promoted type.
15614 (declare_local_variables): Resolved non builtin types are promoted
15615 before being used to build a variable decl. Removed type patch
15616 posted on variable initialization statement.
15617 (source_start_java_method): Use build_decl_no_layout to build the
15618 decl of a parameter of incomplete type.
15619 (java_register_parsed_class): Process interfaces too. Call
15620 rest_of_decl_compilation on each processed class declarations.
15621 (java_complete_expand_methods): Don't attempt to expand things in
15622 interfaces.
15623 (java_complete_tree): Process CONVERT_EXPR, even though it always
15624 has a type. Propagate error_mark_node to node's type too. Promote
15625 method's call argument type and return error_mark_node if
15626 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
15627 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
15628 handle unary operator nodes.
15629 (build_assignment): Added comment.
15630 (print_int_node): New function.
15631 (patch_assignment): New second argument. New error handling. Use
15632 print_int_node. Handle references. Use can_cast_to_p to issue
15633 different error message according to the context and check upon
15634 the initialization of the RHS.
15635 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
15636 (operator_string): Handle more operators.
15637 (patch_binop): No longer use a function static
15638 wfl_operator. Improved error message on shift distance.
15639 (build_unaryop, build_incdec, build_cast, patch_unaryop,
15640 patch_cast): New functions.
15641
15642 1998-06-05 Per Bothner <bothner@cygnus.com>
15643
15644 * jvspec.c: New file.
15645 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
15646
15647 * java-tree.h (identifier_subst): Add declaration.
15648
15649 1998-06-04 Tom Tromey <tromey@cygnus.com>
15650
15651 * jvgenmain.c (main): Generate call to JvRunMain.
15652
15653 * class.c (make_class_data): Push value for "sync_info" field.
15654 * decl.c (init_decl_processing): Push "sync_info" field.
15655
15656 1998-06-03 Per Bothner <bothner@cygnus.com>
15657
15658 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
15659 Java (source) name, not signature.
15660 Set TYPE_ALIGN to (at least) that of element_type.
15661
15662 1998-06-02 Per Bothner <bothner@cygnus.com>
15663
15664 * class.c: Moved classname-mangling-rekated code to ...
15665 * mangle.c: ... this new file.
15666 * jvgenmain.c: New program (needs mangle.c) to generate main program.
15667 * Makefile.in: Update for above changes.
15668
15669 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15670
15671 * expr.c (truthvalue_conversion): Convert integer and floating
15672 point value to their truth value.
15673 * lex.c (java_lex): Handle the `null' literal.
15674 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
15675 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15676 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
15677 New macros.
15678
15679 * parse.y: Reorganization/documentation on token declaration.
15680 (binop_lookup[]): New added new tree codes.
15681 (relational_expression): Build corresponding binary operators.
15682 (equality_expression, conditional_and_expression,
15683 conditional_or_expression): Likewise.
15684 (java_complete_class): Fix crash in debug message.
15685 (java_complete_tree): Check initialization of method call
15686 arguments. Further bogus node evaluation to detect more error
15687 during assignments. Handles more binary operators.
15688 (patch_assignment): Use DECL_P.
15689 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
15690 code.
15691 (operator_string): Handle more case. Compacted source.
15692 (patch_binop): Changed function comment. Checking for
15693 uninitialized first operand takes the compound assignment into
15694 account and uses DECL_P. Checking for uninitialized second operand
15695 delayed to routine's end. Use macros to issue type bound error
15696 messages and issue messages on both operands if their types are
15697 different. Force fixed type into node. Handle all binary
15698 operators.
15699
15700 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15701
15702 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
15703 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
15704 build operator node and return tokens.
15705 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
15706 * parse.h (java_complete_tree): Changed returned type in prototype.
15707 (build_method_invocation, build_assignment, patch_assignment,
15708 patch_binop): New static function declarations.
15709 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
15710 BUILD_EXPR_WFL): New macros.
15711 * parse.y (enum tree_code binop_lookup[]): New static for token to
15712 TREE_CODE lookup.
15713 (%union): Parser union has new sub-structure `operator'.
15714 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
15715 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
15716 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
15717 ASSIGN_ANY_TK): Tokens tagged `operator'.
15718 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
15719 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
15720 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
15721 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
15722 (assignment_operator:): Rule tagged `operator'.
15723 (expression_statement:): Re-installed default rule.
15724 (method_invocation:): Sub rules call build_method_invocation.
15725 (postfix_expression:): Don't attempt to resolve name here. Just
15726 return an ID.
15727 (multiplicative_expression:): Sub-rules build corresponding binop
15728 expression node.
15729 (additive_expression:, shift_expression:, and_expression:,
15730 exclusive_or_expression:, inclusive_or_expression:): Likewise.
15731 (assignment:): Sub rule invoke build_assignment.
15732 (assignment_operator:): Default rules on sub rules.
15733 (force_error): Added documentation on this variable.
15734 (declare_local_variables): Build initialization calling
15735 build_assignment.
15736 (expand_start_java_method): Removed unused rtx declaration. Mark
15737 arguments as already initialized.
15738 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
15739 (java_complete_expand_methods): Don't process next method if
15740 completion of the previous one triggered errors.
15741 (java_complete_expand_method): Call source_end_java_method if no
15742 error were found during completion.
15743 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
15744 locals declaratilon. Handle names found within a class. Return
15745 error_mark_node when things aren't found.
15746 (patch_method_invocation_stmt): Return error_mark_node on failures.
15747 (patch_invoke): Removed unused local. Return the correct node.
15748 (java_complete_tree): Now returns a value. The BLOCK section binds
15749 local identifiers and the type of a BLOCK is now void. Assign the
15750 result of operand completion on COMPOUND_EXPR. Assign the
15751 encapsulated node of a WFL to the result of its completion, except
15752 when the node is an identifier. Now handle MODIFY_EXPR and several
15753 binary operators. Return error_mark_node on errors.
15754 (build_method_invocation, build_assignment, patch_assignment,
15755 build_binop, operator_string, patch_binop): New functions.
15756 * typeck.c (binary_numeric_promotion): New function.
15757
15758 1998-05-21 Per Bothner <bothner@cygnus.com>
15759
15760 * class.c (identifier_subst): New convenience wrapper for ident_subst.
15761 Replace most uses of ident_subst by identifier_subst.
15762
15763 * class.c (push_class_static_dummy_field): Removed function.
15764 (build_class_ref): Find Class object decl by looking up "CNAME.class",
15765 instead of looking got "class" static field. Create that decl here.
15766 (class_identifier_node): Removed; no longer needed.
15767 (init_class_processing): Don't init class_identifier_node.
15768 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
15769 Do nreverse 0 times (instead of twice) for Object and Class.
15770 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
15771
15772 1998-05-20 Per Bothner <bothner@cygnus.com>
15773
15774 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
15775 while initializing linenumber_count and linenumber_table.
15776 Do it before init_function_start (which calls emit_line_note).
15777 * expr.c (expand_byte_code): Don't need to clear lineno here.
15778
15779 1998-05-18 Tom Tromey <tromey@cygnus.com>
15780
15781 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
15782 then mangle number as _N_.
15783
15784 * class.c (mangle_class_field): New function.
15785 (build_class_ref): Set assembler name of class reference using
15786 mangle_class_field.
15787 (push_class_static_dummy_field): Likewise.
15788
15789 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
15790
15791 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
15792 of assigning to TREE_CODE. The latter method exploits a feature
15793 of GCC that is not ANSI compliant.
15794
15795 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15796
15797 * decl.c (pushdecl_force_head): New function.
15798 (pushlevel): Removed conditional printf.
15799 (complete_start_java_method): Don't enter local variable scope if
15800 function is compiled from source code.
15801 * expr.c: parse.h now included
15802 (java_lang_expand_expr): New function.
15803 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
15804 printf. Terminate buffer when doing directories.
15805 * jcf-parse.c (parse_source_file): Call lang_init_source before
15806 parsing and before code generation.
15807 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
15808 use printf if the macro is defined.
15809 * lang.c (lang_init): Install lang_expand_expr hook on
15810 java_lang_expand_expr.
15811 (java_dummy_print): New function.
15812 (lang_init_source): New function.
15813 * lex.c (java_lex): Remember location of an opening brace at the
15814 second nesting level.
15815 (java_is_eol): Unget character seen after a CR if it is EOF.
15816 * parse.h: Now includes lex.h
15817 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
15818 printf if the macro is defined.
15819 (expand_start_java_method, build_expr_block, enter_block,
15820 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
15821 New static function declarations.
15822 (pushdecl_force_head): New extern function declaration.
15823 (INCOMPLETE_TYPE_P): New macro.
15824 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
15825 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
15826 BLOCK_EXPR_ORIGIN): New macros.
15827 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
15828 DECL_SOURCE_LINE_LAST): New macros.
15829 (struct parser_ctxt): Removed field current_method_decl, redundant
15830 with the field current_function_decl. Added fields
15831 first_ccb_indent1 and pending_block.
15832 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
15833 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
15834 tagged <node>
15835 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
15836 (compilation_unit:): Cosmetic on sub rule.
15837 (type_declaration:): Cosmetic on sub rules. Added an error rule.
15838 (variable_initializer:): Installed default rule on expression:.
15839 (method_declaration:): method_header: starts a new
15840 method. method_body: installs the function body, absorbs blocks
15841 emitted for temporary variable scopings, pops function's body block
15842 and merges function's last statement lineno in DECL_SOURCE_LINE.
15843 (method_body:): Installed default rules.
15844 (block:): Call enter_block when an opening brace is seen. Absorb
15845 scoping blocks and call exit_block when a closing brace is seen.
15846 (block_statement:): Cosmetic changes.
15847 (method_invocation:): Create WFL around CALL_EXPR node.
15848 (patch_stage): Added comment around definition.
15849 (method_header): Try to use first_ccb_indent1 as the first line of
15850 the method, so BP debug info are emitted at the first opening
15851 brace of the function. If the function has no body, use the
15852 location of the function's name. Override currently defined method
15853 name with the matching WFL so we can point redefinition errors
15854 using the location where the function's name was declared.
15855 (check_abstract_method_header): Interprets DECL_NAME as an
15856 identifier or as a WFL, accordingly.
15857 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
15858 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
15859 location and name information out of it and reinstall DECL_NAME to
15860 its original identifier node value.
15861 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
15862 function's source code).
15863 (read_import_dir): Test the value returned by find_class and issue
15864 a fatal accordingly.
15865 (declare_local_variables): Push a new block for the scope of the
15866 new variable(s) if code has been already generated at that nesting
15867 level. Pinpoint redefinition errors using the variable id
15868 WFLs. Generate initialization code if necessary. If the variable
15869 type is incomplete, register a patch on its decl.
15870 (source_start_java_method): Rewritten. Define a new block for the
15871 function's parameters. Build parameter decl out of function's
15872 arguments and register them for a patch if their types are
15873 incomplete.
15874 (expand_start_java_method): Includes the part of
15875 source_start_java_method that was pushing the parameter decls and
15876 completing the method start code.
15877 (source_end_java_method): Removed call the expand_end_bindings and
15878 poplevel (already taken care of). Reinstall function's arguments
15879 and get function's last line of code before calling
15880 expand_function_end.
15881 (java_method_add_stmt): New comment before the function's
15882 code. Complement the second operand of the current COMPOUND_EXPR
15883 if necessary.
15884 (java_complete_expand_methods): Don't generate debug info on line
15885 zero when expanding a generated constructor.
15886 (java_complete_expand_method): Set start and end line numbers for
15887 a artificially generated constructor to one and manually call
15888 enter_block and exit_block when defining it. For all methods:
15889 expand function's start calling the new expand_start_java_method
15890 and invoke java_complete_tree on the effective method's body, if
15891 any.
15892 (resolve_expression_name): Now use lookup_name_in_blocks to search
15893 local variable decls and print out an error when variables are
15894 undefined.
15895 (patch_method_invocation_stmt): Inserted comment before the
15896 function's code.
15897 (lookup_method_invoke): Chain method's arguments using chainon
15898 with the current arg list as a second argument. Inserted missing
15899 IDENTIFIER_POINTER when reporting an error on methods not found.
15900 (refine_accessible_methods_list): Don't retain constructors.
15901 (patch_arguments): Function removed.
15902 (java_complete_tree): Inserted comment before the function's
15903 code. New case for BLOCKs. Moved the WFL case a bit
15904 further. Complete function's arguments.
15905 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
15906 maybe_absorb_scoping_blocks): New functions.
15907
15908 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15909
15910 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
15911 previously set.
15912 * jcf-parse.c (parse_source_file, java_error_count): New forward
15913 and extern declarations.
15914 (java_parse_abort_on_error): Macro moved.
15915 (jcf_parse_source): fatal called if fopen fails. Now calls
15916 parse_source_file.
15917 (parse_source_file): New parse_only parameter. Reflects the
15918 elimination of the second pass.
15919 (yyparse): parse_source_file called with argument set to 0.
15920 * jcf.h (JCF_ZERO): Sets java_source to zero.
15921 * lex.c (java_init_lex): pass argument is gone. Function modified
15922 to be called once during the analysis of a file.
15923 (java_unget_unicode): Fixed typo in fatal message.
15924 (java_get_line_col): Likewise.
15925 (java_lval): Likewise. String literals no longer built during
15926 second pass.
15927 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
15928 account.
15929 * parse.h (MODIFIER_WFL): New macro.
15930 (parse_check_super, parser_check_super_interface): Now return int.
15931 (parser_chain_incomplete_item, not_builtin_p,
15932 complete_method_decl): Declarations removed.
15933 (build_method_invocation_stmt, build_invoke): Renamed using the
15934 `patch' instead of `build'
15935 (register-incomplete_type, obtain_incomplete_type,
15936 java_complete_tree, java_complete_expand_method,
15937 unresolved_type_p, create_jdep_list): New function declarations.
15938 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
15939 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
15940 (jdep): New typedef on new struct _jdep.
15941 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
15942 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
15943 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15944 JDEP_RESOLVED_P): New macros.
15945 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
15946 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
15947 JDEP_VARIABLE): New enum values and jdep kinds.
15948 (jdeplist): New typedef on struct _jdeplist.
15949 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
15950 macros.
15951 (CALL_EXPR_PRIMARY): New macro.
15952 (struct parser_ctxt): Fields java_pass, current_method_decl,
15953 method_decl_list deleted. New field jdeplist.
15954 (INCOMPLETE_P): Macro deleted.
15955 * parse.y (single_type_import_declaration:): Removed pass switch.
15956 (type_import_on_demand_declaration): Likewise.
15957 (field_declaration:): Removed pass switch on all sub rules.
15958 (class_declaration:): Call the complete_class_decl removed on
15959 class_body rules.
15960 (method_declaration:): Removed second pass switch. No longer chain
15961 methods decl when method_header reduced.
15962 (method_header:): Sub rules no longer depend on pass switch.
15963 (method_declarator:): Likewise.
15964 (method_body:): Likewise.
15965 (abstract_method_declaration:): Likewise.
15966 (block_statement:): Likewise.
15967 (local_variable_declaration:): Likewise.
15968 (argument_list:): Likewise.
15969 (method_invocation:): Likewise. Call to build_method_invocation_stmt
15970 removed. Partial CLASS_EXPR tree node built instead.
15971 (postfix_expression:): Removed pass switch on all sub rules.
15972 (java_pop_parser_context): Free classd_list content.
15973 (yyerror): Call obstrack_grow0 to finalize error message.
15974 (check_class_interface_creation): Comment modified to reflect new
15975 returned value meaning. Removed second pass switch. Return 1 if an
15976 error was found, 0 otherwise. Adjust pointer on filename if a
15977 leading path separator was found.
15978 (maybe_create_class_interface_decl): Removed first pass switch
15979 when linking the class decl to the class_list. Install a new
15980 jdep_list for the class.
15981 (add_superinterfaces): List of unresolved interfaces is
15982 gone. Unresolved interfaces are directly added to the current
15983 dependencies list.
15984 (create_interface): Second pass shortcut removed.
15985 ctpx->modifier_ctx access through MODIFIER_WFL.
15986 (create_class): Second pass shortcut removed. Call to
15987 register_incomplete_type replaces the call to
15988 parser_chain_incomplete_item.
15989 (complete_class_decl): Function removed.
15990 (duplicate_declaration_error): New way of retrieving redeclared
15991 item type.
15992 (register_fields): Call to lookup_modifier_cl replaced by
15993 MODIFIER_WFL. New way of handling unresolved type, using
15994 unresolved_type_p and obtain_incomplete_type.
15995 register_incomplete_type replaces call to parser_chain_incomplete_item.
15996 (patch_stage): New static global variable.
15997 (method_header): New way of handling unresolved type, using
15998 unresolved_type_p and obtain_incomplete_type. patch_stage used to
15999 indicates that the method decl needs to be patched.
16000 (check_abstract_method_header): Call to lookup_modifier_cl
16001 replaced by MODIFIER_WFL.
16002 (method_declarator): Incomplete argument type are registered
16003 calling register_incomplete_type. Patch on the declared method is
16004 issued in that case.
16005 (unresolved_type_p): New function.
16006 (parser_check_super_interface): New comment to reflect function's
16007 modified returned type (int). Function and has a new argument
16008 this_wfl. Call to parse_error_context uses this_wfl instead of
16009 relying on lookup_cl.
16010 (parser_check_super): Comment reflects function's new returned
16011 type (int). Function returns nonzero value on error.
16012 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
16013 register_incomplete_type, jdep_resolve_class): New functions to
16014 handle incomplete types in declarations.
16015 (java_complete_class): Rewritten to work with the new incomplete
16016 type handling scheme.
16017 (complete_class_report_errors): Likewise.
16018 (complete_method_decl): Removed: it jobs is now handled by
16019 java_complete_class.
16020 (do_resolve_class): Class loaded in not already loaded and not
16021 found in Java source code.
16022 (java_check_regular_methods, java_check_abstract_methods): Don't
16023 call complete_method_decl anymore.
16024 (lookup_modifier_cl, not_builtin_p): Functions deleted.
16025 (read_import_dir): Got rid of the pass number dependency.
16026 (declare_local_variables): New handling of unresolved types (patch
16027 issued).
16028 (source_start_java_method): New parameter level. Function called
16029 with level set to 1 when argument types are potentially
16030 unresolved. Called to complete the job with level set to 2 once
16031 types are complete.
16032 (source_end_java_method): Call to permanent_allocation
16033 removed. Waiting to be replaced by a more suitable obstack
16034 management.
16035 (java_complete_expand_methods, java_complete_expand_method,
16036 java_expand_finals): New functions.
16037 (build_method_invocation_stmt): Renamed
16038 patch_method_invocation_stmt. Extracts function call expression
16039 (wfl) and arguments (args) from CALL_EXPR tree operands.
16040 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
16041 call. Patch the function and argument operand of the CALL_EXPR
16042 tree argument.
16043 (patch_argument, java_complete_tree): New functions.
16044
16045 1998-04-20 Per Bothner <bothner@cygnus.com>
16046
16047 Recover from missing fields and methods (i.e. error instead of fatal).
16048 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
16049 * expr.c (expand_invoke): Recover from missing method.
16050 (expand_java_field_op): Recover from missing field.
16051 Inline references to java.lang.{Integer,Char,...}.TYPE.
16052 * typeck.c (get_type_from_signature), java-tree.h: New function.
16053 * class.c (add_method): Use get_type_from_signature.
16054 (build_class_ref): Handle a class that was not found.
16055 * typeck.c (convert): Handle conversion to pointers (for convenience).
16056 * verify.c (verify_jvm_instructions): Use get_type_from_signature
16057 instead of lookup_field to handle missing fields.
16058
16059 * jcf-parse.c (process_zip_dir): Set java_source.
16060
16061 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
16062
16063 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
16064
16065 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
16066
16067 * jcf-parse.c (load_class): Don't change input_filename before
16068 calling jcf_parse_source (but still do it before calling
16069 jcf_parse).
16070 (jcf_parse_source): Assign input_filename after having saved the
16071 parser context.
16072 * lex.c (java_init_lex): Chain a WFL node to the import on demand
16073 list. ctxp->modifier_ctx zeroed according to its new
16074 definition. ctxp->filename initialized. Removed
16075 JAVA_MODIFIER_CTX_UNMARK.
16076 (java_unget_unicode): Update the character based column position.
16077 (java_allocate_new_line): ref_count not used anymore. Always free
16078 ctxp->p_line. Initialize c_line->char_col to 0.
16079 (java_get_unicode): Update the character based column position.
16080 (java_lex): Use ctxp->elc to store current position in source
16081 file, at the beginning of the parsed token. Set modifier_ctx entry
16082 corresponding to the parse modifier to a WFL node. Return a WFL
16083 node when an identifier is parsed.
16084 (java_lex_error): Now uses ctxp->elc to store current position in
16085 source.
16086 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
16087 * lex.h (build_wfl_node): New function definitions.
16088 (struct java_line): ref_count and next fields are gone. New field
16089 char_col.
16090 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
16091 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
16092 (JAVA_COLUMN_DELTA): New macro.
16093 (java_lc): New typedef on new struct _java_lc.
16094 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
16095 (parse_error_context, parse_warning_context): Changed prototypes.
16096 (java_get_line_col): Added as an available global function.
16097 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
16098 (IC_DECL): Replaced by macro IC_TYPE
16099 (DEPEND_WFL): New macro.
16100 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
16101 wrong modifier.
16102 (exit_java_complete_class): Removed a commented out statement.
16103 (struct parser_ctxt): Added comments on fields. modifier_ctx is
16104 now an array of tree nodes. Deleted fields line_list and
16105 e_line. New field elc, to replace e_line.
16106 * parse.y (array_type:): Build WFL node.
16107 (qualified_name:): Build a single WFL node out of two. Retain
16108 the location information of the first node in the resulting node.
16109 (package_declaration:): Use package name as a WFL node
16110 (single_type_import_declaration:): Use imported name as a WFL node.
16111 (type_import_on_demand_declaration:): Use root of the imported
16112 packages as a WFL node.
16113 (field_declaration:): Removed unused local variable cl.
16114 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
16115 (yyerror): New static elc. Removed static error_line, error_pos.
16116 New local code_from_source. Save ctxp->elc into elc at the first
16117 pass. Call java_get_line_col to get a string of the line where
16118 the error occurred.
16119 (debug_line): Removed static function.
16120 (parse_error_context, parse_warning_context): Parameter cl is now
16121 a WFL node. Use its value to initialize ctxp->elc.
16122 (redefinition_error): Parameter cl is now a WFL node.
16123 (parse_add_interface): New parameter wfl. No longer call
16124 lookup_cl, use wfl instead.
16125 (check_class_interface_creation): Parameter cl is now a WFL node.
16126 (maybe_create_class_interface_decl): Likewise.
16127 (add_superinterfaces): New function.
16128 (create_interface): Removed local cl, node, super_decl,
16129 super_decl_type. Function now uses id as a WFL node. Better
16130 warning/error report on obsolete or forbidden mix of
16131 modifiers. Now calls add_superinterfaces to register interfaces.
16132 (create_class): Removed local cl, node. Local variable id is used
16133 as a WFL node. Better error report on forbidden modifier
16134 mix. Uses add_superinterfaces to register interfaces.
16135 (find_field): Argument cl is now a WFL node. Now store the WFL
16136 node of a fields that needs to be checked for their
16137 initialization.
16138 (method_header): Local variable node non longer used. Local
16139 variable id replaces cl.
16140 (check_modifiers_consistency): Local variable cl is now a WFL
16141 node.
16142 (method_declarator): Local variable cl replaced by parameter id.
16143 (parser_qualified_name): Now uses parameter name as a WFL node.
16144 (parser_check_super_interface): New parameter wfl, for achieve
16145 greater accuracy during error reports.
16146 (parser_chain_incomplete_item): New parameter named location. Used,
16147 along the decl, to construct the incomplete item node.
16148 (java_complete_class): resolve_class now uses WFL node extracted
16149 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
16150 where appropriate.
16151 (complete_method_decl): Unresolved function's argument types are WFL.
16152 (resolve_class): Parameter cl is now a WFL node.
16153 (resolve_and_layout): Likewise.
16154 (do_resolve_class): Likewise. Try first to use cl and then do the
16155 lookup on the decl when calling check_pkg_class_access.
16156 (complete_class_report_errors): Use IC_TYPE in place of
16157 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
16158 instead of doing a lookup over the decl.
16159 (java_check_final): Use WFL info from field tree list.
16160 (lookup_cl): Rewritten and returns a statically defined WFL node.
16161 (lookup_modifier_cl): Now uses information from WFL nodes.
16162 (process_imports): Likewise.
16163 (read_import_dir): name and cl arguments replaced by a single WFL
16164 node. Function modified accordingly.
16165 (find_in_imports_on_demand): Now uses WFL node.
16166 (check_pkg_class_access): cl argument is now a WFL node.
16167 (declare_local_variables): Fixed to use WFL nodes.
16168 (resolve_expression_name): Likewise.
16169 (build_method_invocation_stmt): name_combo argument renamed
16170 wfl. Function modified to use WFL nodes.
16171 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
16172 (lookup_method_invoke): cl is now a WFL node. Added missing
16173 IDENTIFIER_POINTER to class type decl name.
16174
16175 1998-04-14 Dave Brolley <brolley@cygnus.com>
16176
16177 * lang.c (init_parse): Now returns char* containing the filename.
16178
16179 1998-04-10 Per Bothner <bothner@cygnus.com>
16180
16181 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
16182
16183 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
16184 * class.c (make_class_data): If flag_assume_compiled, initial class
16185 state is CSTATE_PREPARED; make superclass and interfaces direct
16186 references, rather than constant pool indexes.
16187
16188 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
16189
16190 * parser.y: Include flags.h. Removed debug variable pl.
16191 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
16192 (block:): Likewise.
16193 (labeled_statement_nsi:): Generate debug info when reducing
16194 expression_statement:.
16195 (check_pkg_class_access): get_access_flags_from_decl invocation
16196 fixed for new CLASS_* flags location.
16197 (source_end_java_method): Save/restore parser context when
16198 entering/leaving this routine. Restore lineno to its right value
16199 before calling expand_end_bindings.
16200 (build_method_invocation_stmt): build_invoke called with the
16201 current line information.
16202 (build_invoke): New argument cl. Wrap the function call around a
16203 wfl node.
16204 (refine_accessible_methods_list): Changed comment, removed
16205 unnecessary code.
16206 * parse.h: Fixed typo in comments.
16207 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
16208 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
16209 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
16210 parser_ccb_indent.
16211 * lex.c (java_lex): Record the last closing curly bracket of a
16212 function.
16213 * jcf-parse.c (jcf_parse_source): Now calls
16214 java_check_methods. Clarified comment, fixed typo.
16215
16216 1998-04-09 Dave Brolley <brolley@cygnus.com>
16217
16218 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
16219 (finish_parse): Expose for non USE_CPPLIB builds.
16220
16221 1998-04-08 Jeffrey A Law (law@cygnus.com)
16222
16223 * lang.c (lang_print_xnode): New function.
16224
16225 1998-04-03 Per Bothner <bothner@cygnus.com>
16226
16227 * decl.c (class_dtable_decl), java-tree.h: New tree node.
16228 * class.c (get_dispatch_vector, get_dispatch_table): New functions
16229 used to build a class's dispatch table.
16230 (make_class_data): Generate dispatch table if flag_assume_compiled.
16231 Set dtable of class object to address of class_dtable_decl.
16232
16233 * decl.c (int_decl_processing): Make soft_badarrayindex_node
16234 be volatile and have side effects - generates better code.
16235
16236 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
16237 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
16238
16239 * expr.c (expand_invoke): If class is final, method is
16240 effectively final, so can call it directly.
16241
16242 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
16243
16244 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
16245
16246 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16247
16248 * parse.y (build_method_invocation_stmt): Removed extra argument
16249 to build_invoke.
16250
16251 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16252
16253 * expr.c (dtable_indent): Now static global.
16254 (expand_invoke): Now call invoke_build_dtable and
16255 build_invokevirtual.
16256 (invoke_build_dtable, build_invokevirtual): New functions.
16257 * jcf-io.c (find_class): Defer issuing a warning by setting
16258 jcf->outofsynch to 1.
16259 * jcf-parse.c (jcf_out_of_synch): New function.
16260 (load_class): Test this_jcf.outofsynch flag and call
16261 jcf_out_of_synch accordingly.
16262 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
16263 comment indentation.
16264 * lex.c (java_get_unicode): Fixed code indentation.
16265 (java_lex): Create string literal. Fixed typo. Removed several
16266 premature obstack_free.
16267 * parse.h: New enums for name resolution and invocation mode.
16268 (struct qualification): New data structure.
16269 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
16270 (do_resolve_class, build_method_invocation_stmt,
16271 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
16272 debug_line, identical_subpath_p, invocation_mode,
16273 refine_accessible_methods_list, build_invoke,
16274 lookup_method_invoke): New functions declared.
16275 (build_invokevirtual, invoke_build_dtable, match_java_method,
16276 build_field_ref, jcf_out_of_synch): New references to external
16277 functions.
16278 (struct parse_ctxt): Removed artificial_constructor field.
16279 * parse.y: (array_type:): Type defined for this rule.
16280 (class_type:): Installed default rule for interface_type:.
16281 (array_type:): Now build Java array type.
16282 (qualified_name:): Now use obstack_grow0.
16283 (method_declaration:): Skip the artificial constructor added to
16284 the list, if any.
16285 (abstract_method_declaration:): Execute the code only during pass 1.
16286 (block:): Installed default rule in block_statements:.
16287 (block_statement:): Add the statement to the method during pass 2.
16288 (statement_expression): Installed default rule for
16289 method_invocation:.
16290 (argument_list:): Added code to build the argument list.
16291 (method_invocation:): Added call to create the method invocation
16292 node.
16293 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
16294 (debug_line): New function for debug.
16295 (complete_class_decl): No longer do something during pass 1.
16296 (method_header): Use BUILD_PTR_FROM_NAME.
16297 (parser_qualified_classname): Use obstack_grow0. Removed bogus
16298 obstack_free.
16299 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
16300 function's main comment.
16301 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
16302 classes.
16303 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
16304 (resolve_class): Now works with arrays.
16305 (do_resolve_class, resolve_and_layout): New functions.
16306 (java_check_regular_methods): Reverse method list before and after
16307 having processed it. No longer set ctxp->artificial_constructor.
16308 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
16309 accordingly. Fixed typo in issued error message. Now use
16310 obstack_grow0.
16311 (find_in_imports_on_demand): Now use obstack_grow0.
16312 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
16313 (source_end_java_method): Call expand_expr_stmt instead of
16314 expand_expr. Calls it before calling expand_function_end.
16315 (java_method_add_stmt): Do nothing if errors were found during
16316 parsing.
16317 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
16318 (build_method_invocation_stmt, build_invoke, invocation_mode,
16319 lookup_method_invoke, refine_accessible_methods_list,
16320 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
16321 New functions.
16322 * typeck.c (build_java_signature): Properly end method signature
16323 if return type skipped.
16324 (match_java_method): New function.
16325
16326 1998-03-16 Per Bothner <bothner@cygnus.com>
16327
16328 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
16329
16330 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
16331
16332 * expr.c (build_invoke_non_interface): New function.
16333 (methods_ident, ncode_ident): Now static globals.
16334 (expand_invoke): Use build_invoke_non_interface.
16335 * java-tree.h (struct lang_decl): New field function_decl_body.
16336 (DECL_FUNCTION_BODY): New macro.
16337 * jcf-parse.c (jcf_parse_source): Deeper check before setting
16338 CLASS_FROM_SOURCE_P.
16339 (parse_source_file): Fixed typos. Call java_layout_parsed_class
16340 before starting pass 2. Call to java_generate_parsed_class replaced
16341 by java_register_parsed_class.
16342 * lex.c: Fixed typo in header. Some line width related formating.
16343 * lex.h: Some line width related formating.
16344 * parse.h (source_end_java_method, resolve_expression_name,
16345 complete_class_decl, maybe_create_class_interface_decl,
16346 check_class_interface_creation): New static function declarations.
16347 (java_layout_parsed_class, java_method_add_stmt): New function
16348 declarations.
16349 (struct parser_ctxt): Field mark_class_generate removed. New
16350 fields class_list and artificial_constructor.
16351 * parse.y: Fixed typo in header.
16352 (class_declaration:): Call complete_class_decl when class body
16353 parsed.
16354 (method_declaration:): Call source_end_java_method in pass 2 when
16355 the method body is defined.
16356 (postfix_expression:): Do expression name resolution on sub-rule
16357 name during pass 2.
16358 (create_class, create_interface): Merged common pieces.
16359 (check_class_interface_creation, maybe_create_class_interface_decl):
16360 New functions.
16361 (complete_class_decl): New function.
16362 (register_fields): Fixed line width related typo.
16363 (method_header): Correctly skip first argument when fixing
16364 argument line. Changed the loop.
16365 (java_check_circular_reference): Now use ctxp->class_list.
16366 (java_complete_class): Removed start/stop marking.
16367 (java_check_regular_methods): Now takes a class decl as an
16368 argument. Add default constructor if none were encountered.
16369 (java_check_methods): Now use ctxp->class_list. Changed call to
16370 java_check_regular_methods.
16371 (source_start_java_method): Set DECL_ARG_TYPE for each function
16372 arguments.
16373 (source_end_java_method, java_method_add_stmt): New functions.
16374 (java_generate_parsed_class): No longer exists.
16375 (java_layout_parsed_class, java_register_parsed_class): New functions.
16376 (resolve_expression_name): New function.
16377
16378 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16379
16380 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
16381 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
16382 until pass initializations are done. Call read_import_dir with
16383 pass set to 0.
16384 * parse.h: (lookup_modifier_cl): New function declared.
16385 (INTERFACE_FIELD_MODIFIERS): New macro.
16386 (OBSOLETE_MODIFIER_WARNING): New macro.
16387 * parse.y: (register_fields): Class type and current field name in
16388 local variables. Check modifier(s) if adding field(s) to an interface.
16389 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
16390 and report errors using the faulty modifier line context.
16391 (lookup_modifier_cl): New function.
16392 (read_import_dir): Detect and report default import processing
16393 failure.
16394
16395 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
16396
16397 Add a pair of -fassume-compiled/-fno-assume-compiled options.
16398 * class.c (is_compiled_class): Return 1 after making sure it
16399 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
16400 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
16401 * java-tree.h (flag_assume_compiled): Add decl.
16402 * lang.c (lang_f_options): Add the flag.
16403 (flag_assume_compiled): Add decl, default to 0.
16404
16405 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16406
16407 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
16408 (is_compiled_class): Likewise.
16409 (layout_class): Likewise.
16410 (layout_class): Detect and lay out classes defined in source code.
16411 (interface_of_p, add_interface_do, may_add_interface): New
16412 function.
16413 (add_interface): Now use add_interface_do.
16414 (add_method_1): New function.
16415 (add_method): Now use add_method_1.
16416 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
16417 (complete_start_java_method): New function.
16418 (start_java_mehod): Now call complete_start_java_method.
16419 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
16420 (expand_invoke): Likewise and fixed typo.
16421 *gjava.c: (print_super_field): Use new argument to find_class
16422 DO_CLASS_FILE.
16423 (main): Likewise.
16424 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
16425 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
16426 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
16427 IDENTIFIER_NODE.
16428 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
16429 (add_method_1, push_class): New prototypes.
16430 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
16431 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
16432 directory where the class was found.
16433 (find_class): New argument DO_CLASS_FILE. Function find_class
16434 modified accordingly.
16435 *jcf-parse.c: (fix_class_path): New function.
16436 (load_class): Use new VERBOSE argument. load_class now finds and
16437 loads/parses .class/.java files. Save read_state of current_jcf
16438 if necessary.
16439 (java_parser_abort_on_error): New macro.
16440 (jcf_parse_source, parse_source_file): New function.
16441 (jcf_parse): Fixed typo.
16442 (yyparse): Call parse_source_file () only.
16443 (process_zip_dir): Fixed typo, fix zdir->filename_length when
16444 writing the real class name back in the zip directory entry.
16445 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
16446 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
16447 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
16448 (find_class): Prototype fixed.
16449 *lex.c: Added 1998 time stamp.
16450 Removed all static global variables, moved into the parser
16451 context data structure.. Now include unistd.h if SEEK_SET not
16452 defined.
16453 (java_init_lex): Rewritten.
16454 (java_sneak_unicode): Modified current unicode access in current line.
16455 (java_unget_unicode): Likewise.
16456 (java_allocate_new_line): New allocation management.
16457 (java_read_char): Modified access and storage of unget_utf8_value.
16458 New way of processing current unicode.
16459 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
16460 (java_get_unicode): Now use the parser context.
16461 (java_lineterminator): Likewise.
16462 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
16463 of the reentrant parser implementation. Function now use the
16464 parser context data structure and java_lval. Fixed production of
16465 the float and double constant "out of range" error message. Fixed
16466 obstack use. Return integer value when hitting a modifier. Now
16467 return type for TRUE, FALSE and other predefined types. Return
16468 identifier as a TREE_LIST list containing the current line context
16469 as the TREE_VALUE sub-node.
16470 (java_unicode_2_utf8): Fixed typo in declaration.
16471 (java_lex_error): Now use the parser context data structure.
16472 *lex.h: Added 1998 time stamp.
16473 (struct java_line): New fields ref_count and next.
16474 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
16475 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
16476 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
16477 *parse.h: Added 1998 time stamp.
16478 (java_parse_source_file): Renamed from parse_source_file.
16479 (YYERROR_NOW, YYNOT_TWICE): Fixed.
16480 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
16481 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
16482 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
16483 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
16484 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
16485 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
16486 (struct parser_ctxt): New data structure to keep the parser context.
16487 *parse.y: Added 1998 time stamp, got rid of static global variables.
16488 (java_error_count, ctxp): New global variables.
16489 (%union): New value field.
16490 (numeric_type, integral_type): Rules removed.
16491 (primitive_type): Rule defined to handle integral, float, double and
16492 boolean types.
16493 (qualified_name, package_declaration,
16494 single_type_import_declaration, type_import_on_demand_declaration,
16495 modifiers, class_declaration, super, interfaces,
16496 interface_type_list, class_body, field_declaration,
16497 field_declaration, variable_declarators, variable_declarator,
16498 variable_declarator_id, method_declaration, method_header,
16499 formal_parameter_list, formal_parameter, method_body, block,
16500 static, interface_declaration, extends_interfaces,
16501 abstract_method_declaration, local_variable_declarators): Rules now
16502 define actions.
16503 (force_error, do_warning): New global statics.
16504 (push_parser_context, parser_context_save_global,
16505 parser_context_restore_global, pop_parser_context): New functions.
16506 (yyerror): Now uses the global parser context. Fixed use of obstack.
16507 (parse_error, parse_error_context, parse_warning_context,
16508 java_accstring_lookup, redefinition_error, check_modifiers,
16509 parser_add_interface, create_interface, create_class, find_field,
16510 duplicate_declaration_error, register_fields, method_header,
16511 check_modifiers_consistency, check_abstract_method_header,
16512 method_declarator, parser_qualified_classname,
16513 parser_check_super_interface, parser_check_super,
16514 parser_chain_incomplete_item, java_check_circular_reference,
16515 layout_class_from_source, java_complete_class,
16516 complete_method_decl, resolve_class, complete_class_report_errors,
16517 java_check_final, check_method_redefinition,
16518 java_check_regular_methods, java_check_abstract_methods,
16519 java_check_methods, lookup_java_interface_method2,
16520 lookup_java_method2, lookup_cl, find_name_in_single_imports,
16521 process_imports, find_in_imports, read_import_entry,
16522 read_import_dir, find_in_imports_on_demand,
16523 check_pkg_class_access, not_builtin_p, declare_local_variables,
16524 source_start_java_method, java_generate_parsed_class): New
16525 functions.
16526 *typeck.c: (signature_include_return): New global variable.
16527 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
16528 to add the function returned type in the signature.
16529
16530 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
16531
16532 * jcf-io.c (open_in_zip): Use strncmp and LEN.
16533
16534 1998-01-29 Dave Brolley <brolley@cygnus.com>
16535
16536 * Make-lang.in (java.info): Added.
16537 (java.install-info): Added
16538
16539 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
16540
16541 * Makefile.in (clean): Also remove java/parse.c.
16542
16543 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
16544
16545 Add a pair of -fbounds-check/-fno-bounds-check options.
16546 * lang.c (lang_decode_option): Add code to grok arguments.
16547 (flag_bounds_check): Add decl.
16548 (lang_f_options): New array w/ the option in it.
16549 * java-tree.h (flag_bounds_check): Add decl.
16550 * lang-options.h: New file.
16551 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
16552 of a static macro value.
16553 (JAVA_ARRAY_EXCEPTION): Delete macro.
16554
16555 1998-01-23 Per Bothner <bothner@cygnus.com>
16556
16557 * typeck.c (build_java_array_type): Fix two bugs in previous change.
16558 * expr.c (build_anewarray): Add missing promote_type.
16559
16560 1998-01-22 Per Bothner <bothner@cygnus.com>
16561
16562 Add array types with known length to optimize bounds checking.
16563 * typeck.c (build_java_array_type): Take length parameter.
16564 (java_array_type_length, build_prim_array_type): New functions.
16565 * java-tree.h: Update for new functions.
16566 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
16567 * class.c: Use build_prim_array_type.
16568 * expr.c (can_widen_reference_to): Handle known-length array types.
16569 (verify_jvm_instructions): Keep track of integer push instructions
16570 followed by newarray/anewarray, so we can build known-length arrays.
16571 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
16572 (java_array_data_offset): New function.
16573 (build_java_array_length_access): New function. Optimize if constant.
16574 (build_java_arrayaccess): Constant fold bounds check.
16575 (expand_java_newarray, expand_java_anewarray): Replaced by ...
16576 (build_newarray, build_anewarray): New functions.
16577 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
16578 * verify.c (merge_types): Handle known-lengh array types.
16579
16580 1998-01-19 Per Bothner <bothner@cygnus.com>
16581
16582 * expr.c (expand_byte_code): Fix performace bug, which caused
16583 searching linenumber_table to be linear rather than constant.
16584
16585 1997-12-12 Per Bothner <bothner@cygnus.com>
16586
16587 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
16588
16589 * decl.c, java-tree.h (soft_fmod_node): New global.
16590 * decl.c (init_decl_processing): Define __builtin_fmod.
16591 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
16592 using __builtin_fmod.
16593
16594 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
16595
16596 * keyword.h: New file, output of keyword.gperf as processed by
16597 gperf.
16598 * lex.c (java_lex_init): Initialize java_error_flag.
16599 * parse.c (YYERROR_NOW): Uses java_error_flag.
16600 * parse.y: New static java_error_flag. Useless definition of
16601 buffer_error gone.
16602 * parse.y (java_error): Portable error recovery using
16603 java_error_flag (not yet completely tuned).
16604
16605 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
16606
16607 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
16608
16609 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
16610
16611 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
16612 (parse.c, lex.c, keyword.h): New rules for Java source code
16613 front-end.
16614 * parse.c: Renamed into jcf-parse.c.
16615 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
16616 * keyword.gperf: New file, Java keywords.
16617 * parse.y: New file, Java language grammar.
16618 * parse.h: New file, Java language grammar definitions.
16619 * lex.c: New file, Java language lexer.
16620 * lex.h: New file, Java language lexer definitions.
16621
16622 1997-12-03 Per Bothner <bothner@cygnus.com>
16623
16624 * decl.c (clinit_identifier_node), java-tree.h: New global.
16625 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
16626 * verify.c (verify_jvm_instructions): Inline use of removed macros.
16627 * expr.c (expand_java_field_op): Check for invalid assignment
16628 to final field.
16629
16630 * jcf-reader.c (get_attribute): Test for wrong attribute length.
16631
16632 1997-10-27 Per Bothner <bothner@cygnus.com>
16633
16634 * verify.c (verify_jvm_instructions): When processing a handler,
16635 attempt to set the current_subr to the right value.
16636 (More complicated code combines Sep 17 and Oct 22 versions.)
16637
16638 1997-10-24 Per Bothner <bothner@cygnus.com>
16639
16640 * class.c (push_class): Figure out (guess) name of source file.
16641 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
16642 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
16643 (parse_class_file): Change return type from int to void.
16644 Call debug_start_source_file/debug_end_source_file.
16645
16646 * expr.c (build_java_binop): Fix masking 2nd operand.
16647 * decl.c (init_decl_processing): Set sizetype first.
16648
16649 1997-10-22 Per Bothner <bothner@cygnus.com>
16650
16651 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
16652 (Revert Sep 17 change.)
16653
16654 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
16655
16656 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
16657 .class extension in their name and fix thing so we don't process
16658 them parse_zip_file_entries().
16659 (parse_zip_file_entries): Cleaned unused local variables.
16660
16661 1997-10-20 Per Bothner <bothner@cygnus.com>
16662
16663 * expr.c (can_widen_reference_to): Allows equal array element types.
16664 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
16665 * jcf-dump.c (RET): Get (and print) index.
16666
16667 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
16668 Promote element type to POINTER_TYPE.
16669
16670 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16671
16672 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
16673 find_in_current_zip, jcf_figure_file_type): Moved from
16674 jcf-reader.c to parse.c.
16675 * zextract.c: (read_zip_archive): takes file_comment_length possible
16676 field into account.
16677
16678 1997-10-20 Per Bothner <bothner@cygnus.com>
16679
16680 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
16681
16682 * verify.c (merge_types): Handle array types even better ...
16683
16684 1997-10-17 Per Bothner <bothner@cygnus.com>
16685
16686 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
16687
16688 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
16689 * class.c (make_class_data): Don't build fields_decl if no fields.
16690 When building fields_decl, skip if DECL_ARTIFICIAL.
16691
16692 * expr.c (java_stack_swap): Update stack_type_map.
16693 * verify.c (merge_types): Handle array types better.
16694
16695 1997-10-15 Per Bothner <bothner@cygnus.com>
16696
16697 * class.c (add_field): Don't promote short integral fields to
16698 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
16699 * expr.c (push_value): Promote and convert short integral values.
16700
16701 * decl.c, java-tree.h (integer_two_node): New constant node.
16702 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
16703
16704 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
16705
16706 * class.c (append_gpp_mangled_type): Use function argument
16707 unpromoted type to generate mangled name.
16708
16709 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16710
16711 * constants.c (build_constant_data_ref): Now uses current_class
16712 instead of main_class.
16713 (build_constants_constructor): Now uses current_class instead of
16714 main_class.
16715 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
16716 of the global variable SeepZipFiles done here.
16717 * zextract.c (read_zip_archive): extra_field optional field taken
16718 into account while computing the position of the class file in the
16719 archive.
16720 * verify.c (verify_jvm_instructions): Use current_jcf to search
16721 the constant pool.
16722 * parse.c (load_class): First search for the class to load in the
16723 current zip file. Saves current_jcf (restored before returning
16724 from that function). Don't call JCF_FINISH in the class was found
16725 in the current ZIP file.
16726 (jcf_parse): If the class was found in the current ZIP file, save
16727 its tree_constant_pool (for later reuse).
16728 (parse_class_file): New function. Process each method defined in
16729 the current class and record the class as to be later registered.
16730 (yyparse): Rewritten. Figure the type of the current file and switch
16731 accordingly.
16732 * lang.c: New global variable current_jcf.
16733 (lang_init): Removed compiling_from_source test (done later, in
16734 yyparse). Removed call the jcf_parse ().
16735 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
16736 (typedef struct JCF): New fields seen_in_zip (to mark a class found
16737 in the current ZIP file) and zip_offset (offset to the class data in
16738 the current zip file).
16739 * jcf-reader.c: zipfile.h included.
16740 localToFile: New ZipFileCache static global variable
16741 (parse_zip_file_entries): New function. Browse the current ZIP
16742 file directory and process each class found.
16743 (process_zip_dir): New function. Register each class found in the
16744 ZIP file directory. The class aren't parsed but a valid JCF is
16745 link to each of them.
16746 (find_in_current_zip): New function. Search for a class in the
16747 current ZIP file directory. If found, prepare the class so that it
16748 can be loaded.
16749 (jcf_figure_file_type): New function. Examine the file structure
16750 to figure a class file, a ZIP file. If none of these categories are
16751 matched, a source file is assumed.
16752 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
16753 SeenZipFile: New global variable.
16754 (open_in_zip): Use zipmember's length to accelerate the search for
16755 a member. If zipmember was NULL and zip file successfully read,
16756 return 0.
16757 * java-tree.h: New global variable current_jcf declared. Added
16758 declaration for current_constant_pool_tags, current_constant_pool_data,
16759 current_constant_pool_length, current_constant_pool_data_ref.
16760 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
16761 store the JCF of classes seen in a zip file) and tree *constant_pool
16762 (to save a loaded class constant pool). current_class declared here.
16763 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
16764 retrieve method_ref_constant.
16765 (PUSHC): java_push_constant_from_pool now uses current_jcf.
16766 (OBJECT): get_class_constant now uses current_jcf.
16767 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
16768 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
16769 (expand_invoke): Now uses current_class instead of main_class
16770 (build_class_init): Now uses current_class instead of main_class
16771 * class.c: New static global variable registered_class.
16772 (register_class): New function.
16773 (emit_register_class): Modified to use registered_class instead of
16774 main_class
16775 (is_compiled_class): Now take into account class seen in the archive.
16776
16777 1997-10-06 Per Bothner <bothner@cygnus.com>
16778
16779 * except.h: Renamed to: java-except.h.
16780 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
16781 * except.c: Add semi-working (commented out) implementation.
16782
16783 * expr.c (expand_iinc): Add needed flush_quick_stack.
16784 * parse.c (set_source_filename): New function.
16785 (give_name_to_class): Set input_filename from package.classname.java.
16786
16787 * jcf-io.c (find_class): Don't look first in ".".
16788
16789 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16790
16791 * zextract.c (read_zip_archive): Now takes into account the
16792 extra_field field.
16793 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
16794
16795 1997-09-20 Per Bothner <bothner@cygnus.com>
16796
16797 * constants.c, java-tree.h (build_internal_class_name): New function.
16798 (alloc_class_constant): Re-implement using build_internal_class_name.
16799 * class.c (make_class_data): Likewise.
16800 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
16801
16802 1997-09-17 Per Bothner <bothner@cygnus.com>
16803
16804 * verify.c (verify_jvm_instructions): Temporarily set current_subr
16805 to NULL before pushing an exception handler target.
16806
16807 * expr.c (flush_quick_stack): Save from low stack indexes to high.
16808 (java_stack_swap, java_stack_dup): Re-write to be safe from
16809 clobbering registers.
16810 (build_class_init): New function.
16811
16812 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16813
16814 * typeck.c (build_java_array_type): Temporary use
16815 permanent_obstack to create the array 'length' field.
16816 * expr.c (lookup_label): Temporay use permanent_obstack to create
16817 label if not found.
16818 * class.c (push_super_field): Tempory use permanent_obstack.
16819
16820 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
16821
16822 * typeck.c (type_for_mode): Now handles double_type_node and
16823 float_type_node.
16824 * verify.c (verify_jvm_instructions): The instruction following
16825 the wide bytecode is checked. OPCODE_ret added to the list of
16826 wide.
16827
16828 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16829
16830 * class.c (make_class): Temporary use permanent_obstack. Set the
16831 class CLASS_P field to 1.
16832 (push_class): Temporary use permanent_obstack.
16833 (set_super_info): Temporary use permanent_obstack.
16834 (add_method): Temporary use permanent_obstack, set
16835 METHOD_TRANSIENT().
16836 (add_field): Temporary use permanent_obstack. Sets
16837 FIELD_VOLATILE() and FIELD_TRANSIENT().
16838 (build_class_ref): Temporary use permanent_obstack if the class
16839 isn't compiled.
16840 (build_static_field_ref): Temporary use permanent_obstack when
16841 creating field's rtl.
16842 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
16843 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
16844 and fields. Function finalized, as far as flag handling.
16845 (push_class_static_dummy_field): Temporary use permanent_obstack.
16846 (emit_register_class): Force generation of class registration at
16847 -O3 or deeper.
16848 * decl.c (end_java_method): Call permanent_allocation() before
16849 returning.
16850 * expr.c (can_widen_reference_to): Added comment to interface
16851 handling, fixed typo.
16852 (lookup_field): Now uses CLASS_P() to correct FIXME
16853 (expand_invoke): Verification on public && !static &&
16854 !abstract moved into soft_lookupinterfacemethod (kaffe).
16855 Use Object class dtable if objectref is an array when expanding
16856 invokeinterface.
16857 (java_push_constant_from_pool): Temporary use permanent_obstack
16858 for CONSTANT_string
16859 * parse.c (get_ref_constant): Temporary use permanent_obstack to
16860 create constant references.
16861 (get_constant): Temporary use permanent_obstack to create constant.
16862 (load_class): Temporary use permanent_obstack to load class.
16863 (jcf_parse): Temporary use permanent_obstack to perform class
16864 layout.
16865 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
16866 (build_java_signature): Temporary use permanent_obstack.
16867 * verify.c: (verify_jvm_instruction): removed unnecessary verification
16868 on ACC_SUPER flag.
16869 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
16870 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
16871 (CLASS_P): Defined
16872
16873 1997-09-11 Per Bothner <bothner@cygnus.com>
16874
16875 * class.c (append_gpp_mangled_type): Fix typo.
16876 (emit_register_class): Use main_class to get class object, rather
16877 than looking for no-longer-existing static decl starting with _CL.
16878 * typeck.c (parse_signature_type): Promote array element type
16879 if it is a RECORD_TYPE.
16880
16881 1997-09-10 Per Bothner <bothner@cygnus.com>
16882
16883 * class.c (push_class_static_dummy_field): New function.
16884 (mangle_static_field): New. Do G++-style mangling of static fields.
16885 (layout_class): Mandle static fields here, not in add_field.
16886 (build_class_ref): The class object is now a dummy static field.
16887 * decl.c (find_local_variable): Look for best, instead of first match.
16888 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
16889 (build_java_athrow): Don't check here if exception is Throwable.
16890 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
16891 (TYPE_USED): Removed. No longer used ...
16892 * parse.c (jcf_parse): Call push_class_static_dummy_field.
16893 * verify.c (push_pending_label): New function.
16894 (push_pending_block): Renamed to check_pending_block.
16895 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
16896 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
16897 re-checking possible handlers) after a store (less wasted work).
16898 Check for null handler (finally) before calling add_handler.
16899 Various changes to (finally?) correctly handle try/finally.
16900
16901 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
16902
16903 * class.c: Include stdio.h.
16904
16905 1997-09-04 Per Bothner <bothner@cygnus.com>
16906
16907 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
16908 to make sure class is initialized before static/special invoke.
16909
16910 * verify.c (verify_jvm_instructions): On a store instruction,
16911 call find_local_variable to force pre-allocation of decl and rtx.
16912 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
16913
16914 1997-09-03 Per Bothner <bothner@cygnus.com>
16915
16916 * class.c (build_class_ref): Strip off "promoted_" if need be.
16917 (make_field_value): Call build_java_signature when needed.
16918 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
16919 * expr.c (build_java_athrow): Don't push_value of exception.
16920 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
16921 match specification of [fd]cmp[lg] for NaNs.
16922 (expand_byte_code): Add support for exception handler ranges.
16923 * except.c: Add skeleton for EH code-generation.
16924 * verify.c (merge_types): Treat all promoted integral types as equal.
16925 * constants.c (build_constants_constructor): To force creation of
16926 current_constant_pool_data_ref, call build_constant_data_ref.
16927
16928 * javaop.def (lload): Fix typo.
16929 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
16930
16931 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
16932
16933 * parse.c: Don't include function.h.
16934
16935 1997-08-27 Per Bothner <bothner@cygnus.com>
16936
16937 * except.[ch]: New files.
16938 * Makefile.in (JAVA_OBJS): Add except.o
16939 * expr.c: Temporary warning about unimplemented exceptions.
16940 * verify.c: Verify exception handlers.
16941
16942 * jcf-dump.c (disassemble_method): Print exception table.
16943
16944 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16945
16946 * expr.c (verify_jvm_instructions): Started a thorough
16947 verification of invoke* bytecodes.
16948 (expand_byte_code): flush quick stack if PC is the target of a
16949 branch. and undef RET (conflicting with config/i386/i386.h).
16950 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
16951 used.
16952 (expand_invoke): Now handles invokeinterface and do more
16953 verification according to the bytecode.
16954 (lookup_field): Don't try to load the class if processing
16955 dtable_type.
16956 (can_widen_reference_to): Now handles interfaces.
16957 * decl.c (init_decl_processing): New global variable
16958 soft_lookupinterfacemethod_node, declared in java-tree.h.
16959 Call set_super_info on string_type_node.
16960 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
16961 defined.
16962 * class.c (set_super_info): Fills the CLASS_* flags according to
16963 access_flags.
16964 (get_access_flags_from_decl): Handles all class flags.
16965
16966 1997-08-26 Per Bothner <bothner@cygnus.com>
16967
16968 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
16969 * parse.c (yyparse): Check for abstract method, and missing code.
16970 * expr.c (expand_byte_code): Change interface.
16971 * lang.c (put_decl_node): Print promoted types prettier.
16972 * verify.c (verify_jvm_instruction): Change interface.
16973 Partial support for scanning exception table.
16974 For load instructions, handle promoted integral types.
16975
16976 1997-08-21 Per Bothner <bothner@cygnus.com>
16977
16978 * verify.c: New file, with contents moved from expr.c.
16979 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
16980 * typeck.c (is_array_type_p): Moved here from expr.c.
16981 * java-tree.h: Add some now-needed function declarations.
16982 * Makefile.in (JAVA_OBJS): Added verify.o.
16983
16984 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16985
16986 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
16987 METHOD_ABSTRACT flag.
16988
16989 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
16990 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
16991 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
16992
16993 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
16994 variables.
16995 (start_java_method): Hook for SYNCHRONIZED methods.
16996
16997 * expr.c (build_java_jsr, build_java_ret): New functions
16998 (JSR,PRE): New macros
16999 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
17000 (verify_jvm_instructions): tableswitch, lookupswitch,
17001 monitorenter, monitorexit, goto_w: verified.
17002 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
17003 (build_java_monitor): New function.
17004 (MONITOR_OPERATION): Modified to call build_java_monitor()
17005 (verify_jvm_instructions): Started a thorough verification of
17006 invoke* bytecodes.
17007
17008 1997-08-19 Per Bothner <bothner@cygnus.com>
17009
17010 Support verification of jsr/ret subroutines (used for try/finally).
17011 * decl.c (return_address_type_node): New type node.
17012 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
17013 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
17014 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
17015 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
17016 TYPE_USED): New macros for special types in type_map.
17017
17018 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
17019 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
17020 BCODE_JUMP_TARGET.
17021 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
17022
17023 * expr.c (can_widen_reference_to): New function.
17024 (pop_type): Use it.
17025 (merge_type_state): Support handling start of subroutine.
17026 (push_pending_block): Return char* error message, instead of calling
17027 fatal on an error. Also handle subroutines.
17028 (verify_jvm_instructions): Handle errors from push_poending_block.
17029 Support jsr and ret instructions.
17030
17031 1997-08-19 Per Bothner <bothner@cygnus.com>
17032
17033 * jcf-io.c (find_classfile): Fix thinko.
17034 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
17035
17036 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
17037
17038 * Makefile.in (BISON): Remove.
17039
17040 1997-08-07 Per Bothner <bothner@cygnus.com>
17041
17042 * Makefile.in: Convert to autoconf.
17043 * config-lang.in (outputs): Added java/Makefile.
17044
17045 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
17046 Rename cc1java to jc1.
17047
17048 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
17049 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
17050
17051 * class.c (class_depth): Do load_class if needed.
17052
17053 Mostly better verification.
17054 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
17055 (init_decl_processing): Change return type of soft_checkcast.
17056 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
17057 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
17058 lang_print_error): New functions.
17059 (lang_init): Set global hook print_error_function to lang_print_error.
17060 * expr.c: In the type_map ptr_type_node is only used for null now.
17061 (pop_type, merge_types): Hence ptr_type_node matches any reference.
17062 (merge_types): Dererence pointer to record types before comparing.
17063 (decode_newarray_type, merge_types): On error just return NULL.
17064 (build_java_binop): Add preliminary implementation (with warning)
17065 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
17066 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
17067 (expand_compare, expand_java_goto, expand_java_call): Don't
17068 push_pending_block, since that only makes sense when verifying.
17069 (merge_type_state): Different return codes.
17070 (push_pending_block): A block may need to be verified more than once.
17071 (expand_byte_code): Warn about unused code at code generation time.
17072 (verify_jvm_instruction): Changed logic, since code may need to be
17073 re-verified if type-state has changed. Also, better error handling.
17074 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
17075 Improve newarray, anewarray, ?aload, athrow,
17076 * java-tree.h (LABEL_CHANGED): New macro.
17077
17078 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
17079
17080 * decl.c (soft_athrow_node): New global variable initialized.
17081 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
17082 * typeck.c (convert): Added support for REAL_TYPE.
17083 (convert_to_char): New function.
17084 (convert): Handle CHAR_TYPE.
17085 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
17086 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
17087 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
17088 promoted type.
17089 (verify_jvm_instructions): Added break a the end of bogus unop: label.
17090 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
17091 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
17092 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
17093 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
17094 to Use The Right Things.
17095 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
17096 compatible with INT. BOOLEAN is made equivalent to BYTE.
17097 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
17098 OPCODE_ifnonnull): Now supported.
17099 (build_java_athrow): New function.
17100
17101 1997-08-04 Per Bothner <bothner@cygnus.com>
17102
17103 Rename method name <init> to match G++ (and fix mangling).
17104 * class.c (layout_class): Replace method name of <init> by class name.
17105 (make_method_value): Do inverse renaming of constructor from <init>.
17106 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
17107 * typeck.c (lookup_java_constructor): New function.
17108 * expr.c (expand_invoke): If method_name is <init>, call
17109 lookup_java_constructor to find constructor.
17110
17111 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
17112
17113 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
17114
17115 * parse.c (get_class_constant): Modified to handle array "classes"
17116 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
17117 wide type.
17118 (convert): Modified to handle real type.
17119 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
17120 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
17121 variables declared.
17122 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
17123 soft_multianewarray, soft_newarray_node, soft_throw_node): New
17124 global variables initialized.
17125 (find_local_variable): Handles the case of a pointer
17126 (end_java_method): Restore the use of one more scope
17127 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
17128 build_java_array_length_access, expand_java_arrayload,
17129 expand_java_arraystore, expand_java_array_length,
17130 expand_java_multianewarray, expand_java_anewarray,
17131 build_java_check_indexed_type, is_array_type_p,
17132 build_java_throw_out_of_bound_exception): New functions.
17133 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
17134 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
17135 OPCODE_<t>aload): Implemented code for verification.
17136 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
17137 ARRAY_NEW_MULTI): Macro defined.
17138 (CONVERT): Modified to invoke convert().
17139 (case OPCODE_aload2): Fixed index typo from 2 to 1.
17140
17141 1997-07-31 Per Bothner <bothner@cygnus.com>
17142
17143 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
17144 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
17145 (make_class_data): Field name needs '/' as package prefix.
17146 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
17147
17148 1997-07-25 Per Bothner <bothner@cygnus.com>
17149
17150 Implement debug information for local variables.
17151 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
17152 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
17153 DECL_LOCAL_SLOT_CHAIN): New macros.
17154 (struct lang_decl_var): New type.
17155 * parse.c (give_name_to_locals): Move to decl.c.
17156 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
17157 (start_java_method): Re-write parameter handling.
17158 (pending_local_decls): New global variable.
17159 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
17160 (find_local_variable): Accept pc so we can skips decls not in range.
17161 (struct binding_level): Add end_pc field.
17162 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
17163 (various): Change so current pc gets passed to find_local_variable.
17164
17165 * decl.c (init_decl_processing): Re-arrange fields in
17166 class_type_node and and method_type_node to match kaffe 0.9.1.
17167 * class.c (make_method_value, make_class_data): Update
17168 initializations to match.
17169
17170 1997-07-16 Per Bothner <bothner@cygnus.com>
17171
17172 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
17173 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
17174 (push_super_field): New function.
17175 (make_class_data): Handle inheritance of class static initializer.
17176 (layout_class): New name mangling.
17177 * constants.c (build_constant_data_ref): Init type of data array
17178 to a one-element array.
17179 (build_constants_constructor): Set DECL_SIZE from complete array type.
17180 * decl.c: Rename class_type, object_type etc to class_type_node,
17181 object_type_node etc. Make former inherit from latter.
17182 * expr.c (expand_invoke): Add cast of function address.
17183 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
17184 * parse.c (yyparse): Don't call layout_class here.
17185 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
17186
17187 1997-06-14 Per Bothner <bothner@cygnus.com>
17188
17189 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
17190 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
17191 (alloc_class_constant): New.
17192 * expr.c (expand_invoke): Make sure method's class is initialized.
17193 * class.c (interits_from_p, emit_register_class): New functions.
17194 * parse.c (yyparse): Call emit_register_class.
17195
17196 1997-06-09 Per Bothner <bothner@cygnus.com>
17197
17198 * constants.c: New file, to handle constant pool.
17199 * Makefile.in (JAVA_OBJS): Add constants.o.
17200 * decl.c (init_decl_processing): Update, fix, finish various structs.
17201 (pushdecl_top_level): New.
17202 * parse.c (layout_class): Moved to class.c.
17203 * expr.c (java_push_constant_from_pool): New function.
17204 * class.c (build_class_ref): Make work fully
17205 (make_class_data): Emit super-class, constant pool, interface vector.
17206
17207 1997-06-03 Per Bothner <bothner@cygnus.com>
17208
17209 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
17210 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
17211 * class.c (class_depth): New function.
17212 (lookup_named_class): Replaced by new function lookup_class.
17213 * decl.c (object_type_node, string_type_node): New.
17214 Remove various types that we no longer need.
17215 * expr.c (verify_jvm_instructions): New separate verifier pass.
17216 (push_type, pop_type): New functions for verifier.
17217 (type_stack_dup, pop_argument_types, merge_types): Likewise.
17218 (expand_byte_code): Simplify, since we assume already verified.
17219 (expand_invoke): Now mostly works.
17220 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
17221 * lang.c (main_class): Move to parse.c. Don't make_class yet.
17222 * parse.c: Wait to allocate class object until we know its name.
17223 (layout_class): Calculate DECL_VINDEX for each virtual method.
17224 * typeck.c (get_array_type): Rename to ...
17225 (build_java_array_type): ... and provide working implementation.
17226 (build_java_signature): New function - build Java signature of type.
17227 (set_java_signature): New function - cache signature with type.
17228 (lookup_java_method): New function.
17229
17230 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
17231
17232 * class.c (ident_subst): Take extra SUFFIX parameter.
17233 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
17234 (set_constant_value, build_static_field_ref, is_compiled_class): New.
17235 (build_class_ref): Actually implement.
17236 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
17237 * decl.c (builtin_function): New.
17238 (init_decl_processing): Update for current Kaffe. Declare some
17239 builtin Kaffe functions.
17240 * expr.c (build_address_of): New.
17241 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
17242 Renamed (from expand_java_new etc), and added working implementations.
17243 (build_field_ref): Now also handle static fields.
17244 (expand_invoke): Implement invokestatic, and start implement rest.
17245 * java-opcodes.h: Use javaop.def to avoid duplicated list.
17246 * javaop.def: Rename invokevirt -> invokevirtual.
17247 * lang.c (use_handles): Removed.
17248 * parse.c: Add support for ConstantValue attribute.
17249 Handle nested loading of a class. (JPOOL_UTF): New.
17250
17251 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
17252
17253 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
17254
17255 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
17256
17257 * Make-lang.in (java.install-man): New empty rule.
17258 * typeck.c (set_local_type): New function.
17259 * expr.c (STORE_INTERNAL): Call find_local_variable,
17260 not find_stack_slot. Call set_local_type.
17261
17262 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
17263
17264 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
17265 and building RECORD_TYPE CONSTRUCTORs.
17266 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
17267
17268 * lang.c (use_handles): Change the default to 0.
17269 * decl.c: Define and build class_type, field_type, utf8const_type.
17270 * class.c (make_class_data, make_field_value,
17271 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
17272 hashUtf8String, strLengthUtf8, mangled_classname:
17273 Functions to build reflective data structures.
17274 * parse.c (yyparse): Call make_class_data.
17275
17276 * jcf-io.c (open_class, find_classfile): New functions.
17277 * jcf-dump.c: Support reading classfile from explicitly-named
17278 class file (without CLASSPATH searching).
17279
17280 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
17281
17282 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
17283 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
17284 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
17285 (get_constant): Now trivial for CONSTANT_Utf8.
17286
17287 * jcf.h: Make NEW_CPOOL the default.
17288 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
17289
17290 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
17291
17292 New directory.