re PR java/18091 (Valgrind errors building libjava)
[gcc.git] / gcc / java / ChangeLog
1 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
2
3 PR java/18091:
4 * jcf-write.c (perform_relocations): Don't call memcpy if source
5 and destination are the same.
6
7 2005-01-17 Tom Tromey <tromey@redhat.com>
8
9 * verify-impl.c (get_short): Sign extend.
10 (get_int): Likewise.
11
12 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
13
14 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
15 with TYPE_SIZE.
16
17 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
18
19 * verify.c: Revert to the version before the BC-ABI merge.
20
21 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
22
23 PR java/19277
24 * check-init.c (check_init): Take care of references that do not
25 have an explicit final variable declaration (e.g. array length
26 access) for pre/post in/de-crement operators.
27
28 2005-01-08 Mark Wielaard <mark@klomp.org>
29
30 * parse.y (process_imports): Allocate (and free) original_name only
31 when not already defined.
32 * jcf-parse.c (read_class): Free results of find_class() and
33 lrealpath().
34 (java_parse_file): Keep pointer to head of file_list and free when
35 done. Free result of lrealpath().
36
37 2005-01-05 Tom Tromey <tromey@redhat.com>
38
39 * gcj.texi (Standard Properties): java.ext.dirs is now used.
40
41 2004-12-20 Andrew Haley <aph@redhat.com>
42
43 * typeck.c: Use fold_convert for ints and booleans.
44
45 2004-12-17 Andrew Haley <aph@redhat.com>
46
47 PR java/18931
48 * typeck.c (convert): Use a CONVERT_EXPR when converting to
49 BOOLEAN_TYPE or CHAR_TYPE.
50 (convert_to_boolean, convert_to_char) : Remove.
51 * convert.h (convert_to_boolean, convert_to_char) : Remove.
52 * expr.c (expand_load_internal): Do type conversion if type is not
53 as required.
54
55 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
56
57 PR target/18459
58 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
59 Update comment.
60
61 2004-12-07 Andrew Haley <aph@redhat.com>
62
63 PR java/18811:
64 * jcf-parse.c (load_class): Remove sanity test for missing inner
65 class file.
66
67 2004-12-06 Tom Tromey <tromey@redhat.com>
68
69 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
70 (java.uninstall): Likewise.
71 (java.maintainer-clean): Likewise.
72 (.INTERMEDIATE): Likewise.
73 (java.install-man): Likewise.
74 (gcj-dbtool.pod): New target.
75 * gcj.texi (Code Generation): Document -findirect-dispatch.
76 (libgcj Runtime Properties): Document
77 gnu.gcj.precompiled.db.path.
78 (Top): Link to "Invoking gcj-dbtool".
79
80 2004-12-06 Tom Tromey <tromey@redhat.com>
81
82 PR java/14853:
83 * java-tree.h (extract_field_decl): Declare.
84 * parse.y (extract_field_decl): Renamed from
85 strip_out_static_field_access_decl. No longer static.
86 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
87
88 2004-12-03 Tom Tromey <tromey@redhat.com>
89
90 * lang.c (flag_new_verifier): Define.
91 (java_post_options): Set flag_new_verifier if indirect dispatch
92 is being used.
93 * lang.opt (fnew-verifier): Removed.
94
95 2004-12-03 Tom Tromey <tromey@redhat.com>
96
97 PR bootstrap/14614:
98 * Make-lang.in (java.install-common): Only install transformed
99 gcjh if gcj-cross exists.
100
101 2004-12-03 Andrew Haley <aph@redhat.com>
102
103 PR java/18812
104 * except.c (link_handler): Patch 'outer' field of siblings of the
105 range we're demoting.
106
107 2004-12-03 Andrew Haley <aph@redhat.com>
108
109 PR java/18697
110 * class.c (layout_class_method): Don't fail to override a method
111 simply because it has DECL_ARTIFICIAL set.
112
113 2004-12-02 Tom Tromey <tromey@redhat.com>
114
115 PR java/16675:
116 * parse.y (craft_constructor): Special case null_pointer_node.
117
118 2004-12-02 Tom Tromey <tromey@redhat.com>
119
120 PR java/18741:
121 * java-gimplify.c (java_gimplify_expr): Don't call
122 SET_EXPR_LOCATION unless wrapped tree is an expression.
123
124 2004-11-27 Per Bothner <per@bothner.com>
125
126 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
127 Fix fencepost error in 'i', which got executed one too many times.
128 Also, fold memcpy into explicit loop, as originally intended.
129 Also, free temporary 'buf' which otherwise leaks.
130
131 2004-11-27 Per Bothner <per@bothner.com>
132
133 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
134 local static variables if not USE_MAPPED_LOCATION.
135
136 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
137
138 * class.c, decl.c, expr.c: Fix comment typos.
139
140 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
141
142 PR java/18305
143 * decl.c (end_java_method): Call
144 attach_init_test_initialization_flags on all the init_decls.
145 * parse.y (attach_init_test_initialization_flags): Move to ...
146 * expr.c (attach_init_test_initialization_flags): here and
147 support BIND_EXPR also.
148 * java-tree.h (attach_init_test_initialization_flags): Prototype.
149 * jcf-parse.c (parse_class_file): Don't disable class init
150 optimization.
151
152 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
153
154 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
155 in diagnostics.
156
157 2004-11-24 Richard Henderson <rth@redhat.com>
158
159 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
160 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
161
162 2004-11-24 Tom Tromey <tromey@redhat.com>
163
164 * verify.c (defer_merging): Don't use C++-style comment.
165 * verify.h (java_opcode): Added java_opcode_end.
166 * class.c (build_class_ref): Remove C++ comment and old FIXME.
167
168 * verify-impl.c (vfy_push_type): Removed bogus "return".
169 (initialize_stack): Use vfy_alloc and vfy_free.
170 (verify_instructions_0): Likewise.
171
172 * Merged gcj-abi-2-dev-branch to trunk.
173
174 2004-11-24 Andrew Haley <aph@redhat.com>
175
176 * jcf-parse.c (parse_class_file): Set file_start_location.
177
178 2004-11-10 Tom Tromey <tromey@redhat.com>
179
180 * class.c (make_field_value): Don't call build_static_field_ref.
181 (build_static_field_ref): Don't emit direct references when using
182 indirect dispatch.
183
184 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
185 -verbose:class into man page synopsis.
186
187 2004-11-09 Tom Tromey <tromey@redhat.com>
188
189 * expr.c (build_java_arraystore_check): Still generate check if
190 element type is itself an array.
191
192 2004-11-08 Tom Tromey <tromey@redhat.com>
193
194 * java-tree.h (soft_check_assignment_node): Removed.
195 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
196 * decl.c (java_init_decl_processing): Don't initialize
197 soft_check_assignment_node.
198
199 2004-11-05 Tom Tromey <tromey@redhat.com>
200
201 * class.c (layout_class_methods): Don't add Miranda methods when
202 using indirect dispatch.
203
204 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
205
206 * class.c (make_class_data): Call emit_assertion_table to set the
207 'assertion_table' field.
208 (build_signature_for_libgcj): Move here from expr.c.
209 (add_assertion_table_entry): New function. Callback for assertion
210 hashtable traversal.
211 (emit_assertion_table): New. Take class argument, and generate
212 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
213 * decl.c (init_decl_processing): Define assertion_entry_type record.
214 Push 'assertion_table' class field instead of 'verify'.
215 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
216 (type_assertion_hash): Include 'assertion_code' in hash.
217 (add_type_assertion): Rewritten. Take class and assertion_code
218 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
219 (can_widen_reference_to): Use new add_type_assertion() arguments.
220 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
221 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
222 (verify_identifier_node): Removed.
223 (assertion_entry_type, assertion_table_type): New.
224 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
225 assertion code definitions.
226 (struct type_assertion): Add assertion_code. Rename 'source_type' and
227 'target_type' to 'op1' and 'op2'.
228 (add_type_assertion): Declare.
229 (lang_printable_name_wls): Remove unused definition.
230 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
231 to emit runtime assertion.
232 (vfy_note_stack_type): Clean up non-C90 declarations.
233 (vfy_note_local_type): Likewise.
234 * verify.h (vfy_is_assignable_from): Declare.
235 * verify-impl.c (is_assignable_from_slow): Remove unused function.
236 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
237 instead of is_assignable_from_slow().
238 (types_compatible): Reinstate ref_compatible() call.
239
240 2004-11-04 Tom Tromey <tromey@redhat.com>
241
242 * class.c (build_static_field_ref): Reverted previous patch.
243
244 * class.c (build_static_field_ref): Don't emit direct references
245 when using indirect dispatch.
246
247 2004-11-03 Tom Tromey <tromey@redhat.com>
248
249 * expr.c (expand_java_arrayload): Set lhs_type_node.
250 (expand_java_arraystore): Set rhs_type_node.
251
252 2004-11-02 Tom Tromey <tromey@redhat.com>
253
254 * jcf-parse.c (compute_class_name): Use filename length from zip
255 directory, not strlen.
256
257 * expr.c (expand_invoke): Mark new interface methods as abstract.
258
259 2004-11-01 Tom Tromey <tromey@redhat.com>
260
261 * verify-impl.c (push_jump): Removed check for uninitialized
262 objects.
263 (push_exception_jump): Likewise.
264 (handle_ret_insn): Likewise.
265 (handle_jsr_insn): Likewise.
266 (state_check_no_uninitialized_objects): Removed.
267
268 * decl.c (check_local_unnamed_variable): Recognize
269 promoted-to-int parameters when using the new verifier.
270 * expr.c (expand_java_arraystore): Explicitly request array type
271 when using new verifier.
272 (expand_java_arrayload): Likewise.
273 (invoke_build_dtable): Don't pass object_type_node as
274 expression argument to build_java_indirect_ref.
275 (build_java_check_indexed_type): Do nothing.
276 (build_java_arraystore_check): Handle case where array doesn't
277 have array type.
278 (build_java_array_length_access): Likewise.
279 (expand_invoke): Handle case where interface overrides a method
280 from Object.
281 (pop_type_0): Always succeed for reference types.
282 (process_jvm_instruction): Don't pop a value in a dead
283 exception handler.
284 (pop_arguments): Convert arguments to correct types.
285
286 2004-10-29 Andrew Haley <aph@redhat.com>
287
288 * jcf-parse.c (give_name_to_class): Remove line that was
289 incorrectly merged.
290
291 2004-10-29 Andrew Haley <aph@redhat.com>
292
293 * jcf-parse.c (set_source_filename): Add code to build new sfname.
294
295 2004-10-20 Andrew Haley <aph@redhat.com>
296
297 * decl.c (end_java_method): Don't expand if flag_syntax_only.
298
299 2004-10-26 Tom Tromey <tromey@redhat.com>
300
301 * verify.h (vfy_notify_verified): Removed.
302 * verify-glue.c (vfy_notify_verified): Removed.
303
304 2004-10-26 Tom Tromey <tromey@redhat.com>
305
306 * verify-impl.c (debug_print_state): Declare `i' before code.
307 (merge_types): Modify `t' when it is null_type.
308
309 2004-10-26 Tom Tromey <tromey@redhat.com>
310
311 * verify-impl.c (type_print): Renamed from print. Now static and
312 takes an argument.
313 (debug_print_state): Use type_print.
314
315 2004-10-25 Tom Tromey <tromey@redhat.com>
316
317 * expr.c (build_invokeinterface): Compute correct offset for
318 index into interface methods.
319
320 2004-10-20 Tom Tromey <tromey@redhat.com>
321
322 * java-tree.h (verify_jvm_instructions_new): Declare.
323
324 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
325 command line.
326
327 * verify-impl.c (verify_instructions): Correctly handle wide
328 types on the stack.
329 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
330 (vfy_get_component_type): Strip pointer types.
331 (vfy_find_class): Use get_type_from_signature. Strip pointer
332 types.
333 Include java-except.h.
334
335 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
336
337 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
338 vfy_push_type_t, set_variable, add_new_state, merge_into,
339 handle_jsr_insn, branch_prepass, check_class_constant,
340 check_wide_constant, get_one_type, compute_static_types,
341 verify_instructions_0): Clean up C99 declarations after statements.
342
343 2004-10-20 Tom Tromey <tromey@redhat.com>
344
345 * verify-impl.c (merge_refs): Compare reference against iterator,
346 not ref2.
347
348 * verify-glue.c (vfy_tag): Mask off resolved flag.
349
350 2004-10-19 Tom Tromey <tromey@redhat.com>
351
352 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
353 (init_state_with_stack): Initialize `this_type' in state.
354 (verify_method): Use debug_print.
355 * verify-glue.c (vfy_is_primitive): Removed debugging print.
356 (vfy_note_stack_depth): Reverted last patch.
357 (vfy_note_stack_type): Note pointer to Object, not Object.
358 (vfy_note_local_type): Likewise.
359
360 * verify.h (vfy_note_instruction_seen): Declare.
361 * verify-glue.c (verify_jvm_instructions_new): Set
362 BCODE_EXCEPTION_TARGET on target instruction.
363 (vfy_note_instruction_seen): New function.
364 * verify-impl.c (FLAG_INSN_SEEN): New define.
365 (verify_instructions_0): Set flag on instruction. Save state for
366 PC=0 later.
367 (verify_instructions): Call vfy_note_instruction_seen.
368
369 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
370 (verify_jvm_instructions_new): Call method_init_exceptions,
371 add_handler, and handle_nested_ranges.
372 * verify-impl.c (verify_method): Return 1 on success.
373 (verify_instructions_0): Save the state at PC=0.
374
375 * verify-impl.c (init_type_from_class): Set is_resolved and
376 ref_next on new ref_intersection.
377 (init_type_from_string): Likewise.
378
379 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
380
381 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
382 if flag_new_verifier is set.
383 * java-tree.h (flag_new_verifier): Declare.
384 * lang.opt (fnew-verifier): New option.
385 * verify-impl.c: Work around namespace pollution by undef'ing
386 'current_class'.
387 (struct verifier_context): Make 'bytecode' const.
388 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
389 (types_compatible): For the BC-ABI, always consider reference types
390 compatible.
391 (check_class_constant): Use vfr->current_class.
392 (check_constant): Likewise.
393 (check_wide_constant): Likewise.
394 (check_field_constant): Check for 'L' at start of type name.
395 (get_one_type): Return pointer instead of type. Set type result in
396 caller via passed type pointer.
397 (compute_argument_types): Update to use new get_one_type arguments.
398 (compute_return_type): Likewise.
399 (make_verifier_context): New. Allocate and initialize 'vfr'.
400 (free_verifier_context): New. Free 'vfr' and its contents.
401 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
402 and free_verifier_context.
403
404 2004-10-15 Tom Tromey <tromey@redhat.com>
405
406 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
407 * verify.h (vfy_fail): Fixed formatting.
408
409 * verify-impl.c (vfr): Fixed comment formatting.
410 (collapse_type): New function.
411 (verify_instructions): Notify compiler about type map.
412 * verify.h (vfy_note_stack_depth): Updated.
413 (vfy_note_stack_type): Likewise.
414 (vfy_note_local_type): Likewise.
415 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
416 Declare.
417 * verify-glue.c (vfy_note_stack_depth): Correctly size type
418 state. Added `method' argument.
419 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
420 argument.
421 (vfy_note_local_type): New function.
422 (vfy_unsuitable_type): Likewise.
423 (vfy_return_address_type): Likewise.
424 (vfy_null_type): Likewise.
425
426 * verify.h (VFY_IN_GCC): Removed.
427 (VFY_WANT_TYPEMAP): Removed.
428 * verify-impl.c (verify_instructions_0): Removed useless "\".
429 (struct state) <next>: Uncomment.
430
431 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
432
433 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
434 C-style.
435
436 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
437
438 * Make-lang.in (verify.o): Re-enabled this target.
439 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
440 (vfy_get_interface): Likewise.
441 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
442 * verify.h (verify_jvm_instructions_new): Declare.
443 * verify-impl.c (free_state): Temporarily comment out unused
444 function.
445
446 2004-10-06 Tom Tromey <tromey@redhat.com>
447
448 * java-tree.h (JV_STATE_READ): New enum value.
449
450 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
451
452 * verify.h: New file.
453
454 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
455
456 * verify-impl.c, verify-glue.c, verify.h: New files.
457 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
458
459 2004-09-24 Andrew Haley <aph@redhat.com>
460
461 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
462 for a slot if it's of pointer type.
463
464 2004-09-14 Tom Tromey <tromey@redhat.com>
465
466 * class.c (make_class_data): Correctly initialize "state" field.
467 Initialize "engine" field.
468 * decl.c (java_init_decl_processing): Add "engine" field.
469
470 2004-09-10 Andrew Haley <aph@redhat.com>
471
472 PR java/12760
473 * expr.c (build_invokeinterface): Use fast method for interface
474 dispatch.
475 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
476 JTI_ITABLE_PTR_TYPE.
477 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
478 (emit_symbol_table): Add new arg, element_size.
479 * decl.c (java_init_decl_processing): Initialize Class.itable.
480 * class.c (GEN_TABLE): New macro.
481 (gen_indirect_dispatch_tables): Use it. Add itable.
482 (make_class_data): Add new arg for emit_symbol_table().
483 Emit itable.
484 (add_miranda_methods): Make sure search_class has been parsed.
485 (emit_symbol_table): Add new arg, element_size.
486
487 2004-09-06 Andrew Haley <aph@redhat.com>
488
489 * verify.c (merge_types): Return Object for all merges of
490 interfaces.
491 * expr.c (add_type_assertion): Don't generate assertions when
492 source type is array of Object.
493
494 2004-09-03 Andrew Haley <aph@redhat.com>
495
496 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
497
498 * lang.c (java_post_options): Force flag_verify_invocations if
499 we're not using indirect dispatch.
500
501 * expr.c (pop_type_0): Move test for interfaces before call to
502 can_widen_reference_to().
503 (build_signature_for_libgcj): Remove generation of canonical array
504 type.
505 (add_type_assertion): Canonicalize both arrays.
506 Don't assert that type X can be assigned to Object.
507 Don't assert that type X an be assigned to type X.
508 Don't assert that Object can be assigned to type X.
509 (can_widen_reference_to): Warn whenever we generate an assertion.
510 (process_jvm_instruction): Use throwable_type_node for the type of
511 an exception class.
512
513 2004-09-01 Andrew Haley <aph@redhat.com>
514
515 * decl.c (java_init_decl_processing): Change
516 verify_identifier_node to "__verify".
517 * expr.c (add_type_assertion): Use verify_identifier_node for name.
518 * java-tree.h (verify_identifier_node): Change to "__verify".
519
520 * expr.c (build_signature_for_libgcj): New function.
521 (add_type_assertion): Use it to construct signatures for
522 source_type and target_type.
523
524 2004-08-27 Andrew Haley <aph@redhat.com>
525
526 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
527 (verify_identifier_node): New.
528 (TYPE_VERIFY_METHOD): New.
529 (struct type_assertion): New type.
530 * expr.c (type_assertion_eq): New function.
531 (type_assertion_hash): New function.
532 (add_type_assertion): New function.
533 (can_widen_reference_to): Call add_type_assertion().
534 * decl.c (java_init_decl_processing): Add verify_identifier_node.
535 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
536 (finish_class): Output TYPE_VERIFY_METHOD (type).
537
538 * decl.c (end_java_method): Nullify unused fields.
539
540 2004-08-17 Andrew Haley <aph@redhat.com>
541
542 * verify.c (defer_merging): Quieten.
543 * jcf-parse.c (load_class): Only try to open a class file if it's
544 java.lang.Object or if it's part of the current compilation.
545 Check that the class we just tried to load is the class we just
546 loaded. Quieten.
547 (java_parse_file): Set flag_verify_invocations off if we're
548 compiling from .class.
549 (parse_zip_file_entries): Abort if we try to read a dummy class.
550 * expr.c (can_widen_reference_to): Quieten.
551 (build_invokevirtual): Abort if we try to invokevirtual an
552 interface.
553 (expand_invoke): Don't build a non-interface call to an interface.
554 (build_instanceof): Don't do premature optimization if
555 flag_verify_invocations is not set.
556 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
557 from superclass.
558 (build_static_field_ref): Add correct type conversion for
559 field_address.
560 (add_miranda_methods): Disable generation of Miranda methods for
561 dummy classes.
562 (layout_class_method): Don't complain about non-static method
563 overrides static method with dummy classes.
564
565 2004-08-13 Tom Tromey <tromey@redhat.com>
566
567 * class.c (build_static_field_ref): Re-enable atable lookups for
568 static fields.
569
570 * parse.y (strip_out_static_field_access_decl): Indentation fix.
571
572 2004-08-11 Tom Tromey <tromey@redhat.com>
573
574 * gcj.texi (libgcj Runtime Properties): Document new properties.
575
576 2004-08-06 Andrew Haley <aph@redhat.com>
577
578 * jcf-parse.c (load_class): Check that we really have loaded the
579 class we're looking for.
580
581 2004-07-19 Andrew Haley <aph@redhat.com>
582
583 * verify.c (verify_jvm_instructions): Comment change only.
584
585 * typeck.c (build_java_array_type): Add size field to array name.
586
587 * java-tree.h (LOCAL_SLOT_P): New.
588 (update_aliases): Add PC argument.
589 (pushdecl_function_level): New function.
590
591 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
592 MODIFY_EXPR, and SAVE_EXPR.
593 (java_gimplify_modify_expr): New function.
594
595 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
596 (expand_iinc): Pass PC to update_aliases().
597 (STORE_INTERNAL): Likewise.
598 (process_jvm_instruction): Likewise.
599
600 * decl.c (base_decl_map): New variable.
601 (uniq): New variable.
602 (update_aliases): Rewrite with more thorough checking.
603 (debug_variable_p): New function.
604 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
605 (check_local_named_variable): Delete whole function.
606 (initialize_local_variable): New function.
607 (check_local_unnamed_variable): Add checks and comments.
608 (find_local_variable): Rewrite.
609 (java_replace_reference): New function.
610 (function_binding_level): New variable.
611 (pushdecl_function_level): New function.
612 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
613 (maybe_pushlevels): Call pushdecl() on each of the new decls.
614 (start_java_method): Reset uniq. Create base_decl_map. Set
615 function_binding_level.
616 (end_java_method): Null unused fields to save memory.
617
618 2004-06-29 Andrew Haley <aph@redhat.com>
619
620 * except.c (expand_start_java_handler): Push a new binding level.
621 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
622 register_exception_range() to register where we'll do it.
623 (expand_end_java_handler): Remove old bogus code. Replace with
624 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
625 the top of the expression we're curently building.
626 (maybe_end_try): Delete.
627 * decl.c (binding_level.exception_range): New field.
628 (clear_binding_level): Add field exception_range. Reformat.
629 (poplevel): Call expand_end_java_handler().
630 (poplevel): Call java_add_stmt only if functionbody is false.
631 (maybe_poplevels): Don't call maybe_end_try() from here.
632 (end_java_method): Clear no longer used trees in function decl.
633 (register_exception_range): New function.
634 * java-tree.h (register_exception_range, struct eh_range): Declare.
635
636 2004-06-22 Andrew Haley <aph@redhat.com>
637
638 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
639 the otable.
640 * check-init.c (get_variable_decl): Teach check-init about
641 FIELD_DECLs addressed via the otable.
642 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
643 CLASS_PARSED_P.
644
645 2004-05-28 Andrew Haley <aph@redhat.com>
646
647 * jcf-parse.c (load_class): Don't try to read a class that we've
648 already read.
649
650 * expr.c (build_invokeinterface): Use the old-fashioned way of
651 doing indirect dispatch: look up interfaces by name.
652 * java-tree.h (enum java_tree_index): Add
653 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
654 * decl.c (java_init_decl_processing): Add
655 soft_lookupinterfacemethodbyname_node.
656
657 * gjavah.c (print_method_info): Final methods have vtable entries,
658 so gjavah needs to output them.
659 * class.c (layout_class_method): Generate vtable entries for final
660 methods.
661 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
662 dispatch, even if a method is final.
663
664 2004-05-25 Andrew Haley <aph@redhat.com>
665
666 * class.c (build_symbol_entry): Convert the names of constructors
667 to init_identifier_node when generating an entry for the indirect
668 dispatch table.
669
670 * expr.c (build_known_method_ref): Generate indirect calls for
671 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
672
673 2004-05-24 Andrew Haley <aph@redhat.com>
674
675 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
676 atable element is of the right type.
677
678 * class.c (build_static_field_ref): Cast pointer to correct type
679 for field.
680
681 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
682
683 * Merged with HEAD as of 20040514. Diff against
684 gcj-abi-2-merge-20040514.
685
686 2004-04-16 Andrew Haley <aph@redhat.com>
687
688 * verify.c (check_pending_block): Disable subroutine checks.
689 (defer_merging): New function.
690 (merge_types): If types are dummy, use defer_merging to combine them.
691 (verify_jvm_instructions): If invocation is invokeinterface and
692 target is dummy, assume target really is an interface.
693
694 * parse.y (patch_invoke): Break out call to java_create_object.
695
696 * lang.c (flag_verify_invocations): New.
697
698 * jcf-parse.c (load_class): If we've already failed to load a
699 class, don't try again.
700 (load_class): If we can't find a .class file, don't fail, but emit
701 a warning.
702 (parse_class_file): Don't act on dummy methods.
703
704 * java-tree.h (flag_verify_invocations): New.
705 (TYPE_DUMMY): New.
706 (lang_type.dummy_class): New field.
707 (java_create_object): New function.
708 (METHOD_DUMMY): New.
709
710 * expr.c (build_field_ref): Widen field offset.
711 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
712 that each of its elements is compatible with the one we're
713 popping.
714 (pop_type_0): Issue a warning to say that we need to generate a
715 runtime check.
716 (java_create_object): New function.
717 (build_field_ref): Only generate hard refs if we're not using
718 indirect dispatch.
719 (expand_java_field_op): If we're using !verify_invocations and we
720 see a missing field, generate a decl for it.
721
722 (expand_invoke): If a class doesn't have the method we seek and
723 we're using !flag_verify_invocations, generate a decl for the
724 method now.
725
726 (build_known_method_ref): Always use indirect dispatch via the
727 atable for static methods.
728
729 (expand_java_NEW): Break out object creation into new function,
730 java_create_object.
731
732 (can_widen_reference_to): Issue a warning to say that we need to
733 generate a runtime check.
734
735 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
736 (make_method_value): Also use index for interfaces.
737 (make_class_data): Skip dummy field for inherited data.
738 Don't build method array for dummy methods.
739 Set size_in_byte to -1 when using inirect dispatch
740 Don't build a hard class ref if we don't have a hard ref to our
741 superclass, or if we're using inirect dispatch.
742 Null out dispatch tables.
743
744 (layout_class_method): Don't complain about non-static method
745 overrides static method is method is artificial.
746
747 (build_static_field_ref): Disable atable references to static
748 fields for the time being.
749
750 (layout_class_methods): Check for CLASS_INTERFACE as
751 well as CLASS_ABSTRACT.
752
753 2004-11-24 Steven Bosscher <stevenb@suse.de>
754
755 * class.c (make_class_data): Don't check flag_inline_functions.
756 * lang.c (flag_really_inline): Remove unused flag.
757 (java_handle_option): Don't set it here. Remove special handling
758 of flag_inline_functions for Java.
759 (java_init): Don't set flag_inline_trees here. Already done...
760 (java_post_options): ...here. Don't clear flag_inline_functions.
761
762 2004-11-24 Steven Bosscher <stevenb@suse.de>
763
764 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
765 (java_gimplify_exit_block_expr): New function.
766 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
767 LABELED_BLOCK_EXPR.
768 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
769 (EXIT_BLOCK_EXPR): Likewise.
770 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
771 (LABELED_BLOCK_BODY): Likewise.
772 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
773 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
774 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
775 TREE_OPERAND.
776 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
777 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
778 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
779 second operand of EXIT_BLOCK_EXPR.
780 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
781 TREE_OPERAND.
782 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
783
784 2004-11-23 Ben Elliston <bje@au.ibm.com>
785
786 * xref.h (xref_flag_value): Remove.
787 (xref_set_data, xref_get_data): Likewise.
788 (xref_set_current_fp): Likewise.
789 (XREF_NONE): Likewise.
790 (XREF_GET_DATA): Likewise.
791 * xref.c (xref_flag_value): Remove.
792 (xref_set_data, xref_get_data): Likewise.
793 (xref_set_current_fp): Likewise.
794
795 2004-11-23 Ben Elliston <bje@au.ibm.com>
796
797 * gjavah.c (output_directory): Make static.
798 (temp_directory): Likewise.
799
800 2004-11-15 Tom Tromey <tromey@redhat.com>
801
802 * decl.c (instn_ptr_type_node): Removed.
803 (lineNumbers_ptr_type_node): Removed.
804 (jint_type): Removed.
805 (jint_ptr_type): Removed.
806
807 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
808
809 PR java/15576
810 * check-init.c (check_init): Ignore DECL_EXPR.
811 * expr.c (always_initialize_class_p): Reenable.
812 (build_class_init): Use a variable to store the decl. Also use
813 boolean_false_node instead of integer_zero_node.
814 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
815 to the block.
816
817 2004-11-08 Tom Tromey <tromey@redhat.com>
818
819 PR java/16843:
820 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
821 generating a JNI header.
822 (print_field_info): Handle JNI headers.
823 (jni_print_float): Likewise.
824 (jni_print_double): Likewise.
825
826 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
827
828 * decl.c (end_java_method): Remove duplicated code.
829
830 2004-11-06 Zack Weinberg <zack@codesourcery.com>
831 Gerald Pfeifer <gerald@pfeifer.com>
832
833 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
834 as well.
835
836 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
837
838 PR java/17265
839 * class.c: Reinstate 2004-08-18 patch.
840 (make_local_function_alias): Don't create an alias for extern (native)
841 functions.
842
843 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
844
845 PR java/17265
846 * class.c (make_local_function_alias): Revert 2004-08-18 change.
847 (make_method_value): Likewise.
848
849 2004-10-21 Andrew Haley <aph@redhat.com>
850
851 PR java/18091:
852 * jcf-parse.c (set_source_filename): Add code to build new sfname.
853
854 2004-10-20 Andrew Haley <aph@redhat.com>
855
856 * decl.c (end_java_method): Don't expand if flag_syntax_only.
857 Remove duplicated code block.
858
859 2004-10-18 Steven Bosscher <stevenb@suse.de>
860
861 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
862 New rules to work around old Bison warnings.
863
864 2004-10-17 Steven Bosscher <stevenb@suse.de>
865
866 * class.c (ident_subst): Always alloca buffer.
867 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
868 opcode after including javaop.def.
869 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
870 conditional expression that exits, to avoid warnings.
871 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
872 a user of an extension.
873 * win32-host.c: Move check down to have non-empty file when
874 WIN32 is not defined.
875
876 * Make-lang.in (java-warn): Add STRICT_WARN.
877 (java/jcf-io.o-warn): Don't have Werror for this file.
878 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
879
880 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
881
882 * expr.c (expr_add_location): Move declaration to before all
883 statements.
884 * parse.y (java_expand_classes): Ditto.
885 * lex.c (java_peek_unicode): Ditto.
886
887 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
888
889 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
890 if possible, else convert `foo' to 'foo'.
891 * class.c: Likewise.
892 * decl.c: Likewise.
893 * expr.c: Likewise.
894 * jcf-io.c: Likewise.
895 * jcf-parse.c: Likewise.
896 * lang.c: Likewise.
897 * lex.c: Likewise.
898 * parse.h: Likewise.
899
900 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
901
902 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
903 rename parameter 'msg' to 'msgid' in function declaration.
904 (issue_warning_error_from_context): Likewise.
905 (yyerror): Rename parameter 'msg' to 'msgid'.
906 (all over): Use new quoting style for diagnostics.
907
908 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
909
910 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
911 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
912 Update copyright.
913
914 2004-10-14 Matt Austern <austern@apple.com>
915
916 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
917 pointer_set_t* now.
918
919 2004-10-13 Tom Tromey <tromey@redhat.com>
920
921 PR java/15578:
922 * lang.opt (--extdirs): Document.
923 * jvspec.c (lang_specific_driver): Recognize -encoding and
924 -extdirs.
925
926 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
927
928 * parse.y (issue_warning_error_from_context): Use va_list *
929 instead of va_list parameter.
930 (parse_error_context): Update call.
931 (parse_warning_context): Likewise.
932
933 2004-10-05 Zack Weinberg <zack@codesourcery.com>
934
935 * parse.y, parse-scan.y: Add list of diagnostic messages to
936 insulate translation template from version of yacc/bison used
937 to compile the grammar.
938
939 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
940
941 Prepare for %q, %< and %> in diagnostic message strings.
942 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
943 Name second parameter 'msgid'.
944 * parse.y: Additionally include pretty-print.h and diagnostic.h.
945 (issue_warning_error_from_context): Use pretty-printer functions
946 instead of vsprintf for constructing formatted messages. Rename
947 parameter 'msg' to 'msgid'.
948 (parse_error_context): Rename parameter 'msg' to 'msgid'.
949 (parse_warning_context): Likewise.
950
951 2004-10-05 Andrew Haley <aph@redhat.com>
952
953 PR java/17779
954 * jcf-parse.c (parse_zip_file_entries): If a class has a
955 superclass and a TYPE_SIZE of zero, lay it out.
956
957 2004-09-30 Andrew Haley <aph@redhat.com>
958
959 PR java/17733
960 * jcf-parse.c (compute_class_name): Rewrite.
961
962 2004-10-01 Jan Hubicka <jh@suse.cz>
963
964 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
965
966 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
967
968 * lex.c: Fix a comment typo.
969
970 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
971
972 * java-tree.h: Fix a comment typo.
973
974 2004-09-30 Per Bothner <per@bothner.com>
975
976 Simplify lexer. Implement --enable-mapped-location support.
977 * jcf-parse.c (parse_class_file): Use linemap_line_start.
978 (parse_source_file_1): Pass filename as extra parameter, so we can call
979 linemap_add and set input_location here, rather than in both callers.
980 (read_class): Pass copied filename to parse_source_file_1.
981 Don't initialize wfl_operator - only needed for source compilation.
982 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
983 * lex.h: Remove a bunch of debugging macros.
984 * lex.h (struct_java_line, struct java_error): Remove types.
985 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
986 (struct java_lc_s): Remove prev_col field.
987 (struct java_lexer): New fields next_unicode, next_columns, and
988 avail_unicode. New position field, and maybe token_start field.
989 Don't need hit_eof field - use next_unicode == -1 instead.
990 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
991 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
992 * parse.h: Various changes for USE_MAPPED_LOCATION.
993 (EXPR_WFL_EMIT_LINE_NOTE): XXX
994 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
995 (struct parser_ctxt): New file_start_location field.
996 Remove p_line, c_line fields since we no longer save lines.
997 Remove elc, lineno, and current_jcf fields - no longer used.
998 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
999 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
1000 source_location and is probably not needed anymore anyway.
1001 Use new expr_add_Location function.
1002 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
1003 (java_pop_parser_context): Minor cleanup.
1004 (java_parser_context_save_global, java_parser_context_restore_global,
1005 java_pop_parser_context): Save/restore input_location as a unit.
1006 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
1007 a source_location instead of a wfl context node.
1008 (check_class_interface_creation): input_filename is not addressable.
1009 (create_artificial_method): Calling java_parser_context_save_global
1010 and java_parser_context_restore_global is overkill. Instead,
1011 temporarily set input_location from class decl.
1012 (java_layout_seen_class_methods): Set input_location from method decl.
1013 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
1014 (finish_loop_body): Likewise.
1015 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
1016 (java_sprint_unicode): Take a character, not index in line.
1017 (java_sneak_uncode): Replaced by java_peek_unicode.
1018 (java_unget_unicode): No longer used.
1019 (java_allocate_new_line. java_store_unicode): Removed, since we
1020 no longer remember "lines".
1021 (java_new_lexer): Update for new data structures.
1022 (java_read_char): Move unget_value checking to java_read_unicode.
1023 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
1024 efficient functions that are used directly when lexing.
1025 (java_read_unicode_collapsing_terminators): No longer needed.
1026 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
1027 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
1028 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
1029 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
1030 combine switch branches, and test for common token kinds earlier.
1031 (java_lex_error): Rewrite.
1032 * jv-scan.c (expand_location): New function, copied from tree.c.
1033 (main): Set ctxp->filename instead of setting input_filename directly.
1034
1035 2004-09-30 Per Bothner <per@bothner.com>
1036
1037 More cleanup for --enable-mapped-location.
1038 * class.c (push_class): If USE_MAPPED_LOCATION don't set
1039 input_location here. Instead do it in give_name_to_class.
1040 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
1041 * expr.c (expand_byte_code): Call linemap_line_start.
1042 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
1043 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
1044 (expr_add_location): New function, if USE_MAPPED_LOCATION.
1045 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
1046 to USE_MAPPED_LOCATION case.
1047
1048 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
1049 * jcf-parse.c (java_parse_file): Don't set input_filename.
1050 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
1051 Create a list of TRANSLATION_UNIT_DECL.
1052 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
1053 reason is so we can set a DECL_SOURCE_LOCATION for each file.
1054 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
1055 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
1056 (file_start_location): New static.
1057 (set_source_filename): Avoid extra access to input_filename macro.
1058 Concatenate new name with class's package prefix.
1059 (set_source_filename, give_name_to_class): Update.
1060 (give_name_to_class): Set class's "line 0" input_location here.
1061 (parse_class_file): Set input_location as a unit.
1062
1063 * jcf-parse.c (load_class): Sanity test if missing inner class file.
1064
1065 2004-09-29 Per Bothner <per@bothner.com>
1066
1067 * java-tree.h: Redefine some macros and add some declaration
1068 to handle the USE_MAPPED_LOCATION case.
1069 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
1070 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
1071 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
1072 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
1073
1074 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
1075 * decl.c (finish_method, java_add_stmt): Likewise.
1076 * java-gimplify.c (java-gimplify.c): Likewise.
1077 * jcf-write.c (generate_bytecode_insns): Likewise.
1078 * lang.c (java_post_options): Likewise - call linemap_add.
1079
1080 2004-09-29 Andrew Haley <aph@redhat.com>
1081
1082 PR java/17007
1083 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
1084 result of TRUNC_MOD_EXPR.
1085 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
1086 * decl.c (java_init_decl_processing): Mark
1087 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
1088
1089 2004-09-28 Tom Tromey <tromey@redhat.com>
1090
1091 PR java/15710:
1092 * class.c (add_miranda_methods): Load superinterface if not
1093 already loaded.
1094
1095 2004-09-28 Andrew Haley <aph@redhat.com>
1096
1097 PR java/17586
1098 * jcf-parse.c (load_class): Don't try to read a class that we've
1099 already read.
1100
1101 2004-09-28 Andrew Haley <aph@redhat.com>
1102
1103 * jcf-parse.c (load_class): Back out previous broken patch.
1104
1105 2004-09-28 Andrew Haley <aph@redhat.com>
1106
1107 PR java/17586
1108 * jcf-parse.c (load_class): Don't try to read a class that we've
1109 already read.
1110 Check that we really did read the right class.
1111
1112 2004-09-25 Tom Tromey <tromey@redhat.com>
1113
1114 PR java/17500:
1115 * parse.y (create_artificial_method): Use add_method_1.
1116
1117 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
1118
1119 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
1120 comment typos.
1121 * gcj.texi: Fix typos.
1122
1123 2004-09-24 Tom Tromey <tromey@redhat.com>
1124
1125 PR java/15656:
1126 * parse.y (class_instance_creation_expression): Set `$$' to NULL
1127 in error parts of rule.
1128 (unary_expression): Don't call error_if_numeric_overflow when $1
1129 is NULL.
1130
1131 2004-09-24 Tom Tromey <tromey@redhat.com>
1132
1133 PR java/16789:
1134 * parse.y (resolve_qualified_expression_name): Set
1135 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
1136 * expr.c (force_evaluation_order): Check for empty argument list
1137 after stripping COMPOUND_EXPR.
1138
1139 2004-09-23 Andrew Haley <aph@redhat.com>
1140
1141 PR java/16927:
1142 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
1143 COND_EXPRs.
1144
1145 2004-09-23 Tom Tromey <tromey@redhat.com>
1146
1147 PR java/17329:
1148 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
1149 where operand is null.
1150
1151 2004-09-23 Tom Tromey <tromey@redhat.com>
1152
1153 PR java/17380:
1154 * parse.y (not_accessible_p): Allow access to protected members
1155 even when class is not static.
1156
1157 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1158
1159 * Make-lang.in: Revert the gcc-none.o change.
1160
1161 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
1162
1163 * parse.y (patch_anonymous_class): VEC_space returns true if there
1164 is space.
1165
1166 2004-09-21 Matt Austern <austern@apple.com>
1167
1168 Fix bootstrap.
1169 * gjavah.c (free_method_name_list): Fix function definition so
1170 it's a proper C prototype.
1171
1172 2004-09-21 Tom Tromey <tromey@redhat.com>
1173
1174 PR java/17575:
1175 * gjavah.c (free_method_name_list): New method.
1176 (main): Call it.
1177
1178 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1179 Zack Weinberg <zack@codesourcery.com>
1180
1181 * java-tree.def: Use tree_code_class enumeration constants
1182 instead of code letters.
1183 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
1184 new tree-class enumeration constants.
1185
1186 2004-09-13 Tom Tromey <tromey@redhat.com>
1187
1188 PR java/17216:
1189 * class.c (layout_class_method): Put synthetic methods into the
1190 vtable.
1191
1192 2004-09-11 Andrew Pinski <apinski@apple.com>
1193
1194 * Make-lang.in (java/ggc-none.c): Change dependency
1195 for ggc.h into $(GGC_H).
1196
1197 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
1198
1199 * Make-lang.in (java/win32-host.o): Add dependency on
1200 coretypes.h.
1201 * win32-host.c: Add includes for coretypes.h, jcf.h
1202
1203 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
1204
1205 * Make-lang.in (GCJH_OBJS): Change dependency from
1206 ggc-none.o to java/ggc-none.o
1207 (JCFDUMP_OBJS): Likewise.
1208 (java/ggc-none.o): New target.
1209
1210 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1211
1212 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
1213 * class.c (build_utf8_ref, build_static_field_ref,
1214 make_field_value, make_method_value, get_dispatch_table,
1215 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1216 * constants.c (get_tag_node, build_ref_from_constant_pool,
1217 build_constants_constructor): Likewise.
1218 * decl.c (java_init_decl_processing): Likewise.
1219 * expr.c (build_java_array_length_access, build_newarray,
1220 expand_java_multianewarray, expand_java_pushc, expand_iinc,
1221 build_java_binop, build_field_ref, expand_java_add_case,
1222 expand_java_call, build_known_method_ref, build_invokevirtual,
1223 build_invokeinterface, build_jni_stub): Likewise.
1224 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1225 * jcf-parse.c (get_constant): Likewise.
1226 * lex.c (do_java_lex): Likewise.
1227 * parse.y (patch_binop, patch_unaryop, patch_cast,
1228 build_newarray_node, patch_newarray): Likewise.
1229 * resource.c (compile_resource_data): Likewise.
1230 * typeck.c (build_prim_array_type): Likewise.
1231
1232 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1233
1234 * decl.c (java_init_decl_processing): Adjust
1235 initialize_sizetypes call.
1236
1237 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
1238
1239 * jv-scan.c (fancy_abort): Add.
1240
1241 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
1242
1243 * expr.c (build_java_arrayaccess): Use convert to change
1244 len's type.
1245
1246 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
1247
1248 * class.c (make_local_function_alias): Allocate extra space for 'L'
1249 in name buffer. Reported by Thomas Neumann.
1250
1251 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
1252
1253 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
1254 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
1255 * lex.c (do_java_lex): Adjust.
1256 (error_if_numeric_overflow): Likewise.
1257
1258 2004-08-18 Andrew Pinski <apinski@apple.com>
1259
1260 * class.c (make_local_function_alias): Only make a new decl if we
1261 support alias attribute on all decls.
1262
1263 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
1264
1265 * class.c (make_local_function_alias): New function. Create local
1266 alias for public method DECL.
1267 (make_method_value): Use make_local_function_alias.
1268 * parse.y (craft_constructor): Don't special-case anonymous classes.
1269 Always set ctor_name to init_identifier_node.
1270 (lookup_method_invoke): Call layout_class_method when creating
1271 anonymous class constructor.
1272
1273 2004-08-18 Richard Henderson <rth@redhat.com>
1274
1275 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
1276 default case. Treat '<' similarly. Update for
1277 is_gimple_formal_tmp_var name change.
1278
1279 2004-08-17 Andrew Haley <aph@redhat.com>
1280
1281 * lang.c (lang_printable_name): Obey verbose flag.
1282 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
1283 lang_printable_name().
1284 (verify_constructor_circularity, get_printable_method_name,
1285 check_abstract_method_definitions, java_check_regular_methods,
1286 java_check_abstract_methods, check_inner_class_access,
1287 fix_constructors, patch_method_invocation, patch_return):
1288 Likewise.
1289 * expr.c (pop_type_0): Likewise.
1290
1291 * java-tree.h (lang_printable_name_wls): Delete.
1292
1293 2004-08-16 Tom Tromey <tromey@redhat.com>
1294
1295 PR java/8473:
1296 * parse.y (primary): Changed for initialized and uninitialized
1297 array creations.
1298 (array_access): Handle array_creation_initialized.
1299 (array_creation_expression): Split into
1300 array_creation_initialized and array_creation_uninitialized.
1301
1302 2004-08-16 Andrew Haley <aph@redhat.com>
1303
1304 * jcf-write.c (find_constant_index): Canonicalize NaNs when
1305 generating bytecode.
1306
1307 2004-08-16 Elliot Lee <sopwith@redhat.com>
1308
1309 PR java/9677
1310 * jcf-parse.c (java_parse_file): Handle filenames with embedded
1311 spaces, and quoted filelists.
1312
1313 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
1314
1315 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
1316 * class.c (build_utf8_ref, build_static_field_ref,
1317 make_field_value, make_method_value, get_dispatch_table,
1318 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1319 * constants.c (get_tag_node, build_ref_from_constant_pool,
1320 build_constants_constructor): Likewise.
1321 * decl.c (java_init_decl_processing): Likewise.
1322 * expr.c (build_java_array_length_access, build_newarray,
1323 expand_java_multianewarray, expand_java_pushc, expand_iinc,
1324 build_java_binop, build_field_ref, expand_java_add_case,
1325 expand_java_call, build_known_method_ref, build_invokevirtual,
1326 build_invokeinterface, build_jni_stub): Likewise.
1327 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1328 * jcf-parse.c (get_constant): Likewise.
1329 * lex.c (do_java_lex): Likewise.
1330 * parse.y (patch_binop, patch_unaryop, patch_cast,
1331 build_null_of_type, patch_newarray): Likewise.
1332 * resource.c (compile_resource_data): Likewise.
1333 * typeck.c (build_prim_array_type): Likewise.
1334
1335 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
1336
1337 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
1338 Don't create BLOCK here or call java_gimplify_block.
1339
1340 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
1341
1342 * java-tree.h (flag_deprecated): Removed.
1343 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
1344 * parse.y (check_deprecation): Check warn_deprecated instead of
1345 flag_deprecated.
1346
1347 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
1348
1349 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
1350 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
1351 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
1352 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
1353 flag_force_classes_archive_check, flag_optimize_sci,
1354 flag_indirect_dispatch): Remove explicit declarations.
1355 * lang.opt: Add implicit declare/define/assign. Remove obsolete
1356 final comment.
1357
1358 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
1359
1360 PR bootstrap/14893
1361 * Make-lang.in (java.install-man): Install from either build
1362 tree or source tree, whichever has the file first.
1363
1364 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
1365
1366 * jcf-parse.c (get_constant): Adjust force_fit_type call.
1367 * lex.h (SET_LVAL_NODE_TYPE): Remove.
1368 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
1369 (do_java_lex): Likewise. Adjust force_fit_type call.
1370
1371 2004-08-04 Roger Sayle <roger@eyesopen.com>
1372 Andrew Haley <aph@redhat.com>
1373
1374 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
1375 checking trees as they're being built.
1376 (convert): Call convert_ieee_real_to_integer if we're
1377 converting a constant, even if we're writing a class file.
1378
1379 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
1380
1381 PR java/16701
1382 * parse.y (fold_constant_for_init): Call resolve_field_access with
1383 correct current_class context.
1384
1385 2004-08-01 Roger Sayle <roger@eyesopen.com>
1386
1387 * decl.c (update_aliases, initialize_local_variable): Replace calls
1388 to build with calls to buildN.
1389 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
1390 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
1391 * parse.h (BUILD_THROW): Likewise.
1392 * parse.y (switch_expression, synchronized_statement,
1393 catch_clause_parameter, array_creation_expression,
1394 conditional_expression, make_qualified_name,
1395 resolve_qualified_expression_name, patch_method_invocation,
1396 patch_invoke, build_method_invocation, build_new_invocation,
1397 build_assignment, patch_assignment, build_binop, patch_binop,
1398 build_string_concatenation, build_incdec, patch_unaryop,
1399 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
1400 patch_return, build_if_else_statement, build_labeled_block,
1401 build_new_loop, build_loop_body, build_bc_statement,
1402 build_assertion, encapsulate_with_try_catch, build_try_statement,
1403 build_try_finally_statement, patch_synchronized_statement,
1404 emit_test_initialization): Likewise, replace build with buildN.
1405
1406 2004-07-28 Eric Christopher <echristo@redhat.com>
1407
1408 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
1409 (java_unsafe_for_reeval): Ditto.
1410
1411 2004-07-26 <hp@bitrange.com>
1412
1413 * parse.y (build_super_invocation): Adjust declaration order to
1414 avoid declaration after statement.
1415
1416 2004-07-25 Bernardo Innocenti <bernie@develer.com>
1417
1418 * decl.c: Rename all identifiers named `class' to `cl'.
1419
1420 2004-07-25 Richard Henderson <rth@redhat.com>
1421
1422 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
1423
1424 2004-07-23 Mike Stump <mrs@apple.com>
1425
1426 * boehm.c (set_bit): Improve type safety wrt unsignedness.
1427 * gjavah.c (throwable_p, decode_signature_piece,
1428 print_full_cxx_name, print_include, add_namelet, add_class_decl,
1429 process_file): Likewise.
1430 * jcf-dump.c (main): Likewise.
1431 * jcf-io.c (read_zip_member): Likewise.
1432 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
1433 give_name_to_class, get_class_constant): Likewise.
1434 * jcf-write.c (find_constant_wide, push_long_const,
1435 generate_classfile): Likewise.
1436 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
1437 * parse.y (read_import_dir): Likewise.
1438 * typeck.c (parse_signature_type): Likewise.
1439 * verify.c (verify_jvm_instructions): Likewise.
1440 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
1441
1442 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
1443
1444 * Make-lang.in: Replace rmic and rmiregistry references with
1445 grmic and grmiregistry.
1446 * gcj.texi: Likewise.
1447
1448 2004-07-20 Andrew Haley <aph@redhat.com>
1449
1450 PR java/16431.
1451 * verify.c (verify_jvm_instructions): Comment change only.
1452
1453 * typeck.c (build_java_array_type): Add size field to array name.
1454
1455 * java-tree.h (LOCAL_SLOT_P): New.
1456 (update_aliases): Add PC argument.
1457 (pushdecl_function_level): New function.
1458
1459 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
1460 MODIFY_EXPR, and SAVE_EXPR.
1461 (java_gimplify_modify_expr): New function.
1462
1463 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
1464 (expand_iinc): Pass PC to update_aliases().
1465 (STORE_INTERNAL): Likewise.
1466 (process_jvm_instruction): Likewise.
1467
1468 * decl.c (base_decl_map): New variable.
1469 (uniq): New variable.
1470 (update_aliases): Rewrite with more thorough checking.
1471 (debug_variable_p): New function.
1472 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
1473 (check_local_named_variable): Delete whole function.
1474 (initialize_local_variable): New function.
1475 (check_local_unnamed_variable): Add checks and comments.
1476 (find_local_variable): Rewrite.
1477 (java_replace_reference): New function.
1478 (function_binding_level): New variable.
1479 (pushdecl_function_level): New function.
1480 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
1481 (maybe_pushlevels): Call pushdecl() on each of the new decls.
1482 (start_java_method): Reset uniq. Create base_decl_map. Set
1483 function_binding_level.
1484 (end_java_method): Null unused fields to save memory.
1485
1486 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
1487
1488 * class.c (add_interface_do): Remove.
1489 (set_super_info, interface_of_p, maybe_add_interface,
1490 add_interface, make_class_data, layout_class,
1491 add_miranda_methods): Adjust BINFO accessors and addition.
1492 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
1493 accessors.
1494 * jcf-write.c (generate_classfile): Likewise.
1495 * parse.y (patch_anonymous_class, check_inner_circular_reference,
1496 check_circular_reference, java_complete_class,
1497 check_abstract_method_definitions,
1498 java_check_abstract_method_definitions,
1499 check_interface_throws_clauses, java_check_abstract_methods,
1500 lookup_java_interface_method2,
1501 find_applicable_accessible_methods_list): Adjust BINFO accessors
1502 and addition.
1503 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
1504
1505 2004-07-18 Roger Sayle <roger@eyesopen.com>
1506
1507 * builtins.c (max_builtin, min_builtin,
1508 java_build_function_call_expr): Replace calls to build with buildN.
1509 * class.c (build_class_ref, build_static_field_ref,
1510 get_dispatch_table, make_class_data, layout_class_method): Likewise.
1511 * constants.c (build_ref_from_constant_pool): Likewise.
1512 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
1513 add_stmt_to_compound): Likewise.
1514 * except.c (build_exception_object_ref, expand_end_java_handler):
1515 Likewise.
1516 * java-gimplify.c (java_gimplify_case_expr,
1517 java_gimplify_default_expr, java_gimplify_block,
1518 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
1519 * jcf-write.c (generate_bytecode_insns): Likewise.
1520 * typeck.c (convert_ieee_real_to_integer): Likewise.
1521
1522 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1523
1524 * java-tree.h (builtin_function): Declare.
1525
1526 2004-07-16 Steven Bosscher <stevenb@suse.de>
1527
1528 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
1529 abuse restore_line_number_status.
1530
1531 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
1532
1533 g++/15861
1534 * jcf-parse.c (java_emit_static_constructor): Specify default
1535 priority.
1536
1537 2004-07-13 Per Bothner <per@bothner.com>
1538
1539 * java-tree.h (all_class_filename): Remove useless macro.
1540 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
1541 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
1542 * parse.y (java_parser_context_restore_global): Replace
1543 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
1544 * jcf-parse.c (read_class, java_parse_file): Likewise.
1545
1546 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
1547
1548 PR java/16474
1549 gjavah.c (print_field_info): Emit constant only if field is static.
1550
1551 2004-07-11 Roger Sayle <roger@eyesopen.com>
1552
1553 * expr.c (java_truthvalue_conversion, flush_quick_stack,
1554 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
1555 build_java_ret, build_java_throw_out_of_bounds_exception,
1556 build_java_array_length_access, java_check_reference,
1557 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
1558 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
1559 expand_java_arrayload, build_java_monitor, expand_java_return,
1560 expand_load_internal, expand_java_NEW, build_get_class,
1561 build_instanceof, expand_java_CHECKCAST, expand_iinc,
1562 build_java_soft_divmod, build_java_binop, build_field_ref,
1563 expand_compare, expand_java_goto, expand_java_switch,
1564 expand_java_add_case, build_class_init, build_known_method_ref,
1565 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
1566 expand_invoke, build_jni_stub, expand_java_field_op,
1567 java_expand_expr, expand_byte_code, STORE_INTERNAL,
1568 force_evaluation_order, emit_init_test_initialization): Convert
1569 calls to "build" into calls to the prefered "buildN" functions.
1570
1571 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1572
1573 * java-tree.h (set_block): Remove.
1574 * lang.c (java_clear_binding_stack): New.
1575 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
1576 * decl.c (struct binding_level): Remove this_block.
1577 (clear_binding_level): Likewise.
1578 (poplevel): Don't handle this_block.
1579 (set_block): Remove.
1580
1581 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
1582
1583 * class.c (common_enclosing_context_p): Remove statement with no
1584 side-effects.
1585
1586 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
1587
1588 PR java/8618
1589 * parse.y (create_anonymous_class): Remove 'location' argument. Use
1590 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
1591 (craft_constructor): Inherit access flags for implicit constructor
1592 from the enclosing class.
1593 (create_class): Fix comment typo.
1594 (resolve_qualified_expression_name): Pass type of qualifier to
1595 not_accessible_p, not the type in which target field was found.
1596 (not_accessible_p): Handle inner classes. Expand protected
1597 qualifier-subtype check to enclosing instances, but don't apply this
1598 check to static members. Allow protected access to inner classes
1599 of a subtype. Allow private access within common enclosing context.
1600 (build_super_invocation): Get WFL line number info from current
1601 class decl.
1602 (build_incomplete_class_ref): Update for new create_anonymous_class
1603 signature.
1604 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
1605 common_enclosing_instance_p.
1606 * class.c (common_enclosing_context_p): New. Determine if types
1607 share a common enclosing context, even across static contexts.
1608 (common_enclosing_instance_p): Renamed from
1609 common_enclosing_context_p. Determines if types share a common
1610 non-static enclosing instance.
1611 * java-tree.h (common_enclosing_instance_p): Declare.
1612 * jcf-write.c (get_method_access_flags): New. Surpress private flag
1613 for inner class constructors.
1614 (generate_classfile): Use get_method_access_flags.
1615
1616 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
1617
1618 * class.c (interface_of_p): Check for null TYPE_BINFO.
1619
1620 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
1621
1622 * class.c (make_class): Do not create binfo here.
1623 (set_super_info): Create it here.
1624 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
1625
1626 2004-07-08 Richard Henderson <rth@redhat.com>
1627
1628 * expr.c (case_identity, get_primitive_array_vtable,
1629 java_expand_expr, emit_init_test_initialization): Remove.
1630 * java-tree.h (java_expand_expr): Remove.
1631 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
1632
1633 2004-07-07 Per Bothner <per@bothner.com>
1634
1635 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
1636 get internal error due to mismatched types.
1637
1638 * gcj.texi (Invoking gij): Document new -verbose:class flag.
1639
1640 * gcj.texi (Linking): New node. Document -lgij usage.
1641
1642 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1643
1644 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
1645 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
1646 * java/class.c (set_super_info, class_depth, interface_of_p,
1647 maybe_add_interface, add_interface, make_class_data,
1648 layout_class, add_miranda_methods): Adjust BINFO macros.
1649 * expr.c (can_widen_reference_to, lookup_field): Likewise.
1650 * jcf-write.c (generate_classfile): Likewise.
1651 * parse.y (patch_anonymous_class,
1652 check_inner_circular_reference, check_circular_reference,
1653 java_complete_class, check_abstract_method_definitions,
1654 java_check_abstract_method_definitions,
1655 check_interface_throws_clauses, java_check_abstract_methods,
1656 lookup_java_interface_method2,
1657 find_applicable_accessible_methods_list): Likewise.
1658 * typeck.c (find_method_in_interface): Likewise.
1659 * verify.c (merge_types): Likewise.
1660
1661 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1662
1663 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
1664 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
1665
1666 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1667
1668 * class.c (make_class): Use make_tree_binfo.
1669 (set_super_info, add_interface_do): Likewise.
1670 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
1671
1672 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
1673
1674 * verify.c: Correct array element access formatting thinko.
1675
1676 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
1677
1678 * verify.c: Insert a short blurb at the start referring to the JVMS.
1679 (merge_type_state): Remove redundant nested if statement.
1680 (verify_jvm_instructions): Ensure current_subr is initialised to
1681 NULL_TREE.
1682 Minor formatting fixes all over the place.
1683
1684 2004-07-02 Richard Henderson <rth@redhat.com>
1685
1686 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
1687
1688 2004-07-01 Richard Henderson <rth@redhat.com>
1689
1690 * class.c (registerClass_libfunc): Remove.
1691 (init_class_processing): Don't set it.
1692 (emit_register_classes): Take list_p parameter. Fill it in
1693 with _Jv_RegisterClass calls.
1694 * decl.c (java_init_decl_processing): Don't call
1695 init_resource_processing.
1696 * jcf-parse.c (java_emit_static_constructor): New.
1697 (java_parse_file): Call it.
1698 * resource.c (registerResource_libfunc): Remove.
1699 (init_resource_processing): Remove.
1700 (write_resource_constructor): Take list_p parameter. Fill it in
1701 with _Jv_RegisterResource calls.
1702 * java-tree.h: Update prototypes.
1703
1704 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
1705
1706 PR java/1262
1707 * class.c (layout_class_method): Do not override package-private
1708 method if its in a different package.
1709 (split_qualified_name): Move here from parse.y. Rename from
1710 breakdown_qualified. Add comment.
1711 (in_same_package): Move here from parse.y. Add comment.
1712 * java-tree.h (break_down_qualified, in_same_package): Declare.
1713 (in_same_package): Likewise.
1714 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
1715 Callers updated.
1716
1717 2004-06-29 Andrew Haley <aph@redhat.com>
1718
1719 * except.c (expand_start_java_handler): Push a new binding level.
1720 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
1721 register_exception_range() to register where we'll do it.
1722 (expand_end_java_handler): Remove old bogus code. Replace with
1723 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
1724 the top of the expression we're curently building.
1725 (maybe_end_try): Delete.
1726 * decl.c (binding_level.exception_range): New field.
1727 (clear_binding_level): Add field exception_range. Reformat.
1728 (poplevel): Call expand_end_java_handler().
1729 (poplevel): Call java_add_stmt only if functionbody is false.
1730 (maybe_poplevels): Don't call maybe_end_try() from here.
1731 (end_java_method): Clear no longer used trees in function decl.
1732 (register_exception_range): New function.
1733 * java-tree.h (register_exception_range, struct eh_range): Declare.
1734
1735 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
1736
1737 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
1738
1739 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
1740
1741 Formatting fixes.
1742 * expr.c (class_has_finalize_method): Fix method name indentation.
1743 (expand_java_call): Remove K&R style parameter declaration.
1744 (expand_invoke): Fix statement indentation.
1745 (expand_java_field_op): Likewise.
1746 * parse-scan.y: Fix typo.
1747 (reset_report): Fix method name indentation.
1748 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
1749 line. Fix typos.
1750 * verify.c (verify_jvm_instructions): Document parameters, insert
1751 page break.
1752 * lang.c (lang_init_source): Fix method name indentation.
1753 * class.c (common_enclosing_context_p): Likewise.
1754 (emit_symbol_table): Fix parameter list indentation.
1755 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
1756 parameter declaration.
1757 * constants.c: Fix copyright notice indentation.
1758 * typeck.c (find_method_in_superclasses): Fix parameter list
1759 indentation.
1760 (find_method_in_interfaces): Likewise.
1761 * zextract.c (makelong): Fix method name indentation.
1762
1763 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
1764
1765 PR java/15715.
1766 * parse.y (create_interface): Set correct access modifiers for
1767 interfaces.
1768 * jcf-write.c (get_classfile_modifiers): New function.
1769 (generate_classfile): Use get_classfile_modifiers, not
1770 get_access_flags.
1771
1772 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
1773
1774 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
1775 dependency to current parser context, not NULL_TREE, for top-level
1776 classes.
1777 (jdep_resolve_class): Enable member access check for all inner
1778 class dependencies.
1779
1780 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
1781
1782 * parse.y (qualify_and_find): Pass type decl, not identifier, to
1783 load_class.
1784
1785 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
1786
1787 PR java/15734
1788 * expr.c (expand_java_field_op): Ensure that target class for static
1789 field access has been loaded.
1790
1791 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
1792 Ranjit Mathew <rmathew@hotmail.com>
1793
1794 PR java/1207, java/16178
1795 * jcf-parse.c (load_class): Return immediately if passed a type decl
1796 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
1797 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
1798 before calling load_class.
1799 (qualify_and_find): Likewise.
1800 (find_in_imports_on_demand): Likewise.
1801 (find_applicable_accessible_methods_list): Likewise.
1802
1803 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
1804
1805 * parse.y (java_layout_seen_class_methods): Don't call load_class
1806 on class defined by source parser.
1807
1808 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
1809
1810 * parse.y (set_nested_class_simple_name_value): Removed.
1811 (java_complete_expand_class): Remove calls to
1812 set_nested_class_simple_name_value.
1813
1814 2004-06-22 Andrew Haley <aph@redhat.com>
1815 Ranjit Mathew <rmathew@hotmail.com>
1816
1817 Fixes PR java/16113.
1818 * decl.c (force_poplevels): Remove call to expand_end_bindings.
1819
1820 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
1821
1822 * parse.y (create_class): Correct diagnostic message about
1823 java.lang.Object extending anything else.
1824
1825 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1826
1827 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
1828 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
1829 * constants.c (build_ref_from_constant_pool): Likewise.
1830 * expr.c (build_java_array_length_access): Likewise.
1831 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
1832 (invoke_build_dtable, build_invokevirtual): Likewise.
1833 (build_invokeinterface, java_expand_expr): Likewise.
1834 (emit_init_test_initialization): Likewise.
1835 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1836 * parse.y (make_qualifed_name, build_array_ref): Likewise.
1837
1838 2004-06-21 Andrew Haley <aph@redhat.com>
1839
1840 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
1841 block.
1842
1843 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
1844
1845 * jcf.h (struct JCF): Change java_source, right_zip and finished
1846 to unsigned int.
1847 * lex.h (struct java_lexer): Change hit_eof, read_anything,
1848 byte_swap and use_fallback to unsigned int.
1849 * parse.h (struct _jdep): Change flag0 to unsigned int.
1850
1851 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
1852
1853 Fixes PR java/13948
1854 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
1855 before trying to lay out its methods.
1856 * jcf-parse.c (read_class): Track parsed files using canonical paths
1857 obtained via lrealpath from libiberty.
1858 (java_parse_file): Likewise.
1859 (parse_source_file_1): Rename formal parameter to reflect its
1860 modified purpose. Minor formatting fix.
1861
1862 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1863
1864 * class.c (emit_register_classes): Make the function uninlinable,
1865 do not set current_function_cannot_inline.
1866 * resource.c (write_resource_constructor): Do not reset
1867 flag_inline_functions around rest_of_compilation.
1868
1869 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
1870
1871 PR java/15769
1872 * expr.c (java_truthvalue_conversion): Handle
1873 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
1874 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
1875 i.e. return the expression.
1876
1877 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
1878
1879 * gjavah.c: Include version.h
1880
1881 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
1882
1883 * jcf-write.c (generate_bytecode_conditional): Correct handling
1884 of unordered conditionals. Add comment.
1885
1886 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
1887 Per Bothner <per@bothner.com>
1888
1889 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
1890 local variable was initialised upon declaration.
1891 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
1892 variable was final and initialised upon declaration.
1893 * check-init.c (check_final_reassigned): Give error only if a blank
1894 final is not definitely unassigned or if an initialised final is
1895 reassigned.
1896 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
1897 assignment expressions. Remove case MODIFY_EXPR, label do_default.
1898 (check_init): Perform initialised-variable-removing-optimisation
1899 only on non-final local variables.
1900
1901 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
1902
1903 * jcf-write.c (generate_bytecode_conditional): Handle binops
1904 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
1905 and LTGT_EXPR.
1906 (generate_bytecode_insns): Likewise.
1907
1908 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
1909
1910 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
1911 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
1912
1913 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
1914
1915 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
1916 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
1917
1918 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
1919
1920 * decl.c (struct binding_level): Add GTY marker. Compile
1921 binding_depth unconditionally.
1922 (current_binding_level, free_binding_level, global_binding_level):
1923 Likewise.
1924 (clear_binding_level): Unconditionally set binding_depth.
1925 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
1926
1927 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
1928
1929 * lex.c (java_new_lexer): Set 'encoding'.
1930 (java_read_char): Improve error message for unrecognized characters.
1931 * lex.h (struct java_lexer): New field 'encoding'.
1932
1933 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1934
1935 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
1936
1937 2004-05-21 Mark Wielaard <mark@klomp.org>
1938
1939 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
1940 extern.
1941
1942 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
1943
1944 * typeck.c: Remove non-printable character 160.
1945
1946 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
1947
1948 * check-init.c: Correct minor typos.
1949
1950 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1951
1952 * Make-lang.in, expr.c, java-gimplify.c: Rename
1953 tree-simple.[ch] to tree-gimple.[ch].
1954
1955 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
1956
1957 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
1958
1959 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1960
1961 Merge from tree-ssa-20020619-branch. See
1962 ChangeLog.tree-ssa for details.
1963
1964 * Make-lang.in, builtins.c, check-init.c, class.c,
1965 constants.c, decl.c, except.c, expr.c, java-except.h,
1966 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
1967 lang.c, lang.opt, parse.y, resource.c: Merged.
1968 * java-gimplify.c: New file.
1969
1970 2004-05-10 Andrew Haley <aph@redhat.com>
1971
1972 * parse.y (create_class): Set TYPE_VFIELD.
1973 * decl.c (java_init_decl_processing): Likewise.
1974
1975 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
1976 * class.c (make_method_value): Replace DECL_VINDEX with call to
1977 get_method_index().
1978 (get_dispatch_vector): Likewise.
1979 (layout_class_method): Likewise.
1980 Replace set of DECL_VINDEX with call to set_method_index().
1981 (set_method_index): New function.
1982 (get_method_index): New function.
1983 * java-tree.h (set_method_index): New function decl.
1984 (get_method_index): New function decl.
1985
1986 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
1987
1988 * parse.y (check_pkg_class_access): Add new argument
1989 and use it when cl is NULL to call lookup_cl on it.
1990 (parser_check_super_interface): Do not call lookup_cl.
1991 Pass this_decl to check_pkg_class_access and NULL
1992 instead of lookup_cl.
1993 (parser_check_super): Update for change in
1994 check_pkg_class_access.
1995 (do_resolve_class): Likewise.
1996 (process_imports): Likewise.
1997 (find_in_imports_on_demand): Likewise.
1998 (resolve_qualified_expression_name): Likewise.
1999
2000 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
2001
2002 Fixes PR java/9685, PR java/15073
2003 * parse.y (accessibility_string): New method.
2004 (not_accessible_field_error): Use accessibility_string()
2005 instead of java_accstring_lookup().
2006 (resolve_qualified_expression_name): Check with
2007 check_pkg_class_access() before allowing access using
2008 qualified names.
2009 Fix comment typo.
2010 Use check_pkg_class_access() instead of not_accessible_p()
2011 for unqualified types.
2012 (not_accessible_p): Use DECL_CONTEXT (member) instead of
2013 REFERENCE for package-private access checking.
2014 (patch_method_invocation): Use accessibility_string() instead
2015 of java_accstring_lookup().
2016
2017 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
2018
2019 Fixes PR java/15133
2020 * gjavah.c (struct method_name): Add member is_native.
2021 (overloaded_jni_method_exists_p): Match candidate method only if
2022 it is native.
2023 (print_method_info): Initialise is_native flag from the method's
2024 access flags.
2025
2026 2004-04-30 Roger Sayle <roger@eyesopen.com>
2027
2028 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
2029 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
2030
2031 2004-04-22 Roger Sayle <roger@eyesopen.com>
2032
2033 * resource.c (write_resource_constructor): Guard call to possibly
2034 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
2035
2036 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
2037
2038 * class.c (make_class_data): Add new field aux_info.
2039 * decl.c (java_init_decl_processing): Push type and decl for
2040 `aux_info'.
2041
2042 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2043
2044 * expr.c (expand_java_NEW): Don't use size argument for
2045 _Jv_AllocObject calls.
2046 * parse.y (patch_invoke): Likewise.
2047
2048 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
2049
2050 * expr.c (build_invokeinterface): Remove unused variables to
2051 fix warnings.
2052
2053 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
2054
2055 * class.c (get_interface_method_index): New function. Return dispatch
2056 index for interface method.
2057 (make_method_value): For interface methods, set index field to
2058 iface dispatch index, not DECL_VINDEX.
2059 * expr.c (build_invokeinterface): Use get_interface_method_index.
2060
2061 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2062
2063 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
2064
2065 2004-03-31 Andrew Haley <aph@redhat.com>
2066
2067 PR java/14104
2068 * jcf-io.c (opendir_in_zip): Tidy up error handling.
2069
2070 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2071
2072 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
2073 form of GTY markers.
2074
2075 2004-03-25 Marcus Meissner <meissner@suse.de>
2076
2077 PR java/14689:
2078 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
2079
2080 2004-03-23 Tom Tromey <tromey@redhat.com>
2081
2082 PR java/14315:
2083 * jcf-write.c (make_class_file_name): Don't report if mkdir
2084 failed with EEXIST.
2085
2086 2004-03-23 Tom Tromey <tromey@redhat.com>
2087
2088 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
2089
2090 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
2091
2092 * class.c, gjavah.c, lang.c: Fix comment typos.
2093 * gcj.texi: Fix typos.
2094
2095 2004-03-19 Per Bothner <per@bothner.com>
2096
2097 * gcj.texi (Code Generation): Document new flags and assert defaults.
2098
2099 * class.c (assume_compiled_node_struct): Rename type to
2100 class_flag_node_struct, as it is now also used for enable_assertions.
2101 Rename assume_compiled_node typedef. Rename excludep field to value.
2102 (find_assume_compiled_node): Rename function to find_class_flag_node.
2103 Minor optimization - avoid needless strlen.
2104 (add_assume_compiled): Some tweaking and optimization.
2105 Rename and generalize to add_class_flag takem an extra parameter.
2106 (add_assume_compled): New just calls add_class_flag.
2107 (add_enable_assert, enable_assertions): New functions.
2108 (enable_assert_tree): New static.
2109 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
2110 * lang.opt (fenable-assertions, fenable-assertions=,
2111 fdisable-assertions, fdisable-assertions=): New options.
2112 * lang.c (java_handle_option): Handle new options.
2113 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
2114 class in an interface - create helper class nested in outer interface.
2115 (build_assertion): Short-circuit if enable_assertions is false.
2116
2117 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2118
2119 * java-tree.h: Changes throughout to add checking to macros
2120 and numerous whitespace changes.
2121 (VAR_OR_FIELD_CHECK): New macro.
2122 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
2123 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
2124
2125 2004-03-16 Per Bothner <per@bothner.com>
2126
2127 * jcf-jump.c (options): New --print-constants option.
2128 * gcj.texi (Invoking jcf-dump): Document --print-constants.
2129
2130 * jcf-dump.c (flag_print_constant_pool): Default to off.
2131 (print_constant_terse_with_index): New helper function.
2132 (various places): Check flag_print_constant_pool where missing.
2133 (main): If verbose set flag_print_constant_pool.
2134 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
2135
2136 2004-03-15 Andrew Haley <aph@redhat.com>
2137
2138 PR java/14581
2139 * parse.y (java_complete_lhs): Check that final variable has an
2140 initializer.
2141
2142 2004-03-12 Andrew Haley <aph@redhat.com>
2143
2144 PR java/14551
2145 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
2146 conversion.
2147
2148 2004-02-29 Roger Sayle <roger@eyesopen.com>
2149
2150 * jcf-parse.c (java_parse_file): Handle the case that input_filename
2151 is NULL.
2152
2153 2004-02-27 Per Bothner <per@bothner.com>
2154
2155 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
2156 suggestion: Use build_incomplete_class_ref.
2157 This fixes PR java/13508, java/11714.
2158
2159 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
2160
2161 * java/parse.h: Update copyright.
2162
2163 2004-02-26 Andrew Haley <aph@redhat.com>
2164
2165 PR java/14231:
2166 * parse.y (check_interface_throws_clauses): Check for
2167 !METHOD_INVISIBLE (iface_method).
2168 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
2169 well as CLASS_ABSTRACT.
2170
2171 2004-02-25 Per Bothner <per@bothner.com>
2172
2173 * parse.y (build_assertion): If we're in an inner class, create the
2174 class$ helper routine in the outer class.
2175
2176 2004-02-19 Richard Henderson <rth@redhat.com>
2177
2178 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
2179
2180 2004-02-16 Geoffrey Keating <geoffk@apple.com>
2181
2182 * Make-lang.in (java.install-man): Add extra dependencies.
2183
2184 2004-02-13 Geoffrey Keating <geoffk@apple.com>
2185
2186 * Make-lang.in: Install man pages under the same names
2187 (possibly transformed) as the program they document.
2188
2189 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
2190
2191 * gjavah.c: Include "intl.h".
2192 (error): New function.
2193 (main): Call gcc_init_libintl.
2194 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
2195 print_stub_or_jni, process_file, main): Use error rather than
2196 fprintf.
2197 (print_method_info, usage, help, version, main): Mark strings for
2198 translation with _. Avoid splitting up sentences. Send
2199 information messages to stdout.
2200 * jcf-dump.c: Include "intl.h".
2201 (main): Call gcc_init_libintl.
2202 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
2203 Mark error, usage and version messages for translation with _.
2204 Avoid splitting up sentences.
2205 * jv-scan.c: Include "intl.h".
2206 (fatal_error, warning): Change parameter s to msgid. Translate
2207 messages.
2208 (main): Call gcc_init_libintl.
2209 (usage, help, version): Mark error, usage and version messages for
2210 translation with _. Avoid splitting up sentences.
2211 * jvgenmain.c: Include "intl.h".
2212 (main): Call gcc_init_libintl.
2213 (usage, main): Mark error messages for translation with _.
2214 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
2215 JVGENMAIN_OBJS): Add intl.o.
2216 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
2217 java/jvgenmain.o): Update dependencies.
2218
2219 2004-02-08 Per Bothner <per@bothner.com>
2220
2221 * parse.y (resolve_qualified_expression_name): In case of inaccessible
2222 class don't use not_accessible_field_error, which can get confused.
2223
2224 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2225
2226 Make-lang.in (po-generated): Delete.
2227
2228 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2229
2230 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
2231 Depend on target.h.
2232 * decl.c: Include target.h.
2233 (start_java_method): Replace PROMOTE_PROTOTYPES with
2234 targetm.calls.promote_prototypes.
2235 * expr.c: Include target.h.
2236 (pop_arguments): Replace PROMOTE_PROTOTYPES with
2237 targetm.calls.promote_prototypes.
2238 * parse.y: Include target.h.
2239 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
2240 with targetm.calls.promote_prototypes.
2241
2242 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2243
2244 * typeck.c: Update copyright.
2245
2246 2004-02-02 Tom Tromey <tromey@redhat.com>
2247
2248 * decl.c (java_init_decl_processing): Remove duplicate
2249 gnu/gcj/RawData.
2250
2251 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
2252
2253 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
2254
2255 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
2256
2257 * expr.c (build_field_ref): Move variable
2258 definition up.
2259
2260 2004-01-28 Andrew Haley <aph@redhat.com>
2261
2262 * expr.c (build_field_ref): Widen field offset.
2263
2264 2004-01-27 Andrew Haley <aph@redhat.com>
2265
2266 java/13273
2267 * parse.y (check_interface_throws_clauses): Make sure class_decl
2268 has been loaded.
2269
2270 2004-01-22 Jeff Sturm <jsturm@one-point.com>
2271
2272 PR java/13733
2273 * parse.y (patch_assignment): Don't modify lhs_type for
2274 reference assignments.
2275
2276 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2277
2278 * Make-lang.in: Replace $(docdir) with doc.
2279 (java.info, java.srcinfo, java.man, java.srcman): New rules.
2280 (java.install-man): Revamp rule.
2281
2282 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2283
2284 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
2285 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
2286 instead of deferred backquote.
2287
2288 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
2289
2290 * typeck.c (find_method_in_interfaces): Move variable
2291 definition up.
2292
2293 2004-01-16 Andrew Haley <aph@redhat.com>
2294
2295 PR java/13273:
2296 * typeck.c (shallow_find_method): New.
2297 (find_method_in_superclasses): New.
2298 (find_method_in_interfaces): New.
2299 (lookup_do): Rewrite.
2300 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
2301
2302 * jcf-parse.c (read_class): Save and restore output_class.
2303 * decl.c (java_expand_body): Set output_class from fndecl.
2304
2305 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
2306
2307 * class.c (gen_indirect_dispatch_tables): Fix string length
2308 calculations.
2309
2310 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2311
2312 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
2313 (java.srcextra): Copy above back to source directory if requested.
2314 (po-generated): Delete reference to $(parsedir).
2315 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
2316 Use implicit rule.
2317
2318 2004-01-14 Jan Hubicka <jh@suse.cz>
2319
2320 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
2321 estimation.
2322
2323 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2324
2325 * java-tree.h (java_expand_expr): Change prototype.
2326 * expr.c (java_expand_expr): Add alt_rtl parameter.
2327
2328 2004-01-09 Andrew Haley <aph@redhat.com>
2329
2330 PR java/12755:
2331 * parse.y (java_fix_constructors): Set output_class.
2332 (java_reorder_fields): Likewise.
2333 (java_layout_classes): Likewise.
2334 (java_expand_classes): Generate indirect dispatch tables.
2335 (java_expand_classes): Set output_class.
2336 (java_finish_classes): Likewise.
2337 * lang.c (java_init): Turn on always_initialize_class_p if we're
2338 using indirect dis[atch.
2339 (java_decl_ok_for_sibcall): Use output_class, not current_class.
2340 (java_get_callee_fndecl): Use class local atable.
2341 * jcf-parse.c
2342 (always_initialize_class_p): Decl moved to java-tree.h.
2343 (HANDLE_CLASS_INFO): Set output_class.
2344 (read_class): Likewise.
2345 (parse_class_file): Call gen_indirect_dispatch_tables.
2346 (parse_zip_file_entries): Set output_class.
2347 (java_parse_file): Set output_class. Don't emit symbol tables.
2348 * java-tree.h (output_class): New.
2349 Remove global declarations for otable, atable, and ctable.
2350 (always_initialize_class_p): moved here from decl.c.
2351 (DECL_OWNER): New.
2352 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
2353 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
2354 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
2355 (struct lang_type): Add otable_methods, otable_decl,
2356 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
2357 ctable_decl, catch_classes, type_to_runtime_map.
2358 * expr.c (build_field_ref): Make otable, atable, and ctable class
2359 local rather than global.
2360 (build_known_method_ref): Likewise.
2361 (build_invokeinterface): Likewise.
2362 (java_expand_expr): Pass runtime type (rather than actual type) to
2363 expand_start_catch.
2364 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
2365 this class. Look up each class in that map to delete duplicates.
2366 (expand_end_java_handler): Pass runtime type (rather than actual
2367 type) to expand_start_catch.
2368 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
2369 (do_nothing): New.
2370 (java_init_decl_processing): Rearrange things. Remove global
2371 declarations of otable, atable, and ctable.
2372 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
2373 (java_expand_body): Set output_class.
2374 * constants.c (build_constant_data_ref): Use output_class, not
2375 current_class.
2376 (alloc_name_constant): Likewise.
2377 * class.c (gen_indirect_dispatch_tables): New.
2378 (build_class_ref): Generate hard reference to superclass, even if
2379 using indirect dispatch.
2380 (build_static_field_ref): Use class local atable.
2381 (make_class_data): Generate hard reference to superclass, even if
2382 using indirect dispatch.
2383 Generate symbolic references to interfaces when using indirect
2384 dispatch.
2385 (make_class_data): Emit otable, atable, and ctable.
2386 Make otable, atable, and ctable class local rather than global.
2387 (emit_catch_table): Make otable, atable, and ctable class local
2388 rather than global.
2389
2390 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
2391
2392 * parse.y (catch_clause_parameter): Fix typo.
2393
2394 PR java/13404
2395 * parse.y: (catch_clause_parameter): Return early if $3, aka
2396 formal_parameter, is null.
2397
2398 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
2399
2400 * class.c: Remove uses of "register" specifier in
2401 declarations of arguments and local variables.
2402 * decl.c: Likewise.
2403 * expr.c: Likewise.
2404 * gjavah.c: Likewise.
2405 * jcf-dump.c: Likewise.
2406 * jcf-io.c: Likewise.
2407 * jcf-parse.c: Likewise.
2408 * jcf-write.c: Likewise.
2409 * keyword.h: Likewise.
2410 * parse.y: Likewise.
2411 * typeck.c: Likewise.
2412 * verify.c: Likewise.
2413
2414 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
2415
2416 * Make-lang.in (GCJ_CROSS_NAME): Delete.
2417 (java.install_common, java.install-man): Adjust for above.
2418 (java.uninstall): Likewise.
2419
2420 2003-12-03 Michael Koch <konqueror@gmx.de>
2421
2422 * class.c (make_class_data):
2423 Push field value to 'hack_signers' instead of 'signers'.
2424 * decl.c (java_init_decl_processing):
2425 Push field 'hack_signers' instead of 'signers'.
2426
2427 2003-12-03 Zack Weinberg <zack@codesourcery.com>
2428
2429 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
2430 including iconv.h.
2431
2432 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
2433
2434 PR java/12374:
2435 * parse.y (qualify_ambiguous_name): Remove lots of broken
2436 field access processing - there's no need to do that here,
2437 because we have resolve_field_access. Remove
2438 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
2439 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
2440 used.
2441
2442 2003-12-01 Jeff Sturm <jsturm@one-point.com>
2443
2444 Fix PR java/13237
2445 * parse.y (java_complete_lhs): Save location prior to patching
2446 CALL_EXPR.
2447
2448 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
2449
2450 PR java/12548
2451 * resource.c (write_resource_constructor): Append
2452 "_resource" to constructor identifier name.
2453
2454 2003-11-25 Jeff Sturm <jsturm@one-point.com>
2455
2456 Fix PR java/13183.
2457 * constants.c (cpool_for_class): New function.
2458 (outgoing_cpool): Remove global variable.
2459 (alloc_name_constant): Use cpool_for_class.
2460 (build_constants_constructor): Likewise.
2461 * decl.c (java_expand_body): Set current_class.
2462 * java-tree.h (outgoing_cpool) Remove declaration.
2463 (init_outgoing_cpool): Likewise.
2464 * jcf-parse.c (init_outgoing_cpool): Remove function.
2465 (parse_class_file): Don't call init_outgoing_cpool.
2466 * parse.y (java_complete_expand_methods): Don't call
2467 init_outgoing_cpool. Don't save outgoing_cpool.
2468 (java_expand_classes): Don't restore outgoing_cpool.
2469 (java_finish_classes): Likewise.
2470
2471 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
2472
2473 * Make-lang.in: (java.install-common) Add
2474 symlink for $(target_noncanonical)-gcjh for
2475 native builds.
2476
2477 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
2478
2479 * Make-lang.in (java.extraclean): Delete.
2480
2481 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
2482
2483 * Make-lang.in (check-java): Add.
2484
2485 2003-11-19 Jeff Sturm <jsturm@one-point.com>
2486
2487 Fix PR java/13024.
2488 * except.c (prepare_eh_table_type): Allocate variable-sized
2489 buffer `buf' with alloca.
2490
2491 2003-11-17 Jeff Sturm <jsturm@one-point.com>
2492
2493 Fix PR java/12857.
2494
2495 decl.c (java_init_decl_processing): Don't initialize
2496 class_not_found_type_node, no_class_def_found_type_node.
2497
2498 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
2499 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
2500 (class_not_found_type_node, no_class_def_found_type_node):
2501 Don't define.
2502
2503 parse.y (build_dot_class_method_invocation): Add this_class
2504 argument. Qualify method invocations to a different class.
2505 (create_new_parser_context): Initialize saved_data_ctx to 0.
2506 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
2507 (build_dot_class_method): Don't load classes. Register
2508 incomplete types.
2509 (build_incomplete_class_ref): Special cases for interfaces
2510 and inner classes. Move build_dot_class_method call to here...
2511 (patch_incomplete_class_ref): ...from here. Pass current_class
2512 to build_dot_class_method_invocation.
2513 (build_assertion): Pass class_type to
2514 build_dot_class_method_invocation.
2515 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
2516
2517 2003-11-17 Jeff Sturm <jsturm@one-point.com>
2518
2519 Fix PR java/12739.
2520 * java-tree.h (BLOCK_EMPTY_P): Define.
2521 * parse.y (java_complete_lhs): Check for empty blocks
2522 in TRY_FINALLY_EXPR case.
2523
2524 2003-11-17 Andrew Haley <aph@redhat.com>
2525
2526 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
2527 (struct lang_decl_var:freed): New variable.
2528 * decl.c (poplevel): Mark local vars that have gone out of scope.
2529 (push_jvm_slot): Don't use the RTL of a var that has gone out of
2530 scope.
2531
2532 2003-11-16 Jason Merrill <jason@redhat.com>
2533
2534 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
2535 and TAGS files that include them for each front end.
2536
2537 2003-11-15 Tom Tromey <tromey@redhat.com>
2538
2539 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
2540
2541 2003-11-12 Jason Merrill <jason@redhat.com>
2542
2543 PR optimization/12547
2544 * lang.c (java_tree_inlining_walk_subtrees): Just walk
2545 BLOCK_EXPR_BODY directly.
2546
2547 2003-11-12 Andrew Haley <aph@redhat.com>
2548
2549 PR java/11045
2550 * parse.y (fold_constant_for_init): Check that we really do have a
2551 constant.
2552
2553 PR java/11533
2554 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
2555 init_test_decls being inlined.
2556
2557 PR java/12890:
2558 * parse.y (do_resolve_class): Check return value from
2559 breakdown_qualified().
2560
2561 2003-11-11 Tom Tromey <tromey@redhat.com>
2562
2563 PR java/12915:
2564 * parse.y (merge_string_cste): Handle case where we have a
2565 pointer that happens to be zero, not null_pointer_node.
2566
2567 2003-11-10 Tom Tromey <tromey@redhat.com>
2568
2569 * jcf-parse.c (classify_zip_file): Correctly compare
2570 filename_length against length of manifest file's name.
2571
2572 2003-11-08 Tom Tromey <tromey@redhat.com>
2573
2574 PR java/12894:
2575 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
2576
2577 2003-11-06 Andrew Haley <aph@redhat.com>
2578
2579 * expr.c (java_stack_swap): Make sure destination stack slots are
2580 of the correct type.
2581
2582 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
2583
2584 * Make-lang.in (dvi): Move targets to $(docobjdir).
2585 (gcj.dvi): Simplify rule and adjust target.
2586 (gcj.info): Simplify rule.
2587 (gcj.pod): New intermediate rule.
2588 (gcjh.pod): Likewise.
2589 (jv-scan.pod): Likewise.
2590 (jcf-dump.pod): Likewise.
2591 (gij.pod): Likewise.
2592 (jv-convert.pod): Likewise.
2593 (rmic.pod): Likewise.
2594 (rmiregistry.pod): Likewise.
2595 (gcj.1): Delete.
2596 (gcjh.1): Delete.
2597 (jv-scan.1): Delete.
2598 (jcf-dump.1): Delete.
2599 (gij.1): Delete.
2600 (jv-convert.1): Delete.
2601 (rmic.1): Delete.
2602 (rmiregistry.1): Delete.
2603
2604 2003-11-02 Jeff Sturm <jsturm@one-point.com>
2605
2606 Fixes PR java/12866.
2607 * parse.y (resolve_qualified_expression_name): Move test
2608 for outer field access methods from here...
2609 (check_thrown_exceptions) ...to here.
2610
2611 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
2612
2613 * .cvsignore: Delete.
2614
2615 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
2616
2617 * verify.c (verify_jvm_instructions): Don't warn about legal
2618 eh binding regions generated for example by jdk 1.4.1.
2619
2620 2003-10-24 David S. Miller <davem@redhat.com>
2621
2622 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
2623
2624 2003-10-22 Andrew Haley <aph@redhat.com>
2625
2626 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
2627 (java_get_callee_fndecl): New.
2628
2629 * jcf-parse.c (java_parse_file): Call emit_catch_table().
2630
2631 * java-tree.h (ctable_decl): New.
2632 (catch_classes): New.
2633 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
2634
2635 * decl.c (java_init_decl_processing): Add catch_class_type.
2636 Add ctable_decl.
2637 Add catch_classes field.
2638
2639 * class.c (build_indirect_class_ref): Break out from
2640 build_class_ref.
2641 (make_field_value): Check flag_indirect_dispatch.
2642 (make_class_data): Ditto.
2643 Tidy uses of PUSH_FIELD_VALUE.
2644 Add field catch_classes.
2645 (make_catch_class_record): New.
2646
2647 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
2648
2649 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
2650
2651 * jcf-write.c: Follow spelling conventions.
2652 * parse.y: Likewise.
2653
2654 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
2655
2656 * ChangeLog: Fix typos.
2657 * expr.c: Fix comment typos.
2658 * jcf-write.c: Likewise.
2659 * lang.c: Likewise.
2660 * lex.c: Likewise.
2661 * mangle.c: Likewise.
2662 * parse-scan.y: Likewise.
2663 * parse.y: Likewise.
2664
2665 2003-10-22 Tom Tromey <tromey@redhat.com>
2666
2667 * expr.c (expand_byte_code): Only warn about dead bytecode when
2668 extra_warnings is set.
2669
2670 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
2671
2672 Fix for PR java/12586.
2673 * mangle.c (find_compression_record_match): Don't iterate through
2674 package namespace elements unless they all match compression_table
2675 entries.
2676
2677 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
2678
2679 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
2680 (generate-manpages): Likewise.
2681 (java.maintainer-clean): Likewise.
2682 (gcj.info): Likewise.
2683 (gcj.1): Likewise.
2684 (gcjh.1): Likewise.
2685 (jv-scan.1): Likewise.
2686 (jcf-dump.1): Likewise.
2687 (gij.1): Likewise.
2688 (jv-convert.1): Likewise.
2689 (rmic.1): Likewise.
2690 (rmiregistry.1): Likewise.
2691 (java.install-man): Likewise.
2692 (parse-scan.o): Move and define complete compile line.
2693 (parse.o): Likewise.
2694 (jcf-tree-inline.o): Move.
2695
2696 2003-10-20 Mark Mitchell <mark@codesourcery.com>
2697
2698 * Make-lang.in (info): Update dependencies.
2699 (java.install-info): Remove.
2700 ($(srcdir)/java/gcj.info): Replace with ...
2701 ($(docobjdir)/gcj.info): ... this.
2702
2703 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
2704
2705 * Make-lang.in: Replace uses of $(target_alias) with
2706 $(target_noncanonical).
2707
2708 2003-10-09 Tom Tromey <tromey@redhat.com>
2709
2710 * decl.c (java_init_decl_processing): Declare signers field.
2711 * class.c (make_class_data): Set signers field.
2712
2713 2003-10-09 Jason Merrill <jason@redhat.com>
2714
2715 * parse.y (patch_assignment): Use make_node to create a BLOCK.
2716 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
2717 POINTER_TYPE.
2718
2719 2003-10-06 Mark Mitchell <mark@codesourcery.com>
2720
2721 * Make-lang.in (java.info): Replace with ...
2722 (info): ... this.
2723 (java.dvi): Replace with ...
2724 (dvi): ... this.
2725 (java.generated-manpages): Replace with ...
2726
2727 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
2728
2729 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
2730
2731 2003-10-01 Andrew Haley <aph@redhat.com>
2732
2733 * jcf-parse.c (java_parse_file): Write otable and atable.
2734 * java-tree.h (atable_methods): New.
2735 (atable_decl): New.
2736 (atable_syms_decl): New.
2737 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
2738 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
2739 (symbol_*type): Rename method_symbol* to symbol*type.
2740 (emit_offset_symbol_table): Delete.
2741 (emit_symbol_table): New.
2742 (get_symbol_table_index): New.
2743 (atable_type): New.
2744 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
2745 (build_known_method_ref): Likewise.
2746 (get_symbol_table_index): Rename from get_offset_table_index.
2747 Parameterize to allow re-use by differing types of symbol table.
2748 (build_invokevirtual): Pass table to get_offset_table_index.
2749 * decl.c (java_init_decl_processing): Push types and decls for
2750 atable and atable_syyms.
2751 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
2752 (make_class_data): Add new fields atable and atable_syms.
2753 (emit_symbol_table): Rename from emit_offset_symbol_table.
2754 Parameterize to allow re-use by different types of symbol table.
2755 (build_symbol_entry): Renamed from build_method_symbols_entry.
2756
2757 2003-09-30 Roger Sayle <roger@eyesopen.com>
2758
2759 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
2760 semantics for SAVE_EXPR, by caching the result in a temporary.
2761
2762 2003-09-28 Richard Henderson <rth@redhat.com>
2763
2764 * check-init.c (check_init): Save and restore input_location
2765 instead of file and line separately.
2766 * decl.c (java_expand_body): Likewise.
2767 * jcf-write.c (generate_bytecode_insns): Likewise.
2768 * parse.y (safe_layout_class): Likewise.
2769 * jcf-parse.c (read_class, parse_class_file): Likewise.
2770 (java_parse_file): Use %H for warning locator.
2771
2772 2003-09-28 Roger Sayle <roger@eyesopen.com>
2773
2774 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
2775 with void-type branches instead of using a COMPOUND_EXPR.
2776
2777 2003-09-28 Jeff Sturm <jsturm@one-point.com>
2778
2779 * decl.c (java_optimize_inline, dump_function): Remove.
2780 * java-tree.h (java_optimize_inline): Remove declaration.
2781 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
2782 * parse.y (source_end_java_method, java_expand_classes):
2783 Likewise. Remove dead code.
2784
2785 2003-09-27 Roger Sayle <roger@eyesopen.com>
2786
2787 * lang.c (java_init_options): Set flag_evaluation_order.
2788 * expr.c (force_evaluation_order): Don't attempt to force
2789 evaluation order of binary operations using save_expr.
2790 * parse.y (java_complete_lhs): No longer need to call
2791 force_evaluation_order when constructing binary operators.
2792
2793 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
2794 Bryce McKinlay <bryce@mckinlay.net.nz>
2795
2796 PR java/1333:
2797 * parse.y (not_accessible_field_error): New function.
2798 (resolve_expression_name): Check field access permissions.
2799 (resolve_qualified_expression_name): Use
2800 not_accessible_field_error.
2801 (resolve_qualified_expression_name): Likewise.
2802
2803 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2804
2805 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
2806
2807 2003-09-23 Roger Sayle <roger@eyesopen.com>
2808
2809 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
2810 with equal operands without side-effects.
2811
2812 2003-09-22 Jeff Sturm <jsturm@one-point.com>
2813
2814 * decl.c (java_init_decl_processing): Don't emit otable decls
2815 if flag_indirect_dispatch is not set.
2816
2817 2003-09-21 Richard Henderson <rth@redhat.com>
2818
2819 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
2820 resource.c: Revert.
2821
2822 2003-09-21 Richard Henderson <rth@redhat.com>
2823
2824 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
2825 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
2826
2827 2003-09-20 Richard Henderson <rth@redhat.com>
2828
2829 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
2830
2831 2003-09-18 Roger Sayle <roger@eyesopen.com>
2832
2833 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
2834 * check-init.c (check_init): Likewise.
2835
2836 2003-09-18 Roger Sayle <roger@eyesopen.com>
2837
2838 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
2839
2840 2003-09-16 Andrew Haley <aph@redhat.com>
2841
2842 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
2843
2844 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
2845
2846 Fixes PR java/9577
2847 * mangle.c (find_compression_record_match): Skip
2848 over a "6JArray" (the array template mangled string)
2849 IDENTIFIER_NODE.
2850 (mangle_array_type): Correct minor typo.
2851 (atms): Move definition to the beginning.
2852
2853 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
2854
2855 * class.c (add_miranda_methods): Ensure super-interfaces are laid
2856 out. Fix for PR java/12254.
2857
2858 2003-09-11 Richard Henderson <rth@redhat.com>
2859
2860 * parse.y (source_end_java_method): Update for new
2861 cgraph_finalize_function argument.
2862
2863 2003-09-09 Richard Henderson <rth@redhat.com>
2864
2865 * parse.y (source_end_java_method): Update call to
2866 cgraph_finalize_function.
2867
2868 2003-09-03 Jeff Sturm <jsturm@one-point.com>
2869
2870 * decl.c (java_expand_body): New function.
2871 * expr.c (build_class_init): Set DECL_IGNORED_P.
2872 * java-tree.h (start_complete_expand_method,
2873 java_expand_body): Declare.
2874 * jcf-parse.c (cgraph.h): Include.
2875 (java_parse_file): Handle flag_unit_at_a_time.
2876 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
2877 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
2878 (java_estimate_num_insns): Use walk_tree_without_duplicates.
2879 (java_start_inlining): New function.
2880 * parse.h (java_finish_classes): Declare.
2881 * parse.y: Include cgraph.h.
2882 (block): Don't special-case empty block production.
2883 (craft_constructor): Set DECL_INLINE.
2884 (source_end_java_method): Handle flag_unit_at_a_time.
2885 Replace inline code with call to java_expand_body.
2886 (start_complete_expand_method): Remove static modifier.
2887 (java_expand_method_bodies): Patch function tree for
2888 class initialization and/or synchronization as needed.
2889 Don't begin RTL expansion yet.
2890 (java_expand_classes): Check flag_unit_at_a_time before
2891 calling finish_class.
2892 (java_finish_classes): New function.
2893 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
2894 (patch_assignment): Set DECL_CONTEXT on temporary variable.
2895 (emit_test_initialization): Set DECL_IGNORED_P.
2896
2897 2003-09-03 Roger Sayle <roger@eyesopen.com>
2898
2899 * builtins.c (enum builtin_type): Delete unused enumeration.
2900 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
2901
2902 2003-08-28 Tom Tromey <tromey@redhat.com>
2903
2904 * gcj.texi (Extensions): Document gcjlib URLs.
2905
2906 2003-08-20 Tom Tromey <tromey@redhat.com>
2907
2908 * gcj.texi (Extensions): Added xref.
2909 (libgcj Runtime Properties): Document
2910 gnu.gcj.runtime.VMClassLoader.library_control.
2911
2912 2003-08-20 Andrew Haley <aph@redhat.com>
2913
2914 * except.c (prepare_eh_table_type): Use new encoding for exception
2915 handlers when using -fno-assume-compiled.
2916
2917 2003-08-13 Tom Tromey <tromey@redhat.com>
2918
2919 * gcj.texi (Invoking gij): Document -X and -?.
2920
2921 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
2922
2923 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
2924 GCJH_OBJS, JCFDUMP_OBJS
2925 * win32-host.c: Removed the unnecessary and broken dependency
2926 on jcf.h
2927
2928 2003-08-11 Tom Tromey <tromey@redhat.com>
2929
2930 * parse.y (java_check_regular_methods): Typo fixes. Call
2931 check_interface_throws_clauses. Use
2932 check_concrete_throws_clauses.
2933 (check_interface_throws_clauses): New function.
2934 (check_concrete_throws_clauses): New function.
2935 (hack_is_accessible_p): New function.
2936 (find_most_specific_methods_list): Added FIXME.
2937 * typeck.c (lookup_do): Use `flags' argument to decide what to
2938 do. Reimplemented.
2939 (lookup_argument_method_generic): New function.
2940 (lookup_argument_method2): Removed.
2941 * jcf.h (ACC_INVISIBLE): New define.
2942 * jcf-write.c (generate_classfile): Skip invisible methods.
2943 * class.c (add_miranda_methods): New function.
2944 (layout_class_methods): Use it.
2945 (get_access_flags_from_decl): Use ACC_INVISIBLE.
2946 * java-tree.h (METHOD_INVISIBLE): New define.
2947 (lang_decl_func) [invisible]: New field.
2948 (lookup_argument_method_generic): Declare.
2949 (SEARCH_INTERFACE): New define.
2950 (SEARCH_SUPER): Likewise.
2951 (SEARCH_ONLY_INTERFACE): Likewise.
2952 (SEARCH_VISIBLE): Likewise.
2953 (lookup_argument_method2): Removed declaration.
2954
2955 2003-08-05 Tom Tromey <tromey@redhat.com>
2956
2957 Fix for PR java/11600:
2958 * parse.y (java_complete_lhs): See whether we're calling a method
2959 on an array.
2960 (check_thrown_exceptions): Added `is_array_call' argument;
2961 fixed `clone' checking; updated all callers.
2962
2963 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
2964
2965 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
2966
2967 2003-08-03 Tom Tromey <tromey@redhat.com>
2968
2969 * java-tree.h (METHOD_TRANSIENT): Removed.
2970 * decl.c (pushdecl): Removed some dead code.
2971 * class.c (get_access_flags_from_decl): Can't have transient
2972 method.
2973 (add_method_1): Can't have a transient method.
2974
2975 2003-07-28 Andreas Jaeger <aj@suse.de>
2976
2977 * jvspec.c: Convert to ISO C90 prototypes.
2978
2979 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
2980
2981 * decl.c (force_poplevels): Fix warning call.
2982
2983 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
2984
2985 * expr.c (expand_java_field_op): Don't use xxx_with_decl
2986 (expand_java_field_op): Likewise.
2987 * class.c (layout_class_method): Likewise
2988 (emit_register_classes): Likewise.
2989 * decl.c (pushdecl): Likewise.
2990 (poplevel): Likewise.
2991 (force_poplevels): Likewise.
2992 (give_name_to_locals): Likewise.
2993 * check-init.c (check_for_initialization): Likewise.
2994
2995 2003-07-24 Jason Merrill <jason@redhat.com>
2996
2997 * java-tree.h: Move boolean_type_node et al to the back end.
2998
2999 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3000
3001 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
3002 casts.
3003
3004 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
3005
3006 * lang.opt: Don't show -MD_ and -MDD_.
3007
3008 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
3009
3010 * lang-options.h: Remove.
3011 * lang.opt: Add help text.
3012
3013 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
3014
3015 * expr.c: Remove the last argument to expand_assignment().
3016
3017 2003-07-09 Jan Hubicka <jh@suse.cz>
3018
3019 * java-tree.h (DECL_NUM_STMTS): Rename to...
3020 (DECL_ESTIMATED_INSNS): ... this.
3021 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
3022 New static functions.
3023 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
3024 * parser.y (add_stmt_to_compound): Do not account statements.
3025
3026 2003-07-08 Mark Wielaard <mark@klomp.org>
3027
3028 * gcj.texi: CNI now expands to Compiled Native Interface.
3029
3030 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3031
3032 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
3033
3034 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
3035
3036 * expr.c (expand_byte_code): Adjist emit_line_note call.
3037
3038 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
3039
3040 * lang.c (java_handle_option): Don't handle filenames.
3041
3042 2003-07-02 Zack Weinberg <zack@codesourcery.com>
3043
3044 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
3045 DIR_SEPARATOR.
3046 Use FILENAME_CMP.
3047 * jcf-write.c: Don't default-define DIR_SEPARATOR.
3048 * jcf.h: Delete COMPARE_FILENAMES definition.
3049
3050 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
3051
3052 * lang.c (java_init_options): Update prototype.
3053
3054 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
3055
3056 * decl.c (poplevel): Adjust define_label call.
3057
3058 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3059
3060 * gjavah.c (flag_jni): Make non-static.
3061 * parse-scan.y (ctxp): Make non-static.
3062
3063 * class.c (build_method_symbols_entry)
3064 * expr.c (get_offset_table_index)
3065 * jcf-parse.c (jcf_parse):
3066 Mark the definition static, matching the forward declaration.
3067
3068 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
3069
3070 * lang.c (java_handle_option): Don't check for missing arguments.
3071
3072 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3073
3074 * class.c (push_class): Use a location_t to save place.
3075 (emit_register_classes): Set input_location. Adjust
3076 expand_function_end call.
3077 * resource.c (write_resource_constructor): Likewise.
3078 * decl.c (end_java_method): Adjust expand_function_end call.
3079 * parse.y (source_end_java_method): Likewise.
3080
3081 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3082
3083 * lang.c (java_handle_option): Likewise.
3084
3085 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
3086
3087 * lang.c (java_handle_option): Special-casing of optional
3088 joined arguments no longer needed.
3089 * lang.opt: Update switches that take optional argument.
3090
3091 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
3092
3093 * lang.opt: Declare Java.
3094 * lang.c (java_init_options): Update.
3095
3096 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
3097
3098 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
3099
3100 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3101
3102 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
3103 * lang.c (java_handle_option): -MD and -MMD have an underscore.
3104 * lang.opt: -MD and -MMD have an underscore.
3105
3106 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3107
3108 * class.c (emit_register_classes): Adjust init_function_start
3109 call.
3110 * decl.c (complete_start_java_method): Likewise.
3111 * resource.c (write_resource_constructor): Likewise.
3112
3113 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3114
3115 * Make-lang.in: Update to use options.c and options.h.
3116 * lang.c: Include options.h not j-options.h.
3117 (java_handle_option): Abort on unrecognized option.
3118 (java_init_options): Request Java switches.
3119
3120 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
3121
3122 * Make-lang.in: Handle mostlyclean.
3123
3124 2003-06-11 Tom Tromey <tromey@redhat.com>
3125
3126 * lang.c (java_handle_option): Update dependency_tracking for
3127 OPT_MF case.
3128
3129 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
3130 empty argument.
3131
3132 2003-06-10 Andrew Haley <aph@redhat.com>
3133
3134 * resource.c (write_resource_constructor): Use expand_expr to
3135 generate the address of the label attached to a resource.
3136 * Make-lang.in (java/resource.o): Add expr.h
3137
3138 2003-06-10 Andrew Haley <aph@redhat.com>
3139
3140 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
3141 (java_decl_ok_for_sibcall): New.
3142
3143 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
3144
3145 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
3146 (java/j-options.c, java/j-options.h): New.
3147 * java-tree.h (resource_name, compile_resource_file,
3148 compile_resource_data): Constify.
3149 * jcf-write.c (jcf_write_base_directory): Similarly.
3150 * jcf.h (jcf_write_base_directory): Similarly.
3151 * lang.c: Include j-options.h.
3152 (cl_options_count, cl_options, string_option, java_decode_option,
3153 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
3154 process_option_with_no): Remove.
3155 (resource_name): Constify.
3156 (LANG_HOOKS_HANDLE_OPTION): Override.
3157 (java_handle_option): New.
3158 (java_init): Don't call jcf_path_init.
3159 (java_init_options): Call jcf_path_init.
3160 * lang.opt: New.
3161 * resource.c (compile_resource_data, compile_resource_file): Constify.
3162
3163 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
3164
3165 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
3166 (struct lang_decl_func): Add last_line field.
3167 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
3168 DECL_SOURCE_LINE_LAST): Remove.
3169 * parse.y (missing_return_error, finish_method_declaration,
3170 lookup_cl, start_artificial_method_body, source_end_java_method,
3171 start_complete_expand_method): Adjust.
3172
3173 2003-06-08 Tom Tromey <tromey@redhat.com>
3174
3175 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
3176 fno-assume-compiled.
3177
3178 2003-06-08 Roger Sayle <roger@eyesopen.com>
3179
3180 * builtins.c (define_builtin_type, builtin_types): Delete.
3181 (define_builtin): Rewritten to take just the built-in code,
3182 the function's name, type and fallback library function name.
3183 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
3184 (initialize_builtins): Overhaul to define the GCC builtins
3185 used by gcj manually, providing the Java run-time's
3186 implementations as the fallback library function.
3187
3188 2003-06-08 Anthony Green <green@redhat.com>
3189
3190 * parse.y (patch_cast): Fix conversions from floating-point to
3191 integral types.
3192
3193 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
3194
3195 * Make-lang.in: Update.
3196 * lang.c: Include opts.h. Define cl_options_count and cl_options.
3197
3198 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3199
3200 * lang.c (java_init_options): Update.
3201
3202 2003-06-05 Jan Hubicka <jh@suse.cz>
3203
3204 * Make-lang.in: Add support for stageprofile and stagefeedback
3205
3206 2003-05-31 Roger Sayle <roger@eyesopen.com>
3207
3208 * lang.c (java_init_options): Prescribe wrap-around two's
3209 complement arithmetic overflow by setting flag_wrapv.
3210
3211 2003-05-29 Roger Sayle <roger@eyesopen.com>
3212
3213 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
3214 (builtin_record): Add an additional builtin_code field to
3215 record which GCC built-in corresponds to the Java function.
3216 (java_builtins): Add new entries for atan, atan2, exp, log,
3217 pow and tan.
3218 (max_builtin, min_builtin, abs_builtin): Perform constant
3219 folding on the resulting tree.
3220 (java_build_function_call_expr): Likewise, perform constant
3221 folding on the resulting tree.
3222 (initialize_builtins): The NULL creators are now allowed in
3223 the java_builtins table, which is now terminated by an entry
3224 with builtin_code == END_BUILTINS.
3225 (check_for_builtin): Likewise. If the matching creator is
3226 NULL, construct the call using java_build_function_call_expr
3227 directly with the decl for the corresponding builtin_code.
3228
3229 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
3230
3231 * win32-host.c: Normalize copyright boilerplate.
3232
3233 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3234
3235 * parse.y (print_int_node): Use string concatentation on
3236 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
3237 function calls into one.
3238
3239 2003-05-13 Zack Weinberg <zack@codesourcery.com>
3240
3241 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
3242 fatal_io_error with calls to fatal_error; add ": %m" to the end of
3243 all the affected error messages.
3244
3245 2003-05-13 Richard Henderson <rth@redhat.com>
3246
3247 * class.c (layout_class_method): Set DECL_EXTERNAL.
3248 * decl.c (java_mark_decl_local, java_mark_class_local): New.
3249 * java-tree.h (java_mark_class_local): Declare.
3250 * jcf-parse.c (parse_class_file): Use it.
3251 * parse.y (java_expand_classes): Likewise.
3252
3253 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
3254
3255 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
3256 * lex.h: #include input.h.
3257 * jv-scan.c (input_filename): Remove.
3258
3259 2003-05-02 Tom Tromey <tromey@redhat.com>
3260
3261 PR java/10491:
3262 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
3263 (handle_inner_classes): New function.
3264
3265 2003-05-01 Tom Tromey <tromey@redhat.com>
3266
3267 PR java/10459:
3268 * parse.y (finish_for_loop): Do nothing if update expression is a
3269 EXPR_WFL_NODE wrapping nothing.
3270 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
3271
3272 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
3273
3274 * lex.h (input_lineno): Remove declaration.
3275 * parse-scan.y: #include input.h.
3276 (input_filename): Remove declaration.
3277 (input_location): Add definition.
3278 (input_line): Remove definition.
3279
3280 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
3281
3282 * lex.h (lineno): Rename to ...
3283 (input_line): ... here
3284 * parse-scan.y (lineno): Rename to ...
3285 (input_line): ... here.
3286 (reset_report): Rename lineno to input_line.
3287 * check-init.c (check_init): Likewise.
3288 * class.c (push_class): Likewise.
3289 * decl.c (complete_start_java_method, end_java_method): Likewise.
3290 * expr.c (expand_byte_code): Likewise.
3291 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
3292 * jcf-write.c (generate_bytecode_insns): Likewise.
3293 * lex.c (java_init_lex, java_allocate_new_line,
3294 do_java_lex): Likewise.
3295 * parse.h (YYNOT_TWICE): Likewise.
3296 * parse.y (empty_statement, expression_statement,
3297 java_pop_parser_context, java_parser_context_save_global,
3298 yyerror, register_fields, method_header, safe_layout_class,
3299 find_in_imports_on_demand, create_artificial_method,
3300 source_end_java_method, start_complete_expand_method,
3301 build_thisn_assign, java_complete_lhs,
3302 maybe_absorb_scoping_block): Likewise.
3303
3304 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
3305
3306 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
3307 '/' when computing java source filename
3308
3309 2003-04-13 Tom Tromey <tromey@redhat.com>
3310
3311 * gjavah.c (print_c_decl): Indentation fix.
3312
3313 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3314
3315 * class.c (make_field_value, make_method_value, get_dispatch_table)
3316 (make_class_data, emit_offset_symbol_table)
3317 * constants.c (build_constants_constructor)
3318 * java-tree.h (START_RECORD_CONSTRUCTOR)
3319 * parse.y (maybe_build_array_element_wfl):
3320 Use build_constructor.
3321
3322 2003-04-10 Eric Blake <ebb9@email.byu.edu>
3323
3324 PR java/10253:
3325 * parse.y (string_convert_int_cst): Always use at least one digit
3326 in string conversion. Remove ASCII dependence.
3327 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
3328
3329 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
3330
3331 * Make-lang.in: added win32-host.c
3332 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
3333 resolves to open() on non-Win32 platforms and
3334 Win32-specific jcf_open_exact_case() on Win32
3335 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
3336 when trying .java and .class files
3337 * win32-host.c: added to repository. Defines
3338 Win32-specific jcf_open_exact_case()
3339
3340 2003-04-10 Andrew Haley <aph@redhat.com>
3341
3342 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
3343 (maybe_free_localvar): Renamed from localvar_free.
3344 Add new arg, really.
3345 (generate_bytecode_insns): Set new variable, jsrs.
3346 Only free local vars if no jsr insns have been emittted.
3347 Call maybe_free_localvar, not localvar_free.
3348
3349 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
3350
3351 * gcj.texi: Remove @ at start of file.
3352
3353 2003-03-25 Tom Tromey <tromey@redhat.com>
3354
3355 * parse.y (create_interface): Call CHECK_DEPRECATED.
3356
3357 2003-03-23 Zack Weinberg <zack@codesourcery.com>
3358
3359 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
3360
3361 2003-03-21 Zack Weinberg <zack@codesourcery.com>
3362
3363 * javaop.h (jfloat, jdouble): Make them structures mirroring
3364 the bit fields of IEEE float and double respectively.
3365 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
3366 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
3367 (union Word, union DWord): Delete.
3368 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
3369
3370 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
3371 D_NAN_MASK): Delete.
3372 (jni_print_float, jni_print_double): New. Generate
3373 hexadecimal floating constants.
3374 (print_field_info): Use jni_print_float/double.
3375
3376 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
3377 finite floating point numbers for output; special case
3378 non-finite floats.
3379
3380 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
3381
3382 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
3383 Replace 0 and 1 with true and false in return statements.
3384
3385 2003-03-19 Tom Tromey <tromey@redhat.com>
3386
3387 * lex.c (do_java_lex): Renamed from java_lex.
3388 (java_lex): New function.
3389 Include timevar.h.
3390
3391 2003-03-13 Tom Tromey <tromey@redhat.com>
3392
3393 * parse.y (resolve_inner_class): Error if qualifier is a primitive
3394 type.
3395
3396 2003-03-04 Andrew Haley <aph@redhat.com>
3397
3398 * gjavah.c (is_first_data_member): New global variable.
3399 (print_c_decl): If it's the first data member, align it as the
3400 superclass.
3401 (process_file): Set is_first_data_member.
3402
3403 2003-03-11 Tom Tromey <tromey@redhat.com>
3404
3405 * parse.y (resolve_field_access): Initialize class if field is
3406 found in another static field.
3407 * expr.c (build_class_init): Don't optimize out initialization of
3408 implemented interface.
3409
3410 2003-03-11 Andrew Haley <aph@redhat.com>
3411
3412 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
3413 warning.
3414
3415 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
3416
3417 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
3418 and DIR_SEPARATOR_2 for a target.
3419 Correct minor typos.
3420
3421 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
3422 and DIR_SEPARATOR_2 for a target into account.
3423
3424 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
3425
3426 * lang.c (java_init): Update prototype, move code to java_post_options.
3427 (java_post_options): Similarly.
3428
3429 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
3430
3431 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
3432 compare file name components depending on the case-sensitivity
3433 or otherwise of the host file system.
3434
3435 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
3436 "strcmp" to compare file name components.
3437 Use IS_DIR_SEPARATOR instead of comparing directly against
3438 DIR_SEPARATOR.
3439 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
3440 comparing directly against DIR_SEPARATOR.
3441
3442 2003-03-04 Tom Tromey <tromey@redhat.com>
3443
3444 * Make-lang.in (java.tags): New target.
3445
3446 2003-03-01 Roger Sayle <roger@eyesopen.com>
3447
3448 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
3449 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
3450
3451 2003-03-01 Tom Tromey <tromey@redhat.com>
3452
3453 * parse.y (jdep_resolve_class): Only check deprecation if we found
3454 a decl.
3455
3456 2003-02-28 Tom Tromey <tromey@redhat.com>
3457
3458 PR java/9695:
3459 * class.c (maybe_layout_super_class): Always pass a WFL to
3460 do_resolve_class.
3461 * parse.y (do_resolve_class): Updated comment to explain
3462 parameters.
3463
3464 2003-02-26 Tom Tromey <tromey@redhat.com>
3465
3466 * jcf-write.c (generate_classfile): Check whether class is
3467 deprecated before writing attribute count.
3468
3469 2003-02-25 Roger Sayle <roger@eyesopen.com>
3470
3471 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
3472 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
3473
3474 2003-02-23 Tom Tromey <tromey@redhat.com>
3475
3476 * lang-options.h: Added -Wdeprecated.
3477 * gcj.texi (Warnings): Document -Wdeprecated.
3478 * java-tree.h (flag_deprecated): Declare.
3479 * lang.c (lang_W_options): Added deprecated.
3480 (flag_deprecated): New global.
3481 * chartables.h: Rebuilt.
3482 * gen-table.pl (process_one): Look at whitespace.
3483 (print_tables): Define LETTER_SPACE, LETTER_MASK.
3484 * parse.h (CLEAR_DEPRECATED): New macro.
3485 (CHECK_DEPRECATED_NO_RESET): New macro.
3486 * jcf-parse.c (handle_deprecated): New function.
3487 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
3488 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
3489 * parse.y (resolve_type_during_patch): Check deprecation.
3490 (jdep_resolve_class): Likewise.
3491 (process_imports): Likewise.
3492 (resolve_expression_name): Likewise.
3493 (check_deprecation): Strip arrays from decl. Check
3494 flag_deprecated.
3495 (patch_method_invocation): Also check the particular constructor
3496 for deprecation.
3497 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
3498 * jcf-write.c (append_deprecated_attribute): New function.
3499 (generate_classfile): Generate deprecated attribute when
3500 appropriate.
3501 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
3502 (java_lex) [case '*']: Simplify logic.
3503 (java_start_char_p): Use LETTER_MASK.
3504 (java_part_char_p): Likewise.
3505 (java_space_char_p): New function.
3506
3507 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
3508
3509 Change base class access representation.
3510 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
3511 (add_interface_do): Likewise.
3512
3513 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
3514
3515 * decl.c (java_init_decl_processing): Change
3516 soft_lookupjnimethod_node to reflect the change in
3517 signature of _Jv_LookupJNIMethod in libjava/jni.cc
3518 * expr.c (build_jni_stub): Calculate and pass the size
3519 on the stack of the arguments to a JNI function. Use
3520 new target macro MODIFY_JNI_METHOD_CALL to allow a
3521 target to modify the call to a JNI method.
3522
3523 2003-02-08 Roger Sayle <roger@eyesopen.com>
3524
3525 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
3526 instead of basename to avoid compiler warnings on Tru64.
3527
3528 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
3529
3530 * gcj.texi: Update to GFDL 1.2.
3531
3532 2003-01-31 Andrew Haley <aph@redhat.com>
3533
3534 * parse.y (java_expand_classes): Scan the whole class list looking
3535 for access methods that haven't yet been expanded.
3536
3537 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
3538
3539 Fix for java/4269:
3540
3541 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
3542 to fix bootstrap on sparc-unknown-netbsdelf1.5.
3543 * jcf-parse.c: Likewise.
3544
3545 2003-01-31 Mark Wielaard <mark@klomp.org>
3546
3547 * gjavah.c (throwable_p): Allocate 1 more byte for string.
3548
3549 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
3550
3551 * class.c (make_class): Use BINFO_ELTS.
3552 (set_super_info): Likewse.
3553 (add_interface_do): Likewise.
3554
3555 2003-01-30 Tom Tromey <tromey@redhat.com>
3556
3557 * jcf-parse.c (read_class): Update identifier's class value if it
3558 changed during parsing.
3559
3560 2003-01-30 Loren James Rittle <ljrittle@acm.org>
3561
3562 * Make-lang.in (po-generated): Find the targets in $(parsedir).
3563 Propagate change to all other rules as required.
3564 (java/parse-scan.o): Add explicit dependency on
3565 $(parsedir)/java/parse-scan.c .
3566
3567 2003-01-29 Tom Tromey <tromey@redhat.com>
3568
3569 * parse.y (patch_assignment): Only transform the rhs of an
3570 assignment when compiling to native.
3571
3572 2003-01-28 Tom Tromey <tromey@redhat.com>
3573
3574 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
3575
3576 2003-01-28 Tom Tromey <tromey@redhat.com>
3577
3578 * lex.c (java_lex): Don't include UEOF as part of token.
3579 (java_read_unicode): Error if \u sequence prematurely terminated.
3580
3581 2003-01-27 Tom Tromey <tromey@redhat.com>
3582
3583 * parse.y (java_check_regular_methods): Check for construct after
3584 checking types in throws clause.
3585
3586 2003-01-24 Tom Tromey <tromey@redhat.com>
3587
3588 * class.c (build_static_field_ref): Only a String or numeric field
3589 can fold to a constant.
3590
3591 2003-01-23 Tom Tromey <tromey@redhat.com>
3592
3593 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
3594 file name in resource buffer.
3595
3596 2003-01-23 Tom Tromey <tromey@redhat.com>
3597
3598 * expr.c (build_known_method_ref): Use method's context to find
3599 method table index.
3600
3601 2003-01-23 Tom Tromey <tromey@redhat.com>
3602
3603 * constants.c (set_constant_entry): Allocated cleared memory.
3604
3605 2003-01-22 Tom Tromey <tromey@redhat.com>
3606
3607 * java-tree.h: Don't use PARAMS.
3608 * resource.c: Add prototypes for all functions.
3609 (write_resource_constructor): Use `const char *' to avoid
3610 warning.
3611
3612 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
3613
3614 * jcf-parse.c (process_zip_dir): Remove unused variable.
3615
3616 2003-01-22 Tom Tromey <tromey@redhat.com>
3617
3618 * expr.c (build_invokeinterface): Abort if method's context is not
3619 an interface.
3620
3621 2003-01-22 Tom Tromey <tromey@redhat.com>
3622
3623 * gcj.texi (Input and output files): Mention non-class entries.
3624 * decl.c (java_init_decl_processing): Call
3625 init_resource_processing.
3626 * java-tree.h (compile_resource_data, write_resource_constructor,
3627 compile_resource_file, init_resource_processing): Declare.
3628 * config-lang.in (gtfiles): Added resource.c.
3629 * Make-lang.in (gt-java-resource.h): New target.
3630 (JAVA_OBJS): Added resource.o.
3631 (java/resource.o): New target.
3632 * resource.c: New file.
3633 * class.c (compile_resource_file): Moved to resource.c.
3634 (registerResource_libfunc): Likewise.
3635 (utf8_decl_list): Mark with GTY; now static.
3636 * jcf-parse.c (classify_zip_file): New function.
3637 (parse_zip_file_entries): Use it; compile .properties files.
3638 (process_zip_dir): Use classify_zip_file and compute_class_name.
3639 Don't write class name into zip directory.
3640 (java_parse_file): Call write_resource_constructor.
3641 (compute_class_name): New function.
3642 * jcf-io.c (read_zip_member): Reindented.
3643
3644 2003-01-21 Tom Tromey <tromey@redhat.com>
3645
3646 * class.c (supers_all_compiled): New function.
3647 (make_class_data): Use it.
3648
3649 2003-01-21 Tom Tromey <tromey@redhat.com>
3650
3651 * parse.y (method_header): Native method can't be strictfp.
3652 No method can be transient or volatile.
3653
3654 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3655
3656 Make-lang.in (jvspec.o-warn): Add -Wno-error.
3657
3658 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
3659
3660 * check-init.c: Fix comment typos.
3661 * class.c: Likewise.
3662 * constants.c: Likewise.
3663 * decl.c: Likewise.
3664 * except.c: Likewise.
3665 * expr.c: Likewise.
3666 * java-except.h: Likewise.
3667 * java-tree.h: Likewise.
3668 * javaop.h: Likewise.
3669 * jcf-dump.c: Likewise.
3670 * jcf-io.c: Likewise.
3671 * jcf-parse.c: Likewise.
3672 * jcf-write.c: Likewise.
3673 * lang.c: Likewise.
3674 * mangle.c: Likewise.
3675 * typeck.c: Likewise.
3676 * verify.c: Likewise.
3677
3678 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3679
3680 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
3681 * jcf-write.c: Include "tm_p.h".
3682
3683 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3684
3685 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
3686
3687 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3688
3689 * builtins.c (java_build_function_call_expr): Renamed from
3690 build_function_call_expr. All callers changed.
3691
3692 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
3693 * jcf-parse.c: Include tm_p.h.
3694
3695 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
3696 warning.
3697
3698 2003-01-14 Tom Tromey <tromey@redhat.com>
3699
3700 * class.c (make_class_data): Check that super is compiled before
3701 building class reference to it.
3702
3703 2003-01-14 Andrew Haley <aph@redhat.com>
3704
3705 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
3706 varargs function -- correct.
3707
3708 2003-01-14 Andrew Haley <aph@redhat.com>
3709
3710 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
3711
3712 2003-01-14 Andrew Haley <aph@redhat.com>
3713
3714 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
3715 varargs function -- correct.
3716
3717 * parse.y (patch_assignment): Copy the rhs of an assignment into a
3718 temporary if the RHS is a reference.
3719
3720 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3721
3722 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
3723 * keyword.h: Regenerated.
3724
3725 * All Files: Convert to ISO C style function definitions.
3726
3727 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3728
3729 * parse.y (check_pkg_class_access): ANSIfy definition.
3730
3731 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3732
3733 * decl.c, parse-scan.y, parse.y: Don't cast return value of
3734 xmalloc et al.
3735
3736 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
3737
3738 2003-01-09 Geoffrey Keating <geoffk@apple.com>
3739
3740 Merge from pch-branch:
3741
3742 2002-12-02 Geoffrey Keating <geoffk@apple.com>
3743
3744 * Make-lang.in (java/gjavah.o): Update dependencies.
3745 * gjavah.c: Include ggc.h.
3746
3747 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
3748
3749 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
3750 (JCFDUMP_OBJS): Add ggc-none.o.
3751 (java/jcf-dump.o): Depend on GGC_H.
3752 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
3753 CPool substructures.
3754 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
3755 * jcf-dump.c: Include ggc.h.
3756
3757 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
3758
3759 * jcf.h (union cpool_entry): New.
3760 (struct CPool): Use gengtype to mark. Change field 'data' to be
3761 an array of unions.
3762 (struct JCF): Use gengtype to mark.
3763 (CPOOL_UINT): Update for new cpool_entry type.
3764 (CPOOL_USHORT1): Likewise.
3765 (CPOOL_USHORT2): Likewise.
3766 (CPOOL_FINISH): Use GC to free cpool subfields.
3767 * parse.h (struct parser_ctxt): Mark field current_jcf.
3768 * lex.c (java_init_lex): Use GC to allocate struct JCF.
3769 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
3770 (main_jcf): Use gengtype to mark.
3771 (ggc_mark_jcf): Delete.
3772 (get_constant): Update for new cpool_entry type.
3773 (give_name_to_class): Likewise.
3774 (get_class_constant): Likewise.
3775 (init_outgoing_cpool): Use GGC to allocate struct CPool.
3776 (java_parse_file): Use GGC to allocate struct JCF.
3777 (init_jcf_parse): Don't call ggc_add_root.
3778 * jcf-reader.c (jcf_parse_constant_pool): Update for new
3779 cpool_entry type.
3780 * java-tree.h (current_jcf): Use gengtype to mark.
3781 (CPOOL_UTF): Update for new cpool_entry type.
3782 (outgoing_cpool): Use gengtype to mark.
3783 (struct lang_type): GC struct JCF and struct CPool.
3784 * config-lang.in (gtfiles): Add jcf.h.
3785 * constants.c (find_tree_constant): New.
3786 (set_constant_entry): Allocate cpool subfields using GGC. Update
3787 for new cpool_entry type.
3788 (find_constant1): Update for new cpool_entry type.
3789 (find_constant2): Likewise.
3790 (find_utf8_constant): Use find_tree_constant.
3791 (find_class_or_string_constant): Remove unnecessary cast to jword.
3792 Update for new cpool_entry type.
3793 (count_constant_pool_bytes): Update for new cpool_entry type.
3794 (write_constant_pool): Likewise.
3795 (alloc_name_constant): Use find_tree_constant.
3796 (build_constants_constructor): Update for new cpool_entry type.
3797
3798 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
3799
3800 * parse.y (mark_parser_ctxt): Delete.
3801 (goal): Don't use ggc_add_root.
3802 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
3803 (java_pop_parser_context): Let GC free parser_ctxt.
3804 (java_parser_context_resume): Likewise.
3805 * parse.h (struct parser_ctxt): Use gengtype to mark.
3806 (ctxp): Likewise.
3807 (ctxp_for_generation): Likewise.
3808 * lex.h (struct java_lc_s): Mark for gengtype.
3809 (java_lexer): Rearrange for gengtype.
3810 * config-lang.in (gtfiles): Add lex.h, parse.h.
3811
3812 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3813
3814 * All Files: Remove PARAMS macro.
3815
3816 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
3817 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
3818 `__STDC__' macros.
3819
3820 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
3821 VA_CLOSE.
3822
3823 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
3824
3825 * Make-lang.in (java.install-common, java.uninstall,
3826 java.install-info, java.install-man): Prepend $(DESTDIR)
3827 to destination paths in all (un)installation commands.
3828 (java.install-common): Rewrite $(LN) command to support
3829 DESTDIR with "ln" as well as with "ln -s".
3830
3831 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
3832
3833 * java-tree.h: Protect against multiple inclusion.
3834
3835 2003-01-07 Tom Tromey <tromey@redhat.com>
3836
3837 * class.c (add_assume_compiled): Don't adjust parent if we're
3838 already at the root of tree.
3839
3840 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3841
3842 * lang.c (dump_compound_expr): Prototype.
3843
3844 2003-01-03 Tom Tromey <tromey@redhat.com>
3845
3846 Fix for PR java/8712:
3847 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
3848 when simply checking against `null'.
3849
3850 2003-01-03 Tom Tromey <tromey@redhat.com>
3851
3852 * gcj.texi (Standard Properties): Document http.proxyHost and
3853 http.proxyPort.
3854
3855 * gcj.texi (GNU Classpath Properties): Document new properties.
3856
3857 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3858
3859 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
3860 java/lang-options.h, java/mangle.c, java/mangle_name.c,
3861 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
3862
3863 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
3864
3865 * Make-lang.in, boehm.c, buffer.c,
3866 buffer.h, builtins.c, class.c,
3867 config-lang.in, constants.c,
3868 convert.h, decl.c, except.c,
3869 expr.c, java-except.h,
3870 java-tree.h, javaop.def,
3871 jcf-parse.c, jcf-write.c,
3872 jv-scan.c, jvgenmain.c,
3873 jvspec.c, keyword.gperf,
3874 keyword.h, lang-options.h,
3875 lang-specs.h, lang.c, lex.c,
3876 lex.h, mangle.c, mangle_name.c,
3877 parse-scan.y, parse.h, parse.y,
3878 typeck.c, verify.c, xref.c,
3879 xref.h: Replace "GNU CC" with
3880 "GCC" in the copyright header.
3881
3882 * check-init.c, gjavah.c, javaop.h,
3883 jcf-depend.c, jcf-dump.c, jcf-io.c,
3884 jcf-path.c, jcf-reader.c, jcf.h,
3885 zextract.c, zipfile.h: These files are
3886 "part of GCC". Also say "GCC" not "GNU CC".
3887
3888 2002-12-30 DJ Delorie <dj@redhat.com>
3889
3890 * Make-lang.in: Protect against texi2pod/pod2man failing.
3891
3892 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
3893
3894 * gcj.texi: Use @copying.
3895
3896 2002-12-27 Mark Mitchell <mark@codesourcery.com>
3897
3898 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
3899 print_cxx_classname.
3900 (print_cxx_classname): Add add_scope parameter.
3901 (print_class_decls): Do not emit a semicolon after the extern
3902 "Java" block.
3903 (process_file): Adjust calls to print_cxx_classname.
3904
3905 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
3906
3907 * gcj.texi: Include Cover Texts in man page.
3908
3909 2002-12-23 Jeff Sturm <jsturm@one-point.com>
3910
3911 * class.c (build_static_field_ref): Check FIELD_FINAL.
3912
3913 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
3914 instead of current_constant_pool_data_ref.
3915 * java-tree.h (current_constant_pool_data_ref): Undefine.
3916 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
3917 * jcf-parse.c (init_outgoing_cpool): Don't initialize
3918 current_constant_pool_data_ref.
3919
3920 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
3921 not build_internal_class_name.
3922
3923 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
3924 Use it when class ref isn't certain to be compiled.
3925
3926 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
3927
3928 * gcj.texi: Include gcc-common.texi.
3929 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
3930 $(srcdir)/doc/include/gcc-common.texi.
3931
3932 2002-12-22 Anthony Green <green@redhat.com>
3933
3934 * gcj.texi (Limitations): Add note about org.xml.sax and
3935 org.w3c.dom.
3936
3937 2002-12-20 Tom Tromey <tromey@redhat.com>
3938
3939 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
3940 where minimum case value is Integer.MIN_VALUE.
3941 Fixes PR java/8955.
3942
3943 2002-12-18 Andrew Haley <aph@redhat.com>
3944
3945 * parse.y (patch_invoke): Force evaluation order when `check' is
3946 set. For PR libgcj/8945.
3947
3948 2002-12-16 Mark Mitchell <mark@codesourcery.com>
3949
3950 * gcj.texi: Change version number to 3.4.
3951
3952 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
3953 Andrew Haley <aph@redhat.com>
3954
3955 * parse.y (source_end_java_method): Remove custom encoding of line
3956 numbers for a function decl before passing it to the back end.
3957
3958 2002-12-03 Andrew Haley <aph@redhat.com>
3959
3960 * class.c (make_class_data): New field, "chain".
3961 * decl.c (java_init_decl_processing): Likewise.
3962
3963 2002-12-02 Tom Tromey <tromey@redhat.com>
3964
3965 For PR java/8740:
3966 * parse.y (do_resolve_class): Handle qualified name via
3967 recursion.
3968
3969 2002-11-30 Zack Weinberg <zack@codesourcery.com>
3970
3971 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
3972 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
3973 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
3974 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
3975 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
3976 Include coretypes.h and tm.h.
3977 * Make-lang.in: Update dependencies.
3978
3979 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3980
3981 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
3982
3983 2002-11-25 Diego Novillo <dnovillo@redhat.com>
3984
3985 * jcf-reader.c: Don't expand JCF_readu4 inside the
3986 expansion of JCF_SKIP.
3987
3988 2002-11-25 Diego Novillo <dnovillo@redhat.com>
3989
3990 * jcf-reader.c: Don't expand JCF_readu4 inside the
3991 expansion of JCF_SKIP.
3992
3993 2002-11-22 Tom Tromey <tromey@redhat.com>
3994
3995 * parse.y (patch_binop): Cast right hand side of shift expression
3996 to `int'. Fixes PR java/8676.
3997
3998 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
3999 Andrew Haley <aph@redhat.com>
4000
4001 * gcc/java/jcf-write.c (write_classfile): Remove target
4002 class file, if it exists, before renaming the temporary
4003 class file to it.
4004
4005 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
4006
4007 * jvspec.c (lang_specific_spec_functions): New.
4008
4009 2002-11-18 Tom Tromey <tromey@redhat.com>
4010
4011 Fix for PR java/7912:
4012 * expr.c (can_widen_reference_to): Allow cast of array to
4013 Cloneable or Serializable.
4014 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
4015 (java_io_serializable_identifier_node): Likewise.
4016 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
4017 (valid_ref_assignconv_cast_p): Use new identifier nodes.
4018 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
4019 java_io_serializable.
4020 * decl.c (java_init_decl_processing): Initialize
4021 java_lang_cloneable_identifier_node and
4022 java_io_serializable_identifier_node.
4023 (java_lang_cloneable_identifier_node): New global.
4024 (java_io_serializable_identifier_node): Likewise.
4025
4026 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
4027
4028 * buffer.c: Remove unnecessary casts.
4029 * check-init.c: Likewise.
4030 * class.c: Likewise.
4031 * constants.c: Likewise.
4032 * decl.c: Likewise.
4033 * except.c: Likewise.
4034 * gjavah.c: Likewise.
4035 * jcf-io.c: Likewise.
4036 * jcf-parse.c: Likewise.
4037 * jcf-path.c: Likewise.
4038 * jvspec.c: Likewise.
4039 * lang.c: Likewise.
4040 * lex.c: Likewise.
4041 * verify.c: Likewise.
4042
4043 2002-11-06 Tom Tromey <tromey@redhat.com>
4044
4045 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
4046 a JNI header.
4047
4048 2002-11-05 Tom Tromey <tromey@redhat.com>
4049
4050 Fix for PR java/6388.
4051 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
4052 * java-tree.h (enum java_tree_index): New values
4053 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
4054 (decimal_int_max, decimal_long_max): New defines.
4055 * lex.c (yylex): Rewrote range checking. Sign extend literals.
4056 (error_if_numeric_overflow): Rewrote range checking.
4057 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
4058 decimal_long_max.
4059
4060 2002-11-02 Tom Tromey <tromey@redhat.com>
4061
4062 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
4063
4064 * class.c (make_method_value): Put class name, not signature, into
4065 `throws' field. For PR java/8415.
4066
4067 2002-10-24 Tom Tromey <tromey@redhat.com>
4068
4069 * gcj.texi (Invoking gij): Document --showversion.
4070 (Standard Properties): java.library.path now set.
4071
4072 2002-10-23 Tom Tromey <tromey@redhat.com>
4073
4074 * gjavah.c (decode_signature_piece): In JNI mode, print
4075 `jobjectArray' when array depth is nonzero.
4076 Fixes PR java/8296.
4077
4078 2002-10-15 Andrew Haley <aph@redhat.com>
4079
4080 * parse.y (patch_invoke): Call force_evaluation_order on a static
4081 arg list.
4082 (resolve_qualified_expression_name): Call force_evaluation_order
4083 on a arg list that is part of a Qualified Expression Name.
4084
4085 * lang.c (dump_compound_expr): New.
4086 (java_dump_tree): New.
4087
4088 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
4089
4090 * gcj.texi: Added item describing the GCJ runtime property
4091 "gnu.gcj.progname".
4092
4093 2002-10-15 Richard Henderson <rth@redhat.com>
4094
4095 * jcf-parse.c (get_constant): Fix type warning.
4096
4097 2002-10-15 Andrew Haley <aph@redhat.com>
4098
4099 * java-tree.h (java_inlining_merge_static_initializers): Declare.
4100 (java_inlining_map_static_initializers): Declare.
4101
4102 2002-10-14 Andrew Haley <aph@redhat.com>
4103
4104 * tree-inline.c (remap_block): All local class initialization
4105 flags go in the outermost scope.
4106 (expand_call_inline): Call java_inlining_map_static_initializers.
4107 (expand_call_inline): Call java_inlining_merge_static_initializers.
4108 * java/lang.c (merge_init_test_initialization): New.
4109 (java_inlining_merge_static_initializers): New.
4110 (inline_init_test_initialization): New.
4111 (java_inlining_map_static_initializers): New.
4112
4113 2002-10-11 Mark Wielaard <mark@klomp.org>
4114
4115 * gcj.texi (Compatibility): Add Limitations and Extensions section.
4116
4117 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4118
4119 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
4120
4121 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4122
4123 * parse.y (merge_string_cste): Add parentheses around & within |.
4124
4125 2002-10-08 Tom Tromey <tromey@redhat.com>
4126
4127 * parse.y (variable_declarator_id): Simplify error path for
4128 array declarator error. For PR java/8003.
4129
4130 2002-10-08 Zack Weinberg <zack@codesourcery.com>
4131
4132 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
4133 bug_report_url.
4134
4135 2002-10-08 Andrew Haley <aph@redhat.com>
4136
4137 * parse.y (attach_init_test_initialization_flags): Check for
4138 error_mark_node.
4139
4140 2002-10-07 Anthony Green <green@redhat.com>
4141
4142 * parse.y (merge_string_cste): Fix bug in string concatenation.
4143
4144 2002-10-03 Michael Koch <konqueror@gmx.de>
4145
4146 * gcj.texi (Standard properties):
4147 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
4148
4149 2002-10-02 Roger Sayle <roger@eyesopen.com>
4150
4151 PR optimization/6627
4152 * lang.c (java_init): If storing the vbit in function
4153 pointers, ensure that force_align_functions_log is atleast
4154 one to aid compatability with g++ vtables.
4155
4156 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
4157
4158 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
4159 foul of type-based aliasing.
4160
4161 2002-09-30 Anthony Green <green@redhat.com>
4162
4163 * gcj.texi (Invoking jv-scan): Fix texinfo.
4164
4165 2002-09-28 Anthony Green <green@redhat.com>
4166
4167 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
4168 (Code Generation): Add -fno-assert documentation.
4169 * jv-scan.c (flag_assert): New global.
4170 (options): Add assert option.
4171 (help): Add --no-assert documentation.
4172 * parse-scan.y (flag_assert): New global.
4173 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
4174 (flag_assert): New global.
4175 * java-tree.h (flag_assert): New global.
4176 * lex.c (java_lex): Obey flag_assert.
4177 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
4178 calling cc1.
4179
4180 2002-09-26 Andrew Haley <aph@redhat.com>
4181
4182 * expr.c (build_java_array_length_access): Check for null pointer.
4183 * expr.c (expand_java_arrayload): Likewise.
4184
4185 2002-09-21 Richard Henderson <rth@redhat.com>
4186
4187 * jcf-parse.c (get_constant): Decode from IEEE no matter
4188 what the target format.
4189
4190 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
4191
4192 * ChangeLog: Follow spelling conventions.
4193 * class.c: Likewise.
4194 * decl.c: Likewise.
4195 * expr.c: Likewise.
4196 * gjavah.c: Likewise.
4197 * java-tree.h: Likewise.
4198 * jcf-dump.c: Likewise.
4199 * jcf-parse.c: Likewise.
4200 * jvspec.c: Likewise.
4201 * lang.c: Likewise.
4202 * mangle.c: Likewise.
4203 * parse.y: Likewise.
4204
4205 2002-09-17 Tom Tromey <tromey@redhat.com>
4206
4207 * lex.c (java_read_unicode_collapsing_terminators): Handle case
4208 where \r appears at EOF. Fixes PR java/7950.
4209
4210 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4211
4212 * jvspec.c (lang_specific_driver): Remove unused variable.
4213
4214 2002-09-16 Geoffrey Keating <geoffk@apple.com>
4215
4216 * java-tree.h (union lang_tree_node): Add chain_next option.
4217
4218 2002-09-16 Richard Henderson <rth@redhat.com>
4219
4220 * jcf-parse.c (get_constant): Runtime check for IEEE format;
4221 use new real.h interface.
4222 * jcf-write.c (find_constant_index): Use new real.h interface.
4223 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
4224
4225 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
4226
4227 * lang.c: Follow spelling conventions.
4228
4229 2002-09-11 Per Bothner <per@bothner.com>
4230
4231 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
4232 constant to the type of the field.
4233 (java_complete_tree): Remove now-redundant code.
4234
4235 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
4236
4237 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
4238
4239 For PR java/5794:
4240 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
4241 return label if a ret instruction for the jsr has been reached.
4242
4243 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
4244
4245 * parse.y (DIR_SEPARATOR): Don't define.
4246 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
4247
4248 2002-08-28 Andrew Haley <aph@redhat.com>
4249
4250 * verify.c (verify_jvm_instructions): Allow exception handler
4251 inside code that is being protected, but generate a warning.
4252 * except.c (link_handler): Initialize `expanded' in new eh_range.
4253 (binding_depth, is_class_level, current_pc): Declare extern.
4254
4255 2002-09-01 Mark Wielaard <mark@klomp.org>
4256
4257 * gcj.texi: Add chapter about system properties.
4258 Fixed some typos.
4259
4260 2002-08-26 Tom Tromey <tromey@redhat.com>
4261
4262 * parse.y (try_builtin_assignconv): Allow narrowing primitive
4263 conversion if RHS_TYPE is byte, short, or char.
4264
4265 2002-08-22 Tom Tromey <tromey@redhat.com>
4266
4267 * gcj.texi (Invoking gij): Document -cp and -classpath.
4268
4269 2002-08-21 Tom Tromey <tromey@redhat.com>
4270
4271 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
4272 $(prefix)/share. For PR libgcj/7633.
4273
4274 For PR java/6005 and PR java/7611:
4275 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
4276 (java_can_use_bit_fields_p): New function.
4277
4278 2002-08-16 Tom Tromey <tromey@redhat.com>
4279
4280 * gcj.texi (Class Initialization): Mention class initialization of
4281 arrays.
4282
4283 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
4284
4285 * Make-lang.in (java-tree-inline.o): New.
4286 (JAVA_OBJS): Add java-tree-inline.o.
4287 * parse.y (source_end_java_method): Call java_optimize_inline.
4288 (java_expand_method_bodies): Save method's tree in
4289 DECL_SAVED_TREE.
4290 (add_stmt_to_compound): Keep track of the number of statments.
4291 * lang.c (java_init): Enable flag_inline_trees.
4292 (java_post_options): If flag_inline_functions is on, enable
4293 flag_inline_trees instread.
4294 (decl_constant_value): New.
4295 (java_tree_inlining_walk_subtrees): New.
4296 * java-tree.h (DECL_NUM_STMTS): New macro.
4297 (java_optimize_inline): Declare.
4298 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
4299 Handle a LABEL_EXPR.
4300 * decl.c (build_result_decl): If we already have a DECL_RESULT
4301 don't make another.
4302 (dump_function): New.
4303 (java_optimize_inline): New.
4304 (dump_function): New.
4305
4306 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
4307
4308 For PR java/7483:
4309 * parse.y (build_assertion): Invert return from
4310 desiredAssertionStatus.
4311
4312 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4313
4314 * jcf-write.c (get_access_flags): Return correct access flags for
4315 private and protected inner classes.
4316
4317 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4318
4319 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
4320
4321 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
4322
4323 * mangle_name.c: Don't include obstack.h twice.
4324 * xref.c: Don't include obstack.h.
4325
4326 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
4327
4328 * class.c: (permanent_obstack): Delete declaration.
4329 * constants.c: (permanent_obstack): Delete declaration.
4330 * except.c: (permanent_obstack): Delete declaration.
4331 * expr.c: (permanent_obstack): Delete declaration.
4332 * jcf-parse.c: (permanent_obstack): Delete declaration.
4333 (saveable_obstack): Delete declaration.
4334 * parse.h: (permanent_obstack): Delete declaration.
4335 * typeck.c: (permanent_obstack): Delete declaration.
4336
4337 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
4338
4339 * gcj.texi (version-gcc): Increase to 3.3.
4340
4341 2002-07-22 Tom Tromey <tromey@redhat.com>
4342
4343 * lex.c (java_lex): Check for `e' or `E' after 0.
4344
4345 2002-07-21 Richard Henderson <rth@redhat.com>
4346
4347 * lang.c (java_unsafe_for_reeval): New.
4348 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
4349
4350 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
4351
4352 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
4353 (jcf_path_init): Use GET_ENVIRONMENT.
4354
4355 2002-07-10 Roger Sayle <roger@eyesopen.com>
4356 Zack Weinberg <zack@codesourcery.com>
4357
4358 * builtins.c (initialize_builtins): Remove defines that
4359 handled C/C++ specific junk hereby removed from builtins.def.
4360
4361 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
4362
4363 * lang.c (java_post_options): Update prototype.
4364
4365 2002-07-05 Roger Sayle <roger@eyesopen.com>
4366
4367 * builtins.c (initialize_builtins): Ignore the additional
4368 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
4369 the builtins.def file.
4370
4371 2002-07-01 Tom Tromey <tromey@redhat.com>
4372
4373 For PR libgcj/7073:
4374 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
4375 specially.
4376
4377 2002-07-01 Roger Sayle <roger@eyesopen.com>
4378
4379 * java/decl.c (builtin_function): Accept additional parameter.
4380 (java_init_decl_processing): Pass an additional NULL_TREE
4381 argument to builtin_function.
4382
4383 2002-06-29 T.J. Mather <tjmather@maxmind.com>
4384
4385 * gcj.texi: Fixed gcj invocation example so that it compiles.
4386
4387 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4388
4389 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
4390 * parse.y (mark_parser_ctxt): Likewise.
4391 (check_modifiers, declare_local_variables): Avoid incorrect
4392 hardcoded constant 10.
4393
4394 * lex.c (java_read_char): Avoid "comparison is always true"
4395 warning.
4396
4397 2002-06-25 Andreas Schwab <schwab@suse.de>
4398
4399 * expr.c (JSR): Avoid undefined operation on PC.
4400
4401 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4402
4403 * decl.c (clear_binding_level): Const-ify.
4404
4405 2002-06-13 Akim Demaille <akim@epita.fr>
4406
4407 * parse.y (class_declaration, interface_declaration): Make sure
4408 all their rules have an action, in order to avoid meaningless `$$
4409 = $1' and their type clashes.
4410
4411 2002-06-11 Tom Tromey <tromey@redhat.com>
4412
4413 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
4414 * parse-scan.y (statement_without_trailing_substatement): Added
4415 assert_statement.
4416 (assert_statement): New rule.
4417 * java-tree.h (struct lang_type) [assertions]: New field.
4418 (TYPE_USES_ASSERTIONS): New macro.
4419 (CLASS_USES_ASSERTIONS): Likewise.
4420 (FIELD_SYNTHETIC): New define.
4421 * lex.c (java_lval;): Added ASSERT_TK.
4422 * parse.y (ASSERT_TK): Added.
4423 (statement_without_trailing_substatement): Added assert_statement.
4424 (assert_statement): New rule.
4425 (build_assertion): New function.
4426 (maybe_generate_pre_expand_clinit): Create and initialize
4427 $assertionsDisabled.
4428 (lookup_package_type): Removed decl.
4429 * keyword.h: Rebuilt.
4430 * keyword.gperf (assert): New token.
4431
4432 2002-06-10 Akim Demaille <akim@epita.fr>
4433
4434 * parse.y (interface_type_list, class_member_declaration)
4435 (unary_expression_not_plus_minus): Remove duplicate %type.
4436 Whitespace changes.
4437
4438 2002-06-09 Tom Tromey <tromey@redhat.com>
4439
4440 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
4441
4442 * parse.y (method_header): Give error message in all cases.
4443 Fixes PR java/6865.
4444
4445 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4446
4447 Don't use RTL inlining. Fix for PR java/6820.
4448 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
4449 (flag_really_inline): New.
4450 (java_decode_option): Set flag_really_inline if -finline-functions
4451 is seen.
4452 (java_post_options): New function. Turn off inlining unless
4453 flag_really_inline is set.
4454
4455 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4456
4457 * gjavah.c (throwable_p): Accept argument as either a classname or
4458 signature fragment. Create null-terminated classname string for super
4459 when calling itself recursively.
4460 (decode_signature_piece): Skip first character from class name
4461 signature when calling throwable_p.
4462
4463 2002-06-08 H.J. Lu (hjl@gnu.org)
4464
4465 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
4466
4467 2002-06-04 Tom Tromey <tromey@redhat.com>
4468
4469 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
4470
4471 2002-06-04 Michael Koch <konqueror@gmx.de>
4472
4473 * gcj.texi (Input Options): Fixed typo.
4474
4475 2002-06-04 Zack Weinberg <zack@codesourcery.com>
4476
4477 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
4478 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
4479 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
4480 and all now-pointless local variables. Rename other local
4481 variables to reflect their not being handles.
4482
4483 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
4484 #if JCF_USE_STDIO blocks.
4485
4486 * parse.y: Add missing semicolon at end of rule.
4487
4488 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
4489
4490 * check-init.c (attach_initialized_static_class): Delete, unused.
4491 * parse.y: Use htab_t instead of struct hashtable, update
4492 all uses.
4493 * java-tree.h: Include hashtab.h instead of hash.h.
4494 (struct lang_decl_func): Use htab_t, set up for gengtype.
4495 (struct init_test_hash_entry): Delete.
4496 (struct treetreehash_entry): New.
4497 (java_treetreehash_find): New
4498 (java_treetreehash_new): New prototype.
4499 (java_treetreehash_create): New prototype.
4500 (java_mark_tree): Delete prototype.
4501 (java_hash_hash_tree_node): Delete prototype.
4502 (java_hash_compare_tree_node): Delete prototype.
4503 (attach_initialized_static_class): Delete prototype.
4504 * expr.c (build_class_init): Update to use java_treetreehash
4505 functions.
4506 (java_expand_expr): Update to use htab_t.
4507 (emit_init_test_initialization): Likewise.
4508 * decl.c (java_mark_tree): Delete.
4509 * class.c (init_test_hash_newfunc): Delete.
4510 (java_hash_hash_tree_node): Delete.
4511 (java_hash_compare_tree_node): Delete.
4512 (add_method_1): Update to use java_treetreehash functions.
4513 (JAVA_TREEHASHHASH_H): New macro.
4514 (java_treetreehash_hash): New function.
4515 (java_treetreehash_compare): New function.
4516 (java_treetreehash_find): New function.
4517 (java_treetreehash_new): New function.
4518 (java_treetreehash_create): New function.
4519 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
4520
4521 * Make-lang.in (java/parse.o): Depend on debug.h.
4522 * java-tree.h (struct lang_identifier): Use gengtype.
4523 (union lang_tree_node): New.
4524 (struct lang_decl_func): Use gengtype.
4525 (struct lang_decl_var): Likewise.
4526 (struct lang_decl): Likewise.
4527 * parse.y: Include debug.h.
4528 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
4529
4530 * lang.c (struct language_function): New dummy structure.
4531
4532 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
4533 descriminator for DECL_LANG_SPECIFIC.
4534 (struct lang_decl_func): Rename from struct lang_decl.
4535 (enum lang_decl_desc): New.
4536 (struct lang_decl): Make it a union. Update all the accessor macros.
4537 (struct lang_type): Use gengtype.
4538 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
4539 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
4540 are now the same size.
4541 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
4542 use discriminator to mark DECL_LANG_SPECIFIC.
4543
4544 * Make-lang.in (gt-java-builtins.h): New rule.
4545 (java/builtins.o): Add dependency on gt-<filename>.h.
4546 * builtins.c: Use gengtype for roots.
4547 (union string_or_tree): Use gengtype.
4548 (struct builtin_record): Use gengtype.
4549 * config-lang.in (gtfiles): Add builtins.c.
4550
4551 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
4552 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
4553 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
4554 gt-java-parse.h, gtype-java.h): Add rules to generate.
4555 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
4556 (class.o): Add dependency on gt-*.h.
4557 (constants.o): Likewise.
4558 (decl.o): Likewise.
4559 (expr.o): Likewise.
4560 (jcf-parse.o): Likewise.
4561 (jcf-write.o): Likewise.
4562 (lang.o): Likewise.
4563 * config-lang.in (gtfiles): New.
4564 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4565 * constants.c: Replace uses of ggc_add_* with GTY markers.
4566 Include gt-*.h.
4567 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4568 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4569 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
4570 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
4571 Include gt-*.h.
4572 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
4573 Include gt-*.h.
4574 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4575 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
4576 gt-*.h.
4577 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4578 Include gtype-java.h.
4579
4580 2002-06-02 Tom Tromey <tromey@redhat.com>
4581
4582 Fix for PR java/5913:
4583 * parse.y (patch_binop): Call patch_string on op1.
4584
4585 2002-06-02 Tom Tromey <tromey@redhat.com>
4586
4587 Fix for PR java/1343, PR java/6336:
4588 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
4589 formatting. Changed return type.
4590 (anonymous_class_counter): Moved to top of file.
4591 (maybe_make_nested_class_name): Append number to class name for
4592 function-local classes.
4593
4594 2002-05-28 Zack Weinberg <zack@codesourcery.com>
4595
4596 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
4597 * Make-lang.in: Update dependency lists.
4598
4599 2002-05-18 Mark Mitchell <mark@codesourcery.com>
4600
4601 * gjavah.c (throwable_p): Do not free the name of the class after
4602 passing it to find_class.
4603 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
4604 * jcf-io.c (dirent.h): Include it.
4605 (fnmatch.h): Likewise.
4606 (compare_path): New function.
4607 (java_or_class_file): Likewise.
4608 (memoized_dirlist_entry): New type.
4609 (memoized_dirlist_lookup_eq): New function.
4610 (memoized_dirlists): New variable.
4611 (caching_stat): New function.
4612 (memoized_class_lookup_eq): New function.
4613 (memoized_class_lookups): Likewise.
4614 (find_class): Use memoized_class_lookups and caching_stat.
4615 * jcf.h (JCF_USE_SCANDIR): Define.
4616 * parse.y (java_expand_classes): Write the class files in reverse
4617 order.
4618
4619 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4620
4621 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
4622
4623 2002-05-13 Mark Mitchell <mark@codesourcery.com>
4624
4625 * jcf-write.c (write_classfile): Unlink the temporary file if it
4626 cannot be renamed. Use concat to build up the name of the
4627 temporary file.
4628
4629 2002-05-08 Mark Mitchell <mark@codesourcery.com>
4630
4631 * jcf-write.c (write_classfile): Write the file to a
4632 temporary file and then rename it.
4633
4634 2002-05-07 Tom Tromey <tromey@redhat.com>
4635
4636 * gjavah.c (throwable_p): Use xstrdup, not strdup.
4637
4638 Fix for PR java/1200:
4639 * gjavah.c (throwable_p): New function.
4640 (decode_signature_piece): Use it. A `WeakReference' isn't the
4641 same as a `jweak'.
4642 Include hashtab.h.
4643 (gcjh_streq): New function.
4644
4645 2002-05-07 Andreas Jaeger <aj@suse.de>
4646
4647 * parse.y (finish_for_loop): Fix if statement.
4648
4649 2002-05-06 Tom Tromey <tromey@redhat.com>
4650
4651 Fix for PR java/5941:
4652 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
4653 loop update expression.
4654 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
4655 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
4656
4657 2002-05-04 Mark Wielaard <mark@klomp.org>
4658
4659 For PR java/6519:
4660 * parse.y (build_string_concatenation): Return just op1 only when op2
4661 is null and op1 is a STRING_CST, otherwise always construct a
4662 StringBuffer.
4663
4664 2002-04-27 Tom Tromey <tromey@redhat.com>
4665
4666 For PR java/6382:
4667 * parse.y (string_convert_int_cst): New function.
4668 (merge_string_cste): Use it.
4669
4670 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
4671
4672 * java-tree.h (java_parse_file): Update.
4673 (java_set_yydebug): Remove.
4674 * jcf-parse.c (yydebug): Remove.
4675 (java_set_yydebug): Die.
4676 (java_parse_file): Update.
4677 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
4678
4679 2002-04-24 Tom Tromey <tromey@redhat.com>
4680
4681 For PR java/6425:
4682 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
4683 EXPR_WFL_QUALIFICATION of qual_wfl.
4684
4685 2002-04-23 Per Bothner <per@bothner.com>
4686
4687 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
4688 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
4689 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
4690
4691 2002-04-23 Tom Tromey <tromey@redhat.com>
4692
4693 For PR java/6314:
4694 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
4695 recognize `-fcompile-resource='.
4696 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
4697 a bit.
4698
4699 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
4700
4701 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
4702 paths. Fixes PR java/2791.
4703
4704 2002-04-19 Andrew Haley <aph@redhat.com>
4705
4706 * jcf-write.c (push_long_const): lo, hi: New variables.
4707 Use rshift_double to extract the high part of a 64-bit long.
4708 Use WORD_TO_INT to extract the low part.
4709
4710 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
4711 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
4712 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
4713
4714 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
4715
4716 * typeck.c (incomplete_type_error): Remove.
4717
4718 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4719
4720 * class.c (make_class_data): Set DECL_ALIGN on static class data,
4721 for hash synchronization.
4722 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
4723 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
4724 class_type_node.
4725
4726 2002-04-16 Mark Wielaard <mark@klomp.org>
4727
4728 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
4729 negative zero.
4730
4731 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4732
4733 Fix for PR java/6294:
4734 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
4735 interfaces.
4736
4737 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4738
4739 Fix for PR java/6085:
4740 * parse.y (patch_method_invocation): Always use build_access_to_thisn
4741 to get enclosing "this" argument for inner-class constructor
4742 invocation. Pass correct arguments to build_access_to_thisn.
4743
4744 2002-04-10 Andreas Jaeger <aj@suse.de>
4745
4746 * gcj.texi (Input Options): Fix extdirs patch.
4747
4748 2002-04-10 Anthony Green <green@redhat.com>
4749
4750 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
4751
4752 2002-04-09 Anthony Green <green@redhat.com>
4753
4754 * gcj.texi (Input Options): Add --extdirs documentation.
4755 * jcf-dump.c (OPT_extdirs): New macro.
4756 (options): Add extdirs option.
4757 (help): Describe --extdirs.
4758 (main): Handle OPT_extdirs.
4759 * gjavah.c (OPT_extdirs): New macro.
4760 (options): Add extdirs option.
4761 (help): Describe --extdirs.
4762 (main): Handle OPT_extdirs.
4763 * jcf-path.c (jcf_path_init): Add extdirs support.
4764 (jcf_path_extdirs_arg): New function.
4765 (extensions): New variable to hold extensions path entries.
4766 * jvspec.c: Remove -fextdirs= when compiling main().
4767 * lang.c (java_decode_option): Handle -fextdirs=.
4768 * jcf.h (jcf_path_extdirs_arg): Declare new function.
4769 * Make-lang.in: Compile jcf-path with version info for use in
4770 identifying the appropriate libgcj.jar.
4771
4772 2002-04-08 Tom Tromey <tromey@redhat.com>
4773
4774 For PR libgcj/5303:
4775 * .cvsignore: Added rmic.1 and rmiregistry.1.
4776 * gcj.texi (Top): Link to new nodes.
4777 (Invoking rmic): New node.
4778 (Invoking rmiregistry): Likewise.
4779 * Make-lang.in (java.generated-manpages): Added rmic.1 and
4780 rmiregistry.1.
4781 (java.maintainer-clean): Likewise.
4782 ($(srcdir)/java/rmic.1): New target.
4783 ($(srcdir)/java/rmiregistry.1): Likewise.
4784 (java.install-man): Handle rmic.1 and rmiregistry.1.
4785
4786 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4787
4788 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
4789 Add note about handling uncaught exceptions. Add an exception handler
4790 to example.
4791
4792 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4793
4794 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
4795 after using it to patch CALL_EXPR.
4796
4797 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4798
4799 * gcj.texi (Invocation): Document CNI invocation API.
4800
4801 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
4802
4803 * expr.c (truthvalue_conversion): Rename. Update.
4804 (expand_compare): Update.
4805 * java-tree.h (java_truthvalue_conversion): New.
4806 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
4807
4808 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
4809
4810 * java-tree.h (java_mark_addressable): New.
4811 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
4812 * typeck.c (mark_addressable): Rename, update.
4813
4814 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
4815
4816 * expr.c (build_java_binop): Update.
4817 * java-tree.h (java_signed_type, java_unsigned_type,
4818 java_signed_or_unsigned_type): Update.
4819 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4820 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
4821 * parse.y (patch_binop): Update.
4822 * typeck.c (signed_or_unsigned_type, unsigned_type,
4823 signed_type): Update.
4824
4825 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
4826
4827 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
4828 (java_dummy_print): Remove.
4829 (lang_print_error): Rename. Exit early if inhibiting output.
4830 (inhibit_error_printing_function): New.
4831 (java_init): Don't set hook.
4832 (lang_init_source): Use new boolean.
4833
4834 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
4835
4836 * parse.y (do_resolve_class): Fix infinite recursion.
4837
4838 2002-03-29 Tom Tromey <tromey@redhat.com>
4839
4840 * parse.y (check_inner_circular_reference): Ignore incomplete
4841 types.
4842
4843 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
4844
4845 * Make-lang.in (builtins.o): Update.
4846 * boehm.c (get_boehm_type_descriptor): Update.
4847 * builtins.c: Include langhooks.h.
4848 * decl.c (java_init_decl_processing): Update.
4849 * java-tree.h (java_type_for_mode, java_type_for_size): New.
4850 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
4851 Redefine.
4852 * typeck.c (type_for_mode, type_for_size): Update.
4853
4854 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
4855
4856 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
4857
4858 2002-03-28 Tom Tromey <tromey@redhat.com>
4859
4860 * except.c (expand_end_java_handler): If the handler type is NULL,
4861 use java.lang.Throwable. Fixes PR java/5986.
4862
4863 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
4864
4865 Fix for PR java/4715:
4866 * jcf-parse.c (parse_source_file_3): New function.
4867 (read_class): Call it.
4868 (java_parse_file): Likewise.
4869
4870 2002-03-28 Jan Hubicka <jh@suse.cz>
4871
4872 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
4873
4874 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4875
4876 * parse.y (resolve_package): Initialize "decl".
4877 (lookup_package_type): Remove unused function.
4878
4879 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4880
4881 Fix for PR java/5993:
4882 * parse.y (resolve_package): Return the decl if resolution was
4883 successful. Don't special case "java.lang" and "java.lang.reflect"
4884 packages. Set type_name to the merged identifier.
4885 (resolved_qualified_expression_name): Print error using "name" if
4886 resolve_package returns NULL_TREE.
4887
4888 2002-03-27 Tom Tromey <tromey@redhat.com>
4889
4890 * expr.c (expand_invoke): Don't generate null pointer check if
4891 we're calling <init>.
4892
4893 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
4894
4895 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
4896 fix prototype.
4897 * java-tree.h (java_lang_expand_expr): Similarly.
4898 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
4899 (java_init): Don't set hook.
4900
4901 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4902
4903 Fix for PR java/5850:
4904 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
4905 context if field was not found in the current scope.
4906 * expr.c (lookup_field): Don't look in enclosing contexts.
4907
4908 2002-03-26 Tom Tromey <tromey@redhat.com>
4909
4910 Fix for PR java/5942:
4911 * parse.y (init_src_parse): Added sanity check.
4912 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
4913 elements, not 11.
4914
4915 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
4916
4917 * decl.c (lang_mark_tree): Rename java_mark_tree.
4918 * java-tree.h (java_mark_tree): New.
4919 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
4920
4921 2002-03-25 Zack Weinberg <zack@codesourcery.com>
4922
4923 * lex.c: Change java_perform_atof to take normal parameters
4924 instead of a pointer to a parameter block. Call it directly
4925 from java_lex.
4926
4927 2002-03-22 Mark Wielaard <mark@klomp.org>
4928
4929 Fix for PR java/5368:
4930 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
4931 when printing error message.
4932
4933 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
4934
4935 * decl.c (maybe_build_cleanup): Remove.
4936
4937 2002-03-22 Tom Tromey <tromey@redhat.com>
4938
4939 Andrew Haley <aph@cambridge.redhat.com>
4940
4941 * expr.c (build_field_ref): Don't build a check if the field is a
4942 member of `this'.
4943
4944 2002-03-21 Eric Blake <ebb9@email.byu.edu>
4945
4946 Fix for PR java/6026:
4947 * lex.c (java_lex): Fix parsing of consecutive floats.
4948
4949 2002-03-21 Tom Tromey <tromey@redhat.com>
4950
4951 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
4952 class.
4953
4954 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
4955
4956 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
4957 insert_block, getdecls, kept_level_p, global_bindings_p): New.
4958
4959 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
4960
4961 * gcj.texi: @code{gcj} becomes @command{gcj}.
4962 @code{gcc} becomes @command{gcc}.
4963 GcjRaw changed to gnu.gcc.RawData.
4964
4965 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
4966
4967 * decl.c (start_java_method): Use new hook.
4968 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
4969 (java_init): Remove old hook.
4970
4971 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
4972
4973 * builtins.c (define_builtin): Do nothing if `type' is null.
4974 Fixes PR java/5876.
4975
4976 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4977
4978 * parse.y (parser_check_super_interface): Fix error message
4979 grammar/order.
4980
4981 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4982
4983 * jcf-parse.c (get_constant): Delete unused variables.
4984
4985 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
4986
4987 * java-tree.h (java_parse_file): New.
4988 * jcf-parse.c (yyparse): Rename java_parse_file.
4989 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
4990
4991 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4992
4993 * parse.y (craft_constructor): Return the constructor decl.
4994 (java_expand_classes): Update comments.
4995 (lookup_method_invoke): Call fix_constructors immediately for
4996 anonymous class. Fixes PR java/5935.
4997
4998 2002-03-15 Anthony Green <green@redhat.com>
4999
5000 * jcf-parse.c (yyparse): Don't emit class registration
5001 constructor when compiling resource files.
5002
5003 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5004
5005 * lang.c (java_tree_code_type, java_tree_code_length,
5006 tree_code_name): Delete.
5007 (tree_code_type, tree_code_length, tree_code_name): Define.
5008 (java_init): Don't try to copy into the various tree_code
5009 arrays.
5010
5011 2002-03-12 Tom Tromey <tromey@redhat.com>
5012
5013 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
5014 UTF-8, not UCS-2. Fixes PR java/5923.
5015
5016 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
5017 a call_expr wrapped in a convert. Fixes PR java/5848.
5018
5019 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5020
5021 * jcf-write.c (write_classfile): Improve error strings.
5022
5023 2002-03-11 Eric Blake <ebb9@email.byu.edu>
5024
5025 * lex.c: Adjust comments to GNU standards.
5026
5027 2002-03-11 Eric Blake <ebb9@email.byu.edu>
5028
5029 Fix for PR java/5902:
5030 * lex.c (java_lex): Fix parsing of literals.
5031
5032 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5033
5034 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
5035 to prevent it getting evaluated twice in the store checking case.
5036 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
5037 examining OBJECT.
5038
5039 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5040
5041 * decl.c (java_init_decl_processing): Make sure class_type_node
5042 alignment is not less than 64 bits if hash synchronization is enabled.
5043
5044 2002-03-08 Per Bothner <per@bothner.com>
5045
5046 * parse.y (java_complete_lhs): Check if patch_assignment
5047 returned an error-mark.
5048
5049 * parse.y (try_builtin_assignconv): Don't special-case zero.
5050
5051 2002-03-08 Per Bothner <per@bothner.com>
5052
5053 Fix for PR java/5812.
5054 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
5055 here instead of in JSR macro. Likewise with load_type_state call.
5056 Do the latter on if the return_pc has been verified (the jsr returns).
5057 (JSR): Now just call build_java_jsr.
5058
5059 2002-03-07 Jeff Sturm <jsturm@one-point.com>
5060
5061 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
5062 (java.install-common): Link native driver to
5063 JAVA_TARGET_INSTALL_NAME.
5064
5065 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
5066
5067 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
5068 * builtins.c(sin_builtin): Likewise
5069 * builtins.c(sqrt_builtin): Likewise
5070
5071 2002-03-03 Zack Weinberg <zack@codesourcery.com>
5072
5073 * java/expr.c, java/jcf-parse.c, java/lex.c:
5074 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
5075 REAL_ARITHMETIC blocks unconditional. Delete some further
5076 #ifdef blocks predicated on REAL_ARITHMETIC.
5077
5078 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5079
5080 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
5081 explicit sizeof/sizeof.
5082 * decl.c (java_init_decl_processing): Likewise.
5083 * jcf-parse.c (init_jcf_parse): Likewise.
5084 * parse.y (init_src_parse): Likewise.
5085
5086 2002-03-02 Per Bothner <per@bothner.com>
5087
5088 Make --CLASSPATH by a synonym for --classpath and -classpath.
5089 Implement --bootclasspath.
5090 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
5091 (classpath_l): Remove.
5092 (jcf_path_CLASSPATH_arg): Remove.
5093 (jcf_path_bootclasspath_arg): New function.
5094 (jcf_path_seal): Simplify accordingly.
5095
5096 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
5097 (jcf_path_CLASSPATH): Remove declaration.
5098 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
5099 (lang_specific_driver): Translate -bootclasspath.
5100 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
5101 * lang.c (decode_lang_options): Do jcf_path_init first.
5102 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
5103 * gjavah.c: Also handle --bootclasspath.
5104 Handle --CLASSPATH as a synonum for --classpath.
5105 * jcf-dump.c: Likewise.
5106
5107 "." is not part of system path, but is the default for --classpath.
5108 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
5109 (jcf_path_seal): Add "." if no CLASSPATH specified.
5110
5111 * gcj.texi: Document changes.
5112
5113 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5114
5115 * expr.c (build_java_arraystore_check): Fix formatting.
5116
5117 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
5118
5119 Fix for PR java/5758, java/5632:
5120 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
5121 inner-class separator too.
5122 * parse.y (do_resolve_class): New local `decl_result.'
5123 Progressively build a name for what can have been loaded.
5124
5125 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5126
5127 * expr.c (java_array_data_offset): Removed function.
5128 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
5129 (build_java_array_length_access): Obtain "length" value using a
5130 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
5131 (build_java_arrayaccess): Correct comment. Access "data" using a
5132 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
5133 (build_java_arraystore_check): New function.
5134 (expand_java_arraystore): Use build_java_arraystore_check.
5135 * parse.y (patch_assignment): Simplify code to insert a store check
5136 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
5137 * check-init.c (check_init): Update to reflect that an array length
5138 access is now a COMPONENT_REF.
5139 * gcj.texi (Code Generation): Improve documentation of
5140 -fno-bounds-check. Add documentation for -fno-store-check.
5141 * java-tree.h (flag_store_check): Declare.
5142 (build_java_arraystore_check): Declare.
5143 * lang.c (flag_store_check): Initialize to 1.
5144 (lang_f_options): Add store-check option.
5145 * jvspec.c: Don't pass store-check option to jvgenmain.
5146 * lang-options.h: Add help string for -fno-store-check.
5147
5148 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
5149
5150 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
5151 * java-tree.h (java_dup_lang_specific_decl): New.
5152 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
5153
5154 2002-02-27 Zack Weinberg <zack@codesourcery.com>
5155
5156 * builtins.c, decl.c: Delete traditional-mode-related code
5157 copied from the C front end but not used, or used only to
5158 permit the compiler to link.
5159
5160 2002-02-22 Tom Tromey <tromey@redhat.com>
5161
5162 Fix for PR java/2369:
5163 * jvspec.c (verify_class_name): New function.
5164 (lang_specific_driver): Call it.
5165 (JAVA_START_CHAR_P): New macro.
5166 (JAVA_PART_CHAR_P): Likewise.
5167
5168 2002-02-22 Per Bothner <per@bothner.com>
5169
5170 * class.c: Change vtable to be more compatible with g++ v3 abi.
5171 (get_dispatch_table): Prepend offset-to-top (always 0) and
5172 type_info pointer (currently unimplemented hence NULL) to vtable.
5173 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
5174 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
5175 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
5176 (build_dtable_decl): Add declarations for new fields.
5177
5178 2002-02-20 Per Bothner <per@bothner.com>
5179
5180 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
5181 to finit$ (otherwise generate_bytecode_insns drops it). However, we
5182 don't need to set it on the COMPOUND_EXPR - the caller does that.
5183
5184 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
5185
5186 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
5187 `--CLASSPATH' becomes `--classpath.'
5188 * gjavah.c: Likewise.
5189 * jcf-dump.c: Likewise.
5190 * lang-options.h: Likewise.
5191 * lang.c: Likewise.
5192 * jcf-path.c: Updated comment.
5193 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
5194 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
5195 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
5196 (jcf_path_CLASSPATH_arg): Ditto.
5197 (classpath_u): Updated leading comment.
5198
5199 2002-02-20 Per Bothner <per@bothner.com>
5200
5201 * builtins.c (check_for_builtin): New function.
5202 (build_call_or_builtin): Remove.
5203 * java-tree.h: Update accordingly.
5204 * expr.c (expand_invoke): Use build + check_for_builtin instead
5205 of build_call_or_builtin.
5206 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
5207 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
5208 flag (which had caused jcf-write to incorrectly emit invokevirtual).
5209
5210 2002-02-17 Tom Tromey <tromey@redhat.com>
5211
5212 * java-tree.h (TYPE_STRICTFP): New macro.
5213 (struct lang_type) [strictfp]: New field.
5214 (CLASS_STRICTFP): New macro.
5215 (METHOD_STRICTFP): New macro.
5216 (struct lang_decl) [strictfp]: New field.
5217 * parse.y (method_header): Disallow strictfp constructor or
5218 abstract method.
5219 (STRICT_TK): Move before MODIFIER_TK.
5220 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
5221 (METHOD_MODIFIERS): Likewise.
5222 (INTERFACE_MODIFIERS): Likewise.
5223 * jcf-write.c (get_access_flags): Likewise.
5224 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
5225 (add_method_1): Likewise.
5226 (get_access_flags_from_decl): Likewise.
5227 * jcf-dump.c (print_access_flags): Print in standard order. Also,
5228 recognize strictfp flag.
5229 * jcf.h (ACC_STRICT): New define.
5230
5231 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
5232
5233 * class.c(build_utf8_ref): Move declaration of decl_size
5234
5235 2002-02-07 Tom Tromey <tromey@redhat.com>
5236
5237 * gcj.texi (Input Options): --CLASSPATH does not suppress system
5238 path.
5239
5240 2002-02-04 Anthony Green <green@redhat.com>
5241
5242 * class.c (build_utf8_ref): Put UTF-8 constants into merged
5243 sections if available.
5244
5245 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5246
5247 * parse.y (java_expand_classes): Fix typo in static field loop.
5248
5249 2002-02-02 Richard Henderson <rth@redhat.com>
5250
5251 * class.c (add_field): Mark static fields external.
5252 (build_class_ref): Remove redundant set.
5253 * parse.y (java_expand_classes): Mark static fields of classes
5254 to be compiled as local.
5255 * jcf-parse.c (parse_class_file): Likewise.
5256
5257 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
5258
5259 * gcj.texi (About CNI): New node.
5260
5261 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
5262
5263 PR java/5080
5264 * jcf-parse.c : Check for HAVE_LOCALE_H before using
5265 setlocale() with LC_CTYPE as a parameter.
5266 * jv-scan.c: Same.
5267
5268 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
5269
5270 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
5271 Follow GNU Coding Standards for --version.
5272
5273 2002-01-28 Tom Tromey <tromey@redhat.com>
5274
5275 * expr.c (build_jni_stub): Ensure storage for `meth' is
5276 generated.
5277 * parse.y (java_complete_expand_methods): Set
5278 current_function_decl before building JNI stub.
5279
5280 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
5281
5282 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
5283 BUILT_IN_SQRTF.
5284
5285 2002-01-22 Tom Tromey <tromey@redhat.com>
5286
5287 * decl.c (java_init_decl_processing): Use add_predefined_file.
5288 Predefine RawData.java.
5289 (predef_filenames): Removed.
5290 (java_init_decl_processing): Don't register predef_filenames.
5291 * jcf-parse.c (add_predefined_file): New function.
5292 (predefined_filename_p): Rewrote.
5293 (predefined_filename_p): No longer static.
5294 * decl.c (java_init_decl_processing): Call initialize_builtins.
5295 * Make-lang.in (JAVA_OBJS): Added builtins.o.
5296 (java/builtins.o): New target.
5297 * builtins.c: New file.
5298 * parse.y (patch_invoke): Use build_call_or_builtin.
5299 * java-tree.h (build_call_or_builtin): Declare.
5300 (initialize_builtins): Declare.
5301 (java_set_exception_lang_code): Removed unused declaration.
5302 (PREDEF_FILENAMES_SIZE): Removed.
5303 (java_tree_index): Added JTI_PREDEF_FILENAMES.
5304 (predef_filenames): New define.
5305 (add_predefined_file): Declare.
5306 (predefined_filename_p): Declare.
5307 * expr.c (expand_invoke): Use build_call_or_builtin.
5308
5309 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5310
5311 * parse.y (patch_switch_statement): Fix format specifier.
5312
5313 2002-01-16 Tom Tromey <tromey@redhat.com>
5314
5315 More for PR java/5365:
5316 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
5317 default.
5318 (process_file): Generate include for
5319 java.lang.UnsupportedOperationExceptions.
5320
5321 2002-01-15 Andreas Jaeger <aj@suse.de>
5322
5323 * .cvsignore: Add man pages.
5324
5325 2002-01-15 Tom Tromey <tromey@redhat.com>
5326
5327 Fix for PR java/5365:
5328 * gjavah.c (process_file): Turn class name into a file name.
5329
5330 2002-01-14 Matthias Klose <doko@debian.org>
5331
5332 * gcj.texi: Fix whitespace and formatting errors in the
5333 synopsis of the man pages. Update copyright.
5334
5335 2002-01-14 Tom Tromey <tromey@redhat.com>
5336
5337 For PR libgcj/5303:
5338 * Make-lang.in (java.install-man): Handle jv-convert man page.
5339 (java.generated-manpages): Added jv-convert.1.
5340 (java.uninstall): Remove jv-convert.1.
5341 (java.maintainer-clean): Likewise.
5342 ($(srcdir)/java/jv-convert.1): New target.
5343 * gcj.texi (Top): Link to jv-convert node.
5344 (Individual utilities): Likewise.
5345 (Invoking jv-convert): New node.
5346
5347 2001-01-10 Jeff Sturm <jsturm@one-point.com>
5348 Martin Kahlert <martin.kahlert@infineon.com>
5349
5350 * jcf-parse.c (get_constant): Don't swap lo/hi for big
5351 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
5352
5353 2002-01-03 Graham Stott <grahams@redhat.com>
5354
5355 * class.c (compile_resource_file): Update copyright date.
5356 Constify filename parameter.
5357 (java-tree.h): Update copyright date.
5358 (compile_resource_file): Constify filename parameter.
5359
5360 2002-01-03 Graham Stott <grahams@redhat.com>
5361
5362 * gcc/jcf-parse.c: Update copyright date.
5363 (yyparse): Constify resource_filename.
5364
5365 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5366
5367 * parse.y (src_parse_roots): Don't needlessly zero init.
5368
5369 2001-12-31 Tom Tromey <tromey@redhat.com>
5370
5371 * parse.y (dump_java_tree): New function.
5372 (source_end_java_method): Call it.
5373 (end_class_declaration): Likewise.
5374 * lang.c (java_decode_option): Call dump_switch_p.
5375
5376 2001-12-28 Tom Tromey <tromey@redhat.com>
5377
5378 * gen-table.pl: Don't process characters after \uffff. Added
5379 comment pointing to input file.
5380
5381 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5382
5383 * gen-table.pl: Const-ify output. Document the location of a
5384 suitable unicode input file.
5385
5386 * chartables.h: Regenerate.
5387
5388 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5389
5390 * chartables.h: Const-ify.
5391 * gjavah.c (options): Likewise.
5392 * jcf-dump.c (options): Likewise.
5393 * jv-scan.c (options): Likewise.
5394 * lex.c (java_start_char_p, java_part_char_p): Likewise.
5395 * parse.y (binop_lookup): Likewise.
5396
5397 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5398
5399 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
5400 the static arrays that are output.
5401 * jvspec.c (jvgenmain_spec): Make static.
5402 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
5403 * keyword.h: Regenerate.
5404 * lang.c (string_option, process_option_with_no, lang_f_options,
5405 lang_W_options): Const-ify.
5406 * lex.c (java_lex): Likewise.
5407
5408 2001-12-21 Richard Henderson <rth@redhat.com>
5409
5410 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
5411 (get_boehm_type_descriptor): ... here. Arrange for the
5412 TREE_TYPE to get set properly.
5413
5414 2001-12-21 Richard Henderson <rth@redhat.com>
5415
5416 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
5417 only if the target requires collect2.
5418
5419 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
5420
5421 2001-12-20 Tom Tromey <tromey@redhat.com>
5422
5423 For PR java/4509:
5424 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
5425 CAN_COMPLETE_NORMALLY for the node.
5426 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
5427 generate code for second branch if first branch can't complete
5428 normally.
5429 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
5430 the loop head if the loop body can't complete normally.
5431
5432 2001-12-20 Tom Tromey <tromey@redhat.com>
5433
5434 For PR java/4766:
5435 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
5436 case where `finally' clause can't complete normally.
5437
5438 2001-12-20 Tom Tromey <tromey@redhat.com>
5439
5440 Fixes PR java/5057:
5441 * parse.y (analyze_clinit_body): Added this_class parameter.
5442 Check for more cases where we must keep <clinit>.
5443 (maybe_yank_clinit): Cleaned up flow control.
5444
5445 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5446
5447 * decl.c (java_init_decl_processing): Don't initialize
5448 finit_leg_identifier_node.
5449 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
5450 (finit_leg_identifier_node): Remove.
5451 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
5452
5453 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5454
5455 * mangle.c (mangle_member_name): Don't special-case for
5456 NO_DOLLAR_IN_LABEL.
5457 * mangle_name.c (unicode_mangling_length): Likewise.
5458 (append_unicode_mangled_name): Likewise.
5459 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
5460 code.
5461
5462 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5463
5464 * expr.c (build_java_array_length_access): Don't force null pointer
5465 check unless flag_check_references is set.
5466
5467 2001-12-20 Tom Tromey <tromey@redhat.com>
5468
5469 Fix for PR java/3417:
5470 * parse.y (patch_assignment): Added special processing for
5471 `return'.
5472 (patch_return): Don't convert booleans to integers, and don't
5473 special-case `null'.
5474
5475 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
5476
5477 * config-lang.in (diff_excludes): Remove.
5478
5479 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
5480
5481 * gcj.texi: Update link to GCC manual.
5482
5483 2001-12-17 Tom Tromey <tromey@redhat.com>
5484
5485 * parse.y (link_nested_class_to_enclosing): Removed useless
5486 statement.
5487
5488 2001-12-16 Tom Tromey <tromey@redhat.com>
5489
5490 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
5491 Fixes PR java/5088.
5492
5493 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
5494
5495 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
5496 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
5497 spelling errors.
5498
5499 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5500
5501 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
5502
5503 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5504
5505 * decl.c (java_init_decl_processing): Build otable_type correctly.
5506 otable_decl is an otable_type.
5507
5508 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5509
5510 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
5511 otable_type, otable_ptr_type, method_symbol_type,
5512 method_symbols_array_type, method_symbols_array_ptr_type): New
5513 field/global tree definitions.
5514 (flag_indirect_dispatch): New flag.
5515 * decl.c (java_init_decl_processing): Initialize new otable and
5516 otable_syms type nodes and decls. Add new field "index" to
5517 method_type_node.
5518 * class.c (build_method_symbols_entry): New function.
5519 (make_method_value): Set "index" to to method's vtable index for
5520 virtual methods when indirect-dispatch is not used.
5521 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
5522 and set vtable_method_count to -1. Set otable and otable_syms field
5523 if indirect-dispatch is used and there was something to put in them.
5524 (build_method_symbols_entry): New function.
5525 (emit_offset_symbol_table): New function.
5526 * expr.c (get_offset_table_index): New function.
5527 (build_invokevirtual): Build array reference to otable at the index
5528 returned by get_offset_table_index, and use the result as the vtable
5529 offset.
5530 (build_invokeinterface): Similar.
5531 * jcf-parse.c (yyparse): If indirect-dispatch, call
5532 emit_offset_symbol_table at the end of compilation, after all classes
5533 have been generated.
5534 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
5535 * lang.c (flag_indirect_dispatch): Define.
5536 (lang_f_options): Add indirect-dispatch flag.
5537
5538 2001-12-14 Matthias Klose <doko@debian.org>
5539
5540 * gcj.texi: Markup for man page generation. Document missing
5541 options printed by <tool> --help.
5542 Terminate description of gij's -ms option with a dot.
5543 * Make-lang.in ($(srcdir)/java/*.1): New targets.
5544 (java.generated-manpages java.install-man, java.uninstall,
5545 java-maintainer-clean) Updated.
5546
5547 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
5548
5549 * class.c (get_dispatch_table): Fix java vtable layout
5550 for TARGET_VTABLE_USES_DESCRIPTORS.
5551 * decl.c (java_init_decl_processing): Initialize
5552 alloc_no_finalizer_node, finalize_identifier_node.
5553 * expr.c (class_has_finalize_method): New function.
5554 (expand_java_NEW): Generate calls for finalizer-free allocation.
5555 (build_invokevirtual): Fix java vtable layout for
5556 TARGET_VTABLE_USES_DESCRIPTORS.
5557 * java-tree.h (enum java_tree_index): New entries:
5558 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
5559 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
5560 (class_has_finalize_method): declare.
5561 (HAS_FINALIZER_P): New macro.
5562 * parse.y (patch_invoke): Generate calls for finalizer-free
5563 allocation.
5564
5565 2001-12-12 Matthias Klose <doko@debian.org>
5566
5567 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
5568 whitespace at end of line.
5569
5570 2001-12-11 Tom Tromey <tromey@redhat.com>
5571
5572 * lex.c (java_init_lex): Define wfl_to_string as
5573 gnu.gcj.runtime.StringBuffer unless generating bytecode.
5574
5575 2001-12-11 Jeff Sturm <jsturm@one-point.com>
5576
5577 * class.c (make_method_value): Use null_pointer_node to
5578 represent empty exception table.
5579
5580 2001-12-10 Tom Tromey <tromey@redhat.com>
5581
5582 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
5583
5584 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
5585
5586 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
5587
5588 2001-12-09 Per Bothner <per@bothner.com>
5589
5590 * check-init.c (current_switch_has_default): New static field.
5591 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
5592 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
5593 DEFAULT_EXPR seen, simulate a default alternative that copies state.
5594
5595 2001-12-09 Tom Tromey <tromey@redhat.com>
5596
5597 * check-init.c (check_init): Don't allow pre- or post- increment
5598 or decrement of final variable.
5599 (final_assign_error): Minor error message rewording.
5600
5601 2001-12-08 Tom Tromey <tromey@redhat.com>
5602
5603 * java-tree.h: Fixed typo.
5604
5605 * gjavah.c (decompile_method): Don't decompile to `return this'
5606 for static methods.
5607
5608 * gjavah.c (cxx_keywords): Re-sorted.
5609 * lex.c (cxx_keywords): Re-sorted.
5610
5611 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
5612 else.
5613
5614 * gjavah.c (print_namelet): Clear subnamelets.
5615 (HANDLE_METHOD): Set `method_printed' earlier.
5616
5617 2001-12-07 Tom Tromey <tromey@redhat.com>
5618
5619 * lang.c (lang_f_options): Added
5620 optimize-static-class-initialization.
5621 (java_decode_option): Removed special case.
5622
5623 2001-12-07 Per Bothner <per@bothner.com>
5624
5625 * check-init.c (check_init): Fix typo freeing memory twice.
5626
5627 2001-12-05 Per Bothner <per@bothner.com>
5628
5629 Restore support for static class initialization optimization.
5630 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
5631 * check-init.c (check_int): At end of BLOCK handle initialization
5632 blocks, which used to be done in java_complete_expand_method but did
5633 not handle the case where check_for_initialization might allocate
5634 more than a word of bits.
5635 * decl.c (lang_make_tree): The smic field is now a tree.
5636 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
5637 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
5638
5639 * parse.y (emit_test_initialization): Combine hash_lookup calls.
5640
5641 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
5642 Change from a hash table to a list.
5643 (struct_lang_decl): Change field 'smic' to match.
5644 * class.c (add_method_1): Initialize
5645 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
5646 * parse.y (adjust_init_test_initialization): Removed - inlined into -
5647 (java_expand_method_bodies): -here, since 'smic' is now a list.
5648 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
5649
5650 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
5651
5652 * class.c (java_hash_compare_tree_node): Fix casts.
5653
5654 2001-12-04 Per Bothner <per@bothner.com>
5655
5656 * check-init.c: Handle definite unassignment to finals in addition
5657 to definite assignment.
5658 (loop_current_locals): New field.
5659 (num_current_locals, int start_current_locals, num_current_words):
5660 Make static.
5661 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
5662 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
5663 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
5664 (get_variable_decl, check_final_reassigned): New functions.
5665 (check_init, check_bool_init): Modify as needed for checking finals.
5666 (check_for_initialization): Take extra parameter and return void.
5667 Do extra start-up logic to check final fields for assignment.
5668 * parse.y (check_static_final_variable_assignment_flag,
5669 reset_static_final_variable_assignment_flag, check_final_assignment,
5670 check_final_variable_local_assignment_flag,
5671 reset_final_variable_indirect_assignment_flag,
5672 reset_final_variable_global_assignment_flag): Remove functions.
5673 (java_complete_expand_methods, outer_field_access_fix,
5674 patch_assignment): Remove no-longer used logic.
5675 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
5676 * parse.y (register_fields, java_complete_tree): Update accordingly.
5677
5678 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
5679 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
5680 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
5681
5682 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
5683
5684 * java-tree.h (DECL FINAL): New bit-field.
5685 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
5686 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
5687 (DECL_INIT_CALLS_THIS): New macro.
5688 (struct lang_decl): New bit-field init_calls_this.
5689 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
5690 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
5691 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
5692 use it for both local variables and final fields.
5693 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
5694 and local_final.
5695 (struct lang_type): Remove hfv bit-field.
5696 (check_for_initialization): Change to return void.
5697
5698 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
5699 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
5700 * check-init.c (final_assign_error): New helper function.
5701 (check_final_reassigned, check_init): Use it.
5702 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
5703
5704 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
5705 bit-fields to unsigned.
5706
5707 2001-12-03 Per Bothner <per@bothner.com>
5708
5709 * parse.y (patch_binop): Minor constant folding.
5710
5711 * parse.y (build_current_thisn): Shorter 'buffer'.
5712
5713 2001-12-03 Per Bothner <per@bothner.com>
5714
5715 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
5716 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
5717 * jcf-write.c (generate_bytecode_insns): Remove support for
5718 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
5719 * check-init.c (check_init): Likewise.
5720
5721 2001-12-03 Per Bothner <per@bothner.com>
5722
5723 * verify.c (subroutine_nesting): New function.
5724 (verify_jvm_instructions): Use it to fix logic for checking that
5725 we're done with the current subroutine.
5726
5727 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
5728 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
5729
5730 2001-12-03 Per Bothner <per@bothner.com>
5731
5732 * jcf.h: Fix obvious typo in comment.
5733 * typeck.c (build_null_signature): Add comment.
5734
5735 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
5736
5737 * expr.c: Remove leading capital from diagnostic messages, as
5738 per GNU coding standards.
5739 * jcf-io.c: Similarly.
5740 * jcf-parse.c: Similarly.
5741 * jv-scan.c: Similarly.
5742 * jvspec.c: Similarly.
5743 * mangle.c: Similarly.
5744
5745 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
5746 Alexandre Petit-Bianco <apbianco@redhat.com>
5747
5748 * expr.c (build_java_arrayaccess): Call save_expr on array for
5749 correct evaluation order, modified comment, fixed indentation.
5750 * parse.y: (patch_assignment): Correctly extract the array base
5751 from the tree generate by build_java_arrayaccess, added comments.
5752 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
5753 Fixes PR java/3096, PR java/3803, PR java/3965.
5754
5755 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
5756
5757 * expr.c (expand_byte_code): Remove trailing periods from messages.
5758 * jcf-parse.c (load_class, jcf_parse): Similarly.
5759 * jcf-write.c (generate_classfile): Similarly.
5760 * lex.c (java_lex): Similarly.
5761
5762 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5763
5764 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
5765
5766 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
5767
5768 * Make-lang.in (java.generated-manpages): New dummy target.
5769
5770 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5771
5772 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
5773 ASM_FINAL_SPEC.
5774 (lang_specific_pre_link): Use set_input to set input_filename.
5775 Append `main' here.
5776 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
5777 (main): Fix definition.
5778 Strip `main' from classname.
5779 Fixes PR java/227.
5780
5781 2001-11-18 Roger Sayle <roger@eyesopen.com>
5782
5783 * parse.h (java_expand_switch): Remove old prototype.
5784
5785 2001-11-18 Tom Tromey <tromey@redhat.com>
5786
5787 Fix for PR java/1401:
5788 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
5789 arg0 is null.
5790 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
5791 correctly.
5792
5793 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
5794
5795 * lang.c (finish_parse): Rename to java_finish.
5796 (LANG_HOOKS_FINISH, java_finish): New.
5797
5798 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
5799
5800 * decl.c (init_decl_processing): Rename java_init_decl_processing.
5801 * java-tree.h: New prototype.
5802 * lang.c (java_init): Update prototype. Combine with old init_parse.
5803
5804 2001-11-13 Tom Tromey <tromey@redhat.com>
5805
5806 * gjavah.c (method_signature): New global.
5807 (HANDLE_METHOD): Set it.
5808 (decompile_return_statement): New function.
5809 (decompile_method): Use it.
5810 (print_method_info): Removed `synth' argument.
5811
5812 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
5813
5814 * java-tree.h (java_set_yydebug): New.
5815 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
5816 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
5817 (print_lang_decl, print_lang_type, print_lang_identifier,
5818 print_lang_statistics, lang_print_xnode): Remove.
5819
5820 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
5821
5822 * jcf-parse.c (init_lex): Remove.
5823 * lang.c (language_string, lang_identify): Remove.
5824 (struct lang_hooks): Constify.
5825 (LANG_HOOKS_NAME): Override.
5826 (init_parse): Update.
5827
5828 2001-11-08 Andreas Franck <afranck@gmx.de>
5829
5830 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
5831 program_transform_name the way suggested by autoconf.
5832 (java.install-common): Also transform auxiliary program names with
5833 program_transform_name.
5834
5835 2001-11-08 Tom Tromey <tromey@cygnus.com>
5836
5837 * parse.y (trap_overflow_corner_case): New rule.
5838 (unary_expression): Use it.
5839 * lex.c (java_init_lex): Don't set minus_seen.
5840 (yylex): Don't use minus_seen. Communicate overflow to parser for
5841 it to handle.
5842 (error_if_numeric_overflow): New function.
5843 * parse.h (minus_seen): Removed field.
5844 (JAVA_RADIX10_FLAG): New define.
5845
5846 2001-11-07 Tom Tromey <tromey@redhat.com>
5847
5848 Patch for PR java/1414:
5849 * parse.y (case_label_list): New global.
5850 (goal): Register case_label_list with GC.
5851 (java_complete_lhs): Save new case on case_label_list.
5852 (patch_switch_statement): Check for duplicate case labels.
5853
5854 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
5855
5856 * parse.y (patch_assignment): Removed unused third argument.
5857 (java_complete_lhs): Removed unused third argument to patch_assignment.
5858
5859 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
5860
5861 * lang.c: Include langhooks-def.h.
5862 * Make-lang.in: Update.
5863
5864 2001-10-31 Zack Weinberg <zack@codesourcery.com>
5865
5866 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
5867
5868 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5869
5870 * mangle.c (find_compression_record_match): Don't match compression
5871 records for package name elements unless they occur at the start of
5872 the name. Fix for PR java/4717.
5873
5874 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5875
5876 * expr.c (expand_java_field_op): Don't special-case references to
5877 java.lang.PRIMTYPE.TYPE.
5878 (build_primtype_type_ref): Removed.
5879 * java-tree.h (build_primtype_type_ref): Remove prototype.
5880 * parse.y (maybe_build_primttype_type_ref): Removed.
5881 (complete_function_arguments): Don't special-case references to
5882 java.lang.PRIMTYPE.TYPE.
5883 (patch_assignment): Likewise.
5884 (array_constructor_check_entry): Likewise.
5885
5886 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
5887
5888 * mangle.c (static tree compression_table): Fixed leading comment.
5889 * parse.h (struct parser_ctxt): Fixed field comment.
5890 * parse.y (check_pkg_class_access): New prototype, fixed leading
5891 comment, new parameter used to emit error only if passed as true.
5892 (parse_check_super): Pass extra argument to check_pkg_class_access.
5893 (do_resolve_class): Likewise.
5894 (process_imports): Likewise.
5895 (read_import_dir): Fixed indentation.
5896 (find_in_imports_on_demand): New local class_type_name. Local
5897 node_to_use deleted. while loop changed into for loop. Report
5898 multiple definition only for accessible classes. Improved error
5899 message.
5900 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
5901 assigned to parameter list, fixed indentation. while loop changed
5902 into for loop, restore TREE_CHAIN on local `tem' before the next
5903 iteration.
5904
5905 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5906
5907 * lang.c (lang_get_alias_set): Deleted.
5908
5909 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5910
5911 * gjavah.c (jni_print_char): Fix thinko in last change.
5912
5913 * gjavah.c (jni_print_char, decode_signature_piece): Use
5914 safe-ctype macros and/or fold extra calls into fewer ones.
5915 * lex.c (java_read_unicode, java_lex): Likewise.
5916 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
5917 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
5918 * mangle_name.c (append_unicode_mangled_name,
5919 unicode_mangling_length): Likewise.
5920
5921 2001-10-17 Richard Henderson <rth@redhat.com>
5922
5923 * Make-lang.in (java/lang.o): Depend on langhooks.h.
5924
5925 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
5926
5927 * lang.c (langhooks.h): Included.
5928 (LANG_HOOKS_INIT): Redefined.
5929 (LANG_HOOKS_INIT_OPTIONS): Likewise.
5930 (LANG_HOOKS_DECODE_OPTION): Likewise.
5931 (struct lang_hooks lang_hooks): New initialization.
5932
5933 2001-10-11 Per Bothner <per@bothner.com>
5934
5935 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
5936 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
5937 The former is simpler, and jcf-write.c handles it better.
5938 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
5939 or WITH_CLEANUP_EXPR.
5940 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
5941 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
5942
5943 * parse.y (patch_if_else_statement): If the condition is constant,
5944 optimize away the test.
5945
5946 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
5947
5948 * parse.y (patch_cast): Call patch_string on the first operand of
5949 the incoming node, update it if necessary. Fixes PR java/4510.
5950
5951 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5952
5953 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
5954 when name qualifier matches a package name.
5955
5956 2001-10-08 Tom Tromey <tromey@redhat.com>
5957
5958 Fix for PR java/4489:
5959 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
5960 force a new label when computing `body_block'.
5961
5962 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5963
5964 * jcf-io.c (format_uint): Const-ify.
5965 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
5966 * lex.c (java_get_line_col): Likewise.
5967 * parse.y (build_incdec): Likewise.
5968
5969 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
5970
5971 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
5972 a NULL enclosing context if appropriate. Fixes PR java/4466.
5973
5974 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
5975
5976 * parse.y (patch_assignment): Use lvalue's original TYPE when
5977 building the final COMPOUND_EXPR.
5978 (try_reference_assignconv): Fixed leading comment.
5979
5980 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
5981
5982 * parse.y (check_final_variable_indirect_assignment): For
5983 COMPOUND_EXPR, return only if finals were found initialized
5984 properly, if not, keep on checking.
5985 (check_final_variable_global_assignment_flag): New local
5986 error_found, set when appropriate and used to decide whether to
5987 report uninitialized finals. Fixed typo in comment.
5988
5989 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
5990
5991 * decl.c (init_decl_processing): Fixed typo in predef_filenames
5992 last three initializations. Fixes PR java/4360.
5993
5994 2001-09-21 Richard Henderson <rth@redhat.com>
5995
5996 * class.c (get_dispatch_table): Handle function descriptors.
5997 (build_dtable_decl): Likewise.
5998 * expr.c (build_invokevirtual): Likewise.
5999
6000 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
6001
6002 * parse.y (patch_method_invocation): Build class initialization
6003 when static finals are used to qualify method invocation.
6004 Fixes PR java/4366.
6005
6006 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
6007
6008 * parse.h: (WFL_STRIP_BRACKET): Re-written using
6009 build_type_name_from_array_name.
6010 (STRING_STRIP_BRACKETS): New macro.
6011 * parse.y (build_type_name_from_array_name): New function.
6012 (array_creation_expression:): Accumulate []s instead of [s.
6013 (cast_expression:): Accumulate []s instead of [s after cast type
6014 name.
6015 (build_array_from_name): Local string deleted, use
6016 build_type_name_from_array_name.
6017 (build_unresolved_array_type): Accumulate []s instead of [s after
6018 type name.
6019 (register_fields): Fixed comment.
6020 (resolve_class): Local name, base deleted, new locals tname and
6021 array_dims. Use build_type_name_from_array_name. Use array_dims to
6022 build array type.
6023 (purify_type_name): Use STRING_STRIP_BRACKETS.
6024
6025 2001-09-18 Andreas Jaeger <aj@suse.de>
6026
6027 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
6028 * jv-scan.c: Likewise.
6029
6030 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
6031
6032 * parse.y (patch_method_invocation): Inner class creation context
6033 check not enforced within constructors. Fixes PR java/1873.
6034
6035 2001-09-16 Tom Tromey <tromey@redhat.com>
6036
6037 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
6038 NOTE_PUSH for single-case push. Fixes PR java/4189.
6039
6040 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
6041
6042 * java-tree.h (TYPE_IMPORT_LIST): New macro.
6043 (TYPE_IMPORT_DEMAND_LIST): Likewise.
6044 (struct lang_type): New fields import_list and import_demand_list.
6045 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
6046 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
6047 (do_resolve_class): New local saved_enclosing_type, initialized,
6048 passed as parameter to find_in_imports and find_in_imports_on_demand.
6049 (find_in_imports): Added paramater enclosing_type, use its
6050 TYPE_IMPORT_LIST when applicable.
6051 (find_in_imports_on_demand): Added parameter enclosing_type, use
6052 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
6053 declaration and initialization.
6054 (fold_constant_for_init): Switch/restore current_class to the
6055 appropriate context.
6056
6057 2001-09-13 Mark Mitchell <mark@codesourcery.com>
6058
6059 * verify.c (verify_jvm_instructions): Fix typo.
6060
6061 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6062
6063 * expr.c (expand_invoke): Const-ification.
6064 * parse.y (patch_method_invocation): Likewise.
6065
6066 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6067
6068 * gjavah.c (cxx_keywords): Const-ification.
6069 * keyword.gperf (java_keyword): Likewise.
6070 * lang.c (java_tree_code_name): Likewise.
6071 * lex.c (cxx_keywords): Likewise.
6072 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
6073
6074 2001-09-11 Richard Henderson <rth@redhat.com>
6075
6076 * parse.h (ctxp_for_generation): Mark extern.
6077
6078 2001-09-10 Richard Henderson <rth@redhat.com>
6079
6080 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
6081
6082 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
6083
6084 * typeck.c (java_array_type_length, build_prim_array_type):
6085 Represent empty arrays by NULL index.
6086
6087 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
6088
6089 * java-tree.h (compile_resource_file): Grouped with other prototypes.
6090 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
6091
6092 2001-09-06 Anthony Green <green@redhat.com>
6093
6094 * class.c (O_BINARY): Define if necessary.
6095 (registerResource_libfunc): Declare.
6096 (init_class_processing): Initilize registerResource_libfunc.
6097 (compile_resource_file): New function.
6098 * java-tree.h (resource_name): Declare.
6099 (compile_resource_file): Declare.
6100 * jcf-parse.c (yyparse): Handle compiling java resource files.
6101 * lang.c (java_decode_option): Handle -fcompile-resource option.
6102 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
6103 resource files.
6104 * gcj.texi (Code Generation): Add documentation for -R flag.
6105
6106 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
6107
6108 * jcf-write.c (generate_classfile): Issue an error in case of
6109 field/initial value mismatch.
6110 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
6111 being initialized and we're generating bytecode.
6112 (java_complete_lhs): In MODIFY_EXPR section: added comments,
6113 set DECL_INITIAL properly when appropriate.
6114 Fixes PR java/4230
6115 Fixes PR java/4204
6116
6117 2001-09-01 Per Bothner <per@bothner.com>
6118
6119 * parse.y (maybe_yank_clinit): A field without an initializer is not
6120 relevant. All initializers except static final and constant require
6121 <clinit>, regardless of flag_emit_class_files.
6122
6123 2001-08-31 Per Bothner <per@bothner.com>
6124
6125 * class.c (set_constant_value): When not emitting class files, then a
6126 String ConstantValue is a utf8const_ptr_type.
6127
6128 2001-08-30 Per Bothner <per@bothner.com>
6129
6130 * jcf-write.c (generate_classfile): Check that field is primitive
6131 or string before emitting ConstantValue attribute.
6132
6133 2001-08-30 Per Bothner <per@bothner.com>
6134
6135 * parse.y (resolve_qualified_expression_name): If creating a
6136 COMPOUND_EXPR, set it's type correctly.
6137
6138 2001-08-30 Per Bothner <per@bothner.com>
6139
6140 * jcf-io.c (open_class): Set filename field.
6141
6142 * jcf-parse,c (parse_class_file): Set current_function_decl
6143 for better error message when Code attribute is missing.
6144
6145 * lang.c (put_decl_node, lang_print_error): Re-arrange for
6146 better diagnostics, especially for constructors.
6147
6148 2001-08-30 Per Bothner <per@bothner.com>
6149
6150 * jcf-write.c (generate_classfile): Don't write ConstantValue
6151 attribute if field is not final, for compatibility with jdk.
6152
6153 * jcf-write.c (generate_classfile): Convert ConstantValue values
6154 to correct type. Work-around for front-end bug.
6155 * class.c (set_constant_value): Error if constant has wrong type.
6156
6157 2001-08-30 Per Bothner <per@bothner.com>
6158
6159 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
6160 "Double" are printed at verbosity 1.
6161
6162 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
6163
6164 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
6165
6166 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
6167
6168 * parse.y (patch_assignment): Don't verify final re-assignment here.
6169 (java_complete_lhs): Verify assignments to finals calling
6170 patch_assignment. Verify re-assignments to finals before calling
6171 patch_assignment.
6172
6173 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
6174
6175 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
6176 Fixes PR java/1413
6177
6178 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
6179
6180 * lex.c (java_lex): new local found_hex_digits. Set and then used
6181 in test to reject invalid hexadecimal numbers.
6182 * parse.y (java_complete_tree): Prevent unwanted cast with
6183 initialized floating point finals.
6184 (patch_binop): Emit a warning when detecting a division by zero,
6185 mark result not constant, don't simplify non integer division.
6186
6187 2001-08-28 Per Bothner <per@bothner.com>
6188
6189 * jcf-write.c (generate_bytecode_insns): For increments and
6190 decrements just recurse to push constant. Improvement on Mark's patch.
6191
6192 2001-08-28 Mark Mitchell <mark@codesourcery.com>
6193
6194 * jcf-write.c (generate_bytecode_insns): Generate an integer to
6195 real conversion for increments and decrements of reals.
6196
6197 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6198
6199 * parse.y (resolve_qualified_expression_name): Handle unresolved
6200 qualified expressions, prevent numerical qualifiers, fixed typo.
6201 Fixes PR java/4141
6202
6203 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
6204
6205 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
6206 don't report anything but deprecated class when marked so. Handle
6207 VAR_DECL.
6208 (patch_method_invocation): Check deprecation on methods and types.
6209 (patch_binop): code becomes an enum tree_code, added default: to
6210 switch to handle that. Detect division by zero, try to fold and
6211 return before using a subroutine.
6212
6213 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
6214
6215 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
6216 file smaller than 4 bytes.
6217 * parse.y (check_inner_circular_reference): New function.
6218 (check_circular_reference): Likewise.
6219 (array_initializer:): Accept {,}.
6220 (java_check_circular_reference): Rewritten using
6221 check_circular_reference and check_inner_circular_reference.
6222 (java_complete_expand_method): Unconditionally save and restore
6223 the unpurged exception list.
6224 (build_dot_class_method_invocation): Unmangle signature parameter.
6225
6226 2001-08-21 Tom Tromey <tromey@redhat.com>
6227
6228 * decl.c (init_decl_processing): Add `throws' field to method
6229 descriptor.
6230 * class.c (make_method_value): Compute `throws' field for method.
6231
6232 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
6233
6234 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
6235 circularity is detected.
6236 (ctors_unchecked_throws_clause_p): Fixed leading comment.
6237
6238 2001-08-17 Richard Henderson <rth@redhat.com>
6239
6240 * class.c (emit_register_classes): Add align parameter to
6241 call to assemble_integer.
6242
6243 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
6244
6245 * jcf-parse.c (load_class): New locals saved and class_loaded. If
6246 loading a class_or_name fails, try considering an innerclass name
6247 and load the enclosing context.
6248 * parse.y (resolve_inner_class): New function.
6249 (find_as_inner_class): Added leading comment.
6250 (register_incomplete_type): Keep the current context as enclosing
6251 context for JDEP_FIELD dependencies.
6252 (do_resolve_class): Locals new_class_decl and super initialized to
6253 NULL. Call resolve_inner_class, explore the enclosing context
6254 superclass if necessary.
6255 Fixes PR java/4007
6256
6257 2001-08-16 Tom Tromey <tromey@redhat.com>
6258
6259 * jcf-dump.c (main): Updated for change to jcf_path_seal.
6260 * gjavah.c (main): Updated for change to jcf_path_seal.
6261 * lang.c (version_flag): New global.
6262 (java_decode_option): Recognize `-version'.
6263 (java_init): Update for change to jcf_path_seal.
6264 * jcf.h (jcf_path_seal): Added `print' argument.
6265 * jcf-path.c (jcf_path_seal): Added `print' argument.
6266
6267 2001-08-13 Zack Weinberg <zackw@panix.com>
6268
6269 * Make-lang.in (java/decl.o): Update dependencies.
6270 * decl.c: Include libfuncs.h, don't include toplev.h.
6271
6272 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
6273
6274 * decl.c (init_decl_processing): exception_type_node,
6275 class_not_found_type_node, and no_class_def_found_type_node
6276 initialized. predef_filenames augmented accordingly.
6277 instinit_identifier_node initialized.
6278 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
6279 * java-tree.h (enum java_tree_index): New entries
6280 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
6281 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
6282 (exception_type_node): New macro.
6283 (class_not_found_type_node): Likewise.
6284 (no_class_def_found_type_node): Likewise.
6285 (instinit_identifier_node): Likewise.
6286 (PREDEF_FILENAMES_SIZE): Adjusted.
6287 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
6288 (struct lang_type): Fixed typo in bitfield name.
6289 (DECL_INSTINIT_P): New macro.
6290 (ID_INSTINIT_P): Likewise.
6291 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
6292 attribute.
6293 * parse.y (encapsulate_with_try_catch): New function.
6294 (generate_instinit): Likewise.
6295 (build_instinit_invocation): Likewise.
6296 (ctors_unchecked_throws_clause_p): Likewise.
6297 (add_instance_initializer): Deleted.
6298 (build_instance_initializer): Likewise.
6299 (in_instance_initializer): Likewise.
6300 (check_method_redefinition): instinit$ not to be verified.
6301 (java_complete_expand_methods): Generate instinit$, simplified code.
6302 (build_dot_class_method): Eliminated unnecessary locals. Use
6303 encapsulate_with_try_catch, removed unnecessary code.
6304 (fix_constructors): New local iii. Use build_instinit_invocation.
6305 (patch_method_invocation): Added comment.
6306 (maybe_use_access_method): Don't consider instinit$.
6307 (find_applicable_accessible_methods_list): Shorten the search for
6308 instinit$ too.
6309 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
6310 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
6311 (patch_throw_statement): Likewise. Fixed typo.
6312
6313 2001-08-12 David Edelsohn <edelsohn@gnu.org>
6314
6315 Revert:
6316 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6317 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6318 ASM_FINAL_SPEC.
6319 (lang_specific_pre_link): Use set_input to set input_filename.
6320 Append `main' here.
6321 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6322 (main): Fix definition.
6323 Strip `main' from classname.
6324 Fixes PR java/227.
6325
6326 2001-08-11 Zack Weinberg <zackw@panix.com>
6327
6328 * lex.h: Don't include setjmp.h. Don't define
6329 SET_FLOAT_HANDLER or prototype set_float_handler.
6330
6331 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6332
6333 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
6334 `poplevel' in the right order.
6335
6336 2001-08-09 Richard Henderson <rth@redhat.com>
6337
6338 * Make-lang.in (class.o): Depend on TARGET_H.
6339 * class.c (emit_register_classes): Use target hooks instead of
6340 assemble_constructor and assemble_destructor.
6341
6342 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
6343
6344 * check-init.c (flags.h): Include
6345 (check_init): Don't report uninitialized static class
6346 initialization flags, don't free bit index when doing static class
6347 initialization optimization.
6348 (check_for_initialization): Return type changed to `unsigned int.'
6349 (attach_initialized_static_class): New function.
6350 * class.c (add_method_1): Create the initialized static class
6351 table if necessary.
6352 (finish_class): Always emit deferred inline methods.
6353 * decl.c (emit_init_test_initialization): Moved to expr.c
6354 (complete_start_java_method): Don't traverse
6355 DECL_FUNCTION_INIT_TEST_TABLE.
6356 (lang_mark_tree): Mark hash tables in function decls.
6357 * expr.c (emit_init_test_initialization): Moved from decl.c.
6358 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
6359 initialization flag, set DECL_CONTEXT and
6360 LOCAL_CLASS_INITIALIZATION_FLAG.
6361 (java_lang_expand_expr): Emit initialization code for static class
6362 initialized flags when entering block, if necessary.
6363 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
6364 * java-tree.h (flag_optimize_sci): New global variable declaration.
6365 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
6366 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
6367 (LOCAL_FINAL_P): Fixed typo in comment.
6368 (FINAL_VARIABLE_P): Likewise.
6369 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
6370 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
6371 (struct lang_decl): New fields `ict', `smic' and `cif.'
6372 (check_for_initialization): New returned value for global.
6373 (attach_initialized_static_class): New global function.
6374 (STATIC_CLASS_INIT_OPT_P): New macro.
6375 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
6376 * lang.c (java_decode_option): Handle
6377 `-fno-optimize-static-class-initialization'
6378 * parse.y (start_complete_expand_method): New function.
6379 (java_expand_method_bodies): Likewise.
6380 (attach_init_test_initialization_flags): Likewise.
6381 (adjust_init_test_initialization): Likewise.
6382 (emit_test_initialization): Likewise.
6383 (java_complete_expand_methods): Nullify abstract and native method
6384 bodies.
6385 (java_complete_expand_method): New locals `fbody', `block_body'
6386 and `exception_copy.' Reorganized: directly return on empty method
6387 bodies, call `start_complete_expand_method', remember definitely
6388 initialized static class in function, don't expand method bodies.
6389 (java_expand_classes): Call `java_expand_method_bodies' before
6390 `finish_class' when compiling to native.
6391 (resolve_expression_name): Use `orig' after building outer class
6392 field access.
6393 (patch_invoke): Remember static method invocations.
6394
6395 2001-08-06 Richard Henderson <rth@redhat.com>
6396
6397 * class.c (emit_register_classes): Pass a symbol_ref and priority
6398 to assemble_constructor.
6399
6400 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
6401
6402 * java-tree.h (all_class_filename): New macro.
6403 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
6404 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
6405 newly created IDENTIFIER_NODE to `all_class_filename.'
6406
6407 2001-08-01 Jeff Sturm <jsturm@one-point.com>
6408
6409 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
6410 Use ggc_add_tree_root to register roots.
6411
6412 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
6413
6414 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
6415 second operand calling check_init.
6416 * decl.c (complete_start_java_method): Swaped second and third
6417 arguments while creating WITH_CLEANUP_EXPR node.
6418 * jcf-write.c (generate_bytecode_insns): Use second operand
6419 instead of third when handling WITH_CLEANUP_EXPR.
6420 * parse.y (java_complete_lhs): Expand second operand of
6421 WITH_CLEANUP_EXPR nodes.
6422 (patch_synchronized_statement): Swaped second and third arguments
6423 while creating WITH_CLEANUP_EXPR node.
6424
6425 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
6426
6427 * parse.y (create_interface): Avoid cyclic inheritance report when
6428 syntax error encountered during class definition.
6429 Fixes PR java/2956
6430
6431 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6432
6433 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6434 ASM_FINAL_SPEC.
6435 (lang_specific_pre_link): Use set_input to set input_filename.
6436 Append `main' here.
6437 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6438 (main): Fix definition.
6439 Strip `main' from classname.
6440 Fixes PR java/227.
6441
6442 2001-07-18 Tom Tromey <tromey@redhat.com>
6443
6444 For PR java/2812:
6445 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
6446 * lex.c (java_new_lexer): Use ICONV_CONST.
6447 (java_read_char): Likewise.
6448 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
6449 (jv-scan$(exeext)): Likewise.
6450
6451 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
6452
6453 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
6454 * parse.y (check_class_interface_creation): Allow `private' if the
6455 enclosing is not an interface.
6456 (create_interface): Interface tagged public if the enclosing
6457 context is an interface.
6458 (create_class): Class tagged public if the enclosing context
6459 is an interface.
6460 Fixes PR java/2959
6461
6462 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
6463
6464 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
6465 Fixes PR java/2665
6466
6467 2001-07-14 Tim Josling <tej@melbpc.org.au>
6468
6469 * check-init.c (check_init): Remove references to EXPON_EXPR.
6470
6471 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
6472
6473 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
6474 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
6475 Fixes PR java/3602
6476
6477 2001-07-13 Tom Tromey <tromey@redhat.com>
6478
6479 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
6480 invocation.
6481
6482 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
6483
6484 * parse.y (patch_method_invocation): Don't override primary if one
6485 is already provided, but let this$<n> be built. Fixed comment.
6486
6487 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
6488
6489 * parse.y (empty_statement:): Report empty statement error only
6490 when found at class declaration level.
6491 Fixes PR java/3635
6492
6493 2001-07-12 Tom Tromey <tromey@redhat.com>
6494
6495 * expr.c (expand_load_internal): New function.
6496 (LOAD_INTERNAL): Use it.
6497
6498 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
6499
6500 * parse.y (verify_constructor_super): Compare anonymous class ctor
6501 args with `valid_method_invocation_conversion_p.'
6502 Fixes PR java/3285
6503
6504 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
6505
6506 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
6507 `-fsyntax-only.' Fixes PR java/3248
6508
6509 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
6510
6511 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
6512
6513 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
6514
6515 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
6516 current function is static. Fixes PR java/1970
6517
6518 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6519
6520 * parse.y (patch_method_invocation): Add enclosing context to ctor
6521 calls if necessary. Fixes PR java/2953
6522
6523 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6524
6525 * parse.y (resolve_package): Abort if qualified expression member
6526 isn't right.
6527 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
6528 Fixes PR java/1391
6529
6530 2001-07-07 Zack Weinberg <zackw@stanford.edu>
6531
6532 * verify.c: Don't use // comments.
6533
6534 2001-07-05 Tom Tromey <tromey@redhat.com>
6535
6536 * lang.c (flag_assume_compiled): Removed.
6537 * java-tree.h (flag_assume_compiled): Removed.
6538 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
6539 -fhash-synchronization, -fuse-divide-subroutine,
6540 -fcheck-references, -femit-class-file, -femit-class-files,
6541 -fassume-compiled. Updated --encoding information. Changed
6542 -foutput-class-dir to `-d'.
6543
6544 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
6545
6546 * jcf-parse.c (parse_class_file): Add lineno parameter to
6547 debug_start_source_file call.
6548
6549 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
6550
6551 * gcj.texi: Use gpl.texi.
6552 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
6553 dependencies and use doc/include in search path.
6554
6555 2001-07-03 Jeff Sturm <jsturm@one-point.com>
6556
6557 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
6558 `this'. If so, don't build instance initializers.
6559
6560 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
6561
6562 * parse.y (resolve_expression_name): Improved error message for
6563 inner class cases. Fixes PR java/1958
6564
6565 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
6566
6567 * lang.c: #include diagnostic.h
6568 (lang_print_error): Add a `diagnostic_context *' parameter.
6569 (java_dummy_print): Likewise.
6570 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
6571
6572 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6573
6574 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
6575 * jcf.h (typedef struct JCF): New bitfield `finished.'
6576 (JCF_FINISH): Set `finished.'
6577 (JCF_ZERO): Reset `finished.'
6578 Fixes PR java/2633
6579
6580 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6581
6582 * parse.y (class_body_declaration:): Don't install empty instance
6583 initializers.
6584 Fixes PR java/1314
6585
6586 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6587
6588 * class.c (set_super_info): Call `set_class_decl_access_flags.'
6589 (set_class_decl_access_flags): New function.
6590 * java-tree.h (set_class_decl_access_flags): New prototype.
6591 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
6592 (parse_class_file): New local `decl_max_locals.' Take wide types
6593 into account to compute DECL_MAX_LOCALS.
6594 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
6595 imports on demand.
6596
6597 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
6598
6599 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
6600
6601 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
6602
6603 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
6604 * parse.y (do_resolve_class): Moved comments out to leading comment
6605 section. Removed local `start', New local `_ht' and
6606 `circularity_hash.' Record `enclosing' in hash table and search
6607 it to detect circularity. Use `enclosing' as an argument to
6608 `lookup_cl.' Free the hash table when done.
6609
6610 2001-06-19 Tom Tromey <tromey@redhat.com>
6611
6612 * lex.c (java_read_char): Disallow invalid and overlong
6613 sequences. Fixes PR java/2319.
6614
6615 2001-06-05 Jeff Sturm <jsturm@one-point.com>
6616
6617 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
6618
6619 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
6620
6621 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
6622 arguments accordingly.
6623
6624 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
6625
6626 * gcj.texi: Move contents to just after title page.
6627
6628 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
6629
6630 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
6631 builtin type.
6632 (patch_incomplete_class_ref): Build the class ref, build the class
6633 init if necessary, complete the tree.
6634 Fixes PR java/2605
6635
6636 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
6637
6638 * parse.y (lookup_field_wrapper): Test `name' code.
6639 (resolve_qualified_expression_name): Test `qual_wfl' code.
6640 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
6641 handle `qual_wfl' by code.
6642 (maybe_build_primttype_type_ref): Test `wfl' code.
6643
6644 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6645
6646 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
6647 fdl.texi.
6648 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
6649 the dvi file in the java directory.
6650
6651 2001-05-25 Sam TH <sam@uchicago.edu>
6652
6653 * gen-table.pl javaop.h jcf.h lex.h,
6654 parse.h: Fix header include guards.
6655
6656 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
6657
6658 * jv-scan.c (version): Update copyright year.
6659
6660 2001-05-21 Per Bothner <per@bothner.com>
6661
6662 * jcf-parse.c (read_class): If class is from .class or .zip file
6663 and it's already been read, don't push/pop parser context.
6664
6665 2001-05-18 Per Bothner <per@bothner.com>
6666
6667 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
6668 command line so the jvgenmain-generated main program comes first.
6669
6670 2001-05-15 Tom Tromey <tromey@redhat.com>
6671
6672 * class.c (build_utf8_ref): Don't generate identifier based on
6673 utf8const contents.
6674
6675 2001-05-12 Richard Henderson <rth@redhat.com>
6676
6677 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
6678 * expr.c (java_lang_expand_expr): Expand it.
6679 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
6680 calling build_exception_object_ref.
6681 * parse.y (catch_clause_parameter): Likewise.
6682 (build_dot_class_method): Likewise.
6683 (try_reference_assignconv): Likewise.
6684 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
6685 * jcf-write.c (generate_bytecode_insns): Likewise.
6686
6687 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
6688
6689 * parse.y (build_unresolved_array_type): Set
6690 EXPR_WFL_QUALIFICATION on the newly created wfl.
6691 Fixes PR java/2538. Fixes PR java/2535.
6692
6693 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
6694
6695 * parse.y (fix_constructors): Removed unnecessary assignment to
6696 local. Moved assignment to `this$<n>', fixed comments and
6697 indentation.
6698 (build_wfl_wrap): Fixed indentation.
6699 Fixes PR java/2598, java/2579 and java/2658.
6700
6701 2001-05-03 Mo DeJong <mdejong@redhat.com>
6702
6703 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
6704 check for byte swap.
6705
6706 2000-05-02 Jeff Sturm <jsturm@one-point.com>
6707
6708 * expr.c (build_class_init): Move MODIFY_EXPR
6709 outside of COND_EXPR. Remove variable `call'.
6710
6711 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6712
6713 * decl.c: NULL_PTR -> NULL.
6714 * jcf-write.c: Likewise.
6715
6716 2001-05-01 Tom Tromey <tromey@redhat.com>
6717
6718 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
6719 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
6720 * gcj.texi: Updated copyright text. Include fdl.texi.
6721 (Top): Link to new node.
6722
6723 2001-05-01 Per Bothner <per@bothner.com>
6724
6725 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
6726
6727 2001-05-01 Per Bothner <per@bothner.com>
6728
6729 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
6730 import_list contains the name, not the TREE_PURPOSE.
6731
6732 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6733
6734 * jcf-io.c (read_zip_member): Cast to long in comparison with
6735 signed value.
6736
6737 * jvspec.c (lang_specific_driver): Initialize variables.
6738
6739 * mangle.c (find_compression_record_match): Likewise.
6740
6741 * typeck.c (build_null_signature): Provide static prototype. Mark
6742 parameter with ATTRIBUTE_UNUSED.
6743
6744 * verify.c (verify_jvm_instructions): Initialize variable.
6745
6746 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
6747
6748 * parse.y (do_resolve_class): Check for cyclic inheritance during
6749 inner class resolution.
6750
6751 2001-04-27 Per Bothner <per@bothner.com>
6752
6753 * parse.y (java_expand_classes): Don't change ctxp_for_generation
6754 while iterating, since that could cause gc to lose stuff.
6755
6756 2001-04-26 Per Bothner <per@bothner.com>
6757
6758 Fix method search wrt scope of inner classes to match JLS2.
6759 * typeck.c (build_null_signature): New static function.
6760 (has_method): New function. Uses build_null_signature and lookup_do.
6761 * java-tree.h (has_method): New declaration.
6762 * parse.y (find_applicable_accessible_methods_list): Do not search
6763 context of inner classes here.
6764 (patch_method_invocation): Search scope, ie. current and outer clases,
6765 for method matching simple name, to find class.
6766
6767 2001-04-26 Per Bothner <per@bothner.com>
6768
6769 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
6770 Fix thinko: If a single case, use if_icmpeq, not ifeq.
6771
6772 * constants.c (find_methodref_with_class_index): New function.
6773 (find_methodref_index): Use find_methodref_with_class_index.
6774 * java-tree.h (find_methodref_with_class_index): New declaration.
6775 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
6776 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
6777 If context changed from interface to class, don't use invokeinterface.
6778
6779 2001-04-25 Per Bothner <per@bothner.com>
6780
6781 * verify.c (verify_jvm_instructions): For field instructions,
6782 check that field index is valid. For invoke instructions, check that
6783 method index is valid.
6784
6785 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
6786
6787 * config-lang.in (target_libs): Copy from $libgcj_saved.
6788
6789 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
6790
6791 * decl.c (init_decl_processing): Add new class "protectionDomain"
6792 field.
6793 * class.c (make_class_data): Set initial value for "protectionDomain".
6794
6795 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6796
6797 * jvspec.c (lang_specific_driver): Fix memory allocation
6798 deficit, by using concat in lieu of xmalloc/sprintf.
6799
6800 2001-04-20 Per Bothner <per@bothner.com>
6801
6802 Fixes to compile multiple .class files at once.
6803 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
6804 * java-tree.h (CLASS_PARSED_P): New macro.
6805 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
6806 * jcf-parse.c (jcf_parse_source): Inline into read_class.
6807 (read_class): Avoid some code duplication.
6808 Don't call JCF_FINISH for a .class file - might be needed later.
6809 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
6810 rather than CLASS_LOADED_P, since latter implies class laid out.
6811 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
6812 * parse.y: Don't need to set CLASS_LOADED_P for array types.
6813
6814 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6815
6816 * Make-lang.in (java/boehm.o): Depend on toplev.h.
6817
6818 * boehm.c: Include toplev.h.
6819
6820 2001-04-06 Tom Tromey <tromey@redhat.com>
6821 Alexandre Petit-Bianco <apbianco@redhat.com>
6822
6823 Fix for PR gcj/1404 and PR gcj/2332:
6824 * parse.y (build_array_from_name): If we use the type_wfl then
6825 accumulate dimensions from the original type as well.
6826 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
6827
6828 2001-04-06 Tom Tromey <tromey@redhat.com>
6829
6830 * parse.y (analyze_clinit_body): Return true if the second operand
6831 of a METHOD_EXPR is nonzero.
6832
6833 2001-04-06 Tom Tromey <tromey@redhat.com>
6834
6835 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
6836 directory.
6837 ($(srcdir)/java/parse.c): Likewise.
6838
6839 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
6840
6841 * gcj.texi: Use `which-gcj' instead of `which-g77.'
6842 (version-gcc): Initialized.
6843 (which-gcj): Likewise.
6844
6845 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
6846
6847 * java-tree.h (struct lang_decl): New macro
6848 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
6849 * parse.y (build_instance_initializer): New function.
6850 (add_instance_initializer): Use it.
6851 (java_fix_constructors): Set `current_class' before fix pass.
6852 (fix_constructors): Just return if already fixed. Move `super()'
6853 invocation ahead. Use `build_instance_initializer.'
6854 Fixes PR java/1315.
6855
6856 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
6857
6858 * parse.y (resolve_qualified_expression_name): Pass field's
6859 DECL_CONTEXT to `not_accessible_p.'
6860 (not_accessible_p): Changed parameters order in `inherits_from_p'
6861 invocation.
6862
6863 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
6864
6865 * lang-options.h: Add flag_check_references.
6866
6867 2001-04-04 Per Bothner <per@bothner.com>
6868
6869 * java-tree.h (CONSTANT_VALUE_P): New macro.
6870 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
6871 * parse.y (maybe_build_class_init_for_field): New static function.
6872 (resolve_expression_name, resolve_field_access): Use
6873 maybe_build_class_init_for_field instead of build_class_init
6874 This does not do the init if the field is compile-time-constant.
6875 (resolve_field_access): Simplify.
6876
6877 * parse.y (fold_constant_for_init): Merge test into switch.
6878
6879 2001-04-03 Zack Weinberg <zackw@stanford.edu>
6880
6881 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
6882 on gansidecl.h.
6883 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
6884
6885 2001-04-02 Zack Weinberg <zackw@stanford.edu>
6886
6887 * expr.c (pop_type_0): Save the result of the first
6888 lang_printable_name call in a scratch buffer, so it
6889 won't be clobbered by the second call.
6890
6891 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
6892
6893 * parse-scan.y (array_type:): Rewritten.
6894 (type_declaration:): `empty_statement' replaces `SC_TK.'
6895 (class_member_declaration:): `empty statement' added.
6896 (method_body:): Simplified.
6897 (static_initializer:): Likewise.
6898 (primary_no_new_array:): Use `type_literals.'
6899 (type_literals:): New rule.
6900 (dims:): Set and update `bracket_count.'
6901 Fixes PR java/1074. Fixes PR java/2412.
6902
6903 2001-03-28 Hans Boehm <boehm@acm.org>
6904
6905 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
6906 (get_boehm_type_descriptor): Set type on returned value to be a
6907 pointer length integer.
6908
6909 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6910
6911 * expr.c (pop_type_0): Call `concat' rather than building the
6912 string manually.
6913 (pop_type): Add format specifier in call to `error'.
6914
6915 * parse.y (patch_method_invocation): Avoid casting away
6916 const-ness.
6917
6918 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
6919
6920 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
6921
6922 2001-03-28 Richard Henderson <rth@redhat.com>
6923
6924 IA-64 ABI Exception Handling:
6925 * Make-lang.in (except.o): Don't depend on eh-common.h.
6926 * check-init.c (check_init): Handle EXC_PTR_EXPR.
6927 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
6928 [soft_exceptioninfo_call_node]: Remove.
6929 [eh_personality_libfunc, lang_eh_runtime_type]: New.
6930 (end_java_method): No emit_handlers.
6931 * except.c (java_set_exception_lang_code): Remove.
6932 (method_init_exceptions): Don't call it.
6933 (prepare_eh_table_type): No CATCH_ALL_TYPE.
6934 (build_exception_object_ref): New.
6935 (expand_end_java_handler): Update for except.h name changes.
6936 (emit_handlers, expand_resume_after_catch): Remove.
6937 * expr.c (java_lang_expand_expr): Update for except.h name changes.
6938 (process_jvm_instruction): Use build_exception_object_ref.
6939 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
6940 (soft_exceptioninfo_call_node): Remove.
6941 (build_exception_object_ref): Declare.
6942 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
6943 soft_exceptioninfo_call_node. Move processing ...
6944 [EXC_PTR_EXPR]: ... here.
6945 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
6946 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
6947 (source_end_java_method): No java_set_exception_lang_code or
6948 emit_handlers.
6949 (build_dot_class_method): Use build_exception_object_ref.
6950 (try_reference_assignconv): Check EXC_PTR_EXPR not
6951 soft_exceptioninfo_call_node.
6952
6953 2001-03-28 Richard Henderson <rth@redhat.com>
6954
6955 * java-tree.h (throw_node): Define as a single member of
6956 java_global_trees instead of a separate array.
6957 (JTI_THROW_NODE): New.
6958 * decl.c (throw_node): Don't declare.
6959 (init_decl_processing): Init a scalar throw_node.
6960 Don't register it for gc.
6961 * check-init.c (check_init): Reference scalar throw_node.
6962 * expr.c (build_java_athrow): Likewise.
6963 * jcf-write.c (generate_bytecode_insns): Likewise.
6964 * parse.h (BUILD_THROW): Likewise.
6965
6966 2001-03-28 Richard Henderson <rth@redhat.com>
6967
6968 * decl.c (end_java_method): Do not save and restore
6969 flag_non_call_exceptions.
6970 * parse.y (source_end_java_method): Likewise.
6971 * lang.c (flag_exceptions): Don't declare.
6972 (java_init_options): Set flag_non_call_exceptions. Set
6973 flag_exceptions here ...
6974 (java_init): ... not here.
6975
6976 2001-03-27 Richard Henderson <rth@redhat.com>
6977
6978 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
6979 exceptions_via_longjmp.
6980
6981 * lang.c (flag_new_exceptions): Don't declare it.
6982 (java_init_options): Or set it.
6983
6984 2001-03-27 Richard Henderson <rth@redhat.com>
6985
6986 * decl.c (end_java_method): Rename asynchronous_exceptions to
6987 flag_non_call_exceptions.
6988 * parse.y (source_end_java_method): Likewise.
6989
6990 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6991
6992 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
6993
6994 2001-03-26 Mark Mitchell <mark@codesourcery.com>
6995
6996 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
6997
6998 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
6999
7000 * parse.y (find_as_inner_class): Follow current package
7001 indications not to mistakingly load an unrelated class.
7002
7003 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7004
7005 * constants.c (PUTN): Use memcpy, not bcopy.
7006
7007 * lex.c (java_read_char): Use memmove, not bcopy.
7008
7009 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
7010
7011 2001-03-23 Per Bothner <per@bothner.com>
7012
7013 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
7014 macro for better error pin-pointing.
7015 * java-tree.h: Fix typo in comment.
7016
7017 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
7018 Don't include jsr/goto in exception range.
7019 Check if start and end of exception range are the same (also TRY_EXPR).
7020 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
7021 However, do emit the following goto even if try_block is empty.
7022 Defer freeing exception_decl until after the finalizer, to make
7023 sure the local isn't reused in the finalizer. Fixes PR java/1208.
7024
7025 * parse.y (java_complete_lhs): If the try-clause is empty, just
7026 return the finally-clause and vice versa.
7027
7028 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
7029
7030 * gcj.texi (Input Options): documented the check for attribute
7031 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
7032 * java-tree.h (flag_force_classes_archive_check): Declared extern.
7033 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
7034 (jcf_parse): Check for the right classes archive if necessary.
7035 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
7036 (jcf_parse_fields): Fixed indentation.
7037 * jcf-write.c (append_gcj_attribute): New function.
7038 (generate_classfile): Compute the attribute count, invoke
7039 `append_gcj_attribute'.
7040 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
7041 turned into bit-fields. New bit-field `right_zip.'
7042 (JCF_ZERO): Set `right_zip' to zero.
7043 * lang-options.h (-fforce-classes-archive-check): Added flag.
7044 * lang.c (flag_force_classes_archive_check): New flag.
7045 (lang_f_options): New entry `force-classes-archive-check.'
7046 Fixes PR java/1213.
7047
7048 2001-02-07 Andrew Haley <aph@redhat.com>
7049
7050 * gcj.texi (Configure-time Options): Add -fcheck-references.
7051 * expr.c (build_java_indirect_ref): New function.
7052 (java_check_reference): New function.
7053 (build_java_array_length_access): Use build_java_indirect_ref to
7054 check for null references.
7055 (build_java_arrayaccess): Likewise.
7056 (build_get_class): Likewise.
7057 (build_field_ref): Likewise.
7058 (invoke_build_dtable): Likewise.
7059 (build_invokeinterface): Likewise.
7060 * lang.c (lang_f_options): Add flag_check_references.
7061 * jvspec.c (jvgenmain_spec): Add flag_check_references.
7062 * java-tree.h (flag_check_references): New variable.
7063 * lang.c (flag_check_references): Likewise.
7064 * parse.y (patch_invoke): Use java_check_reference.
7065 (patch_assignment): Allow for extra nesting in
7066 _Jv_CheckArrayStore.
7067
7068 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
7069
7070 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
7071 * lex.c (cxx_keywords): Likewise.
7072
7073 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
7074
7075 * parse.y (qualify_ambiguous_name): Broaden `length'
7076 recognition. Help MODIFY_EXPR be resolved as expression names.
7077 Fixes PR java/2066. Fixes PR java/2400.
7078
7079 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
7080
7081 * gjavah.c (process_file): Mark interface definitions with
7082 "__attribute__ ((java_interface))".
7083
7084 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
7085
7086 * class.c (layout_class): Fixed push_super_field's second
7087 argument. Fixes PR java/2333.
7088 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
7089 too early to lay innerclasses out.
7090
7091 2001-03-20 Tom Tromey <tromey@redhat.com>
7092 Alexandre Petit-Bianco <apbianco@redhat.com>
7093
7094 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
7095 inside an array reference. Insertion of the array store check
7096 rewritten. Fixes PR java/2299.
7097
7098 2001-03-20 Tom Tromey <tromey@redhat.com>
7099
7100 * lex.c (java_read_unicode): Only accept leading `u's.
7101
7102 2001-03-20 Tom Tromey <tromey@redhat.com>
7103
7104 * jcf-parse.c (read_class): Initialize `class'.
7105
7106 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
7107
7108 * jcf_parse.c (jcf_parse): Eliminate unused variable.
7109
7110 2001-03-19 Mark Mitchell <mark@codesourcery.com>
7111
7112 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
7113 (layout_class): Likewise.
7114 (layout_class_method): Likewise.
7115 (emit_register_classes): Likewise.
7116 * decl.c (builtin_function): Likewise.
7117 (give_name_to_locals): Likewise.
7118
7119 2001-03-19 Per Bothner <per@bothner.com>
7120
7121 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
7122 before trying to load an inner class.
7123
7124 Fixes to process to command-line .class files in two passes.
7125 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
7126 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
7127 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
7128 * class.c (is_compiled_class): Fix for renamed flag.
7129 * parse.y (maybe_create_class_interface_decl): Likewise.
7130 * jcf-parse.c (yyparse): Also set if compiling .class files.
7131 * jcf-parse.c (read_class); Read current_class.
7132 (jcf_parse): Make static.
7133 (load_inner_classes): New function, with code moved from jcf_parse,
7134 because we need to inner classes after the command-line files are read.
7135 (yyparse): Set finput to NULL when it doesn't need to be closed.
7136 Reduce use of main_jcf (basically only for archive) and
7137 use finput instead of main_jcf->read_state.
7138 Inline jcf_figure_file_type into yyparse.
7139 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
7140 Defer load_inner_classes and parse_class_file to a second pass,
7141 after we've correctly mapped command-line .clas fiels to classes.
7142 (jcf_figure_file_type): Removed.
7143 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
7144 (JCF_ZERO): Also clear zipd field.
7145 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
7146
7147 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
7148
7149 * jcf-parse.c (yyparse): Change ch from char * to char.
7150
7151 2001-03-19 Per Bothner <per@bothner.com>
7152
7153 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
7154 Add constructed filelist-file at end, following -xjava. Thus any .o
7155 and library files are not affected by the -xjava. Also wrap
7156 explicit @FILE with -xjava and -xnone.
7157
7158 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
7159
7160 * class.c (build_static_field_ref): Call make_decl_rtl() after
7161 setting the DECL_EXTERNAL flag.
7162
7163 2001-03-17 Per Bothner <per@bothner.com>
7164
7165 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
7166
7167 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
7168 when result is is needed (target is STACK_TARGET).
7169
7170 * parse.h (JDEP_SOLV): Removed.
7171 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
7172
7173 * parse.y (incomplete_class_list): Removed.
7174 (obtain_incomplete_type): Don't use or set incomplete_class_list.
7175 It doesn't work if resolve_class changes the name of an array type
7176 that is on the list and then someone else looks for the modified name.
7177 Also, seems liable to break when compiling multiple source files at
7178 once. So the simplest is to just remove incomplete_class_list -
7179 it is only a minor space win and it is not even clear it saves time.
7180
7181 * parse.y (resolve_class): Remove unneeded promote_type.
7182
7183 2001-03-15 Per Bothner <per@bothner.com>
7184
7185 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
7186 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
7187 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
7188 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
7189
7190 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
7191 * parse.y (java_expand_classes): Likewise.
7192
7193 * parse.y (expand_start_java_method): Was only called once and had a
7194 misleading name, so inline in caller java_complete_expand_method.
7195 (enter_a_block): Likewise inline in enter_block and remove.
7196
7197 Remove junk from when gcc/java was created (by copying from C/C++).
7198 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
7199 (struct binding_level): Remove fields keep, keep_if_subblocks,
7200 more_cleanups_ok, have_cleanups (which have never been used).
7201 (pushlevel, poplevel): Remove related useless code.
7202
7203 * class.c (make_class_data): The class_dtable_decl (i.e. the
7204 vtable for Class) should be external, except when compiling Class.
7205
7206 * jvspec.c (lang_specific_driver): Fix -C handling.
7207 Check -save-temps to see if temp @FILE should be deleted.
7208 Follow-up to/fix for February 16 patch.
7209
7210 * verify.c (verify_jvm_instructions): Better error msgs for dup.
7211 (type_stack_dup): Remove no-longer neded error check.
7212
7213 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
7214
7215 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
7216 to 'for_pointer'. If this type is for a pointer (argument) mangling,
7217 don't surround the element with 'N..E' if the type name is
7218 unqualified.
7219
7220 2001-03-14 Mark Mitchell <mark@codesourcery.com>
7221
7222 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
7223 DECL_RTL_SET_P, etc.
7224 (make_method_value): Likewise.
7225 (get_dispatch_table): Likewise.
7226
7227 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7228
7229 2001-03-07 Tom Tromey <tromey@redhat.com>
7230
7231 * config-lang.in (lang_requires): Define.
7232
7233 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
7234
7235 * typeck.c (convert): Check flag_unsafe_math_optimizations,
7236 not flag_fast_math.
7237
7238 2001-03-05 Per Bothner <per@bothner.com>
7239
7240 Fix a problem where rest_of_decl_compilation applied to
7241 class_dtable_decl causes problems because it was done too early,
7242 before output file was opened.
7243 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
7244 * class.c (class_dtable_decl): Add macro - element of class_roots.
7245 (make_class_data): Define class_dtable_decl.
7246 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
7247
7248 2001-03-01 Zack Weinberg <zackw@stanford.edu>
7249
7250 * java/class.c, java/decl.c, java/java-tree.h: Replace all
7251 uses of 'boolean' with 'bool'.
7252
7253 2001-03-01 Zack Weinberg <zackw@stanford.edu>
7254
7255 * lang-specs.h: Add zero initializer for cpp_spec field to all
7256 array elements.
7257
7258 2001-02-16 Per Bothner <per@bothner.com>
7259
7260 Handle compiling multiple input files at once, and @FILE syntax.
7261 * gcj.texi: Updated documentation to match.
7262 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
7263 * jcf-parse.c (parse_source_file): Split into ...
7264 (parse_source_file_1): New function - and:
7265 (parse_source_file_2): New function.
7266 (yyparse): On -ffilelist-file, open and scan named file.
7267 On first pass over files, only do parse_source_file_1.
7268 A new second pass calls parse_source_file_2 for each file to compile.
7269 (init_jcf_parse): Call init_src_parse.
7270 * jvspec.c (INDIRECT_FILE_ARG): New flag.
7271 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
7272 as multiple input file combined in one compilation.
7273 * lang-options.h: Add -ffilelist-file
7274 * lang.c (flag_filelist_file): New flag variable.
7275 (lang_f_options): Handle -ffilelist-file.
7276 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
7277 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
7278 gclass_list - use global fields of src_parse_roots instead.
7279 * parse.y (src_parse_roots): New array.
7280 (incomplete_class_list, gclass_list): New macros.
7281 (push_parser_context, java_pop_parser_context,
7282 java_parser_context_resume): Don't fiddle with deleted fields.
7283 (various): Use incomplete_class gclass_list and global macros
7284 instead of parse_ctxt fields - the lists are global.
7285 (init_src_parse): New function.
7286
7287 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7288
7289 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
7290
7291 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
7292
7293 * parse.y (check_inner_class_access): Moved declaration of local
7294 `enclosing_decl_type' to the right location.
7295
7296 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
7297
7298 * parse.y (parser_check_super_interface): Don't call
7299 check_pkg_class_access for an inner interface.
7300 (parser_check_super): Don't call check_pkg_class_access for inner
7301 class.
7302 (do_resolve_class): Simplify enclosing type loop. Don't call
7303 check_pkg_class_access if CL and DECL are not set.
7304 (find_in_imports_on_demand): Set DECL if class_type needed to be
7305 loaded. Don't call check_pkg_class_access for an inner class.
7306 (check_inner_class_access): Rewritten to implement member access
7307 rules as per spec 6.6.1.
7308 (check_pkg_class_access): Handle the empty package correctly.
7309 (in_same_package): New function. Determine if two classes are in the
7310 same package.
7311
7312 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
7313
7314 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
7315 method into array types.
7316 * parse.y (patch_method_invocation): Bypass access check on clone call
7317 to array instance.
7318
7319 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
7320
7321 * expr.c (build_instanceof): Check for arrays when trying fold to
7322 false.
7323
7324 2001-02-15 Jim Meyering <meyering@lucent.com>
7325
7326 * Make-lang.in (java.install-common): Depend on `installdirs'.
7327 (java.install-info): Likewise.
7328
7329 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
7330
7331 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
7332
7333 2001-02-14 Tom Tromey <tromey@redhat.com>
7334 Alexandre Petit-Bianco <apbianco@cygnus.com>
7335
7336 Fix for PR java/1261.
7337 * typeck.c (build_java_array_type): Add public `clone' method to
7338 arrays.
7339 * parse.y (resolve_qualified_expression_name): Use current_class
7340 when checking for inaccessibility.
7341 (patch_method_invocation): Fixed error message when accessibility
7342 denied. Added `from_super' argument.
7343
7344 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
7345
7346 * parse.y (resolve_class): Don't build a fake decl. Use the one
7347 already built.
7348 * typeck.c (build_java_array_type): Build and assign decl to array
7349 type.
7350
7351 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
7352
7353 * parse.y (not_accessible_p): Changed leading comment. Added extra
7354 `where' argument. Use it to enforce protected access rules.
7355 (resolve_qualified_expression_name): Added extra argument to
7356 not_accessible_p.
7357 (patch_method_invocation): Use argument `primary' to provide
7358 not_accessible_p with an extra argument.
7359 (lookup_method_invoke): Added extra argument to not_accessible_p.
7360 (search_applicable_method_list): Likewise.
7361
7362 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
7363
7364 * parse.y (resolve_qualified_expression_name): Try to resolve as
7365 an inner class access only if `decl' is a TYPE_DECL.
7366
7367 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7368
7369 * decl.c (classdollar_identifier_node): Initialize.
7370 * java-tree.h (enum java_tree_index): New entry
7371 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
7372 (classdollar_identifier_node): New macro.
7373 (ID_CLASSDOLLAR_P): Likewise.
7374 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
7375 (build_dot_class_method_invocation): Likewise.
7376 (find_applicable_accessible_methods_list): `class$' can't be
7377 inherited.
7378
7379 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
7380
7381 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
7382
7383 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
7384
7385 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
7386 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
7387 gone.
7388
7389 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
7390
7391 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
7392 outside of the `__U' sequence too.
7393 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
7394 sequence too.
7395
7396 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
7397
7398 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
7399
7400 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
7401
7402 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
7403 (JVGENMAIN_OBJS): Likewise.
7404 * java-tree.h (append_gpp_mangled_name): New prototype.
7405 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
7406 Removed cast calling `gcc_add_root.'
7407 * jvgenmain.c (mangle_obstack): New global, initialized.
7408 (main): Use it.
7409 (do_mangle_class): Constify local `ptr.'
7410 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
7411 append_gpp_mangle_name and update `count' if necessary.
7412 Use `mangle_obstack.'
7413 * mangle.c (append_unicode_mangled_name): Removed.
7414 (append_gpp_mangled_name): Likewise.
7415 (unicode_mangling_length): Likewise.
7416 (mangle_member_name): Return type set to `void.'
7417 (mangle_field_decl): Don't append `U' in escaped names.
7418 (mangle_method_decl): Likewise.
7419 (mangle_member_name): Just use `append_gpp_mangled_name.'
7420 * mangle_name.c: New file.
7421
7422 2001-02-07 Per Bothner <per@bothner.com>
7423
7424 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
7425
7426 * check-init.c (check_init): Don't call done_alternative after
7427 processing loop code, as a LOOP_EXPR never terminates normally.
7428
7429 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
7430
7431 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
7432
7433 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7434
7435 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
7436 DECLs.
7437
7438 2001-02-06 Tom Tromey <tromey@redhat.com>
7439
7440 * lex.c (java_new_lexer): Longer error message.
7441
7442 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
7443 Alexandre Petit-Bianco <apbianco@cygnus.com>
7444
7445 * typeck.c (build_prim_array_type): Added leading comment.
7446 (build_java_array_type): Moved locals out of
7447 block. Always create the `data' field, fixed alignment to match
7448 C++.
7449
7450 2001-02-04 Tom Tromey <tromey@redhat.com>
7451
7452 * expr.c (java_lang_expand_expr): Don't bother recomputing
7453 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
7454 Fixes PR java/1866.
7455
7456 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
7457
7458 * parse.y (process_imports): Save the original name of the import
7459 for better error report.
7460
7461 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
7462
7463 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
7464 of macros used when compiling jvspec.c.
7465 * jvspec.c (lang_specific_driver): Link with the shared
7466 libgcc by default.
7467
7468 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7469
7470 * check-init.c (check_init): Call internal_error instead of fatal.
7471 * expr.c (java_lang_expand_expr): Likewise.
7472 * jcf-parse.c (get_constant): Likewise.
7473 * mangle.c (java_mangle_decl): Likewise.
7474 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
7475 (operator_string): Likewise.
7476 * check-init.c (check_init): Call abort instead of fatal.
7477 * class.c (build_class_ref): Likewise.
7478 * constants.c (write_constant_pool): Likewise.
7479 * decl.c (start_java_method): Likewise.
7480 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
7481 (java_stack_dup, encode_newarray_type): Likewise.
7482 (build_java_array_length_access): Likewise.
7483 (build_java_check_indexed_type, expand_java_pushc): Likewise.
7484 (build_java_soft_divmod, build_invokeinterface): Likewise.
7485 * java-tree.h (INNER_CLASS_P): Likewise.
7486 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
7487 (give_name_to_class, get_class_constant): Likewise.
7488 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
7489 (find_constant_index, generate_bytecode_conditional): Likewise.
7490 (generate_bytecode_insns, perform_relocations): Likewise.
7491 * lex.c (java_unget_unicode, java_lex): Likewise.
7492 * mangle.c (mangle_type, mangle_record_type): Likewise.
7493 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
7494 (finish_mangling): Likewise.
7495 * parse.h (MARK_FINAL_PARMS): Likewise.
7496 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
7497 (obtain_incomplete_type, java_complete_class): Likewise.
7498 (java_check_regular_methods, java_complete_expand_method): Likewise.
7499 (cut_identifier_in_qualified, check_deprecation): Likewise.
7500 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
7501 (java_complete_lhs, lookup_name_in_blocks): Likewise.
7502 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
7503 * typeck.c (set_local_type, parse_signature_type): Likewise.
7504 (parse_signature_string, build_java_signature): Likewise;
7505 (set_java_signature): Likewise.
7506 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
7507 * class.c (add_method): Call fatal_error instead of fatal.
7508 (build_static_field_ref): Likewise.
7509 * expr.c (build_known_method_ref, expand_invoke): Likewise.
7510 * jcf-parse.c (get_constant, jcf_parse): Likewise.
7511 * lex.c (java_new_new_lexer): Likewise.
7512 * jv-scan.c (main): Likewise.
7513 (fatal_error): Renamed from fatal.
7514 * jcf-parse.c (yyparse): Call fatal_io_error instead of
7515 pfatal_with_name.
7516 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
7517 (yyparse): Likewise.
7518 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
7519 * lex.c (java_get_line_col): Likewise.
7520 * jcf-parse.c (load_class): Make errors non-fatal.
7521 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
7522
7523 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
7524
7525 * jvgenmain.c (class_mangling_suffix): Remove unused string.
7526 (error): Remove unused function.
7527 (main): Don't use "__attribute__ alias" on generated class symbol.
7528
7529 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
7530
7531 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
7532 argument.
7533 * parse.y (finish_method_declaration): Code accounting for WFLed
7534 method DECL_NAMEs deleted.
7535 (check_abstract_method_definitions): Likewise.
7536 (resolve_type_during_patch): Layout resolved type.
7537 * typeck.c (lookup_do): Removed unused local.
7538
7539 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
7540
7541 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
7542 * decl.c (init_decl_processing): Use integer_minus_one_node, not
7543 integer_negative_one_node.
7544 * expr.c (build_java_binop): Likewise.
7545
7546 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
7547
7548 * zextract.c (read_zip_archive): Read file_offset before writing
7549 zipd and consequently clobbering the header contents.
7550
7551 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7552
7553 * Make-lang.in: Remove all dependencies on defaults.h.
7554 * decl.c: Don't include defaults.h.
7555 * expr.c: Likewise.
7556 * parse.y: Likewise.
7557
7558 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7559
7560 * ChangeLog (2001-01-21): Fixed typo.
7561 * class.c (layout_class_method): Code accounting for WFLed
7562 method DECL_NAMEs deleted.
7563 * constant.c (find_methodref_index): Likewise.
7564 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
7565 * java-tree.h (DECL_FUNCTION_WFL): New macro.
7566 (struct lang_decl): New field `wfl'.
7567 (java_get_real_method_name): Prototype deleted.
7568 * mangle.c (mangle_method_decl): Code accounting for WFLed
7569 method DECL_NAMEs deleted.
7570 * parse.h (GET_METHOD_NAME): Macro deleted.
7571 * parse.y (reset_method_name): Deleted.
7572 (method_header): Set DECL_FUNCTION_WFL.
7573 (check_abstract_method_header): Code accounting for WFLed method
7574 DECL_NAMEs deleted.
7575 (java_get_real_method_name): Deleted.
7576 (check_method_redefinition): Code accounting for WFLed method
7577 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
7578 (java_check_regular_methods): Likewise.
7579 (java_check_abstract_methods): Likewise.
7580 (java_expand_classes): Don't call `reset_method_name.'
7581 (search_applicable_method_list): Use DECL_NAMEs instead of
7582 GET_METHOD_NAME.
7583 * typeck.c (lookup_do): Code accounting for WFLed method
7584 DECL_NAMEs deleted.
7585
7586 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
7587
7588 * lex.c (java_read_char): Check for EOF from getc first.
7589
7590 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
7591
7592 * class.c (layout_class): Don't lay the superclass out if it's
7593 already being laid out.
7594 * jcf-parse.c (handle_innerclass_attribute): New function.
7595 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
7596 handle_innerclasses_attribute.
7597 (jcf_parse): Don't load an innerclasses if it's already being
7598 laid out.
7599 * jcf-write.c (append_innerclass_attribute_entry): Static
7600 `anonymous_name' and its initialization deleted. `ocii' and `ini'
7601 to be zero for anonymous classes.
7602
7603 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
7604
7605 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
7606 necessary.
7607 * jcf-parse.c (set_source_filename): Use
7608 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
7609
7610 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
7611
7612 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
7613 gets a unique asm name.
7614
7615 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
7616
7617 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
7618 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
7619 if necessary.
7620 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
7621 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
7622 * parse.y (lookup_package_type_and_set_next): Deleted.
7623 (resolve_package): Removed unnecessary code.
7624 (find_applicable_accessible_methods_list): `finit$' can't be
7625 inherited.
7626 * verify.c (pop_argument_types): Added missing prototype.
7627
7628 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
7629
7630 * config-lang.in: Disable java by default.
7631
7632 2001-01-23 Tom Tromey <tromey@redhat.com>
7633
7634 * gcj.texi (Copying): New node.
7635 Added copyright information.
7636
7637 2001-01-21 Per Bothner <per@bothner.com>
7638
7639 Various fixes to allow compiling a compressed .jar/.zip archive.
7640 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
7641 (struct ZipFile): Add fields name and next (from ZipFileCache).
7642 (struct ZipDirectory): New field zipf points to owning ZipFile.
7643 * jcf.h (struct ZipDirectory): Add forward declaration.
7644 (struct JCF): Declare zipd field to have type struct ZipDirectory.
7645 Remove seen_in_zip and zip_offset fields.
7646 (JCF_SEEN_IN_ZIP): New macro.
7647 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
7648 * jcf-io.c: Change all ZipFileCache to ZipFile.
7649 (read_zip_member): New function.
7650 (open_in_zip): Call read_zip_member.
7651 * jcf-parse.c (find_in_current_zip): Remove function.
7652 (read_class): Merge in find_in_current_zip functionality.
7653 Call read_zip_member if needed.
7654 (parse_zip_file_entries): Use read_zip_member.
7655 (process_zip_dir): Update for removed and added JCF fields.
7656 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
7657
7658 2001-01-21 Per Bothner <per@bothner.com>
7659
7660 Minor optimization of static ggc roots.
7661 * jcf-parse.c (parse_roots): New static field.
7662 (current_field, current_method, current_file_list): Replace by macros
7663 naming fields of parse_roots.
7664 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
7665 * class.c (class_roots): New static field.
7666 (registered_class, fields_ident, info_ident, class_list):
7667 New macros naming fields of parse_roots.
7668 (build_static_field_ref): Don't register roots here.
7669 (layout_class): Static field list replaced by macro class_list.
7670 (init_class_processing): Call ggc_add_tree_root for 4 roots.
7671 Initialize fields_ident and info_ident here.
7672
7673 2001-01-21 Per Bothner <per@bothner.com>
7674
7675 * jcf-parse.c (ggc_mark_jcf): New function.
7676 (init_jcf_parse): Register current_jcf as ggc root.
7677
7678 2001-01-21 Per Bothner <per@bothner.com>
7679
7680 * lang.c (put_decl_node): Print method's name.
7681
7682 2001-01-21 Per Bothner <per@bothner.com>
7683
7684 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
7685 (verify_jvm_instructions): Use it, for better error messages on loads.
7686
7687 2001-01-21 Per Bothner <per@bothner.com>
7688
7689 * verify.c (merge_type_state): Still may have to merge even if
7690 LABEL_VERIFIED (label).
7691
7692 2001-01-21 Per Bothner <per@bothner.com>
7693
7694 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
7695 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
7696
7697 2001-01-19 Per Bothner <per@bothner.com>
7698
7699 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
7700 if expeting an interface type. Refines Tom's change of 2000-09-12.
7701
7702 2001-01-18 Per Bothner <per@bothner.com>
7703
7704 * gcj.texi (Input Options): Mention .java files.
7705
7706 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
7707
7708 * lang-options.h (-Wunsupported-jdk11): Removed.
7709 * lang.c (flag_not_overriding): Deleted.
7710 (flag_static_local_jdk1_1): Likewise.
7711 (lang_W_options): Removed "unsupported-jdk11" entry.
7712 * parse.y (java_check_methods): Removed dead code.
7713
7714 2001-01-17 Tom Tromey <tromey@redhat.com>
7715
7716 Changes suggested by Per Bothner:
7717 * gcj.texi (Input Options): Don't mention input files.
7718 (Code Generation): Updated --main information.
7719 (Invoking jcf-dump): Mention that --javap is incomplete.
7720 From Alexandre Petit-Bianco:
7721 (Warnings): Don't mention -Wunsupported-jdk11.
7722 My stuff:
7723 (Compatibility): Mention JDK 1.2-ness of libraries.
7724 (Resources): Mention resources used when writing gcj.
7725
7726 2001-01-17 Tom Tromey <tromey@redhat.com>
7727
7728 * gcj.texi: New file.
7729 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
7730 (java.info): Depend on gcj.info.
7731 (java/gcj.dvi): New target.
7732 (java.dvi): Depend on gcj.dvi.
7733 (java.install-info): Wrote.
7734
7735 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
7736
7737 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
7738 having called make_decl_rtl.
7739
7740 2001-01-14 Per Bothner <per@bothner.com>
7741
7742 Various patches to emit better messages on verification errors.
7743 * expr.c (push_type_0): Return error indication on stack overflow,
7744 instead of callinfg fatal.
7745 (push_type): Now just call push_type_0 (nd fatal on overflow).
7746 (pop_type_0): Return detailed error message (in a char** argument).
7747 (pop_type): If pop_type_0 fails, print error message.
7748 (pop_argument_types): Moved to verify.c.
7749 * verify.c (pop_argument_types): Moved from expr.c.
7750 Return a (possible) error message, rather than void.
7751 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
7752 (verify_jvm_instruction): Use new macros, improving error messages.
7753 For case OPCODE_astore use object_ptr_type_node.
7754 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
7755 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
7756
7757 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
7758 constant, return body without wrapper. (Improves constant folding.)
7759 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
7760
7761 2001-01-13 Per Bothner <per@bothner.com>
7762
7763 * expr.c (expand_java_field_op): Assigning to a final field outside
7764 an initializer does not violate JVM spec, so should be warning, not
7765 error. (Sun's verifier does not complain - though MicroSoft's does.)
7766
7767 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
7768
7769 * gjavah.c (version), jcf-dump.c (version): Update copyright year
7770 to 2001.
7771
7772 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
7773
7774 * parse.y (resolve_expression_name): Permit instance variables from
7775 enclosing context in super constructor call.
7776 (resolve_qualified_expression_name): Permit enclosing class's qualified
7777 "this" in super constructor call.
7778
7779 2001-01-10 Mark Mitchell <mark@codesourcery.com>
7780
7781 * class.c (build_utf8_ref): Remove last argument in call to
7782 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
7783 (build_class_ref): Likewise.
7784 (build_static_field_ref): Likewise.
7785 (get_dispatch_table): Likewise.
7786 (layout_class_method): Likewise.
7787 (emit_register_classes): Likewise.
7788 * constants.c (build_constant_data_ref): Likewise.
7789 * decl.c (builtin_function): Likewise.
7790 (create_primitive_vtable): Likewise.
7791 * expr.c (build_known_method_def): Likewise.
7792 (build_jni_stub): Likewise.
7793 (java_lang_expand_expr): Likewise.
7794
7795 2001-01-10 Tom Tromey <tromey@redhat.com>
7796
7797 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
7798
7799 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
7800
7801 * java-tree.h (lang_printable_name_wls): New prototype.
7802 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
7803 rather than `current_class' to print type name. Don't prepend type
7804 names when printing constructor names.
7805 (lang_printable_name_wls): New function.
7806 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
7807 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
7808 * parse.y (patch_method_invocation): Message tuned for constructors.
7809 (not_accessible_p): Grant `private' access from within
7810 enclosing contexts.
7811
7812 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7813
7814 All files with updated copyright when applicable.
7815 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
7816 * class.c (mangle_class_field): Function removed.
7817 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
7818 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
7819 (build_class_ref): Call `java_mangle_class_field' instead of
7820 `mangle_class_field.'
7821 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
7822 (layout_class): Call `java_mangle_decl' instead of
7823 `mangle_static_field.'
7824 (cxx_keywords): Initialized static array moved to `lex.c.'
7825 (layout_class_method): Changed leading comment. Simplified to
7826 call `java_mangle_decl.' Local `ptr' moved in for loop body.
7827 * decl.c (lang_mark_tree): Mark field `package_list.'
7828 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
7829 (struct lang_type): New field `package_list.'
7830 (unicode_mangling_length): Prototype removed.
7831 (append_gpp_mangled_name, append_gpp_mangled_classtype,
7832 emit_unicode_mangled_name): Likewise.
7833 (cxx_keyword_p): New prototype.
7834 (java_mangle_decl, java_mangle_class_field,
7835 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
7836 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
7837 `build_expr_wfl.'
7838 * jvgenmain.c (main_method_prefix): Global variable removed.
7839 (main_method_suffix): Likewise.
7840 (do_mangle_classname): New function.
7841 (main): Call it. Format changed to accommodate new mangling scheme.
7842 * lex.c: (utf8_cmp): Conditionally prototyped.
7843 (cxx_keywords): Moved from class.c, conditionally defined.
7844 (utf8_cmp, cxx_keyword_p): Likewise.
7845 * mangle.c (obstack.h, ggc.h): Included.
7846 (mangle_field_decl): New function.
7847 (mangle_method_decl, mangle_type, mangle_pointer_type,
7848 mangle_array_type, mangle_record_type,
7849 find_compression_pointer_match, find_compression_array_match,
7850 find_compression_record_match,
7851 find_compression_array_template_match, set_type_package_list,
7852 entry_match_pointer_p, emit_compression_string, init_mangling,
7853 finish_mangling, compression_table_add, mangle_member_name): Likewise.
7854 (mangle_obstack): New global.
7855 (MANGLE_RAW_STRING): New macro.
7856 (unicode_mangling_length): Turned static.
7857 (append_unicode_mangled_name): Renamed from
7858 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
7859 replaces `obstack', removed from the parameter list.
7860 (append_gpp_mangled_name): Turned static. `mangle_obstack'
7861 replaces parameter `obstack', removed from the parameter list. Call
7862 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
7863 (append_gpp_mangled_classtype): Removed.
7864 (compression_table, compression_next): New static variables.
7865 * parse.y (temporary_obstack): Extern declaration removed.
7866
7867 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
7868
7869 * parse.y (patch_binop): Compute missing type in error situations.
7870
7871 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
7872
7873 * class.c (make_class_data): Push initial value for "arrayclass".
7874 * decl.c (init_decl_processing): Add new class field "arrayclass".
7875
7876 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
7877
7878 From patha@softlab.ericsson.se:
7879 * parse.y (switch_label): Use build, not build1, to construct
7880 DEFAULT_EXPR.
7881
7882 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
7883
7884 * lang.c (lang_decode_option): Change -MA to -MP.
7885 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
7886 Update to new prototype; do quote targets.
7887 (jcf_dependency_write): Update.
7888
7889 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
7890
7891 Shorten primitive array allocation path:
7892 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
7893 to create new primitive arrays.
7894 * expr.c (build_newarray): If generating native code, call
7895 soft_newarray_node with a reference to the primitive TYPE identifier
7896 instead of type_value.
7897
7898 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
7899
7900 Fix for PRs gcj/312 and gcj/253:
7901 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
7902 dest if they arn't already.
7903 * class.c (layout_class): Call maybe_layout_super_class on
7904 superinterfaces also, but only if compiling from bytecode.
7905
7906 Fix for PR gcj/373:
7907 * parse.y (create_class): Set ACC_STATIC if class is declared in an
7908 interface.
7909
7910 2000-12-15 Tom Tromey <tromey@redhat.com>
7911
7912 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
7913 set.
7914
7915 2000-12-14 Andrew Haley <aph@redhat.com>
7916
7917 * boehm.c (mark_reference_fields): Change test to correctly detect
7918 bitmap overflow.
7919
7920 2000-12-15 Andreas Jaeger <aj@suse.de>
7921
7922 * config-lang.in (lang_dirs): Added.
7923
7924 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
7925
7926 * parse.y (end_artificial_method_body): Fixed undefined behavior.
7927 Credits go to rth for finding it.
7928
7929 2000-12-13 Mike Stump <mrs@wrs.com>
7930
7931 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
7932
7933 2000-11-07 Tom Tromey <tromey@cygnus.com>
7934
7935 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
7936 * lex.c (java_ignorable_control_p): Removed.
7937 (java_letter_or_digit_p): Removed.
7938 (java_start_char_p): New function.
7939 (java_read_char): Return `int', not `unicode_t'. Changed
7940 callers.
7941 (java_read_unicode): Likewise.
7942 (java_read_unicode_collapsing_terminators): Likewise.
7943 (java_get_unicode): Likewise.
7944 (java_new_lexer): Initialize hit_eof.
7945 (java_parse_end_comment): Take `int' argument.
7946 (java_parse_doc_section): Likewise.
7947 (java_parse_escape_sequence): Don't allow backlash-newline.
7948 Return `int'.
7949 * lex.h (JAVA_DIGIT_P): Removed.
7950 (_JAVA_LETTER_OR_DIGIT_P): Removed.
7951 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
7952 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
7953 (JAVA_PART_CHAR_P): New macro.
7954 (UEOF): Now -1.
7955 (JAVA_CHAR_ERROR): Now -2.
7956 (java_lexer): New field `hit_eof'.
7957 * chartables.h: New file.
7958 * gen-table.pl: new file.
7959
7960 2000-11-20 Tom Tromey <tromey@cygnus.com>
7961 Alexandre Petit-Bianco <apbianco@cygnus.com>
7962
7963 * parse.y (java_complete_lhs): Only allow compound assignment of
7964 reference type if type is String.
7965
7966 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
7967
7968 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
7969 jcf-path.c: Likewise.
7970
7971 2000-12-09 Anthony Green <green@redhat.com>
7972
7973 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
7974 filestart and filename_length as int values.
7975
7976 2000-12-07 Mo DeJong <mdejong@redhat.com>
7977
7978 * jcf-io.c (find_class): Correct the logic that tests to see if a
7979 .java file is newer than its .class file. The compiler was
7980 incorrectly printing a warning when file mod times were equal.
7981
7982 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
7983
7984 * jvgenmain.c: Use ISPRINT not isascii.
7985
7986 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
7987
7988 * parse.y (end_artificial_method_body): Fixed typo.
7989
7990 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
7991
7992 * parse.y (patch_method_invocation): Pick the correct enclosing
7993 context when creating inner class instances.
7994 Fixes gcj/332.
7995
7996 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
7997
7998 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
7999 Update copyright year to 2000.
8000
8001 2000-11-23 Anthony Green <green@redhat.com>
8002
8003 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
8004 Move current_file_list out of yyparse and make it static.
8005
8006 * expr.c: Declare quick_stack and tree_list_free_list as static
8007 (init_expr_processing): Register quick_stack and
8008 tree_list_free_list roots.
8009
8010 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
8011
8012 * parse.y (build_outer_field_access): New local `decl_ctx', use
8013 it. Check for field's context and current class immediate outer
8014 context inheritance.
8015 (outer_field_access_p): Consider fields inherited from the last
8016 enclosing context.
8017 (build_access_to_thisn): Stop at the last enclosing context if
8018 necessary.
8019 Fixes gcj/367.
8020
8021 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
8022
8023 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
8024
8025 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
8026
8027 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
8028 scratch buffer.
8029
8030 2000-11-20 Tom Tromey <tromey@cygnus.com>
8031
8032 * jv-scan.c (help): Document --complexity.
8033 (options): Added --complexity.
8034 (flag_complexity): New global.
8035 (main): Call `report'.
8036 * parse-scan.y (complexity): New global.
8037 (if_then_statement, if_then_else_statement,
8038 if_then_else_statement_nsi, switch_block_statement_group,
8039 while_expression, do_statement, for_begin, continue_statement,
8040 throw_statement, catch_clause, finally, method_invocation,
8041 conditional_and_expression, conditional_or_expression,
8042 conditional_expression): Update complexity.
8043 (reset_report): Reset complexity.
8044 (report): New function.
8045
8046 2000-11-20 Tom Tromey <tromey@cygnus.com>
8047
8048 * lex.c (yylex): Added STRICT_TK case.
8049 * parse.y (STRICT_TK): Added.
8050 * parse-scan.y (STRICT_TK): Added.
8051 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
8052 `;'. Use 4, not 3, with -k option. Correctly rename resulting
8053 file.
8054 * keyword.h: Rebuilt.
8055 * keyword.gperf (strictfp): Added.
8056
8057 2000-11-20 Tom Tromey <tromey@cygnus.com>
8058
8059 * lex.c (yylex): Recognize floating point constants with leading
8060 0.
8061
8062 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8063
8064 * java-tree.h (cyclic_inheritance_report): Constify.
8065 * parse.y (cyclic_inheritance_report): Likewise.
8066
8067 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
8068
8069 * parse.y (goal): Remove call to ggc_add_string_root.
8070
8071 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
8072
8073 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
8074 Create string in scratch buffer, then pass to build_string.
8075
8076 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
8077
8078 * parse.y (issue_warning_error_from_context): Add
8079 ATTRIBUTE_PRINTF.
8080
8081 2000-11-11 Anthony Green <green@redhat.com>
8082
8083 * jcf-parse.c (process_zip_dir): Add finput parameter.
8084 (jcf_figure_file_type): Call process_zip_dir with appropriate
8085 argument.
8086
8087 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8088
8089 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
8090 * jcf-parse.c (jcf_figure_file_type): Likewise.
8091
8092 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
8093
8094 * parse.y (create_new_parser_context): Use memset () instead of
8095 bzero ().
8096
8097 2000-11-08 Tom Tromey <tromey@cygnus.com>
8098
8099 * gjavah.c (process_file): Only include gcj/cni.h when generating
8100 CNI stubs.
8101
8102 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
8103
8104 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
8105 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
8106 instead of bzero ().
8107
8108 2000-11-05 Tom Tromey <tromey@cygnus.com>
8109
8110 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
8111 * lex.c (IS_ZERO): New define.
8112 (java_perform_atof): Error on floating point underflow.
8113
8114 2000-11-04 Tom Tromey <tromey@cygnus.com>
8115
8116 * lex.c (java_parse_escape_sequence): Only read two octal
8117 characters if the first one is greater than 3. Don't allow
8118 "octal" numbers to include the digits 8 or 9.
8119
8120 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
8121
8122 * Make-lang.in (java.distdir): Remove.
8123
8124 2000-11-03 Tom Tromey <tromey@cygnus.com>
8125
8126 * Make-lang.in (java.dvi): New target.
8127 Partial fix for PR other/567.
8128
8129 * lang-options.h: Mention -Wout-of-date.
8130 * jcf-dump.c (flag_newer): New global.
8131 * gjavah.c (flag_newer): New global.
8132 * jcf-io.c (find_class): Only warn when flag_newer set.
8133 * lang.c (flag_newer): New global.
8134 (struct string_option): New declaration.
8135 (lang_W_options): New global.
8136 (process_option_with_no): New function.
8137 (lang_decode_option): Use it.
8138
8139 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
8140 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
8141 `$'.
8142
8143 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
8144 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
8145 * lex.c (java_read_unicode): Removed `term_context' argument.
8146 Recognize any number of `u' in `\u'.
8147 (java_read_unicode_collapsing_terminators): New function.
8148 (java_get_unicode): Use it.
8149 (java_lineterminator): Removed.
8150 (yylex): Produce error if character literal is newline or single
8151 quote. Return if eof found in middle of `//' comment. EOF in
8152 `//' comment is only an error if pedantic.
8153 (java_ignorable_control_p): New function.
8154 (java_parse_end_comment): Return if eof found in middle of
8155 comment.
8156 Include flags.h.
8157 * jv-scan.c (pedantic): New global.
8158
8159 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
8160
8161 * parse.y (outer_field_access_p): Inherited fields aren't
8162 consider outer fields.
8163 (maybe_build_thisn_access_method): Use
8164 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
8165 (resolve_expression_name): Trigger an error if a static field
8166 is being accessed as an outer field.
8167
8168 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8169
8170 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
8171 Fixes gcj/365.
8172
8173 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
8174
8175 * Make-lang.in: Move all build rules here from Makefile.in,
8176 adapt to new context. Wrap all rules that change the current
8177 directory in parentheses. Expunge all references to $(P).
8178 When one command depends on another and they're run all at
8179 once, use && to separate them, not ;. Add OUTPUT_OPTION to
8180 all object-file generation rules. Delete obsolete variables.
8181
8182 * Makefile.in: Delete.
8183 * config-lang.in: Delete outputs= line.
8184
8185 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
8186
8187 * parse.y (patch_method_invocation): NULLify this_arg when already
8188 inserted.
8189 (maybe_use_access_method): Handle call to methods unrelated to the
8190 current class. Fixed comment.
8191 Fixes gcj/361.
8192
8193 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8194
8195 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
8196 scope.
8197
8198 2000-10-24 Tom Tromey <tromey@cygnus.com>
8199
8200 * lex.c (java_new_lexer): Initialize new fields. Work around
8201 broken iconv() implementations.
8202 (java_read_char): Swap bytes if required. Use fallback decoder if
8203 required.
8204 (byteswap_init, need_byteswap): New globals.
8205 (java_destroy_lexer): Only close iconv handle if it is in use.
8206 * lex.h (java_lexer): New fields read_anything, byte_swap,
8207 use_fallback.
8208 Made out_buffer unsigned.
8209
8210 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8211
8212 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
8213 where an enclosing context can be set on the jdep.
8214 (do_resolve_class): Fixed identation.
8215
8216 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8217
8218 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
8219
8220 * jcf-reader.c (peek_attribute, skip_attribute): Only define
8221 when requested.
8222
8223 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
8224
8225 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
8226
8227 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
8228
8229 * jcf-write.c (OP1): Update `last_bc'.
8230 (struct jcf_block): Fixed indentation and typo in comments. New
8231 field `last_bc'.
8232 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
8233 follows `monitorenter'.
8234 * parse.y (patch_synchronized_statement): New local `tmp'. Call
8235 `patch_string'.
8236 Fixes gcj/232.
8237
8238 2000-10-16 Tom Tromey <tromey@cygnus.com>
8239
8240 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
8241 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
8242 * lang-options.h: Added -MA, -MT, -MF..
8243 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
8244 (DEPEND_TARGET_SET): New macro.
8245 (DEPEND_FILE_ALREADY_SET): Likewise.
8246 (init_parse): Handle new flags.
8247 * jcf.h (jcf_dependency_print_dummies): Declare.
8248 * Make-lang.in (s-java): Added mkdeps.o.
8249 * Makefile.in (BACKEND): Added mkdeps.o.
8250 (../gcjh$(exeext)): Added mkdeps.o.
8251 (../jcf-dump$(exeext)): Added mkdeps.o.
8252 * jcf-depend.c: Include mkdeps.h.
8253 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
8254 add_entry): Removed.
8255 (jcf_dependency_reset): Rewrote.
8256 (dependencies): New global.
8257 (jcf_dependency_set_target): Rewrote.
8258 (jcf_dependency_add_target): Likewise.
8259 (jcf_dependency_add_file): Likewise.
8260 (munge): Removed.
8261 (print_ents): Removed.
8262 (jcf_dependency_write): Rewrote.
8263 (print_dummies): New global.
8264 (jcf_dependency_print_dummies): New function
8265 (jcf_dependency_write): Call deps_dummy_targets if required.
8266
8267 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
8268
8269 * gjavah.c (add_class_decl): Removed unused variables `tname',
8270 `tlen' and `name_index'.
8271 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
8272 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
8273 in `wfl_operator' with value.
8274 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
8275 (jcf_figure_file_type): Fixed identation.
8276 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
8277 * parse.y (analyze_clinit_body): New function.
8278 (static_initializer:): Reset `current_static_block'.
8279 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
8280 `wfl_operator' with new value.
8281 (lookup_cl): Use EXPR_WFL_FILENAME.
8282 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
8283 analyze_clinit_body.
8284 (build_outer_field_access): Access to this$<n> built from
8285 current_class, not its outer context.
8286 (build_access_to_thisn): Fixed leading comment. Tidied things up.
8287 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
8288 (patch_method_invocation): Use `is_static_flag' when already
8289 initialized.
8290 (patch_newarray): Removed assignment in ternary operator.
8291
8292 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8293
8294 * except.c (free_eh_ranges): Don't free `whole_range'.
8295
8296 2000-10-15 Anthony Green <green@redhat.com>
8297
8298 * decl.c (init_decl_processing): Call init_class_processing before
8299 anything else.
8300
8301 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8302
8303 * check-init.c (check_init): Fixed leading comment. Use
8304 LOCAL_FINAL_P.
8305 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8306 (give_name_to_locals): Likewise.
8307 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
8308 fields in lang_decl_var.
8309 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
8310 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
8311 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
8312 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
8313 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
8314 (LOCAL_FINAL): Rewritten.
8315 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
8316 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
8317 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
8318 `init_final' fields.
8319 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
8320 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
8321 (TYPE_HAS_FINAL_VARIABLE): New macro.
8322 (struct lang_type): Added `afv' field.
8323 * parse.y (check_static_final_variable_assignment_flag): New function.
8324 (reset_static_final_variable_assignment_flag): Likewise.
8325 (check_final_variable_local_assignment_flag): Likewise.
8326 (reset_final_variable_local_assignment_flag): Likewise.
8327 (check_final_variable_indirect_assignment): Likewise.
8328 (check_final_variable_global_assignment_flag): Likewise.
8329 (add_inner_class_fields): Use LOCAL_FINAL_P.
8330 (register_fields): Handle local finals and final variables.
8331 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
8332 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8333 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
8334 on local finals.
8335 (java_complete_expand_methods): Loop to set
8336 TYPE_HAS_FINAL_VARIABLE. Call
8337 `reset_final_variable_local_assignment_flag' and
8338 `check_final_variable_local_assignment_flag' accordingly before
8339 and after constructor expansion. Call
8340 `reset_static_final_variable_assignment_flag'
8341 before expanding <clinit> and after call
8342 `check_static_final_variable_assignment_flag' if the
8343 current_class isn't an interface. After all methods have been
8344 expanded, call `check_final_variable_global_assignment_flag' and
8345 `check_static_final_variable_assignment_flag' if the current class
8346 is an interface.
8347 (maybe_yank_clinit): Fixed typo in comment.
8348 (build_outer_field_access_methods): Removed old sanity check. Use
8349 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8350 Don't create access methods for finals.
8351 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
8352 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
8353 existing DECL_INIT has been processed.
8354 (java_complete_lhs): Likewise.
8355 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
8356 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
8357 logic.
8358 (patch_assignment): Use LOCAL_FINAL_P.
8359 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
8360 DECL_INITIAL is nullified.
8361 Fixes gcj/163.
8362
8363 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8364
8365 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
8366
8367 * Makefile.in (parse.c, parse-scan.c): Likewise.
8368
8369 2000-10-12 Mark Mitchell <mark@codesourcery.com>
8370
8371 * class.c (temporary_obstack): Remove.
8372 (make_class): Don't mess with obstascks.
8373 (push_class): Likewise.
8374 (set_super_info): Likewise.
8375 (add_method_1): Likewise.
8376 (add_method): Likewise.
8377 (add_field): Likewise.
8378 (build_utf8_ref): Likewise.
8379 (build_class_ref): Likewise.
8380 (build_static_field_ref): Likewise.
8381 (finish_class): Likewise.
8382 (push_super_field): Likewise.
8383 (layout_class): Likewise.
8384 (layout_class_methods): Likewise.
8385 (init_class_processing): Likewise.
8386 * constants.c (get_tag_node): Likewise.
8387 (build_constant_data_ref): Likewise.
8388 * decl.c (ggc_p): Remove.
8389 (copy_lang_decl): Use ggc_alloc.
8390 (complete_start_java_method): Don't mess with obstacks.
8391 (start_java_method): Likewise.
8392 (end_java_method): Likewise.
8393 * except.c (link_handler): Use xmalloc.
8394 (free_eh_ranges): New function.
8395 (method_init_exceptions): Use it.
8396 (add_handler): Use xmalloc.
8397 (expand_start_java_handler): Don't mess with obstacks.
8398 (prepare_eh_table_type): Likewise.
8399 (expand_end_java_handler): Likewise.
8400 * expr.c (push_value): Likewise.
8401 (create_label_decl): Likewise.
8402 (build_jni_stub): Likewise.
8403 (java_lang_expand_expr): Likewise.
8404 (note_instructions): Use xrealloc.
8405 (java_push_constant_from_pool): Don't mess with obstacks.
8406 (process_jvm_instruction): Likewise.
8407 * java-tree.h (cyclic_inheritance_report): Remove duplicate
8408 declaration.
8409 * jcf-parse.c (get_constant): Don't mess with obstacks.
8410 (read_class): Likewise.
8411 (jcf_parse): Likewise.
8412 * lex.c (expression_obstack): Remove.
8413 (java_lex): Don't use obstack_free.
8414 * parse.h (exit_java_complete_class): Don't mess with obstacks.
8415 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
8416 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
8417 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
8418 * parse.y (gaol): Add more GC roots.
8419 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
8420 (lookup_field_wrapper): Likewise.
8421 (obtain_incomplete_type): Don't mess with obstacks.
8422 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
8423 macros.
8424 (craft_constructor): Don't mess with obstacks.
8425 (safe_layout_class): Likewise.
8426 (java_complete_class): Likewise.
8427 (source_end_java_method): Likewise.
8428 (build_outer_field_access_methods): Likewise.
8429 (build_outer_method_access_method): Likewise.
8430 (maybe_build_thisn_access_method): Likewise.
8431 (build_dot_class_method_invocation): Likewise.
8432 (java_complete_tree): Likewise.
8433 (java_complete_lhs): Likewise.
8434 (do_merge_string_cste): Likewise.
8435 (patch_string_cst): Likewise.
8436 (array_constructor_check_entry): Likewise.
8437 * typeck.c (build_java_array_type): Likewise.
8438 (parse_signature_string): Likewise.
8439 (build_java_signature): Likewise.
8440
8441 2000-10-12 Tom Tromey <tromey@cygnus.com>
8442
8443 Fix for PR gcj/356:
8444 * gjavah.c (add_class_decl): Don't special-case inner classes.
8445 (add_namelet): Likewise.
8446
8447 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
8448
8449 * java-tree.h: Constify current_encoding.
8450 * lang.c: Constify current_encoding.
8451
8452 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
8453
8454 * jvgenmain.c (class_mangling_suffix): Omit `.'.
8455 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
8456
8457 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8458
8459 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
8460 patch. Fixes gcj/340.
8461
8462 2000-10-10 Tom Tromey <tromey@cygnus.com>
8463
8464 * lex.c (java_new_lexer): Initialize out_first and out_last
8465 fields.
8466 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
8467
8468 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
8469
8470 * parse.y (pop_current_osb): New function.
8471 (array_type:): Use `dims:', changed actions
8472 accordingly. Suggested by Anthony Green.
8473 (array_creation_expression:): Used pop_current_osb.
8474 (cast_expression:): Likewise.
8475 (search_applicable_method_list): Fixed indentation.
8476
8477 2000-10-08 Anthony Green <green@redhat.com>
8478
8479 * parse.y (array_type_literal): Remove production.
8480 (type_literals): Refer to array_type, not array_type_literal.
8481
8482 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8483
8484 Patch contributed by Corey Minyard.
8485 * decl.c (check_local_named_variable): New function.
8486 (tree check_local_unnamed_variable): Likewise.
8487 (find_local_variable): Splitted. Call check_local_{un}named_variable.
8488
8489 2000-10-07 Anthony Green <green@redhat.com>
8490
8491 * class.c (layout_class): Handle case where superclass can't be
8492 layed out yet.
8493
8494 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
8495
8496 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
8497 gperf.
8498
8499 2000-10-05 Tom Tromey <tromey@cygnus.com>
8500
8501 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
8502 * jvgenmain.c (class_mangling_prefix): Removed.
8503 (class_mangling_suffix): New global.
8504 (main): Use it.
8505 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
8506 `$'.
8507 (print_method_info): Handle overrides for static and final
8508 methods.
8509 (process_file): Generate declaration for class object field.
8510 * class.c (cxx_keywords): New array.
8511 (utf8_cmp): New function.
8512 (cxx_keyword_p): New function.
8513 (layout_class_method): Mangle C++ keywords by appending `$'.
8514 (mangle_field): New function.
8515 (mangle_class_field): Use mangle_field. Mangle class name as
8516 `class$'.
8517 (mangle_static_field): Use mangle_field.
8518
8519 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
8520
8521 * decl.c (find_local_variable): Removed uncessary type check and
8522 fixed range check typo. From Corey Minyard.
8523
8524 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8525
8526 * decl.c (give_name_to_locals): New local `code_offset'. Call
8527 `maybe_adjust_start_pc'.
8528 * expr.c (note_instructions): New function.
8529 (expand_byte_code): Don't collect insn starts here.
8530 (peek_opcode_at_pc): New function.
8531 (maybe_adjust_start_pc): Likewise.
8532 * java-tree.h (maybe_adjust_start_pc): Declare.
8533 (note_instructions): Likewise.
8534 * jcf-parse.c (parse_class_file): Call `note_instructions'.
8535
8536 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8537
8538 * parse.y (field_access:): Fixed indentation.
8539 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
8540
8541 2000-09-07 Tom Tromey <tromey@cygnus.com>
8542
8543 Fix for PR gcj/307:
8544 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
8545 JPRIMITIVE_TYPE_P, for arithmetic operators.
8546 (patch_method_invocation): Indentation fix.
8547 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
8548 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
8549 (do_unary_numeric_promotion): Cleaned up code.
8550 (valid_cast_to_p): Handle boolean correctly.
8551
8552 2000-09-27 Tom Tromey <tromey@cygnus.com>
8553
8554 * lex.c (java_read_unicode): Reset bs_count when finished with
8555 `\u' sequence.
8556
8557 2000-10-01 Mark Mitchell <mark@codesourcery.com>
8558
8559 Convert to GC.
8560 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
8561 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
8562 (typeck.o): Depend on ggc.h.
8563 * class.c (add_method_1): Use GC functions for allocation.
8564 (init_class_processing): Register roots.
8565 * decl.c (ggc_p): Set to 1.
8566 (pending_local_decls): Make it static.
8567 (push_jvm_slot): Use GC functions for allocation.
8568 (init_decl_processing): Register roots.
8569 (give_name_to_locals): Use GC functions for allocation.
8570 (lang_mark_tree): New function.
8571 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
8572 functions for allocation.
8573 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
8574 * lex.c (java_lex): Use build_string, rather than replicating it
8575 inline.
8576 * parse.y (goal): Add more roots.
8577 (mark_parser_ctxt): New function.
8578 * typeck.c: Include ggc.h.
8579
8580 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8581
8582 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
8583 contains something else than MODIFY_EXPR.
8584
8585 2000-09-23 Mark Mitchell <mark@codesourcery.com>
8586
8587 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
8588 * Makefile.in (parse.o): Depend on ggc.h.
8589 (class.o): Likewise.
8590 (constants.o): Likewise.
8591 (decl.o): Likewise.
8592 (expr.o): Likewise.
8593 (jcf-parse.o): Likewise.
8594 (jcf-write.o): Likewise.
8595 (mangle.o): Likewise.
8596 * class.c: Include ggc.h.
8597 (build_static_field_ref): Register GC roots.
8598 (layout_class): Likewise.
8599 (init_class_processing): Likewise.
8600 * constants.c: Include ggc.h.
8601 (current_constant_pool_data_ref): Remove.
8602 (tag_nodes): Move it to ...
8603 (get_tag_node): ... here. Register GC roots.
8604 * decl.c: Include ggc.h. Remove many global tree definitions.
8605 (throw_node): Define.
8606 (java_global_trees): Likewise.
8607 (predef_filenames): Make the size a constant.
8608 (init_decl_processing): Adjust accordingly.
8609 (init_decl_processing): Call init_jcf_parse. Register GC roots.
8610 * expr.c: Include ggc.h.
8611 (init_expr_processing): Register GC roots.
8612 (build_invokeinterface): Likewise.
8613 * java-tree.h: Replace extern tree declarations with macros.
8614 (java_global_trees): New variable.
8615 (java_tree_index): New enumeration.
8616 (init_jcf_parse): Declare.
8617 * jcf-parse.c: Include ggc.h.
8618 (current_class): Remove declaration.
8619 (main_class): Likewise.
8620 (all_class_list): Likewise.
8621 (predefined_filename_p): Adjust for constant size of
8622 predef_filenames.
8623 (init_jcf_parse): New function.
8624 * jcf-write.c: Include ggc.h.
8625 (generate_classfile): Register GC roots.
8626 (append_synthetic_attribute): Likewise.
8627 (append_innerclass_attribute_entry): Likewise.
8628 * lang.c: Include ggc.h.
8629 (lang_print_error): Register GC roots.
8630 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
8631 with macros.
8632 * parse.y: Include ggc.h.
8633 (wfl_operator): Remove.
8634 (goal): Register GC roots.
8635 (java_pop_parser_context): Adjust for new field names.
8636 (java_parser_context_save_global): Likewse.
8637 (java_parser_context_restore_global): Likewise.
8638 (java_parser_context_suspend): Likewise.
8639 (java_parser_context_resume): Likewise.
8640 (verify_constructor_circularity): Register GC roots.
8641 (lookup_cl): Likewise.
8642 (java_reorder_fields): Likewise.
8643 (build_current_this): Likewise.
8644 (class_in_current_package): Likewise.
8645 (argument_types_convertible): Likewise.
8646 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
8647
8648 2000-09-14 Tom Tromey <tromey@cygnus.com>
8649
8650 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
8651
8652 2000-09-13 Tom Tromey <tromey@cygnus.com>
8653
8654 * jcf-parse.c: Include <locale.h>.
8655 * jv-scan.c: Include <locale.h>.
8656
8657 2000-09-12 Tom Tromey <tromey@cygnus.com>
8658
8659 * expr.c (pop_type_0): Return `Object' if trying to merge two
8660 interface types.
8661 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
8662 interface types; `Object' is always a valid supertype.
8663
8664 2000-09-12 Tom Tromey <tromey@cygnus.com>
8665
8666 Fix for PR gcj/33:
8667 * jv-scan.c (help): Document --encoding.
8668 (options): Added `encoding' entry.
8669 (OPT_ENCODING): New define.
8670 (main): Handle --encoding.
8671 Include <langinfo.h> if nl_langinfo exists.
8672 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
8673 --encoding.
8674 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
8675 (parse_source_file): Correctly call java_init_lex. Added `finput'
8676 argument. Use nl_langinfo to determine default encoding.
8677 * java-tree.h (current_encoding): Declare.
8678 * parse.y (java_parser_context_restore_global): Don't restore
8679 `finput'.
8680 (java_parser_context_save_global): Don't set `finput' field.
8681 (java_pop_parser_context): Don't restore `finput'. Free old lexer
8682 if required.
8683 * lang.c (current_encoding): New global.
8684 (lang_decode_option): Recognize `-fencoding='.
8685 (finish_parse): Don't close finput.
8686 * parse.h (struct parser_ctxt): Removed `finput' and
8687 `unget_utf8_value' fields. Added `lexer' field.
8688 (java_init_lex): Fixed declaration.
8689 * lex.c (java_new_lexer): New function.
8690 (java_destroy_lexer): Likewise.
8691 (java_read_char): Added `lex' argument. Handle iconv case.
8692 (java_read_unicode): Added `lex' argument. Count backslashes in
8693 lexer structure.
8694 (java_init_lex): Added `finput' and `encoding' arguments. Set
8695 `lexer' field in ctxp.
8696 (BAD_UTF8_VALUE): Removed.
8697 (java_lex): Handle seeing UEOF in the middle of a string literal.
8698 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
8699 (java_lexer): New structure.
8700 (UNGETC): Removed.
8701 (GETC): Removed.
8702 (DEFAULT_ENCODING): New define.
8703 (java_destroy_lexer): Declare.
8704
8705 2000-09-12 Tom Tromey <tromey@cygnus.com>
8706
8707 Fix for PR gcj/343:
8708 * lex.c (java_init_lex): Initialize java_io_serializable.
8709 * parse.y (java_io_serializable): New global.
8710 (valid_ref_assignconv_cast_p): An array can be cast to
8711 serializable.
8712
8713 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
8714
8715 * decl.c, expr.c: Include defaults.h if not already included.
8716 Don't define the *_TYPE_SIZE macros.
8717
8718 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
8719
8720 * typeck.c (build_java_array_type): Correct first parameter
8721 in ADJUST_FIELD_ALIGN invocation.
8722
8723 2000-09-06 Tom Tromey <tromey@cygnus.com>
8724
8725 * lang-specs.h: Also recognize `-femit-class-files'.
8726
8727 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8728
8729 * verify.c (merge_types): Load the types to merge if necessary.
8730
8731 2000-09-02 Anthony Green <green@redhat.com>
8732
8733 * jcf-io.c: Include zlib.h.
8734 (open_in_zip): Read compressed class file archives.
8735 * zipfile.h (ZipDirectory): Add uncompressed_size and
8736 compression_method fields.
8737 * zextract.c (read_zip_archive): Collect file compression info.
8738
8739 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
8740
8741 * parse.y (do_resolve_class): Also explore superclasses of
8742 intermediate enclosing contexts when searching for inner classes.
8743
8744 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
8745
8746 * parse.y (variable_declarator_id:): Better error message.
8747 (expression_statement:): Use YYNOT_TWICE.
8748 (cast_expression:): Likewise.
8749 (assignment:): Likewise.
8750
8751 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
8752
8753 * parse.y (do_merge_string_cste): New locals. Create new
8754 STRING_CSTs each time, use memcpy. Fixes gcj/311.
8755
8756 2000-08-07 Hans Boehm <boehm@acm.org>
8757
8758 * boehm.c (mark_reference_fields): Set marking bits for all words in
8759 a multiple-word record.
8760 (get_boehm_type_descriptor): Use the procedure marking descriptor for
8761 java.lang.Class.
8762
8763 2000-08-31 Mike Stump <mrs@wrs.com>
8764
8765 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
8766 jcf-dump$(exeext)): Make parallel safe.
8767
8768 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
8769
8770 * jcf-parse.c (set_source_filename): Constify a char *.
8771 * jcf-write.c (append_innerclasses_attribute,
8772 make_class_file_name): Constify a char *. Don't recycle a
8773 variable for an unrelated purpose.
8774 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
8775 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
8776
8777 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8778
8779 * expr.c (can_widen_reference_to): Fixed indentation.
8780 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
8781 * parse.y: `finit$' replaces `$finit$' in comments.
8782 (try_builtin_assignconv): Fixed leading comment.
8783
8784 2000-08-25 Greg McGary <greg@mcgary.org>
8785
8786 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
8787
8788 2000-08-24 Greg McGary <greg@mcgary.org>
8789
8790 * lang.c (lang_decode_option): Use ARRAY_SIZE.
8791 * parse.y (BINOP_LOOKUP): Likewise.
8792
8793 2000-08-22 Andrew Haley <aph@cygnus.com>
8794
8795 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
8796 sign extending. Fixes gcj/321.
8797 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
8798 combining to make a jlong. Fixes gcj/321.
8799
8800 2000-08-21 Nix <nix@esperi.demon.co.uk>
8801
8802 * lang-specs.h: Do not process -o or run the assembler if
8803 -fsyntax-only.
8804
8805 2000-08-16 Andrew Haley <aph@cygnus.com>
8806
8807 * typeck.c (build_java_array_type): Rewrite code to do array
8808 alignment. Take into account back-end macros when aligning array
8809 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
8810 user to set alignment. Fixes gcj/252 and 160.
8811
8812 2000-08-09 Tom Tromey <tromey@cygnus.com>
8813
8814 * parse.y (check_abstract_method_definitions): Now return `int'.
8815 Check implemented interfaces. Fixes PR gcj/305.
8816
8817 * parse.y (patch_switch_statement): Disallow `long' in switch
8818 expressions. Fixes PR gcj/310.
8819
8820 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
8821
8822 * decl.c (finit_leg_identifier_node): New global.
8823 (init_decl_processing): Use `finit$' to initialize
8824 finit_identifier_node. Use `$finit$' to initialize
8825 finit_leg_identifier_node.
8826 * expr.c (expand_java_field_op): Use ID_FINIT_P.
8827 * java-tree.h (finit_identifier_node): Changed attached comment.
8828 (finit_leg_identifier_node): New declaration.
8829 (ID_FINIT_P): Take finit_identifier_node and
8830 finit_leg_identifier_node into account. This is a backward
8831 compatibility hack.
8832
8833 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
8834
8835 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
8836 Jan 6 2000 patch.
8837 (generate_bytecode_insns): Check `nargs' before emitting it.
8838 * verify.c (merge_type_state): Fixed typo.
8839 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
8840 generate_bytecode_{conditional,insns}.
8841
8842 2000-08-13 Anthony Green <green@redhat.com>
8843
8844 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
8845 for -pg builds).
8846
8847 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8848
8849 * class.c (maybe_layout_super_class): Fixed indentation.
8850 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
8851 (java_check_methods): New function declaration.
8852 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
8853 instead of `str_ptr'.
8854 * jcf-write.c (generate_bytecode_insns): Emit number the of args
8855 of a `invokeinterface' at the right time.
8856 * parse.h (WFL_STRIP_BRACKET): New macro.
8857 (SET_TYPE_FOR_RESOLUTION): Use it.
8858 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
8859 (check_class_interface_creation): Don't check for cross package
8860 innerclass name clashes.
8861 (method_header): Behave properly if MDECL is `error_mark_node'.
8862 (method_declarator): Return `error_mark_node' if bogus current
8863 class.
8864 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
8865 (resolve_and_layout): New local `decl_type', set and used. Call
8866 java_check_methods.
8867 (java_check_methods): New method.
8868 (java_layout_classes): Use it.
8869 (resolve_qualified_expression_name): No EH check necessary in
8870 access$<n>.
8871 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
8872 `case' statement.
8873 (patch_assignment): Set DECL_INITIAL on integral final local.
8874
8875 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
8876
8877 * java-tree.h (flag_extraneous_semicolon): New extern.
8878 * lang-options.h: (-Wextraneous-semicolon): New option.
8879 * lang.c (flag_redundant): Fixed typo in leading comment.
8880 (flag_extraneous_semicolon): New global.
8881 (lang_decode_option): Set `flag_extraneous_semicolon' when
8882 -Wall. Decode `-Wextraneous-semicolon'.
8883 * parse.y (type_declaration:): Removed `SC_TK' hack, added
8884 `empty_statement' rule.
8885 (class_body_declaration): Likewise.
8886 (method_body:): Accept `;' as a method body.
8887 (static_initializer:): Removed `SC_TK' hack.
8888 (constructor_block_end:): Likewise.
8889 (empty_statement:): Report deprecated empty declaration. Fixes
8890 gcj/295
8891
8892 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8893
8894 * parse.y (build_dot_class_method_invocation): Changed parameter
8895 name to `type'. Build signature from `type' and convert it to a
8896 STRING_CST if it's an array.
8897 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
8898 to use `ref_type' directly.
8899
8900 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
8901
8902 * lang-options.h: Added a comma after the last element to avoid
8903 syntax errors when other languages define additional options.
8904
8905 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
8906
8907 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
8908 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
8909 (jc1): Link with $(BACKEND).
8910 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
8911
8912 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
8913
8914 * jvspec.c: Adjust type of second argument to
8915 lang_specific_driver, and update code as necessary.
8916
8917 * class.c (build_dtable_decl): Initialize dummy.
8918
8919 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8920
8921 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
8922 method bodies not to rule out discarding `<clinit>'; don't use
8923 <clinit> to initialize static fields with constant initializers.
8924
8925 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8926
8927 * gjavah.c (print_method_info): Added `synth' parameter. Skip
8928 synthetic methods.
8929 (method_synthetic): New global.
8930 (HANDLE_METHOD): Recognize synthetic method and tell
8931 `print_method_info' about it.
8932 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
8933 processing a synthetic method.
8934 * jcf-reader.c (skip_attribute): New function.
8935 ( skip_attribute): Likewise.
8936
8937 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8938
8939 * parse.y (build_outer_field_access): Fixed comments.
8940 (fix_constructors): Emit the initialization of this$<n> before
8941 calling $finit$.
8942 (resolve_qualified_expression_name): Build an access to `decl' if
8943 necessary.
8944
8945 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
8946
8947 * parse-scan.y (curent_class): Non longer const.
8948 (inner_qualifier, inner_qualifier_length): Deleted.
8949 (current_class_length): New global.
8950 (bracket_count): Fixed typo in leading comment.
8951 (anonymous_count): New global.
8952 (class_instance_creation_expression:): Handle anonymous classes.
8953 (anonymous_class_creation:): New rule.
8954 (push_class_context): Rewritten.
8955 (pop_class_context): Likewise.
8956 (INNER_QUALIFIER): Macro deleted.
8957 (report_class_declaration): call `push_class_context' when
8958 entering the function. `fprintf' format modified not to use
8959 INNER_QUALIFIER.
8960 (report_class_declaration): Assign `package_name' and
8961 `current_class' to NULL separately.
8962
8963 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
8964
8965 * expr.c (build_invokeinterface): Call layout_class_methods on
8966 target interface.
8967
8968 2000-07-27 Tom Tromey <tromey@cygnus.com>
8969 Anthony Green <green@cygnus.com>
8970 Alexandre Petit-Bianco <apbianco@cygnus.com>
8971
8972 * class.c (make_class_data): Create vtable for abstract classes.
8973 (get_dispatch_table): Changed to cope with abstract classes.
8974
8975 2000-07-27 Tom Tromey <tromey@cygnus.com>
8976
8977 * parse.y (patch_method_invocation): Don't reverse the argument
8978 list when dealing with anonymous class constructors. Fixed typo in
8979 comment.
8980
8981 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
8982
8983 * parse.y (build_alias_initializer_parameter_list): Reverse
8984 crafted list when building aliases for anonymous class
8985 constructors.
8986
8987 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
8988
8989 * parse.y (jdep_resolve_class): Don't bother checking potential
8990 innerclass access if `decl' is NULL.
8991 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
8992 WFL.
8993
8994 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
8995
8996 * parse.c: Remove (again.)
8997
8998 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8999
9000 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
9001 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
9002 outside the `if' statement, alias to innerclass removed, `decl'
9003 used to mark the class complete.
9004
9005 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
9006
9007 * parse.y (simple_name:): Fixed typo in error message.
9008
9009 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
9010
9011 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
9012 or its first operand can be error marks.
9013
9014 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9015
9016 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
9017 * parse.y (method_header): Likewise.
9018
9019 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9020
9021 * parse.y (process_imports): Consider that one might be trying to
9022 import an innerclass. Fixes gcj/254
9023
9024 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9025
9026 * parse.y (find_as_inner_class): Handle the case where the
9027 enclosing context of an innerclass has been loaded as bytecode.
9028
9029 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9030
9031 * parse.y (simple_name:): Reject `$' in type names.
9032 (resolve_type_during_patch): Use `type' as a second
9033 argument to resolve_no_layout. Fixes gcj/257.
9034
9035 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
9036
9037 * parse.y (find_most_specific_methods_list): Select the only
9038 non-abstract method even if max has been set.
9039 Fixes gcj/285, gcj/298.
9040
9041 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
9042
9043 * lang-specs.h: Added %(jc1) to java compiler options.
9044
9045 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
9046
9047 * .cvsignore: New file.
9048
9049 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9050
9051 * parse.y (not_accessible_p): Access granted to innerclasses
9052 (indirectly) extending the reference type. Fixes gcj/249.
9053
9054 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9055
9056 * parse.y (patch_method_invocation): Fixed comment.
9057 (maybe_use_access_method): Build this$<n>s to the context of the
9058 target method, or a type that extends it. Fixes gcj/242.
9059
9060 2000-07-13 Mark Mitchell <mark@codesourcery.com>
9061
9062 * parse.c: Remove.
9063
9064 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9065
9066 * parse.y (fold_constant_for_init): Avoid bullish conversion.
9067
9068 2000-07-13 Tom Tromey <tromey@cygnus.com>
9069
9070 * lang-specs.h: Added %{I*}.
9071
9072 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
9073
9074 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
9075
9076 2000-07-12 Mark Mitchell <mark@codesourcery.com>
9077
9078 * parse-scan.c: Remove.
9079
9080 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9081
9082 * class.c (set_super_info): Handled protected inner classes.
9083 (common_enclosing_context_p): Bail early if arguments aren't both
9084 inner classes.
9085 (get_access_flags_from_decl): Handle private and protected inner
9086 classes.
9087 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
9088 (CLASS_PROTECTED): Likewise.
9089 (struct lang_type): New bitfield `poic'.
9090 * parse.y (jdep_resolve_class): Call check_inner_class_access on
9091 inner classes only.
9092 (check_inner_class_access): Renamed arguments, added
9093 comments. Handles protected inner classes (fixes gcj/225)
9094 (not_accessible_p): Fixed comments. Avoid handling inner classes.
9095
9096 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9097
9098 * parse.y (resolve_qualified_expression_name): Verify qualified
9099 access to `this'. Fixes gcj/239.
9100
9101 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9102
9103 * jcf-write.c (generate_classfile): Don't install ConstantValue
9104 for null pointers.
9105
9106 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9107
9108 * parse.y (resolve_qualified_expression_name): Handle inner class
9109 access. Fixes gcj/256.
9110
9111 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9112
9113 * jcf-write.c (generate_classfile): Properly install the
9114 ConstantValue attribute and the initial value constant pool index
9115 on string constants.
9116 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
9117 class files.
9118
9119 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
9120
9121 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
9122 construct.
9123 * parse.y (find_as_inner_class): Fixed typo.
9124 (do_resolve_class): Explore enclosing contexts when searching for
9125 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
9126 (check_inner_class_access): Check `decl' which can be null in case
9127 of previous errors.
9128
9129 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
9130
9131 * java-tree.h (java_debug_context): Declared `extern'.
9132 (safe_layout_class): Likewise.
9133 * parse.y (resolve_field_access): Field must be `static' in order
9134 to be replaced by its initial value. Added comments.
9135 (find_applicable_accessible_methods_list): Fixed typo.
9136 (find_most_specific_methods_list): Methods found in innerclasses
9137 take over methods founds in the enclosing contexts.
9138 (java_complete_tree): Loosen restrictions on the type of DECLs
9139 that can be replaced by their initialization values.
9140 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
9141
9142 2000-07-05 Tom Tromey <tromey@cygnus.com>
9143
9144 * Make-lang.in (PARSE_DIR): New macro.
9145 (PARSE_RELDIR): Likewise.
9146 (PARSE_C): Likewise.
9147 (PARSE_SCAN_C): Likewise.
9148 ($(PARSE_C)): New target.
9149 ($(PARSE_SCAN_C)): Likewise.
9150 (SET_BISON): New macro.
9151 (BISONFLAGS): Likewise.
9152 (JAVABISONFLAGS): Likewise.
9153
9154 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
9155
9156 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
9157 argument on the first pass for CNI as well as JNI.
9158 (print_method_info): Set up method name on the first pass only.
9159
9160 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9161
9162 * parse.y (parser_qualified_classname): Removed parameter
9163 `is_static'.
9164 (create_interface): Removed first passed parameter to
9165 parser_qualified_classname.
9166 (create_class): Likewise. Don't install alias on static
9167 innerclasses. Fixes gcj/275.
9168
9169 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9170
9171 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
9172 debugable statement with empty_stmt_node. Fixes gcj/272
9173
9174 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9175
9176 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
9177 gcj/271.
9178
9179 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
9180
9181 * jcf-write.c (push_long_const): Appropriately cast short negative
9182 constant to jword.
9183
9184 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
9185
9186 * parse.y (verify_constructor_super): Use loop variable
9187 `m_arg_type' initialized with `mdecl_arg_type'.
9188
9189 2000-06-29 Tom Tromey <tromey@cygnus.com>
9190
9191 * parse.y (resolve_field_access): Handle case where `type_found'
9192 is NULL.
9193
9194 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
9195
9196 * expr.c (lookup_field): The same field can be found through two
9197 different interface. Don't declare it ambiguous in that case.
9198
9199 2000-06-27 Tom Tromey <tromey@cygnus.com>
9200
9201 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
9202 follows \r, then unget it at a lower level.
9203
9204 2000-06-26 Tom Tromey <tromey@cygnus.com>
9205
9206 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
9207 java_complete_tree.
9208
9209 2000-06-25 Tom Tromey <tromey@cygnus.com>
9210
9211 * parse.y (for_statement): Wrap expression in a WFL if it is a
9212 constant. For PR gcj/268.
9213
9214 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9215
9216 * parse.y (do_resolve_class): Minor optimiztion in the package
9217 list search. Removed unnecessary test and return statement.
9218 (valid_ref_assignconv_cast_p): Order of arguments to
9219 enclosing_context_p fixed.
9220
9221 2000-06-24 Tom Tromey <tromey@cygnus.com>
9222
9223 * expr.c (lookup_field): Print error and return error_mark_node if
9224 field reference is ambiguous.
9225
9226 * parse.y (check_abstract_method_definitions): Also check if
9227 `other_method' is abstract.
9228
9229 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
9230
9231 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
9232 classes.
9233 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
9234 (struct lang_type): New field `pic'.
9235 (CLASS_PRIVATE): New macro.
9236 * parse.y (check_inner_class_access): New function.
9237 (jdep_resolve_class): Call it.
9238
9239 2000-06-23 Tom Tromey <tromey@cygnus.com>
9240
9241 * parse.y (patch_incomplete_class_ref): Initialize the returned
9242 class. For PR gcj/260.
9243
9244 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
9245
9246 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
9247
9248 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9249
9250 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
9251 Java specific checks.
9252 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
9253 screened by DECL_P.
9254 * java-tree.def (CASE_EXPR): Marked 'e'.
9255 (DEFAULT_EXPR): Likewise.
9256 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
9257 screened by DECL_P.
9258 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
9259 Java specific checks.
9260 (generate_bytecode_insns): Test try_block for BLOCK before using
9261 BLOCK_EXPR_BODY.
9262 * parse.y (build_wfl_wrap): Added `location' argument. Set
9263 EXPR_WFL_LINECOL accordingly.
9264 (dim_expr:): Wrap constants with WFLs.
9265 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
9266 (resolve_package): Check for `stmt' not being a BLOCK before
9267 building a debuggable statement with it.
9268 (make_qualified_primary): Added extra parameter to build_wfl_wrap
9269 invocation.
9270 (resolve_field_access): Make sure `decl' is a DECL before treating
9271 it as such.
9272 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
9273 IDENTIFIER_NODE before treating it as such.
9274 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
9275 treating it as such.
9276 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
9277 to be applied only on non array types.
9278
9279 2000-06-16 Per Bothner <per@bothner.com>
9280
9281 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
9282 define in terms of DECL_RESULT, as that fails when --enable-checking.
9283
9284 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9285
9286 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
9287 types the same in comparison.
9288 (CHECK_OP): Add static prototype.
9289
9290 2000-06-13 Jakub Jelinek <jakub@redhat.com>
9291
9292 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
9293 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
9294 * parse.c: Rebuilt.
9295
9296 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9297
9298 * decl.c (create_primitive_vtable): Prototype.
9299
9300 * jcf-write.c (generate_bytecode_insns): Initialize variable
9301 `saved_context'.
9302
9303 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
9304
9305 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
9306
9307 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
9308 to track searched classes, and do not search the same class more than
9309 once. Call find_applicable_accessible_methods_list on immediate
9310 superclass, instead of search_applicable_method_list on all ancestors.
9311 Fix for PR gcj/238.
9312
9313 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
9314
9315 * parse.y (register_fields): Permit static fields in inner classes
9316 if they are final. Fix for PR gcj/255.
9317
9318 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
9319
9320 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
9321 * parse.y (find_in_imports): Returned type changed to void,
9322 leading comment fixed.
9323 (register_package): New function.
9324 (qualify_and_find): Likewise.
9325 (package_declaration:): Use `register_package'.
9326 (single_type_import_declaration:): Removed local variable
9327 `node'. Added missing `;' for consistency.
9328 (type_import_on_demand_declaration:): Use `chainon' to link new
9329 entries.
9330 (lookup_field_wrapper): Lookup local variables defined in outer
9331 contexts first.
9332 (java_complete_class): Don't reverse the list of imported on demand.
9333 (do_resolve_class): Reorganized. Removed local variable
9334 `original_name'. Call `qualify_and_find' with the current package
9335 name, invoke `find_in_imports_on_demand' right after. Call
9336 `qualify_and_find' with the packages we've seen so far. Fixed
9337 operations numbering in comments.
9338 (java_expand_class): Don't reverse `package_list'.
9339 (find_most_specific_methods_list): New local variables `abstract'
9340 and `candidates'. Use them to pick the right method.
9341
9342 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
9343
9344 * parse.y (check_modifiers_consistency): Don't subtract out
9345 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
9346
9347 2000-06-04 Philipp Thomas <pthomas@suse.de>
9348
9349 * Makefile.in (INTLLIBS): New.
9350 (LIBS): Add above.
9351 (DEPLIBS): Ditto.
9352
9353 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
9354
9355 * class.c (get_dispatch_table): Build the vtable dummy entry list
9356 element with a null purpose. Fixed leading comment.
9357 (build_dtable_decl): Build an accurate dtable type when appropriate
9358 and use it.
9359
9360 2000-06-02 Richard Henderson <rth@cygnus.com>
9361
9362 * lang.c (lang_get_alias_set): New.
9363
9364 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
9365
9366 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
9367 before using it as the accessed field.
9368
9369 2000-05-31 Tom Tromey <tromey@cygnus.com>
9370
9371 * java-tree.h (boolean_array_vtable, byte_array_vtable,
9372 char_array_vtable, short_array_vtable, int_array_vtable,
9373 long_array_vtable, float_array_vtable, double_array_vtable):
9374 Declare.
9375 * expr.c (get_primitive_array_vtable): New function.
9376 (create_primitive_vtable): New function.
9377 (java_lang_expand_expr): Enable code to statically generate
9378 arrays.
9379 * decl.c (init_decl_processing): Create primitive vtables.
9380 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
9381 short_array_vtable, int_array_vtable, long_array_vtable,
9382 float_array_vtable, double_array_vtable): Define.
9383
9384 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
9385
9386 * java/parse.y (find_applicable_accessible_methods_list):
9387 Don't add an uninitialized value to the list.
9388
9389 2000-05-25 Tom Tromey <tromey@cygnus.com>
9390
9391 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
9392 when trying to see if field's class should be initialized. Always
9393 initialize field's declaring class, not qualified class.
9394 For PR gcj/162.
9395
9396 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
9397 `wfl_operator', to maybe_build_primttype_type_ref.
9398 Fixes PR gcj/235.
9399
9400 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
9401
9402 * parse.y (patch_method_invocation): Don't try to lookup methods
9403 in primitive types.
9404
9405 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
9406
9407 * parse.y (resolve_field_access): Call the appropriate <clinit>
9408 before accessing the length of a static array. Craft a decl for
9409 the field while its time. Fixes PR gcj/129.
9410
9411 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9412
9413 * parse.y (resolve_package): Correctly set `*next' (was off by
9414 one.)
9415 (resolve_qualified_expression_name): Fixed comment.
9416
9417 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
9418
9419 * jcf-parse.c (jcf_parse_source): Reset current_class and
9420 current_function_decl to NULL before parsing a new file.
9421
9422 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
9423
9424 * parse.y (block_end:): If the collected block doesn't feature a
9425 statement, insert an empty statement.
9426
9427 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9428
9429 * parse.y (maybe_yank_clinit): New function.
9430 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
9431 end of the list of methods belonging to a class.
9432 (java_complete_expand_method): Check whether <clinit> is really
9433 necessary and expand it accordingly.
9434
9435 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9436
9437 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
9438 processed by the method's switch statement.
9439
9440 2000-05-19 Tom Tromey <tromey@cygnus.com>
9441
9442 * java-tree.h: Added init state enum.
9443 * decl.c (emit_init_test_initialization): Initialize class
9444 initialization check variable by looking at class' state.
9445
9446 2000-05-19 Tom Tromey <tromey@cygnus.com>
9447
9448 * java-tree.h (build_instanceof): Declare.
9449 (build_get_class): Declare.
9450 * parse.y (patch_binop): Use build_instanceof.
9451 * expr.c (build_instanceof): New function. If class is final,
9452 don't make a function call.
9453 (expand_java_INSTANCEOF): Use it.
9454 (build_get_class): New function.
9455
9456 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
9457
9458 * jcf-write.c (generate_classfile): Scan the source_file for
9459 slashes with the right pointer variable.
9460
9461 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
9462
9463 * lang.c (lang_decode_option): Update -Wunused flags by calling
9464 set_Wunused.
9465 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
9466
9467 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
9468
9469 * check_init.c (check_init): Constify local char *.
9470 * class.c (push_class): Constify local char *.
9471 * java_tree.h: Update prototypes.
9472 * jcf-io.c (open_class): Constify filename parameter and
9473 return value.
9474 (find_class): Remove redundant string copy. Cast return from
9475 open_class.
9476 * jcf-parse.c (read_class, parse_class_file, yyparse):
9477 Constify local char *.
9478 * jcf-write.c (generate_bytecode_insns, generate_classfile):
9479 Constify local char *.
9480 * jcf.h (JCF): Constify filename and classname.
9481 (JCF_FINISH): Cast args to FREE to char * when appropriate.
9482 * lang.c (init_parse): Constify parameter and return value.
9483 * lex.c (java_get_line_col): Constify filename parameter.
9484 * parse.h: Constify parser_ctxt.filename. Update prototypes.
9485 * parse.y (java_parser_context_suspend,
9486 issue_warning_error_from_context, safe_layout_class): Constify
9487 local char *.
9488 * parse.c: Regenerate.
9489
9490 2000-05-08 Tom Tromey <tromey@cygnus.com>
9491
9492 * expr.c (build_jni_stub): Cache the result of
9493 _Jv_LookupJNIMethod.
9494
9495 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
9496
9497 * decl.c (predef_filenames_size): Now 7.
9498 (predef_filenames): New seventh entry.
9499
9500 2000-05-04 Tom Tromey <tromey@cygnus.com>
9501
9502 * boehm.c (mark_reference_fields): Don't mark RawData fields.
9503 Keep track of when we've seen a reference field after a
9504 non-reference field.
9505 (get_boehm_type_descriptor): Handle case where we see
9506 non-reference fields but no trailing reference field.
9507 * decl.c (rawdata_ptr_type_node): Define.
9508 (init_decl_processing): Initialize rawdata_ptr_type_node.
9509 * java-tree.h (rawdata_ptr_type_node): Declare.
9510
9511 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9512
9513 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
9514 specifiers in calls to fprintf.
9515
9516 2000-05-03 Andrew Haley <aph@cygnus.com>
9517
9518 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
9519
9520 * javaop.h (WORD_TO_INT): New function.
9521 (IMMEDIATE_s4): Use WORD_TO_INT.
9522 * jcf.h (JPOOL_INT): Ditto.
9523
9524 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
9525 separator.
9526
9527 2000-04-19 Tom Tromey <tromey@cygnus.com>
9528
9529 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
9530 on native function.
9531 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
9532 JNI methods.
9533 * expr.c (build_jni_stub): New function.
9534 * lang-specs.h: -fjni and -femit-class-file are incompatible.
9535 * parse.c: Rebuilt.
9536 * parse.y (java_complete_expand_methods): Expand a native method
9537 and call build_jni_stub if -fjni given.
9538 * lang-options.h: Document -fjni.
9539 * lang.c (flag_jni): New global.
9540 (lang_f_options): Added `jni' entry.
9541 * java-tree.h (soft_lookupjnimethod_node,
9542 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
9543 Declare.
9544 (flag_jni): Declare.
9545 (build_jni_stub): Declare.
9546 (struct lang_decl): Added `native' flag.
9547 (METHOD_NATIVE): Redefined to use `native' field of lang specific
9548 structure.
9549 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
9550 soft_jnipopsystemframe_node): New globals.
9551 (init_decl_processing): Set them. _Jv_InitClass only takes one
9552 argument.
9553
9554 * java-tree.def: Put into `C' mode.
9555
9556 2000-04-27 Tom Tromey <tromey@cygnus.com>
9557
9558 Fix for PR gcj/2:
9559 * expr.c (expand_invoke): Generate check to see if object pointer
9560 is null in nonvirtual invocation case.
9561 * java-tree.h (soft_nullpointer_node): Declare.
9562 * decl.c (soft_nullpointer_node): New global.
9563 (init_decl_processing): Initialize soft_nullpointer_node.
9564 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
9565 or `private' methods.
9566 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
9567
9568 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
9569
9570 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
9571 from <clinit>
9572
9573 2000-04-26 Tom Tromey <tromey@cygnus.com>
9574
9575 * zextract.c (find_zip_file_start): New function.
9576 (read_zip_archive): Use it.
9577
9578 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9579
9580 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
9581
9582 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9583
9584 * class.c (common_enclosing_context_p): New function.
9585 * java-tree.h (common_enclosing_context_p): Added prototype.
9586 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
9587 classes sharing an outer context with the current instance.
9588 * parse.y (build_access_to_thisn): Fixed leading comment.
9589 (verify_constructor_super): New local `supper_inner'. Skip
9590 enclosing context argument in the case of inner class constructors.
9591 (patch_method_invocation): Insert proper context as second
9592 parameter to pure inner class constructor super invocations.
9593
9594 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9595
9596 * parse.y (end_class_declaration): Reset the interface number
9597 counter.
9598
9599 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9600
9601 * parse.y (source_start_java_method): Deleted unnecessary code.
9602 (patch_method_invocation): Fixed comment.
9603
9604 2000-04-24 Robert Lipe <robertlipe@usa.net>
9605
9606 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
9607
9608 2000-04-23 Tom Tromey <tromey@cygnus.com>
9609
9610 * boehm.c (mark_reference_fields): Use int_byte_position.
9611
9612 2000-04-22 Tom Tromey <tromey@cygnus.com>
9613
9614 * boehm.c (mark_reference_fields): Only call byte_position on
9615 non-static fields.
9616
9617 2000-04-22 Tom Tromey <tromey@cygnus.com>
9618
9619 * boehm.c (mark_reference_fields): Added `last_view_index'
9620 argument. Use DECL_FIELD_OFFSET to determine field's offset.
9621
9622 2000-04-20 Mo DeJong <mdejong@cygnus.com>
9623
9624 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
9625 * parse.y (check_class_interface_creation): Fixed comments. Select
9626 permitted modifiers for (inner) interfaces. Changed error message
9627 to report rejected modifiers used with local classes.
9628
9629 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9630
9631 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
9632 of directly inherited type considered in scope.
9633 * parse.y (do_resolve_class): Search inherited classes for inner
9634 classes.
9635
9636 2000-04-20 Tom Tromey <tromey@cygnus.com>
9637
9638 * parse.y (not_accessible_p): Use member's class, not current
9639 class, when doing inheritance check for protected reference.
9640 Fixes PR gcj/124.
9641
9642 2000-04-20 Jason Schroeder <shrode@subnature.com>
9643
9644 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
9645
9646 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9647
9648 * parse.y (lookup_field_wrapper): Search for final local aliases.
9649 (resolve_expression_name): Let lookup_field_wrapper search for
9650 final local aliases. Force the value of `name' if one is found.
9651 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
9652 an expression name. Fixed comments.
9653
9654 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9655
9656 * parse.y (yyerror): `msg' can be null, don't use it in that case.
9657
9658 2000-04-19 Tom Tromey <tromey@cygnus.com>
9659
9660 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
9661
9662 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
9663
9664 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
9665
9666 2000-04-18 Tom Tromey <tromey@cygnus.com>
9667
9668 PR gcj/211:
9669 * gjavah.c (utf8_cmp): Changed return value.
9670 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
9671 result.
9672 (cxx_keywords): New global.
9673 (get_field_name): Handle new result of cxx_keyword_subst.
9674 (print_method_info): Likewise.
9675
9676 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
9677
9678 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
9679 with a newline, for CNI.
9680 (print_stub_or_jni): Print a space or newline before method name for
9681 CNI as well as JNI.
9682 (print_cxx_classname): Don't write leading "::" in CNI stub method.
9683 (process_file): Include gcj/cni.h if generating CNI stubs.
9684
9685 2000-04-16 Tom Tromey <tromey@cygnus.com>
9686
9687 * gjavah.c (decompile_method): Use print_field_name.
9688 Fixes PR gcj/205.
9689
9690 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9691
9692 * parse.y (java_expand_classes): Reverse the package list once.
9693 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
9694 reduction.
9695 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
9696 the `==' and `!=' operators.
9697
9698 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
9699
9700 * jcf-write.c (generate_bytecode_insns): At invocation time,
9701 always relate an interface method to the type of its selector.
9702
9703 2000-04-05 Tom Tromey <tromey@cygnus.com>
9704
9705 Fix for PR gcj/2:
9706 * expr.c (expand_invoke): Generate check to see if object pointer
9707 is null in nonvirtual invocation case.
9708 * java-tree.h (soft_nullpointer_node): Declare.
9709 * decl.c (soft_nullpointer_node): New global.
9710 (init_decl_processing): Initialize soft_nullpointer_node.
9711 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
9712 or `private' methods.
9713 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
9714
9715 2000-04-05 Tom Tromey <tromey@cygnus.com>
9716
9717 Fix for PR gcj/140:
9718 * parse.y (check_final_assignment): Recognize assignments to the
9719 `length' field of an array when generating class files.
9720
9721 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
9722
9723 * class.c (decl_hash): Prototype removed.
9724 (decl_compare): Likewise.
9725
9726 2000-04-05 Tom Tromey <tromey@cygnus.com>
9727
9728 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
9729 * parse.y (check_modifiers_consistency): Check for final/volatile
9730 clash. Fixes PR gcj/164.
9731
9732 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
9733
9734 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
9735 made global.
9736 (java_hash_compare_tree_node): Renamed from `decl_compare, made
9737 global.
9738 (add_method_1): Use `java_hash_hash_tree_node' and
9739 `java_hash_compare_tree_node'.
9740 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
9741 (java_hash_compare_tree_node): Likewise.
9742 * parse.y (find_applicable_accessible_methods_list): Create,
9743 delete and use a hash table to remember already searched interfaces.
9744
9745 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
9746
9747 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
9748 with latest entry.
9749
9750 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9751
9752 * boehm.c (mark_reference_fields, set_bit): Prototype.
9753 (set_bit): Un-ANSI-fy definition.
9754
9755 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
9756 Prototype.
9757
9758 * decl.c (emit_init_test_initialization): Likewise.
9759
9760 * gjavah.c (jni_print_char): Likewise.
9761
9762 * parse.y (create_new_parser_context): Likewise.
9763
9764 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
9765
9766 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
9767 patch missing hunk. Fixed indentation.
9768
9769 2000-03-30 Tom Tromey <tromey@cygnus.com>
9770
9771 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
9772 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
9773
9774 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
9775
9776 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
9777 when negative *before* using it as an array index.
9778 * ChangeLog: Fixed typo.
9779
9780 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
9781
9782 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
9783 to 0 when it reaches -1.
9784
9785 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
9786
9787 * jcf-parse.c (get_constant): Properly cast `num' during the
9788 invocation of `add_double'.
9789 * jcf-write.c (push_long_const): Properly cast `lo' before
9790 comparing it to short bounds.
9791 * parse-scan.y (interface_declaration:): Rule re-arrange so that
9792 `interface_body:' is reduced after the current interface is
9793 pushed.
9794
9795 2000-03-26 Tom Tromey <tromey@cygnus.com>
9796
9797 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
9798 Java-specific `-f' option.
9799
9800 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9801
9802 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
9803 Adjust order of making types.
9804 Make bitsize_*_node values.
9805
9806 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9807
9808 * class.c (make_field_value): Use byte_position.
9809 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
9810 (java_array_data_offset): Likewise.
9811 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
9812 bzero call.
9813
9814 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
9815
9816 * parse.y (check_abstract_method_definitions): New local
9817 `end_type_reached'. Make sure we also consider `end_type'.
9818 (java_check_abstract_method_definitions): Make sure we eventually
9819 consider `java.lang.Object'.
9820 (maybe_use_access_method): Don't use access method if not in the
9821 context of a pure inner class or if the method's context is right.
9822 (find_applicable_accessible_methods_list): New static flag
9823 `object_done'. Don't search abstract classes as interfaces. Fixed
9824 indentation. Fixed the `java.lang.Object' only search. Search
9825 class interface(s) first, then fully search enclosing contexts.
9826 (find_most_specific_methods_list): Pick the closest candidate when
9827 they're all abstract.
9828
9829 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9830
9831 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
9832 properly initialize `finished_label'. Don't emit gotos for empty
9833 try statements.
9834
9835 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9836
9837 * except.c (emit_handlers): Clear catch_clauses_last.
9838
9839 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9840
9841 * parse.y (check_method_types_complete): New function.
9842 (create_class): Reset anonymous class counter only when seeing an
9843 non inner classe.
9844 (java_complete_class): JDEP_METHOD: Don't recompute signature
9845 if incomplete.
9846
9847 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9848
9849 * class.c (build_static_ref): Fixed indentation in comment.
9850 * java-tree.def (TRY_EXPR): Fixed typo in name.
9851 (CLASS_LITERAL): Likewise.
9852 * java-tree.h: (TYPE_DOT_CLASS): New macro.
9853 (struct lang_type): New field `dot_class'.
9854 * jcf-write.c (generate_bytecode_insns): Fixed error message.
9855 (generate_classfile): Method `class$' is synthetic.
9856 * parse.y (build_do_class_method): New function.
9857 (build_dot_class_method_invocation): Likewise.
9858 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
9859 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
9860 (qualify_ambiguous_name): Likewise.
9861 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
9862 (build_try_statement): Fixed leading comment.
9863
9864 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9865
9866 * class.c (make_field_value): Properly handle sizes.
9867 (get_dispatch_vector): Use tree_low_cst and host_integerp.
9868 (layout_class_method): Count using trees.
9869 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
9870 * expr.c (java_array_data_offset): Use int_bit_position.
9871 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
9872 (build_invokevirtual): Use tree_low_cst and do computations with trees.
9873
9874 2000-03-16 Tom Tromey <tromey@cygnus.com>
9875
9876 * lang.c (flag_hash_synchronization): New global.
9877 (lang_f_options): Added `hash-synchronization'.
9878 * lang-options.h: Mention -fhash-synchronization.
9879 * java-tree.h (flag_hash_synchronization): Declare.
9880 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
9881 hash table synchronization is disabled.
9882 * decl.c (init_decl_processing): Only push `sync_info' value when
9883 hash table synchronization is disabled.
9884 * class.c (make_class_data): Only push `sync_info' field when hash
9885 table synchronization is disabled. Removed dead code.
9886
9887 2000-03-16 Tom Tromey <tromey@cygnus.com>
9888
9889 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
9890
9891 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
9892
9893 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
9894 classes.
9895 * parse.y (patch_method_invocation): Handle anonymous classes
9896 creation in static context.
9897
9898 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
9899
9900 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
9901 * parse.y (resolve_qualified_expression_name): Use it.
9902 (patch_method_invocation): Likewise.
9903
9904 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
9905
9906 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
9907 depending on the type of dependency which dictates what the
9908 current class is.
9909 (unresolved_type_p): Resolved types limited to the current class.
9910
9911 2000-03-15 Tom Tromey <tromey@cygnus.com>
9912
9913 * decl.c (init_decl_processing): Set type of `sync_info' to be
9914 pointer to Object.
9915
9916 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
9917 Correctly compute bit number for current slot. Zero `high' and
9918 `low' in DS_LENGTH case. Don't skip inherited fields. Use
9919 mark_reference_fields.
9920 (mark_reference_fields): New function.
9921
9922 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9923
9924 * parse.y (register_incomplete_type): Fixed initialization of
9925 JDEP_ENCLOSING.
9926
9927 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
9928
9929 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
9930 static globals.
9931 (push_class_context, pop_class_context): New function.
9932 (class_body:): Call pop_class_context.
9933 (interface_body:): Likewise.
9934 (INNER_QUALIFIER): New macro.
9935 (report_class_declaration): Changed output format and use
9936 INNER_QUALIFIER. Call push_class_context.
9937
9938 2000-02-14 Andrew Haley <aph@cygnus.com>
9939
9940 * check-init.c (check_init): Add new cases for unary and binary
9941 tree nodes.
9942
9943 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9944
9945 * parse.y (resolve_package): Set `next' once a type name has been
9946 progressively discovered.
9947 (resolve_qualified_expression_name): Propagate resolution only if
9948 there are remaining qualifiers. Take into account `q' might have
9949 been cleared after re-qualification.
9950 * parse.y (patch_method_invocation): New local `resolved'.
9951 Section dealing with qualified expression rewritten to use
9952 resolve_field_access.
9953
9954 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9955
9956 * parse.h (PUSH_CPC): Fixed indentation.
9957 (DEBUG_CPC): New macro.
9958 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
9959 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
9960 * parse.y (class_body_declaration:): Use
9961 SET_CPC_INSTANCE_INITIALIZER_STMT.
9962 (method_declaration:): Check for null current_function_decl.
9963 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
9964 (java_parser_context_pop_initialized_field): Better handling of
9965 empty lists.
9966 (maybe_make_nested_class_name): Mark nested class name as
9967 qualified when necessary.
9968 (end_class_declaration): Don't call java_parse_context_resume when
9969 one or more error occurred.
9970 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
9971 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
9972 SET_CPC_INITIALIZER_STMT.
9973 (method_header): Check for inner classes declaring static methods.
9974 (resolve_qualified_expression_name): Handle situation where `this'
9975 is implied.
9976
9977 2000-03-13 Hans Boehm <boehm@acm.org>
9978
9979 * typeck.c (build_prim_array_type): Correctly set the high word too.
9980
9981 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
9982
9983 * parse.y (java_complete_expand_methods): Leave <clinit> out of
9984 ordinary methods.
9985 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
9986 list of methods for interfaces.
9987
9988 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9989
9990 * parse.y (qualify_ambiguous_name): Properly handle expressions
9991 using `null'.
9992
9993 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9994
9995 * parse.y (check_final_assignment): Extended to process
9996 COMPOUND_EXPR.
9997 (patch_assignment): Have check_final_assignment called only once.
9998
9999 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10000
10001 * java-tree.h (IS_INIT_CHECKED): New flag.
10002 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
10003 * parse.y (patch_string): Call force_evaluation_order on the
10004 completed string concatenation tree.
10005 * expr.c (force_evaluation_order): Call force_evaluation_order on
10006 function's arguments too.
10007
10008 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10009
10010 * decl.c (emit_init_test_initialization): Mark KEY as unused.
10011 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
10012 (build_anewarray): Likewise.
10013 * parse.y (patch_newarray): Likewise.
10014 * parse.c: Regenerated.
10015
10016 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
10017
10018 * decl.c (init_decl_processing): Added new class fields `depth',
10019 `ancestors', and `idt' to class_type_node. Use
10020 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
10021 * class.c (make_class_data): Push initial values for new fields.
10022 * java-tree.h: Updated prototype for `build_invokeinterface'.
10023 * expr.c (build_invokeinterface): Changed parameters to accept
10024 `method' tree. Calculate index of `method' in its declaring
10025 interface. Build call to _Jv_LookupInterfaceMethodIdx.
10026 (expand_invoke): Call `build_invokeinterface' with new parameters.
10027 * parse.y (patch_invoke): Call `build_invokeinterface' with new
10028 parameters.
10029
10030 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
10031
10032 * typeck.c (lookup_do): Search superinterfaces first
10033 when looking up an interface method. From Godmar Back
10034 <gback@cs.utah.edu>
10035
10036 2000-03-06 Tom Tromey <tromey@cygnus.com>
10037
10038 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
10039
10040 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
10041
10042 * java-tree.h (lookup_argument_method2): Declared.
10043 (safe_layout_class): Prototype moved from parse.h.
10044 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
10045 * parse.y (java_check_regular_methods): Local `super_class' gone.
10046 Call lookup_argument_method2 instead of lookup_argument_method.
10047 Perform modifier match for methods found declared in implemented
10048 interfaces. Fixed indentation problem. Overriding/hiding error
10049 report to take place only for methods found in classes.
10050 * typeck.c (lookup_argument_method): Changed leading
10051 comment. Re-written by calling lookup_do.
10052 (lookup_argument_method2): New function.
10053 (lookup_java_method): Re-written by calling lookup_do.
10054 (lookup_do): New function.
10055
10056 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
10057
10058 * check-init.c (check_init): Removed dead code. Handle (blank)
10059 final variables.
10060 * parse.y (declare_local_variables): New local `final_p', set it
10061 and use it to initialize LOCAL_FINAL.
10062 (check_final_assignment): Only check FIELD_DECLs.
10063
10064 2000-02-17 Tom Tromey <tromey@cygnus.com>
10065
10066 * Makefile.in (JAVA_OBJS): Added boehm.o.
10067 (boehm.o): New target.
10068 * Make-lang.in (JAVA_SRCS): Added boehm.c.
10069 * java-tree.h (flag_use_boehm_gc): Declare.
10070 (get_boehm_type_descriptor): Declare.
10071 * lang.c (lang_f_options): Added `use-boehm-gc'.
10072 (flag_use_boehm_gc): New global.
10073 * lang-options.h: Added -fuse-boehm-gc.
10074 * boehm.c: New file.
10075 * class.c (get_dispatch_table): If class uses a Boehm type
10076 descriptor, put it in the vtable.
10077 (make_class_data): Removed dead code.
10078
10079 2000-03-03 Per Bothner <per@bothner.com>
10080
10081 * decl.c (init_decl_processing): Initialize sizetype properly.
10082
10083 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10084
10085 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
10086 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
10087 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
10088 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
10089 (jcf_parse): New local `current'. Load innerclasses seen in outer
10090 context being processed.
10091 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
10092 * jcf-write.c (append_innerclasses_attribute): New function.
10093 (append_innerclasses_attribute_entry): Likewise.
10094 (get_access_flags): Handle static classes. Set anonymous and local
10095 classes to be private.
10096 (generate_classfile): Attribute count adjusted. Call
10097 append_innerclasses_attribute.
10098 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
10099 PURE_INNER_CLASS_TYPE_P.
10100 * parse.y (parser_qualified_classname): New parameter `is_static',
10101 produce non qualified name accordingly.
10102 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
10103 (create_interface): Added argument to parser_qualified_classname.
10104 (create_class): Added argument to parser_qualified_classname. Setup
10105 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
10106 (add_inner_class_fields): Fixed indentation.
10107 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
10108 (method_declarator): Fixed typo in comment.
10109 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
10110 (build_current_thisn): Likewise.
10111 (patch_method_invocation): Likewise.
10112
10113 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
10114
10115 * decl.c (current_function_decl): Move to toplev.c.
10116
10117 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10118
10119 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
10120 (DECL_BIT_INDEX): Use underlying representation.
10121 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
10122
10123 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10124
10125 * expr.c (build_java_ret): Pass proper type to size_binop.
10126
10127 2000-02-25 Anthony Green <green@cygnus.com>
10128
10129 * expr.c (build_class_init): Mark the decl to be ignored by
10130 check_init.
10131 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
10132 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
10133 * class.c (init_test_hash_newfunc): New function.
10134 (decl_hash): New function.
10135 (decl_compare): New function.
10136 * decl.c (emit_init_test_initialization): New function.
10137 (complete_start_java_method): Traverse the init test hashtable,
10138 calling emit_init_test_initialization.
10139 (always_initialize_class_p): Define.
10140 * expr.c (build_class_init): Use initialization tests when
10141 emitting class initialization code.
10142 (always_initialize_class_p): Declare.
10143 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
10144 1.
10145 * java-tree.h: Include hash.h.
10146 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
10147 (struct lang_decl): Add init_test_table field.
10148 (init_test_hash_entry): Define.
10149
10150 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10151
10152 * gjavah.c (main): Avoid using `argi' to report unimplemented
10153 options.
10154
10155 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10156
10157 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
10158 initialize locals to avoid warnings. Local `exception_type' moved
10159 into if statement.
10160
10161 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10162
10163 * parse.y (resolve_expression_name): Use `orig' as a second
10164 argument to resolve_field_access.
10165 (resolve_field_access): Removed unnecessary code when dealing with
10166 static fields.
10167
10168 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10169
10170 * class.c (push_super_field): Don't push the field twice.
10171 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
10172 * parse.h (java_reorder_fields): Prototyped.
10173 * parse.y (java_reorder_fields): New function.
10174 (java_layout_class): Simplified not to worry about re-ordering.
10175
10176 2000-02-23 Tom Tromey <tromey@cygnus.com>
10177
10178 * gjavah.c (print_name): In JNI case, correctly quote string.
10179 (print_method_info): Don't handle overrides in JNI mode.
10180
10181 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10182
10183 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
10184 value type set to `boolean_type_node'.
10185
10186 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
10187
10188 * jcf-dump.c (main): Test for correct condition after
10189 output file creation.
10190
10191 2000-02-19 Anthony Green <green@cygnus.com>
10192
10193 * jcf-depend.c (add_entry): Fix test for first list entry.
10194
10195 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10196
10197 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
10198 * constants.c (build_constants_constructor): Likewise.
10199
10200 2000-02-19 Anthony Green <green@cygnus.com>
10201
10202 * jcf-depend.c (add_entry): Add entries to the end of the list.
10203
10204 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
10205
10206 * decl.c (INT_TYPE_SIZE): Define if necessary.
10207 (expand_java_return): Handle the case of a native integer smaller
10208 than a JVM integer.
10209
10210 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
10211
10212 * gjavah.c (help): Use GCCBUGURL.
10213 * jv-scan.c (help): Likewise.
10214 * jcf-dump.c (help): Likewise.
10215
10216 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10217
10218 * jcf-write.c (generate_bytecode_insns): Don't generate empty
10219 `finally' clauses.
10220
10221 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10222
10223 * jcf-parse.c (load_class): Call `fatal' if no file containing
10224 the target class are found.
10225
10226 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
10227
10228 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
10229 lex.c, lex.h, and PARSE_H to...
10230 (parse.o, parse-scan.o): ...here, respectively.
10231
10232 * lex.c: Split out code that may trigger SIGFPE from yylex()
10233 to its own function.
10234 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
10235
10236 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10237
10238 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
10239
10240 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
10241
10242 * parse.y (outer_field_access_p): Stop in time when outer contexts
10243 are exhausted.
10244 (resolve_qualified_expression_name): Properly qualify *everything*
10245 after a package.type to be resoled as expression names.
10246 (find_applicable_accessible_methods_list): Save/restore `class' to
10247 isolate it from a possible outer context search.
10248
10249 2000-02-15 Tom Tromey <tromey@cygnus.com>
10250
10251 * gjavah.c (jni_print_char): New function.
10252 (print_full_cxx_name): Use it.
10253 (decode_signature_piece): Likewise.
10254 (print_cxx_classname): Likewise.
10255
10256 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10257
10258 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
10259 version.o.
10260 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
10261
10262 * gjavah.c: Include version.h.
10263
10264 * jcf-dump.c: Likewise.
10265
10266 * jv-scan.c: Likewise.
10267
10268 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
10269
10270 * parse.y (outer_field_access_fix): First parameter now a tree
10271 node. Check for assignment to final. First argument to
10272 build_outer_field_access_fix modified to accommodate prototype.
10273 (build_outer_field_access): Don't check for assignment to final
10274 here.
10275 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
10276 possibly returned by outer_field_access_fix. Changed
10277 outer_field_access_fix's first argument.
10278 (check_final_assignment): $finit$'s context is OK.
10279 (patch_unaryop): Use node instead of its line/column value when
10280 calling outer_field_access_fix.
10281
10282 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
10283
10284 * parse.y (interface_declaration:): No longer tagged
10285 <node>. Re-installed default action.
10286 (class_member_declaration:): Handle inner interfaces.
10287 (interface_member_declaration): Handle inner interfaces and
10288 classes.
10289 (create_interface): Push error if one seen. Suspend parsing
10290 context when processing an inner interface.
10291 (register_fields): Inner class static field limitations not to
10292 apply to inner interfaces.
10293
10294 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10295
10296 * jcf-parse.c (load_class): Update `java_error_count' when a
10297 class' file can't be found.
10298 (parse.y): Avoid (byte)code generation when errors seen.
10299
10300 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10301
10302 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
10303 decodes a valid node.
10304 (patch_binop): Handle TRUNC_DIV_EXPR.
10305
10306 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10307
10308 * parse.y (resolve_package): New local `acc'. Try to progressively
10309 build and guess a package and type name.
10310
10311 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10312
10313 * parse.y (find_applicable_accessible_methods_list): Load and
10314 layout the search class if necessary.
10315 (java_complete_tree): Keep to original type of the folded initial
10316 value.
10317
10318 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
10319
10320 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
10321 Generate error message if circularity is detected. New static
10322 local `list'.
10323 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
10324 * jcf-write.c (generate_bytecode_insns): Very simply handle
10325 SAVE_EXPR.
10326 * parse.y (java_check_circular_reference): Use
10327 `cyclic_inheritance_report' during report, if necessary.
10328 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
10329 walking NEW_ARRAY_INIT twice.
10330
10331 2000-02-09 Tom Tromey <tromey@cygnus.com>
10332
10333 * parse.y (check_class_interface_creation): Allow inner classes to
10334 be `private' or `protected', check modifiers' consistency. Prevent
10335 block local classes from bearing any modifiers.
10336
10337 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10338
10339 * except.c (check_start_handlers): Re-add prototype lost in last
10340 patch.
10341 (maybe_start_try): Remove excess argument to `check_start_handlers'.
10342
10343 2000-02-09 Andrew Haley <aph@cygnus.com>
10344
10345 * decl.c (clear_binding_level): Remove excess initializer.
10346 (maybe_poplevels): Remove unused variable.
10347 (force_poplevels): Ditto.
10348 (struct binding_level): Add comment.
10349
10350 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10351
10352 * jcf-write.c (generate_classfile): Don't consider
10353 pre-initialization with reference value (use <clinit> instead.)
10354 * parse.y (java_fix_constructors): No generated constructor for
10355 interfaces.
10356 (build_outer_field_access): Removed debug message.
10357 (outer_field_expanded_access_p): Adapted to bytecode generation.
10358 (build_outer_field_access_method): Use fix_method_argument_names.
10359 (build_outer_method_access_method): Fixed indentation. Added
10360 comment. Handle access method generation for static and also void
10361 methods.
10362 (build_access_to_thisn): Inserted debug message.
10363 (maybe_build_thisn_access_method): Use fix_method_argument_names.
10364 (resolve_qualified_expression_name): Fixed comment.
10365 (not_accessible_p): Adapted to bytecode generation. Added comment.
10366 (patch_method_invocation): Added comment.
10367 (maybe_use_access_method): Fixed leading comment. Handle static
10368 methods.
10369 (java_complete_lhs): Don't shortcut handling of initialized upon
10370 declaration String type static fields when generating bytecode.
10371 (patch_unaryop): Handle outer field access when generating
10372 bytecode.
10373
10374 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
10375
10376 * java-tree.h (FIELD_THISN): New macro.
10377 * jcf-write.c (append_synthetic_attribute): New function.
10378 (generate_classfile): Set "Synthetic" attribute on this$<n>,
10379 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
10380 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
10381 this$<n> fields.
10382 (build_outer_field_access): Turned on access functions usage and
10383 generation when compiling to bytecode.
10384 (maybe_use_access_method): Likewise.
10385
10386 2000-01-25 Andrew Haley <aph@cygnus.com>
10387
10388 * java-except.h (struct eh_range): Add `expanded' field.
10389 (maybe_start_try): Add end_pc arg.
10390 (maybe_end_try): Ditto.
10391 * java-tree.h (force_poplevels): new function.
10392 * expr.c (expand_byte_code): Don't call maybe_start_try or
10393 maybe_end_try.
10394 * except.c (add_handler): Reset expanded.
10395 (expand_start_java_handler): Set expanded.
10396 (check_start_handlers): Don't expand a start handler that's
10397 already been expanded.
10398 (maybe_start_try): Add end_pc arg. Only expand a handler which
10399 ends after end_pc.
10400 (expand_end_java_handler): call force_poplevels.
10401 (force_poplevels): new function.
10402 * decl.c (binding_level): Add start_pc of binding level.
10403 (maybe_pushlevels): Call maybe_start_try when pushing binding
10404 levels.
10405 (maybe_poplevels): Call maybe_end_try when popping binding levels.
10406 (LARGEST_PC): Define.
10407 (clear_binding_level): Use LARGEST_PC.
10408
10409 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
10410 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
10411 (binding_depth, is_class_level, current_pc): new variables.
10412 (struct binding_level): ditto.
10413 (indent): new function.
10414 (push_jvm_slot): add debugging info.
10415 (maybe_pushlevels): ditto.
10416 (maybe_poplevels): ditto.
10417 (pushlevel): ditto.
10418 (poplevel): ditto.
10419 (start_java_method): ditto.
10420 (give_name_to_locals): comment only.
10421 * except.c (binding_depth, is_class_level, current_pc):
10422 new variables.
10423 (expand_start_java_handler): add debugging info.
10424 (expand_end_java_handler): ditto.
10425
10426 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10427
10428 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
10429 (print_name_for_stub_or_jni, process_file): Constify a char*.
10430
10431 2000-02-03 Tom Tromey <tromey@cygnus.com>
10432
10433 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
10434
10435 2000-01-31 Scott Bambrough <scottb@netwinder.org>
10436
10437 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
10438 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
10439 defined to be 1.
10440
10441 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
10442
10443 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
10444 * java-tree.h (TYPE_II_STMT_LIST): New macro.
10445 (struct lang_type): New field `ii_block'.
10446 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
10447 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
10448 * parse.h (struct parser_ctxt): New field `instance_initializers'.
10449 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
10450 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
10451 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
10452 macros.
10453 * parse.y (add_instance_initializer): New function.
10454 (in_instance_initializer): New static global.
10455 (class_body_declaration:): Link instance initializer block.
10456 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
10457 (array_creation_expression:): Remove unused local.
10458 (java_parser_context_push_initialized_field): Fixed leading
10459 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
10460 CPC_INSTANCE_INITIALIZER_LIST.
10461 (java_parser_context_pop_initialized_field): Likewise.
10462 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
10463 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
10464 CPC_INITIALIZER_STMT.
10465 (fix_constructors): New local `class_type'. Use it. Call
10466 add_instance_initializer.
10467 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
10468 (patch_return): Forbid return in instance initializers.
10469 (patch_throw_statement): Enforce exception handling in the context
10470 of instance initializers.
10471
10472 2000-02-03 Tom Tromey <tromey@cygnus.com>
10473
10474 * Make-lang.in (java.mostlyclean): Remove executables in
10475 `mostlyclean'.
10476
10477 2000-01-31 Scott Bambrough <scottb@netwinder.org>
10478
10479 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
10480 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
10481 (java_float_finite): Convert to use union Word from javaop.h.
10482 (java_double_finite): Convert to use union DWord from javaop.h.
10483
10484 2000-02-02 Tom Tromey <tromey@cygnus.com>
10485
10486 * gjavah.c (options): Added `jni' entry.
10487 (help): Document -jni.
10488 (flag_jni): New global.
10489 (process_file): Handle JNI output. Don't print text from
10490 -prepend, -add, etc, when generating stubs. Only remove `.class'
10491 suffix if it actually exists.
10492 (main): Create a `.c' file when run with `--jni --stubs'. Create
10493 correct output file name with `--jni'.
10494 (print_include): Mangle header name differently in JNI case.
10495 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
10496 method list.
10497 (print_method_info): Handle JNI case. Put signature info into
10498 method name. Handle case when STREAM is NULL.
10499 (print_name_for_stub_or_jni): New function.
10500 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
10501 (print_cxx_classname): Handle JNI.
10502 (print_full_cxx_name): Likewise.
10503 (decode_signature_piece): Likewise.
10504 (overloaded_jni_method_exists_p): New function.
10505 (struct method_name): Added `signature' and `sig_length' fields.
10506 (HANDLE_END_FIELD): Do nothing in JNI mode.
10507
10508 2000-02-02 Tom Tromey <tromey@cygnus.com>
10509
10510 * jv-scan.c: Include version.c, <getopt.h>.
10511 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
10512 (options): New array.
10513 (usage): New function.
10514 (version): New function.
10515 (main): Use getopt_long to parse command line.
10516 * jcf-dump.c: Include version.c, <getopt.h>.
10517 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
10518 OPT_JAVAP): New macros.
10519 (options): New array.
10520 (usage): Return `void'. Changed message.
10521 (help): New function.
10522 (version): New function.
10523 (main): Use getopt_long_only to parse command line.
10524 * gjavah.c: Include <getopt.h>.
10525 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
10526 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
10527 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
10528 (options): New array.
10529 (java_no_argument): Removed.
10530 (help): Updated with missing options.
10531 (main): Use getopt_long_only to parse command line.
10532 (usage): Changed message.
10533
10534 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10535
10536 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
10537 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
10538 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
10539 * parse.y (array_creation_expression:): Handle anonymous arrays.
10540 (build_array_from_name): Don't set `ret_name' if null.
10541 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
10542 (qualify_ambiguous_name): Likewise.
10543 (java_complete_expand_class): Likewise.
10544
10545 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10546
10547 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
10548 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
10549 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
10550 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
10551 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
10552 AIPL_FUNCTION_COMPLETED_INVOCATION.
10553 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
10554 AIPL_FUNCTION_INVOCATION_READY.
10555 (AIPL_FUNCTION_DECLARATION): New enum entry.
10556 * parse.y (reorder_static_initialized): New function.
10557 (java_parser_context_pop_initialized_field): Use it.
10558 (add_inner_class_fields): Use
10559 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
10560 augmented. Install marker after last alias initializer, if any.
10561 (generate_finit): Fixed typo. Don't try to retain only the used
10562 fields.
10563 (method_header): Compute and set DECL_FUNCTION_NAP.
10564 (method_declarator): Fixed comment. Insert alias initializer in
10565 parameter list.
10566 (build_alias_initializer_parameter_list): Fixed leading
10567 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
10568 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
10569 (java_complete_expand_class): Code to retain only used aliases
10570 removed.
10571 (java_complete_expand_methods): New local `first_decl'. Generate
10572 $finit$ first, then expand the constructors, regular methods and
10573 <clinit>.
10574 (java_complete_expand_method): Don't report error on missing
10575 return statement if previously detected bogus.
10576 (fix_constructors): Don't patch constructor parameters list.
10577 (patch_method_invocation): Use new AIPL enum values. Reverse
10578 alias initializer list for anonymous classes.
10579
10580 2000-01-30 Anthony Green <green@redhat.com>
10581
10582 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
10583 determine how many stack slots to pop.
10584
10585 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
10586
10587 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
10588 error handling/recovery.
10589 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
10590
10591 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
10592
10593 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
10594 FIELD_LOCAL_ALIAS_USED): New macros.
10595 (DECL_FUNCTION_NAP): New macro.
10596 (struct lang_decl): New field `nap'.
10597 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
10598 (struct lang_type): New fields `finit_stmt_list' and
10599 `clinit_stmt_list'.
10600 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
10601 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
10602 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
10603 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
10604 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
10605 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
10606 (BUILD_THROW): Macro line separator re-indented.
10607 * parse.y (end_class_declaration): New function.
10608 (maybe_generate_pre_expand_clinit): New name for
10609 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
10610 pre-expand static fields.
10611 (maybe_generate_clinit): Function deleted.
10612 (check_for_static_method_reference): Prototype's parameter list
10613 indented.
10614 (generate_finit): New name for maybe_generate_finit. Changed
10615 leading comment. Function rewritten to use
10616 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
10617 (build_alias_initializer_parameter_list): New function.
10618 (java_parser_context_pop_initialized_field): Likewise.
10619 (add_inner_class_fields): Likewise.
10620 (type_declaration:): Call end_class_declaration.
10621 (class_member_declaration:): Likewise.
10622 (formal_parameter_list:): Fixed typos.
10623 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
10624 element. Improved error handling.
10625 (block_statement:): Call end_class_declaration.
10626 (anonymous_class_creation:): Likewise.
10627 (create_anonymous_class): Fixed comments.
10628 (create_class): Call add_inner_class_fields.
10629 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
10630 (method_header): Use MARK_FINAL_PARMS.
10631 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
10632 (method_declarator): Propagate final argument flag.
10633 (craft_constructor): New local `artificial'. Call
10634 build_alias_initializer_parameter_list. Use
10635 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
10636 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
10637 necessary.
10638 (complete_expand_class): Get rid of unused outer context local
10639 alias fields.
10640 (java_complete_expand_methods): Fixed leading
10641 comment. Generate/pre-expand <clinit> first. Changed method
10642 expansion order to regular, $finit$, constructors, <clinit>.
10643 (java_complete_expand_method): Set current_function_decl.
10644 (fix_constructors): Fix constructor parameter list to account for
10645 outer context local alias initializers.
10646 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
10647 (resolve_expression_name): Lookup outer context local aliases. New
10648 local `access', use it.
10649 (patch_method_invocation): Patch inner class ctor invocation with
10650 outer context local aliases initialization values. $finit$
10651 invocation patching now includes things generated with
10652 build_alias_initializer_parameter_list.
10653 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
10654 (build_super_invocation): Likewise.
10655 (patch_assignment): Changed comment.
10656
10657 2000-01-27 Andrew Haley <aph@cygnus.com>
10658
10659 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
10660 (emit_if): Ditto.
10661 (emit_jsr): Ditto.
10662
10663 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10664
10665 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
10666 concatenation.
10667 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
10668
10669 * parse.y (register_fields): Don't pass a format specifier to
10670 OBSOLETE_MODIFIER_WARNING.
10671 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
10672 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
10673 specifier.
10674 (check_modifiers): Change function into a macro.
10675 (check_class_interface_creation): Pass a literal format string.
10676
10677 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10678
10679 * buffer.h: PROTO -> PARAMS.
10680 * check-init.c: Likewise.
10681 * class.c: Likewise.
10682 * constants.c: Likewise.
10683 * convert.h: Likewise.
10684 * decl.c: Likewise.
10685 * except.c: Likewise.
10686 * expr.c: Likewise.
10687 * gjavah.c: Likewise.
10688 * java-except.h: Likewise.
10689 * java-tree.h: Likewise.
10690 * jcf-depend.c: Likewise.
10691 * jcf-dump.c: Likewise.
10692 * jcf-parse.c: Likewise.
10693 * jcf-path.c: Likewise.
10694 * jcf-reader.c: Likewise.
10695 * jcf-write.c: Likewise.
10696 * jcf.h: Likewise.
10697 * jv-scan.c: Likewise.
10698 * jvgenmain.c: Likewise.
10699 * jvspec.c: Likewise.
10700 * lang.c: Likewise.
10701 * lex.c: Likewise.
10702 * lex.h: Likewise.
10703 * parse-scan.y: Likewise.
10704 * parse.h: Likewise.
10705 * parse.y: Likewise.
10706 * typeck.c: Likewise.
10707 * verify.c: Likewise.
10708 * xref.c: Likewise.
10709 * xref.h: Likewise.
10710 * zextract.c: Likewise.
10711 * zipfile.h: Likewise.
10712
10713 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
10714
10715 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
10716 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
10717 * constants.c (build_constant_data_ref): Check for cached
10718 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
10719 in TYPE_CPOOL_DATE_REF.
10720 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
10721 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
10722 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
10723 (LOCAL_FINAL): New macro.
10724 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
10725 constant pool -- don't try to reuse.
10726 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
10727 TYPE_LANG_SPECIFIC.
10728 (find_in_current_zip): Use TYPE_JCF.
10729 * parse.h (java_check_final): Prototype removed.
10730 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
10731 (maybe_create_class_interface_decl,
10732 check_class_interface_creation): Likewise.
10733 (java_expand_finals): Function removed.
10734 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
10735 (block_statement:): Fixed comment.
10736 (anonymous_class_creation:): Likewise.
10737 (check_class_interface_creation): Reversed Jan 12, 2000 extra
10738 argument patch.
10739 (check_class_interface_creation): Loosened error report on (inner)
10740 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
10741 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
10742 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
10743 argument patch.
10744 (create_interface): Likewise.
10745 (anonymous_class_counter): New static global.
10746 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
10747 patch. Fixed comments.
10748 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
10749 anonymous_class_counter when declaring a toplevel class.
10750 (craft_constructor): Fixed constructor name when handling
10751 anonymous classes. Anonymous class constructors to feature hidden
10752 this$<n> parameter.
10753 (java_fix_constructors): Added comment.
10754 (java_check_final): Function removed.
10755 (java_complete_expand_methods): Fixed comment. Don't generate
10756 class data, save its outgoing constant pool instead.
10757 (verify_constructor_super): Skip anonymous class constructor
10758 hidden this$<n> parameter.
10759 (java_expand_classes): New local `saved_ctxp'. Removed call to
10760 java_expand_finals and java_check_final. Expand anonymous class
10761 constructors. Generate class data.
10762 (build_super_invocation): Skip anonymous class hidden this$<n>
10763 parameter.
10764 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
10765 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
10766 (set_java_signature): Likewise.
10767
10768 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
10769
10770 * gjavah.c: Delete ACC_VISIBILITY define.
10771 * jcf.h: Add ACC_VISIBILITY define.
10772 * parse.y: final: rule tagged <value>.
10773 (java_check_regular_methods): Use ACC_VISIBILITY define for
10774 default package access check.
10775 (local_variable_declaration_statement): Use final: rule.
10776
10777 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
10778
10779 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
10780 (final:): New rule.
10781
10782 2000-01-17 Tom Tromey <tromey@cygnus.com>
10783
10784 * gjavah.c (print_field_info): Allow non-static final fields.
10785
10786 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
10787
10788 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
10789 * parse.y (patch_anonymous_class): New function.
10790 (create_anonymous_class): Register incomplete type when the
10791 class/interface to extends/implement isn't known yet.
10792 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
10793 (verify_constructor_super): Tuned error message.
10794
10795 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
10796
10797 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
10798 (ANONYMOUS_CLASS_P): New macro.
10799 (TYPE_SIGNATURE, TYPE_JCF): New macros.
10800 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
10801 * parse.y (create_class): Added leading argument.
10802 (maybe_create_class_interface_decl,
10803 check_class_interface_creation): Likewise.
10804 (craft_constructor): New function.
10805 (verify_constructor_super): Added argument in prototype.
10806 (class_declaration:): Inserted leading argument.
10807 (for_begin:): Use FOR_LOOP_P.
10808 (anonymous_class_creation): Create WFL of the anonymous class to
10809 instantiate. Call build_new_invocation. Added comments.
10810 (check_class_interface_creation): Handle parameter `anonymous' in
10811 verbose mode class creation announce.
10812 (link_nested_class_to_enclosing): Exclude anonymous classes.
10813 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
10814 anonymous class, even though they appear to have an enclosing
10815 context.
10816 (create_interface): Pass extra argument to
10817 check_class_interface_creation.
10818 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
10819 (create_class): Call check_class_interface_creation and
10820 maybe_create_class_interface_decl with extra new argument. Don't
10821 add private this$<n> to anonymous classes.
10822 (method_declarator): Insert hidden this$<n> to anonymous class
10823 constructors.
10824 (java_fix_constructors): Deleted code creating default
10825 constructor. Call craft_constructor instead.
10826 (java_check_regular_methods): Set `saw_constructor' to 1 for
10827 anonymous classes.
10828 (fix_constructors): Pass extra argument to verify_constructor_super.
10829 (verify_constructor_super): New local `sdecl', use it. Search for
10830 matching constructor (possibly featuring arguments) in super
10831 class.
10832 (lookup_method_invoke): Craft constructor according to arguments
10833 list when dealing with anonymous class constructors.
10834 (build_super_invocation): Pass arguments to anonymous class super
10835 constructors.
10836 (search_loop): Use FOR_LOOP_P.
10837 (labeled_block_contains_loop_p): Likewise.
10838
10839 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
10840
10841 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
10842 (enclosing_context_p): New function.
10843 (get_access_flags_from_decl): Handle CLASS_STATIC.
10844 (maybe_layout_super_class): Extra first argument passed to
10845 do_resolve_class.
10846 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
10847 ID_INIT_P.
10848 * decl.c (access0_identifier_node): New global.
10849 (init_decl_processing): access0_identifier_node initialized.
10850 (pushdecl): Set DECL_CONTEXT only on non type decls.
10851 * expr.c (lookup_field): Lookup inner class fields in enclosing
10852 contexts.
10853 (expand_invoke): Use ID_INIT_P.
10854 (expand_java_field_op): Use DECL_CLINIT_P.
10855 * java-tree.def (CLASS_LITERAL): New tree code.
10856 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
10857 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
10858 (struct lang_decl): New field `inner_access'.
10859 (enclosing_context_p): Prototyped.
10860 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
10861 ID_CLINIT_P): New macros.
10862 (CLASS_STATIC): New macro.
10863 (CLASS_ACCESS0_GENERATED_P): New macro.
10864 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
10865 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
10866 INNER_CLASS_P): New macros.
10867 (DECL_INNER_CLASS_LIST): New macro.
10868 * jcf-parse.c (yyparse): Avoid the use of ANSI string
10869 concatenation.
10870 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
10871 the shift value to int. Fixed typo in comment.
10872 * lex.c (inst_id, wpv_id): Initialize.
10873 * mangle.c (unicode_mangling_length): Take `$' into account.
10874 * parse.h (DRECOVER, RECOVER): Terminate properly.
10875 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
10876 (typedef struct _jdep): New field `enclosing'.
10877 (JDEP_ENCLOSING): New macro.
10878 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
10879 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
10880 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
10881 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
10882 GET_ENCLOSING_CPC_CONTEXT): New macros.
10883 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
10884 (do_resolve_class): Added extra argument in prototype.
10885 * parse.y (resolve_class): Added extra argument in prototype.
10886 (maybe_create_class_interface_decl): Likewise.
10887 (maybe_use_access_method, build_wfl_wrap): New functions.
10888 (java_complete_expand_classes, java_complete_expand_class):
10889 Likewise.
10890 (java_parser_context_push_initialized_field,
10891 java_parser_context_suspend, java_parser_context_resume):
10892 Likewise.
10893 (maybe_make_nested_class_name, make_nested_class_name,
10894 set_nested_class_simple_name_value,
10895 link_nested_class_to_enclosing, find_as_inner_class,
10896 find_as_inner_class_do, check_inner_class_redefinition,
10897 build_thisn_assign, build_current_thisn, build_access_to_thisn,
10898 maybe_build_thisn_access_method, build_outer_field_access,
10899 build_outer_field_access_methods, build_outer_field_access_expr,
10900 build_outer_method_access_method, build_new_access_id,
10901 build_outer_field_access_method, outer_field_access_p,
10902 outer_field_expanded_access_p, outer_field_access_fix,
10903 build_incomplete_class_ref, patch_incomplete_class_ref,
10904 create_anonymous_class): Likewise.
10905 (inst_id, wpv_id): New static global variables.
10906 (synchronized:): New rule, tagged <node>.
10907 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
10908 rules.
10909 (anonymous_class_creation:): New rule, tagged <node>.
10910 (NEW_TK): Tagged <node>.
10911 (type_literals, array_type_literal): New rules, tagged <node>.
10912 (class_declaration:): Removed action when reducing by class_body:
10913 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
10914 using GET_CPC in sub-rules.
10915 (class_member_declaration): Handle inner classes.
10916 (method_declaration): When reducing method_header:, reset
10917 current_function_decl when appropriate.
10918 (method_declarator:): Set the number of formal parameter to 0 for
10919 method declared without arguments.
10920 (constructor_declarator:): Likewise.
10921 (static_initializer:): List of elements kept in a list.
10922 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
10923 use of the keyword `static' for type declarations.
10924 (block_statement:): Handle inner class declarations.
10925 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
10926 type qualified `this'.
10927 (class_instance_creation_expression): Use anonymous_class_creation:
10928 to handle inner class instances creation. Handle qualified `new'.
10929 (something_dot_new): Added appropriate actions.
10930 (create_new_parser_context): New function.
10931 (java_push_parser_context, java_parser_context_save_global,
10932 java_parser_context_suspend): Use create_new_parser_context.
10933 (check_modifiers): Changed leading comment.
10934 (check_class_interface_creation): Handle interclasses.
10935 (add_superinterfaces): Fixed comment.
10936 (create_interface): Build qualified name from the raw_name instead
10937 of its matching WFL. Push the initialized fields list. raw_name added
10938 as an extra argument to maybe_create_class_interface_decl.
10939 (create_class): Build qualified name from the raw_name instead of
10940 its matching WFL. Removed assignment to current_parsed_class_un.
10941 Call PUSH_ERROR before returning an error. Suspend the current
10942 parser context when processing an inner class. Push the
10943 initialized fields list. raw_name added as an extra argument to
10944 maybe_create_class_interface_decl. Add the private this$<n>
10945 field.
10946 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
10947 (register_fields): Get the class type from GET_CPC and handle
10948 previous errors. Added code to handle the creation of static
10949 fields in inner classes. Initialized fields initialization
10950 statements kept in a list of lists.
10951 (maybe_generate_finit): Initialized fields initialization
10952 statements kept in a list of lists. Use GET_CPC.
10953 (maybe_generate_clinit): Likewise.
10954 (method_header): Use GET_CPC and GET_CPC_UN.
10955 (parser_qualified_classname): Handle inner classes.
10956 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
10957 (java_fix_constructors): Hide pointer to enclosing context
10958 instance in constructor list when dealing with inner classes.
10959 (jdep_resolve_class): Call resolve_class with extra first argument
10960 JDEP_ENCLOSING.
10961 (resolve_class): Add enclosing context as a first extra argument
10962 to do_resolve_class.
10963 (do_resolve_class): Call find_as_inner_class. Handle WFLs
10964 properly.
10965 (resolve_no_layout): Extra argument added to resolve_class
10966 invocation.
10967 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
10968 (java_get_real_method_name): Use GET_CPC_UN.
10969 (check_abstract_method_definitions): Use DECL_CLINIT_P.
10970 (java_check_abstract_methods): Handle static method declared in
10971 inner classes by an error.
10972 (java_check_regular_methods): Use DECL_CLINIT_P.
10973 (source_start_java_method): Also set DECL_MAX_LOCALS.
10974 (create_artificial_method): Call java_parser_context_save_global
10975 and java_parser_context_restore_global instead of saving/restoring
10976 the context by hand.
10977 (expand_start_java_method): Improved verbose mode message.
10978 (java_complete_expand_methods): Fixed leading comment. Use
10979 DECL_CLINIT_P.
10980 (fix_constructors): Added assignment to this$<n> if necessary.
10981 (java_expand_classes): Call java_complete_expand_classes instead
10982 of java_complete_expand_methods.
10983 (make_qualified_primary): Simplified.
10984 (merge_qualified_name): Optimized for missing left or right parts.
10985 (resolve_expression_name): Handle access to outer class fields from
10986 interclasses.
10987 (resolve_qualified_expression_name): New macro
10988 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
10989 classes. Report error on non appropriate qualification of
10990 `new'. Handle qualified `this'.
10991 (not_accessible_p): Allow access to outer class private fields from
10992 inner classes.
10993 (patch_method_invocation): Handle method invocations through
10994 access methods and inner class constructor invocations.
10995 (find_applicable_accessible_methods_list): Search enclosing
10996 contexts of an inner class.
10997 (search_applicable_methods_list): Fixed typo.
10998 (argument_types_convertible): Handle inner class constructors'
10999 hidden outer context reference argument.
11000 (qualify_ambiguous_name): Handle qualified `this'.
11001 (java_complete_lhs): Handle use of field accessed through
11002 artificial access methods in various cases of assignments. Handle
11003 CLASS_LITERAL node.
11004 (check_final_assignment): Use DECL_CLINIT_P.
11005 (valid_ref_assignconv_cast_p): Handle the destination being an
11006 enclosing context of the source.
11007 (patch_unaryop): Handle use of field accessed through artificial
11008 access methods.
11009 (patch_return): Use DECL_CLINIT_P.
11010 (patch_throw_statement): Use DECL_CLINIT_P.
11011 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
11012 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
11013 ID_INIT_P.
11014
11015 2000-01-16 Anthony Green <green@cygnus.com>
11016
11017 * parse.y (build_string_concatenation): Only use
11018 StringBuffer(String) shortcut if String arg is constant.
11019
11020 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11021
11022 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
11023 the shift value to int. Fixed typo in comment.
11024
11025 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
11026
11027 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
11028 * jcf-write.c: Likewise.
11029 * parse.y: Likewise.
11030 * parse.c: Regenerate.
11031
11032 2000-01-09 Anthony Green <green@cygnus.com>
11033
11034 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
11035 bytecodes in the correct order.
11036
11037 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11038
11039 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
11040
11041 2000-01-06 Anthony Green <green@cygnus.com>
11042
11043 * expr.c (java_lang_expand_expr): Switch to permanent obstack
11044 before building constant array decl.
11045
11046 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11047
11048 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
11049 method invocation and typo in conditional expression.
11050 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
11051 the appropriate NOTE_POP.
11052 * parse.y (patch_binop): Shift value mask to feature the right
11053 type.
11054
11055 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11056
11057 * class.c (assume_compiled, assume_compiled_node): Add static
11058 prototype.
11059 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
11060
11061 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
11062
11063 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
11064
11065 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
11066 to `__modifier' to avoid stringifying it.
11067
11068 * parse.y (verify_constructor_circularity): Don't call a variadic
11069 function with a non-literal format string.
11070 (java_check_abstract_methods): Move unreachable code inside
11071 `continue' statement.
11072 (lookup_method_invoke): Call xstrdup, not strdup.
11073
11074 * expr.c (expand_java_field_op): Avoid the use of ANSI string
11075 concatenation.
11076
11077 * jcf-parse.c (yyparse): Likewise.
11078
11079 * jv-scan.c (main): Likewise.
11080
11081 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11082
11083 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
11084 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
11085 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
11086 concatenation.
11087
11088 * parse.y (synchronized, variable_redefinition_error,
11089 check_class_interface_creation, create_interface, create_class,
11090 method_header, finish_method_declaration,
11091 check_modifiers_consistency, method_declarator,
11092 complete_class_report_errors, check_abstract_method_definitions,
11093 java_check_regular_methods, check_throws_clauses,
11094 java_check_abstract_methods, read_import_dir,
11095 check_pkg_class_access, declare_local_variables, fix_constructors,
11096 cut_identifier_in_qualified, resolve_expression_name,
11097 resolve_qualified_expression_name, patch_method_invocation,
11098 java_complete_lhs, patch_assignment, try_builtin_assignconv,
11099 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
11100 patch_exit_expr, patch_exit_expr, patch_switch_statement,
11101 patch_try_statement, patch_synchronized_statement,
11102 patch_throw_statement, check_thrown_exceptions,
11103 patch_conditional_expr): Likewise.
11104
11105 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11106
11107 * Makefile.in (LIBDEPS): Added gcc's errors.o
11108 (../jcf-dump$(exeext):): Link with gcc's errors.o
11109 (../gcjh$(exeext):): Likewise.
11110 * expr.c (expand_java_NEW): Layout the entire target type instead of
11111 laying out its methods only.
11112 (lookup_field): Layout the class after having loaded it.
11113 * java-tree.h (java_debug_context): Declared.
11114 * jcf-io.c (toplev.h): Included.
11115 (find_class): Removed assignment to jcf's outofsynch
11116 field. Force source file to be read if newer than its matching
11117 class file. Tweaked debug messages.
11118 * jcf-parse.c (jcf_out_of_synch): Deleted.
11119 (read_class): Call to jcf_out_of_synch removed.
11120 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
11121 (jcf_out_of_synch): Prototype deleted.
11122 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
11123 `deprecated' and `class_err': integer turned into bit-fields.
11124 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
11125 * parse.y (package_list): New global.
11126 (package_declaration:): Record newly parsed package name.
11127 (extra_ctxp_pushed_p): Static global deleted.
11128 (java_parser_context_save_global): Create buffer context for the
11129 purpose of saving globals, if necessary.
11130 (java_parser_context_restore_global): Pop context pushed for the
11131 purpose of saving globals, if necessary.
11132 (java_debug_context_do): New prototype and function.
11133 (java_debug_context): Likewise.
11134 (do_resolve_class): Use already parsed package names to qualify
11135 and lookup class candidate.
11136 (java_pre_expand_clinit): Removed unnecessary local variable.
11137
11138 1999-12-17 Tom Tromey <tromey@cygnus.com>
11139
11140 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
11141 fixes PR gcj/119.
11142 (process_file): Use `\n\' at end of each line in string.
11143
11144 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
11145
11146 * expr.c (expand_invoke): Layout the loaded class before
11147 attempting to use it.
11148 (expand_java_field_op): Allow final field assignments to take
11149 place in $finit$.
11150 * typeck.c (convert): Return error_mark_node if expr is null.
11151
11152 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11153
11154 * class.c (class_depth): Return -1 if the class doesn't load
11155 properly.
11156 * expr.c (can_widen_reference_to): Check for errors during depth
11157 computation and return 0 accordingly.
11158 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
11159 create default constructors and add an other error check.
11160 * parse.h (java_fix_constructors): Prototyped.
11161 * parse.y (java_pre_expand_clinit): Likewise.
11162 (build_super_invocation): Re-prototyped to feature one argument.
11163 (java_check_circular_reference): Directly use `current'.
11164 (java_fix_constructors): New function.
11165 (java_check_regular_methods): Don't create default constructors
11166 here, but abort if none were found.
11167 (java_complete_expand_methods): Pre-process <clinit> calling
11168 java_pre_expand_clinit.
11169 (java_pre_expand_clinit): New function.
11170 (fix_constructors): build_super_invocation invoked with the
11171 current method declaration as an argument.
11172 (build_super_invocation): Use the context of the processed method
11173 decl argument instead of current_class.
11174 * typeck.c (lookup_java_method): Take WFLs in method names into
11175 account.
11176
11177 1999-12-14 Per Bothner <per@bothner.com>
11178
11179 * class.c (make_class_data): flag_keep_inline_functions to keep
11180 private methods in the method array.
11181
11182 1999-12-15 Anthony Green <green@cygnus.com>
11183
11184 * check-init.c (check_init): Take into account both types of
11185 `throw's when checking for uninitialized variables.
11186
11187 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11188
11189 * parse.y (java_complete_lhs): Force conversion of array
11190 dimensions to int_type_node, that's what runtime's ABI expects.
11191
11192 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11193
11194 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
11195 operand of a WFL, until the Java front-end gets fixed with regard
11196 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
11197
11198 1999-12-10 Andrew Haley <aph@cygnus.com>
11199
11200 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
11201 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
11202 expr.c (build_java_athrow): Add support for sjlj-exceptions.
11203 java-tree.h: Ditto.
11204 jcf-write.c: Ditto.
11205
11206 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11207
11208 * expr.c (java_lang_expand_expr): Switch to permanent obstack
11209 before calling expand_eh_region_start and expand_start_all_catch.
11210 * except.c (expand_start_java_handler): Switch to permanent
11211 obstack before calling expand_eh_region_start.
11212 (expand_end_java_handler): Switch to permanent obstack before
11213 calling expand_start_all_catch.
11214
11215 1999-12-5 Anthony Green <green@cygnus.com>
11216
11217 * decl.c (init_decl_processing): Mark throw_node as a noreturn
11218 function with side effects.
11219 (init_decl_processing): Mark all memory allocating DECLs with
11220 DECL_IS_MALLOC.
11221
11222 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11223
11224 * except.c (expand_end_java_handler): Call
11225 expand_resume_after_catch and end_catch_handler.
11226
11227 1999-11-30 Anthony Green <green@cygnus.com>
11228
11229 * verify.c (verify_jvm_instructions): Create new return label
11230 chain if non existent (don't rely on the verified state of the jsr
11231 target.)
11232
11233 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11234
11235 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
11236 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
11237
11238 * parse.y (patch_assignment): Removed bogus final class test on
11239 lhs when checking on whether to emit an ArrayStoreException runtime
11240 check.
11241 * expr.c (expand_java_arraystore): Likewise.
11242
11243 1999-11-28 Anthony Green <green@cygnus.com>
11244
11245 * decl.c (find_local_variable): Reuse single slot decls when
11246 appropriate.
11247
11248 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11249
11250 * jcf-parse.c (saw_java_source): Global variable removed.
11251 (read_class): Don't use `saw_java_source'. Added extra braces.
11252 (yyparse): Code setting `saw_java_source' removed.
11253
11254 1999-11-24 Mark Mitchell <mark@codesourcery.com>
11255
11256 * except.c (emit_handlers): Zero catch_clauses after emitting them.
11257
11258 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11259
11260 * verify.c (merge_type_state): Non verified subroutines being
11261 considered more than once to trigger passive type merge.
11262
11263 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11264
11265 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
11266 in case of error. Error message tuned.
11267
11268 1999-11-21 Anthony Green <green@cygnus.com>
11269
11270 * constants.c (find_methodref_index): Unwrap method names before
11271 inserting them in the constant pool.
11272
11273 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
11274
11275 * class.c (assume_compiled_node): New typedef.
11276 (assume_compiled_tree): New static data.
11277 (find_assume_compiled_node): New function.
11278 (add_assume_compiled): New function.
11279 (assume_compiled): New function.
11280 * class.c (make_class_data): Use assume_compiled.
11281 (is_compiled_class): Use assume_compiled.
11282
11283 * java-tree.h (add_assume_compiled): Declare.
11284
11285 * lang.c (lang_decode_option): Parse new options.
11286
11287 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11288
11289 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
11290 int_type_node: that's what `_Jv_AllocObject' expects.
11291
11292 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11293
11294 * parse.y (lookup_method_invoke): Use lang_printable_name to
11295 reliably build the type name during error report. Fixes PR gcj/97.
11296
11297 1999-11-09 Tom Tromey <tromey@cygnus.com>
11298
11299 * jcf-path.c: Include <sys/stat.h>.
11300 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
11301 (DIR_UP): New macro.
11302
11303 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11304
11305 * parse.y (source_end_java_method): Resume permanent allocation,
11306 reversing Apr 27 1998 patch.
11307 (patch_string_cst): Pop obstacks after having pushed the permanent
11308 ones.
11309
11310 1999-11-05 Tom Tromey <tromey@cygnus.com>
11311
11312 * class.c (finish_class): Emit inlined methods if any native
11313 methods exist in the class. Fixes PR gcj/85.
11314
11315 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
11316
11317 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
11318 (qualify_ambiguous_name): Likewise.
11319
11320 1999-11-03 Godmar Back <gback@cs.utah.edu>
11321
11322 * typeck.c: (lookup_java_method): search all inherited
11323 interfaces when looking up interface method.
11324
11325 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11326
11327 * parse.y (method_header:): Issue error message for rule `type
11328 error'.
11329 (synchronized:): Error report when not using synchronized.
11330
11331 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11332
11333 * parse.y (resolve_qualified_expression_name): Prevent `this' from
11334 being used before the superclass constructor has been called.
11335 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
11336 instead of `CALL_THIS_CONSTRUCTOR_P'.
11337
11338 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
11339
11340 * check-init.c: Fix typo in comment.
11341
11342 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11343
11344 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
11345 and final method.
11346
11347 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11348
11349 * parse.y (expression_statement:): Call function to report
11350 improper invocation of a constructor.
11351 (parse_ctor_invocation_error): New function.
11352
11353 1999-10-26 Mark Mitchell <mark@codesourcery.com>
11354
11355 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
11356 remember_end_note.
11357
11358 1999-10-21 Tom Tromey <tromey@cygnus.com>
11359
11360 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
11361 in generated `main'.
11362
11363 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
11364
11365 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
11366 (qualify_ambiguous_name): Likewise.
11367
11368 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
11369
11370 * parse.y (java_complete_tree): fold_constant_for_init to work on
11371 permanent_obstack.
11372 (java_complete_lhs): Likewise.
11373 (array_constructor_check_entry): Complete an initializer element
11374 on permanent_obstack.
11375
11376 1999-10-19 Tom Tromey <tromey@cygnus.com>
11377
11378 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
11379 From Mike Moreton <mike@pillim.demon.co.uk>.
11380
11381 1999-10-15 Greg McGary <gkm@gnu.org>
11382
11383 * java-tree.h (flag_bounds_check): Remove extern decl.
11384 * lang.c (flag_bounds_check): Remove global variable.
11385 (lang_f_options): Remove "bounds-check" entry.
11386 (lang_init_options): Default flag_bounds_check to "on".
11387
11388 1999-10-14 Tom Tromey <tromey@cygnus.com>
11389
11390 * jvgenmain.c (usage): New function.
11391 (main): Use it. Also, handle `-D' options.
11392 * jvspec.c (lang_specific_driver): Recognize -D.
11393 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
11394
11395 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
11396
11397 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11398
11399 * jcf-dump.c (print_constant, disassemble_method): Don't call a
11400 variadic function with a non-literal format string.
11401
11402 * parse-scan.y (report_main_declaration): Likewise.
11403
11404 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
11405
11406 * parse.y (read_import_dir, patch_assignment, patch_binop,
11407 patch_array_ref): Likewise.
11408
11409 * typeck.c (build_java_array_type): Likewise.
11410
11411 * verify.c (verify_jvm_instructions): Likewise.
11412
11413 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11414
11415 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
11416
11417 1999-10-07 Anthony Green <green@cygnus.com>
11418
11419 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
11420 where CHECK_PUT may fail for valid reasons.
11421
11422 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
11423 UNSAFE_PUTN): New macros.
11424
11425 1999-10-04 Tom Tromey <tromey@cygnus.com>
11426
11427 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
11428 well. Fixes Java PR gcj/59.
11429 * parse-scan.y (yyerror): Report errors.
11430
11431 1999-09-24 Glenn Chambers <GChambers@provsol.com>
11432
11433 * decl.c (insert_block): Remove unconditional `abort'.
11434
11435 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
11436
11437 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
11438 FUNCTION_CODE now of type int. All callers changed.
11439 Set the builtin's DECL_BUILT_IN_CLASS.
11440
11441 1999-09-23 Tom Tromey <tromey@cygnus.com>
11442
11443 * jvspec.c (lang_specific_driver): Don't read spec file if
11444 -fsyntax-only given.
11445
11446 1999-09-22 Tom Tromey <tromey@cygnus.com>
11447
11448 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
11449
11450 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
11451 (WORDS_TO_LONG): Likewise.
11452 (WORDS_TO_DOUBLE): Likewise.
11453
11454 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11455
11456 * jcf-write.c (RELOCATION_VALUE_0): New macro.
11457 (RELOCATION_VALUE_1): Likewise.
11458 (emit_iinc, emit_reloc, push_constant1, push_constant2,
11459 push_in_const, push_long_const): Prototyped.
11460 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
11461 (push_constant2): Likewise.
11462 (push_int_const): Cast find_constant1's integer arguments to `jword'.
11463 (find_constant_wide): Cast find_constant2's integer arguments to
11464 `jword'.
11465 (find_constant_index): Cast find_constant2's and find_constant2's
11466 integer arguments to `jword'.
11467 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
11468 (emit_switch_reloc): Use RELOCATION_VALUE_0.
11469 (emit_if): Use RELOCATION_VALUE_1.
11470 (emit_goto): Likewise.
11471 (emit_jsr): Likewise.
11472 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
11473 argument to push_long_const to HOST_WIDE_INT.
11474
11475 1999-09-15 Andreas Schwab <schwab@suse.de>
11476
11477 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
11478
11479 1999-09-20 Nick Clifton <nickc@cygnus.com>
11480
11481 * lang.c (lang_decode_option): Extend comment.
11482
11483 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
11484
11485 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
11486 instead of fndecl.
11487
11488 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11489
11490 * gjavah.c (get_field_name, print_method_info, print_include,
11491 add_namelet): Use xmalloc, not malloc.
11492
11493 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
11494 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
11495 NULL pointer.
11496
11497 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
11498
11499 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
11500
11501 * jcf-path.c (add_entry): Likewise.
11502
11503 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
11504
11505 * jv-scan.c (xmalloc): Remove definition.
11506
11507 * jvgenmain.c (xmalloc): Likewise.
11508
11509 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
11510
11511 * lex.c (java_store_unicode): Use xrealloc, not realloc.
11512
11513 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
11514 concat, not xmalloc/sprintf.
11515 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
11516 (xstrdup): Remove definition.
11517
11518 * parse.y (duplicate_declaration_error_p,
11519 constructor_circularity_msg, verify_constructor_circularity,
11520 check_abstract_method_definitions, java_check_regular_methods,
11521 java_check_abstract_methods, patch_method_invocation,
11522 check_for_static_method_reference, patch_assignment, patch_binop,
11523 patch_cast, array_constructor_check_entry, patch_return,
11524 patch_conditional_expr): Use xstrdup, not strdup.
11525
11526 * zextract.c (ALLOC): Use xmalloc, not malloc.
11527
11528 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11529
11530 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
11531
11532 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
11533 (do_spec, lang_specific_pre_link, lang_specific_driver,
11534 input_filename, input_filename_length): Don't declare.
11535 (main_class_name, jvgenmain_spec, lang_specific_driver):
11536 Constify a char*.
11537 (lang_specific_driver): All calls to the function pointer
11538 parameter now explicitly call `fatal'.
11539
11540 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11541
11542 * parse.y (find_applicable_accessible_methods_list): Search
11543 abstract classes as interfaces.
11544
11545 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11546
11547 * class.c (finish_class): We're now outside a valid method
11548 declaration. Tell the rest of gcc so.
11549
11550 1999-09-08 Bruce Korb autogen@linuxbox.com
11551
11552 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
11553
11554 1999-09-07 Tom Tromey <tromey@cygnus.com>
11555
11556 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
11557 java-array.h.
11558 (decode_signature_piece): Don't emit "::" in JArray<>.
11559 (print_namelet): Only print trailing `;' when printing a class.
11560
11561 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
11562
11563 * java-tree.h: Delete declarations for all tree nodes now moved to
11564 global_trees.
11565 * decl.c: Delete their definitions.
11566
11567 1999-09-04 Mark Mitchell <mark@codesourcery.com>
11568
11569 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
11570 * Makefile.in (OBJS): Add ggc-callbacks.o.
11571 (OBJDEPS): Likewise.
11572
11573 1999-09-03 Tom Tromey <tromey@cygnus.com>
11574
11575 * parse.y (strip_out_static_field_access_decl): Return operand if
11576 it satisfies JDECL_P.
11577
11578 1999-09-02 Tom Tromey <tromey@cygnus.com>
11579
11580 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
11581 Handle nested arrays, like `[[I'.
11582
11583 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11584
11585 * class.c (finish_class): Remove unused parameter, all callers
11586 changed.
11587
11588 * expr.c (build_java_athrow): Change return type to void.
11589 (java_lang_expand_expr): Make sure each case in switch returns a
11590 value.
11591
11592 * java-tree.h (finish_class): Fix prototype to take void args.
11593
11594 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
11595 (main): Issue return from main, not exit.
11596
11597 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
11598
11599 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
11600
11601 * jv-scan.c (main): Issue return from main, not exit.
11602
11603 * parse.y (check_abstract_method_definitions,
11604 java_check_abstract_method_definitions): Add static prototypes.
11605 (java_complete_expand_methods): Fix call to `finish_class'.
11606
11607 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
11608 and `prevpc'.
11609
11610 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11611
11612 * lang.c (language_string): Constify.
11613
11614 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11615
11616 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
11617 Remove hacks for stuff which comes from libiberty.
11618
11619 * Make-lang.in: Likewise.
11620
11621 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
11622
11623 * Makefile.in (xref.o): Depend on xref.c explicitly.
11624
11625 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11626
11627 * java-tree.h (lang_printable_name): Constify a char*.
11628
11629 * lang.c (lang_printable_name): Likewise.
11630
11631 1999-08-27 Jeffrey A Law (law@cygnus.com)
11632
11633 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
11634 comments in C code.
11635
11636 1999-08-26 Tom Tromey <tromey@cygnus.com>
11637
11638 * gjavah.c (print_cxx_classname): Print "::" before qualified
11639 name.
11640
11641 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
11642
11643 * parse.y (lookup_cl): Changed leading comment. Now does its best
11644 to set the column number.
11645 (qualify_ambiguous_name): Take WFL wrappers into account.
11646
11647 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
11648
11649 * verify.c (verify_jvm_instructions): Don't check instruction
11650 validity beyond end of method.
11651
11652 1999-08-25 Tom Tromey <tromey@cygnus.com>
11653
11654 * jvspec.c (lang_specific_driver): Correctly handle --help again.
11655
11656 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11657
11658 * gjavah.c (print_name, print_base_classname, utf8_cmp,
11659 cxx_keyword_subst, generate_access, name_is_method_p,
11660 get_field_name, print_field_name, super_class_name, print_include,
11661 decode_signature_piece, print_class_decls, usage, help,
11662 java_no_argument, version, add_namelet, print_namelet): Add static
11663 prototype.
11664 (print_base_classname, utf8_cmp, cxx_keyword_subst,
11665 name_is_method_p): Constify a char*.
11666 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
11667 Provide a final else clause in an if-else-if.
11668 (print_field_info): Add missing final arg in function call to
11669 `print_field_name'.
11670 (print_method_info, decompile_method, decode_signature_piece,
11671 print_c_decl, print_full_cxx_name, print_stub,
11672 print_mangled_classname, super_class_name, print_include,
11673 add_namelet, add_class_decl, print_class_decls, process_file,
11674 help): Constify a char*.
11675
11676 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
11677 push_int_const, find_constant_wide, find_constant_index,
11678 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
11679 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
11680 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
11681 emit_if, emit_goto, emit_jsr, call_cleanups,
11682 make_class_file_name): Add static prototypes.
11683 (generate_bytecode_return, generate_bytecode_insns): Pass a
11684 NULL_PTR, not a NULL_TREE.
11685
11686 * jv-scan.c: Include "jcf.h".
11687 (main): Declare using DEFUN macro.
11688
11689 * jvspec.c (find_spec_file, lang_specific_pre_link,
11690 lang_specific_driver): Add prototypes.
11691 (find_spec_file): Constify a char*.
11692
11693 * keyword.gperf (hash, java_keyword): Add prototypes.
11694
11695 * lang.c (lang_print_error): Add static prototype.
11696 (lang_init): Prefer memcpy over bcopy to avoid casts.
11697
11698 * lex.c (yylex): Add static prototype.
11699
11700 * parse-scan.y: Include "lex.c" earlier.
11701
11702 * parse.h: Remove redundant declaration for `yylex'.
11703
11704 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
11705 labeled_block_contains_loop_p): Add static prototypes.
11706 (not_accessible_p): Make static to match prototype.
11707
11708 * verify.c (start_pc_cmp): Don't needlessly cast away const.
11709
11710 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11711
11712 * parse.y (check_method_redefinition): Changed leading comment.
11713 (check_abstract_method_definitions): New function.
11714 (java_check_abstract_method_definitions): New function.
11715 (java_check_regular_methods): Call it.
11716 (verify_constructor_super): Fixed indentation.
11717 (lookup_method_invoke): Likewise.
11718
11719 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11720
11721 * parse.y (method_header): Return a null pointer if the current
11722 class node is null.
11723 (finish_method_declaration): Return if the current function decl
11724 is null.
11725 (source_start_java_method): Likewise.
11726 (java_method_add_stmt): Likewise.
11727
11728 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
11729
11730 * class.c (emit_register_class): Removed unnecessary call to
11731 start_sequence.
11732 * parse.y (labeled_block_contains_loop_p): Removed unused local
11733 variable.
11734
11735 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11736
11737 * parse.y (java_refold): Added prototype.
11738
11739 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11740
11741 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
11742 (java_stabilize_reference): Removed unnecessary `else'.
11743 (java_complete_lhs): Set flag to remember boolean. Call
11744 java_refold. Added comments.
11745 (java_decl_equiv): New function.
11746 (binop_compound_p): Likewise.
11747 (java_refold): Likewise.
11748 (patch_unaryop): Striped static field access assigned to decl and
11749 op. Changed promotion scheme for ++/-- operators.
11750 (search_loop): New function.
11751 (labeled_block_contains_loop_p): Likewise.
11752 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
11753 comment.
11754 (patch_bc_statement): Call search_loop. Fixed comment.
11755
11756 1999-08-14 Anthony Green <green@cygnus.com>
11757
11758 * expr.c (java_lang_expand_expr): Mark static array data as
11759 referenced.
11760
11761 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
11762
11763 * jvgenmain.c (main): NUL-terminate name_obstack.
11764
11765 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11766
11767 * check-init.c (check_bool2_init, done_alternative): Add static
11768 prototypes.
11769
11770 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
11771 (add_method, build_utf8_ref, build_class_ref,
11772 append_gpp_mangled_type, layout_class_method): Constify a char*.
11773
11774 * decl.c (push_promoted_type, make_binding_level): Add static
11775 prototypes.
11776 (push_promoted_type, pushdecl): Constify a char*.
11777
11778 * except.c (find_handler_in_range, link_handler,
11779 check_start_handlers): Add static prototypes.
11780
11781 * expr.c (process_jvm_instruction): Constify a char*.
11782
11783 * gjavah.c (main): Constify a char*.
11784
11785 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
11786 Constify a char*.
11787
11788 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
11789 static prototypes.
11790 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
11791 munge, print_ents): Constify a char*.
11792
11793 * jcf-dump.c (disassemble_method): Constify a char*.
11794 (print_constant_pool, print_exception_table): Add static prototypes.
11795 (print_constant, print_exception_table, main, disassemble_method):
11796 Constify a char*.
11797
11798 * jcf-io.c (find_classfile, find_class): Likewise.
11799
11800 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
11801 (set_source_filename, predefined_filename_p): Add static prototypes.
11802 (set_source_filename, get_constant, get_class_constant,
11803 find_in_current_zip): Constify a char*.
11804
11805 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
11806 static prototypes.
11807 (add_entry, add_path, jcf_path_classpath_arg,
11808 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
11809
11810 * jcf-reader.c (get_attribute, jcf_parse_preamble,
11811 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
11812 jcf_parse_one_method, jcf_parse_methods,
11813 jcf_parse_final_attributes): Add static prototypes.
11814 (get_attribute): Constify a char*.
11815
11816 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
11817 jcf_dependency_add_target, jcf_path_classpath_arg,
11818 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
11819
11820 * jv-scan.c (main): Constify a char*.
11821 (gcc_obstack_init): Add prototype arguments.
11822
11823 * jvgenmain.c (gcc_obstack_init): Likewise.
11824 (main): Constify a char*.
11825
11826 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
11827 static prototypes.
11828 (put_decl_string, lang_print_error): Constify a char*.
11829 (lang_init): Remove redundant extern prototype.
11830
11831 * mangle.c (emit_unicode_mangled_name): Constify a char*.
11832
11833 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
11834 Add static prototypes.
11835 (get_type_from_signature): Constify a char*.
11836
11837 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
11838 Add static prototypes.
11839 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
11840 (verify_jvm_instructions): Constify a char*.
11841
11842 * xref.c (xref_flag_value): Likewise.
11843
11844 * xref.h (xref_flag_value): Likewise.
11845
11846 * zextract.c (makeword, makelong): Add static prototypes.
11847 (makeword, makelong): Constify a uch*.
11848
11849 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11850
11851 * lang.c (java_dummy_print): Constify a char*.
11852 (lang_print_error): Likewise.
11853 (lang_init): Remove redundant prototype for `print_error_function'.
11854 (lang_init_source): Likewise.
11855 (lang_identify): Constify a char*.
11856
11857 1999-08-09 Tom Tromey <tromey@cygnus.com>
11858
11859 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
11860 (WORDS_TO_LONG): Likewise.
11861 (WORDS_TO_DOUBLE): Likewise.
11862
11863 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11864
11865 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
11866
11867 * expr.c (java_stack_pop, java_array_data_offset,
11868 build_java_throw_out_of_bounds_exception, case_identity,
11869 build_java_check_indexed_type): Add static prototypes.
11870 (linenumber_table, expand_invoke, expand_java_field_op,
11871 build_primtype_type_ref, expand_byte_code): Constify a char*.
11872
11873 * java-tree.h (build_primtype_type_ref, linenumber_table):
11874 Constify a char*.
11875 (java_lang_expand_expr): Add prototype.
11876
11877 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
11878 `java_lang_expand_expr'.
11879
11880 * lex.c (java_lex_error): Constify a char*.
11881 (java_get_unicode, java_read_char, java_allocate_new_line,
11882 java_unget_unicode, java_sneak_unicode): Prototype.
11883
11884 * parse-scan.y (current_class, package_name, method_declarator,
11885 report_class_declaration, yyerror): Constify a char*.
11886
11887 * parse.h (java_report_errors): Prototype.
11888 (yyerror): Constify a char*.
11889
11890 * parse.y (classitf_redefinition_error, check_modifiers,
11891 parse_jdk1_1_error, lookup_package_type,
11892 lookup_package_type_and_set_next, get_printable_method_name,
11893 purify_type_name): Constify a char*.
11894 (build_super_invocation, maybe_generate_finit,
11895 verify_constructor_super, parser_add_interface,
11896 add_superinterfaces, jdep_resolve_class, note_possible_classname,
11897 java_complete_expand_methods, java_expand_finals,
11898 cut_identifier_in_qualified, java_stabilize_reference,
11899 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
11900 merge_string_cste): Prototype.
11901 (single_type_import_declaration, yyerror,
11902 variable_redefinition_error, build_array_from_name,
11903 build_unresolved_array_type, check_class_interface_creation,
11904 resolve_class, complete_class_report_errors,
11905 note_possible_classname, read_import_dir,
11906 find_in_imports_on_demand, resolve_package, fix_constructors,
11907 check_deprecation, lookup_method_invoke,
11908 maybe_build_primttype_type_ref, array_constructor_check_entry):
11909 Constify a char*.
11910 (java_complete_expand_methods, java_expand_finals): Make static.
11911 (convert_narrow): Remove static prototype.
11912
11913 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
11914
11915 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
11916
11917 1999-08-02 Richard Henderson <rth@cygnus.com>
11918
11919 * decl.c: Include defaults.h instead of expr.h.
11920 * parse.y: Likewise.
11921
11922 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
11923
11924 * java/decl.c (start_java_method): Change all uses of
11925 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
11926 Ensure expr.h is included.
11927 * java/expr.c (pop_arguments): Ditto.
11928 * java/parse.y (expand_start_java_method): Ditto.
11929
11930 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11931
11932 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
11933
11934 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
11935
11936 * decl.c: Include "function.h".
11937 * except.c: Likewise.
11938 * parse.y: Likewise.
11939 * Makefile.in: Update dependencies.
11940
11941 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11942
11943 * expr.c (build_java_soft_divmod): Provide a default case in switch.
11944 (java_lang_expand_expr): Mark parameters `target', `tmode' and
11945 `modifier' with ATTRIBUTE_UNUSED.
11946
11947 * gjavah.c (process_file): Add braces around ambiguous `else'.
11948
11949 * jcf-dump.c (print_access_flags, localvar_free): Change return
11950 type to void.
11951
11952 * parse.y (java_complete_expand_method): Initialize variable
11953 `exception_copy'.
11954 (resolve_qualified_expression_name): Likewise for `field_decl'.
11955 (patch_method_invocation): Likewise for `class_to_search'.
11956 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
11957 (patch_assignment): Likewise for `lhs_type'.
11958
11959 * verify.c (verify_jvm_instructions): Remove unused variable
11960 `caller'.
11961
11962 1999-07-25 Richard Henderson <rth@cygnus.com>
11963
11964 * decl.c (va_list_type_node): New.
11965
11966 1999-07-25 Anthony Green <green@cygnus.com>
11967
11968 * gjavah.c (print_stub): New function.
11969 (METHOD_IS_NATIVE): New macro.
11970 (print_mangled_classname): Make static.
11971 (HANDLE_END_FIELD): Don't emit fields during stub generation.
11972 (process_file): Perform stub generation.
11973 (HANDLE_METHOD): Don't emit class decls during stub
11974 generation.
11975 (HANDLE_END_METHOD): Take into account stub generation.
11976 (print_method_info): Handle stub generation.
11977 (print_stub): New function.
11978 (print_cxx_classname): Make signature consistant with others.
11979 (help): Describe -stubs option.
11980 (main): Create stub file.
11981 (version): Use version.c.
11982 (print_full_cxx_name): New function.
11983 (print_c_decl): Use print_full_cxx_name.
11984
11985 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11986
11987 * check-init.c (check_init): Handle MAX_EXPR.
11988
11989 1999-07-15 Andrew Haley <aph@cygnus.com>
11990
11991 * lang.c (flag_use_divide_subroutine): New variable.
11992 * typeck.c: (convert_ieee_real_to_integer): Bounds check
11993 fp-to-integer conversion.
11994 (convert): Call convert_ieee_real_to_integer when flag_fast_math
11995 is not set.
11996
11997 * expr.c (build_java_soft_divmod): New function.
11998 (build_java_binop): Call build_java_soft_divmod if
11999 flag_use_divide_subroutine is set.
12000 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
12001 soft_lrem_node: new builtin functions.
12002 (init_decl_processing) Initialize the new builtins.
12003 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
12004 soft_lrem_node: new builtin functions.
12005 (build_java_soft_divmod): New function.
12006 * parse.y: Call build_java_soft_divmod if
12007 flag_use_divide_subroutine is set.
12008 * parse.c: Rebuilt.
12009
12010 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
12011 a --specs= arg) even if not linking.
12012 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
12013 -fuse-divide-subroutine
12014
12015 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12016
12017 * parse.y (resolve_and_layout): Check methods only once.
12018 (resolve_qualified_expression_name): Verify thrown exceptions
12019 compatibility.
12020 (check_thrown_exceptions): Reject exceptions thrown in
12021 initializer. Error message tuned.
12022
12023 1999-07-14 Andrew Haley <aph@cygnus.com>
12024
12025 * expr.c (expand_expr): Do not return the last statement in a
12026 block as the block's value.
12027
12028 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
12029
12030 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
12031 CALL_EXPR, to avoid order of evaluation changes.
12032
12033 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12034
12035 * parse.y (qualify_ambiguous_name): Do not use
12036 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
12037
12038 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12039
12040 * check-init.c (check_init): Handle MAX_EXPR.
12041 * expr.c (force_evaluation_order): Force method call arguments to
12042 be evaluated in left-to-right order.
12043 * parse.y (qualify_ambiguous_name): Loop again to qualify
12044 NEW_ARRAY_EXPR properly.
12045
12046 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12047
12048 * parse.y (patch_invoke): Resolve unresolved invoked method
12049 returned type.
12050 (qualify_ambiguous_name): STRING_CST to qualify expression for
12051 type name resolution.
12052
12053 1999-06-24 Andrew Haley <aph@cygnus.com>
12054
12055 * class.c (finish_class): Whenever a deferred method is
12056 output, rescan the list of methods to see if a new candidate for
12057 output can be found.
12058
12059 1999-06-28 Tom Tromey <tromey@cygnus.com>
12060
12061 * jvspec.c (lang_specific_driver): Recognize --help.
12062
12063 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12064
12065 * parse.y (resolve_package): Fixed bogus return statement.
12066 (patch_method_invocation): Resolve method invocation beginning with
12067 a package name qualifier.
12068
12069 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12070
12071 * Make-lang.in (java.stage1): Depend on stage1-start.
12072 (java.stage2): Likewise for stage2-start.
12073 (java.stage3): Likewise for stage3-start.
12074 (java.stage4): Likewise for stage4-start.
12075
12076 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12077
12078 * parse.y (java_complete_lhs): When doing cross referencing, don't
12079 try to keep file location on a WFL expanded as a CALL_EXPR.
12080
12081 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12082
12083 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
12084 compiling to class file a void method with an empty method body.
12085 As a side effect, the bytecode backend will generate the
12086 appropriate `return' instruction.
12087
12088 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12089
12090 * parse.y (lookup_package_type_and_set_next): New function prototype.
12091 (resolve_package): Search current and imported packages.
12092 (lookup_package_type_and_set_next): New function.
12093
12094 1999-06-22 Andrew Haley <aph@cygnus.com>
12095
12096 * verify.c (verify_jvm_instructions): Check for pending blocks
12097 before invalid PC test and opcode switch, not after.
12098
12099 1999-06-21 Andrew Haley <aph@cygnus.com>
12100
12101 * except.c (find_handler_in_range): The upper limit for exception
12102 ranges is exclusive, not inclusive: (start <= pc < end).
12103 (link_handler): find child pointer which points to outer by
12104 searching sibling list: previous code incorrectly assumed that
12105 outer->outer->first_child must point to outer.
12106 * verify.c (verify_jvm_instructions): FIXME added to code for
12107 `athrow'.
12108 (verify_jvm_instructions): Do not assume that the last block
12109 processed in a subroutine is a block which ends with a `ret'
12110 instruction. With some control flows it is possible that the last
12111 block ends with an `athrow'.
12112
12113 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12114
12115 * parse.y (qualify_ambiguous_name): Reorganized the post
12116 evaluation of non WFL leading expression nodes.
12117
12118 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12119
12120 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
12121 CONVERT_EXPR.
12122
12123 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12124
12125 * parse.y (qualify_ambiguous_name): Handle qualified expression
12126 beginning with a STRING_CST.
12127
12128 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12129
12130 * parse.y (register_fields): Set DECL_INITIAL on both
12131 pre-initialized static and public fields.
12132 (resolve_field_access): Static field access expressions to always
12133 use pointer types.
12134 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
12135 qualification. CONVERT_EXPR to be resolved as an expression name.
12136 (java_complete_lhs): Identify and access qualified final
12137 initialized field in switch statement case expression.
12138 (fold_constant_for_init): Pre-initialized field decl constant to
12139 be folded.
12140
12141 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12142
12143 * parse.y (note_possible_classname): Mark returned node with
12144 QUALIFIED_P only if the original class name contained a '/'.
12145
12146 1999-06-05 Anthony Green <green@cygnus.com>
12147
12148 * Make-lang.in (gcjh): More parallel build fixes.
12149
12150 1999-06-03 Mike Stump <mrs@wrs.com>
12151
12152 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
12153
12154 1999-06-02 Anthony Green <green@cygnus.com>
12155
12156 * except.c (link_handler): Chain exception handlers in order.
12157
12158 1999-06-02 Anthony Green <green@cygnus.com>
12159
12160 * expr.c (expand_byte_code): Fill unreachable bytecode regions
12161 with nops and process as usual in order to always set correct EH
12162 ranges. Emit detailed warnings about unreachable bytecodes.
12163
12164 1999-06-02 Anthony Green <green@cygnus.com>
12165
12166 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
12167 constant.
12168
12169 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12170
12171 * parse.y (lookup_field_wrapper): Unified returned value to NULL
12172 or the searched field decl.
12173
12174 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12175
12176 * parse.y (fold_constant_for_init): Convert numerical constant
12177 values to the type of the assigned field.
12178
12179 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12180
12181 * expr.c (lookup_field): Relaxed the test on class loading error
12182 detection.
12183 * parse.y (fold_constant_for_init): Enabeled old code.
12184
12185 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
12186
12187 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
12188 decide the validity of the cast of a java.lang.Cloneable reference
12189 to an array.
12190 (patch_conditional_expr): Fixed first argument passed to
12191 binary_numeric_promotion.
12192
12193 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
12194
12195 * parse.y (qualify_ambiguous_name): Take into account that a
12196 CONVERT_EXPR might specify a type as a WFL.
12197
12198 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12199
12200 * parse.y (patch_assignment): Save the rhs before using it as an
12201 argument to _Jv_CheckArrayStore.
12202
12203 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12204
12205 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
12206
12207 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12208
12209 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
12210 floating point literal only when the exponent indicator has been
12211 parsed.
12212
12213 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12214
12215 * parse.y (formal_parameter:): Construct argument tree list
12216 element even if a yet unsupported final parameter was encountered.
12217
12218 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12219
12220 * parse.y (finish_method_declaration): Issue errors for native or
12221 abstract methods declared with a method body, as well as for non
12222 native or non abstract methods with no method body.
12223
12224 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12225
12226 * class.c (build_utf8_ref): Initialize variable `field'.
12227
12228 * decl.c (init_decl_processing): Initialize variable `field'.
12229
12230 * expr.c (build_known_method_ref): Mark parameters `method_type',
12231 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
12232 (process_jvm_instruction): Likewise for parameter `length'.
12233
12234 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
12235 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
12236 ATTRIBUTE_UNUSED.
12237
12238 * parse.y (maybe_generate_clinit): Remove unused variable
12239 `has_non_primitive_fields'.
12240 (find_in_imports_on_demand): Initialize variables `node_to_use'
12241 and `cl'.
12242 (patch_binop): Likewise for variable `prom_type'.
12243 (patch_unaryop): Likewise for variable `prom_type'.
12244
12245 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
12246
12247 * xref.c (xref_table): Add missing initializer.
12248
12249 1999-05-14 Tom Tromey <tromey@cygnus.com>
12250
12251 * java-except.h (struct eh_range): Removed unused `next' member.
12252 * verify.c (verify_jvm_instructions): Call check_nested_ranges
12253 after adding all exception handlers. Sort exception ranges in
12254 order of start PC.
12255 (struct pc_index): New structure.
12256 (start_pc_cmp): New function.
12257 * except.c (add_handler): Return `void'. Don't call link_handler;
12258 instead construct an ordinary linked list and do range
12259 coalescing.
12260 (check_nested_ranges): New function.
12261 (link_handler): Changed interface to allow merging of eh_ranges.
12262 Split overlapping ranges. Return `void'.
12263
12264 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12265
12266 * parse.y (constructor_block_end:): New rule, tagged <node>.
12267 (constructor_body:): Use `constructor_block_end' instead of
12268 `block_end'.
12269
12270 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12271
12272 * parse.y (statement_nsi:): Pop `for' statement block.
12273 (java_complete_lhs): Labeled blocks containing no statement are
12274 marked as completing normally.
12275
12276 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12277
12278 * xref.c (xref_set_current_fp): New function, defined.
12279 * xref.h (xref_set_current_fp): New function, prototyped.
12280
12281 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12282
12283 * check-init.c (check_init): Take into account that
12284 LABELED_BLOCK_STMT can be empty.
12285
12286 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12287
12288 * parse.y (java_check_regular_methods): Warning check on not
12289 overriding methods with default access in other packages does not
12290 apply to `<clinit>'.
12291 (java_complete_lhs): If block body is an empty_stmt_node, replace
12292 it by NULL_TREE. This prevents gcc from generating an irrelevant
12293 warning.
12294
12295 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12296
12297 * check-init.c (check_init): Removed code accepting to see things
12298 falling through default:, when doing xrefs.
12299 * java-tree.h (do_not_fold): New global variable, declared.
12300 * parse.y (do_not_fold): New global variable, defined.
12301 (java_complete_expand_method): Set `do_not_fold' to the value of
12302 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
12303 and reinstall them after them have been purged; do not check for
12304 initializations; do not issue missing return errors.
12305 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
12306 when doing xrefs.
12307 (patch_binop): Skip the fold part when doing xrefs.
12308 (build_string_concatenation): Skip the concatenation part when
12309 doing xrefs.
12310 (patch_synchronized_statement): Do not generate a try-finally when
12311 doing xrefs.
12312 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
12313 and keep the location where the throw was seen.
12314 * typeck.c (convert): When `do_not_fold' is set, do not attempt
12315 any treatment on the converted node an simply return a NOP_EXPR of
12316 the targeted type.
12317 * xref.c (xref_get_data): New function, defined.
12318 * xref.h (xref_get_data): New function, declared.
12319 (XREF_GET_DATA): Use xref_get_data.
12320
12321 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12322
12323 * gjavah.c (print_include): Cast the result of `strlen' to int
12324 when comparing against a signed value.
12325 (add_namelet): Likewise.
12326
12327 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12328
12329 * expr.c (expand_invoke): Mark parameter `nargs' with
12330 ATTRIBUTE_UNUSED.
12331 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
12332
12333 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
12334 ATTRIBUTE_UNUSED.
12335
12336 * jcf-reader.c (get_attribute): Cast a value to long
12337 when comparing against a signed expression. Likewise.
12338
12339 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
12340 HOST_BITS_PER_CHAR.
12341
12342 1999-05-11 Andrew Haley <aph@cygnus.com>
12343
12344 * parse.y (source_end_java_method): If the current method contains
12345 any exception handlers, force asynchronous_exceptions: this is
12346 necessary because signal handlers in libjava may throw exceptions.
12347 * decl.c (end_java_method): Ditto.
12348
12349 1999-05-11 Tom Tromey <tromey@cygnus.com>
12350
12351 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
12352 flags.
12353 * jvspec.c (THREAD_NAME): Removed.
12354 (GC_NAME): Likewise.
12355 (MATHLIB): Likewise.
12356 (WITHLIBC): Likewise.
12357 (GCLIB): Likewise.
12358 (THREADLIB): Likewise.
12359 (MATH_LIBRARY): Likewise.
12360 (lang_specific_driver): Don't add `-l' options to command line.
12361 Instead, add a single --specs option. Recognize `-L' options and
12362 use them to search for spec file.
12363 (find_spec_file): New function.
12364 (SPEC_FILE): New define.
12365
12366 1999-05-11 Dave Brolley <brolley@cygnus.com>
12367
12368 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
12369 cpplib-enabled build.
12370
12371 1999-05-05 Per Bothner <bothner@cygnus.com>
12372
12373 * class.c (make_field_value): DECL_INITIAL may be a string literal;
12374 temporarily zero it while calling rest_of_decl_compilation.
12375
12376 * java-tree.h (string_ptr_type_node): Add declaration.
12377 * decl.c: Define and initialize string_ptr_type_node.
12378 * parse.y (patch_string_cst): Use string_ptr_type_node.
12379
12380 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
12381 * parse.y (for_statement): Now unconditionally exit_block.
12382 (finish_labeled_statement): No longer exit_block if for-loop.
12383 (patch_loop_statement): Check harder if the loop is already labeled.
12384
12385 * parse.y (patch_initialized_static_field): Removed function.
12386 (maybe_generate_clinit): Removed special handling for interfaces.
12387 (java_complete_expand_methods): Do a preliminary java_complete_tree
12388 on <clinit> to determine if it can be removed.
12389 (java_complete_expand_method): Remove special handling for <clinit>.
12390 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
12391 optimize if we get back empty_stmt_node.
12392 For MODIFY_EXPR, re-do checking of static initializers.
12393 (fold_constant_for_init): Don't return immediate if VAR_DECL.
12394 For VAR_DECL, pass correct context.
12395
12396 * verify.c (verify_jvm_instructions): Better error messages.
12397
12398 1999-05-03 Tom Tromey <tromey@cygnus.com>
12399
12400 * parse-scan.y (interface_declaration): Call
12401 report_class_declaration for interfaces.
12402
12403 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
12404
12405 * Makefile.in: Remove -v from bison command lines.
12406
12407 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12408
12409 * check-init.c (check_init): Exclude a case of error when doing
12410 xrefs.
12411 * class.c (layout_class_method): Don't generate the error message
12412 twice when compiling from source.
12413 * lang-options.h: Added `-Wredundant-modifers' and
12414 `-Wunusupported-jdk11' flags and help text.
12415 * lang.c (lang_decode_option): Added support for
12416 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
12417 flag_static_local_jdk11 and flag_redundant set accordingly.
12418 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
12419 * parse.h (EXPR_WFL_ADD_COL): New macro.
12420 (DECL_END_SOURCE_LINE): Likewise.
12421 (DECL_INHERITED_SOURCE_LINE): Likewise.
12422 * parse.y (static_ref_err): New function, prototyped.
12423 (CCB_TK): Now tagged <operator>.
12424 (class_body:): Remember the location of the closing '}' of a class
12425 definition when doing xrefs.
12426 (block:): Likewise.
12427 (block_end:): Likewise.
12428 (create_class): Remember the location of the inherited class
12429 identifier when doing xrefs.
12430 (register_fields): Added test on first operand of `init' before
12431 testing it TREE_CODE.
12432 (method_header): Store the location of the class identifier in the
12433 class decl when doing xrefs.
12434 (finish_method_declaration): Don't combine first/last method line
12435 when doing xref.
12436 (java_check_regular_methods): Warning check on not overriding
12437 methods with default access on other packages move before check on
12438 static methods. Initialization of `aflags' also moved up.
12439 (resolve_expression_name): Call static_ref_err to report the error.
12440 (static_ref_err): New function, implemented.
12441 (resolve_field_access): Returned simplified static field access
12442 when doing xrefs.
12443 (resolve_qualified_expression_name): Check for illegal use of
12444 static fields in a non static context. Call static_ref_err to
12445 report error in various places.
12446 (java_complete_tree): Do not fold initialized static fields when
12447 doing xrefs.
12448 (java_complete_lhs): Likewise.
12449
12450 1999-04-29 Anthony Green <green@cygnus.com>
12451
12452 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
12453 create internal labels.
12454 (lookup_label): Ditto.
12455
12456 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12457
12458 * class.c (layout_class_method): Generate <clinit>'s rtl for
12459 interfaces.
12460 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12461 for interfaces' <clinit>.
12462 * expr.c (lookup_field): Search for fields in interfaces.
12463 (expand_invoke): Fixed indentation.
12464 (expand_java_field_op): Likewise. Use IS_CLINIT.
12465 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
12466 (IS_CLINIT): New macro.
12467 * parse.y (type_declaration:): Call maybe_generate_clinit after an
12468 interface was parsed.
12469 (maybe_generate_clinit): Don't generate if the current class is an
12470 interface with only fields of primitive types.
12471 (reset_method_name): Use IS_CLINIT.
12472 (java_complete_expand_method): Expand <clinit> when it exists for
12473 interfaces. Use IS_CLINIT.
12474 (resolve_expression_name): Use DECL_CONTEXT instead of
12475 current_class to build static field references.
12476 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
12477 ARRAY_REF when doing xreferencing.
12478 (check_final_assignment): Fixed typo in leading comment. Use
12479 IS_CLINIT.
12480 (patch_array_ref): Don't fully expand array references when
12481 xreferencing.
12482 (patch_return): Use IS_CLINIT.
12483 (patch_throw_statement): Likewise.
12484
12485 1999-04-22 Tom Tromey <tromey@cygnus.com>
12486
12487 * Make-lang.in (JAVA_SRCS): Added check-init.c.
12488
12489 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
12490
12491 * decl.c (predef_filenames, predef_filenames_size): New globals
12492 (init_decl_processing): predef_filenames and predef_filenames_size
12493 initialized.
12494 * java-tree.h (predef_filenames, predef_filenames_size): Declared
12495 extern.
12496 * jcf-parse.c (predefined_filename_p): New function.
12497 (yyparse): Check that files on the command line are specified only
12498 once and issue a warning otherwise.
12499 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
12500 * parse.y (source_end_java_method): Nullify NOP method bodies, to
12501 avoid a gcc warning with -W -Wall turned on.
12502 (java_expand_classes): Abort if errors were encountered.
12503 (java_complete_lhs): If the cross reference flag is set, wrap
12504 field DECL node around a WFL when resolving expression name.
12505
12506 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12507
12508 * lang.c (lang_decode_option): Fixed returned value when parsing
12509 `-fxref=...' and `-Wall'.
12510 * parse.y (source_end_java_method): Do not generate code when
12511 flag_emit_xref is set.
12512 (resolve_expression_name): Do not build static field access when
12513 flag_emit_xref is set.
12514 (resolve_field_access): No special treatment on `length' when
12515 flag_emit_xref is set. Do not build qualified static field access
12516 when flag_emit_xref is set.
12517 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
12518 when flag_emit_xref is set.
12519 (patch_assignment): Do not generate array store runtime check when
12520 flag_emit_xref is set.
12521 * xref.c (xref_flag_value): Fixed function declaration
12522 indentation.
12523 (xset_set_data): New function.
12524 * xref.h (xref_set_data): Added prototype for new function.
12525 (typedef struct xref_flag_table): New field data.
12526 (XREF_GET_DATA): New macro.
12527
12528 1999-04-19 Tom Tromey <tromey@cygnus.com>
12529
12530 * xref.h (enum): Removed trailing comma.
12531
12532 * parse.y (resolve_qualified_expression_name): Added missing
12533 `break'.
12534
12535 1999-04-15 Anthony Green <green@cygnus.com>
12536
12537 * gjavah.c: New prototypes for java_float_finite and
12538 java_double_finite.
12539
12540 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
12541
12542 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
12543 references.
12544
12545 1999-04-06 Jeffrey A Law (law@cygnus.com)
12546
12547 * Makefile.in (TREE_H): Add tree-check.h.
12548 (RTL_H): Add genrtl.h.
12549
12550 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12551
12552 * parse.y (patch_assignment): Added ArrayStoreException runtime
12553 check.
12554
12555 1999-04-06 Per Bothner <bothner@cygnus.com>
12556
12557 * expr.c (pop_type_0): New function.
12558 (pop_type): Use pop_type_0.
12559 * java-tree.h (pop_type_0): New declaration.
12560 * verify.c (verify_jvm_instructions): Check return instructions.
12561
12562 * parse.y (patch_binop): Don't fold if non-constant and emiting
12563 class files.
12564
12565 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12566
12567 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
12568
12569 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
12570 (main_jcf): Don't define.
12571 (process_file): Don't set `main_jcf'.
12572
12573 * java-tree.h (main_jcf): Don't declare.
12574
12575 * jcf-parse.c (main_jcf): Add static definition.
12576
12577 * lang.c (main_jcf): Don't define.
12578
12579 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12580
12581 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
12582
12583 * decl.c (copy_lang_decl): Likewise for `bcopy'.
12584
12585 * jcf-depend.c: Include "config.h", not <config.h>.
12586
12587 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
12588 `bcopy' to PTR.
12589
12590 * jcf-path.c: Include "config.h", not <config.h>.
12591
12592 * lex.c: Don't include various system header files.
12593 (java_init_lex): Cast the argument of `bzero' to PTR
12594
12595 * parse-scan.y (java_push_parser_context): Likewise.
12596
12597 * parse.y (java_push_parser_context): Likewise.
12598 (patch_bc_statement): Match format specifier to variable argument.
12599
12600 * xref.c: Don't include <stdio.h>.
12601
12602 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12603
12604 * parse.y (struct parser_ctxt *ctxp): Now global.
12605 (declare_local_variables): Use WFL compound value for the
12606 declaration source line value, when doing cross-referencing.
12607
12608 1999-03-31 Tom Tromey <tromey@cygnus.com>
12609
12610 * gjavah.c (print_field_info): Allow constants of other types.
12611 (print_include): Generate include when new name is proper prefix
12612 of already printed name.
12613 (add_namelet): Likewise.
12614 (cxx_keyword_subst): New function.
12615 (print_method_info): Use it.
12616 (print_field_name): New function.
12617 (get_field_name): New function.
12618 (print_field_info): Use get_field_name and print_field_name.
12619
12620 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12621
12622 * Makefile.in (keyword.h): Generate using gperf language 'C', not
12623 'KR-C', so gperf uses the `const' keyword on strings.
12624
12625 * keyword.gperf (java_keyword): Const-ify a char*.
12626
12627 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12628
12629 * parse.y (patch_bc_statement): Fixed identation and a bogus
12630 `printf' format.
12631
12632 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12633
12634 * parse.y (patch_assignment): Allow static variables in other
12635 classes to be assigned.
12636
12637 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12638
12639 * class.c (maybe_add_interface): Remove unused variable
12640 `interface_binfo'.
12641 (make_class_data): Use = for assignment, not ==. Likewise.
12642 (emit_register_classes): Remove unused variable `decl'.
12643
12644 * lex.c: Fix comment so as not to contain an embedded `/*'.
12645
12646 * verify.c (verify_jvm_instructions): Remove unused variable
12647 `self_type'.
12648
12649 1999-03-27 Per Bothner <bothner@cygnus.com>
12650
12651 * parse.y (complete_loop_body): Rename to finish_loop_body.
12652 (complete_labeled_statement): Rename to finish_labeled_statement.
12653 (complete_for_loop): Rename to finish_for_loop.
12654 (complete_method_declaration): Rename to finish_method_declaration.
12655
12656 * java-tree.h (continue_identifier_node): New global node.
12657 * decl.c: Define and initialize continue_identifier_node.
12658 * parse.y (generate_labeled_block): Remove - no longer needed.
12659 (build_loop_body): Use continue_identifier_node for continue block.
12660 (finish_labeled_statement): Also do pop_labeled_block actions.
12661 (java_complete_lhs): POP_LOOP even if error.
12662 (build_labeled_block): Special handling for continue_identifier_node.
12663 (patch_loop_statement): Re-organize.
12664 (patch_bc_statement): Re-write.
12665
12666 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12667
12668 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
12669 using a WFL compound value.
12670 * parse.y (xref.h): Include.
12671 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
12672 WFL compound value.
12673 (register_fields): Set WFL compound value to lineno if doing
12674 xrefs.
12675 (java_complete_expand_method): Call expand_xref if flag_emit_xref
12676 is set.
12677 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
12678 * xref.h (expand_xref): Prototype renamed from xref_generate.
12679
12680 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12681
12682 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
12683 (GET_CURRENT_BLOCK): New macro.
12684 * parse.y (current_static_block): New global variable.
12685 (method_body:): Define action.
12686 (complete_method_declaration): Set current_function_decl to NULL
12687 when work on the current method is done.
12688 (declare_local_variables): Use GET_CURRENT_BLOCK.
12689 (java_method_add_stmt): Likewise.
12690 (java_complete_expand_method): Disable the use of `this' when
12691 expanding <clinit>.
12692 (enter_a_block): If no current method exist, use
12693 current_static_block to link static initializer blocks.
12694 (exit_block): Rewritten to use current_static_block when no current
12695 method decl exists.
12696 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
12697 (patch_return): Forbid the use of `return' in static initializers.
12698 (patch_throw_statement): Fixed indentation. Issue specific error
12699 for uncaught thrown checked exception in static initializer
12700 blocks. Removed FIXME.
12701
12702 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
12703
12704 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
12705 Link gcj from gcc.o.
12706
12707 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12708
12709 * parse.y (find_applicable_accessible_methods_list): When dealing
12710 with interface: ensure that a given interface or java.lang.Object
12711 are searched only once.
12712
12713 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12714
12715 * gjavah.c (print_c_decl): Remove unused argument `flags'.
12716
12717 * jcf-dump.c (print_access_flags): Add braces around if-else.
12718
12719 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
12720 COMBINE_INPUTS.
12721
12722 * lex.c (build_wfl_node): Add static prototype.
12723
12724 * lex.h (build_wfl_node): Remove static prototype.
12725
12726 * parse.y: Include lex.c early enough to declare everything needed.
12727 Ensure calls to `build_wfl_node' pass the proper arguments.
12728 (create_class): Remove unused variable `super_decl'.
12729 (get_printable_method_name): Initialize variable `name'.
12730
12731 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12732
12733 * Changelog: Fixed 1999-03-22 typos.
12734 * lang.c (lang_decode_option): Fixed typo in error string in the
12735 XARG section.
12736
12737 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12738
12739 * Makefile.in (JAVA_OBJS): Added entry xref.o.
12740 (xref.o): New rule.
12741 * java-tree.h (flag_emit_xref): Declared extern.
12742 * lang.c (xref.h): Included.
12743 (flag_emit_xref): New global variable.
12744 (lang_decode_option): Added support for -fxref.
12745 * xref.c: Created.
12746 * xref.h: Likewise.
12747
12748 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
12749
12750 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
12751 linked with.
12752
12753 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12754
12755 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
12756 $(srcdir)/../system.h and $(JAVA_TREE_H).
12757 (jcf-io.o): Depend on $(JAVA_TREE_H).
12758 (mangle.o): Likewise.
12759
12760 * check-init.c (check_cond_init): Add static prototype.
12761
12762 * class.c (build_java_method_type, hashUtf8String,
12763 make_field_value, get_dispatch_vector, get_dispatch_table,
12764 append_gpp_mangled_type, mangle_static_field): Likewise.
12765 (strLengthUtf8): Hide unused definition.
12766 (hashUtf8String): Const-ify.
12767 (make_field_value): Un-ANSI-fy.
12768
12769 * constants.c: Move inclusion of jcf.h above java-tree.h.
12770 (set_constant_entry, find_class_or_string_constant,
12771 find_name_and_type_constant, get_tag_node,
12772 build_constant_data_ref): Add static prototype.
12773
12774 * decl.c (push_jvm_slot, builtin_function,
12775 lookup_name_current_level): Likewise.
12776 (builtin_function): Const-ify.
12777
12778 * except.c (expand_start_java_handler, expand_end_java_handler):
12779 Add static prototype.
12780
12781 * expr.c (flush_quick_stack, push_value, pop_value,
12782 java_stack_swap, java_stack_dup, build_java_athrow,
12783 build_java_jsr, build_java_ret, expand_java_multianewarray,
12784 expand_java_arraystore, expand_java_arrayload,
12785 expand_java_array_length, build_java_monitor, expand_java_pushc,
12786 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
12787 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
12788 expand_compare, expand_test, expand_cond, expand_java_goto,
12789 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
12790 expand_java_field_op, java_push_constant_from_pool): Likewise.
12791
12792 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
12793 (build_java_arraynull_check): Mark parameters `node' and `type'
12794 with ATTRIBUTE_UNUSED.
12795 (note_label): Likewise for parameter `current_pc'.
12796 (expand_java_call, expand_java_ret): Hide unused definition.
12797
12798 * java-tree.h (make_class, build_constants_constructor,
12799 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
12800 init_outgoing_cpool, register_class, emit_register_classes,
12801 java_layout_seen_class_methods): Prototype.
12802 (unicode_mangling_length): Const-ify.
12803 (append_gpp_mangled_name, append_gpp_mangled_classtype,
12804 emit_unicode_mangled_name, format_int, format_uint,
12805 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
12806 jcf_print_utf8_replace, open_class): Prototype.
12807
12808 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
12809 <stdio.h>. Include tree.h/java-tree.h.
12810 (utf8_equal_string usage, process_class): Add static prototype.
12811 (open_class): Don't prototype this here.
12812 (utf8_equal_string): Match arguments to format specifiers.
12813 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
12814 TABLE_SWITCH, disassemble_method): Likewise.
12815
12816 * jcf-io.c: Include tree.h/java-tree.h.
12817 (open_class, find_classfile, jcf_print_utf8,
12818 jcf_print_utf8_replace): Const-ify.
12819
12820 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
12821 parse_class_file): Add static prototype.
12822 (find_in_current_zip): Match definition to existing static
12823 prototype.
12824
12825 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
12826 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
12827 finish_jcf_block, define_jcf_label, get_jcf_label_here,
12828 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
12829 write_chunks, adjust_typed_op, generate_bytecode_conditional,
12830 generate_bytecode_return, perform_relocations, init_jcf_state,
12831 init_jcf_method, release_jcf_state, generate_classfile):
12832 Add static prototype.
12833 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
12834 (make_class_file_name): Const-ify.
12835
12836 * jcf.h (find_classfile): Const-ify.
12837
12838 * jv-scan.c (reset_report): Remove prototype.
12839
12840 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
12841 (error): Rewrite to allow varargs.
12842
12843 * lang.c (lang_f_options): Const-ify.
12844
12845 * lex.c (java_parse_escape_sequence): Add static prototype.
12846 (java_allocate_new_line): Match definition to existing static
12847 prototype.
12848
12849 * mangle.c Include tree.h/java-tree.h.
12850 (unicode_mangling_length, emit_unicode_mangled_name,
12851 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
12852
12853 * parse.h (jdep_code): Remove trailing comma in enumeration.
12854 (java_get_line_col): Move prototype outside of !JC1_LITE test.
12855 (reset_report): Add prototype.
12856
12857 * verify.c (push_pending_label, merge_types): Add static
12858 prototypes.
12859
12860 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
12861
12862 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12863
12864 * parse.y (find_applicable_accessible_methods_list): Extend the
12865 search to superinterfaces when relevant.
12866 (search_applicable_methods_list): New function.
12867
12868 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12869
12870 * class.c (unmangle_classname): Implemented stricter testing
12871 before setting the QUALIFIED_P flag on an identifier.
12872
12873 1999-03-16 Per Bothner <bothner@cygnus.com>
12874
12875 * parse.y (java_complete_lhs): Call force_evaluation_order
12876 after patch_newarray.
12877 (patch_binop): Don't call fold if there are side effects.
12878
12879 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
12880
12881 * parse.y (java_stabilize_reference): Use save_expr instead of
12882 building a SAVE_EXPR node.
12883 (java_complete_lhs): Patch the resulting string of the `+='
12884 operator (if necessary) and complete the RHS after having built
12885 the cast.
12886
12887 1999-03-15 Per Bothner <bothner@cygnus.com>
12888
12889 * class.c (make_class): Don't set CLASS_P here (because
12890 this function is also called by build_java_array_type).
12891 (push_class): Set CLASS_P here instead.
12892 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
12893
12894 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
12895 context. If the context is class, perfer "super" over "synchronized".
12896 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
12897
12898 * parse.y (create_class): Don't call parser_check_super here;
12899 it is not robust. Always wait until later.
12900
12901 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
12902 match what JDK 1.2 does), but don't set ACC_PUBLIC.
12903
12904 1999-03-13 Per Bothner <bothner@cygnus.com>
12905
12906 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
12907 * lex.h (UNGETC): Change misleading macro.
12908
12909 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
12910
12911 * parse.y (java_stabilize_reference): Return NODE when patching a
12912 COMPOUND_EXPR.
12913 (java_complete_lhs): Put parenthesis around truth values.
12914
12915 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
12916
12917 * class.c (layout_class_method): Don't make rtl for interface
12918 methods.
12919 * parse.h (GET_TYPE_NAME): New macro.
12920 * parse.y (if_then_statement:): Fixed indentation.
12921 (if_then_else_statement:): Likewise.
12922 (for_statement:): Fixed spacing.
12923 (try_statement:): Fixed indentation.
12924 (create_interface): Don't force interfaces to be abstract.
12925 (method_header): Abstract methods are OK in interfaces.
12926 (declare_local_variables): Fixed typo in comment.
12927 (java_complete_expand_method): Fixed indentation.
12928 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
12929 non accessible fields.
12930 (java_stabilize_reference): New function.
12931 (java_complete_lhs): Fixed indentation. Use
12932 java_stabilize_reference in compound assignment. Insert the
12933 cast. If not processing `+' fix string constants before processing
12934 binop.
12935
12936 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12937
12938 * constants.c (find_class_or_string_constant): Cast variable `j'
12939 to a `jword' when comparing against one.
12940
12941 * expr.c (java_lang_expand_expr): Remove unused variables
12942 `has_finally_p' and `op0'.
12943
12944 * gjavah.c (print_field_info): Cast a value to jint when comparing
12945 against one. Likewise for a jlong.
12946 (add_namelet): Likewise cast a `sizeof' to an int when comparing
12947 against a signed quantity.
12948
12949 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
12950 (print_signature): Don't needlessly dereference variable `str'
12951
12952 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
12953 `max_locals' with ATTRIBUTE_UNUSED.
12954 (jcf_parse_class): Likewise for variable `index'.
12955
12956 * parse.h (reverse_jdep_list): Remove static prototype.
12957
12958 * parse.y (build_jump_to_finally): Remove prototype and definition.
12959 (reverse_jdep_list): Add static prototype.
12960
12961 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
12962 `assignment' and `expr_decl'.
12963
12964 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
12965
12966 1999-03-12 Andrew Haley <aph@cygnus.com>
12967
12968 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
12969 we'll need a directory separator and a null character.
12970
12971 1999-03-10 Per Bothner <bothner@cygnus.com>
12972
12973 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
12974
12975 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
12976
12977 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
12978 interfaces.
12979
12980 1999-03-05 Per Bothner <bothner@cygnus.com>
12981
12982 * lex.c (java_parse_end_comment): Take extra parameter (next char).
12983
12984 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
12985
12986 * class.c (layout_class_method): A static method in a base class
12987 is never overridden, so treat it like it doesn't exist.
12988 However, do complain about private non-static method overriding
12989 public static method.
12990
12991 * parse.y: Don't set unused INITIALIZED_P flag.
12992 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
12993
12994 * parse.y (find_expr_with_wfl): Optimize tail-calls.
12995 (build_array_from_name): Re-order &index[string] to &string[index].
12996
12997 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
12998 error_mark (it might catch more errors, but it is more likely to lose).
12999
13000 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13001
13002 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
13003 (parse-scan.o): Depend on toplev.h.
13004
13005 * class.c (make_method_value): Add prototype. Make it static.
13006 Remove unused second argument, caller changed.
13007
13008 * expr.c (java_lang_expand_expr): Remove unused variable
13009 `return_label'.
13010
13011 * java-tree.h: Don't prototype find_in_current_zip.
13012 Add prototypes for verify_constant_pool, start_java_method,
13013 end_java_method, give_name_to_locals, expand_byte_code,
13014 open_in_zip, set_constant_value, find_constant1, find_constant2,
13015 find_utf8_constant, find_string_constant, find_class_constant,
13016 find_fieldref_index, find_methodref_index, write_constant_pool,
13017 count_constant_pool_bytes and encode_newarray_type.
13018
13019 * jcf-dump.c: Remove unused variable `LONG_temp'.
13020
13021 * jcf-parse.c: Include parse.h.
13022 (jcf_parse_source): Remove unused parameter, all callers changed.
13023 (jcf_figure_file_type): Add static prototype.
13024 (find_in_current_zip): Likewise. Also remove unused parameter,
13025 all callers changed.
13026 (read_class): Initialize variable `saved_pos'.
13027
13028 * jcf-reader.c (jcf_parse_preamble): Mark variables
13029 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
13030
13031 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
13032 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
13033 (java_parse_doc_section): Initialize variable `seen_star'.
13034 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
13035 (java_lex_error): Mark parameters `msg' and `forward' with
13036 ATTRIBUTE_UNUSED.
13037 (java_get_line_col): Mark parameters `filename' and `line' with
13038 ATTRIBUTE_UNUSED.
13039
13040 * parse-scan.y: Include toplev.h.
13041 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
13042
13043 * parse.h: use `struct JCF', not plain `JCF'.
13044 (java_parser_context_save_global, java_expand_classes
13045 java_parser_context_restore_global, java_parse): Add prototypes.
13046
13047 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
13048 `node'.
13049
13050 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
13051
13052 * check-init.c (check_init): COPYN takes word count, not bit count.
13053
13054 1999-02-26 Per Bothner <bothner@cygnus.com>
13055
13056 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
13057 explicit build_decl. (Avoids crash in reload when optimizing.)
13058
13059 1999-02-25 Per Bothner <bothner@cygnus.com>
13060
13061 * decl.c (complete_start_java_method): Handle synchronized method
13062 even when compiling from bytecode.
13063
13064 1999-02-26 Tom Tromey <tromey@cygnus.com>
13065
13066 * gjavah.c (add_class_decl): Only generate `#include' if outer
13067 class is not the name of the class we are processing. Correctly
13068 append `.h' in #include.
13069 (process_file): Clean up newlines around generated `#include's.
13070 (decode_signature_piece): Correctly handle inner classes.
13071 (struct include): New structure.
13072 (all_includes): New global.
13073 (print_include): New function.
13074 (add_class_decl): Use it.
13075 (process_file): Likewise.
13076 (add_class_decl): Generate include for java-array.h if array
13077 seen.
13078 (process_file): Don't generate java-array.h include.
13079
13080 * gjavah.c (add_namelet): Check for standard package names here.
13081 (add_class_decl): Don't check for standard package names here.
13082
13083 1999-02-25 Tom Tromey <tromey@cygnus.com>
13084
13085 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
13086 When reading a zip file, only use strncmp if both strings are
13087 bigger than the buffer length. Initialize `k' when looping
13088 through zip file.
13089
13090 1999-02-24 Tom Tromey <tromey@cygnus.com>
13091
13092 * gjavah.c (struct namelet): New structure.
13093 (add_namelet): New function.
13094 (print_namelet): New function.
13095 (print_class_decls): Use add_namelet and print_namelet to generate
13096 namespaces and not classes.
13097 (method_printed): New global.
13098 (HANDLE_END_METHOD): Examine method_printed.
13099 (print_method_info): Set method_printed when required. Print
13100 error if function to be ignored is marked virtual. Handle $finit$
13101 method.
13102 (METHOD_IS_FINAL): New macro.
13103 (print_field_info): Use it.
13104 (HANDLE_METHOD): Clear method_printed.
13105 (method_pass): New global.
13106 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
13107 (process_file): Do two passes over both fields and methods.
13108 (HANDLE_METHOD): Examine method_pass.
13109 (root): New global.
13110 (add_class_decl): New function.
13111 (print_class_decls): Don't scan over entire constant pool.
13112
13113 1999-02-23 Tom Tromey <tromey@cygnus.com>
13114
13115 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
13116 disable linking in that case.
13117
13118 1999-02-20 Tom Tromey <tromey@cygnus.com>
13119
13120 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
13121 not 0x1f.
13122
13123 1999-02-21 Per Bothner <bothner@cygnus.com>
13124
13125 * decl.c (build_result_decl), java-tree.h: New method.
13126 (complete_start_java_method): Handle synchronized methods.
13127 Don't build DECL_RESULT here. (Ordering dependency problem.)
13128 (start_java_method): Call build_result_decl here instead ...
13129 * parse.y (java_complete_expand_method): ... and here.
13130 (expand_start_java_method): Don't call complete_start_java_method here.
13131 (java_complete_expand_method): Call it here instead.
13132 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
13133 * java-tree.h: ... here.
13134
13135 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
13136 * parse.y (java_complete_lhs): Don't call force_evaluation_order
13137 for ARRAY_REF - it doesn't work when array bounds are checked.
13138 (patch_array_ref): Handle it here instead.
13139
13140 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
13141
13142 1999-02-19 Per Bothner <bothner@cygnus.com>
13143
13144 Force left-to-right evaluation of binary operations etc.
13145 * expr.c (force_evaluation_order), java-tree.h: New function.
13146 * parse.y (java_complete_lhs): Pass binary operations, procedure
13147 calls, and ARRAY_REFs to force_evaluation_order.
13148 (various): Set TREE_SIDE_EFFECTS more carefully.
13149
13150 Tolerate random (non-UTF8) encoding in comments without complaining.
13151 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
13152 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
13153
13154 * parse.y (resolve_qualified_expression_name): Handle error_mark.
13155 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
13156
13157 * parse.y (java_complete_lhs): Ignore an empty statement in a
13158 COMPOUND_EXPR. Don't complain about empty statement after return.
13159
13160 1999-02-19 Per Bothner <bothner@cygnus.com>
13161
13162 * parse.y (obtain_incomplete_type): Don't wrap unknown types
13163 in TREE_LIST - just chain the POINTER_TYPEs together.
13164 (resolve_class): If type already resolved, return decl.
13165 After resolving, update TREE_TYPE(class_type), and name (if array).
13166 * parse.h (do_resolve_class), parse.y: Make non-static.
13167 * class.c (maybe_layout_super_class): Take this_class argument.
13168 Do do_resolve_class if necessary.
13169 (layout_class, layout_class_methods): Adjust calls appropriately.
13170 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
13171 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
13172 * typeck.c (build_java_array_type): Don't call layout_class.
13173
13174 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13175
13176 * parse.y (check_pkg_class_access): Allow private class access
13177 within the same package.
13178 (strip_out_static_field_access_decl): New function.
13179 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
13180 operator argument before testing its nature.
13181
13182 1999-02-03 Per Bothner <bothner@cygnus.com>
13183
13184 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
13185 (TRY_EXPR): Simplify - it no longer has a finally clause.
13186 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
13187 Simpler handling of TRY_EXPR, which no longer has a finally clause.
13188 * expr.c (java_lang_expand_expr): Likewise.
13189 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
13190 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
13191 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
13192 (build_try_statement): Remove finally parameter and handling.
13193 (build_try_finally_statement): New function.
13194 (patch_try_statement): No longer need to support finally clause.
13195 (try_statement): Update grammar action rules.
13196 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
13197 Simpler handling of TRY_EXPR, which no longer has a finally clause.
13198
13199 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
13200
13201 * jcf-parse.c (get_constant): Add braces around computation of 'd'
13202 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
13203
13204 1999-02-17 Andrew Haley <aph@cygnus.com>
13205
13206 * class.c (build_utf8_ref): Back out broken patch which was
13207 intended to to output signatures using '.' as a separator.
13208
13209 * class.c (make_class_data): Output signatures using '.' as a
13210 separator, rather than '/'.
13211 (mangled_classname): Likewise.
13212 (make_field_value): Likewise.
13213 (make_method_value): Likewise.
13214 * constants.c (alloc_class_constant): Likewise.
13215 * expr.c (build_invokeinterface): Likewise.
13216
13217 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13218
13219 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
13220 of an ancient workaround.
13221
13222 1999-02-10 Jeffrey A Law (law@cygnus.com)
13223
13224 * jvspec.c (xmalloc): Kill the prototype. It does not belong
13225 here anymore.
13226
13227 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13228
13229 * lex.c (yylex): Encode \0 as UTF8.
13230
13231 1999-02-10 Tom Tromey <tromey@cygnus.com>
13232
13233 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
13234 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
13235 (libgcj_zip): Renamed.
13236 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
13237 LIBJAVA_ZIP_FILE.
13238 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
13239
13240 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
13241 (GC_NAME): Renamed -lgc to -lgcjgc.
13242
13243 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13244
13245 * lex.c (java_lang_cloneable): Initialize.
13246 * parse.y (java_lang_cloneable): New static variable.
13247 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
13248 doing one more qualification round.
13249 (valid_ref_assignconv_cast_p): Reject null source or
13250 destination. Allow an array to be cast into java.lang.Cloneable.
13251 (patch_cast): Swapped two first arguments to first call to
13252 valid_ref_assignconv_cast_p.
13253
13254 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
13255
13256 * parse.h: DECL_P renamed JDECL_P.
13257 * parse.y: DECL_P replaced by JDECL_P.
13258 (build_array_from_name): Always use pointer's type.
13259 (patch_bc_statement): Extra code to search continue target in a
13260 for loop. Fixed comments. Continue target is current loop when
13261 unlabeled.
13262
13263 1999-02-05 Andrew Haley <aph@cygnus.com>
13264
13265 * class.c (make_class_data): The superclass of an interface should
13266 be null, not class Object.
13267
13268 * lex.c (java_lex): Sign extend hex literals.
13269
13270 1999-02-04 Andrew Haley <aph@cygnus.com>
13271
13272 * class.c (build_utf8_ref): Output signatures using '.' as a
13273 separator, rather than '/'.
13274 (make_class_data): Likewise.
13275
13276 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
13277
13278 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
13279 mkstemp.o. Get them from libiberty now.
13280
13281 1999-02-02 Jeffrey A Law (law@cygnus.com)
13282
13283 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
13284
13285 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13286
13287 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
13288 from libiberty.h
13289
13290 1999-02-02 Per Bothner <bothner@cygnus.com>
13291
13292 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
13293 * jcf-write.c (generate_bytecode_return): New function.
13294 (generate_bytecode_insns): Use it, for RETURN_EXPR.
13295
13296 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
13297 generate special [fd]const_[01] instructions.
13298
13299 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
13300
13301 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
13302 handling OPCODE_lookupswitch or OPCODE_tableswitch.
13303
13304 1999-02-01 Per Bothner <bothner@cygnus.com>
13305
13306 * parse.y (patch_method_invocation): Handle calling static methods,
13307 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
13308
13309 * parse.y (java_complete_lhs): Don't complain about unreachable
13310 exit condition in a do-while statement.
13311
13312 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13313
13314 * lex.c (java_read_char): Fixed utf8 decoding.
13315 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
13316 range.
13317 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
13318 comments. Local variable `all_primitive' is gone. Broadened
13319 acceptance of `0' to floating point targets. `long' can now be
13320 widened to `double' or `float'.
13321 (valid_method_invocation_conversion_p): Added leading
13322 comment. Fixed tabulation.
13323 (build_string_concatenation): Optimize out left or right empty
13324 string constants.
13325
13326 1999-01-28 Per Bothner <bothner@cygnus.com>
13327
13328 * jcf-write.c (localvar_alloc): Only emit entry for
13329 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
13330 (generate_bytecode_insns): Only call put_linenumber if
13331 debug_info_level > DINFO_LEVEL_NONE.
13332 * jvspec.c (lang_specific_driver): If no -O* or -g* option
13333 is specified, add -g1 (for compatibility wih javac).
13334
13335 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
13336
13337 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
13338 gjavah.o, check-init.o, jv-scan.o
13339
13340 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13341
13342 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
13343
13344 * gjavah.c: Include config.h and system.h.
13345
13346 * javaop.h (inline): Don't define, its handled by system.h.
13347 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
13348 from `inline' to `static inline'.
13349
13350 * jcf.h (inline): Don't define, its handled by system.h.
13351
13352 * lex.c (inline): Likewise.
13353
13354 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
13355
13356 * lang-specs.h: Map -Qn to -fno-ident.
13357
13358 1999-01-29 Richard Henderson <rth@cygnus.com>
13359
13360 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
13361
13362 1999-01-29 Tom Tromey <tromey@cygnus.com>
13363
13364 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
13365 then cast it to Object before calling `append' method.
13366
13367 1999-01-28 Per Bothner <bothner@cygnus.com>
13368
13369 * check-init.c (check_bool2_init, check_bool_init, check_init):
13370 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
13371 * jcf-write.c (generate_bytecode_insns): Likewise.
13372
13373 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13374
13375 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
13376 * parse.y (patch_cast): Allow a boolean to be cast into a
13377 boolean.
13378
13379 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13380
13381 * parse.y: (class_declaration:): Fixed indentation.
13382 (class_member_declaration:): Extra `;' after field declaration now
13383 accepted.
13384 (interface_declaration:): Removed debug messages in error reports.
13385 (patch_binop): Nodes created and returned inherit the orignal
13386 node's COMPOUND_ASSIGN_P flag value.
13387 (patch_cast): Fix cast from char to floating point.
13388
13389 1999-01-25 Andrew Haley <aph@cygnus.com>
13390
13391 * except.c, java-except.h (expand_resume_after_catch): new
13392 function.
13393 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
13394 to branch back to main flow of control after a catch block.
13395
13396 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13397
13398 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
13399 $(srcdir)/../system.h.
13400 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
13401 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
13402 (jcf-write.o): Likewise.
13403 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13404 (mangle.o): Depend on $(srcdir)/../toplev.h.
13405 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13406 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13407
13408 * class.c: Include output.h and parse.h.
13409 (mangled_classname): Add the `const' keyword to a char*.
13410 (find_named_method): Hide unused function definition.
13411 (build_utf8_ref): Change type of variable `c' to unsigned char.
13412 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
13413 (build_class_ref): Add the `const' keyword to a char*.
13414 (layout_class_method): Remove unused variable `buf'.
13415
13416 * decl.c (find_local_variable): Remove unused variable `rtl'.
13417 (pushdecl): Likewise for variables `different_binding_level' and
13418 `oldglobal'.
13419 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
13420 (maybe_build_cleanup): Likewise for parameter `decl'.
13421
13422 * except.c (expand_start_java_handler): Mark parameter `range'
13423 with ATTRIBUTE_UNUSED.
13424
13425 * expr.c: Include except.h.
13426 (pop_type): Remove unused variable `i'.
13427 (pop_value): Likewise for variables `n_words' and `i'.
13428 (expand_java_arrayload): Likewise for variable `convert'.
13429 (java_lang_expand_expr): Likewise for variables `op0', `type',
13430 `mode', `unsignedp', `node' and `elements'.
13431 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
13432 `eh_ranges'.
13433 (process_jvm_instruction): Add a `const' qualifier to a char*.
13434
13435 * gjavah.c (output_directory): Add the `const' keyword to a char*.
13436 (temp_directory): Likewise.
13437 (print_c_decl): Likewise.
13438 (print_method_info): Likewise.
13439 (decode_signature_piece): Likewise.
13440 (print_mangled_classname): Likewise.
13441
13442 * java-except.h: Provide prototypes for maybe_start_try,
13443 maybe_end_try and add_handler.
13444
13445 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
13446 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
13447 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
13448 init_expr_processing, push_super_field, init_class_processing,
13449 can_widen_reference_to, class_depth, verify_jvm_instructions,
13450 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
13451 set_local_type, merge_type_state, push_type, load_type_state,
13452 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
13453 emit_unicode_mangled_name): Add prototypes.
13454
13455 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
13456 (print_signature_type): Use ISDIGIT, not isdigit.
13457 (print_signature): Remove unused variable `j'.
13458
13459 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
13460 int when comparing against one.
13461
13462 * jcf-parse.c: Include toplev.h.
13463
13464 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
13465 (localvar_free): Remove unused variable `i'.
13466 (generate_bytecode_conditional): Likewise for variable `kind'.
13467
13468 * jv-scan.c: Include config.h and system.h. Remove redundant
13469 OS header and gansidecl.h includes.
13470 (warning): Add the `const' keyword to a char*. Also add
13471 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
13472 __STDC__, when determining whether to use ANSI-isms.
13473 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
13474 (xmalloc): Don't redundantly prototype here.
13475 (main): Remove unused parameter `envp'. Also fix the arguments
13476 passed to function `fatal' to match the format specifier.
13477
13478 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
13479
13480 * mangle.c: Include toplev.h.
13481 (emit_unicode_mangled_name): Declare parameter `len'.
13482
13483 * parse.y (parse_warning_context): Add the `const' keyword to a
13484 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
13485 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
13486 (issue_warning_error_from_context): Add the `const' keyword to
13487 a char*.
13488 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
13489 not `__STDC__' for whether to use ANSI-isms.
13490
13491 * typeck.c (incomplete_type_error): Mark parameters `value' and
13492 `type' with ATTRIBUTE_UNUSED.
13493 (parse_signature_type): Use ISDIGIT, not isdigit.
13494
13495 * verify.c (check_pending_block): Add the `const' keyword to a char*.
13496 (verify_jvm_instructions): Likewise. Remove unused variables
13497 `field_name' and `default_val'.
13498
13499 * zextract.c: Include config.h and system.h. Remove redundant
13500 OS header includes.
13501
13502 * zipfile.h: Prototype `read_zip_archive'.
13503
13504 1999-01-21 Andrew Haley <aph@cygnus.com>
13505
13506 * typeck.c (convert): Allow conversions to void type: some
13507 optimizations in gcc do this.
13508
13509 1999-01-21 Andrew Haley <aph@cygnus.com>
13510
13511 * typeck.c (convert_ieee_real_to_integer): New function.
13512 (convert): When not using fast-math and using hardware fp, convert
13513 an IEEE NaN to zero.
13514
13515 1999-01-18 Andrew Haley <aph@cygnus.com>
13516
13517 * parse.y (patch_binop): Do a type conversion from signed to
13518 unsigned and then back to signed when a ">>>" is found.
13519
13520 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13521
13522 * java-tree.h: (check_for_initialization): Added prototype.
13523 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
13524 * parse.y (do_resolve_class): Removed unused locals.
13525 (read_import_dir): Likewise.
13526 (resolve_qualified_expression_name): Array creation
13527 expressions are valid primary expressions.
13528 (qualify_ambiguous_name): Likewise.
13529 (patch_synchronized_statement): Removed unused local.
13530
13531 1999-01-17 Jeffrey A Law (law@cygnus.com)
13532
13533 * Makefile.in (zextract.o): Add dependencies.
13534
13535 * Makefile.in: Do not put ^Ls at the start of a line.
13536
13537 1999-01-15 Per Bothner <bothner@cygnus.com>
13538
13539 * expr.c (process_jvm_instruction): Coerce to correct Throwable
13540 sub-type the result of the call that gets the exception value.
13541
13542 * parse.y (java_complete_expand_methods): If flags_syntax_only,
13543 don't call finish_class.
13544
13545 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
13546 clear found before continuing.
13547
13548 * verify.c (verify_jvm_instructions): On an array load, allow
13549 and handle top of stack to be TYPE_NULL.
13550
13551 * gjavah.c (generate_access): Translate Java package private or
13552 protected access to C++ public, but with a comment.
13553
13554 1999-01-13 Andrew Haley <aph@cygnus.com>
13555
13556 * expr.c (generate_name): Name prefix changed to avoid clashes
13557 with assembler temp labels.
13558
13559 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
13560 MODIFY_EXPR. Without this, code for the assignment may not be
13561 generated at all and the synchronized statement will read an
13562 uninitialized variable.
13563
13564 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13565
13566 * class.c (maybe_layout_super_class): Fixed returned value.
13567 * lex.c: Added 1999 to the copyright.
13568 (java_init_lex): Initialize java_lang_imported.
13569 * lex.h: Added 1999 to the copyright.
13570 * parse.h: Added 1999 to the copyright.
13571 (REGISTER_IMPORT): Fixed typo in trailing macro.
13572 (CURRENT_OSB): New macro.
13573 (struct parser_ctxt): New fields osb_depth, osb_limit.
13574 * parse.y (java_lang_id): New global variable.
13575 (type_import_on_demand_declaration): Don't import java.lang.* twice.
13576 (array_creation_expression:): Use CURRENT_OSB.
13577 (dims:): Uses a stack to keep track of array dimensions.
13578 (cast_expression:): Use CURRENT_OSB.
13579 (find_expr_with_wfl): Return NULL if node found doesn't meet the
13580 conditions.
13581 (register_fields): Fixed typos in comment.
13582 (check_method_redefinition): Fixed comment indentation.
13583 (java_check_regular_methods): Set saved found wfl to NULL after
13584 having reinstalled it in the previously found DECL_NAME.
13585
13586 1999-01-10 Richard Henderson <rth@cygnus.com>
13587
13588 * gjavah.c (java_float_finite): Use a union to do type punning.
13589 (java_double_finite): Likewise.
13590
13591 1999-01-09 Per Bothner <bothner@cygnus.com>
13592
13593 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
13594 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
13595 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
13596 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
13597 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
13598 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
13599
13600 1999-01-08 Per Bothner <bothner@cygnus.com>
13601
13602 * check-init.c (check_init): If compiling to native, we don't
13603 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
13604
13605 1999-01-08 Tom Tromey <tromey@cygnus.com>
13606
13607 * parse-scan.y (variable_declarator_id): Set or increment
13608 bracket_count.
13609 (bracket_count): New global.
13610 (formal_parameter): Handle case where bracket pairs trail variable
13611 declarator id.
13612
13613 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
13614
13615 * jcf-parse.c (yyparse): variable len changed from a char to an
13616 int to prevent overflow.
13617
13618 1999-01-06 Per Bothner <bothner@cygnus.com>
13619
13620 * java-tree.h: Declare read_class.
13621 * jcf-parse.c (read_class): New function.
13622 (load_class): Now just call read_class.
13623
13624 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
13625 * jcf-parse.c (parse_source_file): Declare save_error_count,
13626 which is needed by java_parse_abort_on_error macro,
13627 * parse.y (java_layout_classes, java_expand_classes): Likewise.
13628
13629 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
13630 constructor, if initializing a static field.
13631 (patch_new_array_init): Set TREE_CONSTANT if it is.
13632 * expr.c (java_lang_expand_expr): For a static array constructor
13633 of primitive elements, allocate the array itself statically.
13634 Disabled until we can set the vtable field statically.
13635
13636 * check-init.c: New file. Checks for definite assignment.
13637 * Makefile.in (JAVA_OBJS): Add check-init.o.
13638 * parse.y (java_complete_expand_method): Call check_for_initialization.
13639 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
13640
13641 1999-01-06 Graham <grahams@rcp.co.uk>
13642
13643 * parse.y : include system.h instead of including
13644 standard headers directly with the exception of <dirent.h>.
13645
13646 1999-01-06 Per Bothner <bothner@cygnus.com>
13647
13648 * lex.h: Moved static function declarations to lex.c,
13649 to shut up some -Wall warnings.
13650 * lex.c: Static function declarations moved here.
13651 * jcf-dump.c: Small fixes to shut up -Wall warnings.
13652
13653 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13654
13655 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
13656
13657 1998-12-22 Per Bothner <bothner@cygnus.com>
13658
13659 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
13660 * verify.c (verify_jvm_instructions): Fix off-by-one error.
13661
13662 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
13663 (localvar_alloc): Change return type to void,
13664 (emit_unop): Remove unused variable size.
13665
13666 * jcf-write.c (struct jcf_block): Add new union.
13667 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
13668 (call_cleanups): New functions.
13669 (struct jcf_partial): New fields num_finalizers and return_value_decl.
13670 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
13671 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
13672 * lang.c (lang_init): Call using_eh_for_cleanups.
13673 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
13674 completing operands to patch_synchronized_statement.
13675 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
13676 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
13677 WITH_CLEANUP_EXPR instead of TRY_EXPR.
13678
13679 1998-12-20 John F. Carr <jfc@mit.edu>
13680
13681 * Make-lang.in: Comment out control-Ls; they upset some makes.
13682
13683 1998-12-18 Tom Tromey <tromey@cygnus.com>
13684
13685 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
13686 consistently.
13687
13688 1998-12-17 Tom Tromey <tromey@cygnus.com>
13689
13690 * parse.y (DIR_SEPARATOR): New define.
13691 (check_class_interface_creation): Use it.
13692
13693 * parse-scan.y (report_main_declaration): Recognize
13694 `java.lang.String' in argument to main.
13695
13696 1998-12-16 Per Bothner <bothner@cygnus.com>
13697
13698 * parse.y (create_interface): Remove bogus test.
13699
13700 1998-12-16 Per Bothner <bothner@cygnus.com>
13701
13702 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
13703 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
13704
13705 1998-12-16 Tom Tromey <tromey@cygnus.com>
13706
13707 * parse-scan.y (qualified_name): Use correct sprintf format.
13708
13709 1998-12-15 Tom Tromey <tromey@cygnus.com>
13710
13711 * gjavah.c (print_field_info): Changed how most negative number is
13712 printed.
13713
13714 1998-12-14 Per Bothner <bothner@cygnus.com>
13715
13716 * parse.y (fold_constant_for_init): New function.
13717 (resolve_expression_name): Don't replace static final
13718 constant-initialized fields by its value.
13719 (java_complete_lhs): New. Same as java_complete_tree, except does
13720 not replace static final constant-initialized fields by their values.
13721 (register_fields): If there is an initializer, set DECL_INITIAL and
13722 MODIFY_EXPR_FROM_INITIALIZATION_P.
13723 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
13724 Only call patch_initialized_static_field if
13725 MODIFY_EXPR_FROM_INITIALIZATION_P.
13726 (patch_initialized_static_field): If not valid constant, clear
13727 DECL_INITIAL.
13728
13729 * parse.y (lookup_field_wrapper): Fix thinko.
13730
13731 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
13732 set and restore global lineno.
13733
13734 1998-12-14 Tom Tromey <tromey@cygnus.com>
13735
13736 * gjavah.c (print_field_info): If value to print is the smallest
13737 value of its size, then print as hex to avoid later warnings from
13738 C++ compiler.
13739
13740 1998-12-14 Tom Tromey <tromey@cygnus.com>
13741
13742 * gjavah.c (decompile_method): Decompile `return null'.
13743 (process_file): Generate `#pragma interface'.
13744 (method_declared): New global.
13745 (print_method_info): Set it.
13746 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
13747 (print_method_info): Handle abstract methods.
13748
13749 1998-12-13 Per Bothner <bothner@cygnus.com>
13750
13751 * parse.y (patch_method_invocation): If class_decl is null
13752 (e.g. an array type), use original type.
13753
13754 * parse.y (check_thrown_exceptions): Temporary hack to suppress
13755 errors about uncaught exception from clone (of array, specifically).
13756
13757 1998-12-13 Tom Tromey <tromey@cygnus.com>
13758
13759 * gjavah.c (decompile_method): Handle all types of `return'
13760 opcode. Decompile `return this' and `return'.
13761 (method_access): New global.
13762 (print_method_info): Set it.
13763 (decompile_method): Don't decompile a synchronized method.
13764
13765 1998-12-13 Tom Tromey <tromey@cygnus.com>
13766
13767 * jcf-reader.c (jcf_parse_one_method): Recognize
13768 HANDLE_END_METHOD.
13769 * gjavah.c (HANDLE_END_METHOD): New macro.
13770 (HANDLE_CODE_ATTRIBUTE): New macro.
13771 (decompile_method): New function.
13772 (print_method_info): Don't print `;\n' at end of function decl.
13773 Include java-opcodes.h.
13774 (decompiled): New global.
13775
13776 1998-12-12 Per Bothner <bothner@cygnus.com>
13777
13778 * class.c (build_class_ref): Handle PRIMTYPE.class if
13779 flag_emit_class_files.
13780 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
13781 if flag_emit_class_files.
13782 * parse.y (java_complete_tree): Pre-liminary support for
13783 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
13784
13785 * parse.y (patch_synchronized_statement): Don't call monitorexit
13786 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
13787
13788 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
13789
13790 * zipfile.h (opendir_in_zip): New declaration.
13791 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
13792 (opendir_in_zip): New function, using code from open_in_zip.
13793 (open_in_zip): Call opendir_in_zip.
13794 (find_class): Remove no-longer-used do_class_file parameter,
13795 but add source_ok parameter. Change logic so if we find a .java file,
13796 we don't look for .class in later classpath emtries.
13797 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
13798 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
13799 * gjavah.c: Update call to find_class.
13800 * jcf-dump.c: Likewise.
13801
13802 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
13803 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
13804 nothing if body is empty_stmt_node.
13805 Various little fixes so SP gets correctly adjusted.
13806 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
13807 For CALL_EXPR, test if static first.
13808 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
13809 such as the ones we create for Object and Class.
13810 Set and restore current_function_decl.
13811 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
13812 (note_possible_classname): New function.
13813 (read_import_entry): Removed. Merged with read_import_dir.
13814 (read_import_dir): Don't call find_class - that only gives us
13815 the first classpath entry having the needed package.
13816 Use the struct buffer data structure from buffer.h.
13817 (read_import_dir, find_in_imports_on_demand): The remembered
13818 class names now use '.' (not '/') as package separator.
13819
13820 * parse.y (java_complete_expand_methods): Call write_classfile
13821 here, and not in java_expand_classes (which only gets first class).
13822
13823 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
13824
13825 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
13826 (register_fields): If a static fields has an initializer, just
13827 chain it on ctxp->static_initialized, and handle later.
13828 (java_complete_expand_methods): Force <clinit> first.
13829 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
13830 - it's already been completed.
13831 (patch_initialized_static_field): New function.
13832 (java_complete_field): Call it.
13833
13834 1998-12-12 Per Bothner <bothner@cygnus.com>
13835
13836 * expr.c (encode_newarray_type, build_new_array): New functions.
13837 * java-tree.h: Declare build_new_array.
13838 * jcf-write.c (patch_newarray): Use build_new_array.
13839
13840 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
13841 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
13842
13843 * parse.y (patch_new_array_init): Re-organize.
13844 Now is passed the actual array (pointer) type of the value.
13845 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
13846 (patch_array_constructor): Removed - merged into patch_new_array_init.
13847 (java_complete_tree): Update patch_new_array_init.
13848
13849 * jcf-write.c (find_constant_index): New function.
13850 (generate_bytecode_insns): Use find_constant_index.
13851 (generate_classfile): Use find_constant_index for ConstantValue.
13852
13853 1998-12-11 Tom Tromey <tromey@cygnus.com>
13854
13855 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
13856 * decl.c (init_decl_processing): Renamed dtable -> vtable.
13857 * class.c (make_class_data): Renamed dtable -> vtable, and
13858 dtable_method_count -> vtable_method_count.
13859
13860 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13861
13862 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
13863 global variables, initialized.
13864 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
13865 Declared new global variables.
13866 * lex.c (java_lex): Return long_zero_node, float_zero_node,
13867 double_zero_node, integer_zero_node upon direct matching.
13868 * parse.y (purify_type_name): Added function prototype.
13869 (duplicate_declaration_error_p): Consider new_type as potentially
13870 being a incomplete type. Use purify_type_name on type string.
13871 (method_header): saved_type: unused variable removed. Don't figure
13872 return type if method name is invalid.
13873 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
13874 processed by patch_unaryop.
13875 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
13876 increment/decrement node into its original type after binary
13877 numeric promotion on its operands.
13878
13879 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13880
13881 * parse.y (array_initializer:): Array init operand is NULL_TREE
13882 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
13883 now an error. Fixed indentation problems.
13884 (patch_string): Handle error_mark_node as an argument.
13885 (patch_new_array_init): Fixed indentation problems.
13886 (array_constructor_check_entry): Removed check on null wfl_value.
13887 Return an error if wfl_value's walk returns an error.
13888
13889 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13890
13891 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
13892 * lex.c (java_lex): Remember column position before advancing one
13893 token. Retain location information on OCB_TK.
13894 * lex.h (typedef struct java_lc): Added new field.
13895 * parse.h (GET_SKIP_TYPE): New macro.
13896 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
13897 * parse.y (build_new_array_init, patch_new_array_init,
13898 patch_array_constructor, maybe_build_array_element_wfl,
13899 array_constructor_check_entry): New function prototypes.
13900 (switch_block:): Tagged <node>.
13901 (OCB_TK): Tagged <operator>.
13902 (array_initializer:): Installed actions.
13903 (variable_initializer): Build location information on element if
13904 necessary.
13905 (switch_statement:): Fixed indentation typo.
13906 (switch_block:): Redefined default action.
13907 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
13908 (patch_assignment): Removed duplicate code.
13909 (maybe_build_array_element_wfl, build_new_array_init,
13910 patch_new_array_init, patch_array_constructor,
13911 array_constructor_check_entry): New functions.
13912
13913 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13914
13915 * parse.y (array_initializer): Tagged <node>.
13916 (variable_initializer:): Use default rule.
13917 (array_initializer:): Defined actions.
13918 (variable_initializers:): Likewise.
13919 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
13920 non-static field accesses.
13921 (patch_invoke): Fixed indentation typo.
13922 (java_complete_tree): Likewise.
13923 (build_labeled_block): Changed leading comment. Generate an error
13924 in case of duplicate loop labels.
13925 (patch_conditional_expr): Patch results of string concatenation
13926 operations.
13927
13928 1998-12-06 Per Bothner <bothner@cygnus.com>
13929
13930 * constants.c (find_methodref_index): When the class is an interface,
13931 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
13932
13933 * decl.c (finit_identifier_node): Use "$finit$", rather than
13934 "<finit>" (which Sun's verifier rejects).
13935 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
13936 (generate_field_initialization_code): Removed.
13937 (fix_constructors) Don't add call to $finit$ here (wrong order).
13938 (patch_method_invocation): Add $finit$ call here.
13939
13940 * java-tree.h (CALL_USING_SUPER): New macro.
13941 * parse.y (patch_invoke): Remove im local variable.
13942 (patch_method_invocation, patch_invoke): Don't pass super parameter.
13943 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
13944 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
13945
13946 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
13947
13948 * parse.y (java_complete_tree): Don't complain about unreachable
13949 statement if it is empty_stmt_node.
13950
13951 * jcf-write.c (find_constant_wide): New function.
13952 (push_long_const): Use find_constant_wide.
13953
13954 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
13955 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
13956 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
13957 Emit invokeinterface when calling an interface method.
13958 Emit invokespecial also when calling super or private methods.
13959
13960 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
13961
13962 1998-12-06 Per Bothner <bothner@cygnus.com>
13963
13964 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
13965
13966 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
13967
13968 * java-tree.h (java_layout_seen_class_methods): New function
13969 prototype.
13970 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
13971 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
13972 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
13973 * parse.y (method_declarator:): Defined action.
13974 (issue_warning_error_from_context): input_filename saved, set to
13975 the appropriate value and restored after java_error is called.
13976 (build_unresolved_array_type): Fixed comment.
13977 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
13978 (method_header): Deal with return type the same way type are
13979 handled for fields and method's parameters and local variables
13980 types are handled.
13981 (check_method_redefinition): Removed extra CR.
13982 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
13983 (java_layout_seen_class_methods): New function.
13984 (java_layout_classes): Call java_layout_seen_class_methods.
13985
13986 1998-12-03 Per Bothner <bothner@cygnus.com>
13987
13988 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
13989
13990 1998-12-03 Per Bothner <bothner@cygnus.com>
13991
13992 * jcf-dump.c (main): Fix error message.
13993 * jcf-path.c (add_entry): Style fix.
13994
13995 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13996
13997 * class.c (layout_class_method): Call build_java_argument_signature
13998 on constructors too.
13999 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
14000 (patch_method_invocation): Define a primary when resolving an
14001 expression name. Augmented comment on code checking illegal `this'
14002 usage. Loosened it test by accepting NEW_CLASS_EXPR.
14003
14004 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14005
14006 * class.c (layout_class_method): Don't report error on non-static
14007 overriding static if the method is private.
14008 * java-tree.h (finish_class): Prototype added.
14009 * lex.c (java_get_line_col): Handle col argument -2 value.
14010 * parse.h: All static method declarations moved to parse.y.
14011 * parse.y: Now contains all static method declarations previously
14012 found in parse.h.
14013 (find_expr_with_wfl, missing_return_error,
14014 unreachable_stmt_error): New functions.
14015 (java_get_real_method_name): Identify constructors bearing class
14016 names in source code compiled classes only.
14017 (java_complete_expand_methods): Call missing_return_error.
14018 (invocation_mode): Private methods invoked as static methods.
14019 (java_complete_tree): Call unreachable_stmt_error.
14020
14021 1998-12-01 Tom Tromey <tromey@cygnus.com>
14022
14023 * Makefile.in (+target): Removed.
14024 (+xmake_file): Likewise.
14025 (+tmake_file): Likewise.
14026 (.NOEXPORT): Removed duplicate.
14027
14028 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14029
14030 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
14031
14032 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
14033
14034 * jvgenmain.c: Remove the xmalloc prototype, we get it from
14035 libiberty.h. Provide an xmalloc definition.
14036
14037 * jvspec.c: Remove the xmalloc prototype.
14038
14039 * parse-scan.y: Include config.h and system.h. Don't include
14040 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
14041 Provide an xstrdup definition.
14042
14043 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
14044
14045 * jcf-path.c (add_entry): Recognize ".jar" too.
14046 * lang-specs.h: Likewise.
14047
14048 1998-11-26 Per Bothner <bothner@cygnus.com>
14049
14050 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
14051 soft_monitorenter_node, soft_monitorexit_node, throw_node.
14052
14053 * jcf-write.c (generate_bytecode_insns):
14054 Handle pre/post-increment/decrement of long.
14055
14056 * jcf-write.c (generate_bytecode_insns):
14057 Handle missing exception handler (finally for synchronized).
14058
14059 1998-11-25 Per Bothner <bothner@cygnus.com>
14060
14061 * java-tree.h (end_params_node): Declare global.
14062 * decl.c (end_params_node): New global.
14063 (init_decl_processing, start_java_method): Use end_params_node for
14064 end of list of parameter types. Follows correct gcc conventions.
14065 * expr.c (pop_argument_types, pop_arguments): Likewise.
14066 * lang.c (put_decl_node): Likewise.
14067 * typeck.c (various places): Likewise.
14068 * class.y (various places): Likewise.
14069 * parse.y (various places): Likewise.
14070
14071 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
14072 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
14073
14074 * class.c: Add #include flags.h, remove no-longer needed declaration.
14075
14076 * class.c (layout_class_method): Remove commented-out code, re-format.
14077 Don't add vtable entry (or index) for private methods.
14078 * expr.c (expand_invoke): A private method is implicitly final.
14079 * class.c (make_class_data): If inlining or optimizing,
14080 skip private methods.
14081
14082 * class.c (finish_class): New function. Calls existing methods,
14083 but alls emits deferred inline functions.
14084 * jcf-parse.c (parse_class_file): Call finish_class.
14085 * parse.y (java_complete_expand_methods): Likewise.
14086
14087 * expr.c (build_java_binop): Explicit default, to silence -Wall.
14088
14089 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
14090
14091 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
14092
14093 * jcf-write.c (generate_bytecode_conditional): Fix typo.
14094
14095 1998-11-24 Per Bothner <bothner@cygnus.com>
14096
14097 * (generate_classfile): Always write class access flag with
14098 ACC_SUPER set.
14099
14100 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14101
14102 * class.c (maybe_layout_super_class): New function.
14103 (layout_class): Reorganized. Loop on class methods dispatched into
14104 a new function. Call maybe_layout_super_class.
14105 (layout_class_methods, layout_class_method): New functions.
14106 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
14107 class.
14108 (expand_invoke): Likewise.
14109 * java-tree.h (all_class_list): New global variable declared.
14110 (layout_class_methods, layout_class_method): New function
14111 prototypes.
14112 (LAYOUT_SEEN_CLASS_METHODS): New macro.
14113 * jcf-parse.c (all_class_list): New global variable.
14114 (load_class): Extended what class_or_name can be. Use parser
14115 context mechanism to save globals before calling jcf_parse.
14116 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
14117 is set on the file name.
14118 (jcf_parse): Layout class methods when Object is loaded, otherwise
14119 record class in all_class_list for delayed method layout.
14120 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
14121 * lang.c (put_decl_node): Decode <init> into the decl context
14122 class name.
14123 * lex.c (java_allocate_new_line): Use xmalloc.
14124 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
14125 pointers, not TREE_LIST elements.
14126 (struct parser_ctxt): Fixed comment indentations, added comments
14127 and reordered some fields.
14128 (java_check_methods): Function prototype removed.
14129 * parse.y (java_push_parser_context): Use xmalloc.
14130 (java_parser_context_restore_global): Pop extra pushed ctxp only
14131 when there's nothing next.
14132 (maybe_create_class_interface_decl): Fixed comment, add new
14133 created class decl to all_class_list.
14134 (method_header): Use GET_REAL_TYPE on argument's types.
14135 (method_declarator): Use GET_REAL_TYPE, change type to the real
14136 type in TREE_LIST dependency node. Build argument list with the
14137 real type.
14138 (create_jdep_list): Use xmalloc. Removed allocation error message.
14139 (obtain_incomplete_type): Fixed leading comment. Broadened
14140 incoming argument meaning.
14141 (register_incomplete_type): Use xmalloc. Removed allocation error
14142 message.
14143 (safe_layout_class): Fixed leading comment.
14144 (jdep_resolve_class): Reversed if statement condition and switch
14145 if and else bodies.
14146 (resolve_and_layout): Fixed leading comment. Broadened incoming
14147 argument meaning.
14148 (complete_class_report_errors): New local variable name, for
14149 clarity. purify_type_name used for all error cases.
14150 (java_get_real_method_name): Stricter check on constructors.
14151 (java_check_regular_methods): Reverse methods list only if not
14152 already laid out. Layout artificial constructor.
14153 (java_check_methods): Deleted.
14154 (source_start_java_method): Obtain incomplete type for patchable
14155 method arguments.
14156 (java_layout_classes): Fixed leading comment. Use
14157 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
14158 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
14159 before returning. Fixed comments.
14160 (java_expand_classes): Check for errors up front.
14161 (patch_method_invocation): Class to search is resolved and laid
14162 out.
14163
14164 1998-11-24 Per Bothner <bothner@cygnus.com>
14165
14166 * expr.c (java_lang_expand_expr): Add missing emit_queue.
14167
14168 * javaop.h (int8): Removed - not used.
14169 (jbyte): Redefine portably with correct signedness.
14170
14171 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
14172
14173 * jcf-write.c (generate_bytecode_insns): Fix typo
14174 OPCODE_getstatic to OPCODE_getfield.
14175
14176 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
14177 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
14178 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
14179
14180 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14181
14182 * jcf-parse.c (jcf_parse_source): Function returned type is
14183 void. Added prototype.
14184 (jcf_parse): Function returned type is void.
14185 (yyparse): Remove call to fclose on the last parsed file.
14186
14187 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
14188
14189 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14190
14191 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
14192 (layout_class): Cope with methods featuring WFL in decl names.
14193 * decl.c (unqualified_object_id_node): New global variable,
14194 initialized.
14195 (build_decl_no_layout): Removed.
14196 * expr.c (build_primtype_type_ref): Handle Double.
14197 (java_lang_expand_expr): Fixed indentations.
14198 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
14199 (flag_wall, flag_redundant, flag_not_overriding,
14200 flag_static_local_jdk1_1, unqualified_object_id_node): Global
14201 variable declarations.
14202 (build_decl_no_layout): Removed prototype.
14203 (java_get_real_method_name): Added prototype.
14204 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
14205 (java_parse_abort_on_error): Macro now just returns.
14206 * jcf-parse.c (jcf_parse_source): Check fclose returned
14207 value. Call emit_register_classes if java_report_errors returns
14208 zero.
14209 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
14210 flag_static_local_jdk1_1): New integer flags.
14211 (lang_decode_option): New flags set here.
14212 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
14213 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
14214 the flag_redundant variable.
14215 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
14216 when parsing java.lang.Object class.
14217 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
14218 NULL_TREE to build.
14219 (resolve_qualified_expression_name): Fixed indentation.
14220 (patch_array_ref): Changed prototype.
14221 (not_initialized_as_it_should_p): Prototype removed.
14222 (java_report_errors): Added function prototype.
14223 * parse.y (formal_parameter:): Changed error message for not yet
14224 supported final parameters.
14225 (class_type_list:): Set both PURPOSE and VALUE of created
14226 TREE_LIST to be class_type.
14227 (primary_no_new_array:): Handle class literals on primitive types.
14228 (parse_warning_context): Reinstalled correct force_error and
14229 do_warning flags setups.
14230 (java_report_errors): Changed prototype. Return java_error_count
14231 value.
14232 (variable_redefinition_error): Consider treating variable type as
14233 a fake pointer.
14234 (create_interface): Warn about redundant abstract modifier if
14235 flag_redundant is set. Changed error message.
14236 (lookup_field_wrapper): Save/restore globals before/after looking
14237 up field.
14238 (duplicate_declaration_error_p): Consider treating declaration
14239 type as a fake pointer.
14240 (register_fields): Extract real type from dependency node. Check
14241 for duplicate field declaration after type adjustment. Use
14242 DECL_INITIAL to store static final initialized values.
14243 (method_header): Extract real function type from dependency node.
14244 (check_abstract_method_header): Use GET_METHOD_NAME.
14245 (obtain_incomplete_type): Layout fake pointer type.
14246 (safe_layout_class): Don't try to check for methods before layout.
14247 (java_complete_class): Don't check for correct throws clause
14248 elements inheritance here.
14249 (resolve_and_layout): Broadened name parameter meaning.
14250 (reset_method_name): Use GET_METHOD_NAME.
14251 (java_get_real_method_name): New function.
14252 (java_check_regular_methods): Don't check methods in
14253 java.lang.Object. Verify lineage of throws clause elements. Use
14254 flag_no_overriding in warning report.
14255 (check_throws_clauses): Don't check if class was from
14256 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
14257 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
14258 (declare_local_variables): Use flag_static_local_jdk1_1 to report
14259 warning on unsupported final local variables. Use build_decl
14260 instead of build_decl_no_layout. Get real local variable type from
14261 dependency node.
14262 (source_start_java_method): Get real parameter type from
14263 dependency node. Call build_decl instead of build_decl_no_layout.
14264 (java_layout_classes): Reverse tree and layout type and class as
14265 required. Mark class as loaded when done.
14266 (resolve_field_access): Fixed indentation. Restricted condition
14267 leading to static field access code generation. Set field_type
14268 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
14269 (resolve_qualified_expression_name): Initialize type_found to
14270 null. Handle static field resolved during qualification. Fixed
14271 layout on non primitive field decl types.
14272 (not_accessible_p): Fixed typo in comment.
14273 (patch_method_invocation): Resolve and layout class to search from
14274 type.
14275 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
14276 layout non primitive type, if necessary. Make method node only to
14277 report errors.
14278 (find_applicable_accessible_methods_list): Consider WFL'ed method
14279 decl names. Fixed indentation.
14280 (argument_types_convertible): Resolve and layout target type if
14281 necessary.
14282 (java_complete_tree): Fixed indentation problems. Rewrote
14283 CALL_EXPR thrown exceptions check. Re-installed further processing
14284 of the assignment in certain cases.
14285 (patch_assignment): Call maybe_build_primttype_type_ref to perform
14286 inlining on class literals.
14287 (valid_builtin_assignconv_identity_widening_p): Cope with constant
14288 0 literal.
14289 (valid_method_invocation_conversion_p): Likewise.
14290 (patch_string): Temporary disable forbidden use of `this' in
14291 explicit constructor invocations when doing string concatenation
14292 within their scope.
14293 (patch_unaryop): Added comment. Reinstalled code to disable
14294 further check on assignment operation with cast expression RHS.
14295 (patch_switch_statement): Fixed indentation.
14296 (build_try_statement): Call build_decl instead of
14297 build_decl_no_layout.
14298 (patch_synchronized_statement): Likewise.
14299 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
14300 IS_UNCHECKED_EXPRESSION_P.
14301 (check_thrown_exceptions_do): Changed leading comment. Resolve and
14302 layout argument exception type.
14303 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
14304 of IS_UNCHECKED_EXPRESSION_P.
14305
14306 1998-11-18 Anthony Green <green@cygnus.com>
14307
14308 * jcf-parse.c (yyparse): Open class file in binary mode.
14309
14310 1998-11-15 Per Bothner <bothner@cygnus.com>
14311
14312 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
14313
14314 * jcf-write.c (perform_relocations): Move check out one loop.
14315
14316 1998-11-15 Anthony Green <green@hoser.cygnus.com>
14317
14318 * Make-lang.in: Fix reference to srcdir.
14319 * jv-scan.c: Add missing xmalloc prototype.
14320 * jvgenmain.c: Ditto.
14321
14322 1998-11-15 Per Bothner <bothner@cygnus.com>
14323
14324 * decl.c (error_mark_node), java-tree.h: New global.
14325 * parse.y: Use empty_stmt_node instead of size_zero_node.
14326 (build_if_else_statement): If missing else, use empty_stmt_node.
14327
14328 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
14329 (java_complete_expand_method): Complain if return is missing.
14330 (java_check_regular_methods): Comment out incorrect error check.
14331 (not_accessible_p): Fix incorrect handling of protected methods.
14332 (patch_method_invocation): Pass correct context to not_accessible_p.
14333 (find_applicable_accessible_methods_list): Likewise.
14334 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
14335 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
14336 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
14337 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
14338
14339 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
14340 (push_int_const): Remove reundant NOTE_PUSH.
14341 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
14342 (- case SWITCH_EXPR): Fix code generation bug.
14343 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
14344 (generate_classfile): More robust for abstract methods.
14345
14346 1998-11-15 Anthony Green <green@cygnus.com>
14347
14348 * Makefile.in: jv-scan and jvgenmain all require libiberty.
14349 * Make-lang.in: Ditto.
14350
14351 * jv-scan.c: Remove xmalloc and xstrdup definitions.
14352 * jvgenmain: Ditto.
14353
14354 1998-11-15 Per Bothner <bothner@cygnus.com>
14355
14356 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
14357
14358 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
14359
14360 1998-11-14 Per Bothner <bothner@cygnus.com>
14361
14362 Allow uses of interface types to verify. This is not really
14363 type-safe, but it matches what Sun does, and is OK as long as
14364 there are appropriate run-time checks.
14365 * verify.c (merge_types): If merging two interface types,
14366 just set the result to java.lang.Object.
14367 * expr.c (pop_type): Any interface is matches by java.lang.Object.
14368
14369 1998-11-13 Tom Tromey <tromey@cygnus.com>
14370
14371 * gjavah.c (main): Handle --output-class-directory argument.
14372 * jvspec.c (lang_specific_driver): Translate `-d' into
14373 -foutput-class-dir.
14374 * jcf.h (jcf_write_base_directory): Declare.
14375 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
14376 * lang-options.h: Mention -foutput-class-dir.
14377 * jcf-write.c (jcf_write_base_directory): New global.
14378 (make_class_file_name): Put generated .class file into `-d'
14379 directory, or into source directory if -d not given. Function now
14380 static.
14381 (write_classfile): Free class file name. Handle case where class
14382 file name is NULL.
14383 (DIR_SEPARATOR): New macro.
14384 Include <sys/stat.h>
14385
14386 * Makefile.in (prefix): New macro.
14387
14388 1998-11-12 Per Bothner <bothner@cygnus.com>
14389
14390 * parse.y (patch_invoke): Do less if flag_emit_class_files.
14391 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
14392 here (done in patch_invoke instead).
14393 (case_identity): Moved here from parse.y.
14394
14395 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
14396 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
14397 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
14398 so they can be efficiently scanned without recursion.
14399 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
14400 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
14401 in BLOCK iteratively, rather than recursively.
14402
14403 * parse.y (do_unary_numeric_promotion): New function.
14404 (patch_unaryop, patch_binop, patch_array_ref): Use it.
14405
14406 * parse.y (patch_newarray): Various fixes.
14407
14408 Re-do handling of switch statements (for proper block scoping).
14409 * parse.y: Add just a single block for the enture switch block,
14410 but don't create any "case blocks".
14411 (group_of_labels): Rmeoved unneeded non-terminal.
14412 CASE_EXPR and DEFAULT_EXPR are added to current block.
14413 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
14414 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
14415 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
14416 * parse.y (wfl_operator, print_int_node): Make non-static.
14417 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
14418 as part of recursive scan of block.
14419 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
14420 (patch_switch_statement): Most tests move dinto java_complete_tree.
14421
14422 * parse.y: Make various production be non-typed (void).
14423 * parse.y (parse_error): Merged into issue_warning_error_from_context.
14424 * parse.y (add_stmt_to_compound): Don't create/change extra node.
14425 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
14426
14427 * jcf-write.c (struct jcf_handler): New type.
14428 (struct jcf_switch_state): New type.
14429 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
14430 (alloc_handler, emit_unop, emit_reloc): New functions.
14431 (adjust_typed_op): Add extra parameter ("max type" offset).
14432 (emit_switch_reloc, emit_case-reloc): New function.
14433 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
14434 (generate_bytecode_insns): Support REAL_CST, switch statements,
14435 exception handling, method calls, object/array creation, and more.
14436
14437 * class.c: Remove some unused variables.
14438 * constants.c (find_string_constant): New function.
14439 (count_constant_pool_bytes): Fix to correctly handle wide constants.
14440 * decl.c (complete_start_java_method): Don't _Jv_InitClass
14441 if flag_emit_class_files.
14442
14443 1998-11-12 Tom Tromey <tromey@cygnus.com>
14444
14445 * jcf-io.c (find_class): Added explanatory comment.
14446
14447 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
14448 trailing slash to `.zip' entries.
14449
14450 * jvspec.c (lang_specific_driver): Correctly handle case where
14451 GC_NAME not defined.
14452
14453 1998-11-11 Tom Tromey <tromey@cygnus.com>
14454
14455 * jvspec.c (GC_NAME): New define.
14456 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
14457 if required.
14458 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
14459
14460 1998-11-11 Per Bothner <bothner@cygnus.com>
14461
14462 * jcf-dump.c (TABLE_SWITCH): Fix typos.
14463
14464 1998-11-11 Tom Tromey <tromey@cygnus.com>
14465
14466 * jcf-dump.c (main): Correctly recognize `--'-style long options.
14467
14468 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14469
14470 * class.c (is_compiled_class): Call safe_layout_class for class
14471 compiled from source.
14472 * conver.h (convert_to_integer, convert_to_real,
14473 convert_to_pointer): Added prototypes.
14474 * decl.c (init_decl_processing): Non longer push the decls of
14475 `methodtable', `constants', `Class', `Field', `dispatchTable'
14476 `jexception' and `Method'.
14477 * expr.c (build_invokeinterface): New function.
14478 (expand_invoke): static variable CLASS_IDENT now in
14479 build_invokeinterface. Use build_invokeinterface.
14480 (expand_java_field_op): Moved code to inline
14481 java.lang.PRIMTYPE.TYPE into a function.
14482 (build_primtype_type_ref): New function.
14483 * java-tree.def (INSTANCEOF_EXPR): New tree code.
14484 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
14485 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
14486 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
14487 (DECL_LOCAL_STATIC_VALUE): New macro.
14488 (build_invokeinterface, build_primtype_type_ref): New function
14489 prototypes.
14490 (java_parse_abort_on_error): Macro rewritten.
14491 * jcf-parse.c (current_method): Add comment to declaration.
14492 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
14493 Function prototypes fixed.
14494 (jcf_parse_source): push/pop parser context. save/restore global.
14495 (parse_source_file): Fixed leading comment. Now take a
14496 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
14497 classes and pop the parser context anymore.
14498 (yyparse): Push parser context, save globals, parse the source
14499 file, restore globals and pop the parser context when processing a
14500 source file.
14501 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
14502 * lex.c (java_parse_doc_section): New function.
14503 (java_lex): Call java_parse_doc_section when appropriate. Build an
14504 operator around INSTANCEOF_TK.
14505 * lex.h (java_lineterminator, java_sprint_unicode,
14506 java_unicode_2_utf8, java_lex_error, java_store_unicode):
14507 Prototypes rewritten.
14508 (java_parse_escape_sequence, java_letter_or_digit_p,
14509 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
14510 java_read_unicode, java_store_unicode, java_read_char,
14511 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
14512 Added function prototypes.
14513 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
14514 define.
14515 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
14516 New macros
14517 (struct parser_ctxt): New fields: deprecated,
14518 current_parsed_class_un, gclass_list.
14519 (fix_method_argument_names, issue_warning_error_from_context,
14520 resolve_package, lookup_package_type): New function prototypes.
14521 (resolve_expression_name): Fixed function prototype.
14522 (find_applicable_accessible_methods_list): Fixed indentation, added
14523 extra argument in prototype.
14524 (check_final_assignment, build_null_of_type, check_deprecation,
14525 check_method_redefinition, reset_method_name,
14526 java_check_regular_methods, java_check_abstract_methods,
14527 maybe_build_primttype_type_ref): New function prototype.
14528 * parse.y (conver.h): Include.
14529 (INSTANCEOF_TK): Tagged <operator>.
14530 (single_type_import_declaration): Use REGISTER_IMPORT macro.
14531 (relational_expression:): Build binop for instanceof.
14532 (java_push_parser_context): Remember ctxp->gclass_list across
14533 contexts.
14534 (java_pop_parser_context): Simply return if no context
14535 exists. Remember gclass_list across contexts.
14536 (issue_warning_error_from_context): New function.
14537 (parse_error_context): Don't setup ctxp->elc here. Call
14538 issue_warning_error_from_context instead.
14539 (parse_warning_context): Likewise.
14540 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
14541 setup. Link new class/interface to ctxp->gclass_list.
14542 (add_superinterfaces): Register interface as incomplete if not
14543 loaded.
14544 (create_class): Remember class unqualified name in
14545 ctxp->current_parsed_class_un. Check class deprecation.
14546 (register_fields): Check field deprecation. Remember static final
14547 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
14548 processing INIT.
14549 (method_header): New local variable ORIG_ARG. Use unqualified
14550 current class name for check on constructor errors. Promote return
14551 type if of record type. Argument list fix moved in
14552 fix_method_argument_names, called here. Check method deprecation.
14553 (fix_method_argument_names): New function.
14554 (method_declarator): Promote record typed arguments.
14555 (safe_layout_class): Check class methods before layout.
14556 (java_complete_class): Compute field layout when patched.
14557 (do_resolve_class): Try to load class after having it renamed
14558 after the package name.
14559 (get_printable_method_name): Use DECL_CONTEXT.
14560 (reset_method_name): New function.
14561 (check_method_redefinition): Use reset_method_name.
14562 (java_check_regular_methods): New local variable
14563 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
14564 names for error report. Check for compile-time error when method
14565 found has default (package) access.
14566 (java_check_abstract_methods): Now takes an interface DECL node as
14567 an argument. Also reinstall real name on unchecked
14568 overriding/hiding methods for error report.
14569 (java_check_methods): Fixed leading comment. Get classes to verify
14570 from ctxp->gclass_list. Use CHECK_METHODS macro and set
14571 CLASS_METHOD_CHECKED_P on class verification.
14572 (lookup_java_method2): Get real method name if necessary.
14573 (find_in_imports): Don't check package class access here.
14574 (resolve_package, lookup_package_type): New functions.
14575 (java_layout_classes): Fixed leading comment. Take classes to be
14576 laid out from ctxp->gclass_list.
14577 (java_complete_expand_methods): Don't expand native and abstract
14578 methods.
14579 (java_expand_classes): New function.
14580 (resolve_expression_name): Use additional argument ORIG. Retrieve
14581 values of static final field of primitive types.
14582 (resolve_field_access): Handles static final field of promotive
14583 type.
14584 (resolve_qualified_expression_name): Handle STRING_CST as
14585 primaries and package name resolution. Check deprecation on found
14586 decls. Set where_found and type_found on non static field resolved
14587 during qualification. Layout non primitive field decl types.
14588 (check_deprecation): New function.
14589 (maybe_access_field): Simplified.
14590 (patch_method_invocation_stmt): Local variable CLASS_TYPE
14591 removed. Reverse method's argument when primary is a type. Don't
14592 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
14593 instead. Include abstract class in the list of class searchable
14594 for constructors. Use DECL_CONTEXT of found method for access
14595 checks. Check method deprecation.
14596 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
14597 converting arguments. Handle INVOKE_INTERFACE.
14598 (lookup_method_invoke): Search constructor using existing
14599 infrastructure (don't rely on lookup_java_constructor anymore).
14600 (find_applicable_accessible_methods_list): Extra argument flag
14601 LC. Now include constructor in the search.
14602 (qualify_ambiguous_name): Conditional expression are primaries.
14603 (not_initialized_as_it_should_p): static final are always
14604 initialized.
14605 (java_complete_tree): Pass extra NULL argument to
14606 resolve_expression_name. Stricter test to carry on patching
14607 assignments. New case for INSTANCEOF_EXPR.
14608 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
14609 (check_final_assignment, maybe_build_primttype_type_ref): New
14610 functions.
14611 (patch_assignment): Detect resolved static finals and carry normal
14612 assignment error check on them. Inline PRIMTYPE.TYPE read access.
14613 (try_builtin_assignconv): Access constant 0 on all primitive
14614 types.
14615 (valid_builtin_assignconv_identity_widening_p): Accept identical
14616 types. Accept all promoted type on int type.
14617 (valid_ref_assignconv_cast_p): Accept a null pointer to be
14618 assigned to a reference.
14619 (valid_method_invocation_conversion_p): Accept to check null
14620 pointers.
14621 (build_binop): Merge declaration and initialization of local
14622 variable BINOP.
14623 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
14624 numeric types. Improved validity test for qualify operators on
14625 references.
14626 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
14627 and PREINCREMENT_EXPR. Also detect resolved static finals of a
14628 primitive type and issue the appropriate error message.
14629 (resolve_type_during_patch): Mark class loaded when resolved.
14630 (patch_cast): Allow null to be cased to reference types.
14631 (build_null_of_type): New function.
14632 (patch_array_ref): Handle array on references correctly.
14633 (patch_return): Removed unused local variable MODIFY. Force
14634 boolean to be returned as integers. Allows null to be returned by
14635 a function returning a reference.
14636 * typeck.c (convert_to_integer, convert_to_real,
14637 convert_to_pointer): Prototypes moved to convert.h
14638 (lookup_argument_method): Use method real name, if necessary.
14639
14640 1998-10-30 Tom Tromey <tromey@cygnus.com>
14641
14642 * class.c (build_class_ref): Changed name of primitive classes to
14643 start with `_Jv_'.
14644
14645 * class.c (make_class_data): Renamed fields: nmethods to
14646 method_count, method_count to dtable_method_count. Always set
14647 `state' field to 0.
14648 * decl.c (init_decl_processing): Likewise.
14649
14650 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14651
14652 * class.c (layout_class): Don't mangle <finit>, produce
14653 __finit<class> instead. Don't verify artificial methods.
14654 * decl.c (finit_identifier_node): New declared global.
14655 (init_decl_processing): finit_identifier_node initialized.
14656 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
14657 * java-tree.h (finit_identifier_node): Declared as extern.
14658 (struct lang_decl): New field called_constructor.
14659 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
14660 (CLASS_HAS_FINIT_P): New macro.
14661 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
14662 explicit constructor invocation.
14663 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
14664 CALL_SUPER_CONSTRUCTOR_P): New macros.
14665 (write_classfile): Added prototype.
14666 * jcf-parse.c (jcf_parse_source): Parse and remember for
14667 generation if the file was seen on the command line.
14668 (parse_source_file): Don't write the class file here.
14669 (yyparse): Loop on files rewritten. Set current_jcf.
14670 (parse_zip_file_entries): Parse class file only if it was found.
14671 * lang.c (init_parse): Don't open command line provided filename
14672 here.
14673 (lang_parse): Don't set main_jcf anymore.
14674 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
14675 (JCONSTRUCTOR_CHECK): New macro.
14676 (JBSC_TYPE_P): New macro.
14677 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
14678 (COMPLETE_CHECK_OP_2): New macro.
14679 (struct parse_ctxt): New field explicit_constructor_p.
14680 (check_class_interface_creation): Fixed prototype indentation.
14681 (patch_method_invocation_stmt): Prototype reflects added argument.
14682 (patch_invoke): Likewise.
14683 (complete_method_declaration, build_super_invocation,
14684 verify_constructor_circularity,
14685 build_this_super_qualified_invocation, get_printable_method_name,
14686 patch_conditional_expr, maybe_generate_finit, fix_constructors,
14687 verify_constructor_super, create_artificial_method,
14688 start_artificial_method_body, end_artificial_method_body,
14689 generate_field_initialization_code): New function prototypes.
14690 * parse.y: Fixed leading comment
14691 (constructor_header:, constructor_body:, block_end:): Rules tagged
14692 <node>.
14693 (type_declaration:): Call maybe_generate_finit.
14694 (method_declaration:): Action for method_body: placed in new
14695 function complete_method_declaration, called here.
14696 (constructor_declaration:): Defined actions. Removed leading
14697 FIXME.
14698 (constructor_header:): New rule with action.
14699 (constructor_body:): Rule rewritten using block_begin: and
14700 block_end:. Defined actions.
14701 (constructor_declarator:, explicit_constructor_invocation:):
14702 Defined actions.
14703 (block:): Use new rules block_begin: block_end:.
14704 (block_begin:, block_end:): New rules and actions.
14705 (block_statements:): Fixed error message for explicit
14706 constructors.
14707 (method_invocation:): Call build_this_super_qualified_invocation
14708 if primary is `this' or `super' was seen.
14709 (conditional_expression:): Action defined.
14710 (extra_ctxp_pushed_p): New static global flag.
14711 (java_parser_context_save_global): Create parser context if
14712 necessary. Use extra_ctxp_pushed_p to remember it.
14713 (java_parser_context_restore_global): Pop extra parser context if
14714 one exists.
14715 (build_array_from_name): Array on primitive types are marked
14716 loaded.
14717 (register_fields): Restore new name in field initializer
14718 expression if type was altered. Non static fields initialized upon
14719 declaration marked initialized.
14720 (maybe_generate_finit): New function.
14721 (maybe_generate_clinit): Use create_artificial_method,
14722 start_artificial_method_body, end_artificial_method_body. Generate
14723 debug info for enclosed initialization statements.
14724 (method_header): Fixed leading comment. Check constructor
14725 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
14726 accordingly.
14727 (complete_method_declaration, constructor_circularity_msg,
14728 verify_constructor_circularity): New functions.
14729 (get_printable_method_name): New function.
14730 (check_method_redefinition): Don't rename <finit> methods. Fix
14731 declared constructor names. Error message for
14732 constructors modified.
14733 (java_check_regular_methods): Local variable seen_constructor
14734 renamed saw_constructor. Skip verification on constructors. Create
14735 default constructor with create_artificial_method.
14736 (java_check_methods): Removed unnecessary empty line.
14737 (create_artificial_method, start_artificial_method_body,
14738 end_artificial_method_body): New functions.
14739 (java_layout_classes): Changed leading comment. Reverse fields
14740 list if necessary. Always layout java.lang.Object if being
14741 defined.
14742 (java_complete_expand_methods): Verify constructor circularity.
14743 (java_complete_expand_method): Call fix_constructor on
14744 constructors. Local variable no_ac_found removed. Restore
14745 bindings if method body expansion failed.
14746 (fix_constructors, verify_constructor_super,
14747 generate_field_initialization_code): New function.
14748 (java_expand_classes): Fixed leading comment. Write class file
14749 here.
14750 (resolve_expression_name): Check for illegal instance variable
14751 usage within the argument scope of an explicit constructor
14752 invocation.
14753 (resolve_qualified_expression_name): Pass extra from_super flag
14754 when invoking patch_method_invocation_stmt. New case for
14755 conditional expression when used as a primary. Check for error
14756 when acquiring super.
14757 (patch_method_invocation_stmt): Added extra argument super. New
14758 local variable is_static_flag. Set class_to_search according to
14759 the nature of the constructor invocation. Don't add `this'
14760 argument when expanding NEW_CLASS_EXPR. Check for illegal method
14761 invocation within the argument scope of explicit constructor
14762 invocation. Set is_static according to is_static_flag. Provide
14763 extra `super' argument to patch_invoke invocation.
14764 (patch_invoke): New argument from_super. Loop on arguments
14765 indentation fixed. Pass from_super to invocation_mode. New switch
14766 case INVOKE_SUPER. Fixed error message in switch default case.
14767 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
14768 value.
14769 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
14770 (lookup_method_invoke): Fixed prototypes in candidates list. Error
14771 message takes constructors into account.
14772 (find_applicable_accessible_methods_list): Fixed indentation.
14773 (qualify_ambiguous_name): Take explicit constructor invocation
14774 into account. Deal with a conditional expression as a primary to
14775 a method call.
14776 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
14777 case. Added extra argument to patch_method_invocation_stmt.
14778 Register calls made to explicit constructor `this'. Don't call
14779 save_expr in ARRAY_REF case when emitting class files. Check for
14780 illegal use of this when expanding explicit constructor invocation
14781 arguments.
14782 (complete_function_arguments): Set and reset parser context
14783 explicit_constructor_p field value when appropriate.
14784 (build_super_invocation, build_this_super_qualified_invocation):
14785 New functions.
14786 (patch_assignment): Fixed typo.
14787 (patch_unaryop): Check on final fields occurs only when a decl
14788 exits.
14789 (patch_return): Take constructors into account.
14790 (patch_conditional_expr): New function.
14791 * typeck.c (build_java_signature): Removed unnecessary empty line.
14792
14793 1998-10-28 Jeffrey A Law (law@cygnus.com)
14794
14795 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
14796
14797 1998-10-28 Tom Tromey <tromey@cygnus.com>
14798
14799 * decl.c (init_decl_processing): Renamed fields.
14800 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
14801 interface_len, msize fields.
14802
14803 * class.c (make_class_data): Removed subclass_head and
14804 subclass_next fields.
14805 * decl.c (init_decl_processing): Removed subclass_head and
14806 subclass_next fields.
14807
14808 1998-10-28 Jeffrey A Law (law@cygnus.com)
14809
14810 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
14811 * mangle.c (emit_unicode_mangled_name): Similarly.
14812
14813 1998-10-26 Nick Clifton <nickc@cygnus.com>
14814
14815 * jcf-parse.c (get_constant): Place braces around code to compute
14816 'd' when REAL_ARITHMETIC is not defined.
14817
14818 1998-10-25 H.J. Lu (hjl@gnu.org)
14819
14820 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
14821 dependency.
14822
14823 1998-10-23 Tom Tromey <tromey@cygnus.com>
14824
14825 * lang-specs.h: `.zip' files are input to jc1.
14826
14827 1998-10-22 Per Bothner <bothner@cygnus.com>
14828
14829 * jvspecs.c: Add (but don't enable) support for combining multiple
14830 .class and .java input filenames to a single jc1 invocation.
14831 Add support for -C flag (copile to .class files).
14832 Translate -classpath and -CLASSPATH arguments.
14833 * lang-specs.h: Don't set %2 spec.
14834
14835 1998-10-22 Tom Tromey <tromey@cygnus.com>
14836
14837 * jcf-path.c (add_entry): Don't add trailing separator if entry is
14838 a .zip file.
14839 (add_path): Don't add trailing separator to non-empty path
14840 elements.
14841
14842 * lang.c (lang_decode_option): Check for -fclasspath and
14843 -fCLASSPATH before examining other `-f' options.
14844
14845 * java-tree.h (finalize_identifier_node): Don't declare.
14846 * class.c (make_class_data): Don't push "final" field.
14847 * decl.c (init_decl_processing): Don't push "final" field.
14848 (finalize_identifier_node): Removed.
14849 (init_decl_processing): Don't set finalize_identifier_node.
14850
14851 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
14852
14853 1998-10-11 Anthony Green <green@cygnus.com>
14854
14855 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
14856 (JV_SCAN_SOURCES): New macro.
14857 (JCF_DUMP_SOURCES): Likewise.
14858 (jcf-dump$(exeext)): New target.
14859 (jv-scan$(exeext)): New target.
14860
14861 1998-10-22 Tom Tromey <tromey@cygnus.com>
14862
14863 * Makefile.in (LEX): Removed.
14864 (LEXFLAGS): Likewise.
14865 (SET_BISON): New macro.
14866 (BISON): Removed.
14867 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
14868 spurious diffs in parse.c.
14869 ($(PARSE_SCAN_C)): Likewise.
14870 (PARSE_DIR): New macro.
14871 (PARSE_C): Use it.
14872 (PARSE_SCAN_C): Likewise.
14873 (PARSE_RELDIR): New macro.
14874
14875 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
14876
14877 * jcf-io.c (find_class): Use saw_java_source to determine when to
14878 look for `.java' file.
14879 * jcf-parse.c (saw_java_source): New global.
14880 (yyparse): Set it if `.java' file seen.
14881
14882 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
14883 (GCJH_SOURCES): Likewise.
14884 * Makefile.in (datadir): New macro.
14885 (libjava_zip): Likewise.
14886 (JAVA_OBJS): Added jcf-path.o.
14887 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
14888 (../gcjh$(exeext)): Likewise.
14889 (jcf-path.o): New target.
14890 * java-tree.h (fix_classpath): Removed decl.
14891 * jcf-parse.c (fix_classpath): Removed.
14892 (load_class): Don't call fix_classpath.
14893 * parse.y (read_import_dir): Don't call fix_classpath.
14894 * lex.h: Don't mention classpath.
14895 * lex.c (java_init_lex): Don't initialize classpath.
14896 * jcf-io.c (classpath): Removed global.
14897 (find_class): Use jcf_path iteration functions. Correctly search
14898 class path for .java file.
14899 (open_in_zip): New argument `is_system'.
14900 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
14901 classpath-related options.
14902 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
14903 and -I.
14904 (lang_init): Call jcf_path_init.
14905 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
14906 * lang-specs.h: Handle -I. Minor cleanup to -M options.
14907 Correctly put braces around second string in each entry.
14908 * gjavah.c (main): Call jcf_path_init. Recognize all the new
14909 classpath-related options.
14910 (help): Updated for new options.
14911 * jcf.h: Declare functions from jcf-path.c. Don't mention
14912 `classpath' global.
14913 * jcf-path.c: New file.
14914
14915 * jcf-depend.c: Include jcf.h.
14916
14917 * jcf-write.c (localvar_alloc): Returns `void'.
14918 (localvar_free): Removed unused variable.
14919
14920 * lang.c (OBJECT_SUFFIX): Define if not already defined.
14921 (init_parse): Use OBJECT_SUFFIX, not ".o".
14922
14923 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
14924
14925 * class.c (emit_register_classes): Renamed from
14926 emit_register_class.
14927 * java-tree.h (emit_register_classes): Prototype renamed from
14928 emit_register_class.
14929 * jcf-parse.c (yyparse): Call emit_register_classes once before
14930 returning.
14931 * parse.y (java_expand_classes): No longer register classes.
14932
14933 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14934
14935 * class.c (is_compiled_class): New local variable
14936 seen_in_zip. Identify classes found in currently compiled source
14937 file(s).
14938 * decl.c (complete_start_java_method): Fixed typo.
14939 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
14940 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
14941 (CLASS_P): Moved around.
14942 (java_parse_abort_on_error): Macro moved from jcf-parse.c
14943 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
14944 java-parse.h
14945 (jcf_parse_source): Changed leading comment. Removed unnecessary
14946 fclose and CLASS_FROM_SOURCE_P marking.
14947 (parse_source_file): New local variables remember_for_generation
14948 and filename. Mark parsed file name identifier node. Removed block
14949 executed when parse_only was null. Set remember_for_generation.
14950 Use it as an argument to java_pop_parser_context.
14951 (yyparse): New local variables several_files, list, next node and
14952 current_file_list. Split ampersand separated file names into
14953 current_file_list. Iterate through the list and parse accordingly.
14954 * parse.h (java_pop_parser_context): New function prototype.
14955 * parse.y (ctxp_for_generation): New static global variable.
14956 (java_pop_parser_context): New argument generate. Link popped ctxp
14957 to ctxp_for_generation list accordingly.
14958 (java_complete_expand_methods): Fixed indentation.
14959 (java_expand_classes): New function.
14960
14961 1998-10-17 Per Bothner <bothner@cygnus.com>
14962
14963 * Makefile.in: Link with libiberty.a instead of memmove.o.
14964
14965 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
14966
14967 * lex.c (setjmp.h): No longer included.
14968 * lex.h (setjmp.h): Included.
14969 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
14970 (duplicate_declaration_error_p): Renamed from
14971 duplicate_declaration_error.
14972 (build_array_from_name): New function prototype.
14973 * parse.y (setjmp.h): No longer included.
14974 (variable_declarator_id): Define action.
14975 (build_array_from_name): New function.
14976 (duplicate_declaration_error_p): Renamed from
14977 duplicate_declaration_error. Fixed leading comment.
14978 (register_fields): Main `for' loop reorganized. Uses
14979 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
14980 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
14981 build_array_from_name.
14982 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
14983 types.
14984 (read_import_dir): Don't try to skip `.' and `..'.
14985 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
14986 build_array_from_name. Main `for' loop reorganized.
14987 (resolve_qualified_expression_name): When building access to a
14988 field, use the type where the field was found, not its own type.
14989 (maybe_access_field): Use field DECL_CONTEXT if the type where the
14990 field was found is null.
14991 (qualify_ambiguous_name): Sweep through all successive array
14992 dimensions.
14993
14994 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14995
14996 * java-tree.h (pop_labeled_block, lang_printable_name,
14997 maybe_add_interface, set_super_info, get_access_flags_from_decl,
14998 interface_of_p, inherits_from_p, fix_classpath,
14999 complete_start_java_method, emit_handlers, init_outgoing_cpool,
15000 make_class_data, register_class, alloc_name_constant): New
15001 function prototypes.
15002 * lang.c (lang_decode_option): Set argc argument unused. Fixed
15003 indentation. Added cast to remove warning.
15004 (lang_printable_name): Set v argument unused.
15005 (lang_print_error): Added argument to lang_printable_name call.
15006 (java_dummy_print, print_lang_decl, print_lang_type,
15007 print_lang_identifier, lang_print_xnode): All argument marked
15008 unused.
15009 * lex.c (java_unget_unicode): Removed unnecessary argument.
15010 (java_allocate_new_line): Unused local variable is gone.
15011 (java_read_char): Added parenthesis in expressions to remove
15012 warnings. Added final return statement.
15013 (java_read_unicode): Added parenthesis in expression to remove
15014 warning.
15015 (java_parse_end_comment): Fixed java_unget_unicode invocation.
15016 (java_parse_escape_sequence): Likewise.
15017 (java_lex): Unused local variables are gone. Fixed
15018 java_unget_unicode invocation.
15019 * lex.h (set_float_handler): Prototype added when JC1_LITE not
15020 defined.
15021 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
15022 lang_printable_name invocation in macro.
15023 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
15024 Likewise.
15025 (duplicate_declaration_error): Suppressed unused argument in
15026 prototype.
15027 (identical_subpath_p): Function declaration is gone.
15028 (patch_invoke): Suppressed unused argument in prototype.
15029 (patch_cast, build_labeled_block, check_thrown_exceptions):
15030 Likewise.
15031 * parse.y (setjmp.h): Included
15032 (toplev.h): Likewise.
15033 (field_declaration:): Suppressed unused local
15034 (label_decl:): Fixed build_labeled_block invocation.
15035 (java_pop_parser_context): Put extra parenthesis around assignment
15036 in if.
15037 (yyerror): Suppressed unused local variables.
15038 (variable_redefinition_error): Fixed lang_printable_name
15039 invocation.
15040 (create_interface): Suppressed unused local variables.
15041 (create_class): Likewise.
15042 (duplicate_declaration_error): Suppressed unused argument. Fixed
15043 lang_printable_name invocation.
15044 (register_fields): Suppressed unused local variable. Fixed
15045 duplicate_declaration_error invocation.
15046 (method_header): Suppressed unused local variable.
15047 (method_declarator, parser_check_super): Likewise.
15048 (java_complete_class): Suppressed unused local variable. Fixed
15049 fatal error message.
15050 (complete_class_report_errors): Added default: in switch.
15051 (java_check_regular_methods): Fixed lang_printable_name
15052 invocations.
15053 (check_throws_clauses): Likewise.
15054 (java_check_abstract_methods): Suppressed unused local
15055 variable. Fixed lang_printable_name invocation.
15056 (read_import_entry): Added supplemental return statement.
15057 (read_import_dir): Suppressed unused local variables.
15058 (check_pkg_class_access, declare_local_variables): Likewise.
15059 (source_start_java_method): Suppressed unused extern variable
15060 declarations
15061 (expand_start_java_method): Suppressed unused extern and local
15062 variable declarations.
15063 (java_complete_expand_methods): Likewise.
15064 (java_complete_expand_method): Suppressed unused local variables.
15065 (make_qualified_name): Likewise.
15066 (resolve_qualified_expression_name): Added default: in
15067 switch. Fixed lang_printable_name invocation.
15068 (class_instance_creation_expression): Added parenthesis around
15069 expressions.
15070 (patch_method_invocation_stmt): Fixed lang_printable_name and
15071 patch_invoke invocations.
15072 (check_for_static_method_reference): Fixed lang_printable_name
15073 invocation.
15074 (patch_invoke): Suppressed unused arguments and local variables.
15075 (lookup_method_invoke): Suppressed unused local variables.
15076 (qualify_ambiguous_name): Added default: in switch.
15077 (identical_subpath_p): Function removed.
15078 (patch_assignment): Suppressed unused local variables. Suppressed
15079 unnecessary if statement. Fixed lang_printable_name invocations.
15080 (try_builtin_assignconv): Fixed lang_printable_name invocations.
15081 (valid_ref_assignconv_cast_p): Parenthesis around
15082 expression. Suppressed unused local variables.
15083 (build_binop): Suppressed unused local variables. fixed
15084 lang_printable_name invocations.
15085 (string_constant_concatenation): Suppressed unused local
15086 variables.
15087 (patch_unaryop): Fixed lang_printable_name invocation.
15088 (patch_cast): Suppressed unnecessary argument. Fixed
15089 lang_printable_name invocation.
15090 (patch_array_ref): Fixed lang_printable_name invocation.
15091 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
15092 (build_labeled_block): Suppressed unused argument.
15093 (generate_labeled_block): Fixed build_labeled_block invocation.
15094 (build_loop_body): Suppressed unused local variables.
15095 (patch_loop_statement): Likewise.
15096 (patch_exit): Fixed lang_printable_name invocation.
15097 (patch_switch_statement): Likewise.
15098 (case_identity): First argument marked unused.
15099 (patch_try_statement): Fixed lang_printable_name invocations.
15100 (patch_synchronized_statement, patch_throw_statement): Likewise.
15101 (check_thrown_exceptions): Fixed check_thrown_exceptions and
15102 lang_printable_name invocations.
15103 (check_thrown_exceptions_do): Suppressed unused argument.
15104
15105 1998-10-14 Tom Tromey <tromey@cygnus.com>
15106
15107 * jcf-write.c (write_classfile): Add output class file as target.
15108 * lang-options.h: Added -MD, -MMD, -M, and -MM.
15109 * jcf.h: Added declarations for dependency-tracking functions.
15110 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
15111 * lang.c (lang_decode_option): Recognize -MD and -MMD.
15112 (finish_parse): Call jcf_dependency_write.
15113 (dependency_tracking): New global.
15114 (DEPEND_SET_FILE): New define.
15115 (DEPEND_ENABLE): New define.
15116 (init_parse): Enable dependency tracking if required.
15117 Include "flags.h".
15118 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
15119 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
15120 (../gcjh$(exeext)): Likewise.
15121 (jcf-depend.o): New target.
15122 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
15123 (GCJH_SOURCES): Likewise.
15124 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
15125 dep_name argument.
15126 (find_classfile): Added dep_name argument.
15127 (find_class): Compute name of dependency.
15128 (open_in_zip): Call jcf_dependency_add_file.
15129 * gjavah.c (output_file): No longer global.
15130 (usage): Don't mention "gjavah".
15131 (help): Likewise.
15132 (java_no_argument): Likewise.
15133 (version): Likewise.
15134 (main): Recognize and handle -M family of options.
15135 (print_mangled_classname): Return is void.
15136 (process_file): Handle case where output is suppressed.
15137 (HANDLE_END_FIELD): Likewise.
15138 (HANDLE_METHOD): Likewise.
15139 * jcf-depend.c: New file.
15140
15141 1998-10-13 Jeffrey A Law (law@cygnus.com)
15142
15143 * java-tree.def: Add missing newline at EOF.
15144
15145 1998-10-13 Tom Tromey <tromey@cygnus.com>
15146
15147 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
15148 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
15149 function.
15150 Include <config.h> and "system.h".
15151 (disassemble_method): Undefine RET to avoid clash with
15152 config/i386/i386.h.
15153
15154 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
15155
15156 * decl.c (runtime_exception_type_node, error_exception_type_node):
15157 New global variables.
15158 (init_decl_processing): Initialized.
15159 * expr.c (java_lang_expand_expr): Set caught exception type to
15160 null if catch handler argument doesn't exit.
15161 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
15162 tree codes.
15163 * java-tree.h (runtime_exception_type_node,
15164 error_exception_type_node): Global variables declared.
15165 (DECL_FUNCTION_THROWS): New macro.
15166 (DECL_FUNCTION_BODY): Modified comment.
15167 (DECL_SPECIFIC_COUNT): Likewise.
15168 (struct lang_decl): New field throws_list.
15169 (IS_UNCHECKED_EXPRESSION_P): New macro.
15170 * lex.c (java_lex): Generate location information for THROW_TK.
15171 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
15172 EXCEPTIONS_P): New macros.
15173 (enum jdep_code): New value JDEP_EXCEPTION.
15174 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
15175 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
15176 PATCH_METHOD_RETURN_ERROR): New macros.
15177 (patch_method_invocation_stmt): Added new argument to prototype.
15178 (patch_synchronized_statement, patch_throw_statement,
15179 check_thrown_exceptions, check_thrown_exceptions_do,
15180 purge_unchecked_exceptions, check_throws_clauses): New function
15181 prototypes.
15182 * parse.y Fixed typo in keyword section.
15183 (throw:): Rule tagged <node>.
15184 (THROW_TK): Keyword tagged <operator>.
15185 (method_header:): Last argument to call to method_header passed
15186 from throws: rule.
15187 (throws:, class_type_list:, throw_statement:,
15188 synchronized_statement:, synchronized:): Defined actions.
15189 (method_header): New local variable current. Register exceptions
15190 from throws clause.
15191 (java_complete_tree): Complete and verify exceptions from throws
15192 clause.
15193 (complete_class_report_errors): Error message on exceptions not
15194 found
15195 (java_check_regular_methods): Fixed typo. Shortcut on private
15196 overriding methods. Changed error message on method
15197 redefinition. Check for throws clause compatibility.
15198 (check_throws_clauses): New function.
15199 (java_check_abstract_methods): Use DECL_NAME for wfl or current
15200 method. Changed error message on method redefinition.
15201 (currently_caught_type_list): New static variable.
15202 (java_complete_expand_methods): Purge unchecked exceptions from
15203 throws clause list. Call PUSH_EXCEPTIONS before walk and
15204 POP_EXCEPTIONS after.
15205 (resolve_qualified_expression_name): Pass new argument as NULL to
15206 patch_method_invocation_stmt.
15207 (patch_method_invocation_stmt): New argument ref_decl. Invoke
15208 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
15209 argument list when appropriate. Use new argument if non null to
15210 store selected method decl.
15211 (patch_invoke): Convert if necessary args of builtin types before
15212 forming CALL_EXPR. Argument list no longer reversed here.
15213 (invocation_mode): Treat final methods as static methods.
15214 (java_complete_tree): New cases for THROW_EXPR: and
15215 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
15216 function call.
15217 (complete_function_arguments): No more RECORD_TYPE
15218 conversion. Function parameter nodes no longer saved.
15219 (valid_ref_assignconv_cast_p): Avoid handling null type.
15220 (patch_binop): Fixed null constant reference handling.
15221 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
15222 BUILD_THROW macros.
15223 (patch_try_statement): Fixed comments. Record caught types in
15224 list, push the list, expand try block and pop the list.
15225 (patch_synchronized_statement, patch_throw_statement,
15226 check_thrown_exceptions, check_thrown_exceptions_do,
15227 purge_unchecked_exceptions): New functions.
15228 * typeck.c (lookup_argument_method): Allow WFL in place of method
15229 DECL_NAME during method definition check
15230
15231 1998-10-09 Tom Tromey <tromey@cygnus.com>
15232
15233 * gjavah.c (decode_signature_piece): New function.
15234 (print_c_decl): Use it. Added `name_override' argument.
15235 (print_method_info): Use name_override argument to print_c_decl.
15236 (seen_fields): Removed.
15237 (print_field_info): Don't update seen_fields.
15238 (struct method_name): New structure.
15239 (method_name_list): New global.
15240 (print_method_info): Add new method to list of methods.
15241 (name_is_method_p): New function.
15242 (print_field_info): If field name has same name as method, then
15243 change field name.
15244 (process_file): Parse methods before fields.
15245 (field_pass): New global.
15246 (HANDLE_END_FIELD): Take field_pass into account.
15247
15248 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15249
15250 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
15251 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
15252
15253 1998-10-03 Anthony Green <green@cygnus.com>
15254
15255 * jvspec.c: Fix bug in jvgenmain_spec patch.
15256
15257 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
15258
15259 * Makefile.in (lang.o:): Install dependency on java-tree.def.
15260 * decl.c (soft_exceptioninfo_call_node): New global variable.
15261 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
15262 takes extra integer argument. soft_exceptioninfo_call_node
15263 initialized.
15264 * except.c (java_set_exception_lang_code): New function
15265 (method_init_exceptions): Called here.
15266 (prepare_eh_table_type): New function.
15267 (expand_end_java_handler): Called here.
15268 * expr.c (build_java_throw_out_of_bounds_exception): Now features
15269 one argument. Modified generation of call to
15270 soft_badarrayindex_node to use new argument.
15271 (build_java_arrayaccess): Pass faulty index value to
15272 build_java_throw_out_of_bounds_exception.
15273 (generate_name): New function.
15274 (java_lang_expand_expr): New local variables node, current,
15275 has_finally_p. Expand TRY_EXPR node.
15276 (process_jvm_instruction): Replace top of the stack with thrown
15277 object reference when entering exception handler.
15278 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
15279 specific tree codes.
15280 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
15281 global.
15282 (DECL_SPECIFIC_COUNT): New macro.
15283 (prepare_eh_table_type, java_set_exception_lang_code,
15284 generate_name): New function declarations.
15285 (match_java_method): Declaration deleted.
15286 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
15287 macros.
15288 * lex.c (TRY_TK, CATCH_TK): Generate location information.
15289 * parse.h (redefinition_error, refine_accessible_methods_list,
15290 can_cast_to_p): Function declaration removed.
15291 (classitf_redefinition_error, variable_redefinition_error,
15292 parse_jdk1_1_error, find_applicable_accessible_methods_list,
15293 find_most_specific_methods_list, argument_types_convertible,
15294 enter_a_block, valid_builtin_assignconv_identity_widening_p,
15295 valid_cast_to_p, valid_method_invocation_conversion_p,
15296 try_reference_assignconv, add_stmt_to_compound,
15297 build_jump_to_finally, build_tree_list, patch_try_statement,
15298 java_get_catch_block): New function declarations.
15299 * parse.y (string_buffer_type): Global variable deleted.
15300 (group_of_labels, catches, catch_clause, catch_clause_parameter,
15301 finally): Rules tagged <node>.
15302 (TRY_TK, CATCH_TK): Token tagged <operator>.
15303 (class_body_declaration:, class_member_declaration:,
15304 formal_parameter:, explicit_constructor_invocation:,
15305 interface_member_declaration:, constant_declaration:,
15306 primary_no_new_array:, class_instance_creation_expression:,
15307 array_creation_expression:): Issue error on unsuported JDK1.1
15308 features.
15309 (try_statement:, catches:, finally:): Define actions.
15310 (catch_clause_parameter): New rule.
15311 (catch_clause:): Use new rule catch_clause_parameter.
15312 (parse_jdk1_1_error): New function.
15313 (redefinition_error): Renamed classitf_redefinition_error.
15314 (variable_redefinition_error): New function.
15315 (check_class_interface_creation): Call
15316 classitf_redefinition_error.
15317 (java_complete_tree): Added error message on JDEP_TYPE: case.
15318 (complete_class_report_errors): Fixed indentation.
15319 (declare_local_variables): Call variable_redefinition_error.
15320 (source_end_java_method): Call java_set_exception_lang_code and
15321 emit_handlers where appropriate.
15322 (java_method_add_stmt): Call add_stmt_to_block.
15323 (add_stmt_to_block): New function.
15324 (lookup_method_invoke): Fixed outside comment. new local variable
15325 candicates. Call find_applicable_accessible_methods_list and
15326 find_most_specific_methods_list when searching for a
15327 method. Modified error report to list possible candidates when
15328 applicable.
15329 (find_applicable_accessible_methods_list,
15330 find_most_specific_methods_list, argument_types_convertible): New
15331 function.
15332 (refine_accessible_methods_list): Function deleted.
15333 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
15334 expr (if applicable) before calling patch_array_ref.
15335 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
15336 (enter_block): Fixed comment.
15337 (enter_a_block): New function.
15338 (patch_assignment): Reorganized. Call try_reference_assignconv for
15339 references. Call valid_cast_to_p instead of can_cast_to_p.
15340 (try_reference_assignconv,
15341 valid_builtin_assignconv_identity_widening_p): New functions.
15342 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
15343 (valid_cast_to_p, valid_method_invocation_conversion_p): New
15344 functions.
15345 (build_string_concatenation): Don't resolve StringBuffer.
15346 (patch_cast): Fixed inverted arguments.
15347 (patch_array_ref): Code to save array expr deleted. Call
15348 valid_cast_to_p instead of can_cast_to_p.
15349 (generate_labeled_block): Call generate_name.
15350 (build_jump_to_finally, build_try_statement, java_get_catch_block,
15351 patch_try_statement): New functions.
15352 * typeck.c (match_java_method): Function deleted.
15353
15354 1998-10-02 Anthony Green <green@cygnus.com>
15355
15356 * jvspec.c: jvgenmain_spec uses different temporary file names.
15357
15358 1998-10-02 Anthony Green <green@cygnus.com>
15359
15360 * jvspec.c (lang_specific_driver): Fail if user specifies
15361 --main= when not linking.
15362
15363 1998-09-28 Tom Tromey <tromey@cygnus.com>
15364
15365 * class.c (make_class_data): Push value for `thread' field.
15366 * decl.c (init_decl_processing): Added `thread' field to class.
15367
15368 * class.c (add_field): Always make static fields externally
15369 visible.
15370
15371 1998-09-26 Anthony Green <green@cygnus.com>
15372
15373 * expr.c (build_java_athrow,
15374 build_java_throw_out_of_bounds_exception, expand_invoke,
15375 build_newarray, expand_java_multianewarray, build_java_monitor):
15376 Update comments to reflect _Jv_* function names.
15377
15378 1998-09-25 Per Bothner <bothner@cygnus.com>
15379
15380 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
15381 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
15382 * parse.y (expand_start_java_method): Likewise.
15383
15384 1998-09-24 Per Bothner <bothner@cygnus.com>
15385
15386 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
15387
15388 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
15389 (add_field): No longer need to convert from RECORD_TYPE to pointer,
15390 * expr.c: Remove no-longer-needed calls to promote_type.
15391 * decl.c (give_name_to_locals): Liekwise.
15392 * jcf-parse.c (get_class_constant): Compensate for new signatures.
15393 * parse.y: Add/remove promote_type calls as appropriate.
15394 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
15395 (parse_signature_string): Likewise.
15396 (build_java_array_type): Fix for now signature convenions.
15397
15398 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
15399
15400 1998-09-23 Tom Tromey <tromey@cygnus.com>
15401
15402 * class.c (init_class_processing): libjava function renamed to
15403 _Jv_RegisterClass.
15404
15405 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15406
15407 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
15408 * java-tree.def: Fixed DEFTREECODE third argument.
15409 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
15410 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
15411 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
15412 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
15413 JAVA_THIS_EXPR): Now replaced by tree code definitions.
15414 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
15415 * lang.c (java_tree_code_type, java_tree_code_length,
15416 java_tree_code_name): New arrays.
15417 (lang_init): Append Java tree node definitions to Gcc ones.
15418 * lex.c (expression_obstack): Declared as extern when JC1_LITE
15419 defined.
15420 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
15421 wfl_to_string.
15422 (java_lex): Allow declaration of empty string constants. Retain
15423 location information on CASE_TK and DEFAULT_TK.
15424 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
15425 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
15426 Modified to be more robust.
15427 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
15428 (build_new_invocation, try_builtin_assignconv,
15429 patch_switch_statement, string_constant_concatenation,
15430 build_string_concatenation, patch_string_cst, patch_string,
15431 java_expand_switch): New function declarations.
15432 * parse.y: Rules related to switch and EH tagged <node>.
15433 (label_id): Set to NULL_TREE
15434 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
15435 tree nodes.
15436 (this_or_super:): Fixed indentation.
15437 (statement:, statement_nsi:, statement_without_trailing_substatement:,
15438 statement_expression:): Removed call to RULE on all sub-rules.
15439 (switch_expression:, switch_labels:): New rules.
15440 (switch_statement:, switch_block:, switch_block_statement_groups:,
15441 switch_block_statement_group:, switch_labels:, switch_label:):
15442 Defined actions.
15443 (throw_statement:, synchronized_statement:, try_statement:):
15444 Defined temporary actions.
15445 (class_instance_creation_expression:): Call
15446 build_new_invocation. Fixed indentation.
15447 (field_access): Fixed indentation.
15448 (method_invocation): Likewise.
15449 (make_qualified_primary): Use THIS_EXPR.
15450 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
15451 resolving from SUPER, set *type_found.
15452 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
15453 (java_complete_tree): Removed unused local variable `location'. Case
15454 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
15455 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
15456 on MODIFY_EXPR: and all binary operator tree code cases. Removed
15457 STRING_CST: case. default: checks for patchable strings.
15458 (complete_function_arguments): Transform string constant or
15459 crafted StringBuffer if necessary.
15460 (build_method_invocation): Fixed comments.
15461 (build_new_invocation): New function.
15462 (patch_assignment): Call try_builtin_assignconv to figure a valid
15463 assignment conversion between builtin types.
15464 (try_builtin_assignconv): New function.
15465 (build_binop): Use URSHIFT_EXPR directly to call build.
15466 (operator_string): Use UNARY_PLUS_EXPR.
15467 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
15468 operator.
15469 (do_merge_string_cste, merge_string_cste,
15470 string_constant_concatenation, build_string_concatenation,
15471 patch_string, patch_string_cst): New function.
15472 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
15473 (patch_unaryop): Likewise. New test of valid ++/-- operands.
15474 (build_newarray_node): Use NEW_ARRAY_EXPR.
15475 (build_this): Use THIS_EXPR.
15476 (build_return): Enable debug information on return statement.
15477 (build_if_else_statement): Likewise.
15478 (complete_labeled_statement): Fixed related comment.
15479 (build_loop_body): Fixed comment.
15480 (build_bc_statement): Enable debug information on break/continue
15481 statements.
15482 (patch_bc_statement): Fixed typos. Handle SWITCH statement
15483 context.
15484 (patch_switch_statement, case_identity, java_expand_switch): New
15485 functions.
15486
15487 1998-09-21 Per Bothner <bothner@cygnus.com>
15488
15489 * buffer.h (BUFFER_INIT): New macro.
15490 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
15491 Pass (struct jcf_partial *state) to most functions.
15492 (jcf_block, jcf_relocation): New types.
15493 Support labels, branches, conditionals, loops.
15494
15495 1998-09-21 Tom Tromey <tromey@cygnus.com>
15496
15497 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
15498
15499 1998-09-21 Per Bothner <bothner@cygnus.com>
15500
15501 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
15502 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
15503 not integer_type_node (INT_TYPE_SIZ bits).
15504
15505 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
15506
15507 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
15508 * jcf-dump.c (print_exception_table): New function.
15509 (disassemble_method): Better handling of wide instructions.
15510 Make more robust for bad input.
15511
15512 1998-09-30 Jeffrey A Law (law@cygnus.com)
15513
15514 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
15515 FreeBSD.
15516
15517 1998-09-17 Jeffrey A Law (law@cygnus.com)
15518
15519 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
15520
15521 1998-09-17 Tom Tromey <tromey@cygnus.com>
15522
15523 * Makefile.in ($(PARSE_H)): Removed target.
15524
15525 1998-09-17 Jeffrey A Law (law@cygnus.com)
15526
15527 * Makefile.in (JAVA_OBJS): Add memmove.o
15528 (memmove.o): New target & rules.
15529
15530 1998-09-15 Tom Tromey <tromey@cygnus.com>
15531
15532 * expr.c (expand_invoke): Don't generate a call to the class init
15533 code.
15534
15535 1998-09-14 Jeffrey A Law (law@cygnus.com)
15536
15537 * Makefile.in: Add many missing dependencies.
15538 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
15539 as appropriate.
15540 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
15541 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
15542
15543 1998-09-11 Per Bothner <bothner@cygnus.com>
15544
15545 * decl.c (complete_start_java_method): If method is static (and
15546 not private) call _Jv_InitClass.
15547 * expr.c (expand_invoke): Don't call build_class_init.
15548
15549 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
15550
15551 1998-09-10 Jeffrey A Law (law@cygnus.com)
15552
15553 * Make-lang.in (GCJ): Define before using.
15554
15555 1998-09-09 Jeffrey A Law (law@cygnus.com)
15556
15557 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
15558 losing due to namespace pollution in GNU getopt.h
15559
15560 1998-09-09 Tom Tromey <tromey@cygnus.com>
15561
15562 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
15563 (java.all.cross): Likewise.
15564 (java.rest.encap): Likewise.
15565
15566 1998-09-08 Jeffrey A Law (law@cygnus.com)
15567
15568 * gjavah.c (print_class_decls): Fix thinko in arglist
15569 * jcv-io.c (find_classfile): Similarly.
15570
15571 1998-09-07 Jeffrey A Law (law@cygnus.com)
15572
15573 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
15574
15575 1998-09-05 Tom Tromey <tromey@cygnus.com>
15576
15577 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
15578 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
15579 * Makefile.in (PARSE_C): New macro.
15580 (PARSE_H): Likewise.
15581 (PARSE_SCAN_C): Likewise.
15582 ($(PARSE_C)): Target renamed from parse.c.
15583 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
15584 (clean): Remove parse-scan.c as well.
15585 (parse.o): Depend on $(PARSE_C).
15586
15587 1998-09-05 Anthony Green <green@cygnus.com>
15588
15589 * README, license.terms: Removed.
15590
15591 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
15592 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
15593 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
15594 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
15595 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
15596 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
15597 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
15598 and Java trademark attribution.
15599
15600 1998-09-04 Tom Tromey <tromey@cygnus.com>
15601
15602 * Makefile.in: Use gcjh, not gjavah.
15603 * config-lang.in (stagestuff): Use gcjh, not gjavah.
15604 * Make-lang.in: Changed gjavah to gcjh everywhere.
15605
15606 1998-09-03 Per Bothner <bothner@cygnus.com>
15607
15608 * gjavah.c: Support new -prepend -add -append flags.
15609 (print_method_info): Method is not virtual if class is final.
15610
15611 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
15612
15613 * jv-scan.c: Fixed copyright assignment.
15614 * keyword.gperf: Likewise.
15615 * keyword.h: Likewise.
15616 * lex.c: Fixed copyright assignment.
15617 (java_lex): Push unicode back when parsing '<'.
15618 * lex.h: Fixed copyright assignment.
15619 * parse-scan.y: Likewise.
15620 * parse.h: Fixed copyright assignment.
15621 (build_debugable_stmt, complete_for_loop): New function prototypes.
15622 * parse.y: Fixed copyright assignment.
15623 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
15624 size_zero_node when completing a loop with no exit condition.
15625 (for_statement_nsi:): Define action.
15626 (for_init:, for_update:): Return size_zero_node when empty.
15627 (declare_local_variables): Call build_debugable_stmt.
15628 (build_debugable_stmt): New function.
15629 (build_loop_body): Build debugable statement around loop
15630 condition part.
15631 (complete_loop_body): Take into account the debugable statement
15632 around the EXIT_EXPR.
15633 (complete_loop_body): New function.
15634 (patch_exit_expr): Fixed condition inversion.
15635
15636 1998-09-02 Tom Tromey <tromey@cygnus.com>
15637
15638 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
15639 name of thread define.
15640 * jvspec.c (THREAD_NAME): New macro.
15641 (GCLIB): Likewise.
15642 (THREADLIB): Likewise.
15643 (lang_specific_driver): Recognize attempt to link with thread
15644 library or gc library. Recognize -ljava on command line so it
15645 isn't linked against more than once.
15646
15647 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
15648
15649 * parse-scan.y (report_main_declaration): Name of the class
15650 containing `main' can be a qualified name.
15651
15652 1998-08-31 Tom Tromey <tromey@cygnus.com>
15653
15654 * config-lang.in: Changed gjavac to gjc everywhere.
15655 * Make-lang.in: Changed gjavac to gjc everywhere.
15656
15657 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15658
15659 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
15660 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
15661 and install the files.
15662 * Makefile.in (JAVA_OBJS_LITE): New variable.
15663 (compiler:): Now include jv-scan as a dependency.
15664 (../jv-scan$(exeext), parse-scan.c): New targets.
15665 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
15666 * config-lang.in (compilers): Removed gcj, gjavah from the list.
15667 * jcf-parse.c (parse_source_file): Call java_layout_classes and
15668 check for errors even if parse_only.
15669 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
15670 defined.
15671 (yylex): New function. Uses java_lex body.
15672 (java_lex): Removed commented out statement. Remove local variable
15673 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
15674 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
15675 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
15676 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
15677 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
15678 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
15679 where appropriate.
15680 (java_lex_error): Empty if JC1_LITE is defined.
15681 (java_get_line_col): Return 0 if JC1_LITE is defined.
15682 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
15683 SET_MODIFIER_CTX): Moved into the section containing the macros
15684 conditionally defined by JC1_LITE.
15685 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
15686 argument if JC1_LITE is defined.
15687 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
15688 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
15689 is defined.
15690 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
15691 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
15692 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
15693 to different values according to JC1_LITE.
15694 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
15695 declared if JC1_LITE set.
15696 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
15697 defined if JC1_LITE not set.
15698 (struct parser_ctx): Reorganized and skip the jc1 front end part
15699 if JC1_LITE set.
15700 (java_layout_classes): New function definition.
15701 (java_push_parser_context, java_init_lex, yyparse, yylex,
15702 yyerror): Prototype always declared. All other static function
15703 prototypes declared only if JC1_LITE is not set.
15704 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
15705 declared in parse.h.
15706 (java_layout_classes): New function.
15707 (java_complete_expand_methods): No longer layout the class here.
15708 * parse-scan.y: New file.
15709 * jv-scan.c: New file.
15710
15711 1998-08-25 Tom Tromey <tromey@cygnus.com>
15712
15713 * gjavah.c (main): Handle -friend option.
15714 (friend_specs): New global.
15715 (generate_access): Handle friend_specs.
15716 (process_file): Likewise.
15717 (MAX_FRIENDS): New macro.
15718 (friend_count): New global.
15719 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
15720 Changed all callers.
15721
15722 1998-08-24 Per Bothner <bothner@cygnus.com>
15723
15724 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
15725 (main): Handle processing all the entries of a named .zip archive.
15726 * jcf-io.c (jcf_trim_old_input): New function.
15727 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
15728
15729 1998-08-24 Per Bothner <bothner@cygnus.com>
15730
15731 * lang.c (flag_assume_compiled): Make default be on.
15732
15733 1998-08-21 Per Bothner <bothner@cygnus.com>
15734
15735 * jcf-dump.c: Add bunches of flags to control output more.
15736 (process_class): New function; support printing more than one class.
15737 (main): Support new --print-main and --javap flags.
15738 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
15739 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
15740
15741 1998-08-20 Per Bothner <bothner@cygnus.com>
15742
15743 Change mangling of dispatch table to match C++ vtable (w/thunks).
15744 * class.c (build_dtable_decl), java-tree.h: New function.
15745 (make_class_data): Call it.
15746 * decl.c (init_decl_processing): Likewise.
15747
15748 1998-08-19 Warren Levy <warrenl@cygnus.com>
15749
15750 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
15751 soft_anewarray; adjust args passed.
15752 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
15753 match _Jv_NewObjectArray.
15754
15755 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
15756
15757 * decl.c (push_labeled_block, pop_labeled_block): New functions.
15758 * expr.c (loopup_label): Call create_label_decl.
15759 (create_label_decl): New function.
15760 (java_lang_expand_expr): Call expand_start_bindings with argument
15761 set to zero.
15762 * java-tree.h Added space after PROTO in function declarations
15763 when necessary.
15764 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
15765 (create_label_decl, push_labeled_block): New function
15766 declarations.
15767 * lex.c (label_id): Initialize.
15768 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
15769 switch.
15770 * parse.h Added space after PROTO in function declarations when
15771 necessary.
15772 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
15773 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
15774 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
15775 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
15776 macros.
15777 (struct parser_ctxt): New fields current_loop,
15778 current_labeled_block.
15779 (build_if_else_statement, patch_if_else_statement,
15780 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
15781 generate_labeled_block, complete_labeled_statement,
15782 build_bc_statement, patch_bc_statement, patch_loop_statement,
15783 build_new_loop, build_loop_body, complete_loop_body): New function
15784 declarations.
15785 * parse.y (java_warning_count): New global variable.
15786 (label_id): New static variable.
15787 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
15788 (block:): Return size_zero_node when block is empty.
15789 (empty_statement:): Return size_zero_node.
15790 (statement:): Implement supplemental action when for_statement: is
15791 reduced.
15792 (label_decl:): New rule.
15793 (labeled_statement:): Rewritten using label_decl. Actions
15794 implemented.
15795 (labeled_statement_nsi:): Likewise.
15796 (if_then_statement): Actions implemented.
15797 (while_expression): New rule.
15798 (while_statement:): Rewritten using while_expression. Actions
15799 implemented.
15800 (while_statement_nsi:): Likewise.
15801 (do_statement_begin:): New rule.
15802 (do_statement:): Rewritten using do_statement_begin. Actions
15803 implemented.
15804 (for_statement:): Rewritten using for_begin. Actions implemented.
15805 (for_statement_nsi:): Likewise.
15806 (for_header:, for_begin:): New rules.
15807 (for_init:): Actions implemented.
15808 (statement_expression_list:, break_statement:,
15809 continue_statement:): Likewise.
15810 (yyerror): Count number of issued warning(s).
15811 (java_report_errors): Report error(s) and/or warning(s).
15812 (java_complete_class): Use build_java_argument_signature to
15813 recompute completed method signature.
15814 (java_check_regular_methods): New locals method_wfl and aflags.
15815 Use method_wfl instead of lookup_cl during error reports. Fixed
15816 indentation and modified some error messages. Use
15817 lang_printable_name in method instead of the DECL_NAME. New code
15818 to issue warnings on methods not overriding corresponding methods
15819 private to a different package.
15820 (java_method_add_stmt): Call add_stmt_to_compound.
15821 (add_stmt_to_compound): New function.
15822 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
15823 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
15824 (build_if_else_statement, patch_if_else_statement,
15825 build_labeled_block, generate_labeled_block,
15826 complete_labeled_statement, build_new_loop, build_loop_body,
15827 complete_loop_body, patch_loop_statement, build_bc_statement,
15828 patch_bc_statement, patch_exit_expr): New functions.
15829 * typeck.c (build_java_signature): Build argument signature before
15830 enclosing it in between parenthesis.
15831
15832 1998-08-17 Warren Levy <warrenl@cygnus.com>
15833
15834 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
15835 (JAVA_OBJS): Added reminder comment
15836
15837 1998-08-13 Nick Clifton <nickc@cygnus.com>
15838
15839 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
15840 be interpreted as a long long.
15841
15842 1998-08-13 Warren Levy <warrenl@cygnus.com>
15843
15844 * decl.c (init_decl_processing): Use _Jv_InitClass, not
15845 soft_initialise_class. Use _Jv_NewMultiArray, not
15846 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
15847 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
15848 _Jv_CheckArrayStore, not soft_checkarraystore. Use
15849 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
15850
15851 1998-08-12 Per Bothner <bothner@cygnus.com>
15852
15853 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
15854 length_identifier_node): New global tree node constants.
15855 * parse.y (kw_super, kw_this, kw_length): Removed globals.
15856 Replace uses by super_identifier_node etc.
15857 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
15858
15859 * parse.y (resolve_field_access): Don't special-case ".length" if
15860 flag_emit_class_files.
15861 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
15862 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
15863 and ARRAY.length.
15864
15865 1998-08-11 Per Bothner <bothner@cygnus.com>
15866
15867 * decl.c (init_decl_processing): Remove unused method_type_node fields.
15868 * class.c (make_method_value): Remove init for removed fields.
15869
15870 * class.c (layout_class): Use build_java_argument_signature.
15871 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
15872
15873 * typeck.c (push_java_argument_signature): Removed. Merged into ...
15874 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
15875 (build_java_signature): Don't use push_java_argument_signature.
15876
15877 * typeck.c (lookup_argument_method): New function.
15878 * parse.y (java_check_regular_methods): Use lookup_argument_method
15879 instead of lookup_java_method2 followed by lookup_java_method.
15880
15881 * parse.y (check_method_redefinition): Minor optimization.
15882
15883 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
15884 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
15885
15886 1998-08-10 Tom Tromey <tromey@cygnus.com>
15887
15888 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
15889 c-pragma.o.
15890
15891 * gjavah.c (java_float_finite): Use K&R-style definition.
15892 (java_double_finite): Likewise.
15893 (generate_access): Now returns void. Changed all callers.
15894 (last_access_generated): Removed.
15895 (process_file): Only make a single pass over the .class file.
15896
15897 1998-07-29 Per Bothner <bothner@cygnus.com>
15898
15899 * class.c (get_dispatch_table): Add extra dummy vtable entry,
15900 for compatibility for G++ (with -fvtable-thunks).
15901 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
15902
15903 * gjavah.c (process_file): Use public inheritance for super-class.
15904
15905 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15906
15907 * lex.c (java_init_lex): Initialize ctxp->package.
15908 * parse.h (struct parser_ctxt): package and package_len replaced
15909 by tree package, an identifier node. Field method_decl_list is
15910 gone. Fixed comments.
15911 (lookup_field_wrapper, merge_qualified_name, not_accessible,
15912 class_in_current_package): New function prototypes.
15913 * parse.y (array_type:): Set class loaded flag on primitive type
15914 arrays.
15915 (package_declaration:): Assign ctxp->package to the
15916 identifier node.
15917 (method_invocation:): Handle invocation of method qualified by
15918 `super'.
15919 (single_type_import_declaration:): Removed ambiguity check.
15920 (java_pop_parser_context): New local variable `next'. Reset and
15921 set IMPORT_CLASSFILE_NAME flags on current and previous import
15922 list.
15923 (java_accstring_lookup): Use new local macro COPY_RETURN.
15924 (lookup_field_wrapper): New function.
15925 (parser_qualified_classname): Use merge_qualified_name.
15926 (parser_check_super_interface): Broaden error message.
15927 (do_resolve_class): Check for qualified class name in the current
15928 compilation unit if appropriate.
15929 (process_imports): Check for already defined classes.
15930 (check_pkg_class_access): Got rid of call to
15931 get_access_flags_from_decl.
15932 (java_complete_expand_methods): Call safe_layout_class based on
15933 the current class size.
15934 (make_qualified_primary): Build a WFL qualification on primary if
15935 none exists.
15936 (merge_qualified_name): New function.
15937 (make_qualified_name): Use merge_qualified_name.
15938 (resolve_expression_name): Use safe_lookup_field.
15939 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
15940 (resolve_qualified_expression_name): Likewise. Check on resolved
15941 element accessibility.
15942 (not_accessible_p, class_in_current_package): New functions.
15943 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
15944 (patch_method_invocation_stmt): Merged common pieces. Check
15945 accessibility of invoked method.
15946 (check_for_static_method_reference): Add returned type in error
15947 message.
15948 (invocation_mode): Get rid of bogus check on PRIVATE methods.
15949 (refine_accessible_methods_list): Merged two conditions in test.
15950 (java_complete_class): Sanity check on stabilize_ref gone.
15951 * zextract.c (read_zip_archive): Cast lseek second argument to long.
15952
15953 1998-07-28 Per Bothner <bothner@cygnus.com>
15954
15955 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
15956
15957 1998-07-24 Tom Tromey <tromey@cygnus.com>
15958
15959 * gjavah.c (F_NAN): Removed.
15960 (F_NAN_MASK): New macro.
15961 (F_POSITIVE_INFINITY): Removed.
15962 (F_NEGATIVE_INFINITY): Likewise.
15963 (java_float_finite): Rewrote.
15964 (D_NAN_MASK): Renamed.
15965 (java_double_finite): Rewrote.
15966 (D_POSITIVE_INFINITY): Removed.
15967 (D_NEGATIVE_INFINITY): Likewise.
15968
15969 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
15970 If verbose, print underlying representation of value in hex.
15971
15972 1998-07-24 Per Bothner <bothner@cygnus.com>
15973
15974 * buffer.h, buffer.c: New files.
15975 * Makefile.in (JAVA_OBJS): Add buffer.o.
15976
15977 Support locals variables and writing their debug entries to .class.
15978 * jcf-write.c: Simplify some by user new buffer type.
15979 (vode_buffer_grow): Removed.
15980 (struct localvar_info): New type.
15981 (localsvars, localvartable): New buffers.
15982 (localvar_alloc, localvar_free): New functions.
15983 (generate_bytecode_insns): Handle local variables.
15984 (generate_classfile): Write LocalVariableTable attribute.
15985
15986 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15987
15988 * jcf-io.c (open_in_zip): Check the zipfile magic number.
15989 * zipfile.h (ZIPMAGIC): New macro.
15990
15991 1998-07-24 Tom Tromey <tromey@cygnus.com>
15992
15993 * Makefile.in (gjavah.o): Updated dependencies.
15994 (jcf-dump.o): Likewise.
15995 (all.indirect): Use ../gjavah.
15996 (../gjavah$(exeext)): Likewise.
15997 (clean): Don't remove gjavah.
15998 (clean): Remove parse.c, not java/parse.c.
15999 * Make-lang.in (java): Added gjavah.
16000 (gjavah$(exeext)): New target.
16001 (GJAVAH_SOURCES): New macro.
16002 (java.all.build): Added gjavah.
16003 (java.all.cross): Likewise.
16004 (java.rest.encap): Likewise.
16005 * config-lang.in (compilers, stagestuff): Added gjavah.
16006
16007 1998-07-23 Tom Tromey <tromey@cygnus.com>
16008
16009 * gjavah.c (java_float_finite): New function.
16010 (java_double_finite): Likewise.
16011 (F_POSITIVE_INFINITY): New macro.
16012 (F_NEGATIVE_INFINITY): Likewise.
16013 (F_NAN): Likewise.
16014 (D_POSITIVE_INFINITY): Likewise.
16015 (D_NEGATIVE_INFINITY): Likewise.
16016 (D_NAN): Likewise.
16017 (print_field_info): Use java_float_finite and java_double_finite.
16018
16019 1998-07-23 Per Bothner <bothner@cygnus.com>
16020
16021 * parse.y (method_header): Name "this" implicit argument.
16022
16023 1998-07-22 Per Bothner <bothner@cygnus.com>
16024
16025 * jcf-write.c: Write out LineNumberTable attribute in .class file.
16026 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
16027 (put_linenumber): New function.
16028 (generate_bytecode_insns, generate_classfile): Write line numbers.
16029
16030 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16031
16032 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
16033 (lookup_name, build_known_method_ref, build_class_init,
16034 build_invokevirtual, invoke_build_dtable, match_java_method,
16035 build_field_ref, pushdecl_force_head, build_java_binop,
16036 binary_numeric_promotion, build_decl_no_layout,
16037 build_java_arrayaccess, build_newarray, build_anewarray,
16038 build_java_array_length_access, build_java_arraynull_check): New
16039 extern function prototypes.
16040 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
16041 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
16042 java-tree.h.
16043 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
16044 to NULL
16045 * jcf.h (jcf_out_of_synch): New extern function prototype.
16046 * parse.h: Static/global function implemented in parse.y
16047 prototyped and declarations moved at the end of the file.
16048 (DECL_P): Check that the argument isn't null.
16049 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
16050 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
16051 (QUAL_DECL_TYPE): New macro.
16052 (PARAMS): Macro definition removed.
16053 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
16054 (return_statement:): Call build_return.
16055 (field_access:): Call make_qualified_primary in sub rule.
16056 (method_invocation:): Build method invocation and call
16057 make_qualified_primary when processing primaries.
16058 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
16059 get_type_from_signature.
16060 (java_check_regular_method): Extra integer 0 argument when calling
16061 lookup_java_method2.
16062 (lookup_java_interface_method2): Extra method DECL argument when
16063 calling lookup_java_interface_method2.
16064 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
16065 COMPOUND_EXPR node.
16066 (java_complete_expand_method): Layout current class iff not
16067 already done. Don't process interface's methods.
16068 (java_complete_expand_method): Use super class only if it
16069 exists. Use current class otherwise.
16070 (make_qualified_primary): New function.
16071 (resolve_expression_name): Process qualified expression or
16072 expression from primary the same way.
16073 (resolve_expression_name): Two last arguments to
16074 resolve_field_access are now NULL_TREEs.
16075 (resolve_field_access): New variable is_static. Local field must
16076 be DECLs. is_static computed on field DECLs only. Append code in
16077 where_found to the field access if necessary. Use QUAL_DECL_TYPE
16078 to initialize field_type.
16079 (resolve_qualified_expression_name): New local variable,
16080 previous_call_static and is_static. Handle primaries with function
16081 calls, casts, array references and `this'. `super' now handled as
16082 `(super_class)this'. Use is_static to clarify boolean expressions.
16083 Added code to handle case where a proper handle is required to
16084 access a field. Use QUAL_DECL_TYPE where applicable.
16085 (maybe_access_field): New function.
16086 (patch_method_invocation_stmt): New arguments primary, where,
16087 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
16088 deleted. Use `where' as a type to search from if specified. Check
16089 for static method reference where forbidden. Append primary or
16090 current_this to the argument list if not calling constructor nor
16091 static methods.
16092 (check_for_static_method_reference): New function.
16093 (patch_invoke): Layout the class on which new is done if
16094 necessary.
16095 (lookup_method_invoke): Changed format to report errors on
16096 methods.
16097 (qualify_ambiguous_name): New local variable this_found. Now
16098 handle things from primaries. Method call are considered
16099 expression names.
16100 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
16101 changed into NULLs.
16102 (not_initialized_as_it_should_p): Comply with the new DECL_P.
16103 (java_complete_tree): New case fo RETURN_EXPR. Process function
16104 call arguments in separate function.
16105 (complete_function_arguments): New function.
16106 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
16107 anymore.
16108 (patch_assignment): Take the return function slot into account as
16109 a RHS. Distinguish assignment from a return.
16110 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
16111 when checking methods in interfaces.
16112 (resolve_type_during_patch): NULL argument to unresolve_type_p
16113 instead of NULL_TREE.
16114 (patch_newarray): Fixed typo in comment.
16115 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
16116 (build_return, patch_return): New functions.
16117 * typeck.c (lookup_java_constructor): Fixed typo in comment.
16118
16119 1998-07-21 Per Bothner <bothner@cygnus.com>
16120
16121 * constants.c (find_name_and_type_constant, find_fieldref_index,
16122 find_methodref_index): New methods.
16123 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
16124 just return given method. Also, rename to build_known_method_ref.
16125 (expand_invoke): Rename call to build_invoke_non_interface.
16126 * java-tree.h, parse.h: Update prototype.
16127 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
16128 (such as expand_expr_stmt) if flag_emit_class_files.
16129 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
16130 STACK_TARGET, IGNORE_TARGET): New macros.
16131 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
16132 (generate_bytecode_insn): New function to generate method's bytecode.
16133 (generate_classfile): Node generate Code attribute for a method.
16134 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
16135 push_long_const, field_op, adjust_typed_op, maybe_wide):
16136 New functions used by generate_bytecode_insn.
16137
16138 * typeck.c (signature_include_return): Remove variable.
16139 (push_java_argument_signature, build_java_argument_signature): New.
16140 (build_java_signature): Use push_java_argument_signature.
16141 * parse.y: Use build_java_argument_signature instead of fiddling
16142 with signature_include_return.
16143
16144 1998-07-17 Tom Tromey <tromey@cygnus.com>
16145
16146 * gjavah.c (print_c_decl): Always generate JArray<>* for array
16147 types.
16148
16149 * Makefile.in (all.indirect): Added gjavah$(exeext).
16150 (gjavah$(exeext)): Added $(exeext).
16151 (clean): Likewise.
16152
16153 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16154
16155 * class.c (layout_class): Call to java_layout_parsed_class replace
16156 by safe_layout_class.
16157 * expr.c (build_java_array_length_access): Removed static storage
16158 class in the function definition.
16159 (build_java_arraynull_check): Likewise.
16160 Also fixed typos in two comments.
16161 * lex.c (java_init_lex): Initialize static global kw_length.
16162 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
16163 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
16164 java_lex_error.
16165 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
16166 * parse.h (resolve_no_layout): New static function declaration.
16167 (get_identifier_in_static): Declaration removed.
16168 (java_layout_parsed_class): Function name declaration changed to
16169 safe_layout_class.
16170 (build_newarray_node, patch_newarray, resolve_type_during_patch,
16171 not_initialized_as_it_should_p, build_this): New static function
16172 declarations.
16173 (pushdecl_force_head, build_java_binop, int_fits_type_p,
16174 binary_numeric_promotion, stabilize_reference,
16175 build_decl_no_layout, build_java_arrayaccess): Extern function
16176 declarations moved into their own section.
16177 (build_newarray, build_anewarray, build_java_array_length_access,
16178 build_java_arraynull_check): New extern function declarations.
16179 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
16180 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
16181 fake tree codes.
16182 (CALL_CONSTRUCTOR_P): New macro.
16183 * parse.y (kw_length): New static global tree node.
16184 (return_statement): Tagged <node>.
16185 (RETURN_TK): Tagged <operator>.
16186 (variable_declarator_id:): Build variable declaration with an
16187 empty initialization value if a syntax error was found in the
16188 initialization part of the variable declaration.
16189 (statement_without_trailing_substatement:): return_statement: now
16190 uses the default rule.
16191 (return_statement:): Temporarily fixed to return NULL_TREE.
16192 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
16193 (class_instance_creation_expression:): Class creation rules now
16194 call build_method_invocation upon reduction.
16195 (array_creation_expression:): Rules call build_newarray_node upon
16196 reduction.
16197 (dim_exprs:): Build a list of dimension expressions.
16198 (dim_expr:): Store location of the OSB_TK in the dimension
16199 expression node.
16200 (method_invocation:): Added a new error rule.
16201 (build_unresolved_array_type): WFL argument may also be an array
16202 on a primitive type. Name of the argument changed to reflect this.
16203 (method_declarator): Insert argument type at the beginning of the
16204 argument type list and later reverse the list.
16205 (unresolved_type_p): Argument 'returned' may be optionally
16206 NULL_TREE.
16207 (java_layout_class_from_source): Function renamed
16208 safe_layout_class.
16209 (resolve_and_layout): Now call resolve_no_layout and
16210 safe_layout_class.
16211 (resolve_no_layout): New function.
16212 (purify_type_name): New function.
16213 (complete_class_report_errors): Call purify_type_name during error
16214 report on a type not found.
16215 (process_imports): error_found local variable doesn't need to be
16216 initialized to zero.
16217 (declare_local_variables): New local type_wfl. Fixed typo in error
16218 message. type_wfl assigned to unresolved type and used to register
16219 incomplete type. Build a WFL around the variable initialization
16220 statement so that debug info can be generated on it.
16221 (source_start_java_method): Reverse argument list after they've
16222 been processed.
16223 (current_this): New static global variable.
16224 (java_complete_expand_methods): Set current_this when appropriate.
16225 (resolve_expression_name): Build correct static and non static
16226 field access bearing a simple name.
16227 (resolve_field_access): Resolve the length field of arrays. Handle
16228 f.m() cases.
16229 (patch_method_invocation_stmt): Set the type of the method
16230 invocation to error_mark_node. This value is later overridden by a
16231 valid type, if any. Don't handle qualified constructor invocation
16232 as qualified method invocation. Call lookup_method_invoke with its
16233 new flag. It's no longer necessary to access the selected method
16234 as the value of a tree list. Handle constructor invocation.
16235 (patch_invoke): Reverse argument list when invoking non interface
16236 methods. Insert call to new as the first argument of the
16237 constructor.
16238 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
16239 defined within a final class. Return INVOKE_STATIC if the invoked
16240 method is a constructor.
16241 (lookup_method_invoke): New lc argument is a flag to indicate a
16242 constructor lookup. Now handle constructor lookup. Choose the most
16243 specific method in case several were matching the invocation
16244 requirements. Return a method decl instead of a tree list featuring
16245 one single method decl element.
16246 (refine_accessible_methods_list): New lc flag argument to
16247 indicate that a constructor is being looked up.
16248 (not_initialized_as_it_should_p): New function.
16249 (java_complete_tree): Now process fake tree codes
16250 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
16251 save_expr on resolved function call arguments. Case on
16252 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
16253 (patch_assignment): LHS can be a field access expression. When
16254 dealing with reference, lhs_type is the promoted type of the
16255 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
16256 applicable.
16257 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
16258 (patch_binop): Use not_initialized_as_it_should_p where
16259 applicable.
16260 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
16261 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
16262 where applicable.
16263 (resolve_type_during_patch): New function.
16264 (patch_cast): Call resolve_type_during_patch to resolve type and
16265 report error accordingly.
16266 (patch_array_ref): Use not_initialized_as_it_should_p where
16267 applicable. Array base expression is saved before being
16268 used. Promote the type of an array elements if it contains non
16269 builtin types.
16270 (build_newarray_node, patch_newarray, build_this): New functions.
16271
16272 1998-07-16 Tom Tromey <tromey@cygnus.com>
16273
16274 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
16275 increment it in `for' statement.
16276 (print_field_info): If number is inf or nan, don't print it.
16277 (print_method_info): If method name is `delete', just ignore it.
16278 (print_c_decl): Special-case jstringArray.
16279
16280 * gjavah.c (help): New function.
16281 (no_argument): New function.
16282 (usage): Changed text.
16283 (main): Rewrote argument handling. Now handles -v, --help,
16284 --version.
16285 (version): New function.
16286 (found_error): New global.
16287 (main): Return found_error.
16288 (generate_access): Set found_error.
16289 (print_c_decl): Likewise.
16290
16291 1998-07-15 Tom Tromey <tromey@cygnus.com>
16292
16293 * gjavah.c (print_c_decl): Don't print "," when examining field.
16294 Skip type name when looking at "[L" types.
16295 (process_file): Now static.
16296 (generate_access): Now returns int.
16297 (last_access_generated): New global.
16298 (process_file): Clear last_access_generated; make multiple passes
16299 over the class.
16300 (print_field_info): Just return if generate_access returns true.
16301 (print_method_info): Likewise. Also, allow <init> functions to
16302 pass through.
16303 (print_c_decl): Added is_init argument. Print constructors
16304 properly.
16305 (print_cxx_classname): Use UTF8_GET to extract characters from
16306 string.
16307 (print_base_classname): New function.
16308 (print_class_decls): New function.
16309 (process_file): Use it.
16310 (utf8_cmp): New function.
16311
16312 1998-07-13 Nick Clifton <nickc@cygnus.com>
16313
16314 * lang-options.h: Format changed to match changes in gcc/toplev.c
16315 to implement a --help option.
16316
16317 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
16318
16319 * decl.c (init_decl_processing): Revert change to dtable_type.
16320
16321 1998-07-09 Per Bothner <bothner@cygnus.com>
16322
16323 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
16324
16325 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
16326
16327 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
16328
16329 * lang.c (lang_init): Default flag_exceptions to 1, without
16330 checking to see if it's 2 first.
16331
16332 1998-07-08 Jeffrey A Law (law@cygnus.com)
16333
16334 * constants.c: Include "system.h".
16335 * decl.c: Likewise.
16336 * lang.c (flag_new_exceptions): Get via extern now.
16337 (lang_init_options): New functions. Turn on flag_new_exceptions.
16338
16339 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
16340
16341 * lex.c (java_lex): Return 0 when we see an invalid character in
16342 the input.
16343
16344 * lex.c (java_read_char): Specify extra argument when calling
16345 java_lex_error.
16346 (java_read_unicode, java_parse_end_comment,
16347 java_parse_escape_sequence): Likewise,
16348 (java_lex): Specify extra argument when calling
16349 java_lex_error. Test that IDs are beginning with a legal character
16350 for IDs. Handle invalid characters with an error message and a
16351 call to java_lex_error.
16352 (java_lex_error): Adjust column position by new argument
16353 `forward'. Issue an error even if in the middle of reporting an
16354 other error.
16355
16356 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
16357
16358 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
16359 we don't explicitly put a null pointer when we're copying it.
16360
16361 1998-07-07 Tom Tromey <tromey@cygnus.com>
16362
16363 * gjavah.c (print_cxx_classname): New function.
16364 (super_class_name): Likewise.
16365 (print_super_fields): Removed.
16366 (in_super): Removed.
16367 (print_field_info): Never generate #defines.
16368 (print_c_decl): Changed generated types to match JNI. No longer
16369 print class name before method name.
16370 (print_method_info): Print "static" before static methods.
16371 Print "virtual" before non-final methods.
16372 (usage): Use exit(1), not exit(-1).
16373 (main): Likewise.
16374 (print_field_info): Use %.17g to print a double.
16375 (last_access): New globals.
16376 (process_file): Initialize last_access.
16377 (usage): Now static.
16378 (ACC_VISIBILITY): New define.
16379 (generate_access): New function.
16380 (print_field_info): Call it.
16381 (print_method_info): Likewise. Also, generate information for all
16382 methods, not just native methods. Return void.
16383 (print_c_decl): Return void.
16384 (print_field_info): Return void.
16385
16386 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
16387
16388 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
16389 processing the jc1 grammar file. Prefix bison functions and
16390 variables with java_.
16391 (parse.c): Dependencies on parse.h and lex.h
16392 * expr.c (build_java_arrayaccess): Function now global.
16393 * java-tree.h: Comment reorganized to carry on previous
16394 classification effort.
16395 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
16396 RESOLVE_TYPE_NAME_P): New flags on WFLs.
16397 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
16398 java_parse (new prefix java_ generated by bison).
16399 (java_layout_parsed_class, java_register_parsed_class): Function
16400 call removed.
16401 (yyparse): Removed unnecessary call to init_outgoing_cpool.
16402 * lex.c (static tree wfl_op): Variable deleted.
16403 (java_init_lex): Initialize kw_super and kw_this. Initialize more
16404 ctxp fields to NULL_TREE.
16405 (java_lex): No longer create WFL for operators. Filename caching
16406 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
16407 created as STRING_CST and later expanded. Removed extra argument
16408 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
16409 and SUPER.
16410 (build_wfl_node): Removed code in comments.
16411 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
16412 store token and location data in the current bison token.
16413 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
16414 static/extern function declaration at the beginning of the file.
16415 (struct qualification): Data structure definition deleted.
16416 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
16417 (qualify_ambiguous_name): Function declaration modified. Function
16418 now returns nothing.
16419 (build_array_ref, patch_array_ref, make_qualified_name,
16420 resolve_qualified_expression_name, maybe_generate_clinit,
16421 resolve_field_access): New static function declarations.
16422 (build_java_arrayaccess): New extern function declaration.
16423 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
16424 (CALL_EXPR_PRIMARY): Macro deleted.
16425 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
16426 (struct parser_ctxt): Field initialized_final
16427 removed. non_static_initialized, static_initialized: New fields.
16428 * parse.y (static tree kw_super, static tree kw_this): New global
16429 static.
16430 (%union): tree wfl field of operator member replaced by int
16431 location. WFLs are non longer created for operators.
16432 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
16433 (qualified_name:): Now calls make_qualified_name to build the
16434 identifier.
16435 (type_declaration:): Consider generating <clinit> when class
16436 parsing completed.
16437 (variable_declarator:): Directly build an assignment node when the
16438 variable is initialized when declared.
16439 (this_or_super:): Build a WFL and set current location when THIS
16440 or SUPER are parsed.
16441 (expression_statement:): Wrap statement around a WFL.
16442 (primary_no_new_array:): Fixed typo. Changed value returned by
16443 THIS_TK because of its new type (temporary).
16444 (dim_exprs:): Temporary fix because of OSB_TK's new type.
16445 (field_access:): Build qualified name with SUPER.
16446 (method_invocation:): Fixed returned value because of SUPER's new
16447 type.
16448 (array_access:): Use OSB_TK location information.
16449 (post_increment_expression:, post_decrement_expression:,
16450 unary_expression:, pre_increment_expression:,
16451 pre_decrement_expression:, unary_expression_not_plus_minus:,
16452 cast_expression:, multiplicative_expression:,
16453 additive_expression:, shift_expression:, relational_expression:,
16454 equality_expression:, and_expression:, exclusive_or_expression:,
16455 inclusive_or_expression:, conditional_and_expression:,
16456 conditional_or_expression:, assignment:): Use new location/token
16457 information available on operators.
16458 (create_class): Set super_decl_type to NULL_TREE when processing
16459 java.lang.Object.
16460 (register_fields): Field initialization is now a MODIFY_EXPR
16461 node. Chain initialization code to the matching lists (according
16462 to the field declaration modifiers).
16463 (maybe_generate_clinit): New function.
16464 (method_header): Don't set method's DECL_NAME to a WFL when adding
16465 methods to java.lang.Object.
16466 (resolve_and_layout): Now can return NULL_TREE if the type
16467 resolution fails. Otherwise, return the class DECL instead of its
16468 TYPE.
16469 (check_method_redefinition): Don't patch method DECL_NAME if it
16470 belongs to java.lang.Object.
16471 (process_imports): Simply assign error_found to the value returned
16472 by check_pkg_class_access.
16473 (declare_local_variables): Don't use their init statements (if
16474 any) when parsing error were previously found. Reuse MODIFY_EXPR
16475 build during parsing as an init statement.
16476 (java_method_add_stmt): Now return the current method body.
16477 (java_layout_parsed_class, java_register_parsed_class): Functions
16478 removed.
16479 (java_complete_expand_methods): Initialize the constant pool on a
16480 per class basis. Layout the classes before expanding their method
16481 bodies. Don't try expand artificial constructor code if error were
16482 found. Make the classes data and register them if no error were
16483 found.
16484 (java_complete_expand_method): Retrieve an artificial constructor
16485 argument list before entering its body. Assign the top block to
16486 the artificial constructor function body and set types of declared
16487 blocks and compound statements to void. Walk method body if not an
16488 artificial constructor.
16489 (make_qualified_name, cut_identifier_in_qualified): New functions.
16490 (resolve_expression_name): Fixed comments. Save/restore the
16491 current class CLASS_LOADED_P flag value. Build non qualified
16492 static field access and handle qualified expression names.
16493 (resolve_field_access, resolve_qualified_expression_name): New
16494 functions.
16495 (patch_method_invocation_stmt): Use the new expression resolution
16496 scheme, calling resolve_field_access when the function call is
16497 resolved as an expression.
16498 (qualify_ambiguous_name): Function rewritten to work on qualified
16499 expression produced by make_qualified_name.
16500 (java_complete_tree): Promote type when function's argument are
16501 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
16502 the assignment to discover further errors if RHS is a expression
16503 name that fails to evaluate. Declare LHS initialized even though
16504 the assignment failed. Don't use the location variable and removed
16505 extra argument in patch function calls. Now handle the ARRAY_REF
16506 case and build internal string representation when STRING_CSTs are
16507 walked.
16508 (build_method_invocation): Don't wrap function call around a WFL.
16509 (build_assignment): Likewise. Use the operator location
16510 information.
16511 (patch_assignment): Handle array access LHSs. Handle error
16512 provenance, resulting in a better error report.
16513 (build_binop): Use op_location from operator as binop location
16514 information.
16515 (build_unaryop, build_incdec, build_cast): Likewise.
16516 (patch_binop): Extract location information from the node. Fixed
16517 typo in error message.
16518 (patch_unary_op): Extract location information from the node.
16519 (build_array_ref, patch_array_ref): New functions.
16520
16521 1998-07-01 Tom Tromey <tromey@cygnus.com>
16522
16523 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
16524 match _Jv_IsInstanceOf.
16525 * decl.c (init_decl_processing): Use _Jv_NewArray, not
16526 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
16527
16528 1998-06-30 Tom Tromey <tromey@cygnus.com>
16529
16530 * decl.c (init_decl_processing): Functions are now named
16531 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
16532
16533 1998-06-29 Per Bothner <bothner@cygnus.com>
16534
16535 * java-tree.h (load_class): Add prototype.
16536 * class.c (is_compiled_class): Add missing arg to load_class.
16537 * expr.c (expand_java_NEW): Call load_class.
16538 * parse.y (process_import): Removed bogus use of void return value.
16539
16540 1998-06-25 Per Bothner <bothner@cygnus.com>
16541
16542 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
16543 Function name is "_Jv_Throw" instead of "soft_athrow".
16544 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
16545 Function name is "_Jv_AllocObject" instead of "soft_new".
16546 Takes an extra parameter (object size).
16547 * expr.c: Update calls.
16548
16549 1998-06-24 Per Bothner <bothner@cygnus.com>
16550
16551 * lex.c (java_get_line_col): Handle end-of-file.
16552 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
16553
16554 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
16555
16556 * lang.c (lang_init): Make -fexceptions the default.
16557 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
16558 exception handling is not turned on.
16559
16560 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
16561
16562 * lang.c (flag_new_exceptions): Make this this default.
16563 * decl.c (end_java_method): Call emit_handlers.
16564 * except.c (method_init_exceptions): Set language code and version.
16565 (expand_start_java_handler): Enable exception, and call
16566 expand_eh_region_start.
16567 (expand_end_java_handler): Enable exception, and set up catch blocks.
16568 (emit_handlers): New routine to generate the saved handlers.
16569 * java-except.h (emit_handlers): Add prototype.
16570
16571 1998-06-12 Per Bothner <bothner@cygnus.com>
16572
16573 We used to have three different representations of the constant pool:
16574 the CPool structure, the tree_constant_pool, and the constructures
16575 used to build the Class object (which may need class and string
16576 constants) in compiled code. None were appropriate for compiling
16577 to .class files, so I did a major overhaul.
16578
16579 First, the tree_constant_pool array was removed. Things were
16580 modified to the CPool structure in the JCF could be used.
16581 Second, a "capacity" field was added to the CPool, and functions
16582 written to search for a matching constant, adding one if not found.
16583 The code that generated the Class object was changed to use a CPool.
16584 The actual TREE_LISTs used to build the CONSTRUCTORs used for
16585 the static Class object are now only in build_constants_constructor.
16586 Finally, I wrote code which can generate a .class file (including its
16587 constant pool) from the RECORD_TYPE of a class. This is a big step
16588 on the way to compiling Java source into .class files.
16589
16590 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
16591 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
16592
16593 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
16594 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
16595 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
16596 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
16597 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
16598 (lang_type): Removed constant_pool field.
16599 * jcf.h (CPool): Renamed size to count. Added field capacity.
16600 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
16601 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
16602 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
16603
16604 * constants.c (current_constant_pool_tags, current_constant_pool_data,
16605 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
16606 * constants.c (build_constants_constructor): Use new outgoing_cpool.
16607 (set_constant_entry, find_constant1, find_constant2,
16608 find_class_constant, count_constant_pool_bytes, write_constant_pool,
16609 find_utf8_constant, find_class_or_string_constant): New functions.
16610
16611 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
16612 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
16613 (give_name_to_class, get_class_constant): Likewise.
16614 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
16615 (get_name_and_type_constant, get_ref_constant): Removed.
16616 * parse.h (parser_ctxt): Remove field tree_constant_pool.
16617 * parse.y: Don't save/restore tree_constant_pool.
16618 * verify.c (verify_jvm_instructions): Update for new approach.
16619 * expr.c (expand_invoke, expand_java_field_op): Likewise.
16620
16621 * lang-options.h: Added -femit-class-file, -femit-class-files.
16622 * lang.c (flag_emit_class_files), java-tree.h: New flag.
16623 (lang_f_options): Added "emit-class-file(s)".
16624
16625 * expr.c (build_java_arrayaccess): Generate more efficient array
16626 bounds checking, by using unsigned compare.
16627
16628 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
16629
16630 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16631
16632 * parse.h: New comment on the handling of unresolved type
16633 identifiers. JDEPs are now part of the jdep_code enum.
16634 (typedef struct jdep): Now use enum jdep_code or int, depending on
16635 availability. Both are narrowed down to an 8 bits bitfield.
16636 (CALL_EXPR_PRIMARY): Fixed comment.
16637
16638 1998-06-10 Tom Tromey <tromey@cygnus.com>
16639
16640 * Make-lang.in (java): Added gjavac and jvgenmain.
16641 (java.start.encap): Depend on gjavac.
16642 (java.rest.encap): Depend on jvgenmain.
16643
16644 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
16645 (JAVA_CROSS_NAME): Likewise.
16646 (java.all.build): Depend on jvgenmain and gjavac.
16647 (java.all.cross): Depend on jvgenmain and gjavac-cross.
16648 (jvgenmain$(exeext)): New target.
16649 (java.install-common): Wrote.
16650 * config-lang.in (compilers, stagestuff): Added gjavac and
16651 jvgenmain.
16652
16653 1998-06-10 Dave Brolley <brolley@cygnus.com>
16654
16655 * lang.c (lang_decode_option): New argc/argv interface.
16656
16657 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
16658
16659 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
16660 * decl.c (build_decl_no_layout): New function.
16661 * expr.c (java_lang_expand_expr): Layout declarations found in
16662 blocks before they're pushed.
16663 * jcf-parse.c (load_class): Save current line when parsing class
16664 file.
16665 (parse_source_file): Register class before expanding their
16666 methods.
16667 * lang.c (put_decl_node): Produce `null' when `void *' is
16668 processed.
16669 * lex.c (static tree wfl_op): New static global, for error report
16670 on casts.
16671 (java_init_lex): wfl_operator and wfl_op initialized
16672 here. Filename caching added for wfl_op. Return wfl_op when `(' is
16673 parsed.
16674 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
16675 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
16676 build_unresolved_array_type): New static function definitions.
16677 (build_decl_no_layout): New extern function declared.
16678 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
16679 faulty modifier exists.
16680 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
16681 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
16682 (UNARY_PLUS_EXPR): New fake operator.
16683 (struct parser_ctxt): New field osb_number.
16684 * parse.y (static tree wfl_operator): New static WFL for operator
16685 bound error messages.
16686 (DECR_TK, INCR_TK): Moved.
16687 (OP_TK): Tagged <operator>.
16688 (array_type:): Now call build_unresolved_array_type.
16689 (dim_expr:): Count the number of '[' seen.
16690 (post_increment_expression, post_decrement_expression,
16691 pre_increment_expression, pre_decrement_expression,
16692 unary_expression_not_plus_minus, unary_expression:): Actions are
16693 now building the corresponding unary expressions.
16694 (cast_expression:): Actions are now building cast expressions.
16695 (build_unresolved_array_type): New function.
16696 (create_interface): Reset the number of declared interfaces.
16697 (create_class): Likewise.
16698 (method_header): Methods declared within the scope of an interface
16699 are now implicitly set public and abstract.
16700 (java_complete_class): Variable's and parameter's type are patched
16701 with a promoted type.
16702 (declare_local_variables): Resolved non builtin types are promoted
16703 before being used to build a variable decl. Removed type patch
16704 posted on variable initialization statement.
16705 (source_start_java_method): Use build_decl_no_layout to build the
16706 decl of a parameter of incomplete type.
16707 (java_register_parsed_class): Process interfaces too. Call
16708 rest_of_decl_compilation on each processed class declarations.
16709 (java_complete_expand_methods): Don't attempt to expand things in
16710 interfaces.
16711 (java_complete_tree): Process CONVERT_EXPR, even though it always
16712 has a type. Propagate error_mark_node to node's type too. Promote
16713 method's call argument type and return error_mark_node if
16714 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
16715 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
16716 handle unary operator nodes.
16717 (build_assignment): Added comment.
16718 (print_int_node): New function.
16719 (patch_assignment): New second argument. New error handling. Use
16720 print_int_node. Handle references. Use can_cast_to_p to issue
16721 different error message according to the context and check upon
16722 the initialization of the RHS.
16723 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
16724 (operator_string): Handle more operators.
16725 (patch_binop): No longer use a function static
16726 wfl_operator. Improved error message on shift distance.
16727 (build_unaryop, build_incdec, build_cast, patch_unaryop,
16728 patch_cast): New functions.
16729
16730 1998-06-05 Per Bothner <bothner@cygnus.com>
16731
16732 * jvspec.c: New file.
16733 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
16734
16735 * java-tree.h (identifier_subst): Add declaration.
16736
16737 1998-06-04 Tom Tromey <tromey@cygnus.com>
16738
16739 * jvgenmain.c (main): Generate call to JvRunMain.
16740
16741 * class.c (make_class_data): Push value for "sync_info" field.
16742 * decl.c (init_decl_processing): Push "sync_info" field.
16743
16744 1998-06-03 Per Bothner <bothner@cygnus.com>
16745
16746 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
16747 Java (source) name, not signature.
16748 Set TYPE_ALIGN to (at least) that of element_type.
16749
16750 1998-06-02 Per Bothner <bothner@cygnus.com>
16751
16752 * class.c: Moved classname-mangling-rekated code to ...
16753 * mangle.c: ... this new file.
16754 * jvgenmain.c: New program (needs mangle.c) to generate main program.
16755 * Makefile.in: Update for above changes.
16756
16757 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16758
16759 * expr.c (truthvalue_conversion): Convert integer and floating
16760 point value to their truth value.
16761 * lex.c (java_lex): Handle the `null' literal.
16762 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
16763 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
16764 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
16765 New macros.
16766
16767 * parse.y: Reorganization/documentation on token declaration.
16768 (binop_lookup[]): New added new tree codes.
16769 (relational_expression): Build corresponding binary operators.
16770 (equality_expression, conditional_and_expression,
16771 conditional_or_expression): Likewise.
16772 (java_complete_class): Fix crash in debug message.
16773 (java_complete_tree): Check initialization of method call
16774 arguments. Further bogus node evaluation to detect more error
16775 during assignments. Handles more binary operators.
16776 (patch_assignment): Use DECL_P.
16777 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
16778 code.
16779 (operator_string): Handle more case. Compacted source.
16780 (patch_binop): Changed function comment. Checking for
16781 uninitialized first operand takes the compound assignment into
16782 account and uses DECL_P. Checking for uninitialized second operand
16783 delayed to routine's end. Use macros to issue type bound error
16784 messages and issue messages on both operands if their types are
16785 different. Force fixed type into node. Handle all binary
16786 operators.
16787
16788 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16789
16790 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
16791 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
16792 build operator node and return tokens.
16793 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
16794 * parse.h (java_complete_tree): Changed returned type in prototype.
16795 (build_method_invocation, build_assignment, patch_assignment,
16796 patch_binop): New static function declarations.
16797 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
16798 BUILD_EXPR_WFL): New macros.
16799 * parse.y (enum tree_code binop_lookup[]): New static for token to
16800 TREE_CODE lookup.
16801 (%union): Parser union has new sub-structure `operator'.
16802 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
16803 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
16804 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
16805 ASSIGN_ANY_TK): Tokens tagged `operator'.
16806 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
16807 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
16808 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
16809 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
16810 (assignment_operator:): Rule tagged `operator'.
16811 (expression_statement:): Re-installed default rule.
16812 (method_invocation:): Sub rules call build_method_invocation.
16813 (postfix_expression:): Don't attempt to resolve name here. Just
16814 return an ID.
16815 (multiplicative_expression:): Sub-rules build corresponding binop
16816 expression node.
16817 (additive_expression:, shift_expression:, and_expression:,
16818 exclusive_or_expression:, inclusive_or_expression:): Likewise.
16819 (assignment:): Sub rule invoke build_assignment.
16820 (assignment_operator:): Default rules on sub rules.
16821 (force_error): Added documentation on this variable.
16822 (declare_local_variables): Build initialization calling
16823 build_assignment.
16824 (expand_start_java_method): Removed unused rtx declaration. Mark
16825 arguments as already initialized.
16826 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
16827 (java_complete_expand_methods): Don't process next method if
16828 completion of the previous one triggered errors.
16829 (java_complete_expand_method): Call source_end_java_method if no
16830 error were found during completion.
16831 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
16832 locals declaratilon. Handle names found within a class. Return
16833 error_mark_node when things aren't found.
16834 (patch_method_invocation_stmt): Return error_mark_node on failures.
16835 (patch_invoke): Removed unused local. Return the correct node.
16836 (java_complete_tree): Now returns a value. The BLOCK section binds
16837 local identifiers and the type of a BLOCK is now void. Assign the
16838 result of operand completion on COMPOUND_EXPR. Assign the
16839 encapsulated node of a WFL to the result of its completion, except
16840 when the node is an identifier. Now handle MODIFY_EXPR and several
16841 binary operators. Return error_mark_node on errors.
16842 (build_method_invocation, build_assignment, patch_assignment,
16843 build_binop, operator_string, patch_binop): New functions.
16844 * typeck.c (binary_numeric_promotion): New function.
16845
16846 1998-05-21 Per Bothner <bothner@cygnus.com>
16847
16848 * class.c (identifier_subst): New convenience wrapper for ident_subst.
16849 Replace most uses of ident_subst by identifier_subst.
16850
16851 * class.c (push_class_static_dummy_field): Removed function.
16852 (build_class_ref): Find Class object decl by looking up "CNAME.class",
16853 instead of looking got "class" static field. Create that decl here.
16854 (class_identifier_node): Removed; no longer needed.
16855 (init_class_processing): Don't init class_identifier_node.
16856 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
16857 Do nreverse 0 times (instead of twice) for Object and Class.
16858 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
16859
16860 1998-05-20 Per Bothner <bothner@cygnus.com>
16861
16862 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
16863 while initializing linenumber_count and linenumber_table.
16864 Do it before init_function_start (which calls emit_line_note).
16865 * expr.c (expand_byte_code): Don't need to clear lineno here.
16866
16867 1998-05-18 Tom Tromey <tromey@cygnus.com>
16868
16869 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
16870 then mangle number as _N_.
16871
16872 * class.c (mangle_class_field): New function.
16873 (build_class_ref): Set assembler name of class reference using
16874 mangle_class_field.
16875 (push_class_static_dummy_field): Likewise.
16876
16877 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
16878
16879 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
16880 of assigning to TREE_CODE. The latter method exploits a feature
16881 of GCC that is not ANSI compliant.
16882
16883 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16884
16885 * decl.c (pushdecl_force_head): New function.
16886 (pushlevel): Removed conditional printf.
16887 (complete_start_java_method): Don't enter local variable scope if
16888 function is compiled from source code.
16889 * expr.c: parse.h now included
16890 (java_lang_expand_expr): New function.
16891 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
16892 printf. Terminate buffer when doing directories.
16893 * jcf-parse.c (parse_source_file): Call lang_init_source before
16894 parsing and before code generation.
16895 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
16896 use printf if the macro is defined.
16897 * lang.c (lang_init): Install lang_expand_expr hook on
16898 java_lang_expand_expr.
16899 (java_dummy_print): New function.
16900 (lang_init_source): New function.
16901 * lex.c (java_lex): Remember location of an opening brace at the
16902 second nesting level.
16903 (java_is_eol): Unget character seen after a CR if it is EOF.
16904 * parse.h: Now includes lex.h
16905 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
16906 printf if the macro is defined.
16907 (expand_start_java_method, build_expr_block, enter_block,
16908 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
16909 New static function declarations.
16910 (pushdecl_force_head): New extern function declaration.
16911 (INCOMPLETE_TYPE_P): New macro.
16912 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
16913 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
16914 BLOCK_EXPR_ORIGIN): New macros.
16915 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
16916 DECL_SOURCE_LINE_LAST): New macros.
16917 (struct parser_ctxt): Removed field current_method_decl, redundant
16918 with the field current_function_decl. Added fields
16919 first_ccb_indent1 and pending_block.
16920 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
16921 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
16922 tagged <node>
16923 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
16924 (compilation_unit:): Cosmetic on sub rule.
16925 (type_declaration:): Cosmetic on sub rules. Added an error rule.
16926 (variable_initializer:): Installed default rule on expression:.
16927 (method_declaration:): method_header: starts a new
16928 method. method_body: installs the function body, absorbs blocks
16929 emitted for temporary variable scopings, pops function's body block
16930 and merges function's last statement lineno in DECL_SOURCE_LINE.
16931 (method_body:): Installed default rules.
16932 (block:): Call enter_block when an opening brace is seen. Absorb
16933 scoping blocks and call exit_block when a closing brace is seen.
16934 (block_statement:): Cosmetic changes.
16935 (method_invocation:): Create WFL around CALL_EXPR node.
16936 (patch_stage): Added comment around definition.
16937 (method_header): Try to use first_ccb_indent1 as the first line of
16938 the method, so BP debug info are emitted at the first opening
16939 brace of the function. If the function has no body, use the
16940 location of the function's name. Override currently defined method
16941 name with the matching WFL so we can point redefinition errors
16942 using the location where the function's name was declared.
16943 (check_abstract_method_header): Interprets DECL_NAME as an
16944 identifier or as a WFL, accordingly.
16945 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
16946 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
16947 location and name information out of it and reinstall DECL_NAME to
16948 its original identifier node value.
16949 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
16950 function's source code).
16951 (read_import_dir): Test the value returned by find_class and issue
16952 a fatal accordingly.
16953 (declare_local_variables): Push a new block for the scope of the
16954 new variable(s) if code has been already generated at that nesting
16955 level. Pinpoint redefinition errors using the variable id
16956 WFLs. Generate initialization code if necessary. If the variable
16957 type is incomplete, register a patch on its decl.
16958 (source_start_java_method): Rewritten. Define a new block for the
16959 function's parameters. Build parameter decl out of function's
16960 arguments and register them for a patch if their types are
16961 incomplete.
16962 (expand_start_java_method): Includes the part of
16963 source_start_java_method that was pushing the parameter decls and
16964 completing the method start code.
16965 (source_end_java_method): Removed call the expand_end_bindings and
16966 poplevel (already taken care of). Reinstall function's arguments
16967 and get function's last line of code before calling
16968 expand_function_end.
16969 (java_method_add_stmt): New comment before the function's
16970 code. Complement the second operand of the current COMPOUND_EXPR
16971 if necessary.
16972 (java_complete_expand_methods): Don't generate debug info on line
16973 zero when expanding a generated constructor.
16974 (java_complete_expand_method): Set start and end line numbers for
16975 a artificially generated constructor to one and manually call
16976 enter_block and exit_block when defining it. For all methods:
16977 expand function's start calling the new expand_start_java_method
16978 and invoke java_complete_tree on the effective method's body, if
16979 any.
16980 (resolve_expression_name): Now use lookup_name_in_blocks to search
16981 local variable decls and print out an error when variables are
16982 undefined.
16983 (patch_method_invocation_stmt): Inserted comment before the
16984 function's code.
16985 (lookup_method_invoke): Chain method's arguments using chainon
16986 with the current arg list as a second argument. Inserted missing
16987 IDENTIFIER_POINTER when reporting an error on methods not found.
16988 (refine_accessible_methods_list): Don't retain constructors.
16989 (patch_arguments): Function removed.
16990 (java_complete_tree): Inserted comment before the function's
16991 code. New case for BLOCKs. Moved the WFL case a bit
16992 further. Complete function's arguments.
16993 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
16994 maybe_absorb_scoping_blocks): New functions.
16995
16996 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16997
16998 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
16999 previously set.
17000 * jcf-parse.c (parse_source_file, java_error_count): New forward
17001 and extern declarations.
17002 (java_parse_abort_on_error): Macro moved.
17003 (jcf_parse_source): fatal called if fopen fails. Now calls
17004 parse_source_file.
17005 (parse_source_file): New parse_only parameter. Reflects the
17006 elimination of the second pass.
17007 (yyparse): parse_source_file called with argument set to 0.
17008 * jcf.h (JCF_ZERO): Sets java_source to zero.
17009 * lex.c (java_init_lex): pass argument is gone. Function modified
17010 to be called once during the analysis of a file.
17011 (java_unget_unicode): Fixed typo in fatal message.
17012 (java_get_line_col): Likewise.
17013 (java_lval): Likewise. String literals no longer built during
17014 second pass.
17015 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
17016 account.
17017 * parse.h (MODIFIER_WFL): New macro.
17018 (parse_check_super, parser_check_super_interface): Now return int.
17019 (parser_chain_incomplete_item, not_builtin_p,
17020 complete_method_decl): Declarations removed.
17021 (build_method_invocation_stmt, build_invoke): Renamed using the
17022 `patch' instead of `build'
17023 (register-incomplete_type, obtain_incomplete_type,
17024 java_complete_tree, java_complete_expand_method,
17025 unresolved_type_p, create_jdep_list): New function declarations.
17026 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
17027 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
17028 (jdep): New typedef on new struct _jdep.
17029 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
17030 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
17031 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17032 JDEP_RESOLVED_P): New macros.
17033 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
17034 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
17035 JDEP_VARIABLE): New enum values and jdep kinds.
17036 (jdeplist): New typedef on struct _jdeplist.
17037 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
17038 macros.
17039 (CALL_EXPR_PRIMARY): New macro.
17040 (struct parser_ctxt): Fields java_pass, current_method_decl,
17041 method_decl_list deleted. New field jdeplist.
17042 (INCOMPLETE_P): Macro deleted.
17043 * parse.y (single_type_import_declaration:): Removed pass switch.
17044 (type_import_on_demand_declaration): Likewise.
17045 (field_declaration:): Removed pass switch on all sub rules.
17046 (class_declaration:): Call the complete_class_decl removed on
17047 class_body rules.
17048 (method_declaration:): Removed second pass switch. No longer chain
17049 methods decl when method_header reduced.
17050 (method_header:): Sub rules no longer depend on pass switch.
17051 (method_declarator:): Likewise.
17052 (method_body:): Likewise.
17053 (abstract_method_declaration:): Likewise.
17054 (block_statement:): Likewise.
17055 (local_variable_declaration:): Likewise.
17056 (argument_list:): Likewise.
17057 (method_invocation:): Likewise. Call to build_method_invocation_stmt
17058 removed. Partial CLASS_EXPR tree node built instead.
17059 (postfix_expression:): Removed pass switch on all sub rules.
17060 (java_pop_parser_context): Free classd_list content.
17061 (yyerror): Call obstrack_grow0 to finalize error message.
17062 (check_class_interface_creation): Comment modified to reflect new
17063 returned value meaning. Removed second pass switch. Return 1 if an
17064 error was found, 0 otherwise. Adjust pointer on filename if a
17065 leading path separator was found.
17066 (maybe_create_class_interface_decl): Removed first pass switch
17067 when linking the class decl to the class_list. Install a new
17068 jdep_list for the class.
17069 (add_superinterfaces): List of unresolved interfaces is
17070 gone. Unresolved interfaces are directly added to the current
17071 dependencies list.
17072 (create_interface): Second pass shortcut removed.
17073 ctpx->modifier_ctx access through MODIFIER_WFL.
17074 (create_class): Second pass shortcut removed. Call to
17075 register_incomplete_type replaces the call to
17076 parser_chain_incomplete_item.
17077 (complete_class_decl): Function removed.
17078 (duplicate_declaration_error): New way of retrieving redeclared
17079 item type.
17080 (register_fields): Call to lookup_modifier_cl replaced by
17081 MODIFIER_WFL. New way of handling unresolved type, using
17082 unresolved_type_p and obtain_incomplete_type.
17083 register_incomplete_type replaces call to parser_chain_incomplete_item.
17084 (patch_stage): New static global variable.
17085 (method_header): New way of handling unresolved type, using
17086 unresolved_type_p and obtain_incomplete_type. patch_stage used to
17087 indicates that the method decl needs to be patched.
17088 (check_abstract_method_header): Call to lookup_modifier_cl
17089 replaced by MODIFIER_WFL.
17090 (method_declarator): Incomplete argument type are registered
17091 calling register_incomplete_type. Patch on the declared method is
17092 issued in that case.
17093 (unresolved_type_p): New function.
17094 (parser_check_super_interface): New comment to reflect function's
17095 modified returned type (int). Function and has a new argument
17096 this_wfl. Call to parse_error_context uses this_wfl instead of
17097 relying on lookup_cl.
17098 (parser_check_super): Comment reflects function's new returned
17099 type (int). Function returns nonzero value on error.
17100 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
17101 register_incomplete_type, jdep_resolve_class): New functions to
17102 handle incomplete types in declarations.
17103 (java_complete_class): Rewritten to work with the new incomplete
17104 type handling scheme.
17105 (complete_class_report_errors): Likewise.
17106 (complete_method_decl): Removed: it jobs is now handled by
17107 java_complete_class.
17108 (do_resolve_class): Class loaded in not already loaded and not
17109 found in Java source code.
17110 (java_check_regular_methods, java_check_abstract_methods): Don't
17111 call complete_method_decl anymore.
17112 (lookup_modifier_cl, not_builtin_p): Functions deleted.
17113 (read_import_dir): Got rid of the pass number dependency.
17114 (declare_local_variables): New handling of unresolved types (patch
17115 issued).
17116 (source_start_java_method): New parameter level. Function called
17117 with level set to 1 when argument types are potentially
17118 unresolved. Called to complete the job with level set to 2 once
17119 types are complete.
17120 (source_end_java_method): Call to permanent_allocation
17121 removed. Waiting to be replaced by a more suitable obstack
17122 management.
17123 (java_complete_expand_methods, java_complete_expand_method,
17124 java_expand_finals): New functions.
17125 (build_method_invocation_stmt): Renamed
17126 patch_method_invocation_stmt. Extracts function call expression
17127 (wfl) and arguments (args) from CALL_EXPR tree operands.
17128 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
17129 call. Patch the function and argument operand of the CALL_EXPR
17130 tree argument.
17131 (patch_argument, java_complete_tree): New functions.
17132
17133 1998-04-20 Per Bothner <bothner@cygnus.com>
17134
17135 Recover from missing fields and methods (i.e. error instead of fatal).
17136 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
17137 * expr.c (expand_invoke): Recover from missing method.
17138 (expand_java_field_op): Recover from missing field.
17139 Inline references to java.lang.{Integer,Char,...}.TYPE.
17140 * typeck.c (get_type_from_signature), java-tree.h: New function.
17141 * class.c (add_method): Use get_type_from_signature.
17142 (build_class_ref): Handle a class that was not found.
17143 * typeck.c (convert): Handle conversion to pointers (for convenience).
17144 * verify.c (verify_jvm_instructions): Use get_type_from_signature
17145 instead of lookup_field to handle missing fields.
17146
17147 * jcf-parse.c (process_zip_dir): Set java_source.
17148
17149 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
17150
17151 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
17152
17153 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
17154
17155 * jcf-parse.c (load_class): Don't change input_filename before
17156 calling jcf_parse_source (but still do it before calling
17157 jcf_parse).
17158 (jcf_parse_source): Assign input_filename after having saved the
17159 parser context.
17160 * lex.c (java_init_lex): Chain a WFL node to the import on demand
17161 list. ctxp->modifier_ctx zeroed according to its new
17162 definition. ctxp->filename initialized. Removed
17163 JAVA_MODIFIER_CTX_UNMARK.
17164 (java_unget_unicode): Update the character based column position.
17165 (java_allocate_new_line): ref_count not used anymore. Always free
17166 ctxp->p_line. Initialize c_line->char_col to 0.
17167 (java_get_unicode): Update the character based column position.
17168 (java_lex): Use ctxp->elc to store current position in source
17169 file, at the beginning of the parsed token. Set modifier_ctx entry
17170 corresponding to the parse modifier to a WFL node. Return a WFL
17171 node when an identifier is parsed.
17172 (java_lex_error): Now uses ctxp->elc to store current position in
17173 source.
17174 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
17175 * lex.h (build_wfl_node): New function definitions.
17176 (struct java_line): ref_count and next fields are gone. New field
17177 char_col.
17178 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
17179 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
17180 (JAVA_COLUMN_DELTA): New macro.
17181 (java_lc): New typedef on new struct _java_lc.
17182 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
17183 (parse_error_context, parse_warning_context): Changed prototypes.
17184 (java_get_line_col): Added as an available global function.
17185 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
17186 (IC_DECL): Replaced by macro IC_TYPE
17187 (DEPEND_WFL): New macro.
17188 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
17189 wrong modifier.
17190 (exit_java_complete_class): Removed a commented out statement.
17191 (struct parser_ctxt): Added comments on fields. modifier_ctx is
17192 now an array of tree nodes. Deleted fields line_list and
17193 e_line. New field elc, to replace e_line.
17194 * parse.y (array_type:): Build WFL node.
17195 (qualified_name:): Build a single WFL node out of two. Retain
17196 the location information of the first node in the resulting node.
17197 (package_declaration:): Use package name as a WFL node
17198 (single_type_import_declaration:): Use imported name as a WFL node.
17199 (type_import_on_demand_declaration:): Use root of the imported
17200 packages as a WFL node.
17201 (field_declaration:): Removed unused local variable cl.
17202 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
17203 (yyerror): New static elc. Removed static error_line, error_pos.
17204 New local code_from_source. Save ctxp->elc into elc at the first
17205 pass. Call java_get_line_col to get a string of the line where
17206 the error occurred.
17207 (debug_line): Removed static function.
17208 (parse_error_context, parse_warning_context): Parameter cl is now
17209 a WFL node. Use its value to initialize ctxp->elc.
17210 (redefinition_error): Parameter cl is now a WFL node.
17211 (parse_add_interface): New parameter wfl. No longer call
17212 lookup_cl, use wfl instead.
17213 (check_class_interface_creation): Parameter cl is now a WFL node.
17214 (maybe_create_class_interface_decl): Likewise.
17215 (add_superinterfaces): New function.
17216 (create_interface): Removed local cl, node, super_decl,
17217 super_decl_type. Function now uses id as a WFL node. Better
17218 warning/error report on obsolete or forbidden mix of
17219 modifiers. Now calls add_superinterfaces to register interfaces.
17220 (create_class): Removed local cl, node. Local variable id is used
17221 as a WFL node. Better error report on forbidden modifier
17222 mix. Uses add_superinterfaces to register interfaces.
17223 (find_field): Argument cl is now a WFL node. Now store the WFL
17224 node of a fields that needs to be checked for their
17225 initialization.
17226 (method_header): Local variable node non longer used. Local
17227 variable id replaces cl.
17228 (check_modifiers_consistency): Local variable cl is now a WFL
17229 node.
17230 (method_declarator): Local variable cl replaced by parameter id.
17231 (parser_qualified_name): Now uses parameter name as a WFL node.
17232 (parser_check_super_interface): New parameter wfl, for achieve
17233 greater accuracy during error reports.
17234 (parser_chain_incomplete_item): New parameter named location. Used,
17235 along the decl, to construct the incomplete item node.
17236 (java_complete_class): resolve_class now uses WFL node extracted
17237 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
17238 where appropriate.
17239 (complete_method_decl): Unresolved function's argument types are WFL.
17240 (resolve_class): Parameter cl is now a WFL node.
17241 (resolve_and_layout): Likewise.
17242 (do_resolve_class): Likewise. Try first to use cl and then do the
17243 lookup on the decl when calling check_pkg_class_access.
17244 (complete_class_report_errors): Use IC_TYPE in place of
17245 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
17246 instead of doing a lookup over the decl.
17247 (java_check_final): Use WFL info from field tree list.
17248 (lookup_cl): Rewritten and returns a statically defined WFL node.
17249 (lookup_modifier_cl): Now uses information from WFL nodes.
17250 (process_imports): Likewise.
17251 (read_import_dir): name and cl arguments replaced by a single WFL
17252 node. Function modified accordingly.
17253 (find_in_imports_on_demand): Now uses WFL node.
17254 (check_pkg_class_access): cl argument is now a WFL node.
17255 (declare_local_variables): Fixed to use WFL nodes.
17256 (resolve_expression_name): Likewise.
17257 (build_method_invocation_stmt): name_combo argument renamed
17258 wfl. Function modified to use WFL nodes.
17259 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
17260 (lookup_method_invoke): cl is now a WFL node. Added missing
17261 IDENTIFIER_POINTER to class type decl name.
17262
17263 1998-04-14 Dave Brolley <brolley@cygnus.com>
17264
17265 * lang.c (init_parse): Now returns char* containing the filename.
17266
17267 1998-04-10 Per Bothner <bothner@cygnus.com>
17268
17269 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
17270
17271 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
17272 * class.c (make_class_data): If flag_assume_compiled, initial class
17273 state is CSTATE_PREPARED; make superclass and interfaces direct
17274 references, rather than constant pool indexes.
17275
17276 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17277
17278 * parser.y: Include flags.h. Removed debug variable pl.
17279 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
17280 (block:): Likewise.
17281 (labeled_statement_nsi:): Generate debug info when reducing
17282 expression_statement:.
17283 (check_pkg_class_access): get_access_flags_from_decl invocation
17284 fixed for new CLASS_* flags location.
17285 (source_end_java_method): Save/restore parser context when
17286 entering/leaving this routine. Restore lineno to its right value
17287 before calling expand_end_bindings.
17288 (build_method_invocation_stmt): build_invoke called with the
17289 current line information.
17290 (build_invoke): New argument cl. Wrap the function call around a
17291 wfl node.
17292 (refine_accessible_methods_list): Changed comment, removed
17293 unnecessary code.
17294 * parse.h: Fixed typo in comments.
17295 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
17296 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
17297 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
17298 parser_ccb_indent.
17299 * lex.c (java_lex): Record the last closing curly bracket of a
17300 function.
17301 * jcf-parse.c (jcf_parse_source): Now calls
17302 java_check_methods. Clarified comment, fixed typo.
17303
17304 1998-04-09 Dave Brolley <brolley@cygnus.com>
17305
17306 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
17307 (finish_parse): Expose for non USE_CPPLIB builds.
17308
17309 1998-04-08 Jeffrey A Law (law@cygnus.com)
17310
17311 * lang.c (lang_print_xnode): New function.
17312
17313 1998-04-03 Per Bothner <bothner@cygnus.com>
17314
17315 * decl.c (class_dtable_decl), java-tree.h: New tree node.
17316 * class.c (get_dispatch_vector, get_dispatch_table): New functions
17317 used to build a class's dispatch table.
17318 (make_class_data): Generate dispatch table if flag_assume_compiled.
17319 Set dtable of class object to address of class_dtable_decl.
17320
17321 * decl.c (int_decl_processing): Make soft_badarrayindex_node
17322 be volatile and have side effects - generates better code.
17323
17324 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
17325 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
17326
17327 * expr.c (expand_invoke): If class is final, method is
17328 effectively final, so can call it directly.
17329
17330 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
17331
17332 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
17333
17334 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17335
17336 * parse.y (build_method_invocation_stmt): Removed extra argument
17337 to build_invoke.
17338
17339 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
17340
17341 * expr.c (dtable_indent): Now static global.
17342 (expand_invoke): Now call invoke_build_dtable and
17343 build_invokevirtual.
17344 (invoke_build_dtable, build_invokevirtual): New functions.
17345 * jcf-io.c (find_class): Defer issuing a warning by setting
17346 jcf->outofsynch to 1.
17347 * jcf-parse.c (jcf_out_of_synch): New function.
17348 (load_class): Test this_jcf.outofsynch flag and call
17349 jcf_out_of_synch accordingly.
17350 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
17351 comment indentation.
17352 * lex.c (java_get_unicode): Fixed code indentation.
17353 (java_lex): Create string literal. Fixed typo. Removed several
17354 premature obstack_free.
17355 * parse.h: New enums for name resolution and invocation mode.
17356 (struct qualification): New data structure.
17357 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
17358 (do_resolve_class, build_method_invocation_stmt,
17359 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
17360 debug_line, identical_subpath_p, invocation_mode,
17361 refine_accessible_methods_list, build_invoke,
17362 lookup_method_invoke): New functions declared.
17363 (build_invokevirtual, invoke_build_dtable, match_java_method,
17364 build_field_ref, jcf_out_of_synch): New references to external
17365 functions.
17366 (struct parse_ctxt): Removed artificial_constructor field.
17367 * parse.y: (array_type:): Type defined for this rule.
17368 (class_type:): Installed default rule for interface_type:.
17369 (array_type:): Now build Java array type.
17370 (qualified_name:): Now use obstack_grow0.
17371 (method_declaration:): Skip the artificial constructor added to
17372 the list, if any.
17373 (abstract_method_declaration:): Execute the code only during pass 1.
17374 (block:): Installed default rule in block_statements:.
17375 (block_statement:): Add the statement to the method during pass 2.
17376 (statement_expression): Installed default rule for
17377 method_invocation:.
17378 (argument_list:): Added code to build the argument list.
17379 (method_invocation:): Added call to create the method invocation
17380 node.
17381 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
17382 (debug_line): New function for debug.
17383 (complete_class_decl): No longer do something during pass 1.
17384 (method_header): Use BUILD_PTR_FROM_NAME.
17385 (parser_qualified_classname): Use obstack_grow0. Removed bogus
17386 obstack_free.
17387 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
17388 function's main comment.
17389 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
17390 classes.
17391 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
17392 (resolve_class): Now works with arrays.
17393 (do_resolve_class, resolve_and_layout): New functions.
17394 (java_check_regular_methods): Reverse method list before and after
17395 having processed it. No longer set ctxp->artificial_constructor.
17396 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
17397 accordingly. Fixed typo in issued error message. Now use
17398 obstack_grow0.
17399 (find_in_imports_on_demand): Now use obstack_grow0.
17400 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
17401 (source_end_java_method): Call expand_expr_stmt instead of
17402 expand_expr. Calls it before calling expand_function_end.
17403 (java_method_add_stmt): Do nothing if errors were found during
17404 parsing.
17405 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
17406 (build_method_invocation_stmt, build_invoke, invocation_mode,
17407 lookup_method_invoke, refine_accessible_methods_list,
17408 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
17409 New functions.
17410 * typeck.c (build_java_signature): Properly end method signature
17411 if return type skipped.
17412 (match_java_method): New function.
17413
17414 1998-03-16 Per Bothner <bothner@cygnus.com>
17415
17416 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
17417
17418 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
17419
17420 * expr.c (build_invoke_non_interface): New function.
17421 (methods_ident, ncode_ident): Now static globals.
17422 (expand_invoke): Use build_invoke_non_interface.
17423 * java-tree.h (struct lang_decl): New field function_decl_body.
17424 (DECL_FUNCTION_BODY): New macro.
17425 * jcf-parse.c (jcf_parse_source): Deeper check before setting
17426 CLASS_FROM_SOURCE_P.
17427 (parse_source_file): Fixed typos. Call java_layout_parsed_class
17428 before starting pass 2. Call to java_generate_parsed_class replaced
17429 by java_register_parsed_class.
17430 * lex.c: Fixed typo in header. Some line width related formating.
17431 * lex.h: Some line width related formating.
17432 * parse.h (source_end_java_method, resolve_expression_name,
17433 complete_class_decl, maybe_create_class_interface_decl,
17434 check_class_interface_creation): New static function declarations.
17435 (java_layout_parsed_class, java_method_add_stmt): New function
17436 declarations.
17437 (struct parser_ctxt): Field mark_class_generate removed. New
17438 fields class_list and artificial_constructor.
17439 * parse.y: Fixed typo in header.
17440 (class_declaration:): Call complete_class_decl when class body
17441 parsed.
17442 (method_declaration:): Call source_end_java_method in pass 2 when
17443 the method body is defined.
17444 (postfix_expression:): Do expression name resolution on sub-rule
17445 name during pass 2.
17446 (create_class, create_interface): Merged common pieces.
17447 (check_class_interface_creation, maybe_create_class_interface_decl):
17448 New functions.
17449 (complete_class_decl): New function.
17450 (register_fields): Fixed line width related typo.
17451 (method_header): Correctly skip first argument when fixing
17452 argument line. Changed the loop.
17453 (java_check_circular_reference): Now use ctxp->class_list.
17454 (java_complete_class): Removed start/stop marking.
17455 (java_check_regular_methods): Now takes a class decl as an
17456 argument. Add default constructor if none were encountered.
17457 (java_check_methods): Now use ctxp->class_list. Changed call to
17458 java_check_regular_methods.
17459 (source_start_java_method): Set DECL_ARG_TYPE for each function
17460 arguments.
17461 (source_end_java_method, java_method_add_stmt): New functions.
17462 (java_generate_parsed_class): No longer exists.
17463 (java_layout_parsed_class, java_register_parsed_class): New functions.
17464 (resolve_expression_name): New function.
17465
17466 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17467
17468 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
17469 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
17470 until pass initializations are done. Call read_import_dir with
17471 pass set to 0.
17472 * parse.h: (lookup_modifier_cl): New function declared.
17473 (INTERFACE_FIELD_MODIFIERS): New macro.
17474 (OBSOLETE_MODIFIER_WARNING): New macro.
17475 * parse.y: (register_fields): Class type and current field name in
17476 local variables. Check modifier(s) if adding field(s) to an interface.
17477 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
17478 and report errors using the faulty modifier line context.
17479 (lookup_modifier_cl): New function.
17480 (read_import_dir): Detect and report default import processing
17481 failure.
17482
17483 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
17484
17485 Add a pair of -fassume-compiled/-fno-assume-compiled options.
17486 * class.c (is_compiled_class): Return 1 after making sure it
17487 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
17488 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
17489 * java-tree.h (flag_assume_compiled): Add decl.
17490 * lang.c (lang_f_options): Add the flag.
17491 (flag_assume_compiled): Add decl, default to 0.
17492
17493 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
17494
17495 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
17496 (is_compiled_class): Likewise.
17497 (layout_class): Likewise.
17498 (layout_class): Detect and lay out classes defined in source code.
17499 (interface_of_p, add_interface_do, may_add_interface): New
17500 function.
17501 (add_interface): Now use add_interface_do.
17502 (add_method_1): New function.
17503 (add_method): Now use add_method_1.
17504 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
17505 (complete_start_java_method): New function.
17506 (start_java_mehod): Now call complete_start_java_method.
17507 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
17508 (expand_invoke): Likewise and fixed typo.
17509 *gjava.c: (print_super_field): Use new argument to find_class
17510 DO_CLASS_FILE.
17511 (main): Likewise.
17512 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
17513 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
17514 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
17515 IDENTIFIER_NODE.
17516 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
17517 (add_method_1, push_class): New prototypes.
17518 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
17519 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
17520 directory where the class was found.
17521 (find_class): New argument DO_CLASS_FILE. Function find_class
17522 modified accordingly.
17523 *jcf-parse.c: (fix_class_path): New function.
17524 (load_class): Use new VERBOSE argument. load_class now finds and
17525 loads/parses .class/.java files. Save read_state of current_jcf
17526 if necessary.
17527 (java_parser_abort_on_error): New macro.
17528 (jcf_parse_source, parse_source_file): New function.
17529 (jcf_parse): Fixed typo.
17530 (yyparse): Call parse_source_file () only.
17531 (process_zip_dir): Fixed typo, fix zdir->filename_length when
17532 writing the real class name back in the zip directory entry.
17533 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
17534 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
17535 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
17536 (find_class): Prototype fixed.
17537 *lex.c: Added 1998 time stamp.
17538 Removed all static global variables, moved into the parser
17539 context data structure.. Now include unistd.h if SEEK_SET not
17540 defined.
17541 (java_init_lex): Rewritten.
17542 (java_sneak_unicode): Modified current unicode access in current line.
17543 (java_unget_unicode): Likewise.
17544 (java_allocate_new_line): New allocation management.
17545 (java_read_char): Modified access and storage of unget_utf8_value.
17546 New way of processing current unicode.
17547 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
17548 (java_get_unicode): Now use the parser context.
17549 (java_lineterminator): Likewise.
17550 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
17551 of the reentrant parser implementation. Function now use the
17552 parser context data structure and java_lval. Fixed production of
17553 the float and double constant "out of range" error message. Fixed
17554 obstack use. Return integer value when hitting a modifier. Now
17555 return type for TRUE, FALSE and other predefined types. Return
17556 identifier as a TREE_LIST list containing the current line context
17557 as the TREE_VALUE sub-node.
17558 (java_unicode_2_utf8): Fixed typo in declaration.
17559 (java_lex_error): Now use the parser context data structure.
17560 *lex.h: Added 1998 time stamp.
17561 (struct java_line): New fields ref_count and next.
17562 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
17563 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
17564 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
17565 *parse.h: Added 1998 time stamp.
17566 (java_parse_source_file): Renamed from parse_source_file.
17567 (YYERROR_NOW, YYNOT_TWICE): Fixed.
17568 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
17569 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
17570 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
17571 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
17572 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
17573 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
17574 (struct parser_ctxt): New data structure to keep the parser context.
17575 *parse.y: Added 1998 time stamp, got rid of static global variables.
17576 (java_error_count, ctxp): New global variables.
17577 (%union): New value field.
17578 (numeric_type, integral_type): Rules removed.
17579 (primitive_type): Rule defined to handle integral, float, double and
17580 boolean types.
17581 (qualified_name, package_declaration,
17582 single_type_import_declaration, type_import_on_demand_declaration,
17583 modifiers, class_declaration, super, interfaces,
17584 interface_type_list, class_body, field_declaration,
17585 field_declaration, variable_declarators, variable_declarator,
17586 variable_declarator_id, method_declaration, method_header,
17587 formal_parameter_list, formal_parameter, method_body, block,
17588 static, interface_declaration, extends_interfaces,
17589 abstract_method_declaration, local_variable_declarators): Rules now
17590 define actions.
17591 (force_error, do_warning): New global statics.
17592 (push_parser_context, parser_context_save_global,
17593 parser_context_restore_global, pop_parser_context): New functions.
17594 (yyerror): Now uses the global parser context. Fixed use of obstack.
17595 (parse_error, parse_error_context, parse_warning_context,
17596 java_accstring_lookup, redefinition_error, check_modifiers,
17597 parser_add_interface, create_interface, create_class, find_field,
17598 duplicate_declaration_error, register_fields, method_header,
17599 check_modifiers_consistency, check_abstract_method_header,
17600 method_declarator, parser_qualified_classname,
17601 parser_check_super_interface, parser_check_super,
17602 parser_chain_incomplete_item, java_check_circular_reference,
17603 layout_class_from_source, java_complete_class,
17604 complete_method_decl, resolve_class, complete_class_report_errors,
17605 java_check_final, check_method_redefinition,
17606 java_check_regular_methods, java_check_abstract_methods,
17607 java_check_methods, lookup_java_interface_method2,
17608 lookup_java_method2, lookup_cl, find_name_in_single_imports,
17609 process_imports, find_in_imports, read_import_entry,
17610 read_import_dir, find_in_imports_on_demand,
17611 check_pkg_class_access, not_builtin_p, declare_local_variables,
17612 source_start_java_method, java_generate_parsed_class): New
17613 functions.
17614 *typeck.c: (signature_include_return): New global variable.
17615 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
17616 to add the function returned type in the signature.
17617
17618 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
17619
17620 * jcf-io.c (open_in_zip): Use strncmp and LEN.
17621
17622 1998-01-29 Dave Brolley <brolley@cygnus.com>
17623
17624 * Make-lang.in (java.info): Added.
17625 (java.install-info): Added
17626
17627 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
17628
17629 * Makefile.in (clean): Also remove java/parse.c.
17630
17631 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
17632
17633 Add a pair of -fbounds-check/-fno-bounds-check options.
17634 * lang.c (lang_decode_option): Add code to grok arguments.
17635 (flag_bounds_check): Add decl.
17636 (lang_f_options): New array w/ the option in it.
17637 * java-tree.h (flag_bounds_check): Add decl.
17638 * lang-options.h: New file.
17639 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
17640 of a static macro value.
17641 (JAVA_ARRAY_EXCEPTION): Delete macro.
17642
17643 1998-01-23 Per Bothner <bothner@cygnus.com>
17644
17645 * typeck.c (build_java_array_type): Fix two bugs in previous change.
17646 * expr.c (build_anewarray): Add missing promote_type.
17647
17648 1998-01-22 Per Bothner <bothner@cygnus.com>
17649
17650 Add array types with known length to optimize bounds checking.
17651 * typeck.c (build_java_array_type): Take length parameter.
17652 (java_array_type_length, build_prim_array_type): New functions.
17653 * java-tree.h: Update for new functions.
17654 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
17655 * class.c: Use build_prim_array_type.
17656 * expr.c (can_widen_reference_to): Handle known-length array types.
17657 (verify_jvm_instructions): Keep track of integer push instructions
17658 followed by newarray/anewarray, so we can build known-length arrays.
17659 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
17660 (java_array_data_offset): New function.
17661 (build_java_array_length_access): New function. Optimize if constant.
17662 (build_java_arrayaccess): Constant fold bounds check.
17663 (expand_java_newarray, expand_java_anewarray): Replaced by ...
17664 (build_newarray, build_anewarray): New functions.
17665 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
17666 * verify.c (merge_types): Handle known-lengh array types.
17667
17668 1998-01-19 Per Bothner <bothner@cygnus.com>
17669
17670 * expr.c (expand_byte_code): Fix performace bug, which caused
17671 searching linenumber_table to be linear rather than constant.
17672
17673 1997-12-12 Per Bothner <bothner@cygnus.com>
17674
17675 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
17676
17677 * decl.c, java-tree.h (soft_fmod_node): New global.
17678 * decl.c (init_decl_processing): Define __builtin_fmod.
17679 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
17680 using __builtin_fmod.
17681
17682 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
17683
17684 * keyword.h: New file, output of keyword.gperf as processed by
17685 gperf.
17686 * lex.c (java_lex_init): Initialize java_error_flag.
17687 * parse.c (YYERROR_NOW): Uses java_error_flag.
17688 * parse.y: New static java_error_flag. Useless definition of
17689 buffer_error gone.
17690 * parse.y (java_error): Portable error recovery using
17691 java_error_flag (not yet completely tuned).
17692
17693 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
17694
17695 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
17696
17697 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
17698
17699 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
17700 (parse.c, lex.c, keyword.h): New rules for Java source code
17701 front-end.
17702 * parse.c: Renamed into jcf-parse.c.
17703 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
17704 * keyword.gperf: New file, Java keywords.
17705 * parse.y: New file, Java language grammar.
17706 * parse.h: New file, Java language grammar definitions.
17707 * lex.c: New file, Java language lexer.
17708 * lex.h: New file, Java language lexer definitions.
17709
17710 1997-12-03 Per Bothner <bothner@cygnus.com>
17711
17712 * decl.c (clinit_identifier_node), java-tree.h: New global.
17713 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
17714 * verify.c (verify_jvm_instructions): Inline use of removed macros.
17715 * expr.c (expand_java_field_op): Check for invalid assignment
17716 to final field.
17717
17718 * jcf-reader.c (get_attribute): Test for wrong attribute length.
17719
17720 1997-10-27 Per Bothner <bothner@cygnus.com>
17721
17722 * verify.c (verify_jvm_instructions): When processing a handler,
17723 attempt to set the current_subr to the right value.
17724 (More complicated code combines Sep 17 and Oct 22 versions.)
17725
17726 1997-10-24 Per Bothner <bothner@cygnus.com>
17727
17728 * class.c (push_class): Figure out (guess) name of source file.
17729 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
17730 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
17731 (parse_class_file): Change return type from int to void.
17732 Call debug_start_source_file/debug_end_source_file.
17733
17734 * expr.c (build_java_binop): Fix masking 2nd operand.
17735 * decl.c (init_decl_processing): Set sizetype first.
17736
17737 1997-10-22 Per Bothner <bothner@cygnus.com>
17738
17739 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
17740 (Revert Sep 17 change.)
17741
17742 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
17743
17744 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
17745 .class extension in their name and fix thing so we don't process
17746 them parse_zip_file_entries().
17747 (parse_zip_file_entries): Cleaned unused local variables.
17748
17749 1997-10-20 Per Bothner <bothner@cygnus.com>
17750
17751 * expr.c (can_widen_reference_to): Allows equal array element types.
17752 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
17753 * jcf-dump.c (RET): Get (and print) index.
17754
17755 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
17756 Promote element type to POINTER_TYPE.
17757
17758 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17759
17760 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
17761 find_in_current_zip, jcf_figure_file_type): Moved from
17762 jcf-reader.c to parse.c.
17763 * zextract.c: (read_zip_archive): takes file_comment_length possible
17764 field into account.
17765
17766 1997-10-20 Per Bothner <bothner@cygnus.com>
17767
17768 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
17769
17770 * verify.c (merge_types): Handle array types even better ...
17771
17772 1997-10-17 Per Bothner <bothner@cygnus.com>
17773
17774 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
17775
17776 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
17777 * class.c (make_class_data): Don't build fields_decl if no fields.
17778 When building fields_decl, skip if DECL_ARTIFICIAL.
17779
17780 * expr.c (java_stack_swap): Update stack_type_map.
17781 * verify.c (merge_types): Handle array types better.
17782
17783 1997-10-15 Per Bothner <bothner@cygnus.com>
17784
17785 * class.c (add_field): Don't promote short integral fields to
17786 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
17787 * expr.c (push_value): Promote and convert short integral values.
17788
17789 * decl.c, java-tree.h (integer_two_node): New constant node.
17790 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
17791
17792 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
17793
17794 * class.c (append_gpp_mangled_type): Use function argument
17795 unpromoted type to generate mangled name.
17796
17797 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
17798
17799 * constants.c (build_constant_data_ref): Now uses current_class
17800 instead of main_class.
17801 (build_constants_constructor): Now uses current_class instead of
17802 main_class.
17803 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
17804 of the global variable SeepZipFiles done here.
17805 * zextract.c (read_zip_archive): extra_field optional field taken
17806 into account while computing the position of the class file in the
17807 archive.
17808 * verify.c (verify_jvm_instructions): Use current_jcf to search
17809 the constant pool.
17810 * parse.c (load_class): First search for the class to load in the
17811 current zip file. Saves current_jcf (restored before returning
17812 from that function). Don't call JCF_FINISH in the class was found
17813 in the current ZIP file.
17814 (jcf_parse): If the class was found in the current ZIP file, save
17815 its tree_constant_pool (for later reuse).
17816 (parse_class_file): New function. Process each method defined in
17817 the current class and record the class as to be later registered.
17818 (yyparse): Rewritten. Figure the type of the current file and switch
17819 accordingly.
17820 * lang.c: New global variable current_jcf.
17821 (lang_init): Removed compiling_from_source test (done later, in
17822 yyparse). Removed call the jcf_parse ().
17823 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
17824 (typedef struct JCF): New fields seen_in_zip (to mark a class found
17825 in the current ZIP file) and zip_offset (offset to the class data in
17826 the current zip file).
17827 * jcf-reader.c: zipfile.h included.
17828 localToFile: New ZipFileCache static global variable
17829 (parse_zip_file_entries): New function. Browse the current ZIP
17830 file directory and process each class found.
17831 (process_zip_dir): New function. Register each class found in the
17832 ZIP file directory. The class aren't parsed but a valid JCF is
17833 link to each of them.
17834 (find_in_current_zip): New function. Search for a class in the
17835 current ZIP file directory. If found, prepare the class so that it
17836 can be loaded.
17837 (jcf_figure_file_type): New function. Examine the file structure
17838 to figure a class file, a ZIP file. If none of these categories are
17839 matched, a source file is assumed.
17840 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
17841 SeenZipFile: New global variable.
17842 (open_in_zip): Use zipmember's length to accelerate the search for
17843 a member. If zipmember was NULL and zip file successfully read,
17844 return 0.
17845 * java-tree.h: New global variable current_jcf declared. Added
17846 declaration for current_constant_pool_tags, current_constant_pool_data,
17847 current_constant_pool_length, current_constant_pool_data_ref.
17848 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
17849 store the JCF of classes seen in a zip file) and tree *constant_pool
17850 (to save a loaded class constant pool). current_class declared here.
17851 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
17852 retrieve method_ref_constant.
17853 (PUSHC): java_push_constant_from_pool now uses current_jcf.
17854 (OBJECT): get_class_constant now uses current_jcf.
17855 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
17856 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
17857 (expand_invoke): Now uses current_class instead of main_class
17858 (build_class_init): Now uses current_class instead of main_class
17859 * class.c: New static global variable registered_class.
17860 (register_class): New function.
17861 (emit_register_class): Modified to use registered_class instead of
17862 main_class
17863 (is_compiled_class): Now take into account class seen in the archive.
17864
17865 1997-10-06 Per Bothner <bothner@cygnus.com>
17866
17867 * except.h: Renamed to: java-except.h.
17868 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
17869 * except.c: Add semi-working (commented out) implementation.
17870
17871 * expr.c (expand_iinc): Add needed flush_quick_stack.
17872 * parse.c (set_source_filename): New function.
17873 (give_name_to_class): Set input_filename from package.classname.java.
17874
17875 * jcf-io.c (find_class): Don't look first in ".".
17876
17877 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
17878
17879 * zextract.c (read_zip_archive): Now takes into account the
17880 extra_field field.
17881 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
17882
17883 1997-09-20 Per Bothner <bothner@cygnus.com>
17884
17885 * constants.c, java-tree.h (build_internal_class_name): New function.
17886 (alloc_class_constant): Re-implement using build_internal_class_name.
17887 * class.c (make_class_data): Likewise.
17888 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
17889
17890 1997-09-17 Per Bothner <bothner@cygnus.com>
17891
17892 * verify.c (verify_jvm_instructions): Temporarily set current_subr
17893 to NULL before pushing an exception handler target.
17894
17895 * expr.c (flush_quick_stack): Save from low stack indexes to high.
17896 (java_stack_swap, java_stack_dup): Re-write to be safe from
17897 clobbering registers.
17898 (build_class_init): New function.
17899
17900 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17901
17902 * typeck.c (build_java_array_type): Temporary use
17903 permanent_obstack to create the array 'length' field.
17904 * expr.c (lookup_label): Temporay use permanent_obstack to create
17905 label if not found.
17906 * class.c (push_super_field): Tempory use permanent_obstack.
17907
17908 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
17909
17910 * typeck.c (type_for_mode): Now handles double_type_node and
17911 float_type_node.
17912 * verify.c (verify_jvm_instructions): The instruction following
17913 the wide bytecode is checked. OPCODE_ret added to the list of
17914 wide.
17915
17916 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
17917
17918 * class.c (make_class): Temporary use permanent_obstack. Set the
17919 class CLASS_P field to 1.
17920 (push_class): Temporary use permanent_obstack.
17921 (set_super_info): Temporary use permanent_obstack.
17922 (add_method): Temporary use permanent_obstack, set
17923 METHOD_TRANSIENT().
17924 (add_field): Temporary use permanent_obstack. Sets
17925 FIELD_VOLATILE() and FIELD_TRANSIENT().
17926 (build_class_ref): Temporary use permanent_obstack if the class
17927 isn't compiled.
17928 (build_static_field_ref): Temporary use permanent_obstack when
17929 creating field's rtl.
17930 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
17931 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
17932 and fields. Function finalized, as far as flag handling.
17933 (push_class_static_dummy_field): Temporary use permanent_obstack.
17934 (emit_register_class): Force generation of class registration at
17935 -O3 or deeper.
17936 * decl.c (end_java_method): Call permanent_allocation() before
17937 returning.
17938 * expr.c (can_widen_reference_to): Added comment to interface
17939 handling, fixed typo.
17940 (lookup_field): Now uses CLASS_P() to correct FIXME
17941 (expand_invoke): Verification on public && !static &&
17942 !abstract moved into soft_lookupinterfacemethod (kaffe).
17943 Use Object class dtable if objectref is an array when expanding
17944 invokeinterface.
17945 (java_push_constant_from_pool): Temporary use permanent_obstack
17946 for CONSTANT_string
17947 * parse.c (get_ref_constant): Temporary use permanent_obstack to
17948 create constant references.
17949 (get_constant): Temporary use permanent_obstack to create constant.
17950 (load_class): Temporary use permanent_obstack to load class.
17951 (jcf_parse): Temporary use permanent_obstack to perform class
17952 layout.
17953 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
17954 (build_java_signature): Temporary use permanent_obstack.
17955 * verify.c: (verify_jvm_instruction): removed unnecessary verification
17956 on ACC_SUPER flag.
17957 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
17958 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
17959 (CLASS_P): Defined
17960
17961 1997-09-11 Per Bothner <bothner@cygnus.com>
17962
17963 * class.c (append_gpp_mangled_type): Fix typo.
17964 (emit_register_class): Use main_class to get class object, rather
17965 than looking for no-longer-existing static decl starting with _CL.
17966 * typeck.c (parse_signature_type): Promote array element type
17967 if it is a RECORD_TYPE.
17968
17969 1997-09-10 Per Bothner <bothner@cygnus.com>
17970
17971 * class.c (push_class_static_dummy_field): New function.
17972 (mangle_static_field): New. Do G++-style mangling of static fields.
17973 (layout_class): Mandle static fields here, not in add_field.
17974 (build_class_ref): The class object is now a dummy static field.
17975 * decl.c (find_local_variable): Look for best, instead of first match.
17976 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
17977 (build_java_athrow): Don't check here if exception is Throwable.
17978 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
17979 (TYPE_USED): Removed. No longer used ...
17980 * parse.c (jcf_parse): Call push_class_static_dummy_field.
17981 * verify.c (push_pending_label): New function.
17982 (push_pending_block): Renamed to check_pending_block.
17983 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
17984 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
17985 re-checking possible handlers) after a store (less wasted work).
17986 Check for null handler (finally) before calling add_handler.
17987 Various changes to (finally?) correctly handle try/finally.
17988
17989 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
17990
17991 * class.c: Include stdio.h.
17992
17993 1997-09-04 Per Bothner <bothner@cygnus.com>
17994
17995 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
17996 to make sure class is initialized before static/special invoke.
17997
17998 * verify.c (verify_jvm_instructions): On a store instruction,
17999 call find_local_variable to force pre-allocation of decl and rtx.
18000 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
18001
18002 1997-09-03 Per Bothner <bothner@cygnus.com>
18003
18004 * class.c (build_class_ref): Strip off "promoted_" if need be.
18005 (make_field_value): Call build_java_signature when needed.
18006 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
18007 * expr.c (build_java_athrow): Don't push_value of exception.
18008 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
18009 match specification of [fd]cmp[lg] for NaNs.
18010 (expand_byte_code): Add support for exception handler ranges.
18011 * except.c: Add skeleton for EH code-generation.
18012 * verify.c (merge_types): Treat all promoted integral types as equal.
18013 * constants.c (build_constants_constructor): To force creation of
18014 current_constant_pool_data_ref, call build_constant_data_ref.
18015
18016 * javaop.def (lload): Fix typo.
18017 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
18018
18019 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
18020
18021 * parse.c: Don't include function.h.
18022
18023 1997-08-27 Per Bothner <bothner@cygnus.com>
18024
18025 * except.[ch]: New files.
18026 * Makefile.in (JAVA_OBJS): Add except.o
18027 * expr.c: Temporary warning about unimplemented exceptions.
18028 * verify.c: Verify exception handlers.
18029
18030 * jcf-dump.c (disassemble_method): Print exception table.
18031
18032 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
18033
18034 * expr.c (verify_jvm_instructions): Started a thorough
18035 verification of invoke* bytecodes.
18036 (expand_byte_code): flush quick stack if PC is the target of a
18037 branch. and undef RET (conflicting with config/i386/i386.h).
18038 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
18039 used.
18040 (expand_invoke): Now handles invokeinterface and do more
18041 verification according to the bytecode.
18042 (lookup_field): Don't try to load the class if processing
18043 dtable_type.
18044 (can_widen_reference_to): Now handles interfaces.
18045 * decl.c (init_decl_processing): New global variable
18046 soft_lookupinterfacemethod_node, declared in java-tree.h.
18047 Call set_super_info on string_type_node.
18048 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
18049 defined.
18050 * class.c (set_super_info): Fills the CLASS_* flags according to
18051 access_flags.
18052 (get_access_flags_from_decl): Handles all class flags.
18053
18054 1997-08-26 Per Bothner <bothner@cygnus.com>
18055
18056 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
18057 * parse.c (yyparse): Check for abstract method, and missing code.
18058 * expr.c (expand_byte_code): Change interface.
18059 * lang.c (put_decl_node): Print promoted types prettier.
18060 * verify.c (verify_jvm_instruction): Change interface.
18061 Partial support for scanning exception table.
18062 For load instructions, handle promoted integral types.
18063
18064 1997-08-21 Per Bothner <bothner@cygnus.com>
18065
18066 * verify.c: New file, with contents moved from expr.c.
18067 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
18068 * typeck.c (is_array_type_p): Moved here from expr.c.
18069 * java-tree.h: Add some now-needed function declarations.
18070 * Makefile.in (JAVA_OBJS): Added verify.o.
18071
18072 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
18073
18074 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
18075 METHOD_ABSTRACT flag.
18076
18077 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
18078 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
18079 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
18080
18081 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
18082 variables.
18083 (start_java_method): Hook for SYNCHRONIZED methods.
18084
18085 * expr.c (build_java_jsr, build_java_ret): New functions
18086 (JSR,PRE): New macros
18087 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
18088 (verify_jvm_instructions): tableswitch, lookupswitch,
18089 monitorenter, monitorexit, goto_w: verified.
18090 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
18091 (build_java_monitor): New function.
18092 (MONITOR_OPERATION): Modified to call build_java_monitor()
18093 (verify_jvm_instructions): Started a thorough verification of
18094 invoke* bytecodes.
18095
18096 1997-08-19 Per Bothner <bothner@cygnus.com>
18097
18098 Support verification of jsr/ret subroutines (used for try/finally).
18099 * decl.c (return_address_type_node): New type node.
18100 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
18101 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
18102 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
18103 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
18104 TYPE_USED): New macros for special types in type_map.
18105
18106 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
18107 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
18108 BCODE_JUMP_TARGET.
18109 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
18110
18111 * expr.c (can_widen_reference_to): New function.
18112 (pop_type): Use it.
18113 (merge_type_state): Support handling start of subroutine.
18114 (push_pending_block): Return char* error message, instead of calling
18115 fatal on an error. Also handle subroutines.
18116 (verify_jvm_instructions): Handle errors from push_poending_block.
18117 Support jsr and ret instructions.
18118
18119 1997-08-19 Per Bothner <bothner@cygnus.com>
18120
18121 * jcf-io.c (find_classfile): Fix thinko.
18122 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
18123
18124 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
18125
18126 * Makefile.in (BISON): Remove.
18127
18128 1997-08-07 Per Bothner <bothner@cygnus.com>
18129
18130 * Makefile.in: Convert to autoconf.
18131 * config-lang.in (outputs): Added java/Makefile.
18132
18133 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
18134 Rename cc1java to jc1.
18135
18136 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
18137 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
18138
18139 * class.c (class_depth): Do load_class if needed.
18140
18141 Mostly better verification.
18142 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
18143 (init_decl_processing): Change return type of soft_checkcast.
18144 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
18145 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
18146 lang_print_error): New functions.
18147 (lang_init): Set global hook print_error_function to lang_print_error.
18148 * expr.c: In the type_map ptr_type_node is only used for null now.
18149 (pop_type, merge_types): Hence ptr_type_node matches any reference.
18150 (merge_types): Dererence pointer to record types before comparing.
18151 (decode_newarray_type, merge_types): On error just return NULL.
18152 (build_java_binop): Add preliminary implementation (with warning)
18153 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
18154 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
18155 (expand_compare, expand_java_goto, expand_java_call): Don't
18156 push_pending_block, since that only makes sense when verifying.
18157 (merge_type_state): Different return codes.
18158 (push_pending_block): A block may need to be verified more than once.
18159 (expand_byte_code): Warn about unused code at code generation time.
18160 (verify_jvm_instruction): Changed logic, since code may need to be
18161 re-verified if type-state has changed. Also, better error handling.
18162 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
18163 Improve newarray, anewarray, ?aload, athrow,
18164 * java-tree.h (LABEL_CHANGED): New macro.
18165
18166 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
18167
18168 * decl.c (soft_athrow_node): New global variable initialized.
18169 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
18170 * typeck.c (convert): Added support for REAL_TYPE.
18171 (convert_to_char): New function.
18172 (convert): Handle CHAR_TYPE.
18173 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
18174 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
18175 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
18176 promoted type.
18177 (verify_jvm_instructions): Added break a the end of bogus unop: label.
18178 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
18179 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
18180 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
18181 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
18182 to Use The Right Things.
18183 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
18184 compatible with INT. BOOLEAN is made equivalent to BYTE.
18185 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
18186 OPCODE_ifnonnull): Now supported.
18187 (build_java_athrow): New function.
18188
18189 1997-08-04 Per Bothner <bothner@cygnus.com>
18190
18191 Rename method name <init> to match G++ (and fix mangling).
18192 * class.c (layout_class): Replace method name of <init> by class name.
18193 (make_method_value): Do inverse renaming of constructor from <init>.
18194 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
18195 * typeck.c (lookup_java_constructor): New function.
18196 * expr.c (expand_invoke): If method_name is <init>, call
18197 lookup_java_constructor to find constructor.
18198
18199 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
18200
18201 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
18202
18203 * parse.c (get_class_constant): Modified to handle array "classes"
18204 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
18205 wide type.
18206 (convert): Modified to handle real type.
18207 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
18208 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
18209 variables declared.
18210 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
18211 soft_multianewarray, soft_newarray_node, soft_throw_node): New
18212 global variables initialized.
18213 (find_local_variable): Handles the case of a pointer
18214 (end_java_method): Restore the use of one more scope
18215 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
18216 build_java_array_length_access, expand_java_arrayload,
18217 expand_java_arraystore, expand_java_array_length,
18218 expand_java_multianewarray, expand_java_anewarray,
18219 build_java_check_indexed_type, is_array_type_p,
18220 build_java_throw_out_of_bound_exception): New functions.
18221 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
18222 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
18223 OPCODE_<t>aload): Implemented code for verification.
18224 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
18225 ARRAY_NEW_MULTI): Macro defined.
18226 (CONVERT): Modified to invoke convert().
18227 (case OPCODE_aload2): Fixed index typo from 2 to 1.
18228
18229 1997-07-31 Per Bothner <bothner@cygnus.com>
18230
18231 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
18232 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
18233 (make_class_data): Field name needs '/' as package prefix.
18234 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
18235
18236 1997-07-25 Per Bothner <bothner@cygnus.com>
18237
18238 Implement debug information for local variables.
18239 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
18240 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
18241 DECL_LOCAL_SLOT_CHAIN): New macros.
18242 (struct lang_decl_var): New type.
18243 * parse.c (give_name_to_locals): Move to decl.c.
18244 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
18245 (start_java_method): Re-write parameter handling.
18246 (pending_local_decls): New global variable.
18247 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
18248 (find_local_variable): Accept pc so we can skips decls not in range.
18249 (struct binding_level): Add end_pc field.
18250 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
18251 (various): Change so current pc gets passed to find_local_variable.
18252
18253 * decl.c (init_decl_processing): Re-arrange fields in
18254 class_type_node and and method_type_node to match kaffe 0.9.1.
18255 * class.c (make_method_value, make_class_data): Update
18256 initializations to match.
18257
18258 1997-07-16 Per Bothner <bothner@cygnus.com>
18259
18260 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
18261 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
18262 (push_super_field): New function.
18263 (make_class_data): Handle inheritance of class static initializer.
18264 (layout_class): New name mangling.
18265 * constants.c (build_constant_data_ref): Init type of data array
18266 to a one-element array.
18267 (build_constants_constructor): Set DECL_SIZE from complete array type.
18268 * decl.c: Rename class_type, object_type etc to class_type_node,
18269 object_type_node etc. Make former inherit from latter.
18270 * expr.c (expand_invoke): Add cast of function address.
18271 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
18272 * parse.c (yyparse): Don't call layout_class here.
18273 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
18274
18275 1997-06-14 Per Bothner <bothner@cygnus.com>
18276
18277 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
18278 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
18279 (alloc_class_constant): New.
18280 * expr.c (expand_invoke): Make sure method's class is initialized.
18281 * class.c (interits_from_p, emit_register_class): New functions.
18282 * parse.c (yyparse): Call emit_register_class.
18283
18284 1997-06-09 Per Bothner <bothner@cygnus.com>
18285
18286 * constants.c: New file, to handle constant pool.
18287 * Makefile.in (JAVA_OBJS): Add constants.o.
18288 * decl.c (init_decl_processing): Update, fix, finish various structs.
18289 (pushdecl_top_level): New.
18290 * parse.c (layout_class): Moved to class.c.
18291 * expr.c (java_push_constant_from_pool): New function.
18292 * class.c (build_class_ref): Make work fully
18293 (make_class_data): Emit super-class, constant pool, interface vector.
18294
18295 1997-06-03 Per Bothner <bothner@cygnus.com>
18296
18297 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
18298 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
18299 * class.c (class_depth): New function.
18300 (lookup_named_class): Replaced by new function lookup_class.
18301 * decl.c (object_type_node, string_type_node): New.
18302 Remove various types that we no longer need.
18303 * expr.c (verify_jvm_instructions): New separate verifier pass.
18304 (push_type, pop_type): New functions for verifier.
18305 (type_stack_dup, pop_argument_types, merge_types): Likewise.
18306 (expand_byte_code): Simplify, since we assume already verified.
18307 (expand_invoke): Now mostly works.
18308 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
18309 * lang.c (main_class): Move to parse.c. Don't make_class yet.
18310 * parse.c: Wait to allocate class object until we know its name.
18311 (layout_class): Calculate DECL_VINDEX for each virtual method.
18312 * typeck.c (get_array_type): Rename to ...
18313 (build_java_array_type): ... and provide working implementation.
18314 (build_java_signature): New function - build Java signature of type.
18315 (set_java_signature): New function - cache signature with type.
18316 (lookup_java_method): New function.
18317
18318 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
18319
18320 * class.c (ident_subst): Take extra SUFFIX parameter.
18321 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
18322 (set_constant_value, build_static_field_ref, is_compiled_class): New.
18323 (build_class_ref): Actually implement.
18324 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
18325 * decl.c (builtin_function): New.
18326 (init_decl_processing): Update for current Kaffe. Declare some
18327 builtin Kaffe functions.
18328 * expr.c (build_address_of): New.
18329 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
18330 Renamed (from expand_java_new etc), and added working implementations.
18331 (build_field_ref): Now also handle static fields.
18332 (expand_invoke): Implement invokestatic, and start implement rest.
18333 * java-opcodes.h: Use javaop.def to avoid duplicated list.
18334 * javaop.def: Rename invokevirt -> invokevirtual.
18335 * lang.c (use_handles): Removed.
18336 * parse.c: Add support for ConstantValue attribute.
18337 Handle nested loading of a class. (JPOOL_UTF): New.
18338
18339 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
18340
18341 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
18342
18343 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
18344
18345 * Make-lang.in (java.install-man): New empty rule.
18346 * typeck.c (set_local_type): New function.
18347 * expr.c (STORE_INTERNAL): Call find_local_variable,
18348 not find_stack_slot. Call set_local_type.
18349
18350 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
18351
18352 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
18353 and building RECORD_TYPE CONSTRUCTORs.
18354 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
18355
18356 * lang.c (use_handles): Change the default to 0.
18357 * decl.c: Define and build class_type, field_type, utf8const_type.
18358 * class.c (make_class_data, make_field_value,
18359 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
18360 hashUtf8String, strLengthUtf8, mangled_classname:
18361 Functions to build reflective data structures.
18362 * parse.c (yyparse): Call make_class_data.
18363
18364 * jcf-io.c (open_class, find_classfile): New functions.
18365 * jcf-dump.c: Support reading classfile from explicitly-named
18366 class file (without CLASSPATH searching).
18367
18368 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
18369
18370 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
18371 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
18372 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
18373 (get_constant): Now trivial for CONSTANT_Utf8.
18374
18375 * jcf.h: Make NEW_CPOOL the default.
18376 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
18377
18378 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
18379
18380 New directory.