]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/java/ChangeLog
* langhooks.h (builtin_function): New langhook.
[thirdparty/gcc.git] / gcc / java / ChangeLog
1 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2
3 * java-tree.h (builtin_function): Declare.
4
5 2004-07-16 Steven Bosscher <stevenb@suse.de>
6
7 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
8 abuse restore_line_number_status.
9
10 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
11
12 g++/15861
13 * jcf-parse.c (java_emit_static_constructor): Specify default
14 priority.
15
16 2004-07-13 Per Bothner <per@bothner.com>
17
18 * java-tree.h (all_class_filename): Remove useless macro.
19 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
20 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
21 * parse.y (java_parser_context_restore_global): Replace
22 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
23 * jcf-parse.c (read_class, java_parse_file): Likewise.
24
25 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
26
27 PR java/16474
28 gjavah.c (print_field_info): Emit constant only if field is static.
29
30 2004-07-11 Roger Sayle <roger@eyesopen.com>
31
32 * expr.c (java_truthvalue_conversion, flush_quick_stack,
33 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
34 build_java_ret, build_java_throw_out_of_bounds_exception,
35 build_java_array_length_access, java_check_reference,
36 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
37 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
38 expand_java_arrayload, build_java_monitor, expand_java_return,
39 expand_load_internal, expand_java_NEW, build_get_class,
40 build_instanceof, expand_java_CHECKCAST, expand_iinc,
41 build_java_soft_divmod, build_java_binop, build_field_ref,
42 expand_compare, expand_java_goto, expand_java_switch,
43 expand_java_add_case, build_class_init, build_known_method_ref,
44 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
45 expand_invoke, build_jni_stub, expand_java_field_op,
46 java_expand_expr, expand_byte_code, STORE_INTERNAL,
47 force_evaluation_order, emit_init_test_initialization): Convert
48 calls to "build" into calls to the prefered "buildN" functions.
49
50 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
51
52 * java-tree.h (set_block): Remove.
53 * lang.c (java_clear_binding_stack): New.
54 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
55 * decl.c (struct binding_level): Remove this_block.
56 (clear_binding_level): Likewise.
57 (poplevel): Don't handle this_block.
58 (set_block): Remove.
59
60 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
61
62 * class.c (common_enclosing_context_p): Remove statement with no
63 side-effects.
64
65 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
66
67 PR java/8618
68 * parse.y (create_anonymous_class): Remove 'location' argument. Use
69 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
70 (craft_constructor): Inherit access flags for implicit constructor
71 from the enclosing class.
72 (create_class): Fix comment typo.
73 (resolve_qualified_expression_name): Pass type of qualifier to
74 not_accessible_p, not the type in which target field was found.
75 (not_accessible_p): Handle inner classes. Expand protected
76 qualifier-subtype check to enclosing instances, but don't apply this
77 check to static members. Allow protected access to inner classes
78 of a subtype. Allow private access within common enclosing context.
79 (build_super_invocation): Get WFL line number info from current
80 class decl.
81 (build_incomplete_class_ref): Update for new create_anonymous_class
82 signature.
83 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
84 common_enclosing_instance_p.
85 * class.c (common_enclosing_context_p): New. Determine if types
86 share a common enclosing context, even across static contexts.
87 (common_enclosing_instance_p): Renamed from
88 common_enclosing_context_p. Determines if types share a common
89 non-static enclosing instance.
90 * java-tree.h (common_enclosing_instance_p): Declare.
91 * jcf-write.c (get_method_access_flags): New. Surpress private flag
92 for inner class constructors.
93 (generate_classfile): Use get_method_access_flags.
94
95 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
96
97 * class.c (interface_of_p): Check for null TYPE_BINFO.
98
99 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
100
101 * class.c (make_class): Do not create binfo here.
102 (set_super_info): Create it here.
103 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
104
105 2004-07-08 Richard Henderson <rth@redhat.com>
106
107 * expr.c (case_identity, get_primitive_array_vtable,
108 java_expand_expr, emit_init_test_initialization): Remove.
109 * java-tree.h (java_expand_expr): Remove.
110 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
111
112 2004-07-07 Per Bothner <per@bothner.com>
113
114 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
115 get internal error due to mismatched types.
116
117 * gcj.texi (Invoking gij): Document new -verbose:class flag.
118
119 * gcj.texi (Linking): New node. Document -lgij usage.
120
121 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
122
123 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
124 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
125 * java/class.c (set_super_info, class_depth, interface_of_p,
126 maybe_add_interface, add_interface, make_class_data,
127 layout_class, add_miranda_methods): Adjust BINFO macros.
128 * expr.c (can_widen_reference_to, lookup_field): Likewise.
129 * jcf-write.c (generate_classfile): Likewise.
130 * parse.y (patch_anonymous_class,
131 check_inner_circular_reference, check_circular_reference,
132 java_complete_class, check_abstract_method_definitions,
133 java_check_abstract_method_definitions,
134 check_interface_throws_clauses, java_check_abstract_methods,
135 lookup_java_interface_method2,
136 find_applicable_accessible_methods_list): Likewise.
137 * typeck.c (find_method_in_interface): Likewise.
138 * verify.c (merge_types): Likewise.
139
140 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
141
142 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
143 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
144
145 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
146
147 * class.c (make_class): Use make_tree_binfo.
148 (set_super_info, add_interface_do): Likewise.
149 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
150
151 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
152
153 * verify.c: Correct array element access formatting thinko.
154
155 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
156
157 * verify.c: Insert a short blurb at the start referring to the JVMS.
158 (merge_type_state): Remove redundant nested if statement.
159 (verify_jvm_instructions): Ensure current_subr is initialised to
160 NULL_TREE.
161 Minor formatting fixes all over the place.
162
163 2004-07-02 Richard Henderson <rth@redhat.com>
164
165 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
166
167 2004-07-01 Richard Henderson <rth@redhat.com>
168
169 * class.c (registerClass_libfunc): Remove.
170 (init_class_processing): Don't set it.
171 (emit_register_classes): Take list_p parameter. Fill it in
172 with _Jv_RegisterClass calls.
173 * decl.c (java_init_decl_processing): Don't call
174 init_resource_processing.
175 * jcf-parse.c (java_emit_static_constructor): New.
176 (java_parse_file): Call it.
177 * resource.c (registerResource_libfunc): Remove.
178 (init_resource_processing): Remove.
179 (write_resource_constructor): Take list_p parameter. Fill it in
180 with _Jv_RegisterResource calls.
181 * java-tree.h: Update prototypes.
182
183 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
184
185 PR java/1262
186 * class.c (layout_class_method): Do not override package-private
187 method if its in a different package.
188 (split_qualified_name): Move here from parse.y. Rename from
189 breakdown_qualified. Add comment.
190 (in_same_package): Move here from parse.y. Add comment.
191 * java-tree.h (break_down_qualified, in_same_package): Declare.
192 (in_same_package): Likewise.
193 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
194 Callers updated.
195
196 2004-06-29 Andrew Haley <aph@redhat.com>
197
198 * except.c (expand_start_java_handler): Push a new binding level.
199 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
200 register_exception_range() to register where we'll do it.
201 (expand_end_java_handler): Remove old bogus code. Replace with
202 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
203 the top of the expression we're curently building.
204 (maybe_end_try): Delete.
205 * decl.c (binding_level.exception_range): New field.
206 (clear_binding_level): Add field exception_range. Reformat.
207 (poplevel): Call expand_end_java_handler().
208 (poplevel): Call java_add_stmt only if functionbody is false.
209 (maybe_poplevels): Don't call maybe_end_try() from here.
210 (end_java_method): Clear no longer used trees in function decl.
211 (register_exception_range): New function.
212 * java-tree.h (register_exception_range, struct eh_range): Declare.
213
214 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
215
216 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
217
218 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
219
220 Formatting fixes.
221 * expr.c (class_has_finalize_method): Fix method name indentation.
222 (expand_java_call): Remove K&R style parameter declaration.
223 (expand_invoke): Fix statement indentation.
224 (expand_java_field_op): Likewise.
225 * parse-scan.y: Fix typo.
226 (reset_report): Fix method name indentation.
227 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
228 line. Fix typos.
229 * verify.c (verify_jvm_instructions): Document parameters, insert
230 page break.
231 * lang.c (lang_init_source): Fix method name indentation.
232 * class.c (common_enclosing_context_p): Likewise.
233 (emit_symbol_table): Fix parameter list indentation.
234 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
235 parameter declaration.
236 * constants.c: Fix copyright notice indentation.
237 * typeck.c (find_method_in_superclasses): Fix parameter list
238 indentation.
239 (find_method_in_interfaces): Likewise.
240 * zextract.c (makelong): Fix method name indentation.
241
242 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
243
244 PR java/15715.
245 * parse.y (create_interface): Set correct access modifiers for
246 interfaces.
247 * jcf-write.c (get_classfile_modifiers): New function.
248 (generate_classfile): Use get_classfile_modifiers, not
249 get_access_flags.
250
251 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
252
253 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
254 dependency to current parser context, not NULL_TREE, for top-level
255 classes.
256 (jdep_resolve_class): Enable member access check for all inner
257 class dependencies.
258
259 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
260
261 * parse.y (qualify_and_find): Pass type decl, not identifier, to
262 load_class.
263
264 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
265
266 PR java/15734
267 * expr.c (expand_java_field_op): Ensure that target class for static
268 field access has been loaded.
269
270 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
271 Ranjit Mathew <rmathew@hotmail.com>
272
273 PR java/1207, java/16178
274 * jcf-parse.c (load_class): Return immediately if passed a type decl
275 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
276 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
277 before calling load_class.
278 (qualify_and_find): Likewise.
279 (find_in_imports_on_demand): Likewise.
280 (find_applicable_accessible_methods_list): Likewise.
281
282 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
283
284 * parse.y (java_layout_seen_class_methods): Don't call load_class
285 on class defined by source parser.
286
287 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
288
289 * parse.y (set_nested_class_simple_name_value): Removed.
290 (java_complete_expand_class): Remove calls to
291 set_nested_class_simple_name_value.
292
293 2004-06-22 Andrew Haley <aph@redhat.com>
294 Ranjit Mathew <rmathew@hotmail.com>
295
296 Fixes PR java/16113.
297 * decl.c (force_poplevels): Remove call to expand_end_bindings.
298
299 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
300
301 * parse.y (create_class): Correct diagnostic message about
302 java.lang.Object extending anything else.
303
304 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
305
306 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
307 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
308 * constants.c (build_ref_from_constant_pool): Likewise.
309 * expr.c (build_java_array_length_access): Likewise.
310 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
311 (invoke_build_dtable, build_invokevirtual): Likewise.
312 (build_invokeinterface, java_expand_expr): Likewise.
313 (emit_init_test_initialization): Likewise.
314 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
315 * parse.y (make_qualifed_name, build_array_ref): Likewise.
316
317 2004-06-21 Andrew Haley <aph@redhat.com>
318
319 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
320 block.
321
322 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
323
324 * jcf.h (struct JCF): Change java_source, right_zip and finished
325 to unsigned int.
326 * lex.h (struct java_lexer): Change hit_eof, read_anything,
327 byte_swap and use_fallback to unsigned int.
328 * parse.h (struct _jdep): Change flag0 to unsigned int.
329
330 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
331
332 Fixes PR java/13948
333 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
334 before trying to lay out its methods.
335 * jcf-parse.c (read_class): Track parsed files using canonical paths
336 obtained via lrealpath from libiberty.
337 (java_parse_file): Likewise.
338 (parse_source_file_1): Rename formal parameter to reflect its
339 modified purpose. Minor formatting fix.
340
341 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
342
343 * class.c (emit_register_classes): Make the function uninlinable,
344 do not set current_function_cannot_inline.
345 * resource.c (write_resource_constructor): Do not reset
346 flag_inline_functions around rest_of_compilation.
347
348 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
349
350 PR java/15769
351 * expr.c (java_truthvalue_conversion): Handle
352 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
353 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
354 i.e. return the expression.
355
356 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
357
358 * gjavah.c: Include version.h
359
360 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
361
362 * jcf-write.c (generate_bytecode_conditional): Correct handling
363 of unordered conditionals. Add comment.
364
365 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
366 Per Bothner <per@bothner.com>
367
368 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
369 local variable was initialised upon declaration.
370 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
371 variable was final and initialised upon declaration.
372 * check-init.c (check_final_reassigned): Give error only if a blank
373 final is not definitely unassigned or if an initialised final is
374 reassigned.
375 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
376 assignment expressions. Remove case MODIFY_EXPR, label do_default.
377 (check_init): Perform initialised-variable-removing-optimisation
378 only on non-final local variables.
379
380 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
381
382 * jcf-write.c (generate_bytecode_conditional): Handle binops
383 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
384 and LTGT_EXPR.
385 (generate_bytecode_insns): Likewise.
386
387 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
388
389 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
390 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
391
392 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
393
394 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
395 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
396
397 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
398
399 * decl.c (struct binding_level): Add GTY marker. Compile
400 binding_depth unconditionally.
401 (current_binding_level, free_binding_level, global_binding_level):
402 Likewise.
403 (clear_binding_level): Unconditionally set binding_depth.
404 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
405
406 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
407
408 * lex.c (java_new_lexer): Set 'encoding'.
409 (java_read_char): Improve error message for unrecognized characters.
410 * lex.h (struct java_lexer): New field 'encoding'.
411
412 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
413
414 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
415
416 2004-05-21 Mark Wielaard <mark@klomp.org>
417
418 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
419 extern.
420
421 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
422
423 * typeck.c: Remove non-printable character 160.
424
425 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
426
427 * check-init.c: Correct minor typos.
428
429 2004-05-13 Diego Novillo <dnovillo@redhat.com>
430
431 * Make-lang.in, expr.c, java-gimplify.c: Rename
432 tree-simple.[ch] to tree-gimple.[ch].
433
434 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
435
436 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
437
438 2004-05-13 Diego Novillo <dnovillo@redhat.com>
439
440 Merge from tree-ssa-20020619-branch. See
441 ChangeLog.tree-ssa for details.
442
443 * Make-lang.in, builtins.c, check-init.c, class.c,
444 constants.c, decl.c, except.c, expr.c, java-except.h,
445 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
446 lang.c, lang.opt, parse.y, resource.c: Merged.
447 * java-gimplify.c: New file.
448
449 2004-05-10 Andrew Haley <aph@redhat.com>
450
451 * parse.y (create_class): Set TYPE_VFIELD.
452 * decl.c (java_init_decl_processing): Likewise.
453
454 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
455 * class.c (make_method_value): Replace DECL_VINDEX with call to
456 get_method_index().
457 (get_dispatch_vector): Likewise.
458 (layout_class_method): Likewise.
459 Replace set of DECL_VINDEX with call to set_method_index().
460 (set_method_index): New function.
461 (get_method_index): New function.
462 * java-tree.h (set_method_index): New function decl.
463 (get_method_index): New function decl.
464
465 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
466
467 * parse.y (check_pkg_class_access): Add new argument
468 and use it when cl is NULL to call lookup_cl on it.
469 (parser_check_super_interface): Do not call lookup_cl.
470 Pass this_decl to check_pkg_class_access and NULL
471 instead of lookup_cl.
472 (parser_check_super): Update for change in
473 check_pkg_class_access.
474 (do_resolve_class): Likewise.
475 (process_imports): Likewise.
476 (find_in_imports_on_demand): Likewise.
477 (resolve_qualified_expression_name): Likewise.
478
479 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
480
481 Fixes PR java/9685, PR java/15073
482 * parse.y (accessibility_string): New method.
483 (not_accessible_field_error): Use accessibility_string()
484 instead of java_accstring_lookup().
485 (resolve_qualified_expression_name): Check with
486 check_pkg_class_access() before allowing access using
487 qualified names.
488 Fix comment typo.
489 Use check_pkg_class_access() instead of not_accessible_p()
490 for unqualified types.
491 (not_accessible_p): Use DECL_CONTEXT (member) instead of
492 REFERENCE for package-private access checking.
493 (patch_method_invocation): Use accessibility_string() instead
494 of java_accstring_lookup().
495
496 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
497
498 Fixes PR java/15133
499 * gjavah.c (struct method_name): Add member is_native.
500 (overloaded_jni_method_exists_p): Match candidate method only if
501 it is native.
502 (print_method_info): Initialise is_native flag from the method's
503 access flags.
504
505 2004-04-30 Roger Sayle <roger@eyesopen.com>
506
507 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
508 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
509
510 2004-04-22 Roger Sayle <roger@eyesopen.com>
511
512 * resource.c (write_resource_constructor): Guard call to possibly
513 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
514
515 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
516
517 * class.c (make_class_data): Add new field aux_info.
518 * decl.c (java_init_decl_processing): Push type and decl for
519 `aux_info'.
520
521 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
522
523 * expr.c (expand_java_NEW): Don't use size argument for
524 _Jv_AllocObject calls.
525 * parse.y (patch_invoke): Likewise.
526
527 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
528
529 * expr.c (build_invokeinterface): Remove unused variables to
530 fix warnings.
531
532 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
533
534 * class.c (get_interface_method_index): New function. Return dispatch
535 index for interface method.
536 (make_method_value): For interface methods, set index field to
537 iface dispatch index, not DECL_VINDEX.
538 * expr.c (build_invokeinterface): Use get_interface_method_index.
539
540 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
541
542 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
543
544 2004-03-31 Andrew Haley <aph@redhat.com>
545
546 PR java/14104
547 * jcf-io.c (opendir_in_zip): Tidy up error handling.
548
549 2004-03-30 Zack Weinberg <zack@codesourcery.com>
550
551 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
552 form of GTY markers.
553
554 2004-03-25 Marcus Meissner <meissner@suse.de>
555
556 PR java/14689:
557 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
558
559 2004-03-23 Tom Tromey <tromey@redhat.com>
560
561 PR java/14315:
562 * jcf-write.c (make_class_file_name): Don't report if mkdir
563 failed with EEXIST.
564
565 2004-03-23 Tom Tromey <tromey@redhat.com>
566
567 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
568
569 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
570
571 * class.c, gjavah.c, lang.c: Fix comment typos.
572 * gcj.texi: Fix typos.
573
574 2004-03-19 Per Bothner <per@bothner.com>
575
576 * gcj.texi (Code Generation): Document new flags and assert defaults.
577
578 * class.c (assume_compiled_node_struct): Rename type to
579 class_flag_node_struct, as it is now also used for enable_assertions.
580 Rename assume_compiled_node typedef. Rename excludep field to value.
581 (find_assume_compiled_node): Rename function to find_class_flag_node.
582 Minor optimization - avoid needless strlen.
583 (add_assume_compiled): Some tweaking and optimization.
584 Rename and generalize to add_class_flag takem an extra parameter.
585 (add_assume_compled): New just calls add_class_flag.
586 (add_enable_assert, enable_assertions): New functions.
587 (enable_assert_tree): New static.
588 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
589 * lang.opt (fenable-assertions, fenable-assertions=,
590 fdisable-assertions, fdisable-assertions=): New options.
591 * lang.c (java_handle_option): Handle new options.
592 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
593 class in an interface - create helper class nested in outer interface.
594 (build_assertion): Short-circuit if enable_assertions is false.
595
596 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
597
598 * java-tree.h: Changes throughout to add checking to macros
599 and numerous whitespace changes.
600 (VAR_OR_FIELD_CHECK): New macro.
601 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
602 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
603
604 2004-03-16 Per Bothner <per@bothner.com>
605
606 * jcf-jump.c (options): New --print-constants option.
607 * gcj.texi (Invoking jcf-dump): Document --print-constants.
608
609 * jcf-dump.c (flag_print_constant_pool): Default to off.
610 (print_constant_terse_with_index): New helper function.
611 (various places): Check flag_print_constant_pool where missing.
612 (main): If verbose set flag_print_constant_pool.
613 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
614
615 2004-03-15 Andrew Haley <aph@redhat.com>
616
617 PR java/14581
618 * parse.y (java_complete_lhs): Check that final variable has an
619 initializer.
620
621 2004-03-12 Andrew Haley <aph@redhat.com>
622
623 PR java/14551
624 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
625 conversion.
626
627 2004-02-29 Roger Sayle <roger@eyesopen.com>
628
629 * jcf-parse.c (java_parse_file): Handle the case that input_filename
630 is NULL.
631
632 2004-02-27 Per Bothner <per@bothner.com>
633
634 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
635 suggestion: Use build_incomplete_class_ref.
636 This fixes PR java/13508, java/11714.
637
638 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
639
640 * java/parse.h: Update copyright.
641
642 2004-02-26 Andrew Haley <aph@redhat.com>
643
644 PR java/14231:
645 * parse.y (check_interface_throws_clauses): Check for
646 !METHOD_INVISIBLE (iface_method).
647 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
648 well as CLASS_ABSTRACT.
649
650 2004-02-25 Per Bothner <per@bothner.com>
651
652 * parse.y (build_assertion): If we're in an inner class, create the
653 class$ helper routine in the outer class.
654
655 2004-02-19 Richard Henderson <rth@redhat.com>
656
657 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
658
659 2004-02-16 Geoffrey Keating <geoffk@apple.com>
660
661 * Make-lang.in (java.install-man): Add extra dependencies.
662
663 2004-02-13 Geoffrey Keating <geoffk@apple.com>
664
665 * Make-lang.in: Install man pages under the same names
666 (possibly transformed) as the program they document.
667
668 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
669
670 * gjavah.c: Include "intl.h".
671 (error): New function.
672 (main): Call gcc_init_libintl.
673 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
674 print_stub_or_jni, process_file, main): Use error rather than
675 fprintf.
676 (print_method_info, usage, help, version, main): Mark strings for
677 translation with _. Avoid splitting up sentences. Send
678 information messages to stdout.
679 * jcf-dump.c: Include "intl.h".
680 (main): Call gcc_init_libintl.
681 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
682 Mark error, usage and version messages for translation with _.
683 Avoid splitting up sentences.
684 * jv-scan.c: Include "intl.h".
685 (fatal_error, warning): Change parameter s to msgid. Translate
686 messages.
687 (main): Call gcc_init_libintl.
688 (usage, help, version): Mark error, usage and version messages for
689 translation with _. Avoid splitting up sentences.
690 * jvgenmain.c: Include "intl.h".
691 (main): Call gcc_init_libintl.
692 (usage, main): Mark error messages for translation with _.
693 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
694 JVGENMAIN_OBJS): Add intl.o.
695 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
696 java/jvgenmain.o): Update dependencies.
697
698 2004-02-08 Per Bothner <per@bothner.com>
699
700 * parse.y (resolve_qualified_expression_name): In case of inaccessible
701 class don't use not_accessible_field_error, which can get confused.
702
703 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
704
705 Make-lang.in (po-generated): Delete.
706
707 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
708
709 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
710 Depend on target.h.
711 * decl.c: Include target.h.
712 (start_java_method): Replace PROMOTE_PROTOTYPES with
713 targetm.calls.promote_prototypes.
714 * expr.c: Include target.h.
715 (pop_arguments): Replace PROMOTE_PROTOTYPES with
716 targetm.calls.promote_prototypes.
717 * parse.y: Include target.h.
718 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
719 with targetm.calls.promote_prototypes.
720
721 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
722
723 * typeck.c: Update copyright.
724
725 2004-02-02 Tom Tromey <tromey@redhat.com>
726
727 * decl.c (java_init_decl_processing): Remove duplicate
728 gnu/gcj/RawData.
729
730 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
731
732 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
733
734 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
735
736 * expr.c (build_field_ref): Move variable
737 definition up.
738
739 2004-01-28 Andrew Haley <aph@redhat.com>
740
741 * expr.c (build_field_ref): Widen field offset.
742
743 2004-01-27 Andrew Haley <aph@redhat.com>
744
745 java/13273
746 * parse.y (check_interface_throws_clauses): Make sure class_decl
747 has been loaded.
748
749 2004-01-22 Jeff Sturm <jsturm@one-point.com>
750
751 PR java/13733
752 * parse.y (patch_assignment): Don't modify lhs_type for
753 reference assignments.
754
755 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
756
757 * Make-lang.in: Replace $(docdir) with doc.
758 (java.info, java.srcinfo, java.man, java.srcman): New rules.
759 (java.install-man): Revamp rule.
760
761 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
762
763 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
764 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
765 instead of deferred backquote.
766
767 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
768
769 * typeck.c (find_method_in_interfaces): Move variable
770 definition up.
771
772 2004-01-16 Andrew Haley <aph@redhat.com>
773
774 PR java/13273:
775 * typeck.c (shallow_find_method): New.
776 (find_method_in_superclasses): New.
777 (find_method_in_interfaces): New.
778 (lookup_do): Rewrite.
779 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
780
781 * jcf-parse.c (read_class): Save and restore output_class.
782 * decl.c (java_expand_body): Set output_class from fndecl.
783
784 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
785
786 * class.c (gen_indirect_dispatch_tables): Fix string length
787 calculations.
788
789 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
790
791 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
792 (java.srcextra): Copy above back to source directory if requested.
793 (po-generated): Delete reference to $(parsedir).
794 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
795 Use implicit rule.
796
797 2004-01-14 Jan Hubicka <jh@suse.cz>
798
799 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
800 estimation.
801
802 2004-01-09 Mark Mitchell <mark@codesourcery.com>
803
804 * java-tree.h (java_expand_expr): Change prototype.
805 * expr.c (java_expand_expr): Add alt_rtl parameter.
806
807 2004-01-09 Andrew Haley <aph@redhat.com>
808
809 PR java/12755:
810 * parse.y (java_fix_constructors): Set output_class.
811 (java_reorder_fields): Likewise.
812 (java_layout_classes): Likewise.
813 (java_expand_classes): Generate indirect dispatch tables.
814 (java_expand_classes): Set output_class.
815 (java_finish_classes): Likewise.
816 * lang.c (java_init): Turn on always_initialize_class_p if we're
817 using indirect dis[atch.
818 (java_decl_ok_for_sibcall): Use output_class, not current_class.
819 (java_get_callee_fndecl): Use class local atable.
820 * jcf-parse.c
821 (always_initialize_class_p): Decl moved to java-tree.h.
822 (HANDLE_CLASS_INFO): Set output_class.
823 (read_class): Likewise.
824 (parse_class_file): Call gen_indirect_dispatch_tables.
825 (parse_zip_file_entries): Set output_class.
826 (java_parse_file): Set output_class. Don't emit symbol tables.
827 * java-tree.h (output_class): New.
828 Remove global declarations for otable, atable, and ctable.
829 (always_initialize_class_p): moved here from decl.c.
830 (DECL_OWNER): New.
831 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
832 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
833 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
834 (struct lang_type): Add otable_methods, otable_decl,
835 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
836 ctable_decl, catch_classes, type_to_runtime_map.
837 * expr.c (build_field_ref): Make otable, atable, and ctable class
838 local rather than global.
839 (build_known_method_ref): Likewise.
840 (build_invokeinterface): Likewise.
841 (java_expand_expr): Pass runtime type (rather than actual type) to
842 expand_start_catch.
843 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
844 this class. Look up each class in that map to delete duplicates.
845 (expand_end_java_handler): Pass runtime type (rather than actual
846 type) to expand_start_catch.
847 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
848 (do_nothing): New.
849 (java_init_decl_processing): Rearrange things. Remove global
850 declarations of otable, atable, and ctable.
851 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
852 (java_expand_body): Set output_class.
853 * constants.c (build_constant_data_ref): Use output_class, not
854 current_class.
855 (alloc_name_constant): Likewise.
856 * class.c (gen_indirect_dispatch_tables): New.
857 (build_class_ref): Generate hard reference to superclass, even if
858 using indirect dispatch.
859 (build_static_field_ref): Use class local atable.
860 (make_class_data): Generate hard reference to superclass, even if
861 using indirect dispatch.
862 Generate symbolic references to interfaces when using indirect
863 dispatch.
864 (make_class_data): Emit otable, atable, and ctable.
865 Make otable, atable, and ctable class local rather than global.
866 (emit_catch_table): Make otable, atable, and ctable class local
867 rather than global.
868
869 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
870
871 * parse.y (catch_clause_parameter): Fix typo.
872
873 PR java/13404
874 * parse.y: (catch_clause_parameter): Return early if $3, aka
875 formal_parameter, is null.
876
877 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
878
879 * class.c: Remove uses of "register" specifier in
880 declarations of arguments and local variables.
881 * decl.c: Likewise.
882 * expr.c: Likewise.
883 * gjavah.c: Likewise.
884 * jcf-dump.c: Likewise.
885 * jcf-io.c: Likewise.
886 * jcf-parse.c: Likewise.
887 * jcf-write.c: Likewise.
888 * keyword.h: Likewise.
889 * parse.y: Likewise.
890 * typeck.c: Likewise.
891 * verify.c: Likewise.
892
893 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
894
895 * Make-lang.in (GCJ_CROSS_NAME): Delete.
896 (java.install_common, java.install-man): Adjust for above.
897 (java.uninstall): Likewise.
898
899 2003-12-03 Michael Koch <konqueror@gmx.de>
900
901 * class.c (make_class_data):
902 Push field value to 'hack_signers' instead of 'signers'.
903 * decl.c (java_init_decl_processing):
904 Push field 'hack_signers' instead of 'signers'.
905
906 2003-12-03 Zack Weinberg <zack@codesourcery.com>
907
908 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
909 including iconv.h.
910
911 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
912
913 PR java/12374:
914 * parse.y (qualify_ambiguous_name): Remove lots of broken
915 field access processing - there's no need to do that here,
916 because we have resolve_field_access. Remove
917 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
918 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
919 used.
920
921 2003-12-01 Jeff Sturm <jsturm@one-point.com>
922
923 Fix PR java/13237
924 * parse.y (java_complete_lhs): Save location prior to patching
925 CALL_EXPR.
926
927 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
928
929 PR java/12548
930 * resource.c (write_resource_constructor): Append
931 "_resource" to constructor identifier name.
932
933 2003-11-25 Jeff Sturm <jsturm@one-point.com>
934
935 Fix PR java/13183.
936 * constants.c (cpool_for_class): New function.
937 (outgoing_cpool): Remove global variable.
938 (alloc_name_constant): Use cpool_for_class.
939 (build_constants_constructor): Likewise.
940 * decl.c (java_expand_body): Set current_class.
941 * java-tree.h (outgoing_cpool) Remove declaration.
942 (init_outgoing_cpool): Likewise.
943 * jcf-parse.c (init_outgoing_cpool): Remove function.
944 (parse_class_file): Don't call init_outgoing_cpool.
945 * parse.y (java_complete_expand_methods): Don't call
946 init_outgoing_cpool. Don't save outgoing_cpool.
947 (java_expand_classes): Don't restore outgoing_cpool.
948 (java_finish_classes): Likewise.
949
950 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
951
952 * Make-lang.in: (java.install-common) Add
953 symlink for $(target_noncanonical)-gcjh for
954 native builds.
955
956 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
957
958 * Make-lang.in (java.extraclean): Delete.
959
960 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
961
962 * Make-lang.in (check-java): Add.
963
964 2003-11-19 Jeff Sturm <jsturm@one-point.com>
965
966 Fix PR java/13024.
967 * except.c (prepare_eh_table_type): Allocate variable-sized
968 buffer `buf' with alloca.
969
970 2003-11-17 Jeff Sturm <jsturm@one-point.com>
971
972 Fix PR java/12857.
973
974 decl.c (java_init_decl_processing): Don't initialize
975 class_not_found_type_node, no_class_def_found_type_node.
976
977 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
978 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
979 (class_not_found_type_node, no_class_def_found_type_node):
980 Don't define.
981
982 parse.y (build_dot_class_method_invocation): Add this_class
983 argument. Qualify method invocations to a different class.
984 (create_new_parser_context): Initialize saved_data_ctx to 0.
985 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
986 (build_dot_class_method): Don't load classes. Register
987 incomplete types.
988 (build_incomplete_class_ref): Special cases for interfaces
989 and inner classes. Move build_dot_class_method call to here...
990 (patch_incomplete_class_ref): ...from here. Pass current_class
991 to build_dot_class_method_invocation.
992 (build_assertion): Pass class_type to
993 build_dot_class_method_invocation.
994 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
995
996 2003-11-17 Jeff Sturm <jsturm@one-point.com>
997
998 Fix PR java/12739.
999 * java-tree.h (BLOCK_EMPTY_P): Define.
1000 * parse.y (java_complete_lhs): Check for empty blocks
1001 in TRY_FINALLY_EXPR case.
1002
1003 2003-11-17 Andrew Haley <aph@redhat.com>
1004
1005 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
1006 (struct lang_decl_var:freed): New variable.
1007 * decl.c (poplevel): Mark local vars that have gone out of scope.
1008 (push_jvm_slot): Don't use the RTL of a var that has gone out of
1009 scope.
1010
1011 2003-11-16 Jason Merrill <jason@redhat.com>
1012
1013 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
1014 and TAGS files that include them for each front end.
1015
1016 2003-11-15 Tom Tromey <tromey@redhat.com>
1017
1018 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
1019
1020 2003-11-12 Jason Merrill <jason@redhat.com>
1021
1022 PR optimization/12547
1023 * lang.c (java_tree_inlining_walk_subtrees): Just walk
1024 BLOCK_EXPR_BODY directly.
1025
1026 2003-11-12 Andrew Haley <aph@redhat.com>
1027
1028 PR java/11045
1029 * parse.y (fold_constant_for_init): Check that we really do have a
1030 constant.
1031
1032 PR java/11533
1033 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
1034 init_test_decls being inlined.
1035
1036 PR java/12890:
1037 * parse.y (do_resolve_class): Check return value from
1038 breakdown_qualified().
1039
1040 2003-11-11 Tom Tromey <tromey@redhat.com>
1041
1042 PR java/12915:
1043 * parse.y (merge_string_cste): Handle case where we have a
1044 pointer that happens to be zero, not null_pointer_node.
1045
1046 2003-11-10 Tom Tromey <tromey@redhat.com>
1047
1048 * jcf-parse.c (classify_zip_file): Correctly compare
1049 filename_length against length of manifest file's name.
1050
1051 2003-11-08 Tom Tromey <tromey@redhat.com>
1052
1053 PR java/12894:
1054 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
1055
1056 2003-11-06 Andrew Haley <aph@redhat.com>
1057
1058 * expr.c (java_stack_swap): Make sure destination stack slots are
1059 of the correct type.
1060
1061 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
1062
1063 * Make-lang.in (dvi): Move targets to $(docobjdir).
1064 (gcj.dvi): Simplify rule and adjust target.
1065 (gcj.info): Simplify rule.
1066 (gcj.pod): New intermediate rule.
1067 (gcjh.pod): Likewise.
1068 (jv-scan.pod): Likewise.
1069 (jcf-dump.pod): Likewise.
1070 (gij.pod): Likewise.
1071 (jv-convert.pod): Likewise.
1072 (rmic.pod): Likewise.
1073 (rmiregistry.pod): Likewise.
1074 (gcj.1): Delete.
1075 (gcjh.1): Delete.
1076 (jv-scan.1): Delete.
1077 (jcf-dump.1): Delete.
1078 (gij.1): Delete.
1079 (jv-convert.1): Delete.
1080 (rmic.1): Delete.
1081 (rmiregistry.1): Delete.
1082
1083 2003-11-02 Jeff Sturm <jsturm@one-point.com>
1084
1085 Fixes PR java/12866.
1086 * parse.y (resolve_qualified_expression_name): Move test
1087 for outer field access methods from here...
1088 (check_thrown_exceptions) ...to here.
1089
1090 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
1091
1092 * .cvsignore: Delete.
1093
1094 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
1095
1096 * verify.c (verify_jvm_instructions): Don't warn about legal
1097 eh binding regions generated for example by jdk 1.4.1.
1098
1099 2003-10-24 David S. Miller <davem@redhat.com>
1100
1101 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
1102
1103 2003-10-22 Andrew Haley <aph@redhat.com>
1104
1105 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
1106 (java_get_callee_fndecl): New.
1107
1108 * jcf-parse.c (java_parse_file): Call emit_catch_table().
1109
1110 * java-tree.h (ctable_decl): New.
1111 (catch_classes): New.
1112 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
1113
1114 * decl.c (java_init_decl_processing): Add catch_class_type.
1115 Add ctable_decl.
1116 Add catch_classes field.
1117
1118 * class.c (build_indirect_class_ref): Break out from
1119 build_class_ref.
1120 (make_field_value): Check flag_indirect_dispatch.
1121 (make_class_data): Ditto.
1122 Tidy uses of PUSH_FIELD_VALUE.
1123 Add field catch_classes.
1124 (make_catch_class_record): New.
1125
1126 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
1127
1128 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
1129
1130 * jcf-write.c: Follow spelling conventions.
1131 * parse.y: Likewise.
1132
1133 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
1134
1135 * ChangeLog: Fix typos.
1136 * expr.c: Fix comment typos.
1137 * jcf-write.c: Likewise.
1138 * lang.c: Likewise.
1139 * lex.c: Likewise.
1140 * mangle.c: Likewise.
1141 * parse-scan.y: Likewise.
1142 * parse.y: Likewise.
1143
1144 2003-10-22 Tom Tromey <tromey@redhat.com>
1145
1146 * expr.c (expand_byte_code): Only warn about dead bytecode when
1147 extra_warnings is set.
1148
1149 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
1150
1151 Fix for PR java/12586.
1152 * mangle.c (find_compression_record_match): Don't iterate through
1153 package namespace elements unless they all match compression_table
1154 entries.
1155
1156 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
1157
1158 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
1159 (generate-manpages): Likewise.
1160 (java.maintainer-clean): Likewise.
1161 (gcj.info): Likewise.
1162 (gcj.1): Likewise.
1163 (gcjh.1): Likewise.
1164 (jv-scan.1): Likewise.
1165 (jcf-dump.1): Likewise.
1166 (gij.1): Likewise.
1167 (jv-convert.1): Likewise.
1168 (rmic.1): Likewise.
1169 (rmiregistry.1): Likewise.
1170 (java.install-man): Likewise.
1171 (parse-scan.o): Move and define complete compile line.
1172 (parse.o): Likewise.
1173 (jcf-tree-inline.o): Move.
1174
1175 2003-10-20 Mark Mitchell <mark@codesourcery.com>
1176
1177 * Make-lang.in (info): Update dependencies.
1178 (java.install-info): Remove.
1179 ($(srcdir)/java/gcj.info): Replace with ...
1180 ($(docobjdir)/gcj.info): ... this.
1181
1182 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
1183
1184 * Make-lang.in: Replace uses of $(target_alias) with
1185 $(target_noncanonical).
1186
1187 2003-10-09 Tom Tromey <tromey@redhat.com>
1188
1189 * decl.c (java_init_decl_processing): Declare signers field.
1190 * class.c (make_class_data): Set signers field.
1191
1192 2003-10-09 Jason Merrill <jason@redhat.com>
1193
1194 * parse.y (patch_assignment): Use make_node to create a BLOCK.
1195 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
1196 POINTER_TYPE.
1197
1198 2003-10-06 Mark Mitchell <mark@codesourcery.com>
1199
1200 * Make-lang.in (java.info): Replace with ...
1201 (info): ... this.
1202 (java.dvi): Replace with ...
1203 (dvi): ... this.
1204 (java.generated-manpages): Replace with ...
1205
1206 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
1207
1208 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
1209
1210 2003-10-01 Andrew Haley <aph@redhat.com>
1211
1212 * jcf-parse.c (java_parse_file): Write otable and atable.
1213 * java-tree.h (atable_methods): New.
1214 (atable_decl): New.
1215 (atable_syms_decl): New.
1216 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
1217 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
1218 (symbol_*type): Rename method_symbol* to symbol*type.
1219 (emit_offset_symbol_table): Delete.
1220 (emit_symbol_table): New.
1221 (get_symbol_table_index): New.
1222 (atable_type): New.
1223 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
1224 (build_known_method_ref): Likewise.
1225 (get_symbol_table_index): Rename from get_offset_table_index.
1226 Parameterize to allow re-use by differing types of symbol table.
1227 (build_invokevirtual): Pass table to get_offset_table_index.
1228 * decl.c (java_init_decl_processing): Push types and decls for
1229 atable and atable_syyms.
1230 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
1231 (make_class_data): Add new fields atable and atable_syms.
1232 (emit_symbol_table): Rename from emit_offset_symbol_table.
1233 Parameterize to allow re-use by different types of symbol table.
1234 (build_symbol_entry): Renamed from build_method_symbols_entry.
1235
1236 2003-09-30 Roger Sayle <roger@eyesopen.com>
1237
1238 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
1239 semantics for SAVE_EXPR, by caching the result in a temporary.
1240
1241 2003-09-28 Richard Henderson <rth@redhat.com>
1242
1243 * check-init.c (check_init): Save and restore input_location
1244 instead of file and line separately.
1245 * decl.c (java_expand_body): Likewise.
1246 * jcf-write.c (generate_bytecode_insns): Likewise.
1247 * parse.y (safe_layout_class): Likewise.
1248 * jcf-parse.c (read_class, parse_class_file): Likewise.
1249 (java_parse_file): Use %H for warning locator.
1250
1251 2003-09-28 Roger Sayle <roger@eyesopen.com>
1252
1253 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
1254 with void-type branches instead of using a COMPOUND_EXPR.
1255
1256 2003-09-28 Jeff Sturm <jsturm@one-point.com>
1257
1258 * decl.c (java_optimize_inline, dump_function): Remove.
1259 * java-tree.h (java_optimize_inline): Remove declaration.
1260 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
1261 * parse.y (source_end_java_method, java_expand_classes):
1262 Likewise. Remove dead code.
1263
1264 2003-09-27 Roger Sayle <roger@eyesopen.com>
1265
1266 * lang.c (java_init_options): Set flag_evaluation_order.
1267 * expr.c (force_evaluation_order): Don't attempt to force
1268 evaluation order of binary operations using save_expr.
1269 * parse.y (java_complete_lhs): No longer need to call
1270 force_evaluation_order when constructing binary operators.
1271
1272 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
1273 Bryce McKinlay <bryce@mckinlay.net.nz>
1274
1275 PR java/1333:
1276 * parse.y (not_accessible_field_error): New function.
1277 (resolve_expression_name): Check field access permissions.
1278 (resolve_qualified_expression_name): Use
1279 not_accessible_field_error.
1280 (resolve_qualified_expression_name): Likewise.
1281
1282 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1283
1284 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
1285
1286 2003-09-23 Roger Sayle <roger@eyesopen.com>
1287
1288 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
1289 with equal operands without side-effects.
1290
1291 2003-09-22 Jeff Sturm <jsturm@one-point.com>
1292
1293 * decl.c (java_init_decl_processing): Don't emit otable decls
1294 if flag_indirect_dispatch is not set.
1295
1296 2003-09-21 Richard Henderson <rth@redhat.com>
1297
1298 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1299 resource.c: Revert.
1300
1301 2003-09-21 Richard Henderson <rth@redhat.com>
1302
1303 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
1304 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
1305
1306 2003-09-20 Richard Henderson <rth@redhat.com>
1307
1308 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
1309
1310 2003-09-18 Roger Sayle <roger@eyesopen.com>
1311
1312 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
1313 * check-init.c (check_init): Likewise.
1314
1315 2003-09-18 Roger Sayle <roger@eyesopen.com>
1316
1317 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
1318
1319 2003-09-16 Andrew Haley <aph@redhat.com>
1320
1321 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
1322
1323 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
1324
1325 Fixes PR java/9577
1326 * mangle.c (find_compression_record_match): Skip
1327 over a "6JArray" (the array template mangled string)
1328 IDENTIFIER_NODE.
1329 (mangle_array_type): Correct minor typo.
1330 (atms): Move definition to the beginning.
1331
1332 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
1333
1334 * class.c (add_miranda_methods): Ensure super-interfaces are laid
1335 out. Fix for PR java/12254.
1336
1337 2003-09-11 Richard Henderson <rth@redhat.com>
1338
1339 * parse.y (source_end_java_method): Update for new
1340 cgraph_finalize_function argument.
1341
1342 2003-09-09 Richard Henderson <rth@redhat.com>
1343
1344 * parse.y (source_end_java_method): Update call to
1345 cgraph_finalize_function.
1346
1347 2003-09-03 Jeff Sturm <jsturm@one-point.com>
1348
1349 * decl.c (java_expand_body): New function.
1350 * expr.c (build_class_init): Set DECL_IGNORED_P.
1351 * java-tree.h (start_complete_expand_method,
1352 java_expand_body): Declare.
1353 * jcf-parse.c (cgraph.h): Include.
1354 (java_parse_file): Handle flag_unit_at_a_time.
1355 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
1356 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
1357 (java_estimate_num_insns): Use walk_tree_without_duplicates.
1358 (java_start_inlining): New function.
1359 * parse.h (java_finish_classes): Declare.
1360 * parse.y: Include cgraph.h.
1361 (block): Don't special-case empty block production.
1362 (craft_constructor): Set DECL_INLINE.
1363 (source_end_java_method): Handle flag_unit_at_a_time.
1364 Replace inline code with call to java_expand_body.
1365 (start_complete_expand_method): Remove static modifier.
1366 (java_expand_method_bodies): Patch function tree for
1367 class initialization and/or synchronization as needed.
1368 Don't begin RTL expansion yet.
1369 (java_expand_classes): Check flag_unit_at_a_time before
1370 calling finish_class.
1371 (java_finish_classes): New function.
1372 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
1373 (patch_assignment): Set DECL_CONTEXT on temporary variable.
1374 (emit_test_initialization): Set DECL_IGNORED_P.
1375
1376 2003-09-03 Roger Sayle <roger@eyesopen.com>
1377
1378 * builtins.c (enum builtin_type): Delete unused enumeration.
1379 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
1380
1381 2003-08-28 Tom Tromey <tromey@redhat.com>
1382
1383 * gcj.texi (Extensions): Document gcjlib URLs.
1384
1385 2003-08-20 Tom Tromey <tromey@redhat.com>
1386
1387 * gcj.texi (Extensions): Added xref.
1388 (libgcj Runtime Properties): Document
1389 gnu.gcj.runtime.VMClassLoader.library_control.
1390
1391 2003-08-20 Andrew Haley <aph@redhat.com>
1392
1393 * except.c (prepare_eh_table_type): Use new encoding for exception
1394 handlers when using -fno-assume-compiled.
1395
1396 2003-08-13 Tom Tromey <tromey@redhat.com>
1397
1398 * gcj.texi (Invoking gij): Document -X and -?.
1399
1400 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
1401
1402 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
1403 GCJH_OBJS, JCFDUMP_OBJS
1404 * win32-host.c: Removed the unnecessary and broken dependency
1405 on jcf.h
1406
1407 2003-08-11 Tom Tromey <tromey@redhat.com>
1408
1409 * parse.y (java_check_regular_methods): Typo fixes. Call
1410 check_interface_throws_clauses. Use
1411 check_concrete_throws_clauses.
1412 (check_interface_throws_clauses): New function.
1413 (check_concrete_throws_clauses): New function.
1414 (hack_is_accessible_p): New function.
1415 (find_most_specific_methods_list): Added FIXME.
1416 * typeck.c (lookup_do): Use `flags' argument to decide what to
1417 do. Reimplemented.
1418 (lookup_argument_method_generic): New function.
1419 (lookup_argument_method2): Removed.
1420 * jcf.h (ACC_INVISIBLE): New define.
1421 * jcf-write.c (generate_classfile): Skip invisible methods.
1422 * class.c (add_miranda_methods): New function.
1423 (layout_class_methods): Use it.
1424 (get_access_flags_from_decl): Use ACC_INVISIBLE.
1425 * java-tree.h (METHOD_INVISIBLE): New define.
1426 (lang_decl_func) [invisible]: New field.
1427 (lookup_argument_method_generic): Declare.
1428 (SEARCH_INTERFACE): New define.
1429 (SEARCH_SUPER): Likewise.
1430 (SEARCH_ONLY_INTERFACE): Likewise.
1431 (SEARCH_VISIBLE): Likewise.
1432 (lookup_argument_method2): Removed declaration.
1433
1434 2003-08-05 Tom Tromey <tromey@redhat.com>
1435
1436 Fix for PR java/11600:
1437 * parse.y (java_complete_lhs): See whether we're calling a method
1438 on an array.
1439 (check_thrown_exceptions): Added `is_array_call' argument;
1440 fixed `clone' checking; updated all callers.
1441
1442 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
1443
1444 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
1445
1446 2003-08-03 Tom Tromey <tromey@redhat.com>
1447
1448 * java-tree.h (METHOD_TRANSIENT): Removed.
1449 * decl.c (pushdecl): Removed some dead code.
1450 * class.c (get_access_flags_from_decl): Can't have transient
1451 method.
1452 (add_method_1): Can't have a transient method.
1453
1454 2003-07-28 Andreas Jaeger <aj@suse.de>
1455
1456 * jvspec.c: Convert to ISO C90 prototypes.
1457
1458 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
1459
1460 * decl.c (force_poplevels): Fix warning call.
1461
1462 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
1463
1464 * expr.c (expand_java_field_op): Don't use xxx_with_decl
1465 (expand_java_field_op): Likewise.
1466 * class.c (layout_class_method): Likewise
1467 (emit_register_classes): Likewise.
1468 * decl.c (pushdecl): Likewise.
1469 (poplevel): Likewise.
1470 (force_poplevels): Likewise.
1471 (give_name_to_locals): Likewise.
1472 * check-init.c (check_for_initialization): Likewise.
1473
1474 2003-07-24 Jason Merrill <jason@redhat.com>
1475
1476 * java-tree.h: Move boolean_type_node et al to the back end.
1477
1478 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1479
1480 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
1481 casts.
1482
1483 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
1484
1485 * lang.opt: Don't show -MD_ and -MDD_.
1486
1487 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
1488
1489 * lang-options.h: Remove.
1490 * lang.opt: Add help text.
1491
1492 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
1493
1494 * expr.c: Remove the last argument to expand_assignment().
1495
1496 2003-07-09 Jan Hubicka <jh@suse.cz>
1497
1498 * java-tree.h (DECL_NUM_STMTS): Rename to...
1499 (DECL_ESTIMATED_INSNS): ... this.
1500 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
1501 New static functions.
1502 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
1503 * parser.y (add_stmt_to_compound): Do not account statements.
1504
1505 2003-07-08 Mark Wielaard <mark@klomp.org>
1506
1507 * gcj.texi: CNI now expands to Compiled Native Interface.
1508
1509 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1510
1511 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
1512
1513 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
1514
1515 * expr.c (expand_byte_code): Adjist emit_line_note call.
1516
1517 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
1518
1519 * lang.c (java_handle_option): Don't handle filenames.
1520
1521 2003-07-02 Zack Weinberg <zack@codesourcery.com>
1522
1523 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
1524 DIR_SEPARATOR.
1525 Use FILENAME_CMP.
1526 * jcf-write.c: Don't default-define DIR_SEPARATOR.
1527 * jcf.h: Delete COMPARE_FILENAMES definition.
1528
1529 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
1530
1531 * lang.c (java_init_options): Update prototype.
1532
1533 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
1534
1535 * decl.c (poplevel): Adjust define_label call.
1536
1537 2003-06-27 Zack Weinberg <zack@codesourcery.com>
1538
1539 * gjavah.c (flag_jni): Make non-static.
1540 * parse-scan.y (ctxp): Make non-static.
1541
1542 * class.c (build_method_symbols_entry)
1543 * expr.c (get_offset_table_index)
1544 * jcf-parse.c (jcf_parse):
1545 Mark the definition static, matching the forward declaration.
1546
1547 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
1548
1549 * lang.c (java_handle_option): Don't check for missing arguments.
1550
1551 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
1552
1553 * class.c (push_class): Use a location_t to save place.
1554 (emit_register_classes): Set input_location. Adjust
1555 expand_function_end call.
1556 * resource.c (write_resource_constructor): Likewise.
1557 * decl.c (end_java_method): Adjust expand_function_end call.
1558 * parse.y (source_end_java_method): Likewise.
1559
1560 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
1561
1562 * lang.c (java_handle_option): Likewise.
1563
1564 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
1565
1566 * lang.c (java_handle_option): Special-casing of optional
1567 joined arguments no longer needed.
1568 * lang.opt: Update switches that take optional argument.
1569
1570 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
1571
1572 * lang.opt: Declare Java.
1573 * lang.c (java_init_options): Update.
1574
1575 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
1576
1577 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
1578
1579 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
1580
1581 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
1582 * lang.c (java_handle_option): -MD and -MMD have an underscore.
1583 * lang.opt: -MD and -MMD have an underscore.
1584
1585 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
1586
1587 * class.c (emit_register_classes): Adjust init_function_start
1588 call.
1589 * decl.c (complete_start_java_method): Likewise.
1590 * resource.c (write_resource_constructor): Likewise.
1591
1592 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
1593
1594 * Make-lang.in: Update to use options.c and options.h.
1595 * lang.c: Include options.h not j-options.h.
1596 (java_handle_option): Abort on unrecognized option.
1597 (java_init_options): Request Java switches.
1598
1599 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
1600
1601 * Make-lang.in: Handle mostlyclean.
1602
1603 2003-06-11 Tom Tromey <tromey@redhat.com>
1604
1605 * lang.c (java_handle_option): Update dependency_tracking for
1606 OPT_MF case.
1607
1608 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
1609 empty argument.
1610
1611 2003-06-10 Andrew Haley <aph@redhat.com>
1612
1613 * resource.c (write_resource_constructor): Use expand_expr to
1614 generate the address of the label attached to a resource.
1615 * Make-lang.in (java/resource.o): Add expr.h
1616
1617 2003-06-10 Andrew Haley <aph@redhat.com>
1618
1619 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
1620 (java_decl_ok_for_sibcall): New.
1621
1622 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
1623
1624 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
1625 (java/j-options.c, java/j-options.h): New.
1626 * java-tree.h (resource_name, compile_resource_file,
1627 compile_resource_data): Constify.
1628 * jcf-write.c (jcf_write_base_directory): Similarly.
1629 * jcf.h (jcf_write_base_directory): Similarly.
1630 * lang.c: Include j-options.h.
1631 (cl_options_count, cl_options, string_option, java_decode_option,
1632 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
1633 process_option_with_no): Remove.
1634 (resource_name): Constify.
1635 (LANG_HOOKS_HANDLE_OPTION): Override.
1636 (java_handle_option): New.
1637 (java_init): Don't call jcf_path_init.
1638 (java_init_options): Call jcf_path_init.
1639 * lang.opt: New.
1640 * resource.c (compile_resource_data, compile_resource_file): Constify.
1641
1642 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
1643
1644 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
1645 (struct lang_decl_func): Add last_line field.
1646 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
1647 DECL_SOURCE_LINE_LAST): Remove.
1648 * parse.y (missing_return_error, finish_method_declaration,
1649 lookup_cl, start_artificial_method_body, source_end_java_method,
1650 start_complete_expand_method): Adjust.
1651
1652 2003-06-08 Tom Tromey <tromey@redhat.com>
1653
1654 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
1655 fno-assume-compiled.
1656
1657 2003-06-08 Roger Sayle <roger@eyesopen.com>
1658
1659 * builtins.c (define_builtin_type, builtin_types): Delete.
1660 (define_builtin): Rewritten to take just the built-in code,
1661 the function's name, type and fallback library function name.
1662 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
1663 (initialize_builtins): Overhaul to define the GCC builtins
1664 used by gcj manually, providing the Java run-time's
1665 implementations as the fallback library function.
1666
1667 2003-06-08 Anthony Green <green@redhat.com>
1668
1669 * parse.y (patch_cast): Fix conversions from floating-point to
1670 integral types.
1671
1672 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
1673
1674 * Make-lang.in: Update.
1675 * lang.c: Include opts.h. Define cl_options_count and cl_options.
1676
1677 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
1678
1679 * lang.c (java_init_options): Update.
1680
1681 2003-06-05 Jan Hubicka <jh@suse.cz>
1682
1683 * Make-lang.in: Add support for stageprofile and stagefeedback
1684
1685 2003-05-31 Roger Sayle <roger@eyesopen.com>
1686
1687 * lang.c (java_init_options): Prescribe wrap-around two's
1688 complement arithmetic overflow by setting flag_wrapv.
1689
1690 2003-05-29 Roger Sayle <roger@eyesopen.com>
1691
1692 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
1693 (builtin_record): Add an additional builtin_code field to
1694 record which GCC built-in corresponds to the Java function.
1695 (java_builtins): Add new entries for atan, atan2, exp, log,
1696 pow and tan.
1697 (max_builtin, min_builtin, abs_builtin): Perform constant
1698 folding on the resulting tree.
1699 (java_build_function_call_expr): Likewise, perform constant
1700 folding on the resulting tree.
1701 (initialize_builtins): The NULL creators are now allowed in
1702 the java_builtins table, which is now terminated by an entry
1703 with builtin_code == END_BUILTINS.
1704 (check_for_builtin): Likewise. If the matching creator is
1705 NULL, construct the call using java_build_function_call_expr
1706 directly with the decl for the corresponding builtin_code.
1707
1708 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
1709
1710 * win32-host.c: Normalize copyright boilerplate.
1711
1712 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1713
1714 * parse.y (print_int_node): Use string concatentation on
1715 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
1716 function calls into one.
1717
1718 2003-05-13 Zack Weinberg <zack@codesourcery.com>
1719
1720 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
1721 fatal_io_error with calls to fatal_error; add ": %m" to the end of
1722 all the affected error messages.
1723
1724 2003-05-13 Richard Henderson <rth@redhat.com>
1725
1726 * class.c (layout_class_method): Set DECL_EXTERNAL.
1727 * decl.c (java_mark_decl_local, java_mark_class_local): New.
1728 * java-tree.h (java_mark_class_local): Declare.
1729 * jcf-parse.c (parse_class_file): Use it.
1730 * parse.y (java_expand_classes): Likewise.
1731
1732 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
1733
1734 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
1735 * lex.h: #include input.h.
1736 * jv-scan.c (input_filename): Remove.
1737
1738 2003-05-02 Tom Tromey <tromey@redhat.com>
1739
1740 PR java/10491:
1741 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
1742 (handle_inner_classes): New function.
1743
1744 2003-05-01 Tom Tromey <tromey@redhat.com>
1745
1746 PR java/10459:
1747 * parse.y (finish_for_loop): Do nothing if update expression is a
1748 EXPR_WFL_NODE wrapping nothing.
1749 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
1750
1751 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
1752
1753 * lex.h (input_lineno): Remove declaration.
1754 * parse-scan.y: #include input.h.
1755 (input_filename): Remove declaration.
1756 (input_location): Add definition.
1757 (input_line): Remove definition.
1758
1759 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
1760
1761 * lex.h (lineno): Rename to ...
1762 (input_line): ... here
1763 * parse-scan.y (lineno): Rename to ...
1764 (input_line): ... here.
1765 (reset_report): Rename lineno to input_line.
1766 * check-init.c (check_init): Likewise.
1767 * class.c (push_class): Likewise.
1768 * decl.c (complete_start_java_method, end_java_method): Likewise.
1769 * expr.c (expand_byte_code): Likewise.
1770 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
1771 * jcf-write.c (generate_bytecode_insns): Likewise.
1772 * lex.c (java_init_lex, java_allocate_new_line,
1773 do_java_lex): Likewise.
1774 * parse.h (YYNOT_TWICE): Likewise.
1775 * parse.y (empty_statement, expression_statement,
1776 java_pop_parser_context, java_parser_context_save_global,
1777 yyerror, register_fields, method_header, safe_layout_class,
1778 find_in_imports_on_demand, create_artificial_method,
1779 source_end_java_method, start_complete_expand_method,
1780 build_thisn_assign, java_complete_lhs,
1781 maybe_absorb_scoping_block): Likewise.
1782
1783 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
1784
1785 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
1786 '/' when computing java source filename
1787
1788 2003-04-13 Tom Tromey <tromey@redhat.com>
1789
1790 * gjavah.c (print_c_decl): Indentation fix.
1791
1792 2003-04-12 Zack Weinberg <zack@codesourcery.com>
1793
1794 * class.c (make_field_value, make_method_value, get_dispatch_table)
1795 (make_class_data, emit_offset_symbol_table)
1796 * constants.c (build_constants_constructor)
1797 * java-tree.h (START_RECORD_CONSTRUCTOR)
1798 * parse.y (maybe_build_array_element_wfl):
1799 Use build_constructor.
1800
1801 2003-04-10 Eric Blake <ebb9@email.byu.edu>
1802
1803 PR java/10253:
1804 * parse.y (string_convert_int_cst): Always use at least one digit
1805 in string conversion. Remove ASCII dependence.
1806 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
1807
1808 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
1809
1810 * Make-lang.in: added win32-host.c
1811 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
1812 resolves to open() on non-Win32 platforms and
1813 Win32-specific jcf_open_exact_case() on Win32
1814 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
1815 when trying .java and .class files
1816 * win32-host.c: added to repository. Defines
1817 Win32-specific jcf_open_exact_case()
1818
1819 2003-04-10 Andrew Haley <aph@redhat.com>
1820
1821 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
1822 (maybe_free_localvar): Renamed from localvar_free.
1823 Add new arg, really.
1824 (generate_bytecode_insns): Set new variable, jsrs.
1825 Only free local vars if no jsr insns have been emittted.
1826 Call maybe_free_localvar, not localvar_free.
1827
1828 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
1829
1830 * gcj.texi: Remove @ at start of file.
1831
1832 2003-03-25 Tom Tromey <tromey@redhat.com>
1833
1834 * parse.y (create_interface): Call CHECK_DEPRECATED.
1835
1836 2003-03-23 Zack Weinberg <zack@codesourcery.com>
1837
1838 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
1839
1840 2003-03-21 Zack Weinberg <zack@codesourcery.com>
1841
1842 * javaop.h (jfloat, jdouble): Make them structures mirroring
1843 the bit fields of IEEE float and double respectively.
1844 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
1845 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
1846 (union Word, union DWord): Delete.
1847 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
1848
1849 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
1850 D_NAN_MASK): Delete.
1851 (jni_print_float, jni_print_double): New. Generate
1852 hexadecimal floating constants.
1853 (print_field_info): Use jni_print_float/double.
1854
1855 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
1856 finite floating point numbers for output; special case
1857 non-finite floats.
1858
1859 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
1860
1861 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
1862 Replace 0 and 1 with true and false in return statements.
1863
1864 2003-03-19 Tom Tromey <tromey@redhat.com>
1865
1866 * lex.c (do_java_lex): Renamed from java_lex.
1867 (java_lex): New function.
1868 Include timevar.h.
1869
1870 2003-03-13 Tom Tromey <tromey@redhat.com>
1871
1872 * parse.y (resolve_inner_class): Error if qualifier is a primitive
1873 type.
1874
1875 2003-03-04 Andrew Haley <aph@redhat.com>
1876
1877 * gjavah.c (is_first_data_member): New global variable.
1878 (print_c_decl): If it's the first data member, align it as the
1879 superclass.
1880 (process_file): Set is_first_data_member.
1881
1882 2003-03-11 Tom Tromey <tromey@redhat.com>
1883
1884 * parse.y (resolve_field_access): Initialize class if field is
1885 found in another static field.
1886 * expr.c (build_class_init): Don't optimize out initialization of
1887 implemented interface.
1888
1889 2003-03-11 Andrew Haley <aph@redhat.com>
1890
1891 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
1892 warning.
1893
1894 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
1895
1896 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
1897 and DIR_SEPARATOR_2 for a target.
1898 Correct minor typos.
1899
1900 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
1901 and DIR_SEPARATOR_2 for a target into account.
1902
1903 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
1904
1905 * lang.c (java_init): Update prototype, move code to java_post_options.
1906 (java_post_options): Similarly.
1907
1908 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
1909
1910 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
1911 compare file name components depending on the case-sensitivity
1912 or otherwise of the host file system.
1913
1914 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
1915 "strcmp" to compare file name components.
1916 Use IS_DIR_SEPARATOR instead of comparing directly against
1917 DIR_SEPARATOR.
1918 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
1919 comparing directly against DIR_SEPARATOR.
1920
1921 2003-03-04 Tom Tromey <tromey@redhat.com>
1922
1923 * Make-lang.in (java.tags): New target.
1924
1925 2003-03-01 Roger Sayle <roger@eyesopen.com>
1926
1927 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
1928 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
1929
1930 2003-03-01 Tom Tromey <tromey@redhat.com>
1931
1932 * parse.y (jdep_resolve_class): Only check deprecation if we found
1933 a decl.
1934
1935 2003-02-28 Tom Tromey <tromey@redhat.com>
1936
1937 PR java/9695:
1938 * class.c (maybe_layout_super_class): Always pass a WFL to
1939 do_resolve_class.
1940 * parse.y (do_resolve_class): Updated comment to explain
1941 parameters.
1942
1943 2003-02-26 Tom Tromey <tromey@redhat.com>
1944
1945 * jcf-write.c (generate_classfile): Check whether class is
1946 deprecated before writing attribute count.
1947
1948 2003-02-25 Roger Sayle <roger@eyesopen.com>
1949
1950 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
1951 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
1952
1953 2003-02-23 Tom Tromey <tromey@redhat.com>
1954
1955 * lang-options.h: Added -Wdeprecated.
1956 * gcj.texi (Warnings): Document -Wdeprecated.
1957 * java-tree.h (flag_deprecated): Declare.
1958 * lang.c (lang_W_options): Added deprecated.
1959 (flag_deprecated): New global.
1960 * chartables.h: Rebuilt.
1961 * gen-table.pl (process_one): Look at whitespace.
1962 (print_tables): Define LETTER_SPACE, LETTER_MASK.
1963 * parse.h (CLEAR_DEPRECATED): New macro.
1964 (CHECK_DEPRECATED_NO_RESET): New macro.
1965 * jcf-parse.c (handle_deprecated): New function.
1966 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
1967 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
1968 * parse.y (resolve_type_during_patch): Check deprecation.
1969 (jdep_resolve_class): Likewise.
1970 (process_imports): Likewise.
1971 (resolve_expression_name): Likewise.
1972 (check_deprecation): Strip arrays from decl. Check
1973 flag_deprecated.
1974 (patch_method_invocation): Also check the particular constructor
1975 for deprecation.
1976 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
1977 * jcf-write.c (append_deprecated_attribute): New function.
1978 (generate_classfile): Generate deprecated attribute when
1979 appropriate.
1980 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
1981 (java_lex) [case '*']: Simplify logic.
1982 (java_start_char_p): Use LETTER_MASK.
1983 (java_part_char_p): Likewise.
1984 (java_space_char_p): New function.
1985
1986 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
1987
1988 Change base class access representation.
1989 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
1990 (add_interface_do): Likewise.
1991
1992 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
1993
1994 * decl.c (java_init_decl_processing): Change
1995 soft_lookupjnimethod_node to reflect the change in
1996 signature of _Jv_LookupJNIMethod in libjava/jni.cc
1997 * expr.c (build_jni_stub): Calculate and pass the size
1998 on the stack of the arguments to a JNI function. Use
1999 new target macro MODIFY_JNI_METHOD_CALL to allow a
2000 target to modify the call to a JNI method.
2001
2002 2003-02-08 Roger Sayle <roger@eyesopen.com>
2003
2004 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
2005 instead of basename to avoid compiler warnings on Tru64.
2006
2007 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
2008
2009 * gcj.texi: Update to GFDL 1.2.
2010
2011 2003-01-31 Andrew Haley <aph@redhat.com>
2012
2013 * parse.y (java_expand_classes): Scan the whole class list looking
2014 for access methods that haven't yet been expanded.
2015
2016 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
2017
2018 Fix for java/4269:
2019
2020 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
2021 to fix bootstrap on sparc-unknown-netbsdelf1.5.
2022 * jcf-parse.c: Likewise.
2023
2024 2003-01-31 Mark Wielaard <mark@klomp.org>
2025
2026 * gjavah.c (throwable_p): Allocate 1 more byte for string.
2027
2028 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
2029
2030 * class.c (make_class): Use BINFO_ELTS.
2031 (set_super_info): Likewse.
2032 (add_interface_do): Likewise.
2033
2034 2003-01-30 Tom Tromey <tromey@redhat.com>
2035
2036 * jcf-parse.c (read_class): Update identifier's class value if it
2037 changed during parsing.
2038
2039 2003-01-30 Loren James Rittle <ljrittle@acm.org>
2040
2041 * Make-lang.in (po-generated): Find the targets in $(parsedir).
2042 Propagate change to all other rules as required.
2043 (java/parse-scan.o): Add explicit dependency on
2044 $(parsedir)/java/parse-scan.c .
2045
2046 2003-01-29 Tom Tromey <tromey@redhat.com>
2047
2048 * parse.y (patch_assignment): Only transform the rhs of an
2049 assignment when compiling to native.
2050
2051 2003-01-28 Tom Tromey <tromey@redhat.com>
2052
2053 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
2054
2055 2003-01-28 Tom Tromey <tromey@redhat.com>
2056
2057 * lex.c (java_lex): Don't include UEOF as part of token.
2058 (java_read_unicode): Error if \u sequence prematurely terminated.
2059
2060 2003-01-27 Tom Tromey <tromey@redhat.com>
2061
2062 * parse.y (java_check_regular_methods): Check for construct after
2063 checking types in throws clause.
2064
2065 2003-01-24 Tom Tromey <tromey@redhat.com>
2066
2067 * class.c (build_static_field_ref): Only a String or numeric field
2068 can fold to a constant.
2069
2070 2003-01-23 Tom Tromey <tromey@redhat.com>
2071
2072 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
2073 file name in resource buffer.
2074
2075 2003-01-23 Tom Tromey <tromey@redhat.com>
2076
2077 * expr.c (build_known_method_ref): Use method's context to find
2078 method table index.
2079
2080 2003-01-23 Tom Tromey <tromey@redhat.com>
2081
2082 * constants.c (set_constant_entry): Allocated cleared memory.
2083
2084 2003-01-22 Tom Tromey <tromey@redhat.com>
2085
2086 * java-tree.h: Don't use PARAMS.
2087 * resource.c: Add prototypes for all functions.
2088 (write_resource_constructor): Use `const char *' to avoid
2089 warning.
2090
2091 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
2092
2093 * jcf-parse.c (process_zip_dir): Remove unused variable.
2094
2095 2003-01-22 Tom Tromey <tromey@redhat.com>
2096
2097 * expr.c (build_invokeinterface): Abort if method's context is not
2098 an interface.
2099
2100 2003-01-22 Tom Tromey <tromey@redhat.com>
2101
2102 * gcj.texi (Input and output files): Mention non-class entries.
2103 * decl.c (java_init_decl_processing): Call
2104 init_resource_processing.
2105 * java-tree.h (compile_resource_data, write_resource_constructor,
2106 compile_resource_file, init_resource_processing): Declare.
2107 * config-lang.in (gtfiles): Added resource.c.
2108 * Make-lang.in (gt-java-resource.h): New target.
2109 (JAVA_OBJS): Added resource.o.
2110 (java/resource.o): New target.
2111 * resource.c: New file.
2112 * class.c (compile_resource_file): Moved to resource.c.
2113 (registerResource_libfunc): Likewise.
2114 (utf8_decl_list): Mark with GTY; now static.
2115 * jcf-parse.c (classify_zip_file): New function.
2116 (parse_zip_file_entries): Use it; compile .properties files.
2117 (process_zip_dir): Use classify_zip_file and compute_class_name.
2118 Don't write class name into zip directory.
2119 (java_parse_file): Call write_resource_constructor.
2120 (compute_class_name): New function.
2121 * jcf-io.c (read_zip_member): Reindented.
2122
2123 2003-01-21 Tom Tromey <tromey@redhat.com>
2124
2125 * class.c (supers_all_compiled): New function.
2126 (make_class_data): Use it.
2127
2128 2003-01-21 Tom Tromey <tromey@redhat.com>
2129
2130 * parse.y (method_header): Native method can't be strictfp.
2131 No method can be transient or volatile.
2132
2133 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2134
2135 Make-lang.in (jvspec.o-warn): Add -Wno-error.
2136
2137 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
2138
2139 * check-init.c: Fix comment typos.
2140 * class.c: Likewise.
2141 * constants.c: Likewise.
2142 * decl.c: Likewise.
2143 * except.c: Likewise.
2144 * expr.c: Likewise.
2145 * java-except.h: Likewise.
2146 * java-tree.h: Likewise.
2147 * javaop.h: Likewise.
2148 * jcf-dump.c: Likewise.
2149 * jcf-io.c: Likewise.
2150 * jcf-parse.c: Likewise.
2151 * jcf-write.c: Likewise.
2152 * lang.c: Likewise.
2153 * mangle.c: Likewise.
2154 * typeck.c: Likewise.
2155 * verify.c: Likewise.
2156
2157 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2158
2159 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
2160 * jcf-write.c: Include "tm_p.h".
2161
2162 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2163
2164 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
2165
2166 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2167
2168 * builtins.c (java_build_function_call_expr): Renamed from
2169 build_function_call_expr. All callers changed.
2170
2171 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
2172 * jcf-parse.c: Include tm_p.h.
2173
2174 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
2175 warning.
2176
2177 2003-01-14 Tom Tromey <tromey@redhat.com>
2178
2179 * class.c (make_class_data): Check that super is compiled before
2180 building class reference to it.
2181
2182 2003-01-14 Andrew Haley <aph@redhat.com>
2183
2184 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2185 varargs function -- correct.
2186
2187 2003-01-14 Andrew Haley <aph@redhat.com>
2188
2189 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
2190
2191 2003-01-14 Andrew Haley <aph@redhat.com>
2192
2193 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
2194 varargs function -- correct.
2195
2196 * parse.y (patch_assignment): Copy the rhs of an assignment into a
2197 temporary if the RHS is a reference.
2198
2199 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2200
2201 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
2202 * keyword.h: Regenerated.
2203
2204 * All Files: Convert to ISO C style function definitions.
2205
2206 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2207
2208 * parse.y (check_pkg_class_access): ANSIfy definition.
2209
2210 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2211
2212 * decl.c, parse-scan.y, parse.y: Don't cast return value of
2213 xmalloc et al.
2214
2215 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
2216
2217 2003-01-09 Geoffrey Keating <geoffk@apple.com>
2218
2219 Merge from pch-branch:
2220
2221 2002-12-02 Geoffrey Keating <geoffk@apple.com>
2222
2223 * Make-lang.in (java/gjavah.o): Update dependencies.
2224 * gjavah.c: Include ggc.h.
2225
2226 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
2227
2228 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
2229 (JCFDUMP_OBJS): Add ggc-none.o.
2230 (java/jcf-dump.o): Depend on GGC_H.
2231 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
2232 CPool substructures.
2233 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
2234 * jcf-dump.c: Include ggc.h.
2235
2236 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
2237
2238 * jcf.h (union cpool_entry): New.
2239 (struct CPool): Use gengtype to mark. Change field 'data' to be
2240 an array of unions.
2241 (struct JCF): Use gengtype to mark.
2242 (CPOOL_UINT): Update for new cpool_entry type.
2243 (CPOOL_USHORT1): Likewise.
2244 (CPOOL_USHORT2): Likewise.
2245 (CPOOL_FINISH): Use GC to free cpool subfields.
2246 * parse.h (struct parser_ctxt): Mark field current_jcf.
2247 * lex.c (java_init_lex): Use GC to allocate struct JCF.
2248 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
2249 (main_jcf): Use gengtype to mark.
2250 (ggc_mark_jcf): Delete.
2251 (get_constant): Update for new cpool_entry type.
2252 (give_name_to_class): Likewise.
2253 (get_class_constant): Likewise.
2254 (init_outgoing_cpool): Use GGC to allocate struct CPool.
2255 (java_parse_file): Use GGC to allocate struct JCF.
2256 (init_jcf_parse): Don't call ggc_add_root.
2257 * jcf-reader.c (jcf_parse_constant_pool): Update for new
2258 cpool_entry type.
2259 * java-tree.h (current_jcf): Use gengtype to mark.
2260 (CPOOL_UTF): Update for new cpool_entry type.
2261 (outgoing_cpool): Use gengtype to mark.
2262 (struct lang_type): GC struct JCF and struct CPool.
2263 * config-lang.in (gtfiles): Add jcf.h.
2264 * constants.c (find_tree_constant): New.
2265 (set_constant_entry): Allocate cpool subfields using GGC. Update
2266 for new cpool_entry type.
2267 (find_constant1): Update for new cpool_entry type.
2268 (find_constant2): Likewise.
2269 (find_utf8_constant): Use find_tree_constant.
2270 (find_class_or_string_constant): Remove unnecessary cast to jword.
2271 Update for new cpool_entry type.
2272 (count_constant_pool_bytes): Update for new cpool_entry type.
2273 (write_constant_pool): Likewise.
2274 (alloc_name_constant): Use find_tree_constant.
2275 (build_constants_constructor): Update for new cpool_entry type.
2276
2277 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
2278
2279 * parse.y (mark_parser_ctxt): Delete.
2280 (goal): Don't use ggc_add_root.
2281 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
2282 (java_pop_parser_context): Let GC free parser_ctxt.
2283 (java_parser_context_resume): Likewise.
2284 * parse.h (struct parser_ctxt): Use gengtype to mark.
2285 (ctxp): Likewise.
2286 (ctxp_for_generation): Likewise.
2287 * lex.h (struct java_lc_s): Mark for gengtype.
2288 (java_lexer): Rearrange for gengtype.
2289 * config-lang.in (gtfiles): Add lex.h, parse.h.
2290
2291 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2292
2293 * All Files: Remove PARAMS macro.
2294
2295 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
2296 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
2297 `__STDC__' macros.
2298
2299 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
2300 VA_CLOSE.
2301
2302 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
2303
2304 * Make-lang.in (java.install-common, java.uninstall,
2305 java.install-info, java.install-man): Prepend $(DESTDIR)
2306 to destination paths in all (un)installation commands.
2307 (java.install-common): Rewrite $(LN) command to support
2308 DESTDIR with "ln" as well as with "ln -s".
2309
2310 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
2311
2312 * java-tree.h: Protect against multiple inclusion.
2313
2314 2003-01-07 Tom Tromey <tromey@redhat.com>
2315
2316 * class.c (add_assume_compiled): Don't adjust parent if we're
2317 already at the root of tree.
2318
2319 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2320
2321 * lang.c (dump_compound_expr): Prototype.
2322
2323 2003-01-03 Tom Tromey <tromey@redhat.com>
2324
2325 Fix for PR java/8712:
2326 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
2327 when simply checking against `null'.
2328
2329 2003-01-03 Tom Tromey <tromey@redhat.com>
2330
2331 * gcj.texi (Standard Properties): Document http.proxyHost and
2332 http.proxyPort.
2333
2334 * gcj.texi (GNU Classpath Properties): Document new properties.
2335
2336 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
2337
2338 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
2339 java/lang-options.h, java/mangle.c, java/mangle_name.c,
2340 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
2341
2342 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
2343
2344 * Make-lang.in, boehm.c, buffer.c,
2345 buffer.h, builtins.c, class.c,
2346 config-lang.in, constants.c,
2347 convert.h, decl.c, except.c,
2348 expr.c, java-except.h,
2349 java-tree.h, javaop.def,
2350 jcf-parse.c, jcf-write.c,
2351 jv-scan.c, jvgenmain.c,
2352 jvspec.c, keyword.gperf,
2353 keyword.h, lang-options.h,
2354 lang-specs.h, lang.c, lex.c,
2355 lex.h, mangle.c, mangle_name.c,
2356 parse-scan.y, parse.h, parse.y,
2357 typeck.c, verify.c, xref.c,
2358 xref.h: Replace "GNU CC" with
2359 "GCC" in the copyright header.
2360
2361 * check-init.c, gjavah.c, javaop.h,
2362 jcf-depend.c, jcf-dump.c, jcf-io.c,
2363 jcf-path.c, jcf-reader.c, jcf.h,
2364 zextract.c, zipfile.h: These files are
2365 "part of GCC". Also say "GCC" not "GNU CC".
2366
2367 2002-12-30 DJ Delorie <dj@redhat.com>
2368
2369 * Make-lang.in: Protect against texi2pod/pod2man failing.
2370
2371 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
2372
2373 * gcj.texi: Use @copying.
2374
2375 2002-12-27 Mark Mitchell <mark@codesourcery.com>
2376
2377 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
2378 print_cxx_classname.
2379 (print_cxx_classname): Add add_scope parameter.
2380 (print_class_decls): Do not emit a semicolon after the extern
2381 "Java" block.
2382 (process_file): Adjust calls to print_cxx_classname.
2383
2384 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
2385
2386 * gcj.texi: Include Cover Texts in man page.
2387
2388 2002-12-23 Jeff Sturm <jsturm@one-point.com>
2389
2390 * class.c (build_static_field_ref): Check FIELD_FINAL.
2391
2392 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
2393 instead of current_constant_pool_data_ref.
2394 * java-tree.h (current_constant_pool_data_ref): Undefine.
2395 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
2396 * jcf-parse.c (init_outgoing_cpool): Don't initialize
2397 current_constant_pool_data_ref.
2398
2399 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
2400 not build_internal_class_name.
2401
2402 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
2403 Use it when class ref isn't certain to be compiled.
2404
2405 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
2406
2407 * gcj.texi: Include gcc-common.texi.
2408 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
2409 $(srcdir)/doc/include/gcc-common.texi.
2410
2411 2002-12-22 Anthony Green <green@redhat.com>
2412
2413 * gcj.texi (Limitations): Add note about org.xml.sax and
2414 org.w3c.dom.
2415
2416 2002-12-20 Tom Tromey <tromey@redhat.com>
2417
2418 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
2419 where minimum case value is Integer.MIN_VALUE.
2420 Fixes PR java/8955.
2421
2422 2002-12-18 Andrew Haley <aph@redhat.com>
2423
2424 * parse.y (patch_invoke): Force evaluation order when `check' is
2425 set. For PR libgcj/8945.
2426
2427 2002-12-16 Mark Mitchell <mark@codesourcery.com>
2428
2429 * gcj.texi: Change version number to 3.4.
2430
2431 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
2432 Andrew Haley <aph@redhat.com>
2433
2434 * parse.y (source_end_java_method): Remove custom encoding of line
2435 numbers for a function decl before passing it to the back end.
2436
2437 2002-12-03 Andrew Haley <aph@redhat.com>
2438
2439 * class.c (make_class_data): New field, "chain".
2440 * decl.c (java_init_decl_processing): Likewise.
2441
2442 2002-12-02 Tom Tromey <tromey@redhat.com>
2443
2444 For PR java/8740:
2445 * parse.y (do_resolve_class): Handle qualified name via
2446 recursion.
2447
2448 2002-11-30 Zack Weinberg <zack@codesourcery.com>
2449
2450 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
2451 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
2452 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
2453 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
2454 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
2455 Include coretypes.h and tm.h.
2456 * Make-lang.in: Update dependencies.
2457
2458 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2459
2460 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
2461
2462 2002-11-25 Diego Novillo <dnovillo@redhat.com>
2463
2464 * jcf-reader.c: Don't expand JCF_readu4 inside the
2465 expansion of JCF_SKIP.
2466
2467 2002-11-25 Diego Novillo <dnovillo@redhat.com>
2468
2469 * jcf-reader.c: Don't expand JCF_readu4 inside the
2470 expansion of JCF_SKIP.
2471
2472 2002-11-22 Tom Tromey <tromey@redhat.com>
2473
2474 * parse.y (patch_binop): Cast right hand side of shift expression
2475 to `int'. Fixes PR java/8676.
2476
2477 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
2478 Andrew Haley <aph@redhat.com>
2479
2480 * gcc/java/jcf-write.c (write_classfile): Remove target
2481 class file, if it exists, before renaming the temporary
2482 class file to it.
2483
2484 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
2485
2486 * jvspec.c (lang_specific_spec_functions): New.
2487
2488 2002-11-18 Tom Tromey <tromey@redhat.com>
2489
2490 Fix for PR java/7912:
2491 * expr.c (can_widen_reference_to): Allow cast of array to
2492 Cloneable or Serializable.
2493 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
2494 (java_io_serializable_identifier_node): Likewise.
2495 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
2496 (valid_ref_assignconv_cast_p): Use new identifier nodes.
2497 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
2498 java_io_serializable.
2499 * decl.c (java_init_decl_processing): Initialize
2500 java_lang_cloneable_identifier_node and
2501 java_io_serializable_identifier_node.
2502 (java_lang_cloneable_identifier_node): New global.
2503 (java_io_serializable_identifier_node): Likewise.
2504
2505 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
2506
2507 * buffer.c: Remove unnecessary casts.
2508 * check-init.c: Likewise.
2509 * class.c: Likewise.
2510 * constants.c: Likewise.
2511 * decl.c: Likewise.
2512 * except.c: Likewise.
2513 * gjavah.c: Likewise.
2514 * jcf-io.c: Likewise.
2515 * jcf-parse.c: Likewise.
2516 * jcf-path.c: Likewise.
2517 * jvspec.c: Likewise.
2518 * lang.c: Likewise.
2519 * lex.c: Likewise.
2520 * verify.c: Likewise.
2521
2522 2002-11-06 Tom Tromey <tromey@redhat.com>
2523
2524 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
2525 a JNI header.
2526
2527 2002-11-05 Tom Tromey <tromey@redhat.com>
2528
2529 Fix for PR java/6388.
2530 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
2531 * java-tree.h (enum java_tree_index): New values
2532 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
2533 (decimal_int_max, decimal_long_max): New defines.
2534 * lex.c (yylex): Rewrote range checking. Sign extend literals.
2535 (error_if_numeric_overflow): Rewrote range checking.
2536 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
2537 decimal_long_max.
2538
2539 2002-11-02 Tom Tromey <tromey@redhat.com>
2540
2541 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
2542
2543 * class.c (make_method_value): Put class name, not signature, into
2544 `throws' field. For PR java/8415.
2545
2546 2002-10-24 Tom Tromey <tromey@redhat.com>
2547
2548 * gcj.texi (Invoking gij): Document --showversion.
2549 (Standard Properties): java.library.path now set.
2550
2551 2002-10-23 Tom Tromey <tromey@redhat.com>
2552
2553 * gjavah.c (decode_signature_piece): In JNI mode, print
2554 `jobjectArray' when array depth is nonzero.
2555 Fixes PR java/8296.
2556
2557 2002-10-15 Andrew Haley <aph@redhat.com>
2558
2559 * parse.y (patch_invoke): Call force_evaluation_order on a static
2560 arg list.
2561 (resolve_qualified_expression_name): Call force_evaluation_order
2562 on a arg list that is part of a Qualified Expression Name.
2563
2564 * lang.c (dump_compound_expr): New.
2565 (java_dump_tree): New.
2566
2567 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
2568
2569 * gcj.texi: Added item describing the GCJ runtime property
2570 "gnu.gcj.progname".
2571
2572 2002-10-15 Richard Henderson <rth@redhat.com>
2573
2574 * jcf-parse.c (get_constant): Fix type warning.
2575
2576 2002-10-15 Andrew Haley <aph@redhat.com>
2577
2578 * java-tree.h (java_inlining_merge_static_initializers): Declare.
2579 (java_inlining_map_static_initializers): Declare.
2580
2581 2002-10-14 Andrew Haley <aph@redhat.com>
2582
2583 * tree-inline.c (remap_block): All local class initialization
2584 flags go in the outermost scope.
2585 (expand_call_inline): Call java_inlining_map_static_initializers.
2586 (expand_call_inline): Call java_inlining_merge_static_initializers.
2587 * java/lang.c (merge_init_test_initialization): New.
2588 (java_inlining_merge_static_initializers): New.
2589 (inline_init_test_initialization): New.
2590 (java_inlining_map_static_initializers): New.
2591
2592 2002-10-11 Mark Wielaard <mark@klomp.org>
2593
2594 * gcj.texi (Compatibility): Add Limitations and Extensions section.
2595
2596 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2597
2598 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
2599
2600 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2601
2602 * parse.y (merge_string_cste): Add parentheses around & within |.
2603
2604 2002-10-08 Tom Tromey <tromey@redhat.com>
2605
2606 * parse.y (variable_declarator_id): Simplify error path for
2607 array declarator error. For PR java/8003.
2608
2609 2002-10-08 Zack Weinberg <zack@codesourcery.com>
2610
2611 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
2612 bug_report_url.
2613
2614 2002-10-08 Andrew Haley <aph@redhat.com>
2615
2616 * parse.y (attach_init_test_initialization_flags): Check for
2617 error_mark_node.
2618
2619 2002-10-07 Anthony Green <green@redhat.com>
2620
2621 * parse.y (merge_string_cste): Fix bug in string concatenation.
2622
2623 2002-10-03 Michael Koch <konqueror@gmx.de>
2624
2625 * gcj.texi (Standard properties):
2626 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
2627
2628 2002-10-02 Roger Sayle <roger@eyesopen.com>
2629
2630 PR optimization/6627
2631 * lang.c (java_init): If storing the vbit in function
2632 pointers, ensure that force_align_functions_log is atleast
2633 one to aid compatability with g++ vtables.
2634
2635 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
2636
2637 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
2638 foul of type-based aliasing.
2639
2640 2002-09-30 Anthony Green <green@redhat.com>
2641
2642 * gcj.texi (Invoking jv-scan): Fix texinfo.
2643
2644 2002-09-28 Anthony Green <green@redhat.com>
2645
2646 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
2647 (Code Generation): Add -fno-assert documentation.
2648 * jv-scan.c (flag_assert): New global.
2649 (options): Add assert option.
2650 (help): Add --no-assert documentation.
2651 * parse-scan.y (flag_assert): New global.
2652 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
2653 (flag_assert): New global.
2654 * java-tree.h (flag_assert): New global.
2655 * lex.c (java_lex): Obey flag_assert.
2656 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
2657 calling cc1.
2658
2659 2002-09-26 Andrew Haley <aph@redhat.com>
2660
2661 * expr.c (build_java_array_length_access): Check for null pointer.
2662 * expr.c (expand_java_arrayload): Likewise.
2663
2664 2002-09-21 Richard Henderson <rth@redhat.com>
2665
2666 * jcf-parse.c (get_constant): Decode from IEEE no matter
2667 what the target format.
2668
2669 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
2670
2671 * ChangeLog: Follow spelling conventions.
2672 * class.c: Likewise.
2673 * decl.c: Likewise.
2674 * expr.c: Likewise.
2675 * gjavah.c: Likewise.
2676 * java-tree.h: Likewise.
2677 * jcf-dump.c: Likewise.
2678 * jcf-parse.c: Likewise.
2679 * jvspec.c: Likewise.
2680 * lang.c: Likewise.
2681 * mangle.c: Likewise.
2682 * parse.y: Likewise.
2683
2684 2002-09-17 Tom Tromey <tromey@redhat.com>
2685
2686 * lex.c (java_read_unicode_collapsing_terminators): Handle case
2687 where \r appears at EOF. Fixes PR java/7950.
2688
2689 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2690
2691 * jvspec.c (lang_specific_driver): Remove unused variable.
2692
2693 2002-09-16 Geoffrey Keating <geoffk@apple.com>
2694
2695 * java-tree.h (union lang_tree_node): Add chain_next option.
2696
2697 2002-09-16 Richard Henderson <rth@redhat.com>
2698
2699 * jcf-parse.c (get_constant): Runtime check for IEEE format;
2700 use new real.h interface.
2701 * jcf-write.c (find_constant_index): Use new real.h interface.
2702 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
2703
2704 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
2705
2706 * lang.c: Follow spelling conventions.
2707
2708 2002-09-11 Per Bothner <per@bothner.com>
2709
2710 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
2711 constant to the type of the field.
2712 (java_complete_tree): Remove now-redundant code.
2713
2714 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
2715
2716 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
2717
2718 For PR java/5794:
2719 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
2720 return label if a ret instruction for the jsr has been reached.
2721
2722 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
2723
2724 * parse.y (DIR_SEPARATOR): Don't define.
2725 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
2726
2727 2002-08-28 Andrew Haley <aph@redhat.com>
2728
2729 * verify.c (verify_jvm_instructions): Allow exception handler
2730 inside code that is being protected, but generate a warning.
2731 * except.c (link_handler): Initialize `expanded' in new eh_range.
2732 (binding_depth, is_class_level, current_pc): Declare extern.
2733
2734 2002-09-01 Mark Wielaard <mark@klomp.org>
2735
2736 * gcj.texi: Add chapter about system properties.
2737 Fixed some typos.
2738
2739 2002-08-26 Tom Tromey <tromey@redhat.com>
2740
2741 * parse.y (try_builtin_assignconv): Allow narrowing primitive
2742 conversion if RHS_TYPE is byte, short, or char.
2743
2744 2002-08-22 Tom Tromey <tromey@redhat.com>
2745
2746 * gcj.texi (Invoking gij): Document -cp and -classpath.
2747
2748 2002-08-21 Tom Tromey <tromey@redhat.com>
2749
2750 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
2751 $(prefix)/share. For PR libgcj/7633.
2752
2753 For PR java/6005 and PR java/7611:
2754 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
2755 (java_can_use_bit_fields_p): New function.
2756
2757 2002-08-16 Tom Tromey <tromey@redhat.com>
2758
2759 * gcj.texi (Class Initialization): Mention class initialization of
2760 arrays.
2761
2762 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
2763
2764 * Make-lang.in (java-tree-inline.o): New.
2765 (JAVA_OBJS): Add java-tree-inline.o.
2766 * parse.y (source_end_java_method): Call java_optimize_inline.
2767 (java_expand_method_bodies): Save method's tree in
2768 DECL_SAVED_TREE.
2769 (add_stmt_to_compound): Keep track of the number of statments.
2770 * lang.c (java_init): Enable flag_inline_trees.
2771 (java_post_options): If flag_inline_functions is on, enable
2772 flag_inline_trees instread.
2773 (decl_constant_value): New.
2774 (java_tree_inlining_walk_subtrees): New.
2775 * java-tree.h (DECL_NUM_STMTS): New macro.
2776 (java_optimize_inline): Declare.
2777 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
2778 Handle a LABEL_EXPR.
2779 * decl.c (build_result_decl): If we already have a DECL_RESULT
2780 don't make another.
2781 (dump_function): New.
2782 (java_optimize_inline): New.
2783 (dump_function): New.
2784
2785 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
2786
2787 For PR java/7483:
2788 * parse.y (build_assertion): Invert return from
2789 desiredAssertionStatus.
2790
2791 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2792
2793 * jcf-write.c (get_access_flags): Return correct access flags for
2794 private and protected inner classes.
2795
2796 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
2797
2798 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
2799
2800 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
2801
2802 * mangle_name.c: Don't include obstack.h twice.
2803 * xref.c: Don't include obstack.h.
2804
2805 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
2806
2807 * class.c: (permanent_obstack): Delete declaration.
2808 * constants.c: (permanent_obstack): Delete declaration.
2809 * except.c: (permanent_obstack): Delete declaration.
2810 * expr.c: (permanent_obstack): Delete declaration.
2811 * jcf-parse.c: (permanent_obstack): Delete declaration.
2812 (saveable_obstack): Delete declaration.
2813 * parse.h: (permanent_obstack): Delete declaration.
2814 * typeck.c: (permanent_obstack): Delete declaration.
2815
2816 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
2817
2818 * gcj.texi (version-gcc): Increase to 3.3.
2819
2820 2002-07-22 Tom Tromey <tromey@redhat.com>
2821
2822 * lex.c (java_lex): Check for `e' or `E' after 0.
2823
2824 2002-07-21 Richard Henderson <rth@redhat.com>
2825
2826 * lang.c (java_unsafe_for_reeval): New.
2827 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
2828
2829 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
2830
2831 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
2832 (jcf_path_init): Use GET_ENVIRONMENT.
2833
2834 2002-07-10 Roger Sayle <roger@eyesopen.com>
2835 Zack Weinberg <zack@codesourcery.com>
2836
2837 * builtins.c (initialize_builtins): Remove defines that
2838 handled C/C++ specific junk hereby removed from builtins.def.
2839
2840 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
2841
2842 * lang.c (java_post_options): Update prototype.
2843
2844 2002-07-05 Roger Sayle <roger@eyesopen.com>
2845
2846 * builtins.c (initialize_builtins): Ignore the additional
2847 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
2848 the builtins.def file.
2849
2850 2002-07-01 Tom Tromey <tromey@redhat.com>
2851
2852 For PR libgcj/7073:
2853 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
2854 specially.
2855
2856 2002-07-01 Roger Sayle <roger@eyesopen.com>
2857
2858 * java/decl.c (builtin_function): Accept additional parameter.
2859 (java_init_decl_processing): Pass an additional NULL_TREE
2860 argument to builtin_function.
2861
2862 2002-06-29 T.J. Mather <tjmather@maxmind.com>
2863
2864 * gcj.texi: Fixed gcj invocation example so that it compiles.
2865
2866 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2867
2868 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
2869 * parse.y (mark_parser_ctxt): Likewise.
2870 (check_modifiers, declare_local_variables): Avoid incorrect
2871 hardcoded constant 10.
2872
2873 * lex.c (java_read_char): Avoid "comparison is always true"
2874 warning.
2875
2876 2002-06-25 Andreas Schwab <schwab@suse.de>
2877
2878 * expr.c (JSR): Avoid undefined operation on PC.
2879
2880 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2881
2882 * decl.c (clear_binding_level): Const-ify.
2883
2884 2002-06-13 Akim Demaille <akim@epita.fr>
2885
2886 * parse.y (class_declaration, interface_declaration): Make sure
2887 all their rules have an action, in order to avoid meaningless `$$
2888 = $1' and their type clashes.
2889
2890 2002-06-11 Tom Tromey <tromey@redhat.com>
2891
2892 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
2893 * parse-scan.y (statement_without_trailing_substatement): Added
2894 assert_statement.
2895 (assert_statement): New rule.
2896 * java-tree.h (struct lang_type) [assertions]: New field.
2897 (TYPE_USES_ASSERTIONS): New macro.
2898 (CLASS_USES_ASSERTIONS): Likewise.
2899 (FIELD_SYNTHETIC): New define.
2900 * lex.c (java_lval;): Added ASSERT_TK.
2901 * parse.y (ASSERT_TK): Added.
2902 (statement_without_trailing_substatement): Added assert_statement.
2903 (assert_statement): New rule.
2904 (build_assertion): New function.
2905 (maybe_generate_pre_expand_clinit): Create and initialize
2906 $assertionsDisabled.
2907 (lookup_package_type): Removed decl.
2908 * keyword.h: Rebuilt.
2909 * keyword.gperf (assert): New token.
2910
2911 2002-06-10 Akim Demaille <akim@epita.fr>
2912
2913 * parse.y (interface_type_list, class_member_declaration)
2914 (unary_expression_not_plus_minus): Remove duplicate %type.
2915 Whitespace changes.
2916
2917 2002-06-09 Tom Tromey <tromey@redhat.com>
2918
2919 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
2920
2921 * parse.y (method_header): Give error message in all cases.
2922 Fixes PR java/6865.
2923
2924 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2925
2926 Don't use RTL inlining. Fix for PR java/6820.
2927 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
2928 (flag_really_inline): New.
2929 (java_decode_option): Set flag_really_inline if -finline-functions
2930 is seen.
2931 (java_post_options): New function. Turn off inlining unless
2932 flag_really_inline is set.
2933
2934 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2935
2936 * gjavah.c (throwable_p): Accept argument as either a classname or
2937 signature fragment. Create null-terminated classname string for super
2938 when calling itself recursively.
2939 (decode_signature_piece): Skip first character from class name
2940 signature when calling throwable_p.
2941
2942 2002-06-08 H.J. Lu (hjl@gnu.org)
2943
2944 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
2945
2946 2002-06-04 Tom Tromey <tromey@redhat.com>
2947
2948 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
2949
2950 2002-06-04 Michael Koch <konqueror@gmx.de>
2951
2952 * gcj.texi (Input Options): Fixed typo.
2953
2954 2002-06-04 Zack Weinberg <zack@codesourcery.com>
2955
2956 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
2957 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
2958 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
2959 and all now-pointless local variables. Rename other local
2960 variables to reflect their not being handles.
2961
2962 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
2963 #if JCF_USE_STDIO blocks.
2964
2965 * parse.y: Add missing semicolon at end of rule.
2966
2967 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
2968
2969 * check-init.c (attach_initialized_static_class): Delete, unused.
2970 * parse.y: Use htab_t instead of struct hashtable, update
2971 all uses.
2972 * java-tree.h: Include hashtab.h instead of hash.h.
2973 (struct lang_decl_func): Use htab_t, set up for gengtype.
2974 (struct init_test_hash_entry): Delete.
2975 (struct treetreehash_entry): New.
2976 (java_treetreehash_find): New
2977 (java_treetreehash_new): New prototype.
2978 (java_treetreehash_create): New prototype.
2979 (java_mark_tree): Delete prototype.
2980 (java_hash_hash_tree_node): Delete prototype.
2981 (java_hash_compare_tree_node): Delete prototype.
2982 (attach_initialized_static_class): Delete prototype.
2983 * expr.c (build_class_init): Update to use java_treetreehash
2984 functions.
2985 (java_expand_expr): Update to use htab_t.
2986 (emit_init_test_initialization): Likewise.
2987 * decl.c (java_mark_tree): Delete.
2988 * class.c (init_test_hash_newfunc): Delete.
2989 (java_hash_hash_tree_node): Delete.
2990 (java_hash_compare_tree_node): Delete.
2991 (add_method_1): Update to use java_treetreehash functions.
2992 (JAVA_TREEHASHHASH_H): New macro.
2993 (java_treetreehash_hash): New function.
2994 (java_treetreehash_compare): New function.
2995 (java_treetreehash_find): New function.
2996 (java_treetreehash_new): New function.
2997 (java_treetreehash_create): New function.
2998 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
2999
3000 * Make-lang.in (java/parse.o): Depend on debug.h.
3001 * java-tree.h (struct lang_identifier): Use gengtype.
3002 (union lang_tree_node): New.
3003 (struct lang_decl_func): Use gengtype.
3004 (struct lang_decl_var): Likewise.
3005 (struct lang_decl): Likewise.
3006 * parse.y: Include debug.h.
3007 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
3008
3009 * lang.c (struct language_function): New dummy structure.
3010
3011 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
3012 descriminator for DECL_LANG_SPECIFIC.
3013 (struct lang_decl_func): Rename from struct lang_decl.
3014 (enum lang_decl_desc): New.
3015 (struct lang_decl): Make it a union. Update all the accessor macros.
3016 (struct lang_type): Use gengtype.
3017 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
3018 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
3019 are now the same size.
3020 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
3021 use discriminator to mark DECL_LANG_SPECIFIC.
3022
3023 * Make-lang.in (gt-java-builtins.h): New rule.
3024 (java/builtins.o): Add dependency on gt-<filename>.h.
3025 * builtins.c: Use gengtype for roots.
3026 (union string_or_tree): Use gengtype.
3027 (struct builtin_record): Use gengtype.
3028 * config-lang.in (gtfiles): Add builtins.c.
3029
3030 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
3031 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
3032 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
3033 gt-java-parse.h, gtype-java.h): Add rules to generate.
3034 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
3035 (class.o): Add dependency on gt-*.h.
3036 (constants.o): Likewise.
3037 (decl.o): Likewise.
3038 (expr.o): Likewise.
3039 (jcf-parse.o): Likewise.
3040 (jcf-write.o): Likewise.
3041 (lang.o): Likewise.
3042 * config-lang.in (gtfiles): New.
3043 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3044 * constants.c: Replace uses of ggc_add_* with GTY markers.
3045 Include gt-*.h.
3046 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3047 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3048 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
3049 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
3050 Include gt-*.h.
3051 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
3052 Include gt-*.h.
3053 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3054 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
3055 gt-*.h.
3056 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
3057 Include gtype-java.h.
3058
3059 2002-06-02 Tom Tromey <tromey@redhat.com>
3060
3061 Fix for PR java/5913:
3062 * parse.y (patch_binop): Call patch_string on op1.
3063
3064 2002-06-02 Tom Tromey <tromey@redhat.com>
3065
3066 Fix for PR java/1343, PR java/6336:
3067 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
3068 formatting. Changed return type.
3069 (anonymous_class_counter): Moved to top of file.
3070 (maybe_make_nested_class_name): Append number to class name for
3071 function-local classes.
3072
3073 2002-05-28 Zack Weinberg <zack@codesourcery.com>
3074
3075 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
3076 * Make-lang.in: Update dependency lists.
3077
3078 2002-05-18 Mark Mitchell <mark@codesourcery.com>
3079
3080 * gjavah.c (throwable_p): Do not free the name of the class after
3081 passing it to find_class.
3082 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
3083 * jcf-io.c (dirent.h): Include it.
3084 (fnmatch.h): Likewise.
3085 (compare_path): New function.
3086 (java_or_class_file): Likewise.
3087 (memoized_dirlist_entry): New type.
3088 (memoized_dirlist_lookup_eq): New function.
3089 (memoized_dirlists): New variable.
3090 (caching_stat): New function.
3091 (memoized_class_lookup_eq): New function.
3092 (memoized_class_lookups): Likewise.
3093 (find_class): Use memoized_class_lookups and caching_stat.
3094 * jcf.h (JCF_USE_SCANDIR): Define.
3095 * parse.y (java_expand_classes): Write the class files in reverse
3096 order.
3097
3098 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3099
3100 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
3101
3102 2002-05-13 Mark Mitchell <mark@codesourcery.com>
3103
3104 * jcf-write.c (write_classfile): Unlink the temporary file if it
3105 cannot be renamed. Use concat to build up the name of the
3106 temporary file.
3107
3108 2002-05-08 Mark Mitchell <mark@codesourcery.com>
3109
3110 * jcf-write.c (write_classfile): Write the file to a
3111 temporary file and then rename it.
3112
3113 2002-05-07 Tom Tromey <tromey@redhat.com>
3114
3115 * gjavah.c (throwable_p): Use xstrdup, not strdup.
3116
3117 Fix for PR java/1200:
3118 * gjavah.c (throwable_p): New function.
3119 (decode_signature_piece): Use it. A `WeakReference' isn't the
3120 same as a `jweak'.
3121 Include hashtab.h.
3122 (gcjh_streq): New function.
3123
3124 2002-05-07 Andreas Jaeger <aj@suse.de>
3125
3126 * parse.y (finish_for_loop): Fix if statement.
3127
3128 2002-05-06 Tom Tromey <tromey@redhat.com>
3129
3130 Fix for PR java/5941:
3131 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
3132 loop update expression.
3133 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
3134 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
3135
3136 2002-05-04 Mark Wielaard <mark@klomp.org>
3137
3138 For PR java/6519:
3139 * parse.y (build_string_concatenation): Return just op1 only when op2
3140 is null and op1 is a STRING_CST, otherwise always construct a
3141 StringBuffer.
3142
3143 2002-04-27 Tom Tromey <tromey@redhat.com>
3144
3145 For PR java/6382:
3146 * parse.y (string_convert_int_cst): New function.
3147 (merge_string_cste): Use it.
3148
3149 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
3150
3151 * java-tree.h (java_parse_file): Update.
3152 (java_set_yydebug): Remove.
3153 * jcf-parse.c (yydebug): Remove.
3154 (java_set_yydebug): Die.
3155 (java_parse_file): Update.
3156 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
3157
3158 2002-04-24 Tom Tromey <tromey@redhat.com>
3159
3160 For PR java/6425:
3161 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
3162 EXPR_WFL_QUALIFICATION of qual_wfl.
3163
3164 2002-04-23 Per Bothner <per@bothner.com>
3165
3166 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
3167 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
3168 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
3169
3170 2002-04-23 Tom Tromey <tromey@redhat.com>
3171
3172 For PR java/6314:
3173 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
3174 recognize `-fcompile-resource='.
3175 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
3176 a bit.
3177
3178 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
3179
3180 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
3181 paths. Fixes PR java/2791.
3182
3183 2002-04-19 Andrew Haley <aph@redhat.com>
3184
3185 * jcf-write.c (push_long_const): lo, hi: New variables.
3186 Use rshift_double to extract the high part of a 64-bit long.
3187 Use WORD_TO_INT to extract the low part.
3188
3189 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
3190 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
3191 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
3192
3193 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
3194
3195 * typeck.c (incomplete_type_error): Remove.
3196
3197 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3198
3199 * class.c (make_class_data): Set DECL_ALIGN on static class data,
3200 for hash synchronization.
3201 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
3202 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
3203 class_type_node.
3204
3205 2002-04-16 Mark Wielaard <mark@klomp.org>
3206
3207 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
3208 negative zero.
3209
3210 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3211
3212 Fix for PR java/6294:
3213 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
3214 interfaces.
3215
3216 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3217
3218 Fix for PR java/6085:
3219 * parse.y (patch_method_invocation): Always use build_access_to_thisn
3220 to get enclosing "this" argument for inner-class constructor
3221 invocation. Pass correct arguments to build_access_to_thisn.
3222
3223 2002-04-10 Andreas Jaeger <aj@suse.de>
3224
3225 * gcj.texi (Input Options): Fix extdirs patch.
3226
3227 2002-04-10 Anthony Green <green@redhat.com>
3228
3229 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
3230
3231 2002-04-09 Anthony Green <green@redhat.com>
3232
3233 * gcj.texi (Input Options): Add --extdirs documentation.
3234 * jcf-dump.c (OPT_extdirs): New macro.
3235 (options): Add extdirs option.
3236 (help): Describe --extdirs.
3237 (main): Handle OPT_extdirs.
3238 * gjavah.c (OPT_extdirs): New macro.
3239 (options): Add extdirs option.
3240 (help): Describe --extdirs.
3241 (main): Handle OPT_extdirs.
3242 * jcf-path.c (jcf_path_init): Add extdirs support.
3243 (jcf_path_extdirs_arg): New function.
3244 (extensions): New variable to hold extensions path entries.
3245 * jvspec.c: Remove -fextdirs= when compiling main().
3246 * lang.c (java_decode_option): Handle -fextdirs=.
3247 * jcf.h (jcf_path_extdirs_arg): Declare new function.
3248 * Make-lang.in: Compile jcf-path with version info for use in
3249 identifying the appropriate libgcj.jar.
3250
3251 2002-04-08 Tom Tromey <tromey@redhat.com>
3252
3253 For PR libgcj/5303:
3254 * .cvsignore: Added rmic.1 and rmiregistry.1.
3255 * gcj.texi (Top): Link to new nodes.
3256 (Invoking rmic): New node.
3257 (Invoking rmiregistry): Likewise.
3258 * Make-lang.in (java.generated-manpages): Added rmic.1 and
3259 rmiregistry.1.
3260 (java.maintainer-clean): Likewise.
3261 ($(srcdir)/java/rmic.1): New target.
3262 ($(srcdir)/java/rmiregistry.1): Likewise.
3263 (java.install-man): Handle rmic.1 and rmiregistry.1.
3264
3265 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3266
3267 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
3268 Add note about handling uncaught exceptions. Add an exception handler
3269 to example.
3270
3271 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3272
3273 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
3274 after using it to patch CALL_EXPR.
3275
3276 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3277
3278 * gcj.texi (Invocation): Document CNI invocation API.
3279
3280 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
3281
3282 * expr.c (truthvalue_conversion): Rename. Update.
3283 (expand_compare): Update.
3284 * java-tree.h (java_truthvalue_conversion): New.
3285 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
3286
3287 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
3288
3289 * java-tree.h (java_mark_addressable): New.
3290 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
3291 * typeck.c (mark_addressable): Rename, update.
3292
3293 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
3294
3295 * expr.c (build_java_binop): Update.
3296 * java-tree.h (java_signed_type, java_unsigned_type,
3297 java_signed_or_unsigned_type): Update.
3298 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3299 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
3300 * parse.y (patch_binop): Update.
3301 * typeck.c (signed_or_unsigned_type, unsigned_type,
3302 signed_type): Update.
3303
3304 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
3305
3306 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
3307 (java_dummy_print): Remove.
3308 (lang_print_error): Rename. Exit early if inhibiting output.
3309 (inhibit_error_printing_function): New.
3310 (java_init): Don't set hook.
3311 (lang_init_source): Use new boolean.
3312
3313 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
3314
3315 * parse.y (do_resolve_class): Fix infinite recursion.
3316
3317 2002-03-29 Tom Tromey <tromey@redhat.com>
3318
3319 * parse.y (check_inner_circular_reference): Ignore incomplete
3320 types.
3321
3322 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
3323
3324 * Make-lang.in (builtins.o): Update.
3325 * boehm.c (get_boehm_type_descriptor): Update.
3326 * builtins.c: Include langhooks.h.
3327 * decl.c (java_init_decl_processing): Update.
3328 * java-tree.h (java_type_for_mode, java_type_for_size): New.
3329 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
3330 Redefine.
3331 * typeck.c (type_for_mode, type_for_size): Update.
3332
3333 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
3334
3335 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
3336
3337 2002-03-28 Tom Tromey <tromey@redhat.com>
3338
3339 * except.c (expand_end_java_handler): If the handler type is NULL,
3340 use java.lang.Throwable. Fixes PR java/5986.
3341
3342 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
3343
3344 Fix for PR java/4715:
3345 * jcf-parse.c (parse_source_file_3): New function.
3346 (read_class): Call it.
3347 (java_parse_file): Likewise.
3348
3349 2002-03-28 Jan Hubicka <jh@suse.cz>
3350
3351 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
3352
3353 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3354
3355 * parse.y (resolve_package): Initialize "decl".
3356 (lookup_package_type): Remove unused function.
3357
3358 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3359
3360 Fix for PR java/5993:
3361 * parse.y (resolve_package): Return the decl if resolution was
3362 successful. Don't special case "java.lang" and "java.lang.reflect"
3363 packages. Set type_name to the merged identifier.
3364 (resolved_qualified_expression_name): Print error using "name" if
3365 resolve_package returns NULL_TREE.
3366
3367 2002-03-27 Tom Tromey <tromey@redhat.com>
3368
3369 * expr.c (expand_invoke): Don't generate null pointer check if
3370 we're calling <init>.
3371
3372 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
3373
3374 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
3375 fix prototype.
3376 * java-tree.h (java_lang_expand_expr): Similarly.
3377 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
3378 (java_init): Don't set hook.
3379
3380 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3381
3382 Fix for PR java/5850:
3383 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
3384 context if field was not found in the current scope.
3385 * expr.c (lookup_field): Don't look in enclosing contexts.
3386
3387 2002-03-26 Tom Tromey <tromey@redhat.com>
3388
3389 Fix for PR java/5942:
3390 * parse.y (init_src_parse): Added sanity check.
3391 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
3392 elements, not 11.
3393
3394 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
3395
3396 * decl.c (lang_mark_tree): Rename java_mark_tree.
3397 * java-tree.h (java_mark_tree): New.
3398 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
3399
3400 2002-03-25 Zack Weinberg <zack@codesourcery.com>
3401
3402 * lex.c: Change java_perform_atof to take normal parameters
3403 instead of a pointer to a parameter block. Call it directly
3404 from java_lex.
3405
3406 2002-03-22 Mark Wielaard <mark@klomp.org>
3407
3408 Fix for PR java/5368:
3409 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
3410 when printing error message.
3411
3412 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
3413
3414 * decl.c (maybe_build_cleanup): Remove.
3415
3416 2002-03-22 Tom Tromey <tromey@redhat.com>
3417
3418 Andrew Haley <aph@cambridge.redhat.com>
3419
3420 * expr.c (build_field_ref): Don't build a check if the field is a
3421 member of `this'.
3422
3423 2002-03-21 Eric Blake <ebb9@email.byu.edu>
3424
3425 Fix for PR java/6026:
3426 * lex.c (java_lex): Fix parsing of consecutive floats.
3427
3428 2002-03-21 Tom Tromey <tromey@redhat.com>
3429
3430 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
3431 class.
3432
3433 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
3434
3435 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
3436 insert_block, getdecls, kept_level_p, global_bindings_p): New.
3437
3438 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
3439
3440 * gcj.texi: @code{gcj} becomes @command{gcj}.
3441 @code{gcc} becomes @command{gcc}.
3442 GcjRaw changed to gnu.gcc.RawData.
3443
3444 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
3445
3446 * decl.c (start_java_method): Use new hook.
3447 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
3448 (java_init): Remove old hook.
3449
3450 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
3451
3452 * builtins.c (define_builtin): Do nothing if `type' is null.
3453 Fixes PR java/5876.
3454
3455 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3456
3457 * parse.y (parser_check_super_interface): Fix error message
3458 grammar/order.
3459
3460 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3461
3462 * jcf-parse.c (get_constant): Delete unused variables.
3463
3464 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
3465
3466 * java-tree.h (java_parse_file): New.
3467 * jcf-parse.c (yyparse): Rename java_parse_file.
3468 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
3469
3470 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3471
3472 * parse.y (craft_constructor): Return the constructor decl.
3473 (java_expand_classes): Update comments.
3474 (lookup_method_invoke): Call fix_constructors immediately for
3475 anonymous class. Fixes PR java/5935.
3476
3477 2002-03-15 Anthony Green <green@redhat.com>
3478
3479 * jcf-parse.c (yyparse): Don't emit class registration
3480 constructor when compiling resource files.
3481
3482 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3483
3484 * lang.c (java_tree_code_type, java_tree_code_length,
3485 tree_code_name): Delete.
3486 (tree_code_type, tree_code_length, tree_code_name): Define.
3487 (java_init): Don't try to copy into the various tree_code
3488 arrays.
3489
3490 2002-03-12 Tom Tromey <tromey@redhat.com>
3491
3492 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
3493 UTF-8, not UCS-2. Fixes PR java/5923.
3494
3495 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
3496 a call_expr wrapped in a convert. Fixes PR java/5848.
3497
3498 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3499
3500 * jcf-write.c (write_classfile): Improve error strings.
3501
3502 2002-03-11 Eric Blake <ebb9@email.byu.edu>
3503
3504 * lex.c: Adjust comments to GNU standards.
3505
3506 2002-03-11 Eric Blake <ebb9@email.byu.edu>
3507
3508 Fix for PR java/5902:
3509 * lex.c (java_lex): Fix parsing of literals.
3510
3511 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3512
3513 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
3514 to prevent it getting evaluated twice in the store checking case.
3515 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
3516 examining OBJECT.
3517
3518 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3519
3520 * decl.c (java_init_decl_processing): Make sure class_type_node
3521 alignment is not less than 64 bits if hash synchronization is enabled.
3522
3523 2002-03-08 Per Bothner <per@bothner.com>
3524
3525 * parse.y (java_complete_lhs): Check if patch_assignment
3526 returned an error-mark.
3527
3528 * parse.y (try_builtin_assignconv): Don't special-case zero.
3529
3530 2002-03-08 Per Bothner <per@bothner.com>
3531
3532 Fix for PR java/5812.
3533 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
3534 here instead of in JSR macro. Likewise with load_type_state call.
3535 Do the latter on if the return_pc has been verified (the jsr returns).
3536 (JSR): Now just call build_java_jsr.
3537
3538 2002-03-07 Jeff Sturm <jsturm@one-point.com>
3539
3540 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
3541 (java.install-common): Link native driver to
3542 JAVA_TARGET_INSTALL_NAME.
3543
3544 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
3545
3546 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
3547 * builtins.c(sin_builtin): Likewise
3548 * builtins.c(sqrt_builtin): Likewise
3549
3550 2002-03-03 Zack Weinberg <zack@codesourcery.com>
3551
3552 * java/expr.c, java/jcf-parse.c, java/lex.c:
3553 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
3554 REAL_ARITHMETIC blocks unconditional. Delete some further
3555 #ifdef blocks predicated on REAL_ARITHMETIC.
3556
3557 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3558
3559 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
3560 explicit sizeof/sizeof.
3561 * decl.c (java_init_decl_processing): Likewise.
3562 * jcf-parse.c (init_jcf_parse): Likewise.
3563 * parse.y (init_src_parse): Likewise.
3564
3565 2002-03-02 Per Bothner <per@bothner.com>
3566
3567 Make --CLASSPATH by a synonym for --classpath and -classpath.
3568 Implement --bootclasspath.
3569 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
3570 (classpath_l): Remove.
3571 (jcf_path_CLASSPATH_arg): Remove.
3572 (jcf_path_bootclasspath_arg): New function.
3573 (jcf_path_seal): Simplify accordingly.
3574
3575 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
3576 (jcf_path_CLASSPATH): Remove declaration.
3577 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
3578 (lang_specific_driver): Translate -bootclasspath.
3579 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
3580 * lang.c (decode_lang_options): Do jcf_path_init first.
3581 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
3582 * gjavah.c: Also handle --bootclasspath.
3583 Handle --CLASSPATH as a synonum for --classpath.
3584 * jcf-dump.c: Likewise.
3585
3586 "." is not part of system path, but is the default for --classpath.
3587 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
3588 (jcf_path_seal): Add "." if no CLASSPATH specified.
3589
3590 * gcj.texi: Document changes.
3591
3592 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3593
3594 * expr.c (build_java_arraystore_check): Fix formatting.
3595
3596 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
3597
3598 Fix for PR java/5758, java/5632:
3599 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
3600 inner-class separator too.
3601 * parse.y (do_resolve_class): New local `decl_result.'
3602 Progressively build a name for what can have been loaded.
3603
3604 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3605
3606 * expr.c (java_array_data_offset): Removed function.
3607 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
3608 (build_java_array_length_access): Obtain "length" value using a
3609 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
3610 (build_java_arrayaccess): Correct comment. Access "data" using a
3611 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
3612 (build_java_arraystore_check): New function.
3613 (expand_java_arraystore): Use build_java_arraystore_check.
3614 * parse.y (patch_assignment): Simplify code to insert a store check
3615 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
3616 * check-init.c (check_init): Update to reflect that an array length
3617 access is now a COMPONENT_REF.
3618 * gcj.texi (Code Generation): Improve documentation of
3619 -fno-bounds-check. Add documentation for -fno-store-check.
3620 * java-tree.h (flag_store_check): Declare.
3621 (build_java_arraystore_check): Declare.
3622 * lang.c (flag_store_check): Initialize to 1.
3623 (lang_f_options): Add store-check option.
3624 * jvspec.c: Don't pass store-check option to jvgenmain.
3625 * lang-options.h: Add help string for -fno-store-check.
3626
3627 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
3628
3629 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
3630 * java-tree.h (java_dup_lang_specific_decl): New.
3631 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
3632
3633 2002-02-27 Zack Weinberg <zack@codesourcery.com>
3634
3635 * builtins.c, decl.c: Delete traditional-mode-related code
3636 copied from the C front end but not used, or used only to
3637 permit the compiler to link.
3638
3639 2002-02-22 Tom Tromey <tromey@redhat.com>
3640
3641 Fix for PR java/2369:
3642 * jvspec.c (verify_class_name): New function.
3643 (lang_specific_driver): Call it.
3644 (JAVA_START_CHAR_P): New macro.
3645 (JAVA_PART_CHAR_P): Likewise.
3646
3647 2002-02-22 Per Bothner <per@bothner.com>
3648
3649 * class.c: Change vtable to be more compatible with g++ v3 abi.
3650 (get_dispatch_table): Prepend offset-to-top (always 0) and
3651 type_info pointer (currently unimplemented hence NULL) to vtable.
3652 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
3653 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
3654 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
3655 (build_dtable_decl): Add declarations for new fields.
3656
3657 2002-02-20 Per Bothner <per@bothner.com>
3658
3659 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
3660 to finit$ (otherwise generate_bytecode_insns drops it). However, we
3661 don't need to set it on the COMPOUND_EXPR - the caller does that.
3662
3663 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
3664
3665 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
3666 `--CLASSPATH' becomes `--classpath.'
3667 * gjavah.c: Likewise.
3668 * jcf-dump.c: Likewise.
3669 * lang-options.h: Likewise.
3670 * lang.c: Likewise.
3671 * jcf-path.c: Updated comment.
3672 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
3673 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
3674 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
3675 (jcf_path_CLASSPATH_arg): Ditto.
3676 (classpath_u): Updated leading comment.
3677
3678 2002-02-20 Per Bothner <per@bothner.com>
3679
3680 * builtins.c (check_for_builtin): New function.
3681 (build_call_or_builtin): Remove.
3682 * java-tree.h: Update accordingly.
3683 * expr.c (expand_invoke): Use build + check_for_builtin instead
3684 of build_call_or_builtin.
3685 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
3686 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
3687 flag (which had caused jcf-write to incorrectly emit invokevirtual).
3688
3689 2002-02-17 Tom Tromey <tromey@redhat.com>
3690
3691 * java-tree.h (TYPE_STRICTFP): New macro.
3692 (struct lang_type) [strictfp]: New field.
3693 (CLASS_STRICTFP): New macro.
3694 (METHOD_STRICTFP): New macro.
3695 (struct lang_decl) [strictfp]: New field.
3696 * parse.y (method_header): Disallow strictfp constructor or
3697 abstract method.
3698 (STRICT_TK): Move before MODIFIER_TK.
3699 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
3700 (METHOD_MODIFIERS): Likewise.
3701 (INTERFACE_MODIFIERS): Likewise.
3702 * jcf-write.c (get_access_flags): Likewise.
3703 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
3704 (add_method_1): Likewise.
3705 (get_access_flags_from_decl): Likewise.
3706 * jcf-dump.c (print_access_flags): Print in standard order. Also,
3707 recognize strictfp flag.
3708 * jcf.h (ACC_STRICT): New define.
3709
3710 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
3711
3712 * class.c(build_utf8_ref): Move declaration of decl_size
3713
3714 2002-02-07 Tom Tromey <tromey@redhat.com>
3715
3716 * gcj.texi (Input Options): --CLASSPATH does not suppress system
3717 path.
3718
3719 2002-02-04 Anthony Green <green@redhat.com>
3720
3721 * class.c (build_utf8_ref): Put UTF-8 constants into merged
3722 sections if available.
3723
3724 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3725
3726 * parse.y (java_expand_classes): Fix typo in static field loop.
3727
3728 2002-02-02 Richard Henderson <rth@redhat.com>
3729
3730 * class.c (add_field): Mark static fields external.
3731 (build_class_ref): Remove redundant set.
3732 * parse.y (java_expand_classes): Mark static fields of classes
3733 to be compiled as local.
3734 * jcf-parse.c (parse_class_file): Likewise.
3735
3736 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
3737
3738 * gcj.texi (About CNI): New node.
3739
3740 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
3741
3742 PR java/5080
3743 * jcf-parse.c : Check for HAVE_LOCALE_H before using
3744 setlocale() with LC_CTYPE as a parameter.
3745 * jv-scan.c: Same.
3746
3747 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
3748
3749 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
3750 Follow GNU Coding Standards for --version.
3751
3752 2002-01-28 Tom Tromey <tromey@redhat.com>
3753
3754 * expr.c (build_jni_stub): Ensure storage for `meth' is
3755 generated.
3756 * parse.y (java_complete_expand_methods): Set
3757 current_function_decl before building JNI stub.
3758
3759 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
3760
3761 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
3762 BUILT_IN_SQRTF.
3763
3764 2002-01-22 Tom Tromey <tromey@redhat.com>
3765
3766 * decl.c (java_init_decl_processing): Use add_predefined_file.
3767 Predefine RawData.java.
3768 (predef_filenames): Removed.
3769 (java_init_decl_processing): Don't register predef_filenames.
3770 * jcf-parse.c (add_predefined_file): New function.
3771 (predefined_filename_p): Rewrote.
3772 (predefined_filename_p): No longer static.
3773 * decl.c (java_init_decl_processing): Call initialize_builtins.
3774 * Make-lang.in (JAVA_OBJS): Added builtins.o.
3775 (java/builtins.o): New target.
3776 * builtins.c: New file.
3777 * parse.y (patch_invoke): Use build_call_or_builtin.
3778 * java-tree.h (build_call_or_builtin): Declare.
3779 (initialize_builtins): Declare.
3780 (java_set_exception_lang_code): Removed unused declaration.
3781 (PREDEF_FILENAMES_SIZE): Removed.
3782 (java_tree_index): Added JTI_PREDEF_FILENAMES.
3783 (predef_filenames): New define.
3784 (add_predefined_file): Declare.
3785 (predefined_filename_p): Declare.
3786 * expr.c (expand_invoke): Use build_call_or_builtin.
3787
3788 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3789
3790 * parse.y (patch_switch_statement): Fix format specifier.
3791
3792 2002-01-16 Tom Tromey <tromey@redhat.com>
3793
3794 More for PR java/5365:
3795 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
3796 default.
3797 (process_file): Generate include for
3798 java.lang.UnsupportedOperationExceptions.
3799
3800 2002-01-15 Andreas Jaeger <aj@suse.de>
3801
3802 * .cvsignore: Add man pages.
3803
3804 2002-01-15 Tom Tromey <tromey@redhat.com>
3805
3806 Fix for PR java/5365:
3807 * gjavah.c (process_file): Turn class name into a file name.
3808
3809 2002-01-14 Matthias Klose <doko@debian.org>
3810
3811 * gcj.texi: Fix whitespace and formatting errors in the
3812 synopsis of the man pages. Update copyright.
3813
3814 2002-01-14 Tom Tromey <tromey@redhat.com>
3815
3816 For PR libgcj/5303:
3817 * Make-lang.in (java.install-man): Handle jv-convert man page.
3818 (java.generated-manpages): Added jv-convert.1.
3819 (java.uninstall): Remove jv-convert.1.
3820 (java.maintainer-clean): Likewise.
3821 ($(srcdir)/java/jv-convert.1): New target.
3822 * gcj.texi (Top): Link to jv-convert node.
3823 (Individual utilities): Likewise.
3824 (Invoking jv-convert): New node.
3825
3826 2001-01-10 Jeff Sturm <jsturm@one-point.com>
3827 Martin Kahlert <martin.kahlert@infineon.com>
3828
3829 * jcf-parse.c (get_constant): Don't swap lo/hi for big
3830 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
3831
3832 2002-01-03 Graham Stott <grahams@redhat.com>
3833
3834 * class.c (compile_resource_file): Update copyright date.
3835 Constify filename parameter.
3836 (java-tree.h): Update copyright date.
3837 (compile_resource_file): Constify filename parameter.
3838
3839 2002-01-03 Graham Stott <grahams@redhat.com>
3840
3841 * gcc/jcf-parse.c: Update copyright date.
3842 (yyparse): Constify resource_filename.
3843
3844 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3845
3846 * parse.y (src_parse_roots): Don't needlessly zero init.
3847
3848 2001-12-31 Tom Tromey <tromey@redhat.com>
3849
3850 * parse.y (dump_java_tree): New function.
3851 (source_end_java_method): Call it.
3852 (end_class_declaration): Likewise.
3853 * lang.c (java_decode_option): Call dump_switch_p.
3854
3855 2001-12-28 Tom Tromey <tromey@redhat.com>
3856
3857 * gen-table.pl: Don't process characters after \uffff. Added
3858 comment pointing to input file.
3859
3860 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3861
3862 * gen-table.pl: Const-ify output. Document the location of a
3863 suitable unicode input file.
3864
3865 * chartables.h: Regenerate.
3866
3867 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3868
3869 * chartables.h: Const-ify.
3870 * gjavah.c (options): Likewise.
3871 * jcf-dump.c (options): Likewise.
3872 * jv-scan.c (options): Likewise.
3873 * lex.c (java_start_char_p, java_part_char_p): Likewise.
3874 * parse.y (binop_lookup): Likewise.
3875
3876 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3877
3878 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
3879 the static arrays that are output.
3880 * jvspec.c (jvgenmain_spec): Make static.
3881 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
3882 * keyword.h: Regenerate.
3883 * lang.c (string_option, process_option_with_no, lang_f_options,
3884 lang_W_options): Const-ify.
3885 * lex.c (java_lex): Likewise.
3886
3887 2001-12-21 Richard Henderson <rth@redhat.com>
3888
3889 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
3890 (get_boehm_type_descriptor): ... here. Arrange for the
3891 TREE_TYPE to get set properly.
3892
3893 2001-12-21 Richard Henderson <rth@redhat.com>
3894
3895 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
3896 only if the target requires collect2.
3897
3898 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
3899
3900 2001-12-20 Tom Tromey <tromey@redhat.com>
3901
3902 For PR java/4509:
3903 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
3904 CAN_COMPLETE_NORMALLY for the node.
3905 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
3906 generate code for second branch if first branch can't complete
3907 normally.
3908 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
3909 the loop head if the loop body can't complete normally.
3910
3911 2001-12-20 Tom Tromey <tromey@redhat.com>
3912
3913 For PR java/4766:
3914 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
3915 case where `finally' clause can't complete normally.
3916
3917 2001-12-20 Tom Tromey <tromey@redhat.com>
3918
3919 Fixes PR java/5057:
3920 * parse.y (analyze_clinit_body): Added this_class parameter.
3921 Check for more cases where we must keep <clinit>.
3922 (maybe_yank_clinit): Cleaned up flow control.
3923
3924 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3925
3926 * decl.c (java_init_decl_processing): Don't initialize
3927 finit_leg_identifier_node.
3928 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
3929 (finit_leg_identifier_node): Remove.
3930 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
3931
3932 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3933
3934 * mangle.c (mangle_member_name): Don't special-case for
3935 NO_DOLLAR_IN_LABEL.
3936 * mangle_name.c (unicode_mangling_length): Likewise.
3937 (append_unicode_mangled_name): Likewise.
3938 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
3939 code.
3940
3941 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3942
3943 * expr.c (build_java_array_length_access): Don't force null pointer
3944 check unless flag_check_references is set.
3945
3946 2001-12-20 Tom Tromey <tromey@redhat.com>
3947
3948 Fix for PR java/3417:
3949 * parse.y (patch_assignment): Added special processing for
3950 `return'.
3951 (patch_return): Don't convert booleans to integers, and don't
3952 special-case `null'.
3953
3954 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
3955
3956 * config-lang.in (diff_excludes): Remove.
3957
3958 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
3959
3960 * gcj.texi: Update link to GCC manual.
3961
3962 2001-12-17 Tom Tromey <tromey@redhat.com>
3963
3964 * parse.y (link_nested_class_to_enclosing): Removed useless
3965 statement.
3966
3967 2001-12-16 Tom Tromey <tromey@redhat.com>
3968
3969 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
3970 Fixes PR java/5088.
3971
3972 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
3973
3974 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
3975 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
3976 spelling errors.
3977
3978 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3979
3980 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
3981
3982 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3983
3984 * decl.c (java_init_decl_processing): Build otable_type correctly.
3985 otable_decl is an otable_type.
3986
3987 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3988
3989 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
3990 otable_type, otable_ptr_type, method_symbol_type,
3991 method_symbols_array_type, method_symbols_array_ptr_type): New
3992 field/global tree definitions.
3993 (flag_indirect_dispatch): New flag.
3994 * decl.c (java_init_decl_processing): Initialize new otable and
3995 otable_syms type nodes and decls. Add new field "index" to
3996 method_type_node.
3997 * class.c (build_method_symbols_entry): New function.
3998 (make_method_value): Set "index" to to method's vtable index for
3999 virtual methods when indirect-dispatch is not used.
4000 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
4001 and set vtable_method_count to -1. Set otable and otable_syms field
4002 if indirect-dispatch is used and there was something to put in them.
4003 (build_method_symbols_entry): New function.
4004 (emit_offset_symbol_table): New function.
4005 * expr.c (get_offset_table_index): New function.
4006 (build_invokevirtual): Build array reference to otable at the index
4007 returned by get_offset_table_index, and use the result as the vtable
4008 offset.
4009 (build_invokeinterface): Similar.
4010 * jcf-parse.c (yyparse): If indirect-dispatch, call
4011 emit_offset_symbol_table at the end of compilation, after all classes
4012 have been generated.
4013 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
4014 * lang.c (flag_indirect_dispatch): Define.
4015 (lang_f_options): Add indirect-dispatch flag.
4016
4017 2001-12-14 Matthias Klose <doko@debian.org>
4018
4019 * gcj.texi: Markup for man page generation. Document missing
4020 options printed by <tool> --help.
4021 Terminate description of gij's -ms option with a dot.
4022 * Make-lang.in ($(srcdir)/java/*.1): New targets.
4023 (java.generated-manpages java.install-man, java.uninstall,
4024 java-maintainer-clean) Updated.
4025
4026 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
4027
4028 * class.c (get_dispatch_table): Fix java vtable layout
4029 for TARGET_VTABLE_USES_DESCRIPTORS.
4030 * decl.c (java_init_decl_processing): Initialize
4031 alloc_no_finalizer_node, finalize_identifier_node.
4032 * expr.c (class_has_finalize_method): New function.
4033 (expand_java_NEW): Generate calls for finalizer-free allocation.
4034 (build_invokevirtual): Fix java vtable layout for
4035 TARGET_VTABLE_USES_DESCRIPTORS.
4036 * java-tree.h (enum java_tree_index): New entries:
4037 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
4038 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
4039 (class_has_finalize_method): declare.
4040 (HAS_FINALIZER_P): New macro.
4041 * parse.y (patch_invoke): Generate calls for finalizer-free
4042 allocation.
4043
4044 2001-12-12 Matthias Klose <doko@debian.org>
4045
4046 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
4047 whitespace at end of line.
4048
4049 2001-12-11 Tom Tromey <tromey@redhat.com>
4050
4051 * lex.c (java_init_lex): Define wfl_to_string as
4052 gnu.gcj.runtime.StringBuffer unless generating bytecode.
4053
4054 2001-12-11 Jeff Sturm <jsturm@one-point.com>
4055
4056 * class.c (make_method_value): Use null_pointer_node to
4057 represent empty exception table.
4058
4059 2001-12-10 Tom Tromey <tromey@redhat.com>
4060
4061 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
4062
4063 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
4064
4065 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
4066
4067 2001-12-09 Per Bothner <per@bothner.com>
4068
4069 * check-init.c (current_switch_has_default): New static field.
4070 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
4071 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
4072 DEFAULT_EXPR seen, simulate a default alternative that copies state.
4073
4074 2001-12-09 Tom Tromey <tromey@redhat.com>
4075
4076 * check-init.c (check_init): Don't allow pre- or post- increment
4077 or decrement of final variable.
4078 (final_assign_error): Minor error message rewording.
4079
4080 2001-12-08 Tom Tromey <tromey@redhat.com>
4081
4082 * java-tree.h: Fixed typo.
4083
4084 * gjavah.c (decompile_method): Don't decompile to `return this'
4085 for static methods.
4086
4087 * gjavah.c (cxx_keywords): Re-sorted.
4088 * lex.c (cxx_keywords): Re-sorted.
4089
4090 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
4091 else.
4092
4093 * gjavah.c (print_namelet): Clear subnamelets.
4094 (HANDLE_METHOD): Set `method_printed' earlier.
4095
4096 2001-12-07 Tom Tromey <tromey@redhat.com>
4097
4098 * lang.c (lang_f_options): Added
4099 optimize-static-class-initialization.
4100 (java_decode_option): Removed special case.
4101
4102 2001-12-07 Per Bothner <per@bothner.com>
4103
4104 * check-init.c (check_init): Fix typo freeing memory twice.
4105
4106 2001-12-05 Per Bothner <per@bothner.com>
4107
4108 Restore support for static class initialization optimization.
4109 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
4110 * check-init.c (check_int): At end of BLOCK handle initialization
4111 blocks, which used to be done in java_complete_expand_method but did
4112 not handle the case where check_for_initialization might allocate
4113 more than a word of bits.
4114 * decl.c (lang_make_tree): The smic field is now a tree.
4115 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
4116 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
4117
4118 * parse.y (emit_test_initialization): Combine hash_lookup calls.
4119
4120 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
4121 Change from a hash table to a list.
4122 (struct_lang_decl): Change field 'smic' to match.
4123 * class.c (add_method_1): Initialize
4124 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
4125 * parse.y (adjust_init_test_initialization): Removed - inlined into -
4126 (java_expand_method_bodies): -here, since 'smic' is now a list.
4127 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
4128
4129 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
4130
4131 * class.c (java_hash_compare_tree_node): Fix casts.
4132
4133 2001-12-04 Per Bothner <per@bothner.com>
4134
4135 * check-init.c: Handle definite unassignment to finals in addition
4136 to definite assignment.
4137 (loop_current_locals): New field.
4138 (num_current_locals, int start_current_locals, num_current_words):
4139 Make static.
4140 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
4141 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
4142 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
4143 (get_variable_decl, check_final_reassigned): New functions.
4144 (check_init, check_bool_init): Modify as needed for checking finals.
4145 (check_for_initialization): Take extra parameter and return void.
4146 Do extra start-up logic to check final fields for assignment.
4147 * parse.y (check_static_final_variable_assignment_flag,
4148 reset_static_final_variable_assignment_flag, check_final_assignment,
4149 check_final_variable_local_assignment_flag,
4150 reset_final_variable_indirect_assignment_flag,
4151 reset_final_variable_global_assignment_flag): Remove functions.
4152 (java_complete_expand_methods, outer_field_access_fix,
4153 patch_assignment): Remove no-longer used logic.
4154 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
4155 * parse.y (register_fields, java_complete_tree): Update accordingly.
4156
4157 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
4158 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
4159 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
4160
4161 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
4162
4163 * java-tree.h (DECL FINAL): New bit-field.
4164 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
4165 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
4166 (DECL_INIT_CALLS_THIS): New macro.
4167 (struct lang_decl): New bit-field init_calls_this.
4168 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
4169 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
4170 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
4171 use it for both local variables and final fields.
4172 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
4173 and local_final.
4174 (struct lang_type): Remove hfv bit-field.
4175 (check_for_initialization): Change to return void.
4176
4177 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
4178 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
4179 * check-init.c (final_assign_error): New helper function.
4180 (check_final_reassigned, check_init): Use it.
4181 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
4182
4183 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
4184 bit-fields to unsigned.
4185
4186 2001-12-03 Per Bothner <per@bothner.com>
4187
4188 * parse.y (patch_binop): Minor constant folding.
4189
4190 * parse.y (build_current_thisn): Shorter 'buffer'.
4191
4192 2001-12-03 Per Bothner <per@bothner.com>
4193
4194 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
4195 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
4196 * jcf-write.c (generate_bytecode_insns): Remove support for
4197 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
4198 * check-init.c (check_init): Likewise.
4199
4200 2001-12-03 Per Bothner <per@bothner.com>
4201
4202 * verify.c (subroutine_nesting): New function.
4203 (verify_jvm_instructions): Use it to fix logic for checking that
4204 we're done with the current subroutine.
4205
4206 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
4207 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
4208
4209 2001-12-03 Per Bothner <per@bothner.com>
4210
4211 * jcf.h: Fix obvious typo in comment.
4212 * typeck.c (build_null_signature): Add comment.
4213
4214 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
4215
4216 * expr.c: Remove leading capital from diagnostic messages, as
4217 per GNU coding standards.
4218 * jcf-io.c: Similarly.
4219 * jcf-parse.c: Similarly.
4220 * jv-scan.c: Similarly.
4221 * jvspec.c: Similarly.
4222 * mangle.c: Similarly.
4223
4224 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
4225 Alexandre Petit-Bianco <apbianco@redhat.com>
4226
4227 * expr.c (build_java_arrayaccess): Call save_expr on array for
4228 correct evaluation order, modified comment, fixed indentation.
4229 * parse.y: (patch_assignment): Correctly extract the array base
4230 from the tree generate by build_java_arrayaccess, added comments.
4231 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
4232 Fixes PR java/3096, PR java/3803, PR java/3965.
4233
4234 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
4235
4236 * expr.c (expand_byte_code): Remove trailing periods from messages.
4237 * jcf-parse.c (load_class, jcf_parse): Similarly.
4238 * jcf-write.c (generate_classfile): Similarly.
4239 * lex.c (java_lex): Similarly.
4240
4241 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4242
4243 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
4244
4245 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
4246
4247 * Make-lang.in (java.generated-manpages): New dummy target.
4248
4249 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4250
4251 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4252 ASM_FINAL_SPEC.
4253 (lang_specific_pre_link): Use set_input to set input_filename.
4254 Append `main' here.
4255 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4256 (main): Fix definition.
4257 Strip `main' from classname.
4258 Fixes PR java/227.
4259
4260 2001-11-18 Roger Sayle <roger@eyesopen.com>
4261
4262 * parse.h (java_expand_switch): Remove old prototype.
4263
4264 2001-11-18 Tom Tromey <tromey@redhat.com>
4265
4266 Fix for PR java/1401:
4267 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
4268 arg0 is null.
4269 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
4270 correctly.
4271
4272 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
4273
4274 * lang.c (finish_parse): Rename to java_finish.
4275 (LANG_HOOKS_FINISH, java_finish): New.
4276
4277 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
4278
4279 * decl.c (init_decl_processing): Rename java_init_decl_processing.
4280 * java-tree.h: New prototype.
4281 * lang.c (java_init): Update prototype. Combine with old init_parse.
4282
4283 2001-11-13 Tom Tromey <tromey@redhat.com>
4284
4285 * gjavah.c (method_signature): New global.
4286 (HANDLE_METHOD): Set it.
4287 (decompile_return_statement): New function.
4288 (decompile_method): Use it.
4289 (print_method_info): Removed `synth' argument.
4290
4291 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
4292
4293 * java-tree.h (java_set_yydebug): New.
4294 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
4295 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
4296 (print_lang_decl, print_lang_type, print_lang_identifier,
4297 print_lang_statistics, lang_print_xnode): Remove.
4298
4299 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
4300
4301 * jcf-parse.c (init_lex): Remove.
4302 * lang.c (language_string, lang_identify): Remove.
4303 (struct lang_hooks): Constify.
4304 (LANG_HOOKS_NAME): Override.
4305 (init_parse): Update.
4306
4307 2001-11-08 Andreas Franck <afranck@gmx.de>
4308
4309 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
4310 program_transform_name the way suggested by autoconf.
4311 (java.install-common): Also transform auxiliary program names with
4312 program_transform_name.
4313
4314 2001-11-08 Tom Tromey <tromey@cygnus.com>
4315
4316 * parse.y (trap_overflow_corner_case): New rule.
4317 (unary_expression): Use it.
4318 * lex.c (java_init_lex): Don't set minus_seen.
4319 (yylex): Don't use minus_seen. Communicate overflow to parser for
4320 it to handle.
4321 (error_if_numeric_overflow): New function.
4322 * parse.h (minus_seen): Removed field.
4323 (JAVA_RADIX10_FLAG): New define.
4324
4325 2001-11-07 Tom Tromey <tromey@redhat.com>
4326
4327 Patch for PR java/1414:
4328 * parse.y (case_label_list): New global.
4329 (goal): Register case_label_list with GC.
4330 (java_complete_lhs): Save new case on case_label_list.
4331 (patch_switch_statement): Check for duplicate case labels.
4332
4333 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
4334
4335 * parse.y (patch_assignment): Removed unused third argument.
4336 (java_complete_lhs): Removed unused third argument to patch_assignment.
4337
4338 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
4339
4340 * lang.c: Include langhooks-def.h.
4341 * Make-lang.in: Update.
4342
4343 2001-10-31 Zack Weinberg <zack@codesourcery.com>
4344
4345 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
4346
4347 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4348
4349 * mangle.c (find_compression_record_match): Don't match compression
4350 records for package name elements unless they occur at the start of
4351 the name. Fix for PR java/4717.
4352
4353 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4354
4355 * expr.c (expand_java_field_op): Don't special-case references to
4356 java.lang.PRIMTYPE.TYPE.
4357 (build_primtype_type_ref): Removed.
4358 * java-tree.h (build_primtype_type_ref): Remove prototype.
4359 * parse.y (maybe_build_primttype_type_ref): Removed.
4360 (complete_function_arguments): Don't special-case references to
4361 java.lang.PRIMTYPE.TYPE.
4362 (patch_assignment): Likewise.
4363 (array_constructor_check_entry): Likewise.
4364
4365 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
4366
4367 * mangle.c (static tree compression_table): Fixed leading comment.
4368 * parse.h (struct parser_ctxt): Fixed field comment.
4369 * parse.y (check_pkg_class_access): New prototype, fixed leading
4370 comment, new parameter used to emit error only if passed as true.
4371 (parse_check_super): Pass extra argument to check_pkg_class_access.
4372 (do_resolve_class): Likewise.
4373 (process_imports): Likewise.
4374 (read_import_dir): Fixed indentation.
4375 (find_in_imports_on_demand): New local class_type_name. Local
4376 node_to_use deleted. while loop changed into for loop. Report
4377 multiple definition only for accessible classes. Improved error
4378 message.
4379 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
4380 assigned to parameter list, fixed indentation. while loop changed
4381 into for loop, restore TREE_CHAIN on local `tem' before the next
4382 iteration.
4383
4384 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4385
4386 * lang.c (lang_get_alias_set): Deleted.
4387
4388 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4389
4390 * gjavah.c (jni_print_char): Fix thinko in last change.
4391
4392 * gjavah.c (jni_print_char, decode_signature_piece): Use
4393 safe-ctype macros and/or fold extra calls into fewer ones.
4394 * lex.c (java_read_unicode, java_lex): Likewise.
4395 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
4396 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
4397 * mangle_name.c (append_unicode_mangled_name,
4398 unicode_mangling_length): Likewise.
4399
4400 2001-10-17 Richard Henderson <rth@redhat.com>
4401
4402 * Make-lang.in (java/lang.o): Depend on langhooks.h.
4403
4404 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
4405
4406 * lang.c (langhooks.h): Included.
4407 (LANG_HOOKS_INIT): Redefined.
4408 (LANG_HOOKS_INIT_OPTIONS): Likewise.
4409 (LANG_HOOKS_DECODE_OPTION): Likewise.
4410 (struct lang_hooks lang_hooks): New initialization.
4411
4412 2001-10-11 Per Bothner <per@bothner.com>
4413
4414 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
4415 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
4416 The former is simpler, and jcf-write.c handles it better.
4417 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
4418 or WITH_CLEANUP_EXPR.
4419 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
4420 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
4421
4422 * parse.y (patch_if_else_statement): If the condition is constant,
4423 optimize away the test.
4424
4425 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
4426
4427 * parse.y (patch_cast): Call patch_string on the first operand of
4428 the incoming node, update it if necessary. Fixes PR java/4510.
4429
4430 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4431
4432 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
4433 when name qualifier matches a package name.
4434
4435 2001-10-08 Tom Tromey <tromey@redhat.com>
4436
4437 Fix for PR java/4489:
4438 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
4439 force a new label when computing `body_block'.
4440
4441 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4442
4443 * jcf-io.c (format_uint): Const-ify.
4444 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
4445 * lex.c (java_get_line_col): Likewise.
4446 * parse.y (build_incdec): Likewise.
4447
4448 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
4449
4450 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
4451 a NULL enclosing context if appropriate. Fixes PR java/4466.
4452
4453 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
4454
4455 * parse.y (patch_assignment): Use lvalue's original TYPE when
4456 building the final COMPOUND_EXPR.
4457 (try_reference_assignconv): Fixed leading comment.
4458
4459 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
4460
4461 * parse.y (check_final_variable_indirect_assignment): For
4462 COMPOUND_EXPR, return only if finals were found initialized
4463 properly, if not, keep on checking.
4464 (check_final_variable_global_assignment_flag): New local
4465 error_found, set when appropriate and used to decide whether to
4466 report uninitialized finals. Fixed typo in comment.
4467
4468 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
4469
4470 * decl.c (init_decl_processing): Fixed typo in predef_filenames
4471 last three initializations. Fixes PR java/4360.
4472
4473 2001-09-21 Richard Henderson <rth@redhat.com>
4474
4475 * class.c (get_dispatch_table): Handle function descriptors.
4476 (build_dtable_decl): Likewise.
4477 * expr.c (build_invokevirtual): Likewise.
4478
4479 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
4480
4481 * parse.y (patch_method_invocation): Build class initialization
4482 when static finals are used to qualify method invocation.
4483 Fixes PR java/4366.
4484
4485 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
4486
4487 * parse.h: (WFL_STRIP_BRACKET): Re-written using
4488 build_type_name_from_array_name.
4489 (STRING_STRIP_BRACKETS): New macro.
4490 * parse.y (build_type_name_from_array_name): New function.
4491 (array_creation_expression:): Accumulate []s instead of [s.
4492 (cast_expression:): Accumulate []s instead of [s after cast type
4493 name.
4494 (build_array_from_name): Local string deleted, use
4495 build_type_name_from_array_name.
4496 (build_unresolved_array_type): Accumulate []s instead of [s after
4497 type name.
4498 (register_fields): Fixed comment.
4499 (resolve_class): Local name, base deleted, new locals tname and
4500 array_dims. Use build_type_name_from_array_name. Use array_dims to
4501 build array type.
4502 (purify_type_name): Use STRING_STRIP_BRACKETS.
4503
4504 2001-09-18 Andreas Jaeger <aj@suse.de>
4505
4506 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
4507 * jv-scan.c: Likewise.
4508
4509 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
4510
4511 * parse.y (patch_method_invocation): Inner class creation context
4512 check not enforced within constructors. Fixes PR java/1873.
4513
4514 2001-09-16 Tom Tromey <tromey@redhat.com>
4515
4516 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
4517 NOTE_PUSH for single-case push. Fixes PR java/4189.
4518
4519 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
4520
4521 * java-tree.h (TYPE_IMPORT_LIST): New macro.
4522 (TYPE_IMPORT_DEMAND_LIST): Likewise.
4523 (struct lang_type): New fields import_list and import_demand_list.
4524 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
4525 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
4526 (do_resolve_class): New local saved_enclosing_type, initialized,
4527 passed as parameter to find_in_imports and find_in_imports_on_demand.
4528 (find_in_imports): Added paramater enclosing_type, use its
4529 TYPE_IMPORT_LIST when applicable.
4530 (find_in_imports_on_demand): Added parameter enclosing_type, use
4531 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
4532 declaration and initialization.
4533 (fold_constant_for_init): Switch/restore current_class to the
4534 appropriate context.
4535
4536 2001-09-13 Mark Mitchell <mark@codesourcery.com>
4537
4538 * verify.c (verify_jvm_instructions): Fix typo.
4539
4540 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4541
4542 * expr.c (expand_invoke): Const-ification.
4543 * parse.y (patch_method_invocation): Likewise.
4544
4545 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4546
4547 * gjavah.c (cxx_keywords): Const-ification.
4548 * keyword.gperf (java_keyword): Likewise.
4549 * lang.c (java_tree_code_name): Likewise.
4550 * lex.c (cxx_keywords): Likewise.
4551 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
4552
4553 2001-09-11 Richard Henderson <rth@redhat.com>
4554
4555 * parse.h (ctxp_for_generation): Mark extern.
4556
4557 2001-09-10 Richard Henderson <rth@redhat.com>
4558
4559 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
4560
4561 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
4562
4563 * typeck.c (java_array_type_length, build_prim_array_type):
4564 Represent empty arrays by NULL index.
4565
4566 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
4567
4568 * java-tree.h (compile_resource_file): Grouped with other prototypes.
4569 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
4570
4571 2001-09-06 Anthony Green <green@redhat.com>
4572
4573 * class.c (O_BINARY): Define if necessary.
4574 (registerResource_libfunc): Declare.
4575 (init_class_processing): Initilize registerResource_libfunc.
4576 (compile_resource_file): New function.
4577 * java-tree.h (resource_name): Declare.
4578 (compile_resource_file): Declare.
4579 * jcf-parse.c (yyparse): Handle compiling java resource files.
4580 * lang.c (java_decode_option): Handle -fcompile-resource option.
4581 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
4582 resource files.
4583 * gcj.texi (Code Generation): Add documentation for -R flag.
4584
4585 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
4586
4587 * jcf-write.c (generate_classfile): Issue an error in case of
4588 field/initial value mismatch.
4589 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
4590 being initialized and we're generating bytecode.
4591 (java_complete_lhs): In MODIFY_EXPR section: added comments,
4592 set DECL_INITIAL properly when appropriate.
4593 Fixes PR java/4230
4594 Fixes PR java/4204
4595
4596 2001-09-01 Per Bothner <per@bothner.com>
4597
4598 * parse.y (maybe_yank_clinit): A field without an initializer is not
4599 relevant. All initializers except static final and constant require
4600 <clinit>, regardless of flag_emit_class_files.
4601
4602 2001-08-31 Per Bothner <per@bothner.com>
4603
4604 * class.c (set_constant_value): When not emitting class files, then a
4605 String ConstantValue is a utf8const_ptr_type.
4606
4607 2001-08-30 Per Bothner <per@bothner.com>
4608
4609 * jcf-write.c (generate_classfile): Check that field is primitive
4610 or string before emitting ConstantValue attribute.
4611
4612 2001-08-30 Per Bothner <per@bothner.com>
4613
4614 * parse.y (resolve_qualified_expression_name): If creating a
4615 COMPOUND_EXPR, set it's type correctly.
4616
4617 2001-08-30 Per Bothner <per@bothner.com>
4618
4619 * jcf-io.c (open_class): Set filename field.
4620
4621 * jcf-parse,c (parse_class_file): Set current_function_decl
4622 for better error message when Code attribute is missing.
4623
4624 * lang.c (put_decl_node, lang_print_error): Re-arrange for
4625 better diagnostics, especially for constructors.
4626
4627 2001-08-30 Per Bothner <per@bothner.com>
4628
4629 * jcf-write.c (generate_classfile): Don't write ConstantValue
4630 attribute if field is not final, for compatibility with jdk.
4631
4632 * jcf-write.c (generate_classfile): Convert ConstantValue values
4633 to correct type. Work-around for front-end bug.
4634 * class.c (set_constant_value): Error if constant has wrong type.
4635
4636 2001-08-30 Per Bothner <per@bothner.com>
4637
4638 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
4639 "Double" are printed at verbosity 1.
4640
4641 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
4642
4643 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
4644
4645 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
4646
4647 * parse.y (patch_assignment): Don't verify final re-assignment here.
4648 (java_complete_lhs): Verify assignments to finals calling
4649 patch_assignment. Verify re-assignments to finals before calling
4650 patch_assignment.
4651
4652 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
4653
4654 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
4655 Fixes PR java/1413
4656
4657 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
4658
4659 * lex.c (java_lex): new local found_hex_digits. Set and then used
4660 in test to reject invalid hexadecimal numbers.
4661 * parse.y (java_complete_tree): Prevent unwanted cast with
4662 initialized floating point finals.
4663 (patch_binop): Emit a warning when detecting a division by zero,
4664 mark result not constant, don't simplify non integer division.
4665
4666 2001-08-28 Per Bothner <per@bothner.com>
4667
4668 * jcf-write.c (generate_bytecode_insns): For increments and
4669 decrements just recurse to push constant. Improvement on Mark's patch.
4670
4671 2001-08-28 Mark Mitchell <mark@codesourcery.com>
4672
4673 * jcf-write.c (generate_bytecode_insns): Generate an integer to
4674 real conversion for increments and decrements of reals.
4675
4676 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
4677
4678 * parse.y (resolve_qualified_expression_name): Handle unresolved
4679 qualified expressions, prevent numerical qualifiers, fixed typo.
4680 Fixes PR java/4141
4681
4682 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
4683
4684 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
4685 don't report anything but deprecated class when marked so. Handle
4686 VAR_DECL.
4687 (patch_method_invocation): Check deprecation on methods and types.
4688 (patch_binop): code becomes an enum tree_code, added default: to
4689 switch to handle that. Detect division by zero, try to fold and
4690 return before using a subroutine.
4691
4692 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
4693
4694 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
4695 file smaller than 4 bytes.
4696 * parse.y (check_inner_circular_reference): New function.
4697 (check_circular_reference): Likewise.
4698 (array_initializer:): Accept {,}.
4699 (java_check_circular_reference): Rewritten using
4700 check_circular_reference and check_inner_circular_reference.
4701 (java_complete_expand_method): Unconditionally save and restore
4702 the unpurged exception list.
4703 (build_dot_class_method_invocation): Unmangle signature parameter.
4704
4705 2001-08-21 Tom Tromey <tromey@redhat.com>
4706
4707 * decl.c (init_decl_processing): Add `throws' field to method
4708 descriptor.
4709 * class.c (make_method_value): Compute `throws' field for method.
4710
4711 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
4712
4713 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
4714 circularity is detected.
4715 (ctors_unchecked_throws_clause_p): Fixed leading comment.
4716
4717 2001-08-17 Richard Henderson <rth@redhat.com>
4718
4719 * class.c (emit_register_classes): Add align parameter to
4720 call to assemble_integer.
4721
4722 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
4723
4724 * jcf-parse.c (load_class): New locals saved and class_loaded. If
4725 loading a class_or_name fails, try considering an innerclass name
4726 and load the enclosing context.
4727 * parse.y (resolve_inner_class): New function.
4728 (find_as_inner_class): Added leading comment.
4729 (register_incomplete_type): Keep the current context as enclosing
4730 context for JDEP_FIELD dependencies.
4731 (do_resolve_class): Locals new_class_decl and super initialized to
4732 NULL. Call resolve_inner_class, explore the enclosing context
4733 superclass if necessary.
4734 Fixes PR java/4007
4735
4736 2001-08-16 Tom Tromey <tromey@redhat.com>
4737
4738 * jcf-dump.c (main): Updated for change to jcf_path_seal.
4739 * gjavah.c (main): Updated for change to jcf_path_seal.
4740 * lang.c (version_flag): New global.
4741 (java_decode_option): Recognize `-version'.
4742 (java_init): Update for change to jcf_path_seal.
4743 * jcf.h (jcf_path_seal): Added `print' argument.
4744 * jcf-path.c (jcf_path_seal): Added `print' argument.
4745
4746 2001-08-13 Zack Weinberg <zackw@panix.com>
4747
4748 * Make-lang.in (java/decl.o): Update dependencies.
4749 * decl.c: Include libfuncs.h, don't include toplev.h.
4750
4751 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
4752
4753 * decl.c (init_decl_processing): exception_type_node,
4754 class_not_found_type_node, and no_class_def_found_type_node
4755 initialized. predef_filenames augmented accordingly.
4756 instinit_identifier_node initialized.
4757 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
4758 * java-tree.h (enum java_tree_index): New entries
4759 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
4760 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
4761 (exception_type_node): New macro.
4762 (class_not_found_type_node): Likewise.
4763 (no_class_def_found_type_node): Likewise.
4764 (instinit_identifier_node): Likewise.
4765 (PREDEF_FILENAMES_SIZE): Adjusted.
4766 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
4767 (struct lang_type): Fixed typo in bitfield name.
4768 (DECL_INSTINIT_P): New macro.
4769 (ID_INSTINIT_P): Likewise.
4770 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
4771 attribute.
4772 * parse.y (encapsulate_with_try_catch): New function.
4773 (generate_instinit): Likewise.
4774 (build_instinit_invocation): Likewise.
4775 (ctors_unchecked_throws_clause_p): Likewise.
4776 (add_instance_initializer): Deleted.
4777 (build_instance_initializer): Likewise.
4778 (in_instance_initializer): Likewise.
4779 (check_method_redefinition): instinit$ not to be verified.
4780 (java_complete_expand_methods): Generate instinit$, simplified code.
4781 (build_dot_class_method): Eliminated unnecessary locals. Use
4782 encapsulate_with_try_catch, removed unnecessary code.
4783 (fix_constructors): New local iii. Use build_instinit_invocation.
4784 (patch_method_invocation): Added comment.
4785 (maybe_use_access_method): Don't consider instinit$.
4786 (find_applicable_accessible_methods_list): Shorten the search for
4787 instinit$ too.
4788 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
4789 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
4790 (patch_throw_statement): Likewise. Fixed typo.
4791
4792 2001-08-12 David Edelsohn <edelsohn@gnu.org>
4793
4794 Revert:
4795 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4796 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4797 ASM_FINAL_SPEC.
4798 (lang_specific_pre_link): Use set_input to set input_filename.
4799 Append `main' here.
4800 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4801 (main): Fix definition.
4802 Strip `main' from classname.
4803 Fixes PR java/227.
4804
4805 2001-08-11 Zack Weinberg <zackw@panix.com>
4806
4807 * lex.h: Don't include setjmp.h. Don't define
4808 SET_FLOAT_HANDLER or prototype set_float_handler.
4809
4810 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
4811
4812 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
4813 `poplevel' in the right order.
4814
4815 2001-08-09 Richard Henderson <rth@redhat.com>
4816
4817 * Make-lang.in (class.o): Depend on TARGET_H.
4818 * class.c (emit_register_classes): Use target hooks instead of
4819 assemble_constructor and assemble_destructor.
4820
4821 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
4822
4823 * check-init.c (flags.h): Include
4824 (check_init): Don't report uninitialized static class
4825 initialization flags, don't free bit index when doing static class
4826 initialization optimization.
4827 (check_for_initialization): Return type changed to `unsigned int.'
4828 (attach_initialized_static_class): New function.
4829 * class.c (add_method_1): Create the initialized static class
4830 table if necessary.
4831 (finish_class): Always emit deferred inline methods.
4832 * decl.c (emit_init_test_initialization): Moved to expr.c
4833 (complete_start_java_method): Don't traverse
4834 DECL_FUNCTION_INIT_TEST_TABLE.
4835 (lang_mark_tree): Mark hash tables in function decls.
4836 * expr.c (emit_init_test_initialization): Moved from decl.c.
4837 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
4838 initialization flag, set DECL_CONTEXT and
4839 LOCAL_CLASS_INITIALIZATION_FLAG.
4840 (java_lang_expand_expr): Emit initialization code for static class
4841 initialized flags when entering block, if necessary.
4842 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
4843 * java-tree.h (flag_optimize_sci): New global variable declaration.
4844 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
4845 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
4846 (LOCAL_FINAL_P): Fixed typo in comment.
4847 (FINAL_VARIABLE_P): Likewise.
4848 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
4849 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
4850 (struct lang_decl): New fields `ict', `smic' and `cif.'
4851 (check_for_initialization): New returned value for global.
4852 (attach_initialized_static_class): New global function.
4853 (STATIC_CLASS_INIT_OPT_P): New macro.
4854 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
4855 * lang.c (java_decode_option): Handle
4856 `-fno-optimize-static-class-initialization'
4857 * parse.y (start_complete_expand_method): New function.
4858 (java_expand_method_bodies): Likewise.
4859 (attach_init_test_initialization_flags): Likewise.
4860 (adjust_init_test_initialization): Likewise.
4861 (emit_test_initialization): Likewise.
4862 (java_complete_expand_methods): Nullify abstract and native method
4863 bodies.
4864 (java_complete_expand_method): New locals `fbody', `block_body'
4865 and `exception_copy.' Reorganized: directly return on empty method
4866 bodies, call `start_complete_expand_method', remember definitely
4867 initialized static class in function, don't expand method bodies.
4868 (java_expand_classes): Call `java_expand_method_bodies' before
4869 `finish_class' when compiling to native.
4870 (resolve_expression_name): Use `orig' after building outer class
4871 field access.
4872 (patch_invoke): Remember static method invocations.
4873
4874 2001-08-06 Richard Henderson <rth@redhat.com>
4875
4876 * class.c (emit_register_classes): Pass a symbol_ref and priority
4877 to assemble_constructor.
4878
4879 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
4880
4881 * java-tree.h (all_class_filename): New macro.
4882 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
4883 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
4884 newly created IDENTIFIER_NODE to `all_class_filename.'
4885
4886 2001-08-01 Jeff Sturm <jsturm@one-point.com>
4887
4888 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
4889 Use ggc_add_tree_root to register roots.
4890
4891 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
4892
4893 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
4894 second operand calling check_init.
4895 * decl.c (complete_start_java_method): Swaped second and third
4896 arguments while creating WITH_CLEANUP_EXPR node.
4897 * jcf-write.c (generate_bytecode_insns): Use second operand
4898 instead of third when handling WITH_CLEANUP_EXPR.
4899 * parse.y (java_complete_lhs): Expand second operand of
4900 WITH_CLEANUP_EXPR nodes.
4901 (patch_synchronized_statement): Swaped second and third arguments
4902 while creating WITH_CLEANUP_EXPR node.
4903
4904 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
4905
4906 * parse.y (create_interface): Avoid cyclic inheritance report when
4907 syntax error encountered during class definition.
4908 Fixes PR java/2956
4909
4910 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4911
4912 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
4913 ASM_FINAL_SPEC.
4914 (lang_specific_pre_link): Use set_input to set input_filename.
4915 Append `main' here.
4916 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
4917 (main): Fix definition.
4918 Strip `main' from classname.
4919 Fixes PR java/227.
4920
4921 2001-07-18 Tom Tromey <tromey@redhat.com>
4922
4923 For PR java/2812:
4924 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
4925 * lex.c (java_new_lexer): Use ICONV_CONST.
4926 (java_read_char): Likewise.
4927 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
4928 (jv-scan$(exeext)): Likewise.
4929
4930 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
4931
4932 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
4933 * parse.y (check_class_interface_creation): Allow `private' if the
4934 enclosing is not an interface.
4935 (create_interface): Interface tagged public if the enclosing
4936 context is an interface.
4937 (create_class): Class tagged public if the enclosing context
4938 is an interface.
4939 Fixes PR java/2959
4940
4941 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
4942
4943 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
4944 Fixes PR java/2665
4945
4946 2001-07-14 Tim Josling <tej@melbpc.org.au>
4947
4948 * check-init.c (check_init): Remove references to EXPON_EXPR.
4949
4950 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
4951
4952 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
4953 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
4954 Fixes PR java/3602
4955
4956 2001-07-13 Tom Tromey <tromey@redhat.com>
4957
4958 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
4959 invocation.
4960
4961 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
4962
4963 * parse.y (patch_method_invocation): Don't override primary if one
4964 is already provided, but let this$<n> be built. Fixed comment.
4965
4966 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
4967
4968 * parse.y (empty_statement:): Report empty statement error only
4969 when found at class declaration level.
4970 Fixes PR java/3635
4971
4972 2001-07-12 Tom Tromey <tromey@redhat.com>
4973
4974 * expr.c (expand_load_internal): New function.
4975 (LOAD_INTERNAL): Use it.
4976
4977 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
4978
4979 * parse.y (verify_constructor_super): Compare anonymous class ctor
4980 args with `valid_method_invocation_conversion_p.'
4981 Fixes PR java/3285
4982
4983 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
4984
4985 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
4986 `-fsyntax-only.' Fixes PR java/3248
4987
4988 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
4989
4990 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
4991
4992 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
4993
4994 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
4995 current function is static. Fixes PR java/1970
4996
4997 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
4998
4999 * parse.y (patch_method_invocation): Add enclosing context to ctor
5000 calls if necessary. Fixes PR java/2953
5001
5002 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
5003
5004 * parse.y (resolve_package): Abort if qualified expression member
5005 isn't right.
5006 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
5007 Fixes PR java/1391
5008
5009 2001-07-07 Zack Weinberg <zackw@stanford.edu>
5010
5011 * verify.c: Don't use // comments.
5012
5013 2001-07-05 Tom Tromey <tromey@redhat.com>
5014
5015 * lang.c (flag_assume_compiled): Removed.
5016 * java-tree.h (flag_assume_compiled): Removed.
5017 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
5018 -fhash-synchronization, -fuse-divide-subroutine,
5019 -fcheck-references, -femit-class-file, -femit-class-files,
5020 -fassume-compiled. Updated --encoding information. Changed
5021 -foutput-class-dir to `-d'.
5022
5023 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
5024
5025 * jcf-parse.c (parse_class_file): Add lineno parameter to
5026 debug_start_source_file call.
5027
5028 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
5029
5030 * gcj.texi: Use gpl.texi.
5031 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
5032 dependencies and use doc/include in search path.
5033
5034 2001-07-03 Jeff Sturm <jsturm@one-point.com>
5035
5036 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
5037 `this'. If so, don't build instance initializers.
5038
5039 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
5040
5041 * parse.y (resolve_expression_name): Improved error message for
5042 inner class cases. Fixes PR java/1958
5043
5044 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
5045
5046 * lang.c: #include diagnostic.h
5047 (lang_print_error): Add a `diagnostic_context *' parameter.
5048 (java_dummy_print): Likewise.
5049 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
5050
5051 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
5052
5053 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
5054 * jcf.h (typedef struct JCF): New bitfield `finished.'
5055 (JCF_FINISH): Set `finished.'
5056 (JCF_ZERO): Reset `finished.'
5057 Fixes PR java/2633
5058
5059 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
5060
5061 * parse.y (class_body_declaration:): Don't install empty instance
5062 initializers.
5063 Fixes PR java/1314
5064
5065 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
5066
5067 * class.c (set_super_info): Call `set_class_decl_access_flags.'
5068 (set_class_decl_access_flags): New function.
5069 * java-tree.h (set_class_decl_access_flags): New prototype.
5070 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
5071 (parse_class_file): New local `decl_max_locals.' Take wide types
5072 into account to compute DECL_MAX_LOCALS.
5073 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
5074 imports on demand.
5075
5076 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
5077
5078 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
5079
5080 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
5081
5082 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
5083 * parse.y (do_resolve_class): Moved comments out to leading comment
5084 section. Removed local `start', New local `_ht' and
5085 `circularity_hash.' Record `enclosing' in hash table and search
5086 it to detect circularity. Use `enclosing' as an argument to
5087 `lookup_cl.' Free the hash table when done.
5088
5089 2001-06-19 Tom Tromey <tromey@redhat.com>
5090
5091 * lex.c (java_read_char): Disallow invalid and overlong
5092 sequences. Fixes PR java/2319.
5093
5094 2001-06-05 Jeff Sturm <jsturm@one-point.com>
5095
5096 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
5097
5098 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
5099
5100 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
5101 arguments accordingly.
5102
5103 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
5104
5105 * gcj.texi: Move contents to just after title page.
5106
5107 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
5108
5109 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
5110 builtin type.
5111 (patch_incomplete_class_ref): Build the class ref, build the class
5112 init if necessary, complete the tree.
5113 Fixes PR java/2605
5114
5115 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
5116
5117 * parse.y (lookup_field_wrapper): Test `name' code.
5118 (resolve_qualified_expression_name): Test `qual_wfl' code.
5119 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
5120 handle `qual_wfl' by code.
5121 (maybe_build_primttype_type_ref): Test `wfl' code.
5122
5123 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5124
5125 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
5126 fdl.texi.
5127 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
5128 the dvi file in the java directory.
5129
5130 2001-05-25 Sam TH <sam@uchicago.edu>
5131
5132 * gen-table.pl javaop.h jcf.h lex.h,
5133 parse.h: Fix header include guards.
5134
5135 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
5136
5137 * jv-scan.c (version): Update copyright year.
5138
5139 2001-05-21 Per Bothner <per@bothner.com>
5140
5141 * jcf-parse.c (read_class): If class is from .class or .zip file
5142 and it's already been read, don't push/pop parser context.
5143
5144 2001-05-18 Per Bothner <per@bothner.com>
5145
5146 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
5147 command line so the jvgenmain-generated main program comes first.
5148
5149 2001-05-15 Tom Tromey <tromey@redhat.com>
5150
5151 * class.c (build_utf8_ref): Don't generate identifier based on
5152 utf8const contents.
5153
5154 2001-05-12 Richard Henderson <rth@redhat.com>
5155
5156 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
5157 * expr.c (java_lang_expand_expr): Expand it.
5158 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
5159 calling build_exception_object_ref.
5160 * parse.y (catch_clause_parameter): Likewise.
5161 (build_dot_class_method): Likewise.
5162 (try_reference_assignconv): Likewise.
5163 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
5164 * jcf-write.c (generate_bytecode_insns): Likewise.
5165
5166 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
5167
5168 * parse.y (build_unresolved_array_type): Set
5169 EXPR_WFL_QUALIFICATION on the newly created wfl.
5170 Fixes PR java/2538. Fixes PR java/2535.
5171
5172 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
5173
5174 * parse.y (fix_constructors): Removed unnecessary assignment to
5175 local. Moved assignment to `this$<n>', fixed comments and
5176 indentation.
5177 (build_wfl_wrap): Fixed indentation.
5178 Fixes PR java/2598, java/2579 and java/2658.
5179
5180 2001-05-03 Mo DeJong <mdejong@redhat.com>
5181
5182 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
5183 check for byte swap.
5184
5185 2000-05-02 Jeff Sturm <jsturm@one-point.com>
5186
5187 * expr.c (build_class_init): Move MODIFY_EXPR
5188 outside of COND_EXPR. Remove variable `call'.
5189
5190 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5191
5192 * decl.c: NULL_PTR -> NULL.
5193 * jcf-write.c: Likewise.
5194
5195 2001-05-01 Tom Tromey <tromey@redhat.com>
5196
5197 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
5198 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
5199 * gcj.texi: Updated copyright text. Include fdl.texi.
5200 (Top): Link to new node.
5201
5202 2001-05-01 Per Bothner <per@bothner.com>
5203
5204 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
5205
5206 2001-05-01 Per Bothner <per@bothner.com>
5207
5208 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
5209 import_list contains the name, not the TREE_PURPOSE.
5210
5211 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5212
5213 * jcf-io.c (read_zip_member): Cast to long in comparison with
5214 signed value.
5215
5216 * jvspec.c (lang_specific_driver): Initialize variables.
5217
5218 * mangle.c (find_compression_record_match): Likewise.
5219
5220 * typeck.c (build_null_signature): Provide static prototype. Mark
5221 parameter with ATTRIBUTE_UNUSED.
5222
5223 * verify.c (verify_jvm_instructions): Initialize variable.
5224
5225 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5226
5227 * parse.y (do_resolve_class): Check for cyclic inheritance during
5228 inner class resolution.
5229
5230 2001-04-27 Per Bothner <per@bothner.com>
5231
5232 * parse.y (java_expand_classes): Don't change ctxp_for_generation
5233 while iterating, since that could cause gc to lose stuff.
5234
5235 2001-04-26 Per Bothner <per@bothner.com>
5236
5237 Fix method search wrt scope of inner classes to match JLS2.
5238 * typeck.c (build_null_signature): New static function.
5239 (has_method): New function. Uses build_null_signature and lookup_do.
5240 * java-tree.h (has_method): New declaration.
5241 * parse.y (find_applicable_accessible_methods_list): Do not search
5242 context of inner classes here.
5243 (patch_method_invocation): Search scope, ie. current and outer clases,
5244 for method matching simple name, to find class.
5245
5246 2001-04-26 Per Bothner <per@bothner.com>
5247
5248 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
5249 Fix thinko: If a single case, use if_icmpeq, not ifeq.
5250
5251 * constants.c (find_methodref_with_class_index): New function.
5252 (find_methodref_index): Use find_methodref_with_class_index.
5253 * java-tree.h (find_methodref_with_class_index): New declaration.
5254 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
5255 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
5256 If context changed from interface to class, don't use invokeinterface.
5257
5258 2001-04-25 Per Bothner <per@bothner.com>
5259
5260 * verify.c (verify_jvm_instructions): For field instructions,
5261 check that field index is valid. For invoke instructions, check that
5262 method index is valid.
5263
5264 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
5265
5266 * config-lang.in (target_libs): Copy from $libgcj_saved.
5267
5268 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5269
5270 * decl.c (init_decl_processing): Add new class "protectionDomain"
5271 field.
5272 * class.c (make_class_data): Set initial value for "protectionDomain".
5273
5274 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5275
5276 * jvspec.c (lang_specific_driver): Fix memory allocation
5277 deficit, by using concat in lieu of xmalloc/sprintf.
5278
5279 2001-04-20 Per Bothner <per@bothner.com>
5280
5281 Fixes to compile multiple .class files at once.
5282 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
5283 * java-tree.h (CLASS_PARSED_P): New macro.
5284 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
5285 * jcf-parse.c (jcf_parse_source): Inline into read_class.
5286 (read_class): Avoid some code duplication.
5287 Don't call JCF_FINISH for a .class file - might be needed later.
5288 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
5289 rather than CLASS_LOADED_P, since latter implies class laid out.
5290 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
5291 * parse.y: Don't need to set CLASS_LOADED_P for array types.
5292
5293 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5294
5295 * Make-lang.in (java/boehm.o): Depend on toplev.h.
5296
5297 * boehm.c: Include toplev.h.
5298
5299 2001-04-06 Tom Tromey <tromey@redhat.com>
5300 Alexandre Petit-Bianco <apbianco@redhat.com>
5301
5302 Fix for PR gcj/1404 and PR gcj/2332:
5303 * parse.y (build_array_from_name): If we use the type_wfl then
5304 accumulate dimensions from the original type as well.
5305 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
5306
5307 2001-04-06 Tom Tromey <tromey@redhat.com>
5308
5309 * parse.y (analyze_clinit_body): Return true if the second operand
5310 of a METHOD_EXPR is nonzero.
5311
5312 2001-04-06 Tom Tromey <tromey@redhat.com>
5313
5314 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
5315 directory.
5316 ($(srcdir)/java/parse.c): Likewise.
5317
5318 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
5319
5320 * gcj.texi: Use `which-gcj' instead of `which-g77.'
5321 (version-gcc): Initialized.
5322 (which-gcj): Likewise.
5323
5324 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
5325
5326 * java-tree.h (struct lang_decl): New macro
5327 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
5328 * parse.y (build_instance_initializer): New function.
5329 (add_instance_initializer): Use it.
5330 (java_fix_constructors): Set `current_class' before fix pass.
5331 (fix_constructors): Just return if already fixed. Move `super()'
5332 invocation ahead. Use `build_instance_initializer.'
5333 Fixes PR java/1315.
5334
5335 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
5336
5337 * parse.y (resolve_qualified_expression_name): Pass field's
5338 DECL_CONTEXT to `not_accessible_p.'
5339 (not_accessible_p): Changed parameters order in `inherits_from_p'
5340 invocation.
5341
5342 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
5343
5344 * lang-options.h: Add flag_check_references.
5345
5346 2001-04-04 Per Bothner <per@bothner.com>
5347
5348 * java-tree.h (CONSTANT_VALUE_P): New macro.
5349 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
5350 * parse.y (maybe_build_class_init_for_field): New static function.
5351 (resolve_expression_name, resolve_field_access): Use
5352 maybe_build_class_init_for_field instead of build_class_init
5353 This does not do the init if the field is compile-time-constant.
5354 (resolve_field_access): Simplify.
5355
5356 * parse.y (fold_constant_for_init): Merge test into switch.
5357
5358 2001-04-03 Zack Weinberg <zackw@stanford.edu>
5359
5360 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
5361 on gansidecl.h.
5362 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
5363
5364 2001-04-02 Zack Weinberg <zackw@stanford.edu>
5365
5366 * expr.c (pop_type_0): Save the result of the first
5367 lang_printable_name call in a scratch buffer, so it
5368 won't be clobbered by the second call.
5369
5370 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
5371
5372 * parse-scan.y (array_type:): Rewritten.
5373 (type_declaration:): `empty_statement' replaces `SC_TK.'
5374 (class_member_declaration:): `empty statement' added.
5375 (method_body:): Simplified.
5376 (static_initializer:): Likewise.
5377 (primary_no_new_array:): Use `type_literals.'
5378 (type_literals:): New rule.
5379 (dims:): Set and update `bracket_count.'
5380 Fixes PR java/1074. Fixes PR java/2412.
5381
5382 2001-03-28 Hans Boehm <boehm@acm.org>
5383
5384 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
5385 (get_boehm_type_descriptor): Set type on returned value to be a
5386 pointer length integer.
5387
5388 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5389
5390 * expr.c (pop_type_0): Call `concat' rather than building the
5391 string manually.
5392 (pop_type): Add format specifier in call to `error'.
5393
5394 * parse.y (patch_method_invocation): Avoid casting away
5395 const-ness.
5396
5397 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
5398
5399 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
5400
5401 2001-03-28 Richard Henderson <rth@redhat.com>
5402
5403 IA-64 ABI Exception Handling:
5404 * Make-lang.in (except.o): Don't depend on eh-common.h.
5405 * check-init.c (check_init): Handle EXC_PTR_EXPR.
5406 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
5407 [soft_exceptioninfo_call_node]: Remove.
5408 [eh_personality_libfunc, lang_eh_runtime_type]: New.
5409 (end_java_method): No emit_handlers.
5410 * except.c (java_set_exception_lang_code): Remove.
5411 (method_init_exceptions): Don't call it.
5412 (prepare_eh_table_type): No CATCH_ALL_TYPE.
5413 (build_exception_object_ref): New.
5414 (expand_end_java_handler): Update for except.h name changes.
5415 (emit_handlers, expand_resume_after_catch): Remove.
5416 * expr.c (java_lang_expand_expr): Update for except.h name changes.
5417 (process_jvm_instruction): Use build_exception_object_ref.
5418 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
5419 (soft_exceptioninfo_call_node): Remove.
5420 (build_exception_object_ref): Declare.
5421 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
5422 soft_exceptioninfo_call_node. Move processing ...
5423 [EXC_PTR_EXPR]: ... here.
5424 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
5425 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
5426 (source_end_java_method): No java_set_exception_lang_code or
5427 emit_handlers.
5428 (build_dot_class_method): Use build_exception_object_ref.
5429 (try_reference_assignconv): Check EXC_PTR_EXPR not
5430 soft_exceptioninfo_call_node.
5431
5432 2001-03-28 Richard Henderson <rth@redhat.com>
5433
5434 * java-tree.h (throw_node): Define as a single member of
5435 java_global_trees instead of a separate array.
5436 (JTI_THROW_NODE): New.
5437 * decl.c (throw_node): Don't declare.
5438 (init_decl_processing): Init a scalar throw_node.
5439 Don't register it for gc.
5440 * check-init.c (check_init): Reference scalar throw_node.
5441 * expr.c (build_java_athrow): Likewise.
5442 * jcf-write.c (generate_bytecode_insns): Likewise.
5443 * parse.h (BUILD_THROW): Likewise.
5444
5445 2001-03-28 Richard Henderson <rth@redhat.com>
5446
5447 * decl.c (end_java_method): Do not save and restore
5448 flag_non_call_exceptions.
5449 * parse.y (source_end_java_method): Likewise.
5450 * lang.c (flag_exceptions): Don't declare.
5451 (java_init_options): Set flag_non_call_exceptions. Set
5452 flag_exceptions here ...
5453 (java_init): ... not here.
5454
5455 2001-03-27 Richard Henderson <rth@redhat.com>
5456
5457 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
5458 exceptions_via_longjmp.
5459
5460 * lang.c (flag_new_exceptions): Don't declare it.
5461 (java_init_options): Or set it.
5462
5463 2001-03-27 Richard Henderson <rth@redhat.com>
5464
5465 * decl.c (end_java_method): Rename asynchronous_exceptions to
5466 flag_non_call_exceptions.
5467 * parse.y (source_end_java_method): Likewise.
5468
5469 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5470
5471 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
5472
5473 2001-03-26 Mark Mitchell <mark@codesourcery.com>
5474
5475 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
5476
5477 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
5478
5479 * parse.y (find_as_inner_class): Follow current package
5480 indications not to mistakingly load an unrelated class.
5481
5482 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5483
5484 * constants.c (PUTN): Use memcpy, not bcopy.
5485
5486 * lex.c (java_read_char): Use memmove, not bcopy.
5487
5488 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
5489
5490 2001-03-23 Per Bothner <per@bothner.com>
5491
5492 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
5493 macro for better error pin-pointing.
5494 * java-tree.h: Fix typo in comment.
5495
5496 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
5497 Don't include jsr/goto in exception range.
5498 Check if start and end of exception range are the same (also TRY_EXPR).
5499 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
5500 However, do emit the following goto even if try_block is empty.
5501 Defer freeing exception_decl until after the finalizer, to make
5502 sure the local isn't reused in the finalizer. Fixes PR java/1208.
5503
5504 * parse.y (java_complete_lhs): If the try-clause is empty, just
5505 return the finally-clause and vice versa.
5506
5507 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
5508
5509 * gcj.texi (Input Options): documented the check for attribute
5510 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
5511 * java-tree.h (flag_force_classes_archive_check): Declared extern.
5512 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
5513 (jcf_parse): Check for the right classes archive if necessary.
5514 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
5515 (jcf_parse_fields): Fixed indentation.
5516 * jcf-write.c (append_gcj_attribute): New function.
5517 (generate_classfile): Compute the attribute count, invoke
5518 `append_gcj_attribute'.
5519 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
5520 turned into bit-fields. New bit-field `right_zip.'
5521 (JCF_ZERO): Set `right_zip' to zero.
5522 * lang-options.h (-fforce-classes-archive-check): Added flag.
5523 * lang.c (flag_force_classes_archive_check): New flag.
5524 (lang_f_options): New entry `force-classes-archive-check.'
5525 Fixes PR java/1213.
5526
5527 2001-02-07 Andrew Haley <aph@redhat.com>
5528
5529 * gcj.texi (Configure-time Options): Add -fcheck-references.
5530 * expr.c (build_java_indirect_ref): New function.
5531 (java_check_reference): New function.
5532 (build_java_array_length_access): Use build_java_indirect_ref to
5533 check for null references.
5534 (build_java_arrayaccess): Likewise.
5535 (build_get_class): Likewise.
5536 (build_field_ref): Likewise.
5537 (invoke_build_dtable): Likewise.
5538 (build_invokeinterface): Likewise.
5539 * lang.c (lang_f_options): Add flag_check_references.
5540 * jvspec.c (jvgenmain_spec): Add flag_check_references.
5541 * java-tree.h (flag_check_references): New variable.
5542 * lang.c (flag_check_references): Likewise.
5543 * parse.y (patch_invoke): Use java_check_reference.
5544 (patch_assignment): Allow for extra nesting in
5545 _Jv_CheckArrayStore.
5546
5547 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
5548
5549 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
5550 * lex.c (cxx_keywords): Likewise.
5551
5552 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
5553
5554 * parse.y (qualify_ambiguous_name): Broaden `length'
5555 recognition. Help MODIFY_EXPR be resolved as expression names.
5556 Fixes PR java/2066. Fixes PR java/2400.
5557
5558 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
5559
5560 * gjavah.c (process_file): Mark interface definitions with
5561 "__attribute__ ((java_interface))".
5562
5563 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
5564
5565 * class.c (layout_class): Fixed push_super_field's second
5566 argument. Fixes PR java/2333.
5567 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
5568 too early to lay innerclasses out.
5569
5570 2001-03-20 Tom Tromey <tromey@redhat.com>
5571 Alexandre Petit-Bianco <apbianco@redhat.com>
5572
5573 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
5574 inside an array reference. Insertion of the array store check
5575 rewritten. Fixes PR java/2299.
5576
5577 2001-03-20 Tom Tromey <tromey@redhat.com>
5578
5579 * lex.c (java_read_unicode): Only accept leading `u's.
5580
5581 2001-03-20 Tom Tromey <tromey@redhat.com>
5582
5583 * jcf-parse.c (read_class): Initialize `class'.
5584
5585 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
5586
5587 * jcf_parse.c (jcf_parse): Eliminate unused variable.
5588
5589 2001-03-19 Mark Mitchell <mark@codesourcery.com>
5590
5591 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
5592 (layout_class): Likewise.
5593 (layout_class_method): Likewise.
5594 (emit_register_classes): Likewise.
5595 * decl.c (builtin_function): Likewise.
5596 (give_name_to_locals): Likewise.
5597
5598 2001-03-19 Per Bothner <per@bothner.com>
5599
5600 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
5601 before trying to load an inner class.
5602
5603 Fixes to process to command-line .class files in two passes.
5604 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
5605 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
5606 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
5607 * class.c (is_compiled_class): Fix for renamed flag.
5608 * parse.y (maybe_create_class_interface_decl): Likewise.
5609 * jcf-parse.c (yyparse): Also set if compiling .class files.
5610 * jcf-parse.c (read_class); Read current_class.
5611 (jcf_parse): Make static.
5612 (load_inner_classes): New function, with code moved from jcf_parse,
5613 because we need to inner classes after the command-line files are read.
5614 (yyparse): Set finput to NULL when it doesn't need to be closed.
5615 Reduce use of main_jcf (basically only for archive) and
5616 use finput instead of main_jcf->read_state.
5617 Inline jcf_figure_file_type into yyparse.
5618 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
5619 Defer load_inner_classes and parse_class_file to a second pass,
5620 after we've correctly mapped command-line .clas fiels to classes.
5621 (jcf_figure_file_type): Removed.
5622 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
5623 (JCF_ZERO): Also clear zipd field.
5624 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
5625
5626 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
5627
5628 * jcf-parse.c (yyparse): Change ch from char * to char.
5629
5630 2001-03-19 Per Bothner <per@bothner.com>
5631
5632 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
5633 Add constructed filelist-file at end, following -xjava. Thus any .o
5634 and library files are not affected by the -xjava. Also wrap
5635 explicit @FILE with -xjava and -xnone.
5636
5637 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
5638
5639 * class.c (build_static_field_ref): Call make_decl_rtl() after
5640 setting the DECL_EXTERNAL flag.
5641
5642 2001-03-17 Per Bothner <per@bothner.com>
5643
5644 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
5645
5646 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
5647 when result is is needed (target is STACK_TARGET).
5648
5649 * parse.h (JDEP_SOLV): Removed.
5650 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
5651
5652 * parse.y (incomplete_class_list): Removed.
5653 (obtain_incomplete_type): Don't use or set incomplete_class_list.
5654 It doesn't work if resolve_class changes the name of an array type
5655 that is on the list and then someone else looks for the modified name.
5656 Also, seems liable to break when compiling multiple source files at
5657 once. So the simplest is to just remove incomplete_class_list -
5658 it is only a minor space win and it is not even clear it saves time.
5659
5660 * parse.y (resolve_class): Remove unneeded promote_type.
5661
5662 2001-03-15 Per Bothner <per@bothner.com>
5663
5664 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
5665 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
5666 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
5667 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
5668
5669 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
5670 * parse.y (java_expand_classes): Likewise.
5671
5672 * parse.y (expand_start_java_method): Was only called once and had a
5673 misleading name, so inline in caller java_complete_expand_method.
5674 (enter_a_block): Likewise inline in enter_block and remove.
5675
5676 Remove junk from when gcc/java was created (by copying from C/C++).
5677 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
5678 (struct binding_level): Remove fields keep, keep_if_subblocks,
5679 more_cleanups_ok, have_cleanups (which have never been used).
5680 (pushlevel, poplevel): Remove related useless code.
5681
5682 * class.c (make_class_data): The class_dtable_decl (i.e. the
5683 vtable for Class) should be external, except when compiling Class.
5684
5685 * jvspec.c (lang_specific_driver): Fix -C handling.
5686 Check -save-temps to see if temp @FILE should be deleted.
5687 Follow-up to/fix for February 16 patch.
5688
5689 * verify.c (verify_jvm_instructions): Better error msgs for dup.
5690 (type_stack_dup): Remove no-longer neded error check.
5691
5692 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
5693
5694 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
5695 to 'for_pointer'. If this type is for a pointer (argument) mangling,
5696 don't surround the element with 'N..E' if the type name is
5697 unqualified.
5698
5699 2001-03-14 Mark Mitchell <mark@codesourcery.com>
5700
5701 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
5702 DECL_RTL_SET_P, etc.
5703 (make_method_value): Likewise.
5704 (get_dispatch_table): Likewise.
5705
5706 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5707
5708 2001-03-07 Tom Tromey <tromey@redhat.com>
5709
5710 * config-lang.in (lang_requires): Define.
5711
5712 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
5713
5714 * typeck.c (convert): Check flag_unsafe_math_optimizations,
5715 not flag_fast_math.
5716
5717 2001-03-05 Per Bothner <per@bothner.com>
5718
5719 Fix a problem where rest_of_decl_compilation applied to
5720 class_dtable_decl causes problems because it was done too early,
5721 before output file was opened.
5722 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
5723 * class.c (class_dtable_decl): Add macro - element of class_roots.
5724 (make_class_data): Define class_dtable_decl.
5725 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
5726
5727 2001-03-01 Zack Weinberg <zackw@stanford.edu>
5728
5729 * java/class.c, java/decl.c, java/java-tree.h: Replace all
5730 uses of 'boolean' with 'bool'.
5731
5732 2001-03-01 Zack Weinberg <zackw@stanford.edu>
5733
5734 * lang-specs.h: Add zero initializer for cpp_spec field to all
5735 array elements.
5736
5737 2001-02-16 Per Bothner <per@bothner.com>
5738
5739 Handle compiling multiple input files at once, and @FILE syntax.
5740 * gcj.texi: Updated documentation to match.
5741 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
5742 * jcf-parse.c (parse_source_file): Split into ...
5743 (parse_source_file_1): New function - and:
5744 (parse_source_file_2): New function.
5745 (yyparse): On -ffilelist-file, open and scan named file.
5746 On first pass over files, only do parse_source_file_1.
5747 A new second pass calls parse_source_file_2 for each file to compile.
5748 (init_jcf_parse): Call init_src_parse.
5749 * jvspec.c (INDIRECT_FILE_ARG): New flag.
5750 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
5751 as multiple input file combined in one compilation.
5752 * lang-options.h: Add -ffilelist-file
5753 * lang.c (flag_filelist_file): New flag variable.
5754 (lang_f_options): Handle -ffilelist-file.
5755 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
5756 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
5757 gclass_list - use global fields of src_parse_roots instead.
5758 * parse.y (src_parse_roots): New array.
5759 (incomplete_class_list, gclass_list): New macros.
5760 (push_parser_context, java_pop_parser_context,
5761 java_parser_context_resume): Don't fiddle with deleted fields.
5762 (various): Use incomplete_class gclass_list and global macros
5763 instead of parse_ctxt fields - the lists are global.
5764 (init_src_parse): New function.
5765
5766 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5767
5768 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
5769
5770 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
5771
5772 * parse.y (check_inner_class_access): Moved declaration of local
5773 `enclosing_decl_type' to the right location.
5774
5775 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
5776
5777 * parse.y (parser_check_super_interface): Don't call
5778 check_pkg_class_access for an inner interface.
5779 (parser_check_super): Don't call check_pkg_class_access for inner
5780 class.
5781 (do_resolve_class): Simplify enclosing type loop. Don't call
5782 check_pkg_class_access if CL and DECL are not set.
5783 (find_in_imports_on_demand): Set DECL if class_type needed to be
5784 loaded. Don't call check_pkg_class_access for an inner class.
5785 (check_inner_class_access): Rewritten to implement member access
5786 rules as per spec 6.6.1.
5787 (check_pkg_class_access): Handle the empty package correctly.
5788 (in_same_package): New function. Determine if two classes are in the
5789 same package.
5790
5791 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
5792
5793 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
5794 method into array types.
5795 * parse.y (patch_method_invocation): Bypass access check on clone call
5796 to array instance.
5797
5798 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
5799
5800 * expr.c (build_instanceof): Check for arrays when trying fold to
5801 false.
5802
5803 2001-02-15 Jim Meyering <meyering@lucent.com>
5804
5805 * Make-lang.in (java.install-common): Depend on `installdirs'.
5806 (java.install-info): Likewise.
5807
5808 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
5809
5810 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
5811
5812 2001-02-14 Tom Tromey <tromey@redhat.com>
5813 Alexandre Petit-Bianco <apbianco@cygnus.com>
5814
5815 Fix for PR java/1261.
5816 * typeck.c (build_java_array_type): Add public `clone' method to
5817 arrays.
5818 * parse.y (resolve_qualified_expression_name): Use current_class
5819 when checking for inaccessibility.
5820 (patch_method_invocation): Fixed error message when accessibility
5821 denied. Added `from_super' argument.
5822
5823 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
5824
5825 * parse.y (resolve_class): Don't build a fake decl. Use the one
5826 already built.
5827 * typeck.c (build_java_array_type): Build and assign decl to array
5828 type.
5829
5830 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
5831
5832 * parse.y (not_accessible_p): Changed leading comment. Added extra
5833 `where' argument. Use it to enforce protected access rules.
5834 (resolve_qualified_expression_name): Added extra argument to
5835 not_accessible_p.
5836 (patch_method_invocation): Use argument `primary' to provide
5837 not_accessible_p with an extra argument.
5838 (lookup_method_invoke): Added extra argument to not_accessible_p.
5839 (search_applicable_method_list): Likewise.
5840
5841 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
5842
5843 * parse.y (resolve_qualified_expression_name): Try to resolve as
5844 an inner class access only if `decl' is a TYPE_DECL.
5845
5846 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
5847
5848 * decl.c (classdollar_identifier_node): Initialize.
5849 * java-tree.h (enum java_tree_index): New entry
5850 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
5851 (classdollar_identifier_node): New macro.
5852 (ID_CLASSDOLLAR_P): Likewise.
5853 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
5854 (build_dot_class_method_invocation): Likewise.
5855 (find_applicable_accessible_methods_list): `class$' can't be
5856 inherited.
5857
5858 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
5859
5860 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
5861
5862 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
5863
5864 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
5865 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
5866 gone.
5867
5868 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
5869
5870 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
5871 outside of the `__U' sequence too.
5872 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
5873 sequence too.
5874
5875 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
5876
5877 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
5878
5879 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
5880
5881 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
5882 (JVGENMAIN_OBJS): Likewise.
5883 * java-tree.h (append_gpp_mangled_name): New prototype.
5884 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
5885 Removed cast calling `gcc_add_root.'
5886 * jvgenmain.c (mangle_obstack): New global, initialized.
5887 (main): Use it.
5888 (do_mangle_class): Constify local `ptr.'
5889 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
5890 append_gpp_mangle_name and update `count' if necessary.
5891 Use `mangle_obstack.'
5892 * mangle.c (append_unicode_mangled_name): Removed.
5893 (append_gpp_mangled_name): Likewise.
5894 (unicode_mangling_length): Likewise.
5895 (mangle_member_name): Return type set to `void.'
5896 (mangle_field_decl): Don't append `U' in escaped names.
5897 (mangle_method_decl): Likewise.
5898 (mangle_member_name): Just use `append_gpp_mangled_name.'
5899 * mangle_name.c: New file.
5900
5901 2001-02-07 Per Bothner <per@bothner.com>
5902
5903 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
5904
5905 * check-init.c (check_init): Don't call done_alternative after
5906 processing loop code, as a LOOP_EXPR never terminates normally.
5907
5908 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
5909
5910 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
5911
5912 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
5913
5914 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
5915 DECLs.
5916
5917 2001-02-06 Tom Tromey <tromey@redhat.com>
5918
5919 * lex.c (java_new_lexer): Longer error message.
5920
5921 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
5922 Alexandre Petit-Bianco <apbianco@cygnus.com>
5923
5924 * typeck.c (build_prim_array_type): Added leading comment.
5925 (build_java_array_type): Moved locals out of
5926 block. Always create the `data' field, fixed alignment to match
5927 C++.
5928
5929 2001-02-04 Tom Tromey <tromey@redhat.com>
5930
5931 * expr.c (java_lang_expand_expr): Don't bother recomputing
5932 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
5933 Fixes PR java/1866.
5934
5935 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
5936
5937 * parse.y (process_imports): Save the original name of the import
5938 for better error report.
5939
5940 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
5941
5942 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
5943 of macros used when compiling jvspec.c.
5944 * jvspec.c (lang_specific_driver): Link with the shared
5945 libgcc by default.
5946
5947 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5948
5949 * check-init.c (check_init): Call internal_error instead of fatal.
5950 * expr.c (java_lang_expand_expr): Likewise.
5951 * jcf-parse.c (get_constant): Likewise.
5952 * mangle.c (java_mangle_decl): Likewise.
5953 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
5954 (operator_string): Likewise.
5955 * check-init.c (check_init): Call abort instead of fatal.
5956 * class.c (build_class_ref): Likewise.
5957 * constants.c (write_constant_pool): Likewise.
5958 * decl.c (start_java_method): Likewise.
5959 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
5960 (java_stack_dup, encode_newarray_type): Likewise.
5961 (build_java_array_length_access): Likewise.
5962 (build_java_check_indexed_type, expand_java_pushc): Likewise.
5963 (build_java_soft_divmod, build_invokeinterface): Likewise.
5964 * java-tree.h (INNER_CLASS_P): Likewise.
5965 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
5966 (give_name_to_class, get_class_constant): Likewise.
5967 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
5968 (find_constant_index, generate_bytecode_conditional): Likewise.
5969 (generate_bytecode_insns, perform_relocations): Likewise.
5970 * lex.c (java_unget_unicode, java_lex): Likewise.
5971 * mangle.c (mangle_type, mangle_record_type): Likewise.
5972 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
5973 (finish_mangling): Likewise.
5974 * parse.h (MARK_FINAL_PARMS): Likewise.
5975 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
5976 (obtain_incomplete_type, java_complete_class): Likewise.
5977 (java_check_regular_methods, java_complete_expand_method): Likewise.
5978 (cut_identifier_in_qualified, check_deprecation): Likewise.
5979 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
5980 (java_complete_lhs, lookup_name_in_blocks): Likewise.
5981 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
5982 * typeck.c (set_local_type, parse_signature_type): Likewise.
5983 (parse_signature_string, build_java_signature): Likewise;
5984 (set_java_signature): Likewise.
5985 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
5986 * class.c (add_method): Call fatal_error instead of fatal.
5987 (build_static_field_ref): Likewise.
5988 * expr.c (build_known_method_ref, expand_invoke): Likewise.
5989 * jcf-parse.c (get_constant, jcf_parse): Likewise.
5990 * lex.c (java_new_new_lexer): Likewise.
5991 * jv-scan.c (main): Likewise.
5992 (fatal_error): Renamed from fatal.
5993 * jcf-parse.c (yyparse): Call fatal_io_error instead of
5994 pfatal_with_name.
5995 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
5996 (yyparse): Likewise.
5997 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
5998 * lex.c (java_get_line_col): Likewise.
5999 * jcf-parse.c (load_class): Make errors non-fatal.
6000 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
6001
6002 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
6003
6004 * jvgenmain.c (class_mangling_suffix): Remove unused string.
6005 (error): Remove unused function.
6006 (main): Don't use "__attribute__ alias" on generated class symbol.
6007
6008 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
6009
6010 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
6011 argument.
6012 * parse.y (finish_method_declaration): Code accounting for WFLed
6013 method DECL_NAMEs deleted.
6014 (check_abstract_method_definitions): Likewise.
6015 (resolve_type_during_patch): Layout resolved type.
6016 * typeck.c (lookup_do): Removed unused local.
6017
6018 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
6019
6020 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
6021 * decl.c (init_decl_processing): Use integer_minus_one_node, not
6022 integer_negative_one_node.
6023 * expr.c (build_java_binop): Likewise.
6024
6025 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
6026
6027 * zextract.c (read_zip_archive): Read file_offset before writing
6028 zipd and consequently clobbering the header contents.
6029
6030 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6031
6032 * Make-lang.in: Remove all dependencies on defaults.h.
6033 * decl.c: Don't include defaults.h.
6034 * expr.c: Likewise.
6035 * parse.y: Likewise.
6036
6037 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
6038
6039 * ChangeLog (2001-01-21): Fixed typo.
6040 * class.c (layout_class_method): Code accounting for WFLed
6041 method DECL_NAMEs deleted.
6042 * constant.c (find_methodref_index): Likewise.
6043 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
6044 * java-tree.h (DECL_FUNCTION_WFL): New macro.
6045 (struct lang_decl): New field `wfl'.
6046 (java_get_real_method_name): Prototype deleted.
6047 * mangle.c (mangle_method_decl): Code accounting for WFLed
6048 method DECL_NAMEs deleted.
6049 * parse.h (GET_METHOD_NAME): Macro deleted.
6050 * parse.y (reset_method_name): Deleted.
6051 (method_header): Set DECL_FUNCTION_WFL.
6052 (check_abstract_method_header): Code accounting for WFLed method
6053 DECL_NAMEs deleted.
6054 (java_get_real_method_name): Deleted.
6055 (check_method_redefinition): Code accounting for WFLed method
6056 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
6057 (java_check_regular_methods): Likewise.
6058 (java_check_abstract_methods): Likewise.
6059 (java_expand_classes): Don't call `reset_method_name.'
6060 (search_applicable_method_list): Use DECL_NAMEs instead of
6061 GET_METHOD_NAME.
6062 * typeck.c (lookup_do): Code accounting for WFLed method
6063 DECL_NAMEs deleted.
6064
6065 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
6066
6067 * lex.c (java_read_char): Check for EOF from getc first.
6068
6069 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
6070
6071 * class.c (layout_class): Don't lay the superclass out if it's
6072 already being laid out.
6073 * jcf-parse.c (handle_innerclass_attribute): New function.
6074 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
6075 handle_innerclasses_attribute.
6076 (jcf_parse): Don't load an innerclasses if it's already being
6077 laid out.
6078 * jcf-write.c (append_innerclass_attribute_entry): Static
6079 `anonymous_name' and its initialization deleted. `ocii' and `ini'
6080 to be zero for anonymous classes.
6081
6082 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
6083
6084 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
6085 necessary.
6086 * jcf-parse.c (set_source_filename): Use
6087 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
6088
6089 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
6090
6091 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
6092 gets a unique asm name.
6093
6094 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
6095
6096 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
6097 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
6098 if necessary.
6099 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
6100 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
6101 * parse.y (lookup_package_type_and_set_next): Deleted.
6102 (resolve_package): Removed unnecessary code.
6103 (find_applicable_accessible_methods_list): `finit$' can't be
6104 inherited.
6105 * verify.c (pop_argument_types): Added missing prototype.
6106
6107 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
6108
6109 * config-lang.in: Disable java by default.
6110
6111 2001-01-23 Tom Tromey <tromey@redhat.com>
6112
6113 * gcj.texi (Copying): New node.
6114 Added copyright information.
6115
6116 2001-01-21 Per Bothner <per@bothner.com>
6117
6118 Various fixes to allow compiling a compressed .jar/.zip archive.
6119 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
6120 (struct ZipFile): Add fields name and next (from ZipFileCache).
6121 (struct ZipDirectory): New field zipf points to owning ZipFile.
6122 * jcf.h (struct ZipDirectory): Add forward declaration.
6123 (struct JCF): Declare zipd field to have type struct ZipDirectory.
6124 Remove seen_in_zip and zip_offset fields.
6125 (JCF_SEEN_IN_ZIP): New macro.
6126 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
6127 * jcf-io.c: Change all ZipFileCache to ZipFile.
6128 (read_zip_member): New function.
6129 (open_in_zip): Call read_zip_member.
6130 * jcf-parse.c (find_in_current_zip): Remove function.
6131 (read_class): Merge in find_in_current_zip functionality.
6132 Call read_zip_member if needed.
6133 (parse_zip_file_entries): Use read_zip_member.
6134 (process_zip_dir): Update for removed and added JCF fields.
6135 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
6136
6137 2001-01-21 Per Bothner <per@bothner.com>
6138
6139 Minor optimization of static ggc roots.
6140 * jcf-parse.c (parse_roots): New static field.
6141 (current_field, current_method, current_file_list): Replace by macros
6142 naming fields of parse_roots.
6143 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
6144 * class.c (class_roots): New static field.
6145 (registered_class, fields_ident, info_ident, class_list):
6146 New macros naming fields of parse_roots.
6147 (build_static_field_ref): Don't register roots here.
6148 (layout_class): Static field list replaced by macro class_list.
6149 (init_class_processing): Call ggc_add_tree_root for 4 roots.
6150 Initialize fields_ident and info_ident here.
6151
6152 2001-01-21 Per Bothner <per@bothner.com>
6153
6154 * jcf-parse.c (ggc_mark_jcf): New function.
6155 (init_jcf_parse): Register current_jcf as ggc root.
6156
6157 2001-01-21 Per Bothner <per@bothner.com>
6158
6159 * lang.c (put_decl_node): Print method's name.
6160
6161 2001-01-21 Per Bothner <per@bothner.com>
6162
6163 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
6164 (verify_jvm_instructions): Use it, for better error messages on loads.
6165
6166 2001-01-21 Per Bothner <per@bothner.com>
6167
6168 * verify.c (merge_type_state): Still may have to merge even if
6169 LABEL_VERIFIED (label).
6170
6171 2001-01-21 Per Bothner <per@bothner.com>
6172
6173 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
6174 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
6175
6176 2001-01-19 Per Bothner <per@bothner.com>
6177
6178 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
6179 if expeting an interface type. Refines Tom's change of 2000-09-12.
6180
6181 2001-01-18 Per Bothner <per@bothner.com>
6182
6183 * gcj.texi (Input Options): Mention .java files.
6184
6185 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
6186
6187 * lang-options.h (-Wunsupported-jdk11): Removed.
6188 * lang.c (flag_not_overriding): Deleted.
6189 (flag_static_local_jdk1_1): Likewise.
6190 (lang_W_options): Removed "unsupported-jdk11" entry.
6191 * parse.y (java_check_methods): Removed dead code.
6192
6193 2001-01-17 Tom Tromey <tromey@redhat.com>
6194
6195 Changes suggested by Per Bothner:
6196 * gcj.texi (Input Options): Don't mention input files.
6197 (Code Generation): Updated --main information.
6198 (Invoking jcf-dump): Mention that --javap is incomplete.
6199 From Alexandre Petit-Bianco:
6200 (Warnings): Don't mention -Wunsupported-jdk11.
6201 My stuff:
6202 (Compatibility): Mention JDK 1.2-ness of libraries.
6203 (Resources): Mention resources used when writing gcj.
6204
6205 2001-01-17 Tom Tromey <tromey@redhat.com>
6206
6207 * gcj.texi: New file.
6208 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
6209 (java.info): Depend on gcj.info.
6210 (java/gcj.dvi): New target.
6211 (java.dvi): Depend on gcj.dvi.
6212 (java.install-info): Wrote.
6213
6214 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
6215
6216 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
6217 having called make_decl_rtl.
6218
6219 2001-01-14 Per Bothner <per@bothner.com>
6220
6221 Various patches to emit better messages on verification errors.
6222 * expr.c (push_type_0): Return error indication on stack overflow,
6223 instead of callinfg fatal.
6224 (push_type): Now just call push_type_0 (nd fatal on overflow).
6225 (pop_type_0): Return detailed error message (in a char** argument).
6226 (pop_type): If pop_type_0 fails, print error message.
6227 (pop_argument_types): Moved to verify.c.
6228 * verify.c (pop_argument_types): Moved from expr.c.
6229 Return a (possible) error message, rather than void.
6230 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
6231 (verify_jvm_instruction): Use new macros, improving error messages.
6232 For case OPCODE_astore use object_ptr_type_node.
6233 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
6234 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
6235
6236 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
6237 constant, return body without wrapper. (Improves constant folding.)
6238 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
6239
6240 2001-01-13 Per Bothner <per@bothner.com>
6241
6242 * expr.c (expand_java_field_op): Assigning to a final field outside
6243 an initializer does not violate JVM spec, so should be warning, not
6244 error. (Sun's verifier does not complain - though MicroSoft's does.)
6245
6246 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
6247
6248 * gjavah.c (version), jcf-dump.c (version): Update copyright year
6249 to 2001.
6250
6251 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
6252
6253 * parse.y (resolve_expression_name): Permit instance variables from
6254 enclosing context in super constructor call.
6255 (resolve_qualified_expression_name): Permit enclosing class's qualified
6256 "this" in super constructor call.
6257
6258 2001-01-10 Mark Mitchell <mark@codesourcery.com>
6259
6260 * class.c (build_utf8_ref): Remove last argument in call to
6261 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
6262 (build_class_ref): Likewise.
6263 (build_static_field_ref): Likewise.
6264 (get_dispatch_table): Likewise.
6265 (layout_class_method): Likewise.
6266 (emit_register_classes): Likewise.
6267 * constants.c (build_constant_data_ref): Likewise.
6268 * decl.c (builtin_function): Likewise.
6269 (create_primitive_vtable): Likewise.
6270 * expr.c (build_known_method_def): Likewise.
6271 (build_jni_stub): Likewise.
6272 (java_lang_expand_expr): Likewise.
6273
6274 2001-01-10 Tom Tromey <tromey@redhat.com>
6275
6276 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
6277
6278 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
6279
6280 * java-tree.h (lang_printable_name_wls): New prototype.
6281 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
6282 rather than `current_class' to print type name. Don't prepend type
6283 names when printing constructor names.
6284 (lang_printable_name_wls): New function.
6285 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
6286 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
6287 * parse.y (patch_method_invocation): Message tuned for constructors.
6288 (not_accessible_p): Grant `private' access from within
6289 enclosing contexts.
6290
6291 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
6292
6293 All files with updated copyright when applicable.
6294 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
6295 * class.c (mangle_class_field): Function removed.
6296 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
6297 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
6298 (build_class_ref): Call `java_mangle_class_field' instead of
6299 `mangle_class_field.'
6300 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
6301 (layout_class): Call `java_mangle_decl' instead of
6302 `mangle_static_field.'
6303 (cxx_keywords): Initialized static array moved to `lex.c.'
6304 (layout_class_method): Changed leading comment. Simplified to
6305 call `java_mangle_decl.' Local `ptr' moved in for loop body.
6306 * decl.c (lang_mark_tree): Mark field `package_list.'
6307 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
6308 (struct lang_type): New field `package_list.'
6309 (unicode_mangling_length): Prototype removed.
6310 (append_gpp_mangled_name, append_gpp_mangled_classtype,
6311 emit_unicode_mangled_name): Likewise.
6312 (cxx_keyword_p): New prototype.
6313 (java_mangle_decl, java_mangle_class_field,
6314 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
6315 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
6316 `build_expr_wfl.'
6317 * jvgenmain.c (main_method_prefix): Global variable removed.
6318 (main_method_suffix): Likewise.
6319 (do_mangle_classname): New function.
6320 (main): Call it. Format changed to accommodate new mangling scheme.
6321 * lex.c: (utf8_cmp): Conditionally prototyped.
6322 (cxx_keywords): Moved from class.c, conditionally defined.
6323 (utf8_cmp, cxx_keyword_p): Likewise.
6324 * mangle.c (obstack.h, ggc.h): Included.
6325 (mangle_field_decl): New function.
6326 (mangle_method_decl, mangle_type, mangle_pointer_type,
6327 mangle_array_type, mangle_record_type,
6328 find_compression_pointer_match, find_compression_array_match,
6329 find_compression_record_match,
6330 find_compression_array_template_match, set_type_package_list,
6331 entry_match_pointer_p, emit_compression_string, init_mangling,
6332 finish_mangling, compression_table_add, mangle_member_name): Likewise.
6333 (mangle_obstack): New global.
6334 (MANGLE_RAW_STRING): New macro.
6335 (unicode_mangling_length): Turned static.
6336 (append_unicode_mangled_name): Renamed from
6337 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
6338 replaces `obstack', removed from the parameter list.
6339 (append_gpp_mangled_name): Turned static. `mangle_obstack'
6340 replaces parameter `obstack', removed from the parameter list. Call
6341 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
6342 (append_gpp_mangled_classtype): Removed.
6343 (compression_table, compression_next): New static variables.
6344 * parse.y (temporary_obstack): Extern declaration removed.
6345
6346 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
6347
6348 * parse.y (patch_binop): Compute missing type in error situations.
6349
6350 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
6351
6352 * class.c (make_class_data): Push initial value for "arrayclass".
6353 * decl.c (init_decl_processing): Add new class field "arrayclass".
6354
6355 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
6356
6357 From patha@softlab.ericsson.se:
6358 * parse.y (switch_label): Use build, not build1, to construct
6359 DEFAULT_EXPR.
6360
6361 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
6362
6363 * lang.c (lang_decode_option): Change -MA to -MP.
6364 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
6365 Update to new prototype; do quote targets.
6366 (jcf_dependency_write): Update.
6367
6368 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
6369
6370 Shorten primitive array allocation path:
6371 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
6372 to create new primitive arrays.
6373 * expr.c (build_newarray): If generating native code, call
6374 soft_newarray_node with a reference to the primitive TYPE identifier
6375 instead of type_value.
6376
6377 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
6378
6379 Fix for PRs gcj/312 and gcj/253:
6380 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
6381 dest if they arn't already.
6382 * class.c (layout_class): Call maybe_layout_super_class on
6383 superinterfaces also, but only if compiling from bytecode.
6384
6385 Fix for PR gcj/373:
6386 * parse.y (create_class): Set ACC_STATIC if class is declared in an
6387 interface.
6388
6389 2000-12-15 Tom Tromey <tromey@redhat.com>
6390
6391 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
6392 set.
6393
6394 2000-12-14 Andrew Haley <aph@redhat.com>
6395
6396 * boehm.c (mark_reference_fields): Change test to correctly detect
6397 bitmap overflow.
6398
6399 2000-12-15 Andreas Jaeger <aj@suse.de>
6400
6401 * config-lang.in (lang_dirs): Added.
6402
6403 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
6404
6405 * parse.y (end_artificial_method_body): Fixed undefined behavior.
6406 Credits go to rth for finding it.
6407
6408 2000-12-13 Mike Stump <mrs@wrs.com>
6409
6410 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
6411
6412 2000-11-07 Tom Tromey <tromey@cygnus.com>
6413
6414 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
6415 * lex.c (java_ignorable_control_p): Removed.
6416 (java_letter_or_digit_p): Removed.
6417 (java_start_char_p): New function.
6418 (java_read_char): Return `int', not `unicode_t'. Changed
6419 callers.
6420 (java_read_unicode): Likewise.
6421 (java_read_unicode_collapsing_terminators): Likewise.
6422 (java_get_unicode): Likewise.
6423 (java_new_lexer): Initialize hit_eof.
6424 (java_parse_end_comment): Take `int' argument.
6425 (java_parse_doc_section): Likewise.
6426 (java_parse_escape_sequence): Don't allow backlash-newline.
6427 Return `int'.
6428 * lex.h (JAVA_DIGIT_P): Removed.
6429 (_JAVA_LETTER_OR_DIGIT_P): Removed.
6430 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
6431 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
6432 (JAVA_PART_CHAR_P): New macro.
6433 (UEOF): Now -1.
6434 (JAVA_CHAR_ERROR): Now -2.
6435 (java_lexer): New field `hit_eof'.
6436 * chartables.h: New file.
6437 * gen-table.pl: new file.
6438
6439 2000-11-20 Tom Tromey <tromey@cygnus.com>
6440 Alexandre Petit-Bianco <apbianco@cygnus.com>
6441
6442 * parse.y (java_complete_lhs): Only allow compound assignment of
6443 reference type if type is String.
6444
6445 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
6446
6447 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
6448 jcf-path.c: Likewise.
6449
6450 2000-12-09 Anthony Green <green@redhat.com>
6451
6452 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
6453 filestart and filename_length as int values.
6454
6455 2000-12-07 Mo DeJong <mdejong@redhat.com>
6456
6457 * jcf-io.c (find_class): Correct the logic that tests to see if a
6458 .java file is newer than its .class file. The compiler was
6459 incorrectly printing a warning when file mod times were equal.
6460
6461 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
6462
6463 * jvgenmain.c: Use ISPRINT not isascii.
6464
6465 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
6466
6467 * parse.y (end_artificial_method_body): Fixed typo.
6468
6469 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
6470
6471 * parse.y (patch_method_invocation): Pick the correct enclosing
6472 context when creating inner class instances.
6473 Fixes gcj/332.
6474
6475 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
6476
6477 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
6478 Update copyright year to 2000.
6479
6480 2000-11-23 Anthony Green <green@redhat.com>
6481
6482 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
6483 Move current_file_list out of yyparse and make it static.
6484
6485 * expr.c: Declare quick_stack and tree_list_free_list as static
6486 (init_expr_processing): Register quick_stack and
6487 tree_list_free_list roots.
6488
6489 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
6490
6491 * parse.y (build_outer_field_access): New local `decl_ctx', use
6492 it. Check for field's context and current class immediate outer
6493 context inheritance.
6494 (outer_field_access_p): Consider fields inherited from the last
6495 enclosing context.
6496 (build_access_to_thisn): Stop at the last enclosing context if
6497 necessary.
6498 Fixes gcj/367.
6499
6500 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
6501
6502 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
6503
6504 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
6505
6506 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
6507 scratch buffer.
6508
6509 2000-11-20 Tom Tromey <tromey@cygnus.com>
6510
6511 * jv-scan.c (help): Document --complexity.
6512 (options): Added --complexity.
6513 (flag_complexity): New global.
6514 (main): Call `report'.
6515 * parse-scan.y (complexity): New global.
6516 (if_then_statement, if_then_else_statement,
6517 if_then_else_statement_nsi, switch_block_statement_group,
6518 while_expression, do_statement, for_begin, continue_statement,
6519 throw_statement, catch_clause, finally, method_invocation,
6520 conditional_and_expression, conditional_or_expression,
6521 conditional_expression): Update complexity.
6522 (reset_report): Reset complexity.
6523 (report): New function.
6524
6525 2000-11-20 Tom Tromey <tromey@cygnus.com>
6526
6527 * lex.c (yylex): Added STRICT_TK case.
6528 * parse.y (STRICT_TK): Added.
6529 * parse-scan.y (STRICT_TK): Added.
6530 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
6531 `;'. Use 4, not 3, with -k option. Correctly rename resulting
6532 file.
6533 * keyword.h: Rebuilt.
6534 * keyword.gperf (strictfp): Added.
6535
6536 2000-11-20 Tom Tromey <tromey@cygnus.com>
6537
6538 * lex.c (yylex): Recognize floating point constants with leading
6539 0.
6540
6541 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6542
6543 * java-tree.h (cyclic_inheritance_report): Constify.
6544 * parse.y (cyclic_inheritance_report): Likewise.
6545
6546 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
6547
6548 * parse.y (goal): Remove call to ggc_add_string_root.
6549
6550 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
6551
6552 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
6553 Create string in scratch buffer, then pass to build_string.
6554
6555 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
6556
6557 * parse.y (issue_warning_error_from_context): Add
6558 ATTRIBUTE_PRINTF.
6559
6560 2000-11-11 Anthony Green <green@redhat.com>
6561
6562 * jcf-parse.c (process_zip_dir): Add finput parameter.
6563 (jcf_figure_file_type): Call process_zip_dir with appropriate
6564 argument.
6565
6566 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6567
6568 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
6569 * jcf-parse.c (jcf_figure_file_type): Likewise.
6570
6571 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
6572
6573 * parse.y (create_new_parser_context): Use memset () instead of
6574 bzero ().
6575
6576 2000-11-08 Tom Tromey <tromey@cygnus.com>
6577
6578 * gjavah.c (process_file): Only include gcj/cni.h when generating
6579 CNI stubs.
6580
6581 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
6582
6583 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
6584 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
6585 instead of bzero ().
6586
6587 2000-11-05 Tom Tromey <tromey@cygnus.com>
6588
6589 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
6590 * lex.c (IS_ZERO): New define.
6591 (java_perform_atof): Error on floating point underflow.
6592
6593 2000-11-04 Tom Tromey <tromey@cygnus.com>
6594
6595 * lex.c (java_parse_escape_sequence): Only read two octal
6596 characters if the first one is greater than 3. Don't allow
6597 "octal" numbers to include the digits 8 or 9.
6598
6599 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
6600
6601 * Make-lang.in (java.distdir): Remove.
6602
6603 2000-11-03 Tom Tromey <tromey@cygnus.com>
6604
6605 * Make-lang.in (java.dvi): New target.
6606 Partial fix for PR other/567.
6607
6608 * lang-options.h: Mention -Wout-of-date.
6609 * jcf-dump.c (flag_newer): New global.
6610 * gjavah.c (flag_newer): New global.
6611 * jcf-io.c (find_class): Only warn when flag_newer set.
6612 * lang.c (flag_newer): New global.
6613 (struct string_option): New declaration.
6614 (lang_W_options): New global.
6615 (process_option_with_no): New function.
6616 (lang_decode_option): Use it.
6617
6618 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
6619 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
6620 `$'.
6621
6622 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
6623 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
6624 * lex.c (java_read_unicode): Removed `term_context' argument.
6625 Recognize any number of `u' in `\u'.
6626 (java_read_unicode_collapsing_terminators): New function.
6627 (java_get_unicode): Use it.
6628 (java_lineterminator): Removed.
6629 (yylex): Produce error if character literal is newline or single
6630 quote. Return if eof found in middle of `//' comment. EOF in
6631 `//' comment is only an error if pedantic.
6632 (java_ignorable_control_p): New function.
6633 (java_parse_end_comment): Return if eof found in middle of
6634 comment.
6635 Include flags.h.
6636 * jv-scan.c (pedantic): New global.
6637
6638 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
6639
6640 * parse.y (outer_field_access_p): Inherited fields aren't
6641 consider outer fields.
6642 (maybe_build_thisn_access_method): Use
6643 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
6644 (resolve_expression_name): Trigger an error if a static field
6645 is being accessed as an outer field.
6646
6647 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
6648
6649 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
6650 Fixes gcj/365.
6651
6652 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
6653
6654 * Make-lang.in: Move all build rules here from Makefile.in,
6655 adapt to new context. Wrap all rules that change the current
6656 directory in parentheses. Expunge all references to $(P).
6657 When one command depends on another and they're run all at
6658 once, use && to separate them, not ;. Add OUTPUT_OPTION to
6659 all object-file generation rules. Delete obsolete variables.
6660
6661 * Makefile.in: Delete.
6662 * config-lang.in: Delete outputs= line.
6663
6664 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
6665
6666 * parse.y (patch_method_invocation): NULLify this_arg when already
6667 inserted.
6668 (maybe_use_access_method): Handle call to methods unrelated to the
6669 current class. Fixed comment.
6670 Fixes gcj/361.
6671
6672 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
6673
6674 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
6675 scope.
6676
6677 2000-10-24 Tom Tromey <tromey@cygnus.com>
6678
6679 * lex.c (java_new_lexer): Initialize new fields. Work around
6680 broken iconv() implementations.
6681 (java_read_char): Swap bytes if required. Use fallback decoder if
6682 required.
6683 (byteswap_init, need_byteswap): New globals.
6684 (java_destroy_lexer): Only close iconv handle if it is in use.
6685 * lex.h (java_lexer): New fields read_anything, byte_swap,
6686 use_fallback.
6687 Made out_buffer unsigned.
6688
6689 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
6690
6691 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
6692 where an enclosing context can be set on the jdep.
6693 (do_resolve_class): Fixed identation.
6694
6695 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6696
6697 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
6698
6699 * jcf-reader.c (peek_attribute, skip_attribute): Only define
6700 when requested.
6701
6702 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
6703
6704 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
6705
6706 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
6707
6708 * jcf-write.c (OP1): Update `last_bc'.
6709 (struct jcf_block): Fixed indentation and typo in comments. New
6710 field `last_bc'.
6711 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
6712 follows `monitorenter'.
6713 * parse.y (patch_synchronized_statement): New local `tmp'. Call
6714 `patch_string'.
6715 Fixes gcj/232.
6716
6717 2000-10-16 Tom Tromey <tromey@cygnus.com>
6718
6719 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
6720 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
6721 * lang-options.h: Added -MA, -MT, -MF..
6722 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
6723 (DEPEND_TARGET_SET): New macro.
6724 (DEPEND_FILE_ALREADY_SET): Likewise.
6725 (init_parse): Handle new flags.
6726 * jcf.h (jcf_dependency_print_dummies): Declare.
6727 * Make-lang.in (s-java): Added mkdeps.o.
6728 * Makefile.in (BACKEND): Added mkdeps.o.
6729 (../gcjh$(exeext)): Added mkdeps.o.
6730 (../jcf-dump$(exeext)): Added mkdeps.o.
6731 * jcf-depend.c: Include mkdeps.h.
6732 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
6733 add_entry): Removed.
6734 (jcf_dependency_reset): Rewrote.
6735 (dependencies): New global.
6736 (jcf_dependency_set_target): Rewrote.
6737 (jcf_dependency_add_target): Likewise.
6738 (jcf_dependency_add_file): Likewise.
6739 (munge): Removed.
6740 (print_ents): Removed.
6741 (jcf_dependency_write): Rewrote.
6742 (print_dummies): New global.
6743 (jcf_dependency_print_dummies): New function
6744 (jcf_dependency_write): Call deps_dummy_targets if required.
6745
6746 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
6747
6748 * gjavah.c (add_class_decl): Removed unused variables `tname',
6749 `tlen' and `name_index'.
6750 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
6751 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
6752 in `wfl_operator' with value.
6753 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
6754 (jcf_figure_file_type): Fixed identation.
6755 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
6756 * parse.y (analyze_clinit_body): New function.
6757 (static_initializer:): Reset `current_static_block'.
6758 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
6759 `wfl_operator' with new value.
6760 (lookup_cl): Use EXPR_WFL_FILENAME.
6761 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
6762 analyze_clinit_body.
6763 (build_outer_field_access): Access to this$<n> built from
6764 current_class, not its outer context.
6765 (build_access_to_thisn): Fixed leading comment. Tidied things up.
6766 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
6767 (patch_method_invocation): Use `is_static_flag' when already
6768 initialized.
6769 (patch_newarray): Removed assignment in ternary operator.
6770
6771 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
6772
6773 * except.c (free_eh_ranges): Don't free `whole_range'.
6774
6775 2000-10-15 Anthony Green <green@redhat.com>
6776
6777 * decl.c (init_decl_processing): Call init_class_processing before
6778 anything else.
6779
6780 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
6781
6782 * check-init.c (check_init): Fixed leading comment. Use
6783 LOCAL_FINAL_P.
6784 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6785 (give_name_to_locals): Likewise.
6786 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
6787 fields in lang_decl_var.
6788 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
6789 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
6790 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
6791 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
6792 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
6793 (LOCAL_FINAL): Rewritten.
6794 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
6795 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
6796 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
6797 `init_final' fields.
6798 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
6799 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
6800 (TYPE_HAS_FINAL_VARIABLE): New macro.
6801 (struct lang_type): Added `afv' field.
6802 * parse.y (check_static_final_variable_assignment_flag): New function.
6803 (reset_static_final_variable_assignment_flag): Likewise.
6804 (check_final_variable_local_assignment_flag): Likewise.
6805 (reset_final_variable_local_assignment_flag): Likewise.
6806 (check_final_variable_indirect_assignment): Likewise.
6807 (check_final_variable_global_assignment_flag): Likewise.
6808 (add_inner_class_fields): Use LOCAL_FINAL_P.
6809 (register_fields): Handle local finals and final variables.
6810 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
6811 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6812 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
6813 on local finals.
6814 (java_complete_expand_methods): Loop to set
6815 TYPE_HAS_FINAL_VARIABLE. Call
6816 `reset_final_variable_local_assignment_flag' and
6817 `check_final_variable_local_assignment_flag' accordingly before
6818 and after constructor expansion. Call
6819 `reset_static_final_variable_assignment_flag'
6820 before expanding <clinit> and after call
6821 `check_static_final_variable_assignment_flag' if the
6822 current_class isn't an interface. After all methods have been
6823 expanded, call `check_final_variable_global_assignment_flag' and
6824 `check_static_final_variable_assignment_flag' if the current class
6825 is an interface.
6826 (maybe_yank_clinit): Fixed typo in comment.
6827 (build_outer_field_access_methods): Removed old sanity check. Use
6828 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
6829 Don't create access methods for finals.
6830 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
6831 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
6832 existing DECL_INIT has been processed.
6833 (java_complete_lhs): Likewise.
6834 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
6835 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
6836 logic.
6837 (patch_assignment): Use LOCAL_FINAL_P.
6838 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
6839 DECL_INITIAL is nullified.
6840 Fixes gcj/163.
6841
6842 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6843
6844 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
6845
6846 * Makefile.in (parse.c, parse-scan.c): Likewise.
6847
6848 2000-10-12 Mark Mitchell <mark@codesourcery.com>
6849
6850 * class.c (temporary_obstack): Remove.
6851 (make_class): Don't mess with obstascks.
6852 (push_class): Likewise.
6853 (set_super_info): Likewise.
6854 (add_method_1): Likewise.
6855 (add_method): Likewise.
6856 (add_field): Likewise.
6857 (build_utf8_ref): Likewise.
6858 (build_class_ref): Likewise.
6859 (build_static_field_ref): Likewise.
6860 (finish_class): Likewise.
6861 (push_super_field): Likewise.
6862 (layout_class): Likewise.
6863 (layout_class_methods): Likewise.
6864 (init_class_processing): Likewise.
6865 * constants.c (get_tag_node): Likewise.
6866 (build_constant_data_ref): Likewise.
6867 * decl.c (ggc_p): Remove.
6868 (copy_lang_decl): Use ggc_alloc.
6869 (complete_start_java_method): Don't mess with obstacks.
6870 (start_java_method): Likewise.
6871 (end_java_method): Likewise.
6872 * except.c (link_handler): Use xmalloc.
6873 (free_eh_ranges): New function.
6874 (method_init_exceptions): Use it.
6875 (add_handler): Use xmalloc.
6876 (expand_start_java_handler): Don't mess with obstacks.
6877 (prepare_eh_table_type): Likewise.
6878 (expand_end_java_handler): Likewise.
6879 * expr.c (push_value): Likewise.
6880 (create_label_decl): Likewise.
6881 (build_jni_stub): Likewise.
6882 (java_lang_expand_expr): Likewise.
6883 (note_instructions): Use xrealloc.
6884 (java_push_constant_from_pool): Don't mess with obstacks.
6885 (process_jvm_instruction): Likewise.
6886 * java-tree.h (cyclic_inheritance_report): Remove duplicate
6887 declaration.
6888 * jcf-parse.c (get_constant): Don't mess with obstacks.
6889 (read_class): Likewise.
6890 (jcf_parse): Likewise.
6891 * lex.c (expression_obstack): Remove.
6892 (java_lex): Don't use obstack_free.
6893 * parse.h (exit_java_complete_class): Don't mess with obstacks.
6894 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
6895 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
6896 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
6897 * parse.y (gaol): Add more GC roots.
6898 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
6899 (lookup_field_wrapper): Likewise.
6900 (obtain_incomplete_type): Don't mess with obstacks.
6901 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
6902 macros.
6903 (craft_constructor): Don't mess with obstacks.
6904 (safe_layout_class): Likewise.
6905 (java_complete_class): Likewise.
6906 (source_end_java_method): Likewise.
6907 (build_outer_field_access_methods): Likewise.
6908 (build_outer_method_access_method): Likewise.
6909 (maybe_build_thisn_access_method): Likewise.
6910 (build_dot_class_method_invocation): Likewise.
6911 (java_complete_tree): Likewise.
6912 (java_complete_lhs): Likewise.
6913 (do_merge_string_cste): Likewise.
6914 (patch_string_cst): Likewise.
6915 (array_constructor_check_entry): Likewise.
6916 * typeck.c (build_java_array_type): Likewise.
6917 (parse_signature_string): Likewise.
6918 (build_java_signature): Likewise.
6919
6920 2000-10-12 Tom Tromey <tromey@cygnus.com>
6921
6922 Fix for PR gcj/356:
6923 * gjavah.c (add_class_decl): Don't special-case inner classes.
6924 (add_namelet): Likewise.
6925
6926 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
6927
6928 * java-tree.h: Constify current_encoding.
6929 * lang.c: Constify current_encoding.
6930
6931 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
6932
6933 * jvgenmain.c (class_mangling_suffix): Omit `.'.
6934 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
6935
6936 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
6937
6938 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
6939 patch. Fixes gcj/340.
6940
6941 2000-10-10 Tom Tromey <tromey@cygnus.com>
6942
6943 * lex.c (java_new_lexer): Initialize out_first and out_last
6944 fields.
6945 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
6946
6947 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
6948
6949 * parse.y (pop_current_osb): New function.
6950 (array_type:): Use `dims:', changed actions
6951 accordingly. Suggested by Anthony Green.
6952 (array_creation_expression:): Used pop_current_osb.
6953 (cast_expression:): Likewise.
6954 (search_applicable_method_list): Fixed indentation.
6955
6956 2000-10-08 Anthony Green <green@redhat.com>
6957
6958 * parse.y (array_type_literal): Remove production.
6959 (type_literals): Refer to array_type, not array_type_literal.
6960
6961 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
6962
6963 Patch contributed by Corey Minyard.
6964 * decl.c (check_local_named_variable): New function.
6965 (tree check_local_unnamed_variable): Likewise.
6966 (find_local_variable): Splitted. Call check_local_{un}named_variable.
6967
6968 2000-10-07 Anthony Green <green@redhat.com>
6969
6970 * class.c (layout_class): Handle case where superclass can't be
6971 layed out yet.
6972
6973 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
6974
6975 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
6976 gperf.
6977
6978 2000-10-05 Tom Tromey <tromey@cygnus.com>
6979
6980 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
6981 * jvgenmain.c (class_mangling_prefix): Removed.
6982 (class_mangling_suffix): New global.
6983 (main): Use it.
6984 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
6985 `$'.
6986 (print_method_info): Handle overrides for static and final
6987 methods.
6988 (process_file): Generate declaration for class object field.
6989 * class.c (cxx_keywords): New array.
6990 (utf8_cmp): New function.
6991 (cxx_keyword_p): New function.
6992 (layout_class_method): Mangle C++ keywords by appending `$'.
6993 (mangle_field): New function.
6994 (mangle_class_field): Use mangle_field. Mangle class name as
6995 `class$'.
6996 (mangle_static_field): Use mangle_field.
6997
6998 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
6999
7000 * decl.c (find_local_variable): Removed uncessary type check and
7001 fixed range check typo. From Corey Minyard.
7002
7003 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7004
7005 * decl.c (give_name_to_locals): New local `code_offset'. Call
7006 `maybe_adjust_start_pc'.
7007 * expr.c (note_instructions): New function.
7008 (expand_byte_code): Don't collect insn starts here.
7009 (peek_opcode_at_pc): New function.
7010 (maybe_adjust_start_pc): Likewise.
7011 * java-tree.h (maybe_adjust_start_pc): Declare.
7012 (note_instructions): Likewise.
7013 * jcf-parse.c (parse_class_file): Call `note_instructions'.
7014
7015 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7016
7017 * parse.y (field_access:): Fixed indentation.
7018 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
7019
7020 2000-09-07 Tom Tromey <tromey@cygnus.com>
7021
7022 Fix for PR gcj/307:
7023 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
7024 JPRIMITIVE_TYPE_P, for arithmetic operators.
7025 (patch_method_invocation): Indentation fix.
7026 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
7027 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
7028 (do_unary_numeric_promotion): Cleaned up code.
7029 (valid_cast_to_p): Handle boolean correctly.
7030
7031 2000-09-27 Tom Tromey <tromey@cygnus.com>
7032
7033 * lex.c (java_read_unicode): Reset bs_count when finished with
7034 `\u' sequence.
7035
7036 2000-10-01 Mark Mitchell <mark@codesourcery.com>
7037
7038 Convert to GC.
7039 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
7040 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
7041 (typeck.o): Depend on ggc.h.
7042 * class.c (add_method_1): Use GC functions for allocation.
7043 (init_class_processing): Register roots.
7044 * decl.c (ggc_p): Set to 1.
7045 (pending_local_decls): Make it static.
7046 (push_jvm_slot): Use GC functions for allocation.
7047 (init_decl_processing): Register roots.
7048 (give_name_to_locals): Use GC functions for allocation.
7049 (lang_mark_tree): New function.
7050 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
7051 functions for allocation.
7052 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
7053 * lex.c (java_lex): Use build_string, rather than replicating it
7054 inline.
7055 * parse.y (goal): Add more roots.
7056 (mark_parser_ctxt): New function.
7057 * typeck.c: Include ggc.h.
7058
7059 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
7060
7061 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
7062 contains something else than MODIFY_EXPR.
7063
7064 2000-09-23 Mark Mitchell <mark@codesourcery.com>
7065
7066 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
7067 * Makefile.in (parse.o): Depend on ggc.h.
7068 (class.o): Likewise.
7069 (constants.o): Likewise.
7070 (decl.o): Likewise.
7071 (expr.o): Likewise.
7072 (jcf-parse.o): Likewise.
7073 (jcf-write.o): Likewise.
7074 (mangle.o): Likewise.
7075 * class.c: Include ggc.h.
7076 (build_static_field_ref): Register GC roots.
7077 (layout_class): Likewise.
7078 (init_class_processing): Likewise.
7079 * constants.c: Include ggc.h.
7080 (current_constant_pool_data_ref): Remove.
7081 (tag_nodes): Move it to ...
7082 (get_tag_node): ... here. Register GC roots.
7083 * decl.c: Include ggc.h. Remove many global tree definitions.
7084 (throw_node): Define.
7085 (java_global_trees): Likewise.
7086 (predef_filenames): Make the size a constant.
7087 (init_decl_processing): Adjust accordingly.
7088 (init_decl_processing): Call init_jcf_parse. Register GC roots.
7089 * expr.c: Include ggc.h.
7090 (init_expr_processing): Register GC roots.
7091 (build_invokeinterface): Likewise.
7092 * java-tree.h: Replace extern tree declarations with macros.
7093 (java_global_trees): New variable.
7094 (java_tree_index): New enumeration.
7095 (init_jcf_parse): Declare.
7096 * jcf-parse.c: Include ggc.h.
7097 (current_class): Remove declaration.
7098 (main_class): Likewise.
7099 (all_class_list): Likewise.
7100 (predefined_filename_p): Adjust for constant size of
7101 predef_filenames.
7102 (init_jcf_parse): New function.
7103 * jcf-write.c: Include ggc.h.
7104 (generate_classfile): Register GC roots.
7105 (append_synthetic_attribute): Likewise.
7106 (append_innerclass_attribute_entry): Likewise.
7107 * lang.c: Include ggc.h.
7108 (lang_print_error): Register GC roots.
7109 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
7110 with macros.
7111 * parse.y: Include ggc.h.
7112 (wfl_operator): Remove.
7113 (goal): Register GC roots.
7114 (java_pop_parser_context): Adjust for new field names.
7115 (java_parser_context_save_global): Likewse.
7116 (java_parser_context_restore_global): Likewise.
7117 (java_parser_context_suspend): Likewise.
7118 (java_parser_context_resume): Likewise.
7119 (verify_constructor_circularity): Register GC roots.
7120 (lookup_cl): Likewise.
7121 (java_reorder_fields): Likewise.
7122 (build_current_this): Likewise.
7123 (class_in_current_package): Likewise.
7124 (argument_types_convertible): Likewise.
7125 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
7126
7127 2000-09-14 Tom Tromey <tromey@cygnus.com>
7128
7129 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
7130
7131 2000-09-13 Tom Tromey <tromey@cygnus.com>
7132
7133 * jcf-parse.c: Include <locale.h>.
7134 * jv-scan.c: Include <locale.h>.
7135
7136 2000-09-12 Tom Tromey <tromey@cygnus.com>
7137
7138 * expr.c (pop_type_0): Return `Object' if trying to merge two
7139 interface types.
7140 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
7141 interface types; `Object' is always a valid supertype.
7142
7143 2000-09-12 Tom Tromey <tromey@cygnus.com>
7144
7145 Fix for PR gcj/33:
7146 * jv-scan.c (help): Document --encoding.
7147 (options): Added `encoding' entry.
7148 (OPT_ENCODING): New define.
7149 (main): Handle --encoding.
7150 Include <langinfo.h> if nl_langinfo exists.
7151 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
7152 --encoding.
7153 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
7154 (parse_source_file): Correctly call java_init_lex. Added `finput'
7155 argument. Use nl_langinfo to determine default encoding.
7156 * java-tree.h (current_encoding): Declare.
7157 * parse.y (java_parser_context_restore_global): Don't restore
7158 `finput'.
7159 (java_parser_context_save_global): Don't set `finput' field.
7160 (java_pop_parser_context): Don't restore `finput'. Free old lexer
7161 if required.
7162 * lang.c (current_encoding): New global.
7163 (lang_decode_option): Recognize `-fencoding='.
7164 (finish_parse): Don't close finput.
7165 * parse.h (struct parser_ctxt): Removed `finput' and
7166 `unget_utf8_value' fields. Added `lexer' field.
7167 (java_init_lex): Fixed declaration.
7168 * lex.c (java_new_lexer): New function.
7169 (java_destroy_lexer): Likewise.
7170 (java_read_char): Added `lex' argument. Handle iconv case.
7171 (java_read_unicode): Added `lex' argument. Count backslashes in
7172 lexer structure.
7173 (java_init_lex): Added `finput' and `encoding' arguments. Set
7174 `lexer' field in ctxp.
7175 (BAD_UTF8_VALUE): Removed.
7176 (java_lex): Handle seeing UEOF in the middle of a string literal.
7177 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
7178 (java_lexer): New structure.
7179 (UNGETC): Removed.
7180 (GETC): Removed.
7181 (DEFAULT_ENCODING): New define.
7182 (java_destroy_lexer): Declare.
7183
7184 2000-09-12 Tom Tromey <tromey@cygnus.com>
7185
7186 Fix for PR gcj/343:
7187 * lex.c (java_init_lex): Initialize java_io_serializable.
7188 * parse.y (java_io_serializable): New global.
7189 (valid_ref_assignconv_cast_p): An array can be cast to
7190 serializable.
7191
7192 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
7193
7194 * decl.c, expr.c: Include defaults.h if not already included.
7195 Don't define the *_TYPE_SIZE macros.
7196
7197 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
7198
7199 * typeck.c (build_java_array_type): Correct first parameter
7200 in ADJUST_FIELD_ALIGN invocation.
7201
7202 2000-09-06 Tom Tromey <tromey@cygnus.com>
7203
7204 * lang-specs.h: Also recognize `-femit-class-files'.
7205
7206 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
7207
7208 * verify.c (merge_types): Load the types to merge if necessary.
7209
7210 2000-09-02 Anthony Green <green@redhat.com>
7211
7212 * jcf-io.c: Include zlib.h.
7213 (open_in_zip): Read compressed class file archives.
7214 * zipfile.h (ZipDirectory): Add uncompressed_size and
7215 compression_method fields.
7216 * zextract.c (read_zip_archive): Collect file compression info.
7217
7218 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
7219
7220 * parse.y (do_resolve_class): Also explore superclasses of
7221 intermediate enclosing contexts when searching for inner classes.
7222
7223 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
7224
7225 * parse.y (variable_declarator_id:): Better error message.
7226 (expression_statement:): Use YYNOT_TWICE.
7227 (cast_expression:): Likewise.
7228 (assignment:): Likewise.
7229
7230 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
7231
7232 * parse.y (do_merge_string_cste): New locals. Create new
7233 STRING_CSTs each time, use memcpy. Fixes gcj/311.
7234
7235 2000-08-07 Hans Boehm <boehm@acm.org>
7236
7237 * boehm.c (mark_reference_fields): Set marking bits for all words in
7238 a multiple-word record.
7239 (get_boehm_type_descriptor): Use the procedure marking descriptor for
7240 java.lang.Class.
7241
7242 2000-08-31 Mike Stump <mrs@wrs.com>
7243
7244 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
7245 jcf-dump$(exeext)): Make parallel safe.
7246
7247 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
7248
7249 * jcf-parse.c (set_source_filename): Constify a char *.
7250 * jcf-write.c (append_innerclasses_attribute,
7251 make_class_file_name): Constify a char *. Don't recycle a
7252 variable for an unrelated purpose.
7253 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
7254 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
7255
7256 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
7257
7258 * expr.c (can_widen_reference_to): Fixed indentation.
7259 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
7260 * parse.y: `finit$' replaces `$finit$' in comments.
7261 (try_builtin_assignconv): Fixed leading comment.
7262
7263 2000-08-25 Greg McGary <greg@mcgary.org>
7264
7265 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
7266
7267 2000-08-24 Greg McGary <greg@mcgary.org>
7268
7269 * lang.c (lang_decode_option): Use ARRAY_SIZE.
7270 * parse.y (BINOP_LOOKUP): Likewise.
7271
7272 2000-08-22 Andrew Haley <aph@cygnus.com>
7273
7274 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
7275 sign extending. Fixes gcj/321.
7276 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
7277 combining to make a jlong. Fixes gcj/321.
7278
7279 2000-08-21 Nix <nix@esperi.demon.co.uk>
7280
7281 * lang-specs.h: Do not process -o or run the assembler if
7282 -fsyntax-only.
7283
7284 2000-08-16 Andrew Haley <aph@cygnus.com>
7285
7286 * typeck.c (build_java_array_type): Rewrite code to do array
7287 alignment. Take into account back-end macros when aligning array
7288 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
7289 user to set alignment. Fixes gcj/252 and 160.
7290
7291 2000-08-09 Tom Tromey <tromey@cygnus.com>
7292
7293 * parse.y (check_abstract_method_definitions): Now return `int'.
7294 Check implemented interfaces. Fixes PR gcj/305.
7295
7296 * parse.y (patch_switch_statement): Disallow `long' in switch
7297 expressions. Fixes PR gcj/310.
7298
7299 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
7300
7301 * decl.c (finit_leg_identifier_node): New global.
7302 (init_decl_processing): Use `finit$' to initialize
7303 finit_identifier_node. Use `$finit$' to initialize
7304 finit_leg_identifier_node.
7305 * expr.c (expand_java_field_op): Use ID_FINIT_P.
7306 * java-tree.h (finit_identifier_node): Changed attached comment.
7307 (finit_leg_identifier_node): New declaration.
7308 (ID_FINIT_P): Take finit_identifier_node and
7309 finit_leg_identifier_node into account. This is a backward
7310 compatibility hack.
7311
7312 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
7313
7314 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
7315 Jan 6 2000 patch.
7316 (generate_bytecode_insns): Check `nargs' before emitting it.
7317 * verify.c (merge_type_state): Fixed typo.
7318 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
7319 generate_bytecode_{conditional,insns}.
7320
7321 2000-08-13 Anthony Green <green@redhat.com>
7322
7323 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
7324 for -pg builds).
7325
7326 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
7327
7328 * class.c (maybe_layout_super_class): Fixed indentation.
7329 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
7330 (java_check_methods): New function declaration.
7331 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
7332 instead of `str_ptr'.
7333 * jcf-write.c (generate_bytecode_insns): Emit number the of args
7334 of a `invokeinterface' at the right time.
7335 * parse.h (WFL_STRIP_BRACKET): New macro.
7336 (SET_TYPE_FOR_RESOLUTION): Use it.
7337 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
7338 (check_class_interface_creation): Don't check for cross package
7339 innerclass name clashes.
7340 (method_header): Behave properly if MDECL is `error_mark_node'.
7341 (method_declarator): Return `error_mark_node' if bogus current
7342 class.
7343 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
7344 (resolve_and_layout): New local `decl_type', set and used. Call
7345 java_check_methods.
7346 (java_check_methods): New method.
7347 (java_layout_classes): Use it.
7348 (resolve_qualified_expression_name): No EH check necessary in
7349 access$<n>.
7350 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
7351 `case' statement.
7352 (patch_assignment): Set DECL_INITIAL on integral final local.
7353
7354 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
7355
7356 * java-tree.h (flag_extraneous_semicolon): New extern.
7357 * lang-options.h: (-Wextraneous-semicolon): New option.
7358 * lang.c (flag_redundant): Fixed typo in leading comment.
7359 (flag_extraneous_semicolon): New global.
7360 (lang_decode_option): Set `flag_extraneous_semicolon' when
7361 -Wall. Decode `-Wextraneous-semicolon'.
7362 * parse.y (type_declaration:): Removed `SC_TK' hack, added
7363 `empty_statement' rule.
7364 (class_body_declaration): Likewise.
7365 (method_body:): Accept `;' as a method body.
7366 (static_initializer:): Removed `SC_TK' hack.
7367 (constructor_block_end:): Likewise.
7368 (empty_statement:): Report deprecated empty declaration. Fixes
7369 gcj/295
7370
7371 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7372
7373 * parse.y (build_dot_class_method_invocation): Changed parameter
7374 name to `type'. Build signature from `type' and convert it to a
7375 STRING_CST if it's an array.
7376 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
7377 to use `ref_type' directly.
7378
7379 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
7380
7381 * lang-options.h: Added a comma after the last element to avoid
7382 syntax errors when other languages define additional options.
7383
7384 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
7385
7386 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
7387 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
7388 (jc1): Link with $(BACKEND).
7389 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
7390
7391 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
7392
7393 * jvspec.c: Adjust type of second argument to
7394 lang_specific_driver, and update code as necessary.
7395
7396 * class.c (build_dtable_decl): Initialize dummy.
7397
7398 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7399
7400 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
7401 method bodies not to rule out discarding `<clinit>'; don't use
7402 <clinit> to initialize static fields with constant initializers.
7403
7404 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7405
7406 * gjavah.c (print_method_info): Added `synth' parameter. Skip
7407 synthetic methods.
7408 (method_synthetic): New global.
7409 (HANDLE_METHOD): Recognize synthetic method and tell
7410 `print_method_info' about it.
7411 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
7412 processing a synthetic method.
7413 * jcf-reader.c (skip_attribute): New function.
7414 ( skip_attribute): Likewise.
7415
7416 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7417
7418 * parse.y (build_outer_field_access): Fixed comments.
7419 (fix_constructors): Emit the initialization of this$<n> before
7420 calling $finit$.
7421 (resolve_qualified_expression_name): Build an access to `decl' if
7422 necessary.
7423
7424 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
7425
7426 * parse-scan.y (curent_class): Non longer const.
7427 (inner_qualifier, inner_qualifier_length): Deleted.
7428 (current_class_length): New global.
7429 (bracket_count): Fixed typo in leading comment.
7430 (anonymous_count): New global.
7431 (class_instance_creation_expression:): Handle anonymous classes.
7432 (anonymous_class_creation:): New rule.
7433 (push_class_context): Rewritten.
7434 (pop_class_context): Likewise.
7435 (INNER_QUALIFIER): Macro deleted.
7436 (report_class_declaration): call `push_class_context' when
7437 entering the function. `fprintf' format modified not to use
7438 INNER_QUALIFIER.
7439 (report_class_declaration): Assign `package_name' and
7440 `current_class' to NULL separately.
7441
7442 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
7443
7444 * expr.c (build_invokeinterface): Call layout_class_methods on
7445 target interface.
7446
7447 2000-07-27 Tom Tromey <tromey@cygnus.com>
7448 Anthony Green <green@cygnus.com>
7449 Alexandre Petit-Bianco <apbianco@cygnus.com>
7450
7451 * class.c (make_class_data): Create vtable for abstract classes.
7452 (get_dispatch_table): Changed to cope with abstract classes.
7453
7454 2000-07-27 Tom Tromey <tromey@cygnus.com>
7455
7456 * parse.y (patch_method_invocation): Don't reverse the argument
7457 list when dealing with anonymous class constructors. Fixed typo in
7458 comment.
7459
7460 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
7461
7462 * parse.y (build_alias_initializer_parameter_list): Reverse
7463 crafted list when building aliases for anonymous class
7464 constructors.
7465
7466 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7467
7468 * parse.y (jdep_resolve_class): Don't bother checking potential
7469 innerclass access if `decl' is NULL.
7470 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
7471 WFL.
7472
7473 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7474
7475 * parse.c: Remove (again.)
7476
7477 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
7478
7479 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
7480 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
7481 outside the `if' statement, alias to innerclass removed, `decl'
7482 used to mark the class complete.
7483
7484 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
7485
7486 * parse.y (simple_name:): Fixed typo in error message.
7487
7488 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
7489
7490 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
7491 or its first operand can be error marks.
7492
7493 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
7494
7495 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
7496 * parse.y (method_header): Likewise.
7497
7498 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
7499
7500 * parse.y (process_imports): Consider that one might be trying to
7501 import an innerclass. Fixes gcj/254
7502
7503 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
7504
7505 * parse.y (find_as_inner_class): Handle the case where the
7506 enclosing context of an innerclass has been loaded as bytecode.
7507
7508 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
7509
7510 * parse.y (simple_name:): Reject `$' in type names.
7511 (resolve_type_during_patch): Use `type' as a second
7512 argument to resolve_no_layout. Fixes gcj/257.
7513
7514 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
7515
7516 * parse.y (find_most_specific_methods_list): Select the only
7517 non-abstract method even if max has been set.
7518 Fixes gcj/285, gcj/298.
7519
7520 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
7521
7522 * lang-specs.h: Added %(jc1) to java compiler options.
7523
7524 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
7525
7526 * .cvsignore: New file.
7527
7528 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7529
7530 * parse.y (not_accessible_p): Access granted to innerclasses
7531 (indirectly) extending the reference type. Fixes gcj/249.
7532
7533 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7534
7535 * parse.y (patch_method_invocation): Fixed comment.
7536 (maybe_use_access_method): Build this$<n>s to the context of the
7537 target method, or a type that extends it. Fixes gcj/242.
7538
7539 2000-07-13 Mark Mitchell <mark@codesourcery.com>
7540
7541 * parse.c: Remove.
7542
7543 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7544
7545 * parse.y (fold_constant_for_init): Avoid bullish conversion.
7546
7547 2000-07-13 Tom Tromey <tromey@cygnus.com>
7548
7549 * lang-specs.h: Added %{I*}.
7550
7551 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
7552
7553 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
7554
7555 2000-07-12 Mark Mitchell <mark@codesourcery.com>
7556
7557 * parse-scan.c: Remove.
7558
7559 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
7560
7561 * class.c (set_super_info): Handled protected inner classes.
7562 (common_enclosing_context_p): Bail early if arguments aren't both
7563 inner classes.
7564 (get_access_flags_from_decl): Handle private and protected inner
7565 classes.
7566 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
7567 (CLASS_PROTECTED): Likewise.
7568 (struct lang_type): New bitfield `poic'.
7569 * parse.y (jdep_resolve_class): Call check_inner_class_access on
7570 inner classes only.
7571 (check_inner_class_access): Renamed arguments, added
7572 comments. Handles protected inner classes (fixes gcj/225)
7573 (not_accessible_p): Fixed comments. Avoid handling inner classes.
7574
7575 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
7576
7577 * parse.y (resolve_qualified_expression_name): Verify qualified
7578 access to `this'. Fixes gcj/239.
7579
7580 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
7581
7582 * jcf-write.c (generate_classfile): Don't install ConstantValue
7583 for null pointers.
7584
7585 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7586
7587 * parse.y (resolve_qualified_expression_name): Handle inner class
7588 access. Fixes gcj/256.
7589
7590 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7591
7592 * jcf-write.c (generate_classfile): Properly install the
7593 ConstantValue attribute and the initial value constant pool index
7594 on string constants.
7595 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
7596 class files.
7597
7598 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
7599
7600 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
7601 construct.
7602 * parse.y (find_as_inner_class): Fixed typo.
7603 (do_resolve_class): Explore enclosing contexts when searching for
7604 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
7605 (check_inner_class_access): Check `decl' which can be null in case
7606 of previous errors.
7607
7608 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
7609
7610 * java-tree.h (java_debug_context): Declared `extern'.
7611 (safe_layout_class): Likewise.
7612 * parse.y (resolve_field_access): Field must be `static' in order
7613 to be replaced by its initial value. Added comments.
7614 (find_applicable_accessible_methods_list): Fixed typo.
7615 (find_most_specific_methods_list): Methods found in innerclasses
7616 take over methods founds in the enclosing contexts.
7617 (java_complete_tree): Loosen restrictions on the type of DECLs
7618 that can be replaced by their initialization values.
7619 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
7620
7621 2000-07-05 Tom Tromey <tromey@cygnus.com>
7622
7623 * Make-lang.in (PARSE_DIR): New macro.
7624 (PARSE_RELDIR): Likewise.
7625 (PARSE_C): Likewise.
7626 (PARSE_SCAN_C): Likewise.
7627 ($(PARSE_C)): New target.
7628 ($(PARSE_SCAN_C)): Likewise.
7629 (SET_BISON): New macro.
7630 (BISONFLAGS): Likewise.
7631 (JAVABISONFLAGS): Likewise.
7632
7633 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
7634
7635 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
7636 argument on the first pass for CNI as well as JNI.
7637 (print_method_info): Set up method name on the first pass only.
7638
7639 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7640
7641 * parse.y (parser_qualified_classname): Removed parameter
7642 `is_static'.
7643 (create_interface): Removed first passed parameter to
7644 parser_qualified_classname.
7645 (create_class): Likewise. Don't install alias on static
7646 innerclasses. Fixes gcj/275.
7647
7648 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7649
7650 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
7651 debugable statement with empty_stmt_node. Fixes gcj/272
7652
7653 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7654
7655 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
7656 gcj/271.
7657
7658 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
7659
7660 * jcf-write.c (push_long_const): Appropriately cast short negative
7661 constant to jword.
7662
7663 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
7664
7665 * parse.y (verify_constructor_super): Use loop variable
7666 `m_arg_type' initialized with `mdecl_arg_type'.
7667
7668 2000-06-29 Tom Tromey <tromey@cygnus.com>
7669
7670 * parse.y (resolve_field_access): Handle case where `type_found'
7671 is NULL.
7672
7673 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
7674
7675 * expr.c (lookup_field): The same field can be found through two
7676 different interface. Don't declare it ambiguous in that case.
7677
7678 2000-06-27 Tom Tromey <tromey@cygnus.com>
7679
7680 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
7681 follows \r, then unget it at a lower level.
7682
7683 2000-06-26 Tom Tromey <tromey@cygnus.com>
7684
7685 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
7686 java_complete_tree.
7687
7688 2000-06-25 Tom Tromey <tromey@cygnus.com>
7689
7690 * parse.y (for_statement): Wrap expression in a WFL if it is a
7691 constant. For PR gcj/268.
7692
7693 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7694
7695 * parse.y (do_resolve_class): Minor optimiztion in the package
7696 list search. Removed unnecessary test and return statement.
7697 (valid_ref_assignconv_cast_p): Order of arguments to
7698 enclosing_context_p fixed.
7699
7700 2000-06-24 Tom Tromey <tromey@cygnus.com>
7701
7702 * expr.c (lookup_field): Print error and return error_mark_node if
7703 field reference is ambiguous.
7704
7705 * parse.y (check_abstract_method_definitions): Also check if
7706 `other_method' is abstract.
7707
7708 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
7709
7710 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
7711 classes.
7712 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
7713 (struct lang_type): New field `pic'.
7714 (CLASS_PRIVATE): New macro.
7715 * parse.y (check_inner_class_access): New function.
7716 (jdep_resolve_class): Call it.
7717
7718 2000-06-23 Tom Tromey <tromey@cygnus.com>
7719
7720 * parse.y (patch_incomplete_class_ref): Initialize the returned
7721 class. For PR gcj/260.
7722
7723 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
7724
7725 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
7726
7727 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
7728
7729 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
7730 Java specific checks.
7731 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
7732 screened by DECL_P.
7733 * java-tree.def (CASE_EXPR): Marked 'e'.
7734 (DEFAULT_EXPR): Likewise.
7735 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
7736 screened by DECL_P.
7737 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
7738 Java specific checks.
7739 (generate_bytecode_insns): Test try_block for BLOCK before using
7740 BLOCK_EXPR_BODY.
7741 * parse.y (build_wfl_wrap): Added `location' argument. Set
7742 EXPR_WFL_LINECOL accordingly.
7743 (dim_expr:): Wrap constants with WFLs.
7744 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
7745 (resolve_package): Check for `stmt' not being a BLOCK before
7746 building a debuggable statement with it.
7747 (make_qualified_primary): Added extra parameter to build_wfl_wrap
7748 invocation.
7749 (resolve_field_access): Make sure `decl' is a DECL before treating
7750 it as such.
7751 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
7752 IDENTIFIER_NODE before treating it as such.
7753 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
7754 treating it as such.
7755 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
7756 to be applied only on non array types.
7757
7758 2000-06-16 Per Bothner <per@bothner.com>
7759
7760 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
7761 define in terms of DECL_RESULT, as that fails when --enable-checking.
7762
7763 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7764
7765 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
7766 types the same in comparison.
7767 (CHECK_OP): Add static prototype.
7768
7769 2000-06-13 Jakub Jelinek <jakub@redhat.com>
7770
7771 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
7772 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
7773 * parse.c: Rebuilt.
7774
7775 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7776
7777 * decl.c (create_primitive_vtable): Prototype.
7778
7779 * jcf-write.c (generate_bytecode_insns): Initialize variable
7780 `saved_context'.
7781
7782 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
7783
7784 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
7785
7786 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
7787 to track searched classes, and do not search the same class more than
7788 once. Call find_applicable_accessible_methods_list on immediate
7789 superclass, instead of search_applicable_method_list on all ancestors.
7790 Fix for PR gcj/238.
7791
7792 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
7793
7794 * parse.y (register_fields): Permit static fields in inner classes
7795 if they are final. Fix for PR gcj/255.
7796
7797 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
7798
7799 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
7800 * parse.y (find_in_imports): Returned type changed to void,
7801 leading comment fixed.
7802 (register_package): New function.
7803 (qualify_and_find): Likewise.
7804 (package_declaration:): Use `register_package'.
7805 (single_type_import_declaration:): Removed local variable
7806 `node'. Added missing `;' for consistency.
7807 (type_import_on_demand_declaration:): Use `chainon' to link new
7808 entries.
7809 (lookup_field_wrapper): Lookup local variables defined in outer
7810 contexts first.
7811 (java_complete_class): Don't reverse the list of imported on demand.
7812 (do_resolve_class): Reorganized. Removed local variable
7813 `original_name'. Call `qualify_and_find' with the current package
7814 name, invoke `find_in_imports_on_demand' right after. Call
7815 `qualify_and_find' with the packages we've seen so far. Fixed
7816 operations numbering in comments.
7817 (java_expand_class): Don't reverse `package_list'.
7818 (find_most_specific_methods_list): New local variables `abstract'
7819 and `candidates'. Use them to pick the right method.
7820
7821 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
7822
7823 * parse.y (check_modifiers_consistency): Don't subtract out
7824 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
7825
7826 2000-06-04 Philipp Thomas <pthomas@suse.de>
7827
7828 * Makefile.in (INTLLIBS): New.
7829 (LIBS): Add above.
7830 (DEPLIBS): Ditto.
7831
7832 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
7833
7834 * class.c (get_dispatch_table): Build the vtable dummy entry list
7835 element with a null purpose. Fixed leading comment.
7836 (build_dtable_decl): Build an accurate dtable type when appropriate
7837 and use it.
7838
7839 2000-06-02 Richard Henderson <rth@cygnus.com>
7840
7841 * lang.c (lang_get_alias_set): New.
7842
7843 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
7844
7845 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
7846 before using it as the accessed field.
7847
7848 2000-05-31 Tom Tromey <tromey@cygnus.com>
7849
7850 * java-tree.h (boolean_array_vtable, byte_array_vtable,
7851 char_array_vtable, short_array_vtable, int_array_vtable,
7852 long_array_vtable, float_array_vtable, double_array_vtable):
7853 Declare.
7854 * expr.c (get_primitive_array_vtable): New function.
7855 (create_primitive_vtable): New function.
7856 (java_lang_expand_expr): Enable code to statically generate
7857 arrays.
7858 * decl.c (init_decl_processing): Create primitive vtables.
7859 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
7860 short_array_vtable, int_array_vtable, long_array_vtable,
7861 float_array_vtable, double_array_vtable): Define.
7862
7863 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
7864
7865 * java/parse.y (find_applicable_accessible_methods_list):
7866 Don't add an uninitialized value to the list.
7867
7868 2000-05-25 Tom Tromey <tromey@cygnus.com>
7869
7870 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
7871 when trying to see if field's class should be initialized. Always
7872 initialize field's declaring class, not qualified class.
7873 For PR gcj/162.
7874
7875 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
7876 `wfl_operator', to maybe_build_primttype_type_ref.
7877 Fixes PR gcj/235.
7878
7879 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
7880
7881 * parse.y (patch_method_invocation): Don't try to lookup methods
7882 in primitive types.
7883
7884 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
7885
7886 * parse.y (resolve_field_access): Call the appropriate <clinit>
7887 before accessing the length of a static array. Craft a decl for
7888 the field while its time. Fixes PR gcj/129.
7889
7890 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7891
7892 * parse.y (resolve_package): Correctly set `*next' (was off by
7893 one.)
7894 (resolve_qualified_expression_name): Fixed comment.
7895
7896 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
7897
7898 * jcf-parse.c (jcf_parse_source): Reset current_class and
7899 current_function_decl to NULL before parsing a new file.
7900
7901 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
7902
7903 * parse.y (block_end:): If the collected block doesn't feature a
7904 statement, insert an empty statement.
7905
7906 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
7907
7908 * parse.y (maybe_yank_clinit): New function.
7909 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
7910 end of the list of methods belonging to a class.
7911 (java_complete_expand_method): Check whether <clinit> is really
7912 necessary and expand it accordingly.
7913
7914 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
7915
7916 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
7917 processed by the method's switch statement.
7918
7919 2000-05-19 Tom Tromey <tromey@cygnus.com>
7920
7921 * java-tree.h: Added init state enum.
7922 * decl.c (emit_init_test_initialization): Initialize class
7923 initialization check variable by looking at class' state.
7924
7925 2000-05-19 Tom Tromey <tromey@cygnus.com>
7926
7927 * java-tree.h (build_instanceof): Declare.
7928 (build_get_class): Declare.
7929 * parse.y (patch_binop): Use build_instanceof.
7930 * expr.c (build_instanceof): New function. If class is final,
7931 don't make a function call.
7932 (expand_java_INSTANCEOF): Use it.
7933 (build_get_class): New function.
7934
7935 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
7936
7937 * jcf-write.c (generate_classfile): Scan the source_file for
7938 slashes with the right pointer variable.
7939
7940 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
7941
7942 * lang.c (lang_decode_option): Update -Wunused flags by calling
7943 set_Wunused.
7944 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
7945
7946 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
7947
7948 * check_init.c (check_init): Constify local char *.
7949 * class.c (push_class): Constify local char *.
7950 * java_tree.h: Update prototypes.
7951 * jcf-io.c (open_class): Constify filename parameter and
7952 return value.
7953 (find_class): Remove redundant string copy. Cast return from
7954 open_class.
7955 * jcf-parse.c (read_class, parse_class_file, yyparse):
7956 Constify local char *.
7957 * jcf-write.c (generate_bytecode_insns, generate_classfile):
7958 Constify local char *.
7959 * jcf.h (JCF): Constify filename and classname.
7960 (JCF_FINISH): Cast args to FREE to char * when appropriate.
7961 * lang.c (init_parse): Constify parameter and return value.
7962 * lex.c (java_get_line_col): Constify filename parameter.
7963 * parse.h: Constify parser_ctxt.filename. Update prototypes.
7964 * parse.y (java_parser_context_suspend,
7965 issue_warning_error_from_context, safe_layout_class): Constify
7966 local char *.
7967 * parse.c: Regenerate.
7968
7969 2000-05-08 Tom Tromey <tromey@cygnus.com>
7970
7971 * expr.c (build_jni_stub): Cache the result of
7972 _Jv_LookupJNIMethod.
7973
7974 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
7975
7976 * decl.c (predef_filenames_size): Now 7.
7977 (predef_filenames): New seventh entry.
7978
7979 2000-05-04 Tom Tromey <tromey@cygnus.com>
7980
7981 * boehm.c (mark_reference_fields): Don't mark RawData fields.
7982 Keep track of when we've seen a reference field after a
7983 non-reference field.
7984 (get_boehm_type_descriptor): Handle case where we see
7985 non-reference fields but no trailing reference field.
7986 * decl.c (rawdata_ptr_type_node): Define.
7987 (init_decl_processing): Initialize rawdata_ptr_type_node.
7988 * java-tree.h (rawdata_ptr_type_node): Declare.
7989
7990 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7991
7992 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
7993 specifiers in calls to fprintf.
7994
7995 2000-05-03 Andrew Haley <aph@cygnus.com>
7996
7997 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
7998
7999 * javaop.h (WORD_TO_INT): New function.
8000 (IMMEDIATE_s4): Use WORD_TO_INT.
8001 * jcf.h (JPOOL_INT): Ditto.
8002
8003 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
8004 separator.
8005
8006 2000-04-19 Tom Tromey <tromey@cygnus.com>
8007
8008 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
8009 on native function.
8010 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
8011 JNI methods.
8012 * expr.c (build_jni_stub): New function.
8013 * lang-specs.h: -fjni and -femit-class-file are incompatible.
8014 * parse.c: Rebuilt.
8015 * parse.y (java_complete_expand_methods): Expand a native method
8016 and call build_jni_stub if -fjni given.
8017 * lang-options.h: Document -fjni.
8018 * lang.c (flag_jni): New global.
8019 (lang_f_options): Added `jni' entry.
8020 * java-tree.h (soft_lookupjnimethod_node,
8021 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
8022 Declare.
8023 (flag_jni): Declare.
8024 (build_jni_stub): Declare.
8025 (struct lang_decl): Added `native' flag.
8026 (METHOD_NATIVE): Redefined to use `native' field of lang specific
8027 structure.
8028 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
8029 soft_jnipopsystemframe_node): New globals.
8030 (init_decl_processing): Set them. _Jv_InitClass only takes one
8031 argument.
8032
8033 * java-tree.def: Put into `C' mode.
8034
8035 2000-04-27 Tom Tromey <tromey@cygnus.com>
8036
8037 Fix for PR gcj/2:
8038 * expr.c (expand_invoke): Generate check to see if object pointer
8039 is null in nonvirtual invocation case.
8040 * java-tree.h (soft_nullpointer_node): Declare.
8041 * decl.c (soft_nullpointer_node): New global.
8042 (init_decl_processing): Initialize soft_nullpointer_node.
8043 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
8044 or `private' methods.
8045 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
8046
8047 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
8048
8049 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
8050 from <clinit>
8051
8052 2000-04-26 Tom Tromey <tromey@cygnus.com>
8053
8054 * zextract.c (find_zip_file_start): New function.
8055 (read_zip_archive): Use it.
8056
8057 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
8058
8059 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
8060
8061 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8062
8063 * class.c (common_enclosing_context_p): New function.
8064 * java-tree.h (common_enclosing_context_p): Added prototype.
8065 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
8066 classes sharing an outer context with the current instance.
8067 * parse.y (build_access_to_thisn): Fixed leading comment.
8068 (verify_constructor_super): New local `supper_inner'. Skip
8069 enclosing context argument in the case of inner class constructors.
8070 (patch_method_invocation): Insert proper context as second
8071 parameter to pure inner class constructor super invocations.
8072
8073 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8074
8075 * parse.y (end_class_declaration): Reset the interface number
8076 counter.
8077
8078 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8079
8080 * parse.y (source_start_java_method): Deleted unnecessary code.
8081 (patch_method_invocation): Fixed comment.
8082
8083 2000-04-24 Robert Lipe <robertlipe@usa.net>
8084
8085 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
8086
8087 2000-04-23 Tom Tromey <tromey@cygnus.com>
8088
8089 * boehm.c (mark_reference_fields): Use int_byte_position.
8090
8091 2000-04-22 Tom Tromey <tromey@cygnus.com>
8092
8093 * boehm.c (mark_reference_fields): Only call byte_position on
8094 non-static fields.
8095
8096 2000-04-22 Tom Tromey <tromey@cygnus.com>
8097
8098 * boehm.c (mark_reference_fields): Added `last_view_index'
8099 argument. Use DECL_FIELD_OFFSET to determine field's offset.
8100
8101 2000-04-20 Mo DeJong <mdejong@cygnus.com>
8102
8103 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
8104 * parse.y (check_class_interface_creation): Fixed comments. Select
8105 permitted modifiers for (inner) interfaces. Changed error message
8106 to report rejected modifiers used with local classes.
8107
8108 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
8109
8110 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
8111 of directly inherited type considered in scope.
8112 * parse.y (do_resolve_class): Search inherited classes for inner
8113 classes.
8114
8115 2000-04-20 Tom Tromey <tromey@cygnus.com>
8116
8117 * parse.y (not_accessible_p): Use member's class, not current
8118 class, when doing inheritance check for protected reference.
8119 Fixes PR gcj/124.
8120
8121 2000-04-20 Jason Schroeder <shrode@subnature.com>
8122
8123 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
8124
8125 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
8126
8127 * parse.y (lookup_field_wrapper): Search for final local aliases.
8128 (resolve_expression_name): Let lookup_field_wrapper search for
8129 final local aliases. Force the value of `name' if one is found.
8130 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
8131 an expression name. Fixed comments.
8132
8133 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
8134
8135 * parse.y (yyerror): `msg' can be null, don't use it in that case.
8136
8137 2000-04-19 Tom Tromey <tromey@cygnus.com>
8138
8139 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
8140
8141 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
8142
8143 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
8144
8145 2000-04-18 Tom Tromey <tromey@cygnus.com>
8146
8147 PR gcj/211:
8148 * gjavah.c (utf8_cmp): Changed return value.
8149 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
8150 result.
8151 (cxx_keywords): New global.
8152 (get_field_name): Handle new result of cxx_keyword_subst.
8153 (print_method_info): Likewise.
8154
8155 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
8156
8157 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
8158 with a newline, for CNI.
8159 (print_stub_or_jni): Print a space or newline before method name for
8160 CNI as well as JNI.
8161 (print_cxx_classname): Don't write leading "::" in CNI stub method.
8162 (process_file): Include gcj/cni.h if generating CNI stubs.
8163
8164 2000-04-16 Tom Tromey <tromey@cygnus.com>
8165
8166 * gjavah.c (decompile_method): Use print_field_name.
8167 Fixes PR gcj/205.
8168
8169 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
8170
8171 * parse.y (java_expand_classes): Reverse the package list once.
8172 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
8173 reduction.
8174 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
8175 the `==' and `!=' operators.
8176
8177 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8178
8179 * jcf-write.c (generate_bytecode_insns): At invocation time,
8180 always relate an interface method to the type of its selector.
8181
8182 2000-04-05 Tom Tromey <tromey@cygnus.com>
8183
8184 Fix for PR gcj/2:
8185 * expr.c (expand_invoke): Generate check to see if object pointer
8186 is null in nonvirtual invocation case.
8187 * java-tree.h (soft_nullpointer_node): Declare.
8188 * decl.c (soft_nullpointer_node): New global.
8189 (init_decl_processing): Initialize soft_nullpointer_node.
8190 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
8191 or `private' methods.
8192 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
8193
8194 2000-04-05 Tom Tromey <tromey@cygnus.com>
8195
8196 Fix for PR gcj/140:
8197 * parse.y (check_final_assignment): Recognize assignments to the
8198 `length' field of an array when generating class files.
8199
8200 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8201
8202 * class.c (decl_hash): Prototype removed.
8203 (decl_compare): Likewise.
8204
8205 2000-04-05 Tom Tromey <tromey@cygnus.com>
8206
8207 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
8208 * parse.y (check_modifiers_consistency): Check for final/volatile
8209 clash. Fixes PR gcj/164.
8210
8211 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8212
8213 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
8214 made global.
8215 (java_hash_compare_tree_node): Renamed from `decl_compare, made
8216 global.
8217 (add_method_1): Use `java_hash_hash_tree_node' and
8218 `java_hash_compare_tree_node'.
8219 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
8220 (java_hash_compare_tree_node): Likewise.
8221 * parse.y (find_applicable_accessible_methods_list): Create,
8222 delete and use a hash table to remember already searched interfaces.
8223
8224 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
8225
8226 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
8227 with latest entry.
8228
8229 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8230
8231 * boehm.c (mark_reference_fields, set_bit): Prototype.
8232 (set_bit): Un-ANSI-fy definition.
8233
8234 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
8235 Prototype.
8236
8237 * decl.c (emit_init_test_initialization): Likewise.
8238
8239 * gjavah.c (jni_print_char): Likewise.
8240
8241 * parse.y (create_new_parser_context): Likewise.
8242
8243 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
8244
8245 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
8246 patch missing hunk. Fixed indentation.
8247
8248 2000-03-30 Tom Tromey <tromey@cygnus.com>
8249
8250 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
8251 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
8252
8253 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
8254
8255 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8256 when negative *before* using it as an array index.
8257 * ChangeLog: Fixed typo.
8258
8259 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
8260
8261 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
8262 to 0 when it reaches -1.
8263
8264 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
8265
8266 * jcf-parse.c (get_constant): Properly cast `num' during the
8267 invocation of `add_double'.
8268 * jcf-write.c (push_long_const): Properly cast `lo' before
8269 comparing it to short bounds.
8270 * parse-scan.y (interface_declaration:): Rule re-arrange so that
8271 `interface_body:' is reduced after the current interface is
8272 pushed.
8273
8274 2000-03-26 Tom Tromey <tromey@cygnus.com>
8275
8276 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
8277 Java-specific `-f' option.
8278
8279 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8280
8281 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
8282 Adjust order of making types.
8283 Make bitsize_*_node values.
8284
8285 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8286
8287 * class.c (make_field_value): Use byte_position.
8288 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
8289 (java_array_data_offset): Likewise.
8290 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
8291 bzero call.
8292
8293 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
8294
8295 * parse.y (check_abstract_method_definitions): New local
8296 `end_type_reached'. Make sure we also consider `end_type'.
8297 (java_check_abstract_method_definitions): Make sure we eventually
8298 consider `java.lang.Object'.
8299 (maybe_use_access_method): Don't use access method if not in the
8300 context of a pure inner class or if the method's context is right.
8301 (find_applicable_accessible_methods_list): New static flag
8302 `object_done'. Don't search abstract classes as interfaces. Fixed
8303 indentation. Fixed the `java.lang.Object' only search. Search
8304 class interface(s) first, then fully search enclosing contexts.
8305 (find_most_specific_methods_list): Pick the closest candidate when
8306 they're all abstract.
8307
8308 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
8309
8310 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8311 properly initialize `finished_label'. Don't emit gotos for empty
8312 try statements.
8313
8314 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8315
8316 * except.c (emit_handlers): Clear catch_clauses_last.
8317
8318 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8319
8320 * parse.y (check_method_types_complete): New function.
8321 (create_class): Reset anonymous class counter only when seeing an
8322 non inner classe.
8323 (java_complete_class): JDEP_METHOD: Don't recompute signature
8324 if incomplete.
8325
8326 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8327
8328 * class.c (build_static_ref): Fixed indentation in comment.
8329 * java-tree.def (TRY_EXPR): Fixed typo in name.
8330 (CLASS_LITERAL): Likewise.
8331 * java-tree.h: (TYPE_DOT_CLASS): New macro.
8332 (struct lang_type): New field `dot_class'.
8333 * jcf-write.c (generate_bytecode_insns): Fixed error message.
8334 (generate_classfile): Method `class$' is synthetic.
8335 * parse.y (build_do_class_method): New function.
8336 (build_dot_class_method_invocation): Likewise.
8337 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
8338 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
8339 (qualify_ambiguous_name): Likewise.
8340 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
8341 (build_try_statement): Fixed leading comment.
8342
8343 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8344
8345 * class.c (make_field_value): Properly handle sizes.
8346 (get_dispatch_vector): Use tree_low_cst and host_integerp.
8347 (layout_class_method): Count using trees.
8348 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
8349 * expr.c (java_array_data_offset): Use int_bit_position.
8350 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
8351 (build_invokevirtual): Use tree_low_cst and do computations with trees.
8352
8353 2000-03-16 Tom Tromey <tromey@cygnus.com>
8354
8355 * lang.c (flag_hash_synchronization): New global.
8356 (lang_f_options): Added `hash-synchronization'.
8357 * lang-options.h: Mention -fhash-synchronization.
8358 * java-tree.h (flag_hash_synchronization): Declare.
8359 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
8360 hash table synchronization is disabled.
8361 * decl.c (init_decl_processing): Only push `sync_info' value when
8362 hash table synchronization is disabled.
8363 * class.c (make_class_data): Only push `sync_info' field when hash
8364 table synchronization is disabled. Removed dead code.
8365
8366 2000-03-16 Tom Tromey <tromey@cygnus.com>
8367
8368 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
8369
8370 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
8371
8372 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
8373 classes.
8374 * parse.y (patch_method_invocation): Handle anonymous classes
8375 creation in static context.
8376
8377 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
8378
8379 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
8380 * parse.y (resolve_qualified_expression_name): Use it.
8381 (patch_method_invocation): Likewise.
8382
8383 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
8384
8385 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
8386 depending on the type of dependency which dictates what the
8387 current class is.
8388 (unresolved_type_p): Resolved types limited to the current class.
8389
8390 2000-03-15 Tom Tromey <tromey@cygnus.com>
8391
8392 * decl.c (init_decl_processing): Set type of `sync_info' to be
8393 pointer to Object.
8394
8395 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
8396 Correctly compute bit number for current slot. Zero `high' and
8397 `low' in DS_LENGTH case. Don't skip inherited fields. Use
8398 mark_reference_fields.
8399 (mark_reference_fields): New function.
8400
8401 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
8402
8403 * parse.y (register_incomplete_type): Fixed initialization of
8404 JDEP_ENCLOSING.
8405
8406 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
8407
8408 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
8409 static globals.
8410 (push_class_context, pop_class_context): New function.
8411 (class_body:): Call pop_class_context.
8412 (interface_body:): Likewise.
8413 (INNER_QUALIFIER): New macro.
8414 (report_class_declaration): Changed output format and use
8415 INNER_QUALIFIER. Call push_class_context.
8416
8417 2000-02-14 Andrew Haley <aph@cygnus.com>
8418
8419 * check-init.c (check_init): Add new cases for unary and binary
8420 tree nodes.
8421
8422 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8423
8424 * parse.y (resolve_package): Set `next' once a type name has been
8425 progressively discovered.
8426 (resolve_qualified_expression_name): Propagate resolution only if
8427 there are remaining qualifiers. Take into account `q' might have
8428 been cleared after re-qualification.
8429 * parse.y (patch_method_invocation): New local `resolved'.
8430 Section dealing with qualified expression rewritten to use
8431 resolve_field_access.
8432
8433 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8434
8435 * parse.h (PUSH_CPC): Fixed indentation.
8436 (DEBUG_CPC): New macro.
8437 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
8438 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
8439 * parse.y (class_body_declaration:): Use
8440 SET_CPC_INSTANCE_INITIALIZER_STMT.
8441 (method_declaration:): Check for null current_function_decl.
8442 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
8443 (java_parser_context_pop_initialized_field): Better handling of
8444 empty lists.
8445 (maybe_make_nested_class_name): Mark nested class name as
8446 qualified when necessary.
8447 (end_class_declaration): Don't call java_parse_context_resume when
8448 one or more error occurred.
8449 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
8450 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
8451 SET_CPC_INITIALIZER_STMT.
8452 (method_header): Check for inner classes declaring static methods.
8453 (resolve_qualified_expression_name): Handle situation where `this'
8454 is implied.
8455
8456 2000-03-13 Hans Boehm <boehm@acm.org>
8457
8458 * typeck.c (build_prim_array_type): Correctly set the high word too.
8459
8460 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
8461
8462 * parse.y (java_complete_expand_methods): Leave <clinit> out of
8463 ordinary methods.
8464 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
8465 list of methods for interfaces.
8466
8467 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8468
8469 * parse.y (qualify_ambiguous_name): Properly handle expressions
8470 using `null'.
8471
8472 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8473
8474 * parse.y (check_final_assignment): Extended to process
8475 COMPOUND_EXPR.
8476 (patch_assignment): Have check_final_assignment called only once.
8477
8478 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8479
8480 * java-tree.h (IS_INIT_CHECKED): New flag.
8481 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
8482 * parse.y (patch_string): Call force_evaluation_order on the
8483 completed string concatenation tree.
8484 * expr.c (force_evaluation_order): Call force_evaluation_order on
8485 function's arguments too.
8486
8487 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8488
8489 * decl.c (emit_init_test_initialization): Mark KEY as unused.
8490 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8491 (build_anewarray): Likewise.
8492 * parse.y (patch_newarray): Likewise.
8493 * parse.c: Regenerated.
8494
8495 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
8496
8497 * decl.c (init_decl_processing): Added new class fields `depth',
8498 `ancestors', and `idt' to class_type_node. Use
8499 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
8500 * class.c (make_class_data): Push initial values for new fields.
8501 * java-tree.h: Updated prototype for `build_invokeinterface'.
8502 * expr.c (build_invokeinterface): Changed parameters to accept
8503 `method' tree. Calculate index of `method' in its declaring
8504 interface. Build call to _Jv_LookupInterfaceMethodIdx.
8505 (expand_invoke): Call `build_invokeinterface' with new parameters.
8506 * parse.y (patch_invoke): Call `build_invokeinterface' with new
8507 parameters.
8508
8509 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
8510
8511 * typeck.c (lookup_do): Search superinterfaces first
8512 when looking up an interface method. From Godmar Back
8513 <gback@cs.utah.edu>
8514
8515 2000-03-06 Tom Tromey <tromey@cygnus.com>
8516
8517 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
8518
8519 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
8520
8521 * java-tree.h (lookup_argument_method2): Declared.
8522 (safe_layout_class): Prototype moved from parse.h.
8523 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
8524 * parse.y (java_check_regular_methods): Local `super_class' gone.
8525 Call lookup_argument_method2 instead of lookup_argument_method.
8526 Perform modifier match for methods found declared in implemented
8527 interfaces. Fixed indentation problem. Overriding/hiding error
8528 report to take place only for methods found in classes.
8529 * typeck.c (lookup_argument_method): Changed leading
8530 comment. Re-written by calling lookup_do.
8531 (lookup_argument_method2): New function.
8532 (lookup_java_method): Re-written by calling lookup_do.
8533 (lookup_do): New function.
8534
8535 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
8536
8537 * check-init.c (check_init): Removed dead code. Handle (blank)
8538 final variables.
8539 * parse.y (declare_local_variables): New local `final_p', set it
8540 and use it to initialize LOCAL_FINAL.
8541 (check_final_assignment): Only check FIELD_DECLs.
8542
8543 2000-02-17 Tom Tromey <tromey@cygnus.com>
8544
8545 * Makefile.in (JAVA_OBJS): Added boehm.o.
8546 (boehm.o): New target.
8547 * Make-lang.in (JAVA_SRCS): Added boehm.c.
8548 * java-tree.h (flag_use_boehm_gc): Declare.
8549 (get_boehm_type_descriptor): Declare.
8550 * lang.c (lang_f_options): Added `use-boehm-gc'.
8551 (flag_use_boehm_gc): New global.
8552 * lang-options.h: Added -fuse-boehm-gc.
8553 * boehm.c: New file.
8554 * class.c (get_dispatch_table): If class uses a Boehm type
8555 descriptor, put it in the vtable.
8556 (make_class_data): Removed dead code.
8557
8558 2000-03-03 Per Bothner <per@bothner.com>
8559
8560 * decl.c (init_decl_processing): Initialize sizetype properly.
8561
8562 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8563
8564 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
8565 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
8566 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8567 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
8568 (jcf_parse): New local `current'. Load innerclasses seen in outer
8569 context being processed.
8570 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
8571 * jcf-write.c (append_innerclasses_attribute): New function.
8572 (append_innerclasses_attribute_entry): Likewise.
8573 (get_access_flags): Handle static classes. Set anonymous and local
8574 classes to be private.
8575 (generate_classfile): Attribute count adjusted. Call
8576 append_innerclasses_attribute.
8577 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
8578 PURE_INNER_CLASS_TYPE_P.
8579 * parse.y (parser_qualified_classname): New parameter `is_static',
8580 produce non qualified name accordingly.
8581 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
8582 (create_interface): Added argument to parser_qualified_classname.
8583 (create_class): Added argument to parser_qualified_classname. Setup
8584 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
8585 (add_inner_class_fields): Fixed indentation.
8586 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
8587 (method_declarator): Fixed typo in comment.
8588 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
8589 (build_current_thisn): Likewise.
8590 (patch_method_invocation): Likewise.
8591
8592 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
8593
8594 * decl.c (current_function_decl): Move to toplev.c.
8595
8596 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8597
8598 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
8599 (DECL_BIT_INDEX): Use underlying representation.
8600 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
8601
8602 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8603
8604 * expr.c (build_java_ret): Pass proper type to size_binop.
8605
8606 2000-02-25 Anthony Green <green@cygnus.com>
8607
8608 * expr.c (build_class_init): Mark the decl to be ignored by
8609 check_init.
8610 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
8611 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
8612 * class.c (init_test_hash_newfunc): New function.
8613 (decl_hash): New function.
8614 (decl_compare): New function.
8615 * decl.c (emit_init_test_initialization): New function.
8616 (complete_start_java_method): Traverse the init test hashtable,
8617 calling emit_init_test_initialization.
8618 (always_initialize_class_p): Define.
8619 * expr.c (build_class_init): Use initialization tests when
8620 emitting class initialization code.
8621 (always_initialize_class_p): Declare.
8622 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
8623 1.
8624 * java-tree.h: Include hash.h.
8625 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
8626 (struct lang_decl): Add init_test_table field.
8627 (init_test_hash_entry): Define.
8628
8629 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
8630
8631 * gjavah.c (main): Avoid using `argi' to report unimplemented
8632 options.
8633
8634 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
8635
8636 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
8637 initialize locals to avoid warnings. Local `exception_type' moved
8638 into if statement.
8639
8640 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
8641
8642 * parse.y (resolve_expression_name): Use `orig' as a second
8643 argument to resolve_field_access.
8644 (resolve_field_access): Removed unnecessary code when dealing with
8645 static fields.
8646
8647 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
8648
8649 * class.c (push_super_field): Don't push the field twice.
8650 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
8651 * parse.h (java_reorder_fields): Prototyped.
8652 * parse.y (java_reorder_fields): New function.
8653 (java_layout_class): Simplified not to worry about re-ordering.
8654
8655 2000-02-23 Tom Tromey <tromey@cygnus.com>
8656
8657 * gjavah.c (print_name): In JNI case, correctly quote string.
8658 (print_method_info): Don't handle overrides in JNI mode.
8659
8660 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
8661
8662 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
8663 value type set to `boolean_type_node'.
8664
8665 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
8666
8667 * jcf-dump.c (main): Test for correct condition after
8668 output file creation.
8669
8670 2000-02-19 Anthony Green <green@cygnus.com>
8671
8672 * jcf-depend.c (add_entry): Fix test for first list entry.
8673
8674 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8675
8676 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
8677 * constants.c (build_constants_constructor): Likewise.
8678
8679 2000-02-19 Anthony Green <green@cygnus.com>
8680
8681 * jcf-depend.c (add_entry): Add entries to the end of the list.
8682
8683 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
8684
8685 * decl.c (INT_TYPE_SIZE): Define if necessary.
8686 (expand_java_return): Handle the case of a native integer smaller
8687 than a JVM integer.
8688
8689 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
8690
8691 * gjavah.c (help): Use GCCBUGURL.
8692 * jv-scan.c (help): Likewise.
8693 * jcf-dump.c (help): Likewise.
8694
8695 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8696
8697 * jcf-write.c (generate_bytecode_insns): Don't generate empty
8698 `finally' clauses.
8699
8700 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8701
8702 * jcf-parse.c (load_class): Call `fatal' if no file containing
8703 the target class are found.
8704
8705 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
8706
8707 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
8708 lex.c, lex.h, and PARSE_H to...
8709 (parse.o, parse-scan.o): ...here, respectively.
8710
8711 * lex.c: Split out code that may trigger SIGFPE from yylex()
8712 to its own function.
8713 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
8714
8715 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8716
8717 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
8718
8719 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
8720
8721 * parse.y (outer_field_access_p): Stop in time when outer contexts
8722 are exhausted.
8723 (resolve_qualified_expression_name): Properly qualify *everything*
8724 after a package.type to be resoled as expression names.
8725 (find_applicable_accessible_methods_list): Save/restore `class' to
8726 isolate it from a possible outer context search.
8727
8728 2000-02-15 Tom Tromey <tromey@cygnus.com>
8729
8730 * gjavah.c (jni_print_char): New function.
8731 (print_full_cxx_name): Use it.
8732 (decode_signature_piece): Likewise.
8733 (print_cxx_classname): Likewise.
8734
8735 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8736
8737 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
8738 version.o.
8739 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
8740
8741 * gjavah.c: Include version.h.
8742
8743 * jcf-dump.c: Likewise.
8744
8745 * jv-scan.c: Likewise.
8746
8747 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
8748
8749 * parse.y (outer_field_access_fix): First parameter now a tree
8750 node. Check for assignment to final. First argument to
8751 build_outer_field_access_fix modified to accommodate prototype.
8752 (build_outer_field_access): Don't check for assignment to final
8753 here.
8754 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
8755 possibly returned by outer_field_access_fix. Changed
8756 outer_field_access_fix's first argument.
8757 (check_final_assignment): $finit$'s context is OK.
8758 (patch_unaryop): Use node instead of its line/column value when
8759 calling outer_field_access_fix.
8760
8761 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
8762
8763 * parse.y (interface_declaration:): No longer tagged
8764 <node>. Re-installed default action.
8765 (class_member_declaration:): Handle inner interfaces.
8766 (interface_member_declaration): Handle inner interfaces and
8767 classes.
8768 (create_interface): Push error if one seen. Suspend parsing
8769 context when processing an inner interface.
8770 (register_fields): Inner class static field limitations not to
8771 apply to inner interfaces.
8772
8773 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8774
8775 * jcf-parse.c (load_class): Update `java_error_count' when a
8776 class' file can't be found.
8777 (parse.y): Avoid (byte)code generation when errors seen.
8778
8779 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8780
8781 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
8782 decodes a valid node.
8783 (patch_binop): Handle TRUNC_DIV_EXPR.
8784
8785 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8786
8787 * parse.y (resolve_package): New local `acc'. Try to progressively
8788 build and guess a package and type name.
8789
8790 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8791
8792 * parse.y (find_applicable_accessible_methods_list): Load and
8793 layout the search class if necessary.
8794 (java_complete_tree): Keep to original type of the folded initial
8795 value.
8796
8797 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
8798
8799 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
8800 Generate error message if circularity is detected. New static
8801 local `list'.
8802 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
8803 * jcf-write.c (generate_bytecode_insns): Very simply handle
8804 SAVE_EXPR.
8805 * parse.y (java_check_circular_reference): Use
8806 `cyclic_inheritance_report' during report, if necessary.
8807 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
8808 walking NEW_ARRAY_INIT twice.
8809
8810 2000-02-09 Tom Tromey <tromey@cygnus.com>
8811
8812 * parse.y (check_class_interface_creation): Allow inner classes to
8813 be `private' or `protected', check modifiers' consistency. Prevent
8814 block local classes from bearing any modifiers.
8815
8816 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8817
8818 * except.c (check_start_handlers): Re-add prototype lost in last
8819 patch.
8820 (maybe_start_try): Remove excess argument to `check_start_handlers'.
8821
8822 2000-02-09 Andrew Haley <aph@cygnus.com>
8823
8824 * decl.c (clear_binding_level): Remove excess initializer.
8825 (maybe_poplevels): Remove unused variable.
8826 (force_poplevels): Ditto.
8827 (struct binding_level): Add comment.
8828
8829 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8830
8831 * jcf-write.c (generate_classfile): Don't consider
8832 pre-initialization with reference value (use <clinit> instead.)
8833 * parse.y (java_fix_constructors): No generated constructor for
8834 interfaces.
8835 (build_outer_field_access): Removed debug message.
8836 (outer_field_expanded_access_p): Adapted to bytecode generation.
8837 (build_outer_field_access_method): Use fix_method_argument_names.
8838 (build_outer_method_access_method): Fixed indentation. Added
8839 comment. Handle access method generation for static and also void
8840 methods.
8841 (build_access_to_thisn): Inserted debug message.
8842 (maybe_build_thisn_access_method): Use fix_method_argument_names.
8843 (resolve_qualified_expression_name): Fixed comment.
8844 (not_accessible_p): Adapted to bytecode generation. Added comment.
8845 (patch_method_invocation): Added comment.
8846 (maybe_use_access_method): Fixed leading comment. Handle static
8847 methods.
8848 (java_complete_lhs): Don't shortcut handling of initialized upon
8849 declaration String type static fields when generating bytecode.
8850 (patch_unaryop): Handle outer field access when generating
8851 bytecode.
8852
8853 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
8854
8855 * java-tree.h (FIELD_THISN): New macro.
8856 * jcf-write.c (append_synthetic_attribute): New function.
8857 (generate_classfile): Set "Synthetic" attribute on this$<n>,
8858 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
8859 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
8860 this$<n> fields.
8861 (build_outer_field_access): Turned on access functions usage and
8862 generation when compiling to bytecode.
8863 (maybe_use_access_method): Likewise.
8864
8865 2000-01-25 Andrew Haley <aph@cygnus.com>
8866
8867 * java-except.h (struct eh_range): Add `expanded' field.
8868 (maybe_start_try): Add end_pc arg.
8869 (maybe_end_try): Ditto.
8870 * java-tree.h (force_poplevels): new function.
8871 * expr.c (expand_byte_code): Don't call maybe_start_try or
8872 maybe_end_try.
8873 * except.c (add_handler): Reset expanded.
8874 (expand_start_java_handler): Set expanded.
8875 (check_start_handlers): Don't expand a start handler that's
8876 already been expanded.
8877 (maybe_start_try): Add end_pc arg. Only expand a handler which
8878 ends after end_pc.
8879 (expand_end_java_handler): call force_poplevels.
8880 (force_poplevels): new function.
8881 * decl.c (binding_level): Add start_pc of binding level.
8882 (maybe_pushlevels): Call maybe_start_try when pushing binding
8883 levels.
8884 (maybe_poplevels): Call maybe_end_try when popping binding levels.
8885 (LARGEST_PC): Define.
8886 (clear_binding_level): Use LARGEST_PC.
8887
8888 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
8889 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
8890 (binding_depth, is_class_level, current_pc): new variables.
8891 (struct binding_level): ditto.
8892 (indent): new function.
8893 (push_jvm_slot): add debugging info.
8894 (maybe_pushlevels): ditto.
8895 (maybe_poplevels): ditto.
8896 (pushlevel): ditto.
8897 (poplevel): ditto.
8898 (start_java_method): ditto.
8899 (give_name_to_locals): comment only.
8900 * except.c (binding_depth, is_class_level, current_pc):
8901 new variables.
8902 (expand_start_java_handler): add debugging info.
8903 (expand_end_java_handler): ditto.
8904
8905 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8906
8907 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
8908 (print_name_for_stub_or_jni, process_file): Constify a char*.
8909
8910 2000-02-03 Tom Tromey <tromey@cygnus.com>
8911
8912 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
8913
8914 2000-01-31 Scott Bambrough <scottb@netwinder.org>
8915
8916 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
8917 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
8918 defined to be 1.
8919
8920 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
8921
8922 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
8923 * java-tree.h (TYPE_II_STMT_LIST): New macro.
8924 (struct lang_type): New field `ii_block'.
8925 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
8926 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
8927 * parse.h (struct parser_ctxt): New field `instance_initializers'.
8928 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
8929 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
8930 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
8931 macros.
8932 * parse.y (add_instance_initializer): New function.
8933 (in_instance_initializer): New static global.
8934 (class_body_declaration:): Link instance initializer block.
8935 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
8936 (array_creation_expression:): Remove unused local.
8937 (java_parser_context_push_initialized_field): Fixed leading
8938 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
8939 CPC_INSTANCE_INITIALIZER_LIST.
8940 (java_parser_context_pop_initialized_field): Likewise.
8941 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
8942 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
8943 CPC_INITIALIZER_STMT.
8944 (fix_constructors): New local `class_type'. Use it. Call
8945 add_instance_initializer.
8946 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
8947 (patch_return): Forbid return in instance initializers.
8948 (patch_throw_statement): Enforce exception handling in the context
8949 of instance initializers.
8950
8951 2000-02-03 Tom Tromey <tromey@cygnus.com>
8952
8953 * Make-lang.in (java.mostlyclean): Remove executables in
8954 `mostlyclean'.
8955
8956 2000-01-31 Scott Bambrough <scottb@netwinder.org>
8957
8958 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
8959 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
8960 (java_float_finite): Convert to use union Word from javaop.h.
8961 (java_double_finite): Convert to use union DWord from javaop.h.
8962
8963 2000-02-02 Tom Tromey <tromey@cygnus.com>
8964
8965 * gjavah.c (options): Added `jni' entry.
8966 (help): Document -jni.
8967 (flag_jni): New global.
8968 (process_file): Handle JNI output. Don't print text from
8969 -prepend, -add, etc, when generating stubs. Only remove `.class'
8970 suffix if it actually exists.
8971 (main): Create a `.c' file when run with `--jni --stubs'. Create
8972 correct output file name with `--jni'.
8973 (print_include): Mangle header name differently in JNI case.
8974 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
8975 method list.
8976 (print_method_info): Handle JNI case. Put signature info into
8977 method name. Handle case when STREAM is NULL.
8978 (print_name_for_stub_or_jni): New function.
8979 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
8980 (print_cxx_classname): Handle JNI.
8981 (print_full_cxx_name): Likewise.
8982 (decode_signature_piece): Likewise.
8983 (overloaded_jni_method_exists_p): New function.
8984 (struct method_name): Added `signature' and `sig_length' fields.
8985 (HANDLE_END_FIELD): Do nothing in JNI mode.
8986
8987 2000-02-02 Tom Tromey <tromey@cygnus.com>
8988
8989 * jv-scan.c: Include version.c, <getopt.h>.
8990 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
8991 (options): New array.
8992 (usage): New function.
8993 (version): New function.
8994 (main): Use getopt_long to parse command line.
8995 * jcf-dump.c: Include version.c, <getopt.h>.
8996 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
8997 OPT_JAVAP): New macros.
8998 (options): New array.
8999 (usage): Return `void'. Changed message.
9000 (help): New function.
9001 (version): New function.
9002 (main): Use getopt_long_only to parse command line.
9003 * gjavah.c: Include <getopt.h>.
9004 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
9005 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
9006 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
9007 (options): New array.
9008 (java_no_argument): Removed.
9009 (help): Updated with missing options.
9010 (main): Use getopt_long_only to parse command line.
9011 (usage): Changed message.
9012
9013 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9014
9015 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
9016 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
9017 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
9018 * parse.y (array_creation_expression:): Handle anonymous arrays.
9019 (build_array_from_name): Don't set `ret_name' if null.
9020 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
9021 (qualify_ambiguous_name): Likewise.
9022 (java_complete_expand_class): Likewise.
9023
9024 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9025
9026 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
9027 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
9028 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
9029 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
9030 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
9031 AIPL_FUNCTION_COMPLETED_INVOCATION.
9032 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
9033 AIPL_FUNCTION_INVOCATION_READY.
9034 (AIPL_FUNCTION_DECLARATION): New enum entry.
9035 * parse.y (reorder_static_initialized): New function.
9036 (java_parser_context_pop_initialized_field): Use it.
9037 (add_inner_class_fields): Use
9038 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
9039 augmented. Install marker after last alias initializer, if any.
9040 (generate_finit): Fixed typo. Don't try to retain only the used
9041 fields.
9042 (method_header): Compute and set DECL_FUNCTION_NAP.
9043 (method_declarator): Fixed comment. Insert alias initializer in
9044 parameter list.
9045 (build_alias_initializer_parameter_list): Fixed leading
9046 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
9047 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
9048 (java_complete_expand_class): Code to retain only used aliases
9049 removed.
9050 (java_complete_expand_methods): New local `first_decl'. Generate
9051 $finit$ first, then expand the constructors, regular methods and
9052 <clinit>.
9053 (java_complete_expand_method): Don't report error on missing
9054 return statement if previously detected bogus.
9055 (fix_constructors): Don't patch constructor parameters list.
9056 (patch_method_invocation): Use new AIPL enum values. Reverse
9057 alias initializer list for anonymous classes.
9058
9059 2000-01-30 Anthony Green <green@redhat.com>
9060
9061 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
9062 determine how many stack slots to pop.
9063
9064 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
9065
9066 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
9067 error handling/recovery.
9068 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
9069
9070 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
9071
9072 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
9073 FIELD_LOCAL_ALIAS_USED): New macros.
9074 (DECL_FUNCTION_NAP): New macro.
9075 (struct lang_decl): New field `nap'.
9076 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
9077 (struct lang_type): New fields `finit_stmt_list' and
9078 `clinit_stmt_list'.
9079 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
9080 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
9081 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
9082 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
9083 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
9084 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
9085 (BUILD_THROW): Macro line separator re-indented.
9086 * parse.y (end_class_declaration): New function.
9087 (maybe_generate_pre_expand_clinit): New name for
9088 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
9089 pre-expand static fields.
9090 (maybe_generate_clinit): Function deleted.
9091 (check_for_static_method_reference): Prototype's parameter list
9092 indented.
9093 (generate_finit): New name for maybe_generate_finit. Changed
9094 leading comment. Function rewritten to use
9095 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
9096 (build_alias_initializer_parameter_list): New function.
9097 (java_parser_context_pop_initialized_field): Likewise.
9098 (add_inner_class_fields): Likewise.
9099 (type_declaration:): Call end_class_declaration.
9100 (class_member_declaration:): Likewise.
9101 (formal_parameter_list:): Fixed typos.
9102 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
9103 element. Improved error handling.
9104 (block_statement:): Call end_class_declaration.
9105 (anonymous_class_creation:): Likewise.
9106 (create_anonymous_class): Fixed comments.
9107 (create_class): Call add_inner_class_fields.
9108 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
9109 (method_header): Use MARK_FINAL_PARMS.
9110 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
9111 (method_declarator): Propagate final argument flag.
9112 (craft_constructor): New local `artificial'. Call
9113 build_alias_initializer_parameter_list. Use
9114 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
9115 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
9116 necessary.
9117 (complete_expand_class): Get rid of unused outer context local
9118 alias fields.
9119 (java_complete_expand_methods): Fixed leading
9120 comment. Generate/pre-expand <clinit> first. Changed method
9121 expansion order to regular, $finit$, constructors, <clinit>.
9122 (java_complete_expand_method): Set current_function_decl.
9123 (fix_constructors): Fix constructor parameter list to account for
9124 outer context local alias initializers.
9125 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
9126 (resolve_expression_name): Lookup outer context local aliases. New
9127 local `access', use it.
9128 (patch_method_invocation): Patch inner class ctor invocation with
9129 outer context local aliases initialization values. $finit$
9130 invocation patching now includes things generated with
9131 build_alias_initializer_parameter_list.
9132 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
9133 (build_super_invocation): Likewise.
9134 (patch_assignment): Changed comment.
9135
9136 2000-01-27 Andrew Haley <aph@cygnus.com>
9137
9138 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
9139 (emit_if): Ditto.
9140 (emit_jsr): Ditto.
9141
9142 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9143
9144 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
9145 concatenation.
9146 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
9147
9148 * parse.y (register_fields): Don't pass a format specifier to
9149 OBSOLETE_MODIFIER_WARNING.
9150 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
9151 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
9152 specifier.
9153 (check_modifiers): Change function into a macro.
9154 (check_class_interface_creation): Pass a literal format string.
9155
9156 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9157
9158 * buffer.h: PROTO -> PARAMS.
9159 * check-init.c: Likewise.
9160 * class.c: Likewise.
9161 * constants.c: Likewise.
9162 * convert.h: Likewise.
9163 * decl.c: Likewise.
9164 * except.c: Likewise.
9165 * expr.c: Likewise.
9166 * gjavah.c: Likewise.
9167 * java-except.h: Likewise.
9168 * java-tree.h: Likewise.
9169 * jcf-depend.c: Likewise.
9170 * jcf-dump.c: Likewise.
9171 * jcf-parse.c: Likewise.
9172 * jcf-path.c: Likewise.
9173 * jcf-reader.c: Likewise.
9174 * jcf-write.c: Likewise.
9175 * jcf.h: Likewise.
9176 * jv-scan.c: Likewise.
9177 * jvgenmain.c: Likewise.
9178 * jvspec.c: Likewise.
9179 * lang.c: Likewise.
9180 * lex.c: Likewise.
9181 * lex.h: Likewise.
9182 * parse-scan.y: Likewise.
9183 * parse.h: Likewise.
9184 * parse.y: Likewise.
9185 * typeck.c: Likewise.
9186 * verify.c: Likewise.
9187 * xref.c: Likewise.
9188 * xref.h: Likewise.
9189 * zextract.c: Likewise.
9190 * zipfile.h: Likewise.
9191
9192 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
9193
9194 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9195 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
9196 * constants.c (build_constant_data_ref): Check for cached
9197 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
9198 in TYPE_CPOOL_DATE_REF.
9199 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
9200 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
9201 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
9202 (LOCAL_FINAL): New macro.
9203 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
9204 constant pool -- don't try to reuse.
9205 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
9206 TYPE_LANG_SPECIFIC.
9207 (find_in_current_zip): Use TYPE_JCF.
9208 * parse.h (java_check_final): Prototype removed.
9209 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
9210 (maybe_create_class_interface_decl,
9211 check_class_interface_creation): Likewise.
9212 (java_expand_finals): Function removed.
9213 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
9214 (block_statement:): Fixed comment.
9215 (anonymous_class_creation:): Likewise.
9216 (check_class_interface_creation): Reversed Jan 12, 2000 extra
9217 argument patch.
9218 (check_class_interface_creation): Loosened error report on (inner)
9219 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
9220 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
9221 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
9222 argument patch.
9223 (create_interface): Likewise.
9224 (anonymous_class_counter): New static global.
9225 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
9226 patch. Fixed comments.
9227 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
9228 anonymous_class_counter when declaring a toplevel class.
9229 (craft_constructor): Fixed constructor name when handling
9230 anonymous classes. Anonymous class constructors to feature hidden
9231 this$<n> parameter.
9232 (java_fix_constructors): Added comment.
9233 (java_check_final): Function removed.
9234 (java_complete_expand_methods): Fixed comment. Don't generate
9235 class data, save its outgoing constant pool instead.
9236 (verify_constructor_super): Skip anonymous class constructor
9237 hidden this$<n> parameter.
9238 (java_expand_classes): New local `saved_ctxp'. Removed call to
9239 java_expand_finals and java_check_final. Expand anonymous class
9240 constructors. Generate class data.
9241 (build_super_invocation): Skip anonymous class hidden this$<n>
9242 parameter.
9243 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
9244 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
9245 (set_java_signature): Likewise.
9246
9247 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
9248
9249 * gjavah.c: Delete ACC_VISIBILITY define.
9250 * jcf.h: Add ACC_VISIBILITY define.
9251 * parse.y: final: rule tagged <value>.
9252 (java_check_regular_methods): Use ACC_VISIBILITY define for
9253 default package access check.
9254 (local_variable_declaration_statement): Use final: rule.
9255
9256 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
9257
9258 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
9259 (final:): New rule.
9260
9261 2000-01-17 Tom Tromey <tromey@cygnus.com>
9262
9263 * gjavah.c (print_field_info): Allow non-static final fields.
9264
9265 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9266
9267 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
9268 * parse.y (patch_anonymous_class): New function.
9269 (create_anonymous_class): Register incomplete type when the
9270 class/interface to extends/implement isn't known yet.
9271 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
9272 (verify_constructor_super): Tuned error message.
9273
9274 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9275
9276 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
9277 (ANONYMOUS_CLASS_P): New macro.
9278 (TYPE_SIGNATURE, TYPE_JCF): New macros.
9279 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
9280 * parse.y (create_class): Added leading argument.
9281 (maybe_create_class_interface_decl,
9282 check_class_interface_creation): Likewise.
9283 (craft_constructor): New function.
9284 (verify_constructor_super): Added argument in prototype.
9285 (class_declaration:): Inserted leading argument.
9286 (for_begin:): Use FOR_LOOP_P.
9287 (anonymous_class_creation): Create WFL of the anonymous class to
9288 instantiate. Call build_new_invocation. Added comments.
9289 (check_class_interface_creation): Handle parameter `anonymous' in
9290 verbose mode class creation announce.
9291 (link_nested_class_to_enclosing): Exclude anonymous classes.
9292 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
9293 anonymous class, even though they appear to have an enclosing
9294 context.
9295 (create_interface): Pass extra argument to
9296 check_class_interface_creation.
9297 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
9298 (create_class): Call check_class_interface_creation and
9299 maybe_create_class_interface_decl with extra new argument. Don't
9300 add private this$<n> to anonymous classes.
9301 (method_declarator): Insert hidden this$<n> to anonymous class
9302 constructors.
9303 (java_fix_constructors): Deleted code creating default
9304 constructor. Call craft_constructor instead.
9305 (java_check_regular_methods): Set `saw_constructor' to 1 for
9306 anonymous classes.
9307 (fix_constructors): Pass extra argument to verify_constructor_super.
9308 (verify_constructor_super): New local `sdecl', use it. Search for
9309 matching constructor (possibly featuring arguments) in super
9310 class.
9311 (lookup_method_invoke): Craft constructor according to arguments
9312 list when dealing with anonymous class constructors.
9313 (build_super_invocation): Pass arguments to anonymous class super
9314 constructors.
9315 (search_loop): Use FOR_LOOP_P.
9316 (labeled_block_contains_loop_p): Likewise.
9317
9318 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
9319
9320 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
9321 (enclosing_context_p): New function.
9322 (get_access_flags_from_decl): Handle CLASS_STATIC.
9323 (maybe_layout_super_class): Extra first argument passed to
9324 do_resolve_class.
9325 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
9326 ID_INIT_P.
9327 * decl.c (access0_identifier_node): New global.
9328 (init_decl_processing): access0_identifier_node initialized.
9329 (pushdecl): Set DECL_CONTEXT only on non type decls.
9330 * expr.c (lookup_field): Lookup inner class fields in enclosing
9331 contexts.
9332 (expand_invoke): Use ID_INIT_P.
9333 (expand_java_field_op): Use DECL_CLINIT_P.
9334 * java-tree.def (CLASS_LITERAL): New tree code.
9335 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
9336 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
9337 (struct lang_decl): New field `inner_access'.
9338 (enclosing_context_p): Prototyped.
9339 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
9340 ID_CLINIT_P): New macros.
9341 (CLASS_STATIC): New macro.
9342 (CLASS_ACCESS0_GENERATED_P): New macro.
9343 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
9344 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
9345 INNER_CLASS_P): New macros.
9346 (DECL_INNER_CLASS_LIST): New macro.
9347 * jcf-parse.c (yyparse): Avoid the use of ANSI string
9348 concatenation.
9349 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9350 the shift value to int. Fixed typo in comment.
9351 * lex.c (inst_id, wpv_id): Initialize.
9352 * mangle.c (unicode_mangling_length): Take `$' into account.
9353 * parse.h (DRECOVER, RECOVER): Terminate properly.
9354 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
9355 (typedef struct _jdep): New field `enclosing'.
9356 (JDEP_ENCLOSING): New macro.
9357 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
9358 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
9359 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
9360 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
9361 GET_ENCLOSING_CPC_CONTEXT): New macros.
9362 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
9363 (do_resolve_class): Added extra argument in prototype.
9364 * parse.y (resolve_class): Added extra argument in prototype.
9365 (maybe_create_class_interface_decl): Likewise.
9366 (maybe_use_access_method, build_wfl_wrap): New functions.
9367 (java_complete_expand_classes, java_complete_expand_class):
9368 Likewise.
9369 (java_parser_context_push_initialized_field,
9370 java_parser_context_suspend, java_parser_context_resume):
9371 Likewise.
9372 (maybe_make_nested_class_name, make_nested_class_name,
9373 set_nested_class_simple_name_value,
9374 link_nested_class_to_enclosing, find_as_inner_class,
9375 find_as_inner_class_do, check_inner_class_redefinition,
9376 build_thisn_assign, build_current_thisn, build_access_to_thisn,
9377 maybe_build_thisn_access_method, build_outer_field_access,
9378 build_outer_field_access_methods, build_outer_field_access_expr,
9379 build_outer_method_access_method, build_new_access_id,
9380 build_outer_field_access_method, outer_field_access_p,
9381 outer_field_expanded_access_p, outer_field_access_fix,
9382 build_incomplete_class_ref, patch_incomplete_class_ref,
9383 create_anonymous_class): Likewise.
9384 (inst_id, wpv_id): New static global variables.
9385 (synchronized:): New rule, tagged <node>.
9386 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
9387 rules.
9388 (anonymous_class_creation:): New rule, tagged <node>.
9389 (NEW_TK): Tagged <node>.
9390 (type_literals, array_type_literal): New rules, tagged <node>.
9391 (class_declaration:): Removed action when reducing by class_body:
9392 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
9393 using GET_CPC in sub-rules.
9394 (class_member_declaration): Handle inner classes.
9395 (method_declaration): When reducing method_header:, reset
9396 current_function_decl when appropriate.
9397 (method_declarator:): Set the number of formal parameter to 0 for
9398 method declared without arguments.
9399 (constructor_declarator:): Likewise.
9400 (static_initializer:): List of elements kept in a list.
9401 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
9402 use of the keyword `static' for type declarations.
9403 (block_statement:): Handle inner class declarations.
9404 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
9405 type qualified `this'.
9406 (class_instance_creation_expression): Use anonymous_class_creation:
9407 to handle inner class instances creation. Handle qualified `new'.
9408 (something_dot_new): Added appropriate actions.
9409 (create_new_parser_context): New function.
9410 (java_push_parser_context, java_parser_context_save_global,
9411 java_parser_context_suspend): Use create_new_parser_context.
9412 (check_modifiers): Changed leading comment.
9413 (check_class_interface_creation): Handle interclasses.
9414 (add_superinterfaces): Fixed comment.
9415 (create_interface): Build qualified name from the raw_name instead
9416 of its matching WFL. Push the initialized fields list. raw_name added
9417 as an extra argument to maybe_create_class_interface_decl.
9418 (create_class): Build qualified name from the raw_name instead of
9419 its matching WFL. Removed assignment to current_parsed_class_un.
9420 Call PUSH_ERROR before returning an error. Suspend the current
9421 parser context when processing an inner class. Push the
9422 initialized fields list. raw_name added as an extra argument to
9423 maybe_create_class_interface_decl. Add the private this$<n>
9424 field.
9425 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
9426 (register_fields): Get the class type from GET_CPC and handle
9427 previous errors. Added code to handle the creation of static
9428 fields in inner classes. Initialized fields initialization
9429 statements kept in a list of lists.
9430 (maybe_generate_finit): Initialized fields initialization
9431 statements kept in a list of lists. Use GET_CPC.
9432 (maybe_generate_clinit): Likewise.
9433 (method_header): Use GET_CPC and GET_CPC_UN.
9434 (parser_qualified_classname): Handle inner classes.
9435 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
9436 (java_fix_constructors): Hide pointer to enclosing context
9437 instance in constructor list when dealing with inner classes.
9438 (jdep_resolve_class): Call resolve_class with extra first argument
9439 JDEP_ENCLOSING.
9440 (resolve_class): Add enclosing context as a first extra argument
9441 to do_resolve_class.
9442 (do_resolve_class): Call find_as_inner_class. Handle WFLs
9443 properly.
9444 (resolve_no_layout): Extra argument added to resolve_class
9445 invocation.
9446 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
9447 (java_get_real_method_name): Use GET_CPC_UN.
9448 (check_abstract_method_definitions): Use DECL_CLINIT_P.
9449 (java_check_abstract_methods): Handle static method declared in
9450 inner classes by an error.
9451 (java_check_regular_methods): Use DECL_CLINIT_P.
9452 (source_start_java_method): Also set DECL_MAX_LOCALS.
9453 (create_artificial_method): Call java_parser_context_save_global
9454 and java_parser_context_restore_global instead of saving/restoring
9455 the context by hand.
9456 (expand_start_java_method): Improved verbose mode message.
9457 (java_complete_expand_methods): Fixed leading comment. Use
9458 DECL_CLINIT_P.
9459 (fix_constructors): Added assignment to this$<n> if necessary.
9460 (java_expand_classes): Call java_complete_expand_classes instead
9461 of java_complete_expand_methods.
9462 (make_qualified_primary): Simplified.
9463 (merge_qualified_name): Optimized for missing left or right parts.
9464 (resolve_expression_name): Handle access to outer class fields from
9465 interclasses.
9466 (resolve_qualified_expression_name): New macro
9467 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
9468 classes. Report error on non appropriate qualification of
9469 `new'. Handle qualified `this'.
9470 (not_accessible_p): Allow access to outer class private fields from
9471 inner classes.
9472 (patch_method_invocation): Handle method invocations through
9473 access methods and inner class constructor invocations.
9474 (find_applicable_accessible_methods_list): Search enclosing
9475 contexts of an inner class.
9476 (search_applicable_methods_list): Fixed typo.
9477 (argument_types_convertible): Handle inner class constructors'
9478 hidden outer context reference argument.
9479 (qualify_ambiguous_name): Handle qualified `this'.
9480 (java_complete_lhs): Handle use of field accessed through
9481 artificial access methods in various cases of assignments. Handle
9482 CLASS_LITERAL node.
9483 (check_final_assignment): Use DECL_CLINIT_P.
9484 (valid_ref_assignconv_cast_p): Handle the destination being an
9485 enclosing context of the source.
9486 (patch_unaryop): Handle use of field accessed through artificial
9487 access methods.
9488 (patch_return): Use DECL_CLINIT_P.
9489 (patch_throw_statement): Use DECL_CLINIT_P.
9490 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
9491 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
9492 ID_INIT_P.
9493
9494 2000-01-16 Anthony Green <green@cygnus.com>
9495
9496 * parse.y (build_string_concatenation): Only use
9497 StringBuffer(String) shortcut if String arg is constant.
9498
9499 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
9500
9501 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
9502 the shift value to int. Fixed typo in comment.
9503
9504 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
9505
9506 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
9507 * jcf-write.c: Likewise.
9508 * parse.y: Likewise.
9509 * parse.c: Regenerate.
9510
9511 2000-01-09 Anthony Green <green@cygnus.com>
9512
9513 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
9514 bytecodes in the correct order.
9515
9516 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9517
9518 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
9519
9520 2000-01-06 Anthony Green <green@cygnus.com>
9521
9522 * expr.c (java_lang_expand_expr): Switch to permanent obstack
9523 before building constant array decl.
9524
9525 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
9526
9527 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
9528 method invocation and typo in conditional expression.
9529 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
9530 the appropriate NOTE_POP.
9531 * parse.y (patch_binop): Shift value mask to feature the right
9532 type.
9533
9534 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9535
9536 * class.c (assume_compiled, assume_compiled_node): Add static
9537 prototype.
9538 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
9539
9540 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
9541
9542 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
9543
9544 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
9545 to `__modifier' to avoid stringifying it.
9546
9547 * parse.y (verify_constructor_circularity): Don't call a variadic
9548 function with a non-literal format string.
9549 (java_check_abstract_methods): Move unreachable code inside
9550 `continue' statement.
9551 (lookup_method_invoke): Call xstrdup, not strdup.
9552
9553 * expr.c (expand_java_field_op): Avoid the use of ANSI string
9554 concatenation.
9555
9556 * jcf-parse.c (yyparse): Likewise.
9557
9558 * jv-scan.c (main): Likewise.
9559
9560 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9561
9562 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
9563 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
9564 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
9565 concatenation.
9566
9567 * parse.y (synchronized, variable_redefinition_error,
9568 check_class_interface_creation, create_interface, create_class,
9569 method_header, finish_method_declaration,
9570 check_modifiers_consistency, method_declarator,
9571 complete_class_report_errors, check_abstract_method_definitions,
9572 java_check_regular_methods, check_throws_clauses,
9573 java_check_abstract_methods, read_import_dir,
9574 check_pkg_class_access, declare_local_variables, fix_constructors,
9575 cut_identifier_in_qualified, resolve_expression_name,
9576 resolve_qualified_expression_name, patch_method_invocation,
9577 java_complete_lhs, patch_assignment, try_builtin_assignconv,
9578 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
9579 patch_exit_expr, patch_exit_expr, patch_switch_statement,
9580 patch_try_statement, patch_synchronized_statement,
9581 patch_throw_statement, check_thrown_exceptions,
9582 patch_conditional_expr): Likewise.
9583
9584 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9585
9586 * Makefile.in (LIBDEPS): Added gcc's errors.o
9587 (../jcf-dump$(exeext):): Link with gcc's errors.o
9588 (../gcjh$(exeext):): Likewise.
9589 * expr.c (expand_java_NEW): Layout the entire target type instead of
9590 laying out its methods only.
9591 (lookup_field): Layout the class after having loaded it.
9592 * java-tree.h (java_debug_context): Declared.
9593 * jcf-io.c (toplev.h): Included.
9594 (find_class): Removed assignment to jcf's outofsynch
9595 field. Force source file to be read if newer than its matching
9596 class file. Tweaked debug messages.
9597 * jcf-parse.c (jcf_out_of_synch): Deleted.
9598 (read_class): Call to jcf_out_of_synch removed.
9599 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
9600 (jcf_out_of_synch): Prototype deleted.
9601 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
9602 `deprecated' and `class_err': integer turned into bit-fields.
9603 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
9604 * parse.y (package_list): New global.
9605 (package_declaration:): Record newly parsed package name.
9606 (extra_ctxp_pushed_p): Static global deleted.
9607 (java_parser_context_save_global): Create buffer context for the
9608 purpose of saving globals, if necessary.
9609 (java_parser_context_restore_global): Pop context pushed for the
9610 purpose of saving globals, if necessary.
9611 (java_debug_context_do): New prototype and function.
9612 (java_debug_context): Likewise.
9613 (do_resolve_class): Use already parsed package names to qualify
9614 and lookup class candidate.
9615 (java_pre_expand_clinit): Removed unnecessary local variable.
9616
9617 1999-12-17 Tom Tromey <tromey@cygnus.com>
9618
9619 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
9620 fixes PR gcj/119.
9621 (process_file): Use `\n\' at end of each line in string.
9622
9623 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
9624
9625 * expr.c (expand_invoke): Layout the loaded class before
9626 attempting to use it.
9627 (expand_java_field_op): Allow final field assignments to take
9628 place in $finit$.
9629 * typeck.c (convert): Return error_mark_node if expr is null.
9630
9631 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9632
9633 * class.c (class_depth): Return -1 if the class doesn't load
9634 properly.
9635 * expr.c (can_widen_reference_to): Check for errors during depth
9636 computation and return 0 accordingly.
9637 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
9638 create default constructors and add an other error check.
9639 * parse.h (java_fix_constructors): Prototyped.
9640 * parse.y (java_pre_expand_clinit): Likewise.
9641 (build_super_invocation): Re-prototyped to feature one argument.
9642 (java_check_circular_reference): Directly use `current'.
9643 (java_fix_constructors): New function.
9644 (java_check_regular_methods): Don't create default constructors
9645 here, but abort if none were found.
9646 (java_complete_expand_methods): Pre-process <clinit> calling
9647 java_pre_expand_clinit.
9648 (java_pre_expand_clinit): New function.
9649 (fix_constructors): build_super_invocation invoked with the
9650 current method declaration as an argument.
9651 (build_super_invocation): Use the context of the processed method
9652 decl argument instead of current_class.
9653 * typeck.c (lookup_java_method): Take WFLs in method names into
9654 account.
9655
9656 1999-12-14 Per Bothner <per@bothner.com>
9657
9658 * class.c (make_class_data): flag_keep_inline_functions to keep
9659 private methods in the method array.
9660
9661 1999-12-15 Anthony Green <green@cygnus.com>
9662
9663 * check-init.c (check_init): Take into account both types of
9664 `throw's when checking for uninitialized variables.
9665
9666 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9667
9668 * parse.y (java_complete_lhs): Force conversion of array
9669 dimensions to int_type_node, that's what runtime's ABI expects.
9670
9671 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9672
9673 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
9674 operand of a WFL, until the Java front-end gets fixed with regard
9675 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
9676
9677 1999-12-10 Andrew Haley <aph@cygnus.com>
9678
9679 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
9680 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
9681 expr.c (build_java_athrow): Add support for sjlj-exceptions.
9682 java-tree.h: Ditto.
9683 jcf-write.c: Ditto.
9684
9685 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
9686
9687 * expr.c (java_lang_expand_expr): Switch to permanent obstack
9688 before calling expand_eh_region_start and expand_start_all_catch.
9689 * except.c (expand_start_java_handler): Switch to permanent
9690 obstack before calling expand_eh_region_start.
9691 (expand_end_java_handler): Switch to permanent obstack before
9692 calling expand_start_all_catch.
9693
9694 1999-12-5 Anthony Green <green@cygnus.com>
9695
9696 * decl.c (init_decl_processing): Mark throw_node as a noreturn
9697 function with side effects.
9698 (init_decl_processing): Mark all memory allocating DECLs with
9699 DECL_IS_MALLOC.
9700
9701 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9702
9703 * except.c (expand_end_java_handler): Call
9704 expand_resume_after_catch and end_catch_handler.
9705
9706 1999-11-30 Anthony Green <green@cygnus.com>
9707
9708 * verify.c (verify_jvm_instructions): Create new return label
9709 chain if non existent (don't rely on the verified state of the jsr
9710 target.)
9711
9712 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
9713
9714 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
9715 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
9716
9717 * parse.y (patch_assignment): Removed bogus final class test on
9718 lhs when checking on whether to emit an ArrayStoreException runtime
9719 check.
9720 * expr.c (expand_java_arraystore): Likewise.
9721
9722 1999-11-28 Anthony Green <green@cygnus.com>
9723
9724 * decl.c (find_local_variable): Reuse single slot decls when
9725 appropriate.
9726
9727 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9728
9729 * jcf-parse.c (saw_java_source): Global variable removed.
9730 (read_class): Don't use `saw_java_source'. Added extra braces.
9731 (yyparse): Code setting `saw_java_source' removed.
9732
9733 1999-11-24 Mark Mitchell <mark@codesourcery.com>
9734
9735 * except.c (emit_handlers): Zero catch_clauses after emitting them.
9736
9737 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
9738
9739 * verify.c (merge_type_state): Non verified subroutines being
9740 considered more than once to trigger passive type merge.
9741
9742 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
9743
9744 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
9745 in case of error. Error message tuned.
9746
9747 1999-11-21 Anthony Green <green@cygnus.com>
9748
9749 * constants.c (find_methodref_index): Unwrap method names before
9750 inserting them in the constant pool.
9751
9752 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
9753
9754 * class.c (assume_compiled_node): New typedef.
9755 (assume_compiled_tree): New static data.
9756 (find_assume_compiled_node): New function.
9757 (add_assume_compiled): New function.
9758 (assume_compiled): New function.
9759 * class.c (make_class_data): Use assume_compiled.
9760 (is_compiled_class): Use assume_compiled.
9761
9762 * java-tree.h (add_assume_compiled): Declare.
9763
9764 * lang.c (lang_decode_option): Parse new options.
9765
9766 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9767
9768 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
9769 int_type_node: that's what `_Jv_AllocObject' expects.
9770
9771 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
9772
9773 * parse.y (lookup_method_invoke): Use lang_printable_name to
9774 reliably build the type name during error report. Fixes PR gcj/97.
9775
9776 1999-11-09 Tom Tromey <tromey@cygnus.com>
9777
9778 * jcf-path.c: Include <sys/stat.h>.
9779 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
9780 (DIR_UP): New macro.
9781
9782 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
9783
9784 * parse.y (source_end_java_method): Resume permanent allocation,
9785 reversing Apr 27 1998 patch.
9786 (patch_string_cst): Pop obstacks after having pushed the permanent
9787 ones.
9788
9789 1999-11-05 Tom Tromey <tromey@cygnus.com>
9790
9791 * class.c (finish_class): Emit inlined methods if any native
9792 methods exist in the class. Fixes PR gcj/85.
9793
9794 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
9795
9796 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
9797 (qualify_ambiguous_name): Likewise.
9798
9799 1999-11-03 Godmar Back <gback@cs.utah.edu>
9800
9801 * typeck.c: (lookup_java_method): search all inherited
9802 interfaces when looking up interface method.
9803
9804 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9805
9806 * parse.y (method_header:): Issue error message for rule `type
9807 error'.
9808 (synchronized:): Error report when not using synchronized.
9809
9810 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9811
9812 * parse.y (resolve_qualified_expression_name): Prevent `this' from
9813 being used before the superclass constructor has been called.
9814 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
9815 instead of `CALL_THIS_CONSTRUCTOR_P'.
9816
9817 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
9818
9819 * check-init.c: Fix typo in comment.
9820
9821 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
9822
9823 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
9824 and final method.
9825
9826 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
9827
9828 * parse.y (expression_statement:): Call function to report
9829 improper invocation of a constructor.
9830 (parse_ctor_invocation_error): New function.
9831
9832 1999-10-26 Mark Mitchell <mark@codesourcery.com>
9833
9834 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
9835 remember_end_note.
9836
9837 1999-10-21 Tom Tromey <tromey@cygnus.com>
9838
9839 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
9840 in generated `main'.
9841
9842 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
9843
9844 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
9845 (qualify_ambiguous_name): Likewise.
9846
9847 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9848
9849 * parse.y (java_complete_tree): fold_constant_for_init to work on
9850 permanent_obstack.
9851 (java_complete_lhs): Likewise.
9852 (array_constructor_check_entry): Complete an initializer element
9853 on permanent_obstack.
9854
9855 1999-10-19 Tom Tromey <tromey@cygnus.com>
9856
9857 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
9858 From Mike Moreton <mike@pillim.demon.co.uk>.
9859
9860 1999-10-15 Greg McGary <gkm@gnu.org>
9861
9862 * java-tree.h (flag_bounds_check): Remove extern decl.
9863 * lang.c (flag_bounds_check): Remove global variable.
9864 (lang_f_options): Remove "bounds-check" entry.
9865 (lang_init_options): Default flag_bounds_check to "on".
9866
9867 1999-10-14 Tom Tromey <tromey@cygnus.com>
9868
9869 * jvgenmain.c (usage): New function.
9870 (main): Use it. Also, handle `-D' options.
9871 * jvspec.c (lang_specific_driver): Recognize -D.
9872 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
9873
9874 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
9875
9876 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9877
9878 * jcf-dump.c (print_constant, disassemble_method): Don't call a
9879 variadic function with a non-literal format string.
9880
9881 * parse-scan.y (report_main_declaration): Likewise.
9882
9883 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
9884
9885 * parse.y (read_import_dir, patch_assignment, patch_binop,
9886 patch_array_ref): Likewise.
9887
9888 * typeck.c (build_java_array_type): Likewise.
9889
9890 * verify.c (verify_jvm_instructions): Likewise.
9891
9892 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
9893
9894 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
9895
9896 1999-10-07 Anthony Green <green@cygnus.com>
9897
9898 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
9899 where CHECK_PUT may fail for valid reasons.
9900
9901 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
9902 UNSAFE_PUTN): New macros.
9903
9904 1999-10-04 Tom Tromey <tromey@cygnus.com>
9905
9906 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
9907 well. Fixes Java PR gcj/59.
9908 * parse-scan.y (yyerror): Report errors.
9909
9910 1999-09-24 Glenn Chambers <GChambers@provsol.com>
9911
9912 * decl.c (insert_block): Remove unconditional `abort'.
9913
9914 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
9915
9916 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
9917 FUNCTION_CODE now of type int. All callers changed.
9918 Set the builtin's DECL_BUILT_IN_CLASS.
9919
9920 1999-09-23 Tom Tromey <tromey@cygnus.com>
9921
9922 * jvspec.c (lang_specific_driver): Don't read spec file if
9923 -fsyntax-only given.
9924
9925 1999-09-22 Tom Tromey <tromey@cygnus.com>
9926
9927 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
9928
9929 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
9930 (WORDS_TO_LONG): Likewise.
9931 (WORDS_TO_DOUBLE): Likewise.
9932
9933 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9934
9935 * jcf-write.c (RELOCATION_VALUE_0): New macro.
9936 (RELOCATION_VALUE_1): Likewise.
9937 (emit_iinc, emit_reloc, push_constant1, push_constant2,
9938 push_in_const, push_long_const): Prototyped.
9939 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
9940 (push_constant2): Likewise.
9941 (push_int_const): Cast find_constant1's integer arguments to `jword'.
9942 (find_constant_wide): Cast find_constant2's integer arguments to
9943 `jword'.
9944 (find_constant_index): Cast find_constant2's and find_constant2's
9945 integer arguments to `jword'.
9946 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
9947 (emit_switch_reloc): Use RELOCATION_VALUE_0.
9948 (emit_if): Use RELOCATION_VALUE_1.
9949 (emit_goto): Likewise.
9950 (emit_jsr): Likewise.
9951 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
9952 argument to push_long_const to HOST_WIDE_INT.
9953
9954 1999-09-15 Andreas Schwab <schwab@suse.de>
9955
9956 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
9957
9958 1999-09-20 Nick Clifton <nickc@cygnus.com>
9959
9960 * lang.c (lang_decode_option): Extend comment.
9961
9962 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
9963
9964 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
9965 instead of fndecl.
9966
9967 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9968
9969 * gjavah.c (get_field_name, print_method_info, print_include,
9970 add_namelet): Use xmalloc, not malloc.
9971
9972 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
9973 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
9974 NULL pointer.
9975
9976 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
9977
9978 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
9979
9980 * jcf-path.c (add_entry): Likewise.
9981
9982 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
9983
9984 * jv-scan.c (xmalloc): Remove definition.
9985
9986 * jvgenmain.c (xmalloc): Likewise.
9987
9988 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
9989
9990 * lex.c (java_store_unicode): Use xrealloc, not realloc.
9991
9992 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
9993 concat, not xmalloc/sprintf.
9994 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
9995 (xstrdup): Remove definition.
9996
9997 * parse.y (duplicate_declaration_error_p,
9998 constructor_circularity_msg, verify_constructor_circularity,
9999 check_abstract_method_definitions, java_check_regular_methods,
10000 java_check_abstract_methods, patch_method_invocation,
10001 check_for_static_method_reference, patch_assignment, patch_binop,
10002 patch_cast, array_constructor_check_entry, patch_return,
10003 patch_conditional_expr): Use xstrdup, not strdup.
10004
10005 * zextract.c (ALLOC): Use xmalloc, not malloc.
10006
10007 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10008
10009 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
10010
10011 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
10012 (do_spec, lang_specific_pre_link, lang_specific_driver,
10013 input_filename, input_filename_length): Don't declare.
10014 (main_class_name, jvgenmain_spec, lang_specific_driver):
10015 Constify a char*.
10016 (lang_specific_driver): All calls to the function pointer
10017 parameter now explicitly call `fatal'.
10018
10019 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
10020
10021 * parse.y (find_applicable_accessible_methods_list): Search
10022 abstract classes as interfaces.
10023
10024 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
10025
10026 * class.c (finish_class): We're now outside a valid method
10027 declaration. Tell the rest of gcc so.
10028
10029 1999-09-08 Bruce Korb autogen@linuxbox.com
10030
10031 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
10032
10033 1999-09-07 Tom Tromey <tromey@cygnus.com>
10034
10035 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
10036 java-array.h.
10037 (decode_signature_piece): Don't emit "::" in JArray<>.
10038 (print_namelet): Only print trailing `;' when printing a class.
10039
10040 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
10041
10042 * java-tree.h: Delete declarations for all tree nodes now moved to
10043 global_trees.
10044 * decl.c: Delete their definitions.
10045
10046 1999-09-04 Mark Mitchell <mark@codesourcery.com>
10047
10048 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
10049 * Makefile.in (OBJS): Add ggc-callbacks.o.
10050 (OBJDEPS): Likewise.
10051
10052 1999-09-03 Tom Tromey <tromey@cygnus.com>
10053
10054 * parse.y (strip_out_static_field_access_decl): Return operand if
10055 it satisfies JDECL_P.
10056
10057 1999-09-02 Tom Tromey <tromey@cygnus.com>
10058
10059 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
10060 Handle nested arrays, like `[[I'.
10061
10062 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10063
10064 * class.c (finish_class): Remove unused parameter, all callers
10065 changed.
10066
10067 * expr.c (build_java_athrow): Change return type to void.
10068 (java_lang_expand_expr): Make sure each case in switch returns a
10069 value.
10070
10071 * java-tree.h (finish_class): Fix prototype to take void args.
10072
10073 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
10074 (main): Issue return from main, not exit.
10075
10076 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
10077
10078 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
10079
10080 * jv-scan.c (main): Issue return from main, not exit.
10081
10082 * parse.y (check_abstract_method_definitions,
10083 java_check_abstract_method_definitions): Add static prototypes.
10084 (java_complete_expand_methods): Fix call to `finish_class'.
10085
10086 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
10087 and `prevpc'.
10088
10089 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10090
10091 * lang.c (language_string): Constify.
10092
10093 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10094
10095 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
10096 Remove hacks for stuff which comes from libiberty.
10097
10098 * Make-lang.in: Likewise.
10099
10100 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
10101
10102 * Makefile.in (xref.o): Depend on xref.c explicitly.
10103
10104 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10105
10106 * java-tree.h (lang_printable_name): Constify a char*.
10107
10108 * lang.c (lang_printable_name): Likewise.
10109
10110 1999-08-27 Jeffrey A Law (law@cygnus.com)
10111
10112 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
10113 comments in C code.
10114
10115 1999-08-26 Tom Tromey <tromey@cygnus.com>
10116
10117 * gjavah.c (print_cxx_classname): Print "::" before qualified
10118 name.
10119
10120 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
10121
10122 * parse.y (lookup_cl): Changed leading comment. Now does its best
10123 to set the column number.
10124 (qualify_ambiguous_name): Take WFL wrappers into account.
10125
10126 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
10127
10128 * verify.c (verify_jvm_instructions): Don't check instruction
10129 validity beyond end of method.
10130
10131 1999-08-25 Tom Tromey <tromey@cygnus.com>
10132
10133 * jvspec.c (lang_specific_driver): Correctly handle --help again.
10134
10135 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10136
10137 * gjavah.c (print_name, print_base_classname, utf8_cmp,
10138 cxx_keyword_subst, generate_access, name_is_method_p,
10139 get_field_name, print_field_name, super_class_name, print_include,
10140 decode_signature_piece, print_class_decls, usage, help,
10141 java_no_argument, version, add_namelet, print_namelet): Add static
10142 prototype.
10143 (print_base_classname, utf8_cmp, cxx_keyword_subst,
10144 name_is_method_p): Constify a char*.
10145 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
10146 Provide a final else clause in an if-else-if.
10147 (print_field_info): Add missing final arg in function call to
10148 `print_field_name'.
10149 (print_method_info, decompile_method, decode_signature_piece,
10150 print_c_decl, print_full_cxx_name, print_stub,
10151 print_mangled_classname, super_class_name, print_include,
10152 add_namelet, add_class_decl, print_class_decls, process_file,
10153 help): Constify a char*.
10154
10155 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
10156 push_int_const, find_constant_wide, find_constant_index,
10157 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
10158 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
10159 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
10160 emit_if, emit_goto, emit_jsr, call_cleanups,
10161 make_class_file_name): Add static prototypes.
10162 (generate_bytecode_return, generate_bytecode_insns): Pass a
10163 NULL_PTR, not a NULL_TREE.
10164
10165 * jv-scan.c: Include "jcf.h".
10166 (main): Declare using DEFUN macro.
10167
10168 * jvspec.c (find_spec_file, lang_specific_pre_link,
10169 lang_specific_driver): Add prototypes.
10170 (find_spec_file): Constify a char*.
10171
10172 * keyword.gperf (hash, java_keyword): Add prototypes.
10173
10174 * lang.c (lang_print_error): Add static prototype.
10175 (lang_init): Prefer memcpy over bcopy to avoid casts.
10176
10177 * lex.c (yylex): Add static prototype.
10178
10179 * parse-scan.y: Include "lex.c" earlier.
10180
10181 * parse.h: Remove redundant declaration for `yylex'.
10182
10183 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
10184 labeled_block_contains_loop_p): Add static prototypes.
10185 (not_accessible_p): Make static to match prototype.
10186
10187 * verify.c (start_pc_cmp): Don't needlessly cast away const.
10188
10189 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10190
10191 * parse.y (check_method_redefinition): Changed leading comment.
10192 (check_abstract_method_definitions): New function.
10193 (java_check_abstract_method_definitions): New function.
10194 (java_check_regular_methods): Call it.
10195 (verify_constructor_super): Fixed indentation.
10196 (lookup_method_invoke): Likewise.
10197
10198 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
10199
10200 * parse.y (method_header): Return a null pointer if the current
10201 class node is null.
10202 (finish_method_declaration): Return if the current function decl
10203 is null.
10204 (source_start_java_method): Likewise.
10205 (java_method_add_stmt): Likewise.
10206
10207 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
10208
10209 * class.c (emit_register_class): Removed unnecessary call to
10210 start_sequence.
10211 * parse.y (labeled_block_contains_loop_p): Removed unused local
10212 variable.
10213
10214 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10215
10216 * parse.y (java_refold): Added prototype.
10217
10218 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10219
10220 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
10221 (java_stabilize_reference): Removed unnecessary `else'.
10222 (java_complete_lhs): Set flag to remember boolean. Call
10223 java_refold. Added comments.
10224 (java_decl_equiv): New function.
10225 (binop_compound_p): Likewise.
10226 (java_refold): Likewise.
10227 (patch_unaryop): Striped static field access assigned to decl and
10228 op. Changed promotion scheme for ++/-- operators.
10229 (search_loop): New function.
10230 (labeled_block_contains_loop_p): Likewise.
10231 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
10232 comment.
10233 (patch_bc_statement): Call search_loop. Fixed comment.
10234
10235 1999-08-14 Anthony Green <green@cygnus.com>
10236
10237 * expr.c (java_lang_expand_expr): Mark static array data as
10238 referenced.
10239
10240 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10241
10242 * jvgenmain.c (main): NUL-terminate name_obstack.
10243
10244 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10245
10246 * check-init.c (check_bool2_init, done_alternative): Add static
10247 prototypes.
10248
10249 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
10250 (add_method, build_utf8_ref, build_class_ref,
10251 append_gpp_mangled_type, layout_class_method): Constify a char*.
10252
10253 * decl.c (push_promoted_type, make_binding_level): Add static
10254 prototypes.
10255 (push_promoted_type, pushdecl): Constify a char*.
10256
10257 * except.c (find_handler_in_range, link_handler,
10258 check_start_handlers): Add static prototypes.
10259
10260 * expr.c (process_jvm_instruction): Constify a char*.
10261
10262 * gjavah.c (main): Constify a char*.
10263
10264 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
10265 Constify a char*.
10266
10267 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
10268 static prototypes.
10269 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
10270 munge, print_ents): Constify a char*.
10271
10272 * jcf-dump.c (disassemble_method): Constify a char*.
10273 (print_constant_pool, print_exception_table): Add static prototypes.
10274 (print_constant, print_exception_table, main, disassemble_method):
10275 Constify a char*.
10276
10277 * jcf-io.c (find_classfile, find_class): Likewise.
10278
10279 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
10280 (set_source_filename, predefined_filename_p): Add static prototypes.
10281 (set_source_filename, get_constant, get_class_constant,
10282 find_in_current_zip): Constify a char*.
10283
10284 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
10285 static prototypes.
10286 (add_entry, add_path, jcf_path_classpath_arg,
10287 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10288
10289 * jcf-reader.c (get_attribute, jcf_parse_preamble,
10290 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
10291 jcf_parse_one_method, jcf_parse_methods,
10292 jcf_parse_final_attributes): Add static prototypes.
10293 (get_attribute): Constify a char*.
10294
10295 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
10296 jcf_dependency_add_target, jcf_path_classpath_arg,
10297 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
10298
10299 * jv-scan.c (main): Constify a char*.
10300 (gcc_obstack_init): Add prototype arguments.
10301
10302 * jvgenmain.c (gcc_obstack_init): Likewise.
10303 (main): Constify a char*.
10304
10305 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
10306 static prototypes.
10307 (put_decl_string, lang_print_error): Constify a char*.
10308 (lang_init): Remove redundant extern prototype.
10309
10310 * mangle.c (emit_unicode_mangled_name): Constify a char*.
10311
10312 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
10313 Add static prototypes.
10314 (get_type_from_signature): Constify a char*.
10315
10316 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
10317 Add static prototypes.
10318 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
10319 (verify_jvm_instructions): Constify a char*.
10320
10321 * xref.c (xref_flag_value): Likewise.
10322
10323 * xref.h (xref_flag_value): Likewise.
10324
10325 * zextract.c (makeword, makelong): Add static prototypes.
10326 (makeword, makelong): Constify a uch*.
10327
10328 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10329
10330 * lang.c (java_dummy_print): Constify a char*.
10331 (lang_print_error): Likewise.
10332 (lang_init): Remove redundant prototype for `print_error_function'.
10333 (lang_init_source): Likewise.
10334 (lang_identify): Constify a char*.
10335
10336 1999-08-09 Tom Tromey <tromey@cygnus.com>
10337
10338 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
10339 (WORDS_TO_LONG): Likewise.
10340 (WORDS_TO_DOUBLE): Likewise.
10341
10342 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10343
10344 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
10345
10346 * expr.c (java_stack_pop, java_array_data_offset,
10347 build_java_throw_out_of_bounds_exception, case_identity,
10348 build_java_check_indexed_type): Add static prototypes.
10349 (linenumber_table, expand_invoke, expand_java_field_op,
10350 build_primtype_type_ref, expand_byte_code): Constify a char*.
10351
10352 * java-tree.h (build_primtype_type_ref, linenumber_table):
10353 Constify a char*.
10354 (java_lang_expand_expr): Add prototype.
10355
10356 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
10357 `java_lang_expand_expr'.
10358
10359 * lex.c (java_lex_error): Constify a char*.
10360 (java_get_unicode, java_read_char, java_allocate_new_line,
10361 java_unget_unicode, java_sneak_unicode): Prototype.
10362
10363 * parse-scan.y (current_class, package_name, method_declarator,
10364 report_class_declaration, yyerror): Constify a char*.
10365
10366 * parse.h (java_report_errors): Prototype.
10367 (yyerror): Constify a char*.
10368
10369 * parse.y (classitf_redefinition_error, check_modifiers,
10370 parse_jdk1_1_error, lookup_package_type,
10371 lookup_package_type_and_set_next, get_printable_method_name,
10372 purify_type_name): Constify a char*.
10373 (build_super_invocation, maybe_generate_finit,
10374 verify_constructor_super, parser_add_interface,
10375 add_superinterfaces, jdep_resolve_class, note_possible_classname,
10376 java_complete_expand_methods, java_expand_finals,
10377 cut_identifier_in_qualified, java_stabilize_reference,
10378 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
10379 merge_string_cste): Prototype.
10380 (single_type_import_declaration, yyerror,
10381 variable_redefinition_error, build_array_from_name,
10382 build_unresolved_array_type, check_class_interface_creation,
10383 resolve_class, complete_class_report_errors,
10384 note_possible_classname, read_import_dir,
10385 find_in_imports_on_demand, resolve_package, fix_constructors,
10386 check_deprecation, lookup_method_invoke,
10387 maybe_build_primttype_type_ref, array_constructor_check_entry):
10388 Constify a char*.
10389 (java_complete_expand_methods, java_expand_finals): Make static.
10390 (convert_narrow): Remove static prototype.
10391
10392 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
10393
10394 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
10395
10396 1999-08-02 Richard Henderson <rth@cygnus.com>
10397
10398 * decl.c: Include defaults.h instead of expr.h.
10399 * parse.y: Likewise.
10400
10401 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
10402
10403 * java/decl.c (start_java_method): Change all uses of
10404 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
10405 Ensure expr.h is included.
10406 * java/expr.c (pop_arguments): Ditto.
10407 * java/parse.y (expand_start_java_method): Ditto.
10408
10409 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10410
10411 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
10412
10413 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
10414
10415 * decl.c: Include "function.h".
10416 * except.c: Likewise.
10417 * parse.y: Likewise.
10418 * Makefile.in: Update dependencies.
10419
10420 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10421
10422 * expr.c (build_java_soft_divmod): Provide a default case in switch.
10423 (java_lang_expand_expr): Mark parameters `target', `tmode' and
10424 `modifier' with ATTRIBUTE_UNUSED.
10425
10426 * gjavah.c (process_file): Add braces around ambiguous `else'.
10427
10428 * jcf-dump.c (print_access_flags, localvar_free): Change return
10429 type to void.
10430
10431 * parse.y (java_complete_expand_method): Initialize variable
10432 `exception_copy'.
10433 (resolve_qualified_expression_name): Likewise for `field_decl'.
10434 (patch_method_invocation): Likewise for `class_to_search'.
10435 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
10436 (patch_assignment): Likewise for `lhs_type'.
10437
10438 * verify.c (verify_jvm_instructions): Remove unused variable
10439 `caller'.
10440
10441 1999-07-25 Richard Henderson <rth@cygnus.com>
10442
10443 * decl.c (va_list_type_node): New.
10444
10445 1999-07-25 Anthony Green <green@cygnus.com>
10446
10447 * gjavah.c (print_stub): New function.
10448 (METHOD_IS_NATIVE): New macro.
10449 (print_mangled_classname): Make static.
10450 (HANDLE_END_FIELD): Don't emit fields during stub generation.
10451 (process_file): Perform stub generation.
10452 (HANDLE_METHOD): Don't emit class decls during stub
10453 generation.
10454 (HANDLE_END_METHOD): Take into account stub generation.
10455 (print_method_info): Handle stub generation.
10456 (print_stub): New function.
10457 (print_cxx_classname): Make signature consistant with others.
10458 (help): Describe -stubs option.
10459 (main): Create stub file.
10460 (version): Use version.c.
10461 (print_full_cxx_name): New function.
10462 (print_c_decl): Use print_full_cxx_name.
10463
10464 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10465
10466 * check-init.c (check_init): Handle MAX_EXPR.
10467
10468 1999-07-15 Andrew Haley <aph@cygnus.com>
10469
10470 * lang.c (flag_use_divide_subroutine): New variable.
10471 * typeck.c: (convert_ieee_real_to_integer): Bounds check
10472 fp-to-integer conversion.
10473 (convert): Call convert_ieee_real_to_integer when flag_fast_math
10474 is not set.
10475
10476 * expr.c (build_java_soft_divmod): New function.
10477 (build_java_binop): Call build_java_soft_divmod if
10478 flag_use_divide_subroutine is set.
10479 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10480 soft_lrem_node: new builtin functions.
10481 (init_decl_processing) Initialize the new builtins.
10482 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
10483 soft_lrem_node: new builtin functions.
10484 (build_java_soft_divmod): New function.
10485 * parse.y: Call build_java_soft_divmod if
10486 flag_use_divide_subroutine is set.
10487 * parse.c: Rebuilt.
10488
10489 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
10490 a --specs= arg) even if not linking.
10491 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
10492 -fuse-divide-subroutine
10493
10494 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
10495
10496 * parse.y (resolve_and_layout): Check methods only once.
10497 (resolve_qualified_expression_name): Verify thrown exceptions
10498 compatibility.
10499 (check_thrown_exceptions): Reject exceptions thrown in
10500 initializer. Error message tuned.
10501
10502 1999-07-14 Andrew Haley <aph@cygnus.com>
10503
10504 * expr.c (expand_expr): Do not return the last statement in a
10505 block as the block's value.
10506
10507 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
10508
10509 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
10510 CALL_EXPR, to avoid order of evaluation changes.
10511
10512 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
10513
10514 * parse.y (qualify_ambiguous_name): Do not use
10515 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
10516
10517 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10518
10519 * check-init.c (check_init): Handle MAX_EXPR.
10520 * expr.c (force_evaluation_order): Force method call arguments to
10521 be evaluated in left-to-right order.
10522 * parse.y (qualify_ambiguous_name): Loop again to qualify
10523 NEW_ARRAY_EXPR properly.
10524
10525 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
10526
10527 * parse.y (patch_invoke): Resolve unresolved invoked method
10528 returned type.
10529 (qualify_ambiguous_name): STRING_CST to qualify expression for
10530 type name resolution.
10531
10532 1999-06-24 Andrew Haley <aph@cygnus.com>
10533
10534 * class.c (finish_class): Whenever a deferred method is
10535 output, rescan the list of methods to see if a new candidate for
10536 output can be found.
10537
10538 1999-06-28 Tom Tromey <tromey@cygnus.com>
10539
10540 * jvspec.c (lang_specific_driver): Recognize --help.
10541
10542 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10543
10544 * parse.y (resolve_package): Fixed bogus return statement.
10545 (patch_method_invocation): Resolve method invocation beginning with
10546 a package name qualifier.
10547
10548 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10549
10550 * Make-lang.in (java.stage1): Depend on stage1-start.
10551 (java.stage2): Likewise for stage2-start.
10552 (java.stage3): Likewise for stage3-start.
10553 (java.stage4): Likewise for stage4-start.
10554
10555 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
10556
10557 * parse.y (java_complete_lhs): When doing cross referencing, don't
10558 try to keep file location on a WFL expanded as a CALL_EXPR.
10559
10560 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10561
10562 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
10563 compiling to class file a void method with an empty method body.
10564 As a side effect, the bytecode backend will generate the
10565 appropriate `return' instruction.
10566
10567 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10568
10569 * parse.y (lookup_package_type_and_set_next): New function prototype.
10570 (resolve_package): Search current and imported packages.
10571 (lookup_package_type_and_set_next): New function.
10572
10573 1999-06-22 Andrew Haley <aph@cygnus.com>
10574
10575 * verify.c (verify_jvm_instructions): Check for pending blocks
10576 before invalid PC test and opcode switch, not after.
10577
10578 1999-06-21 Andrew Haley <aph@cygnus.com>
10579
10580 * except.c (find_handler_in_range): The upper limit for exception
10581 ranges is exclusive, not inclusive: (start <= pc < end).
10582 (link_handler): find child pointer which points to outer by
10583 searching sibling list: previous code incorrectly assumed that
10584 outer->outer->first_child must point to outer.
10585 * verify.c (verify_jvm_instructions): FIXME added to code for
10586 `athrow'.
10587 (verify_jvm_instructions): Do not assume that the last block
10588 processed in a subroutine is a block which ends with a `ret'
10589 instruction. With some control flows it is possible that the last
10590 block ends with an `athrow'.
10591
10592 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
10593
10594 * parse.y (qualify_ambiguous_name): Reorganized the post
10595 evaluation of non WFL leading expression nodes.
10596
10597 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
10598
10599 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
10600 CONVERT_EXPR.
10601
10602 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10603
10604 * parse.y (qualify_ambiguous_name): Handle qualified expression
10605 beginning with a STRING_CST.
10606
10607 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10608
10609 * parse.y (register_fields): Set DECL_INITIAL on both
10610 pre-initialized static and public fields.
10611 (resolve_field_access): Static field access expressions to always
10612 use pointer types.
10613 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
10614 qualification. CONVERT_EXPR to be resolved as an expression name.
10615 (java_complete_lhs): Identify and access qualified final
10616 initialized field in switch statement case expression.
10617 (fold_constant_for_init): Pre-initialized field decl constant to
10618 be folded.
10619
10620 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10621
10622 * parse.y (note_possible_classname): Mark returned node with
10623 QUALIFIED_P only if the original class name contained a '/'.
10624
10625 1999-06-05 Anthony Green <green@cygnus.com>
10626
10627 * Make-lang.in (gcjh): More parallel build fixes.
10628
10629 1999-06-03 Mike Stump <mrs@wrs.com>
10630
10631 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
10632
10633 1999-06-02 Anthony Green <green@cygnus.com>
10634
10635 * except.c (link_handler): Chain exception handlers in order.
10636
10637 1999-06-02 Anthony Green <green@cygnus.com>
10638
10639 * expr.c (expand_byte_code): Fill unreachable bytecode regions
10640 with nops and process as usual in order to always set correct EH
10641 ranges. Emit detailed warnings about unreachable bytecodes.
10642
10643 1999-06-02 Anthony Green <green@cygnus.com>
10644
10645 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
10646 constant.
10647
10648 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
10649
10650 * parse.y (lookup_field_wrapper): Unified returned value to NULL
10651 or the searched field decl.
10652
10653 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
10654
10655 * parse.y (fold_constant_for_init): Convert numerical constant
10656 values to the type of the assigned field.
10657
10658 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
10659
10660 * expr.c (lookup_field): Relaxed the test on class loading error
10661 detection.
10662 * parse.y (fold_constant_for_init): Enabeled old code.
10663
10664 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
10665
10666 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
10667 decide the validity of the cast of a java.lang.Cloneable reference
10668 to an array.
10669 (patch_conditional_expr): Fixed first argument passed to
10670 binary_numeric_promotion.
10671
10672 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
10673
10674 * parse.y (qualify_ambiguous_name): Take into account that a
10675 CONVERT_EXPR might specify a type as a WFL.
10676
10677 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10678
10679 * parse.y (patch_assignment): Save the rhs before using it as an
10680 argument to _Jv_CheckArrayStore.
10681
10682 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10683
10684 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
10685
10686 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
10687
10688 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
10689 floating point literal only when the exponent indicator has been
10690 parsed.
10691
10692 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10693
10694 * parse.y (formal_parameter:): Construct argument tree list
10695 element even if a yet unsupported final parameter was encountered.
10696
10697 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
10698
10699 * parse.y (finish_method_declaration): Issue errors for native or
10700 abstract methods declared with a method body, as well as for non
10701 native or non abstract methods with no method body.
10702
10703 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10704
10705 * class.c (build_utf8_ref): Initialize variable `field'.
10706
10707 * decl.c (init_decl_processing): Initialize variable `field'.
10708
10709 * expr.c (build_known_method_ref): Mark parameters `method_type',
10710 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
10711 (process_jvm_instruction): Likewise for parameter `length'.
10712
10713 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
10714 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
10715 ATTRIBUTE_UNUSED.
10716
10717 * parse.y (maybe_generate_clinit): Remove unused variable
10718 `has_non_primitive_fields'.
10719 (find_in_imports_on_demand): Initialize variables `node_to_use'
10720 and `cl'.
10721 (patch_binop): Likewise for variable `prom_type'.
10722 (patch_unaryop): Likewise for variable `prom_type'.
10723
10724 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
10725
10726 * xref.c (xref_table): Add missing initializer.
10727
10728 1999-05-14 Tom Tromey <tromey@cygnus.com>
10729
10730 * java-except.h (struct eh_range): Removed unused `next' member.
10731 * verify.c (verify_jvm_instructions): Call check_nested_ranges
10732 after adding all exception handlers. Sort exception ranges in
10733 order of start PC.
10734 (struct pc_index): New structure.
10735 (start_pc_cmp): New function.
10736 * except.c (add_handler): Return `void'. Don't call link_handler;
10737 instead construct an ordinary linked list and do range
10738 coalescing.
10739 (check_nested_ranges): New function.
10740 (link_handler): Changed interface to allow merging of eh_ranges.
10741 Split overlapping ranges. Return `void'.
10742
10743 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10744
10745 * parse.y (constructor_block_end:): New rule, tagged <node>.
10746 (constructor_body:): Use `constructor_block_end' instead of
10747 `block_end'.
10748
10749 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10750
10751 * parse.y (statement_nsi:): Pop `for' statement block.
10752 (java_complete_lhs): Labeled blocks containing no statement are
10753 marked as completing normally.
10754
10755 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
10756
10757 * xref.c (xref_set_current_fp): New function, defined.
10758 * xref.h (xref_set_current_fp): New function, prototyped.
10759
10760 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
10761
10762 * check-init.c (check_init): Take into account that
10763 LABELED_BLOCK_STMT can be empty.
10764
10765 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
10766
10767 * parse.y (java_check_regular_methods): Warning check on not
10768 overriding methods with default access in other packages does not
10769 apply to `<clinit>'.
10770 (java_complete_lhs): If block body is an empty_stmt_node, replace
10771 it by NULL_TREE. This prevents gcc from generating an irrelevant
10772 warning.
10773
10774 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
10775
10776 * check-init.c (check_init): Removed code accepting to see things
10777 falling through default:, when doing xrefs.
10778 * java-tree.h (do_not_fold): New global variable, declared.
10779 * parse.y (do_not_fold): New global variable, defined.
10780 (java_complete_expand_method): Set `do_not_fold' to the value of
10781 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
10782 and reinstall them after them have been purged; do not check for
10783 initializations; do not issue missing return errors.
10784 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
10785 when doing xrefs.
10786 (patch_binop): Skip the fold part when doing xrefs.
10787 (build_string_concatenation): Skip the concatenation part when
10788 doing xrefs.
10789 (patch_synchronized_statement): Do not generate a try-finally when
10790 doing xrefs.
10791 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
10792 and keep the location where the throw was seen.
10793 * typeck.c (convert): When `do_not_fold' is set, do not attempt
10794 any treatment on the converted node an simply return a NOP_EXPR of
10795 the targeted type.
10796 * xref.c (xref_get_data): New function, defined.
10797 * xref.h (xref_get_data): New function, declared.
10798 (XREF_GET_DATA): Use xref_get_data.
10799
10800 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10801
10802 * gjavah.c (print_include): Cast the result of `strlen' to int
10803 when comparing against a signed value.
10804 (add_namelet): Likewise.
10805
10806 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10807
10808 * expr.c (expand_invoke): Mark parameter `nargs' with
10809 ATTRIBUTE_UNUSED.
10810 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
10811
10812 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
10813 ATTRIBUTE_UNUSED.
10814
10815 * jcf-reader.c (get_attribute): Cast a value to long
10816 when comparing against a signed expression. Likewise.
10817
10818 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
10819 HOST_BITS_PER_CHAR.
10820
10821 1999-05-11 Andrew Haley <aph@cygnus.com>
10822
10823 * parse.y (source_end_java_method): If the current method contains
10824 any exception handlers, force asynchronous_exceptions: this is
10825 necessary because signal handlers in libjava may throw exceptions.
10826 * decl.c (end_java_method): Ditto.
10827
10828 1999-05-11 Tom Tromey <tromey@cygnus.com>
10829
10830 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
10831 flags.
10832 * jvspec.c (THREAD_NAME): Removed.
10833 (GC_NAME): Likewise.
10834 (MATHLIB): Likewise.
10835 (WITHLIBC): Likewise.
10836 (GCLIB): Likewise.
10837 (THREADLIB): Likewise.
10838 (MATH_LIBRARY): Likewise.
10839 (lang_specific_driver): Don't add `-l' options to command line.
10840 Instead, add a single --specs option. Recognize `-L' options and
10841 use them to search for spec file.
10842 (find_spec_file): New function.
10843 (SPEC_FILE): New define.
10844
10845 1999-05-11 Dave Brolley <brolley@cygnus.com>
10846
10847 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
10848 cpplib-enabled build.
10849
10850 1999-05-05 Per Bothner <bothner@cygnus.com>
10851
10852 * class.c (make_field_value): DECL_INITIAL may be a string literal;
10853 temporarily zero it while calling rest_of_decl_compilation.
10854
10855 * java-tree.h (string_ptr_type_node): Add declaration.
10856 * decl.c: Define and initialize string_ptr_type_node.
10857 * parse.y (patch_string_cst): Use string_ptr_type_node.
10858
10859 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
10860 * parse.y (for_statement): Now unconditionally exit_block.
10861 (finish_labeled_statement): No longer exit_block if for-loop.
10862 (patch_loop_statement): Check harder if the loop is already labeled.
10863
10864 * parse.y (patch_initialized_static_field): Removed function.
10865 (maybe_generate_clinit): Removed special handling for interfaces.
10866 (java_complete_expand_methods): Do a preliminary java_complete_tree
10867 on <clinit> to determine if it can be removed.
10868 (java_complete_expand_method): Remove special handling for <clinit>.
10869 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
10870 optimize if we get back empty_stmt_node.
10871 For MODIFY_EXPR, re-do checking of static initializers.
10872 (fold_constant_for_init): Don't return immediate if VAR_DECL.
10873 For VAR_DECL, pass correct context.
10874
10875 * verify.c (verify_jvm_instructions): Better error messages.
10876
10877 1999-05-03 Tom Tromey <tromey@cygnus.com>
10878
10879 * parse-scan.y (interface_declaration): Call
10880 report_class_declaration for interfaces.
10881
10882 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
10883
10884 * Makefile.in: Remove -v from bison command lines.
10885
10886 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
10887
10888 * check-init.c (check_init): Exclude a case of error when doing
10889 xrefs.
10890 * class.c (layout_class_method): Don't generate the error message
10891 twice when compiling from source.
10892 * lang-options.h: Added `-Wredundant-modifers' and
10893 `-Wunusupported-jdk11' flags and help text.
10894 * lang.c (lang_decode_option): Added support for
10895 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
10896 flag_static_local_jdk11 and flag_redundant set accordingly.
10897 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
10898 * parse.h (EXPR_WFL_ADD_COL): New macro.
10899 (DECL_END_SOURCE_LINE): Likewise.
10900 (DECL_INHERITED_SOURCE_LINE): Likewise.
10901 * parse.y (static_ref_err): New function, prototyped.
10902 (CCB_TK): Now tagged <operator>.
10903 (class_body:): Remember the location of the closing '}' of a class
10904 definition when doing xrefs.
10905 (block:): Likewise.
10906 (block_end:): Likewise.
10907 (create_class): Remember the location of the inherited class
10908 identifier when doing xrefs.
10909 (register_fields): Added test on first operand of `init' before
10910 testing it TREE_CODE.
10911 (method_header): Store the location of the class identifier in the
10912 class decl when doing xrefs.
10913 (finish_method_declaration): Don't combine first/last method line
10914 when doing xref.
10915 (java_check_regular_methods): Warning check on not overriding
10916 methods with default access on other packages move before check on
10917 static methods. Initialization of `aflags' also moved up.
10918 (resolve_expression_name): Call static_ref_err to report the error.
10919 (static_ref_err): New function, implemented.
10920 (resolve_field_access): Returned simplified static field access
10921 when doing xrefs.
10922 (resolve_qualified_expression_name): Check for illegal use of
10923 static fields in a non static context. Call static_ref_err to
10924 report error in various places.
10925 (java_complete_tree): Do not fold initialized static fields when
10926 doing xrefs.
10927 (java_complete_lhs): Likewise.
10928
10929 1999-04-29 Anthony Green <green@cygnus.com>
10930
10931 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
10932 create internal labels.
10933 (lookup_label): Ditto.
10934
10935 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
10936
10937 * class.c (layout_class_method): Generate <clinit>'s rtl for
10938 interfaces.
10939 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
10940 for interfaces' <clinit>.
10941 * expr.c (lookup_field): Search for fields in interfaces.
10942 (expand_invoke): Fixed indentation.
10943 (expand_java_field_op): Likewise. Use IS_CLINIT.
10944 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
10945 (IS_CLINIT): New macro.
10946 * parse.y (type_declaration:): Call maybe_generate_clinit after an
10947 interface was parsed.
10948 (maybe_generate_clinit): Don't generate if the current class is an
10949 interface with only fields of primitive types.
10950 (reset_method_name): Use IS_CLINIT.
10951 (java_complete_expand_method): Expand <clinit> when it exists for
10952 interfaces. Use IS_CLINIT.
10953 (resolve_expression_name): Use DECL_CONTEXT instead of
10954 current_class to build static field references.
10955 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
10956 ARRAY_REF when doing xreferencing.
10957 (check_final_assignment): Fixed typo in leading comment. Use
10958 IS_CLINIT.
10959 (patch_array_ref): Don't fully expand array references when
10960 xreferencing.
10961 (patch_return): Use IS_CLINIT.
10962 (patch_throw_statement): Likewise.
10963
10964 1999-04-22 Tom Tromey <tromey@cygnus.com>
10965
10966 * Make-lang.in (JAVA_SRCS): Added check-init.c.
10967
10968 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
10969
10970 * decl.c (predef_filenames, predef_filenames_size): New globals
10971 (init_decl_processing): predef_filenames and predef_filenames_size
10972 initialized.
10973 * java-tree.h (predef_filenames, predef_filenames_size): Declared
10974 extern.
10975 * jcf-parse.c (predefined_filename_p): New function.
10976 (yyparse): Check that files on the command line are specified only
10977 once and issue a warning otherwise.
10978 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
10979 * parse.y (source_end_java_method): Nullify NOP method bodies, to
10980 avoid a gcc warning with -W -Wall turned on.
10981 (java_expand_classes): Abort if errors were encountered.
10982 (java_complete_lhs): If the cross reference flag is set, wrap
10983 field DECL node around a WFL when resolving expression name.
10984
10985 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
10986
10987 * lang.c (lang_decode_option): Fixed returned value when parsing
10988 `-fxref=...' and `-Wall'.
10989 * parse.y (source_end_java_method): Do not generate code when
10990 flag_emit_xref is set.
10991 (resolve_expression_name): Do not build static field access when
10992 flag_emit_xref is set.
10993 (resolve_field_access): No special treatment on `length' when
10994 flag_emit_xref is set. Do not build qualified static field access
10995 when flag_emit_xref is set.
10996 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
10997 when flag_emit_xref is set.
10998 (patch_assignment): Do not generate array store runtime check when
10999 flag_emit_xref is set.
11000 * xref.c (xref_flag_value): Fixed function declaration
11001 indentation.
11002 (xset_set_data): New function.
11003 * xref.h (xref_set_data): Added prototype for new function.
11004 (typedef struct xref_flag_table): New field data.
11005 (XREF_GET_DATA): New macro.
11006
11007 1999-04-19 Tom Tromey <tromey@cygnus.com>
11008
11009 * xref.h (enum): Removed trailing comma.
11010
11011 * parse.y (resolve_qualified_expression_name): Added missing
11012 `break'.
11013
11014 1999-04-15 Anthony Green <green@cygnus.com>
11015
11016 * gjavah.c: New prototypes for java_float_finite and
11017 java_double_finite.
11018
11019 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11020
11021 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
11022 references.
11023
11024 1999-04-06 Jeffrey A Law (law@cygnus.com)
11025
11026 * Makefile.in (TREE_H): Add tree-check.h.
11027 (RTL_H): Add genrtl.h.
11028
11029 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11030
11031 * parse.y (patch_assignment): Added ArrayStoreException runtime
11032 check.
11033
11034 1999-04-06 Per Bothner <bothner@cygnus.com>
11035
11036 * expr.c (pop_type_0): New function.
11037 (pop_type): Use pop_type_0.
11038 * java-tree.h (pop_type_0): New declaration.
11039 * verify.c (verify_jvm_instructions): Check return instructions.
11040
11041 * parse.y (patch_binop): Don't fold if non-constant and emiting
11042 class files.
11043
11044 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11045
11046 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
11047
11048 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
11049 (main_jcf): Don't define.
11050 (process_file): Don't set `main_jcf'.
11051
11052 * java-tree.h (main_jcf): Don't declare.
11053
11054 * jcf-parse.c (main_jcf): Add static definition.
11055
11056 * lang.c (main_jcf): Don't define.
11057
11058 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11059
11060 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
11061
11062 * decl.c (copy_lang_decl): Likewise for `bcopy'.
11063
11064 * jcf-depend.c: Include "config.h", not <config.h>.
11065
11066 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
11067 `bcopy' to PTR.
11068
11069 * jcf-path.c: Include "config.h", not <config.h>.
11070
11071 * lex.c: Don't include various system header files.
11072 (java_init_lex): Cast the argument of `bzero' to PTR
11073
11074 * parse-scan.y (java_push_parser_context): Likewise.
11075
11076 * parse.y (java_push_parser_context): Likewise.
11077 (patch_bc_statement): Match format specifier to variable argument.
11078
11079 * xref.c: Don't include <stdio.h>.
11080
11081 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11082
11083 * parse.y (struct parser_ctxt *ctxp): Now global.
11084 (declare_local_variables): Use WFL compound value for the
11085 declaration source line value, when doing cross-referencing.
11086
11087 1999-03-31 Tom Tromey <tromey@cygnus.com>
11088
11089 * gjavah.c (print_field_info): Allow constants of other types.
11090 (print_include): Generate include when new name is proper prefix
11091 of already printed name.
11092 (add_namelet): Likewise.
11093 (cxx_keyword_subst): New function.
11094 (print_method_info): Use it.
11095 (print_field_name): New function.
11096 (get_field_name): New function.
11097 (print_field_info): Use get_field_name and print_field_name.
11098
11099 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11100
11101 * Makefile.in (keyword.h): Generate using gperf language 'C', not
11102 'KR-C', so gperf uses the `const' keyword on strings.
11103
11104 * keyword.gperf (java_keyword): Const-ify a char*.
11105
11106 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11107
11108 * parse.y (patch_bc_statement): Fixed identation and a bogus
11109 `printf' format.
11110
11111 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11112
11113 * parse.y (patch_assignment): Allow static variables in other
11114 classes to be assigned.
11115
11116 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11117
11118 * class.c (maybe_add_interface): Remove unused variable
11119 `interface_binfo'.
11120 (make_class_data): Use = for assignment, not ==. Likewise.
11121 (emit_register_classes): Remove unused variable `decl'.
11122
11123 * lex.c: Fix comment so as not to contain an embedded `/*'.
11124
11125 * verify.c (verify_jvm_instructions): Remove unused variable
11126 `self_type'.
11127
11128 1999-03-27 Per Bothner <bothner@cygnus.com>
11129
11130 * parse.y (complete_loop_body): Rename to finish_loop_body.
11131 (complete_labeled_statement): Rename to finish_labeled_statement.
11132 (complete_for_loop): Rename to finish_for_loop.
11133 (complete_method_declaration): Rename to finish_method_declaration.
11134
11135 * java-tree.h (continue_identifier_node): New global node.
11136 * decl.c: Define and initialize continue_identifier_node.
11137 * parse.y (generate_labeled_block): Remove - no longer needed.
11138 (build_loop_body): Use continue_identifier_node for continue block.
11139 (finish_labeled_statement): Also do pop_labeled_block actions.
11140 (java_complete_lhs): POP_LOOP even if error.
11141 (build_labeled_block): Special handling for continue_identifier_node.
11142 (patch_loop_statement): Re-organize.
11143 (patch_bc_statement): Re-write.
11144
11145 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11146
11147 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
11148 using a WFL compound value.
11149 * parse.y (xref.h): Include.
11150 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
11151 WFL compound value.
11152 (register_fields): Set WFL compound value to lineno if doing
11153 xrefs.
11154 (java_complete_expand_method): Call expand_xref if flag_emit_xref
11155 is set.
11156 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
11157 * xref.h (expand_xref): Prototype renamed from xref_generate.
11158
11159 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11160
11161 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
11162 (GET_CURRENT_BLOCK): New macro.
11163 * parse.y (current_static_block): New global variable.
11164 (method_body:): Define action.
11165 (complete_method_declaration): Set current_function_decl to NULL
11166 when work on the current method is done.
11167 (declare_local_variables): Use GET_CURRENT_BLOCK.
11168 (java_method_add_stmt): Likewise.
11169 (java_complete_expand_method): Disable the use of `this' when
11170 expanding <clinit>.
11171 (enter_a_block): If no current method exist, use
11172 current_static_block to link static initializer blocks.
11173 (exit_block): Rewritten to use current_static_block when no current
11174 method decl exists.
11175 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
11176 (patch_return): Forbid the use of `return' in static initializers.
11177 (patch_throw_statement): Fixed indentation. Issue specific error
11178 for uncaught thrown checked exception in static initializer
11179 blocks. Removed FIXME.
11180
11181 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
11182
11183 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
11184 Link gcj from gcc.o.
11185
11186 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11187
11188 * parse.y (find_applicable_accessible_methods_list): When dealing
11189 with interface: ensure that a given interface or java.lang.Object
11190 are searched only once.
11191
11192 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11193
11194 * gjavah.c (print_c_decl): Remove unused argument `flags'.
11195
11196 * jcf-dump.c (print_access_flags): Add braces around if-else.
11197
11198 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
11199 COMBINE_INPUTS.
11200
11201 * lex.c (build_wfl_node): Add static prototype.
11202
11203 * lex.h (build_wfl_node): Remove static prototype.
11204
11205 * parse.y: Include lex.c early enough to declare everything needed.
11206 Ensure calls to `build_wfl_node' pass the proper arguments.
11207 (create_class): Remove unused variable `super_decl'.
11208 (get_printable_method_name): Initialize variable `name'.
11209
11210 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11211
11212 * Changelog: Fixed 1999-03-22 typos.
11213 * lang.c (lang_decode_option): Fixed typo in error string in the
11214 XARG section.
11215
11216 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11217
11218 * Makefile.in (JAVA_OBJS): Added entry xref.o.
11219 (xref.o): New rule.
11220 * java-tree.h (flag_emit_xref): Declared extern.
11221 * lang.c (xref.h): Included.
11222 (flag_emit_xref): New global variable.
11223 (lang_decode_option): Added support for -fxref.
11224 * xref.c: Created.
11225 * xref.h: Likewise.
11226
11227 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
11228
11229 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
11230 linked with.
11231
11232 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11233
11234 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
11235 $(srcdir)/../system.h and $(JAVA_TREE_H).
11236 (jcf-io.o): Depend on $(JAVA_TREE_H).
11237 (mangle.o): Likewise.
11238
11239 * check-init.c (check_cond_init): Add static prototype.
11240
11241 * class.c (build_java_method_type, hashUtf8String,
11242 make_field_value, get_dispatch_vector, get_dispatch_table,
11243 append_gpp_mangled_type, mangle_static_field): Likewise.
11244 (strLengthUtf8): Hide unused definition.
11245 (hashUtf8String): Const-ify.
11246 (make_field_value): Un-ANSI-fy.
11247
11248 * constants.c: Move inclusion of jcf.h above java-tree.h.
11249 (set_constant_entry, find_class_or_string_constant,
11250 find_name_and_type_constant, get_tag_node,
11251 build_constant_data_ref): Add static prototype.
11252
11253 * decl.c (push_jvm_slot, builtin_function,
11254 lookup_name_current_level): Likewise.
11255 (builtin_function): Const-ify.
11256
11257 * except.c (expand_start_java_handler, expand_end_java_handler):
11258 Add static prototype.
11259
11260 * expr.c (flush_quick_stack, push_value, pop_value,
11261 java_stack_swap, java_stack_dup, build_java_athrow,
11262 build_java_jsr, build_java_ret, expand_java_multianewarray,
11263 expand_java_arraystore, expand_java_arrayload,
11264 expand_java_array_length, build_java_monitor, expand_java_pushc,
11265 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
11266 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
11267 expand_compare, expand_test, expand_cond, expand_java_goto,
11268 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
11269 expand_java_field_op, java_push_constant_from_pool): Likewise.
11270
11271 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
11272 (build_java_arraynull_check): Mark parameters `node' and `type'
11273 with ATTRIBUTE_UNUSED.
11274 (note_label): Likewise for parameter `current_pc'.
11275 (expand_java_call, expand_java_ret): Hide unused definition.
11276
11277 * java-tree.h (make_class, build_constants_constructor,
11278 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
11279 init_outgoing_cpool, register_class, emit_register_classes,
11280 java_layout_seen_class_methods): Prototype.
11281 (unicode_mangling_length): Const-ify.
11282 (append_gpp_mangled_name, append_gpp_mangled_classtype,
11283 emit_unicode_mangled_name, format_int, format_uint,
11284 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
11285 jcf_print_utf8_replace, open_class): Prototype.
11286
11287 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
11288 <stdio.h>. Include tree.h/java-tree.h.
11289 (utf8_equal_string usage, process_class): Add static prototype.
11290 (open_class): Don't prototype this here.
11291 (utf8_equal_string): Match arguments to format specifiers.
11292 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
11293 TABLE_SWITCH, disassemble_method): Likewise.
11294
11295 * jcf-io.c: Include tree.h/java-tree.h.
11296 (open_class, find_classfile, jcf_print_utf8,
11297 jcf_print_utf8_replace): Const-ify.
11298
11299 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
11300 parse_class_file): Add static prototype.
11301 (find_in_current_zip): Match definition to existing static
11302 prototype.
11303
11304 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
11305 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
11306 finish_jcf_block, define_jcf_label, get_jcf_label_here,
11307 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
11308 write_chunks, adjust_typed_op, generate_bytecode_conditional,
11309 generate_bytecode_return, perform_relocations, init_jcf_state,
11310 init_jcf_method, release_jcf_state, generate_classfile):
11311 Add static prototype.
11312 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
11313 (make_class_file_name): Const-ify.
11314
11315 * jcf.h (find_classfile): Const-ify.
11316
11317 * jv-scan.c (reset_report): Remove prototype.
11318
11319 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
11320 (error): Rewrite to allow varargs.
11321
11322 * lang.c (lang_f_options): Const-ify.
11323
11324 * lex.c (java_parse_escape_sequence): Add static prototype.
11325 (java_allocate_new_line): Match definition to existing static
11326 prototype.
11327
11328 * mangle.c Include tree.h/java-tree.h.
11329 (unicode_mangling_length, emit_unicode_mangled_name,
11330 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
11331
11332 * parse.h (jdep_code): Remove trailing comma in enumeration.
11333 (java_get_line_col): Move prototype outside of !JC1_LITE test.
11334 (reset_report): Add prototype.
11335
11336 * verify.c (push_pending_label, merge_types): Add static
11337 prototypes.
11338
11339 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
11340
11341 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11342
11343 * parse.y (find_applicable_accessible_methods_list): Extend the
11344 search to superinterfaces when relevant.
11345 (search_applicable_methods_list): New function.
11346
11347 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
11348
11349 * class.c (unmangle_classname): Implemented stricter testing
11350 before setting the QUALIFIED_P flag on an identifier.
11351
11352 1999-03-16 Per Bothner <bothner@cygnus.com>
11353
11354 * parse.y (java_complete_lhs): Call force_evaluation_order
11355 after patch_newarray.
11356 (patch_binop): Don't call fold if there are side effects.
11357
11358 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
11359
11360 * parse.y (java_stabilize_reference): Use save_expr instead of
11361 building a SAVE_EXPR node.
11362 (java_complete_lhs): Patch the resulting string of the `+='
11363 operator (if necessary) and complete the RHS after having built
11364 the cast.
11365
11366 1999-03-15 Per Bothner <bothner@cygnus.com>
11367
11368 * class.c (make_class): Don't set CLASS_P here (because
11369 this function is also called by build_java_array_type).
11370 (push_class): Set CLASS_P here instead.
11371 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
11372
11373 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
11374 context. If the context is class, perfer "super" over "synchronized".
11375 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
11376
11377 * parse.y (create_class): Don't call parser_check_super here;
11378 it is not robust. Always wait until later.
11379
11380 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
11381 match what JDK 1.2 does), but don't set ACC_PUBLIC.
11382
11383 1999-03-13 Per Bothner <bothner@cygnus.com>
11384
11385 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
11386 * lex.h (UNGETC): Change misleading macro.
11387
11388 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11389
11390 * parse.y (java_stabilize_reference): Return NODE when patching a
11391 COMPOUND_EXPR.
11392 (java_complete_lhs): Put parenthesis around truth values.
11393
11394 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11395
11396 * class.c (layout_class_method): Don't make rtl for interface
11397 methods.
11398 * parse.h (GET_TYPE_NAME): New macro.
11399 * parse.y (if_then_statement:): Fixed indentation.
11400 (if_then_else_statement:): Likewise.
11401 (for_statement:): Fixed spacing.
11402 (try_statement:): Fixed indentation.
11403 (create_interface): Don't force interfaces to be abstract.
11404 (method_header): Abstract methods are OK in interfaces.
11405 (declare_local_variables): Fixed typo in comment.
11406 (java_complete_expand_method): Fixed indentation.
11407 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
11408 non accessible fields.
11409 (java_stabilize_reference): New function.
11410 (java_complete_lhs): Fixed indentation. Use
11411 java_stabilize_reference in compound assignment. Insert the
11412 cast. If not processing `+' fix string constants before processing
11413 binop.
11414
11415 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11416
11417 * constants.c (find_class_or_string_constant): Cast variable `j'
11418 to a `jword' when comparing against one.
11419
11420 * expr.c (java_lang_expand_expr): Remove unused variables
11421 `has_finally_p' and `op0'.
11422
11423 * gjavah.c (print_field_info): Cast a value to jint when comparing
11424 against one. Likewise for a jlong.
11425 (add_namelet): Likewise cast a `sizeof' to an int when comparing
11426 against a signed quantity.
11427
11428 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
11429 (print_signature): Don't needlessly dereference variable `str'
11430
11431 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
11432 `max_locals' with ATTRIBUTE_UNUSED.
11433 (jcf_parse_class): Likewise for variable `index'.
11434
11435 * parse.h (reverse_jdep_list): Remove static prototype.
11436
11437 * parse.y (build_jump_to_finally): Remove prototype and definition.
11438 (reverse_jdep_list): Add static prototype.
11439
11440 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
11441 `assignment' and `expr_decl'.
11442
11443 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
11444
11445 1999-03-12 Andrew Haley <aph@cygnus.com>
11446
11447 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
11448 we'll need a directory separator and a null character.
11449
11450 1999-03-10 Per Bothner <bothner@cygnus.com>
11451
11452 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
11453
11454 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
11455
11456 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
11457 interfaces.
11458
11459 1999-03-05 Per Bothner <bothner@cygnus.com>
11460
11461 * lex.c (java_parse_end_comment): Take extra parameter (next char).
11462
11463 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
11464
11465 * class.c (layout_class_method): A static method in a base class
11466 is never overridden, so treat it like it doesn't exist.
11467 However, do complain about private non-static method overriding
11468 public static method.
11469
11470 * parse.y: Don't set unused INITIALIZED_P flag.
11471 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
11472
11473 * parse.y (find_expr_with_wfl): Optimize tail-calls.
11474 (build_array_from_name): Re-order &index[string] to &string[index].
11475
11476 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
11477 error_mark (it might catch more errors, but it is more likely to lose).
11478
11479 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11480
11481 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
11482 (parse-scan.o): Depend on toplev.h.
11483
11484 * class.c (make_method_value): Add prototype. Make it static.
11485 Remove unused second argument, caller changed.
11486
11487 * expr.c (java_lang_expand_expr): Remove unused variable
11488 `return_label'.
11489
11490 * java-tree.h: Don't prototype find_in_current_zip.
11491 Add prototypes for verify_constant_pool, start_java_method,
11492 end_java_method, give_name_to_locals, expand_byte_code,
11493 open_in_zip, set_constant_value, find_constant1, find_constant2,
11494 find_utf8_constant, find_string_constant, find_class_constant,
11495 find_fieldref_index, find_methodref_index, write_constant_pool,
11496 count_constant_pool_bytes and encode_newarray_type.
11497
11498 * jcf-dump.c: Remove unused variable `LONG_temp'.
11499
11500 * jcf-parse.c: Include parse.h.
11501 (jcf_parse_source): Remove unused parameter, all callers changed.
11502 (jcf_figure_file_type): Add static prototype.
11503 (find_in_current_zip): Likewise. Also remove unused parameter,
11504 all callers changed.
11505 (read_class): Initialize variable `saved_pos'.
11506
11507 * jcf-reader.c (jcf_parse_preamble): Mark variables
11508 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
11509
11510 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
11511 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
11512 (java_parse_doc_section): Initialize variable `seen_star'.
11513 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
11514 (java_lex_error): Mark parameters `msg' and `forward' with
11515 ATTRIBUTE_UNUSED.
11516 (java_get_line_col): Mark parameters `filename' and `line' with
11517 ATTRIBUTE_UNUSED.
11518
11519 * parse-scan.y: Include toplev.h.
11520 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
11521
11522 * parse.h: use `struct JCF', not plain `JCF'.
11523 (java_parser_context_save_global, java_expand_classes
11524 java_parser_context_restore_global, java_parse): Add prototypes.
11525
11526 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
11527 `node'.
11528
11529 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
11530
11531 * check-init.c (check_init): COPYN takes word count, not bit count.
11532
11533 1999-02-26 Per Bothner <bothner@cygnus.com>
11534
11535 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
11536 explicit build_decl. (Avoids crash in reload when optimizing.)
11537
11538 1999-02-25 Per Bothner <bothner@cygnus.com>
11539
11540 * decl.c (complete_start_java_method): Handle synchronized method
11541 even when compiling from bytecode.
11542
11543 1999-02-26 Tom Tromey <tromey@cygnus.com>
11544
11545 * gjavah.c (add_class_decl): Only generate `#include' if outer
11546 class is not the name of the class we are processing. Correctly
11547 append `.h' in #include.
11548 (process_file): Clean up newlines around generated `#include's.
11549 (decode_signature_piece): Correctly handle inner classes.
11550 (struct include): New structure.
11551 (all_includes): New global.
11552 (print_include): New function.
11553 (add_class_decl): Use it.
11554 (process_file): Likewise.
11555 (add_class_decl): Generate include for java-array.h if array
11556 seen.
11557 (process_file): Don't generate java-array.h include.
11558
11559 * gjavah.c (add_namelet): Check for standard package names here.
11560 (add_class_decl): Don't check for standard package names here.
11561
11562 1999-02-25 Tom Tromey <tromey@cygnus.com>
11563
11564 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
11565 When reading a zip file, only use strncmp if both strings are
11566 bigger than the buffer length. Initialize `k' when looping
11567 through zip file.
11568
11569 1999-02-24 Tom Tromey <tromey@cygnus.com>
11570
11571 * gjavah.c (struct namelet): New structure.
11572 (add_namelet): New function.
11573 (print_namelet): New function.
11574 (print_class_decls): Use add_namelet and print_namelet to generate
11575 namespaces and not classes.
11576 (method_printed): New global.
11577 (HANDLE_END_METHOD): Examine method_printed.
11578 (print_method_info): Set method_printed when required. Print
11579 error if function to be ignored is marked virtual. Handle $finit$
11580 method.
11581 (METHOD_IS_FINAL): New macro.
11582 (print_field_info): Use it.
11583 (HANDLE_METHOD): Clear method_printed.
11584 (method_pass): New global.
11585 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
11586 (process_file): Do two passes over both fields and methods.
11587 (HANDLE_METHOD): Examine method_pass.
11588 (root): New global.
11589 (add_class_decl): New function.
11590 (print_class_decls): Don't scan over entire constant pool.
11591
11592 1999-02-23 Tom Tromey <tromey@cygnus.com>
11593
11594 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
11595 disable linking in that case.
11596
11597 1999-02-20 Tom Tromey <tromey@cygnus.com>
11598
11599 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
11600 not 0x1f.
11601
11602 1999-02-21 Per Bothner <bothner@cygnus.com>
11603
11604 * decl.c (build_result_decl), java-tree.h: New method.
11605 (complete_start_java_method): Handle synchronized methods.
11606 Don't build DECL_RESULT here. (Ordering dependency problem.)
11607 (start_java_method): Call build_result_decl here instead ...
11608 * parse.y (java_complete_expand_method): ... and here.
11609 (expand_start_java_method): Don't call complete_start_java_method here.
11610 (java_complete_expand_method): Call it here instead.
11611 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
11612 * java-tree.h: ... here.
11613
11614 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
11615 * parse.y (java_complete_lhs): Don't call force_evaluation_order
11616 for ARRAY_REF - it doesn't work when array bounds are checked.
11617 (patch_array_ref): Handle it here instead.
11618
11619 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
11620
11621 1999-02-19 Per Bothner <bothner@cygnus.com>
11622
11623 Force left-to-right evaluation of binary operations etc.
11624 * expr.c (force_evaluation_order), java-tree.h: New function.
11625 * parse.y (java_complete_lhs): Pass binary operations, procedure
11626 calls, and ARRAY_REFs to force_evaluation_order.
11627 (various): Set TREE_SIDE_EFFECTS more carefully.
11628
11629 Tolerate random (non-UTF8) encoding in comments without complaining.
11630 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
11631 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
11632
11633 * parse.y (resolve_qualified_expression_name): Handle error_mark.
11634 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
11635
11636 * parse.y (java_complete_lhs): Ignore an empty statement in a
11637 COMPOUND_EXPR. Don't complain about empty statement after return.
11638
11639 1999-02-19 Per Bothner <bothner@cygnus.com>
11640
11641 * parse.y (obtain_incomplete_type): Don't wrap unknown types
11642 in TREE_LIST - just chain the POINTER_TYPEs together.
11643 (resolve_class): If type already resolved, return decl.
11644 After resolving, update TREE_TYPE(class_type), and name (if array).
11645 * parse.h (do_resolve_class), parse.y: Make non-static.
11646 * class.c (maybe_layout_super_class): Take this_class argument.
11647 Do do_resolve_class if necessary.
11648 (layout_class, layout_class_methods): Adjust calls appropriately.
11649 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
11650 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
11651 * typeck.c (build_java_array_type): Don't call layout_class.
11652
11653 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11654
11655 * parse.y (check_pkg_class_access): Allow private class access
11656 within the same package.
11657 (strip_out_static_field_access_decl): New function.
11658 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
11659 operator argument before testing its nature.
11660
11661 1999-02-03 Per Bothner <bothner@cygnus.com>
11662
11663 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
11664 (TRY_EXPR): Simplify - it no longer has a finally clause.
11665 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
11666 Simpler handling of TRY_EXPR, which no longer has a finally clause.
11667 * expr.c (java_lang_expand_expr): Likewise.
11668 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
11669 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
11670 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
11671 (build_try_statement): Remove finally parameter and handling.
11672 (build_try_finally_statement): New function.
11673 (patch_try_statement): No longer need to support finally clause.
11674 (try_statement): Update grammar action rules.
11675 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
11676 Simpler handling of TRY_EXPR, which no longer has a finally clause.
11677
11678 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
11679
11680 * jcf-parse.c (get_constant): Add braces around computation of 'd'
11681 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
11682
11683 1999-02-17 Andrew Haley <aph@cygnus.com>
11684
11685 * class.c (build_utf8_ref): Back out broken patch which was
11686 intended to to output signatures using '.' as a separator.
11687
11688 * class.c (make_class_data): Output signatures using '.' as a
11689 separator, rather than '/'.
11690 (mangled_classname): Likewise.
11691 (make_field_value): Likewise.
11692 (make_method_value): Likewise.
11693 * constants.c (alloc_class_constant): Likewise.
11694 * expr.c (build_invokeinterface): Likewise.
11695
11696 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11697
11698 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
11699 of an ancient workaround.
11700
11701 1999-02-10 Jeffrey A Law (law@cygnus.com)
11702
11703 * jvspec.c (xmalloc): Kill the prototype. It does not belong
11704 here anymore.
11705
11706 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11707
11708 * lex.c (yylex): Encode \0 as UTF8.
11709
11710 1999-02-10 Tom Tromey <tromey@cygnus.com>
11711
11712 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
11713 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
11714 (libgcj_zip): Renamed.
11715 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
11716 LIBJAVA_ZIP_FILE.
11717 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
11718
11719 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
11720 (GC_NAME): Renamed -lgc to -lgcjgc.
11721
11722 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11723
11724 * lex.c (java_lang_cloneable): Initialize.
11725 * parse.y (java_lang_cloneable): New static variable.
11726 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
11727 doing one more qualification round.
11728 (valid_ref_assignconv_cast_p): Reject null source or
11729 destination. Allow an array to be cast into java.lang.Cloneable.
11730 (patch_cast): Swapped two first arguments to first call to
11731 valid_ref_assignconv_cast_p.
11732
11733 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11734
11735 * parse.h: DECL_P renamed JDECL_P.
11736 * parse.y: DECL_P replaced by JDECL_P.
11737 (build_array_from_name): Always use pointer's type.
11738 (patch_bc_statement): Extra code to search continue target in a
11739 for loop. Fixed comments. Continue target is current loop when
11740 unlabeled.
11741
11742 1999-02-05 Andrew Haley <aph@cygnus.com>
11743
11744 * class.c (make_class_data): The superclass of an interface should
11745 be null, not class Object.
11746
11747 * lex.c (java_lex): Sign extend hex literals.
11748
11749 1999-02-04 Andrew Haley <aph@cygnus.com>
11750
11751 * class.c (build_utf8_ref): Output signatures using '.' as a
11752 separator, rather than '/'.
11753 (make_class_data): Likewise.
11754
11755 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
11756
11757 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
11758 mkstemp.o. Get them from libiberty now.
11759
11760 1999-02-02 Jeffrey A Law (law@cygnus.com)
11761
11762 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
11763
11764 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11765
11766 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
11767 from libiberty.h
11768
11769 1999-02-02 Per Bothner <bothner@cygnus.com>
11770
11771 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
11772 * jcf-write.c (generate_bytecode_return): New function.
11773 (generate_bytecode_insns): Use it, for RETURN_EXPR.
11774
11775 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
11776 generate special [fd]const_[01] instructions.
11777
11778 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
11779
11780 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
11781 handling OPCODE_lookupswitch or OPCODE_tableswitch.
11782
11783 1999-02-01 Per Bothner <bothner@cygnus.com>
11784
11785 * parse.y (patch_method_invocation): Handle calling static methods,
11786 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
11787
11788 * parse.y (java_complete_lhs): Don't complain about unreachable
11789 exit condition in a do-while statement.
11790
11791 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11792
11793 * lex.c (java_read_char): Fixed utf8 decoding.
11794 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
11795 range.
11796 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
11797 comments. Local variable `all_primitive' is gone. Broadened
11798 acceptance of `0' to floating point targets. `long' can now be
11799 widened to `double' or `float'.
11800 (valid_method_invocation_conversion_p): Added leading
11801 comment. Fixed tabulation.
11802 (build_string_concatenation): Optimize out left or right empty
11803 string constants.
11804
11805 1999-01-28 Per Bothner <bothner@cygnus.com>
11806
11807 * jcf-write.c (localvar_alloc): Only emit entry for
11808 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
11809 (generate_bytecode_insns): Only call put_linenumber if
11810 debug_info_level > DINFO_LEVEL_NONE.
11811 * jvspec.c (lang_specific_driver): If no -O* or -g* option
11812 is specified, add -g1 (for compatibility wih javac).
11813
11814 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
11815
11816 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
11817 gjavah.o, check-init.o, jv-scan.o
11818
11819 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11820
11821 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
11822
11823 * gjavah.c: Include config.h and system.h.
11824
11825 * javaop.h (inline): Don't define, its handled by system.h.
11826 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
11827 from `inline' to `static inline'.
11828
11829 * jcf.h (inline): Don't define, its handled by system.h.
11830
11831 * lex.c (inline): Likewise.
11832
11833 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
11834
11835 * lang-specs.h: Map -Qn to -fno-ident.
11836
11837 1999-01-29 Richard Henderson <rth@cygnus.com>
11838
11839 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
11840
11841 1999-01-29 Tom Tromey <tromey@cygnus.com>
11842
11843 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
11844 then cast it to Object before calling `append' method.
11845
11846 1999-01-28 Per Bothner <bothner@cygnus.com>
11847
11848 * check-init.c (check_bool2_init, check_bool_init, check_init):
11849 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
11850 * jcf-write.c (generate_bytecode_insns): Likewise.
11851
11852 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
11853
11854 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
11855 * parse.y (patch_cast): Allow a boolean to be cast into a
11856 boolean.
11857
11858 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11859
11860 * parse.y: (class_declaration:): Fixed indentation.
11861 (class_member_declaration:): Extra `;' after field declaration now
11862 accepted.
11863 (interface_declaration:): Removed debug messages in error reports.
11864 (patch_binop): Nodes created and returned inherit the orignal
11865 node's COMPOUND_ASSIGN_P flag value.
11866 (patch_cast): Fix cast from char to floating point.
11867
11868 1999-01-25 Andrew Haley <aph@cygnus.com>
11869
11870 * except.c, java-except.h (expand_resume_after_catch): new
11871 function.
11872 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
11873 to branch back to main flow of control after a catch block.
11874
11875 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11876
11877 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
11878 $(srcdir)/../system.h.
11879 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
11880 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
11881 (jcf-write.o): Likewise.
11882 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11883 (mangle.o): Depend on $(srcdir)/../toplev.h.
11884 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11885 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
11886
11887 * class.c: Include output.h and parse.h.
11888 (mangled_classname): Add the `const' keyword to a char*.
11889 (find_named_method): Hide unused function definition.
11890 (build_utf8_ref): Change type of variable `c' to unsigned char.
11891 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
11892 (build_class_ref): Add the `const' keyword to a char*.
11893 (layout_class_method): Remove unused variable `buf'.
11894
11895 * decl.c (find_local_variable): Remove unused variable `rtl'.
11896 (pushdecl): Likewise for variables `different_binding_level' and
11897 `oldglobal'.
11898 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
11899 (maybe_build_cleanup): Likewise for parameter `decl'.
11900
11901 * except.c (expand_start_java_handler): Mark parameter `range'
11902 with ATTRIBUTE_UNUSED.
11903
11904 * expr.c: Include except.h.
11905 (pop_type): Remove unused variable `i'.
11906 (pop_value): Likewise for variables `n_words' and `i'.
11907 (expand_java_arrayload): Likewise for variable `convert'.
11908 (java_lang_expand_expr): Likewise for variables `op0', `type',
11909 `mode', `unsignedp', `node' and `elements'.
11910 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
11911 `eh_ranges'.
11912 (process_jvm_instruction): Add a `const' qualifier to a char*.
11913
11914 * gjavah.c (output_directory): Add the `const' keyword to a char*.
11915 (temp_directory): Likewise.
11916 (print_c_decl): Likewise.
11917 (print_method_info): Likewise.
11918 (decode_signature_piece): Likewise.
11919 (print_mangled_classname): Likewise.
11920
11921 * java-except.h: Provide prototypes for maybe_start_try,
11922 maybe_end_try and add_handler.
11923
11924 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
11925 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
11926 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
11927 init_expr_processing, push_super_field, init_class_processing,
11928 can_widen_reference_to, class_depth, verify_jvm_instructions,
11929 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
11930 set_local_type, merge_type_state, push_type, load_type_state,
11931 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
11932 emit_unicode_mangled_name): Add prototypes.
11933
11934 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
11935 (print_signature_type): Use ISDIGIT, not isdigit.
11936 (print_signature): Remove unused variable `j'.
11937
11938 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
11939 int when comparing against one.
11940
11941 * jcf-parse.c: Include toplev.h.
11942
11943 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
11944 (localvar_free): Remove unused variable `i'.
11945 (generate_bytecode_conditional): Likewise for variable `kind'.
11946
11947 * jv-scan.c: Include config.h and system.h. Remove redundant
11948 OS header and gansidecl.h includes.
11949 (warning): Add the `const' keyword to a char*. Also add
11950 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
11951 __STDC__, when determining whether to use ANSI-isms.
11952 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
11953 (xmalloc): Don't redundantly prototype here.
11954 (main): Remove unused parameter `envp'. Also fix the arguments
11955 passed to function `fatal' to match the format specifier.
11956
11957 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
11958
11959 * mangle.c: Include toplev.h.
11960 (emit_unicode_mangled_name): Declare parameter `len'.
11961
11962 * parse.y (parse_warning_context): Add the `const' keyword to a
11963 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
11964 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
11965 (issue_warning_error_from_context): Add the `const' keyword to
11966 a char*.
11967 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
11968 not `__STDC__' for whether to use ANSI-isms.
11969
11970 * typeck.c (incomplete_type_error): Mark parameters `value' and
11971 `type' with ATTRIBUTE_UNUSED.
11972 (parse_signature_type): Use ISDIGIT, not isdigit.
11973
11974 * verify.c (check_pending_block): Add the `const' keyword to a char*.
11975 (verify_jvm_instructions): Likewise. Remove unused variables
11976 `field_name' and `default_val'.
11977
11978 * zextract.c: Include config.h and system.h. Remove redundant
11979 OS header includes.
11980
11981 * zipfile.h: Prototype `read_zip_archive'.
11982
11983 1999-01-21 Andrew Haley <aph@cygnus.com>
11984
11985 * typeck.c (convert): Allow conversions to void type: some
11986 optimizations in gcc do this.
11987
11988 1999-01-21 Andrew Haley <aph@cygnus.com>
11989
11990 * typeck.c (convert_ieee_real_to_integer): New function.
11991 (convert): When not using fast-math and using hardware fp, convert
11992 an IEEE NaN to zero.
11993
11994 1999-01-18 Andrew Haley <aph@cygnus.com>
11995
11996 * parse.y (patch_binop): Do a type conversion from signed to
11997 unsigned and then back to signed when a ">>>" is found.
11998
11999 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12000
12001 * java-tree.h: (check_for_initialization): Added prototype.
12002 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
12003 * parse.y (do_resolve_class): Removed unused locals.
12004 (read_import_dir): Likewise.
12005 (resolve_qualified_expression_name): Array creation
12006 expressions are valid primary expressions.
12007 (qualify_ambiguous_name): Likewise.
12008 (patch_synchronized_statement): Removed unused local.
12009
12010 1999-01-17 Jeffrey A Law (law@cygnus.com)
12011
12012 * Makefile.in (zextract.o): Add dependencies.
12013
12014 * Makefile.in: Do not put ^Ls at the start of a line.
12015
12016 1999-01-15 Per Bothner <bothner@cygnus.com>
12017
12018 * expr.c (process_jvm_instruction): Coerce to correct Throwable
12019 sub-type the result of the call that gets the exception value.
12020
12021 * parse.y (java_complete_expand_methods): If flags_syntax_only,
12022 don't call finish_class.
12023
12024 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
12025 clear found before continuing.
12026
12027 * verify.c (verify_jvm_instructions): On an array load, allow
12028 and handle top of stack to be TYPE_NULL.
12029
12030 * gjavah.c (generate_access): Translate Java package private or
12031 protected access to C++ public, but with a comment.
12032
12033 1999-01-13 Andrew Haley <aph@cygnus.com>
12034
12035 * expr.c (generate_name): Name prefix changed to avoid clashes
12036 with assembler temp labels.
12037
12038 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
12039 MODIFY_EXPR. Without this, code for the assignment may not be
12040 generated at all and the synchronized statement will read an
12041 uninitialized variable.
12042
12043 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12044
12045 * class.c (maybe_layout_super_class): Fixed returned value.
12046 * lex.c: Added 1999 to the copyright.
12047 (java_init_lex): Initialize java_lang_imported.
12048 * lex.h: Added 1999 to the copyright.
12049 * parse.h: Added 1999 to the copyright.
12050 (REGISTER_IMPORT): Fixed typo in trailing macro.
12051 (CURRENT_OSB): New macro.
12052 (struct parser_ctxt): New fields osb_depth, osb_limit.
12053 * parse.y (java_lang_id): New global variable.
12054 (type_import_on_demand_declaration): Don't import java.lang.* twice.
12055 (array_creation_expression:): Use CURRENT_OSB.
12056 (dims:): Uses a stack to keep track of array dimensions.
12057 (cast_expression:): Use CURRENT_OSB.
12058 (find_expr_with_wfl): Return NULL if node found doesn't meet the
12059 conditions.
12060 (register_fields): Fixed typos in comment.
12061 (check_method_redefinition): Fixed comment indentation.
12062 (java_check_regular_methods): Set saved found wfl to NULL after
12063 having reinstalled it in the previously found DECL_NAME.
12064
12065 1999-01-10 Richard Henderson <rth@cygnus.com>
12066
12067 * gjavah.c (java_float_finite): Use a union to do type punning.
12068 (java_double_finite): Likewise.
12069
12070 1999-01-09 Per Bothner <bothner@cygnus.com>
12071
12072 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
12073 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
12074 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
12075 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
12076 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
12077 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
12078
12079 1999-01-08 Per Bothner <bothner@cygnus.com>
12080
12081 * check-init.c (check_init): If compiling to native, we don't
12082 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
12083
12084 1999-01-08 Tom Tromey <tromey@cygnus.com>
12085
12086 * parse-scan.y (variable_declarator_id): Set or increment
12087 bracket_count.
12088 (bracket_count): New global.
12089 (formal_parameter): Handle case where bracket pairs trail variable
12090 declarator id.
12091
12092 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
12093
12094 * jcf-parse.c (yyparse): variable len changed from a char to an
12095 int to prevent overflow.
12096
12097 1999-01-06 Per Bothner <bothner@cygnus.com>
12098
12099 * java-tree.h: Declare read_class.
12100 * jcf-parse.c (read_class): New function.
12101 (load_class): Now just call read_class.
12102
12103 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
12104 * jcf-parse.c (parse_source_file): Declare save_error_count,
12105 which is needed by java_parse_abort_on_error macro,
12106 * parse.y (java_layout_classes, java_expand_classes): Likewise.
12107
12108 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
12109 constructor, if initializing a static field.
12110 (patch_new_array_init): Set TREE_CONSTANT if it is.
12111 * expr.c (java_lang_expand_expr): For a static array constructor
12112 of primitive elements, allocate the array itself statically.
12113 Disabled until we can set the vtable field statically.
12114
12115 * check-init.c: New file. Checks for definite assignment.
12116 * Makefile.in (JAVA_OBJS): Add check-init.o.
12117 * parse.y (java_complete_expand_method): Call check_for_initialization.
12118 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
12119
12120 1999-01-06 Graham <grahams@rcp.co.uk>
12121
12122 * parse.y : include system.h instead of including
12123 standard headers directly with the exception of <dirent.h>.
12124
12125 1999-01-06 Per Bothner <bothner@cygnus.com>
12126
12127 * lex.h: Moved static function declarations to lex.c,
12128 to shut up some -Wall warnings.
12129 * lex.c: Static function declarations moved here.
12130 * jcf-dump.c: Small fixes to shut up -Wall warnings.
12131
12132 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12133
12134 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
12135
12136 1998-12-22 Per Bothner <bothner@cygnus.com>
12137
12138 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
12139 * verify.c (verify_jvm_instructions): Fix off-by-one error.
12140
12141 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
12142 (localvar_alloc): Change return type to void,
12143 (emit_unop): Remove unused variable size.
12144
12145 * jcf-write.c (struct jcf_block): Add new union.
12146 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
12147 (call_cleanups): New functions.
12148 (struct jcf_partial): New fields num_finalizers and return_value_decl.
12149 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
12150 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
12151 * lang.c (lang_init): Call using_eh_for_cleanups.
12152 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
12153 completing operands to patch_synchronized_statement.
12154 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
12155 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
12156 WITH_CLEANUP_EXPR instead of TRY_EXPR.
12157
12158 1998-12-20 John F. Carr <jfc@mit.edu>
12159
12160 * Make-lang.in: Comment out control-Ls; they upset some makes.
12161
12162 1998-12-18 Tom Tromey <tromey@cygnus.com>
12163
12164 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
12165 consistently.
12166
12167 1998-12-17 Tom Tromey <tromey@cygnus.com>
12168
12169 * parse.y (DIR_SEPARATOR): New define.
12170 (check_class_interface_creation): Use it.
12171
12172 * parse-scan.y (report_main_declaration): Recognize
12173 `java.lang.String' in argument to main.
12174
12175 1998-12-16 Per Bothner <bothner@cygnus.com>
12176
12177 * parse.y (create_interface): Remove bogus test.
12178
12179 1998-12-16 Per Bothner <bothner@cygnus.com>
12180
12181 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
12182 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
12183
12184 1998-12-16 Tom Tromey <tromey@cygnus.com>
12185
12186 * parse-scan.y (qualified_name): Use correct sprintf format.
12187
12188 1998-12-15 Tom Tromey <tromey@cygnus.com>
12189
12190 * gjavah.c (print_field_info): Changed how most negative number is
12191 printed.
12192
12193 1998-12-14 Per Bothner <bothner@cygnus.com>
12194
12195 * parse.y (fold_constant_for_init): New function.
12196 (resolve_expression_name): Don't replace static final
12197 constant-initialized fields by its value.
12198 (java_complete_lhs): New. Same as java_complete_tree, except does
12199 not replace static final constant-initialized fields by their values.
12200 (register_fields): If there is an initializer, set DECL_INITIAL and
12201 MODIFY_EXPR_FROM_INITIALIZATION_P.
12202 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
12203 Only call patch_initialized_static_field if
12204 MODIFY_EXPR_FROM_INITIALIZATION_P.
12205 (patch_initialized_static_field): If not valid constant, clear
12206 DECL_INITIAL.
12207
12208 * parse.y (lookup_field_wrapper): Fix thinko.
12209
12210 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
12211 set and restore global lineno.
12212
12213 1998-12-14 Tom Tromey <tromey@cygnus.com>
12214
12215 * gjavah.c (print_field_info): If value to print is the smallest
12216 value of its size, then print as hex to avoid later warnings from
12217 C++ compiler.
12218
12219 1998-12-14 Tom Tromey <tromey@cygnus.com>
12220
12221 * gjavah.c (decompile_method): Decompile `return null'.
12222 (process_file): Generate `#pragma interface'.
12223 (method_declared): New global.
12224 (print_method_info): Set it.
12225 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
12226 (print_method_info): Handle abstract methods.
12227
12228 1998-12-13 Per Bothner <bothner@cygnus.com>
12229
12230 * parse.y (patch_method_invocation): If class_decl is null
12231 (e.g. an array type), use original type.
12232
12233 * parse.y (check_thrown_exceptions): Temporary hack to suppress
12234 errors about uncaught exception from clone (of array, specifically).
12235
12236 1998-12-13 Tom Tromey <tromey@cygnus.com>
12237
12238 * gjavah.c (decompile_method): Handle all types of `return'
12239 opcode. Decompile `return this' and `return'.
12240 (method_access): New global.
12241 (print_method_info): Set it.
12242 (decompile_method): Don't decompile a synchronized method.
12243
12244 1998-12-13 Tom Tromey <tromey@cygnus.com>
12245
12246 * jcf-reader.c (jcf_parse_one_method): Recognize
12247 HANDLE_END_METHOD.
12248 * gjavah.c (HANDLE_END_METHOD): New macro.
12249 (HANDLE_CODE_ATTRIBUTE): New macro.
12250 (decompile_method): New function.
12251 (print_method_info): Don't print `;\n' at end of function decl.
12252 Include java-opcodes.h.
12253 (decompiled): New global.
12254
12255 1998-12-12 Per Bothner <bothner@cygnus.com>
12256
12257 * class.c (build_class_ref): Handle PRIMTYPE.class if
12258 flag_emit_class_files.
12259 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
12260 if flag_emit_class_files.
12261 * parse.y (java_complete_tree): Pre-liminary support for
12262 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
12263
12264 * parse.y (patch_synchronized_statement): Don't call monitorexit
12265 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
12266
12267 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
12268
12269 * zipfile.h (opendir_in_zip): New declaration.
12270 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
12271 (opendir_in_zip): New function, using code from open_in_zip.
12272 (open_in_zip): Call opendir_in_zip.
12273 (find_class): Remove no-longer-used do_class_file parameter,
12274 but add source_ok parameter. Change logic so if we find a .java file,
12275 we don't look for .class in later classpath emtries.
12276 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
12277 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
12278 * gjavah.c: Update call to find_class.
12279 * jcf-dump.c: Likewise.
12280
12281 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
12282 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
12283 nothing if body is empty_stmt_node.
12284 Various little fixes so SP gets correctly adjusted.
12285 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
12286 For CALL_EXPR, test if static first.
12287 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
12288 such as the ones we create for Object and Class.
12289 Set and restore current_function_decl.
12290 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
12291 (note_possible_classname): New function.
12292 (read_import_entry): Removed. Merged with read_import_dir.
12293 (read_import_dir): Don't call find_class - that only gives us
12294 the first classpath entry having the needed package.
12295 Use the struct buffer data structure from buffer.h.
12296 (read_import_dir, find_in_imports_on_demand): The remembered
12297 class names now use '.' (not '/') as package separator.
12298
12299 * parse.y (java_complete_expand_methods): Call write_classfile
12300 here, and not in java_expand_classes (which only gets first class).
12301
12302 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
12303
12304 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
12305 (register_fields): If a static fields has an initializer, just
12306 chain it on ctxp->static_initialized, and handle later.
12307 (java_complete_expand_methods): Force <clinit> first.
12308 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
12309 - it's already been completed.
12310 (patch_initialized_static_field): New function.
12311 (java_complete_field): Call it.
12312
12313 1998-12-12 Per Bothner <bothner@cygnus.com>
12314
12315 * expr.c (encode_newarray_type, build_new_array): New functions.
12316 * java-tree.h: Declare build_new_array.
12317 * jcf-write.c (patch_newarray): Use build_new_array.
12318
12319 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
12320 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
12321
12322 * parse.y (patch_new_array_init): Re-organize.
12323 Now is passed the actual array (pointer) type of the value.
12324 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
12325 (patch_array_constructor): Removed - merged into patch_new_array_init.
12326 (java_complete_tree): Update patch_new_array_init.
12327
12328 * jcf-write.c (find_constant_index): New function.
12329 (generate_bytecode_insns): Use find_constant_index.
12330 (generate_classfile): Use find_constant_index for ConstantValue.
12331
12332 1998-12-11 Tom Tromey <tromey@cygnus.com>
12333
12334 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
12335 * decl.c (init_decl_processing): Renamed dtable -> vtable.
12336 * class.c (make_class_data): Renamed dtable -> vtable, and
12337 dtable_method_count -> vtable_method_count.
12338
12339 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12340
12341 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
12342 global variables, initialized.
12343 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
12344 Declared new global variables.
12345 * lex.c (java_lex): Return long_zero_node, float_zero_node,
12346 double_zero_node, integer_zero_node upon direct matching.
12347 * parse.y (purify_type_name): Added function prototype.
12348 (duplicate_declaration_error_p): Consider new_type as potentially
12349 being a incomplete type. Use purify_type_name on type string.
12350 (method_header): saved_type: unused variable removed. Don't figure
12351 return type if method name is invalid.
12352 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
12353 processed by patch_unaryop.
12354 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
12355 increment/decrement node into its original type after binary
12356 numeric promotion on its operands.
12357
12358 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12359
12360 * parse.y (array_initializer:): Array init operand is NULL_TREE
12361 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
12362 now an error. Fixed indentation problems.
12363 (patch_string): Handle error_mark_node as an argument.
12364 (patch_new_array_init): Fixed indentation problems.
12365 (array_constructor_check_entry): Removed check on null wfl_value.
12366 Return an error if wfl_value's walk returns an error.
12367
12368 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12369
12370 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
12371 * lex.c (java_lex): Remember column position before advancing one
12372 token. Retain location information on OCB_TK.
12373 * lex.h (typedef struct java_lc): Added new field.
12374 * parse.h (GET_SKIP_TYPE): New macro.
12375 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
12376 * parse.y (build_new_array_init, patch_new_array_init,
12377 patch_array_constructor, maybe_build_array_element_wfl,
12378 array_constructor_check_entry): New function prototypes.
12379 (switch_block:): Tagged <node>.
12380 (OCB_TK): Tagged <operator>.
12381 (array_initializer:): Installed actions.
12382 (variable_initializer): Build location information on element if
12383 necessary.
12384 (switch_statement:): Fixed indentation typo.
12385 (switch_block:): Redefined default action.
12386 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
12387 (patch_assignment): Removed duplicate code.
12388 (maybe_build_array_element_wfl, build_new_array_init,
12389 patch_new_array_init, patch_array_constructor,
12390 array_constructor_check_entry): New functions.
12391
12392 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12393
12394 * parse.y (array_initializer): Tagged <node>.
12395 (variable_initializer:): Use default rule.
12396 (array_initializer:): Defined actions.
12397 (variable_initializers:): Likewise.
12398 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
12399 non-static field accesses.
12400 (patch_invoke): Fixed indentation typo.
12401 (java_complete_tree): Likewise.
12402 (build_labeled_block): Changed leading comment. Generate an error
12403 in case of duplicate loop labels.
12404 (patch_conditional_expr): Patch results of string concatenation
12405 operations.
12406
12407 1998-12-06 Per Bothner <bothner@cygnus.com>
12408
12409 * constants.c (find_methodref_index): When the class is an interface,
12410 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
12411
12412 * decl.c (finit_identifier_node): Use "$finit$", rather than
12413 "<finit>" (which Sun's verifier rejects).
12414 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
12415 (generate_field_initialization_code): Removed.
12416 (fix_constructors) Don't add call to $finit$ here (wrong order).
12417 (patch_method_invocation): Add $finit$ call here.
12418
12419 * java-tree.h (CALL_USING_SUPER): New macro.
12420 * parse.y (patch_invoke): Remove im local variable.
12421 (patch_method_invocation, patch_invoke): Don't pass super parameter.
12422 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
12423 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
12424
12425 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
12426
12427 * parse.y (java_complete_tree): Don't complain about unreachable
12428 statement if it is empty_stmt_node.
12429
12430 * jcf-write.c (find_constant_wide): New function.
12431 (push_long_const): Use find_constant_wide.
12432
12433 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
12434 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
12435 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
12436 Emit invokeinterface when calling an interface method.
12437 Emit invokespecial also when calling super or private methods.
12438
12439 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
12440
12441 1998-12-06 Per Bothner <bothner@cygnus.com>
12442
12443 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
12444
12445 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
12446
12447 * java-tree.h (java_layout_seen_class_methods): New function
12448 prototype.
12449 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
12450 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
12451 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
12452 * parse.y (method_declarator:): Defined action.
12453 (issue_warning_error_from_context): input_filename saved, set to
12454 the appropriate value and restored after java_error is called.
12455 (build_unresolved_array_type): Fixed comment.
12456 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
12457 (method_header): Deal with return type the same way type are
12458 handled for fields and method's parameters and local variables
12459 types are handled.
12460 (check_method_redefinition): Removed extra CR.
12461 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
12462 (java_layout_seen_class_methods): New function.
12463 (java_layout_classes): Call java_layout_seen_class_methods.
12464
12465 1998-12-03 Per Bothner <bothner@cygnus.com>
12466
12467 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
12468
12469 1998-12-03 Per Bothner <bothner@cygnus.com>
12470
12471 * jcf-dump.c (main): Fix error message.
12472 * jcf-path.c (add_entry): Style fix.
12473
12474 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12475
12476 * class.c (layout_class_method): Call build_java_argument_signature
12477 on constructors too.
12478 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
12479 (patch_method_invocation): Define a primary when resolving an
12480 expression name. Augmented comment on code checking illegal `this'
12481 usage. Loosened it test by accepting NEW_CLASS_EXPR.
12482
12483 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12484
12485 * class.c (layout_class_method): Don't report error on non-static
12486 overriding static if the method is private.
12487 * java-tree.h (finish_class): Prototype added.
12488 * lex.c (java_get_line_col): Handle col argument -2 value.
12489 * parse.h: All static method declarations moved to parse.y.
12490 * parse.y: Now contains all static method declarations previously
12491 found in parse.h.
12492 (find_expr_with_wfl, missing_return_error,
12493 unreachable_stmt_error): New functions.
12494 (java_get_real_method_name): Identify constructors bearing class
12495 names in source code compiled classes only.
12496 (java_complete_expand_methods): Call missing_return_error.
12497 (invocation_mode): Private methods invoked as static methods.
12498 (java_complete_tree): Call unreachable_stmt_error.
12499
12500 1998-12-01 Tom Tromey <tromey@cygnus.com>
12501
12502 * Makefile.in (+target): Removed.
12503 (+xmake_file): Likewise.
12504 (+tmake_file): Likewise.
12505 (.NOEXPORT): Removed duplicate.
12506
12507 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12508
12509 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
12510
12511 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
12512
12513 * jvgenmain.c: Remove the xmalloc prototype, we get it from
12514 libiberty.h. Provide an xmalloc definition.
12515
12516 * jvspec.c: Remove the xmalloc prototype.
12517
12518 * parse-scan.y: Include config.h and system.h. Don't include
12519 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
12520 Provide an xstrdup definition.
12521
12522 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
12523
12524 * jcf-path.c (add_entry): Recognize ".jar" too.
12525 * lang-specs.h: Likewise.
12526
12527 1998-11-26 Per Bothner <bothner@cygnus.com>
12528
12529 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
12530 soft_monitorenter_node, soft_monitorexit_node, throw_node.
12531
12532 * jcf-write.c (generate_bytecode_insns):
12533 Handle pre/post-increment/decrement of long.
12534
12535 * jcf-write.c (generate_bytecode_insns):
12536 Handle missing exception handler (finally for synchronized).
12537
12538 1998-11-25 Per Bothner <bothner@cygnus.com>
12539
12540 * java-tree.h (end_params_node): Declare global.
12541 * decl.c (end_params_node): New global.
12542 (init_decl_processing, start_java_method): Use end_params_node for
12543 end of list of parameter types. Follows correct gcc conventions.
12544 * expr.c (pop_argument_types, pop_arguments): Likewise.
12545 * lang.c (put_decl_node): Likewise.
12546 * typeck.c (various places): Likewise.
12547 * class.y (various places): Likewise.
12548 * parse.y (various places): Likewise.
12549
12550 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
12551 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
12552
12553 * class.c: Add #include flags.h, remove no-longer needed declaration.
12554
12555 * class.c (layout_class_method): Remove commented-out code, re-format.
12556 Don't add vtable entry (or index) for private methods.
12557 * expr.c (expand_invoke): A private method is implicitly final.
12558 * class.c (make_class_data): If inlining or optimizing,
12559 skip private methods.
12560
12561 * class.c (finish_class): New function. Calls existing methods,
12562 but alls emits deferred inline functions.
12563 * jcf-parse.c (parse_class_file): Call finish_class.
12564 * parse.y (java_complete_expand_methods): Likewise.
12565
12566 * expr.c (build_java_binop): Explicit default, to silence -Wall.
12567
12568 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
12569
12570 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
12571
12572 * jcf-write.c (generate_bytecode_conditional): Fix typo.
12573
12574 1998-11-24 Per Bothner <bothner@cygnus.com>
12575
12576 * (generate_classfile): Always write class access flag with
12577 ACC_SUPER set.
12578
12579 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12580
12581 * class.c (maybe_layout_super_class): New function.
12582 (layout_class): Reorganized. Loop on class methods dispatched into
12583 a new function. Call maybe_layout_super_class.
12584 (layout_class_methods, layout_class_method): New functions.
12585 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
12586 class.
12587 (expand_invoke): Likewise.
12588 * java-tree.h (all_class_list): New global variable declared.
12589 (layout_class_methods, layout_class_method): New function
12590 prototypes.
12591 (LAYOUT_SEEN_CLASS_METHODS): New macro.
12592 * jcf-parse.c (all_class_list): New global variable.
12593 (load_class): Extended what class_or_name can be. Use parser
12594 context mechanism to save globals before calling jcf_parse.
12595 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
12596 is set on the file name.
12597 (jcf_parse): Layout class methods when Object is loaded, otherwise
12598 record class in all_class_list for delayed method layout.
12599 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
12600 * lang.c (put_decl_node): Decode <init> into the decl context
12601 class name.
12602 * lex.c (java_allocate_new_line): Use xmalloc.
12603 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
12604 pointers, not TREE_LIST elements.
12605 (struct parser_ctxt): Fixed comment indentations, added comments
12606 and reordered some fields.
12607 (java_check_methods): Function prototype removed.
12608 * parse.y (java_push_parser_context): Use xmalloc.
12609 (java_parser_context_restore_global): Pop extra pushed ctxp only
12610 when there's nothing next.
12611 (maybe_create_class_interface_decl): Fixed comment, add new
12612 created class decl to all_class_list.
12613 (method_header): Use GET_REAL_TYPE on argument's types.
12614 (method_declarator): Use GET_REAL_TYPE, change type to the real
12615 type in TREE_LIST dependency node. Build argument list with the
12616 real type.
12617 (create_jdep_list): Use xmalloc. Removed allocation error message.
12618 (obtain_incomplete_type): Fixed leading comment. Broadened
12619 incoming argument meaning.
12620 (register_incomplete_type): Use xmalloc. Removed allocation error
12621 message.
12622 (safe_layout_class): Fixed leading comment.
12623 (jdep_resolve_class): Reversed if statement condition and switch
12624 if and else bodies.
12625 (resolve_and_layout): Fixed leading comment. Broadened incoming
12626 argument meaning.
12627 (complete_class_report_errors): New local variable name, for
12628 clarity. purify_type_name used for all error cases.
12629 (java_get_real_method_name): Stricter check on constructors.
12630 (java_check_regular_methods): Reverse methods list only if not
12631 already laid out. Layout artificial constructor.
12632 (java_check_methods): Deleted.
12633 (source_start_java_method): Obtain incomplete type for patchable
12634 method arguments.
12635 (java_layout_classes): Fixed leading comment. Use
12636 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
12637 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
12638 before returning. Fixed comments.
12639 (java_expand_classes): Check for errors up front.
12640 (patch_method_invocation): Class to search is resolved and laid
12641 out.
12642
12643 1998-11-24 Per Bothner <bothner@cygnus.com>
12644
12645 * expr.c (java_lang_expand_expr): Add missing emit_queue.
12646
12647 * javaop.h (int8): Removed - not used.
12648 (jbyte): Redefine portably with correct signedness.
12649
12650 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
12651
12652 * jcf-write.c (generate_bytecode_insns): Fix typo
12653 OPCODE_getstatic to OPCODE_getfield.
12654
12655 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
12656 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
12657 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
12658
12659 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12660
12661 * jcf-parse.c (jcf_parse_source): Function returned type is
12662 void. Added prototype.
12663 (jcf_parse): Function returned type is void.
12664 (yyparse): Remove call to fclose on the last parsed file.
12665
12666 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
12667
12668 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12669
12670 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
12671 (layout_class): Cope with methods featuring WFL in decl names.
12672 * decl.c (unqualified_object_id_node): New global variable,
12673 initialized.
12674 (build_decl_no_layout): Removed.
12675 * expr.c (build_primtype_type_ref): Handle Double.
12676 (java_lang_expand_expr): Fixed indentations.
12677 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
12678 (flag_wall, flag_redundant, flag_not_overriding,
12679 flag_static_local_jdk1_1, unqualified_object_id_node): Global
12680 variable declarations.
12681 (build_decl_no_layout): Removed prototype.
12682 (java_get_real_method_name): Added prototype.
12683 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
12684 (java_parse_abort_on_error): Macro now just returns.
12685 * jcf-parse.c (jcf_parse_source): Check fclose returned
12686 value. Call emit_register_classes if java_report_errors returns
12687 zero.
12688 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
12689 flag_static_local_jdk1_1): New integer flags.
12690 (lang_decode_option): New flags set here.
12691 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
12692 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
12693 the flag_redundant variable.
12694 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
12695 when parsing java.lang.Object class.
12696 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
12697 NULL_TREE to build.
12698 (resolve_qualified_expression_name): Fixed indentation.
12699 (patch_array_ref): Changed prototype.
12700 (not_initialized_as_it_should_p): Prototype removed.
12701 (java_report_errors): Added function prototype.
12702 * parse.y (formal_parameter:): Changed error message for not yet
12703 supported final parameters.
12704 (class_type_list:): Set both PURPOSE and VALUE of created
12705 TREE_LIST to be class_type.
12706 (primary_no_new_array:): Handle class literals on primitive types.
12707 (parse_warning_context): Reinstalled correct force_error and
12708 do_warning flags setups.
12709 (java_report_errors): Changed prototype. Return java_error_count
12710 value.
12711 (variable_redefinition_error): Consider treating variable type as
12712 a fake pointer.
12713 (create_interface): Warn about redundant abstract modifier if
12714 flag_redundant is set. Changed error message.
12715 (lookup_field_wrapper): Save/restore globals before/after looking
12716 up field.
12717 (duplicate_declaration_error_p): Consider treating declaration
12718 type as a fake pointer.
12719 (register_fields): Extract real type from dependency node. Check
12720 for duplicate field declaration after type adjustment. Use
12721 DECL_INITIAL to store static final initialized values.
12722 (method_header): Extract real function type from dependency node.
12723 (check_abstract_method_header): Use GET_METHOD_NAME.
12724 (obtain_incomplete_type): Layout fake pointer type.
12725 (safe_layout_class): Don't try to check for methods before layout.
12726 (java_complete_class): Don't check for correct throws clause
12727 elements inheritance here.
12728 (resolve_and_layout): Broadened name parameter meaning.
12729 (reset_method_name): Use GET_METHOD_NAME.
12730 (java_get_real_method_name): New function.
12731 (java_check_regular_methods): Don't check methods in
12732 java.lang.Object. Verify lineage of throws clause elements. Use
12733 flag_no_overriding in warning report.
12734 (check_throws_clauses): Don't check if class was from
12735 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
12736 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
12737 (declare_local_variables): Use flag_static_local_jdk1_1 to report
12738 warning on unsupported final local variables. Use build_decl
12739 instead of build_decl_no_layout. Get real local variable type from
12740 dependency node.
12741 (source_start_java_method): Get real parameter type from
12742 dependency node. Call build_decl instead of build_decl_no_layout.
12743 (java_layout_classes): Reverse tree and layout type and class as
12744 required. Mark class as loaded when done.
12745 (resolve_field_access): Fixed indentation. Restricted condition
12746 leading to static field access code generation. Set field_type
12747 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
12748 (resolve_qualified_expression_name): Initialize type_found to
12749 null. Handle static field resolved during qualification. Fixed
12750 layout on non primitive field decl types.
12751 (not_accessible_p): Fixed typo in comment.
12752 (patch_method_invocation): Resolve and layout class to search from
12753 type.
12754 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
12755 layout non primitive type, if necessary. Make method node only to
12756 report errors.
12757 (find_applicable_accessible_methods_list): Consider WFL'ed method
12758 decl names. Fixed indentation.
12759 (argument_types_convertible): Resolve and layout target type if
12760 necessary.
12761 (java_complete_tree): Fixed indentation problems. Rewrote
12762 CALL_EXPR thrown exceptions check. Re-installed further processing
12763 of the assignment in certain cases.
12764 (patch_assignment): Call maybe_build_primttype_type_ref to perform
12765 inlining on class literals.
12766 (valid_builtin_assignconv_identity_widening_p): Cope with constant
12767 0 literal.
12768 (valid_method_invocation_conversion_p): Likewise.
12769 (patch_string): Temporary disable forbidden use of `this' in
12770 explicit constructor invocations when doing string concatenation
12771 within their scope.
12772 (patch_unaryop): Added comment. Reinstalled code to disable
12773 further check on assignment operation with cast expression RHS.
12774 (patch_switch_statement): Fixed indentation.
12775 (build_try_statement): Call build_decl instead of
12776 build_decl_no_layout.
12777 (patch_synchronized_statement): Likewise.
12778 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
12779 IS_UNCHECKED_EXPRESSION_P.
12780 (check_thrown_exceptions_do): Changed leading comment. Resolve and
12781 layout argument exception type.
12782 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
12783 of IS_UNCHECKED_EXPRESSION_P.
12784
12785 1998-11-18 Anthony Green <green@cygnus.com>
12786
12787 * jcf-parse.c (yyparse): Open class file in binary mode.
12788
12789 1998-11-15 Per Bothner <bothner@cygnus.com>
12790
12791 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
12792
12793 * jcf-write.c (perform_relocations): Move check out one loop.
12794
12795 1998-11-15 Anthony Green <green@hoser.cygnus.com>
12796
12797 * Make-lang.in: Fix reference to srcdir.
12798 * jv-scan.c: Add missing xmalloc prototype.
12799 * jvgenmain.c: Ditto.
12800
12801 1998-11-15 Per Bothner <bothner@cygnus.com>
12802
12803 * decl.c (error_mark_node), java-tree.h: New global.
12804 * parse.y: Use empty_stmt_node instead of size_zero_node.
12805 (build_if_else_statement): If missing else, use empty_stmt_node.
12806
12807 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
12808 (java_complete_expand_method): Complain if return is missing.
12809 (java_check_regular_methods): Comment out incorrect error check.
12810 (not_accessible_p): Fix incorrect handling of protected methods.
12811 (patch_method_invocation): Pass correct context to not_accessible_p.
12812 (find_applicable_accessible_methods_list): Likewise.
12813 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
12814 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
12815 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
12816 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
12817
12818 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
12819 (push_int_const): Remove reundant NOTE_PUSH.
12820 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
12821 (- case SWITCH_EXPR): Fix code generation bug.
12822 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
12823 (generate_classfile): More robust for abstract methods.
12824
12825 1998-11-15 Anthony Green <green@cygnus.com>
12826
12827 * Makefile.in: jv-scan and jvgenmain all require libiberty.
12828 * Make-lang.in: Ditto.
12829
12830 * jv-scan.c: Remove xmalloc and xstrdup definitions.
12831 * jvgenmain: Ditto.
12832
12833 1998-11-15 Per Bothner <bothner@cygnus.com>
12834
12835 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
12836
12837 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
12838
12839 1998-11-14 Per Bothner <bothner@cygnus.com>
12840
12841 Allow uses of interface types to verify. This is not really
12842 type-safe, but it matches what Sun does, and is OK as long as
12843 there are appropriate run-time checks.
12844 * verify.c (merge_types): If merging two interface types,
12845 just set the result to java.lang.Object.
12846 * expr.c (pop_type): Any interface is matches by java.lang.Object.
12847
12848 1998-11-13 Tom Tromey <tromey@cygnus.com>
12849
12850 * gjavah.c (main): Handle --output-class-directory argument.
12851 * jvspec.c (lang_specific_driver): Translate `-d' into
12852 -foutput-class-dir.
12853 * jcf.h (jcf_write_base_directory): Declare.
12854 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
12855 * lang-options.h: Mention -foutput-class-dir.
12856 * jcf-write.c (jcf_write_base_directory): New global.
12857 (make_class_file_name): Put generated .class file into `-d'
12858 directory, or into source directory if -d not given. Function now
12859 static.
12860 (write_classfile): Free class file name. Handle case where class
12861 file name is NULL.
12862 (DIR_SEPARATOR): New macro.
12863 Include <sys/stat.h>
12864
12865 * Makefile.in (prefix): New macro.
12866
12867 1998-11-12 Per Bothner <bothner@cygnus.com>
12868
12869 * parse.y (patch_invoke): Do less if flag_emit_class_files.
12870 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
12871 here (done in patch_invoke instead).
12872 (case_identity): Moved here from parse.y.
12873
12874 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
12875 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
12876 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
12877 so they can be efficiently scanned without recursion.
12878 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
12879 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
12880 in BLOCK iteratively, rather than recursively.
12881
12882 * parse.y (do_unary_numeric_promotion): New function.
12883 (patch_unaryop, patch_binop, patch_array_ref): Use it.
12884
12885 * parse.y (patch_newarray): Various fixes.
12886
12887 Re-do handling of switch statements (for proper block scoping).
12888 * parse.y: Add just a single block for the enture switch block,
12889 but don't create any "case blocks".
12890 (group_of_labels): Rmeoved unneeded non-terminal.
12891 CASE_EXPR and DEFAULT_EXPR are added to current block.
12892 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
12893 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
12894 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
12895 * parse.y (wfl_operator, print_int_node): Make non-static.
12896 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
12897 as part of recursive scan of block.
12898 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
12899 (patch_switch_statement): Most tests move dinto java_complete_tree.
12900
12901 * parse.y: Make various production be non-typed (void).
12902 * parse.y (parse_error): Merged into issue_warning_error_from_context.
12903 * parse.y (add_stmt_to_compound): Don't create/change extra node.
12904 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
12905
12906 * jcf-write.c (struct jcf_handler): New type.
12907 (struct jcf_switch_state): New type.
12908 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
12909 (alloc_handler, emit_unop, emit_reloc): New functions.
12910 (adjust_typed_op): Add extra parameter ("max type" offset).
12911 (emit_switch_reloc, emit_case-reloc): New function.
12912 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
12913 (generate_bytecode_insns): Support REAL_CST, switch statements,
12914 exception handling, method calls, object/array creation, and more.
12915
12916 * class.c: Remove some unused variables.
12917 * constants.c (find_string_constant): New function.
12918 (count_constant_pool_bytes): Fix to correctly handle wide constants.
12919 * decl.c (complete_start_java_method): Don't _Jv_InitClass
12920 if flag_emit_class_files.
12921
12922 1998-11-12 Tom Tromey <tromey@cygnus.com>
12923
12924 * jcf-io.c (find_class): Added explanatory comment.
12925
12926 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
12927 trailing slash to `.zip' entries.
12928
12929 * jvspec.c (lang_specific_driver): Correctly handle case where
12930 GC_NAME not defined.
12931
12932 1998-11-11 Tom Tromey <tromey@cygnus.com>
12933
12934 * jvspec.c (GC_NAME): New define.
12935 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
12936 if required.
12937 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
12938
12939 1998-11-11 Per Bothner <bothner@cygnus.com>
12940
12941 * jcf-dump.c (TABLE_SWITCH): Fix typos.
12942
12943 1998-11-11 Tom Tromey <tromey@cygnus.com>
12944
12945 * jcf-dump.c (main): Correctly recognize `--'-style long options.
12946
12947 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12948
12949 * class.c (is_compiled_class): Call safe_layout_class for class
12950 compiled from source.
12951 * conver.h (convert_to_integer, convert_to_real,
12952 convert_to_pointer): Added prototypes.
12953 * decl.c (init_decl_processing): Non longer push the decls of
12954 `methodtable', `constants', `Class', `Field', `dispatchTable'
12955 `jexception' and `Method'.
12956 * expr.c (build_invokeinterface): New function.
12957 (expand_invoke): static variable CLASS_IDENT now in
12958 build_invokeinterface. Use build_invokeinterface.
12959 (expand_java_field_op): Moved code to inline
12960 java.lang.PRIMTYPE.TYPE into a function.
12961 (build_primtype_type_ref): New function.
12962 * java-tree.def (INSTANCEOF_EXPR): New tree code.
12963 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
12964 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
12965 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
12966 (DECL_LOCAL_STATIC_VALUE): New macro.
12967 (build_invokeinterface, build_primtype_type_ref): New function
12968 prototypes.
12969 (java_parse_abort_on_error): Macro rewritten.
12970 * jcf-parse.c (current_method): Add comment to declaration.
12971 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
12972 Function prototypes fixed.
12973 (jcf_parse_source): push/pop parser context. save/restore global.
12974 (parse_source_file): Fixed leading comment. Now take a
12975 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
12976 classes and pop the parser context anymore.
12977 (yyparse): Push parser context, save globals, parse the source
12978 file, restore globals and pop the parser context when processing a
12979 source file.
12980 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
12981 * lex.c (java_parse_doc_section): New function.
12982 (java_lex): Call java_parse_doc_section when appropriate. Build an
12983 operator around INSTANCEOF_TK.
12984 * lex.h (java_lineterminator, java_sprint_unicode,
12985 java_unicode_2_utf8, java_lex_error, java_store_unicode):
12986 Prototypes rewritten.
12987 (java_parse_escape_sequence, java_letter_or_digit_p,
12988 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
12989 java_read_unicode, java_store_unicode, java_read_char,
12990 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
12991 Added function prototypes.
12992 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
12993 define.
12994 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
12995 New macros
12996 (struct parser_ctxt): New fields: deprecated,
12997 current_parsed_class_un, gclass_list.
12998 (fix_method_argument_names, issue_warning_error_from_context,
12999 resolve_package, lookup_package_type): New function prototypes.
13000 (resolve_expression_name): Fixed function prototype.
13001 (find_applicable_accessible_methods_list): Fixed indentation, added
13002 extra argument in prototype.
13003 (check_final_assignment, build_null_of_type, check_deprecation,
13004 check_method_redefinition, reset_method_name,
13005 java_check_regular_methods, java_check_abstract_methods,
13006 maybe_build_primttype_type_ref): New function prototype.
13007 * parse.y (conver.h): Include.
13008 (INSTANCEOF_TK): Tagged <operator>.
13009 (single_type_import_declaration): Use REGISTER_IMPORT macro.
13010 (relational_expression:): Build binop for instanceof.
13011 (java_push_parser_context): Remember ctxp->gclass_list across
13012 contexts.
13013 (java_pop_parser_context): Simply return if no context
13014 exists. Remember gclass_list across contexts.
13015 (issue_warning_error_from_context): New function.
13016 (parse_error_context): Don't setup ctxp->elc here. Call
13017 issue_warning_error_from_context instead.
13018 (parse_warning_context): Likewise.
13019 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
13020 setup. Link new class/interface to ctxp->gclass_list.
13021 (add_superinterfaces): Register interface as incomplete if not
13022 loaded.
13023 (create_class): Remember class unqualified name in
13024 ctxp->current_parsed_class_un. Check class deprecation.
13025 (register_fields): Check field deprecation. Remember static final
13026 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
13027 processing INIT.
13028 (method_header): New local variable ORIG_ARG. Use unqualified
13029 current class name for check on constructor errors. Promote return
13030 type if of record type. Argument list fix moved in
13031 fix_method_argument_names, called here. Check method deprecation.
13032 (fix_method_argument_names): New function.
13033 (method_declarator): Promote record typed arguments.
13034 (safe_layout_class): Check class methods before layout.
13035 (java_complete_class): Compute field layout when patched.
13036 (do_resolve_class): Try to load class after having it renamed
13037 after the package name.
13038 (get_printable_method_name): Use DECL_CONTEXT.
13039 (reset_method_name): New function.
13040 (check_method_redefinition): Use reset_method_name.
13041 (java_check_regular_methods): New local variable
13042 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
13043 names for error report. Check for compile-time error when method
13044 found has default (package) access.
13045 (java_check_abstract_methods): Now takes an interface DECL node as
13046 an argument. Also reinstall real name on unchecked
13047 overriding/hiding methods for error report.
13048 (java_check_methods): Fixed leading comment. Get classes to verify
13049 from ctxp->gclass_list. Use CHECK_METHODS macro and set
13050 CLASS_METHOD_CHECKED_P on class verification.
13051 (lookup_java_method2): Get real method name if necessary.
13052 (find_in_imports): Don't check package class access here.
13053 (resolve_package, lookup_package_type): New functions.
13054 (java_layout_classes): Fixed leading comment. Take classes to be
13055 laid out from ctxp->gclass_list.
13056 (java_complete_expand_methods): Don't expand native and abstract
13057 methods.
13058 (java_expand_classes): New function.
13059 (resolve_expression_name): Use additional argument ORIG. Retrieve
13060 values of static final field of primitive types.
13061 (resolve_field_access): Handles static final field of promotive
13062 type.
13063 (resolve_qualified_expression_name): Handle STRING_CST as
13064 primaries and package name resolution. Check deprecation on found
13065 decls. Set where_found and type_found on non static field resolved
13066 during qualification. Layout non primitive field decl types.
13067 (check_deprecation): New function.
13068 (maybe_access_field): Simplified.
13069 (patch_method_invocation_stmt): Local variable CLASS_TYPE
13070 removed. Reverse method's argument when primary is a type. Don't
13071 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
13072 instead. Include abstract class in the list of class searchable
13073 for constructors. Use DECL_CONTEXT of found method for access
13074 checks. Check method deprecation.
13075 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
13076 converting arguments. Handle INVOKE_INTERFACE.
13077 (lookup_method_invoke): Search constructor using existing
13078 infrastructure (don't rely on lookup_java_constructor anymore).
13079 (find_applicable_accessible_methods_list): Extra argument flag
13080 LC. Now include constructor in the search.
13081 (qualify_ambiguous_name): Conditional expression are primaries.
13082 (not_initialized_as_it_should_p): static final are always
13083 initialized.
13084 (java_complete_tree): Pass extra NULL argument to
13085 resolve_expression_name. Stricter test to carry on patching
13086 assignments. New case for INSTANCEOF_EXPR.
13087 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
13088 (check_final_assignment, maybe_build_primttype_type_ref): New
13089 functions.
13090 (patch_assignment): Detect resolved static finals and carry normal
13091 assignment error check on them. Inline PRIMTYPE.TYPE read access.
13092 (try_builtin_assignconv): Access constant 0 on all primitive
13093 types.
13094 (valid_builtin_assignconv_identity_widening_p): Accept identical
13095 types. Accept all promoted type on int type.
13096 (valid_ref_assignconv_cast_p): Accept a null pointer to be
13097 assigned to a reference.
13098 (valid_method_invocation_conversion_p): Accept to check null
13099 pointers.
13100 (build_binop): Merge declaration and initialization of local
13101 variable BINOP.
13102 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
13103 numeric types. Improved validity test for qualify operators on
13104 references.
13105 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
13106 and PREINCREMENT_EXPR. Also detect resolved static finals of a
13107 primitive type and issue the appropriate error message.
13108 (resolve_type_during_patch): Mark class loaded when resolved.
13109 (patch_cast): Allow null to be cased to reference types.
13110 (build_null_of_type): New function.
13111 (patch_array_ref): Handle array on references correctly.
13112 (patch_return): Removed unused local variable MODIFY. Force
13113 boolean to be returned as integers. Allows null to be returned by
13114 a function returning a reference.
13115 * typeck.c (convert_to_integer, convert_to_real,
13116 convert_to_pointer): Prototypes moved to convert.h
13117 (lookup_argument_method): Use method real name, if necessary.
13118
13119 1998-10-30 Tom Tromey <tromey@cygnus.com>
13120
13121 * class.c (build_class_ref): Changed name of primitive classes to
13122 start with `_Jv_'.
13123
13124 * class.c (make_class_data): Renamed fields: nmethods to
13125 method_count, method_count to dtable_method_count. Always set
13126 `state' field to 0.
13127 * decl.c (init_decl_processing): Likewise.
13128
13129 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13130
13131 * class.c (layout_class): Don't mangle <finit>, produce
13132 __finit<class> instead. Don't verify artificial methods.
13133 * decl.c (finit_identifier_node): New declared global.
13134 (init_decl_processing): finit_identifier_node initialized.
13135 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
13136 * java-tree.h (finit_identifier_node): Declared as extern.
13137 (struct lang_decl): New field called_constructor.
13138 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
13139 (CLASS_HAS_FINIT_P): New macro.
13140 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
13141 explicit constructor invocation.
13142 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
13143 CALL_SUPER_CONSTRUCTOR_P): New macros.
13144 (write_classfile): Added prototype.
13145 * jcf-parse.c (jcf_parse_source): Parse and remember for
13146 generation if the file was seen on the command line.
13147 (parse_source_file): Don't write the class file here.
13148 (yyparse): Loop on files rewritten. Set current_jcf.
13149 (parse_zip_file_entries): Parse class file only if it was found.
13150 * lang.c (init_parse): Don't open command line provided filename
13151 here.
13152 (lang_parse): Don't set main_jcf anymore.
13153 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
13154 (JCONSTRUCTOR_CHECK): New macro.
13155 (JBSC_TYPE_P): New macro.
13156 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
13157 (COMPLETE_CHECK_OP_2): New macro.
13158 (struct parse_ctxt): New field explicit_constructor_p.
13159 (check_class_interface_creation): Fixed prototype indentation.
13160 (patch_method_invocation_stmt): Prototype reflects added argument.
13161 (patch_invoke): Likewise.
13162 (complete_method_declaration, build_super_invocation,
13163 verify_constructor_circularity,
13164 build_this_super_qualified_invocation, get_printable_method_name,
13165 patch_conditional_expr, maybe_generate_finit, fix_constructors,
13166 verify_constructor_super, create_artificial_method,
13167 start_artificial_method_body, end_artificial_method_body,
13168 generate_field_initialization_code): New function prototypes.
13169 * parse.y: Fixed leading comment
13170 (constructor_header:, constructor_body:, block_end:): Rules tagged
13171 <node>.
13172 (type_declaration:): Call maybe_generate_finit.
13173 (method_declaration:): Action for method_body: placed in new
13174 function complete_method_declaration, called here.
13175 (constructor_declaration:): Defined actions. Removed leading
13176 FIXME.
13177 (constructor_header:): New rule with action.
13178 (constructor_body:): Rule rewritten using block_begin: and
13179 block_end:. Defined actions.
13180 (constructor_declarator:, explicit_constructor_invocation:):
13181 Defined actions.
13182 (block:): Use new rules block_begin: block_end:.
13183 (block_begin:, block_end:): New rules and actions.
13184 (block_statements:): Fixed error message for explicit
13185 constructors.
13186 (method_invocation:): Call build_this_super_qualified_invocation
13187 if primary is `this' or `super' was seen.
13188 (conditional_expression:): Action defined.
13189 (extra_ctxp_pushed_p): New static global flag.
13190 (java_parser_context_save_global): Create parser context if
13191 necessary. Use extra_ctxp_pushed_p to remember it.
13192 (java_parser_context_restore_global): Pop extra parser context if
13193 one exists.
13194 (build_array_from_name): Array on primitive types are marked
13195 loaded.
13196 (register_fields): Restore new name in field initializer
13197 expression if type was altered. Non static fields initialized upon
13198 declaration marked initialized.
13199 (maybe_generate_finit): New function.
13200 (maybe_generate_clinit): Use create_artificial_method,
13201 start_artificial_method_body, end_artificial_method_body. Generate
13202 debug info for enclosed initialization statements.
13203 (method_header): Fixed leading comment. Check constructor
13204 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
13205 accordingly.
13206 (complete_method_declaration, constructor_circularity_msg,
13207 verify_constructor_circularity): New functions.
13208 (get_printable_method_name): New function.
13209 (check_method_redefinition): Don't rename <finit> methods. Fix
13210 declared constructor names. Error message for
13211 constructors modified.
13212 (java_check_regular_methods): Local variable seen_constructor
13213 renamed saw_constructor. Skip verification on constructors. Create
13214 default constructor with create_artificial_method.
13215 (java_check_methods): Removed unnecessary empty line.
13216 (create_artificial_method, start_artificial_method_body,
13217 end_artificial_method_body): New functions.
13218 (java_layout_classes): Changed leading comment. Reverse fields
13219 list if necessary. Always layout java.lang.Object if being
13220 defined.
13221 (java_complete_expand_methods): Verify constructor circularity.
13222 (java_complete_expand_method): Call fix_constructor on
13223 constructors. Local variable no_ac_found removed. Restore
13224 bindings if method body expansion failed.
13225 (fix_constructors, verify_constructor_super,
13226 generate_field_initialization_code): New function.
13227 (java_expand_classes): Fixed leading comment. Write class file
13228 here.
13229 (resolve_expression_name): Check for illegal instance variable
13230 usage within the argument scope of an explicit constructor
13231 invocation.
13232 (resolve_qualified_expression_name): Pass extra from_super flag
13233 when invoking patch_method_invocation_stmt. New case for
13234 conditional expression when used as a primary. Check for error
13235 when acquiring super.
13236 (patch_method_invocation_stmt): Added extra argument super. New
13237 local variable is_static_flag. Set class_to_search according to
13238 the nature of the constructor invocation. Don't add `this'
13239 argument when expanding NEW_CLASS_EXPR. Check for illegal method
13240 invocation within the argument scope of explicit constructor
13241 invocation. Set is_static according to is_static_flag. Provide
13242 extra `super' argument to patch_invoke invocation.
13243 (patch_invoke): New argument from_super. Loop on arguments
13244 indentation fixed. Pass from_super to invocation_mode. New switch
13245 case INVOKE_SUPER. Fixed error message in switch default case.
13246 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
13247 value.
13248 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
13249 (lookup_method_invoke): Fixed prototypes in candidates list. Error
13250 message takes constructors into account.
13251 (find_applicable_accessible_methods_list): Fixed indentation.
13252 (qualify_ambiguous_name): Take explicit constructor invocation
13253 into account. Deal with a conditional expression as a primary to
13254 a method call.
13255 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
13256 case. Added extra argument to patch_method_invocation_stmt.
13257 Register calls made to explicit constructor `this'. Don't call
13258 save_expr in ARRAY_REF case when emitting class files. Check for
13259 illegal use of this when expanding explicit constructor invocation
13260 arguments.
13261 (complete_function_arguments): Set and reset parser context
13262 explicit_constructor_p field value when appropriate.
13263 (build_super_invocation, build_this_super_qualified_invocation):
13264 New functions.
13265 (patch_assignment): Fixed typo.
13266 (patch_unaryop): Check on final fields occurs only when a decl
13267 exits.
13268 (patch_return): Take constructors into account.
13269 (patch_conditional_expr): New function.
13270 * typeck.c (build_java_signature): Removed unnecessary empty line.
13271
13272 1998-10-28 Jeffrey A Law (law@cygnus.com)
13273
13274 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
13275
13276 1998-10-28 Tom Tromey <tromey@cygnus.com>
13277
13278 * decl.c (init_decl_processing): Renamed fields.
13279 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
13280 interface_len, msize fields.
13281
13282 * class.c (make_class_data): Removed subclass_head and
13283 subclass_next fields.
13284 * decl.c (init_decl_processing): Removed subclass_head and
13285 subclass_next fields.
13286
13287 1998-10-28 Jeffrey A Law (law@cygnus.com)
13288
13289 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
13290 * mangle.c (emit_unicode_mangled_name): Similarly.
13291
13292 1998-10-26 Nick Clifton <nickc@cygnus.com>
13293
13294 * jcf-parse.c (get_constant): Place braces around code to compute
13295 'd' when REAL_ARITHMETIC is not defined.
13296
13297 1998-10-25 H.J. Lu (hjl@gnu.org)
13298
13299 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
13300 dependency.
13301
13302 1998-10-23 Tom Tromey <tromey@cygnus.com>
13303
13304 * lang-specs.h: `.zip' files are input to jc1.
13305
13306 1998-10-22 Per Bothner <bothner@cygnus.com>
13307
13308 * jvspecs.c: Add (but don't enable) support for combining multiple
13309 .class and .java input filenames to a single jc1 invocation.
13310 Add support for -C flag (copile to .class files).
13311 Translate -classpath and -CLASSPATH arguments.
13312 * lang-specs.h: Don't set %2 spec.
13313
13314 1998-10-22 Tom Tromey <tromey@cygnus.com>
13315
13316 * jcf-path.c (add_entry): Don't add trailing separator if entry is
13317 a .zip file.
13318 (add_path): Don't add trailing separator to non-empty path
13319 elements.
13320
13321 * lang.c (lang_decode_option): Check for -fclasspath and
13322 -fCLASSPATH before examining other `-f' options.
13323
13324 * java-tree.h (finalize_identifier_node): Don't declare.
13325 * class.c (make_class_data): Don't push "final" field.
13326 * decl.c (init_decl_processing): Don't push "final" field.
13327 (finalize_identifier_node): Removed.
13328 (init_decl_processing): Don't set finalize_identifier_node.
13329
13330 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
13331
13332 1998-10-11 Anthony Green <green@cygnus.com>
13333
13334 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
13335 (JV_SCAN_SOURCES): New macro.
13336 (JCF_DUMP_SOURCES): Likewise.
13337 (jcf-dump$(exeext)): New target.
13338 (jv-scan$(exeext)): New target.
13339
13340 1998-10-22 Tom Tromey <tromey@cygnus.com>
13341
13342 * Makefile.in (LEX): Removed.
13343 (LEXFLAGS): Likewise.
13344 (SET_BISON): New macro.
13345 (BISON): Removed.
13346 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
13347 spurious diffs in parse.c.
13348 ($(PARSE_SCAN_C)): Likewise.
13349 (PARSE_DIR): New macro.
13350 (PARSE_C): Use it.
13351 (PARSE_SCAN_C): Likewise.
13352 (PARSE_RELDIR): New macro.
13353
13354 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
13355
13356 * jcf-io.c (find_class): Use saw_java_source to determine when to
13357 look for `.java' file.
13358 * jcf-parse.c (saw_java_source): New global.
13359 (yyparse): Set it if `.java' file seen.
13360
13361 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
13362 (GCJH_SOURCES): Likewise.
13363 * Makefile.in (datadir): New macro.
13364 (libjava_zip): Likewise.
13365 (JAVA_OBJS): Added jcf-path.o.
13366 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13367 (../gcjh$(exeext)): Likewise.
13368 (jcf-path.o): New target.
13369 * java-tree.h (fix_classpath): Removed decl.
13370 * jcf-parse.c (fix_classpath): Removed.
13371 (load_class): Don't call fix_classpath.
13372 * parse.y (read_import_dir): Don't call fix_classpath.
13373 * lex.h: Don't mention classpath.
13374 * lex.c (java_init_lex): Don't initialize classpath.
13375 * jcf-io.c (classpath): Removed global.
13376 (find_class): Use jcf_path iteration functions. Correctly search
13377 class path for .java file.
13378 (open_in_zip): New argument `is_system'.
13379 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
13380 classpath-related options.
13381 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
13382 and -I.
13383 (lang_init): Call jcf_path_init.
13384 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
13385 * lang-specs.h: Handle -I. Minor cleanup to -M options.
13386 Correctly put braces around second string in each entry.
13387 * gjavah.c (main): Call jcf_path_init. Recognize all the new
13388 classpath-related options.
13389 (help): Updated for new options.
13390 * jcf.h: Declare functions from jcf-path.c. Don't mention
13391 `classpath' global.
13392 * jcf-path.c: New file.
13393
13394 * jcf-depend.c: Include jcf.h.
13395
13396 * jcf-write.c (localvar_alloc): Returns `void'.
13397 (localvar_free): Removed unused variable.
13398
13399 * lang.c (OBJECT_SUFFIX): Define if not already defined.
13400 (init_parse): Use OBJECT_SUFFIX, not ".o".
13401
13402 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13403
13404 * class.c (emit_register_classes): Renamed from
13405 emit_register_class.
13406 * java-tree.h (emit_register_classes): Prototype renamed from
13407 emit_register_class.
13408 * jcf-parse.c (yyparse): Call emit_register_classes once before
13409 returning.
13410 * parse.y (java_expand_classes): No longer register classes.
13411
13412 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13413
13414 * class.c (is_compiled_class): New local variable
13415 seen_in_zip. Identify classes found in currently compiled source
13416 file(s).
13417 * decl.c (complete_start_java_method): Fixed typo.
13418 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
13419 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
13420 (CLASS_P): Moved around.
13421 (java_parse_abort_on_error): Macro moved from jcf-parse.c
13422 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
13423 java-parse.h
13424 (jcf_parse_source): Changed leading comment. Removed unnecessary
13425 fclose and CLASS_FROM_SOURCE_P marking.
13426 (parse_source_file): New local variables remember_for_generation
13427 and filename. Mark parsed file name identifier node. Removed block
13428 executed when parse_only was null. Set remember_for_generation.
13429 Use it as an argument to java_pop_parser_context.
13430 (yyparse): New local variables several_files, list, next node and
13431 current_file_list. Split ampersand separated file names into
13432 current_file_list. Iterate through the list and parse accordingly.
13433 * parse.h (java_pop_parser_context): New function prototype.
13434 * parse.y (ctxp_for_generation): New static global variable.
13435 (java_pop_parser_context): New argument generate. Link popped ctxp
13436 to ctxp_for_generation list accordingly.
13437 (java_complete_expand_methods): Fixed indentation.
13438 (java_expand_classes): New function.
13439
13440 1998-10-17 Per Bothner <bothner@cygnus.com>
13441
13442 * Makefile.in: Link with libiberty.a instead of memmove.o.
13443
13444 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
13445
13446 * lex.c (setjmp.h): No longer included.
13447 * lex.h (setjmp.h): Included.
13448 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
13449 (duplicate_declaration_error_p): Renamed from
13450 duplicate_declaration_error.
13451 (build_array_from_name): New function prototype.
13452 * parse.y (setjmp.h): No longer included.
13453 (variable_declarator_id): Define action.
13454 (build_array_from_name): New function.
13455 (duplicate_declaration_error_p): Renamed from
13456 duplicate_declaration_error. Fixed leading comment.
13457 (register_fields): Main `for' loop reorganized. Uses
13458 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
13459 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
13460 build_array_from_name.
13461 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
13462 types.
13463 (read_import_dir): Don't try to skip `.' and `..'.
13464 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
13465 build_array_from_name. Main `for' loop reorganized.
13466 (resolve_qualified_expression_name): When building access to a
13467 field, use the type where the field was found, not its own type.
13468 (maybe_access_field): Use field DECL_CONTEXT if the type where the
13469 field was found is null.
13470 (qualify_ambiguous_name): Sweep through all successive array
13471 dimensions.
13472
13473 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13474
13475 * java-tree.h (pop_labeled_block, lang_printable_name,
13476 maybe_add_interface, set_super_info, get_access_flags_from_decl,
13477 interface_of_p, inherits_from_p, fix_classpath,
13478 complete_start_java_method, emit_handlers, init_outgoing_cpool,
13479 make_class_data, register_class, alloc_name_constant): New
13480 function prototypes.
13481 * lang.c (lang_decode_option): Set argc argument unused. Fixed
13482 indentation. Added cast to remove warning.
13483 (lang_printable_name): Set v argument unused.
13484 (lang_print_error): Added argument to lang_printable_name call.
13485 (java_dummy_print, print_lang_decl, print_lang_type,
13486 print_lang_identifier, lang_print_xnode): All argument marked
13487 unused.
13488 * lex.c (java_unget_unicode): Removed unnecessary argument.
13489 (java_allocate_new_line): Unused local variable is gone.
13490 (java_read_char): Added parenthesis in expressions to remove
13491 warnings. Added final return statement.
13492 (java_read_unicode): Added parenthesis in expression to remove
13493 warning.
13494 (java_parse_end_comment): Fixed java_unget_unicode invocation.
13495 (java_parse_escape_sequence): Likewise.
13496 (java_lex): Unused local variables are gone. Fixed
13497 java_unget_unicode invocation.
13498 * lex.h (set_float_handler): Prototype added when JC1_LITE not
13499 defined.
13500 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
13501 lang_printable_name invocation in macro.
13502 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
13503 Likewise.
13504 (duplicate_declaration_error): Suppressed unused argument in
13505 prototype.
13506 (identical_subpath_p): Function declaration is gone.
13507 (patch_invoke): Suppressed unused argument in prototype.
13508 (patch_cast, build_labeled_block, check_thrown_exceptions):
13509 Likewise.
13510 * parse.y (setjmp.h): Included
13511 (toplev.h): Likewise.
13512 (field_declaration:): Suppressed unused local
13513 (label_decl:): Fixed build_labeled_block invocation.
13514 (java_pop_parser_context): Put extra parenthesis around assignment
13515 in if.
13516 (yyerror): Suppressed unused local variables.
13517 (variable_redefinition_error): Fixed lang_printable_name
13518 invocation.
13519 (create_interface): Suppressed unused local variables.
13520 (create_class): Likewise.
13521 (duplicate_declaration_error): Suppressed unused argument. Fixed
13522 lang_printable_name invocation.
13523 (register_fields): Suppressed unused local variable. Fixed
13524 duplicate_declaration_error invocation.
13525 (method_header): Suppressed unused local variable.
13526 (method_declarator, parser_check_super): Likewise.
13527 (java_complete_class): Suppressed unused local variable. Fixed
13528 fatal error message.
13529 (complete_class_report_errors): Added default: in switch.
13530 (java_check_regular_methods): Fixed lang_printable_name
13531 invocations.
13532 (check_throws_clauses): Likewise.
13533 (java_check_abstract_methods): Suppressed unused local
13534 variable. Fixed lang_printable_name invocation.
13535 (read_import_entry): Added supplemental return statement.
13536 (read_import_dir): Suppressed unused local variables.
13537 (check_pkg_class_access, declare_local_variables): Likewise.
13538 (source_start_java_method): Suppressed unused extern variable
13539 declarations
13540 (expand_start_java_method): Suppressed unused extern and local
13541 variable declarations.
13542 (java_complete_expand_methods): Likewise.
13543 (java_complete_expand_method): Suppressed unused local variables.
13544 (make_qualified_name): Likewise.
13545 (resolve_qualified_expression_name): Added default: in
13546 switch. Fixed lang_printable_name invocation.
13547 (class_instance_creation_expression): Added parenthesis around
13548 expressions.
13549 (patch_method_invocation_stmt): Fixed lang_printable_name and
13550 patch_invoke invocations.
13551 (check_for_static_method_reference): Fixed lang_printable_name
13552 invocation.
13553 (patch_invoke): Suppressed unused arguments and local variables.
13554 (lookup_method_invoke): Suppressed unused local variables.
13555 (qualify_ambiguous_name): Added default: in switch.
13556 (identical_subpath_p): Function removed.
13557 (patch_assignment): Suppressed unused local variables. Suppressed
13558 unnecessary if statement. Fixed lang_printable_name invocations.
13559 (try_builtin_assignconv): Fixed lang_printable_name invocations.
13560 (valid_ref_assignconv_cast_p): Parenthesis around
13561 expression. Suppressed unused local variables.
13562 (build_binop): Suppressed unused local variables. fixed
13563 lang_printable_name invocations.
13564 (string_constant_concatenation): Suppressed unused local
13565 variables.
13566 (patch_unaryop): Fixed lang_printable_name invocation.
13567 (patch_cast): Suppressed unnecessary argument. Fixed
13568 lang_printable_name invocation.
13569 (patch_array_ref): Fixed lang_printable_name invocation.
13570 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
13571 (build_labeled_block): Suppressed unused argument.
13572 (generate_labeled_block): Fixed build_labeled_block invocation.
13573 (build_loop_body): Suppressed unused local variables.
13574 (patch_loop_statement): Likewise.
13575 (patch_exit): Fixed lang_printable_name invocation.
13576 (patch_switch_statement): Likewise.
13577 (case_identity): First argument marked unused.
13578 (patch_try_statement): Fixed lang_printable_name invocations.
13579 (patch_synchronized_statement, patch_throw_statement): Likewise.
13580 (check_thrown_exceptions): Fixed check_thrown_exceptions and
13581 lang_printable_name invocations.
13582 (check_thrown_exceptions_do): Suppressed unused argument.
13583
13584 1998-10-14 Tom Tromey <tromey@cygnus.com>
13585
13586 * jcf-write.c (write_classfile): Add output class file as target.
13587 * lang-options.h: Added -MD, -MMD, -M, and -MM.
13588 * jcf.h: Added declarations for dependency-tracking functions.
13589 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
13590 * lang.c (lang_decode_option): Recognize -MD and -MMD.
13591 (finish_parse): Call jcf_dependency_write.
13592 (dependency_tracking): New global.
13593 (DEPEND_SET_FILE): New define.
13594 (DEPEND_ENABLE): New define.
13595 (init_parse): Enable dependency tracking if required.
13596 Include "flags.h".
13597 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
13598 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
13599 (../gcjh$(exeext)): Likewise.
13600 (jcf-depend.o): New target.
13601 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
13602 (GCJH_SOURCES): Likewise.
13603 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
13604 dep_name argument.
13605 (find_classfile): Added dep_name argument.
13606 (find_class): Compute name of dependency.
13607 (open_in_zip): Call jcf_dependency_add_file.
13608 * gjavah.c (output_file): No longer global.
13609 (usage): Don't mention "gjavah".
13610 (help): Likewise.
13611 (java_no_argument): Likewise.
13612 (version): Likewise.
13613 (main): Recognize and handle -M family of options.
13614 (print_mangled_classname): Return is void.
13615 (process_file): Handle case where output is suppressed.
13616 (HANDLE_END_FIELD): Likewise.
13617 (HANDLE_METHOD): Likewise.
13618 * jcf-depend.c: New file.
13619
13620 1998-10-13 Jeffrey A Law (law@cygnus.com)
13621
13622 * java-tree.def: Add missing newline at EOF.
13623
13624 1998-10-13 Tom Tromey <tromey@cygnus.com>
13625
13626 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
13627 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
13628 function.
13629 Include <config.h> and "system.h".
13630 (disassemble_method): Undefine RET to avoid clash with
13631 config/i386/i386.h.
13632
13633 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13634
13635 * decl.c (runtime_exception_type_node, error_exception_type_node):
13636 New global variables.
13637 (init_decl_processing): Initialized.
13638 * expr.c (java_lang_expand_expr): Set caught exception type to
13639 null if catch handler argument doesn't exit.
13640 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
13641 tree codes.
13642 * java-tree.h (runtime_exception_type_node,
13643 error_exception_type_node): Global variables declared.
13644 (DECL_FUNCTION_THROWS): New macro.
13645 (DECL_FUNCTION_BODY): Modified comment.
13646 (DECL_SPECIFIC_COUNT): Likewise.
13647 (struct lang_decl): New field throws_list.
13648 (IS_UNCHECKED_EXPRESSION_P): New macro.
13649 * lex.c (java_lex): Generate location information for THROW_TK.
13650 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
13651 EXCEPTIONS_P): New macros.
13652 (enum jdep_code): New value JDEP_EXCEPTION.
13653 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
13654 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
13655 PATCH_METHOD_RETURN_ERROR): New macros.
13656 (patch_method_invocation_stmt): Added new argument to prototype.
13657 (patch_synchronized_statement, patch_throw_statement,
13658 check_thrown_exceptions, check_thrown_exceptions_do,
13659 purge_unchecked_exceptions, check_throws_clauses): New function
13660 prototypes.
13661 * parse.y Fixed typo in keyword section.
13662 (throw:): Rule tagged <node>.
13663 (THROW_TK): Keyword tagged <operator>.
13664 (method_header:): Last argument to call to method_header passed
13665 from throws: rule.
13666 (throws:, class_type_list:, throw_statement:,
13667 synchronized_statement:, synchronized:): Defined actions.
13668 (method_header): New local variable current. Register exceptions
13669 from throws clause.
13670 (java_complete_tree): Complete and verify exceptions from throws
13671 clause.
13672 (complete_class_report_errors): Error message on exceptions not
13673 found
13674 (java_check_regular_methods): Fixed typo. Shortcut on private
13675 overriding methods. Changed error message on method
13676 redefinition. Check for throws clause compatibility.
13677 (check_throws_clauses): New function.
13678 (java_check_abstract_methods): Use DECL_NAME for wfl or current
13679 method. Changed error message on method redefinition.
13680 (currently_caught_type_list): New static variable.
13681 (java_complete_expand_methods): Purge unchecked exceptions from
13682 throws clause list. Call PUSH_EXCEPTIONS before walk and
13683 POP_EXCEPTIONS after.
13684 (resolve_qualified_expression_name): Pass new argument as NULL to
13685 patch_method_invocation_stmt.
13686 (patch_method_invocation_stmt): New argument ref_decl. Invoke
13687 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
13688 argument list when appropriate. Use new argument if non null to
13689 store selected method decl.
13690 (patch_invoke): Convert if necessary args of builtin types before
13691 forming CALL_EXPR. Argument list no longer reversed here.
13692 (invocation_mode): Treat final methods as static methods.
13693 (java_complete_tree): New cases for THROW_EXPR: and
13694 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
13695 function call.
13696 (complete_function_arguments): No more RECORD_TYPE
13697 conversion. Function parameter nodes no longer saved.
13698 (valid_ref_assignconv_cast_p): Avoid handling null type.
13699 (patch_binop): Fixed null constant reference handling.
13700 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
13701 BUILD_THROW macros.
13702 (patch_try_statement): Fixed comments. Record caught types in
13703 list, push the list, expand try block and pop the list.
13704 (patch_synchronized_statement, patch_throw_statement,
13705 check_thrown_exceptions, check_thrown_exceptions_do,
13706 purge_unchecked_exceptions): New functions.
13707 * typeck.c (lookup_argument_method): Allow WFL in place of method
13708 DECL_NAME during method definition check
13709
13710 1998-10-09 Tom Tromey <tromey@cygnus.com>
13711
13712 * gjavah.c (decode_signature_piece): New function.
13713 (print_c_decl): Use it. Added `name_override' argument.
13714 (print_method_info): Use name_override argument to print_c_decl.
13715 (seen_fields): Removed.
13716 (print_field_info): Don't update seen_fields.
13717 (struct method_name): New structure.
13718 (method_name_list): New global.
13719 (print_method_info): Add new method to list of methods.
13720 (name_is_method_p): New function.
13721 (print_field_info): If field name has same name as method, then
13722 change field name.
13723 (process_file): Parse methods before fields.
13724 (field_pass): New global.
13725 (HANDLE_END_FIELD): Take field_pass into account.
13726
13727 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13728
13729 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
13730 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
13731
13732 1998-10-03 Anthony Green <green@cygnus.com>
13733
13734 * jvspec.c: Fix bug in jvgenmain_spec patch.
13735
13736 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13737
13738 * Makefile.in (lang.o:): Install dependency on java-tree.def.
13739 * decl.c (soft_exceptioninfo_call_node): New global variable.
13740 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
13741 takes extra integer argument. soft_exceptioninfo_call_node
13742 initialized.
13743 * except.c (java_set_exception_lang_code): New function
13744 (method_init_exceptions): Called here.
13745 (prepare_eh_table_type): New function.
13746 (expand_end_java_handler): Called here.
13747 * expr.c (build_java_throw_out_of_bounds_exception): Now features
13748 one argument. Modified generation of call to
13749 soft_badarrayindex_node to use new argument.
13750 (build_java_arrayaccess): Pass faulty index value to
13751 build_java_throw_out_of_bounds_exception.
13752 (generate_name): New function.
13753 (java_lang_expand_expr): New local variables node, current,
13754 has_finally_p. Expand TRY_EXPR node.
13755 (process_jvm_instruction): Replace top of the stack with thrown
13756 object reference when entering exception handler.
13757 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
13758 specific tree codes.
13759 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
13760 global.
13761 (DECL_SPECIFIC_COUNT): New macro.
13762 (prepare_eh_table_type, java_set_exception_lang_code,
13763 generate_name): New function declarations.
13764 (match_java_method): Declaration deleted.
13765 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
13766 macros.
13767 * lex.c (TRY_TK, CATCH_TK): Generate location information.
13768 * parse.h (redefinition_error, refine_accessible_methods_list,
13769 can_cast_to_p): Function declaration removed.
13770 (classitf_redefinition_error, variable_redefinition_error,
13771 parse_jdk1_1_error, find_applicable_accessible_methods_list,
13772 find_most_specific_methods_list, argument_types_convertible,
13773 enter_a_block, valid_builtin_assignconv_identity_widening_p,
13774 valid_cast_to_p, valid_method_invocation_conversion_p,
13775 try_reference_assignconv, add_stmt_to_compound,
13776 build_jump_to_finally, build_tree_list, patch_try_statement,
13777 java_get_catch_block): New function declarations.
13778 * parse.y (string_buffer_type): Global variable deleted.
13779 (group_of_labels, catches, catch_clause, catch_clause_parameter,
13780 finally): Rules tagged <node>.
13781 (TRY_TK, CATCH_TK): Token tagged <operator>.
13782 (class_body_declaration:, class_member_declaration:,
13783 formal_parameter:, explicit_constructor_invocation:,
13784 interface_member_declaration:, constant_declaration:,
13785 primary_no_new_array:, class_instance_creation_expression:,
13786 array_creation_expression:): Issue error on unsuported JDK1.1
13787 features.
13788 (try_statement:, catches:, finally:): Define actions.
13789 (catch_clause_parameter): New rule.
13790 (catch_clause:): Use new rule catch_clause_parameter.
13791 (parse_jdk1_1_error): New function.
13792 (redefinition_error): Renamed classitf_redefinition_error.
13793 (variable_redefinition_error): New function.
13794 (check_class_interface_creation): Call
13795 classitf_redefinition_error.
13796 (java_complete_tree): Added error message on JDEP_TYPE: case.
13797 (complete_class_report_errors): Fixed indentation.
13798 (declare_local_variables): Call variable_redefinition_error.
13799 (source_end_java_method): Call java_set_exception_lang_code and
13800 emit_handlers where appropriate.
13801 (java_method_add_stmt): Call add_stmt_to_block.
13802 (add_stmt_to_block): New function.
13803 (lookup_method_invoke): Fixed outside comment. new local variable
13804 candicates. Call find_applicable_accessible_methods_list and
13805 find_most_specific_methods_list when searching for a
13806 method. Modified error report to list possible candidates when
13807 applicable.
13808 (find_applicable_accessible_methods_list,
13809 find_most_specific_methods_list, argument_types_convertible): New
13810 function.
13811 (refine_accessible_methods_list): Function deleted.
13812 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
13813 expr (if applicable) before calling patch_array_ref.
13814 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
13815 (enter_block): Fixed comment.
13816 (enter_a_block): New function.
13817 (patch_assignment): Reorganized. Call try_reference_assignconv for
13818 references. Call valid_cast_to_p instead of can_cast_to_p.
13819 (try_reference_assignconv,
13820 valid_builtin_assignconv_identity_widening_p): New functions.
13821 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
13822 (valid_cast_to_p, valid_method_invocation_conversion_p): New
13823 functions.
13824 (build_string_concatenation): Don't resolve StringBuffer.
13825 (patch_cast): Fixed inverted arguments.
13826 (patch_array_ref): Code to save array expr deleted. Call
13827 valid_cast_to_p instead of can_cast_to_p.
13828 (generate_labeled_block): Call generate_name.
13829 (build_jump_to_finally, build_try_statement, java_get_catch_block,
13830 patch_try_statement): New functions.
13831 * typeck.c (match_java_method): Function deleted.
13832
13833 1998-10-02 Anthony Green <green@cygnus.com>
13834
13835 * jvspec.c: jvgenmain_spec uses different temporary file names.
13836
13837 1998-10-02 Anthony Green <green@cygnus.com>
13838
13839 * jvspec.c (lang_specific_driver): Fail if user specifies
13840 --main= when not linking.
13841
13842 1998-09-28 Tom Tromey <tromey@cygnus.com>
13843
13844 * class.c (make_class_data): Push value for `thread' field.
13845 * decl.c (init_decl_processing): Added `thread' field to class.
13846
13847 * class.c (add_field): Always make static fields externally
13848 visible.
13849
13850 1998-09-26 Anthony Green <green@cygnus.com>
13851
13852 * expr.c (build_java_athrow,
13853 build_java_throw_out_of_bounds_exception, expand_invoke,
13854 build_newarray, expand_java_multianewarray, build_java_monitor):
13855 Update comments to reflect _Jv_* function names.
13856
13857 1998-09-25 Per Bothner <bothner@cygnus.com>
13858
13859 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
13860 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
13861 * parse.y (expand_start_java_method): Likewise.
13862
13863 1998-09-24 Per Bothner <bothner@cygnus.com>
13864
13865 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
13866
13867 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
13868 (add_field): No longer need to convert from RECORD_TYPE to pointer,
13869 * expr.c: Remove no-longer-needed calls to promote_type.
13870 * decl.c (give_name_to_locals): Liekwise.
13871 * jcf-parse.c (get_class_constant): Compensate for new signatures.
13872 * parse.y: Add/remove promote_type calls as appropriate.
13873 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
13874 (parse_signature_string): Likewise.
13875 (build_java_array_type): Fix for now signature convenions.
13876
13877 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
13878
13879 1998-09-23 Tom Tromey <tromey@cygnus.com>
13880
13881 * class.c (init_class_processing): libjava function renamed to
13882 _Jv_RegisterClass.
13883
13884 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
13885
13886 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
13887 * java-tree.def: Fixed DEFTREECODE third argument.
13888 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
13889 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
13890 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
13891 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
13892 JAVA_THIS_EXPR): Now replaced by tree code definitions.
13893 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
13894 * lang.c (java_tree_code_type, java_tree_code_length,
13895 java_tree_code_name): New arrays.
13896 (lang_init): Append Java tree node definitions to Gcc ones.
13897 * lex.c (expression_obstack): Declared as extern when JC1_LITE
13898 defined.
13899 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
13900 wfl_to_string.
13901 (java_lex): Allow declaration of empty string constants. Retain
13902 location information on CASE_TK and DEFAULT_TK.
13903 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
13904 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
13905 Modified to be more robust.
13906 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
13907 (build_new_invocation, try_builtin_assignconv,
13908 patch_switch_statement, string_constant_concatenation,
13909 build_string_concatenation, patch_string_cst, patch_string,
13910 java_expand_switch): New function declarations.
13911 * parse.y: Rules related to switch and EH tagged <node>.
13912 (label_id): Set to NULL_TREE
13913 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
13914 tree nodes.
13915 (this_or_super:): Fixed indentation.
13916 (statement:, statement_nsi:, statement_without_trailing_substatement:,
13917 statement_expression:): Removed call to RULE on all sub-rules.
13918 (switch_expression:, switch_labels:): New rules.
13919 (switch_statement:, switch_block:, switch_block_statement_groups:,
13920 switch_block_statement_group:, switch_labels:, switch_label:):
13921 Defined actions.
13922 (throw_statement:, synchronized_statement:, try_statement:):
13923 Defined temporary actions.
13924 (class_instance_creation_expression:): Call
13925 build_new_invocation. Fixed indentation.
13926 (field_access): Fixed indentation.
13927 (method_invocation): Likewise.
13928 (make_qualified_primary): Use THIS_EXPR.
13929 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
13930 resolving from SUPER, set *type_found.
13931 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
13932 (java_complete_tree): Removed unused local variable `location'. Case
13933 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
13934 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
13935 on MODIFY_EXPR: and all binary operator tree code cases. Removed
13936 STRING_CST: case. default: checks for patchable strings.
13937 (complete_function_arguments): Transform string constant or
13938 crafted StringBuffer if necessary.
13939 (build_method_invocation): Fixed comments.
13940 (build_new_invocation): New function.
13941 (patch_assignment): Call try_builtin_assignconv to figure a valid
13942 assignment conversion between builtin types.
13943 (try_builtin_assignconv): New function.
13944 (build_binop): Use URSHIFT_EXPR directly to call build.
13945 (operator_string): Use UNARY_PLUS_EXPR.
13946 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
13947 operator.
13948 (do_merge_string_cste, merge_string_cste,
13949 string_constant_concatenation, build_string_concatenation,
13950 patch_string, patch_string_cst): New function.
13951 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
13952 (patch_unaryop): Likewise. New test of valid ++/-- operands.
13953 (build_newarray_node): Use NEW_ARRAY_EXPR.
13954 (build_this): Use THIS_EXPR.
13955 (build_return): Enable debug information on return statement.
13956 (build_if_else_statement): Likewise.
13957 (complete_labeled_statement): Fixed related comment.
13958 (build_loop_body): Fixed comment.
13959 (build_bc_statement): Enable debug information on break/continue
13960 statements.
13961 (patch_bc_statement): Fixed typos. Handle SWITCH statement
13962 context.
13963 (patch_switch_statement, case_identity, java_expand_switch): New
13964 functions.
13965
13966 1998-09-21 Per Bothner <bothner@cygnus.com>
13967
13968 * buffer.h (BUFFER_INIT): New macro.
13969 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
13970 Pass (struct jcf_partial *state) to most functions.
13971 (jcf_block, jcf_relocation): New types.
13972 Support labels, branches, conditionals, loops.
13973
13974 1998-09-21 Tom Tromey <tromey@cygnus.com>
13975
13976 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
13977
13978 1998-09-21 Per Bothner <bothner@cygnus.com>
13979
13980 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
13981 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
13982 not integer_type_node (INT_TYPE_SIZ bits).
13983
13984 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
13985
13986 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
13987 * jcf-dump.c (print_exception_table): New function.
13988 (disassemble_method): Better handling of wide instructions.
13989 Make more robust for bad input.
13990
13991 1998-09-30 Jeffrey A Law (law@cygnus.com)
13992
13993 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
13994 FreeBSD.
13995
13996 1998-09-17 Jeffrey A Law (law@cygnus.com)
13997
13998 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
13999
14000 1998-09-17 Tom Tromey <tromey@cygnus.com>
14001
14002 * Makefile.in ($(PARSE_H)): Removed target.
14003
14004 1998-09-17 Jeffrey A Law (law@cygnus.com)
14005
14006 * Makefile.in (JAVA_OBJS): Add memmove.o
14007 (memmove.o): New target & rules.
14008
14009 1998-09-15 Tom Tromey <tromey@cygnus.com>
14010
14011 * expr.c (expand_invoke): Don't generate a call to the class init
14012 code.
14013
14014 1998-09-14 Jeffrey A Law (law@cygnus.com)
14015
14016 * Makefile.in: Add many missing dependencies.
14017 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
14018 as appropriate.
14019 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
14020 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
14021
14022 1998-09-11 Per Bothner <bothner@cygnus.com>
14023
14024 * decl.c (complete_start_java_method): If method is static (and
14025 not private) call _Jv_InitClass.
14026 * expr.c (expand_invoke): Don't call build_class_init.
14027
14028 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
14029
14030 1998-09-10 Jeffrey A Law (law@cygnus.com)
14031
14032 * Make-lang.in (GCJ): Define before using.
14033
14034 1998-09-09 Jeffrey A Law (law@cygnus.com)
14035
14036 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
14037 losing due to namespace pollution in GNU getopt.h
14038
14039 1998-09-09 Tom Tromey <tromey@cygnus.com>
14040
14041 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
14042 (java.all.cross): Likewise.
14043 (java.rest.encap): Likewise.
14044
14045 1998-09-08 Jeffrey A Law (law@cygnus.com)
14046
14047 * gjavah.c (print_class_decls): Fix thinko in arglist
14048 * jcv-io.c (find_classfile): Similarly.
14049
14050 1998-09-07 Jeffrey A Law (law@cygnus.com)
14051
14052 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
14053
14054 1998-09-05 Tom Tromey <tromey@cygnus.com>
14055
14056 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
14057 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
14058 * Makefile.in (PARSE_C): New macro.
14059 (PARSE_H): Likewise.
14060 (PARSE_SCAN_C): Likewise.
14061 ($(PARSE_C)): Target renamed from parse.c.
14062 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
14063 (clean): Remove parse-scan.c as well.
14064 (parse.o): Depend on $(PARSE_C).
14065
14066 1998-09-05 Anthony Green <green@cygnus.com>
14067
14068 * README, license.terms: Removed.
14069
14070 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
14071 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
14072 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
14073 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
14074 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
14075 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
14076 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
14077 and Java trademark attribution.
14078
14079 1998-09-04 Tom Tromey <tromey@cygnus.com>
14080
14081 * Makefile.in: Use gcjh, not gjavah.
14082 * config-lang.in (stagestuff): Use gcjh, not gjavah.
14083 * Make-lang.in: Changed gjavah to gcjh everywhere.
14084
14085 1998-09-03 Per Bothner <bothner@cygnus.com>
14086
14087 * gjavah.c: Support new -prepend -add -append flags.
14088 (print_method_info): Method is not virtual if class is final.
14089
14090 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14091
14092 * jv-scan.c: Fixed copyright assignment.
14093 * keyword.gperf: Likewise.
14094 * keyword.h: Likewise.
14095 * lex.c: Fixed copyright assignment.
14096 (java_lex): Push unicode back when parsing '<'.
14097 * lex.h: Fixed copyright assignment.
14098 * parse-scan.y: Likewise.
14099 * parse.h: Fixed copyright assignment.
14100 (build_debugable_stmt, complete_for_loop): New function prototypes.
14101 * parse.y: Fixed copyright assignment.
14102 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
14103 size_zero_node when completing a loop with no exit condition.
14104 (for_statement_nsi:): Define action.
14105 (for_init:, for_update:): Return size_zero_node when empty.
14106 (declare_local_variables): Call build_debugable_stmt.
14107 (build_debugable_stmt): New function.
14108 (build_loop_body): Build debugable statement around loop
14109 condition part.
14110 (complete_loop_body): Take into account the debugable statement
14111 around the EXIT_EXPR.
14112 (complete_loop_body): New function.
14113 (patch_exit_expr): Fixed condition inversion.
14114
14115 1998-09-02 Tom Tromey <tromey@cygnus.com>
14116
14117 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
14118 name of thread define.
14119 * jvspec.c (THREAD_NAME): New macro.
14120 (GCLIB): Likewise.
14121 (THREADLIB): Likewise.
14122 (lang_specific_driver): Recognize attempt to link with thread
14123 library or gc library. Recognize -ljava on command line so it
14124 isn't linked against more than once.
14125
14126 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14127
14128 * parse-scan.y (report_main_declaration): Name of the class
14129 containing `main' can be a qualified name.
14130
14131 1998-08-31 Tom Tromey <tromey@cygnus.com>
14132
14133 * config-lang.in: Changed gjavac to gjc everywhere.
14134 * Make-lang.in: Changed gjavac to gjc everywhere.
14135
14136 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14137
14138 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
14139 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
14140 and install the files.
14141 * Makefile.in (JAVA_OBJS_LITE): New variable.
14142 (compiler:): Now include jv-scan as a dependency.
14143 (../jv-scan$(exeext), parse-scan.c): New targets.
14144 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
14145 * config-lang.in (compilers): Removed gcj, gjavah from the list.
14146 * jcf-parse.c (parse_source_file): Call java_layout_classes and
14147 check for errors even if parse_only.
14148 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
14149 defined.
14150 (yylex): New function. Uses java_lex body.
14151 (java_lex): Removed commented out statement. Remove local variable
14152 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
14153 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
14154 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
14155 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
14156 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
14157 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
14158 where appropriate.
14159 (java_lex_error): Empty if JC1_LITE is defined.
14160 (java_get_line_col): Return 0 if JC1_LITE is defined.
14161 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
14162 SET_MODIFIER_CTX): Moved into the section containing the macros
14163 conditionally defined by JC1_LITE.
14164 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
14165 argument if JC1_LITE is defined.
14166 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
14167 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
14168 is defined.
14169 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
14170 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
14171 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
14172 to different values according to JC1_LITE.
14173 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
14174 declared if JC1_LITE set.
14175 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
14176 defined if JC1_LITE not set.
14177 (struct parser_ctx): Reorganized and skip the jc1 front end part
14178 if JC1_LITE set.
14179 (java_layout_classes): New function definition.
14180 (java_push_parser_context, java_init_lex, yyparse, yylex,
14181 yyerror): Prototype always declared. All other static function
14182 prototypes declared only if JC1_LITE is not set.
14183 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
14184 declared in parse.h.
14185 (java_layout_classes): New function.
14186 (java_complete_expand_methods): No longer layout the class here.
14187 * parse-scan.y: New file.
14188 * jv-scan.c: New file.
14189
14190 1998-08-25 Tom Tromey <tromey@cygnus.com>
14191
14192 * gjavah.c (main): Handle -friend option.
14193 (friend_specs): New global.
14194 (generate_access): Handle friend_specs.
14195 (process_file): Likewise.
14196 (MAX_FRIENDS): New macro.
14197 (friend_count): New global.
14198 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
14199 Changed all callers.
14200
14201 1998-08-24 Per Bothner <bothner@cygnus.com>
14202
14203 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
14204 (main): Handle processing all the entries of a named .zip archive.
14205 * jcf-io.c (jcf_trim_old_input): New function.
14206 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
14207
14208 1998-08-24 Per Bothner <bothner@cygnus.com>
14209
14210 * lang.c (flag_assume_compiled): Make default be on.
14211
14212 1998-08-21 Per Bothner <bothner@cygnus.com>
14213
14214 * jcf-dump.c: Add bunches of flags to control output more.
14215 (process_class): New function; support printing more than one class.
14216 (main): Support new --print-main and --javap flags.
14217 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
14218 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
14219
14220 1998-08-20 Per Bothner <bothner@cygnus.com>
14221
14222 Change mangling of dispatch table to match C++ vtable (w/thunks).
14223 * class.c (build_dtable_decl), java-tree.h: New function.
14224 (make_class_data): Call it.
14225 * decl.c (init_decl_processing): Likewise.
14226
14227 1998-08-19 Warren Levy <warrenl@cygnus.com>
14228
14229 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
14230 soft_anewarray; adjust args passed.
14231 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
14232 match _Jv_NewObjectArray.
14233
14234 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14235
14236 * decl.c (push_labeled_block, pop_labeled_block): New functions.
14237 * expr.c (loopup_label): Call create_label_decl.
14238 (create_label_decl): New function.
14239 (java_lang_expand_expr): Call expand_start_bindings with argument
14240 set to zero.
14241 * java-tree.h Added space after PROTO in function declarations
14242 when necessary.
14243 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
14244 (create_label_decl, push_labeled_block): New function
14245 declarations.
14246 * lex.c (label_id): Initialize.
14247 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
14248 switch.
14249 * parse.h Added space after PROTO in function declarations when
14250 necessary.
14251 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
14252 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
14253 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
14254 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
14255 macros.
14256 (struct parser_ctxt): New fields current_loop,
14257 current_labeled_block.
14258 (build_if_else_statement, patch_if_else_statement,
14259 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
14260 generate_labeled_block, complete_labeled_statement,
14261 build_bc_statement, patch_bc_statement, patch_loop_statement,
14262 build_new_loop, build_loop_body, complete_loop_body): New function
14263 declarations.
14264 * parse.y (java_warning_count): New global variable.
14265 (label_id): New static variable.
14266 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
14267 (block:): Return size_zero_node when block is empty.
14268 (empty_statement:): Return size_zero_node.
14269 (statement:): Implement supplemental action when for_statement: is
14270 reduced.
14271 (label_decl:): New rule.
14272 (labeled_statement:): Rewritten using label_decl. Actions
14273 implemented.
14274 (labeled_statement_nsi:): Likewise.
14275 (if_then_statement): Actions implemented.
14276 (while_expression): New rule.
14277 (while_statement:): Rewritten using while_expression. Actions
14278 implemented.
14279 (while_statement_nsi:): Likewise.
14280 (do_statement_begin:): New rule.
14281 (do_statement:): Rewritten using do_statement_begin. Actions
14282 implemented.
14283 (for_statement:): Rewritten using for_begin. Actions implemented.
14284 (for_statement_nsi:): Likewise.
14285 (for_header:, for_begin:): New rules.
14286 (for_init:): Actions implemented.
14287 (statement_expression_list:, break_statement:,
14288 continue_statement:): Likewise.
14289 (yyerror): Count number of issued warning(s).
14290 (java_report_errors): Report error(s) and/or warning(s).
14291 (java_complete_class): Use build_java_argument_signature to
14292 recompute completed method signature.
14293 (java_check_regular_methods): New locals method_wfl and aflags.
14294 Use method_wfl instead of lookup_cl during error reports. Fixed
14295 indentation and modified some error messages. Use
14296 lang_printable_name in method instead of the DECL_NAME. New code
14297 to issue warnings on methods not overriding corresponding methods
14298 private to a different package.
14299 (java_method_add_stmt): Call add_stmt_to_compound.
14300 (add_stmt_to_compound): New function.
14301 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
14302 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
14303 (build_if_else_statement, patch_if_else_statement,
14304 build_labeled_block, generate_labeled_block,
14305 complete_labeled_statement, build_new_loop, build_loop_body,
14306 complete_loop_body, patch_loop_statement, build_bc_statement,
14307 patch_bc_statement, patch_exit_expr): New functions.
14308 * typeck.c (build_java_signature): Build argument signature before
14309 enclosing it in between parenthesis.
14310
14311 1998-08-17 Warren Levy <warrenl@cygnus.com>
14312
14313 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
14314 (JAVA_OBJS): Added reminder comment
14315
14316 1998-08-13 Nick Clifton <nickc@cygnus.com>
14317
14318 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
14319 be interpreted as a long long.
14320
14321 1998-08-13 Warren Levy <warrenl@cygnus.com>
14322
14323 * decl.c (init_decl_processing): Use _Jv_InitClass, not
14324 soft_initialise_class. Use _Jv_NewMultiArray, not
14325 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
14326 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
14327 _Jv_CheckArrayStore, not soft_checkarraystore. Use
14328 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
14329
14330 1998-08-12 Per Bothner <bothner@cygnus.com>
14331
14332 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
14333 length_identifier_node): New global tree node constants.
14334 * parse.y (kw_super, kw_this, kw_length): Removed globals.
14335 Replace uses by super_identifier_node etc.
14336 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
14337
14338 * parse.y (resolve_field_access): Don't special-case ".length" if
14339 flag_emit_class_files.
14340 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
14341 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
14342 and ARRAY.length.
14343
14344 1998-08-11 Per Bothner <bothner@cygnus.com>
14345
14346 * decl.c (init_decl_processing): Remove unused method_type_node fields.
14347 * class.c (make_method_value): Remove init for removed fields.
14348
14349 * class.c (layout_class): Use build_java_argument_signature.
14350 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
14351
14352 * typeck.c (push_java_argument_signature): Removed. Merged into ...
14353 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
14354 (build_java_signature): Don't use push_java_argument_signature.
14355
14356 * typeck.c (lookup_argument_method): New function.
14357 * parse.y (java_check_regular_methods): Use lookup_argument_method
14358 instead of lookup_java_method2 followed by lookup_java_method.
14359
14360 * parse.y (check_method_redefinition): Minor optimization.
14361
14362 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
14363 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
14364
14365 1998-08-10 Tom Tromey <tromey@cygnus.com>
14366
14367 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
14368 c-pragma.o.
14369
14370 * gjavah.c (java_float_finite): Use K&R-style definition.
14371 (java_double_finite): Likewise.
14372 (generate_access): Now returns void. Changed all callers.
14373 (last_access_generated): Removed.
14374 (process_file): Only make a single pass over the .class file.
14375
14376 1998-07-29 Per Bothner <bothner@cygnus.com>
14377
14378 * class.c (get_dispatch_table): Add extra dummy vtable entry,
14379 for compatibility for G++ (with -fvtable-thunks).
14380 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
14381
14382 * gjavah.c (process_file): Use public inheritance for super-class.
14383
14384 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
14385
14386 * lex.c (java_init_lex): Initialize ctxp->package.
14387 * parse.h (struct parser_ctxt): package and package_len replaced
14388 by tree package, an identifier node. Field method_decl_list is
14389 gone. Fixed comments.
14390 (lookup_field_wrapper, merge_qualified_name, not_accessible,
14391 class_in_current_package): New function prototypes.
14392 * parse.y (array_type:): Set class loaded flag on primitive type
14393 arrays.
14394 (package_declaration:): Assign ctxp->package to the
14395 identifier node.
14396 (method_invocation:): Handle invocation of method qualified by
14397 `super'.
14398 (single_type_import_declaration:): Removed ambiguity check.
14399 (java_pop_parser_context): New local variable `next'. Reset and
14400 set IMPORT_CLASSFILE_NAME flags on current and previous import
14401 list.
14402 (java_accstring_lookup): Use new local macro COPY_RETURN.
14403 (lookup_field_wrapper): New function.
14404 (parser_qualified_classname): Use merge_qualified_name.
14405 (parser_check_super_interface): Broaden error message.
14406 (do_resolve_class): Check for qualified class name in the current
14407 compilation unit if appropriate.
14408 (process_imports): Check for already defined classes.
14409 (check_pkg_class_access): Got rid of call to
14410 get_access_flags_from_decl.
14411 (java_complete_expand_methods): Call safe_layout_class based on
14412 the current class size.
14413 (make_qualified_primary): Build a WFL qualification on primary if
14414 none exists.
14415 (merge_qualified_name): New function.
14416 (make_qualified_name): Use merge_qualified_name.
14417 (resolve_expression_name): Use safe_lookup_field.
14418 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
14419 (resolve_qualified_expression_name): Likewise. Check on resolved
14420 element accessibility.
14421 (not_accessible_p, class_in_current_package): New functions.
14422 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
14423 (patch_method_invocation_stmt): Merged common pieces. Check
14424 accessibility of invoked method.
14425 (check_for_static_method_reference): Add returned type in error
14426 message.
14427 (invocation_mode): Get rid of bogus check on PRIVATE methods.
14428 (refine_accessible_methods_list): Merged two conditions in test.
14429 (java_complete_class): Sanity check on stabilize_ref gone.
14430 * zextract.c (read_zip_archive): Cast lseek second argument to long.
14431
14432 1998-07-28 Per Bothner <bothner@cygnus.com>
14433
14434 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
14435
14436 1998-07-24 Tom Tromey <tromey@cygnus.com>
14437
14438 * gjavah.c (F_NAN): Removed.
14439 (F_NAN_MASK): New macro.
14440 (F_POSITIVE_INFINITY): Removed.
14441 (F_NEGATIVE_INFINITY): Likewise.
14442 (java_float_finite): Rewrote.
14443 (D_NAN_MASK): Renamed.
14444 (java_double_finite): Rewrote.
14445 (D_POSITIVE_INFINITY): Removed.
14446 (D_NEGATIVE_INFINITY): Likewise.
14447
14448 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
14449 If verbose, print underlying representation of value in hex.
14450
14451 1998-07-24 Per Bothner <bothner@cygnus.com>
14452
14453 * buffer.h, buffer.c: New files.
14454 * Makefile.in (JAVA_OBJS): Add buffer.o.
14455
14456 Support locals variables and writing their debug entries to .class.
14457 * jcf-write.c: Simplify some by user new buffer type.
14458 (vode_buffer_grow): Removed.
14459 (struct localvar_info): New type.
14460 (localsvars, localvartable): New buffers.
14461 (localvar_alloc, localvar_free): New functions.
14462 (generate_bytecode_insns): Handle local variables.
14463 (generate_classfile): Write LocalVariableTable attribute.
14464
14465 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14466
14467 * jcf-io.c (open_in_zip): Check the zipfile magic number.
14468 * zipfile.h (ZIPMAGIC): New macro.
14469
14470 1998-07-24 Tom Tromey <tromey@cygnus.com>
14471
14472 * Makefile.in (gjavah.o): Updated dependencies.
14473 (jcf-dump.o): Likewise.
14474 (all.indirect): Use ../gjavah.
14475 (../gjavah$(exeext)): Likewise.
14476 (clean): Don't remove gjavah.
14477 (clean): Remove parse.c, not java/parse.c.
14478 * Make-lang.in (java): Added gjavah.
14479 (gjavah$(exeext)): New target.
14480 (GJAVAH_SOURCES): New macro.
14481 (java.all.build): Added gjavah.
14482 (java.all.cross): Likewise.
14483 (java.rest.encap): Likewise.
14484 * config-lang.in (compilers, stagestuff): Added gjavah.
14485
14486 1998-07-23 Tom Tromey <tromey@cygnus.com>
14487
14488 * gjavah.c (java_float_finite): New function.
14489 (java_double_finite): Likewise.
14490 (F_POSITIVE_INFINITY): New macro.
14491 (F_NEGATIVE_INFINITY): Likewise.
14492 (F_NAN): Likewise.
14493 (D_POSITIVE_INFINITY): Likewise.
14494 (D_NEGATIVE_INFINITY): Likewise.
14495 (D_NAN): Likewise.
14496 (print_field_info): Use java_float_finite and java_double_finite.
14497
14498 1998-07-23 Per Bothner <bothner@cygnus.com>
14499
14500 * parse.y (method_header): Name "this" implicit argument.
14501
14502 1998-07-22 Per Bothner <bothner@cygnus.com>
14503
14504 * jcf-write.c: Write out LineNumberTable attribute in .class file.
14505 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
14506 (put_linenumber): New function.
14507 (generate_bytecode_insns, generate_classfile): Write line numbers.
14508
14509 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14510
14511 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
14512 (lookup_name, build_known_method_ref, build_class_init,
14513 build_invokevirtual, invoke_build_dtable, match_java_method,
14514 build_field_ref, pushdecl_force_head, build_java_binop,
14515 binary_numeric_promotion, build_decl_no_layout,
14516 build_java_arrayaccess, build_newarray, build_anewarray,
14517 build_java_array_length_access, build_java_arraynull_check): New
14518 extern function prototypes.
14519 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14520 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
14521 java-tree.h.
14522 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
14523 to NULL
14524 * jcf.h (jcf_out_of_synch): New extern function prototype.
14525 * parse.h: Static/global function implemented in parse.y
14526 prototyped and declarations moved at the end of the file.
14527 (DECL_P): Check that the argument isn't null.
14528 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
14529 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
14530 (QUAL_DECL_TYPE): New macro.
14531 (PARAMS): Macro definition removed.
14532 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
14533 (return_statement:): Call build_return.
14534 (field_access:): Call make_qualified_primary in sub rule.
14535 (method_invocation:): Build method invocation and call
14536 make_qualified_primary when processing primaries.
14537 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
14538 get_type_from_signature.
14539 (java_check_regular_method): Extra integer 0 argument when calling
14540 lookup_java_method2.
14541 (lookup_java_interface_method2): Extra method DECL argument when
14542 calling lookup_java_interface_method2.
14543 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
14544 COMPOUND_EXPR node.
14545 (java_complete_expand_method): Layout current class iff not
14546 already done. Don't process interface's methods.
14547 (java_complete_expand_method): Use super class only if it
14548 exists. Use current class otherwise.
14549 (make_qualified_primary): New function.
14550 (resolve_expression_name): Process qualified expression or
14551 expression from primary the same way.
14552 (resolve_expression_name): Two last arguments to
14553 resolve_field_access are now NULL_TREEs.
14554 (resolve_field_access): New variable is_static. Local field must
14555 be DECLs. is_static computed on field DECLs only. Append code in
14556 where_found to the field access if necessary. Use QUAL_DECL_TYPE
14557 to initialize field_type.
14558 (resolve_qualified_expression_name): New local variable,
14559 previous_call_static and is_static. Handle primaries with function
14560 calls, casts, array references and `this'. `super' now handled as
14561 `(super_class)this'. Use is_static to clarify boolean expressions.
14562 Added code to handle case where a proper handle is required to
14563 access a field. Use QUAL_DECL_TYPE where applicable.
14564 (maybe_access_field): New function.
14565 (patch_method_invocation_stmt): New arguments primary, where,
14566 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
14567 deleted. Use `where' as a type to search from if specified. Check
14568 for static method reference where forbidden. Append primary or
14569 current_this to the argument list if not calling constructor nor
14570 static methods.
14571 (check_for_static_method_reference): New function.
14572 (patch_invoke): Layout the class on which new is done if
14573 necessary.
14574 (lookup_method_invoke): Changed format to report errors on
14575 methods.
14576 (qualify_ambiguous_name): New local variable this_found. Now
14577 handle things from primaries. Method call are considered
14578 expression names.
14579 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
14580 changed into NULLs.
14581 (not_initialized_as_it_should_p): Comply with the new DECL_P.
14582 (java_complete_tree): New case fo RETURN_EXPR. Process function
14583 call arguments in separate function.
14584 (complete_function_arguments): New function.
14585 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
14586 anymore.
14587 (patch_assignment): Take the return function slot into account as
14588 a RHS. Distinguish assignment from a return.
14589 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
14590 when checking methods in interfaces.
14591 (resolve_type_during_patch): NULL argument to unresolve_type_p
14592 instead of NULL_TREE.
14593 (patch_newarray): Fixed typo in comment.
14594 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
14595 (build_return, patch_return): New functions.
14596 * typeck.c (lookup_java_constructor): Fixed typo in comment.
14597
14598 1998-07-21 Per Bothner <bothner@cygnus.com>
14599
14600 * constants.c (find_name_and_type_constant, find_fieldref_index,
14601 find_methodref_index): New methods.
14602 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
14603 just return given method. Also, rename to build_known_method_ref.
14604 (expand_invoke): Rename call to build_invoke_non_interface.
14605 * java-tree.h, parse.h: Update prototype.
14606 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
14607 (such as expand_expr_stmt) if flag_emit_class_files.
14608 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
14609 STACK_TARGET, IGNORE_TARGET): New macros.
14610 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
14611 (generate_bytecode_insn): New function to generate method's bytecode.
14612 (generate_classfile): Node generate Code attribute for a method.
14613 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
14614 push_long_const, field_op, adjust_typed_op, maybe_wide):
14615 New functions used by generate_bytecode_insn.
14616
14617 * typeck.c (signature_include_return): Remove variable.
14618 (push_java_argument_signature, build_java_argument_signature): New.
14619 (build_java_signature): Use push_java_argument_signature.
14620 * parse.y: Use build_java_argument_signature instead of fiddling
14621 with signature_include_return.
14622
14623 1998-07-17 Tom Tromey <tromey@cygnus.com>
14624
14625 * gjavah.c (print_c_decl): Always generate JArray<>* for array
14626 types.
14627
14628 * Makefile.in (all.indirect): Added gjavah$(exeext).
14629 (gjavah$(exeext)): Added $(exeext).
14630 (clean): Likewise.
14631
14632 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
14633
14634 * class.c (layout_class): Call to java_layout_parsed_class replace
14635 by safe_layout_class.
14636 * expr.c (build_java_array_length_access): Removed static storage
14637 class in the function definition.
14638 (build_java_arraynull_check): Likewise.
14639 Also fixed typos in two comments.
14640 * lex.c (java_init_lex): Initialize static global kw_length.
14641 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
14642 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
14643 java_lex_error.
14644 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
14645 * parse.h (resolve_no_layout): New static function declaration.
14646 (get_identifier_in_static): Declaration removed.
14647 (java_layout_parsed_class): Function name declaration changed to
14648 safe_layout_class.
14649 (build_newarray_node, patch_newarray, resolve_type_during_patch,
14650 not_initialized_as_it_should_p, build_this): New static function
14651 declarations.
14652 (pushdecl_force_head, build_java_binop, int_fits_type_p,
14653 binary_numeric_promotion, stabilize_reference,
14654 build_decl_no_layout, build_java_arrayaccess): Extern function
14655 declarations moved into their own section.
14656 (build_newarray, build_anewarray, build_java_array_length_access,
14657 build_java_arraynull_check): New extern function declarations.
14658 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
14659 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
14660 fake tree codes.
14661 (CALL_CONSTRUCTOR_P): New macro.
14662 * parse.y (kw_length): New static global tree node.
14663 (return_statement): Tagged <node>.
14664 (RETURN_TK): Tagged <operator>.
14665 (variable_declarator_id:): Build variable declaration with an
14666 empty initialization value if a syntax error was found in the
14667 initialization part of the variable declaration.
14668 (statement_without_trailing_substatement:): return_statement: now
14669 uses the default rule.
14670 (return_statement:): Temporarily fixed to return NULL_TREE.
14671 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
14672 (class_instance_creation_expression:): Class creation rules now
14673 call build_method_invocation upon reduction.
14674 (array_creation_expression:): Rules call build_newarray_node upon
14675 reduction.
14676 (dim_exprs:): Build a list of dimension expressions.
14677 (dim_expr:): Store location of the OSB_TK in the dimension
14678 expression node.
14679 (method_invocation:): Added a new error rule.
14680 (build_unresolved_array_type): WFL argument may also be an array
14681 on a primitive type. Name of the argument changed to reflect this.
14682 (method_declarator): Insert argument type at the beginning of the
14683 argument type list and later reverse the list.
14684 (unresolved_type_p): Argument 'returned' may be optionally
14685 NULL_TREE.
14686 (java_layout_class_from_source): Function renamed
14687 safe_layout_class.
14688 (resolve_and_layout): Now call resolve_no_layout and
14689 safe_layout_class.
14690 (resolve_no_layout): New function.
14691 (purify_type_name): New function.
14692 (complete_class_report_errors): Call purify_type_name during error
14693 report on a type not found.
14694 (process_imports): error_found local variable doesn't need to be
14695 initialized to zero.
14696 (declare_local_variables): New local type_wfl. Fixed typo in error
14697 message. type_wfl assigned to unresolved type and used to register
14698 incomplete type. Build a WFL around the variable initialization
14699 statement so that debug info can be generated on it.
14700 (source_start_java_method): Reverse argument list after they've
14701 been processed.
14702 (current_this): New static global variable.
14703 (java_complete_expand_methods): Set current_this when appropriate.
14704 (resolve_expression_name): Build correct static and non static
14705 field access bearing a simple name.
14706 (resolve_field_access): Resolve the length field of arrays. Handle
14707 f.m() cases.
14708 (patch_method_invocation_stmt): Set the type of the method
14709 invocation to error_mark_node. This value is later overridden by a
14710 valid type, if any. Don't handle qualified constructor invocation
14711 as qualified method invocation. Call lookup_method_invoke with its
14712 new flag. It's no longer necessary to access the selected method
14713 as the value of a tree list. Handle constructor invocation.
14714 (patch_invoke): Reverse argument list when invoking non interface
14715 methods. Insert call to new as the first argument of the
14716 constructor.
14717 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
14718 defined within a final class. Return INVOKE_STATIC if the invoked
14719 method is a constructor.
14720 (lookup_method_invoke): New lc argument is a flag to indicate a
14721 constructor lookup. Now handle constructor lookup. Choose the most
14722 specific method in case several were matching the invocation
14723 requirements. Return a method decl instead of a tree list featuring
14724 one single method decl element.
14725 (refine_accessible_methods_list): New lc flag argument to
14726 indicate that a constructor is being looked up.
14727 (not_initialized_as_it_should_p): New function.
14728 (java_complete_tree): Now process fake tree codes
14729 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
14730 save_expr on resolved function call arguments. Case on
14731 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
14732 (patch_assignment): LHS can be a field access expression. When
14733 dealing with reference, lhs_type is the promoted type of the
14734 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
14735 applicable.
14736 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
14737 (patch_binop): Use not_initialized_as_it_should_p where
14738 applicable.
14739 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
14740 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
14741 where applicable.
14742 (resolve_type_during_patch): New function.
14743 (patch_cast): Call resolve_type_during_patch to resolve type and
14744 report error accordingly.
14745 (patch_array_ref): Use not_initialized_as_it_should_p where
14746 applicable. Array base expression is saved before being
14747 used. Promote the type of an array elements if it contains non
14748 builtin types.
14749 (build_newarray_node, patch_newarray, build_this): New functions.
14750
14751 1998-07-16 Tom Tromey <tromey@cygnus.com>
14752
14753 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
14754 increment it in `for' statement.
14755 (print_field_info): If number is inf or nan, don't print it.
14756 (print_method_info): If method name is `delete', just ignore it.
14757 (print_c_decl): Special-case jstringArray.
14758
14759 * gjavah.c (help): New function.
14760 (no_argument): New function.
14761 (usage): Changed text.
14762 (main): Rewrote argument handling. Now handles -v, --help,
14763 --version.
14764 (version): New function.
14765 (found_error): New global.
14766 (main): Return found_error.
14767 (generate_access): Set found_error.
14768 (print_c_decl): Likewise.
14769
14770 1998-07-15 Tom Tromey <tromey@cygnus.com>
14771
14772 * gjavah.c (print_c_decl): Don't print "," when examining field.
14773 Skip type name when looking at "[L" types.
14774 (process_file): Now static.
14775 (generate_access): Now returns int.
14776 (last_access_generated): New global.
14777 (process_file): Clear last_access_generated; make multiple passes
14778 over the class.
14779 (print_field_info): Just return if generate_access returns true.
14780 (print_method_info): Likewise. Also, allow <init> functions to
14781 pass through.
14782 (print_c_decl): Added is_init argument. Print constructors
14783 properly.
14784 (print_cxx_classname): Use UTF8_GET to extract characters from
14785 string.
14786 (print_base_classname): New function.
14787 (print_class_decls): New function.
14788 (process_file): Use it.
14789 (utf8_cmp): New function.
14790
14791 1998-07-13 Nick Clifton <nickc@cygnus.com>
14792
14793 * lang-options.h: Format changed to match changes in gcc/toplev.c
14794 to implement a --help option.
14795
14796 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
14797
14798 * decl.c (init_decl_processing): Revert change to dtable_type.
14799
14800 1998-07-09 Per Bothner <bothner@cygnus.com>
14801
14802 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
14803
14804 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
14805
14806 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
14807
14808 * lang.c (lang_init): Default flag_exceptions to 1, without
14809 checking to see if it's 2 first.
14810
14811 1998-07-08 Jeffrey A Law (law@cygnus.com)
14812
14813 * constants.c: Include "system.h".
14814 * decl.c: Likewise.
14815 * lang.c (flag_new_exceptions): Get via extern now.
14816 (lang_init_options): New functions. Turn on flag_new_exceptions.
14817
14818 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14819
14820 * lex.c (java_lex): Return 0 when we see an invalid character in
14821 the input.
14822
14823 * lex.c (java_read_char): Specify extra argument when calling
14824 java_lex_error.
14825 (java_read_unicode, java_parse_end_comment,
14826 java_parse_escape_sequence): Likewise,
14827 (java_lex): Specify extra argument when calling
14828 java_lex_error. Test that IDs are beginning with a legal character
14829 for IDs. Handle invalid characters with an error message and a
14830 call to java_lex_error.
14831 (java_lex_error): Adjust column position by new argument
14832 `forward'. Issue an error even if in the middle of reporting an
14833 other error.
14834
14835 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
14836
14837 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
14838 we don't explicitly put a null pointer when we're copying it.
14839
14840 1998-07-07 Tom Tromey <tromey@cygnus.com>
14841
14842 * gjavah.c (print_cxx_classname): New function.
14843 (super_class_name): Likewise.
14844 (print_super_fields): Removed.
14845 (in_super): Removed.
14846 (print_field_info): Never generate #defines.
14847 (print_c_decl): Changed generated types to match JNI. No longer
14848 print class name before method name.
14849 (print_method_info): Print "static" before static methods.
14850 Print "virtual" before non-final methods.
14851 (usage): Use exit(1), not exit(-1).
14852 (main): Likewise.
14853 (print_field_info): Use %.17g to print a double.
14854 (last_access): New globals.
14855 (process_file): Initialize last_access.
14856 (usage): Now static.
14857 (ACC_VISIBILITY): New define.
14858 (generate_access): New function.
14859 (print_field_info): Call it.
14860 (print_method_info): Likewise. Also, generate information for all
14861 methods, not just native methods. Return void.
14862 (print_c_decl): Return void.
14863 (print_field_info): Return void.
14864
14865 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14866
14867 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
14868 processing the jc1 grammar file. Prefix bison functions and
14869 variables with java_.
14870 (parse.c): Dependencies on parse.h and lex.h
14871 * expr.c (build_java_arrayaccess): Function now global.
14872 * java-tree.h: Comment reorganized to carry on previous
14873 classification effort.
14874 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
14875 RESOLVE_TYPE_NAME_P): New flags on WFLs.
14876 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
14877 java_parse (new prefix java_ generated by bison).
14878 (java_layout_parsed_class, java_register_parsed_class): Function
14879 call removed.
14880 (yyparse): Removed unnecessary call to init_outgoing_cpool.
14881 * lex.c (static tree wfl_op): Variable deleted.
14882 (java_init_lex): Initialize kw_super and kw_this. Initialize more
14883 ctxp fields to NULL_TREE.
14884 (java_lex): No longer create WFL for operators. Filename caching
14885 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
14886 created as STRING_CST and later expanded. Removed extra argument
14887 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
14888 and SUPER.
14889 (build_wfl_node): Removed code in comments.
14890 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
14891 store token and location data in the current bison token.
14892 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
14893 static/extern function declaration at the beginning of the file.
14894 (struct qualification): Data structure definition deleted.
14895 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
14896 (qualify_ambiguous_name): Function declaration modified. Function
14897 now returns nothing.
14898 (build_array_ref, patch_array_ref, make_qualified_name,
14899 resolve_qualified_expression_name, maybe_generate_clinit,
14900 resolve_field_access): New static function declarations.
14901 (build_java_arrayaccess): New extern function declaration.
14902 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
14903 (CALL_EXPR_PRIMARY): Macro deleted.
14904 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
14905 (struct parser_ctxt): Field initialized_final
14906 removed. non_static_initialized, static_initialized: New fields.
14907 * parse.y (static tree kw_super, static tree kw_this): New global
14908 static.
14909 (%union): tree wfl field of operator member replaced by int
14910 location. WFLs are non longer created for operators.
14911 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
14912 (qualified_name:): Now calls make_qualified_name to build the
14913 identifier.
14914 (type_declaration:): Consider generating <clinit> when class
14915 parsing completed.
14916 (variable_declarator:): Directly build an assignment node when the
14917 variable is initialized when declared.
14918 (this_or_super:): Build a WFL and set current location when THIS
14919 or SUPER are parsed.
14920 (expression_statement:): Wrap statement around a WFL.
14921 (primary_no_new_array:): Fixed typo. Changed value returned by
14922 THIS_TK because of its new type (temporary).
14923 (dim_exprs:): Temporary fix because of OSB_TK's new type.
14924 (field_access:): Build qualified name with SUPER.
14925 (method_invocation:): Fixed returned value because of SUPER's new
14926 type.
14927 (array_access:): Use OSB_TK location information.
14928 (post_increment_expression:, post_decrement_expression:,
14929 unary_expression:, pre_increment_expression:,
14930 pre_decrement_expression:, unary_expression_not_plus_minus:,
14931 cast_expression:, multiplicative_expression:,
14932 additive_expression:, shift_expression:, relational_expression:,
14933 equality_expression:, and_expression:, exclusive_or_expression:,
14934 inclusive_or_expression:, conditional_and_expression:,
14935 conditional_or_expression:, assignment:): Use new location/token
14936 information available on operators.
14937 (create_class): Set super_decl_type to NULL_TREE when processing
14938 java.lang.Object.
14939 (register_fields): Field initialization is now a MODIFY_EXPR
14940 node. Chain initialization code to the matching lists (according
14941 to the field declaration modifiers).
14942 (maybe_generate_clinit): New function.
14943 (method_header): Don't set method's DECL_NAME to a WFL when adding
14944 methods to java.lang.Object.
14945 (resolve_and_layout): Now can return NULL_TREE if the type
14946 resolution fails. Otherwise, return the class DECL instead of its
14947 TYPE.
14948 (check_method_redefinition): Don't patch method DECL_NAME if it
14949 belongs to java.lang.Object.
14950 (process_imports): Simply assign error_found to the value returned
14951 by check_pkg_class_access.
14952 (declare_local_variables): Don't use their init statements (if
14953 any) when parsing error were previously found. Reuse MODIFY_EXPR
14954 build during parsing as an init statement.
14955 (java_method_add_stmt): Now return the current method body.
14956 (java_layout_parsed_class, java_register_parsed_class): Functions
14957 removed.
14958 (java_complete_expand_methods): Initialize the constant pool on a
14959 per class basis. Layout the classes before expanding their method
14960 bodies. Don't try expand artificial constructor code if error were
14961 found. Make the classes data and register them if no error were
14962 found.
14963 (java_complete_expand_method): Retrieve an artificial constructor
14964 argument list before entering its body. Assign the top block to
14965 the artificial constructor function body and set types of declared
14966 blocks and compound statements to void. Walk method body if not an
14967 artificial constructor.
14968 (make_qualified_name, cut_identifier_in_qualified): New functions.
14969 (resolve_expression_name): Fixed comments. Save/restore the
14970 current class CLASS_LOADED_P flag value. Build non qualified
14971 static field access and handle qualified expression names.
14972 (resolve_field_access, resolve_qualified_expression_name): New
14973 functions.
14974 (patch_method_invocation_stmt): Use the new expression resolution
14975 scheme, calling resolve_field_access when the function call is
14976 resolved as an expression.
14977 (qualify_ambiguous_name): Function rewritten to work on qualified
14978 expression produced by make_qualified_name.
14979 (java_complete_tree): Promote type when function's argument are
14980 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
14981 the assignment to discover further errors if RHS is a expression
14982 name that fails to evaluate. Declare LHS initialized even though
14983 the assignment failed. Don't use the location variable and removed
14984 extra argument in patch function calls. Now handle the ARRAY_REF
14985 case and build internal string representation when STRING_CSTs are
14986 walked.
14987 (build_method_invocation): Don't wrap function call around a WFL.
14988 (build_assignment): Likewise. Use the operator location
14989 information.
14990 (patch_assignment): Handle array access LHSs. Handle error
14991 provenance, resulting in a better error report.
14992 (build_binop): Use op_location from operator as binop location
14993 information.
14994 (build_unaryop, build_incdec, build_cast): Likewise.
14995 (patch_binop): Extract location information from the node. Fixed
14996 typo in error message.
14997 (patch_unary_op): Extract location information from the node.
14998 (build_array_ref, patch_array_ref): New functions.
14999
15000 1998-07-01 Tom Tromey <tromey@cygnus.com>
15001
15002 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
15003 match _Jv_IsInstanceOf.
15004 * decl.c (init_decl_processing): Use _Jv_NewArray, not
15005 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
15006
15007 1998-06-30 Tom Tromey <tromey@cygnus.com>
15008
15009 * decl.c (init_decl_processing): Functions are now named
15010 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
15011
15012 1998-06-29 Per Bothner <bothner@cygnus.com>
15013
15014 * java-tree.h (load_class): Add prototype.
15015 * class.c (is_compiled_class): Add missing arg to load_class.
15016 * expr.c (expand_java_NEW): Call load_class.
15017 * parse.y (process_import): Removed bogus use of void return value.
15018
15019 1998-06-25 Per Bothner <bothner@cygnus.com>
15020
15021 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
15022 Function name is "_Jv_Throw" instead of "soft_athrow".
15023 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
15024 Function name is "_Jv_AllocObject" instead of "soft_new".
15025 Takes an extra parameter (object size).
15026 * expr.c: Update calls.
15027
15028 1998-06-24 Per Bothner <bothner@cygnus.com>
15029
15030 * lex.c (java_get_line_col): Handle end-of-file.
15031 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
15032
15033 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
15034
15035 * lang.c (lang_init): Make -fexceptions the default.
15036 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
15037 exception handling is not turned on.
15038
15039 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
15040
15041 * lang.c (flag_new_exceptions): Make this this default.
15042 * decl.c (end_java_method): Call emit_handlers.
15043 * except.c (method_init_exceptions): Set language code and version.
15044 (expand_start_java_handler): Enable exception, and call
15045 expand_eh_region_start.
15046 (expand_end_java_handler): Enable exception, and set up catch blocks.
15047 (emit_handlers): New routine to generate the saved handlers.
15048 * java-except.h (emit_handlers): Add prototype.
15049
15050 1998-06-12 Per Bothner <bothner@cygnus.com>
15051
15052 We used to have three different representations of the constant pool:
15053 the CPool structure, the tree_constant_pool, and the constructures
15054 used to build the Class object (which may need class and string
15055 constants) in compiled code. None were appropriate for compiling
15056 to .class files, so I did a major overhaul.
15057
15058 First, the tree_constant_pool array was removed. Things were
15059 modified to the CPool structure in the JCF could be used.
15060 Second, a "capacity" field was added to the CPool, and functions
15061 written to search for a matching constant, adding one if not found.
15062 The code that generated the Class object was changed to use a CPool.
15063 The actual TREE_LISTs used to build the CONSTRUCTORs used for
15064 the static Class object are now only in build_constants_constructor.
15065 Finally, I wrote code which can generate a .class file (including its
15066 constant pool) from the RECORD_TYPE of a class. This is a big step
15067 on the way to compiling Java source into .class files.
15068
15069 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
15070 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
15071
15072 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
15073 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
15074 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
15075 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
15076 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
15077 (lang_type): Removed constant_pool field.
15078 * jcf.h (CPool): Renamed size to count. Added field capacity.
15079 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
15080 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
15081 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
15082
15083 * constants.c (current_constant_pool_tags, current_constant_pool_data,
15084 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
15085 * constants.c (build_constants_constructor): Use new outgoing_cpool.
15086 (set_constant_entry, find_constant1, find_constant2,
15087 find_class_constant, count_constant_pool_bytes, write_constant_pool,
15088 find_utf8_constant, find_class_or_string_constant): New functions.
15089
15090 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
15091 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
15092 (give_name_to_class, get_class_constant): Likewise.
15093 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
15094 (get_name_and_type_constant, get_ref_constant): Removed.
15095 * parse.h (parser_ctxt): Remove field tree_constant_pool.
15096 * parse.y: Don't save/restore tree_constant_pool.
15097 * verify.c (verify_jvm_instructions): Update for new approach.
15098 * expr.c (expand_invoke, expand_java_field_op): Likewise.
15099
15100 * lang-options.h: Added -femit-class-file, -femit-class-files.
15101 * lang.c (flag_emit_class_files), java-tree.h: New flag.
15102 (lang_f_options): Added "emit-class-file(s)".
15103
15104 * expr.c (build_java_arrayaccess): Generate more efficient array
15105 bounds checking, by using unsigned compare.
15106
15107 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
15108
15109 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15110
15111 * parse.h: New comment on the handling of unresolved type
15112 identifiers. JDEPs are now part of the jdep_code enum.
15113 (typedef struct jdep): Now use enum jdep_code or int, depending on
15114 availability. Both are narrowed down to an 8 bits bitfield.
15115 (CALL_EXPR_PRIMARY): Fixed comment.
15116
15117 1998-06-10 Tom Tromey <tromey@cygnus.com>
15118
15119 * Make-lang.in (java): Added gjavac and jvgenmain.
15120 (java.start.encap): Depend on gjavac.
15121 (java.rest.encap): Depend on jvgenmain.
15122
15123 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
15124 (JAVA_CROSS_NAME): Likewise.
15125 (java.all.build): Depend on jvgenmain and gjavac.
15126 (java.all.cross): Depend on jvgenmain and gjavac-cross.
15127 (jvgenmain$(exeext)): New target.
15128 (java.install-common): Wrote.
15129 * config-lang.in (compilers, stagestuff): Added gjavac and
15130 jvgenmain.
15131
15132 1998-06-10 Dave Brolley <brolley@cygnus.com>
15133
15134 * lang.c (lang_decode_option): New argc/argv interface.
15135
15136 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15137
15138 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
15139 * decl.c (build_decl_no_layout): New function.
15140 * expr.c (java_lang_expand_expr): Layout declarations found in
15141 blocks before they're pushed.
15142 * jcf-parse.c (load_class): Save current line when parsing class
15143 file.
15144 (parse_source_file): Register class before expanding their
15145 methods.
15146 * lang.c (put_decl_node): Produce `null' when `void *' is
15147 processed.
15148 * lex.c (static tree wfl_op): New static global, for error report
15149 on casts.
15150 (java_init_lex): wfl_operator and wfl_op initialized
15151 here. Filename caching added for wfl_op. Return wfl_op when `(' is
15152 parsed.
15153 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
15154 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
15155 build_unresolved_array_type): New static function definitions.
15156 (build_decl_no_layout): New extern function declared.
15157 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
15158 faulty modifier exists.
15159 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
15160 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
15161 (UNARY_PLUS_EXPR): New fake operator.
15162 (struct parser_ctxt): New field osb_number.
15163 * parse.y (static tree wfl_operator): New static WFL for operator
15164 bound error messages.
15165 (DECR_TK, INCR_TK): Moved.
15166 (OP_TK): Tagged <operator>.
15167 (array_type:): Now call build_unresolved_array_type.
15168 (dim_expr:): Count the number of '[' seen.
15169 (post_increment_expression, post_decrement_expression,
15170 pre_increment_expression, pre_decrement_expression,
15171 unary_expression_not_plus_minus, unary_expression:): Actions are
15172 now building the corresponding unary expressions.
15173 (cast_expression:): Actions are now building cast expressions.
15174 (build_unresolved_array_type): New function.
15175 (create_interface): Reset the number of declared interfaces.
15176 (create_class): Likewise.
15177 (method_header): Methods declared within the scope of an interface
15178 are now implicitly set public and abstract.
15179 (java_complete_class): Variable's and parameter's type are patched
15180 with a promoted type.
15181 (declare_local_variables): Resolved non builtin types are promoted
15182 before being used to build a variable decl. Removed type patch
15183 posted on variable initialization statement.
15184 (source_start_java_method): Use build_decl_no_layout to build the
15185 decl of a parameter of incomplete type.
15186 (java_register_parsed_class): Process interfaces too. Call
15187 rest_of_decl_compilation on each processed class declarations.
15188 (java_complete_expand_methods): Don't attempt to expand things in
15189 interfaces.
15190 (java_complete_tree): Process CONVERT_EXPR, even though it always
15191 has a type. Propagate error_mark_node to node's type too. Promote
15192 method's call argument type and return error_mark_node if
15193 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
15194 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
15195 handle unary operator nodes.
15196 (build_assignment): Added comment.
15197 (print_int_node): New function.
15198 (patch_assignment): New second argument. New error handling. Use
15199 print_int_node. Handle references. Use can_cast_to_p to issue
15200 different error message according to the context and check upon
15201 the initialization of the RHS.
15202 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
15203 (operator_string): Handle more operators.
15204 (patch_binop): No longer use a function static
15205 wfl_operator. Improved error message on shift distance.
15206 (build_unaryop, build_incdec, build_cast, patch_unaryop,
15207 patch_cast): New functions.
15208
15209 1998-06-05 Per Bothner <bothner@cygnus.com>
15210
15211 * jvspec.c: New file.
15212 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
15213
15214 * java-tree.h (identifier_subst): Add declaration.
15215
15216 1998-06-04 Tom Tromey <tromey@cygnus.com>
15217
15218 * jvgenmain.c (main): Generate call to JvRunMain.
15219
15220 * class.c (make_class_data): Push value for "sync_info" field.
15221 * decl.c (init_decl_processing): Push "sync_info" field.
15222
15223 1998-06-03 Per Bothner <bothner@cygnus.com>
15224
15225 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
15226 Java (source) name, not signature.
15227 Set TYPE_ALIGN to (at least) that of element_type.
15228
15229 1998-06-02 Per Bothner <bothner@cygnus.com>
15230
15231 * class.c: Moved classname-mangling-rekated code to ...
15232 * mangle.c: ... this new file.
15233 * jvgenmain.c: New program (needs mangle.c) to generate main program.
15234 * Makefile.in: Update for above changes.
15235
15236 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15237
15238 * expr.c (truthvalue_conversion): Convert integer and floating
15239 point value to their truth value.
15240 * lex.c (java_lex): Handle the `null' literal.
15241 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
15242 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15243 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
15244 New macros.
15245
15246 * parse.y: Reorganization/documentation on token declaration.
15247 (binop_lookup[]): New added new tree codes.
15248 (relational_expression): Build corresponding binary operators.
15249 (equality_expression, conditional_and_expression,
15250 conditional_or_expression): Likewise.
15251 (java_complete_class): Fix crash in debug message.
15252 (java_complete_tree): Check initialization of method call
15253 arguments. Further bogus node evaluation to detect more error
15254 during assignments. Handles more binary operators.
15255 (patch_assignment): Use DECL_P.
15256 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
15257 code.
15258 (operator_string): Handle more case. Compacted source.
15259 (patch_binop): Changed function comment. Checking for
15260 uninitialized first operand takes the compound assignment into
15261 account and uses DECL_P. Checking for uninitialized second operand
15262 delayed to routine's end. Use macros to issue type bound error
15263 messages and issue messages on both operands if their types are
15264 different. Force fixed type into node. Handle all binary
15265 operators.
15266
15267 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15268
15269 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
15270 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
15271 build operator node and return tokens.
15272 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
15273 * parse.h (java_complete_tree): Changed returned type in prototype.
15274 (build_method_invocation, build_assignment, patch_assignment,
15275 patch_binop): New static function declarations.
15276 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
15277 BUILD_EXPR_WFL): New macros.
15278 * parse.y (enum tree_code binop_lookup[]): New static for token to
15279 TREE_CODE lookup.
15280 (%union): Parser union has new sub-structure `operator'.
15281 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
15282 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
15283 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
15284 ASSIGN_ANY_TK): Tokens tagged `operator'.
15285 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
15286 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
15287 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
15288 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
15289 (assignment_operator:): Rule tagged `operator'.
15290 (expression_statement:): Re-installed default rule.
15291 (method_invocation:): Sub rules call build_method_invocation.
15292 (postfix_expression:): Don't attempt to resolve name here. Just
15293 return an ID.
15294 (multiplicative_expression:): Sub-rules build corresponding binop
15295 expression node.
15296 (additive_expression:, shift_expression:, and_expression:,
15297 exclusive_or_expression:, inclusive_or_expression:): Likewise.
15298 (assignment:): Sub rule invoke build_assignment.
15299 (assignment_operator:): Default rules on sub rules.
15300 (force_error): Added documentation on this variable.
15301 (declare_local_variables): Build initialization calling
15302 build_assignment.
15303 (expand_start_java_method): Removed unused rtx declaration. Mark
15304 arguments as already initialized.
15305 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
15306 (java_complete_expand_methods): Don't process next method if
15307 completion of the previous one triggered errors.
15308 (java_complete_expand_method): Call source_end_java_method if no
15309 error were found during completion.
15310 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
15311 locals declaratilon. Handle names found within a class. Return
15312 error_mark_node when things aren't found.
15313 (patch_method_invocation_stmt): Return error_mark_node on failures.
15314 (patch_invoke): Removed unused local. Return the correct node.
15315 (java_complete_tree): Now returns a value. The BLOCK section binds
15316 local identifiers and the type of a BLOCK is now void. Assign the
15317 result of operand completion on COMPOUND_EXPR. Assign the
15318 encapsulated node of a WFL to the result of its completion, except
15319 when the node is an identifier. Now handle MODIFY_EXPR and several
15320 binary operators. Return error_mark_node on errors.
15321 (build_method_invocation, build_assignment, patch_assignment,
15322 build_binop, operator_string, patch_binop): New functions.
15323 * typeck.c (binary_numeric_promotion): New function.
15324
15325 1998-05-21 Per Bothner <bothner@cygnus.com>
15326
15327 * class.c (identifier_subst): New convenience wrapper for ident_subst.
15328 Replace most uses of ident_subst by identifier_subst.
15329
15330 * class.c (push_class_static_dummy_field): Removed function.
15331 (build_class_ref): Find Class object decl by looking up "CNAME.class",
15332 instead of looking got "class" static field. Create that decl here.
15333 (class_identifier_node): Removed; no longer needed.
15334 (init_class_processing): Don't init class_identifier_node.
15335 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
15336 Do nreverse 0 times (instead of twice) for Object and Class.
15337 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
15338
15339 1998-05-20 Per Bothner <bothner@cygnus.com>
15340
15341 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
15342 while initializing linenumber_count and linenumber_table.
15343 Do it before init_function_start (which calls emit_line_note).
15344 * expr.c (expand_byte_code): Don't need to clear lineno here.
15345
15346 1998-05-18 Tom Tromey <tromey@cygnus.com>
15347
15348 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
15349 then mangle number as _N_.
15350
15351 * class.c (mangle_class_field): New function.
15352 (build_class_ref): Set assembler name of class reference using
15353 mangle_class_field.
15354 (push_class_static_dummy_field): Likewise.
15355
15356 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
15357
15358 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
15359 of assigning to TREE_CODE. The latter method exploits a feature
15360 of GCC that is not ANSI compliant.
15361
15362 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15363
15364 * decl.c (pushdecl_force_head): New function.
15365 (pushlevel): Removed conditional printf.
15366 (complete_start_java_method): Don't enter local variable scope if
15367 function is compiled from source code.
15368 * expr.c: parse.h now included
15369 (java_lang_expand_expr): New function.
15370 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
15371 printf. Terminate buffer when doing directories.
15372 * jcf-parse.c (parse_source_file): Call lang_init_source before
15373 parsing and before code generation.
15374 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
15375 use printf if the macro is defined.
15376 * lang.c (lang_init): Install lang_expand_expr hook on
15377 java_lang_expand_expr.
15378 (java_dummy_print): New function.
15379 (lang_init_source): New function.
15380 * lex.c (java_lex): Remember location of an opening brace at the
15381 second nesting level.
15382 (java_is_eol): Unget character seen after a CR if it is EOF.
15383 * parse.h: Now includes lex.h
15384 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
15385 printf if the macro is defined.
15386 (expand_start_java_method, build_expr_block, enter_block,
15387 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
15388 New static function declarations.
15389 (pushdecl_force_head): New extern function declaration.
15390 (INCOMPLETE_TYPE_P): New macro.
15391 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
15392 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
15393 BLOCK_EXPR_ORIGIN): New macros.
15394 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
15395 DECL_SOURCE_LINE_LAST): New macros.
15396 (struct parser_ctxt): Removed field current_method_decl, redundant
15397 with the field current_function_decl. Added fields
15398 first_ccb_indent1 and pending_block.
15399 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
15400 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
15401 tagged <node>
15402 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
15403 (compilation_unit:): Cosmetic on sub rule.
15404 (type_declaration:): Cosmetic on sub rules. Added an error rule.
15405 (variable_initializer:): Installed default rule on expression:.
15406 (method_declaration:): method_header: starts a new
15407 method. method_body: installs the function body, absorbs blocks
15408 emitted for temporary variable scopings, pops function's body block
15409 and merges function's last statement lineno in DECL_SOURCE_LINE.
15410 (method_body:): Installed default rules.
15411 (block:): Call enter_block when an opening brace is seen. Absorb
15412 scoping blocks and call exit_block when a closing brace is seen.
15413 (block_statement:): Cosmetic changes.
15414 (method_invocation:): Create WFL around CALL_EXPR node.
15415 (patch_stage): Added comment around definition.
15416 (method_header): Try to use first_ccb_indent1 as the first line of
15417 the method, so BP debug info are emitted at the first opening
15418 brace of the function. If the function has no body, use the
15419 location of the function's name. Override currently defined method
15420 name with the matching WFL so we can point redefinition errors
15421 using the location where the function's name was declared.
15422 (check_abstract_method_header): Interprets DECL_NAME as an
15423 identifier or as a WFL, accordingly.
15424 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
15425 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
15426 location and name information out of it and reinstall DECL_NAME to
15427 its original identifier node value.
15428 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
15429 function's source code).
15430 (read_import_dir): Test the value returned by find_class and issue
15431 a fatal accordingly.
15432 (declare_local_variables): Push a new block for the scope of the
15433 new variable(s) if code has been already generated at that nesting
15434 level. Pinpoint redefinition errors using the variable id
15435 WFLs. Generate initialization code if necessary. If the variable
15436 type is incomplete, register a patch on its decl.
15437 (source_start_java_method): Rewritten. Define a new block for the
15438 function's parameters. Build parameter decl out of function's
15439 arguments and register them for a patch if their types are
15440 incomplete.
15441 (expand_start_java_method): Includes the part of
15442 source_start_java_method that was pushing the parameter decls and
15443 completing the method start code.
15444 (source_end_java_method): Removed call the expand_end_bindings and
15445 poplevel (already taken care of). Reinstall function's arguments
15446 and get function's last line of code before calling
15447 expand_function_end.
15448 (java_method_add_stmt): New comment before the function's
15449 code. Complement the second operand of the current COMPOUND_EXPR
15450 if necessary.
15451 (java_complete_expand_methods): Don't generate debug info on line
15452 zero when expanding a generated constructor.
15453 (java_complete_expand_method): Set start and end line numbers for
15454 a artificially generated constructor to one and manually call
15455 enter_block and exit_block when defining it. For all methods:
15456 expand function's start calling the new expand_start_java_method
15457 and invoke java_complete_tree on the effective method's body, if
15458 any.
15459 (resolve_expression_name): Now use lookup_name_in_blocks to search
15460 local variable decls and print out an error when variables are
15461 undefined.
15462 (patch_method_invocation_stmt): Inserted comment before the
15463 function's code.
15464 (lookup_method_invoke): Chain method's arguments using chainon
15465 with the current arg list as a second argument. Inserted missing
15466 IDENTIFIER_POINTER when reporting an error on methods not found.
15467 (refine_accessible_methods_list): Don't retain constructors.
15468 (patch_arguments): Function removed.
15469 (java_complete_tree): Inserted comment before the function's
15470 code. New case for BLOCKs. Moved the WFL case a bit
15471 further. Complete function's arguments.
15472 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
15473 maybe_absorb_scoping_blocks): New functions.
15474
15475 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15476
15477 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
15478 previously set.
15479 * jcf-parse.c (parse_source_file, java_error_count): New forward
15480 and extern declarations.
15481 (java_parse_abort_on_error): Macro moved.
15482 (jcf_parse_source): fatal called if fopen fails. Now calls
15483 parse_source_file.
15484 (parse_source_file): New parse_only parameter. Reflects the
15485 elimination of the second pass.
15486 (yyparse): parse_source_file called with argument set to 0.
15487 * jcf.h (JCF_ZERO): Sets java_source to zero.
15488 * lex.c (java_init_lex): pass argument is gone. Function modified
15489 to be called once during the analysis of a file.
15490 (java_unget_unicode): Fixed typo in fatal message.
15491 (java_get_line_col): Likewise.
15492 (java_lval): Likewise. String literals no longer built during
15493 second pass.
15494 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
15495 account.
15496 * parse.h (MODIFIER_WFL): New macro.
15497 (parse_check_super, parser_check_super_interface): Now return int.
15498 (parser_chain_incomplete_item, not_builtin_p,
15499 complete_method_decl): Declarations removed.
15500 (build_method_invocation_stmt, build_invoke): Renamed using the
15501 `patch' instead of `build'
15502 (register-incomplete_type, obtain_incomplete_type,
15503 java_complete_tree, java_complete_expand_method,
15504 unresolved_type_p, create_jdep_list): New function declarations.
15505 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
15506 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
15507 (jdep): New typedef on new struct _jdep.
15508 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
15509 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
15510 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15511 JDEP_RESOLVED_P): New macros.
15512 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
15513 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
15514 JDEP_VARIABLE): New enum values and jdep kinds.
15515 (jdeplist): New typedef on struct _jdeplist.
15516 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
15517 macros.
15518 (CALL_EXPR_PRIMARY): New macro.
15519 (struct parser_ctxt): Fields java_pass, current_method_decl,
15520 method_decl_list deleted. New field jdeplist.
15521 (INCOMPLETE_P): Macro deleted.
15522 * parse.y (single_type_import_declaration:): Removed pass switch.
15523 (type_import_on_demand_declaration): Likewise.
15524 (field_declaration:): Removed pass switch on all sub rules.
15525 (class_declaration:): Call the complete_class_decl removed on
15526 class_body rules.
15527 (method_declaration:): Removed second pass switch. No longer chain
15528 methods decl when method_header reduced.
15529 (method_header:): Sub rules no longer depend on pass switch.
15530 (method_declarator:): Likewise.
15531 (method_body:): Likewise.
15532 (abstract_method_declaration:): Likewise.
15533 (block_statement:): Likewise.
15534 (local_variable_declaration:): Likewise.
15535 (argument_list:): Likewise.
15536 (method_invocation:): Likewise. Call to build_method_invocation_stmt
15537 removed. Partial CLASS_EXPR tree node built instead.
15538 (postfix_expression:): Removed pass switch on all sub rules.
15539 (java_pop_parser_context): Free classd_list content.
15540 (yyerror): Call obstrack_grow0 to finalize error message.
15541 (check_class_interface_creation): Comment modified to reflect new
15542 returned value meaning. Removed second pass switch. Return 1 if an
15543 error was found, 0 otherwise. Adjust pointer on filename if a
15544 leading path separator was found.
15545 (maybe_create_class_interface_decl): Removed first pass switch
15546 when linking the class decl to the class_list. Install a new
15547 jdep_list for the class.
15548 (add_superinterfaces): List of unresolved interfaces is
15549 gone. Unresolved interfaces are directly added to the current
15550 dependencies list.
15551 (create_interface): Second pass shortcut removed.
15552 ctpx->modifier_ctx access through MODIFIER_WFL.
15553 (create_class): Second pass shortcut removed. Call to
15554 register_incomplete_type replaces the call to
15555 parser_chain_incomplete_item.
15556 (complete_class_decl): Function removed.
15557 (duplicate_declaration_error): New way of retrieving redeclared
15558 item type.
15559 (register_fields): Call to lookup_modifier_cl replaced by
15560 MODIFIER_WFL. New way of handling unresolved type, using
15561 unresolved_type_p and obtain_incomplete_type.
15562 register_incomplete_type replaces call to parser_chain_incomplete_item.
15563 (patch_stage): New static global variable.
15564 (method_header): New way of handling unresolved type, using
15565 unresolved_type_p and obtain_incomplete_type. patch_stage used to
15566 indicates that the method decl needs to be patched.
15567 (check_abstract_method_header): Call to lookup_modifier_cl
15568 replaced by MODIFIER_WFL.
15569 (method_declarator): Incomplete argument type are registered
15570 calling register_incomplete_type. Patch on the declared method is
15571 issued in that case.
15572 (unresolved_type_p): New function.
15573 (parser_check_super_interface): New comment to reflect function's
15574 modified returned type (int). Function and has a new argument
15575 this_wfl. Call to parse_error_context uses this_wfl instead of
15576 relying on lookup_cl.
15577 (parser_check_super): Comment reflects function's new returned
15578 type (int). Function returns nonzero value on error.
15579 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
15580 register_incomplete_type, jdep_resolve_class): New functions to
15581 handle incomplete types in declarations.
15582 (java_complete_class): Rewritten to work with the new incomplete
15583 type handling scheme.
15584 (complete_class_report_errors): Likewise.
15585 (complete_method_decl): Removed: it jobs is now handled by
15586 java_complete_class.
15587 (do_resolve_class): Class loaded in not already loaded and not
15588 found in Java source code.
15589 (java_check_regular_methods, java_check_abstract_methods): Don't
15590 call complete_method_decl anymore.
15591 (lookup_modifier_cl, not_builtin_p): Functions deleted.
15592 (read_import_dir): Got rid of the pass number dependency.
15593 (declare_local_variables): New handling of unresolved types (patch
15594 issued).
15595 (source_start_java_method): New parameter level. Function called
15596 with level set to 1 when argument types are potentially
15597 unresolved. Called to complete the job with level set to 2 once
15598 types are complete.
15599 (source_end_java_method): Call to permanent_allocation
15600 removed. Waiting to be replaced by a more suitable obstack
15601 management.
15602 (java_complete_expand_methods, java_complete_expand_method,
15603 java_expand_finals): New functions.
15604 (build_method_invocation_stmt): Renamed
15605 patch_method_invocation_stmt. Extracts function call expression
15606 (wfl) and arguments (args) from CALL_EXPR tree operands.
15607 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
15608 call. Patch the function and argument operand of the CALL_EXPR
15609 tree argument.
15610 (patch_argument, java_complete_tree): New functions.
15611
15612 1998-04-20 Per Bothner <bothner@cygnus.com>
15613
15614 Recover from missing fields and methods (i.e. error instead of fatal).
15615 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
15616 * expr.c (expand_invoke): Recover from missing method.
15617 (expand_java_field_op): Recover from missing field.
15618 Inline references to java.lang.{Integer,Char,...}.TYPE.
15619 * typeck.c (get_type_from_signature), java-tree.h: New function.
15620 * class.c (add_method): Use get_type_from_signature.
15621 (build_class_ref): Handle a class that was not found.
15622 * typeck.c (convert): Handle conversion to pointers (for convenience).
15623 * verify.c (verify_jvm_instructions): Use get_type_from_signature
15624 instead of lookup_field to handle missing fields.
15625
15626 * jcf-parse.c (process_zip_dir): Set java_source.
15627
15628 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
15629
15630 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
15631
15632 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15633
15634 * jcf-parse.c (load_class): Don't change input_filename before
15635 calling jcf_parse_source (but still do it before calling
15636 jcf_parse).
15637 (jcf_parse_source): Assign input_filename after having saved the
15638 parser context.
15639 * lex.c (java_init_lex): Chain a WFL node to the import on demand
15640 list. ctxp->modifier_ctx zeroed according to its new
15641 definition. ctxp->filename initialized. Removed
15642 JAVA_MODIFIER_CTX_UNMARK.
15643 (java_unget_unicode): Update the character based column position.
15644 (java_allocate_new_line): ref_count not used anymore. Always free
15645 ctxp->p_line. Initialize c_line->char_col to 0.
15646 (java_get_unicode): Update the character based column position.
15647 (java_lex): Use ctxp->elc to store current position in source
15648 file, at the beginning of the parsed token. Set modifier_ctx entry
15649 corresponding to the parse modifier to a WFL node. Return a WFL
15650 node when an identifier is parsed.
15651 (java_lex_error): Now uses ctxp->elc to store current position in
15652 source.
15653 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
15654 * lex.h (build_wfl_node): New function definitions.
15655 (struct java_line): ref_count and next fields are gone. New field
15656 char_col.
15657 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
15658 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
15659 (JAVA_COLUMN_DELTA): New macro.
15660 (java_lc): New typedef on new struct _java_lc.
15661 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
15662 (parse_error_context, parse_warning_context): Changed prototypes.
15663 (java_get_line_col): Added as an available global function.
15664 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
15665 (IC_DECL): Replaced by macro IC_TYPE
15666 (DEPEND_WFL): New macro.
15667 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
15668 wrong modifier.
15669 (exit_java_complete_class): Removed a commented out statement.
15670 (struct parser_ctxt): Added comments on fields. modifier_ctx is
15671 now an array of tree nodes. Deleted fields line_list and
15672 e_line. New field elc, to replace e_line.
15673 * parse.y (array_type:): Build WFL node.
15674 (qualified_name:): Build a single WFL node out of two. Retain
15675 the location information of the first node in the resulting node.
15676 (package_declaration:): Use package name as a WFL node
15677 (single_type_import_declaration:): Use imported name as a WFL node.
15678 (type_import_on_demand_declaration:): Use root of the imported
15679 packages as a WFL node.
15680 (field_declaration:): Removed unused local variable cl.
15681 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
15682 (yyerror): New static elc. Removed static error_line, error_pos.
15683 New local code_from_source. Save ctxp->elc into elc at the first
15684 pass. Call java_get_line_col to get a string of the line where
15685 the error occurred.
15686 (debug_line): Removed static function.
15687 (parse_error_context, parse_warning_context): Parameter cl is now
15688 a WFL node. Use its value to initialize ctxp->elc.
15689 (redefinition_error): Parameter cl is now a WFL node.
15690 (parse_add_interface): New parameter wfl. No longer call
15691 lookup_cl, use wfl instead.
15692 (check_class_interface_creation): Parameter cl is now a WFL node.
15693 (maybe_create_class_interface_decl): Likewise.
15694 (add_superinterfaces): New function.
15695 (create_interface): Removed local cl, node, super_decl,
15696 super_decl_type. Function now uses id as a WFL node. Better
15697 warning/error report on obsolete or forbidden mix of
15698 modifiers. Now calls add_superinterfaces to register interfaces.
15699 (create_class): Removed local cl, node. Local variable id is used
15700 as a WFL node. Better error report on forbidden modifier
15701 mix. Uses add_superinterfaces to register interfaces.
15702 (find_field): Argument cl is now a WFL node. Now store the WFL
15703 node of a fields that needs to be checked for their
15704 initialization.
15705 (method_header): Local variable node non longer used. Local
15706 variable id replaces cl.
15707 (check_modifiers_consistency): Local variable cl is now a WFL
15708 node.
15709 (method_declarator): Local variable cl replaced by parameter id.
15710 (parser_qualified_name): Now uses parameter name as a WFL node.
15711 (parser_check_super_interface): New parameter wfl, for achieve
15712 greater accuracy during error reports.
15713 (parser_chain_incomplete_item): New parameter named location. Used,
15714 along the decl, to construct the incomplete item node.
15715 (java_complete_class): resolve_class now uses WFL node extracted
15716 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
15717 where appropriate.
15718 (complete_method_decl): Unresolved function's argument types are WFL.
15719 (resolve_class): Parameter cl is now a WFL node.
15720 (resolve_and_layout): Likewise.
15721 (do_resolve_class): Likewise. Try first to use cl and then do the
15722 lookup on the decl when calling check_pkg_class_access.
15723 (complete_class_report_errors): Use IC_TYPE in place of
15724 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
15725 instead of doing a lookup over the decl.
15726 (java_check_final): Use WFL info from field tree list.
15727 (lookup_cl): Rewritten and returns a statically defined WFL node.
15728 (lookup_modifier_cl): Now uses information from WFL nodes.
15729 (process_imports): Likewise.
15730 (read_import_dir): name and cl arguments replaced by a single WFL
15731 node. Function modified accordingly.
15732 (find_in_imports_on_demand): Now uses WFL node.
15733 (check_pkg_class_access): cl argument is now a WFL node.
15734 (declare_local_variables): Fixed to use WFL nodes.
15735 (resolve_expression_name): Likewise.
15736 (build_method_invocation_stmt): name_combo argument renamed
15737 wfl. Function modified to use WFL nodes.
15738 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
15739 (lookup_method_invoke): cl is now a WFL node. Added missing
15740 IDENTIFIER_POINTER to class type decl name.
15741
15742 1998-04-14 Dave Brolley <brolley@cygnus.com>
15743
15744 * lang.c (init_parse): Now returns char* containing the filename.
15745
15746 1998-04-10 Per Bothner <bothner@cygnus.com>
15747
15748 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
15749
15750 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
15751 * class.c (make_class_data): If flag_assume_compiled, initial class
15752 state is CSTATE_PREPARED; make superclass and interfaces direct
15753 references, rather than constant pool indexes.
15754
15755 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15756
15757 * parser.y: Include flags.h. Removed debug variable pl.
15758 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
15759 (block:): Likewise.
15760 (labeled_statement_nsi:): Generate debug info when reducing
15761 expression_statement:.
15762 (check_pkg_class_access): get_access_flags_from_decl invocation
15763 fixed for new CLASS_* flags location.
15764 (source_end_java_method): Save/restore parser context when
15765 entering/leaving this routine. Restore lineno to its right value
15766 before calling expand_end_bindings.
15767 (build_method_invocation_stmt): build_invoke called with the
15768 current line information.
15769 (build_invoke): New argument cl. Wrap the function call around a
15770 wfl node.
15771 (refine_accessible_methods_list): Changed comment, removed
15772 unnecessary code.
15773 * parse.h: Fixed typo in comments.
15774 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
15775 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
15776 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
15777 parser_ccb_indent.
15778 * lex.c (java_lex): Record the last closing curly bracket of a
15779 function.
15780 * jcf-parse.c (jcf_parse_source): Now calls
15781 java_check_methods. Clarified comment, fixed typo.
15782
15783 1998-04-09 Dave Brolley <brolley@cygnus.com>
15784
15785 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
15786 (finish_parse): Expose for non USE_CPPLIB builds.
15787
15788 1998-04-08 Jeffrey A Law (law@cygnus.com)
15789
15790 * lang.c (lang_print_xnode): New function.
15791
15792 1998-04-03 Per Bothner <bothner@cygnus.com>
15793
15794 * decl.c (class_dtable_decl), java-tree.h: New tree node.
15795 * class.c (get_dispatch_vector, get_dispatch_table): New functions
15796 used to build a class's dispatch table.
15797 (make_class_data): Generate dispatch table if flag_assume_compiled.
15798 Set dtable of class object to address of class_dtable_decl.
15799
15800 * decl.c (int_decl_processing): Make soft_badarrayindex_node
15801 be volatile and have side effects - generates better code.
15802
15803 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
15804 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
15805
15806 * expr.c (expand_invoke): If class is final, method is
15807 effectively final, so can call it directly.
15808
15809 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
15810
15811 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
15812
15813 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
15814
15815 * parse.y (build_method_invocation_stmt): Removed extra argument
15816 to build_invoke.
15817
15818 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15819
15820 * expr.c (dtable_indent): Now static global.
15821 (expand_invoke): Now call invoke_build_dtable and
15822 build_invokevirtual.
15823 (invoke_build_dtable, build_invokevirtual): New functions.
15824 * jcf-io.c (find_class): Defer issuing a warning by setting
15825 jcf->outofsynch to 1.
15826 * jcf-parse.c (jcf_out_of_synch): New function.
15827 (load_class): Test this_jcf.outofsynch flag and call
15828 jcf_out_of_synch accordingly.
15829 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
15830 comment indentation.
15831 * lex.c (java_get_unicode): Fixed code indentation.
15832 (java_lex): Create string literal. Fixed typo. Removed several
15833 premature obstack_free.
15834 * parse.h: New enums for name resolution and invocation mode.
15835 (struct qualification): New data structure.
15836 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
15837 (do_resolve_class, build_method_invocation_stmt,
15838 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
15839 debug_line, identical_subpath_p, invocation_mode,
15840 refine_accessible_methods_list, build_invoke,
15841 lookup_method_invoke): New functions declared.
15842 (build_invokevirtual, invoke_build_dtable, match_java_method,
15843 build_field_ref, jcf_out_of_synch): New references to external
15844 functions.
15845 (struct parse_ctxt): Removed artificial_constructor field.
15846 * parse.y: (array_type:): Type defined for this rule.
15847 (class_type:): Installed default rule for interface_type:.
15848 (array_type:): Now build Java array type.
15849 (qualified_name:): Now use obstack_grow0.
15850 (method_declaration:): Skip the artificial constructor added to
15851 the list, if any.
15852 (abstract_method_declaration:): Execute the code only during pass 1.
15853 (block:): Installed default rule in block_statements:.
15854 (block_statement:): Add the statement to the method during pass 2.
15855 (statement_expression): Installed default rule for
15856 method_invocation:.
15857 (argument_list:): Added code to build the argument list.
15858 (method_invocation:): Added call to create the method invocation
15859 node.
15860 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
15861 (debug_line): New function for debug.
15862 (complete_class_decl): No longer do something during pass 1.
15863 (method_header): Use BUILD_PTR_FROM_NAME.
15864 (parser_qualified_classname): Use obstack_grow0. Removed bogus
15865 obstack_free.
15866 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
15867 function's main comment.
15868 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
15869 classes.
15870 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
15871 (resolve_class): Now works with arrays.
15872 (do_resolve_class, resolve_and_layout): New functions.
15873 (java_check_regular_methods): Reverse method list before and after
15874 having processed it. No longer set ctxp->artificial_constructor.
15875 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
15876 accordingly. Fixed typo in issued error message. Now use
15877 obstack_grow0.
15878 (find_in_imports_on_demand): Now use obstack_grow0.
15879 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
15880 (source_end_java_method): Call expand_expr_stmt instead of
15881 expand_expr. Calls it before calling expand_function_end.
15882 (java_method_add_stmt): Do nothing if errors were found during
15883 parsing.
15884 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
15885 (build_method_invocation_stmt, build_invoke, invocation_mode,
15886 lookup_method_invoke, refine_accessible_methods_list,
15887 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
15888 New functions.
15889 * typeck.c (build_java_signature): Properly end method signature
15890 if return type skipped.
15891 (match_java_method): New function.
15892
15893 1998-03-16 Per Bothner <bothner@cygnus.com>
15894
15895 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
15896
15897 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
15898
15899 * expr.c (build_invoke_non_interface): New function.
15900 (methods_ident, ncode_ident): Now static globals.
15901 (expand_invoke): Use build_invoke_non_interface.
15902 * java-tree.h (struct lang_decl): New field function_decl_body.
15903 (DECL_FUNCTION_BODY): New macro.
15904 * jcf-parse.c (jcf_parse_source): Deeper check before setting
15905 CLASS_FROM_SOURCE_P.
15906 (parse_source_file): Fixed typos. Call java_layout_parsed_class
15907 before starting pass 2. Call to java_generate_parsed_class replaced
15908 by java_register_parsed_class.
15909 * lex.c: Fixed typo in header. Some line width related formating.
15910 * lex.h: Some line width related formating.
15911 * parse.h (source_end_java_method, resolve_expression_name,
15912 complete_class_decl, maybe_create_class_interface_decl,
15913 check_class_interface_creation): New static function declarations.
15914 (java_layout_parsed_class, java_method_add_stmt): New function
15915 declarations.
15916 (struct parser_ctxt): Field mark_class_generate removed. New
15917 fields class_list and artificial_constructor.
15918 * parse.y: Fixed typo in header.
15919 (class_declaration:): Call complete_class_decl when class body
15920 parsed.
15921 (method_declaration:): Call source_end_java_method in pass 2 when
15922 the method body is defined.
15923 (postfix_expression:): Do expression name resolution on sub-rule
15924 name during pass 2.
15925 (create_class, create_interface): Merged common pieces.
15926 (check_class_interface_creation, maybe_create_class_interface_decl):
15927 New functions.
15928 (complete_class_decl): New function.
15929 (register_fields): Fixed line width related typo.
15930 (method_header): Correctly skip first argument when fixing
15931 argument line. Changed the loop.
15932 (java_check_circular_reference): Now use ctxp->class_list.
15933 (java_complete_class): Removed start/stop marking.
15934 (java_check_regular_methods): Now takes a class decl as an
15935 argument. Add default constructor if none were encountered.
15936 (java_check_methods): Now use ctxp->class_list. Changed call to
15937 java_check_regular_methods.
15938 (source_start_java_method): Set DECL_ARG_TYPE for each function
15939 arguments.
15940 (source_end_java_method, java_method_add_stmt): New functions.
15941 (java_generate_parsed_class): No longer exists.
15942 (java_layout_parsed_class, java_register_parsed_class): New functions.
15943 (resolve_expression_name): New function.
15944
15945 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15946
15947 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
15948 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
15949 until pass initializations are done. Call read_import_dir with
15950 pass set to 0.
15951 * parse.h: (lookup_modifier_cl): New function declared.
15952 (INTERFACE_FIELD_MODIFIERS): New macro.
15953 (OBSOLETE_MODIFIER_WARNING): New macro.
15954 * parse.y: (register_fields): Class type and current field name in
15955 local variables. Check modifier(s) if adding field(s) to an interface.
15956 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
15957 and report errors using the faulty modifier line context.
15958 (lookup_modifier_cl): New function.
15959 (read_import_dir): Detect and report default import processing
15960 failure.
15961
15962 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
15963
15964 Add a pair of -fassume-compiled/-fno-assume-compiled options.
15965 * class.c (is_compiled_class): Return 1 after making sure it
15966 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
15967 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
15968 * java-tree.h (flag_assume_compiled): Add decl.
15969 * lang.c (lang_f_options): Add the flag.
15970 (flag_assume_compiled): Add decl, default to 0.
15971
15972 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15973
15974 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
15975 (is_compiled_class): Likewise.
15976 (layout_class): Likewise.
15977 (layout_class): Detect and lay out classes defined in source code.
15978 (interface_of_p, add_interface_do, may_add_interface): New
15979 function.
15980 (add_interface): Now use add_interface_do.
15981 (add_method_1): New function.
15982 (add_method): Now use add_method_1.
15983 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
15984 (complete_start_java_method): New function.
15985 (start_java_mehod): Now call complete_start_java_method.
15986 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
15987 (expand_invoke): Likewise and fixed typo.
15988 *gjava.c: (print_super_field): Use new argument to find_class
15989 DO_CLASS_FILE.
15990 (main): Likewise.
15991 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
15992 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
15993 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
15994 IDENTIFIER_NODE.
15995 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
15996 (add_method_1, push_class): New prototypes.
15997 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
15998 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
15999 directory where the class was found.
16000 (find_class): New argument DO_CLASS_FILE. Function find_class
16001 modified accordingly.
16002 *jcf-parse.c: (fix_class_path): New function.
16003 (load_class): Use new VERBOSE argument. load_class now finds and
16004 loads/parses .class/.java files. Save read_state of current_jcf
16005 if necessary.
16006 (java_parser_abort_on_error): New macro.
16007 (jcf_parse_source, parse_source_file): New function.
16008 (jcf_parse): Fixed typo.
16009 (yyparse): Call parse_source_file () only.
16010 (process_zip_dir): Fixed typo, fix zdir->filename_length when
16011 writing the real class name back in the zip directory entry.
16012 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
16013 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
16014 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
16015 (find_class): Prototype fixed.
16016 *lex.c: Added 1998 time stamp.
16017 Removed all static global variables, moved into the parser
16018 context data structure.. Now include unistd.h if SEEK_SET not
16019 defined.
16020 (java_init_lex): Rewritten.
16021 (java_sneak_unicode): Modified current unicode access in current line.
16022 (java_unget_unicode): Likewise.
16023 (java_allocate_new_line): New allocation management.
16024 (java_read_char): Modified access and storage of unget_utf8_value.
16025 New way of processing current unicode.
16026 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
16027 (java_get_unicode): Now use the parser context.
16028 (java_lineterminator): Likewise.
16029 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
16030 of the reentrant parser implementation. Function now use the
16031 parser context data structure and java_lval. Fixed production of
16032 the float and double constant "out of range" error message. Fixed
16033 obstack use. Return integer value when hitting a modifier. Now
16034 return type for TRUE, FALSE and other predefined types. Return
16035 identifier as a TREE_LIST list containing the current line context
16036 as the TREE_VALUE sub-node.
16037 (java_unicode_2_utf8): Fixed typo in declaration.
16038 (java_lex_error): Now use the parser context data structure.
16039 *lex.h: Added 1998 time stamp.
16040 (struct java_line): New fields ref_count and next.
16041 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
16042 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
16043 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
16044 *parse.h: Added 1998 time stamp.
16045 (java_parse_source_file): Renamed from parse_source_file.
16046 (YYERROR_NOW, YYNOT_TWICE): Fixed.
16047 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
16048 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
16049 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
16050 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
16051 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
16052 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
16053 (struct parser_ctxt): New data structure to keep the parser context.
16054 *parse.y: Added 1998 time stamp, got rid of static global variables.
16055 (java_error_count, ctxp): New global variables.
16056 (%union): New value field.
16057 (numeric_type, integral_type): Rules removed.
16058 (primitive_type): Rule defined to handle integral, float, double and
16059 boolean types.
16060 (qualified_name, package_declaration,
16061 single_type_import_declaration, type_import_on_demand_declaration,
16062 modifiers, class_declaration, super, interfaces,
16063 interface_type_list, class_body, field_declaration,
16064 field_declaration, variable_declarators, variable_declarator,
16065 variable_declarator_id, method_declaration, method_header,
16066 formal_parameter_list, formal_parameter, method_body, block,
16067 static, interface_declaration, extends_interfaces,
16068 abstract_method_declaration, local_variable_declarators): Rules now
16069 define actions.
16070 (force_error, do_warning): New global statics.
16071 (push_parser_context, parser_context_save_global,
16072 parser_context_restore_global, pop_parser_context): New functions.
16073 (yyerror): Now uses the global parser context. Fixed use of obstack.
16074 (parse_error, parse_error_context, parse_warning_context,
16075 java_accstring_lookup, redefinition_error, check_modifiers,
16076 parser_add_interface, create_interface, create_class, find_field,
16077 duplicate_declaration_error, register_fields, method_header,
16078 check_modifiers_consistency, check_abstract_method_header,
16079 method_declarator, parser_qualified_classname,
16080 parser_check_super_interface, parser_check_super,
16081 parser_chain_incomplete_item, java_check_circular_reference,
16082 layout_class_from_source, java_complete_class,
16083 complete_method_decl, resolve_class, complete_class_report_errors,
16084 java_check_final, check_method_redefinition,
16085 java_check_regular_methods, java_check_abstract_methods,
16086 java_check_methods, lookup_java_interface_method2,
16087 lookup_java_method2, lookup_cl, find_name_in_single_imports,
16088 process_imports, find_in_imports, read_import_entry,
16089 read_import_dir, find_in_imports_on_demand,
16090 check_pkg_class_access, not_builtin_p, declare_local_variables,
16091 source_start_java_method, java_generate_parsed_class): New
16092 functions.
16093 *typeck.c: (signature_include_return): New global variable.
16094 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
16095 to add the function returned type in the signature.
16096
16097 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
16098
16099 * jcf-io.c (open_in_zip): Use strncmp and LEN.
16100
16101 1998-01-29 Dave Brolley <brolley@cygnus.com>
16102
16103 * Make-lang.in (java.info): Added.
16104 (java.install-info): Added
16105
16106 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
16107
16108 * Makefile.in (clean): Also remove java/parse.c.
16109
16110 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
16111
16112 Add a pair of -fbounds-check/-fno-bounds-check options.
16113 * lang.c (lang_decode_option): Add code to grok arguments.
16114 (flag_bounds_check): Add decl.
16115 (lang_f_options): New array w/ the option in it.
16116 * java-tree.h (flag_bounds_check): Add decl.
16117 * lang-options.h: New file.
16118 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
16119 of a static macro value.
16120 (JAVA_ARRAY_EXCEPTION): Delete macro.
16121
16122 1998-01-23 Per Bothner <bothner@cygnus.com>
16123
16124 * typeck.c (build_java_array_type): Fix two bugs in previous change.
16125 * expr.c (build_anewarray): Add missing promote_type.
16126
16127 1998-01-22 Per Bothner <bothner@cygnus.com>
16128
16129 Add array types with known length to optimize bounds checking.
16130 * typeck.c (build_java_array_type): Take length parameter.
16131 (java_array_type_length, build_prim_array_type): New functions.
16132 * java-tree.h: Update for new functions.
16133 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
16134 * class.c: Use build_prim_array_type.
16135 * expr.c (can_widen_reference_to): Handle known-length array types.
16136 (verify_jvm_instructions): Keep track of integer push instructions
16137 followed by newarray/anewarray, so we can build known-length arrays.
16138 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
16139 (java_array_data_offset): New function.
16140 (build_java_array_length_access): New function. Optimize if constant.
16141 (build_java_arrayaccess): Constant fold bounds check.
16142 (expand_java_newarray, expand_java_anewarray): Replaced by ...
16143 (build_newarray, build_anewarray): New functions.
16144 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
16145 * verify.c (merge_types): Handle known-lengh array types.
16146
16147 1998-01-19 Per Bothner <bothner@cygnus.com>
16148
16149 * expr.c (expand_byte_code): Fix performace bug, which caused
16150 searching linenumber_table to be linear rather than constant.
16151
16152 1997-12-12 Per Bothner <bothner@cygnus.com>
16153
16154 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
16155
16156 * decl.c, java-tree.h (soft_fmod_node): New global.
16157 * decl.c (init_decl_processing): Define __builtin_fmod.
16158 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
16159 using __builtin_fmod.
16160
16161 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
16162
16163 * keyword.h: New file, output of keyword.gperf as processed by
16164 gperf.
16165 * lex.c (java_lex_init): Initialize java_error_flag.
16166 * parse.c (YYERROR_NOW): Uses java_error_flag.
16167 * parse.y: New static java_error_flag. Useless definition of
16168 buffer_error gone.
16169 * parse.y (java_error): Portable error recovery using
16170 java_error_flag (not yet completely tuned).
16171
16172 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
16173
16174 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
16175
16176 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
16177
16178 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
16179 (parse.c, lex.c, keyword.h): New rules for Java source code
16180 front-end.
16181 * parse.c: Renamed into jcf-parse.c.
16182 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
16183 * keyword.gperf: New file, Java keywords.
16184 * parse.y: New file, Java language grammar.
16185 * parse.h: New file, Java language grammar definitions.
16186 * lex.c: New file, Java language lexer.
16187 * lex.h: New file, Java language lexer definitions.
16188
16189 1997-12-03 Per Bothner <bothner@cygnus.com>
16190
16191 * decl.c (clinit_identifier_node), java-tree.h: New global.
16192 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
16193 * verify.c (verify_jvm_instructions): Inline use of removed macros.
16194 * expr.c (expand_java_field_op): Check for invalid assignment
16195 to final field.
16196
16197 * jcf-reader.c (get_attribute): Test for wrong attribute length.
16198
16199 1997-10-27 Per Bothner <bothner@cygnus.com>
16200
16201 * verify.c (verify_jvm_instructions): When processing a handler,
16202 attempt to set the current_subr to the right value.
16203 (More complicated code combines Sep 17 and Oct 22 versions.)
16204
16205 1997-10-24 Per Bothner <bothner@cygnus.com>
16206
16207 * class.c (push_class): Figure out (guess) name of source file.
16208 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
16209 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
16210 (parse_class_file): Change return type from int to void.
16211 Call debug_start_source_file/debug_end_source_file.
16212
16213 * expr.c (build_java_binop): Fix masking 2nd operand.
16214 * decl.c (init_decl_processing): Set sizetype first.
16215
16216 1997-10-22 Per Bothner <bothner@cygnus.com>
16217
16218 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
16219 (Revert Sep 17 change.)
16220
16221 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
16222
16223 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
16224 .class extension in their name and fix thing so we don't process
16225 them parse_zip_file_entries().
16226 (parse_zip_file_entries): Cleaned unused local variables.
16227
16228 1997-10-20 Per Bothner <bothner@cygnus.com>
16229
16230 * expr.c (can_widen_reference_to): Allows equal array element types.
16231 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
16232 * jcf-dump.c (RET): Get (and print) index.
16233
16234 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
16235 Promote element type to POINTER_TYPE.
16236
16237 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16238
16239 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
16240 find_in_current_zip, jcf_figure_file_type): Moved from
16241 jcf-reader.c to parse.c.
16242 * zextract.c: (read_zip_archive): takes file_comment_length possible
16243 field into account.
16244
16245 1997-10-20 Per Bothner <bothner@cygnus.com>
16246
16247 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
16248
16249 * verify.c (merge_types): Handle array types even better ...
16250
16251 1997-10-17 Per Bothner <bothner@cygnus.com>
16252
16253 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
16254
16255 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
16256 * class.c (make_class_data): Don't build fields_decl if no fields.
16257 When building fields_decl, skip if DECL_ARTIFICIAL.
16258
16259 * expr.c (java_stack_swap): Update stack_type_map.
16260 * verify.c (merge_types): Handle array types better.
16261
16262 1997-10-15 Per Bothner <bothner@cygnus.com>
16263
16264 * class.c (add_field): Don't promote short integral fields to
16265 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
16266 * expr.c (push_value): Promote and convert short integral values.
16267
16268 * decl.c, java-tree.h (integer_two_node): New constant node.
16269 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
16270
16271 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
16272
16273 * class.c (append_gpp_mangled_type): Use function argument
16274 unpromoted type to generate mangled name.
16275
16276 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16277
16278 * constants.c (build_constant_data_ref): Now uses current_class
16279 instead of main_class.
16280 (build_constants_constructor): Now uses current_class instead of
16281 main_class.
16282 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
16283 of the global variable SeepZipFiles done here.
16284 * zextract.c (read_zip_archive): extra_field optional field taken
16285 into account while computing the position of the class file in the
16286 archive.
16287 * verify.c (verify_jvm_instructions): Use current_jcf to search
16288 the constant pool.
16289 * parse.c (load_class): First search for the class to load in the
16290 current zip file. Saves current_jcf (restored before returning
16291 from that function). Don't call JCF_FINISH in the class was found
16292 in the current ZIP file.
16293 (jcf_parse): If the class was found in the current ZIP file, save
16294 its tree_constant_pool (for later reuse).
16295 (parse_class_file): New function. Process each method defined in
16296 the current class and record the class as to be later registered.
16297 (yyparse): Rewritten. Figure the type of the current file and switch
16298 accordingly.
16299 * lang.c: New global variable current_jcf.
16300 (lang_init): Removed compiling_from_source test (done later, in
16301 yyparse). Removed call the jcf_parse ().
16302 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
16303 (typedef struct JCF): New fields seen_in_zip (to mark a class found
16304 in the current ZIP file) and zip_offset (offset to the class data in
16305 the current zip file).
16306 * jcf-reader.c: zipfile.h included.
16307 localToFile: New ZipFileCache static global variable
16308 (parse_zip_file_entries): New function. Browse the current ZIP
16309 file directory and process each class found.
16310 (process_zip_dir): New function. Register each class found in the
16311 ZIP file directory. The class aren't parsed but a valid JCF is
16312 link to each of them.
16313 (find_in_current_zip): New function. Search for a class in the
16314 current ZIP file directory. If found, prepare the class so that it
16315 can be loaded.
16316 (jcf_figure_file_type): New function. Examine the file structure
16317 to figure a class file, a ZIP file. If none of these categories are
16318 matched, a source file is assumed.
16319 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
16320 SeenZipFile: New global variable.
16321 (open_in_zip): Use zipmember's length to accelerate the search for
16322 a member. If zipmember was NULL and zip file successfully read,
16323 return 0.
16324 * java-tree.h: New global variable current_jcf declared. Added
16325 declaration for current_constant_pool_tags, current_constant_pool_data,
16326 current_constant_pool_length, current_constant_pool_data_ref.
16327 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
16328 store the JCF of classes seen in a zip file) and tree *constant_pool
16329 (to save a loaded class constant pool). current_class declared here.
16330 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
16331 retrieve method_ref_constant.
16332 (PUSHC): java_push_constant_from_pool now uses current_jcf.
16333 (OBJECT): get_class_constant now uses current_jcf.
16334 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
16335 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
16336 (expand_invoke): Now uses current_class instead of main_class
16337 (build_class_init): Now uses current_class instead of main_class
16338 * class.c: New static global variable registered_class.
16339 (register_class): New function.
16340 (emit_register_class): Modified to use registered_class instead of
16341 main_class
16342 (is_compiled_class): Now take into account class seen in the archive.
16343
16344 1997-10-06 Per Bothner <bothner@cygnus.com>
16345
16346 * except.h: Renamed to: java-except.h.
16347 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
16348 * except.c: Add semi-working (commented out) implementation.
16349
16350 * expr.c (expand_iinc): Add needed flush_quick_stack.
16351 * parse.c (set_source_filename): New function.
16352 (give_name_to_class): Set input_filename from package.classname.java.
16353
16354 * jcf-io.c (find_class): Don't look first in ".".
16355
16356 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16357
16358 * zextract.c (read_zip_archive): Now takes into account the
16359 extra_field field.
16360 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
16361
16362 1997-09-20 Per Bothner <bothner@cygnus.com>
16363
16364 * constants.c, java-tree.h (build_internal_class_name): New function.
16365 (alloc_class_constant): Re-implement using build_internal_class_name.
16366 * class.c (make_class_data): Likewise.
16367 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
16368
16369 1997-09-17 Per Bothner <bothner@cygnus.com>
16370
16371 * verify.c (verify_jvm_instructions): Temporarily set current_subr
16372 to NULL before pushing an exception handler target.
16373
16374 * expr.c (flush_quick_stack): Save from low stack indexes to high.
16375 (java_stack_swap, java_stack_dup): Re-write to be safe from
16376 clobbering registers.
16377 (build_class_init): New function.
16378
16379 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16380
16381 * typeck.c (build_java_array_type): Temporary use
16382 permanent_obstack to create the array 'length' field.
16383 * expr.c (lookup_label): Temporay use permanent_obstack to create
16384 label if not found.
16385 * class.c (push_super_field): Tempory use permanent_obstack.
16386
16387 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
16388
16389 * typeck.c (type_for_mode): Now handles double_type_node and
16390 float_type_node.
16391 * verify.c (verify_jvm_instructions): The instruction following
16392 the wide bytecode is checked. OPCODE_ret added to the list of
16393 wide.
16394
16395 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
16396
16397 * class.c (make_class): Temporary use permanent_obstack. Set the
16398 class CLASS_P field to 1.
16399 (push_class): Temporary use permanent_obstack.
16400 (set_super_info): Temporary use permanent_obstack.
16401 (add_method): Temporary use permanent_obstack, set
16402 METHOD_TRANSIENT().
16403 (add_field): Temporary use permanent_obstack. Sets
16404 FIELD_VOLATILE() and FIELD_TRANSIENT().
16405 (build_class_ref): Temporary use permanent_obstack if the class
16406 isn't compiled.
16407 (build_static_field_ref): Temporary use permanent_obstack when
16408 creating field's rtl.
16409 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
16410 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
16411 and fields. Function finalized, as far as flag handling.
16412 (push_class_static_dummy_field): Temporary use permanent_obstack.
16413 (emit_register_class): Force generation of class registration at
16414 -O3 or deeper.
16415 * decl.c (end_java_method): Call permanent_allocation() before
16416 returning.
16417 * expr.c (can_widen_reference_to): Added comment to interface
16418 handling, fixed typo.
16419 (lookup_field): Now uses CLASS_P() to correct FIXME
16420 (expand_invoke): Verification on public && !static &&
16421 !abstract moved into soft_lookupinterfacemethod (kaffe).
16422 Use Object class dtable if objectref is an array when expanding
16423 invokeinterface.
16424 (java_push_constant_from_pool): Temporary use permanent_obstack
16425 for CONSTANT_string
16426 * parse.c (get_ref_constant): Temporary use permanent_obstack to
16427 create constant references.
16428 (get_constant): Temporary use permanent_obstack to create constant.
16429 (load_class): Temporary use permanent_obstack to load class.
16430 (jcf_parse): Temporary use permanent_obstack to perform class
16431 layout.
16432 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
16433 (build_java_signature): Temporary use permanent_obstack.
16434 * verify.c: (verify_jvm_instruction): removed unnecessary verification
16435 on ACC_SUPER flag.
16436 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
16437 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
16438 (CLASS_P): Defined
16439
16440 1997-09-11 Per Bothner <bothner@cygnus.com>
16441
16442 * class.c (append_gpp_mangled_type): Fix typo.
16443 (emit_register_class): Use main_class to get class object, rather
16444 than looking for no-longer-existing static decl starting with _CL.
16445 * typeck.c (parse_signature_type): Promote array element type
16446 if it is a RECORD_TYPE.
16447
16448 1997-09-10 Per Bothner <bothner@cygnus.com>
16449
16450 * class.c (push_class_static_dummy_field): New function.
16451 (mangle_static_field): New. Do G++-style mangling of static fields.
16452 (layout_class): Mandle static fields here, not in add_field.
16453 (build_class_ref): The class object is now a dummy static field.
16454 * decl.c (find_local_variable): Look for best, instead of first match.
16455 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
16456 (build_java_athrow): Don't check here if exception is Throwable.
16457 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
16458 (TYPE_USED): Removed. No longer used ...
16459 * parse.c (jcf_parse): Call push_class_static_dummy_field.
16460 * verify.c (push_pending_label): New function.
16461 (push_pending_block): Renamed to check_pending_block.
16462 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
16463 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
16464 re-checking possible handlers) after a store (less wasted work).
16465 Check for null handler (finally) before calling add_handler.
16466 Various changes to (finally?) correctly handle try/finally.
16467
16468 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
16469
16470 * class.c: Include stdio.h.
16471
16472 1997-09-04 Per Bothner <bothner@cygnus.com>
16473
16474 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
16475 to make sure class is initialized before static/special invoke.
16476
16477 * verify.c (verify_jvm_instructions): On a store instruction,
16478 call find_local_variable to force pre-allocation of decl and rtx.
16479 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
16480
16481 1997-09-03 Per Bothner <bothner@cygnus.com>
16482
16483 * class.c (build_class_ref): Strip off "promoted_" if need be.
16484 (make_field_value): Call build_java_signature when needed.
16485 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
16486 * expr.c (build_java_athrow): Don't push_value of exception.
16487 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
16488 match specification of [fd]cmp[lg] for NaNs.
16489 (expand_byte_code): Add support for exception handler ranges.
16490 * except.c: Add skeleton for EH code-generation.
16491 * verify.c (merge_types): Treat all promoted integral types as equal.
16492 * constants.c (build_constants_constructor): To force creation of
16493 current_constant_pool_data_ref, call build_constant_data_ref.
16494
16495 * javaop.def (lload): Fix typo.
16496 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
16497
16498 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
16499
16500 * parse.c: Don't include function.h.
16501
16502 1997-08-27 Per Bothner <bothner@cygnus.com>
16503
16504 * except.[ch]: New files.
16505 * Makefile.in (JAVA_OBJS): Add except.o
16506 * expr.c: Temporary warning about unimplemented exceptions.
16507 * verify.c: Verify exception handlers.
16508
16509 * jcf-dump.c (disassemble_method): Print exception table.
16510
16511 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16512
16513 * expr.c (verify_jvm_instructions): Started a thorough
16514 verification of invoke* bytecodes.
16515 (expand_byte_code): flush quick stack if PC is the target of a
16516 branch. and undef RET (conflicting with config/i386/i386.h).
16517 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
16518 used.
16519 (expand_invoke): Now handles invokeinterface and do more
16520 verification according to the bytecode.
16521 (lookup_field): Don't try to load the class if processing
16522 dtable_type.
16523 (can_widen_reference_to): Now handles interfaces.
16524 * decl.c (init_decl_processing): New global variable
16525 soft_lookupinterfacemethod_node, declared in java-tree.h.
16526 Call set_super_info on string_type_node.
16527 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
16528 defined.
16529 * class.c (set_super_info): Fills the CLASS_* flags according to
16530 access_flags.
16531 (get_access_flags_from_decl): Handles all class flags.
16532
16533 1997-08-26 Per Bothner <bothner@cygnus.com>
16534
16535 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
16536 * parse.c (yyparse): Check for abstract method, and missing code.
16537 * expr.c (expand_byte_code): Change interface.
16538 * lang.c (put_decl_node): Print promoted types prettier.
16539 * verify.c (verify_jvm_instruction): Change interface.
16540 Partial support for scanning exception table.
16541 For load instructions, handle promoted integral types.
16542
16543 1997-08-21 Per Bothner <bothner@cygnus.com>
16544
16545 * verify.c: New file, with contents moved from expr.c.
16546 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
16547 * typeck.c (is_array_type_p): Moved here from expr.c.
16548 * java-tree.h: Add some now-needed function declarations.
16549 * Makefile.in (JAVA_OBJS): Added verify.o.
16550
16551 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
16552
16553 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
16554 METHOD_ABSTRACT flag.
16555
16556 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
16557 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
16558 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
16559
16560 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
16561 variables.
16562 (start_java_method): Hook for SYNCHRONIZED methods.
16563
16564 * expr.c (build_java_jsr, build_java_ret): New functions
16565 (JSR,PRE): New macros
16566 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
16567 (verify_jvm_instructions): tableswitch, lookupswitch,
16568 monitorenter, monitorexit, goto_w: verified.
16569 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
16570 (build_java_monitor): New function.
16571 (MONITOR_OPERATION): Modified to call build_java_monitor()
16572 (verify_jvm_instructions): Started a thorough verification of
16573 invoke* bytecodes.
16574
16575 1997-08-19 Per Bothner <bothner@cygnus.com>
16576
16577 Support verification of jsr/ret subroutines (used for try/finally).
16578 * decl.c (return_address_type_node): New type node.
16579 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
16580 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
16581 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
16582 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
16583 TYPE_USED): New macros for special types in type_map.
16584
16585 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
16586 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
16587 BCODE_JUMP_TARGET.
16588 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
16589
16590 * expr.c (can_widen_reference_to): New function.
16591 (pop_type): Use it.
16592 (merge_type_state): Support handling start of subroutine.
16593 (push_pending_block): Return char* error message, instead of calling
16594 fatal on an error. Also handle subroutines.
16595 (verify_jvm_instructions): Handle errors from push_poending_block.
16596 Support jsr and ret instructions.
16597
16598 1997-08-19 Per Bothner <bothner@cygnus.com>
16599
16600 * jcf-io.c (find_classfile): Fix thinko.
16601 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
16602
16603 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
16604
16605 * Makefile.in (BISON): Remove.
16606
16607 1997-08-07 Per Bothner <bothner@cygnus.com>
16608
16609 * Makefile.in: Convert to autoconf.
16610 * config-lang.in (outputs): Added java/Makefile.
16611
16612 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
16613 Rename cc1java to jc1.
16614
16615 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
16616 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
16617
16618 * class.c (class_depth): Do load_class if needed.
16619
16620 Mostly better verification.
16621 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
16622 (init_decl_processing): Change return type of soft_checkcast.
16623 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
16624 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
16625 lang_print_error): New functions.
16626 (lang_init): Set global hook print_error_function to lang_print_error.
16627 * expr.c: In the type_map ptr_type_node is only used for null now.
16628 (pop_type, merge_types): Hence ptr_type_node matches any reference.
16629 (merge_types): Dererence pointer to record types before comparing.
16630 (decode_newarray_type, merge_types): On error just return NULL.
16631 (build_java_binop): Add preliminary implementation (with warning)
16632 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
16633 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
16634 (expand_compare, expand_java_goto, expand_java_call): Don't
16635 push_pending_block, since that only makes sense when verifying.
16636 (merge_type_state): Different return codes.
16637 (push_pending_block): A block may need to be verified more than once.
16638 (expand_byte_code): Warn about unused code at code generation time.
16639 (verify_jvm_instruction): Changed logic, since code may need to be
16640 re-verified if type-state has changed. Also, better error handling.
16641 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
16642 Improve newarray, anewarray, ?aload, athrow,
16643 * java-tree.h (LABEL_CHANGED): New macro.
16644
16645 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
16646
16647 * decl.c (soft_athrow_node): New global variable initialized.
16648 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
16649 * typeck.c (convert): Added support for REAL_TYPE.
16650 (convert_to_char): New function.
16651 (convert): Handle CHAR_TYPE.
16652 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
16653 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
16654 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
16655 promoted type.
16656 (verify_jvm_instructions): Added break a the end of bogus unop: label.
16657 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
16658 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
16659 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
16660 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
16661 to Use The Right Things.
16662 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
16663 compatible with INT. BOOLEAN is made equivalent to BYTE.
16664 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
16665 OPCODE_ifnonnull): Now supported.
16666 (build_java_athrow): New function.
16667
16668 1997-08-04 Per Bothner <bothner@cygnus.com>
16669
16670 Rename method name <init> to match G++ (and fix mangling).
16671 * class.c (layout_class): Replace method name of <init> by class name.
16672 (make_method_value): Do inverse renaming of constructor from <init>.
16673 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
16674 * typeck.c (lookup_java_constructor): New function.
16675 * expr.c (expand_invoke): If method_name is <init>, call
16676 lookup_java_constructor to find constructor.
16677
16678 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
16679
16680 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16681
16682 * parse.c (get_class_constant): Modified to handle array "classes"
16683 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
16684 wide type.
16685 (convert): Modified to handle real type.
16686 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
16687 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
16688 variables declared.
16689 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
16690 soft_multianewarray, soft_newarray_node, soft_throw_node): New
16691 global variables initialized.
16692 (find_local_variable): Handles the case of a pointer
16693 (end_java_method): Restore the use of one more scope
16694 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
16695 build_java_array_length_access, expand_java_arrayload,
16696 expand_java_arraystore, expand_java_array_length,
16697 expand_java_multianewarray, expand_java_anewarray,
16698 build_java_check_indexed_type, is_array_type_p,
16699 build_java_throw_out_of_bound_exception): New functions.
16700 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
16701 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
16702 OPCODE_<t>aload): Implemented code for verification.
16703 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
16704 ARRAY_NEW_MULTI): Macro defined.
16705 (CONVERT): Modified to invoke convert().
16706 (case OPCODE_aload2): Fixed index typo from 2 to 1.
16707
16708 1997-07-31 Per Bothner <bothner@cygnus.com>
16709
16710 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
16711 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
16712 (make_class_data): Field name needs '/' as package prefix.
16713 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
16714
16715 1997-07-25 Per Bothner <bothner@cygnus.com>
16716
16717 Implement debug information for local variables.
16718 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
16719 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
16720 DECL_LOCAL_SLOT_CHAIN): New macros.
16721 (struct lang_decl_var): New type.
16722 * parse.c (give_name_to_locals): Move to decl.c.
16723 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
16724 (start_java_method): Re-write parameter handling.
16725 (pending_local_decls): New global variable.
16726 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
16727 (find_local_variable): Accept pc so we can skips decls not in range.
16728 (struct binding_level): Add end_pc field.
16729 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
16730 (various): Change so current pc gets passed to find_local_variable.
16731
16732 * decl.c (init_decl_processing): Re-arrange fields in
16733 class_type_node and and method_type_node to match kaffe 0.9.1.
16734 * class.c (make_method_value, make_class_data): Update
16735 initializations to match.
16736
16737 1997-07-16 Per Bothner <bothner@cygnus.com>
16738
16739 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
16740 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
16741 (push_super_field): New function.
16742 (make_class_data): Handle inheritance of class static initializer.
16743 (layout_class): New name mangling.
16744 * constants.c (build_constant_data_ref): Init type of data array
16745 to a one-element array.
16746 (build_constants_constructor): Set DECL_SIZE from complete array type.
16747 * decl.c: Rename class_type, object_type etc to class_type_node,
16748 object_type_node etc. Make former inherit from latter.
16749 * expr.c (expand_invoke): Add cast of function address.
16750 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
16751 * parse.c (yyparse): Don't call layout_class here.
16752 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
16753
16754 1997-06-14 Per Bothner <bothner@cygnus.com>
16755
16756 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
16757 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
16758 (alloc_class_constant): New.
16759 * expr.c (expand_invoke): Make sure method's class is initialized.
16760 * class.c (interits_from_p, emit_register_class): New functions.
16761 * parse.c (yyparse): Call emit_register_class.
16762
16763 1997-06-09 Per Bothner <bothner@cygnus.com>
16764
16765 * constants.c: New file, to handle constant pool.
16766 * Makefile.in (JAVA_OBJS): Add constants.o.
16767 * decl.c (init_decl_processing): Update, fix, finish various structs.
16768 (pushdecl_top_level): New.
16769 * parse.c (layout_class): Moved to class.c.
16770 * expr.c (java_push_constant_from_pool): New function.
16771 * class.c (build_class_ref): Make work fully
16772 (make_class_data): Emit super-class, constant pool, interface vector.
16773
16774 1997-06-03 Per Bothner <bothner@cygnus.com>
16775
16776 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
16777 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
16778 * class.c (class_depth): New function.
16779 (lookup_named_class): Replaced by new function lookup_class.
16780 * decl.c (object_type_node, string_type_node): New.
16781 Remove various types that we no longer need.
16782 * expr.c (verify_jvm_instructions): New separate verifier pass.
16783 (push_type, pop_type): New functions for verifier.
16784 (type_stack_dup, pop_argument_types, merge_types): Likewise.
16785 (expand_byte_code): Simplify, since we assume already verified.
16786 (expand_invoke): Now mostly works.
16787 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
16788 * lang.c (main_class): Move to parse.c. Don't make_class yet.
16789 * parse.c: Wait to allocate class object until we know its name.
16790 (layout_class): Calculate DECL_VINDEX for each virtual method.
16791 * typeck.c (get_array_type): Rename to ...
16792 (build_java_array_type): ... and provide working implementation.
16793 (build_java_signature): New function - build Java signature of type.
16794 (set_java_signature): New function - cache signature with type.
16795 (lookup_java_method): New function.
16796
16797 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
16798
16799 * class.c (ident_subst): Take extra SUFFIX parameter.
16800 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
16801 (set_constant_value, build_static_field_ref, is_compiled_class): New.
16802 (build_class_ref): Actually implement.
16803 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
16804 * decl.c (builtin_function): New.
16805 (init_decl_processing): Update for current Kaffe. Declare some
16806 builtin Kaffe functions.
16807 * expr.c (build_address_of): New.
16808 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
16809 Renamed (from expand_java_new etc), and added working implementations.
16810 (build_field_ref): Now also handle static fields.
16811 (expand_invoke): Implement invokestatic, and start implement rest.
16812 * java-opcodes.h: Use javaop.def to avoid duplicated list.
16813 * javaop.def: Rename invokevirt -> invokevirtual.
16814 * lang.c (use_handles): Removed.
16815 * parse.c: Add support for ConstantValue attribute.
16816 Handle nested loading of a class. (JPOOL_UTF): New.
16817
16818 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
16819
16820 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
16821
16822 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
16823
16824 * Make-lang.in (java.install-man): New empty rule.
16825 * typeck.c (set_local_type): New function.
16826 * expr.c (STORE_INTERNAL): Call find_local_variable,
16827 not find_stack_slot. Call set_local_type.
16828
16829 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
16830
16831 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
16832 and building RECORD_TYPE CONSTRUCTORs.
16833 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
16834
16835 * lang.c (use_handles): Change the default to 0.
16836 * decl.c: Define and build class_type, field_type, utf8const_type.
16837 * class.c (make_class_data, make_field_value,
16838 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
16839 hashUtf8String, strLengthUtf8, mangled_classname:
16840 Functions to build reflective data structures.
16841 * parse.c (yyparse): Call make_class_data.
16842
16843 * jcf-io.c (open_class, find_classfile): New functions.
16844 * jcf-dump.c: Support reading classfile from explicitly-named
16845 class file (without CLASSPATH searching).
16846
16847 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
16848
16849 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
16850 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
16851 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
16852 (get_constant): Now trivial for CONSTANT_Utf8.
16853
16854 * jcf.h: Make NEW_CPOOL the default.
16855 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
16856
16857 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
16858
16859 New directory.